Browse Source

人民建议征集

feature-bug
是小王呀\24601 1 year ago
parent
commit
bd7c41b6ed
  1. 4
      package.json
  2. 10
      src/router/index.js
  3. 443
      src/views/modules/shequzhili/peopleOpinons/cpts/eventDetail.vue
  4. 585
      src/views/modules/shequzhili/peopleOpinons/cpts/eventInfo.vue
  5. 358
      src/views/modules/shequzhili/peopleOpinons/cpts/process-form-designate.vue
  6. 286
      src/views/modules/shequzhili/peopleOpinons/cpts/process-form-replay-end.vue
  7. 211
      src/views/modules/shequzhili/peopleOpinons/cpts/process-form-replay.vue
  8. 207
      src/views/modules/shequzhili/peopleOpinons/cpts/process-form.vue
  9. 916
      src/views/modules/shequzhili/peopleOpinons/opinionsDaily.vue
  10. 402
      src/views/modules/shequzhili/solicitationSpecial/cpts/add.vue
  11. 918
      src/views/modules/shequzhili/solicitationSpecial/cpts/suggestionList.vue
  12. 661
      src/views/modules/shequzhili/solicitationSpecial/index.vue
  13. 407
      src/views/modules/workSys/icEventIdeaCategory/index.vue
  14. 407
      src/views/modules/workSys/ideaIdentity/index.vue

4
package.json

@ -7,8 +7,8 @@
"dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build:sit": "vue-cli-service build --mode production.sit",
"build:uat": "vue-cli-service build --mode production.uat",
"build:sit": "set NODE_OPTIONS=--max_old_space_size=4096 &&vue-cli-service build --mode production.sit",
"build:uat": "set NODE_OPTIONS=--max_old_space_size=4096 &&vue-cli-service build --mode production.uat",
"build:preview": "set NODE_OPTIONS=--max_old_space_size=4096 && vue-cli-service build --mode preview",
"build:prod": "vue-cli-service build --mode production",
"build:test": "set NODE_OPTIONS=--max_old_space_size=4096 && vue-cli-service build --mode test",

10
src/router/index.js

@ -178,6 +178,16 @@ export const moduleRoutes = {
title: "新增居民",
},
},
{
path: "suggestionList",
props: true,
name: "suggestionList",
component: () => import("@/views/modules/shequzhili/solicitationSpecial/cpts/suggestionList"),
meta: {
isTab: true,
title: "专题征集列表",
},
},
{
path: "edit-resi",
props: true,

443
src/views/modules/shequzhili/peopleOpinons/cpts/eventDetail.vue

@ -0,0 +1,443 @@
<template>
<div class="">
<el-card :style="containerStyle" :class="{ 'box-card': source === 'visiual' }" v-if="showType == ''">
<h3 v-if="source === 'manage'" class="h3-title">
<!-- <img src="../../../../../assets/images/index/title-icon-sqzl.png" width="30px" height="30px" alt="" /> -->
建议详情
</h3>
<div class="m-detail-main">
<div class="m-info">
<!-- <div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' }]">
<span class="u-info-title-2">所属网格</span>
<template v-if="!info.gridName">
<el-select v-model.trim="info.gridId" placeholder="请选择" clearable class="cell-width-1">
<el-option v-for="item in gridList" :key="item.value" :label="item.label"
:value="item.value" @click.native="$emit('handelCLickGridId',item)">
</el-option>
</el-select>
</template>
<template v-else>
<span>{{ info.gridName|| info.agencyName }}</span>
</template>
</div> -->
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">建议上报时间</span>
<span>{{ info.submitTime }}</span>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">征集领域</span>
<span>{{ info.typeCode }}</span>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">是否愿意公开</span>
<template slot-scope="scope">
<span v-if="scope.row.openFlag === 0" style="color: #ff6600;"></span>
<span v-else-if="scope.row.openFlag ===1"></span>
</template>
<span>{{info.eventContent==1?'是':'否'}}</span>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">意见标题</span>
<span>{{ info.subjectTitle }}</span>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">意见内容:</span>
<span>{{ info.eventContent }}</span>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]" >
<span class="u-info-title-2">意见文档:</span>
<el-button v-if="info.fileList.length!=0" size="small" type="primary" @click="onClickDown(info.fileList)">下载文件</el-button>
<!-- <span>{{ info.eventContent }}</span> -->
<!-- <div v-for="(item1,index) in info.fileList">
<div>{{item1[index]}}111111</div>
<div>111111</div>
</div> -->
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">建议人</span>
<span>{{ info.name }}</span>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">联系电话</span>
<span>{{ info.mobile }}</span>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]" v-if="info.demandType==='chengguan'">
<span class="u-info-title-2">有无责任单位</span>
<span>{{ info.responsibleUnit==="yes" ? "有": "无" }}</span>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]" v-if="info.responsibleUnit==='yes' && info.demandType==='chengguan'">
<span class="u-info-title-2">建议人</span>
<span>{{ info.responsibleName }}</span>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]" v-if="info.responsibleUnit==='yes' && info.demandType==='chengguan'">
<span class="u-info-title-2">建议人电话</span>
<span>{{ info.responsibleMobile }}</span>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]" >
<span class="u-info-title-2">建议人年龄</span>
<span>{{ info.age }}</span>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]" >
<span class="u-info-title-2">建议人身份</span>
<span>{{ ideaIdentityName }}</span>
</div>
<!-- <div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">证件号</span>
<span>{{ info.idCard ? info.idCard : "--" }}</span>
</div> -->
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">选为"金点子"建议:</span>
<!-- <span>{{info.goldenIdeaFlag==1?'是':'否'}}</span> -->
<el-switch v-model="info.goldenIdeaFlag" :active-value=1 :inactive-value=0
active-color="#13ce66" inactive-color="#c4c4c4" @change="sendValue">
</el-switch>
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">办理前</span>
<img :src="src" :key="src" style="width: 60px; height: 60px; padding-right: 10px"
v-for="src in info.dealBeforeImageList" @click="watchImg(src)" />
</div>
<div :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">办理后</span>
<img :src="src" :key="src" style="width: 60px; height: 60px; padding-right: 10px"
v-for="src in info.dealLateImageList" @click="watchImg(src)" />
</div>
<!-- <div v-if="info.operationType === '1'" :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">已立项</span>
<div class="line" @click="handleToProject"><i class="el-icon-view"></i> 查看项目</div>
</div>
<div v-if="info.operationType === '2'" :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">已转服务</span>
<div class="line"><i class="el-icon-check"></i></div>
</div>
<div v-if="info.operationType === '3'" :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">已转议题</span>
<div class="line" @click="handleToIssue">
<i class="el-icon-view"></i> 查看议题
</div>
</div>
<div v-if="info.satisfactionName" :class="[
'm-info-prop',
{ 'm-info-prop-vis': source === 'visiual' },
]">
<span class="u-info-title-2">满意度</span>
<div>{{ info.satisfactionName }}</div>
</div> -->
</div>
</div>
<!--
显示关闭
1状态=完成 (已评价)||(没评价&&不是本人)
2状态=未完成 有操作id -->
<!-- <div v-if="(info.status === 'processing' && info.operationId) ||
(info.status === 'closed_case' &&
(info.satisfactionName ||
(!info.satisfactionName && user.id != info.createdUserId)))
" class="div-btn-info">
<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";
function iniData() {
return {
ideaIdentityName:"",
ideaIdentityList:[],
user: {},
projectPageType: "info",
info: {},
eventDetailCopy: {},
showType: "",
satisfyLevel: "",
//
showSatisfy: false,
gridList: [], //list--
agencyId: '',
};
}
export default {
name: "issueInfo",
props: {
eventId: {
type: String,
default: "",
},
type: {
type: String,
default: "info",
},
eventDetailData: {
type: Object,
default() {
return {};
},
},
source: {
//manage visiual
type: String,
default: "manage",
},
},
components: {
// foldText,
// projectInfo,
},
data: iniData,
watch: {},
created() {
},
computed: {
containerStyle() {
if (this.type === 'info') {
return {
minHeight: 'calc(88vh - 50px)',
overflow: 'auto',
position: 'relative'
}
} else {
return {}
}
}
},
async mounted() {
this.user = this.$store.state.user;
if (this.eventId) {
this.info = JSON.parse(JSON.stringify(this.eventDetailData));
this.agencyId = this.info.agencyId
}
this.$EventBus.$on('handelInputEventContent', ({ type, value }) => {
if (type === 'opinion') {
this.info.transferAdvice = value;
} else if (type === 'handlingReq') {
this.info.handlingReq = value;
}
})
await this.getIdeaIdentityType()
this.loadGrid()
},
methods: {
async getIdeaIdentityType() {
const url = "/sys/dict/data/dictlist";
const params = {
dictType: "ideaIdentityType",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.ideaIdentityList = data || [];
const labels = await this.info.identityTypeCodeList.map(code => {
const item = this.ideaIdentityList.find(d => d.value === code);
return item ? item.label : null;
}).filter(label => label !== null); // label
this.ideaIdentityName = labels.toString()
} else {
this.$message.error(msg);
}
},
onClickDown(data){
data.forEach((item) => {
console.log(item,"奥特玛");
window.open(item, '_blank');
});
},
async loadGrid() {
const url = "/gov/org/customergrid/gridoption";
let params = {
agencyId: this.agencyId,
purpose: "query",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.gridList = data;
} else {
this.$message.error(msg);
}
},
sendValue() {
let url="/governance/icEventOld/update"
const params = {
goldenIdeaFlag: this.info.goldenIdeaFlag,
icEventId: this.info.icEventId
}
requestPost(url, params).then(res=>{
if (res.code === 0) {
this.$message.success("设置成功");
} else {
this.$message.error(msg);
}
});
// this.$emit('update-value', this.info); //
},
watchImg(src) {
window.open(src);
},
handleClose() {
this.showType = "";
},
handleCloseEvent() {
this.$emit("handleClose");
},
async getApiData() { },
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/shequzhili/event-info.scss";
.flex-end {
display: flex;
margin-bottom: 10px;
justify-content: flex-end;
}
.m-info {
padding-left: 0px !important;
.flex {
display: flex;
flex-direction: column;
background-color: #ebedf0;
padding: 0 1px 1px 0;
box-sizing: border-box;
.item {
display: flex;
justify-content: space-around;
width: 100%;
min-height: 30px;
line-height: 30px;
padding: 0;
&>div {
background-color: #fff;
min-width: 25%;
margin-left: 1px;
margin-top: 1px;
text-indent: 1em;
display: flex;
align-items: center;
}
&:nth-child(4) {
margin-right: 1px;
}
.border-right {
position: relative;
&::after {
content: '';
width: 1px;
height: 29px;
background: #ebedf0;
position: absolute;
right: 3px;
top: 0;
}
}
.flex-1 {
flex: 1;
}
}
}
}
.m-info-prop {
margin: 25px 0 !important;
padding-left: 0px !important;
&::before {
content: "";
display: block;
position: absolute;
top: 9px;
left: 0;
width: 7px;
height: 7px;
background: none !important;
border-radius: 3px;
margin-right: 10px;
}
}
</style>

585
src/views/modules/shequzhili/peopleOpinons/cpts/eventInfo.vue

@ -0,0 +1,585 @@
<template>
<div class="">
<div v-if="pageTypeCopy == 'dispose' || pageTypeCopy == 'info' || pageTypeCopy == 'assign'|| pageTypeCopy == 'check' || pageTypeCopy == 'return'" class="g-page">
<!-- 面包屑放到这里-->
<div class="tabs" @click="handleClose">
<i class="el-icon-arrow-left"></i>
<el-button class="diy-button--white" style="height: 20px">
查看详情111</el-button>
</div>
<div :class="['g-total', { 'g-left': projectProcess.length > 0, 'g-left-top40': pageType == 'info' }]"
style="z-index: 1;">
<event-detail ref="ref_detail" @update-value="handleValue" :type="pageType" :eventId="eventId" :eventDetailData="eventDetailData"
:eventDetailDatasource="source" @handleToProject="handleToProject" @handleToDemand="handleToDemand"
@handleToIssue="handleToIssue" @handleClose="handleClose"></event-detail>
<div class="process-form" v-if="pageTypeCopy == 'dispose' || pageTypeCopy == 'assign' ||pageTypeCopy == 'check' ||pageTypeCopy == 'return'">
<el-card :class="{ 'box-card': source === 'visiual' }">
<div :class="['process-title', { 'process-title-vis': source === 'visiual' },]">
<!-- <img src="../../../../../assets/images/index/title-icon-chuli.png" width="30px"
height="30px" alt=""> -->
{{ pageTypeCopy === 'assign' ? '指派' : pageTypeCopy === 'return' ? '退件' :'办理' }}
</div>
<process-form ref="ref_processinfo_dispose" :source="source" :eventId="eventId"
:eventDetailData="eventDetailData" :pageType="pageTypeCopy" :replayDetailObj="replayDetailObj"></process-form>
<div class="div-btn" style="z-index: 10;">
<el-button size="small" @click="handleClose">关闭</el-button>
<el-button style="margin-left: 20px" type="primary" size="small"
@click="handleComfirm">{{this.pageType=="assign"?"确认指派":"保存"}}</el-button>
</div>
</el-card>
</div>
</div>
<div :class="['g-right', pageType == 'info' ? 'g-right-top40' : '']">
<el-card :class="{ 'box-card': source === 'visiual' }"
style="min-height: calc(88vh - 50px); overflow: auto">
<div class="m-process">
<div :class="['process-title', { 'process-title-vis': source === 'visiual' },]">
<!-- <img src="../../../../../assets/images/index/title-icon-cljz.png" width="30px" height="30px"
alt="" /> -->
办理进展
</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">
<!-- <template v-if="item.agencyId">
<div class="name">指派</div>
</template>
<template v-else>
<div class="name">{{ item.processName }}</div>
</template> -->
<template>
<div class="name">{{ (item.processName!=null && item.processName!='')?item.processName:'办理中' }}</div>
</template>
<div class="date">
{{ item.processTime }}
</div>
</div>
<div v-if="item.type === 'event'">
<template v-if="item.agencyId">
<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.agencyName }}</div>
</div>
<div class="detail">
<div class="detail-field">转办意见</div>
<div class="detail-value">{{ item.publicReply }}</div>
</div>
<div class="detail" >
<div class="detail-field">响应时限</div>
<div class="detail-value">{{ item.contactTime }}</div>
</div>
<div class="detail">
<div class="detail-field">办结时限</div>
<div class="detail-value">{{ formTimeLimit(item.timeLimit) }}</div>
</div>
<div class="detail" v-if="item.examineContent">
<div class="detail-field">备注说明</div>
<div class="detail-value">{{ item.examineContent }}</div>
</div>
<template v-if="item.internalFile && item.internalFile.length > 0"
v-for="i in item.internalFile">
<template v-if="i.attachmentType === 'image'">
<div class="detail">
<div class="detail-field">图片</div>
<div
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<img :src="i.attachmentUrl" :key="i.attachmentUrl"
style="width: 50px; height: 50px; padding-right: 10px"
@click="watchImg(i.attachmentUrl)" />
</div>
</div>
</template>
<template v-if="i.type === 'voice'">
<div class="detail">
<div class="detail-field">录音</div>
<div
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<audio controls>
<source :src="i.url" type="" :key="i.url" />
</audio>
</div>
</div>
</template>
<template v-if="i.type === 'doc'">
<div class="detail">
<div class="detail-field">附件</div>
<div
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<a :href="i.url">{{ i.name }}</a>
</div>
</div>
</template>
</template>
</template>
<template v-else>
<div class="detail">
<div class="detail-field">操作人</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail" v-if="item.processName!='已退件'&&item.processName!='已审核归档'">
<div class="detail-field">办理说明</div>
<div class="detail-value">{{ item.publicReply }}</div>
</div>
<div class="detail" v-if="item.respondent">
<div class="detail-field">答复人</div>
<div class="detail-value">{{ item.respondent }}</div>
</div>
<div class="detail" v-if="item.respondentPhone">
<div class="detail-field">答复电话</div>
<div class="detail-value">{{ item.respondentPhone }}</div>
</div>
<div class="detail" v-if="item.processName=='已办结'&&item.solveState!==''&&item.solveState!==null">
<div class="detail-field">问题解决情况</div>
<div class="detail-value">{{ solveState.find(v => v.value ==item.solveState).label }}</div>
</div>
<div class="detail" v-if="item.processName=='已办结'&&item.solveEstimated!==''">
<div class="detail-field">预计解决时间</div>
<div class="detail-value">{{ item.solveEstimated }}</div>
</div>
<div class="detail" v-if="item.timeLimit">
<div class="detail-field">办结时限</div>
<div class="detail-value">{{ formTimeLimit(item.timeLimit) }}</div>
</div>
<div class="detail" v-if="item.processName==='已审核归档'&&item.examine!==''&&item.examine!==null">
<div class="detail-field">审核结果</div>
<div class="detail-value">{{ examine.find(v => v.value ==item.examine).label }}</div>
</div>
<div class="detail" v-if="item.examineContent">
<div class="detail-field">备注说明</div>
<div class="detail-value">{{ item.examineContent }}</div>
</div>
<div class="detail" v-if="item.confirmSolved!==''&&item.confirmSolved!==null&&item.processName==='已审核归档'">
<div class="detail-field">问题是否已解决</div>
<div class="detail-value">{{ confirmSolved.find(v => v.value ==item.confirmSolved).label }}</div>
</div>
<div class="detail" v-if="item.satisfactionResult!==''&&item.satisfactionResult!==null&&item.processName==='已审核归档'">
<div class="detail-field">回访满意度结果</div>
<div class="detail-value">{{ satisfactionResult.find(v => v.value ==item.satisfactionResult).label }}</div>
</div>
<div class="detail" v-if="item.processName==='已退件'">
<div class="detail-field">是否已联系</div>
<div class="detail-value">{{ item.returnLoseContact===1?'已联系当事人':'未联系当事人' }}</div>
</div>
<div class="detail" v-if="item.processName==='已退件'">
<div class="detail-field">建议办理部门</div>
<div class="detail-value">{{ item.returnSuggestDeptName }}</div>
</div>
<div class="detail" v-if="item.processName==='已退件'">
<div class="detail-field">退件原因</div>
<div class="detail-value">{{ item.returnReason }}</div>
</div>
<div class="detail" v-if="item.irregularity!==''&&item.irregularity!==null&&item.irregularity!==''&&item.irregularity!==null">
<div class="detail-field">填报不合规诉求</div>
<div class="detail-value">{{ irregularity.find(v => v.value ==item.irregularity).label }}</div>
</div>
<div class="detail" v-if="item.nonComplianceType!==''&&item.nonComplianceType!==null&&item.irregularity!==''&&item.irregularity!==null">
<div class="detail-field">不合规诉求类型</div>
<div class="detail-value">{{ nonComplianceType.find(v => v.value ==item.nonComplianceType).label }}</div>
</div>
<div class="detail" v-if="item.irregularity!==''&&item.irregularity!==null">
<div class="detail-field">不合规诉求说明</div>
<div class="detail-value">{{ item.nonComplianceNote }}</div>
</div>
<template v-if="item.internalFile && item.internalFile.length > 0"
v-for="i in item.internalFile">
<template v-if="i.attachmentType === 'image'">
<div
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">图片</span>
<img :src="i.attachmentUrl" :key="i.attachmentUrl"
style="width: 150px; height: 150px; padding-right: 10px"
@click="watchImg(i.attachmentUrl)" />
</div>
</template>
<template v-if="i.attachmentType === 'voice' || i.attachmentType === 'video'">
<div
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">录音</span>
<audio controls>
<source :src="i.attachmentUrl" type="" :key="i.attachmentUrl" />
</audio>
</div>
</template>
<template v-if="i.attachmentType === 'doc'">
<div
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">录音</span>
<audio controls>
<source :src="i.attachmentUrl" type="" :key="i.attachmentUrl" />
</audio>
</div>
</template>
</template>
</template>
</div>
</div>
</div>
</div>
</el-card>
</div>
</div>
</div>
</template>
<script>
import { examine, confirmSolved, satisfactionResult, solveState, irregularity, nonComplianceType } from "@/js/columns/constants";
import { requestPost,requestGet } from "@/js/dai/request";
import { Loading } from "element-ui"; // Loading
import foldText from "@/views/components/foldText";
// import projectInfoOrigin from "../../xiangmu/cpts/project-info";
import demandInfoOrigin from "@/views/modules/communityService/measure/info";
// import issueInfoOrigin from "../../issue/cpts/issue-info";
import dateFormat from "dai-js/tools/dateFormat";
// import eventAdd from "./add";
import eventDetail from "./eventDetail";
import processForm from "./process-form";
let loading; //
function iniData() {
return {
formData: {
operationType: "",
},
eventInfoData: {},
examine: [],
confirmSolved: [],
satisfactionResult: [],
solveState: [],
irregularity: [],
nonComplianceType: [],
replayInfo: {},
demand: {},
project: {},
issueInfo: {},
//
demandUserId: "",
demandUserName: "",
demandUserMobile: "",
gridId: "",
eventDetailCopy: {},
projectProcess: [],
projectPageType: "info",
pageTypeCopy: "",
issuePageType: "",
issueDetailData: {},
sourceType: "",
goldenIdeaFlag:'',
level: '',
replayDetailObj:{},
newgoldList:{}
};
}
export default {
name: "projectInfo",
props: {
eventId: {
type: String,
default: "",
},
pageType: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default() {
return {};
},
},
source: {
//manage visiual
type: String,
default: "manage",
},
},
components: {
// foldText,
// eventAdd,
eventDetail,
processForm,
// projectInfoOrigin,
// demandInfoOrigin,
// issueInfoOrigin,
},
data: iniData,
computed: {},
watch: {
eventId() {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
// this.getApiData();
},
},
created() {
console.log(this.pageType,"sdlkfjlk");
console.log(this.eventDetailData,"sdjfg;lsjdg");
this.examine = examine
this.confirmSolved = confirmSolved
this.satisfactionResult = satisfactionResult
this.solveState = solveState
this.irregularity = irregularity
this.nonComplianceType = nonComplianceType
if(this.pageType === 'check'){
this.replayDetail()
}
this.pageTypeCopy = this.pageType;
this.getProjectProcess();
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
}
},
mounted() {
},
methods: {
handleValue(val) {
console.log(val,"ds;lfk;dfl ");
this.newgoldList=val
if (val.goldenIdeaFlag) {
this.goldenIdeaFlag=1
}else{
this.goldenIdeaFlag=0
}
},
changeName(val) {
this.demandUserName = val;
},
changeMobile(val) {
this.demandUserMobile = val;
},
changeUserId(val) {
this.demandUserId = val;
},
changeGridId(val) {
this.gridId = val;
},
changeLevel(val) {
this.level = val;
},
watchImg(src) {
window.open(src);
},
//
async getProjectProcess() {
const url = "/governance/icEventOld/process";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
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);
}
},
formTimeLimit(val) {
return dateFormat(
new Date(val * 1000),
"yyyy-MM-dd hh:mm"
);
},
getEventInfo() {
this.$refs.ref_add.getEventInfo();
if (this.$refs.ref_add.okflag) {
this.eventInfoData = this.$refs.ref_add.formData;
} else {
return false;
}
},
async handleComfirm() {
this.startLoading();
if (this.pageTypeCopy === "dispose" ||this.pageTypeCopy === "assign" || this.pageTypeCopy === "check" || this.pageTypeCopy === "return" ) {
await this.handelDispose();
}
this.endLoading();
},
async handelDispose() {
console.log("handelDispose......");
console.log("okflag:"+this.$refs.ref_processinfo_dispose.okflag);
this.$refs.ref_processinfo_dispose.getProcessInfo();
if (this.$refs.ref_processinfo_dispose.okflag) {
this.formData.operationType = this.$refs.ref_processinfo_dispose.operationType;
this.replayInfo = this.$refs.ref_processinfo_dispose.replayInfo;
this.replayInfo.icEventId = this.eventId;
this.replayInfo.eventId = this.eventId;
await this.submitDispose('/governance/icEventOld/reply', this.replayInfo);
} else {
return false;
}
},
async submitDispose(url, params) {
console.log(params,"lknnkjk");
const { data, code, msg } = await requestPost(url, {
...params,
});
if (code === 0) {
// await this.icEventOldupdate('/governance/icEventOld/update')
this.$message.success("操作成功!");
this.$emit("handleOk");
} else {
this.$message.error(msg);
}
},
async icEventOldupdate(url) {
console.log("sdfl;sdm.fm ",this.eventId);
const params={
goldenIdeaFlag:this.goldenIdeaFlag,
icEventId:this.newgoldList.icEventId
}
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
} else {
this.$message.error(msg);
}
},
handleClose() {
if (this.pageTypeCopy === "add") {
this.eventInfo = this.$refs.ref_add.resetData();
}
this.$emit("handleClose");
},
handleToProject(type) {
if (this.eventDetailCopy.status === "processing") {
this.projectPageType = "edit";
} else {
this.projectPageType = "info";
}
this.sourceType = "event";
this.pageTypeCopy = "project";
},
handleToDemand() {
// if (this.eventDetailCopy.status === 'processing') {
// this.projectPageType = 'edit'
// } else {
// this.projectPageType = 'info'
// }
this.pageTypeCopy = "demand";
},
async handleToIssue() {
const url = "/governance/manage/votingissuedetail";
const { data, code, msg } = await requestPost(url, {
issueId: this.eventDetailCopy.operationId,
});
if (code === 0) {
this.issueDetailData = { ...data };
} else {
this.$message.error(msg);
}
if (this.issueDetailData.issueStatus === "voting") {
this.issuePageType = "dispose";
} else {
this.issuePageType = "info";
}
this.pageTypeCopy = "issue";
},
handleCloseProject() {
this.getProjectProcess();
this.pageTypeCopy = "info";
},
async replayDetail(){
console.log(this.eventDetailCopy);
const url = `/governance/icEvent/replayDetail/${this.eventDetailData.icEventId}`;
const { data, code, msg } = await requestGet(url);
if (code === 0) {
this.replayDetailObj = { ...data };
console.log(this.replayDetailObj,'seeeee');
} else {
this.$message.error(msg);
}
},
//
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";
.tabs {
position: absolute;
margin-left: 30px;
height: 50px;
line-height: 50px;
.diy-button--white {
border: none !important;
color: rgba(0, 0, 0, 0.65) !important;
height: 30px !important;
padding: 0 12px !important;
margin-left: 10px;
}
}
.list {
&> :last-child {
border: none !important;
}
&> :first-child {
.name {
// background: url("../../../../../assets/images/index/bubble.png") no-repeat;
color: #fff !important;
padding: 0px 10px 3px 13px !important;
background-size: 100% 100%;
border: none !important;
}
}
}
.g-left-top40 {
margin-top: 40px;
}
.g-right-top40 {
margin-top: 40px;
}
</style>

