From d0f610ecd5417c7f224a88a37d56c8e66b8f073c Mon Sep 17 00:00:00 2001 From: xiaobai <857694115@qq.com> Date: Wed, 11 Aug 2021 13:52:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF=E5=86=85?= =?UTF-8?q?=E9=83=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawerDialog/index.vue | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/components/drawerDialog/index.vue b/src/components/drawerDialog/index.vue index 3946933..210318d 100644 --- a/src/components/drawerDialog/index.vue +++ b/src/components/drawerDialog/index.vue @@ -808,7 +808,7 @@ export default { this.listQuery.templateId = this.id this.form.templateId = this.id this.formLabelAlign.templateId = this.id - + console.log(this.id, 6666) if (this.id) { this.loadFormData(this.index) this.getList() @@ -823,7 +823,7 @@ export default { this.getTemplateIdentification() }, getJylbList() { - this.getCategoryList('jylb', null, null) + this.getNeibuList('jylb', null, null) }, addTemFn() { this.dialogVisible1 = true @@ -1002,7 +1002,7 @@ export default { getNblbListByJylb(val) { const sbzl = this.formTemplate.shebeizhongleidaima this.neibuleibie = [] - this.getCategoryList('nblb', val, sbzl) + this.getNeibuList('nblb', val, sbzl) }, handleClick(e) { this.activeName = e.index @@ -1015,8 +1015,7 @@ export default { // 新增与内部类别级联关系 const jylb = this.formTemplate.jianyanleibie this.neibuleibie = [] - this.getCategoryList('nblb', jylb, val) - + this.getNeibuList('nblb', jylb, val) this.shebeipinzhongdaima = [] this.sbpzLevelStatus = false this.getSbList( @@ -1066,23 +1065,16 @@ export default { } } }, - getCategoryList(type, parentCode, species) { + getNeibuList(type, parentCode, species) { this.api({ - url: '/category/all', + url: '/category/getCategoryList', method: 'get', params: { parentCode: parentCode, species: species } }).then((data) => { - switch (type) { - case 'jylb': - this.jylbList = data - return '' - case 'nblb': - this.nblbList = data - return '' - } + this.nblbList = data }) }, loadFormData(index) { @@ -1099,7 +1091,7 @@ export default { ) this.neibuleibie = JSON.parse(this.formTemplate.neibuleibie) this.getDicCodeList(this.formTemplate.bglx) - this.getCategoryList( + this.getNeibuList( 'nblb', this.formTemplate.jianyanleibie, this.formTemplate.shebeizhongleidaima