15 changed files with 2856 additions and 995 deletions
After Width: | Height: | Size: 945 B |
@ -0,0 +1,368 @@ |
|||
@import "../../c/config"; |
|||
@import "../../c/function"; |
|||
|
|||
.g-add{ |
|||
|
|||
|
|||
.g-add-page{ |
|||
display: flex; |
|||
.g-left { |
|||
box-sizing: border-box; |
|||
width:40%; |
|||
padding: 5px 10px; |
|||
} |
|||
.g-right { |
|||
box-sizing: border-box; |
|||
width: 60%; |
|||
padding: 5px 10px; |
|||
} |
|||
|
|||
.form{ |
|||
.cell-width-1{ |
|||
width: 250px |
|||
} |
|||
|
|||
|
|||
.div_map { |
|||
position: relative; |
|||
} |
|||
.div_searchmap { |
|||
z-index: 1000; |
|||
position: absolute; |
|||
top: 5px; |
|||
left: 5px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.g-page { |
|||
display: flex; |
|||
.g-left { |
|||
box-sizing: border-box; |
|||
width: 65%; |
|||
padding: 5px 10px; |
|||
} |
|||
.g-right { |
|||
box-sizing: border-box; |
|||
width: 35%; |
|||
padding: 5px 10px; |
|||
} |
|||
} |
|||
|
|||
.g-process-info{ |
|||
.cell-width-area{ |
|||
width: 450px |
|||
} |
|||
} |
|||
|
|||
.div-btn{ |
|||
margin-top:50px; |
|||
display: flex; |
|||
justify-content: center; |
|||
} |
|||
.cell-width-1{ |
|||
width: 250px |
|||
} |
|||
.cell-width-2{ |
|||
width: 350px |
|||
} |
|||
|
|||
.cell-width-map { |
|||
width: 200px; |
|||
} |
|||
.item_width_3 { |
|||
margin-left: 10px; |
|||
width: 150px; |
|||
} |
|||
|
|||
.process-form{ |
|||
margin-top:20px; |
|||
} |
|||
|
|||
.m-card { |
|||
overflow-x: auto; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
.m-btns { |
|||
display: flex; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.m-info { |
|||
padding-left: 10px; |
|||
font-size: 14px; |
|||
font-family: PingFang SC; |
|||
font-weight: 400; |
|||
color: #333; |
|||
line-height: 24px; |
|||
// width: 500px; |
|||
|
|||
.info-title { |
|||
margin-top: 30px; |
|||
font-size: 20px; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #333; |
|||
line-height: 30px; |
|||
} |
|||
.info-content { |
|||
margin: 20px 0; |
|||
} |
|||
.info-pics { |
|||
display: flex; |
|||
margin: 20px 0; |
|||
img { |
|||
display: block; |
|||
width: 32%; |
|||
height: 90px; |
|||
margin-right: 9px; |
|||
object-fit: cover; |
|||
} |
|||
} |
|||
|
|||
.info-prop { |
|||
position: relative; |
|||
margin: 10px 0; |
|||
display: flex; |
|||
padding-left: 15px; |
|||
.info-title-2 { |
|||
width: 70px; |
|||
flex: 0 0 1; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
> span, |
|||
> div { |
|||
display: block; |
|||
// max-width: 300px; |
|||
} |
|||
|
|||
&::before { |
|||
content: ""; |
|||
display: block; |
|||
position: absolute; |
|||
top: 9px; |
|||
left: 0; |
|||
width: 7px; |
|||
height: 7px; |
|||
background: #0c81fe; |
|||
border-radius: 3px; |
|||
margin-right: 10px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.m-case { |
|||
height: 600px; |
|||
padding: 20px 0 20px 0; |
|||
overflow-y: auto; |
|||
} |
|||
|
|||
.m-row { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.m-hint { |
|||
position: relative; |
|||
height: 300px; |
|||
|
|||
// 暂无数据 |
|||
img { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
margin: auto; |
|||
} |
|||
} |
|||
|
|||
.m-line { |
|||
min-width: 400px; |
|||
|
|||
.stat { |
|||
margin: 20px 0 10px; |
|||
display: flex; |
|||
.stat-item { |
|||
width: 33%; |
|||
text-align: center; |
|||
|
|||
div { |
|||
font-size: 17px; |
|||
font-family: Source Han Serif SC; |
|||
font-weight: 500; |
|||
color: rgba(#000, 0.5); |
|||
line-height: 24px; |
|||
&.z-weak { |
|||
font-size: 12px; |
|||
font-family: Source Han Serif SC; |
|||
font-weight: 500; |
|||
color: rgba(#000, 0.5); |
|||
line-height: 24px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.m-tb { |
|||
padding-left: 62px; |
|||
padding-right: 40px; |
|||
} |
|||
|
|||
|
|||
|
|||
.m-process { |
|||
margin-top: 30px; |
|||
margin-left: 15px; |
|||
// min-width: 400px; |
|||
|
|||
.process-title { |
|||
margin-bottom: 25px; |
|||
margin-left: -5px; |
|||
font-size: 16px; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #333; |
|||
line-height: 18px; |
|||
} |
|||
|
|||
.list { |
|||
position: relative; |
|||
box-sizing: border-box; |
|||
margin-top: 30px/2; |
|||
margin-left: 50px/2; |
|||
padding: 0 0 0 30px/2; |
|||
width: 680px/2; |
|||
border-left: 3px solid #0c81fe; |
|||
padding-right: 10px; |
|||
|
|||
&::before { |
|||
content: ""; |
|||
position: absolute; |
|||
z-index: 1; |
|||
display: block; |
|||
top: -2px/2; |
|||
left: -2px/2; |
|||
width: 5px/2; |
|||
height: 20px/2; |
|||
background-color: #333; |
|||
} |
|||
|
|||
.item { |
|||
position: relative; |
|||
z-index: 2; |
|||
margin-bottom: 8px; |
|||
padding-bottom: 8px; |
|||
font-size: 16px; |
|||
font-family: PingFang SC; |
|||
font-weight: 400; |
|||
color: #333; |
|||
line-height: 24px; |
|||
padding-left: 20px; |
|||
padding-top: 1px; |
|||
|
|||
&::before { |
|||
content: ""; |
|||
display: block; |
|||
position: absolute; |
|||
top: -5px; |
|||
left: -11px; |
|||
width: 18px; |
|||
height: 18px; |
|||
background: #0c81fe; |
|||
border: 4px solid lighten(#0c81fe, 15); |
|||
border-radius: 100%; |
|||
} |
|||
|
|||
&.z-on { |
|||
&::before { |
|||
background: #e08400; |
|||
border-color: lighten(#e08400, 15); |
|||
} |
|||
} |
|||
|
|||
&:last-child { |
|||
margin-bottom: 0; |
|||
padding-bottom: 0; |
|||
border-bottom: none; |
|||
} |
|||
|
|||
.item-row { |
|||
margin-top: -10px; |
|||
margin-bottom: 10px; |
|||
display: flex; |
|||
} |
|||
|
|||
.name { |
|||
position: relative; |
|||
padding: 0 10px; |
|||
font-size: 12px; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #fff; |
|||
line-height: 22px; |
|||
height: 22px; |
|||
border-radius: 10px 0 10px 0; |
|||
background-color: #0c81fe; |
|||
// background-color: #e08400; |
|||
} |
|||
|
|||
.date { |
|||
margin-left: 10px; |
|||
font-size: 12px; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #7ca1d2; |
|||
line-height: 25px; |
|||
} |
|||
|
|||
.detail { |
|||
@include cs; |
|||
font-size: 14px; |
|||
line-height: 20px; |
|||
margin-bottom: 5px; |
|||
display: flex; |
|||
|
|||
.detail-field { |
|||
width: 80px; |
|||
text-align: justify; |
|||
text-align-last: justify; |
|||
} |
|||
.detail-value { |
|||
// width: 78%; |
|||
.detail-link { |
|||
display: inline; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.attachement-list { |
|||
padding-left: 80px; |
|||
a { |
|||
display: block; |
|||
cursor: pointer; |
|||
color: #4df0ff; |
|||
font-size: 14px; |
|||
|
|||
i { |
|||
color: #333; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.m-top { |
|||
display: flex; |
|||
} |
|||
|
|||
.m-chart { |
|||
min-height: 200px; |
|||
} |
@ -0,0 +1,612 @@ |
|||
<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> |
|||
</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 class="avatar-uploader" |
|||
ref="uploadPic" |
|||
:action="uploadUlr" |
|||
list-type="picture-card" |
|||
:on-exceed="exceedPic" |
|||
:on-remove="removePic" |
|||
:file-list="replayImgList" |
|||
: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> |
|||
|
|||
</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: "网络员手持终端", |
|||
}, |
|||
], |
|||
aaa: { |
|||
aaa: 1 |
|||
}, |
|||
|
|||
formData: iniFmData(), |
|||
formDataTemp: { |
|||
address: "山东省青岛市市南区徐州路21号戊", |
|||
// categoryList: ["1015", "1016"], |
|||
eventContent: "asdfasdfasdfasdf", |
|||
gridId: "63d5ff92ea981b1c58e4914ac894c610", |
|||
happenTime: "2022-05-05 12:00:00", |
|||
idCard: "211103190909090909", |
|||
imageList: ["https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20220518/0818246db4cc4ac7bcd84bea69a8b38c.png"], |
|||
latitude: 36.07120507831775, |
|||
longitude: 120.38806572319174, |
|||
mobile: "15111111111", |
|||
name: "张三", |
|||
reportUserId: "", |
|||
sourceType: "1", |
|||
}, |
|||
|
|||
|
|||
//地图相关 |
|||
keyWords: '', |
|||
|
|||
//图片相关 oss/file/uploadvariedfile |
|||
dialogImageUrl: 'oss/file/uploadvariedfile', |
|||
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile', |
|||
// upload_url: '', // 上传URL |
|||
upload_name: '', // 图片或视频名称 |
|||
replayImgList: [], |
|||
|
|||
okflag: 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: {}, |
|||
|
|||
async mounted () { |
|||
const { user } = this.$store.state |
|||
this.agencyId = user.agencyId |
|||
this.loadGrid(); |
|||
this.getCategoryList() |
|||
|
|||
this.initMap() |
|||
this.formData = { |
|||
...this.formDataTemp |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
async loadGrid () { |
|||
const url = "/gov/org/customergrid/gridoption" |
|||
|
|||
let params = { |
|||
agencyId: this.agencyId |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.gridList = data |
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
}, |
|||
async 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) |
|||
|
|||
}, |
|||
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(36.0722275, 120.38945519) |
|||
// 定义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) => { |
|||
this.formData.address = result.result.address |
|||
// 显示搜索到的地址 |
|||
}); |
|||
}, |
|||
|
|||
|
|||
resetData () { |
|||
|
|||
this.formData = iniFmData(); |
|||
}, |
|||
// 开启加载动画 |
|||
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> |
|||
.el-dialog__body { |
|||
padding: 0 10px 20px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,329 @@ |
|||
<template> |
|||
<div class=""> |
|||
<!-- <div v-show="pageType == 'info'" |
|||
class="g-page"> |
|||
<div class="g-left"> |
|||
<el-card> |
|||
<h3>项目详情</h3> |
|||
|
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span>项目标题:</span> |
|||
<span>{{ projectInfo.projectTitle }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>项目背景:</span> |
|||
<span>{{ projectInfo.backGround || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>项目方案:</span> |
|||
<span>{{ projectInfo.publicReply }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>内部备注:</span> |
|||
<span>{{ projectInfo.internalRemark || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop" |
|||
v-if="projectInfo.departmentNameList.length > 0"> |
|||
<span>当前处理部门:</span> |
|||
<span>{{ projectInfo.departmentNameList.join("、") }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>项目来源:</span> |
|||
<a style="cursor: pointer" |
|||
@click="handleWatchOrigin">查看项目来源</a> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>项目评价:</span> |
|||
<a style="cursor: pointer" |
|||
@click="showedEvaluation=true">查看项目评价</a> |
|||
</div> |
|||
<div class="info-prop" |
|||
v-if="projectCate.length > 0"> |
|||
<span>分类:</span> |
|||
<fold-text style="width: 300px" |
|||
:row="3"> |
|||
<div :key="item.name" |
|||
v-for="item in projectCate"> |
|||
{{ item.name }} |
|||
</div> |
|||
</fold-text> |
|||
</div> |
|||
<div class="info-prop" |
|||
v-if="projectTag.length > 0"> |
|||
<span>标签:</span> |
|||
<fold-text style="width: 300px" |
|||
:row="3"> |
|||
<div :key="item.name" |
|||
v-for="item in projectTag"> |
|||
{{ item.name }} |
|||
</div> |
|||
</fold-text> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-btns"> |
|||
<el-button size="" |
|||
@click="handleClose">关闭</el-button> |
|||
</div> |
|||
</el-card> |
|||
<el-card v-if="type == 'edit'"> |
|||
<h3>处理</h3> |
|||
<div class="m-fm"> |
|||
<el-form :inline="true" |
|||
:model="fmData" |
|||
:rules="dataRule" |
|||
label-position="left" |
|||
label-width="100px"> |
|||
<el-form-item label="处理:" |
|||
prop="operationType"> |
|||
<el-radio-group v-model="fmData.operationType"> |
|||
<el-radio :label="3">处理/响应</el-radio> |
|||
<el-radio :label="6">结案</el-radio> |
|||
<el-radio :label="9">转其他机关/科室</el-radio> |
|||
<el-radio :label="10">退回</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<div class="m-btns"> |
|||
<el-button size="" |
|||
style="margin-right: 50px" |
|||
@click="handleClose">关闭</el-button> |
|||
<el-button size="" |
|||
type="danger" |
|||
@click="handleSubmit">确定</el-button> |
|||
</div> |
|||
</el-card> |
|||
</div> |
|||
<div class="g-right"> |
|||
<el-card class="m-card" |
|||
v-if="projectProcess.length > 0"> |
|||
<h3>处理进展</h3> |
|||
<div class="m-process"> |
|||
<div class="list"> |
|||
<div class="item" |
|||
:class="index === 0 ? 'z-on' : ''" |
|||
: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 class="detail"> |
|||
<div class="detail-field">处理部门:</div> |
|||
<div class="detail-value">{{ item.departmentName }}</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 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> |
|||
</el-card> |
|||
</div> |
|||
</div> --> |
|||
<div v-show="pageType == 'add'"> |
|||
<el-card> |
|||
<event-add ref="ref_add"></event-add> |
|||
|
|||
</el-card> |
|||
|
|||
</div> |
|||
|
|||
<div class="process-form"> |
|||
<el-card> |
|||
<process-form ref="ref_processinfo"></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 v-if="pageType == 'origin-info'"> |
|||
<issue-info v-if="projectInfo.origin == 'issue'" |
|||
@close="handleBackInfo" |
|||
:issue-id="projectInfo.originId" /> |
|||
<event-info v-if="projectInfo.origin == 'resi_event'" |
|||
@close="handleBackInfo" |
|||
:event-id="projectInfo.originId" /> |
|||
</div> --> |
|||
|
|||
<!-- <div class="m-btns"> |
|||
<el-button @click="handleClose">关闭</el-button> |
|||
</div> --> |
|||
|
|||
<!-- 修改弹出框 --> |
|||
<!-- <el-dialog v-if="showedEvaluation" |
|||
:visible.sync="showedEvaluation" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
:title="formTitle" |
|||
width="850px" |
|||
top="5vh" |
|||
class="dialog-h" |
|||
@closed="showedEvaluation = false"> |
|||
<project-evaluation :eventId="projectIdCopy"></project-evaluation> |
|||
</el-dialog> --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import foldText from "@/views/components/foldText"; |
|||
import issueInfo from "./issue-info"; |
|||
import eventInfo from "./event-info1"; |
|||
import projectEvaluation from "./project-evaluation"; |
|||
import dateFormat from "dai-js/tools/dateFormat"; |
|||
|
|||
import eventAdd from "./add"; |
|||
import processForm from "./process-form"; |
|||
|
|||
function iniData () { |
|||
return { |
|||
formData: { |
|||
operationType: '', |
|||
categoryList: [] |
|||
}, |
|||
eventInfoData: {}, |
|||
replayInfo: {}, |
|||
demand: {}, |
|||
project: {}, |
|||
|
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
name: "projectInfo", |
|||
props: { |
|||
eventId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
pageType: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
}, |
|||
|
|||
components: { |
|||
foldText, |
|||
issueInfo, |
|||
eventInfo, |
|||
projectEvaluation, |
|||
|
|||
eventAdd, |
|||
processForm, |
|||
}, |
|||
|
|||
data: iniData, |
|||
|
|||
computed: {}, |
|||
|
|||
watch: { |
|||
eventId () { |
|||
let data = iniData(); |
|||
Object.keys(data).forEach((k) => { |
|||
this[k] = data[k]; |
|||
}); |
|||
this.getApiData(); |
|||
}, |
|||
}, |
|||
|
|||
mounted () { |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
handleComfirm () { |
|||
if (this.pageType === 'add') { |
|||
this.$refs.ref_add.getEventInfo() |
|||
if (this.$refs.ref_add.okflag) { |
|||
|
|||
this.eventInfoData = this.$refs.ref_add.formData |
|||
} else { |
|||
return false |
|||
} |
|||
|
|||
console.log('eventInfo', this.eventInfoData) |
|||
} |
|||
|
|||
this.$refs.ref_processinfo.getProcessInfo() |
|||
if (this.$refs.ref_processinfo.okflag) { |
|||
this.formData.operationType = this.$refs.ref_processinfo.operationType |
|||
this.formData.categoryList = this.$refs.ref_processinfo.categoryList |
|||
|
|||
if (this.formData.operationType === '0') { |
|||
this.replayInfo = this.$refs.ref_processinfo.replayInfo |
|||
console.log('replayInfo', this.replayInfo) |
|||
} else if (this.formData.operationType === '1') { |
|||
this.demand = this.$refs.ref_processinfo.replayInfo |
|||
} else if (this.formData.operationType === '2') { |
|||
this.project = this.$refs.ref_processinfo.replayInfo |
|||
} |
|||
|
|||
} else { |
|||
return false |
|||
} |
|||
this.formData = { |
|||
...this.eventInfoData, |
|||
replayInfo: this.replayInfo, |
|||
project: this.project, |
|||
demand: this.demand |
|||
} |
|||
|
|||
console.log('this.formData', this.formData) |
|||
|
|||
|
|||
|
|||
}, |
|||
handleClose () { |
|||
if (this.pageType === 'add') { |
|||
this.eventInfo = this.$refs.ref_add.resetData() |
|||
|
|||
} |
|||
|
|||
this.$emit("handleClose"); |
|||
} |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/shequzhili/event-info.scss" |
|||
scoped |
|||
></style> |
@ -0,0 +1,152 @@ |
|||
<template> |
|||
<div class=""> |
|||
<div class="g-page" v-show="pageType == 'info'"> |
|||
<div class="g-left"> |
|||
<el-card> |
|||
<h3>事件详情</h3> |
|||
|
|||
<div class="m-row"> |
|||
<div class="m-info"> |
|||
<div class="info-title">事件内容</div> |
|||
<div class="info-content">{{ info.eventContent }}</div> |
|||
<div class="info-pics"> |
|||
<img |
|||
:src="src" |
|||
:key="src" |
|||
v-for="src in info.eventImgs" |
|||
@click="watchImg(src)" |
|||
/> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">提交时间:</span> |
|||
<span>{{ info.eventTime }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">报事人:</span> |
|||
<span>{{ info.eventPeopleName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">所属网格:</span> |
|||
<span>{{ info.gridName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">提报给:</span> |
|||
<div> |
|||
<div>{{ info.eventPersonShow }}</div> |
|||
<div>{{ info.eventOrgShow }}</div> |
|||
</div> |
|||
|
|||
<!-- <span>{{ info.eventPerson.join("、") || "--" }}</span> --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-btns" v-if="type == 'info'"> |
|||
<el-button size="" @click="handleClose">关闭</el-button> |
|||
</div> |
|||
</el-card> |
|||
</div> |
|||
<div class="g-right"></div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import foldText from "@/views/components/foldText"; |
|||
import dateFormat from "dai-js/tools/dateFormat"; |
|||
|
|||
function iniData() { |
|||
return { |
|||
pageType: "info", |
|||
|
|||
eventInfo: { |
|||
eventTime: "", |
|||
eventContent: "", |
|||
eventAddress: "", |
|||
gridName: "", |
|||
isClosed: true, |
|||
isResolve: true, |
|||
isRollback: true, |
|||
eventImgs: [], |
|||
eventPerson: [], |
|||
eventOrg: [], |
|||
eventPeopleName: "", |
|||
projectInfo: { |
|||
projectId: "", |
|||
operationName: "", |
|||
operationTime: "", |
|||
projectDeclare: "", |
|||
}, |
|||
}, |
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
name: "issueInfo", |
|||
props: { |
|||
eventId: { |
|||
type: String, |
|||
default: "64502a8f1048a7240295527a9b32e513", |
|||
}, |
|||
type: { |
|||
type: String, |
|||
default: "info", |
|||
}, |
|||
}, |
|||
|
|||
components: { |
|||
foldText, |
|||
}, |
|||
|
|||
data: iniData, |
|||
|
|||
computed: {}, |
|||
|
|||
watch: {}, |
|||
|
|||
mounted() { |
|||
this.getApiData(); |
|||
}, |
|||
|
|||
methods: { |
|||
watchImg(src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
handleClose() { |
|||
this.$emit("close"); |
|||
}, |
|||
|
|||
async getApiData() { |
|||
this.getEventInfo(); |
|||
}, |
|||
//加载组织数据 |
|||
async getEventInfo() { |
|||
const url = "/gov/project/resievent/eventdetail-icdata"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
resiEventId: this.projectInfo.originId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
if (data.eventOrg && data.eventOrg.length > 0) { |
|||
data.eventOrgShow = data.eventOrg.join("、"); |
|||
} |
|||
if (data.eventPerson && data.eventPerson.length > 0) { |
|||
data.eventPersonShow = data.eventPerson.join("、"); |
|||
} |
|||
this.info = { ...data }; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/shequzhili/project-info.scss" |
|||
scoped |
|||
></style> |
@ -0,0 +1,288 @@ |
|||
<template> |
|||
<div class=""> |
|||
<div class="g-page" v-show="pageType == 'info'"> |
|||
<div class="g-left"> |
|||
<el-card> |
|||
<h3>议题详情</h3> |
|||
|
|||
<div class="m-row"> |
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span>议题标题:</span> |
|||
<span>{{ issueInfo.issueTitle }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>议题建议:</span> |
|||
<span>{{ issueInfo.issueSuggestion }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>所属网格:</span> |
|||
<span>{{ issueInfo.belongsGridName || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>议题发起人:</span> |
|||
<span>{{ issueInfo.issueInitiator }}</span> |
|||
</div> |
|||
<div |
|||
v-if="issueInfo.topicInfo && issueInfo.topicInfo.groupName" |
|||
class="info-prop" |
|||
> |
|||
<span>议题来源:</span> |
|||
<span>{{ issueInfo.topicInfo.groupName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>转议题时间:</span> |
|||
<span>{{ issueInfo.shiftIssueTime }}</span> |
|||
</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> |
|||
|
|||
<div class="m-btns" v-if="type == 'info'"> |
|||
<el-button size="" @click="handleClose">关闭</el-button> |
|||
</div> |
|||
</el-card> |
|||
</div> |
|||
<div class="g-right"> |
|||
<el-card class="m-card" v-if="issueProcess.length > 0"> |
|||
<h3>处理进展</h3> |
|||
<div class="m-process"> |
|||
<div class="list"> |
|||
<div |
|||
class="item" |
|||
:class="index === 0 ? 'z-on' : ''" |
|||
:key="item.processId" |
|||
v-for="(item, index) in issueProcess" |
|||
> |
|||
<div class="item-row"> |
|||
<div class="name">{{ item.processName }}</div> |
|||
<div class="date"> |
|||
{{ item.processTime }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="detail"> |
|||
<div class="detail-field">处理部门:</div> |
|||
<div class="detail-value">{{ item.departmentName }}</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 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> |
|||
</el-card> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import foldText from "@/views/components/foldText"; |
|||
import dateFormat from "dai-js/tools/dateFormat"; |
|||
import lineChart from "@/views/modules/visual/cpts/line-chart"; |
|||
|
|||
function iniData() { |
|||
return { |
|||
pageType: "info", |
|||
|
|||
issueProcess: [], |
|||
|
|||
issueInfo: { |
|||
attitude: "", |
|||
belongsGridName: "", |
|||
issueIdea: "", |
|||
issueInitiator: "", |
|||
issueStatus: "", |
|||
issueSuggestion: "", |
|||
issueTitle: "", |
|||
joinVote: true, |
|||
projectId: "", |
|||
projectStatus: false, |
|||
publishIdeaFlag: false, |
|||
}, |
|||
|
|||
issueTrend: {}, |
|||
issueChartData: [], |
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
name: "issueInfo", |
|||
props: { |
|||
issueId: { |
|||
type: String, |
|||
default: "64502a8f1048a7240295527a9b32e513", |
|||
}, |
|||
type: { |
|||
type: String, |
|||
default: "info", |
|||
}, |
|||
}, |
|||
|
|||
components: { |
|||
foldText, |
|||
lineChart, |
|||
}, |
|||
|
|||
data: iniData, |
|||
|
|||
computed: {}, |
|||
|
|||
watch: {}, |
|||
|
|||
mounted() { |
|||
this.getApiData(); |
|||
}, |
|||
|
|||
methods: { |
|||
watchImg(src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
handleClose() { |
|||
this.$emit("close"); |
|||
}, |
|||
|
|||
handleSubmit() { |
|||
this.$emit("afterEdit"); |
|||
}, |
|||
|
|||
async getApiData() { |
|||
this.getIssueInfo(); |
|||
this.getIssueTrend(); |
|||
this.getIssueProcess(); |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getIssueInfo() { |
|||
const url = "/resi/hall/issue/detail"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueId: this.issueId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.issueInfo = data; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getIssueTrend() { |
|||
const url = "/resi/hall/issue/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 getIssueProcess() { |
|||
const url = "/gov/issue/manage/progress"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueId: this.issueId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.issueProcess = data.map((item) => { |
|||
item.processTime = dateFormat( |
|||
new Date(item.processTime * 1000), |
|||
"yyyy-MM-dd hh:mm" |
|||
); |
|||
return item; |
|||
}); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/shequzhili/project-info.scss" |
|||
scoped |
|||
></style> |
@ -0,0 +1,154 @@ |
|||
<template> |
|||
<div class="" style="padding: 0 20px 10px"> |
|||
<h2>项目评价</h2> |
|||
<el-table |
|||
:data="tableData" |
|||
border |
|||
style="width: 100%" |
|||
class="resi-table" |
|||
:height="maxTableHeight" |
|||
> |
|||
<el-table-column |
|||
label="序号" |
|||
fixed="left" |
|||
type="index" |
|||
align="center" |
|||
width="50" |
|||
/> |
|||
<el-table-column |
|||
prop="evaluationUser" |
|||
align="center" |
|||
label="评价人" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="time" |
|||
label="评价时间" |
|||
align="center" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="content" |
|||
align="center" |
|||
label="评价内容 " |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</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> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import dateFormat from "dai-js/tools/dateFormat"; |
|||
|
|||
function iniData() { |
|||
return { |
|||
pageNo: 1, |
|||
pageSize: window.localStorage.getItem("pageSize") || 20, |
|||
total: 1, |
|||
tableData: [], |
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
name: "projectEvaluation", |
|||
props: { |
|||
projectId: { |
|||
type: String, |
|||
default: "64502a8f1048a7240295527a9b32e513", |
|||
}, |
|||
}, |
|||
|
|||
components: {}, |
|||
|
|||
data: iniData, |
|||
|
|||
computed: {}, |
|||
|
|||
watch: { |
|||
projectId() { |
|||
let data = iniData(); |
|||
Object.keys(data).forEach((k) => { |
|||
this[k] = data[k]; |
|||
}); |
|||
this.getApiData(); |
|||
}, |
|||
}, |
|||
|
|||
mounted() { |
|||
this.getApiData(); |
|||
}, |
|||
|
|||
methods: { |
|||
watchImg(src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
handleClose() { |
|||
this.$emit("close"); |
|||
}, |
|||
|
|||
handleSizeChange(val) { |
|||
console.log(`每页 ${val} 条`); |
|||
this.pageSize = val; |
|||
window.localStorage.setItem("pageSize", val); |
|||
this.getTableData(); |
|||
}, |
|||
handleCurrentChange(val) { |
|||
console.log(`当前页: ${val}`); |
|||
this.pageNo = val; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
async getApiData() { |
|||
await this.getTableData(); |
|||
}, |
|||
|
|||
async getTableData() { |
|||
// const url = "/gov/project/project/satisfaction-evaluation-list"; |
|||
const url = |
|||
"http://yapi.elinkservice.cn/mock/245/gov/project/project/satisfaction-evaluation-list"; |
|||
const { pageSize, pageNo, fmData } = this; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
pageSize, |
|||
pageNo, |
|||
...fmData, |
|||
}); |
|||
if (code === 0) { |
|||
console.log("列表请求成功!!!!!!!!!!!!!!"); |
|||
this.total = data.total || 0; |
|||
this.tableData = data.list |
|||
? data.list.map((item) => { |
|||
return item; |
|||
}) |
|||
: []; |
|||
} else { |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/shequzhili/project-info.scss" |
|||
scoped |
|||
></style> |
@ -0,0 +1,137 @@ |
|||
<template> |
|||
<div class=""> |
|||
|
|||
<el-form ref="ref_form1" |
|||
:inline="false" |
|||
:model="formData" |
|||
:rules="dataRule" |
|||
class="form"> |
|||
<el-form-item label="回复内容" |
|||
prop="content" |
|||
label-width="150px" |
|||
style="display: block"> |
|||
<el-input class="cell-width-area" |
|||
type="textarea" |
|||
maxlength="500" |
|||
show-word-limit |
|||
:rows="5" |
|||
placeholder="请输入回复内容,不超过500字" |
|||
v-model="formData.content"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="" |
|||
label-width="150px" |
|||
style="display: block"> |
|||
<el-checkbox v-model="status">已完成</el-checkbox> |
|||
</el-form-item> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import formVltHelper from "dai-js/tools/formVltHelper"; |
|||
|
|||
import { isCard } from "@/utils/validate"; |
|||
|
|||
let loading; // 加载动画 |
|||
|
|||
|
|||
|
|||
|
|||
export default { |
|||
data () { |
|||
return { |
|||
btnDisable: false, |
|||
formData: { |
|||
content: '', |
|||
status: '' |
|||
}, |
|||
|
|||
status: false, |
|||
okflag: false |
|||
|
|||
|
|||
|
|||
}; |
|||
}, |
|||
components: {}, |
|||
computed: { |
|||
dataRule () { |
|||
|
|||
return { |
|||
content: [ |
|||
{ required: true, message: "回复内容不能为空", trigger: "blur" }, |
|||
], |
|||
|
|||
}; |
|||
}, |
|||
|
|||
|
|||
}, |
|||
props: {}, |
|||
watch: {}, |
|||
|
|||
async mounted () { |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
|
|||
async getReplayInfo () { |
|||
this.okflag = false |
|||
this.$refs["ref_form1"].validate((valid, messageObj) => { |
|||
if (!valid) { |
|||
app.util.validateRule(messageObj); |
|||
|
|||
} else { |
|||
if (this.status) { |
|||
this.formData.status = 'closed_case' |
|||
} else { |
|||
this.formData.status = 'processing' |
|||
} |
|||
|
|||
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" |
|||
src="@/assets/scss/modules/shequzhili/event-info.scss" |
|||
scoped |
|||
></style> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<style> |
|||
.el-dialog__body { |
|||
padding: 0 10px 20px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,248 @@ |
|||
<template> |
|||
<div class=""> |
|||
<div class="g-process-info"> |
|||
|
|||
<el-form ref="ref_form1" |
|||
:inline="false" |
|||
:rules="dataRule" |
|||
class="form"> |
|||
<el-form-item label="分类" |
|||
label-width="150px" |
|||
prop="categoryList"> |
|||
<el-cascader class="cell-width-2" |
|||
ref="myCascader" |
|||
v-model="selCategoryArray" |
|||
:key="iscascaderShow" |
|||
:options="casOptions" |
|||
:props="optionProps" |
|||
:show-all-levels="false"></el-cascader> |
|||
</el-form-item> |
|||
<el-form-item label="处理方式" |
|||
label-width="150px" |
|||
prop="operationType"> |
|||
<el-radio-group v-model="operationType"> |
|||
<el-radio label="0">回复</el-radio> |
|||
<el-radio label="1">立项</el-radio> |
|||
<el-radio label="2">转需求</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
|
|||
</el-form> |
|||
|
|||
<div v-if="operationType==='0'"> |
|||
<process-form-replay ref="ref_process_form_replay"></process-form-replay> |
|||
</div> |
|||
|
|||
<div v-if="operationType==='1'"></div> |
|||
|
|||
<div v-if="operationType==='2'"></div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import processFormReplay from "./process-form-replay"; |
|||
|
|||
|
|||
let loading; // 加载动画 |
|||
|
|||
export default { |
|||
data () { |
|||
return { |
|||
btnDisable: false, |
|||
gridList: [],//所属网格list--场所区域 |
|||
categrayList: [], |
|||
casOptions: [], |
|||
iscascaderShow: 0, |
|||
selCategoryArray: [ |
|||
|
|||
], |
|||
optionProps: { |
|||
multiple: true, |
|||
value: 'id', |
|||
label: 'name', |
|||
children: 'subCategory', |
|||
|
|||
}, |
|||
|
|||
operationType: '0', |
|||
|
|||
|
|||
categoryList: [], |
|||
replayInfo: {}, |
|||
demand: {}, |
|||
project: {}, |
|||
okflag: false |
|||
|
|||
}; |
|||
}, |
|||
components: { |
|||
processFormReplay |
|||
}, |
|||
computed: { |
|||
dataRule () { |
|||
return { |
|||
categoryList: [ |
|||
{ required: true, message: "分类不能为空", trigger: "blur" }, |
|||
], |
|||
operationType: [ |
|||
{ required: true, message: "处理方式不能为空", trigger: "blur" }, |
|||
], |
|||
|
|||
}; |
|||
}, |
|||
|
|||
|
|||
}, |
|||
props: {}, |
|||
watch: {}, |
|||
|
|||
async mounted () { |
|||
const { user } = this.$store.state |
|||
this.agencyId = user.agencyId |
|||
this.loadGrid(); |
|||
this.getCategoryList() |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
async loadGrid () { |
|||
const url = "/gov/org/customergrid/gridoption" |
|||
|
|||
let params = { |
|||
agencyId: this.agencyId |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.gridList = data |
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
}, |
|||
async 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 = [["1001", "1015"], ["1001", "1016"], ["1001", "1017"]] |
|||
|
|||
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 |
|||
}, |
|||
|
|||
async getProcessInfo () { |
|||
this.okflag = false |
|||
let catelist = [] |
|||
if (this.selCategoryArray.length === 0) { |
|||
this.$message({ |
|||
type: "error", |
|||
message: "请选择分类", |
|||
}); |
|||
|
|||
this.okflag = false |
|||
return false |
|||
} |
|||
console.log(this.selCategoryArray) |
|||
this.selCategoryArray.forEach(element => { |
|||
let array = element[1] |
|||
catelist.push(array) |
|||
}); |
|||
this.categoryList = catelist |
|||
|
|||
if (this.operationType === '0') { |
|||
this.$refs.ref_process_form_replay.getReplayInfo() |
|||
if (this.$refs.ref_process_form_replay.okflag) { |
|||
this.replayInfo = this.$refs.ref_process_form_replay.formData |
|||
this.okflag = true |
|||
|
|||
} else { |
|||
return false |
|||
} |
|||
|
|||
|
|||
} else if (this.operationType === '1') { |
|||
|
|||
} else if (this.operationType === '2') { |
|||
|
|||
} |
|||
|
|||
}, |
|||
|
|||
|
|||
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" |
|||
src="@/assets/scss/modules/shequzhili/event-info.scss" |
|||
scoped |
|||
></style> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<style> |
|||
.el-dialog__body { |
|||
padding: 0 10px 20px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,154 @@ |
|||
<template> |
|||
<div class="" style="padding: 0 20px 10px"> |
|||
<h2>项目评价</h2> |
|||
<el-table |
|||
:data="tableData" |
|||
border |
|||
style="width: 100%" |
|||
class="resi-table" |
|||
:height="maxTableHeight" |
|||
> |
|||
<el-table-column |
|||
label="序号" |
|||
fixed="left" |
|||
type="index" |
|||
align="center" |
|||
width="50" |
|||
/> |
|||
<el-table-column |
|||
prop="evaluationUser" |
|||
align="center" |
|||
label="评价人" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="time" |
|||
label="评价时间" |
|||
align="center" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="content" |
|||
align="center" |
|||
label="评价内容 " |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</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> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import dateFormat from "dai-js/tools/dateFormat"; |
|||
|
|||
function iniData() { |
|||
return { |
|||
pageNo: 1, |
|||
pageSize: window.localStorage.getItem("pageSize") || 20, |
|||
total: 1, |
|||
tableData: [], |
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
name: "projectEvaluation", |
|||
props: { |
|||
projectId: { |
|||
type: String, |
|||
default: "64502a8f1048a7240295527a9b32e513", |
|||
}, |
|||
}, |
|||
|
|||
components: {}, |
|||
|
|||
data: iniData, |
|||
|
|||
computed: {}, |
|||
|
|||
watch: { |
|||
projectId() { |
|||
let data = iniData(); |
|||
Object.keys(data).forEach((k) => { |
|||
this[k] = data[k]; |
|||
}); |
|||
this.getApiData(); |
|||
}, |
|||
}, |
|||
|
|||
mounted() { |
|||
this.getApiData(); |
|||
}, |
|||
|
|||
methods: { |
|||
watchImg(src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
handleClose() { |
|||
this.$emit("close"); |
|||
}, |
|||
|
|||
handleSizeChange(val) { |
|||
console.log(`每页 ${val} 条`); |
|||
this.pageSize = val; |
|||
window.localStorage.setItem("pageSize", val); |
|||
this.getTableData(); |
|||
}, |
|||
handleCurrentChange(val) { |
|||
console.log(`当前页: ${val}`); |
|||
this.pageNo = val; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
async getApiData() { |
|||
await this.getTableData(); |
|||
}, |
|||
|
|||
async getTableData() { |
|||
// const url = "/gov/project/project/satisfaction-evaluation-list"; |
|||
const url = |
|||
"http://yapi.elinkservice.cn/mock/245/gov/project/project/satisfaction-evaluation-list"; |
|||
const { pageSize, pageNo, fmData } = this; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
pageSize, |
|||
pageNo, |
|||
...fmData, |
|||
}); |
|||
if (code === 0) { |
|||
console.log("列表请求成功!!!!!!!!!!!!!!"); |
|||
this.total = data.total || 0; |
|||
this.tableData = data.list |
|||
? data.list.map((item) => { |
|||
return item; |
|||
}) |
|||
: []; |
|||
} else { |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/shequzhili/project-info.scss" |
|||
scoped |
|||
></style> |
@ -1,703 +0,0 @@ |
|||
<template> |
|||
<div class="m-pop"> |
|||
<div class="wrap"> |
|||
<cpt-card> |
|||
<div class="title"> |
|||
<img src="@/assets/img/shuju/title-tip.png" /> |
|||
<span>项目详情</span> |
|||
</div> |
|||
|
|||
<div class="btn-close" @click="handleClose"> |
|||
<img src="@/assets/img/shuju/people/close.png" /> |
|||
</div> |
|||
<div class="m-top"> |
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span>项目标题:</span> |
|||
<span>{{ projectInfo.projectTitle }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>项目背景:</span> |
|||
<span>{{ projectInfo.backGround }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>项目方案:</span> |
|||
<span>{{ projectInfo.publicReply }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>内部备注:</span> |
|||
<span>{{ projectInfo.internalRemark || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>当前处理部门:</span> |
|||
<span>{{ projectInfo.departmentNameList.join("、") }}</span> |
|||
</div> |
|||
<div class="info-prop" v-if="projectCate.length > 0"> |
|||
<span>分类:</span> |
|||
<fold-text :row="3"> |
|||
<div :key="item.name" v-for="item in projectCate"> |
|||
{{ item.name }} |
|||
</div> |
|||
</fold-text> |
|||
</div> |
|||
<div class="info-prop" v-if="projectTag.length > 0"> |
|||
<span>标签:</span> |
|||
<fold-text :row="3"> |
|||
<div :key="item.name" v-for="item in projectTag"> |
|||
{{ item.name }} |
|||
</div> |
|||
</fold-text> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-process" v-if="projectProcess.length > 0"> |
|||
<div class="process-title">处理进展</div> |
|||
<div class="list"> |
|||
<div |
|||
class="item" |
|||
:class="index === 0 ? 'z-on' : ''" |
|||
: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 class="detail"> |
|||
<div class="detail-field">处理部门:</div> |
|||
<div class="detail-value">{{ item.departmentName }}</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 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> |
|||
</div> |
|||
<div v-if="projectInfo.origin !== 'agency'" class="tabs"> |
|||
<div |
|||
class="tab-btn" |
|||
@click="subStartGroupIndex" |
|||
v-if="groupList.length > 9" |
|||
> |
|||
<img src="@/assets/img/shuju/people/arrow-double-left.png" /> |
|||
</div> |
|||
<div |
|||
v-show="index >= startGroupIndex && index < startGroupIndex + 9" |
|||
class="tab" |
|||
:class="groupIndex % groupList.length == index ? 'z-on' : ''" |
|||
:key="'tab' + index" |
|||
@click="groupIndex = index" |
|||
v-for="(item, index) in groupList" |
|||
> |
|||
{{ item.label }} |
|||
</div> |
|||
<div |
|||
class="tab-btn" |
|||
@click="addStartGroupIndex" |
|||
v-if="groupList.length > 9" |
|||
> |
|||
<img src="@/assets/img/shuju/people/arrow-double-right.png" /> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-case" v-if="projectInfo.origin !== 'agency'"> |
|||
<div class="m-yanpan" v-if="groupIndex == 0"> |
|||
<div v-if="projectId || true"> |
|||
<screen-loading v-if="!yanPan.loading">加载中</screen-loading> |
|||
<analyse |
|||
v-else-if="yanPan.singleTitle" |
|||
:singleTitle="yanPan.singleTitle" |
|||
:moreTitle="yanPan.moreTitle" |
|||
:userList="yanPan.homeUserList" |
|||
:userName="yanPan.icUserName" |
|||
:singleList="yanPan.singleList" |
|||
:hasEvent="yanPan.hasEvent" |
|||
:moreList="yanPan.moreList" |
|||
@user="toUserInfo" |
|||
@project="toProjectInfo" |
|||
/> |
|||
<div v-else class="m-hint"> |
|||
<img |
|||
src="@/assets/img/modules/visual/noData.png" |
|||
class="no-data-img" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div v-if="groupIndex == 1"> |
|||
<div |
|||
class="m-row" |
|||
v-if="projectInfo.originId && projectInfo.origin !== 'work_event'" |
|||
> |
|||
<div v-if="projectInfo.origin === 'issue'" class="m-info"> |
|||
<div class="info-prop"> |
|||
<span>议题标题:</span> |
|||
<span>{{ issueInfo.issueTitle }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>议题建议:</span> |
|||
<span>{{ issueInfo.issueSuggestion }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>所属网格:</span> |
|||
<span>{{ issueInfo.belongsGridName || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>议题发起人:</span> |
|||
<span>{{ issueInfo.issueInitiator }}</span> |
|||
</div> |
|||
<div |
|||
v-if="issueInfo.topicInfo && issueInfo.topicInfo.groupName" |
|||
class="info-prop" |
|||
> |
|||
<span>议题来源:</span> |
|||
<span>{{ issueInfo.topicInfo.groupName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>转议题时间:</span> |
|||
<span>{{ issueInfo.shiftIssueTime }}</span> |
|||
</div> |
|||
</div> |
|||
<div v-if="projectInfo.origin === 'resi_event'" class="m-info"> |
|||
<div class="info-title">事件内容</div> |
|||
<div class="info-content">{{ info.eventContent }}</div> |
|||
<div class="info-pics"> |
|||
<img |
|||
:src="src" |
|||
:key="src" |
|||
v-for="src in info.eventImgs" |
|||
@click="watchImg(src)" |
|||
/> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">提交时间:</span> |
|||
<span>{{ info.eventTime }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">报事人:</span> |
|||
<span>{{ info.eventPeopleName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">所属网格:</span> |
|||
<span>{{ info.gridName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">提报给:</span> |
|||
<div> |
|||
<div>{{ info.eventPersonShow }}</div> |
|||
<div>{{ info.eventOrgShow }}</div> |
|||
</div> |
|||
|
|||
<!-- <span>{{ info.eventPerson.join("、") || "--" }}</span> --> |
|||
</div> |
|||
</div> |
|||
|
|||
<div v-if="projectInfo.origin === 'issue'" 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> |
|||
|
|||
<line-chart |
|||
v-if="issueChartData.length > 0" |
|||
:list="issueChartData" |
|||
/> |
|||
</div> |
|||
</div> |
|||
<div v-else class="m-hint"> |
|||
<img |
|||
src="@/assets/img/modules/visual/noData.png" |
|||
class="no-data-img" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</cpt-card> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import cptCard from "@/views/modules/visual/cpts/card"; |
|||
import screenLoading from "@/views/modules/visual/cpts/loading"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import cptTb from "@/views/modules/visual/cpts/tb"; |
|||
import lineChart from "@/views/modules/visual/cpts/line-chart"; |
|||
import analyse from "@/views/modules/visual/cpts/analyse"; |
|||
import foldText from "@/views/components/foldText"; |
|||
import dateFormat from "dai-js/tools/dateFormat"; |
|||
|
|||
function iniData() { |
|||
return { |
|||
projectIdCopy: this.projectId, |
|||
groupList: [{ label: "研判分析" }, { label: "项目来源" }], |
|||
groupIndex: 0, |
|||
startGroupIndex: 0, |
|||
|
|||
projectProcess: [], |
|||
|
|||
projectInfo: { |
|||
backGround: "", |
|||
departmentList: [ |
|||
// { departmentName: "南宁社区-南宁第二网格", staffList: ["周相成"] }, |
|||
], |
|||
departmentNameList: [], |
|||
internalRemark: "", |
|||
isSend: false, |
|||
locateAddress: "", |
|||
locateDimension: "", |
|||
locateLongitude: "", |
|||
origin: "", |
|||
originId: "", |
|||
platformIds: [], |
|||
processable: false, |
|||
projectId: "", |
|||
projectStatus: "pending", |
|||
projectTitle: "", |
|||
publicReply: "", |
|||
returnable: false, |
|||
}, |
|||
|
|||
issueInfo: { |
|||
attitude: "", |
|||
belongsGridName: "", |
|||
issueIdea: "", |
|||
issueInitiator: "", |
|||
issueStatus: "", |
|||
issueSuggestion: "", |
|||
issueTitle: "", |
|||
joinVote: true, |
|||
projectId: "", |
|||
projectStatus: false, |
|||
publishIdeaFlag: false, |
|||
}, |
|||
|
|||
issueTrend: {}, |
|||
issueChartData: [], |
|||
|
|||
eventInfo: { |
|||
eventTime: "", |
|||
eventContent: "", |
|||
eventAddress: "", |
|||
gridName: "", |
|||
isClosed: true, |
|||
isResolve: true, |
|||
isRollback: true, |
|||
eventImgs: [], |
|||
eventPerson: [], |
|||
eventOrg: [], |
|||
eventPeopleName: "", |
|||
projectInfo: { |
|||
projectId: "", |
|||
operationName: "", |
|||
operationTime: "", |
|||
projectDeclare: "", |
|||
}, |
|||
}, |
|||
|
|||
projectCate: [], |
|||
projectTag: [], |
|||
|
|||
yanPan: { |
|||
loading: false, |
|||
|
|||
icResiUserId: "", |
|||
houseId: "", |
|||
icUserName: "", |
|||
|
|||
homeUserList: [ |
|||
// { |
|||
// homeId: '', |
|||
// icUserId: '', |
|||
// icUserName: '', |
|||
// } |
|||
], |
|||
projectData: [ |
|||
// { |
|||
// firstCategoryCode: '', |
|||
// firstCategoryName: '', |
|||
// projectList: [], |
|||
// } |
|||
], |
|||
hasEvent: false, |
|||
singleTitle: "", |
|||
moreTitle: "", |
|||
singleList: [], //楼院小组 |
|||
moreList: [], // |
|||
}, |
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
name: "demandInfo", |
|||
props: { |
|||
projectId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
userId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
categoryCodes: { |
|||
type: Array, |
|||
default: [], |
|||
}, |
|||
}, |
|||
|
|||
components: { |
|||
cptCard, |
|||
cptTb, |
|||
analyse, |
|||
screenLoading, |
|||
lineChart, |
|||
foldText, |
|||
}, |
|||
|
|||
data: iniData, |
|||
|
|||
computed: {}, |
|||
|
|||
watch: { |
|||
projectId() { |
|||
let data = iniData(); |
|||
Object.keys(data).forEach((k) => { |
|||
this[k] = data[k]; |
|||
}); |
|||
this.getApiData(); |
|||
}, |
|||
// projectIdCopy () { |
|||
|
|||
// }, |
|||
}, |
|||
|
|||
mounted() { |
|||
console.log(this.projectIdCopy); |
|||
this.getApiData(); |
|||
}, |
|||
|
|||
methods: { |
|||
watchImg(src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
addStartGroupIndex() { |
|||
const { startGroupIndex, groupList } = this; |
|||
if (startGroupIndex < groupList.length - 9) { |
|||
this.startGroupIndex = startGroupIndex + 1; |
|||
} else { |
|||
this.startGroupIndex = groupList.length - 9; |
|||
} |
|||
}, |
|||
subStartGroupIndex() { |
|||
const { startGroupIndex, groupList } = this; |
|||
if (startGroupIndex > 0) { |
|||
this.startGroupIndex = startGroupIndex - 1; |
|||
} else { |
|||
this.startGroupIndex = 0; |
|||
} |
|||
}, |
|||
handleClose() { |
|||
this.$emit("close"); |
|||
}, |
|||
|
|||
async getApiData() { |
|||
await this.getProjectInfo(); |
|||
this.getProjectCate(); |
|||
this.getProjectProcess(); |
|||
if (this.projectInfo.origin === "issue") { |
|||
this.getIssueInfo(); |
|||
this.getIssueTrend(); |
|||
} else if (this.projectInfo.origin === "resi_event") { |
|||
this.getEventInfo(); |
|||
} |
|||
if (this.projectInfo.origin !== "agency") { |
|||
await this.getYanPan(); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getProjectInfo() { |
|||
const url = "/gov/project/trace/projectdetail"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.projectInfo = data; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getIssueInfo() { |
|||
const url = "/resi/hall/issue/detail"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueId: this.projectInfo.originId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.issueInfo = data; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getIssueTrend() { |
|||
const url = "/resi/hall/issue/votingtrend"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueId: this.projectInfo.originId, |
|||
}); |
|||
|
|||
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 getEventInfo() { |
|||
const url = "/gov/project/resievent/eventdetail-icdata"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
resiEventId: this.projectInfo.originId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
if (data.eventOrg && data.eventOrg.length > 0) { |
|||
data.eventOrgShow = data.eventOrg.join("、"); |
|||
} |
|||
if (data.eventPerson && data.eventPerson.length > 0) { |
|||
data.eventPersonShow = data.eventPerson.join("、"); |
|||
} |
|||
this.info = { ...data }; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getProjectProcess() { |
|||
const url = "/gov/project/trace/processlist-v2"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
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 getProjectCate() { |
|||
const url = "/gov/project/projectcategory/categorytaglist"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.projectCate = data.categoryList; |
|||
this.projectTag = data.tagList; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getYanPan() { |
|||
const url = "/data/aggregator/project/projectanalysis"; |
|||
|
|||
if (!this.userId) return (this.yanPan.loading = true); |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
categoryCodeList: this.categoryCodes, |
|||
userId: this.userId, |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
data.icResiUserId = data.icUserId; |
|||
data.homeUserList.forEach((item) => { |
|||
item.icResiUserId = item.icUserId; |
|||
}); |
|||
|
|||
let array1 = []; |
|||
let array2 = []; |
|||
|
|||
//楼院小组、居民上报都存在是,研判分析显示两个分支 |
|||
if ( |
|||
data.groupProjectList && |
|||
data.groupProjectList.length > 0 && |
|||
data.eventProjectList && |
|||
data.eventProjectList.length > 0 |
|||
) { |
|||
this.yanPan.hasEvent = true; |
|||
this.yanPan.singleTitle = "楼院小组"; |
|||
this.yanPan.moreTitle = "事件上报"; |
|||
array1 = [...data.groupProjectList]; |
|||
array2 = [...data.eventProjectList]; |
|||
} else { |
|||
this.yanPan.hasEvent = false; |
|||
if (data.groupProjectList && data.groupProjectList.length > 0) { |
|||
array1 = [...data.groupProjectList]; |
|||
this.yanPan.singleTitle = "楼院小组"; |
|||
} else if ( |
|||
data.eventProjectList && |
|||
data.eventProjectList.length > 0 |
|||
) { |
|||
array1 = [...data.eventProjectList]; |
|||
this.yanPan.singleTitle = "事件上报"; |
|||
} else { |
|||
array1 = []; |
|||
} |
|||
} |
|||
|
|||
if (array1.length > 0) { |
|||
data.singleList = array1.map((item) => { |
|||
return { |
|||
categoryCode: item.categoryCode, |
|||
categoryName: item.categoryName, |
|||
showItem: true, |
|||
projectList: item.projectList.map((subItem) => { |
|||
return { |
|||
title: subItem.title, |
|||
status: subItem.status, |
|||
statusName: subItem.status == "pending" ? "待处理" : "结案", |
|||
projectId: subItem.projectId, |
|||
}; |
|||
}), |
|||
}; |
|||
}); |
|||
} |
|||
if (array2.length > 0) { |
|||
data.moreList = array2.map((item) => { |
|||
return { |
|||
categoryCode: item.categoryCode, |
|||
categoryName: item.categoryName, |
|||
showItem: true, |
|||
projectList: item.projectList.map((subItem) => { |
|||
return { |
|||
title: subItem.title, |
|||
status: subItem.status, |
|||
statusName: subItem.status == "pending" ? "待处理" : "结案", |
|||
projectId: subItem.projectId, |
|||
}; |
|||
}), |
|||
}; |
|||
}); |
|||
} |
|||
|
|||
this.yanPan = { ...this.yanPan, ...data }; |
|||
console.log(this.yanPan); |
|||
this.yanPan.loading = true; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
toUserInfo(item) { |
|||
this.$router.push({ |
|||
path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`, |
|||
}); |
|||
}, |
|||
|
|||
toProjectInfo(item) { |
|||
console.log(item); |
|||
this.projectIdCopy = item.projectId; |
|||
// let data = iniData(); |
|||
// Object.keys(data).forEach((k) => { |
|||
// this[k] = data[k]; |
|||
// }); |
|||
this.getApiData(); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/visual/incident-info.scss" |
|||
scoped |
|||
></style> |
Loading…
Reference in new issue