From ad3e7b5f7e790f1922a77383663c1f7a11bbfdda Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Mon, 15 Aug 2022 14:41:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/gridScoreManage.vue | 68 ++++++++++++------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreManage.vue b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreManage.vue index fdc50215..b4f98673 100644 --- a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreManage.vue +++ b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreManage.vue @@ -119,7 +119,9 @@ export default { value: 'id', checkStrictly: true, }, - chooseUserList: [] + chooseUserList: [], + sortFiled: '', + sortRule: '' } }, created() { @@ -155,7 +157,8 @@ export default { ...this.page, ...this.search, current: this.current, - + sortFiled: this.sortFiled, + sortRule: this.sortRule } }).then(res => { if(res?.data) { @@ -166,16 +169,12 @@ export default { }, selectPerson(val) { - this.personList = val - this.form.ids = [...this.personList.map(e => e.id)] - // .concat(this.chooseUserList.map(v=>v.id)) - // if (val) { - // this.form.residentId = val.id - // this.personList = [{...val}] - // } else { - // this.form.residentId = "" - // this.personList = [] - // } + if (val) { + this.personList = val + this.form.ids = [...this.personList.map(e => e.id)] + } else { + this.form.ids = this.chooseUserList.map(e => e.id) + } }, changeIntegral(row,type) { console.log(row); @@ -186,7 +185,7 @@ export default { id: row.id, name: row.userName }] - // this.personList = this.chooseUserList.map(e => e.id) + this.form.ids = this.chooseUserList.map(e => e.id) this.dialog = true } }, @@ -226,21 +225,42 @@ export default { }, changeTableSort(col) { - console.log(col); + // console.log(col); if(col.prop === 'integral') { // 剩余积分 - // col.order === 'ascending' && - // col.order === 'descending' && - // col.order === null && + if(col.order === 'ascending') { + this.sortFiled = 0 + this.sortRule = true + } else if(col.order === 'descending') { + this.sortFiled = 0 + this.sortRule = false + } else if(col.order === null) { + this.sortFiled = '' + this.sortRule = '' + } } else if(col.prop === 'totalIntegral') { // 累计积分 - // col.order === 'ascending' && - // col.order === 'descending' && - // col.order === null && + if(col.order === 'ascending') { + this.sortFiled = 1 + this.sortRule = true + } else if(col.order === 'descending') { + this.sortFiled = 1 + this.sortRule = false + } else if(col.order === null) { + this.sortFiled = '' + this.sortRule = '' + } } else if(col.prop === 'usedIntegral') { // 已用积分 - // col.order === 'ascending' && - // col.order === 'descending' && - // col.order === null && + if(col.order === 'ascending') { + this.sortFiled = 2 + this.sortRule = true + } else if(col.order === 'descending') { + this.sortFiled = 2 + this.sortRule = false + } else if(col.order === null) { + this.sortFiled = '' + this.sortRule = '' + } } - // this.getTableData() + this.getTableData() }, onConfirm() {