Commit ebac75ae authored by youjie's avatar youjie

no message

parent 6b049091
<template> <template>
<div> <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"> :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> v-loading="loading" border>
<el-table-column prop="Name" :label="$t('system.query_airName')" align="center"></el-table-column> <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 prop="Sort" :label="$t('system.table_rank')" width="100" align="center"></el-table-column>
<el-table-column :label="$t('system.table_operation')" align="center"> <el-table-column :label="$t('system.table_operation')" width="100" align="center">
<template slot-scope="scope"> <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==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&&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==1&&loading" type="danger" icon="el-icon-delete" size="mini" @click="editData(scope.row)" circle ></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<button class="normalBtn" type="primary" @click="addData()">+{{ $t('objFill.duizhnagkm') }}</button> <button class="normalBtn" type="primary" @click="addData()">+{{ $t('objFill.duizhnagkm') }}</button>
</div> </div>
</el-dialog> </el-dialog>
<addSubject v-if="isShowAdd" :obj="addMsg" @change="getNewData"></addSubject> <addSubject v-if="isShowAdd" :obj="addMsg" @changeData="getNewData" @change="isShowAdd=false"></addSubject>
</div> </div>
</template> </template>
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
}, },
getNewData(){ getNewData(){
this.isShowAdd=false this.isShowAdd=false
this.$emit('changeData')
this.getList() this.getList()
}, },
editData(row,type){ editData(row,type){
...@@ -90,15 +91,13 @@ ...@@ -90,15 +91,13 @@
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
row.loading = true
this.loading = true this.loading = true
this.apipost("Financial_post_SetBankSubject", this.addMsg, res => { this.apipost("Financial_post_SetBankSubject", this.addMsg, res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
row.loading = false
this.loading = false this.loading = false
this.$emit('changeData')
this.getList() this.getList()
}else{ }else{
row.loading = false
this.loading = false this.loading = false
} }
...@@ -117,14 +116,7 @@ ...@@ -117,14 +116,7 @@
this.loading = true this.loading = true
this.apipost("Financial_post_GetBankSubjectList", {}, res => { this.apipost("Financial_post_GetBankSubjectList", {}, res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
let arrList = function(list){
list.forEach(item => {
item.loading = false
})
}
arrList(res.data.data)
this.SubjectList = res.data.data; this.SubjectList = res.data.data;
console.log(this.SubjectList,'--------')
} }
this.loading = false this.loading = false
}, null) }, null)
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="close()">{{$t('pub.cancelBtn')}}</button> <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> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
this.loading = true this.loading = true
this.apipost("Financial_post_SetBankSubject", this.msg, res => { this.apipost("Financial_post_SetBankSubject", this.msg, res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.close() this.$emit('changeData',false)
} }
this.loading = false this.loading = false
}, null) }, null)
......
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
<ul> <ul>
<li> <li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="getList()"/> <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"/> <input type="button" class="hollowFixedBtn" :value="$t('objFill.v101.FinancialModule.xinzengkem')" @click="isShowAdd=true"/>
</li> </li>
</ul> </ul>
...@@ -194,8 +194,8 @@ ...@@ -194,8 +194,8 @@
</template> </template>
</el-table> </el-table>
</div> </div>
<SubjectList v-if="isShow" @change="close"></SubjectList> <SubjectList v-if="isShow" @changeData="changeData" @change="close"></SubjectList>
<addSubject v-if="isShowAdd" :obj="addMsg" @change="close"></addSubject> <addSubject v-if="isShowAdd" :obj="addMsg" @changeData="changeData" @change="close"></addSubject>
</div> </div>
</template> </template>
<script> <script>
...@@ -244,6 +244,10 @@ export default { ...@@ -244,6 +244,10 @@ export default {
this.getList(); this.getList();
}, },
methods:{ methods:{
changeData(){
this.isShowAdd = false
this.getList();
},
close(){ close(){
this.isShow = false this.isShow = false
this.isShowAdd = 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