Browse Source

Merge branch 'feature' of http://120.46.222.128:10021/elink-star/epmet-work-pc into feature-7-31

feature
是小王呀\24601 1 year ago
parent
commit
dda2794a24
  1. 5
      .env.test
  2. 6
      package.json
  3. 3
      src/assets/scss/modules/shequzhili/event-info-visiual.scss
  4. 57
      src/assets/scss/modules/shequzhili/event-info.scss
  5. 69
      src/js/columns/constants/index.js
  6. 3
      src/main.js
  7. 180
      src/views/components/resiSearch.vue
  8. 2
      src/views/dataBoardMain/main-content.vue
  9. 8
      src/views/modules/base/classification/index.vue
  10. 5
      src/views/modules/base/community/roomForm.vue
  11. 7
      src/views/modules/base/diyInfo.vue
  12. 1
      src/views/modules/base/organization/organization.vue
  13. 64
      src/views/modules/base/resi.vue
  14. 2
      src/views/modules/base/smartImport/cpts/executeTask.vue
  15. 2
      src/views/modules/base/smartImport/index.vue
  16. 2
      src/views/modules/base/virtualResi.vue
  17. 2
      src/views/modules/communityParty/comPromotion/index.vue
  18. 817
      src/views/modules/shequzhili/Delivery/index.vue
  19. 41
      src/views/modules/shequzhili/analysis/TableRow.vue
  20. 425
      src/views/modules/shequzhili/analysis/css/index.scss
  21. BIN
      src/views/modules/shequzhili/analysis/img/eventNum.png
  22. BIN
      src/views/modules/shequzhili/analysis/img/eventSumNum.png
  23. BIN
      src/views/modules/shequzhili/analysis/img/overdue.png
  24. BIN
      src/views/modules/shequzhili/analysis/img/perp.png
  25. 1375
      src/views/modules/shequzhili/analysis/index.vue
  26. 292
      src/views/modules/shequzhili/event/cpts/event-detail.vue
  27. 383
      src/views/modules/shequzhili/event/cpts/event-info.vue
  28. 159
      src/views/modules/shequzhili/event/cpts/process-form-assign.vue
  29. 525
      src/views/modules/shequzhili/event/cpts/process-form-complete.vue
  30. 309
      src/views/modules/shequzhili/event/cpts/process-form-contact.vue
  31. 725
      src/views/modules/shequzhili/event/cpts/process-form-demand.vue
  32. 265
      src/views/modules/shequzhili/event/cpts/process-form-issue.vue
  33. 291
      src/views/modules/shequzhili/event/cpts/process-form-process.vue
  34. 667
      src/views/modules/shequzhili/event/cpts/process-form-project.vue
  35. 297
      src/views/modules/shequzhili/event/cpts/process-form-replay-end.vue
  36. 218
      src/views/modules/shequzhili/event/cpts/process-form-replay.vue
  37. 167
      src/views/modules/shequzhili/event/cpts/process-form.vue
  38. 20
      src/views/modules/shequzhili/event/eventList.vue
  39. 804
      src/views/modules/shequzhili/eventHandling/index.vue
  40. 131
      src/views/modules/shequzhili/timeOut/Urging.vue
  41. 825
      src/views/modules/shequzhili/timeOut/index.vue
  42. 3
      src/views/modules/workSys/role/roleForm.vue

5
.env.test

@ -0,0 +1,5 @@
NODE_ENV=test
VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
VUE_APP_BIPASS_API_SERVER = https://epmet-test.elinkservice.cn/linkdata/linkdata-gateway/route
VUE_APP_NODE_ENV=test
VUE_APP_PUBLIC_PATH=epmet-work-pc

6
package.json

