Commit ebac75ae authored by youjie's avatar youjie

no message

parent 6b049091
<template>
<div>
<el-dialog :title="$t('objFill.duizhnagkm')+$t('ground.liebiao')" width="400px"
<el-dialog :title="$t('objFill.duizhnagkm')+$t('ground.liebiao')" width="500px"
:visible.sync="showState" center @close="close">
<el-table :data="SubjectList" style="width: 100%;max-height: 300px;"
<el-table :data="SubjectList" style="width: 100%;max-height: 400px;"
v-loading="loading" border>
<el-table-column prop="Name" :label="$t('system.query_airName')" align="center"></el-table-column>
<el-table-column prop="Sort" :label="$t('system.table_rank')" align="center"></el-table-column>
<el-table-column :label="$t('system.table_operation')" align="center">
<el-table-column prop="Sort" :label="$t('system.table_rank')" width="100" align="center"></el-table-column>
<el-table-column :label="$t('system.table_operation')" width="100" align="center">
<template slot-scope="scope">
<el-button style="margin: 3px 0;" :loading="addMsg.Status==0&&scope.row.loading" type="primary" icon="el-icon-edit" size="mini" @click="editData(scope.row,1)" circle ></el-button>
<el-button style="margin: 3px 0;" :loading="addMsg.Status==1&&scope.row.loading" type="danger" icon="el-icon-delete" size="mini" @click="editData(scope.row)" circle ></el-button>
<el-button style="margin: 3px 0;" :loading="addMsg.Status==0&&loading" type="primary" icon="el-icon-edit" size="mini" @click="editData(scope.row,1)" circle ></el-button>
<el-button style="margin: 3px 0;" :loading="addMsg.Status==1&&loading" type="danger" icon="el-icon-delete" size="mini" @click="editData(scope.row)" circle ></el-button>
</template>
</el-table-column>
</el-table>
......@@ -20,7 +20,7 @@
<button class="normalBtn" type="primary" @click="addData()">+{{ $t('objFill.duizhnagkm') }}</button>
</div>
</el-dialog>
<addSubject v-if="isShowAdd" :obj="addMsg" @change="getNewData"></addSubject>
<addSubject v-if="isShowAdd" :obj="addMsg" @changeData="getNewData" @change="isShowAdd=false"></addSubject>
</div>
</template>
......@@ -74,6 +74,7 @@
},
getNewData(){
this.isShowAdd=false
this.$emit('changeData')
this.getList()
},
editData(row,type){
......@@ -90,15 +91,13 @@
type: "warning"
})
.then(() => {
row.loading = true
this.loading = true
this.apipost("Financial_post_SetBankSubject", this.addMsg, res => {
if (res.data.resultCode === 1) {
row.loading = false
this.loading = false
this.$emit('changeData')
this.getList()
}else{
row.loading = false
this.loading = false
}
......@@ -117,14 +116,7 @@
this.loading = true
this.apipost("Financial_post_GetBankSubjectList", {}, res => {
if (res.data.resultCode === 1) {
let arrList = function(list){
list.forEach(item => {
item.loading = false
})
}
arrList(res.data.data)
this.SubjectList = res.data.data;
console.log(this.SubjectList,'--------')
}
this.loading = false
}, null)
......
......@@ -19,7 +19,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="close()">{{$t('pub.cancelBtn')}}</button>
<el-button :loading="loading" class="normalBtn" type="primary" @click="editSubmit('msg')">{{$t('pub.sureBtn')}}</el-button>
<el-button :loading="loading" class="normalBtn" type="primary" @click="editSubmit('msg')">{{$t('pub.saveBtn')}}</el-button>
</div>
</el-dialog>
</template>
......@@ -73,7 +73,7 @@
this.loading = true
this.apipost("Financial_post_SetBankSubject", this.msg, res => {
if (res.data.resultCode === 1) {
this.close()
this.$emit('changeData',false)
}
this.loading = false
}, null)
......
......@@ -128,7 +128,7 @@
<ul>
<li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="getList()"/>
<input type="button" class="normalBtn" :value="$t('objFill.duizhnagkm')" @click="isShow=true"/>
<input type="button" class="normalBtn" :value="$t('objFill.duizhnagkm')+$t('ground.liebiao')" @click="isShow=true"/>
<input type="button" class="hollowFixedBtn" :value="$t('objFill.v101.FinancialModule.xinzengkem')" @click="isShowAdd=true"/>
</li>
</ul>
......@@ -194,8 +194,8 @@
</template>
</el-table>
</div>
<SubjectList v-if="isShow" @change="close"></SubjectList>
<addSubject v-if="isShowAdd" :obj="addMsg" @change="close"></addSubject>
<SubjectList v-if="isShow" @changeData="changeData" @change="close"></SubjectList>
<addSubject v-if="isShowAdd" :obj="addMsg" @changeData="changeData" @change="close"></addSubject>
</div>
</template>
<script>
......@@ -244,6 +244,10 @@ export default {
this.getList();
},
methods:{
changeData(){
this.isShowAdd = false
this.getList();
},
close(){
this.isShow = false
this.isShowAdd = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment