Browse Source

议题管理

V1.0
jiangyy 3 years ago
parent
commit
6524258ada
  1. 5
      src/js/util.js
  2. 2
      src/views/modules/base/epidemic/travel.vue
  3. 9
      src/views/modules/shequzhili/event/cpts/event-detail.vue
  4. 68
      src/views/modules/shequzhili/event/cpts/event-info.vue
  5. 253
      src/views/modules/shequzhili/event/cpts/process-form-issue.vue
  6. 23
      src/views/modules/shequzhili/event/cpts/process-form.vue
  7. 24
      src/views/modules/shequzhili/event/eventList.vue
  8. 778
      src/views/modules/shequzhili/issue/cpts/add.vue
  9. 210
      src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue
  10. 182
      src/views/modules/shequzhili/issue/cpts/eventDetail.vue
  11. 443
      src/views/modules/shequzhili/issue/cpts/issue-detail.vue
  12. 446
      src/views/modules/shequzhili/issue/cpts/issue-info.vue
  13. 703
      src/views/modules/shequzhili/issue/cpts/process-form-demand.vue
  14. 640
      src/views/modules/shequzhili/issue/cpts/process-form-project.vue
  15. 252
      src/views/modules/shequzhili/issue/cpts/process-form-replay.vue
  16. 330
      src/views/modules/shequzhili/issue/cpts/process-form.vue
  17. 202
      src/views/modules/shequzhili/issue/cpts/suggestDetail.vue
  18. 190
      src/views/modules/shequzhili/issue/cpts/topicDetail.vue
  19. 509
      src/views/modules/shequzhili/issue/issueAuditList.vue
  20. 553
      src/views/modules/shequzhili/issue/issueList.vue
  21. 3
      src/views/modules/workPc/guidance/addForm.vue

5
src/js/util.js