358
src/views/modules/shequzhili/peopleOpinons/cpts/process-form-designate.vue

@ -0,0 +1,358 @@
<!--
* @Author: yanLu xgktv007@163.com
* @Date: 2023-09-05 10:21:34
* @LastEditors: mk 2403457699@qq.com
* @LastEditTime: 2024-01-09 13:55:37
* @Description: 事件转办表单
*
-->
<template>
<div class="search">
<el-form ref="ref_form5" :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.trim="selCategoryArray" :key="iscascaderShow"
:options="casOptions" :props="optionProps" :show-all-levels="false" clearable
@change="handleChangeCate"></el-cascader>
</div>
</el-form-item>
<el-form-item label="处理部门" prop="deptId" label-width="150px" :class="{ 'form-item': source === 'visiual' }">
<el-cascader class="cell-width-2" ref="agencyIdArray" v-model.trim="agencyIdArray" :options="orgOptions"
:props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency"></el-cascader>
</el-form-item>
<el-form-item label="转办意见" prop="content" label-width="150px" :class="{ 'form-item': source === 'visiual' }"
style="display: block">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input class="cell-width-area" type="textarea" maxlength="500" show-word-limit :rows="5"
placeholder="请输入转办意见,不超过500字" v-model.trim="formData.content"></el-input>
</div>
</el-form-item>
<el-form-item style="display: block" label="附件" label-width="150px" prop="attach">
<el-upload :headers="$getElUploadHeaders()" class="upload-demo" :action="uploadUlr"
accept=".doc,.pdf,.xls,.docx,.xlsx,.jpg,.png,.jpeg,.bmp,.mp4,.wma,.m4a,.mp3"
:on-success="handleFileSuccess" :on-remove="handleFileRemove" :on-preview="handleFileDownload"
:limit="3" :before-upload="beforeUpload" :file-list="fileList">
<el-button size="small" :disabled="fileList.length === 3" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">支持图片wordpdf</div>
</el-upload>
</el-form-item>
<el-form-item label="办结时限" prop="timeLimit" label-width="150px" :class="{ 'form-item': source === 'visiual' }"
style="display: block">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-date-picker v-model.trim="formData.timeLimit" class="cell-width-1" type="datetime" placeholder="办结时限"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</div>
</el-form-item>
<el-form-item label="" label-width="150px"
:class="{ 'form-item': source === 'visiual' }" style="display: block">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-checkbox v-model="formData.sendMsg" :true-label="1" :false-label="0">短信通知部门负责人</el-checkbox>
</div>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
let loading; //
export default {
data() {
return {
btnDisable: false,
formData: {
operationType: "5", //[0: 5 6]
content: "",//
timeLimit: "",//
categoryId: "",//
deptId: "", //
deptName: "",
sendMsg:1,
categoryList: [],
files: [] //
},
orgOptions: [],
orgOptionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
agencyIdArray: [],
status: false,
okflag: false,
eventDetailCopy: {},
selCategoryArray: [],
casOptions: [],
fileList: [],
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile",
iscascaderShow: 0,
optionProps: {
multiple: false,
value: "id",
label: "categoryName",
children: "children",
checkStrictly: true
},
dataRule: {
content: [
{ required: true, message: "回复内容不能为空", trigger: "blur" },
],
categoryId: [
{ required: true, message: "事件分类不能为空", trigger: "blur" },
],
deptId: [
{ required: true, message: "处理部门不能为空", trigger: "blur" },
],
timeLimit: [
{ required: true, message: "办结时限不能为空", trigger: "blur" },
],
categoryList: [
{ required: true, message: '事件分类不能为空', trigger: 'blur' },
]
},
selCateObj: {
id: ""
},
};
},
components: {},
computed: {},
props: {
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default() {
return {};
},
},
source: {
//manage visiual
type: String,
default: "manage",
},
},
created() {
},
async mounted() {
const { user } = this.$store.state;
this.agencyId = user.agencyId;
this.getOrgTreeList();
this.getCategoryList();
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
// eventDetailCopy
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) {
this.selCategoryArray = this.eventDetailCopy.parentCategoryId.split(",");
this.selCategoryArray.push(this.eventDetailCopy.categoryId);
this.handleChangeCate(this.selCategoryArray)
}
}
},
methods: {
//
async getOrgTreeList() {
const url = "/gov/org/customeragency/agencyGridDepttree"
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 getCategoryList() {
const url = '/governance/icEvent/getCategoryTree';
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
let treeDataNew = this.deepTree(data, "children");
++this.iscascaderShow;
this.casOptions = [];
this.casOptions = treeDataNew;
} else {
this.$message.error(msg);
}
if (this.eventDetailCopy.parentCategoryId) {
const pids = this.eventDetailCopy.parentCategoryId.split(',');
pids.push(this.eventDetailCopy.categoryId);
let nodes = this.casOptions;
for (let i = 0; i < pids.length; i++) {
nodes = this.buildNode(nodes, pids[i])
}
if (nodes) {
this.formData.categoryList.push(nodes)
this.selCateObj = nodes
}
}
},
buildNode(nodes, treeId) {
for (let i = 0; i < nodes.length; i++) {
if (nodes[i].id === treeId) {
if (nodes[i].children) {
return nodes[i].children
} else {
return nodes[i]
}
}
}
},
handleChangeAgency(val) {
let obj = this.$refs["agencyIdArray"].getCheckedNodes()[0].data
if (obj) {
this.formData.level = obj.level === 'grid' ? 'grid' : 'agency'
this.formData.deptId = obj.agencyId
this.formData.deptName = obj.agencyName
} else {
this.form.level = ''
this.form.orgId = ''
}
},
handleChangeCate() {
if (this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0]) {
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
this.formData.categoryList = this.selCateObj
this.formData.categoryId = this.selCateObj.id
} else {
this.selCateObj = {}
}
},
//
deepTree(arr, children) {
if (Array.isArray(arr) && arr.length > 0) {
return arr.map((item) => {
return {
...item,
[children]:
(item[children] &&
item[children].length > 0 &&
this.deepTree(item[children], children)) ||
null,
};
});
}
},
async getReplayInfo() {
this.okflag = false;
this.$refs["ref_form5"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
if (!this.selCateObj || !this.selCateObj.id) {
this.$message.error("请选择事件分类");
return false;
}
if (this.fileList) {
this.formData.files = this.fileList
}
this.operationType = '5'
this.formData.status = "processing";
this.formData.categoryId = this.selCateObj.id;
this.formData.categoryList = [];
this.formData.categoryList.push(this.selCateObj);
this.okflag = true;
}
});
},
resetData() {
this.agencyIdArray = []
},
beforeUpload(file) {
const array = file.name.split(".");
const extension = array[array.length - 1];
const formatarray = [
"jpg",
"png",
"jpeg",
"bmp",
"mp4",
"wma",
"m4a",
"mp3",
"doc",
"docx",
"xls",
"xlsx",
"pdf",
];
if (formatarray.indexOf(extension) === -1) {
this.$message.error("只支持图片、word、pdf");
return false;
}
},
handleFileRemove(file) {
if (file && file.status === "success") {
this.fileList.splice(
this.fileList.findIndex((item) => item.uid === file.uid),
1
);
}
},
handleFileSuccess(res, file) {
if (res.code === 0 && res.msg === "success") {
const array = file.name.split(".");
const fileType = array[array.length - 1];
const picArray = ["jpg", "png", "jpeg", "bmp"];
const videoarray = ["mp4", "wma", "m4a"];
const docArray = ["doc", "docx", "xls", "xlsx", "pdf"];
const mp3Array = ["mp3"];
if (picArray.indexOf(fileType) > -1) {
file.attachmentFormat = "image";
} else if (videoarray.indexOf(fileType) > -1) {
file.attachmentFormat = "video";
} else if (docArray.indexOf(fileType) > -1) {
file.attachmentFormat = "doc";
} else if (mp3Array.indexOf(fileType) > -1) {
file.attachmentFormat = "voice";
}
file.url = res.data.url;
file.type = fileType;
file.attachmentName = file.name;
file.attachmentType = file.type;
file.attachmentUrl = file.url;
this.fileList.push(file);
} else this.$message.error(res.msg);
},
//
handleFileDownload(file) {
var a = document.createElement("a");
var event = new MouseEvent("click");
a.download = file.name;
a.href = file.url;
a.dispatchEvent(event);
},
//
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";
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

