24 changed files with 5411 additions and 27 deletions
@ -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> |
|||
@ -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张图片,图片支持jpg、jpeg、bmp、git或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: '',// 处理中:processing;已办结:closed_case |
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
formType: "add", //表单操作类型 add新增,edit编辑,detail详情 |
|||
|
|||
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)$)/; //身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X |
|||
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> |
|||
@ -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> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,204 @@ |
|||
<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.gridName||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">发生时间:</span> |
|||
<span>{{ eventDetailData.happenTime||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">事件内容:</span> |
|||
<span>{{ eventDetailData.eventContent||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop" |
|||
v-if="eventDetailData.imageList&&eventDetailData.imageList.length>0"> |
|||
<span class="info-title-2">图片:</span> |
|||
|
|||
<div class="info-pics"> |
|||
|
|||
<img v-for="(item,index) in eventDetailData.imageList" |
|||
style="width:80px;height:80px" |
|||
:key="index" |
|||
:src="item" |
|||
@click="watchImg(item)"> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="info-prop" |
|||
v-if="eventDetailData.voiceList&&eventDetailData.voiceList.length>0"> |
|||
<span class="info-title-2">音频:</span> |
|||
|
|||
<audio controls> |
|||
<source :src="item.url" |
|||
type="" |
|||
:key="item.url" |
|||
v-for="item in eventDetailData.voiceList" /> |
|||
</audio> |
|||
|
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">反映渠道:</span> |
|||
<span>{{ eventDetailData.sourceTypeName||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">地址:</span> |
|||
<span>{{ eventDetailData.address||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">报事人:</span> |
|||
<span>{{ eventDetailData.name||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">手机号:</span> |
|||
<span>{{ eventDetailData.mobile||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">身份证号:</span> |
|||
<span>{{ eventDetailData.idCard||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">痛点难点:</span> |
|||
<span>{{ eventDetailData.difficultPointName||'--' }}</span> |
|||
</div> |
|||
<div v-if="eventDetailData.satisfactionName" |
|||
class="info-prop"> |
|||
<span class="info-title-2">满意度:</span> |
|||
<span>{{ eventDetailData.satisfactionName||'--' }}</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> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,493 @@ |
|||
<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 :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 v-if="issueInfo.sourceType==='resi_topic'" |
|||
:class="['info-prop',{'info-prop-vis':source==='visiual'}]"> |
|||
<span class="info-title-2">意见和建议:</span> |
|||
<div 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'&&issueInfo.sourceType==='resi_topic'" |
|||
:class="['info-prop',{'info-prop-vis':source==='visiual'}]"> |
|||
<span class="info-title-2">满意度评价:</span> |
|||
<div class="line" |
|||
@click="handleToEvaluation">查看全部</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div class="m-line"> |
|||
<div class="stat"> |
|||
<div class="stat-item"> |
|||
<div> |
|||
{{ issueTrend.realityVoteCount }}/{{ |
|||
issueTrend.shouldVoteCount |
|||
}} |
|||
</div> |
|||
<div class="z-weak">已表决/应表决</div> |
|||
</div> |
|||
<div class="stat-item"> |
|||
<div>{{ issueTrend.supportAmount }}</div> |
|||
<div class="z-weak">支持</div> |
|||
</div> |
|||
<div class="stat-item"> |
|||
<div>{{ issueTrend.oppositionAmount }}</div> |
|||
<div class="z-weak">反对</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div v-if="issueChartData.length > 0" |
|||
class="m-chart"> |
|||
<line-chart :list="issueChartData" /> |
|||
</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"; |
|||
import lineChart from "@/views/modules/visual/cpts/line-chart"; |
|||
|
|||
function iniData () { |
|||
return { |
|||
user: {}, |
|||
projectPageType: 'info', |
|||
|
|||
issueInfo: {}, |
|||
showType: '', |
|||
|
|||
issueCate: [], |
|||
cateOptions: [], |
|||
visibleCatePanel: false, |
|||
selectedCateData: [], |
|||
|
|||
issueTag: [], |
|||
tagOptions: [], |
|||
visibleTagPanel: false, |
|||
selectedTagData: [], |
|||
|
|||
issueTrend: {}, |
|||
issueChartData: [], |
|||
|
|||
}; |
|||
} |
|||
|
|||
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, lineChart |
|||
}, |
|||
|
|||
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.getChartInfo(); |
|||
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 getChartInfo () { |
|||
const url = "/gov/issue/manage/votingtrend"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueId: this.issueId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
|
|||
this.issueTrend = data; |
|||
let chartData = []; |
|||
data.polyLine.forEach((item) => { |
|||
let date = dateFormat(new Date(item.voteDate * 1000), "yyyy-MM-dd"); |
|||
// console.log("date:" + date); |
|||
chartData.push( |
|||
{ |
|||
date, |
|||
value: item.supportIncrement, |
|||
type: "支持", |
|||
}, |
|||
{ |
|||
date, |
|||
value: item.oppositionIncrement, |
|||
type: "反对", |
|||
} |
|||
); |
|||
}); |
|||
this.issueChartData = chartData; |
|||
|
|||
|
|||
|
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
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" |
|||
src="@/assets/scss/modules/shequzhili/project-info.scss" |
|||
scoped |
|||
></style> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|||
</style> |
|||
|
|||
@ -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|| item.progressDesc}}</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> |
|||
@ -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> |
|||
@ -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> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -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> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,204 @@ |
|||
<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.gridName||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">发生时间:</span> |
|||
<span>{{ eventDetailData.happenTime||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">事件内容:</span> |
|||
<span>{{ eventDetailData.eventContent||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop" |
|||
v-if="eventDetailData.imageList&&eventDetailData.imageList.length>0"> |
|||
<span class="info-title-2">图片:</span> |
|||
|
|||
<div class="info-pics"> |
|||
|
|||
<img v-for="(item,index) in eventDetailData.imageList" |
|||
style="width:80px;height:80px" |
|||
:key="index" |
|||
:src="item" |
|||
@click="watchImg(item)"> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="info-prop" |
|||
v-if="eventDetailData.voiceList&&eventDetailData.voiceList.length>0"> |
|||
<span class="info-title-2">音频:</span> |
|||
|
|||
<audio controls> |
|||
<source :src="item.url" |
|||
type="" |
|||
:key="item.url" |
|||
v-for="item in eventDetailData.voiceList" /> |
|||
</audio> |
|||
|
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">反映渠道:</span> |
|||
<span>{{ eventDetailData.sourceTypeName||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">地址:</span> |
|||
<span>{{ eventDetailData.address||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">报事人:</span> |
|||
<span>{{ eventDetailData.name||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">手机号:</span> |
|||
<span>{{ eventDetailData.mobile||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">身份证号:</span> |
|||
<span>{{ eventDetailData.idCard||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">痛点难点:</span> |
|||
<span>{{ eventDetailData.difficultPointName||'--' }}</span> |
|||
</div> |
|||
<div v-if="eventDetailData.satisfactionName" |
|||
class="info-prop"> |
|||
<span class="info-title-2">满意度:</span> |
|||
<span>{{ eventDetailData.satisfactionName||'--' }}</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> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,195 @@ |
|||
<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 :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.gridName||'--' }}</span> |
|||
</div> |
|||
|
|||
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> |
|||
<span class="info-title-2">话题内容:</span> |
|||
<span>{{ topicInfo.topicContent||'--' }}</span> |
|||
</div> |
|||
|
|||
<div v-if="topicInfo.photoList&&topicInfo.photoList.length>0" |
|||
:class="['info-prop',{'info-prop-vis':source==='visiual'}]"> |
|||
<span class="info-title-2">图片:</span> |
|||
<img :src="src.url" |
|||
:key="src.url" |
|||
style="width:150px;height:150px;padding-right:10px" |
|||
v-for="src in topicInfo.photoList" |
|||
@click="watchImg(src.url)" /> |
|||
</div> |
|||
<div v-if="topicInfo.voiceList&&topicInfo.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 topicInfo.voiceList" /> |
|||
</audio> |
|||
</div> |
|||
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> |
|||
<span class="info-title-2">发布人:</span> |
|||
<span>{{ topicInfo.publishedUser||'--' }}</span> |
|||
</div> |
|||
|
|||
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> |
|||
<span class="info-title-2">发布时间:</span> |
|||
<span>{{ topicInfo.publishedTime||'--' }}</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 |
|||
class="line" |
|||
@click="handleToTopic">查看话题</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: {}, |
|||
topicInfo: {}, |
|||
showType: '', |
|||
|
|||
}; |
|||
} |
|||
|
|||
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: { |
|||
|
|||
}, |
|||
created () { }, |
|||
|
|||
mounted () { |
|||
this.user = this.$store.state.user |
|||
if (this.issueId) { |
|||
this.issueInfo = JSON.parse(JSON.stringify(this.issueDetailData)); |
|||
this.topicInfo = JSON.parse(JSON.stringify(this.issueDetailData.topicInfo)); |
|||
if (this.topicInfo.publishedTime) { |
|||
this.topicInfo.publishedTime = dateFormat( |
|||
new Date(this.topicInfo.publishedTime * 1000), |
|||
"yyyy-MM-dd hh:mm" |
|||
); |
|||
} |
|||
} |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
watchImg (src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
handleClose () { |
|||
this.showType = '' |
|||
}, |
|||
|
|||
handleCloseEvent () { |
|||
this.$emit("handleClose"); |
|||
}, |
|||
|
|||
async getApiData () { |
|||
}, |
|||
|
|||
handleToTopic () { |
|||
this.$emit("handleToTopic") |
|||
}, |
|||
|
|||
handleToEvent () { |
|||
this.$emit("handleToEvent") |
|||
}, |
|||
|
|||
handleTagChange (val) { |
|||
console.log(val); |
|||
}, |
|||
|
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|||
</style> |
|||
|
|||
@ -0,0 +1,308 @@ |
|||
<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" |
|||
@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" |
|||
v-if="item.actionType==='under_auditing'">{{ '待审核' }}</div> |
|||
<div class="name" |
|||
v-if="item.actionType==='rejected'">{{ '驳回' }}</div> |
|||
<!-- <div class="date"> |
|||
{{ item.operateTime }} |
|||
</div> --> |
|||
</div> |
|||
|
|||
<div> |
|||
<div v-if="item.actionType==='under_auditing'" |
|||
class="detail"> |
|||
<div class="detail-field">提交审核时间:</div> |
|||
<div class="detail-value">{{ item.operateTime }}</div> |
|||
</div> |
|||
<div v-if="item.actionType==='rejected'" |
|||
class="detail"> |
|||
<div class="detail-field">理由:</div> |
|||
<div class="detail-value">{{ item.reason }}</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> |
|||
|
|||
</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"; |
|||
|
|||
|
|||
let loading; // 加载动画 |
|||
function iniData () { |
|||
return { |
|||
|
|||
auditInfo: {}, |
|||
issueDetailCopy: {}, |
|||
|
|||
projectProcess: [], |
|||
projectPageType: 'info', |
|||
pageTypeCopy: '', |
|||
|
|||
//话题、事件详情 |
|||
topicShow: false, |
|||
eventShow: 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, |
|||
|
|||
}, |
|||
|
|||
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 |
|||
|
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getProjectProcess () { |
|||
const url = "/gov/issue/issueaudit/applicationhistory"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueApplicationId: this.issueId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.projectProcess = data.map((item) => { |
|||
item.operateTime = dateFormat( |
|||
new Date(item.operateTime * 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.auditInfo = this.$refs.ref_processinfo_dispose.auditInfo |
|||
|
|||
this.auditInfo.issueApplicationId = this.issueId |
|||
console.log('auditInfo', this.auditInfo) |
|||
//关闭属性赋值 |
|||
let url = '/gov/issue/issueaudit/audit' |
|||
await this.submitDispose(url, this.auditInfo) |
|||
|
|||
} 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) |
|||
}) |
|||
|
|||
}, |
|||
|
|||
|
|||
// 开启加载动画 |
|||
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> |
|||
@ -0,0 +1,188 @@ |
|||
<template> |
|||
<div class=""> |
|||
<div> |
|||
|
|||
<el-form ref="ref_audit_form" |
|||
:inline="false" |
|||
:model="auditInfo" |
|||
:rules="auditDataRule"> |
|||
<el-form-item label="处理方式" |
|||
label-width="150px" |
|||
:class="{'form-item':source==='visiual'}" |
|||
prop="actionType"> |
|||
<el-radio-group :class="{'form-item':source==='visiual'}" |
|||
v-model="auditInfo.actionType"> |
|||
|
|||
<el-radio label="approved">通过</el-radio> |
|||
<el-radio label="rejected">驳回</el-radio> |
|||
|
|||
</el-radio-group> |
|||
</el-form-item> |
|||
<el-form-item label="理由" |
|||
prop="reason" |
|||
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="auditInfo.reason"></el-input> |
|||
</div> |
|||
|
|||
</el-form-item> |
|||
|
|||
</el-form> |
|||
|
|||
</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 { |
|||
okflag: false, |
|||
|
|||
eventDetailCopy: {}, |
|||
|
|||
auditInfo: { |
|||
actionType: 'approved', |
|||
reason: '',//理由 |
|||
}, |
|||
|
|||
}; |
|||
}, |
|||
components: { |
|||
selectStaff, |
|||
|
|||
}, |
|||
computed: { |
|||
auditDataRule () { |
|||
return { |
|||
actionType: [ |
|||
{ required: true, message: "处理方式不能为空", trigger: "change" }, |
|||
], |
|||
reason: [ |
|||
{ required: true, message: "理由不能为空", trigger: "change" }, |
|||
], |
|||
|
|||
}; |
|||
}, |
|||
|
|||
|
|||
}, |
|||
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 () { |
|||
const { user } = this.$store.state |
|||
this.agencyId = user.agencyId |
|||
|
|||
if (this.eventId) { |
|||
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); |
|||
|
|||
} |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
handleChangeOperationType (val) { |
|||
|
|||
this.$refs['ref_audit_form'].resetFields() |
|||
|
|||
|
|||
}, |
|||
async getProcessInfo () { |
|||
this.okflag = false |
|||
|
|||
|
|||
this.$refs["ref_audit_form"].validate((valid, messageObj) => { |
|||
if (!valid) { |
|||
app.util.validateRule(messageObj); |
|||
|
|||
} else { |
|||
this.okflag = true |
|||
} |
|||
}); |
|||
|
|||
|
|||
}, |
|||
|
|||
handleCancle () { |
|||
this.$refs['ref_audit_form'].resetFields() |
|||
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> |
|||
@ -0,0 +1,186 @@ |
|||
<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.publishedUser||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">发布时间:</span> |
|||
<span>{{ topicInfo.publishedTime||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">联系方式:</span> |
|||
<span>{{ topicInfo.topicPublishMobile||'--' }}</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.publishedTime) { |
|||
this.topicInfo.publishedTime = dateFormat( |
|||
new Date(this.topicInfo.publishedTime * 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> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,510 @@ |
|||
<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_2" |
|||
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_2" |
|||
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="yyyyMMdd" |
|||
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="yyyyMMdd" |
|||
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 "./cptsAudit/issue-info"; |
|||
import axios from "axios"; |
|||
|
|||
export default { |
|||
components: { issueInfo }, |
|||
|
|||
data () { |
|||
let endDisabledDate = (time) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 |
|||
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) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 |
|||
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 - 360 + this.iframeHeigh |
|||
: this.clientHeight - 360; |
|||
}, |
|||
...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/issue/issueaudit/auditListExport"; |
|||
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.issueApplicationId |
|||
|
|||
const url = "/gov/issue/issueaudit/applicationdetail"; |
|||
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueApplicationId: this.issueId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
|
|||
this.issueDetailData = { ...data }; |
|||
this.pageType = "info"; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async handleAudit (row) { |
|||
this.issueId = row.issueApplicationId |
|||
|
|||
const url = "/gov/issue/issueaudit/applicationdetail"; |
|||
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueApplicationId: 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.agencyIdArray = [] |
|||
this.formData = { |
|||
orgId: '', |
|||
orgType: '', |
|||
issueTitle: '', |
|||
startTime: '', |
|||
endTime: '', |
|||
applyStatus: '', |
|||
|
|||
} |
|||
|
|||
this.pageNo = 1 |
|||
// this.getTableData(); |
|||
|
|||
}, |
|||
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> |
|||
@ -0,0 +1,545 @@ |
|||
<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_2" |
|||
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_2" |
|||
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="yyyyMMdd" |
|||
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="yyyyMMdd" |
|||
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"> |
|||
|
|||
</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) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 |
|||
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) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 |
|||
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 - 360 + this.iframeHeigh |
|||
: this.clientHeight - 360; |
|||
}, |
|||
...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/issue/issue/allIssueListExport"; |
|||
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.agencyIdArray = [] |
|||
this.formData = { |
|||
orgId: '', |
|||
orgType: '', |
|||
issueTitle: '', |
|||
startTime: '', |
|||
endTime: '', |
|||
issueStatus: '', |
|||
|
|||
} |
|||
|
|||
this.pageNo = 1 |
|||
// this.getTableData(); |
|||
|
|||
}, |
|||
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> |
|||
Loading…
Reference in new issue