From 4d0b9ff9bc17dc8c38b784f2d3e7bb1a9f1468b7 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 30 Sep 2021 13:11:21 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/form/index.vue | 2 + src/views/form/publish/index.vue | 71 ++++++++++-- src/views/form/statistics/item.vue | 176 +++++++++++++++-------------- src/views/form/statistics/list.vue | 15 ++- 4 files changed, 172 insertions(+), 92 deletions(-) diff --git a/src/views/form/index.vue b/src/views/form/index.vue index 3b913ad..3d5af7b 100644 --- a/src/views/form/index.vue +++ b/src/views/form/index.vue @@ -304,6 +304,8 @@ export default { min-height: 400px; } .el-menu-item-per { + width: 130px; + text-align: left; // display: flex; // line-height: 20px; } diff --git a/src/views/form/publish/index.vue b/src/views/form/publish/index.vue index 9e6308f..50ec84a 100644 --- a/src/views/form/publish/index.vue +++ b/src/views/form/publish/index.vue @@ -17,6 +17,8 @@

恭喜您,发布成功!

+ + + + {{publishClient}} + + + + + + +
@@ -128,17 +150,21 @@ export default { data: [], selAgencyList: [], - agencyArrayCopy: [] + agencyArrayCopy: [], + publishClient: '', + publishAgency: []//问卷的发布范围 } }, - mounted () { + async mounted () { this.projectKey = this.$route.query.key let url = window.location.protocol + '//' + window.location.host this.writeLink = `${url}/${process.env.VUE_APP_PUBLIC_PATH}/s/${this.projectKey}` + await this.loadAgencyList() this.getProjectStatus() + + }, methods: { - clientChange (label) { this.clientType = label this.loadAgencyList() @@ -154,6 +180,29 @@ export default { this.data = res.data || [] }) }, + //获取问卷发布范围 + getPublishAgency () { + let params = { + projectKey: this.projectKey, + + } + this.$api.post(`/data/aggregator/questionnaire/getrange`, params).then((res) => { + if (res.data.client) { + if (res.data.client === 'resi') { + this.publishClient = '居民端' + } else if (res.data.client === 'gov') { + this.publishClient = '工作端' + } else { + this.publishClient = '未知' + } + } else { + this.publishClient = '未知' + } + + this.publishAgency = res.data.orgList || [] + this.$refs.tree.setCheckedNodes(this.publishAgency) + }) + }, //解析树选择的数据 resolveAgency () { @@ -198,9 +247,10 @@ export default { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/${this.projectKey}`).then(res => { if (res.data.status == 2) { this.publishStatus = true + this.getPublishAgency() } else { this.publishStatus = false - this.loadAgencyList() + } }) }, @@ -225,6 +275,7 @@ export default { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/publish`, params).then(() => { this.publishStatus = true + this.getPublishAgency() this.$parent.getProjectStatus() this.msgSuccess('发布成功') }) @@ -274,16 +325,22 @@ export default { diff --git a/src/views/form/statistics/list.vue b/src/views/form/statistics/list.vue index dc0e9f9..5b73d57 100644 --- a/src/views/form/statistics/list.vue +++ b/src/views/form/statistics/list.vue @@ -50,7 +50,7 @@ + prop="clientTypeShow" /> { let { records, total, size } = res.data this.projectResultList = records + + this.projectResultList.forEach(element => { + if (element.clientType === 'gov') { + element.clientTypeShow = '工作端' + } else if (element.clientType === 'resi') { + element.clientTypeShow = '居民端' + } else { + + element.clientTypeShow = '未知' + + } + }); this.total = total this.queryConditions.size = size }) From 73868c39dc189bc986a7324560ec6c78c362a263 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 30 Sep 2021 13:17:37 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=98=9F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/form/statistics/analysis.vue | 129 ++++++++++++++----------- 1 file changed, 74 insertions(+), 55 deletions(-) diff --git a/src/views/form/statistics/analysis.vue b/src/views/form/statistics/analysis.vue index 031f66e..bfc94ad 100644 --- a/src/views/form/statistics/analysis.vue +++ b/src/views/form/statistics/analysis.vue @@ -1,12 +1,11 @@ diff --git a/src/views/form/statistics/list.vue b/src/views/form/statistics/list.vue index f07316f..1c4bfb7 100644 --- a/src/views/form/statistics/list.vue +++ b/src/views/form/statistics/list.vue @@ -174,8 +174,10 @@ import { getCheckedColumn, saveCheckedColumn } from '@/utils/db' const fixedDefaultFormColumn = ['serialNumber'] const fixedDefaultLabelFormColumn = { serialNumber: '提交序号' } // 尾部固定标签 -const fixedDefaultFormTailColumn = ['submitAddress', 'createdTime'] -const fixedDefaultLabelFormTailColumn = { submitAddress: '提交地址', createdTime: '提交时间' } +// const fixedDefaultFormTailColumn = ['submitAddress', 'createdTime'] +const fixedDefaultFormTailColumn = ['createdTime'] +// const fixedDefaultLabelFormTailColumn = { submitAddress: '提交地址', createdTime: '提交时间' } +const fixedDefaultLabelFormTailColumn = { createdTime: '提交时间' } export default { name: 'ProjectStatisticsList', diff --git a/src/views/form/statistics/public.vue b/src/views/form/statistics/public.vue index c73fecd..dad4ae3 100644 --- a/src/views/form/statistics/public.vue +++ b/src/views/form/statistics/public.vue @@ -24,8 +24,8 @@ - + From b17ed1cfb7e5be6302c37df2d62f8947f1743a03 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 30 Sep 2021 17:14:35 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/form/publish/index.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/views/form/publish/index.vue b/src/views/form/publish/index.vue index 44533dd..b7d6c2b 100644 --- a/src/views/form/publish/index.vue +++ b/src/views/form/publish/index.vue @@ -33,6 +33,10 @@ @click="publishProject"> 发布 + + 禁用 + @@ -103,10 +107,7 @@ @click="stopPublishProject"> 停止发布 - +