diff --git a/src/views/modules/communityParty/article/index.vue b/src/views/modules/communityParty/article/index.vue index ac8ae1b0f..751fc6f0a 100644 --- a/src/views/modules/communityParty/article/index.vue +++ b/src/views/modules/communityParty/article/index.vue @@ -1,71 +1,142 @@ @@ -81,7 +152,7 @@ import nextTick from "dai-js/tools/nextTick"; export default { props: {}, - data () { + data() { return { offlineShowed: false, @@ -97,7 +168,7 @@ export default { optionUrl: "/gov/voice/tag/taglist", optionUrlParams: {}, optionList: [], - optionCook (list) { + optionCook(list) { return list.map((item) => ({ label: item.tagName, value: item.tagId, @@ -138,12 +209,12 @@ export default { children: "subAgencyList", checkStrictly: true, }, - optionCook (obj) { + optionCook(obj) { return [obj]; }, supKeys: ["publishRangeId", "publishRangeType"], supValues: ["", ""], - handleChangeFn (vals, item) { + handleChangeFn(vals, item) { const { optionList } = item; if (vals.length > 0) { item["supValues"][0] = vals[vals.length - 1]; @@ -195,14 +266,14 @@ export default { exportUrl: "", addUrl: "/gov/voice/article/addOrSaveDraft", - editUrl: "", + editUrl: "/gov/voice/article/updateArticle", infoUrl: "/gov/voice/article/detailV2", - delUrl: "", - editAuth (item) { - return false; + delUrl: "/gov/voice/article/delete批量", + editAuth(item) { + return item.statusFlagName == "已发布"; }, - delAuth (item) { - return false; + delAuth(item) { + return item.statusFlagName == "已下线"; }, editParams: [ @@ -232,7 +303,7 @@ export default { uploadUrl: window.SITE_CONFIG["apiURL"] + "/oss/file/article/upload", supKeys: ["imgUrlArr", "imgUrl"], supValues: [() => [], ""], - beforeImgUpload (file, item, that) { + beforeImgUpload(file, item, that) { console.log(file); const isLt1M = file.size / 1024 / 1024 < 10; const srcType = file.type; @@ -268,10 +339,10 @@ export default { checkStrictly: false, emitPath: false, }, - optionCook (obj) { + optionCook(obj) { return [obj]; }, - handleChangeFn (vals, item, that) { + handleChangeFn(vals, item, that) { console.log("handleChangeFn", vals); const { optionList } = item; const optionPlaneList = collapse(optionList, "subAgencyList"); @@ -312,7 +383,7 @@ export default { type: "date", value: dateFormat(new Date(), "yyyy-MM-dd"), pickerOptions: { - disabledDate (time) { + disabledDate(time) { return time.getTime() > Date.now(); }, }, @@ -333,7 +404,7 @@ export default { optionType: "group", supKeys: ["publisherName", "publisherType"], supValues: ["", ""], - optionCook (data) { + optionCook(data) { let ret = []; const { agencyDeptList, agencyGridList, agencyId, agencyName } = data; @@ -375,7 +446,7 @@ export default { } return ret; }, - handleChangeFn (vals, item, that) { + handleChangeFn(vals, item, that) { const { optionList } = item; let opts = []; optionList.forEach((g) => { @@ -403,7 +474,7 @@ export default { optionUrl: "/gov/voice/tag/taglist", optionUrlParams: {}, optionList: [], - optionCook (list) { + optionCook(list) { return list.map((item) => ({ label: item.tagName, value: item.tagName, @@ -436,7 +507,7 @@ export default { editElseRules: {}, editConfig: { confirmBtnName: "发布", - cookInfoFn (data) { + cookInfoFn(data) { if (data.richTextFlag == "0") { data.content = data.contentList .map((item) => { @@ -467,7 +538,7 @@ export default { return data; }, - beforeSubmit (formType, fmData, that) { + beforeSubmit(formType, fmData, that) { if (fmData.isTop == "1" && !fmData.imgUrl) { that.$message.error("请上传封面图片"); return false; @@ -475,46 +546,130 @@ 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 }, computed: {}, watch: {}, - async mounted () { }, + async mounted() {}, methods: { - async handleOfflineShow (item) { + async handleOfflineShow(item) { console.log(item); this.offlineShowed = true; await nextTick(100); this.$refs.offlineForm.initForm(item); }, - async handleTopArticle (item, type) { + async handleAddImage() { + console.log("formData", this.formData); + this.topArticle(); + }, + async handleCancleTopArticle(item, type) { + this.selType = type; + this.selArticleId = item.articleId; + await this.topArticle(); + }, - const url = "/gov/voice/article/topArticle"; + async handleTopArticle(item, type) { + 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("操作失败!"); } }, - handleOfflineSuccess () { + 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; }, - async handleClickDraft (fmData) { + async handleClickDraft(fmData) { let url = this.addUrl; let params = { ...fmData, @@ -541,4 +696,18 @@ export default { }; - + + + diff --git a/src/views/modules/cpts/base/index.vue b/src/views/modules/cpts/base/index.vue index f06ecc7ac..71face8d1 100644 --- a/src/views/modules/cpts/base/index.vue +++ b/src/views/modules/cpts/base/index.vue @@ -720,13 +720,18 @@ export default { const { tableData, idName } = this; const idValue = tableData[rowIndex][idName]; + let param = { + [idName]: idValue, + }; if (url.endsWith("/")) { url += idValue; } + if (url.endsWith("批量")) { + url = url.slice(0, -2); + param = [idValue]; + } - const { data, code, msg } = await requestPost(url, { - [idName]: idValue, - }); + const { data, code, msg } = await requestPost(url, param); if (code === 0) { this.$message.success("删除成功!"); diff --git a/src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue b/src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue index b401aa503..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: {}, @@ -106,7 +111,7 @@ export default { methods: { - async initForm (topicInfo) { + async initForm () { this.startLoading() await this.getList() @@ -127,6 +132,7 @@ export default { const { data, code, msg } = await requestPost(url, params) if (code === 0) { + data.forEach(element => { element.evaluateTimeShow = dateFormat( diff --git a/src/views/modules/shequzhili/issue/cpts/issue-detail.vue b/src/views/modules/shequzhili/issue/cpts/issue-detail.vue index 0ab40d1a8..3a83fb3e7 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||'--' }} +
议题来源: @@ -34,8 +38,7 @@ @click="handleToTopic">查看话题>--
-
+
意见和建议:
查看全部
@@ -148,7 +151,7 @@
-
满意度评价:
arr.length > 0) .map((arr) => { let ele1 = cateOptions.find((item) => item.id == arr[0]); @@ -350,7 +354,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, @@ -440,19 +444,20 @@ export default { async updateIssueCate () { const url = "/gov/issue/issuecategory/save"; - const { issueCate } = this; - if (issueCate.length == 0) { + const { popSelIssueCate } = this; + if (popSelIssueCate.length == 0) { return this.$message.error("分类不能为空"); } const { data, code, msg } = await requestPost(url, { issueId: this.issueId, - categoryList: issueCate, + categoryList: popSelIssueCate, }); if (code === 0) { this.$message.success("更改成功"); this.visibleCatePanel = false; + this.issueCate = popSelIssueCate this.getTagOptions(); } else { this.$message.error(msg); 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() diff --git a/src/views/modules/shequzhili/issue/cptsAudit/issue-detail.vue b/src/views/modules/shequzhili/issue/cptsAudit/issue-detail.vue index b4db55186..eac1c06d2 100644 --- a/src/views/modules/shequzhili/issue/cptsAudit/issue-detail.vue +++ b/src/views/modules/shequzhili/issue/cptsAudit/issue-detail.vue @@ -34,14 +34,14 @@ v-for="src in topicInfo.photoList" @click="watchImg(src.url)" />
-
语音:
@@ -100,6 +100,7 @@ function iniData () { issueInfo: {}, topicInfo: {}, + voiceList: {}, showType: '', }; @@ -154,11 +155,30 @@ export default { "yyyy-MM-dd hh:mm" ); } + + this.getAttechment() } }, methods: { + async getAttechment () { + const url = "/resi/group/topic/topicattachmentlist" + + let params = { + topicId: this.topicInfo.topicId, + + } + + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.voiceList = data.voiceList + + } else { + this.$message.error(msg) + } + }, watchImg (src) { window.open(src); }, @@ -171,8 +191,6 @@ export default { this.$emit("handleClose"); }, - async getApiData () { - }, handleToTopic () { this.$emit("handleToTopic") diff --git a/src/views/modules/shequzhili/issue/cptsAudit/issue-info.vue b/src/views/modules/shequzhili/issue/cptsAudit/issue-info.vue index 280464295..4357faf2a 100644 --- a/src/views/modules/shequzhili/issue/cptsAudit/issue-info.vue +++ b/src/views/modules/shequzhili/issue/cptsAudit/issue-info.vue @@ -64,10 +64,21 @@
提交审核时间:
{{ item.operateTime }}
-
-
理由:
-
{{ item.reason }}
+
+
+
驳回时间:
+
{{ item.operateTime }}
+
+ +
+
驳回人:
+
{{ item.staffName }}
+
+
+
驳回理由:
+
{{ item.reason }}
+
+
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 { } }, diff --git a/src/views/modules/shujuduibi/canji.vue b/src/views/modules/shujuduibi/canji.vue index 0d7a877c7..776bc7992 100644 --- a/src/views/modules/shujuduibi/canji.vue +++ b/src/views/modules/shujuduibi/canji.vue @@ -19,7 +19,11 @@ diff --git a/src/views/modules/shujuduibi/siwang.vue b/src/views/modules/shujuduibi/siwang.vue index 274c8566a..cdea89fa1 100644 --- a/src/views/modules/shujuduibi/siwang.vue +++ b/src/views/modules/shujuduibi/siwang.vue @@ -19,7 +19,11 @@