286
src/views/modules/shequzhili/peopleOpinons/cpts/process-form-replay-end.vue

@ -0,0 +1,286 @@
<!--
* @Author: yanLu xgktv007@163.com
* @Date: 2023-09-05 10:21:34
* @LastEditors: mk 2403457699@qq.com
* @LastEditTime: 2023-11-02 18:42:22
* @Description: 事件回复
*
*
-->
<template>
<div class="search">
<el-form ref="ref_form2" :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.trim="selCategoryArray" :key="iscascaderShow"
:options="casOptions" :props="optionProps" :show-all-levels="false" clearable
@change="handleChangeCate"></el-cascader>
</div>
</el-form-item>
<el-form-item label="回复内容" prop="content" label-width="150px" :class="{ 'form-item': source === 'visiual' }"
style="display: block">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input class="cell-width-area" type="textarea" maxlength="500" show-word-limit :rows="5"
placeholder="请输入回复内容,不超过500字" v-model.trim="formData.content"></el-input>
</div>
</el-form-item>
<el-form-item style="display: block" label="附件" label-width="150px" prop="attach">
<el-upload :headers="$getElUploadHeaders()" class="upload-demo" :action="uploadUlr"
accept=".doc,.pdf,.xls,.docx,.xlsx,.jpg,.png,.jpeg,.bmp,.mp4,.wma,.m4a,.mp3"
:on-success="handleFileSuccess" :on-remove="handleFileRemove" :on-preview="handleFileDownload"
:limit="3" :before-upload="beforeUpload" :file-list="fileList">
<el-button size="small" :disabled="fileList.length === 3" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">支持图片wordpdf</div>
</el-upload>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
let loading; //
export default {
data() {
return {
btnDisable: false,
formData: {
operationType: '6', //[0: 5 6]
content: '',
status: 'closed_case',
categoryList: [],
files: []
},
status: false,
okflag: false,
eventDetailCopy: {},
selCategoryArray: [],
casOptions: [],
fileList: [],
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile",
iscascaderShow: 0,
optionProps: {
multiple: false,
value: "id",
label: "categoryName",
children: "children",
checkStrictly: true
},
dataRule: {
content: [
{ required: true, message: '回复内容不能为空', trigger: 'blur' },
],
categoryList: [
{ required: true, message: '事件分类不能为空', trigger: 'blur' },
]
}
};
},
components: {},
computed: {},
props: {
eventId: {
type: String,
default: '',
},
eventDetailData: {
type: Object,
default() {
return {};
},
},
source: {
//manage visiual
type: String,
default: 'manage',
},
},
watch: {},
created() { },
async mounted() {
this.getCategoryList();
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
// eventDetailCopy
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) {
this.selCategoryArray = this.eventDetailCopy.parentCategoryId.split(",");
this.selCategoryArray.push(this.eventDetailCopy.categoryId);
this.handleChangeCate(this.selCategoryArray)
}
}
},
methods: {
async getCategoryList() {
const url = '/governance/icEvent/getCategoryTree';
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
let treeDataNew = this.deepTree(data, "children");
//
++this.iscascaderShow;
this.casOptions = [];
this.casOptions = treeDataNew;
} else {
this.$message.error(msg);
}
if (this.eventDetailCopy.parentCategoryId) {
const pids = this.eventDetailCopy.parentCategoryId.split(',');
pids.push(this.eventDetailCopy.categoryId);
let nodes = this.casOptions;
for (let i = 0; i < pids.length; i++) {
nodes = this.buildNode(nodes, pids[i])
}
if (nodes) {
this.formData.categoryList.push(nodes)
}
}
},
buildNode(nodes, treeId) {
for (let i = 0; i < nodes.length; i++) {
if (nodes[i].id === treeId) {
if (nodes[i].children) {
return nodes[i].children
} else {
return nodes[i]
}
}
}
},
handleChangeCate() {
if (this.selCateObj = this.$refs['myCascader'].getCheckedNodes()[0]) {
this.selCateObj = this.$refs['myCascader'].getCheckedNodes()[0].data
this.formData.categoryList = this.selCateObj
} else {
this.selCateObj = {}
}
},
//
deepTree(arr, children) {
if (Array.isArray(arr) && arr.length > 0) {
return arr.map((item) => {
return {
...item,
[children]:
(item[children] &&
item[children].length > 0 &&
this.deepTree(item[children], children)) ||
null,
};
});
}
},
async getReplayInfo() {
this.okflag = false;
this.$refs['ref_form2'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
if (this.status) {
if (!this.selCateObj || !this.selCateObj.id) {
this.$message.error('请选择事件分类');
return false;
}
}
if (!this.formData.categoryId) {
this.formData.categoryId = this.selCateObj.id;
}
if (this.fileList) {
this.formData.files = this.fileList
}
this.formData.categoryList = [];
this.formData.categoryList.push(this.selCateObj);
this.okflag = true;
}
});
},
resetData() { },
beforeUpload(file) {
const array = file.name.split(".");
const extension = array[array.length - 1];
const formatarray = [
"jpg",
"png",
"jpeg",
"bmp",
"mp4",
"wma",
"m4a",
"mp3",
"doc",
"docx",
"xls",
"xlsx",
"pdf",
];
if (formatarray.indexOf(extension) === -1) {
this.$message.error("只支持图片、word、pdf");
return false;
}
},
handleFileRemove(file) {
if (file && file.status === "success") {
this.fileList.splice(
this.fileList.findIndex((item) => item.uid === file.uid),
1
);
}
},
handleFileSuccess(res, file) {
if (res.code === 0 && res.msg === "success") {
const array = file.name.split(".");
const fileType = array[array.length - 1];
const picArray = ["jpg", "png", "jpeg", "bmp"];
const videoarray = ["mp4", "wma", "m4a"];
const docArray = ["doc", "docx", "xls", "xlsx", "pdf"];
const mp3Array = ["mp3"];
if (picArray.indexOf(fileType) > -1) {
file.attachmentFormat = "image";
} else if (videoarray.indexOf(fileType) > -1) {
file.attachmentFormat = "video";
} else if (docArray.indexOf(fileType) > -1) {
file.attachmentFormat = "doc";
} else if (mp3Array.indexOf(fileType) > -1) {
file.attachmentFormat = "voice";
}
file.url = res.data.url;
file.type = fileType;
file.attachmentName = file.name;
file.attachmentType = file.type;
file.attachmentUrl = file.url;
this.fileList.push(file);
} else this.$message.error(res.msg);
},
//
handleFileDownload(file) {
var a = document.createElement("a");
var event = new MouseEvent("click");
a.download = file.name;
a.href = file.url;
a.dispatchEvent(event);
},
//
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';
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

211
src/views/modules/shequzhili/peopleOpinons/cpts/process-form-replay.vue