@ -10,6 +10,7 @@
"build:uat": "vue-cli-service build --mode production.uat",
"build:preview": "vue-cli-service build --mode preview",
"build:prod": "vue-cli-service build --mode production",
"build:test": "vue-cli-service build --mode test",
"build:shibei_prod": "vue-cli-service build --mode shibei_production",
"lint": "vue-cli-service lint",
"et": "node_modules/.bin/et",
@ -62,7 +63,9 @@
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.0.7",
"vuex": "^3.1.1",
"xlsx": "^0.17.1"
"xlsx": "^0.17.1",
"increase-memory-limit": "^1.0.7",
"dayjs": "^1.11.7"
},
"devDependencies": {
"@antv/f2": "^3.8.10-beta.1",
@ -81,6 +84,7 @@
"script-loader": "^0.7.2",
"style-loader": "^3.3.3",
"tinymce": "5.8.2",
"increase-memory-limit": "^1.0.7",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {

3
src/assets/scss/modules/shequzhili/event-info-visiual.scss

@ -275,7 +275,8 @@
.m-process {
width: 400px;
padding-left:2px;
box-sizing: border-box;
.process-title {
margin-bottom: 25px;
margin-left: -5px;

57
src/assets/scss/modules/shequzhili/event-info.scss

@ -159,8 +159,17 @@
margin-left: 20px;
}
}
.flex{
display: flex;
flex-flow: wrap;
width: 100%;
.item{
margin-right: 10px;
}
}
.cell-width-1{
width: 250px
width: 210px
}
.cell-width-long{
width: 450px
@ -176,6 +185,9 @@
margin-left: 10px;
width: 150px;
}
.item_width_4 {
width: 140px;
}
.process-form{
margin-top:20px;
@ -359,10 +371,10 @@
margin-top: 15px;
margin-left: 15px;
width: 400px;
height: 400px;
overflow: auto;
padding-top: 10px;
overflow: auto;
padding-top: 10px;
padding-left: 2px;
box-sizing: border-box;
.process-title {
margin-bottom: 25px;
margin-left: -5px;
@ -521,7 +533,24 @@
.m-top {
display: flex;
}
.m-top1 {
display: flex;
flex-direction: row;
justify-content: space-between;
.top-one{
display: flex;
flex-direction: row;
justify-content:flex-start;
.top-one-left{
padding: 6px;
display: flex;
flex-direction: column;
}
}
}
.m-chart {
min-height: 220px;
}
@ -575,4 +604,20 @@
width: 250px;
}
.uploadList{
width: 99%;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
>div{
display: flex;
color: #606266;
align-items: center;
justify-content: space-between;
width: 100%;
&:hover{
background-color: #f5f7fa;
}
}
}

69
src/js/columns/constants/index.js

@ -33,6 +33,16 @@ export const binaryOptionList = [
value: 0
}
]
export const binaryOptionListReverse = [
{
label: '是',
value: 0
},
{
label: '否',
value: 1
}
]
export const politicsStatusList = [
{
label: '中国共产党党员',
@ -115,4 +125,61 @@ export const completeList = [
label: '已完成并取消风险标记',
value: 2
}
]
]
export const nonComplianceType = [
{
label: '已进入信访程序',
value: 0
},
{
label: '已进入诉讼、仲裁、纪检监察、行政、复议政府信息公开等程序',
value: 1
},
{
label: '不符合法律、法规、规章及政策规定',
value: 2
},
{
label: '涉及国家秘密、工作秘密、商业秘密、个人隐私',
value: 3
},
{
label: '违反社会工序良俗等其他情况',
value: 4
}
]
export const satisfactionType = [
{
label: '满意',
value: 'perfect'
},
{
label: '基本满意',
value: 'good'
},
{
label: '不满意',
value: 'bad'
}
]
export const noSatisfactionType = [
{
label: '未回复',
value: 0
}, {
label: '服务态度差',
value: 1
},
{
label: '推诿扯皮',
value: 2
},
{
label: '处理不及时',
value: 3
},
{
label: '其他',
value: 4
}
]

3
src/main.js

@ -48,6 +48,7 @@ import PopTips from "@/components/PopTips/index.vue";
import PopHomeTip from "@/components/PopHomeTip/index.vue";
import NameSplit from "@/components/NameSplit/index.vue";
import RelationGraph from "relation-graph";
import dayjs from 'dayjs'
// import AddNodeJw from "@/components/JwTree/addNode.vue";
//按钮
@ -103,7 +104,7 @@ Vue.directive("fixed", {
// 挂载全局
Vue.prototype.$http = http;
Vue.prototype.$sensitive = desensitization;
Vue.prototype.$dayjs = dayjs
// el-uploader的header配置
Vue.prototype.$getElUploadHeaders = () => ({
Authorization: localStorage.getItem("token") || "",

180
src/views/components/resiSearch.vue

@ -147,6 +147,87 @@
class="u-item-width-daterange u-data-tag" placeholder="结束日期" :picker-options="pickerOptionsEnd">
</el-date-picker>
</el-form-item>
<el-form-item>
<span style="width:100px;text-align: right;padding-right:14px;display: inline-block; ">所属组织:</span>
<el-cascader class="u-item-width-normal"
size="small"
ref="myCascader"
v-model="form.agencyId"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
@change="handleChangeAgency"
clearable></el-cascader>
</el-form-item>
<el-form-item prop="villageId">
<div class="resi-cell">
<div class="resi-cell-value">
<span style="width:100px;text-align: right;padding-right:14px;display: inline-block; ">所属房屋:</span>
<el-select v-model.trim="form.villageId"
placeholder="请选择小区"
size="small"
filterable
clearable
class="u-item-width-communitycascader"
@clear="handleClearVillage"
@change="handleChangeV"
v-el-select-loadmore="loadmore"
>
<el-option v-for="item in optionsV"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model.trim="form.buildId"
placeholder="楼号"
size="small"
filterable
clearable
style="margin-left: 5px"
class="u-item-width-buildcascader"
:disabled="changeVDisabled"
@clear="handleClearBuild"
@change="handleChangeB">
<el-option v-for="item in optionsB"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model.trim="form.unitId"
:disabled="changeBDisabled"
placeholder="单元"
size="small"
filterable
clearable
style="margin-left: 5px"
class="u-item-width-buildcascader"
@click="handleClearDan"
@change="handleChangeD">
<el-option v-for="item in optionsD"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model.trim="form.homeId"
:disabled="changeDDisabled"
placeholder="房号"
size="small"
filterable
clearable
style="margin-left: 5px"
class="u-item-width-buildcascader">
<el-option v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</div>
</el-form-item>
<el-form-item label="备注">
<el-input v-model.trim="form.remark" placeholder="请输入" size="small" class="u-item-width-normal"
clearable></el-input>
@ -671,7 +752,6 @@ export default {
'agencyId ': 'like'
},
sarr: [],
level: '',
showSmartSearchForm: false,
formType: 'add',
@ -844,13 +924,30 @@ export default {
// console.log('formcccc---', this.form)
this.getOrgTreeList()
this.getEducation()
this.getValiheList()
this.getDictList()
this.getHousehold()
this.getNationality()
this.getCareerStatus()
if (this.columnName) this.handleChangeForm(this.columnName)
},
mounted(){
this.$EventBus.$on('handleClickResiTree', async (val) => {
if(val.type === 'agency'){
this.form.agencyId = val.id;
this.optionsV = [];
this.form.villageId = '';
this.form.buildId = '';
await this.getValiheList();
}else if(val.type === 'neighborHood'){
this.form.villageId = val.id;
await this.handleChangeV(val.id)
this.form.buildId = '';
}else if(val.type === 'building'){
this.form.buildId = val.id;
await this.handleChangeB(val.id)
}
})
},
methods: {
handleCategoryChange(newVal, oldVal) {
let formCopy = JSON.parse(JSON.stringify(this.form));
@ -945,63 +1042,8 @@ export default {
else this.form[n] = ''
}
this.agencyIdArray = []
// let arr3 = [...arr1, ...arr]
this.$emit('search', [])
// this.handleSearch()
// this.orgOptions = [];
},
// handleSearch() {
// if (this.showSmartSearchForm) {
// let refObj = this.$refs['ref_rule']
// refObj.getRule()
// } else {
// // debugger
// // console.log('formmmmm---', this.form)
// const itemTypes = ['daterange', 'timerange', 'checkbox']
// let a = this.tempFormList.filter(item => item.itemType != 'inputRange')
// let arr = a.filter(n => n.isChange).map((item) => {
// return {
// queryType: item.queryType,
// tableName: item.tableName,
// columnName: item.columnName,
// columnValue: this.form[item.columnName] &&
// (itemTypes.includes(item.queryType) ||
// itemTypes.includes(item.itemType) || item.multiSelect == 1
// ? this.form[item.columnName]
// : [this.form[item.columnName].toString()])
// }
// })
// const arr2 = arr.filter(item => item.columnValue.length > 0)
// let arr1 = this.fixedList
// .filter((n) => n.columnValue.length > 0)
// .map((item) => {
// return {
// ...item
// }
// })
// var arr4 = []
// var arr3 = [...arr1, ...arr2];
// if (this.timer.startPickerTime && this.timer.endPickerTime) {
// arr4 = [{
// queryType: 'daterange',
// tableName: 'ic_resi_user',
// columnName: 'BIRTHDAY',
// columnValue: [this.timer.startPickerTime || '', this.timer.endPickerTime || '']
// }]
// arr3 = [...arr1, ...arr2, ...arr4]
// } else {
// let i = arr3.findIndex(item => item.columnName == 'BIRTHDAY')
// console.log(i, '');
// arr3 = arr3.splice(i,1)
// console.log(arr3);
// }
// this.$emit('search', arr3)
// arr3 = []
// return arr3
// }
// },
handleAgeChange() {
if (this.form.ageStart&&this.form.ageEnd) {
if (Number(this.form.ageStart) > Number(this.form.ageEnd)) {
@ -1025,17 +1067,13 @@ export default {
}
},
handleChangeAgency(val) {
this.sarr = []
const map = new Map();
this.getLastItem(
this.orgOptions,
val,
"agencyId"
);
this.level = this.sarr[this.sarr.length - 1].level
this.form.level = this.sarr[this.sarr.length - 1].level
this.form.level = this.sarr[this.sarr.length - 1].level;
this.getValiheList()
},
getLastItem(list, vals, key) {
@ -1140,24 +1178,10 @@ export default {
this.getValiheList();
},
getValiheList() {
const { user } = this.$store.state
var agencyIdTemp = ''
if (this.form.agencyId.length == 0) {
agencyIdTemp = ''
} else {
agencyIdTemp = this.form.agencyId[this.form.agencyId.length - 1]
}
var gridIdQuery = '';
var agencyIdQuery = this.form.agencyId[0];
if (this.form.agencyId.length >= 2) {
agencyIdQuery = this.form.agencyId[this.form.agencyId.length - 2];
gridIdQuery = this.form.agencyId[this.form.agencyId.length - 1];
}
this.$http
.post('/actual/base/communityQuarters/listQuartersOptions', {
gridId: gridIdQuery,
agencyId: agencyIdQuery,
gridId: this.form.agencyId,
agencyId: this.$store.state.user.agencyId,
pageNo: this.optionsVPageNo,
pageSize: 20
// agencyId: user.agencyId

2
src/views/dataBoardMain/main-content.vue

@ -1,7 +1,7 @@
<template>
<main class="g-main">
<!-- tab展示内容 -->
<template>
<template>
<template v-if="tabIsIframe($router.currentRoute.meta.iframeURL)">
<iframe :src="$router.currentRoute.meta.iframeURL + '?token=' + token + '&customerId=' + customerId" ref="iframe" class="m-iframe" id="iframe" width="100%" height="100%" frameborder="0" scrolling="yes" :style="{ height: $store.state.fixed1920.height - 100 + 'px' }" />
</template>

8
src/views/modules/base/classification/index.vue

@ -375,7 +375,7 @@
</div>
</div>
</div>
<div class="item">
<div class="item_category" >
<img src="@/assets/images/category/Newclass.png" alt />
@ -634,7 +634,7 @@
<div class="item_row1" @click="handelClickToResi('GRID_MANAGER_FLAG')">
<div class="row_left">网格员</div>
<div class="row_right">
<div class="text">{{ categoryList.gridManagerFlagCount || 0 }}</div>
<div class="text">{{ categoryList.gridMemberFlagCount || 0 }}</div>
<img src="@/assets/images/category/Enter.png" class="img" />
</div>
@ -642,7 +642,7 @@
<div class="item_row2" @click="handelClickTovirtualResi('GRID_MANAGER_FLAG')">
<div class="row_left">网格员(虚拟网格)</div>
<div class="row_right">
<div class="text">{{ categoryList.gridManagerFlagVirtualCount || 0 }}</div>
<div class="text">{{ categoryList.gridMemberFlagVirtualCount || 0 }}</div>
<img src="@/assets/images/category/Enter.png" class="img" />
</div>
</div>
@ -789,4 +789,4 @@ export default {
overflow-x: hidden !important;
}
}
</style>
</style>

5
src/views/modules/base/community/roomForm.vue

@ -479,6 +479,11 @@ export default {
},
//
// onDoorNameInput(content) {
// this.dataForm.doorName = content.replaceAll(/[\u4e00-\u9fa5]/g, '');
// },
resetData () {
this.houseId = '' //ID
this.houseType = '1'

7
src/views/modules/base/diyInfo.vue

@ -141,6 +141,10 @@ export default {
search: {
type: Object,
default: () => {}
},
virtualResi:{
type:Boolean,
default:false
}
},
components: {
@ -331,6 +335,9 @@ export default {
})
}
}
if(this.virtualResi){
params.searchForm.gridType = 'virtual'
}
await this.$http({
method: 'POST',
url,

1
src/views/modules/base/organization/organization.vue

@ -992,6 +992,7 @@
placeholder="请输入联系电话"></el-input>
</el-form-item>
</el-form>
<!-- <div>*部分负责人联系电话可用于接收工作短信通知请如实填写</div> -->
<div slot="footer">
<el-button @click="cancelOrgUnitPop"> </el-button>
<el-button type="primary"

64
src/views/modules/base/resi.vue

@ -7,7 +7,7 @@
<el-tree ref="ref_tree" v-loading="treeLoading" class="filter_tree" :data="treeData" :props="defaultProps"
:highlight-current="true" node-key="id" :expand-on-click-node="false" :filter-node-method="filterNode"
@node-click="handleNodeClick" lazy :auto-expand-parent="true" :default-expanded-keys="autoOpenArr"
:load="lazyLoadTree">
:load="lazyLoadTree" >
<div slot-scope="{ node, data }" class="custom-tree-node">
<!-- <img
v-if="showIcons(data)"
@ -464,7 +464,6 @@ export default {
await this.loadTree();
if (this.treeData.length > 0) {
this.$nextTick(() => {
// ref_tree ref value node-key
this.$refs.ref_tree.setCurrentKey(this.treeData[0].id);
});
}
@ -482,7 +481,6 @@ export default {
var target = event.target;
let textLength = target.clientWidth;
let containerLength = target.scrollWidth;
console.log(textLength, containerLength);
if (textLength < containerLength) {
this.tooltipTitle = event.target.innerText;
this.isShowTooltip = false;
@ -536,7 +534,6 @@ export default {
//
let _obj = JSON.parse(JSON.stringify(this.$refs.myResiSearch.form));
_obj.attentionCrowds = _obj.attentionCrowds.flat()
console.log('213', _obj)
switch (this.valueb) {
case '党员':
_obj.partyFlag = 1
@ -1243,13 +1240,20 @@ export default {
const url = `/actual/base/communityBuilding/tree/search?keyword=${this.filterText}`;
const { data, code, msg } = await requestGet(url);
if (data[0].children.length > 0) {
this.treeData = data;
this.treeData = data;
for (let i in this.treeData[0].children) {
this.autoOpenArr.push(
if(this.treeData[0].children[0].children[0]){
this.autoOpenArr.push(
this.treeData[0].id,
this.treeData[0].children[i].id,
this.treeData[0].children[0].children[0].id
);
}else{
this.autoOpenArr.push(
this.treeData[0].id,
this.treeData[0].children[i].id,
);
}
}
} else {
this.treeData = [];
@ -1296,10 +1300,56 @@ export default {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
async handleNodeClick(obj) {
extractData(node) {
const result = [];
let currentNode = node;
while (currentNode) {
result.push({ id: currentNode.data.id, level: currentNode.data.level });
currentNode = currentNode.parent;
}
return result;
},
traverseTree(tree) {
const results = [];
tree.forEach(node => {
results.push(...this.extractData(node));
if (node.children && node.children.length > 0) {
results.push(...this.traverseTree(node.children));
}
});
return results;
},
async handleNodeClick(obj,node) {
this.selObj = JSON.parse(JSON.stringify(obj));
this.selTreeObj = obj;
await nextTick(1000);
this.$nextTick(async ()=>{
if(obj.level === "building" || obj.level === "neighborHood"){
const gridNode = this.traverseTree([node]);
const gridResult = gridNode.find(item => item.level === 'grid');
const neighborHoodResult = gridNode.find(item => item.level === "neighborHood");
const buildingResult = gridNode.find(item => item.level === "building");
const gridId = gridResult ? gridResult.id : null;
const neighborHoodId = neighborHoodResult ? neighborHoodResult.id : null;
const buildingId = buildingResult ? buildingResult.id : null;
if (gridId) {
await this.$EventBus.$emit('handleClickResiTree', { type: 'agency', id: gridId });
}
await nextTick(500);
if (neighborHoodId) {
await this.$EventBus.$emit('handleClickResiTree', { type: 'neighborHood', id: neighborHoodId });
}
await nextTick(500);
if (buildingId) {
await this.$EventBus.$emit('handleClickResiTree', { type: 'building', id: buildingId });
}
}else{
this.$EventBus.$emit('handleClickResiTree',{type:'agency',id:obj.id})
}
})
this.searchAgencyObj = {};
if (obj.level === "building") {
this.searchAgencyObj.buildId = obj.id;

2
src/views/modules/base/smartImport/cpts/executeTask.vue

@ -30,7 +30,7 @@
></el-icon>
操作说明
</h4>
<p>1导入数据系统需要一定事件处理</p>
<p>1导入数据系统需要一定事件处理</p>
<p>
2导入过程中可查看导入明细如果发现导入数据问题较多可以取消本次导入重新整理数据后重新创建任务导入
</p>

2
src/views/modules/base/smartImport/index.vue

@ -56,7 +56,7 @@
</el-table-column>
<el-table-column prop="importFailNum" align="center" width="80" label="失败数目" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="operatorName" align="center" width="100" label="操作人" :show-overflow-tooltip="true">
<el-table-column prop="createdByName" align="center" width="100" label="操作人" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="completedTime" align="center" width="180" label="操作完成时间"
:show-overflow-tooltip="true">

2
src/views/modules/base/virtualResi.vue

@ -302,7 +302,7 @@
<el-dialog :visible.sync="diyDialog" :close-on-click-modal="false" :close-on-press-escape="false" width="1150px"
top="5vh" class="dialog-h">
<diy-info v-if="diyDialog" ref="ref_diy" :list="exportList" :search="searchForm"
@close="handleDiyClose"></diy-info>
@close="handleDiyClose" :virtualResi="true"></diy-info>
</el-dialog>
<baobiao ref="baobiao" />

2
src/views/modules/communityParty/comPromotion/index.vue

@ -86,7 +86,7 @@
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false" :title="formTitle"
width="950px" top="5vh" class="dialog-h" @closed="diaClose">
width="450px" top="5vh" class="dialog-h" @closed="diaClose">
<add ref="ref_form" v-if="formShow" @dialogCancle="addFormCancle"
@dialogOk="addFormOk"></add>
</el-dialog>

817
src/views/modules/shequzhili/Delivery/index.vue

@ -0,0 +1,817 @@
<template>
<div class="g-main">
<div div v-show="pageType == 'list'">
<div class="m-search">
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'100px'">
<div>
<el-form-item label="事件类别" prop="firstIdList">
<el-cascader ref="cascaderEvent" v-model.trim="formData.firstIdList" :options="cateOptions"
collapse-tags :show-all-levels="false" :props="{
multiple: true,
checkStrictly: true,
emitPath: false,
children: 'children',
label: 'categoryName',
value: 'id',
}" clearable class="u-item-width-normal" />
</el-form-item>
<el-form-item label="工单编号" prop="workOrderNum">
<el-input v-model.trim="formData.workOrderNum" 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="eventContent">
<el-input v-model.trim="formData.eventContent" class="u-item-width-normal" size="small"
clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="派件状态" prop="deliveryStatus">
<el-select v-model.trim="formData.deliveryStatus" clearable class="u-item-width-normal">
<el-option v-for="item in ProcessingList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="办理状态" prop="operationType">
<el-select v-model.trim="formData.operationType" clearable class="u-item-width-normal">
<el-option v-for="item in handleList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="指派部门" prop="departId">
<el-cascader class="u-item-width-normal" size="small" ref="myCascader"
v-model.trim="formData.departId" :options="orgOptions" :props="orgOptionProps"
:show-all-levels="false" @change="handleChangeAgency" clearable></el-cascader>
</el-form-item>
<el-form-item label="办结时限" prop="limitEndTime">
<el-date-picker v-model.trim="formData.limitStartTime" 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.limitEndTime"
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>
<el-dropdown size="small" split-button type="primary" style="margin: 0 10px; height: 30px"
@command="(command) => importTypeChange(command)">
导入
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="0" @click.native="handleExportModule">下载模板</el-dropdown-item>
<el-upload :headers="$getElUploadHeaders()" ref="upload" class="upload-btn"
action="uploadUlr" :limit="1" :accept="'.xls,.xlsx'" :with-credentials="true"
:show-file-list="false" :auto-upload="true" :on-progress="handleProgress"
:on-success="handleExcelSuccess" :before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest">
<el-dropdown-item command="1">上传导入</el-dropdown-item>
</el-upload>
</el-dropdown-menu>
</el-dropdown>
</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="workOrderNum" align="center" label="工单编号" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="categoryAllName" 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="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="statusName" align="center" width="110" label="指派状态"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.status === 'unassigned'">未指派</span>
<span v-else-if="scope.row.status ==='assigned'">已指派</span>
<span v-else-if="scope.row.status ==='closed_case'">已办结</span>
<span v-else="scope.row.status ==='processing'">处理中</span>
</template>
</el-table-column>
<el-table-column prop="operationTypeName" align="center" width="110" label="办理状态"
:show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span v-if="scope.row.handlestatus === 0">未联系当事人</span>
<span v-else-if="scope.row.handlestatus ===1">已联系当事人</span>
<span v-else-if="scope.row.handlestatus ===1">已联系当事人</span>
<span v-else>--</span>
</template> -->
</el-table-column>
<el-table-column prop="deptName" align="center" width="110" label="指定部门"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="limitTime" 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="handleWatch(scope.row)" type="text" size="small" class="">查看</el-button>
<!-- <el-button @click="handleDispose(scope.row)" type="text" size="small" class="">{{scope.row.deliverystatus==0?"派件":"办理"}}</el-button>
-->
<el-button @click="handleDispose(scope.row,'dispose')" type="text" size="small"
v-if="(scope.row.status == 'processing'|| scope.row.status === 'assigned') && scope.row.operationType === '5'">处理</el-button>
<el-button @click="handleDispose(scope.row,'assign')" type="text" size="small"
v-if="scope.row.status =='unassigned'||scope.row.status =='processing'">派件</el-button>
<el-button @click="handleDispose(scope.row,'check')" type="text" size="small"
v-if="scope.row.operationType === '11'">审核</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 == 'assign' || pageType=='check'">
<event-info ref="eleEditForm" :pageType="pageType" :eventId="eventId" :eventDetailData="eventDetailData"
@handleClose="handleClose" @handleOk="handleOk" @dialogOk="handleEditSuccess" />
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import eventInfo from "../event/cpts/event-info.vue";
import axios from "axios";
export default {
data() {
let orgOptionProps = {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
}
return {
pageType: "list", // list add dispose info
user: {},
agencyId: "",
orgOptions: [],
orgOptionProps,
level: '',
optionsG: [],
sarr: [],
ProcessingList: [
{
value: "assigned",
label: "已指派",
},
{
value: "unassigned",
label: "未指派",
},
],
handleList: [
{
value: "8",
label: "未联系当事人",
},
{
value: "9",
label: "已联系当事人",
},
{
value: "10",
label: "办理中",
},
{
value: "11",
label: "已办结待审核",
},
{
value: "12",
label: "已审核归档",
},
],
tableData: [],
statusArray: [
{
value: "processing",
label: "处理中",
},
{
value: "closed_case",
label: "已完成",
},
],
typeArray: [
{
value: "1",
label: "难点痛点",
},
{
value: "2",
label: "矛盾纠纷",
},
{
value: "3",
label: "自身问题",
},
{
value: "4",
label: "超出服务范围",
},
],
qudaoArray: [
{
value: "3",
label: "12345",
}
],
formData: {
agencyId: "",
sourceType: "",
departId:'',
eventContent: "",
name: "",
mobile: "",
startTime: "",
endTime: "",
limitStartTime: "",
limitEndTime: "",
status: "",
firstIdList:[],
operationType:'',
workOrderNum: "",
deliveryStatus:"",
handleStatus:"",
},
cateOptions: [],
eventTypeCheck: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
// endPickerOptions: {
// disabledDate: endDisabledDate,
// },
// startPickerOptions: {
// disabledDate: startDisabledDate,
// },
eventId: "",
searchH: 180,
eventDetailData: {},
showVoice: false,
selVoiceUrl: "",
multipleSelection: [],
importLoading: false,
importType: "1"
};
},
components:{eventInfo},
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";
}
},
"formData.limitEndTime": function (val) {
if (val && val != "") {
let arrayTemp = val.split(" ");
this.formData.limitEndTime = 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();
},
methods: {
handleSelectionChange(val) {
this.multipleSelection = [];
val.forEach((element) => {
this.multipleSelection.push(element.icEventId);
});
},
async handleMarkDiffcult(command) {
const url = "/governance/icEvent/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/icEvent/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);
}
},
handleSearch(val) {
console.log(val,"skjhfjbhjksdh");
this.pageNo = 1;
this.getTableData();
},
//
async handleLook(row) {
let { agencyId, gridId, gridName, name, reportUserId } = row
const resiId = reportUserId;
this.$store.dispatch('saveData', { agencyId, gridId, gridName, 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 handleExport() {
const url = "/governance/icEvent/export";
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...formData,
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
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) => {
return this.$message.error("网络错误");
});
},
async handleAdd() {
this.pageType = "add";
},
async handleWatch(row) {
console.log("row",row);
this.eventId = row.icEventId;
const url = "/governance/icEvent/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) {
console.log(row);
this.eventId = row.icEventId;
const url = "/governance/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
this.pageType = type;
} else {
this.$message.error(msg);
}
},
//
async handleExportModule() {
let url = '/governance/icEvent/downloadTemplate';
let params = {};
await this.$http({
method: 'POST',
url,
responseType: 'blob',
data: params
})
.then(res => {
if (res.headers['content-disposition']) {
let fileName = window.decodeURI(res.headers['content-disposition'].split(';')[1].split('=')[1]);
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
} else this.$message.error('下载失败');
})
.catch(err => {
console.log('err', err);
return this.$message.error('网络错误');
});
},
handleExcelSuccess(res, file) {
if (!res.code === 0 && !res.msg === 'success') {
this.$message.error(res.msg);
}
},
handleProgress(event, file, fileList) {
},
beforeExcelUpload(file) {
const isType = file.type === 'application/vnd.ms-excel';
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
const fileType = isType || isTypeComputer;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!fileType) {
this.$message.error('上传文件只能是xls/xlsx格式!');
}
if (!isLt1M) {
this.$message.error('上传文件大小不能超过 10MB!');
}
return fileType && isLt1M;
},
importTypeChange(val) {
this.importType = val
},
async uploadHttpRequest(file) {
this.importLoading = true;
this.importBtnTitle = '正在上传中...';
this.$message({
showClose: true,
dangerouslyUseHTMLString: true,
message: "导入中,请到系统管理-<a id='clickA' style='cursor: pointer;'>导入记录</a>中查看进度",
duration: 3000
});
let than = this;
document.getElementById('clickA').addEventListener('click', function () {
than.$router.replace('/main/importRecord-index');
});
const formData = new FormData(); //FormDataappend('key', value)
formData.append('file', file.file); //
formData.append('code', ''); //
let url = '/governance/icEvent/importEvent'
if (this.importType == 2) {
url = '/governance/icEvent/importAwo'
}
console.log(url)
await this.$http
.post(url, formData)
.then(res => {
if (res.data.code == 0 && res.data.msg == 'success') {
const data = res.data.data;
this.dataList = [
...Object.keys(data.option.exist).map(k => {
return {
index: k,
srcField: data.option.exist[k],
exist: true,
field: data.option.exist[k]
};
}),
...Object.keys(data.option.notExist).map(k => {
return {
index: k,
srcField: data.option.notExist[k],
exist: false,
field: ''
};
})
];
this.importOption = data.option;
this.importCode = data.code;
this.fileData = file;
} else this.$message.error(res.data.msg);
})
.catch(err => {
console.log('失败', err);
file.onError(); //
});
this.importLoading = false;
this.importBtnTitle = '导入';
this.$refs.upload.clearFiles();
this.getTableData();
},
//
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 handleDel(rowData) {
let message = "确认删除?";
this.$confirm(message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.delEvent(rowData.icEventId);
}).catch((err) => { });
},
async delEvent(eventId) {
const url = "/governance/icEvent/delete";
let idsArr = [eventId];
const { data, code, msg } = await requestPost(url, idsArr);
if (code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
},
async getTableData() {
const url = "/governance/icEvent/list";
// if (this.eventTypeCheck) {
// this.formData.secondIdList = this.eventTypeCheck
// }
console.log(this.formData);
const { pageSize, pageNo, formData } = this;
// formData
const newFormData = { ...formData };
// // agencyId
// if (Array.isArray(newFormData.agencyId) && newFormData.agencyId.length) {
// if (this.level == "grid") {
// newFormData.gridId = newFormData.agencyId[newFormData.agencyId.length - 1];
// newFormData.agencyId = "";
// } else {
// newFormData.agencyId = newFormData.agencyId[newFormData.agencyId.length - 1];
// newFormData.gridId = "";
// }
// } else {
// newFormData.agencyId = "";
// newFormData.gridId = "";
// }
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...newFormData,
});
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";
const { data, code, msg } = await requestPost(url, {});
if (code === 0) {
this.cateOptions = this.deepTree(data, "children");
} else {
this.$message.error(msg);
}
},
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
getOrgTreeList() {
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取组织树成功', res.data)
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 {
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
handleChangeAgency(val) {
this.sarr = []
const map = new Map();
this.getLastItem(
this.orgOptions,
val,
"agencyId"
);
this.level = this.sarr[this.sarr.length - 1].level
this.formData.departId = this.sarr[this.sarr.length - 1].agencyId
},
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);
}
}
}
},
resetSearch() {
this.formData = {
agencyId: "",
gridId: "",
sourceType: "",
eventContent: "",
name: "",
mobile: "",
startTime: "",
endTime: "",
limitStartTime: "",
limitEndTime: "",
status: "",
firstIdList: [],
secondIdList: [],
};
this.eventTypeCheck = [];
this.pageNo = 1;
this.getTableData();
// this.loadTable()
},
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,
};
});
}
},
showAwoList(row) {
this.$refs.awoList.open(row)
}
},
};
</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>

41
src/views/modules/shequzhili/analysis/TableRow.vue

@ -0,0 +1,41 @@
<template>
<tbody>
<tr>
<td v-if="level === 1">{{ item.categoryName }}</td>
<td v-else></td>
<td v-if="level === 2">{{ item.categoryName }}</td>
<td v-else></td>
<td v-if="level === 3">{{ item.categoryName }}</td>
<td v-else></td>
<td v-if="level === 4">{{ item.categoryName }}</td>
<td v-else></td>
<td>{{ item.eventCount }}</td>
<td>{{ item.proportion }}</td>
</tr>
<TableRow
v-for="child in item.children"
:key="child.id"
:item="child"
:level="level + 1"
/>
</tbody>
</template>
<script>
export default {
name: 'TableRow',
props: {
item: {
type: Object,
required: true,
},
level: {
type: Number,
required: true,
},
},
components: {
TableRow: () => import('./TableRow.vue'), //
},
};
</script>

425
src/views/modules/shequzhili/analysis/css/index.scss

@ -0,0 +1,425 @@
.dashboard {
display: flex;
gap: 20px;
}
.card {
width: 280px;
height: 49px;
background: #E6F0FF;
border-radius: 3px;
padding: 20px;
display: flex;
align-items: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.card1 {
width: 284px;
height: 49px;
background: #E6F0FF;
border-radius: 3px;
padding: 20px;
display: flex;
align-items: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.card-icon {
width: 40px;
height: 40px;
margin-right: 10px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
}
.card-icon.total {
background-color: #4a90e2;
}
.card-icon.completed {
background-color: #f5a623;
}
.card-icon.overdue-contact {
background-color: #7ed321;
}
.card-icon.overdue-process {
background-color: #d0021b;
}
.card-content {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.card-content1 {
display: flex;
flex-direction: row;
align-items: flex-start;
}
.card-title {
font-size: 16px;
font-weight: bold;
margin: 0;
}
.card-text {
font-size: 14px;
color: #777;
margin: 5px 0 0 0;
}
.percentage {
font-size: 14px;
color: #777;
margin-left: 5px;
}
.br{
padding: 20px 0;
border-left: #777 solid 1px;
}
.div_room {
// height: calc(88vh - 40px);
// margin-top: 9px;
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
margin-left: 42px;
// margin: 0 21px 0 21px;
.item {
width: 20%;
height: 86px;
background: #f7faff;
border-radius: 6px;
margin: 15px 25px 15px 0;
display: flex;
position: relative;
.item_category {
width: 100%;
display: flex;
align-items: center;
padding: 8px;
> img {
width: 66px;
height: 66px;
}
.item_content {
margin-left: 5px;
width: 100%;
text-align: left;
display: flex;
flex-direction: column;
justify-content: flex-start;
.item_count {
font-size: 28px;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
}
.item_row1 {
border-radius: 4px;
display: flex;
align-items: center;
height: 23px;
.row_left {
font-size: 24px;
font-weight: bold;
color: #333333;
text-align: center;
margin-left: 5px;
white-space: nowrap;
}
.text1{
font-size: 16px;
font-family: PingFang SC;
color: #00BB72;
margin-left:20px
}
.text2{
font-size: 16px;
font-family: PingFang SC;
color: #FF7135;
margin-left:20px
}
.row_right {
margin: 0px 5px 0 0;
cursor: pointer;
display: flex;
flex-direction: row;
.img{
width: 16px;
height: 16px;
margin-top: 2px;
}
}
}
.item_row2 {
border-radius: 4px;
display: flex;
justify-content: space-between;
align-items: center;
height: 23px;
margin-top: 10px;
.row_left {
font-weight: 500;
color: #666666;
text-align: center;
margin-left: 5px;
white-space: nowrap;
}
.row_right {
margin: 0px 5px 0 0;
cursor: pointer;
display: flex;
flex-direction: row;
.img{
width: 16px;
height: 16px;
margin-top: 2px
}
.text{
font-size: 16px;
font-family: PingFang SC;
color: #333333;
padding-left:10px
}
}
}
}
> span {
margin-left: 16px;
font-size: 24px;
}
}
.item_add {
cursor: pointer;
font-size: 24px;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
display: flex;
align-items: center;
padding: 17px 16px;
> img {
width: 86px;
height: 86px;
}
> span {
font-size: 24px;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
margin-left: 16px;
}
}
.icon_circle {
cursor: pointer;
position: absolute;
top: -10px;
right: -10px;
height: 23px;
width: 23px;
background-color: #ffffff;
border-radius: 50%;
border: 1px solid #a5a5a5;
}
.icon_sel {
cursor: pointer;
background-color: #6bb9f8;
border: 1px solid #6bb9f8;
}
}
.item1 {
width: 30%;
height: 86px;
background: #f7faff;
border-radius: 6px;
margin: 15px 25px 15px 0;
display: flex;
position: relative;
.item_category {
width: 100%;
display: flex;
align-items: center;
padding: 8px;
> img {
width: 66px;
height: 66px;
}
.item_content {
margin-left: 5px;
width: 100%;
text-align: left;
display: flex;
flex-direction: column;
justify-content: flex-start;
.item_count {
font-size: 28px;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
}
.row_left1 {
font-size: 24px;
font-weight: bold;
color: #333333;
text-align: center;
margin-left: 5px;
}
.item_row1 {
border-radius: 4px;
display: flex;
align-items: center;
height: 23px;
.row_left1 {
font-size: 24px;
font-weight: bold;
color: #333333;
text-align: center;
margin-left: 5px;
}
.row_left2 {
font-size: 24px;
font-weight: bold;
color: #FF7035;
text-align: center;
margin-left: 5px;
}
.text1{
font-size: 16px;
font-family: PingFang SC;
color: #FDB305;
padding-left:20px
}
.row_right {
margin: 0px 5px 0 0;
cursor: pointer;
display: flex;
flex-direction: row;
.img{
width: 16px;
height: 16px;
margin-top: 2px;
}
}
}
.item_row2 {
border-radius: 4px;
display: flex;
justify-content: space-between;
align-items: center;
height: 23px;
margin-top: 10px;
.row_left {
font-weight: 500;
color: #333333;
text-align: center;
margin-left: 5px;
white-space: nowrap;
}
.row_right {
margin: 0px 5px 0 0;
cursor: pointer;
display: flex;
flex-direction: row;
.img{
width: 16px;
height: 16px;
margin-top: 2px
}
.text{
font-size: 16px;
font-family: PingFang SC;
color: #333333;
padding-left:10px
}
}
}
}
> span {
margin-left: 16px;
font-size: 24px;
}
}
.item_add {
cursor: pointer;
font-size: 24px;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
display: flex;
align-items: center;
padding: 17px 16px;
> img {
width: 86px;
height: 86px;
}
> span {
font-size: 24px;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
margin-left: 16px;
}
}
.icon_circle {
cursor: pointer;
position: absolute;
top: -10px;
right: -10px;
height: 23px;
width: 23px;
background-color: #ffffff;
border-radius: 50%;
border: 1px solid #a5a5a5;
}
.icon_sel {
cursor: pointer;
background-color: #6bb9f8;
border: 1px solid #6bb9f8;
}
}
}

BIN
src/views/modules/shequzhili/analysis/img/eventNum.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/views/modules/shequzhili/analysis/img/eventSumNum.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/views/modules/shequzhili/analysis/img/overdue.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/views/modules/shequzhili/analysis/img/perp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

1375
src/views/modules/shequzhili/analysis/index.vue

File diff suppressed because it is too large

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

@ -1,110 +1,91 @@
<template>
<div class="">
<el-card :style="containerStyle" :class="{ 'box-card': source === 'visiual' }" v-if="showType == ''">
<h3 v-if="source === 'manage'" class="h3-title">
<h3 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>
<span>{{ info.gridName }}</span>
</div>
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">接收时间</span>
<span>{{ info.happenTime }}</span>
</div>
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">工单号</span>
<span>{{ info.workOrderNum }}</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 v-if="info.imageList && info.imageList.length > 0"
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">图片</span>
<img :src="src" :key="src" style="width: 150px; height: 150px; padding-right: 10px"
v-for="src in info.imageList" @click="watchImg(src)" />
</div>
<div v-if="info.voiceList && info.voiceList.length > 0"
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">语音</span>
<audio controls>
<source :src="item.url" type="" :key="item.url" v-for="item in info.voiceList" />
</audio>
</div>
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">上报渠道</span>
<span>{{ info.sourceTypeName }}</span>
</div>
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">详细地址</span>
<span>{{ info.address }}</span>
</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' },]">
<span class="u-info-title-2">标记</span>
<span>{{ info.markTypeName || "--" }}</span>
</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 class="flex-end">
<el-button size="small" icon="el-icon-printer">打印</el-button>
<el-button size="small" icon="el-icon-download">下载</el-button>
</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>
<el-card :class="{ 'box-card': source === 'visiual' }" v-if="info.status === 'closed_case' && !info.satisfactionName
&& user.id === info.createdUserId" style="width: 184%;">
<h3>满意度评价</h3>
<div class="m-detail-main">
<div class="m-info">
<div class="div-satisfy">
<el-radio-group :class="{ 'form-item': source === 'visiual' }" v-model.trim="satisfyLevel"
@change="clickSatisfy">
<el-radio label="good">满意</el-radio>
<el-radio label="perfect">非常满意</el-radio>
<el-radio label="bad">不满意</el-radio>
</el-radio-group>
<div class="flex">
<div class="item">
<div class="label">受理员编号</div>
<div class="value">{{ info.clerkNumber }}</div>
<div class="label">办结时限</div>
<div class="value border-right">{{ info.timeLimit }}</div>
</div>
<div class="item">
<div class="label">工单编号</div>
<div class="value">{{ info.workOrderNum }}</div>
<div class="label">紧急程度</div>
<div class="value border-right">{{ info.exigency }}</div>
</div>
<div class="item">
<div class="label">来电类别</div>
<div class="value">{{ info.callCategory }}</div>
<div class="label">信息来源</div>
<div class="value border-right">{{ info.messageSource }}</div>
</div>
<div class="item">
<div class="label">是否回复</div>
<div class="value">{{ info.replayed }}</div>
<div class="label">是否保密</div>
<div class="value border-right">{{ info.secrecy }}</div>
</div>
<div class="item">
<div class="label">联系人</div>
<div class="value">{{ info.name }}</div>
<div class="label">联系电话</div>
<div class="value border-right">{{ info.mobile }}</div>
</div>
<div class="item">
<div class="label">联系地址</div>
<div class="value flex-1">{{ info.address }}</div>
</div>
<div class="item">
<div class="label">回复备注</div>
<div class="value flex-1">{{ info.replayRemark }}</div>
</div>
<div class="item">
<div class="label">问题分类</div>
<div class="value flex-1">{{ info.categoryAllName }}</div>
</div>
<div class="item">
<div class="label">问题描述</div>
<div class="value flex-1">
{{ info.eventContent }}
</div>
</div>
<div class="item">
<div class="label">指派部门</div>
<div class="value flex-1">{{ info.deptName }}</div>
</div>
<div class="item">
<div class="label">转办意见</div>
<div class="value flex-1">{{ info.transferAdvice }}</div>
</div>
<div class="item">
<div class="label">办理要求</div>
<div class="value flex-1">{{ info.handlingReq }}</div>
</div>
<div class="item">
<div class="label">联系当事人时限</div>
<div class="value ">{{ info.contactTime }}</div>
<div class="label">(部门)办结时限</div>
<div class="value border-right">{{ info.limitTime }}</div>
</div>
<div class="item">
<div class="label">办理结果</div>
<div class="value flex-1"></div>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small" @click="handleCloseEvent">关闭</el-button>
<el-button style="margin-left: 20px" type="primary" size="small"
@click="handleComfirmSatisfy">确定</el-button>
</div>
</el-card>
<el-dialog :visible.sync="showSatisfy" :close-on-click-modal="false" :close-on-press-escape="false" title="满意度评价"
width="550px" top="15vh" class="dialog-h" @closed="showSatisfy = false">
<div class="div-btn">
<el-button size="small" @click="showSatisfy = false">关闭</el-button>
<el-button style="margin-left: 20px" type="primary" size="small"
@click="handleComfirmSatisfy">确定</el-button>
</div>
</el-dialog>
</div>
</template>
@ -120,21 +101,6 @@ function iniData() {
info: {},
eventDetailCopy: {},
showType: "",
projectId: "",
demandForm: {
gridId: "",
categoryCode: "",
parentCode: "",
content: "",
reportType: "",
reportUserName: "",
reportUserMobile: "",
reportTime: "",
wantServiceTime: "",
demandUserId: "",
demandUserName: "",
demandUserMobile: "",
},
satisfyLevel: "",
//
showSatisfy: false,
@ -193,13 +159,14 @@ export default {
this.user = this.$store.state.user;
if (this.eventId) {
this.info = JSON.parse(JSON.stringify(this.eventDetailData));
//
// if (this.info.status === 'closed_case' && this.info.satisfactionName) {
// this.changeSatisfyType(this.info.satisfaction)
// }
}
// this.getApiData();
this.$EventBus.$on('handelInputEventContent', ({ type, value }) => {
if (type === 'opinion') {
this.info.transferAdvice = value;
} else if (type === 'handlingReq') {
this.info.handlingReq = value;
}
})
},
methods: {
@ -214,52 +181,70 @@ export default {
handleCloseEvent() {
this.$emit("handleClose");
},
async getApiData() { },
//
handleSatisfy() {
this.showSatisfy = true;
},
clickSatisfy(type) {
if (this.info.satisfactionName) {
return false;
}
this.satisfyLevel = type;
},
async handleComfirmSatisfy() {
if (!this.satisfyLevel) {
this.$message.info("请选择评价级别");
}
const url = "/governance/icEvent/comment";
let params = {
icEventId: this.eventId,
satisfaction: this.satisfyLevel,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("评价成功");
this.info.satisfactionName =
this.satisfyLevel == "bad"
? "不满意"
: this.satisfyLevel == "good"
? "满意"
: "非常满意";
this.showSatisfy = false;
} else {
this.$message.error(msg);
}
},
},
};
</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 {
@ -279,5 +264,4 @@ export default {
margin-right: 10px;
}
}
</style>
</style>

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

@ -1,35 +1,10 @@
<template>
<div class="">
<div v-if="pageTypeCopy == 'add'">
<el-card>
<h3 class="h3-title"><img src="../../../../../assets/images/index/title-icon-zntb.png" width="30px"
height="30px" alt=""> 新增事件</h3>
<event-add ref="ref_add" @changeName="changeName" @changeMobile="changeMobile" @changeUserId="changeUserId"
@changeGridId="changeGridId" @changeLevel="changeLevel"></event-add>
</el-card>
<div class="process-form">
<el-card>
<h3 class="h3-title"><img src="../../../../../assets/images/index/title-icon-chuli.png" width="30px"
height="30px" alt=""> 处理</h3>
<process-form ref="ref_processinfo_add" :demandUserId="demandUserId" :eventDetailData="eventDetailData"
:demandUserName="demandUserName" :demandUserMobile="demandUserMobile"
:gridId="gridId"></process-form>
<div class="div-btn">
<el-button size="small" @click="handleClose">关闭</el-button>
<el-button style="margin-left: 20px" type="primary" size="small"
@click="handleComfirm">保存</el-button>
</div>
</el-card>
</div>
</div>
<div v-if="pageTypeCopy == 'dispose' || pageTypeCopy == 'info'" class="g-page">
<div v-if="pageTypeCopy == 'dispose' || pageTypeCopy == 'info' || pageTypeCopy == 'assign'|| pageTypeCopy == 'check'" class="g-page">
<!-- 面包屑放到这里-->
<div class="tabs" v-if="pageTypeCopy == 'info'">
<div class="tabs" @click="handleClose">
<i class="el-icon-arrow-left"></i>
<el-button class="diy-button--white" style="height: 20px" @click="handleClose">
<el-button class="diy-button--white" style="height: 20px">
查看详情</el-button>
</div>
<div :class="['g-total', { 'g-left': projectProcess.length > 0, 'g-left-top40': pageType == 'info' }]"
@ -38,14 +13,14 @@
:source="source" @handleToProject="handleToProject" @handleToDemand="handleToDemand"
@handleToIssue="handleToIssue" @handleClose="handleClose"></event-detail>
<div v-if="!eventDetailData.operationId && pageTypeCopy == 'dispose'" class="process-form">
<div class="process-form" v-if="pageTypeCopy == 'dispose' || pageTypeCopy == 'assign' ||pageTypeCopy == 'check'">
<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=""> 处理
<img src="../../../../../assets/images/index/title-icon-chuli.png" width="30px"
height="30px" alt=""> {{ pageTypeCopy === 'assign' ? '指派' : '办理' }}
</div>
<process-form ref="ref_processinfo_dispose" :source="source" :eventId="eventId"
:eventDetailData="eventDetailData"></process-form>
:eventDetailData="eventDetailData" :pageType="pageTypeCopy" :replayDetailObj="replayDetailObj"></process-form>
<div class="div-btn">
<el-button size="small" @click="handleClose">关闭</el-button>
<el-button style="margin-left: 20px" type="primary" size="small"
@ -55,14 +30,14 @@
</div>
</div>
<div v-if="projectProcess.length > 0" :class="['g-right', pageType == 'info' ? 'g-right-top40' : '']">
<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' },
@ -71,10 +46,7 @@
<template v-if="item.agencyId">
<div class="name">指派</div>
</template>
<template v-if="!item.timeLimit">
<div class="name">完成并回复</div>
</template>
<template v-if="!item.agencyId && item.timeLimit">
<template v-else>
<div class="name">{{ item.processName }}</div>
</template>
<div class="date">
@ -84,7 +56,7 @@
<div v-if="item.type === 'event'">
<template v-if="item.agencyId">
<div class="detail">
<div class="detail-field">指派</div>
<div class="detail-field">操作</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail">
@ -95,10 +67,18 @@
<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.type === 'image'">
@ -114,7 +94,7 @@
</template>
<template v-if="i.type === 'voice'">
<div class="detail">
<div class="detail-field"></div>
<div class="detail-field"></div>
<div
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<audio controls>
@ -136,40 +116,48 @@
</template>
<template v-else>
<div class="detail">
<div class="detail-field">回复</div>
<div class="detail-field">操作</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail">
<div class="detail-field">回复内容</div>
<div class="detail-field">办理说明</div>
<div class="detail-value">{{ item.publicReply }}</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.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.type === 'image'">
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<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.url" :key="i.url"
<img :src="i.attachmentUrl" :key="i.attachmentUrl"
style="width: 150px; height: 150px; padding-right: 10px"
@click="watchImg(i.url)" />
@click="watchImg(i.attachmentUrl)" />
</div>
</template>
<template v-if="i.type === 'voice'">
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">语音</span>
<template v-if="i.attachmentType === 'voice'">
<div
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">录音</span>
<audio controls>
<source :src="i.url" type="" :key="i.url" />
<source :src="i.attachmentUrl" type="" :key="i.attachmentUrl" />
</audio>
</div>
</template>
<template v-if="i.type === 'doc'">
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">语音</span>
<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.url" type="" :key="i.url" />
<source :src="i.attachmentUrl" type="" :key="i.attachmentUrl" />
</audio>
</div>
</template>
@ -182,31 +170,11 @@
</el-card>
</div>
</div>
<!-- <div v-if="pageTypeCopy == 'project'">
<project-info-origin ref="eleEditForm" :source="source" :sourceType="sourceType" :type="projectPageType"
:eventId="eventId" :projectId="eventDetailCopy.operationId" @close="handleCloseProject"
@afterEdit="handleCloseProject" />
</div>
<div v-if="pageTypeCopy == 'demand'">
<demand-info-origin ref="demandEditForm" :source="source" :demandRecId="eventDetailCopy.operationId"
@close="handleCloseProject" />
</div>
<div v-if="pageTypeCopy == 'issue'">
<issue-info-origin ref="eleEditForm" :pageType="issuePageType" :issueId="eventDetailCopy.operationId"
:issueDetailData="issueDetailData" @handleClose="handleCloseProject" @handleOk="handleCloseProject"
@dialogOk="handleCloseProject" />
</div> -->
<!-- <div v-if="pageTypeCopy == 'issue'">
<issue-info-origin ref="eleEditForm" :pageType="issuePageType" :issueId="eventDetailCopy.operationId"
:issueDetailData="issueDetailData" @handleClose="handleCloseProject" @handleOk="handleCloseProject"
@dialogOk="handleCloseProject" />
</div> -->
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
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";
@ -246,7 +214,8 @@ function iniData() {
sourceType: "",
level:''
level: '',
replayDetailObj:{},
};
}
@ -267,7 +236,6 @@ export default {
return {};
},
},
source: {
//manage visiual
type: String,
@ -298,12 +266,14 @@ export default {
// this.getApiData();
},
},
created() { },
created() {
if(this.pageType === 'check'){
this.replayDetail()
}
},
mounted() {
this.pageTypeCopy = this.pageType;
if (this.pageTypeCopy !== "add") {
this.getProjectProcess();
}
this.getProjectProcess();
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
}
@ -364,183 +334,110 @@ export default {
async handleComfirm() {
this.startLoading();
if (this.pageTypeCopy === "add") {
await this.handelAdd();
}
if (this.pageTypeCopy === "dispose") {
if (this.pageTypeCopy === "dispose" ||this.pageTypeCopy === "assign" || this.pageTypeCopy === "check" ) {
await this.handelDispose();
}
this.endLoading();
},
async handelAdd() {
this.$refs.ref_add.getEventInfo();
if (this.$refs.ref_add.okflag) {
this.eventInfoData = this.$refs.ref_add.formData;
async handelDispose() {
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;
await this.submitDispose('/governance/icEvent/reply', this.replayInfo);
} else {
return false;
}
this.project = {};
this.demand = {};
this.$refs.ref_processinfo_add.getProcessInfo();
this.formData.operationType = this.$refs.ref_processinfo_add.operationType;
this.eventInfoData.operationType = this.$refs.ref_processinfo_add.operationType;
if (this.formData.operationType === '0' || this.formData.operationType === '6') {
this.replayInfo = this.$refs.ref_processinfo_add.replayInfo;
//
this.eventInfoData.content = this.replayInfo.content;
this.eventInfoData.status = this.replayInfo.status;
this.eventInfoData.timeLimit = this.replayInfo.timeLimit;
if (this.replayInfo.categoryId) {
this.eventInfoData.categoryList = [];
this.eventInfoData.categoryList.push(this.replayInfo.categoryId);
}
} else if (this.formData.operationType === '5') {
this.replayInfo = this.$refs.ref_processinfo_add.replayInfo;
//
this.eventInfoData.content = this.replayInfo.content;
this.eventInfoData.status = this.replayInfo.status;
this.eventInfoData.timeLimit = this.replayInfo.timeLimit;
if (this.replayInfo.categoryId) {
this.eventInfoData.categoryList = [];
this.eventInfoData.categoryList.push(this.replayInfo.categoryId);
}
} else if (this.formData.operationType === '4') {
this.replayInfo = {};
}
this.formData = {
...this.eventInfoData,
project: this.project,
demand: this.demand,
issueInfo: this.issueInfo,
};
await this.submit();
},
async submit() {
if (this.formData.operationType === '0' || this.formData.operationType === '5'
|| this.formData.operationType === '6' || this.formData.operationType === '4') {
const url = "/governance/icEvent/add";
const { formData } = this;
if (Array.isArray(this.formData.gridId) && this.formData.gridId.length) {
if (this.level == "grid") {
this.formData.gridId = this.formData.gridId[this.formData.gridId.length - 1];
this.formData.agencyId = "";
} else {
this.formData.agencyId = this.formData.gridId[this.formData.gridId.length - 1];
this.formData.gridId = "";
}
} else {
this.formData.agencyId = "";
this.formData.gridId = "";
}
const { data, code, msg } = await requestPost(url, {
...formData,
});
if (code === 0) {
this.$message.success("操作成功!");
if (this.pageTypeCopy === "add") {
this.eventInfo = this.$refs.ref_add.resetData();
}
this.$emit("handleOk");
} else {
this.$message.error(msg);
}
} else if (this.formData.operationType == "") {
this.$message.error("请选择一种处理方式!");
}
},
async handelDispose() {
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;
await this.submitDispose('/governance/icEvent/reply', this.replayInfo);
} else {
return false;
}
},
async submitDispose(url, params) {
const { data, code, msg } = await requestPost(url, {
...params,
});
if (code === 0) {
this.$message.success("操作成功!");
this.$emit("handleOk");
} else {
this.$message.error(msg);
}
},
console.log(params);
const { data, code, msg } = await requestPost(url, {
...params,
});
if (code === 0) {
this.$message.success("操作成功!");
handleClose() {
if (this.pageTypeCopy === "add") {
this.eventInfo = this.$refs.ref_add.resetData();
}
this.$emit("handleOk");
} else {
this.$message.error(msg);
}
},
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";
},
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";
},
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);
}
//
startLoading() {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
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>

159
src/views/modules/shequzhili/event/cpts/process-form-designate.vue → src/views/modules/shequzhili/event/cpts/process-form-assign.vue

@ -9,40 +9,55 @@
<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">
<el-form-item label="指派处理部门" prop="deptId" label-width="150px"
:class="{ 'form-item': source === 'visiual' }">
<el-cascader class="cell-width-1" 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="createdTime" label-width="150px"
:class="{ 'form-item': source === 'visiual' }" style="display: block">
<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>
<el-date-picker v-model.trim="formData.createdTime" 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="处理部门" 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 label="联系当事人时限" prop="contactTime" label-width="150px"
:class="{ 'form-item': source === 'visiual' }" style="display: block">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-date-picker v-model.trim="formData.contactTime" 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="(部门)办结时限" 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="转办意见" prop="content" label-width="150px" :class="{ 'form-item': source === 'visiual' }"
<el-form-item label="转办意见" prop="transferAdvice" 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>
placeholder="请输入转办意见,不超过500字" v-model.trim="formData.transferAdvice"
@input="handelInputContent"></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 label="办理要求" prop="handlingReq" 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.handlingReq"
@input="handelInputHandlingReq"></el-input>
</div>
</el-form-item>
<el-form-item label="办结时限" prop="timeLimit" label-width="150px" :class="{ 'form-item': source === 'visiual' }"
style="display: block">
<el-form-item label="" 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>
<el-checkbox v-model="formData.sendMsg" :true-label="1" :false-label="0">短信通知部门负责人</el-checkbox>
</div>
</el-form-item>
</el-form>
@ -56,16 +71,18 @@ let loading; // 加载动画
export default {
data() {
return {
btnDisable: false,
customerId: localStorage.getItem("customerId"),
formData: {
operationType: "5", //[0: 5 6]
content: "",//
timeLimit: "",//
categoryId: "",//
deptId: "", //
deptName: "",
categoryList: [],
files: [] //
handlingReq:'',//
transferAdvice:'',//
createdTime: '',
contactTime:'',
timeLimit:'',//
deptId:'', //
deptName:'',
sendMsg:0,
status:'assigned'
},
orgOptions: [],
orgOptionProps: {
@ -82,8 +99,6 @@ export default {
selCategoryArray: [],
casOptions: [],
fileList: [],
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile",
iscascaderShow: 0,
optionProps: {
multiple: false,
value: "id",
@ -92,9 +107,6 @@ export default {
checkStrictly: true
},
dataRule: {
content: [
{ required: true, message: "回复内容不能为空", trigger: "blur" },
],
categoryId: [
{ required: true, message: "事件分类不能为空", trigger: "blur" },
],
@ -106,6 +118,9 @@ export default {
],
categoryList: [
{ required: true, message: '事件分类不能为空', trigger: 'blur' },
],
contactTime: [
{ required: true, message: '联系当事人时限不能为空', trigger: 'blur' },
]
},
selCateObj: {
@ -133,27 +148,28 @@ export default {
},
},
created() {
this.formData.createdTime = this.$dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
},
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)
}
this.formData.handlingReq = this.eventDetailCopy.handlingReq;
this.formData.transferAdvice = this.eventDetailCopy.transferAdvice;
}
},
methods: {
handelInputContent(val) {
this.$EventBus.$emit('handelInputEventContent', { type: 'opinion', value: val })
},
handelInputHandlingReq(val) {
this.$EventBus.$emit('handelInputEventContent', { type: 'handlingReq', value: val })
},
//
async getOrgTreeList() {
const url = "/gov/org/customeragency/agencygridtree"
const url = "/gov/org/customeragency/agencyGridDepttree"
let params = {
agencyId: this.agencyId,
purpose: "query"
@ -166,31 +182,7 @@ export default {
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) {
@ -205,7 +197,7 @@ export default {
handleChangeAgency(val) {
let obj = this.$refs["agencyIdArray"].getCheckedNodes()[0].data
if (obj) {
this.formData.orgType = obj.level === 'grid' ? 'grid' : 'agency'
this.formData.level = obj.level
this.formData.deptId = obj.agencyId
this.formData.deptName = obj.agencyName
} else {
@ -243,17 +235,6 @@ export default {
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.formData.status = "processing";
this.formData.categoryId = this.selCateObj.id;
this.formData.categoryList = [];
this.formData.categoryList.push(this.selCateObj);
this.okflag = true;
}
});
@ -302,21 +283,21 @@ export default {
const mp3Array = ["mp3"];
if (picArray.indexOf(fileType) > -1) {
file.attachmentFormat = "image";
file.format = "image";
} else if (videoarray.indexOf(fileType) > -1) {
file.attachmentFormat = "video";
file.format = "video";
} else if (docArray.indexOf(fileType) > -1) {
file.attachmentFormat = "doc";
file.format = "doc";
} else if (mp3Array.indexOf(fileType) > -1) {
file.attachmentFormat = "voice";
file.format = "voice";
}
file.url = res.data.url;
file.type = fileType;
file.attachmentName = file.name;
file.attachmentType = file.type;
file.attachmentUrl = file.url;
file.name = file.name;
file.type = file.type;
file.url = file.url;
this.fileList.push(file);
} else this.$message.error(res.msg);

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

@ -0,0 +1,525 @@
<template>
<div class="">
<el-form ref="ref_form" :inline="false" :model="formData" :rules="dataRule" label-width="118px">
<el-form-item label="办理情况" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="content">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="textarea" class="cell-width-area" :rows="2" placeholder="请输入办理情况"
v-model.trim="formData.content" :disabled="pageType === 'check'">
</el-input>
</div>
</el-form-item>
<el-form-item label="上传录音" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="luyin">
<el-upload v-if="audioList.length < 3" :headers="$getElUploadHeaders()"
:action="uploadUlr" :data="{ customerId: customerId }" :show-file-list="false"
:on-success="handleAudioSuccess" :before-upload="beforeAudioUpload"
accept=".mp3" >
<el-button type="primary" :disabled="pageType === 'check'">上传录音<i
class="el-icon-upload el-icon--right"></i></el-button>
</el-upload>
<section class="uploadList">
<div v-for="file in audioList" :key="file.attachmentUrl" :file="file"
:style="{cursor:pageType === 'check'? 'no-drop':'pointer'}" >
<span>{{ file.attachmentName }}</span>
<span type="text" @click="handleAudioRemove(file)" class="el-icon-close"> </span>
</div>
</section>
</el-form-item>
<el-form-item label="上传图片" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="luyin">
<el-upload v-if="audioList.length < 3" :headers="$getElUploadHeaders()"
:action="uploadUlr" :data="{ customerId: customerId }" :show-file-list="false"
:on-success="handleImgSuccess" :before-upload="beforeImgUpload"
accept=".jpg,.png,.jpeg">
<el-button type="primary" :disabled="pageType === 'check'">上传图片<i
class="el-icon-upload el-icon--right"></i></el-button>
</el-upload>
<section class="uploadList">
<div v-for="file in imgList" :key="file.attachmentUrl" :file="file"
:style="{cursor:pageType === 'check'? 'no-drop':'pointer'}">
<span>{{ file.attachmentName }}</span>
<span type="text" @click="handleImgRemove(file)" class="el-icon-close"> </span>
</div>
</section>
</el-form-item>
<el-divider></el-divider>
<div class="flex">
<div class="item">
<el-form-item label="答复人" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="respondent">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入"
v-model.trim="formData.respondent">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="答复电话" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="respondentPhone">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入"
v-model.trim="formData.respondentPhone">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="联系人" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="contacts">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入" v-model.trim="formData.contacts">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="联系电话" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="contactsPhone">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入"
v-model.trim="formData.contactsPhone">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label-width="118px" label="填报不合规诉求">
<el-select v-model.trim="formData.irregularity" clearable class="item_width_4">
<el-option v-for="item in binaryOptionListReverse" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<!-- <div class="item" v-if="formData.irregularity === 0">
<el-form-item label-width="118px" label="不合规诉求类型">
<el-select v-model.trim="formData.irregularity" clearable class="item_width_4">
<el-option v-for="item in nonComplianceType" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</div> -->
<div class="item">
<el-form-item label="办理真实度" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="verified">
<el-select v-model.trim="formData.verified" clearable class="item_width_4">
<el-option v-for="item in selectList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
</div>
<el-divider></el-divider>
<div class="flex">
<div class="item">
<el-form-item label="回访人" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="returnVisitor">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入"
v-model.trim="formData.returnVisitor">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="回访时间" prop="returnTime" label-width="118px"
:class="{ 'form-item': source === 'visiual' }" style="display: block">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-date-picker v-model.trim="formData.returnTime" class="cell-width-1" type="datetime" placeholder="请选择"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="联系当事人" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="loseContact">
<el-select v-model.trim="formData.loseContact" clearable class="item_width_4">
<el-option v-for="item in contactList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div class="item">
<el-form-item label="未接通电话" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="putThrough">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-select v-model.trim="formData.putThrough" clearable class="item_width_4">
<el-option v-for="item in contactFailureList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="是否配合回访" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="cooperate">
<el-select v-model.trim="formData.cooperate" clearable class="item_width_4">
<el-option v-for="item in coordinateList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div class="item">
<el-form-item label="服务满意度" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="satisfaction">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-select v-model.trim="formData.satisfaction" clearable class="item_width_4">
<el-option v-for="item in satisfactionType" :key="item.value" :label="item.label" :value="item.value"
@click.native="handelChangeSatisfaction(item.value)">
</el-option>
</el-select>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="不满意原因" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="dissatisfyReason">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-select v-model.trim="formData.dissatisfyReason" clearable class="item_width_4">
<el-option v-for="item in noSatisfactionType" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="回访意见" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="visitComments">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="textarea" class="cell-width-area" :rows="2" placeholder="请输入"
v-model.trim="formData.visitComments">
</el-input>
</div>
</el-form-item>
</div>
</div>
<el-divider></el-divider>
<section v-if="pageType === 'check'">
<div :class="['process-title', { 'process-title-vis': source === 'visiual' },]">
<img src="../../../../../assets/images/index/title-icon-chuli.png" width="30px" height="30px" alt="">
审核
</div>
<div class="flex">
<div class="item">
<el-form-item label="审核结果" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="examine">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-select v-model.trim="formData.examine" clearable class="item_width_4">
<el-option v-for="item in examineList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="上传图片" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="files">
<el-upload :headers="$getElUploadHeaders()" class="avatar-uploader" :action="uploadUlr"
:data="{ customerId: customerId }" :show-file-list="true" :on-success="handleExamineImgSuccess"
:on-remove="handleExamineImgRemove" :before-upload="beforeImgUpload" accept=".jpg,.png,.jpeg">
<el-button type="primary" >上传图片<i
class="el-icon-upload el-icon--right"></i></el-button>
</el-upload>
</el-form-item>
</div>
<div :span="24">
<el-form-item label="审核结果说明" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="examineContent">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="textarea" class="cell-width-area" :rows="2" placeholder="请输入审核结果说明"
v-model.trim="formData.examineContent">
</el-input>
</div>
</el-form-item>
</div>
</div>
</section>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import { binaryOptionList, nonComplianceType, satisfactionType, noSatisfactionType, binaryOptionListReverse } from "@/js/columns/constants";
let loading; //
function iniFmData() {
return {
operationType: "11", //[11,10,9]
content: '',//
files: [],//
respondent: '',//
respondentPhone: '',//
contacts: '',//
contactsPhone: '',//
irregularity: '',// 0 1
//
verified: '', // 0 1
returnVisitor: '',//访
returnTime: '',//访
loseContact: '',//0 1
putThrough: '',// 0 1
cooperate: '',//访0 1
satisfaction: '',//0 1 2
dissatisfyReason: '',//
visitComments: '',//访
examine: null,//
examineContent: ''//
};
}
export default {
data() {
return {
binaryOptionList,
nonComplianceType,
satisfactionType,
noSatisfactionType,
binaryOptionListReverse,
customerId: localStorage.getItem("customerId"),
assistanceUnitList: [], //
formData: iniFmData(),
okflag: false,
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile",
eventDetailCopy: {},
selectList: [{ label: '属实', value: 0 }, { label: '不属实', value: 1 }],
contactList: [{ label: '已联系', value: 0 }, { label: '未联系', value: 1 }],
contactFailureList: [{ label: '已接通', value: 1 }, { label: '未接通', value: 0 }],
coordinateList: [{ label: '配合', value: 0 }, { label: '未配合', value: 1 }],
examineList: [{ label: '合格', value: 0 }, { label: '不合格', value: 1 }],
satisfactionType : [
{
label: '满意',
value: 'perfect'
},
{
label: '基本满意',
value: 'good'
},
{
label: '不满意',
value: 'bad'
}
],
dataRule: {
content: [
{ required: true, message: "办理情况不能为空", trigger: "blur" },
],
verified: [
{ required: true, message: "办理真实度不能为空", trigger: "blur" },
],
returnVisitor: [
{ required: true, message: "回访人不能为空", trigger: "blur" },
],
returnTime: [
{ required: true, message: "回访时间不能为空", trigger: "blur" },
],
loseContact: [
{ required: true, message: "请选择联系当事人", trigger: "blur" },
],
putThrough: [
{ required: true, message: "请选择未接通电话", trigger: "blur" },
],
visitComments: [
{ required: true, message: "回访意见不能为空", trigger: "blur" },
],
cooperate: [
{ required: true, message: "请选择是否配合回访", trigger: "blur" },
],
satisfaction: [
{ required: true, message: "请选择服务满意度", trigger: "blur" },
],
},
imgList: [],
audioList: [],
examineImgList:[]
};
},
components: {},
computed: {
},
props: {
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default() {
return {};
},
},
pageType: {
type: String,
default: "",
},
source: {
//manage visiual
type: String,
default: "manage",
},
replayDetailObj:{
type: Object,
default() {
return {};
},
}
},
watch: {
"replayDetailObj": function (newVal,oldVal) {
console.log(newVal,'bianle');
if(this.pageType === 'check'){
this.formData = newVal;
console.log(this.formData);
if(this.formData.internalFile){
this.imgList = this.formData.internalFile.filter(item=>item.attachmentType==='image')
this.audioList = this.formData.internalFile.filter(item=>item.attachmentType==='voice')
}
}
},
},
created() { },
mounted() {
const { user } = this.$store.state;
this.agencyId = user.agencyId;
},
methods: {
handelChangeSatisfaction(val) {
console.log(val);
if (val === 2) {
this.$set(this.dataRule, 'dissatisfyReason', [{ required: true, message: "请选择不满意原因", trigger: "blur" }]);
} else {
this.$delete(this.dataRule, 'dissatisfyReason');
}
},
beforeAudioUpload(file) {
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return isLt1M;
},
handleAudioSuccess(res, file, fileList) {
console.log("res.data.url", file);
if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url);
this.audioList.push({
attachmentFormat: file.name.split(".").pop(),
attachmentName: file.name,
size: file.size,
attachmentType: file.raw.type,
attachmentUrl: res.data.url,
});
console.log(this.formData.files);
} else {
this.$message.error(res.msg);
}
},
handleAudioRemove(file) {
if(this.pageType === 'check')return
let index = this.audioList.findIndex(
(item) => item.attachmentUrl == file.attachmentUrl
);
this.audioList.splice(index, 1);
console.log(this.audioList);
},
beforeImgUpload(file) {
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return isLt1M;
},
handleImgSuccess(res, file, fileList) {
console.log("res.data.url", file);
if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url);
this.imgList.push({
attachmentFormat: file.name.split(".").pop(),
attachmentName: file.name,
size: file.size,
attachmentType: file.raw.type,
attachmentUrl: res.data.url,
});
console.log(this.formData.files);
} else {
this.$message.error(res.msg);
}
},
handleExamineImgRemove(file) {
console.log(file);
let index = this.examineImgList.findIndex(
(item) => item.url == file.response.data.url
);
this.examineImgList.splice(index, 1);
console.log(this.examineImgList);
},
handleExamineImgSuccess(res, file, fileList) {
console.log("res.data.url", file);
if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url);
this.examineImgList.push({
attachmentFormat: file.name.split(".").pop(),
attachmentName: file.name,
size: file.size,
attachmentType: file.raw.type,
attachmentUrl: res.data.url,
});
console.log(this.formData.files);
} else {
this.$message.error(res.msg);
}
},
handleImgRemove(file) {
if(this.pageType === 'check')return
let index = this.audioList.findIndex(
(item) => item.attachmentUrl == file.attachmentUrl
);
this.imgList.splice(index, 1);
console.log(this.imgList);
},
async getReplayInfo() {
this.okflag = false;
this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
this.okflag = true;
}
});
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style lang="scss" src="@/assets/scss/modules/shequzhili/project-info.scss" scoped></style>
<style lang='scss' scoped>
@import "@/assets/scss/modules/visual/a_customize.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>
<style scoped>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

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

@ -0,0 +1,309 @@
<template>
<div class="search">
<el-form ref="ref_form2" :inline="false" :model="formData" :rules="dataRule">
<el-form-item label="办理情况" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="content">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="textarea" class="cell-width-area" :rows="2" placeholder="请输入"
v-model.trim="formData.content">
</el-input>
</div>
</el-form-item>
<el-form-item label="上传录音" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="luyin">
<el-upload :headers="$getElUploadHeaders()" class="avatar-uploader" :action="uploadUlr"
accept=".mp3"
:data="{ customerId: customerId }" :show-file-list="true" :on-success="handleAudioSuccess"
:on-remove="handleAudioRemove" :before-upload="beforeAudioUpload">
<el-button type="primary" >上传录音<i class="el-icon-upload el-icon--right"></i></el-button>
</el-upload>
</el-form-item>
<el-form-item label="上传图片" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
>
<el-upload :headers="$getElUploadHeaders()" class="avatar-uploader" :action="uploadUlr"
accept=".jpg,.png,.jpeg"
:data="{ customerId: customerId }" :show-file-list="true" :on-success="handleImgSuccess"
:on-remove="handleImgRemove" :before-upload="beforeImgUpload">
<el-button type="primary" >上传图片<i class="el-icon-upload el-icon--right"></i></el-button>
</el-upload>
</el-form-item>
<el-divider></el-divider>
<div class="flex">
<div class="item">
<el-form-item label="答复人" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="respondent">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入"
v-model.trim="formData.respondent">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="答复电话" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="respondentPhone">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入"
v-model.trim="formData.respondentPhone">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="联系人" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="contacts">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入"
v-model.trim="formData.contacts">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="联系电话" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="contactsPhone">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入"
v-model.trim="formData.contactsPhone">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label-width="118px" label="填报不合规诉求">
<el-select v-model.trim="formData.irregularity" clearable class="item_width_4">
<el-option v-for="item in binaryOptionListReverse" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<!-- <div class="item" v-if="formData.irregularity === 0">
<el-form-item label-width="118px" label="不合规诉求类型">
<el-select v-model.trim="formData.irregularity" clearable class="item_width_4">
<el-option v-for="item in nonComplianceType" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div> -->
<div class="item">
<el-form-item label="办理真实度" label-width="118px" :class="{ 'form-item': source === 'visiual' }">
<el-select v-model.trim="formData.verified" clearable class="item_width_4">
<el-option v-for="item in selectList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
</div>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import { binaryOptionListReverse, nonComplianceType } from "@/js/columns/constants";
let loading; //
export default {
data() {
return {
customerId: localStorage.getItem("customerId"),
formData: {
operationType: '9', //[11,10,9]
files: [],
content: '',//
respondent: '',//
respondentPhone: '',//
contacts: '',//
contactsPhone: '',//
irregularity: '',// 0 1
//
verified: '', // 0 1
},
status: false,
okflag: false,
fileList: [],
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile",
selectList: [{ label: '属实', value: 0 }, { label: '不属实', value: 1 }],
dataRule: {
content: [
{ required: true, message: '办理情况不能为空', trigger: 'blur' }
]
},
binaryOptionListReverse,
nonComplianceType,
imgList:[],
audioList:[]
};
},
components: {},
computed: {},
props: {
eventId: {
type: String,
default: '',
},
eventDetailData: {
type: Object,
default() {
return {};
},
},
source: {
//manage visiual
type: String,
default: 'manage',
},
},
watch: {},
created() { },
async mounted() {
},
methods: {
beforeAudioUpload(file) {
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("M上传文件大小不能超过 10B!");
}
return isLt1M;
},
handleAudioSuccess(res, file, fileList) {
console.log("res.data.url", file);
if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url);
this.audioList.push({
attachmentFormat: file.name.split(".").pop(),
attachmentName: file.name,
size: file.size,
attachmentType: file.raw.type,
attachmentUrl: res.data.url,
});
} else {
this.$message.error(res.msg);
}
},
handleAudioRemove(file) {
let index = this.audioList.findIndex(
(item) => item.url == file.response.data.url
);
this.audioList.splice(index, 1);
},
beforeImgUpload(file) {
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return isLt1M;
},
handleImgSuccess(res, file, fileList) {
console.log("res.data.url", file);
if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url);
this.imgList.push({
attachmentFormat: file.name.split(".").pop(),
attachmentName: file.name,
size: file.size,
attachmentType: file.raw.type,
attachmentUrl: res.data.url,
});
} else {
this.$message.error(res.msg);
}
},
handleImgRemove(file) {
let index = this.imgList.findIndex(
(item) => item.url == file.response.data.url
);
this.imgList.splice(index, 1);
console.log(this.imgList);
},
async getReplayInfo() {
this.okflag = false;
this.$refs['ref_form2'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
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
);
}
},
//
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>

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

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

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

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

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

@ -0,0 +1,291 @@
<!--
* @Author: yanLu xgktv007@163.com
* @Date: 2023-09-05 10:21:34
* @LastEditors: mk 2403457699@qq.com
* @LastEditTime: 2023-09-18 17:16:40
* @Description: 事件转办表单
*
-->
<template>
<div class="search">
<el-form ref="ref_form2" :inline="false" :model="formData" :rules="dataRule">
<el-form-item label="办理情况" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="content">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="textarea" class="cell-width-area" :rows="2" placeholder="请输入回访意见"
v-model.trim="formData.content">
</el-input>
</div>
</el-form-item>
<el-form-item label="上传录音" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="luyin">
<el-upload :headers="$getElUploadHeaders()" class="avatar-uploader" :action="uploadUlr"
:data="{ customerId: customerId }" :show-file-list="true" :on-success="handleAudioSuccess"
:on-remove="handleAudioRemove" :before-upload="beforeAudioUpload" accept=".mp3">
<el-button type="primary">上传录音<i class="el-icon-upload el-icon--right"></i></el-button>
</el-upload>
</el-form-item>
<el-form-item label="上传图片" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="internalFile">
<el-upload :headers="$getElUploadHeaders()" class="avatar-uploader" :action="uploadUlr"
:data="{ customerId: customerId }" :show-file-list="true" :on-success="handleImgSuccess"
:on-remove="handleImgRemove" :before-upload="beforeImgUpload" accept=".jpg,.png,.jpeg">
<el-button type="primary">上传图片<i class="el-icon-upload el-icon--right"></i></el-button>
</el-upload>
</el-form-item>
<el-divider></el-divider>
<div class="flex">
<div class="item">
<el-form-item label="答复人" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="respondent">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入答复人"
v-model.trim="formData.respondent">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="答复电话" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="respondentPhone">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入答复电话"
v-model.trim="formData.respondentPhone">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="联系人" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="contacts">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入联系人"
v-model.trim="formData.contacts">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label="联系电话" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="contactsPhone">
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input type="input" class="item_width_4" :rows="2" placeholder="请输入联系电话"
v-model.trim="formData.contactsPhone">
</el-input>
</div>
</el-form-item>
</div>
<div class="item">
<el-form-item label-width="118px" label="填报不合规诉求">
<el-select v-model.trim="formData.irregularity" clearable class="item_width_4">
<el-option v-for="item in binaryOptionListReverse" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<!-- <div class="item" v-if="formData.irregularity === 0">
<el-form-item label-width="118px" label="不合规诉求类型">
<el-select v-model.trim="formData.irregularity" clearable class="item_width_4">
<el-option v-for="item in nonComplianceType" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div> -->
<div class="item">
<el-form-item label="办理真实度" label-width="118px" :class="{ 'form-item': source === 'visiual' }">
<el-select v-model.trim="formData.verified" clearable class="item_width_4">
<el-option v-for="item in selectList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
</div>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import { binaryOptionListReverse, nonComplianceType } from "@/js/columns/constants";
let loading; //
export default {
data() {
return {
customerId: localStorage.getItem("customerId"),
binaryOptionListReverse,
nonComplianceType,
formData: {
operationType: "10", //[11,10,9]
content: '',//
respondent: '',//
respondentPhone: '',//
contacts: '',//
contactsPhone: '',//
irregularity: '',// 0 1
//
verified: '', // 0 1
},
status: false,
okflag: false,
casOptions: [],
fileList: [],
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile",
dataRule: {
content: [
{ required: true, message: "办理情况不能为空", trigger: "blur" },
],
},
selectList: [{ label: '属实', value: 1 }, { label: '不属实', value: 0 }],
imgList: [],
audioList: []
};
},
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;
},
methods: {
async getReplayInfo() {
this.okflag = false;
this.$refs["ref_form2"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
this.okflag = true;
}
});
},
beforeImgUpload(file) {
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return isLt1M;
},
handleImgSuccess(res, file, fileList) {
console.log("res.data.url", file);
if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url);
this.imgList.push({
attachmentFormat: file.name.split(".").pop(),
attachmentName: file.name,
size: file.size,
attachmentType: file.raw.type,
attachmentUrl: res.data.url,
});
console.log(this.imgList);
} else {
this.$message.error(res.msg);
}
},
handleImgRemove(file) {
let index = this.imgList.findIndex(
(item) => item.url == file.response.data.url
);
this.imgList.splice(index, 1);
console.log(this.imgList);
},
beforeAudioUpload(file) {
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return isLt1M;
},
handleAudioSuccess(res, file, fileList) {
console.log("res.data.url", file);
if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url);
this.audioList.push({
attachmentFormat: file.name.split(".").pop(),
attachmentName: file.name,
size: file.size,
attachmentType: file.raw.type,
attachmentUrl: res.data.url,
});
console.log(this.audioList);
} else {
this.$message.error(res.msg);
}
},
handleAudioRemove(file) {
let index = this.audioList.findIndex(
(item) => item.url == file.response.data.url
);
this.audioList.splice(index, 1);
console.log(this.formData.files);
},
beforeImgUpload(file) {
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return isLt1M;
},
handleImgRemove(file) {
let index = this.formData.files.findIndex(
(item) => item.url == file.response.data.url
);
this.formData.files.splice(index, 1);
console.log(this.formData.files);
},
//
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>

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

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

297
src/views/modules/shequzhili/event/cpts/process-form-replay-end.vue

@ -1,297 +0,0 @@
<!--
* @Author: yanLu xgktv007@163.com
* @Date: 2023-09-05 10:21:34
* @LastEditors: yanLu xgktv007@163.com
* @LastEditTime: 2023-09-05 10:21:34
* @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>

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

@ -1,218 +0,0 @@
<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));
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>

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

@ -2,29 +2,30 @@
<div class="">
<div>
<el-form ref="ref_form1" :inline="false" :rules="dataRule" class="form">
<el-form-item label="处理方式" label-width="150px" :class="{ 'form-item': source === 'visiual' }"
prop="operationType">
<el-radio-group :class="{ 'form-item': source === 'visiual' }" v-model.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-group>
<el-form-item label="办理状态" label-width="118px" :class="{ 'form-item': source === 'visiual' }"
prop="operationType" v-if="pageType !== 'assign'">
<el-select v-model="operationType" placeholder="请选择" :disabled="pageType === 'check'">
<el-option label="联系当事人" value="9"></el-option>
<el-option label="办理中" value="10"></el-option>
<el-option label="已办结" value="11"></el-option>
</el-select>
</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 v-if="operationType === '9' && pageType !== 'assign'">
<process-form-contact ref="process_form_contact" :source="source" :eventDetailData="eventDetailData"
:eventId="eventId"></process-form-contact>
</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 v-if="operationType === '10' && pageType !== 'assign'">
<process-form-process ref="ref_process_form_process" :source="source" :eventDetailData="eventDetailData"
:eventId="eventId"></process-form-process>
</div>
<div v-if="operationType === '5'">
<process-form-designate ref="ref_process_form_designate" :source="source" :eventDetailData="eventDetailData"
:eventId="eventId"></process-form-designate>
<div v-if="operationType === '11' && pageType !== 'assign'">
<process-form-complete :eventDetailData="eventDetailData" ref="ref_process_form_complete"
:eventId="eventId" :pageType="pageType" :replayDetailObj="replayDetailObj"></process-form-complete>
</div>
<div v-if="pageType === 'assign'">
<process-form-assign ref="ref_process_form_assign" :source="source" :eventDetailData="eventDetailData"
:eventId="eventId"></process-form-assign>
</div>
</div>
</div>
@ -33,16 +34,11 @@
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
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";
import processFormContact from "./process-form-contact";
import processFormComplete from "./process-form-complete";
import processFormProcess from "./process-form-process";
import processFormAssign from "./process-form-assign";
let loading; //
export default {
data() {
return {
@ -58,24 +54,28 @@ export default {
},
operationType: '',
replayInfo: {},
demand: {},
project: {},
issueInfo: {},
okflag: false,
eventDetailCopy: {},
transferObj: {
latitude: "",
longitude: ""
}
},
orgOptions: [],
agencyIdArray: [],
orgOptionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
};
},
components: {
processFormReplay,
processFormProject,
processFormDemand,
processFormIssue,
processFormDesignate,
processFormReplayEnd
processFormComplete,
processFormProcess,
processFormContact,
processFormAssign
},
computed: {
dataRule() {
@ -87,23 +87,11 @@ export default {
},
},
props: {
demandUserId: {
type: String,
default: "",
},
demandUserName: {
type: String,
default: "",
},
demandUserMobile: {
eventId: {
type: String,
default: "",
},
// gridId: {
// type: String,
// default: "",
// },
eventId: {
pageType: {
type: String,
default: "",
},
@ -116,6 +104,10 @@ export default {
source: {//manage visiual
type: String,
default: 'manage'
},
replayDetailObj:{
type:Object,
default:()=>{}
}
},
@ -129,39 +121,68 @@ export default {
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
this.$nextTick(() => {
if (this.pageType === 'check') {
this.operationType = '11'
}
})
this.getOrgTreeList()
},
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)
}
},
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;
if (this.operationType === '9') {
this.$refs.process_form_contact.getReplayInfo()
this.replayInfo = this.$refs.process_form_contact.formData;
this.replayInfo.files = [...this.$refs.process_form_contact.imgList,...this.$refs.process_form_contact.audioList]
if (this.$refs.process_form_contact.okflag) {
this.replayInfo = this.$refs.process_form_contact.formData
this.okflag = true
}
} else if (this.operationType === '10') {
this.$refs.ref_process_form_process.getReplayInfo()
this.replayInfo = this.$refs.ref_process_form_process.formData;
this.replayInfo.files = [...this.$refs.ref_process_form_process.imgList,...this.$refs.ref_process_form_process.audioList]
if (this.$refs.ref_process_form_process.okflag) {
this.replayInfo = this.$refs.ref_process_form_process.formData
this.okflag = true
}
} else if (this.operationType === '11' || this.pageType === 'check') {
this.$refs.ref_process_form_complete.getReplayInfo()
this.replayInfo = this.$refs.ref_process_form_complete.formData;
this.replayInfo.files = [...this.$refs.ref_process_form_complete.imgList,...this.$refs.ref_process_form_complete.audioList]
if(this.pageType === 'check'){
this.replayInfo.operationType = '12';
this.replayInfo.files = [...this.replayInfo.files,...this.$refs.ref_process_form_complete.examineImgList]
}
} 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
if (this.$refs.ref_process_form_complete.okflag) {
this.replayInfo = this.$refs.ref_process_form_complete.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
} else if (this.pageType === 'assign') {
this.$refs.ref_process_form_assign.getReplayInfo()
this.replayInfo = this.$refs.ref_process_form_assign.formData
if (this.$refs.ref_process_form_assign.okflag) {
this.replayInfo = this.$refs.ref_process_form_assign.formData
this.okflag = true
}
}else {

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

@ -273,26 +273,6 @@ export default {
components: { eventInfo,awoList },
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 = {
multiple: false,
value: 'agencyId',

804
src/views/modules/shequzhili/eventHandling/index.vue

@ -0,0 +1,804 @@
<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="'100px'">
<div>
<el-form-item label="事件类别" prop="firstIdList">
<el-cascader ref="cascaderEvent" v-model.trim="formData.firstIdList" :options="cateOptions"
collapse-tags :show-all-levels="false" :props="{
multiple: true,
checkStrictly: true,
emitPath: false,
children: 'children',
label: 'categoryName',
value: 'id',
}" clearable class="u-item-width-normal" />
</el-form-item>
<el-form-item label="工单编号" prop="workOrderNum">
<el-input v-model.trim="formData.workOrderNum" 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="eventContent">
<el-input v-model.trim="formData.eventContent" class="u-item-width-normal" size="small"
clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="办理超期" prop="limitStatus">
<el-select v-model.trim="formData.limitStatus" clearable class="u-item-width-normal">
<el-option v-for="item in overdue" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="办理状态" prop="operationType">
<el-select v-model.trim="formData.operationType" clearable class="u-item-width-normal">
<el-option v-for="item in ProcessingList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="办结时限" prop="limitStartTime">
<el-date-picker v-model.trim="formData.startTime" 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.endTime" 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>
<el-dropdown size="small" split-button type="primary" style="margin: 0 10px; height: 30px"
@command="(command) => handleMarkDiffcult(command)">
导入
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="0" @click.native="handleExportModule">下载模板</el-dropdown-item>
<el-upload :headers="$getElUploadHeaders()" ref="upload" class="upload-btn" action="uploadUlr"
:limit="1" :accept="'.xls,.xlsx'" :with-credentials="true" :show-file-list="false"
:auto-upload="true" :on-progress="handleProgress" :on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload" :http-request="uploadHttpRequest">
<el-dropdown-item command="1">上传导入</el-dropdown-item>
</el-upload>
</el-dropdown-menu>
</el-dropdown>
</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="workOrderNum" align="center" label="工单编号" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="categoryAllName" 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="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="联系电话" :show-overflow-tooltip="true">
<!-- <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="limitTime" align="center" width="110" label="办结时限(部门)" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="status" align="center" width="110" label="办理状态"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.status === 'unassigned'">未指派</span>
<span v-else-if="scope.row.status ==='assigned'">已指派</span>
<span v-else-if="scope.row.status ==='closed_case'">已办结</span>
<span v-else="scope.row.status ==='processing'">处理中</span>
</template>
</el-table-column>
<el-table-column prop="limitStatus" align="center" width="110" label="办理超期"
:show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span v-if="scope.row.deliverystatus === 0">联系当事人超期</span>
<span v-else-if="scope.row.deliverystatus ===1">部门办结超期</span>
<span v-else>--</span>
</template> -->
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="200px" prop="status">
<template slot-scope="scope">
<el-button @click="handleWatch(scope.row)" type="text" size="small">查看</el-button>
<el-button @click="handleDispose(scope.row,'dispose')" type="text" size="small" v-if="scope.row.operationType != '11'&&scope.row.operationType!= '12' ">办理</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 == 'assign' || pageType=='check'">
<event-info ref="eleEditForm" :pageType="pageType" :eventId="eventId" :eventDetailData="eventDetailData"
@handleClose="handleClose" @handleOk="handleOk" @dialogOk="handleEditSuccess" />
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import axios from "axios";
import eventInfo from "../event/cpts/event-info.vue";
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 = {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
}
return {
dialogVisible:"false",
pageType: "list", // list add dispose info
user: {},
agencyId: "",
orgOptions: [],
orgOptionProps,
level: '',
optionsG: [],
sarr: [],
ProcessingList: [
{
value: "8",
label: "未联系当事人",
},
{
value: "9",
label: "已联系当事人",
},
{
value: "10",
label: "办理中",
},
{
value: "11",
label: "已办结待审核",
},
{
value: "12",
label: "已审核归档",
},
],
tableData: [
],
statusArray: [
{
value: "processing",
label: "处理中",
},
{
value: "closed_case",
label: "已完成",
},
],
typeArray: [
{
value: "1",
label: "难点痛点",
},
{
value: "2",
label: "矛盾纠纷",
},
{
value: "3",
label: "自身问题",
},
{
value: "4",
label: "超出服务范围",
},
],
qudaoArray: [
{
value: "3",
label: "12345",
}
],
overdue:[
{
value: "1",
label: "联系来电人超期",
},
{
value: "2",
label: "办结超期",
},
],
formData: {
agencyId: "",
sourceType: "",
eventContent: "",
name: "",
mobile: "",
startTime: "",
endTime: "",
limitStartTime: "",
limitEndTime: "",
status: "",
firstIdList: [],
secondIdList: [],
workOrderNum: "",
limitStatus:"",
operationType:''
},
cateOptions: [],
eventTypeCheck: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
// endPickerOptions: {
// disabledDate: endDisabledDate,
// },
// startPickerOptions: {
// disabledDate: startDisabledDate,
// },
eventId: "",
searchH: 180,
eventDetailData: {},
showVoice: false,
selVoiceUrl: "",
multipleSelection: [],
importLoading: false,
importType: "1"
};
},
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";
}
},
"formData.limitEndTime": function (val) {
if (val && val != "") {
let arrayTemp = val.split(" ");
this.formData.limitEndTime = 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();
},
methods: {
handleSelectionChange(val) {
this.multipleSelection = [];
val.forEach((element) => {
this.multipleSelection.push(element.icEventId);
});
},
async handleMarkDiffcult(command) {
const url = "/governance/icEvent/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/icEvent/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);
}
},
handleSearch(val) {
this.pageNo = 1;
this.getTableData();
},
//
async handleLook(row) {
let { agencyId, gridId, gridName, name, reportUserId } = row
const resiId = reportUserId;
this.$store.dispatch('saveData', { agencyId, gridId, gridName, 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 handleExport() {
const url = "/governance/icEvent/export";
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...formData,
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
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) => {
return this.$message.error("网络错误");
});
},
async handleAdd() {
this.pageType = "add";
},
async handleWatch(row) {
console.log((row,"row"));
this.eventId = row.icEventId;
const url = "/governance/icEvent/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.eventId = row.icEventId;
const url = "/governance/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
this.pageType = type;
} else {
this.$message.error(msg);
}
},
//
async handleExportModule() {
let url = '/governance/icEvent/downloadTemplate';
let params = {};
await this.$http({
method: 'POST',
url,
responseType: 'blob',
data: params
})
.then(res => {
if (res.headers['content-disposition']) {
let fileName = window.decodeURI(res.headers['content-disposition'].split(';')[1].split('=')[1]);
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
} else this.$message.error('下载失败');
})
.catch(err => {
console.log('err', err);
return this.$message.error('网络错误');
});
},
handleExcelSuccess(res, file) {
if (!res.code === 0 && !res.msg === 'success') {
this.$message.error(res.msg);
}
},
handleProgress(event, file, fileList) {
},
beforeExcelUpload(file) {
const isType = file.type === 'application/vnd.ms-excel';
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
const fileType = isType || isTypeComputer;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!fileType) {
this.$message.error('上传文件只能是xls/xlsx格式!');
}
if (!isLt1M) {
this.$message.error('上传文件大小不能超过 10MB!');
}
return fileType && isLt1M;
},
importTypeChange(val) {
this.importType = val
},
async uploadHttpRequest(file) {
this.importLoading = true;
this.importBtnTitle = '正在上传中...';
this.$message({
showClose: true,
dangerouslyUseHTMLString: true,
message: "导入中,请到系统管理-<a id='clickA' style='cursor: pointer;'>导入记录</a>中查看进度",
duration: 3000
});
let than = this;
document.getElementById('clickA').addEventListener('click', function () {
than.$router.replace('/main/importRecord-index');
});
const formData = new FormData(); //FormDataappend('key', value)
formData.append('file', file.file); //
formData.append('code', ''); //
let url = '/governance/icEvent/importEvent'
if (this.importType == 2) {
url = '/governance/icEvent/importAwo'
}
console.log(url)
await this.$http
.post(url, formData)
.then(res => {
if (res.data.code == 0 && res.data.msg == 'success') {
const data = res.data.data;
this.dataList = [
...Object.keys(data.option.exist).map(k => {
return {
index: k,
srcField: data.option.exist[k],
exist: true,
field: data.option.exist[k]
};
}),
...Object.keys(data.option.notExist).map(k => {
return {
index: k,
srcField: data.option.notExist[k],
exist: false,
field: ''
};
})
];
this.importOption = data.option;
this.importCode = data.code;
this.fileData = file;
} else this.$message.error(res.data.msg);
})
.catch(err => {
console.log('失败', err);
file.onError(); //
});
this.importLoading = false;
this.importBtnTitle = '导入';
this.$refs.upload.clearFiles();
this.getTableData();
},
//
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 handleDel(rowData) {
let message = "确认删除?";
this.$confirm(message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.delEvent(rowData.icEventId);
}).catch((err) => { });
},
async delEvent(eventId) {
const url = "/governance/icEvent/delete";
let idsArr = [eventId];
const { data, code, msg } = await requestPost(url, idsArr);
if (code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
},
async getTableData() {
const url = "/governance/icEvent/list";
if (this.eventTypeCheck) {
this.formData.secondIdList = this.eventTypeCheck
}
const { pageSize, pageNo, formData } = this;
// formData
const newFormData = { ...formData };
// agencyId
if (Array.isArray(newFormData.agencyId) && newFormData.agencyId.length) {
if (this.level == "grid") {
newFormData.gridId = newFormData.agencyId[newFormData.agencyId.length - 1];
newFormData.agencyId = "";
} else {
newFormData.agencyId = newFormData.agencyId[newFormData.agencyId.length - 1];
newFormData.gridId = "";
}
} else {
newFormData.agencyId = "";
newFormData.gridId = "";
}
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...newFormData,
});
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";
const { data, code, msg } = await requestPost(url, {});
if (code === 0) {
this.cateOptions = this.deepTree(data, "children");
} else {
this.$message.error(msg);
}
},
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
getOrgTreeList() {
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取组织树成功', res.data)
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 {
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
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);
}
}
}
},
resetSearch() {
this.formData = {
agencyId: "",
gridId: "",
sourceType: "",
eventContent: "",
name: "",
mobile: "",
startTime: "",
endTime: "",
limitStartTime: "",
limitEndTime: "",
status: "",
firstIdList: [],
secondIdList: [],
};
this.eventTypeCheck = [];
this.pageNo = 1;
this.getTableData();
// this.loadTable()
},
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,
};
});
}
},
showAwoList(row) {
this.$refs.awoList.open(row)
}
},
};
</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>

