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)