@ -0,0 +1,211 @@
<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.trim="selCategoryArray" :key="iscascaderShow"
:options="casOptions" :props="optionProps" :show-all-levels="false" clearable
@change="handleChangeCate"></el-cascader>
</div>
</el-form-item>
<el-form-item label="回复内容" prop="content" label-width="150px" :class="{ 'form-item': source === 'visiual' }"
style="display: block">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input class="cell-width-area" type="textarea" maxlength="500" show-word-limit :rows="5"
placeholder="请输入回复内容,不超过500字" v-model.trim="formData.content"></el-input>
</div>
</el-form-item>
<el-form-item label="办结时限" prop="timeLimit" label-width="150px" :class="{ 'form-item': source === 'visiual' }"
style="display: block">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-date-picker v-model.trim="formData.timeLimit" class="cell-width-1" type="datetime" placeholder="办结时限"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</div>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
let loading; //
export default {
data() {
return {
btnDisable: false,
formData: {
operationType: '0', //[0: 5 6]
content: '',
status: 'processing',
timeLimit: '',//
categoryList: [],
},
status: false,
okflag: false,
eventDetailCopy: {},
selCategoryArray: [],
casOptions: [],
iscascaderShow: 0,
optionProps: {
value: "id",
label: "categoryName",
children: "children",
level: 'categoryType',
checkStrictly: true
},
dataRule: {
content: [
{ required: true, message: '回复内容不能为空', trigger: 'blur' },
],
categoryList: [
{ required: true, message: '事件分类不能为空', trigger: 'blur' },
],
timeLimit: [
{ required: true, message: "办结时限不能为空", trigger: "blur" },
]
}
};
},
components: {},
computed: {},
props: {
eventId: {
type: String,
default: '',
},
eventDetailData: {
type: Object,
default() {
return {};
},
},
source: {
//manage visiual
type: String,
default: 'manage',
},
},
watch: {
},
created() {
},
async mounted() {
this.getCategoryList();
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
if(this.eventDetailCopy.parentCategoryId){
let value = this.eventDetailCopy.parentCategoryId.split(",");
value.push(this.eventDetailCopy.categoryId);
this.handleChangeCate(value)
}
}
},
methods: {
async getCategoryList() {
const url = '/governance/icEvent/getCategoryTree';
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
let treeDataNew = this.deepTree(data, "children");
//
++this.iscascaderShow;
this.casOptions = [];
this.casOptions = treeDataNew;
} else {
this.$message.error(msg);
}
if (this.eventDetailCopy.parentCategoryId) {
const pids = this.eventDetailCopy.parentCategoryId.split(',');
pids.push(this.eventDetailCopy.categoryId);
let nodes = this.casOptions;
for (let i = 0; i < pids.length; i++) {
nodes = this.buildNode(nodes, pids[i])
}
if (nodes) {
this.formData.categoryList.push(nodes)
}
}
},
buildNode(nodes, treeId) {
for (let i = 0; i < nodes.length; i++) {
if (nodes[i].id === treeId) {
if (nodes[i].children) {
return nodes[i].children
} else {
return nodes[i]
}
}
}
},
handleChangeCate(value) {
if (this.selCateObj = this.$refs['myCascader'].getCheckedNodes()[0]) {
this.selCateObj = this.$refs['myCascader'].getCheckedNodes()[0].data
this.formData.categoryList = this.selCateObj
} else {
this.selCateObj = {}
}
if (!value) return
this.selCategoryArray = value
},
//
deepTree(arr, children) {
if (Array.isArray(arr) && arr.length > 0) {
return arr.map((item) => {
return {
...item,
[children]:
(item[children] &&
item[children].length > 0 &&
this.deepTree(item[children], children)) ||
null,
};
});
}
},
async getReplayInfo() {
this.okflag = false;
this.$refs['ref_form1'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
if (this.status) {
if (!this.selCateObj || !this.selCateObj.id) {
this.$message.error('请选择事件分类');
return false;
}
}
this.formData.categoryList = [];
this.formData.categoryList.push(this.selCateObj);
this.formData.categoryId = this.selCateObj.id
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';
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

207
src/views/modules/shequzhili/peopleOpinons/cpts/process-form.vue

@ -0,0 +1,207 @@
<template>
<div class="">
<div>
<el-form ref="ref_form1" :inline="false" :rules="dataRule" class="form" :data="formData">
<el-form-item label="处理方式" label-width="150px" :class="{ 'form-item': source === 'visiual' }"
prop="operationType">
<el-radio-group :class="{ 'form-item': source === 'visiual' }" v-model.trim="operationType"
@change="handleChangeOperationType">
<el-radio v-if="!eventId" label="4">待处理</el-radio>
<el-radio label="0">回复</el-radio>
<el-radio label="5">指派</el-radio>
<el-radio label="6">完成并回复</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" :source="source" :eventDetailData="eventDetailData"
:eventId="eventId"></process-form-replay>
</div>
<div v-if="operationType === '6'">
<process-form-replay-end ref="ref_process_form_replay_end" :source="source"
:eventDetailData="eventDetailData" :eventId="eventId"></process-form-replay-end>
</div>
<div v-if="operationType === '5'">
<process-form-designate ref="ref_process_form_designate" :source="source" :eventDetailData="eventDetailData"
:eventId="eventId"></process-form-designate>
</div>
<div v-if="operationType === '2'">
<process-form-demand ref="ref_process_form_demond" :source="source" :eventId="eventId"
:transferObj="transferObj" :demandUserId="demandUserId" :demandUserName="demandUserName"
:demandUserMobile="demandUserMobile" :eventDetailData="eventDetailData"></process-form-demand>
</div>
</div>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import processFormReplay from "./process-form-replay";
import processFormReplayEnd from "./process-form-replay-end";
// import processFormProject from "./process-form-project";
// import processFormDemand from "./process-form-demand";
// import processFormIssue from "./process-form-issue";
import processFormDesignate from "./process-form-designate";
let loading; //
export default {
data() {
return {
formData: {
operationType: '',
openFlag:null,
},
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
operationType: '',
replayInfo: {},
demand: {},
project: {},
issueInfo: {},
okflag: false,
eventDetailCopy: {},
transferObj: {
latitude: "",
longitude: ""
}
};
},
components: {
processFormReplay,
// processFormProject,
// processFormDemand,
// processFormIssue,
processFormDesignate,
processFormReplayEnd
},
computed: {
dataRule() {
return {
operationType: [
{ required: true, message: "处理方式不能为空", trigger: "blur" },
],
};
},
},
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() { },
async mounted() {
const { user } = this.$store.state
this.agencyId = user.agencyId
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
}
if (this.eventDetailData.operationType) {
this.operationType = this.eventDetailCopy.operationType
}
this.$EventBus.$on('map', (val) => {
this.transferObj.latitude = val.lat
this.transferObj.longitude = val.lng
})
},
methods: {
handleChangeOperationType(val) {
this.operationType = val;
},
async getProcessInfo() {
this.okflag = false
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 if(this.operationType === '2'){//
this.$refs.ref_process_form_demond.getDemandInfo()
this.demand = this.$refs.ref_process_form_demond.formData;
if (this.$refs.ref_process_form_demond.okflag) {
this.replayInfo = this.$refs.ref_process_form_demond.formData;
this.okflag = true;
}
} else if (this.operationType === '5') {//
this.$refs.ref_process_form_designate.getReplayInfo()
this.replayInfo = this.$refs.ref_process_form_designate.formData
if (this.$refs.ref_process_form_designate.okflag) {
this.replayInfo = this.$refs.ref_process_form_designate.formData
this.okflag = true
}
} else if (this.operationType === '6') {//
this.$refs.ref_process_form_replay_end.getReplayInfo()
this.replayInfo = this.$refs.ref_process_form_replay_end.formData
if (this.$refs.ref_process_form_replay_end.okflag) {
this.replayInfo = this.$refs.ref_process_form_replay_end.formData
this.okflag = true
}
} else if(this.operationType === '4' || this.operationType === '7') {
this.okflag = true
}else{
return false
}
},
handleCancle() {
this.resetData();
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
resetData() {
},
//
endLoading() {
if (loading) {
loading.close();
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/shequzhili/event-info.scss";
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

916
src/views/modules/shequzhili/peopleOpinons/opinionsDaily.vue

@ -0,0 +1,916 @@
<template>
<div class="g-main">
<div v-show="pageType == 'list'">
<div class="m-search">
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'120px'">
<div>
<el-form-item label="所属组织" prop="agencyId">
<el-cascader class="u-item-width-normal" size="small" ref="myCascader"
v-model.trim="formData.agencyId" :options="orgOptions" :props="orgOptionProps"
:show-all-levels="false" @change="handleChangeAgency" clearable></el-cascader>
</el-form-item>
<!-- <el-form-item label="征集领域" prop="typeCode" >
<el-select v-model="formData.typeCode" placeholder="请选择" class="u-item-width-normal">
<el-option v-for="item in SpecialList" :key="item.value" :label="item.label" clearable
:value="item.value">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="意见标题" prop="subjectTitle">
<el-input v-model.trim="formData.subjectTitle" class="u-item-width-normal" size="small"
clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="提交人姓名" prop="name">
<el-input v-model.trim="formData.name" class="u-item-width-normal" size="small" clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="报件人电话" prop="mobile">
<el-input v-model.trim="formData.mobile" class="u-item-width-normal" size="small" clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="是否愿意公开" prop="openFlag">
<el-select v-model.trim="formData.openFlag" clearable class="u-item-width-normal">
<el-option v-for="item in openList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="是否设为金点子" prop="goldenIdeaFlag">
<el-select v-model.trim="formData.goldenIdeaFlag" clearable class="u-item-width-normal">
<el-option v-for="item in goldListType" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="提交时间" prop="startSubmitTime">
<el-date-picker v-model.trim="formData.startSubmitTime" class="u-item-width-daterange"
size="small" type="date" value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker>
<span class="u-data-tag"></span>
<el-date-picker v-model.trim="formData.endSubmitTime"
class="u-item-width-daterange u-data-tag" size="small" type="date"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd" placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-row>
<el-col :span="24" align="right">
<el-button style="margin-left: 30px" size="small" type="primary "
@click="handleSearch">查询</el-button>
<el-button style="margin-left: 10px" size="small" class="diy-button--white"
@click="resetSearch">重置</el-button>
</el-col>
</el-row>
</div>
</el-form>
</div>
<div class="m-table">
<div class="div_btn">
<el-button @click="handleExport" class="diy-button--white" size="small">导出</el-button>
</div>
<el-table :data="tableData" border class="m-table-item" style="width: 100%"
@selection-change="handleSelectionChange" :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="agencyName" align="center" label="所属组织" :show-overflow-tooltip="true">
</el-table-column>
<!-- <el-table-column prop="typeCode" label="征集领域" min-width="140" align="center"
:show-overflow-tooltip="true" /> -->
<el-table-column prop="subjectTitle" label="意见标题" align="center" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="eventContent" label="意见内容" align="center" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="name" label="提交人" align="center" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="mobile" align="center" width="110" label="提交人电话">
<!-- <template slot-scope="scope">
<el-button
v-if="scope.row.reportUserId !== null && scope.row.reportUserId !== ''"
@click="handleLook(scope.row)"
type="text"
size="small"
>
{{ scope.row.phone }}
</el-button>
<span v-else>
{{ scope.row.phone }}
</span>
</template> -->
</el-table-column>
<el-table-column prop="openFlag" align="center" width="110" label="是否愿意公开"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.openFlag === 0" style="color: #ff6600;"></span>
<span v-else-if="scope.row.openFlag ===1"></span>
</template>
</el-table-column>
<el-table-column prop="goldenIdeaFlag" align="center" width="110" label="是否金点子建议"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.goldenIdeaFlag === 0" style="color: #ff6600;"></span>
<span v-else-if="scope.row.goldenIdeaFlag ===1"></span>
</template>
</el-table-column>
<el-table-column prop="submitTime" align="center" width="110" label="提交时间"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="200px" prop="status">
<template slot-scope="scope">
<el-button @click="handleDispose(scope.row,'dispose')" type="text"
size="small">查看</el-button>
<el-button @click="handleDel(scope.row,'info')" 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' || pageType == 'add'">
<event-info ref="eleEditForm" :pageType="pageType" :eventId="eventId" :eventDetailData="eventDetailData"
@handleClose="handleClose" @handleOk="handleOk" @dialogOk="handleEditSuccess" />
</div>
<el-dialog :title="'播放语音'" :visible.sync="showVoice" width="40%" top="5vh" append-to-body class="dialog-h"
:close-on-click-modal="false">
<div class="dialog-h-content scroll-h">
<div style="display: flex; justify-content: center; margin: 50px">
<audio controls>
<source :src="selVoiceUrl" type="" />
</audio>
</div>
</div>
<div class="resi-btns">
<el-button size="small" @click="showVoice = false">取消</el-button>
</div>
</el-dialog>
<el-dialog :title="'催办'" :visible.sync="showSupervise" width="40%" top="5vh" append-to-body class="dialog-h"
:close-on-click-modal="false">
<el-form :model="superviseFrom" ref="superviseFrom">
<el-form-item label="催办说明" prop="content">
<el-input v-model.trim="superviseFrom.content" class="cell-width-2" type="textarea" maxlength="500"
show-word-limit :rows="5" placeholder="请填写催办说明,不超过500字"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="showSupervise = false"> </el-button>
<el-button type="primary" @click="doSuperviseEvent"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import eventInfo from "./cpts/eventInfo";
import axios from "axios";
export default {
components: { eventInfo },
data() {
let endDisabledDate = (time) => {
//datareturn
let nowData = Date.now();
if (this.formData.startTime) {
let startTime = new Date(this.formData.startTime);
return (
time.getTime() > nowData ||
time.getTime() < startTime ||
time.getTime() === startTime
);
} else {
return time.getTime() > nowData;
}
};
let startDisabledDate = (time) => {
//datareturn
let nowData = Date.now();
return time.getTime() > nowData;
};
let orgOptionProps = {
emitPath: false,
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
}
return {
formData: {
openFlag:"",
publicationPeople:"",
typeCode:"",
demandType: "",
name: "",
mobile: "",
eventContent: "",
operationType: 4,
openFlag: "",
specialSubjectId: "",
subjectTitle: "",
goldenIdeaFlag: "",
agencyId: "",
clientType: "web",
startSubmitTime:"",
endSubmitTime:""
},
pageType: "list", // list add dispose info
user: {},
agencyId: "",
gridList: [], //list--
tableData: [],
online: 0,
orgOptions: [],
orgOptionProps,
level: '',
optionsG: [],
sarr: [],
openList:[
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
goldListType:[
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
statusArray: [
{
value: "processing",
label: "处理中",
},
{
value: "closed_case",
label: "已完成",
},
],
Publicvoting:[
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
statusArray: [
{
value: "processing",
label: "处理中",
},
{
value: "closed_case",
label: "已完成",
},
],
typeArray: [
{
value: "1",
label: "难点痛点",
},
{
value: "2",
label: "矛盾纠纷",
},
{
value: "3",
label: "自身问题",
},
{
value: "4",
label: "超出服务范围",
},
],
overPeriodArray: [
{
value: "0",
label: "2天以下",
},
{
value: "1",
label: "3-4天",
},
{
value: "2",
label: "4天以上",
},
],
qudaoArray: [
{
value: "0",
label: "综治网格事件",
},
{
value: "1",
label: "诚心办事件",
},
{
value: "2",
label: "城管事件",
},
{
value: "3",
label: "信访事件",
}
],
keyProblemList:[
{label:'违章拉客',value:'0'},
{label:'违章停车',value:'1'}
],
cateOptions: [],
optionProps: {
multiple: true,
checkStrictly: false,
emitPath: true,
children: 'children',
label: 'categoryName',
value: 'id',
},
eventTypeCheck: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
endPickerOptions: {
disabledDate: endDisabledDate,
},
startPickerOptions: {
disabledDate: startDisabledDate,
},
eventId: "",
SpecialList:[],
searchH: 180,
eventDetailData: {},
showVoice: false,
showSupervise: false,
selVoiceUrl: "",
multipleSelection: [],
superviseFrom:{
content: "",
},
};
},
computed: {
maxTableHeight() {
const h = this.clientHeight - this.searchH - 275 + this.iframeHeight;
const _h = this.clientHeight - 275 - this.searchH;
return this.$store.state.inIframe ? h : _h;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
"formData.endTime": function (val) {
if (val && val != "") {
let arrayTemp = val.split(" ");
this.formData.endTime = arrayTemp[0] + " 23:59:59";
}
},
},
mounted() {
this.user = this.$store.state.user;
this.agencyId = this.user.agencyId;
this.getOrgTreeList()
// this.getGridList()
this.getTableData();
this.getCateOptions();
this.getSpecialList()
},
methods: {
//
async getSpecialList() {
const url = "/sys/dict/data/dictlist";
const { data, code, msg } = await requestPost(url, {
dictType: "solicitation_fields",
});
if (code === 0) {
this.SpecialList = data || [];
} else {
this.$message.error(msg);
}
},
handleEventType(val) {
const nodes = this.$refs.cascaderEvent.getCheckedNodes();
this.formData.firstIdList = [];
this.formData.secondIdList = [];
let level1 = nodes.filter((item) => item.level === 1);
let level2 = nodes.filter((item) => item.level === 2);
level1.forEach((item) => {
if (item.hasChildren) {
for (let i = level2.length - 1; i >= 0; i--) {
if (level2[i].parent.value === item.value) level2.splice(i, 1);
}
}
});
this.formData.firstIdList = level1.map((item) => item.value);
this.formData.secondIdList = level2.map((item) => item.value);
},
handleSelectionChange(val) {
this.multipleSelection = [];
val.forEach((element) => {
this.multipleSelection.push(element.icEventId);
});
},
tableRowClassName({ row }) {
switch (row.overPeriod) {
case '0':
return 'row-over-period-0';
case '1':
return 'row-over-period-1';
case '2':
return 'row-over-period-2';
default:
return 'row-default';
}
},
//
handleLook(row) {
let { name,reportUserId } = row
const resiId = reportUserId;
this.$store.dispatch('saveData', { name,resiId });
this.$router.push({ name: 'jumin-huaxiang' });
this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => {
if (item.name === "jumin-huaxiang") {
return {...item, title: name };
}
return item;
});
},
async handleMarkDiffcult(command) {
const url = "/governance/icEventOld/difficultpointevent";
if (this.multipleSelection.length == 0) {
this.$message.warning('请选择需要标记的事件')
return
}
let params = {
icEventIdList: this.multipleSelection,
type: command,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("标记成功");
this.getTableData();
} else {
this.$message.error(msg);
}
},
async handleCancalDiffcult() {
const url = "/governance/icEventOld/difficultpointevent";
if (this.multipleSelection.length == 0) {
this.$message.warning('请选择取消标记的事件')
return
}
let params = {
icEventIdList: this.multipleSelection,
type: "0",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("取消标记成功");
this.getTableData();
} else {
this.$message.error(msg);
}
},
async handleSuperviseEvent(){
this.showSupervise = true;
},
async doSuperviseEvent() {
const url = "/governance/icEventOld/doSuperviseEvent";
if (this.multipleSelection.length == 0) {
this.$message.warning('请选择催办的事件')
return
}
let params = {
icEventIdList: this.multipleSelection,
content: this.superviseFrom.content,
operationType:21 // 21:
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("催办成功");
this.getTableData();
} else {
this.$message.error(msg);
}
this.showSupervise = false;
},
handleSearch(val) {
this.pageNo = 1;
this.getTableData();
},
async loadGrid() {
const url = "/gov/org/customergrid/gridoption";
let params = {
agencyId: this.agencyId,
purpose: "query",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.gridList = data;
} else {
this.$message.error(msg);
}
},
async handleExport() {
const url = "/governance/icEventOld/export";
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...formData,
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
})
.catch((err) => {
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
},
async handleAdd() {
this.pageType = "add";
},
async handleWatch(row) {
this.eventId = row.icEventId;
const url = "/governance/icEventOld/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
this.pageType = "info";
} else {
this.$message.error(msg);
}
},
//
async handleDispose(row,type) {
// this.eventDetailData = { ...data };
// this.pageType = type
this.eventId = row.icEventId;
const url = "/governance/icEventOld/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
specialSubjectId:""
});
if (code === 0) {
this.eventDetailData = { ...data };
this.pageType = type
;
} else {
this.$message.error(msg);
}
},
//
handleShowVoice(url) {
this.selVoiceUrl = url;
this.showVoice = true;
},
handleClose() {
this.pageType = "list";
this.eventId = "";
this.getTableData();
},
handleOk() {
this.pageType = "list";
this.eventId = "";
this.pageNo = 1;
this.getTableData();
},
handleEditSuccess() {
this.handleClose();
this.getTableData();
},
async handleVote(row){
const url = "/governance/icEventOld/updateSpecialColumn";
let params = {
icEventId:row.icEventId,
openFlag:row.openFlag==1?0:1,
}
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("操作成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
},
async handleDel(rowData) {
let message = "确认删除?";
this.$confirm(message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.delEvent(rowData.icEventId);
})
.catch((err) => { });
},
async delEvent(eventId) {
const url = "/governance/icEventOld/delete";
const formData = new FormData();
formData.append('ids', eventId) ;
requestPost(url, formData).then(res => {
if (res.code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
})
},
async getTableData() {
const url = "/governance/icEventOld/ideaList";
console.log(this.formData,"formData");
// if (this.eventTypeCheck) {
// this.formData.secondIdList = this.eventTypeCheck
// }
// // agencyId
// if (Array.isArray(this.formData.agencyId) && this.formData.agencyId.length) {
// if(this.level=="grid"){
// this.formData.gridId = this.formData.agencyId[this.formData.agencyId.length - 1];
// this.formData.agencyId = "";
// }else{
// this.formData.agencyId = this.formData.agencyId[this.formData.agencyId.length - 1];
// this.formData.gridId = "";
// }
// } else {
// this.formData.agencyId = "";
// this.formData.gridId = "";
// }
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);
}
},
async getCateOptions() {
const url = '/governance/icEvent/getCategoryTree';
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
let treeDataNew = this.deepTree(data, "children");
//
++this.iscascaderShow;
this.cateOptions = [];
this.cateOptions = treeDataNew;
} else {
this.$message.error(msg);
}
if (this.eventDetailCopy.parentCategoryId) {
const pids = this.eventDetailCopy.parentCategoryId.split(',');
pids.push(this.eventDetailCopy.categoryId);
let nodes = this.cateOptions;
for (let i = 0; i < pids.length; i++) {
nodes = this.buildNode(nodes, pids[i])
}
if (nodes) {
this.formData.categoryList.push(nodes)
}
}
},
buildNode(nodes, treeId) {
for (let i = 0; i < nodes.length; i++) {
if (nodes[i].id === treeId) {
if (nodes[i].children) {
return nodes[i].children
} else {
return nodes[i]
}
}
}
},
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
resetSearch() {
this.formData = {
agencyId: "",
gridId: "",
sourceType: "",
eventContent: "",
name: "",
mobile: "",
startTime: "",
endTime: "",
status: "",
firstIdList: [],
secondIdList: [],
keyProblem:'',
};
this.eventTypeCheck = [];
this.pageNo = 1;
this.getTableData();
// this.loadTable()
},
getOrgTreeList () {
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.orgOptions = []
this.orgOptions.push(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getGridList () {
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: this.agencyId, purpose: 'addorupdate' })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.optionsG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
handleChangeAgency (val) {
console.log(val,"DFLKSJFKL");
// this.sarr = []
// const map = new Map();
// this.getLastItem(
// this.orgOptions,
// val,
// "agencyId"
// );
// this.level = this.sarr[this.sarr.length - 1].level
},
getLastItem (list, vals, key) {
let LIST = list || [];
for (let item of LIST) {
// console.log(item[key]);
for (let i of vals) {
if (item[key] === i) {
this.sarr.push(item);
} else {
this.getLastItem(item.subAgencyList, vals, key);
}
}
}
},
//
deepTree(arr, children) {
if (Array.isArray(arr) && arr.length > 0) {
return arr.map((item) => {
return {
...item,
[children]:
(item[children] &&
item[children].length > 0 &&
this.deepTree(item[children], children)) ||
null,
};
});
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";
.m-search {
.u-item-width-normal {
width: 200px;
}
}
::v-deep .el-dropdown__caret-button {
height: 30px;
}
::v-deep .el-image-viewer__close {
top: 129px;
right: 129px;
width: 40px;
height: 40px;
font-size: 40px;
color: #fff;
}
</style>
<style>
.row-over-period-0 {
background-color: #ffffe0 !important; /* 淡黄色 */
}
.row-over-period-1 {
background-color: #ffebcd !important; /* 淡橙色 */
}
.row-over-period-2 {
background-color: #ffc0cb !important; /* 淡红色 */
}
.row-default {
background-color: #e0ffe0 !important; /* 淡绿色 */
}
</style>

402
src/views/modules/shequzhili/solicitationSpecial/cpts/add.vue

@ -0,0 +1,402 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form" :inline="true" :model="formData" :rules="dataRule" class="form">
<el-row>
<el-col :span="12">
<el-form-item label="专题标题" prop="subjectTitle" label-width="150px">
<el-input v-model.trim="formData.subjectTitle" size="small" clearable placeholder="请输入活动名称"
class="u-item-width-normal"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="150px" label="征集领域" prop="typeCode">
<el-select v-model="formData.typeCode" placeholder="请选择" clearable>
<el-option v-for="item in SpecialList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="封面图片" label-width="150px" prop="fileList">
<template>
<!-- <upload-image :defaultFileList="fileList" :limit="3" @change="onChangeFileList"
@file-removed="removedImg"></upload-image> -->
<el-upload :headers="$getElUploadHeaders()" :data="{ customerId: customerId }"
:action="uploadUrl" list-type="picture-card" :show-file-list="true" :drag="true"
:file-list="formData.attachmentList" :on-exceed="handleImgExceed" :limit="3"
:before-upload="beforeImgUpload" :on-preview="handleImgPreview"
:on-remove="handleImgRemove" :on-success="handleImgSuccess">
<template v-if="formData.attachmentList.length < 3">
<i class="el-icon-plus"></i>
</template>
<!-- <i v-if="showAttach" class="el-icon-plus"></i> -->
</el-upload>
</template>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="专题内容" prop="subjectContent" style="display: block" label-width="150px">
<div class="item_width_1">
<Tinymce class="tinymce_view " v-model.trim="formData.subjectContent" :height="180"
placeholder="请输入活动内容" />
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="开始征集
" style="display: block" prop="peopleCount" label-width="150px">
<el-switch v-model="formData.status" :active-value="1" :inactive-value="0"
@change="handleSwitchChange"></el-switch>
</el-form-item>
</el-col>
</el-row></el-form>
</div>
<div class="div_btn">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button size="small" type="primary" :disabled="btnDisable" @click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { requestPost,requestGet } from '@/js/dai/request'
import Tinymce from '@c/tinymce2/index.vue'
import daiMap from "@/utils/dai-map";
import util from '@js/util.js';
// import UploadImage from './upload-image.vue'
import UploadImage from '@/views/modules/plugins/rent/upload-image.vue'
var map
var search
var markers
var infoWindowList
var geocoder //
export default {
data() {
return {
attachmentList: [],//
fileList: [],
SpecialList: [
{ value: 0, label: "消息发布" },
{ value: 1, label: "志愿风采" },
],
formData:
{
subjectTitle: '',
subjectContent: "",
typeCode: "",
status: 1,
id: "",
attachmentList: []
},
uploadUrl: `${window.SITE_CONFIG['apiURL']}/oss/file/uploadqrcodeV2`,
customerId: localStorage.getItem('customerId'),
}
},
components: { Tinymce, UploadImage },
mounted() {
this.getSpecialList()
},
methods: {
//
beforeImgUpload(file) {
// const isLt1M = file.size / 1024 / 1024 < 10;
// const srcType = file.type;
// const format = file.name.split('.').pop();
// if (!isLt1M) {
// this.$message.error(' 10MB!');
// return false;
// }
// if (srcType.indexOf('image') == -1) {
// this.$message.error('');
// return false;
// }
// return true;
},
//
handleImgExceed() {
this.$message({
type: 'warning',
message: '文件数量最多不超过一个'
});
},
//
handleImgRemove(file) {
console.log('handleImgRemove', file);
if (file.response) {
let index = this.formData.attachmentList.findIndex(item => item.url == file.response.data.url);
this.formData.attachmentList.splice(index, 1);
} else if (file.url) {
let index = this.formData.attachmentList.findIndex(item => item.url == file.url);
this.formData.attachmentList.splice(index, 1);
}
console.log(this.formData.attachmentList, "sdjflskdfjklds");
},
//
handleImgSuccess(res, file, fileList) {
console.log(res, file, fileList, "dsfkljsdklfj");
if (res.code === 0 && res.msg === 'success') {
// let format = file.name.split('.').pop();
// let srcType = file.raw.type;
// let type = 'file';
// if (srcType.indexOf('image') != -1) {
// type = 'image';
// } else if (srcType.indexOf('video') != -1) {
// type = 'video';
// }
this.formData.attachmentList.push(res.data.url);
console.log(this.formData.attachmentList, ":sdfkjslk");
if (this.formData.attachmentList.length >= 3) {
const element = document.querySelector('.el-upload--picture-card'); //
if (element) {
element.style.display = 'none';
}
}
} else {
this.$message.error(res.msg);
}
},
//
handleImgPreview(file) {
console.log(file);
window.open(file.url || file.response.data.url);
},
//
async getSpecialList() {
const url = "/sys/dict/data/dictlist";
const { data, code, msg } = await requestPost(url, {
dictType: "solicitation_fields",
});
if (code === 0) {
this.SpecialList = data || [];
} else {
this.$message.error(msg);
}
},
async initForm(type, activityId) {
this.formType = type
if (type === 'edit') {
this.formData = activityId
this.getDetail(activityId)
}
},
getDetail(activityId){
const url = '/governance/icEventSpecialSubject/getDetail'
let params = {
id: activityId.id
}
requestGet(url, params).then(res=>{
console.log(res,"sdkljklsdf");
this.formData=res.data
this.formData.status=Number(this.formData.status)
console.log(this.formData,"dsfgjsldg");
})
},
//
async loadFormData() {
const url = '/actual/base/icpartyactivity/detail'
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/detail'
let params = {
id: this.activityId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.formData = data
let style_img = "style='width:50px;height:40px;' "
if (this.formData.content) {
// this.formData.content = this.formData.content.replace(/<img/g, "<img style='width:200px;height:240px;'")
// let array=this.formData.content.split('<img')
}
} else {
this.$message.error(msg)
}
},
async handleComfirm() {
if (!this.formData.subjectTitle) {
this.$message.error('请输入专题标题');
return;
}
if (!this.formData.subjectContent) {
this.$message.error('请输入专题内容');
return;
}
if (!this.formData.typeCode) {
this.$message.error('请输入领域编码');
return;
}
// if (!this.formData.status) {
// this.$message.error('');
// return;
// }
console.log(this.formData, "this.formData");
this.addSpecial()
},
async addSpecial() {
if (this.formType == "edit") {
let url = '/governance/icEventSpecialSubject/update'
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
} else {
this.$message.error(msg)
}
console.log("sdlkfjklsdf ");
this.$emit('showAddClose')
} else {
let url = '/governance/icEventSpecialSubject/save'
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
} else {
this.$message.error(msg)
}
console.log("sdlkfjklsdf ");
this.$emit('showAddClose')
}
},
handleCancle() {
this.$emit('showAddClose')
},
},
computed: {
dataRule() {
return {
subjectTitle: [
{ required: true, message: '所属专题不能为空', trigger: 'blur' }
],
typeCode: [
{ required: true, message: '征集领域不能为空', trigger: 'blur' }
],
subjectContent: [
{ required: true, message: '征集内容不能为空', trigger: 'blur' }
],
fileList: [
{ required: true, message: '请选择活动照片', trigger: 'blur' }
]
}
},
},
props: {
},
destroyed() {
map = null
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>
<style lang="scss" scoped>
/deep/ .el-upload--picture-card {
width: 60px;
height: 60px;
line-height: 70px;
}
/deep/ .el-upload-list--picture-card .el-upload-list__item {
width: 60px;
height: 60px;
}
/deep/ .el-upload-dragger {
width: 60px;
height: 60px;
}
.item_width_1 {
width: 634px;
/deep/.tox .tox-dialog {
z-index: 20000;
}
}
.u-item-width-normal {
width: 222px;
}
.tinymce_view {
::v-deep .tox .tox-dialog {
z-index: 2000000000;
}
}
.div_map {
position: relative;
}
.div_searchmap {
z-index: 5000;
position: absolute;
top: 5px;
left: 5px;
}
.tinymce_view {
height: 400px;
overflow: auto;
}
.text_p {
margin: 0;
padding: 0 10px;
border: 1px solid #d9d9d9;
border-radius: 5px;
>p {
margin: 0;
}
}
</style>

918
src/views/modules/shequzhili/solicitationSpecial/cpts/suggestionList.vue

@ -0,0 +1,918 @@
<template>
<div class="g-main">
<div v-show="pageType == 'list'">
<div class="m-search">
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'120px'">
<div>
<el-form-item label="所属组织" prop="agencyId">
<el-cascader class="u-item-width-normal" size="small" ref="myCascader"
v-model.trim="formData.agencyId" :options="orgOptions" :props="orgOptionProps"
:show-all-levels="false" @change="handleChangeAgency" clearable></el-cascader>
</el-form-item>
<!-- <el-form-item label="征集领域" prop="typeCode" >
<el-select v-model="formData.typeCode" placeholder="请选择" class="u-item-width-normal">
<el-option v-for="item in SpecialList" :key="item.value" :label="item.label" clearable
:value="item.value">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="意见标题" prop="subjectTitle">
<el-input v-model.trim="formData.subjectTitle" class="u-item-width-normal" size="small"
clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="提交人姓名" prop="name">
<el-input v-model.trim="formData.name" class="u-item-width-normal" size="small" clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="建议人电话" prop="mobile">
<el-input v-model.trim="formData.mobile" class="u-item-width-normal" size="small" clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="是否愿意公开" prop="openFlag">
<el-select v-model.trim="formData.openFlag" clearable class="u-item-width-normal">
<el-option v-for="item in openList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="是否设为金点子" prop="goldenIdeaFlag">
<el-select v-model.trim="formData.goldenIdeaFlag" clearable class="u-item-width-normal">
<el-option v-for="item in goldListType" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="提交时间" prop="startSubmitTime">
<el-date-picker v-model.trim="formData.startSubmitTime" class="u-item-width-daterange"
size="small" type="date" value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker>
<span class="u-data-tag"></span>
<el-date-picker v-model.trim="formData.endSubmitTime"
class="u-item-width-daterange u-data-tag" size="small" type="date"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd" placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-row>
<el-col :span="24" align="right">
<el-button style="margin-left: 30px" size="small" type="primary "
@click="handleSearch">查询</el-button>
<el-button style="margin-left: 10px" size="small" class="diy-button--white"
@click="resetSearch">重置</el-button>
</el-col>
</el-row>
</div>
</el-form>
</div>
<div class="m-table">
<div class="div_btn">
<el-button @click="handleExport" class="diy-button--white" size="small">导出</el-button>
</div>
<el-table :data="tableData" border class="m-table-item" style="width: 100%"
@selection-change="handleSelectionChange" :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="agencyName" align="center" label="所属组织" :show-overflow-tooltip="true">
</el-table-column> -->
<!-- <el-table-column prop="typeCode" label="征集领域" min-width="140" align="center"
:show-overflow-tooltip="true" /> -->
<!-- <template slot-scope="scope">
{{ scope.row.firstName + '-' + scope.row.secondName }}
</template>
</el-table-column> -->
<el-table-column prop="subjectTitle" label="所属专题" align="center" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="eventContent" label="意见内容" align="center" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="name" label="建议人" align="center" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="mobile" align="center" width="110" label="提交人电话">
<!-- <template slot-scope="scope">
<el-button
v-if="scope.row.reportUserId !== null && scope.row.reportUserId !== ''"
@click="handleLook(scope.row)"
type="text"
size="small"
>
{{ scope.row.phone }}
</el-button>
<span v-else>
{{ scope.row.phone }}
</span>
</template> -->
</el-table-column>
<el-table-column prop="openFlag" align="center" width="110" label="是否愿意公开"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.openFlag === 0" style="color: #ff6600;"></span>
<span v-else-if="scope.row.openFlag ===1"></span>
</template>
</el-table-column>
<el-table-column prop="goldenIdeaFlag" align="center" width="110" label="是否金点子建议"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.goldenIdeaFlag === 0" style="color: #ff6600;"></span>
<span v-else-if="scope.row.goldenIdeaFlag ===1"></span>
</template>
</el-table-column>
<el-table-column prop="submitTime" align="center" width="110" label="提交时间"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="200px" prop="status">
<template slot-scope="scope">
<el-button @click="handleDispose(scope.row,'dispose')" type="text" size="small"
>查看</el-button>
<el-button @click="handleDel(scope.row,'info')" 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' || pageType == 'add'">
<event-info ref="eleEditForm" :pageType="pageType" :eventId="eventId" :eventDetailData="eventDetailData"
@handleClose="handleClose" @handleOk="handleOk" @dialogOk="handleEditSuccess" />
</div>
<el-dialog :title="'播放语音'" :visible.sync="showVoice" width="40%" top="5vh" append-to-body class="dialog-h"
:close-on-click-modal="false">
<div class="dialog-h-content scroll-h">
<div style="display: flex; justify-content: center; margin: 50px">
<audio controls>
<source :src="selVoiceUrl" type="" />
</audio>
</div>
</div>
<div class="resi-btns">
<el-button size="small" @click="showVoice = false">取消</el-button>
</div>
</el-dialog>
<el-dialog :title="'催办'" :visible.sync="showSupervise" width="40%" top="5vh" append-to-body class="dialog-h"
:close-on-click-modal="false">
<el-form :model="superviseFrom" ref="superviseFrom">
<el-form-item label="催办说明" prop="content">
<el-input v-model.trim="superviseFrom.content" class="cell-width-2" type="textarea" maxlength="500"
show-word-limit :rows="5" placeholder="请填写催办说明,不超过500字"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="showSupervise = false"> </el-button>
<el-button type="primary" @click="doSuperviseEvent"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import eventInfo from "../../peopleOpinons/cpts/eventInfo.vue";
import axios from "axios";
export default {
props: {
message: {
type: String,
required: true
},
optionDate: {
type: Object,
required: true
}
},
components: { eventInfo },
data() {
let endDisabledDate = (time) => {
//datareturn
let nowData = Date.now();
if (this.formData.startTime) {
let startTime = new Date(this.formData.startTime);
return (
time.getTime() > nowData ||
time.getTime() < startTime ||
time.getTime() === startTime
);
} else {
return time.getTime() > nowData;
}
};
let startDisabledDate = (time) => {
//datareturn
let nowData = Date.now();
return time.getTime() > nowData;
};
let orgOptionProps = {
emitPath: false,
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
}
return {
pageType: "list", // list add dispose info
user: {},
agencyId: "",
gridList: [], //list--
tableData: [],
online: 0,
orgOptions: [],
orgOptionProps,
level: '',
optionsG: [],
sarr: [],
openList:[
{
value: 0,
label: "已催办",
},
{
value: 1,
label: "未催办",
},
],
statusArray: [
{
value: "processing",
label: "处理中",
},
{
value: "closed_case",
label: "已完成",
},
],
Publicvoting:[
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
statusArray: [
{
value: "processing",
label: "处理中",
},
{
value: "closed_case",
label: "已完成",
},
],
typeArray: [
{
value: "1",
label: "难点痛点",
},
{
value: "2",
label: "矛盾纠纷",
},
{
value: "3",
label: "自身问题",
},
{
value: "4",
label: "超出服务范围",
},
],
overPeriodArray: [
{
value: "0",
label: "2天以下",
},
{
value: "1",
label: "3-4天",
},
{
value: "2",
label: "4天以上",
},
],
qudaoArray: [
{
value: "0",
label: "综治网格事件",
},
{
value: "1",
label: "诚心办事件",
},
{
value: "2",
label: "城管事件",
},
{
value: "3",
label: "信访事件",
}
],
keyProblemList:[
{label:'违章拉客',value:'0'},
{label:'违章停车',value:'1'}
],
formData: {
openFlag:"",
publicationPeople:"",
typeCode:"",
demandType: "",
name: "",
mobile: "",
eventContent: "",
operationType: 4,
openFlag: "",
specialSubjectId: "",
subjectTitle: "",
goldenIdeaFlag: "",
agencyId: "",
clientType: "web",
startSubmitTime:"",
endSubmitTime:""
},
openList:[
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
goldListType:[
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
cateOptions: [],
optionProps: {
multiple: true,
checkStrictly: false,
emitPath: false,
children: 'children',
label: 'categoryName',
value: 'id',
},
eventTypeCheck: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
endPickerOptions: {
disabledDate: endDisabledDate,
},
startPickerOptions: {
disabledDate: startDisabledDate,
},
eventId: "",
searchH: 180,
SpecialList:[],
eventDetailData: {},
showVoice: false,
showSupervise: false,
selVoiceUrl: "",
multipleSelection: [],
superviseFrom:{
content: "",
},
};
},
computed: {
maxTableHeight() {
const h = this.clientHeight - this.searchH - 275 + this.iframeHeight;
const _h = this.clientHeight - 275 - this.searchH;
return this.$store.state.inIframe ? h : _h;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
"formData.endTime": function (val) {
if (val && val != "") {
let arrayTemp = val.split(" ");
this.formData.endTime = arrayTemp[0] + " 23:59:59";
}
},
},
mounted() {
this.formData.specialSubjectId= this.$route.query.id
this.user = this.$store.state.user;
this.formData.agencyId = this.user.agencyId;
this.getOrgTreeList()
// this.getGridList()
this.getTableData();
this.getCateOptions();
this.getSpecialList()
},
methods: {
//
async getSpecialList() {
const url = "/sys/dict/data/dictlist";
const { data, code, msg } = await requestPost(url, {
dictType: "solicitation_fields",
});
if (code === 0) {
this.SpecialList = data || [];
} else {
this.$message.error(msg);
}
},
handleEventType(val) {
const nodes = this.$refs.cascaderEvent.getCheckedNodes();
this.formData.firstIdList = [];
this.formData.secondIdList = [];
let level1 = nodes.filter((item) => item.level === 1);
let level2 = nodes.filter((item) => item.level === 2);
level1.forEach((item) => {
if (item.hasChildren) {
for (let i = level2.length - 1; i >= 0; i--) {
if (level2[i].parent.value === item.value) level2.splice(i, 1);
}
}
});
this.formData.firstIdList = level1.map((item) => item.value);
this.formData.secondIdList = level2.map((item) => item.value);
},
handleSelectionChange(val) {
this.multipleSelection = [];
val.forEach((element) => {
this.multipleSelection.push(element.icEventId);
});
},
tableRowClassName({ row }) {
switch (row.overPeriod) {
case '0':
return 'row-over-period-0';
case '1':
return 'row-over-period-1';
case '2':
return 'row-over-period-2';
default:
return 'row-default';
}
},
//
handleLook(row) {
let { name,reportUserId } = row
const resiId = reportUserId;
this.$store.dispatch('saveData', { name,resiId });
this.$router.push({ name: 'jumin-huaxiang' });
this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => {
if (item.name === "jumin-huaxiang") {
return {...item, title: name };
}
return item;
});
},
async handleMarkDiffcult(command) {
const url = "/governance/icEventOld/difficultpointevent";
if (this.multipleSelection.length == 0) {
this.$message.warning('请选择需要标记的事件')
return
}
let params = {
icEventIdList: this.multipleSelection,
type: command,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("标记成功");
this.getTableData();
} else {
this.$message.error(msg);
}
},
async handleCancalDiffcult() {
const url = "/governance/icEventOld/difficultpointevent";
if (this.multipleSelection.length == 0) {
this.$message.warning('请选择取消标记的事件')
return
}
let params = {
icEventIdList: this.multipleSelection,
type: "0",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("取消标记成功");
this.getTableData();
} else {
this.$message.error(msg);
}
},
async handleSuperviseEvent(){
this.showSupervise = true;
},
async doSuperviseEvent() {
const url = "/governance/icEventOld/doSuperviseEvent";
if (this.multipleSelection.length == 0) {
this.$message.warning('请选择催办的事件')
return
}
let params = {
icEventIdList: this.multipleSelection,
content: this.superviseFrom.content,
operationType:21 // 21:
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("催办成功");
this.getTableData();
} else {
this.$message.error(msg);
}
this.showSupervise = false;
},
handleSearch(val) {
this.pageNo = 1;
this.getTableData();
},
async loadGrid() {
const url = "/gov/org/customergrid/gridoption";
let params = {
agencyId: this.agencyId,
purpose: "query",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.gridList = data;
} else {
this.$message.error(msg);
}
},
async handleExport() {
const url = "/governance/icEventOld/export";
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...formData,
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
})
.catch((err) => {
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
},
async handleAdd() {
this.pageType = "add";
},
async handleWatch(row) {
this.eventId = row.icEventId;
const url = "/governance/icEventOld/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
this.pageType = "info";
} else {
this.$message.error(msg);
}
},
//
async handleDispose(row,type) {
// this.eventDetailData = { ...data };
// this.pageType = type
this.eventId = row.icEventId;
const url = "/governance/icEventOld/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
specialSubjectId:this.formData.specialSubjectId
});
if (code === 0) {
this.eventDetailData = { ...data };
this.pageType = type
;
} else {
this.$message.error(msg);
}
},
//
handleShowVoice(url) {
this.selVoiceUrl = url;
this.showVoice = true;
},
handleClose() {
this.pageType = "list";
this.eventId = "";
this.getTableData();
},
handleOk() {
this.pageType = "list";
this.eventId = "";
this.pageNo = 1;
this.getTableData();
},
handleEditSuccess() {
this.handleClose();
this.getTableData();
},
async handleVote(row){
const url = "/governance/icEventOld/updateSpecialColumn";
let params = {
icEventId:row.icEventId,
openFlag:row.openFlag==1?0:1,
}
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("操作成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
},
async handleDel(rowData) {
let message = "确认删除?";
this.$confirm(message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.delEvent(rowData.icEventId);
})
.catch((err) => { });
},
async delEvent(eventId) {
const url = "/governance/icEventOld/delete";
const formData = new FormData();
formData.append('ids', eventId) ;
requestPost(url, formData).then(res => {
if (res.code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
})
},
async getTableData() {
const url = "/governance/icEventOld/ideaList";
console.log(this.formData,"formData");
// if (this.eventTypeCheck) {
// this.formData.secondIdList = this.eventTypeCheck
// }
// // agencyId
// if (Array.isArray(this.formData.agencyId) && this.formData.agencyId.length) {
// if(this.level=="grid"){
// this.formData.gridId = this.formData.agencyId[this.formData.agencyId.length - 1];
// this.formData.agencyId = "";
// }else{
// this.formData.agencyId = this.formData.agencyId[this.formData.agencyId.length - 1];
// this.formData.gridId = "";
// }
// } else {
// this.formData.agencyId = "";
// this.formData.gridId = "";
// }
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);
}
},
async getCateOptions() {
const url = '/governance/icEvent/getCategoryTree';
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
let treeDataNew = this.deepTree(data, "children");
//
++this.iscascaderShow;
this.cateOptions = [];
this.cateOptions = treeDataNew;
} else {
this.$message.error(msg);
}
if (this.eventDetailCopy.parentCategoryId) {
const pids = this.eventDetailCopy.parentCategoryId.split(',');
pids.push(this.eventDetailCopy.categoryId);
let nodes = this.cateOptions;
for (let i = 0; i < pids.length; i++) {
nodes = this.buildNode(nodes, pids[i])
}
if (nodes) {
this.formData.categoryList.push(nodes)
}
}
},
buildNode(nodes, treeId) {
for (let i = 0; i < nodes.length; i++) {
if (nodes[i].id === treeId) {
if (nodes[i].children) {
return nodes[i].children
} else {
return nodes[i]
}
}
}
},
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
resetSearch() {
this.formData = {
agencyId: "",
gridId: "",
sourceType: "",
eventContent: "",
name: "",
mobile: "",
startTime: "",
endTime: "",
status: "",
firstIdList: [],
secondIdList: [],
keyProblem:'',
};
this.eventTypeCheck = [];
this.pageNo = 1;
this.getTableData();
// this.loadTable()
},
getOrgTreeList () {
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.orgOptions = []
this.orgOptions.push(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getGridList () {
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: this.agencyId, purpose: 'addorupdate' })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.optionsG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
//
deepTree(arr, children) {
if (Array.isArray(arr) && arr.length > 0) {
return arr.map((item) => {
return {
...item,
[children]:
(item[children] &&
item[children].length > 0 &&
this.deepTree(item[children], children)) ||
null,
};
});
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";
.m-search {
.u-item-width-normal {
width: 200px;
}
}
::v-deep .el-dropdown__caret-button {
height: 30px;
}
::v-deep .el-image-viewer__close {
top: 129px;
right: 129px;
width: 40px;
height: 40px;
font-size: 40px;
color: #fff;
}
</style>
<style>
.row-over-period-0 {
background-color: #ffffe0 !important; /* 淡黄色 */
}
.row-over-period-1 {
background-color: #ffebcd !important; /* 淡橙色 */
}
.row-over-period-2 {
background-color: #ffc0cb !important; /* 淡红色 */
}
.row-default {
background-color: #e0ffe0 !important; /* 淡绿色 */
}
</style>

661
src/views/modules/shequzhili/solicitationSpecial/index.vue

@ -0,0 +1,661 @@
<template>
<div class="g-main">
<div v-if="showType=='zhuanti'">
<div class="m-search">
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'120px'">
<div>
<el-form-item label="所属组织" prop="agencyId">
<el-cascader class="u-item-width-normal" size="small" ref="myCascader"
v-model.trim="formData.agencyId" :options="orgOptions" :props="orgOptionProps"
:show-all-levels="false" @change="handleChangeAgency" clearable></el-cascader>
</el-form-item>
<el-form-item label="征集领域" prop="typeCode" >
<el-select v-model="formData.typeCode" placeholder="请选择" class="u-item-width-normal" clearable>
<el-option v-for="item in SpecialList" :key="item.value" :label="item.label" clearable
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="专题标题" prop="subjectTitle">
<el-input v-model.trim="formData.subjectTitle" class="u-item-width-normal" size="small"
clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="专题内容" prop="subjectContent">
<el-input v-model.trim="formData.subjectContent" class="u-item-width-normal" size="small" clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="发布人" prop="publicationPeople">
<el-input v-model.trim="formData.publicationPeople" class="u-item-width-normal" size="small" clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="发布时间" prop="startTime">
<el-date-picker v-model.trim="formData.publicationTimeStart"
class="u-item-width-daterange" size="small" type="date"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd" placeholder="开始时间">
</el-date-picker>
<span class="u-data-tag"></span>
<el-date-picker v-model.trim="formData.publicationTimeEnd"
class="u-item-width-daterange u-data-tag" size="small" type="date"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd" placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-row>
<el-col :span="24" align="right">
<el-button style="margin-left: 30px" size="small" type="primary "
@click="handleSearch">查询</el-button>
<el-button style="margin-left: 10px" size="small" class="diy-button--white"
@click="resetSearch">重置</el-button>
</el-col>
</el-row>
</div>
</el-form>
</div>
<div class="m-table">
<div class="div_btn">
<el-button size="small" type="primary " @click="handleAdd">发布专题</el-button>
<el-button @click="handleExport" class="diy-button--white" size="small">导出</el-button>
<el-button @click="handleSuperviseEvent" class="diy-button--white" size="small">批量删除</el-button>
</div>
<el-table :data="tableData" border class="m-table-item" style="width: 100%"
@selection-change="handleSelectionChange" :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="publicationDept" align="center" label="发布部门" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="typeName" align="center" width="110" label="征集领域"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="subjectTitle" label="专题标题" min-width="140" align="center"
:show-overflow-tooltip="true" />
<el-table-column prop="status" align="center" width="100" label="状态"
:show-overflow-tooltip="true">
<template slot-scope="scope" >
{{ scope.row.status=='1'?'征集中':'征集结束' }}
</template>
</el-table-column>
<el-table-column prop="eventNum" align="center" width="110" label="提交建议数"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<el-button type="text" @click="onClickOpinion(scope.row,'optionList')">{{ scope.row.eventNum }}</el-button>
</template>
</el-table-column>
<el-table-column prop="publicationPeopleName" align="center" label="专题发布人"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="publicationTime" align="center" label="专题发布时间"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="280">
<template slot-scope="scope">
<el-button @click="handleDispose(scope.row)" type="text" size="small" class="">查看</el-button>
<el-button v-if="scope.row.status == '1'" @click="handleOpenClose(scope.row)" type="text" size="small">关闭征集</el-button>
<el-button v-if="scope.row.status == '0'" @click="handleOpenClose(scope.row)" type="text" size="small">开启征集</el-button>
<el-button @click="handleDel(scope.row)"
type="text" size="small" class="">删除</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="showType=='optionList'">
<suggestionList :optionDate="optionDate"></suggestionList>
</div>
<el-dialog :title="formTitle" :visible.sync="showSupervise" width="850px" top="5vh" append-to-body class="dialog-h"
:close-on-click-modal="false">
<add v-if="showSupervise" ref="speclialAdd" @showAddClose="showAddClose"></add>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import add from "./cpts/add.vue";
import suggestionList from "./cpts/suggestionList.vue";
import axios from "axios";
export default {
components: {
add,suggestionList
},
data() {
let orgOptionProps = {
emitPath: false,
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
}
return {
SpecialList:[],
formData: {
publicationTimeStart:"",
publicationTimeEnd:"",
agencyId: "",
clientType:"web",
typeCode:"",
subjectTitle:"",
subjectContent:"",
publicationPeople:"",
publicationTimeStart:"",
publicationTimeEnd:"",
publicationPeople:""
},
orgOptionProps,
showType:"zhuanti",
tableData: [
],
formTitle:"",
user: {},
agencyId: "",
gridList: [], //list--
online: 0,
orgOptions: [],
level: '',
optionsG: [],
sarr: [],
UrgeList:[
{
value: 0,
label: "已催办",
},
{
value: 1,
label: "未催办",
},
],
statusArray: [
{
value: "processing",
label: "处理中",
},
{
value: "closed_case",
label: "已完成",
},
],
Publicvoting:[
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
statusArray: [
{
value: "processing",
label: "处理中",
},
{
value: "closed_case",
label: "已完成",
},
],
typeArray: [
{
value: "1",
label: "难点痛点",
},
{
value: "2",
label: "矛盾纠纷",
},
{
value: "3",
label: "自身问题",
},
{
value: "4",
label: "超出服务范围",
},
],
overPeriodArray: [
{
value: "0",
label: "2天以下",
},
{
value: "1",
label: "3-4天",
},
{
value: "2",
label: "4天以上",
},
],
qudaoArray: [
{
value: "0",
label: "综治网格事件",
},
{
value: "1",
label: "诚心办事件",
},
{
value: "2",
label: "城管事件",
},
{
value: "3",
label: "信访事件",
}
],
keyProblemList:[
{label:'违章拉客',value:'0'},
{label:'违章停车',value:'1'}
],
cateOptions: [],
optionProps: {
multiple: true,
checkStrictly: false,
emitPath: false,
children: 'children',
label: 'categoryName',
value: 'id',
},
eventTypeCheck: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
eventId: "",
optionDate:{},
searchH: 180,
eventDetailData: {},
showVoice: false,
showSupervise: false,
selVoiceUrl: "",
ids: [],
superviseFrom:{
content: "",
},
};
},
computed: {
maxTableHeight() {
const h = this.clientHeight - this.searchH - 275 + this.iframeHeight;
const _h = this.clientHeight - 275 - this.searchH;
return this.$store.state.inIframe ? h : _h;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
"formData.endTime": function (val) {
if (val && val != "") {
let arrayTemp = val.split(" ");
this.formData.endTime = arrayTemp[0] + " 23:59:59";
}
},
},
mounted() {
this.user = this.$store.state.user;
this.agencyId = this.user.agencyId;
this.getOrgTreeList()
// this.getGridList()
this.getTableData();
// this.getCateOptions();
this.getSpecialList()
},
methods: {
//
getOrgTreeList () {
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.orgOptions = []
this.orgOptions.push(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
//
async getSpecialList() {
const url = "/sys/dict/data/dictlist";
const { data, code, msg } = await requestPost(url, {
dictType: "solicitation_fields",
});
if (code === 0) {
this.SpecialList = data || [];
} else {
this.$message.error(msg);
}
},
onClickOpinion(row,type){
this.$router.push({
name: "suggestionList", query: {
id: row.id,
}
});
// console.log(row,type,"sdfkljdslf");
// this.optionDate={},
// this.optionDate=row
// this.showType=type
},
handleSuperviseEvent(){
let message = "确认删除?";
this.$confirm(message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const url = "/governance/icEventSpecialSubject/delete";
const formData = new FormData();
this.ids.forEach(item=>{
console.log(item,"ds;flk;sd");
formData.append('ids',item.ids)
}
)
requestPost(url, formData).then(res=>{
if (res.code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
})
})
.catch((err) => { });
},
async handleOpenClose(row){
let url = '/governance/icEventSpecialSubject/update'
if (row.status=="0") {
const params={
status: "1",
id:row.id
}
const { data, code, msg } = await requestPost(url,params)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功',
})
this.getTableData()
} else {
this.$message.error(msg)
}
}else{
const params={
status: "0",
id:row.id
}
const { data, code, msg } = await requestPost(url,params)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功',
})
this.getTableData()
} else {
this.$message.error(msg)
}
}
},
showAddClose(){
this.showSupervise=false
this.getTableData()
},
handleEventType(val) {
const nodes = this.$refs.cascaderEvent.getCheckedNodes();
this.formData.firstIdList = [];
this.formData.secondIdList = [];
let level1 = nodes.filter((item) => item.level === 1);
let level2 = nodes.filter((item) => item.level === 2);
level1.forEach((item) => {
if (item.hasChildren) {
for (let i = level2.length - 1; i >= 0; i--) {
if (level2[i].parent.value === item.value) level2.splice(i, 1);
}
}
});
this.formData.firstIdList = level1.map((item) => item.value);
this.formData.secondIdList = level2.map((item) => item.value);
},
handleSelectionChange(val) {
console.log(val,"dsfd");
this.ids = [];
val.forEach((element) => {
this.ids.push({'ids':element.id});
});
console.log(val,
this.ids,"handleSuperviseEvent");
},
handleSearch(val) {
this.pageNo = 1;
this.getTableData();
},
async handleExport() {
const url = "/governance/icEventOld/export";
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...formData,
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
})
.catch((err) => {
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
},
async handleAdd() {
this.showSupervise = true;
this.formTitle = "新增"
this.$nextTick(() => {
this.$refs.speclialAdd.initForm("add", null);
});
},
async handleDispose(row) {
this.showSupervise = true;
this.formTitle = "编辑"
this.$nextTick(() => {
this.$refs.speclialAdd.initForm("edit", row);
});
},
handleClose() {
this.getTableData();
},
async handleDel(rowData) {
let message = "确认删除?";
this.$confirm(message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.delSpecial(rowData.id);
})
.catch((err) => { });
},
async delSpecial(eventId) {
const url = "/governance/icEventSpecialSubject/delete";
const formData = new FormData();
formData.append('ids', eventId) ;
requestPost(url, formData).then(res => {
if (res.code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
})
},
async getTableData() {
const url = "/governance/icEventSpecialSubject/page";
console.log(this.formData,"formData");
// }
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...formData,
});
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
// this.tableData.forEach(item => {
// if (item.operationType === '2') {
// item.operationTypeShow = ''
// }
// if (item.operationType === '1') {
// item.operationTypeShow = ''
// }
// if (item.operationType === '0') {
// item.operationTypeShow = ''
// }
// });
} else {
this.$message.error(msg);
}
},
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
resetSearch() {
this.formData = {
agencyId: "",
clientType:"web",
typeCode:"",
subjectTitle:"",
subjectContent:"",
publicationPeople:"",
publicationTimeStart:"",
publicationTimeEnd:""
};
this.eventTypeCheck = [];
this.pageNo = 1;
this.getTableData();
// this.loadTable()
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";
.m-search {
.u-item-width-normal {
width: 200px;
}
}
::v-deep .el-dropdown__caret-button {
height: 30px;
}
::v-deep .el-image-viewer__close {
top: 129px;
right: 129px;
width: 40px;
height: 40px;
font-size: 40px;
color: #fff;
}
</style>
<style>
.row-over-period-0 {
background-color: #ffffe0 !important; /* 淡黄色 */
}
.row-over-period-1 {
background-color: #ffebcd !important; /* 淡橙色 */
}
.row-over-period-2 {
background-color: #ffc0cb !important; /* 淡红色 */
}
.row-default {
background-color: #e0ffe0 !important; /* 淡绿色 */
}
</style>

407
src/views/modules/workSys/icEventIdeaCategory/index.vue

@ -0,0 +1,407 @@
<template>
<div class="role-container resi-container">
<el-card class="flex1 resi-card-table">
<div class="resi-row-btn">
<!-- <div v-if="isManager" class="resi-row-btn"> -->
<!-- 上下拖动可改变角色顺序
<el-button style="margin-left:10px"
type="primary"
size="small"
@click="handleSaveSort" class="diy-button--white">保存顺序</el-button> -->
<el-button type="primary" size="small" @click="handleAdd" class="diy-button-add">新增</el-button>
</div>
<el-table ref="roleTable" v-loading="loading1" :data="tableData" border :height="tableHeight"
class="resi-table" style="width: 100%;margin-top:20px">
<el-table-column label="序号" type="index" header-align="left" align="left" width="50"></el-table-column>
<el-table-column prop="categoryName" header-align="left" align="left" label="分类名称"
width="250"></el-table-column>
<el-table-column prop="status" label="状态" header-align="left" align="left">
<template slot-scope="scope">
<p style="color:red" v-if="scope.row.revision===0">{{'可用'}}</p>
<p v-else>{{'禁用'}}</p>
</template>
</el-table-column>
<el-table-column prop="categoryTypeName" label="类型" header-align="left" align="left">
</el-table-column>
<el-table-column v-if="isManager" width="450" label="操作">
<template slot-scope="scope">
<el-button v-if="scope.row.revision===0" type="text" size="small"
class="div-table-button--detail" @click="confirmChangeState(scope.row,'1')">禁用</el-button>
<el-button v-if="scope.row.revision===1" type="text" size="small"
class="div-table-button--detail" @click="confirmChangeState(scope.row,'0')">启用</el-button>
<el-button type="text" size="small" class="div-table-button--edit"
@click="handleEdit(scope.row)">修改</el-button>
<el-button type="text" size="small" class="div-table-button--delete"
@click="confirmDel(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="diaShow" :close-on-click-modal="false" :close-on-press-escape="false"
:title="diaTitle" width="750px" top="5vh" class="dialog-h" @closed="diaClose">
<div class="div_duty dialog-h-content scroll-h" v-if="diaShow">
<el-form label-width="100px">
<!-- <el-form-item label="分类归属类别">
<el-select v-model="formData.categoryType" placeholder="请选择">
<el-option v-for="item in categoryTypeList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="分类名称">
<el-input v-model.trim="formData.categoryName" type="textarea" maxlength="100" :rows="2"
style="width: 300px"></el-input>
</el-form-item>
</el-form>
</div>
<div class="resi-btns">
<el-button size="small" @click="diaShow=false">取消</el-button>
<el-button type="primary" size="small" @click="saveCategory">提交</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Sortable from 'sortablejs'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
export default {
name: 'RoleList',
props: {},
data () {
return {
categoryTypeList:[
{
label:"日常意见征集标题",
value:"ideaTitleType"
},
{
label:"意见征集身份",
value:"ideaIdentityType"
}
],
loading1: false,
roleList: [],//
customerId: '',//id
formData:{
categoryName:"",
revision:"",
categoryType:"ideaIdentityType"
},
selCategoryId: '',
tableData: [],
isManager: false,
//
formType: 'A',/// A/U
diaTitle: '新增分类',
categoryName: '',
diaShow: false,
}
},
async mounted () {
this.roleList = localStorage.getItem('roleList')
this.customerId = this.$store.state.user.customerId
console.log(this.roleList)
console.log(this.customerId)
if (this.roleList.indexOf('root_manager') > -1) {
this.isManager = true
} else {
this.isManager = true
}
await this.loadList()
await this.dragRoleSort()
},
computed: {
tableHeight () {
const h = this.clientHeight - 220 + this.iframeHeigh
const _h = this.clientHeight - 220
return this.$store.state.inIframe ? h : _h
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
//
async loadList () {
// const url = "/gov/voice/guideccategory/getcategory"
const url = "/governance/icEventIdeaCategory/page"
const params = {
pageSize:this.pageSize,
...this.formData,
customerId: this.customerId,
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.tableData = data.list
} else {
this.$message.error(msg)
}
},
//
handleAdd () {
this.diaTitle = '新增分类'
this.diaShow = true
this.formData.categoryName = ''
this.selCategoryId = ''
this.formType = 'Add'
},
//
handleEdit (row) {
this.diaTitle = '编辑分类'
this.diaShow = true
this.selCategoryId = row.id
this.formData.categoryName = row.categoryName
this.formType = 'Update'
},
//
async saveCategory () {
let url = ''
let params = {
categoryType: "ideaIdentityType"
}
if (this.formType === 'Update') {
url = "/governance/icEventIdeaCategory/update"
params.id = this.selCategoryId
params.categoryName= this.formData.categoryName
} else {
params.categoryName= this.formData.categoryName,
url = "/governance/icEventIdeaCategory/save"
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('操作成功')
this.formData.categoryName=""
this.diaShow = false
this.loadList()
} else {
this.$message.error(msg)
}
},
confirmChangeState (row, state) {
this.$confirm('确认修改分类状态', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.handelChangeState(row, state)
})
},
//
async handelChangeState(row, state) {
const url = "/governance/icEventIdeaCategory/update"
const params = {
revision: state,
id: row.id
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('操作成功')
this.loadList()
} else {
this.$message.error(msg)
}
},
confirmDel (row) {
this.$confirm('确认删除当前分类', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.handelDel(row)
})
},
//
async handelDel (row) {
const url = "/governance/icEventIdeaCategory/delete"
// const params = {
// ids: row.id,
// // customerId: this.customerId
// }
const formData = new FormData(); //FormDataappend('key', value)
formData.append('ids', [row.id]); //
const { data, code, msg } = await requestPost(url, formData)
if (code === 0) {
this.$message.success('删除成功')
this.loadList()
} else {
this.$message.error(msg)
}
},
//
diaClose () {
this.selCategoryId = ''
this.diaTitle = ''
this.categoryName = ''
this.diaShow = false
},
//
handelChangeDuty (row) {
this.selCategoryId = row.id
this.description = row.description
this.roleName = row.roleName
this.diaShow = true
},
handleChangeName (row) {
row.isEdit = true
},
dragRoleSort () {
const el = this.$refs.roleTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
this.sortTable = Sortable.create(el, {
group: 'dragTable',
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
// setData: function(dataTransfer, dragEl) {
// dataTransfer.setData("Text", dragEl.textContent);
// },
delay: 0,
onChange: evt => {
// console.log(evt)
},
onEnd: evt => {
const targetRow = this.tableData.splice(evt.oldIndex, 1)[0]
this.tableData.splice(evt.newIndex, 0, targetRow)
}
})
},
//
async handleSaveSort () {
const url = "/gov/voice/guidecategory/saveorder"
let params = {
orderList: this.tableData.map((item, index) => {
let obj = {
id: item.id,
orderIndex: index,
}
return obj
})
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('操作成功')
this.loadList()
} else {
this.$message.error(msg)
}
// let data = {
// roleIdList: this.tableData.map(item => {
// return item.id
// })
// }
// this.$http
// .post('/epmetuser/govstaffrole/savedefaultsort', data)
// .then(({ data: res }) => {
// console.log('ressss', res)
// if (res.code === 0 && res.msg === 'success') {
// this.$message({
// type: 'success',
// message: ''
// })
// this.loadList()
// } else {
// this.$message({
// type: 'error',
// message: res.msg
// })
// }
// })
}
}
}
</script>
<style lang="scss" scoped>
// .resi-container .resi-card-table {
// ::v-deep .el-table th {
// }
// }
// .resi-table {
// ::v-deep .el-button--text {
// }
// ::v-deep .btn-color-del {
// }
// ::v-deep .btn-color-edit {
// }
// }
.role-container,
.role-flex {
display: flex;
}
.flex1 {
flex: 1;
}
.now-name {
/* display: flex;
justify-content: space-between; */
margin-bottom: 10px;
margin-left: 10px;
}
.aui-wrapper .el-card + .el-card {
margin-top: 0;
}
.role-container .el-dialog__body {
padding: 0 20px 20px;
}
.div_duty {
margin-top: 30px;
/* height: 300px;
position: relative; */
}
.div_btn {
position: absolute;
bottom: 30px;
right: 15px;
}
</style>

407
src/views/modules/workSys/ideaIdentity/index.vue

@ -0,0 +1,407 @@
<template>
<div class="role-container resi-container">
<el-card class="flex1 resi-card-table">
<div class="resi-row-btn">
<!-- <div v-if="isManager" class="resi-row-btn"> -->
<!-- 上下拖动可改变角色顺序
<el-button style="margin-left:10px"
type="primary"
size="small"
@click="handleSaveSort" class="diy-button--white">保存顺序</el-button> -->
<el-button type="primary" size="small" @click="handleAdd" class="diy-button-add">新增</el-button>
</div>
<el-table ref="roleTable" v-loading="loading1" :data="tableData" border :height="tableHeight"
class="resi-table" style="width: 100%;margin-top:20px">
<el-table-column label="序号" type="index" header-align="left" align="left" width="50"></el-table-column>
<el-table-column prop="categoryName" header-align="left" align="left" label="分类名称"
width="250"></el-table-column>
<el-table-column prop="status" label="状态" header-align="left" align="left">
<template slot-scope="scope">
<p style="color:red" v-if="scope.row.revision===0">{{'可用'}}</p>
<p v-else>{{'禁用'}}</p>
</template>
</el-table-column>
<el-table-column prop="categoryTypeName" label="类型" header-align="left" align="left">
</el-table-column>
<el-table-column v-if="isManager" width="450" label="操作">
<template slot-scope="scope">
<el-button v-if="scope.row.revision===0" type="text" size="small"
class="div-table-button--detail" @click="confirmChangeState(scope.row,'1')">禁用</el-button>
<el-button v-if="scope.row.revision===1" type="text" size="small"
class="div-table-button--detail" @click="confirmChangeState(scope.row,'0')">启用</el-button>
<el-button type="text" size="small" class="div-table-button--edit"
@click="handleEdit(scope.row)">修改</el-button>
<el-button type="text" size="small" class="div-table-button--delete"
@click="confirmDel(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="diaShow" :close-on-click-modal="false" :close-on-press-escape="false"
:title="diaTitle" width="750px" top="5vh" class="dialog-h" @closed="diaClose">
<div class="div_duty dialog-h-content scroll-h" v-if="diaShow">
<el-form label-width="100px">
<!-- <el-form-item label="分类归属类别">
<el-select v-model="formData.categoryType" placeholder="请选择">
<el-option v-for="item in categoryTypeList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="分类名称">
<el-input v-model.trim="formData.categoryName" type="textarea" maxlength="100" :rows="2"
style="width: 300px"></el-input>
</el-form-item>
</el-form>
</div>
<div class="resi-btns">
<el-button size="small" @click="diaShow=false">取消</el-button>
<el-button type="primary" size="small" @click="saveCategory">提交</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Sortable from 'sortablejs'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
export default {
name: 'RoleList',
props: {},
data () {
return {
categoryTypeList:[
{
label:"日常意见征集标题",
value:"ideaTitleType"
},
{
label:"意见征集身份",
value:"ideaTitleType"
}
],
loading1: false,
roleList: [],//
customerId: '',//id
formData:{
categoryName:"",
revision:"",
categoryType:"ideaTitleType"
},
selCategoryId: '',
tableData: [],
isManager: false,
//
formType: 'A',/// A/U
diaTitle: '新增分类',
categoryName: '',
diaShow: false,
}
},
async mounted () {
this.roleList = localStorage.getItem('roleList')
this.customerId = this.$store.state.user.customerId
console.log(this.roleList)
console.log(this.customerId)
if (this.roleList.indexOf('root_manager') > -1) {
this.isManager = true
} else {
this.isManager = true
}
await this.loadList()
await this.dragRoleSort()
},
computed: {
tableHeight () {
const h = this.clientHeight - 220 + this.iframeHeigh
const _h = this.clientHeight - 220
return this.$store.state.inIframe ? h : _h
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
//
async loadList () {
// const url = "/gov/voice/guideccategory/getcategory"
const url = "/governance/icEventIdeaCategory/page"
const params = {
pageSize:this.pageSize,
...this.formData,
customerId: this.customerId,
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.tableData = data.list
} else {
this.$message.error(msg)
}
},
//
handleAdd () {
this.diaTitle = '新增分类'
this.diaShow = true
this.formData.categoryName = ''
this.selCategoryId = ''
this.formType = 'Add'
},
//
handleEdit (row) {
this.diaTitle = '编辑分类'
this.diaShow = true
this.selCategoryId = row.id
this.formData.categoryName = row.categoryName
this.formType = 'Update'
},
//
async saveCategory () {
let url = ''
let params = {
categoryType: "ideaTitleType"
}
if (this.formType === 'Update') {
url = "/governance/icEventIdeaCategory/update"
params.id = this.selCategoryId
params.categoryName= this.formData.categoryName
} else {
params.categoryName= this.formData.categoryName,
url = "/governance/icEventIdeaCategory/save"
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('操作成功')
this.formData.categoryName=""
this.diaShow = false
this.loadList()
} else {
this.$message.error(msg)
}
},
confirmChangeState (row, state) {
this.$confirm('确认修改分类状态', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.handelChangeState(row, state)
})
},
//
async handelChangeState(row, state) {
const url = "/governance/icEventIdeaCategory/update"
const params = {
revision: state,
id: row.id
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('操作成功')
this.loadList()
} else {
this.$message.error(msg)
}
},
confirmDel (row) {
this.$confirm('确认删除当前分类', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.handelDel(row)
})
},
//
async handelDel (row) {
const url = "/governance/icEventIdeaCategory/delete"
// const params = {
// ids: row.id,
// // customerId: this.customerId
// }
const formData = new FormData(); //FormDataappend('key', value)
formData.append('ids', [row.id]); //
const { data, code, msg } = await requestPost(url, formData)
if (code === 0) {
this.$message.success('删除成功')
this.loadList()
} else {
this.$message.error(msg)
}
},
//
diaClose () {
this.selCategoryId = ''
this.diaTitle = ''
this.categoryName = ''
this.diaShow = false
},
//
handelChangeDuty (row) {
this.selCategoryId = row.id
this.description = row.description
this.roleName = row.roleName
this.diaShow = true
},
handleChangeName (row) {
row.isEdit = true
},
dragRoleSort () {
const el = this.$refs.roleTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
this.sortTable = Sortable.create(el, {
group: 'dragTable',
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
// setData: function(dataTransfer, dragEl) {
// dataTransfer.setData("Text", dragEl.textContent);
// },
delay: 0,
onChange: evt => {
// console.log(evt)
},
onEnd: evt => {
const targetRow = this.tableData.splice(evt.oldIndex, 1)[0]
this.tableData.splice(evt.newIndex, 0, targetRow)
}
})
},
//
async handleSaveSort () {
const url = "/gov/voice/guidecategory/saveorder"
let params = {
orderList: this.tableData.map((item, index) => {
let obj = {
id: item.id,
orderIndex: index,
}
return obj
})
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('操作成功')
this.loadList()
} else {
this.$message.error(msg)
}
// let data = {
// roleIdList: this.tableData.map(item => {
// return item.id
// })
// }
// this.$http
// .post('/epmetuser/govstaffrole/savedefaultsort', data)
// .then(({ data: res }) => {
// console.log('ressss', res)
// if (res.code === 0 && res.msg === 'success') {
// this.$message({
// type: 'success',
// message: ''
// })
// this.loadList()
// } else {
// this.$message({
// type: 'error',
// message: res.msg
// })
// }
// })
}
}
}
</script>
<style lang="scss" scoped>
// .resi-container .resi-card-table {
// ::v-deep .el-table th {
// }
// }
// .resi-table {
// ::v-deep .el-button--text {
// }
// ::v-deep .btn-color-del {
// }
// ::v-deep .btn-color-edit {
// }
// }
.role-container,
.role-flex {
display: flex;
}
.flex1 {
flex: 1;
}
.now-name {
/* display: flex;
justify-content: space-between; */
margin-bottom: 10px;
margin-left: 10px;
}
.aui-wrapper .el-card + .el-card {
margin-top: 0;
}
.role-container .el-dialog__body {
padding: 0 20px 20px;
}
.div_duty {
margin-top: 30px;
/* height: 300px;
position: relative; */
}
.div_btn {
position: absolute;
bottom: 30px;
right: 15px;
}
</style>
Loading…
Cancel
Save