131
src/views/modules/shequzhili/timeOut/Urging.vue

@ -0,0 +1,131 @@
<template>
<div class="form-container">
<table>
<tr>
<th>工单号</th>
<td>{{eventDetailData.workOrderNum}}</td>
<th>事件类别</th>
<td>{{eventDetailData.categoryAllName}}</td>
</tr>
<tr>
<th>报件人</th>
<td>{{eventDetailData.name}}</td>
<th>联系电话</th>
<td>{{eventDetailData.mobile}}</td>
</tr>
<tr>
<th>事件描述</th>
<td colspan="3">{{eventDetailData.eventContent}}</td>
</tr>
<tr>
<th>指派部门</th>
<td>{{eventDetailData.deptName}}</td>
<th>指派时间</th>
<td></td>
</tr>
<tr>
<th>联系来电人时限</th>
<td>{{eventDetailData.contactTime}}</td>
<th>部门办结时限</th>
<td>{{eventDetailData.limitTime}}</td>
</tr>
<tr>
<th>办理状态</th>
<td>{{eventDetailData.limitStatus}}</td>
<th></th>
<td></td>
</tr>
<tr>
<th>催办说明</th>
<td class="status-overdue" colspan="3">将以发送手机短信形式提醒指派部门尽快对事件进行响应处理</td>
</tr>
</table>
</div>
</template>
<script>
export default {
data() {
return {
};
},
methods: {
handleSubmit() {
//
}
},
mounted(){
console.log(this.eventDetailData,'seeeee');
},
props:{
eventDetailData:{
type:Object,
default:()=>{}
}
}
};
</script>
<style scoped>
.form-container{
display: flex;
justify-content: center;
align-items: center;
}
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
table {
width: 90%;
border-collapse: collapse;
margin: 20px 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
background-color: #ffffff;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
vertical-align: top;
}
th {
background-color: #f2f2f2;
font-weight: bold;
}
tr:nth-child(even) {
background-color: #f9f9f9;
}
tr:hover {
background-color: #f1f1f1;
}
td[colspan="3"] {
}
td[rowspan="2"] {
background-color: #c3e6cb;
}
.percentage {
font-size: 14px;
color: #777;
margin-left: 5px;
}
.status-overdue {
color: red;
font-weight: bold;
}
</style>

