From 6e61d053745e1d9f19542d6cd77f544a8f568738 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Thu, 9 Mar 2023 10:10:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=9C=B0=E5=9D=80,=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 3 +- .env.production.sit | 3 +- .../modules/communityParty/article/drafts.vue | 2 +- .../modules/communityParty/article/index.vue | 2 +- src/views/modules/workSys/articleTag/edit.vue | 67 ++++++++++++++----- .../modules/workSys/articleTag/index.vue | 4 +- 6 files changed, 58 insertions(+), 23 deletions(-) diff --git a/.env.development b/.env.development index be04f184b..b9429d7e2 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,7 @@ NODE_ENV=development -VUE_APP_API_SERVER = http://192.168.1.140/api +VUE_APP_API_SERVER = http://219.146.91.110/api +#VUE_APP_API_SERVER = http://192.168.1.140/api # VUE_APP_API_SERVER = https://epmet-yantai.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api diff --git a/.env.production.sit b/.env.production.sit index 9edee48dd..abbd978f7 100644 --- a/.env.production.sit +++ b/.env.production.sit @@ -1,6 +1,7 @@ NODE_ENV=production # VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api -VUE_APP_API_SERVER = http://192.168.1.140/api +#VUE_APP_API_SERVER = http://192.168.1.140/api +VUE_APP_API_SERVER = http://219.146.91.110/api VUE_APP_NODE_ENV=prod:sit VUE_APP_PUBLIC_PATH=epmet-oper VUE_APP_CUSTOMER=yantai \ No newline at end of file diff --git a/src/views/modules/communityParty/article/drafts.vue b/src/views/modules/communityParty/article/drafts.vue index 59906c237..606dad2c8 100644 --- a/src/views/modules/communityParty/article/drafts.vue +++ b/src/views/modules/communityParty/article/drafts.vue @@ -276,7 +276,7 @@ export default { type: "select", multiple: true, allowCreate: true, - optionUrl: "/gov/voice/tag/taglist", + optionUrl: "/gov/voice/tag/queryAgencyTag", optionUrlParams: {}, optionList: [], optionCook(list) { diff --git a/src/views/modules/communityParty/article/index.vue b/src/views/modules/communityParty/article/index.vue index ea064e288..9226f0d36 100644 --- a/src/views/modules/communityParty/article/index.vue +++ b/src/views/modules/communityParty/article/index.vue @@ -472,7 +472,7 @@ export default { type: "select", multiple: true, allowCreate: true, - optionUrl: "/gov/voice/tag/taglist", + optionUrl: "/gov/voice/tag/queryAgencyTag", optionUrlParams: {}, optionList: [], optionCook(list) { diff --git a/src/views/modules/workSys/articleTag/edit.vue b/src/views/modules/workSys/articleTag/edit.vue index e4f63815f..bd3ed8ee5 100644 --- a/src/views/modules/workSys/articleTag/edit.vue +++ b/src/views/modules/workSys/articleTag/edit.vue @@ -25,10 +25,11 @@ label-width="150px" prop="agencyId" > + @@ -63,6 +64,14 @@ export default { formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 btnDisable: false, orgOptions:[], + optionProps: { + checkStrictly: true, + expandTrigger: 'hover', + value: 'agencyId', + label: 'agencyName', + children: 'subAgencyList', + }, + agencyIdArray:[], tagId:'', formData: { tagName: '', @@ -83,6 +92,8 @@ export default { components: {}, async mounted () { await this.getOrgTreeList() + + }, methods: { @@ -90,6 +101,7 @@ export default { async initForm (type, row) { this.startLoading() this.formType = type + console.log(row); if(type!='add'){ this.formData.tagName = row.tagName @@ -107,22 +119,37 @@ export default { }, async getOrgTreeList() { this.dataListLoading = true - this.$http - .post('/gov/org/customeragency/staffinagencylist') - .then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } else { - console.log('获取查询详情成功', res.data) - let { agencyList, subAgencyList } = res.data - const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }] - this.orgOptions = this.deepTree(_arr) - } - }) - .catch(() => { - this.dataListLoading = false - return this.$message.error('网络错误') - }) + // this.$http + // .post('gov/org/customeragency/agencylist', { customerId: this.customerId}) + // .then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg) + // } else { + // console.log('获取查询详情成功', res.data) + // let { agencyList, subAgencyList } = res.data + // const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }] + // this.orgOptions = this.deepTree(_arr) + // } + // }) + // .catch(() => { + // this.dataListLoading = false + // return this.$message.error('网络错误') + // }) + const url = '/gov/org/customeragency/agencylist' + // const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist' + + let params = { + customerId: this.customerId + } + const { data, code, msg } = await requestPost(url, params) + if (code === 0) { + this.options = [] + this.agencyIdArray.length = [] + this.orgOptions.push(data) + + } else { + this.$message.error(msg) + } this.dataListLoading = false }, deepTree (arr) { @@ -141,7 +168,7 @@ export default { if (obj) { if (obj.level === "street") { for(let i in obj.subAgencyList){ - this.formData.push({'agencyId':obj.subAgencyList[i].agencyId,'orgIdPath':obj.subAgencyList[i].orgIdPath}) + this.formDatam.push({'agencyId':obj.subAgencyList[i].agencyId,'orgIdPath':obj.subAgencyList[i].orgIdPath}) } } else { this.formDatam.push({'agencyId':obj.agencyId,'orgIdPath':obj.orgIdPath}) @@ -239,6 +266,10 @@ export default { computed: { }, props: { + customerId:{ + type:String, + default:"" + } } } diff --git a/src/views/modules/workSys/articleTag/index.vue b/src/views/modules/workSys/articleTag/index.vue index 811df167b..e672ee7d2 100644 --- a/src/views/modules/workSys/articleTag/index.vue +++ b/src/views/modules/workSys/articleTag/index.vue @@ -151,6 +151,7 @@ @closed="diaClose" >