@ -15,7 +15,10 @@ export default {
let message = ''
for (var oneObj in messageObj) {
message = message + messageObj[oneObj][0].message + ' <br/> '
if(messageObj[oneObj][0].message){
message = message + messageObj[oneObj][0].message + ' <br/> '
}
}
Vue.prototype.$message({

2
src/views/modules/base/epidemic/travel.vue

@ -279,7 +279,7 @@
size="small"
@click="handleVisiteList(scope.row) ">随访记录</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-dropdown-item v-if=" agencyId===scope.row.agencyId">
<el-button type="text"
class="div-table-button--delete--noline "
size="small"

9
src/views/modules/shequzhili/event/cpts/event-detail.vue

@ -75,6 +75,12 @@
<div class="line"
@click="handleToDemand">查看需求</div>
</div>
<div v-if="info.operationType==='3'"
:class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">已转议题</span>
<div class="line"
@click="handleToIssue">查看议题</div>
</div>
<div v-if="info.satisfactionName"
:class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">满意度</span>
@ -287,6 +293,9 @@ export default {
handleToDemand () {
this.$emit("handleToDemand")
},
handleToIssue () {
this.$emit("handleToIssue")
},
//
handleSatisfy () {

68
src/views/modules/shequzhili/event/cpts/event-info.vue

@ -43,6 +43,7 @@
:source="source"
@handleToProject="handleToProject"
@handleToDemand="handleToDemand"
@handleToIssue="handleToIssue"
@handleClose="handleClose"></event-detail>
<div v-if="!eventDetailData.operationId &&pageTypeCopy == 'dispose' "
@ -201,6 +202,15 @@
:demandRecId="eventDetailCopy.operationId"
@close="handleCloseProject" />
</div>
<div v-if="pageTypeCopy == 'issue'">
<issue-info-origin ref="eleEditForm"
:pageType="issuePageType"
:issueId="eventDetailCopy.operationId"
:issueDetailData="issueDetailData"
@handleClose="handleCloseProject"
@handleOk="handleCloseProject"
@dialogOk="handleCloseProject" />
</div>
</div>
</template>
@ -211,6 +221,7 @@ import { Loading } from "element-ui"; // 引入Loading服务
import foldText from "@/views/components/foldText";
import projectInfoOrigin from "../../xiangmu/cpts/project-info";
import demandInfoOrigin from "@/views/modules/communityService/measure/info";
import issueInfoOrigin from "../../issue/cpts/issue-info";
import dateFormat from "dai-js/tools/dateFormat";
import eventAdd from "./add";
import eventDetail from "./event-detail";
@ -227,6 +238,7 @@ function iniData () {
replayInfo: {},
demand: {},
project: {},
issueInfo: {},
//
demandUserId: '',
@ -238,7 +250,10 @@ function iniData () {
projectProcess: [],
projectPageType: 'info',
pageTypeCopy: ''
pageTypeCopy: '',
issuePageType: '',
issueDetailData: {},
};
}
@ -274,7 +289,8 @@ export default {
eventDetail,
processForm,
projectInfoOrigin,
demandInfoOrigin
demandInfoOrigin,
issueInfoOrigin
},
data: iniData,
@ -423,6 +439,18 @@ export default {
// this.eventInfoData.categoryList = []
// this.eventInfoData.categoryList.push(this.demand.categoryId)
console.log('demond', this.demand)
} else if (this.formData.operationType === '3') {
this.project = {}
this.demand = {}
this.replayInfo = {}
this.issueInfo = this.$refs.ref_processinfo_add.issueInfo
if (this.issueInfo.categoryList && this.issueInfo.categoryList.length > 0) {
this.eventInfoData.categoryList = []
this.eventInfoData.categoryList.push(this.issueInfo.categoryList[0].id)
}
console.log('issueInfo', this.issueInfo)
}
}
@ -431,7 +459,8 @@ export default {
...this.eventInfoData,
// replayInfo: this.replayInfo,
project: this.project,
demand: this.demand
demand: this.demand,
issueInfo: this.issueInfo
}
console.log('this.formData', this.formData)
@ -496,6 +525,17 @@ export default {
console.log('demond', this.demand)
let url = '/gov/project/icEvent/icEventToDemand'
await this.submitDispose(url, this.demand)
} else if (this.formData.operationType === '3') {
this.replayInfo = {}
this.demand = {}
this.project = {}
this.issueInfo = this.$refs.ref_processinfo_dispose.issueInfo
//
console.log('issueInfo', this.issueInfo)
let url = '/gov/project/icEvent/icEventToIssue'
await this.submitDispose(url, this.issueInfo)
} else {
this.$message.info("请选择一种处理方式");
}
@ -545,6 +585,28 @@ export default {
this.pageTypeCopy = 'demand'
},
async handleToIssue () {
const url = "/gov/issue/manage/votingissuedetail";
const { data, code, msg } = await requestPost(url, {
issueId: this.eventDetailCopy.operationId,
});
if (code === 0) {
this.issueDetailData = { ...data };
} else {
this.$message.error(msg);
}
if (this.eventDetailCopy.status === 'processing') {
this.issuePageType = 'dispose'
} else {
this.issuePageType = 'info'
}
this.pageTypeCopy = 'issue'
},
handleCloseProject () {
this.getProjectProcess()
this.pageTypeCopy = 'info'

253
src/views/modules/shequzhili/event/cpts/process-form-issue.vue

@ -0,0 +1,253 @@
<template>
<div class="search">
<el-form ref="ref_form1"
:inline="false"
:model="formData"
:rules="dataRule">
<el-form-item label="事件分类"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="categoryList">
<div :class="{'visiual-form':source==='visiual'}">
<el-cascader class="cell-width-2"
ref="myCascader"
v-model="selCategoryArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
@change="handleChangeCate"></el-cascader>
</div>
</el-form-item>
<el-form-item label="议题标题"
prop="issueTitle"
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-input v-model="formData.issueTitle"
class="cell-width-2"
clearable
placeholder="请输入议题标题">
</el-input>
</div>
</el-form-item>
<el-form-item label="处理意见"
prop="suggestion"
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-input class="cell-width-area"
type="textarea"
maxlength="500"
show-word-limit
:rows="5"
placeholder="请输入处理意见,不超过500字"
v-model="formData.suggestion"></el-input>
</div>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
import { isCard } from "@/utils/validate";
let loading; //
export default {
data () {
return {
btnDisable: false,
formData: {
operationType: '3',//[0: 1: 2: 3:]
suggestion: '',
issueTitle: '',
},
okflag: false,
eventDetailCopy: {},
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
};
},
components: {},
computed: {
dataRule () {
return {
issueTitle: [
{ required: true, message: "议题标题不能为空", trigger: "blur" },
],
suggestion: [
{ required: true, message: "处理建议不能为空", trigger: "blur" },
],
};
},
},
props: {
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
source: {//manage visiual
type: String,
default: 'manage'
}
},
watch: {},
created () {
console.log(this.source)
},
async mounted () {
this.getCategoryList()
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) {
this.selCategoryArray = []
this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId)
this.selCategoryArray.push(this.eventDetailCopy.categoryId)
this.selCateObj = {
name: this.eventDetailCopy.categoryName,
id: this.eventDetailCopy.categoryId
}
}
}
},
methods: {
async getCategoryList () {
const url = "/gov/issue/issueprojectcategorydict/list"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let treeDataNew = this.filterTree(data)
//
++this.iscascaderShow
this.casOptions = []
this.casOptions = treeDataNew
} else {
this.$message.error(msg)
}
},
handleChangeCate () {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data)
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
},
//
filterTree (arr) {
let childs = arr
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory)
} else {
delete childs[i].subCategory
}
}
}
return arr
},
async getIssueInfo () {
this.okflag = false
this.$refs["ref_form1"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
this.formData.icEventId = this.eventId
this.formData.categoryId = this.selCateObj.id
this.formData.categoryList = []
this.formData.categoryList.push(this.selCateObj)
this.okflag = true
}
});
},
resetData () {
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style lang='scss' scoped>
@import "@/assets/scss/modules/visual/a_customize.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

23
src/views/modules/shequzhili/event/cpts/process-form.vue

@ -19,6 +19,7 @@
<el-radio label="0">回复</el-radio>
<el-radio label="1">立项</el-radio>
<el-radio label="2">转服务</el-radio>
<el-radio label="3">转议题</el-radio>
</el-radio-group>
</el-form-item>
@ -50,6 +51,13 @@
:eventDetailData="eventDetailData"></process-form-demand>
</div>
<div v-if="operationType==='3'">
<process-form-issue ref="ref_process_form_issue"
:source="source"
:eventDetailData="eventDetailData"
:eventId="eventId"></process-form-issue>
</div>
</div>
@ -62,6 +70,7 @@ import { requestPost } from "@/js/dai/request";
import processFormReplay from "./process-form-replay";
import processFormProject from "./process-form-project";
import processFormDemand from "./process-form-demand";
import processFormIssue from "./process-form-issue";
let loading; //
@ -87,6 +96,7 @@ export default {
replayInfo: {},
demand: {},
project: {},
issueInfo: {},
okflag: false,
eventDetailCopy: {}
@ -96,7 +106,8 @@ export default {
components: {
processFormReplay,
processFormProject,
processFormDemand
processFormDemand,
processFormIssue
},
computed: {
dataRule () {
@ -201,6 +212,16 @@ export default {
this.okflag = true
} else {
return false
}
} else if (this.operationType === '3') {
this.$refs.ref_process_form_issue.getIssueInfo()
if (this.$refs.ref_process_form_issue.okflag) {
this.issueInfo = this.$refs.ref_process_form_issue.formData
this.okflag = true
} else {
return false
}

24
src/views/modules/shequzhili/event/eventList.vue

@ -268,7 +268,7 @@
:show-overflow-tooltip="true"
label="发生时间">
</el-table-column>
<el-table-column prop="operationTypeShow"
<el-table-column prop="operationTypeName"
align="center"
width="100"
:show-overflow-tooltip="true"
@ -744,18 +744,18 @@ export default {
})
: [];
this.tableData.forEach(item => {
if (item.operationType === '2') {
item.operationTypeShow = '已转服务'
}
if (item.operationType === '1') {
item.operationTypeShow = '已立项'
}
if (item.operationType === '0') {
item.operationTypeShow = '已回复'
}
// this.tableData.forEach(item => {
// if (item.operationType === '2') {
// item.operationTypeShow = ''
// }
// if (item.operationType === '1') {
// item.operationTypeShow = ''
// }
// if (item.operationType === '0') {
// item.operationTypeShow = ''
// }
});
// });
} else {
this.$message.error(msg);
}

778
src/views/modules/shequzhili/issue/cpts/add.vue

@ -0,0 +1,778 @@
<template>
<div class="g-add">
<div class="g-add-page">
<div class="g-left">
<el-form
ref="ref_form1"
:inline="true"
:model="formData"
:rules="dataRule"
class="form"
>
<el-form-item
label="所属网格 "
prop="gridId"
label-width="150px"
style="display: block"
>
<el-select
v-model.trim="formData.gridId"
placeholder="请选择"
clearable
class="cell-width-1"
>
<el-option
v-for="item in gridList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="报事人"
prop="name"
label-width="150px"
style="display: block"
>
<el-input
class="cell-width-1"
maxlength="10"
placeholder="请输入报事人姓名"
v-model="formData.name"
>
</el-input>
<div>
<el-button
style="margin-top: 10px"
type="primary"
size="mini"
@click="handleShowPersonList"
>居民信息中选择</el-button
>
</div>
</el-form-item>
<el-form-item
label="手机号"
prop="mobile"
label-width="150px"
style="display: block"
>
<el-input
class="cell-width-1"
maxlength="30"
placeholder="请输入手机号 "
v-model="formData.mobile"
>
</el-input>
</el-form-item>
<el-form-item
label="身份证号"
prop="idCard"
label-width="150px"
style="display: block"
>
<el-input
class="cell-width-1"
maxlength="30"
placeholder="请输入身份证号"
v-model="formData.idCard"
></el-input>
</el-form-item>
<el-form-item label="反应渠道" label-width="150px" prop="sourceType">
<el-select
v-model="formData.sourceType"
placeholder="请选择"
size="small"
clearable
class="cell-width-1"
>
<el-option
v-for="item in qudaoArray"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="发生时间"
prop="happenTime"
label-width="150px"
style="display: block"
>
<el-date-picker
v-model="formData.happenTime"
class="cell-width-1"
type="datetime"
placeholder="发生时间"
value-format="yyyy-MM-dd hh:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item
label="事件内容"
prop="eventContent"
label-width="150px"
style="display: block"
>
<el-input
class="cell-width-2"
type="textarea"
maxlength="500"
show-word-limit
:rows="5"
placeholder="请输入事件内容,不超过500字"
v-model="formData.eventContent"
></el-input>
</el-form-item>
</el-form>
</div>
<div class="g-right">
<el-form
ref="ref_form2"
:inline="true"
:model="formData"
:rules="dataRule"
class="form"
>
<el-form-item label="图片" label-width="150px" style="display: block">
<el-upload
:headers="$getElUploadHeaders()"
:class="['avatar-uploader', { hide: hideUploadBtn }]"
ref="uploadPic"
:action="uploadUlr"
list-type="picture-card"
:on-exceed="exceedPic"
:on-remove="removePic"
:file-list="replayImgList"
:on-change="handleEditChange"
:on-success="handleSuccess"
:limit="3"
>
<span class="font-14">选择图片</span>
<div slot="tip" class="upload_tip">
最多上传3张图片图片支持jpgjpegbmpgit或png格式
</div>
</el-upload>
</el-form-item>
<el-form-item
label="地理位置"
prop="address"
label-width="150px"
style="display: block"
>
<el-input class="cell-width-1" v-model="formData.address">
</el-input>
</el-form-item>
<el-form-item
label="位置坐标"
prop="longitude"
label-width="150px"
style="display: block"
>
<div style="width: 500px">
<div class="div_map">
<div id="app"></div>
<div class="div_searchmap">
<el-input
class="cell-width-map"
maxlength="50"
size="mini"
placeholder="请输入关键字"
v-model="keyWords"
>
</el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="mini"
@click="handleSearchMap"
>查询</el-button
>
</div>
</div>
<!-- <div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="formData.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="formData.latitude">
</el-input>
</div> -->
</div>
</el-form-item>
</el-form>
</div>
</div>
<!-- 新增弹出框 -->
<el-dialog
:visible.sync="personTableShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
title="选择居民"
width="550px"
top="5vh"
class="dialog-h"
@closed="diaClose"
>
<div style="padding: 10px 30px">
<el-form :inline="false" ref="ref_formSearch" :label-width="'90px'">
<el-form-item label="所属网格" label-width="150px">
<el-select
class="cell-width-1"
v-model.trim="selGridId"
placeholder="请选择"
clearable
>
<el-option
v-for="item in gridList"
@click.native="handleChangeGrid"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="居民" label-width="150px" prop="selPersonIndex">
<el-select
v-model="selPersonIndex"
class="cell-width-1"
filterable
placeholder="请选择"
clearable
>
<el-option
v-for="(item, index) in demandUserList"
:key="item.demandUserId"
:label="item.label"
:value="index"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div class="div-btn">
<el-button
style="margin-left: 20px"
type="primary"
size="small"
@click="handleComfirmSelPerson"
>确定</el-button
>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
import { isCard } from "@/utils/validate";
let loading; //
var map;
var search;
var markers;
var infoWindowList;
var geocoder; //
function iniFmData() {
return {
gridId: "", //
reportUserId: "", // ID
name: "", //
mobile: "", //
idCard: "", //
sourceType: "", //
happenTime: "", //
eventContent: "", //
imageList: [], //
// categoryList: [],// Id
address: "", //
latitude: "", //
longitude: "", //
// operationType: '',//
// content: '',//
// status: '',// processingclosed_case
};
}
export default {
data() {
return {
formType: "add", // addeditdetail
btnDisable: false,
gridList: [], //list--
qudaoArray: [
{
value: "1",
label: "多媒体反应",
},
{
value: "2",
label: "社区电话",
},
{
value: "3",
label: "12345",
},
{
value: "4",
label: "网络员手持终端",
},
],
formData: iniFmData(),
//
keyWords: "",
isFirst: true, //
// oss/file/uploadvariedfile
dialogImageUrl: "oss/file/uploadvariedfile",
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile",
// upload_url: '', // URL
upload_name: "", //
replayImgList: [],
okflag: false,
formDataSearch: {
gridId: "",
name: "",
},
personTableShow: false,
selGridId: "",
selPersonIndex: "",
selPerson: {},
demandUserList: [],
hideUploadBtn: false,
};
},
components: {},
computed: {
dataRule() {
let checkIdCard = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入身份证"));
} else {
if (!isCard(value)) {
callback(new Error("身份证号格式不正确"));
}
callback();
}
};
return {
gridId: [
{ required: true, message: "所属网格不能为空", trigger: "blur" },
],
name: [{ required: true, message: "报事人不能为空", trigger: "blur" }],
mobile: [
{ required: true, message: "手机号不能为空", trigger: "blur" },
],
// idCard: [
// { required: true, message: "", trigger: "blur" },
// { required: true, validator: checkIdCard, trigger: "blur" },
// ],
sourceType: [
{ required: true, message: "反映渠道不能为空", trigger: "blur" },
],
eventContent: [
{ required: true, message: "事件内容不能为空", trigger: "blur" },
],
happenTime: [
{ required: true, message: "发生时间不能为空", trigger: "blur" },
],
address: [
{ required: true, message: "事件地址不能为空", trigger: "blur" },
],
longitude: [
{ required: true, message: "坐标位置不能为空", trigger: "blur" },
],
};
},
},
props: {},
watch: {
"formData.name": function (val) {
this.$emit("changeName", val);
},
"formData.mobile": function (val) {
this.$emit("changeMobile", val);
},
"formData.reportUserId": function (val) {
this.$emit("changeUserId", val);
},
"formData.gridId": function (val) {
this.selGridId = val;
this.$emit("changeGridId", val);
},
},
async mounted() {
const { user } = this.$store.state;
this.agencyId = user.agencyId;
let { latitude, longitude } = this.$store.state.user;
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.formData.latitude = latitude;
this.formData.longitude = longitude;
this.initMap();
this.loadGrid();
this.getCategoryList();
},
methods: {
async handleShowPersonList() {
if (this.formData.gridId) {
await this.handleChangeGrid();
this.personTableShow = true;
} else {
this.$message.info("请先选择网格");
}
},
diaClose() {
this.personTableShow = false;
},
handleComfirmSelPerson() {
if (this.selPersonIndex === 0 || this.selPersonIndex) {
let selPerson = this.demandUserList[this.selPersonIndex];
this.formData.name = selPerson.demandUserName;
this.formData.mobile = selPerson.demandUserMobile;
this.formData.reportUserId = selPerson.demandUserId;
this.formData.idCard = selPerson.idCard;
this.personTableShow = false;
} else {
this.$message.info("请选择人员");
}
},
async handleChangeGrid() {
const url = "/epmetuser/icresiuser/demandusers";
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page"
let params = {
agencyId: "",
gridId: this.selGridId,
name: "",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.demandUserList = data;
} else {
this.$message.error(msg);
}
this.tableLoading = false;
},
async loadGrid() {
const url = "/gov/org/customergrid/gridoption";
let params = {
agencyId: this.agencyId,
purpose: "addorupdate",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.gridList = data;
} else {
this.$message.error(msg);
}
},
async getCategoryList() {
const url = "/gov/issue/issueprojectcategorydict/list";
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
let treeDataNew = this.filterTree(data);
// this.categrayList = data
//
++this.iscascaderShow;
this.casOptions = [];
this.selCategoryArray = [];
this.casOptions = treeDataNew;
} else {
this.$message.error(msg);
}
},
//
filterTree(arr) {
let childs = arr;
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory);
} else {
delete childs[i].subCategory;
}
}
}
return arr;
},
handleChangeAgency(value) {
// this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
// this.orgId = this.selCategoryArray.length > 0 ? this.selCategoryArray[this.selCategoryArray.length - 1] : ''
},
async getEventInfo() {
this.okflag = false;
this.$refs["ref_form1"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
return false;
} else {
this.$refs["ref_form2"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
return false;
} else {
if (!formVltHelper.userOrMobile(this.formData.mobile)) {
this.$message({
type: "error",
message: "手机号格式有误",
});
return false;
}
const regCard = /(^\d{15}$)|(^\d{17}(\d|X)$)/; //1518151817X
if (
this.formData.idCard &&
regCard.test(this.formData.idCard) === false
) {
this.$message({
type: "warning",
message: "请输入正确的身份证号码",
});
return false;
}
this.okflag = true;
}
});
}
});
},
removePic(file, fileList) {
this.formData.imageList.splice(
this.formData.imageList.findIndex((item) => item === file.url),
1
);
this.replayImgList.splice(
this.replayImgList.findIndex((item) => item.uid === file.uid),
1
);
this.hideUploadBtn = fileList.length >= 3;
},
// 3
handleEditChange(file, fileList) {
this.hideUploadBtn = fileList.length >= 3;
},
exceedPic() {
this.$message.warning("最多上传3张预览图片");
},
handleSuccess(response, file, fileList) {
this.replayImgList.push(file);
this.formData.imageList.push(response.data.url);
},
// init
initMap() {
//
var center = new window.TMap.LatLng(
this.formData.latitude,
this.formData.longitude
);
// map TMap.Map()
map = new window.TMap.Map(document.getElementById("app"), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45, //
});
search = new window.TMap.service.Search({ pageSize: 10 });
//
markers = new TMap.MultiMarker({
map: map,
geometries: [],
});
infoWindowList = Array(10);
geocoder = new TMap.service.Geocoder(); //
//
map.on("panend", () => {
this.handleMoveCenter();
});
this.handleMoveCenter();
// this.convert()
},
setMarker(lat, lng) {
markers.setGeometries([]);
markers.add([
{
id: "4",
styleId: "marker",
position: new TMap.LatLng(lat, lng),
properties: {
title: "marker4",
},
},
]);
},
handleSearchMap() {
infoWindowList.forEach((infoWindow) => {
infoWindow.close();
});
infoWindowList.length = 0;
markers.setGeometries([]);
//
search
.searchRectangle({
keyword: this.keyWords,
bounds: map.getBounds(),
})
.then((result) => {
let { data } = result;
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng },
} = data[0];
map.setCenter(new TMap.LatLng(lat, lng));
this.setMarker(lat, lng);
this.formData.latitude = lat;
this.formData.longitude = lng;
this.convert();
} else {
this.$message.error("未检索到相关位置坐标");
}
});
},
handleMoveCenter() {
//
const center = map.getCenter();
const lat = center.getLat();
const lng = center.getLng();
this.formData.latitude = lat;
this.formData.longitude = lng;
this.setMarker(lat, lng);
this.convert(lat, lng);
},
convert(lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location;
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(
this.formData.latitude,
this.formData.longitude
);
}
// map.setCenter(location);
markers.updateGeometries([
{
id: "main", //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
if (!this.isFirst) {
//
this.formData.address = result.result.address;
}
if (this.isFirst) {
this.isFirst = false;
}
});
},
resetData() {
this.formData = iniFmData();
this.replayImgList = [];
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/event-info.scss"
scoped
></style>
<style lang="scss">
.el-dialog__body {
padding: 0 10px 20px !important;
}
.hide {
.el-upload--picture-card {
display: none !important;
}
}
</style>

210
src/views/modules/shequzhili/issue/cpts/evaluationDetail.vue

@ -0,0 +1,210 @@
<template>
<div class="epidemic-form">
<div class="dialog-h-content scroll-h">
<el-table :data="commentList"
border
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
class="table"
style="width: 100%"
:height="maxTableHeight">
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="userNickName"
align="center"
width="80"
label="评价人"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="evaluateTimeShow"
align="center"
width="150"
label="评价时间"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="satisfaction"
align="center"
min-width="180"
:show-overflow-tooltip="true"
label="评价结果">
<template slot-scope="scope">
<el-image v-if="scope.row.satisfaction=='bad'"
style="width: 40px; height: 40px"
src="@/assets/img/satisfy-images/face1_light.png">
</el-image>
<el-image v-else-if="scope.row.satisfaction=='good'"
style="width: 40px; height: 40px"
src="@/assets/img/satisfy-images/face2_light.png">
</el-image>
<el-image v-else
style="width: 40px; height: 40px"
src="@/assets/img/satisfy-images/face3_light.png">
</el-image>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next">
</el-pagination>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<!-- <el-button v-if="formType != 'detail'"
size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button> -->
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import dateFormat from "dai-js/tools/dateFormat";
import { mapGetters } from "vuex";
let loading //
export default {
data () {
return {
initLoading: false,
commentList: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
}
},
components: {},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
},
methods: {
async initForm (topicInfo) {
this.startLoading()
await this.getList()
this.initLoading = true
this.endLoading()
},
async getList () {
const url = "/gov/issue/manage/evaluationlist"
let params = {
issueId: this.issueId,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
data.forEach(element => {
element.evaluateTimeShow = dateFormat(
new Date(element.evaluateTime * 1000),
"yyyy-MM-dd hh:mm"
);
});
this.commentList = data
} else {
this.$message.error(msg)
}
},
handleSizeChange (val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getSuggestion();
},
handleCurrentChange (val) {
this.pageNo = val;
this.getSuggestion();
},
handleCancle () {
// this.resetData()
this.$emit('diaDetailClose')
},
watchImg (src) {
window.open(src);
},
resetData () {
this.topicInfo = {}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
maxTableHeight () {
return this.$store.state.inIframe
? this.clientHeight - 410 + this.iframeHeigh
: this.clientHeight - 410;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
props: {
issueId: {
type: String,
default: ''
},
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/detail-main.scss";
</style>

182
src/views/modules/shequzhili/issue/cpts/eventDetail.vue

@ -0,0 +1,182 @@
<template>
<div class="epidemic-form">
<div class="dialog-h-content scroll-h">
<div v-if="initLoading"
class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-2">所属网格</span>
<span>{{ eventDetailData.topicContent||'--' }}</span>
</div>
<div class="info-prop"
v-if="eventDetailData.photoList&&eventDetailData.photoList.length>0">
<span class="info-title-2">图片</span>
<div class="info-pics">
<img v-for="(item,index) in eventDetailData.photoList"
style="width:80px;height:80px"
:key="index"
:src="item.url"
@click="watchImg(item)">
</div>
</div>
<div class="info-prop"
v-if="voiceList&&voiceList.length>0">
<span class="info-title-2">音频</span>
<audio controls>
<source :src="item.url"
type=""
:key="item.url"
v-for="item in voiceList" />
</audio>
</div>
<div class="info-prop">
<span class="info-title-2">发布人</span>
<span>{{ eventDetailData.topicPublisher||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">发布时间</span>
<span>{{ eventDetailData.topicPublisherTimeShow||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">联系方式</span>
<span>{{ eventDetailData.topicPublisherMobile||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">发布小组</span>
<span>{{ eventDetailData.groupName||'--' }}</span>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<!-- <el-button v-if="formType != 'detail'"
size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button> -->
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import dateFormat from "dai-js/tools/dateFormat";
let loading //
export default {
data () {
return {
initLoading: false,
eventId: '',
eventDetailData: {},
voiceList: [],
}
},
components: {},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
},
methods: {
async initForm (eventId) {
this.startLoading()
this.eventId = eventId
await this.loadForm()
this.initLoading = true
this.endLoading()
},
async loadForm () {
const url = "/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
} else {
this.$message.error(msg);
}
},
handleCancle () {
// this.resetData()
this.$emit('diaDetailClose')
},
watchImg (src) {
window.open(src);
},
resetData () {
this.eventDetailData = {}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
},
props: {
// serviceList: {
// type: Array,
// default: []
// },
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/detail-main.scss";
</style>

443
src/views/modules/shequzhili/issue/cpts/issue-detail.vue

@ -0,0 +1,443 @@
<template>
<div class="">
<el-card :class="{'box-card':source==='visiual'}"
v-if="showType==''">
<h3 v-if="source==='manage'">议题详情</h3>
<div class="m-row">
<div class="m-info">
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">议题标题</span>
<span>{{ issueInfo.issueTitle }}</span>
</div>
<!-- <div v-if="info.imageList&&info.imageList.length>0"
:class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">图片</span>
<img :src="src"
:key="src"
style="width:150px;height:150px;padding-right:10px"
v-for="src in info.imageList"
@click="watchImg(src)" />
</div>
<div v-if="info.voiceList&&info.voiceList.length>0"
:class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">语音</span>
<audio controls>
<source :src="item.url"
type=""
:key="item.url"
v-for="item in info.voiceList" />
</audio>
</div> -->
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">处理意见</span>
<span>{{ issueInfo.issueSuggestion||'--' }}</span>
</div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">所属网格</span>
<span>{{ issueInfo.belongsGridName||'--' }}</span>
</div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">议题来源</span>
<div v-if="issueInfo.sourceType==='resi_topic'"
class="line"
@click="handleToTopic">查看话题</div>
<div v-else-if="issueInfo.sourceType==='ic_event'"
class="line"
@click="handleToEvent">查看事件</div>
<!-- <div v-else>--</div> -->
<div v-else
class="line"
@click="handleToTopic">查看话题>--</div>
</div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">意见和建议</span>
<div v-if="issueInfo.sourceType==='resi_topic'"
class="line"
@click="handleToSuggest">查看全部</div>
</div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">分类</span>
<fold-text v-if="issueCate.length > 0"
style="width: 250px"
:row="3">
<div :key="item.name"
v-for="item in issueCate">
{{ item.name }}
</div>
</fold-text>
<span style="width: 250px"
v-else>--</span>
<el-popover v-if="issueInfo.issueStatus == 'voting'"
placement="bottom"
width="400"
height="400"
v-model="visibleCatePanel">
<div class="f"
style="min-height: 120px">
<h2>更改分类</h2>
<el-cascader v-model="selectedCateData"
:options="cateOptions"
:props="{
multiple: true,
label: 'name',
value: 'id',
children: 'subCategory',
}"
clearable></el-cascader>
<el-button style="margin-left: 10px"
size="small"
type="danger"
@click="updateIssueCate">确定</el-button>
</div>
<div slot="reference">
<el-button v-if="source==='manage'"
size="small"
type="">更改</el-button>
<div v-else
class="one-btn">更改</div>
</div>
</el-popover>
</div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">标签</span>
<fold-text v-if="issueTag.length > 0"
style="width: 250px"
:row="3">
<div :key="item.name"
v-for="item in issueTag">
{{ item.name }}
</div>
</fold-text>
<span style="width: 250px"
v-else>--</span>
<el-popover v-if="issueInfo.issueStatus == 'voting'"
placement="bottom"
width="450"
height="400"
v-model="visibleTagPanel">
<div class="f"
style="min-height: 120px">
<h2>更改标签</h2>
<el-select v-model="selectedTagData"
multiple
allow-create
filterable
placeholder="请选择"
@change="handleTagChange"
size="medium"
style="width: 350px">
<el-option-group label="自定义标签">
<el-option v-for="item in tagOptions.customized"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-option-group>
<el-option-group label="常用标签">
<el-option v-for="item in tagOptions.defaulted"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-option-group>
</el-select>
<el-button style="margin-left: 10px"
size="small"
type="danger"
@click="updateIssueTag">确定</el-button>
</div>
<div slot="reference">
<el-button v-if="source==='manage'"
size="small"
type="">更改</el-button>
<div v-else
class="one-btn">更改</div>
</div>
</el-popover>
</div>
<div v-if="issueInfo.issueStatus==='closed'"
:class="['info-prop',{'info-prop-vis':source==='visiual'}]">
<span class="info-title-2">满意度评价</span>
<div v-if="issueInfo.sourceType==='resi_topic'"
class="line"
@click="handleToEvaluation">查看全部</div>
</div>
</div>
</div>
<!--
显示关闭
1状态=完成 (已评价)||(没评价&&不是本人)
2状态=未完成 有操作id -->
<div v-if="type==='info'"
class="div-btn ">
<el-button size="small"
@click="handleCloseEvent">关闭</el-button>
</div>
</el-card>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import foldText from "@/views/components/foldText";
import projectInfo from "../../xiangmu/cpts/project-info";
import dateFormat from "dai-js/tools/dateFormat";
function iniData () {
return {
user: {},
projectPageType: 'info',
issueInfo: {},
showType: '',
issueCate: [],
cateOptions: [],
visibleCatePanel: false,
selectedCateData: [],
issueTag: [],
tagOptions: [],
visibleTagPanel: false,
selectedTagData: [],
};
}
export default {
name: "issueInfo",
props: {
issueId: {
type: String,
default: "",
},
type: {
type: String,
default: "info",
},
issueDetailData: {
type: Object,
default () {
return {}
}
},
source: {//manage visiual
type: String,
default: 'manage'
}
},
components: {
foldText, projectInfo
},
data: iniData,
computed: {},
watch: {
selectedCateData (val) {
const { cateOptions } = this;
this.issueCate = val
.filter((arr) => arr.length > 0)
.map((arr) => {
let ele1 = cateOptions.find((item) => item.id == arr[0]);
let ele2 = ele1.subCategory.find((item) => item.id == arr[1]);
return {
id: ele2.id,
name: ele1.name + "-" + ele2.name,
};
});
},
async selectedTagData (val) {
const { tagOptions } = this;
this.issueTag = await Promise.all(
val.map(async (id) => {
let ele = [...tagOptions.customized, ...tagOptions.defaulted].find(
(item) => item.id == id || item.name == id
);
if (!ele) {
await this.createTag(id);
ele = [
...this.tagOptions.customized,
...this.tagOptions.defaulted,
].find((item) => item.name == id);
if (!ele)
return {
id: "",
name: ele.name,
};
}
return {
id: ele.id,
name: ele.name,
};
})
);
this.issueTag = this.issueTag.filter((item) => item.id);
},
},
created () { },
mounted () {
this.user = this.$store.state.user
if (this.issueId) {
this.issueInfo = JSON.parse(JSON.stringify(this.issueDetailData));
}
this.getIssueCate();
},
methods: {
watchImg (src) {
window.open(src);
},
handleClose () {
this.showType = ''
},
handleCloseEvent () {
this.$emit("handleClose");
},
async getApiData () {
},
handleToTopic () {
this.$emit("handleToTopic")
},
handleToEvent () {
this.$emit("handleToEvent")
},
handleToSuggest () {
this.$emit("handleToSuggest")
},
handleToEvaluation () {
this.$emit("handleToEvaluation")
},
async getIssueCate () {
const url = "/gov/issue/issuecategory/categorytaglist";
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
});
if (code === 0) {
this.issueCate = data.categoryList;
this.issueTag = data.tagList;
if (this.issueInfo.issueStatus == "voting") {
this.getCateOptions();
this.getTagOptions();
}
} else {
this.$message.error(msg);
}
},
async getCateOptions () {
const url = "/gov/issue/issueprojectcategorydict/list";
const { data, code, msg } = await requestPost(url, {});
if (code === 0) {
this.cateOptions = data.map((item) => {
item.subCategory.forEach((subitem) => {
delete subitem.subCategory;
});
return item;
});
} else {
this.$message.error(msg);
}
},
async getTagOptions () {
const url = "/gov/issue/issueprojecttagdict/list";
const { data, code, msg } = await requestPost(url, {
categoryList: this.issueCate,
});
if (code === 0) {
this.tagOptions = {
customized: data.customized,
defaulted: data.defaulted,
};
this.selectedTagData = this.issueTag.map((item) => item.id);
} else {
this.$message.error(msg);
}
},
async updateIssueCate () {
const url = "/gov/issue/issuecategory/save";
const { issueCate } = this;
if (issueCate.length == 0) {
return this.$message.error("分类不能为空");
}
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
categoryList: issueCate,
});
if (code === 0) {
this.$message.success("更改成功");
this.visibleCatePanel = false;
this.getTagOptions();
} else {
this.$message.error(msg);
}
},
async updateIssueTag () {
const url = "/gov/issue/issuetags/save";
const { issueTag } = this;
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
tagList: issueTag,
});
if (code === 0) {
this.$message.success("更改成功");
this.visibleTagPanel = false;
} else {
this.$message.error(msg);
}
},
handleTagChange (val) {
console.log(val);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>

446
src/views/modules/shequzhili/issue/cpts/issue-info.vue

@ -0,0 +1,446 @@
<template>
<div class="">
<div v-if="pageTypeCopy == 'dispose'||pageTypeCopy == 'info'"
class="g-page">
<div :class="['g-total',{'g-left':projectProcess.length>0}]">
<issue-detail ref="ref_detail"
:type="pageType"
:issueId="issueId"
:issueDetailData="issueDetailData"
:source="source"
@handleToEvent="handleToEvent"
@handleToTopic="handleToTopic"
@handleToSuggest="handleToSuggest"
@handleToEvaluation="handleToEvaluation"
@handleClose="handleClose"></issue-detail>
<div v-if="!issueDetailData.operationId &&pageTypeCopy == 'dispose' "
class="process-form">
<el-card :class="{'box-card':source==='visiual'}">
<div :class="['process-title',{'process-title-vis':source==='visiual'}]">处理</div>
<process-form ref="ref_processinfo_dispose"
:source="source"
:issueId="issueId"
:issueDetailData="issueDetailData"></process-form>
<div class="div-btn ">
<el-button size="small"
@click="handleClose">关闭</el-button>
<el-button style="margin-left:20px"
type="primary"
size="small"
@click="handleComfirm">确定</el-button>
</div>
</el-card>
</div>
</div>
<div v-if="projectProcess.length>0"
class="g-right">
<el-card :class="{'box-card':source==='visiual'}"
style="max-height: 90vh; overflow: auto">
<div class="m-process">
<div :class="['process-title',{'process-title-vis':source==='visiual'}]">处理进展</div>
<div class="list">
<div class="item"
:class="[index === 0 ? 'z-on' : '',{'item-vis':source==='visiual'}]"
:key="item.processId"
v-for="(item, index) in projectProcess">
<div class="item-row">
<div class="name">{{ item.processName }}</div>
<div class="date">
{{ item.processTime }}
</div>
</div>
<div v-if="item.type==='issue'">
<div class="detail">
<div class="detail-field">回复人</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail">
<div class="detail-field">回复内容</div>
<div class="detail-value">{{ item.publicReply }}</div>
</div>
</div>
<div v-else-if="item.type==='project'">
<div v-if="item.processName==='回复'">
<div class="detail">
<div class="detail-field">回复人</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail">
<div class="detail-field">回复内容</div>
<div class="detail-value">{{ item.publicReply }}</div>
</div>
</div>
<div v-else>
<div class="detail">
<div class="detail-field">处理部门</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<!-- <div class="detail"
v-if="item.assistanceUnitName">
<div class="detail-field">协办单位</div>
<div class="detail-value">
<fold-text :row="3">{{ item.assistanceUnitName }}</fold-text>
</div>
</div> -->
<div class="detail"
v-if="item.processName != '转项目' && item.publicReply">
<div class="detail-field"> </div>
<div class="detail-value">
<fold-text :row="3">{{ item.publicReply }}</fold-text>
</div>
</div>
<div class="detail"
v-if="item.processName != '转项目' && item.internalRemark">
<div class="detail-field">内部备注</div>
<div class="detail-value">
<fold-text :row="3">{{ item.internalRemark }}</fold-text>
</div>
</div>
<div v-if="item.internalFile&&item.internalFile.length>0"
class="detail">
<div class="attachement-list">
<a :href="att.url"
target="_blank"
:key="att.url"
v-for="att in item.internalFile">
<i class="el-icon-folder-opened"></i>
{{ att.name }}
</a>
</div>
</div>
</div>
</div>
<div v-else>
<div class="detail">
<div class="detail-field">处理部门</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail">
<div class="detail-field">说明</div>
<div class="detail-value">{{ item.progressDesc }}</div>
</div>
</div>
</div>
</div>
</div>
</el-card>
</div>
</div>
<el-dialog :visible.sync="topicShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'话题详情'"
width="950px"
top="5vh"
class="dialog-h"
@closed="diaDetailClose">
<topic-detail ref="ref_detail_topic"
@diaDetailClose="diaDetailClose"></topic-detail>
</el-dialog>
<el-dialog :visible.sync="eventShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'事件详情'"
width="950px"
top="5vh"
class="dialog-h"
@closed="diaDetailClose">
<event-detail ref="ref_detail_event"
@diaDetailClose="diaDetailClose"></event-detail>
</el-dialog>
<el-dialog :visible.sync="suggestShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'意见和建议'"
width="1150px"
top="5vh"
class="dialog-h"
@closed="diaDetailClose">
<suggest-detail ref="ref_detail_suggest"
:issueId="issueId"
@diaDetailClose="diaDetailClose"></suggest-detail>
</el-dialog>
<el-dialog :visible.sync="evaluationShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'满意度评价'"
width="1150px"
top="5vh"
class="dialog-h"
@closed="diaDetailClose">
<evaluation-detail ref="ref_detail_evaluation"
:issueId="issueId"
@diaDetailClose="diaDetailClose"></evaluation-detail>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import { Loading } from "element-ui"; // Loading
import foldText from "@/views/components/foldText";
import dateFormat from "dai-js/tools/dateFormat";
import issueDetail from "./issue-detail";
import processForm from "./process-form";
import topicDetail from "./topicDetail";
import eventDetail from "./eventDetail";
import suggestDetail from "./suggestDetail";
import evaluationDetail from "./evaluationDetail";
let loading; //
function iniData () {
return {
formData: {
operationType: '',
},
issueInfoData: {},
closeInfo: {},
demand: {},
project: {},
//
demandUserId: '',
demandUserName: '',
demandUserMobile: '',
gridId: '',
issueDetailCopy: {},
projectProcess: [],
projectPageType: 'info',
pageTypeCopy: '',
//
topicShow: false,
eventShow: false,
suggestShow: false,
evaluationShow: false,
};
}
export default {
name: "projectInfo",
props: {
issueId: {
type: String,
default: "",
},
pageType: {
type: String,
default: "",
},
issueDetailData: {
type: Object,
default () {
return {}
}
},
source: {//manage visiual
type: String,
default: 'manage'
}
},
components: {
foldText,
issueDetail,
processForm,
topicDetail,
eventDetail,
suggestDetail,
evaluationDetail,
},
data: iniData,
computed: {},
watch: {
issueId () {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
// this.getApiData();
},
},
created () {
},
mounted () {
this.pageTypeCopy = this.pageType
this.getProjectProcess()
if (this.issueId) {
this.issueDetailCopy = JSON.parse(JSON.stringify(this.issueDetailData));
}
},
methods: {
diaDetailClose () {
this.topicShow = false
this.eventShow = false
this.suggestShow = false
this.evaluationShow = false
},
//
async getProjectProcess () {
const url = "/gov/issue/manage/progress";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/process";
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
});
if (code === 0) {
this.projectProcess = data.map((item) => {
item.processTime = dateFormat(
new Date(item.processTime * 1000),
"yyyy-MM-dd hh:mm"
);
return item;
});
} else {
this.$message.error(msg);
}
},
async handleComfirm () {
this.startLoading()
if (this.pageTypeCopy === 'dispose') {
await this.handelDispose()
}
this.endLoading()
},
async handelDispose () {
this.$refs.ref_processinfo_dispose.getProcessInfo()
if (this.$refs.ref_processinfo_dispose.okflag) {
this.formData.operationType = this.$refs.ref_processinfo_dispose.operationType
if (this.formData.operationType === '0') {
let categoryList = this.$refs.ref_detail.issueCate
if (categoryList.length === 0) {
this.$message.info("请先选择议题分类");
return false
}
this.closedInfo = {}
this.project = this.$refs.ref_processinfo_dispose.project
//
this.project.issueId = this.issueId
console.log('projectInfo', this.project)
let url = '/gov/issue/manage/shiftproject-v2'
await this.submitDispose(url, this.project)
} else if (this.formData.operationType === '1') {
this.project = {}
this.closedInfo = this.$refs.ref_processinfo_dispose.closedInfo
this.closedInfo.issueId = this.issueId
console.log('closedInfo', this.closedInfo)
//
let url = '/gov/issue/manage/closeissue'
await this.submitDispose(url, this.closedInfo)
} else {
this.$message.info("请选择一种处理方式");
}
} else {
return false
}
},
async submitDispose (url, params) {
const { data, code, msg } = await requestPost(url, {
...params,
});
if (code === 0) {
this.$message.success("操作成功!");
this.$emit("handleOk");
} else {
this.$message.error(msg);
}
},
handleClose () {
this.$emit("handleClose");
},
handleToEvent () {
// this.pageTypeCopy = 'event'
this.eventShow = true
this.$nextTick(() => {
this.$refs.ref_detail_event.initForm(this.issueDetailCopy.sourceId)
})
},
handleToTopic () {
// this.pageTypeCopy = 'topic'
this.topicShow = true
this.$nextTick(() => {
this.$refs.ref_detail_topic.initForm(this.issueDetailCopy.topicInfo)
})
},
handleToSuggest () {
// this.pageTypeCopy = 'topic'
this.suggestShow = true
},
handleToEvaluation () {
// this.pageTypeCopy = 'topic'
this.evaluationShow = true
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>

703
src/views/modules/shequzhili/issue/cpts/process-form-demand.vue

@ -0,0 +1,703 @@
<template>
<div class="">
<el-form ref="ref_form"
:inline="false"
:model="formData"
:rules="dataRule"
label-width="100px">
<!-- <el-form-item label="事件分类"
label-width="150px"
prop="categoryId">
<el-cascader class="cell-width-2"
ref="myCascader"
v-model="selCategoryArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
@change="handleChangeCate"></el-cascader>
</el-form-item> -->
<el-form-item label="服务内容"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="content">
<div :class="{'visiual-form':source==='visiual'}">
<el-input v-model="formData.content"
:autosize="{ minRows: 2, maxRows: 10 }"
type="textarea"
clearable
class="cell-width-area"
placeholder="请输入内容"></el-input>
</div>
</el-form-item>
<el-form-item label="服务类型"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="categoryCode">
<div :class="{'visiual-form':source==='visiual'}">
<el-cascader v-model="formData.categoryCode"
:options="demandOptions"
clearable
class="cell-width-1"
@change="handleCateSlect"></el-cascader>
</div>
</el-form-item>
<el-form-item label="服务时间"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="wantServiceTime">
<div :class="{'visiual-form':source==='visiual'}">
<el-date-picker v-model="formData.wantServiceTime"
type="datetime"
class="cell-width-1"
clearable
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间">
</el-date-picker>
</div>
</el-form-item>
<el-form-item label="需求人"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="demandUserName">
<div :class="{'visiual-form':source==='visiual'}">
<el-input v-model="formData.demandUserName"
class="cell-width-1"></el-input>
</div>
</el-form-item>
<el-form-item label="联系电话"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="demandUserMobile">
<div :class="{'visiual-form':source==='visiual'}">
<el-input v-model="formData.demandUserMobile"
class="cell-width-1"></el-input>
</div>
</el-form-item>
<el-form-item label="服务地点"
prop="serviceLocation"
:class="{'form-item':source==='visiual'}"
label-width="150px"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-input class="cell-width-1"
v-model="formData.serviceLocation">
</el-input>
</div>
</el-form-item>
<el-form-item label="位置坐标"
:class="{'form-item':source==='visiual'}"
prop="longitude"
label-width="150px"
style="display: block">
<div style="width:500px">
<div class="div_map">
<div id="app_map">
</div>
<div class="div_searchmap">
<el-input class="cell-width-map"
maxlength="50"
size="mini"
placeholder="请输入关键字"
v-model="keyWords">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="mini"
@click="handleSearchMap">查询</el-button>
</div>
</div>
<!-- <div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="formData.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="formData.latitude">
</el-input>
</div> -->
</div>
</el-form-item>
<el-form-item label="门牌号"
:class="{'form-item':source==='visiual'}"
label-width="150px"
prop="locationDetail">
<div :class="{'visiual-form':source==='visiual'}">
<el-input v-model="formData.locationDetail"
class="cell-width-1"></el-input>
</div>
</el-form-item>
<el-form-item label="服务方"
:class="{'form-item':source==='visiual'}"
label-width="150px"
prop="serverId">
<template>
<div :class="[{'single-select':source==='visiual'},'sel-service']">
<el-select v-model="formData.serviceType"
class="cell-width-1"
placeholder="请选择"
clearable
@change="handleServiceChange('add', $event)">
<el-option v-for="item in serviceOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
-
<el-select v-model="formData.serverId"
class="cell-width-1"
filterable
placeholder="请选择"
clearable>
<el-option v-for="item in serviceOptiondList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</template>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
import { isCard } from "@/utils/validate";
let loading; //
var map
var search
var markers
var infoWindowList
var geocoder //
function iniFmData () {
return {
operationType: '2',//[0: 1: 2:]
icEventId: '',//Id
gridId: '',//
categoryCode: '',//
parentCode: '',//
content: '',// 1000
reportType: 'self_help',// communitybuilding_caption;party;self_help
reportUserName: '',//
reportUserMobile: '',//
reportTime: '',//
demandUserId: '',// user.idic_resi_user.id
demandUserName: '',//
demandUserMobile: '',//
wantServiceTime: '',//
serviceType: '',
serverId: '',
locationDetail: '',
serviceLocation: '',//
latitude: '',//
longitude: '',//
// categoryId: ''
};
}
export default {
data () {
return {
btnDisable: false,
customerId: localStorage.getItem("customerId"),
demandOptions: [],
serviceOptions: [
],
serviceOptiondList: [],
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
formData: iniFmData(),
okflag: false,
//
keyWords: '',
eventDetailCopy: {}
};
},
components: {},
computed: {
dataRule () {
return {
// categoryId: [
// { required: true, message: "", trigger: "blur" },
// ],
content: [
{ required: true, message: "服务内容不能为空", trigger: "blur" },
],
categoryCode: [
{ required: true, message: "服务类型不能为空", trigger: "blur" },
],
wantServiceTime: [
{ required: true, message: "服务时间不能为空", trigger: "blur" },
],
demandUserName: [
{ required: true, message: "需求人不能为空", trigger: "blur" },
],
demandUserMobile: [
{ required: true, message: "联系电话不能为空", trigger: "blur" },
],
serviceLocation: [
{ required: true, message: "服务地点不能为空", trigger: "blur" },
],
serverId: [
{ required: true, message: "服务方不能为空", trigger: "blur" },
],
};
},
},
props: {
demandUserId: {
type: String,
default: "",
},
demandUserName: {
type: String,
default: "",
},
demandUserMobile: {
type: String,
default: "",
},
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
source: {//manage visiual
type: String,
default: 'manage'
}
},
watch: {
demandUserName: function (val) {
this.formData.reportUserName = val
this.formData.demandUserName = val
},
demandUserMobile: function (val) {
this.formData.reportUserMobile = val
this.formData.demandUserMobile = val
},
demandUserId: function (val) {
this.formData.demandUserId = val
},
},
created () {
},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
this.getCategoryList();
this.getDemandOptions();
this.getServiceOption()
// this.formData = { ...this.formDataTemp }
this.initMap()
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
this.formData.reportUserMobile = this.eventDetailCopy.mobile
this.formData.reportUserName = this.eventDetailCopy.name
this.formData.reportTime = this.eventDetailCopy.happenTime
this.formData.gridId = this.eventDetailCopy.gridId
this.formData.demandUserId = this.eventDetailCopy.reportUserId
this.formData.demandUserName = this.eventDetailCopy.name
this.formData.demandUserMobile = this.eventDetailCopy.mobile
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) {
// this.selCategoryArray = []
// this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId)
// this.selCategoryArray.push(this.eventDetailCopy.categoryId)
// this.formData.categoryId = this.eventDetailCopy.categoryId
// this.selCateObj = {
// name: this.eventDetailCopy.categoryName,
// id: this.eventDetailCopy.categoryId
// }
}
} else {
this.formData.demandUserName = this.demandUserName
this.formData.demandUserMobile = this.demandUserMobile
this.formData.demandUserId = this.demandUserId
}
},
methods: {
async getCategoryList () {
const url = "/gov/issue/issueprojectcategorydict/list"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let treeDataNew = this.filterTree(data)
//
++this.iscascaderShow
this.casOptions = []
this.casOptions = treeDataNew
} else {
this.$message.error(msg)
}
},
handleChangeCate () {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data)
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
this.formData.categoryId = this.selCateObj.id
},
//
filterTree (arr) {
let childs = arr
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory)
} else {
delete childs[i].subCategory
}
}
}
return arr
},
async getDemandOptions () {
const url = "/heart/icresidemanddict/demandoption"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.demandOptions = this.getFlagData(
this.getTreeData(data),
"usableFlag"
);
} else {
this.$message.error(msg)
}
},
async getServiceOption () {
const url = "/sys/dict/data/dictlist"
let params = { dictType: "user_demand_service_type", }
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceOptions = data;
} else {
this.$message.error(msg)
}
},
getTreeData (data) {
if (!Array.isArray(data)) return [];
let arr = data.map((item) => {
let _item = {};
if (item.children) {
if (item.children.length === 0)
_item = { ...item, children: undefined };
else _item = { ...item, children: this.getTreeData(item.children) };
} else {
_item = { ...item };
}
return _item;
});
return arr;
},
getFlagData (data, flag) {
if (!Array.isArray(data)) return [];
let arr1 = data.filter((item) => item[flag]);
let arr2 = arr1.map((item) => {
if (item.children)
return { ...item, children: this.getFlagData(item.children, flag) };
else return item;
});
// console.log('arrr-oppp', arr2)
return arr2;
},
handleCateSlect (val) {
console.log("val", val);
if (val.length === 1) {
this.demandOptions.forEach((item) => {
if (item.value == val[0]) this.formData.parentCode = item.pvalue;
});
this.formData.categoryCode = val[0];
} else {
this.formData.parentCode = val[0];
this.formData.categoryCode = val[1];
}
},
handleServiceChange (type, val) {
if (val === "social_org") {
if (type === "add") {
this.getServiceuserList(val, "add_demand");
} else {
this.getServiceuserList(val, "query_demand");
}
} else {
this.getServiceuserList(val, "");
}
},
async getServiceuserList (serviceType, query) {
if (!serviceType) return false;
const { demandUserId } = this.formData;
const params = {
serviceName: "",
serviceType: serviceType,
queryPurpose: query,
};
const url = "/heart/userdemand/servicelist"
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceOptiondList = data.filter(
(item) => item.value != demandUserId
);
} else {
this.$message.error(msg)
}
},
async getDemandInfo () {
this.okflag = false
this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
// this.formData.categoryId = this.selCateObj.id
} else {
this.okflag = true
}
});
},
resetData () {
},
// init
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app_map'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
search = new window.TMap.service.Search({ pageSize: 10 })
//
markers = new TMap.MultiMarker({
map: map,
geometries: []
})
infoWindowList = Array(10)
geocoder = new TMap.service.Geocoder(); //
//
map.on('panend', () => {
this.handleMoveCenter()
})
this.handleMoveCenter()
this.convert()
},
setMarker (lat, lng) {
markers.setGeometries([])
markers.add([
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
}
}
])
},
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close()
})
infoWindowList.length = 0
markers.setGeometries([])
//
search
.searchRectangle({
keyword: this.keyWords,
bounds: map.getBounds()
})
.then((result) => {
let { data } = result
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng }
} = data[0]
map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng)
this.formData.latitude = lat
this.formData.longitude = lng
this.convert()
} else {
this.$message.error('未检索到相关位置坐标')
}
})
},
handleMoveCenter () {
//
const center = map.getCenter()
const lat = center.getLat()
const lng = center.getLng()
this.formData.latitude = lat
this.formData.longitude = lng
this.setMarker(lat, lng)
this.convert(lat, lng)
},
convert (lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude);
}
// map.setCenter(location);
markers.updateGeometries([
{
id: 'main', //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
this.formData.serviceLocation = result.result.address
//
});
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style lang='scss' scoped>
@import "@/assets/scss/modules/visual/a_customize.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

640
src/views/modules/shequzhili/issue/cpts/process-form-project.vue

@ -0,0 +1,640 @@
<template>
<div class="">
<el-form ref="ref_form"
:inline="false"
:model="formData"
:rules="dataRule"
label-width="100px">
<el-form-item label="事件分类"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="categoryList">
<div :class="{'visiual-form':source==='visiual'}">
<el-cascader class="cell-width-2"
ref="myCascader"
v-model="selCategoryArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
@change="handleChangeCate"></el-cascader>
</div>
</el-form-item>
<el-form-item label="项目标题"
prop="title"
:class="{'form-item':source==='visiual'}"
label-width="150px"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-input class="cell-width-1"
maxlength="50"
placeholder="请输入项目标题"
v-model="formData.title">
</el-input>
</div>
</el-form-item>
<el-form-item label="所属网格 "
prop="gridId"
:class="{'form-item':source==='visiual'}"
label-width="150px"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-select v-model.trim="formData.gridId"
placeholder="请选择"
clearable
class="cell-width-1">
<el-option v-for="item in gridList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item label="处理部门"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="staffList">
<el-popover placement="bottom"
width="400"
height="400"
v-model="visibleStaffPanel">
<div class="f">
<select-staff @confirm="(ret) => (formData.staffList = ret)"
@close="visibleStaffPanel = false" />
</div>
<div slot="reference">
<a v-if="formData.staffList.length == 0"
style="cursor: pointer">点击选择</a>
<a v-else
style="cursor: pointer">已选 {{ formData.staffList.length }} </a>
</div>
</el-popover>
</el-form-item>
<!-- <el-form-item label="协办单位"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="assistanceUnitIndex">
<div :class="{'visiual-form':source==='visiual'}">
<el-select v-model.trim="formData.assistanceUnitIndex"
placeholder="请选择"
class="cell-width-1">
<el-option v-for="(item, index) in assistanceUnitList"
:key="item.assistanceUnitId"
:label="item.assistanceUnitName"
:value="index">
</el-option>
</el-select>
</div>
</el-form-item> -->
<el-form-item label="项目方案"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="publicReply">
<div :class="{'visiual-form':source==='visiual'}">
<el-input type="textarea"
class="cell-width-area"
:rows="2"
placeholder="请输入项目方案"
v-model="formData.publicReply">
</el-input>
</div>
</el-form-item>
<el-form-item label="内部备注"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="internalRemark">
<div :class="{'visiual-form':source==='visiual'}">
<el-input type="textarea"
class="cell-width-area"
:rows="2"
placeholder="请输入内部备注"
v-model="formData.internalRemark">
</el-input>
</div>
</el-form-item>
<el-form-item label="图片/附件:"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="internalFile">
<el-upload :headers="$getElUploadHeaders()" class="avatar-uploader"
:action="uploadUlr"
:data="{ customerId: customerId }"
:show-file-list="true"
:on-success="handleImgSuccess"
:on-remove="handleImgRemove"
:before-upload="beforeImgUpload">
<i v-if="source==='manage'"
:class="['el-icon-plus']"></i>
<img v-else
style="width:27px;height:27px"
src="@/assets/img/file-add.png">
</el-upload>
</el-form-item>
<el-form-item label="标签"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="tagList">
<fold-text v-if="tagList.length>0"
style="width: 300px"
:row="3">
<div :key="item.name"
class="tag-name"
v-for="item in tagList">
{{ item.name }}
</div>
</fold-text>
<el-popover placement="top"
width="450"
height="450"
v-model="visibleTagPanel">
<div class="f"
style="min-height: 120px">
<h2>选择标签</h2>
<el-select style="width: 350px"
v-model="selectedTagData"
multiple
allow-create
filterable
placeholder="请选择"
@change="handleTagChange">
<el-option-group label="自定义标签">
<el-option v-for="item in tagOptions.customized"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-option-group>
<el-option-group label="常用标签">
<el-option v-for="item in tagOptions.defaulted"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-option-group>
</el-select>
<el-button style="margin-left: 10px"
size="small"
type="danger"
@click="updateProjectTag">关闭</el-button>
</div>
<div slot="reference">
<el-button v-if="source==='manage'"
size="small"
type="">选择</el-button>
<div v-else
class="one-btn">选择</div>
</div>
</el-popover>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import selectStaff from "@/views/components/selectStaff";
import formVltHelper from "dai-js/tools/formVltHelper";
import foldText from "@/views/components/foldText";
import { isCard } from "@/utils/validate";
let loading; //
function iniFmData () {
return {
operationType: '1',//[0: 1: 2:]
publicReply: '',// 1000
internalRemark: '',// 1000
gridId: '',//
assistanceUnitIndex: '',
assistanceUnitId: '',// Id
assistanceUnitType: '',// 12
staffList: [],//
categoryList: [],//
tagList: [],//
internalFile: [],//
title: '',//
publicFile: [],//
locateAddress: '',//
locateLongitude: '',//
locateDimension: '',//
eventId: '',//
};
}
export default {
data () {
return {
btnDisable: false,
customerId: localStorage.getItem("customerId"),
gridList: [],//list--
myDepartmentList: [],//
visibleStaffPanel: false,
assistanceUnitList: [],//
tagList: [],//
tagOptions: [],
visibleTagPanel: false,
selectedTagData: [],
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
formData: iniFmData(),
formDataTemp: {
assistanceUnitIndex: 0,
assistanceUnitId: '',// Id
assistanceUnitType: '',// 12
eventId: "",
gridId: "63d5ff92ea981b1c58e4914ac894c610",
internalRemark: "内部备注",
operationType: "1",
projectStaffId: "1514068005825622017",
publicReply: "项目方案",
title: "3123123",
internalFile: [],
staffList: [],
tagList: [{
id: "46294b3c9f96ee4d0b00e997e06c8f97",
isDisable: "enable",
name: "车行道、人行道、盲道、无障碍通道、路名牌",
},
{
id: "953bafc1191f784841d9b8da61ec7b9b",
isDisable: "enable",
name: "城市广场管理",
}],
},
okflag: false,
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2",
eventDetailCopy: {}
};
},
components: { selectStaff, foldText },
computed: {
dataRule () {
return {
categoryList: [
{ required: true, message: "请填写事件分类", trigger: "blur" },
],
title: [
{ required: true, message: "标题不能为空", trigger: "blur" },
],
gridId: [
{ required: true, message: "所属网格不能为空", trigger: "blur" },
],
staffList: [
{ required: true, message: "处理部门不能为空", trigger: "blur" },
],
publicReply: [
{ required: true, message: "项目方案不能为空", trigger: "blur" },
],
};
},
},
props: {
gridId: {//id
type: String,
default: "",
},
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
source: {//manage visiual
type: String,
default: 'manage'
}
},
watch: {
gridId: function (val) {
this.formData.gridId = val
},
"formData.assistanceUnitIndex": function (val) {
if (val === "" || this.assistanceUnitList.length === 0) {
this.formData.assistanceUnitId = "";
this.formData.assistanceUnitType = "";
} else {
this.formData.assistanceUnitId =
this.assistanceUnitList[val].assistanceUnitId;
this.formData.assistanceUnitType =
this.assistanceUnitList[val].assistanceUnitType;
}
},
async selectedTagData (val) {
const { tagOptions } = this;
this.tagList = await Promise.all(
val.map(async (id) => {
let ele = [...tagOptions.customized, ...tagOptions.defaulted].find(
(item) => item.id == id || item.name == id
);
if (!ele) {
await this.createTag(id);
ele = [
...this.tagOptions.customized,
...this.tagOptions.defaulted,
].find((item) => item.name == id);
if (!ele)
return {
id: "",
name: ele.name,
};
}
return {
id: ele.id,
name: ele.name,
};
})
);
this.tagList = this.tagList.filter((item) => item.id);
console.log(this.tagList)
},
},
created () {
},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
this.getCategoryList();
this.loadGrid();
this.getMyDepartmentList();
this.getAssistanceUnitList();
this.getTagList()
// this.formData = { ...this.formDataTemp }
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
this.formData.gridId = this.eventDetailCopy.gridId
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) {
this.selCategoryArray = []
this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId)
this.selCategoryArray.push(this.eventDetailCopy.categoryId)
this.selCateObj = {
name: this.eventDetailCopy.categoryName,
id: this.eventDetailCopy.categoryId
}
this.formData.categoryList = []
this.formData.categoryList.push(this.selCateObj)
}
} else {
this.formData.gridId = this.gridId
}
},
methods: {
async getCategoryList () {
const url = "/gov/issue/issueprojectcategorydict/list"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let treeDataNew = this.filterTree(data)
//
++this.iscascaderShow
this.casOptions = []
this.casOptions = treeDataNew
} else {
this.$message.error(msg)
}
},
handleChangeCate () {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data)
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
this.formData.categoryList = []
this.formData.categoryList.push(this.selCateObj)
},
//
filterTree (arr) {
let childs = arr
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory)
} else {
delete childs[i].subCategory
}
}
}
return arr
},
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
},
//
async getMyDepartmentList () {
const url = "/gov/project/trace/approvalagencylist";
const { data, code, msg } = await requestPost(url, {
issueId: '',
projectStaffId: '',
});
if (code === 0) {
this.myDepartmentList = data.subAgencyList;
} else {
this.$message.error(msg);
}
},
//
async getAssistanceUnitList () {
const url = "/heart/icpartyunit/assistanceUnitList";
const { data, code, msg } = await requestPost(url, {
// projectId: this.projectIdCopy,
});
if (code === 0) {
this.assistanceUnitList = data;
} else {
this.$message.error(msg);
}
},
//
async getTagList () {
const url = "/gov/issue/issueprojecttagdict/list";
const { data, code, msg } = await requestPost(url, {
});
if (code === 0) {
this.tagOptions = {
customized: data.customized,
defaulted: data.defaulted,
};
} else {
this.$message.error(msg);
}
},
handleTagChange (val) {
console.log(val);
},
updateProjectTag () {
this.visibleTagPanel = false;
},
async getProjectInfo () {
this.okflag = false
this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
this.formData.tagList = this.tagList
this.okflag = true
}
});
},
beforeImgUpload (file) {
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return isLt1M;
},
resetData () {
},
handleImgSuccess (res, file, fileList) {
console.log("res.data.url", file);
if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url);
this.formData.internalFile.push({
format: file.name.split(".").pop(),
name: file.name,
size: file.size,
type: file.raw.type,
url: res.data.url,
});
console.log(this.formData.internalFile);
} else {
this.$message.error(res.msg);
}
},
handleImgRemove (file) {
let index = this.formData.internalFile.findIndex(
(item) => item.url == file.response.data.url
);
this.formData.internalFile.splice(index, 1);
console.log(this.formData.internalFile);
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/project-info.scss"
scoped
></style>
<style lang='scss' scoped>
@import "@/assets/scss/modules/visual/a_customize.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

252
src/views/modules/shequzhili/issue/cpts/process-form-replay.vue

@ -0,0 +1,252 @@
<template>
<div class="search">
<el-form ref="ref_form1"
:inline="false"
:model="formData"
:rules="dataRule">
<el-form-item label="事件分类"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="categoryList">
<div :class="{'visiual-form':source==='visiual'}">
<el-cascader class="cell-width-2"
ref="myCascader"
v-model="selCategoryArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
@change="handleChangeCate"></el-cascader>
</div>
</el-form-item>
<el-form-item label="回复内容"
prop="content"
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-input class="cell-width-area"
type="textarea"
maxlength="500"
show-word-limit
:rows="5"
placeholder="请输入回复内容,不超过500字"
v-model="formData.content"></el-input>
</div>
</el-form-item>
<el-form-item label=""
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<el-checkbox :class="{'form-item':source==='visiual'}"
v-model="status">已完成</el-checkbox>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
import { isCard } from "@/utils/validate";
let loading; //
export default {
data () {
return {
btnDisable: false,
formData: {
operationType: '0',//[0: 1: 2:]
content: '',
status: ''
},
status: false,
okflag: false,
eventDetailCopy: {},
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
};
},
components: {},
computed: {
dataRule () {
return {
content: [
{ required: true, message: "回复内容不能为空", trigger: "blur" },
],
};
},
},
props: {
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
source: {//manage visiual
type: String,
default: 'manage'
}
},
watch: {},
created () {
console.log(this.source)
},
async mounted () {
this.getCategoryList()
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) {
this.selCategoryArray = []
this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId)
this.selCategoryArray.push(this.eventDetailCopy.categoryId)
this.selCateObj = {
name: this.eventDetailCopy.categoryName,
id: this.eventDetailCopy.categoryId
}
}
}
},
methods: {
async getCategoryList () {
const url = "/gov/issue/issueprojectcategorydict/list"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let treeDataNew = this.filterTree(data)
//
++this.iscascaderShow
this.casOptions = []
this.casOptions = treeDataNew
} else {
this.$message.error(msg)
}
},
handleChangeCate () {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data)
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
},
//
filterTree (arr) {
let childs = arr
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory)
} else {
delete childs[i].subCategory
}
}
}
return arr
},
async getReplayInfo () {
this.okflag = false
this.$refs["ref_form1"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
if (this.status) {
if (!this.selCateObj || !this.selCateObj.id) {
this.$message.info("请填写事件分类");
return false
}
this.formData.status = 'closed_case'
} else {
this.formData.status = 'processing'
}
this.formData.categoryId = this.selCateObj.id
this.formData.categoryList = []
this.formData.categoryList.push(this.selCateObj)
this.okflag = true
}
});
},
resetData () {
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style lang='scss' scoped>
@import "@/assets/scss/modules/visual/a_customize.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

330
src/views/modules/shequzhili/issue/cpts/process-form.vue

@ -0,0 +1,330 @@
<template>
<div class="">
<div>
<el-form ref="ref_form1"
:inline="false"
class="form">
<el-form-item label="处理方式"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="operationType">
<el-radio-group :class="{'form-item':source==='visiual'}"
v-model="operationType"
@change="handleChangeOperationType">
<el-radio label="0">转项目</el-radio>
<el-radio label="1">关闭</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div v-if="operationType==='0'">
<el-form ref="ref_project_form"
:inline="false"
:model="project"
:rules="projectDataRule">
<el-form-item label="处理部门"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="staffList">
<el-popover placement="bottom"
width="400"
height="400"
v-model="visibleStaffPanel">
<div class="f">
<select-staff @confirm="(ret) => (project.staffList = ret)"
@close="visibleStaffPanel = false" />
</div>
<div slot="reference">
<a v-if="project.staffList.length == 0"
style="cursor: pointer">点击选择</a>
<a v-else
style="cursor: pointer">已选 {{ project.staffList.length }} </a>
</div>
</el-popover>
</el-form-item>
<el-form-item label="项目方案"
prop="publicReply"
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-input class="cell-width-area"
type="textarea"
maxlength="500"
show-word-limit
:rows="5"
placeholder="请输入项目方案,不超过500字"
v-model="project.publicReply"></el-input>
</div>
</el-form-item>
<el-form-item label="内部备注"
prop="internalRemark"
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-input class="cell-width-area"
type="textarea"
maxlength="500"
show-word-limit
:rows="5"
placeholder="请输入内部备注,不超过500字"
v-model="project.internalRemark"></el-input>
</div>
</el-form-item>
</el-form>
</div>
<div v-if="operationType==='1'">
<el-form ref="ref_close_form"
:inline="false"
:model="closedInfo"
:rules="closeDataRule">
<el-form-item label="处理结果"
label-width="150px"
:class="{'form-item':source==='visiual'}"
prop="resolveType">
<el-radio-group :class="{'form-item':source==='visiual'}"
v-model="closedInfo.resolveType">
<el-radio label="resolved">已解决</el-radio>
<el-radio label="unresolved">无需解决</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="关闭原因"
prop="closeReason"
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-input class="cell-width-area"
type="textarea"
maxlength="500"
show-word-limit
:rows="5"
placeholder="请输入关闭原因,不超过500字"
v-model="closedInfo.closeReason"></el-input>
</div>
</el-form-item>
</el-form>
</div>
</div>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import selectStaff from "@/views/components/selectStaff";
let loading; //
export default {
data () {
return {
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
operationType: '0',
visibleStaffPanel: false,
okflag: false,
eventDetailCopy: {},
closedInfo: {
resolveType: 'resolved',
closeReason: '',//
},
project: {
staffList: [],
internalRemark: '',
publicReply: '',
}
};
},
components: {
selectStaff,
},
computed: {
closeDataRule () {
return {
resolveType: [
{ required: true, message: "处理结果不能为空", trigger: "change" },
],
closeReason: [
{ required: true, message: "关闭原因不能为空", trigger: "change" },
],
};
},
projectDataRule () {
return {
staffList: [
{ required: true, message: "处理部门不能为空", trigger: "change" },
],
publicReply: [
{ required: true, message: "项目方案不能为空", trigger: "change" },
],
};
},
},
props: {
demandUserId: {
type: String,
default: "",
},
demandUserName: {
type: String,
default: "",
},
demandUserMobile: {
type: String,
default: "",
},
gridId: {
type: String,
default: "",
},
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
source: {//manage visiual
type: String,
default: 'manage'
}
},
watch: {
},
created () {
console.log(this.source)
},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
}
},
methods: {
handleChangeOperationType (val) {
if (val === '0') {
this.$refs['ref_project_form'].resetFields()
} else {
this.$refs['ref_close_form'].resetFields()
}
},
async getProcessInfo () {
this.okflag = false
if (this.operationType === '0') {
this.$refs["ref_project_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
this.okflag = true
}
});
} else if (this.operationType === '1') {
this.$refs["ref_close_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
this.okflag = true
}
});
}
},
handleCancle () {
this.resetData();
},
resetData () {
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

202
src/views/modules/shequzhili/issue/cpts/suggestDetail.vue

@ -0,0 +1,202 @@
<template>
<div class="epidemic-form">
<div class="dialog-h-content scroll-h">
<el-table :data="suggestionList"
border
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
class="table"
style="width: 100%"
:height="maxTableHeight">
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="userShowName"
align="center"
width="80"
label="姓名"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="aititudeShow"
label="投票"
width="80"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="timeShow"
align="center"
width="150"
label="时间"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="suggestion"
align="center"
min-width="180"
:show-overflow-tooltip="true"
label="建议">
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next">
</el-pagination>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<!-- <el-button v-if="formType != 'detail'"
size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button> -->
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import dateFormat from "dai-js/tools/dateFormat";
import { mapGetters } from "vuex";
let loading //
export default {
data () {
return {
initLoading: false,
suggestionList: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
}
},
components: {},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
},
methods: {
async initForm (topicInfo) {
this.startLoading()
await this.getSuggestion()
this.initLoading = true
this.endLoading()
},
async getSuggestion () {
const url = "/gov/issue/issuesuggestion/list"
let params = {
issueId: this.issueId,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
data.forEach(element => {
element.userShowName = element.userShowName || '匿名'
element.aititudeShow = element.aititude === 'opposition' ? '反对' : '支持'
element.timeShow = dateFormat(
new Date(element.publishTime * 1000),
"yyyy-MM-dd hh:mm"
);
});
this.suggestionList = data
} else {
this.$message.error(msg)
}
},
handleSizeChange (val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getSuggestion();
},
handleCurrentChange (val) {
this.pageNo = val;
this.getSuggestion();
},
handleCancle () {
// this.resetData()
this.$emit('diaDetailClose')
},
watchImg (src) {
window.open(src);
},
resetData () {
this.topicInfo = {}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
maxTableHeight () {
return this.$store.state.inIframe
? this.clientHeight - 410 + this.iframeHeigh
: this.clientHeight - 410;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
props: {
issueId: {
type: String,
default: ''
},
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/detail-main.scss";
</style>

190
src/views/modules/shequzhili/issue/cpts/topicDetail.vue

@ -0,0 +1,190 @@
<template>
<div class="epidemic-form">
<div class="dialog-h-content scroll-h">
<div v-if="initLoading"
class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-2">话题内容</span>
<span>{{ topicInfo.topicContent||'--' }}</span>
</div>
<div class="info-prop"
v-if="topicInfo.photoList&&topicInfo.photoList.length>0">
<span class="info-title-2">图片</span>
<div class="info-pics">
<img v-for="(item,index) in topicInfo.photoList"
style="width:80px;height:80px"
:key="index"
:src="item.url"
@click="watchImg(item)">
</div>
</div>
<div class="info-prop"
v-if="voiceList&&voiceList.length>0">
<span class="info-title-2">音频</span>
<audio controls>
<source :src="item.url"
type=""
:key="item.url"
v-for="item in voiceList" />
</audio>
</div>
<div class="info-prop">
<span class="info-title-2">发布人</span>
<span>{{ topicInfo.topicPublisher||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">发布时间</span>
<span>{{ topicInfo.topicPublisherTimeShow||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">联系方式</span>
<span>{{ topicInfo.topicPublisherMobile||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">发布小组</span>
<span>{{ topicInfo.groupName||'--' }}</span>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<!-- <el-button v-if="formType != 'detail'"
size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button> -->
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import dateFormat from "dai-js/tools/dateFormat";
let loading //
export default {
data () {
return {
initLoading: false,
topicInfo: {},
voiceList: [],
}
},
components: {},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
},
methods: {
async initForm (topicInfo) {
this.startLoading()
this.topicInfo = JSON.parse(JSON.stringify(topicInfo))
if (this.topicInfo.topicPublishTime) {
this.topicInfo.topicPublisherTimeShow = dateFormat(
new Date(this.topicInfo.topicPublishTime * 1000),
"yyyy-MM-dd hh:mm"
);
}
await this.getAttechment()
this.initLoading = true
this.endLoading()
},
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)
}
},
handleCancle () {
// this.resetData()
this.$emit('diaDetailClose')
},
watchImg (src) {
window.open(src);
},
resetData () {
this.topicInfo = {}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
},
props: {
// serviceList: {
// type: Array,
// default: []
// },
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/detail-main.scss";
</style>

509
src/views/modules/shequzhili/issue/issueAuditList.vue

@ -0,0 +1,509 @@
<template>
<div class="div_main">
<div v-show="pageType == 'list'">
<div class="div_search">
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'90px'">
<div>
<el-form-item label="所属组织"
prop="orgId">
<el-cascader class="item_width_1"
ref="myCascader"
size="small"
v-model="agencyIdArray"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</el-form-item>
<el-form-item label="议题标题"
prop="issueTitle">
<el-input v-model="formData.issueTitle"
class="item_width_1"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="转议题时间"
prop="startTime">
<el-date-picker v-model="formData.startTime"
:picker-options="startPickerOptions"
class="item_width_2"
size="small"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="formData.endTime"
:picker-options="endPickerOptions"
class="item_width_2 data-tag"
size="small"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="状态"
prop="applyStatus">
<el-select class="item_width_2"
v-model="formData.applyStatus"
placeholder="全部"
size="small"
clearable>
<el-option v-for="item in statusArray"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div>
<div class="div_table">
<div class="div_btn">
<el-button @click="handleExport"
class="diy-button--reset"
size="small">导出</el-button>
</div>
<el-table :data="tableData"
border
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
class="table"
style="width: 100%"
:height="maxTableHeight">
<el-table-column label=""
fixed="left"
type="selection"
align="center"
width="50" />
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="gridName"
align="center"
label="所属网格"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="issueTitle"
label="议题标题"
min-width="150"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="suggestion"
align="center"
min-width="150"
label="处理建议"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="applyTime"
align="center"
width="180"
:show-overflow-tooltip="true"
label="提交审核时间">
</el-table-column>
<el-table-column prop="applyStatusName"
align="center"
label="状态"
width="80"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column fixed="right"
label="操作"
align="center"
width="100">
<template slot-scope="scope">
<el-button v-if="scope.row.applyStatus==='under_auditing'"
@click="handleAudit(scope.row)"
type="text"
size="small"
class="div-table-button--edit">审核</el-button>
<el-button @click="handleWatch(scope.row)"
type="text"
size="small">查看</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
</div>
<div v-if="pageType == 'dispose' || pageType == 'info'">
<issue-info ref="eleEditForm"
:pageType="pageType"
:issueId="issueId"
:issueDetailData="issueDetailData"
@handleClose="handleClose"
@handleOk="handleOk"
@dialogOk="handleEditSuccess" />
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import issueInfo from "./cpts/issue-info";
import axios from "axios";
export default {
components: { issueInfo },
data () {
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.formData.startTime) {
let startTime = new Date(this.formData.startTime)
return time.getTime() > nowData || time.getTime() < startTime || time.getTime() === startTime
} else {
return time.getTime() > nowData
}
}
let startDisabledDate = (time) => {//datareturn
let nowData = Date.now()
return time.getTime() > nowData
}
return {
pageType: "list", // list add dispose info
user: {},
agencyId: '',
gridList: [],//list--
tableData: [],
statusArray: [
{
value: "under_auditing",
label: "待审核",
},
{
value: "rejected",
label: "驳回",
},
],
formData: {
orgId: '',
orgType: '',
issueTitle: '',
startTime: '',
endTime: '',
applyStatus: '',
},
orgOptions: [],
orgOptionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
agencyIdArray: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
endPickerOptions: {
disabledDate: endDisabledDate
},
startPickerOptions: {
disabledDate: startDisabledDate
},
issueId: '',
issueDetailData: {},
};
},
computed: {
maxTableHeight () {
return this.$store.state.inIframe
? this.clientHeight - 410 + this.iframeHeigh
: this.clientHeight - 410;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
"formData.endTime": function (val) {
if (val && val != '') {
let arrayTemp = val.split(' ')
this.formData.endTime = arrayTemp[0] + ' 23:59:59'
}
},
},
mounted () {
console.log(this.$store.state)
this.user = this.$store.state.user
this.agencyId = this.user.agencyId
this.getOrgTreeList();
this.getTableData();
},
methods: {
handleSearch (val) {
console.log(this.formData);
this.pageNo = 1;
this.getTableData();
},
handleChangeAgency (val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
this.formData.orgType = obj.level === 'grid' ? 'grid' : 'agency'
this.formData.orgId = obj.agencyId
} else {
this.form.orgType = ''
this.form.orgId = ''
}
},
async getOrgTreeList () {
const url = "/gov/org/customeragency/agencygridtree"
let params = {
agencyId: this.agencyId,
purpose: "query"
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.orgOptions = []
this.orgOptions.push(data)
} else {
this.$message.error(msg)
}
},
async handleExport () {
const url = "/gov/project/icEvent/export";
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...formData,
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
})
.catch((err) => {
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
},
async handleWatch (row) {
this.issueId = row.issueId
const url = "/gov/issue/manage/votingissuedetail";
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
});
if (code === 0) {
this.issueDetailData = { ...data };
this.pageType = "info";
} else {
this.$message.error(msg);
}
},
//
async handleAudit (row) {
this.issueId = row.issueId
// this.issueId = '29bbec4b08bb11edbb6b0050568f8cf7'
const url = "/gov/issue/manage/votingissuedetail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
});
if (code === 0) {
this.issueDetailData = { ...data };
this.pageType = "dispose";
} else {
this.$message.error(msg);
}
},
handleClose () {
this.pageType = "list";
this.issueId = ""
this.getTableData()
},
handleOk () {
this.pageType = "list";
this.issueId = ""
this.pageNo = 1
this.getTableData()
},
handleEditSuccess () {
this.handleClose();
this.getTableData();
},
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,
pageNo,
...formData,
});
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
} else {
this.$message.error(msg);
}
},
handleSizeChange (val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange (val) {
this.pageNo = val;
this.getTableData();
},
resetSearch () {
this.formData = {
orgId: '',
orgType: '',
issueTitle: '',
startTime: '',
endTime: '',
applyStatus: '',
}
this.pageNo = 1
this.getTableData();
// this.loadTable()
},
deepTree (arr, child) {
if (Array.isArray(arr) && arr.length > 0) {
return arr.map(item => {
// if (child === 'subAgencyList') item.value = item.orgType + '-' + item.orgId
return {
...item,
[child]: item[child] && item[child].length > 0 && this.deepTree(item[child], child) || null
}
})
}
}
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
.div_search {
.item_width_2 {
width: 200px;
}
}
</style>

553
src/views/modules/shequzhili/issue/issueList.vue

@ -0,0 +1,553 @@
<template>
<div class="div_main">
<div v-show="pageType == 'list'">
<div class="div_search">
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'90px'">
<div>
<el-form-item label="所属组织"
prop="orgId">
<el-cascader class="item_width_1"
ref="myCascader"
size="small"
v-model="agencyIdArray"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</el-form-item>
<el-form-item label="议题标题"
prop="issueTitle">
<el-input v-model="formData.issueTitle"
class="item_width_1"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="转议题时间"
prop="startTime">
<el-date-picker v-model="formData.startTime"
:picker-options="startPickerOptions"
class="item_width_2"
size="small"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="formData.endTime"
:picker-options="endPickerOptions"
class="item_width_2 data-tag"
size="small"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="状态"
prop="issueStatus">
<el-select class="item_width_2"
v-model="formData.issueStatus"
placeholder="全部"
size="small"
clearable>
<el-option v-for="item in statusArray"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div>
<div class="div_table">
<div class="div_btn">
<el-button @click="handleExport"
class="diy-button--reset"
size="small">导出</el-button>
</div>
<el-table :data="tableData"
border
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
class="table"
style="width: 100%"
:height="maxTableHeight">
<el-table-column label=""
fixed="left"
type="selection"
align="center"
width="50" />
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="gridName"
align="center"
label="所属网格"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="issueTitle"
label="议题标题"
min-width="150"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="suggestion"
align="center"
min-width="150"
label="处理建议"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime"
align="center"
width="180"
:show-overflow-tooltip="true"
label="转议题时间">
</el-table-column>
<el-table-column prop="supportCount"
align="center"
width="80"
label="支持"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="oppositionCount"
align="center"
width="80"
label="反对"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="issueStatusName"
align="center"
label="状态"
width="80"
:show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span v-if="scope.row.issueStatus==='voting'">表决中</span>
<span v-else-if="scope.row.issueStatus==='shift_project'">已转项目</span>
<span v-else-if="scope.row.issueStatus==='closed'">已关闭</span>
<span v-else>--</span>
</template> -->
</el-table-column>
<el-table-column fixed="right"
label="操作"
align="center"
width="100">
<template slot-scope="scope">
<!-- <el-button v-if="scope.row.issueStatus==='voting'&& agencyId===scope.row.orgId"
@click="handleDispose(scope.row)"
type="text"
size="small"
class="div-table-button--edit">处理</el-button> -->
<el-button v-if="scope.row.issueStatus==='voting'"
@click="handleDispose(scope.row)"
type="text"
size="small"
class="div-table-button--edit">处理</el-button>
<el-button @click="handleWatch(scope.row)"
type="text"
size="small">查看</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
</div>
<div v-if="pageType == 'dispose' || pageType == 'info'">
<issue-info ref="eleEditForm"
:pageType="pageType"
:issueId="issueId"
:issueDetailData="issueDetailData"
@handleClose="handleClose"
@handleOk="handleOk"
@dialogOk="handleEditSuccess" />
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import issueInfo from "./cpts/issue-info";
import axios from "axios";
export default {
components: { issueInfo },
data () {
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.formData.startTime) {
let startTime = new Date(this.formData.startTime)
return time.getTime() > nowData || time.getTime() < startTime || time.getTime() === startTime
} else {
return time.getTime() > nowData
}
}
let startDisabledDate = (time) => {//datareturn
let nowData = Date.now()
return time.getTime() > nowData
}
return {
pageType: "list", // list add dispose info
user: {},
agencyId: '',
gridList: [],//list--
tableData: [],
statusArray: [
{
value: "voting",
label: "表决中",
},
{
value: "shift_project",
label: "已转项目",
},
{
value: "closed",
label: "已关闭",
},
],
formData: {
orgId: '',
orgType: '',
issueTitle: '',
startTime: '',
endTime: '',
issueStatus: '',
},
orgOptions: [],
orgOptionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
agencyIdArray: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
endPickerOptions: {
disabledDate: endDisabledDate
},
startPickerOptions: {
disabledDate: startDisabledDate
},
issueId: '',
issueDetailData: {},
};
},
computed: {
maxTableHeight () {
return this.$store.state.inIframe
? this.clientHeight - 410 + this.iframeHeigh
: this.clientHeight - 410;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
"formData.endTime": function (val) {
if (val && val != '') {
let arrayTemp = val.split(' ')
this.formData.endTime = arrayTemp[0] + ' 23:59:59'
}
},
},
mounted () {
console.log(this.$store.state)
this.user = this.$store.state.user
this.agencyId = this.user.agencyId
this.getOrgTreeList();
this.getTableData();
},
methods: {
handleSearch (val) {
console.log(this.formData);
this.pageNo = 1;
this.getTableData();
},
handleChangeAgency (val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
this.formData.orgType = obj.level === 'grid' ? 'grid' : 'agency'
this.formData.orgId = obj.agencyId
} else {
this.form.orgType = ''
this.form.orgId = ''
}
},
async getOrgTreeList () {
const url = "/gov/org/customeragency/agencygridtree"
let params = {
agencyId: this.agencyId,
purpose: "query"
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.orgOptions = []
this.orgOptions.push(data)
} else {
this.$message.error(msg)
}
},
async handleExport () {
const url = "/gov/project/icEvent/export";
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...formData,
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
})
.catch((err) => {
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
},
async handleWatch (row) {
this.issueId = row.issueId
const url = "/gov/issue/manage/votingissuedetail";
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
});
if (code === 0) {
this.issueDetailData = { ...data };
this.pageType = "info";
} else {
this.$message.error(msg);
}
},
//
async handleDispose (row) {
this.issueId = row.issueId
// this.issueId = '29bbec4b08bb11edbb6b0050568f8cf7'
const url = "/gov/issue/manage/votingissuedetail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
});
if (code === 0) {
this.issueDetailData = { ...data };
this.pageType = "dispose";
} else {
this.$message.error(msg);
}
},
handleClose () {
this.pageType = "list";
this.issueId = ""
this.getTableData()
},
handleOk () {
this.pageType = "list";
this.issueId = ""
this.pageNo = 1
this.getTableData()
},
handleEditSuccess () {
this.handleClose();
this.getTableData();
},
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,
pageNo,
...formData,
});
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
this.tableData.forEach(item => {
if (item.operationType === '2') {
item.operationTypeShow = '已转服务'
}
if (item.operationType === '1') {
item.operationTypeShow = '已立项'
}
if (item.operationType === '0') {
item.operationTypeShow = '已回复'
}
});
} else {
this.$message.error(msg);
}
},
handleSizeChange (val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange (val) {
this.pageNo = val;
this.getTableData();
},
resetSearch () {
this.formData = {
orgId: '',
orgType: '',
issueTitle: '',
startTime: '',
endTime: '',
issueStatus: '',
}
this.pageNo = 1
this.getTableData();
// this.loadTable()
},
deepTree (arr, child) {
if (Array.isArray(arr) && arr.length > 0) {
return arr.map(item => {
// if (child === 'subAgencyList') item.value = item.orgType + '-' + item.orgId
return {
...item,
[child]: item[child] && item[child].length > 0 && this.deepTree(item[child], child) || null
}
})
}
}
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
.div_search {
.item_width_2 {
width: 200px;
}
}
</style>

3
src/views/modules/workPc/guidance/addForm.vue

@ -106,7 +106,8 @@
<el-form-item class="block"
label="附件"
prop="attach">
<el-upload class="upload-demo"
<el-upload :headers="$getElUploadHeaders()"
class="upload-demo"
:action="uploadUlr"
:data="{customerId:customerId}"
accept=".doc,.pdf,.xls,.docx,.xlsx"

Loading…
Cancel
Save