825
src/views/modules/shequzhili/timeOut/index.vue

@ -0,0 +1,825 @@
<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="'100px'">
<div>
<el-form-item label="事件类别" prop="firstIdList">
<el-cascader ref="cascaderEvent" v-model.trim="formData.firstIdList" :options="cateOptions"
collapse-tags :show-all-levels="false" :props="{
multiple: true,
checkStrictly: true,
emitPath: false,
children: 'children',
label: 'categoryName',
value: 'id',
}" clearable class="u-item-width-normal" />
</el-form-item>
<el-form-item label="工单编号" prop="workOrderNum">
<el-input v-model.trim="formData.workOrderNum" 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="eventContent">
<el-input v-model.trim="formData.eventContent" class="u-item-width-normal" size="small"
clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="指派部门" prop="departId">
<el-cascader class="u-item-width-normal" size="small" ref="myCascader"
v-model.trim="formData.departId" :options="orgOptions" :props="orgOptionProps"
:show-all-levels="false" @change="handleChangeAgency" clearable></el-cascader>
</el-form-item>
<el-form-item label="办理状态" prop="operationType">
<el-cascader class="u-item-width-normal" size="small" ref="myCascader"
v-model.trim="formData.operationType" :options="ProcessingList" :show-all-levels="false"
clearable></el-cascader>
</el-form-item>
<el-form-item label="超时状态" prop="limitStatus">
<!-- <el-cascader class="u-item-width-normal"
size="small"
ref="myCascader"
v-model.trim="formData.limitStatus"
:options="timeoutList"
:show-all-levels="false"
clearable></el-cascader> -->
<el-select v-model.trim="formData.limitStatus" clearable class="u-item-width-normal">
<el-option v-for="item in timeoutList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="办结时限" prop="timeLimit">
<el-date-picker v-model.trim="formData.limitStartTime" class="u-item-width-daterange"
size="small" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd HH:mm:ss" placeholder="开始时间">
</el-date-picker>
<span class="u-data-tag"></span>
<el-date-picker v-model.trim="formData.limitEndTime"
class="u-item-width-daterange u-data-tag" size="small" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd HH:mm:ss" 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>
<!-- <el-dropdown size="small" split-button type="primary" style="margin: 0 10px; height: 30px"
@command="(command) => handleMarkDiffcult(command)">
导入
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="1">下载模板</el-dropdown-item>
<el-dropdown-item command="2">上传导入</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
</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="workOrderNum" align="center" label="工单编号" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="categoryAllName" 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="eventContent" label="事件描述" align="center" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="contactTime" label="联系来电人时限" align="center" :show-overflow-tooltip="true">
</el-table-column>
<!-- <el-table-column prop="phone" align="center" width="110" label="联系电话" :show-overflow-tooltip="true">
<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="latestOperatedTime" align="center" width="110" label="部门办结时限"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="limitStatus" align="center" width="110" label="办理超期"
:show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span v-if="scope.row.deliverystatus === 0">联系当事人超期</span>
<span v-else-if="scope.row.deliverystatus ===1">部门办结超期</span>
<span v-else>--</span>
</template> -->
</el-table-column>
<el-table-column prop="statusName" align="center" width="110" label="办理状态"
:show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span v-if="scope.row.handlestatus === 0">联系当事人超期</span>
<span v-else-if="scope.row.handlestatus ===1">部门办结超期</span>
<span v-else>--</span>
</template> -->
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="200px" prop="status">
<template slot-scope="scope">
<el-button @click="handleWatch(scope.row)" type="text" size="small">查看</el-button>
<el-button @click="handleDispose(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="pageType == 'dispose' || pageType == 'info' || pageType == 'assign' || pageType=='check'">
<event-info ref="eleEditForm" :pageType="pageType" :eventId="eventId" :eventDetailData="eventDetailData"
@handleClose="handleClose" @handleOk="handleOk" @dialogOk="handleEditSuccess" />
</div>
<el-dialog title="催办" :visible.sync="dialogVisible" width="650px" top="5vh" class="dialog-h"
:before-close="handleClose">
<Urging ref="ref_form" v-if="dialogVisible" @dialogCancle="addFormCancle" @dialogOk="addFormOk"
:eventDetailData="eventDetailData"></Urging>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import axios from "axios";
import Urging from "./Urging.vue"
import eventInfo from "../event/cpts/event-info.vue";
export default {
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 = {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
}
return {
pageType: "list", // list add dispose info
user: {},
agencyId: "",
ProcessingList: [
{
value: "1",
label: "未联系当事人",
},
{
value: "2",
label: "已联系当事人",
},
{
value: "3",
label: "办理中",
},
{
value: "4",
label: "已办结待审核",
},
{
value: "5",
label: "已审核归档",
},
],
orgOptionProps,
level: '',
optionsG: [],
sarr: [],
dialogVisible:false,
tableData: [
],
statusArray: [
{
value: "processing",
label: "处理中",
},
{
value: "closed_case",
label: "已完成",
},
],
timeoutList: [
{
value: "1",
label: "响应超时",
},
{
value: "2",
label: "办理超时",
}
],
formData: {
agencyId: "",
sourceType: "",
departId:'',
eventContent: "",
name: "",
mobile: "",
startTime: "",
endTime: "",
limitStartTime: "",
limitEndTime: "",
status: "",
firstIdList: [],
secondIdList: [],
workOrderNum: "",
limitStatus:"",
operationType:"",
action:0
},
cateOptions: [],
eventTypeCheck: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
// endPickerOptions: {
// disabledDate: endDisabledDate,
// },
// startPickerOptions: {
// disabledDate: startDisabledDate,
// },
eventId: "",
searchH: 180,
eventDetailData: {},
showVoice: false,
selVoiceUrl: "",
multipleSelection: [],
importLoading: false,
importType: "1"
};
},
components:{Urging,eventInfo},
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";
}
},
"formData.limitEndTime": function (val) {
if (val && val != "") {
let arrayTemp = val.split(" ");
this.formData.limitEndTime = 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();
},
methods: {
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);
});
},
async handleMarkDiffcult(command) {
const url = "/governance/icEvent/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/icEvent/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);
}
},
handleSearch(val) {
this.pageNo = 1;
this.getTableData();
},
//
async handleLook(row) {
let { agencyId, gridId, gridName, name, reportUserId } = row
const resiId = reportUserId;
this.$store.dispatch('saveData', { agencyId, gridId, gridName, 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 handleExport() {
const url = "/governance/icEvent/export";
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...formData,
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
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) => {
return this.$message.error("网络错误");
});
},
async handleAdd() {
this.pageType = "add";
},
async getDetail(row){
this.eventId = row.icEventId;
const url = "/governance/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
} else {
this.$message.error(msg);
}
},
async handleWatch(row) {
await this.getDetail(row)
this.pageType = "info";
},
async handleDispose(row) {
await this.getDetail(row)
this.dialogVisible=true;
},
//
async handleExportModule() {
let url = '/governance/icEvent/downloadTemplate';
let params = {};
await this.$http({
method: 'POST',
url,
responseType: 'blob',
data: params
})
.then(res => {
if (res.headers['content-disposition']) {
let fileName = window.decodeURI(res.headers['content-disposition'].split(';')[1].split('=')[1]);
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
} else this.$message.error('下载失败');
})
.catch(err => {
console.log('err', err);
return this.$message.error('网络错误');
});
},
handleExcelSuccess(res, file) {
if (!res.code === 0 && !res.msg === 'success') {
this.$message.error(res.msg);
}
},
handleProgress(event, file, fileList) {
},
beforeExcelUpload(file) {
const isType = file.type === 'application/vnd.ms-excel';
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
const fileType = isType || isTypeComputer;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!fileType) {
this.$message.error('上传文件只能是xls/xlsx格式!');
}
if (!isLt1M) {
this.$message.error('上传文件大小不能超过 10MB!');
}
return fileType && isLt1M;
},
importTypeChange(val) {
this.importType = val
},
async uploadHttpRequest(file) {
this.importLoading = true;
this.importBtnTitle = '正在上传中...';
this.$message({
showClose: true,
dangerouslyUseHTMLString: true,
message: "导入中,请到系统管理-<a id='clickA' style='cursor: pointer;'>导入记录</a>中查看进度",
duration: 3000
});
let than = this;
document.getElementById('clickA').addEventListener('click', function () {
than.$router.replace('/main/importRecord-index');
});
const formData = new FormData(); //FormDataappend('key', value)
formData.append('file', file.file); //
formData.append('code', ''); //
let url = '/governance/icEvent/importEvent'
if (this.importType == 2) {
url = '/governance/icEvent/importAwo'
}
console.log(url)
await this.$http
.post(url, formData)
.then(res => {
if (res.data.code == 0 && res.data.msg == 'success') {
const data = res.data.data;
this.dataList = [
...Object.keys(data.option.exist).map(k => {
return {
index: k,
srcField: data.option.exist[k],
exist: true,
field: data.option.exist[k]
};
}),
...Object.keys(data.option.notExist).map(k => {
return {
index: k,
srcField: data.option.notExist[k],
exist: false,
field: ''
};
})
];
this.importOption = data.option;
this.importCode = data.code;
this.fileData = file;
} else this.$message.error(res.data.msg);
})
.catch(err => {
console.log('失败', err);
file.onError(); //
});
this.importLoading = false;
this.importBtnTitle = '导入';
this.$refs.upload.clearFiles();
this.getTableData();
},
//
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 handleDel(rowData) {
let message = "确认删除?";
this.$confirm(message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.delEvent(rowData.icEventId);
}).catch((err) => { });
},
async delEvent(eventId) {
const url = "/governance/icEvent/delete";
let idsArr = [eventId];
const { data, code, msg } = await requestPost(url, idsArr);
if (code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
},
async getTableData() {
const url = "/governance/icEvent/list";
if (this.eventTypeCheck) {
this.formData.secondIdList = this.eventTypeCheck
}
const { pageSize, pageNo, formData } = this;
// formData
let newFormData = { ...formData };
if(!this.formData.limitStatus){
newFormData.limitStatus = '3'
}
// agencyId
if (Array.isArray(newFormData.agencyId) && newFormData.agencyId.length) {
if (this.level == "grid") {
newFormData.gridId = newFormData.agencyId[newFormData.agencyId.length - 1];
newFormData.agencyId = "";
} else {
newFormData.agencyId = newFormData.agencyId[newFormData.agencyId.length - 1];
newFormData.gridId = "";
}
} else {
newFormData.agencyId = "";
newFormData.gridId = "";
}
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...newFormData,
});
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";
const { data, code, msg } = await requestPost(url, {});
if (code === 0) {
this.cateOptions = this.deepTree(data, "children");
} else {
this.$message.error(msg);
}
},
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
getOrgTreeList() {
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取组织树成功', res.data)
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 {
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
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);
}
}
}
},
resetSearch() {
this.formData = {
agencyId: "",
gridId: "",
sourceType: "",
eventContent: "",
name: "",
mobile: "",
startTime: "",
endTime: "",
limitStartTime: "",
limitEndTime: "",
operationType:'',
status: "",
firstIdList: [],
secondIdList: [],
};
this.eventTypeCheck = [];
this.pageNo = 1;
this.getTableData();
// this.loadTable()
},
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,
};
});
}
},
showAwoList(row) {
this.$refs.awoList.open(row)
},
handleChangeAgency(val) {
this.sarr = []
const map = new Map();
this.getLastItem(
this.orgOptions,
val,
"agencyId"
);
this.level = this.sarr[this.sarr.length - 1].level
this.formData.departId = this.sarr[this.sarr.length - 1].agencyId
},
},
};
</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>

3
src/views/modules/workSys/role/roleForm.vue

@ -136,8 +136,9 @@ export default {
this.formData.id = roleId
this.defaultRole = defaultRole
this.loadFormData()
}else{
this.defaultRole = '0'
}
this.endLoading()

Loading…
Cancel
Save