From ae6299e59beec9eb6f05399c64524f2e8f7b0785 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Mon, 22 Nov 2021 10:06:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/workSys/demandCate.vue | 33 +++++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/views/modules/workSys/demandCate.vue b/src/views/modules/workSys/demandCate.vue index 3859c544..7221bb21 100644 --- a/src/views/modules/workSys/demandCate.vue +++ b/src/views/modules/workSys/demandCate.vue @@ -4,7 +4,14 @@
- + + + + 查询 @@ -128,7 +135,6 @@ export default { currentPage: 1, pageSize: 20, total: null, - conditions: [], tableData: [], addLevel: '1', addType: 'add', @@ -142,6 +148,7 @@ export default { value: 2 } ], + demandOptions: [], tableHeader: [ { label: '分类名称', @@ -162,6 +169,7 @@ export default { ], customerId: '', form: { + firstCategoryCode: '', categoryName: '', awardPoint: '', usableFlag: false @@ -174,6 +182,7 @@ export default { async created() { this.customerId = localStorage.getItem('customerId') this.getTableData() + this.getOptions() this.pageLoading = true }, mounted() { @@ -201,7 +210,6 @@ export default { handleSearch(val) { console.log('searchhh--', val) this.currentPage = 1 - this.conditions = val this.getTableData() }, handleAdd(type, addType, row) { @@ -363,6 +371,23 @@ export default { return this.$message.error('网络错误') }) }, + async getOptions() { + const params = { + parentCategoryCode: 0 + } + this.$http + .post('/heart/icresidemanddict/subcodelist', params) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } else { + this.demandOptions = res.data + } + }) + .catch(() => { + return this.$message.error('网络错误') + }) + }, async getTableData() { this.tableLoading = true let params = { @@ -370,7 +395,7 @@ export default { customerId: localStorage.getItem('customerId'), pageNo: this.currentPage, pageSize: this.pageSize, - firstCategoryCode: '' + firstCategoryCode: this.form.firstCategoryCode } await this.$http .post('/heart/icresidemanddict/pagelist', params)