From 34042357602e65145eb90061d6d98d0a747edb36 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 12 Oct 2022 13:52:42 +0800 Subject: [PATCH 01/10] 111 --- .../shequzhili/issue/cpts/issue-detail.vue | 3 +- .../shequzhili/issue/issueAuditList.vue | 2 +- .../modules/shequzhili/issue/issueList.vue | 21 +- .../modules/shequzhili/xiangmu/index.vue | 432 ++++++++---------- 4 files changed, 219 insertions(+), 239 deletions(-) diff --git a/src/views/modules/shequzhili/issue/cpts/issue-detail.vue b/src/views/modules/shequzhili/issue/cpts/issue-detail.vue index 0ab40d1a8..8d7b536d2 100644 --- a/src/views/modules/shequzhili/issue/cpts/issue-detail.vue +++ b/src/views/modules/shequzhili/issue/cpts/issue-detail.vue @@ -34,8 +34,7 @@ @click="handleToTopic">查看话题>-- -
+
意见和建议:
查看全部
diff --git a/src/views/modules/shequzhili/issue/issueAuditList.vue b/src/views/modules/shequzhili/issue/issueAuditList.vue index 564e08474..3f2f71c6a 100644 --- a/src/views/modules/shequzhili/issue/issueAuditList.vue +++ b/src/views/modules/shequzhili/issue/issueAuditList.vue @@ -434,7 +434,7 @@ export default { async getTableData () { const url = "/gov/issue/issueaudit/auditList"; - // const url = "http://yapi.elinkservice.cn/mock/102/gov/issue/issue/allIssueList"; + const { pageSize, pageNo, formData } = this; const { data, code, msg } = await requestPost(url, { pageSize, diff --git a/src/views/modules/shequzhili/issue/issueList.vue b/src/views/modules/shequzhili/issue/issueList.vue index c9f0d229e..974af1788 100644 --- a/src/views/modules/shequzhili/issue/issueList.vue +++ b/src/views/modules/shequzhili/issue/issueList.vue @@ -134,17 +134,22 @@ :show-overflow-tooltip="true" label="转议题时间"> - + + @@ -456,7 +461,7 @@ export default { async getTableData () { const url = "/gov/issue/issue/allIssueList"; - // const url = "http://yapi.elinkservice.cn/mock/102/gov/issue/issue/allIssueList"; + const { pageSize, pageNo, formData } = this; const { data, code, msg } = await requestPost(url, { pageSize, @@ -473,6 +478,14 @@ export default { : []; this.tableData.forEach(item => { + if (item.sourceType === 'ic_event') { + item.sourceTypeName = '事件' + } else if (item.sourceType === 'resi_topic') { + item.sourceTypeName = '话题' + } else { + item.sourceTypeName = '--' + } + if (item.operationType === '2') { item.operationTypeShow = '已转服务' } diff --git a/src/views/modules/shequzhili/xiangmu/index.vue b/src/views/modules/shequzhili/xiangmu/index.vue index 36e244ab0..bcef8c2d0 100644 --- a/src/views/modules/shequzhili/xiangmu/index.vue +++ b/src/views/modules/shequzhili/xiangmu/index.vue @@ -1,80 +1,67 @@ @@ -275,7 +224,7 @@ import axios from "axios"; export default { components: { projectInfo }, - data() { + data () { return { pageType: "list", // 列表list 处理dispose 详情info 议题详情issue-info @@ -315,7 +264,7 @@ export default { }; }, computed: { - maxTableHeight() { + maxTableHeight () { return this.$store.state.inIframe ? this.clientHeight - 360 + this.iframeHeigh : this.clientHeight - 360; @@ -333,11 +282,11 @@ export default { } }, }, - mounted() { + mounted () { this.getTableData(); }, methods: { - async handleExportModule() { + async handleExportModule () { let url = "/heart/iccommunityselforganization/import-template-download"; let params = {}; @@ -374,18 +323,18 @@ export default { }); }, // 上传大图标成功 - handleExcelSuccess(res, file) { + handleExcelSuccess (res, file) { if (res.code === 0 && res.msg === "success") { console.log("resss---ppp", res); } else { this.$message.error(res.msg); } }, - handleProgress(event, file, fileList) { + handleProgress (event, file, fileList) { console.log("percentage", file.percentage); }, - beforeExcelUpload(file) { + beforeExcelUpload (file) { console.log("file", file); const isType = file.type === "application/vnd.ms-excel"; const isTypeComputer = @@ -402,7 +351,7 @@ export default { } return fileType && isLt1M; }, - async uploadHttpRequest(file) { + async uploadHttpRequest (file) { this.importLoading = true; this.importBtnTitle = "正在上传中..."; this.$message({ @@ -457,29 +406,29 @@ export default { this.$refs.upload.clearFiles(); }, - handleSizeChange(val) { + handleSizeChange (val) { console.log(`每页 ${val} 条`); this.pageSize = val; window.localStorage.setItem("pageSize", val); this.getTableData(); }, - handleCurrentChange(val) { + handleCurrentChange (val) { console.log(`当前页: ${val}`); this.pageNo = val; this.getTableData(); }, - handleSearch(val) { + handleSearch (val) { console.log(this.fmData); this.pageNo = 1; this.getTableData(); }, - resetForm(formName) { + resetForm (formName) { this.$refs[formName].resetFields(); this.handleSearch(); }, - async handleChu() { + async handleChu () { const url = "/gov/project/project/project-list-export"; const { pageSize, pageNo, fmData } = this; axios({ @@ -514,8 +463,8 @@ export default { }); }, - async handleAdd() {}, - async handleWatch(rowIndex) { + async handleAdd () { }, + async handleWatch (rowIndex) { let item = this.tableData[rowIndex]; this.currentProject = { projectId: item.projectId, @@ -523,7 +472,7 @@ export default { this.pageType = "info"; }, - async handleEdit(rowIndex) { + async handleEdit (rowIndex) { let item = this.tableData[rowIndex]; this.currentProject = { projectId: item.projectId, @@ -531,19 +480,19 @@ export default { this.pageType = "edit"; }, - handleClose() { + handleClose () { this.pageType = "list"; this.currentProject = { projectId: "", }; }, - handleEditSuccess() { + handleEditSuccess () { this.handleClose(); this.getTableData(); }, - async handleDel(rowData, rowIndex) { + async handleDel (rowData, rowIndex) { console.log(rowData, rowIndex); const url = "/heart/iccommunityselforganization/delcommunityselforganization"; @@ -561,7 +510,7 @@ export default { } }, - async getTableData() { + async getTableData () { // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list"; const url = "/gov/project/project/project-list"; const { pageSize, pageNo, fmData } = this; @@ -575,9 +524,28 @@ export default { this.total = data.total || 0; this.tableData = data.list ? data.list.map((item) => { - return item; - }) + return item; + }) : []; + + + this.tableData.forEach(item => { + if (item.origin === 'issue') { + item.originName = '议题 ' + } else if (item.origin === 'agency') { + item.originName = '项目立项' + } else if (item.origin === 'resi_event') { + item.originName = '旧版事件上报' + } else if (item.origin === 'work_event') { + item.originName = '巡查上报' + } else if (item.origin === 'ic_event') { + item.originName = '事件' + } else { + item.sourceTypeName = '--' + } + + + }); } else { } }, From fdbcbf753d024718419cf9991211b4114a408348 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 12 Oct 2022 14:01:02 +0800 Subject: [PATCH 02/10] 11 --- src/views/modules/shequzhili/issue/cpts/issue-detail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/shequzhili/issue/cpts/issue-detail.vue b/src/views/modules/shequzhili/issue/cpts/issue-detail.vue index 8d7b536d2..c706a614a 100644 --- a/src/views/modules/shequzhili/issue/cpts/issue-detail.vue +++ b/src/views/modules/shequzhili/issue/cpts/issue-detail.vue @@ -147,7 +147,7 @@
-
满意度评价:
Date: Wed, 12 Oct 2022 14:11:01 +0800 Subject: [PATCH 03/10] 11 --- .../modules/shequzhili/issue/cpts/evaluationDetail.vue | 2 +- src/views/modules/shequzhili/issue/cpts/issue-info.vue | 7 ++++++- src/views/modules/shequzhili/issue/cpts/suggestDetail.vue | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue b/src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue index b401aa503..99f2d404a 100644 --- a/src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue +++ b/src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue @@ -106,7 +106,7 @@ export default { methods: { - async initForm (topicInfo) { + async initForm () { this.startLoading() await this.getList() diff --git a/src/views/modules/shequzhili/issue/cpts/issue-info.vue b/src/views/modules/shequzhili/issue/cpts/issue-info.vue index f5f636d5d..d70182a70 100644 --- a/src/views/modules/shequzhili/issue/cpts/issue-info.vue +++ b/src/views/modules/shequzhili/issue/cpts/issue-info.vue @@ -414,12 +414,17 @@ export default { handleToSuggest () { // this.pageTypeCopy = 'topic' this.suggestShow = true + this.$nextTick(() => { + this.$refs.ref_detail_suggest.initForm() + }) }, handleToEvaluation () { // this.pageTypeCopy = 'topic' this.evaluationShow = true - + this.$nextTick(() => { + this.$refs.ref_detail_evaluation.initForm() + }) }, // 开启加载动画 diff --git a/src/views/modules/shequzhili/issue/cpts/suggestDetail.vue b/src/views/modules/shequzhili/issue/cpts/suggestDetail.vue index 071ce19fe..3c7ff4e9e 100644 --- a/src/views/modules/shequzhili/issue/cpts/suggestDetail.vue +++ b/src/views/modules/shequzhili/issue/cpts/suggestDetail.vue @@ -97,7 +97,7 @@ export default { methods: { - async initForm (topicInfo) { + async initForm () { this.startLoading() await this.getSuggestion() From cc41c2a8bd7829b77fecfae78431a0423f971292 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 12 Oct 2022 14:42:43 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=BB=A1=E6=84=8F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shequzhili/issue/cpts/evaluationDetail.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue b/src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue index 99f2d404a..cd5910c4a 100644 --- a/src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue +++ b/src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue @@ -16,14 +16,14 @@ @@ -36,15 +36,15 @@ @@ -94,6 +94,11 @@ export default { pageSize: window.localStorage.getItem("pageSize") || 20, total: 1, + badurl_light: require('@/assets/img/satisfy-images/face1_light.png'), + + goodurl_light: require('@/assets/img/satisfy-images/face2_light.png'), + + perfecturl_light: require('@/assets/img/satisfy-images/face3_light.png'), } }, components: {}, @@ -127,6 +132,7 @@ export default { const { data, code, msg } = await requestPost(url, params) if (code === 0) { + data.forEach(element => { element.evaluateTimeShow = dateFormat( From 5ca217dcdc3c2961fb29efa897b53843eaf75b4d Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 12 Oct 2022 14:44:32 +0800 Subject: [PATCH 05/10] 111 --- src/views/modules/shequzhili/issue/cpts/issue-detail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/shequzhili/issue/cpts/issue-detail.vue b/src/views/modules/shequzhili/issue/cpts/issue-detail.vue index c706a614a..64f8a63a0 100644 --- a/src/views/modules/shequzhili/issue/cpts/issue-detail.vue +++ b/src/views/modules/shequzhili/issue/cpts/issue-detail.vue @@ -349,7 +349,7 @@ export default { }, async getChartInfo () { - const url = "/gov/issue/manage/votingtrend"; + const url = "/gov/issue/manage/votingTrendV2"; const { data, code, msg } = await requestPost(url, { issueId: this.issueId, From 1f049411325f674e8f60f4ae4b624befb7856438 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 12 Oct 2022 16:32:17 +0800 Subject: [PATCH 06/10] 11 --- src/views/modules/shequzhili/issue/cpts/issue-detail.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/views/modules/shequzhili/issue/cpts/issue-detail.vue b/src/views/modules/shequzhili/issue/cpts/issue-detail.vue index 64f8a63a0..d506cd179 100644 --- a/src/views/modules/shequzhili/issue/cpts/issue-detail.vue +++ b/src/views/modules/shequzhili/issue/cpts/issue-detail.vue @@ -19,6 +19,10 @@ 所属网格: {{ issueInfo.belongsGridName||'--' }}
+
+ 议题发表人: + {{ issueInfo.issueInitiator||'--' }} +
议题来源: From 5df76815f7d79e8bd75542c52d2141db664bb623 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 14 Oct 2022 16:15:51 +0800 Subject: [PATCH 07/10] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/communityParty/article/index.vue | 163 ++++- .../communityParty/heart/heartForm.vue | 573 ++++++++---------- .../shequzhili/issue/cpts/issue-detail.vue | 10 +- .../shequzhili/issue/cptsAudit/issue-info.vue | 19 +- 4 files changed, 427 insertions(+), 338 deletions(-) diff --git a/src/views/modules/communityParty/article/index.vue b/src/views/modules/communityParty/article/index.vue index ac8ae1b0f..8c2aa34e6 100644 --- a/src/views/modules/communityParty/article/index.vue +++ b/src/views/modules/communityParty/article/index.vue @@ -42,7 +42,7 @@ @@ -475,6 +526,15 @@ export default { return true; }, }, + + formData: {}, + showAddImage: false, + uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile", + replayImgList: [], + hideUploadBtn: false, + selType: 'top', + selArticleId: '', + selImgUrl: '' }; }, components: { basePage, offline }, @@ -491,24 +551,103 @@ export default { this.$refs.offlineForm.initForm(item); }, + async handleAddImage () { + console.log('formData', this.formData) + this.topArticle() + }, + async handleCancleTopArticle (item, type) { + this.selType = type + this.selArticleId = item.articleId + await this.topArticle() + }, + async handleTopArticle (item, type) { - const url = "/gov/voice/article/topArticle"; + this.selType = type + this.selArticleId = item.articleId + + let hasImage = await this.isHasImage() + + if (hasImage === 'refrsh') { + this.$message.error("请求失败,请重新尝试"); + + } else if (hasImage === 'no') { + // this.$message.info("请先上传封面图片"); + this.showAddImage = true + } else { + await this.topArticle() + } + + }, + + async isHasImage () { + const url = "/gov/voice/article/detailV2"; const { tableData } = this; const { data, code, msg } = await requestPost(url, { - articleId: item.articleId, - type: type + articleId: this.selArticleId, + }); + if (code === 0) { + // this.formData = data + if (data.imgUrl) { + return 'has' + } else { + return 'no' + } + } else { + return 'refrsh' + } + }, + + async topArticle () { + const url = "/gov/voice/article/topArticle"; + const { tableData } = this; + let params = { + articleId: this.selArticleId, + type: this.selType + } + if (this.selImgUrl) { + params.imgUrl = this.selImgUrl + } + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { this.$message.success("操作成功!"); + this.showAddImage = false this.$refs.basePage.refresh(); } else { this.$message.success("操作失败!"); } }, + removePic (file, fileList) { + this.selImgUrl = ""; + this.replayImgList = []; + this.hideUploadBtn = fileList.length >= 1; + }, + // 最多上传3张图,超过时隐藏上传按钮 + handleEditChange (file, fileList) { + this.hideUploadBtn = fileList.length >= 1; + }, + exceedPic () { + this.$message.warning("只能上传1张封面图"); + }, + beforeAvatarUpload (file) { + const isJPG = file.type === "image/jpeg"; + const isLt2M = file.size / 1024 / 1024 < 10; + + if (!isLt2M) { + this.$message.error("上传图片大小不能超过 10MB!"); + } + return isLt2M; + }, + handleSuccess (response, file, fileList) { + this.replayImgList.push(file); + this.selImgUrl = response.data.url; + }, + handleOfflineSuccess () { this.$refs.basePage.refresh(); this.offlineShowed = false; @@ -541,4 +680,18 @@ export default { }; - + + + diff --git a/src/views/modules/communityParty/heart/heartForm.vue b/src/views/modules/communityParty/heart/heartForm.vue index 093b3e690..7a3cfdfe6 100644 --- a/src/views/modules/communityParty/heart/heartForm.vue +++ b/src/views/modules/communityParty/heart/heartForm.vue @@ -1,279 +1,215 @@