Browse Source

事件

master
dai 2 years ago
parent
commit
66606e999e
  1. 676
      src/assets/scss/modules/shequzhili/event-info.scss
  2. 98
      src/views/modules/shequzhili/event/cpts/add.vue
  3. 138
      src/views/modules/shequzhili/event/cpts/categoryArray.vue
  4. 897
      src/views/modules/shequzhili/event/cpts/edit.vue
  5. 1417
      src/views/modules/shequzhili/event/cpts/event-info.vue
  6. 625
      src/views/modules/shequzhili/event/cpts/process-form-replay.vue
  7. 479
      src/views/modules/shequzhili/event/cpts/process-form.vue
  8. 8
      src/views/modules/shequzhili/event/cpts/replyOptions.js
  9. 39
      src/views/modules/shequzhili/event/eventList.vue
  10. 2
      vue.config.js

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

@ -1,109 +1,104 @@
@import "../../c/config";
@import "../../c/function";
.g-add{
.g-add-page{
.g-add {
.g-add-page {
display: flex;
.g-left {
box-sizing: border-box;
width:40%;
padding: 5px 10px;
box-sizing: border-box;
width: 40%;
padding: 5px 10px;
}
.g-right {
box-sizing: border-box;
width: 60%;
padding: 5px 10px;
box-sizing: border-box;
width: 60%;
padding: 5px 10px;
}
.form{
.cell-width-1{
width: 250px
.form {
.cell-width-1 {
width: 250px;
}
.avatar-uploader {
margin: 0 0 0 20px;
// /deep/ .el-upload--picture-card{
// width: 100px;
// height: 100px;
// }
// /deep/ .el-upload{
// width: 100px;
// height: 100px;
// line-height: 100px;
// }
// /deep/ .el-upload-list--picture-card .el-upload-list__item{
// width: 100px;
// height: 100px;
// line-height: 100px;
// }
// /deep/ .el-upload-list--picture-card .el-upload-list__item-thumbnail{
// width: 100px;
// height: 100px;
// line-height: 100px;
// }
// /deep/ .avatar{
// width: 100px;
// height: 100px;
// }
// /deep/ .el-upload-list__item-status-label {
// display: block;
// position: absolute;
// right: -15px;
// top: -6px;
// width: 40px;
// height: 24px;
// background: #13ce66;
// text-align: center;
// -webkit-transform: rotate(45deg);
// transform: rotate(45deg);
// -webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
// box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
// }
// /deep/ .el-upload-list__item-actions {
// position: absolute;
// width: 100%;
// height: 100%;
// left: 0;
// top: 0;
// cursor: default;
// text-align: center;
// color: #fff;
// opacity: 0;
// font-size: 20px;
// background-color: rgba(0, 0, 0, 0.5);
// -webkit-transition: opacity .3s;
// transition: opacity .3s;
// }
// /deep/ .el-upload--picture-card{
// width: 100px;
// height: 100px;
// }
// /deep/ .el-upload{
// width: 100px;
// height: 100px;
// line-height: 100px;
// }
// /deep/ .el-upload-list--picture-card .el-upload-list__item{
// width: 100px;
// height: 100px;
// line-height: 100px;
// }
// /deep/ .el-upload-list--picture-card .el-upload-list__item-thumbnail{
// width: 100px;
// height: 100px;
// line-height: 100px;
// }
// /deep/ .avatar{
// width: 100px;
// height: 100px;
// }
// /deep/ .el-upload-list__item-status-label {
// display: block;
// position: absolute;
// right: -15px;
// top: -6px;
// width: 40px;
// height: 24px;
// background: #13ce66;
// text-align: center;
// -webkit-transform: rotate(45deg);
// transform: rotate(45deg);
// -webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
// box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
// }
// /deep/ .el-upload-list__item-actions {
// position: absolute;
// width: 100%;
// height: 100%;
// left: 0;
// top: 0;
// cursor: default;
// text-align: center;
// color: #fff;
// opacity: 0;
// font-size: 20px;
// background-color: rgba(0, 0, 0, 0.5);
// -webkit-transition: opacity .3s;
// transition: opacity .3s;
// }
}
}
}
}
.g-page {
display: flex;
width:100%;
.g-total{
width:100%;
}
.g-left {
box-sizing: border-box;
width: 55%;
padding: 5px 10px;
}
.g-right {
box-sizing: border-box;
width: 45%;
padding: 5px 10px;
}
display: flex;
width: 100%;
.g-total {
width: 100%;
}
.g-left {
box-sizing: border-box;
width: 55%;
padding: 5px 10px;
}
.g-right {
box-sizing: border-box;
width: 45%;
padding: 5px 10px;
}
}
.cell-width-area{
width: 450px
.cell-width-area {
width: 450px;
}
.div_map {
@ -116,8 +111,8 @@
left: 5px;
}
.div-btn{
margin-top:50px;
.div-btn {
margin-top: 50px;
display: flex;
justify-content: center;
@ -125,7 +120,7 @@
font-size: 14px;
padding: 8px 16px;
cursor: pointer;
color:#fff;
color: #fff;
border: 1px dashed #0c81fe;
border-radius: 6px;
@ -136,14 +131,14 @@
margin-left: 20px;
}
}
.cell-width-1{
width: 250px
.cell-width-1 {
width: 250px;
}
.cell-width-long{
width: 450px
.cell-width-long {
width: 450px;
}
.cell-width-2{
width: 300px
.cell-width-2 {
width: 300px;
}
.cell-width-map {
@ -154,8 +149,8 @@
width: 150px;
}
.process-form{
margin-top:20px;
.process-form {
margin-top: 20px;
.process-title {
margin-bottom: 25px;
@ -167,22 +162,20 @@
line-height: 18px;
}
.process-title-vis{
.process-title-vis {
color: #fff;
}
}
}
.m-card {
overflow-x: auto;
overflow-x: auto;
}
.m-btns {
display: flex;
justify-content: center;
display: flex;
justify-content: center;
}
.m-info {
padding-left: 30px;
font-size: 14px;
@ -193,68 +186,67 @@
// width: 500px;
.info-title {
margin-top: 30px;
font-size: 20px;
font-family: PingFang SC;
font-weight: bold;
color: #333;
line-height: 30px;
margin-top: 30px;
font-size: 20px;
font-family: PingFang SC;
font-weight: bold;
color: #333;
line-height: 30px;
}
.info-content {
margin: 20px 0;
margin: 20px 0;
}
.info-pics {
display: flex;
margin: 20px 0;
img {
display: block;
width: 32%;
height: 90px;
margin-right: 9px;
object-fit: cover;
}
display: flex;
margin: 20px 0;
img {
display: block;
width: 32%;
height: 90px;
margin-right: 9px;
object-fit: cover;
}
}
.info-prop {
position: relative;
margin: 10px 0;
display: flex;
padding-left: 15px;
position: relative;
margin: 10px 0;
display: flex;
padding-left: 15px;
.line{
text-decoration:underline;
color: #3e8ef7;
}
.line:hover{
cursor:pointer
}
.info-title-2 {
flex: 0 0 100px;
font-size: 14px;
}
.line {
text-decoration: underline;
color: #3e8ef7;
}
.line:hover {
cursor: pointer;
}
.info-title-2 {
flex: 0 0 100px;
font-size: 14px;
}
> span,
> div {
display: block;
// max-width: 300px;
}
> span,
> div {
display: block;
// max-width: 300px;
}
&::before {
content: "";
display: block;
position: absolute;
top: 9px;
left: 0;
width: 7px;
height: 7px;
background: #0c81fe;
border-radius: 3px;
margin-right: 10px;
}
&::before {
content: "";
display: block;
position: absolute;
top: 9px;
left: 0;
width: 7px;
height: 7px;
background: #0c81fe;
border-radius: 3px;
margin-right: 10px;
}
}
.info-prop-vis{
color:#fff;
.info-prop-vis {
color: #fff;
}
}
@ -267,7 +259,7 @@
.m-row {
// display: flex;
justify-content: space-between;
width:100%;
width: 100%;
}
.m-hint {
@ -276,12 +268,12 @@
// 暂无数据
img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}
@ -289,217 +281,225 @@
min-width: 400px;
.stat {
margin: 20px 0 10px;
display: flex;
.stat-item {
width: 33%;
text-align: center;
div {
font-size: 17px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#000, 0.5);
line-height: 24px;
&.z-weak {
font-size: 12px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#000, 0.5);
line-height: 24px;
}
}
margin: 20px 0 10px;
display: flex;
.stat-item {
width: 33%;
text-align: center;
div {
font-size: 17px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#000, 0.5);
line-height: 24px;
&.z-weak {
font-size: 12px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#000, 0.5);
line-height: 24px;
}
}
}
}
}
.m-process {
margin-top: 30px;
margin-left: 15px;
width: 400px;
margin-top: 30px;
margin-left: 15px;
width: 400px;
.process-title {
margin-bottom: 25px;
margin-left: -5px;
font-size: 16px;
font-family: PingFang SC;
font-weight: bold;
color: #333;
line-height: 18px;
}
.process-title {
margin-bottom: 25px;
margin-left: -5px;
font-size: 16px;
font-family: PingFang SC;
font-weight: bold;
color: #333;
line-height: 18px;
}
.process-title-vis{
color: #fff;
.process-title-vis {
color: #fff;
}
.list {
position: relative;
box-sizing: border-box;
margin-top: 30px/2;
margin-left: 50px/2;
padding: 0 0 0 30px/2;
width: 680px/2;
border-left: 3px solid #0c81fe;
padding-right: 10px;
&::before {
content: "";
position: absolute;
z-index: 1;
display: block;
top: -2px/2;
left: -2px/2;
width: 5px/2;
height: 20px/2;
background-color: #333;
}
.list {
position: relative;
box-sizing: border-box;
margin-top: 30px/2;
margin-left: 50px/2;
padding: 0 0 0 30px/2;
width: 680px/2;
border-left: 3px solid #0c81fe;
padding-right: 10px;
.item {
position: relative;
z-index: 2;
margin-bottom: 8px;
padding-bottom: 8px;
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #333;
line-height: 24px;
padding-left: 20px;
padding-top: 1px;
&::before {
content: "";
display: block;
position: absolute;
top: -5px;
left: -11px;
width: 18px;
height: 18px;
background: #0c81fe;
border: 4px solid lighten(#0c81fe, 15);
border-radius: 100%;
}
&.z-on {
&::before {
content: "";
position: absolute;
z-index: 1;
display: block;
top: -2px/2;
left: -2px/2;
width: 5px/2;
height: 20px/2;
background-color: #333;
background: #e08400;
border-color: lighten(#e08400, 15);
}
}
.item {
position: relative;
z-index: 2;
margin-bottom: 8px;
padding-bottom: 8px;
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #333;
line-height: 24px;
padding-left: 20px;
padding-top: 1px;
&::before {
content: "";
display: block;
position: absolute;
top: -5px;
left: -11px;
width: 18px;
height: 18px;
background: #0c81fe;
border: 4px solid lighten(#0c81fe, 15);
border-radius: 100%;
}
&.z-on {
&::before {
background: #e08400;
border-color: lighten(#e08400, 15);
}
}
&:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
.item-row {
margin-top: -10px;
margin-bottom: 10px;
display: flex;
}
.name {
position: relative;
padding: 0 10px;
font-size: 12px;
font-family: PingFang SC;
font-weight: 500;
color: #fff;
line-height: 22px;
height: 22px;
border-radius: 10px 0 10px 0;
background-color: #0c81fe;
// background-color: #e08400;
}
.date {
margin-left: 10px;
font-size: 12px;
font-family: PingFang SC;
font-weight: 500;
color: #7ca1d2;
line-height: 25px;
}
.detail {
@include cs;
font-size: 14px;
line-height: 20px;
margin-bottom: 5px;
display: flex;
.detail-field {
flex:0 0 100px;
text-align: justify;
text-align-last: justify;
}
.detail-value {
// width: 78%;
.detail-link {
display: inline;
}
}
}
.attachement-list {
padding-left: 80px;
a {
display: block;
cursor: pointer;
color: #4df0ff;
font-size: 14px;
i {
color: #333;
}
}
}
&:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
.item-row {
margin-top: -10px;
margin-bottom: 10px;
display: flex;
}
.name {
position: relative;
padding: 0 10px;
font-size: 12px;
font-family: PingFang SC;
font-weight: 500;
color: #fff;
line-height: 22px;
height: 22px;
border-radius: 10px 0 10px 0;
background-color: #0c81fe;
// background-color: #e08400;
}
.date {
margin-left: 10px;
font-size: 12px;
font-family: PingFang SC;
font-weight: 500;
color: #7ca1d2;
line-height: 25px;
}
.btn {
margin-left: 30px;
color: #999;
font-size: 12px;
&:hover {
color: #39e;
cursor: pointer;
}
}
.detail {
@include cs;
font-size: 14px;
line-height: 20px;
margin-bottom: 5px;
display: flex;
.detail-field {
flex: 0 0 100px;
text-align: justify;
text-align-last: justify;
}
.detail-value {
// width: 78%;
.detail-link {
display: inline;
}
}
}
.attachement-list {
padding-left: 80px;
a {
display: block;
cursor: pointer;
color: #4df0ff;
font-size: 14px;
.item-vis{
color:#fff
i {
color: #333;
}
}
}
}
.item-vis {
color: #fff;
}
}
}
.m-top {
display: flex;
display: flex;
}
.m-chart {
min-height: 200px;
min-height: 200px;
}
.div-satisfy{
padding:10px 0 0;
display:flex ;
.div-satisfy {
padding: 10px 0 0;
display: flex;
justify-content: flex-start;
text-align: center;
>div{
margin-left:50px;
> div {
margin-left: 50px;
}
img{
width:80px;
height:80px;
img {
width: 80px;
height: 80px;
}
.tip-satisfy{
.tip-satisfy {
text-align: center;
margin-top:10px
margin-top: 10px;
}
}
.box-card{
.box-card {
padding: 0px;
border: 0px solid #EBEEF5;
background-color:transparent;
-webkit-box-shadow:none;
box-shadow:none
border: 0px solid #ebeef5;
background-color: transparent;
-webkit-box-shadow: none;
box-shadow: none;
}
.form-item::v-deep .el-form-item__label {
@ -519,6 +519,4 @@
display: flex;
justify-content: flex-start;
width: 250px;
}

98
src/views/modules/shequzhili/event/cpts/add.vue

@ -82,21 +82,46 @@
v-model="formData.idCard"
></el-input>
</el-form-item>
<el-form-item
label="响应级别"
label-width="150px"
prop="eventType"
>
<el-select
v-model="formData.eventType"
placeholder="请选择"
size="small"
clearable
class="cell-width-1"
>
<el-option
v-for="item in eventTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="事件分类"
label-width="150px"
:class="{ 'form-item': source === 'visiual' }"
prop="categoryList">
<div :class="{ 'visiual-form': source === 'visiual'}">
<categoryArray
v-model="formData.categoryList"
:casOptions="casOptions"
:props="optionProps"
:optionProps="optionProps"
@handleChangeCate="handleChangeCate"
></categoryArray>
prop="categoryList"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<categoryArray
v-model="formData.categoryList"
:casOptions="casOptions"
:props="optionProps"
:optionProps="optionProps"
@handleChangeCate="handleChangeCate"
></categoryArray>
</div>
</el-form-item>
<el-form-item
label="反应渠道"
label-width="150px"
@ -312,7 +337,7 @@ import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
import daiMap from "@/utils/dai-map";
import { isCard } from "@/utils/validate";
import categoryArray from "./categoryArray.vue"
import categoryArray from "./categoryArray.vue";
let loading; //
var map;
@ -332,10 +357,13 @@ function iniFmData() {
happenTime: "", //
eventContent: "", //
imageList: [], //
categoryList: [],//
categoryList: [], //
address: "", //
latitude: "", //
longitude: "", //
//
eventType: "",
};
}
@ -343,6 +371,7 @@ export default {
data() {
return {
formType: "add", // addeditdetail
searchOptions: [],
searchValue: "",
resultList: [],
@ -357,7 +386,7 @@ export default {
// oss/file/uploadvariedfile
dialogImageUrl: "oss/file/uploadvariedfile",
uploadUlr:
window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile",
window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile",
// upload_url: '', // URL
upload_name: "", //
replayImgList: [],
@ -371,7 +400,7 @@ export default {
selPersonIndex: "",
selPerson: {},
demandUserList: [],
casOptions:[],
casOptions: [],
optionProps: {
multiple: false,
value: "id",
@ -379,10 +408,24 @@ export default {
children: "subCategory",
},
hideUploadBtn: false,
eventTypeOptions: [
{
label: "红灯事件",
value: 1,
},
{
label: "黄灯事件",
value: 2,
},
{
label: "蓝灯事件",
value: 3,
},
],
};
},
components: {
categoryArray
categoryArray,
},
computed: {
dataRule() {
@ -419,13 +462,20 @@ export default {
trigger: "blur",
},
],
categoryList:[
categoryList: [
{
required: true,
message: "事件分类不能为空",
trigger: "blur",
},
],
eventType: [
{
required: true,
message: "响应级别不能为空",
trigger: "blur",
},
],
sourceType: [
{
required: true,
@ -465,10 +515,11 @@ export default {
},
},
props: {
source: {//manage visiual
source: {
//manage visiual
type: String,
default: 'manage'
}
default: "manage",
},
},
watch: {
"formData.name": function (val) {
@ -508,14 +559,11 @@ export default {
methods: {
handleChangeCate(obj) {
this.selCateObj = obj
this.selCateObj = obj;
this.formData.categoryList = [];
let flag = JSON.stringify(obj) == '{}'
if(flag)
this.formData.categoryList = []
else
this.formData.categoryList.push(this.selCateObj);
let flag = JSON.stringify(obj) == "{}";
if (flag) this.formData.categoryList = [];
else this.formData.categoryList.push(this.selCateObj);
},
async handleShowPersonList() {
if (this.formData.gridId) {

138
src/views/modules/shequzhili/event/cpts/categoryArray.vue

@ -1,62 +1,78 @@
<template>
<div>
<el-form :model="form" >
<el-form-item>
<el-cascader class="cell-width-2"
ref="myCascader"
v-model="form.selCategoryArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
clearable
@change="handleChangeCate"></el-cascader>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
data() {
return {
form:{
selCategoryArray:{}
},
selCateObj:{},
iscascaderShow:0
};
},
props:{
casOptions:{
type:Array,
default:()=>[]
},
optionProps:{
type:Object,
default:()=>{}
}
},
created() {},
methods: {
handleChangeCate(){
if(this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0]){
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
}else{
this.selCateObj = {}
}
this.$emit('handleChangeCate',this.selCateObj)
}
},
mounted(){
++this.iscascaderShow;
},
components: {},
computed: {},
watch: {},
};
</script>
<style lang="scss" scoped>
</style>>
<div>
<el-form :model="form">
<el-form-item>
<el-cascader
class="cell-width-2"
ref="myCascader"
v-model="form.selCategoryArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
clearable
@change="handleChangeCate"
></el-cascader>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
data() {
return {
form: {
selCategoryArray: "",
},
selCateObj: {},
iscascaderShow: 0,
};
},
props: {
casOptions: {
type: Array,
default: () => [],
},
optionProps: {
type: Object,
default: () => {},
},
iniValue: String,
},
components: {},
computed: {},
watch: {
iniValue(val) {
// console.log('watch iniValue', val)
if (val) {
this.form.selCategoryArray = val;
}
},
},
mounted() {
++this.iscascaderShow;
if (this.iniValue) {
// console.log('mounted iniValue', this.iniValue)
this.form.selCategoryArray = this.iniValue;
}
},
methods: {
handleChangeCate() {
let nodes = this.$refs["myCascader"].getCheckedNodes();
if (nodes && nodes.length > 0) {
this.selCateObj =
this.$refs["myCascader"].getCheckedNodes()[0].data;
} else {
this.selCateObj = {};
}
// console.log(nodes, this.form.selCategoryArray);
this.$emit("handleChangeCate", this.selCateObj);
},
},
};
</script>
<style lang="scss" scoped></style>
>

897
src/views/modules/shequzhili/event/cpts/edit.vue

@ -0,0 +1,897 @@
<template>
<div class="g-add">
<div class="g-add-page">
<div class="g-left">
<el-form
ref="ref_form1"
:inline="true"
:model="formData"
:rules="dataRule"
class="form"
>
<el-form-item
label="所属网格 "
prop="gridId"
label-width="150px"
style="display: block"
>
<el-select
v-model.trim="formData.gridId"
placeholder="请选择"
clearable
class="cell-width-1"
>
<el-option
v-for="item in gridList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="报事人"
prop="name"
label-width="150px"
style="display: block"
>
<el-input
class="cell-width-1"
maxlength="10"
placeholder="请输入报事人姓名"
v-model="formData.name"
>
</el-input>
<div>
<el-button
style="margin-top: 10px"
type="primary"
size="mini"
@click="handleShowPersonList"
>居民信息中选择</el-button
>
</div>
</el-form-item>
<el-form-item
label="手机号"
prop="mobile"
label-width="150px"
style="display: block"
>
<el-input
class="cell-width-1"
maxlength="30"
placeholder="请输入手机号 "
v-model="formData.mobile"
>
</el-input>
</el-form-item>
<el-form-item
label="身份证号"
prop="idCard"
label-width="150px"
style="display: block"
>
<el-input
class="cell-width-1"
maxlength="30"
placeholder="请输入身份证号"
v-model="formData.idCard"
></el-input>
</el-form-item>
<el-form-item
label="响应级别"
label-width="150px"
prop="eventType"
>
<el-select
v-model="formData.eventType"
placeholder="请选择"
size="small"
clearable
class="cell-width-1"
>
<el-option
v-for="item in eventTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="事件分类"
label-width="150px"
:class="{ 'form-item': source === 'visiual' }"
prop="categoryList"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<categoryArray
:ini-value="formData.iniCategoryId"
v-model="formData.categoryList"
:casOptions="casOptions"
:props="optionProps"
:optionProps="optionProps"
@handleChangeCate="handleChangeCate"
></categoryArray>
</div>
</el-form-item>
<el-form-item
label="反应渠道"
label-width="150px"
prop="sourceType"
>
<el-select
v-model="formData.sourceType"
placeholder="请选择"
size="small"
clearable
class="cell-width-1"
>
<el-option
v-for="item in qudaoArray"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="发生时间"
prop="happenTime"
label-width="150px"
style="display: block"
>
<el-date-picker
v-model="formData.happenTime"
class="cell-width-1"
type="datetime"
placeholder="发生时间"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item
label="事件内容"
prop="eventContent"
label-width="150px"
style="display: block"
>
<el-input
class="cell-width-2"
type="textarea"
maxlength="500"
show-word-limit
:rows="5"
placeholder="请输入事件内容,不超过500字"
v-model="formData.eventContent"
></el-input>
</el-form-item>
</el-form>
</div>
<div class="g-right">
<el-form
ref="ref_form2"
:inline="true"
:model="formData"
:rules="dataRule"
class="form"
>
<el-form-item
label="图片"
label-width="150px"
style="display: block"
>
<el-upload
:headers="$getElUploadHeaders()"
:class="[
'avatar-uploader',
{ hide: hideUploadBtn },
]"
ref="uploadPic"
:action="uploadUlr"
list-type="picture-card"
:on-exceed="exceedPic"
:on-remove="removePic"
:file-list="replayImgList"
:on-change="handleEditChange"
:on-success="handleSuccess"
:limit="3"
>
<span class="font-14">选择图片</span>
<div slot="tip" class="upload_tip">
最多上传3张图片图片支持jpgjpegbmpgit或png格式
</div>
</el-upload>
</el-form-item>
<el-form-item
label="地图位置"
prop="longitude"
label-width="150px"
style="display: block"
>
<div style="width: 500px">
<el-select
v-model="searchValue"
filterable
style="width: 500px"
remote
:reserve-keyword="true"
placeholder="请输入关键词"
:remote-method="remoteMethod"
:loading="loading"
>
<el-option
v-for="(item, index) in searchOptions"
@click.native="handleClickKey(index)"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<div id="app_event" class="div_map"></div>
</div>
</el-form-item>
<el-form-item
label="详细地址"
prop="address"
label-width="150px"
style="display: block"
>
<el-input
class="cell-width-1"
v-model="formData.address"
>
</el-input>
</el-form-item>
</el-form>
</div>
</div>
<!-- 新增弹出框 -->
<el-dialog
:visible.sync="personTableShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
title="选择居民"
width="550px"
top="5vh"
class="dialog-h"
@closed="diaClose"
>
<div style="padding: 10px 30px">
<el-form
:inline="false"
ref="ref_formSearch"
:label-width="'90px'"
>
<el-form-item label="所属网格" label-width="150px">
<el-select
class="cell-width-1"
v-model.trim="selGridId"
placeholder="请选择"
clearable
>
<el-option
v-for="item in gridList"
@click.native="handleChangeGrid"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="居民"
label-width="150px"
prop="selPersonIndex"
>
<el-select
v-model="selPersonIndex"
class="cell-width-1"
filterable
placeholder="请选择"
clearable
>
<el-option
v-for="(item, index) in demandUserList"
:key="item.demandUserId"
:label="item.label"
:value="index"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div class="div-btn">
<el-button
style="margin-left: 20px"
type="primary"
size="small"
@click="handleComfirmSelPerson"
>确定</el-button
>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
import daiMap from "@/utils/dai-map";
import { isCard } from "@/utils/validate";
import categoryArray from "./categoryArray.vue";
let loading; //
var map;
var search;
var markers;
var infoWindowList;
var geocoder; //
function iniFmData() {
return {
gridId: "", //
reportUserId: "", // ID
name: "", //
mobile: "", //
idCard: "", //
sourceType: "", //
happenTime: "", //
eventContent: "", //
imageList: [], //
categoryList: [], //
address: "", //
latitude: "", //
longitude: "", //
//
eventType: "",
};
}
export default {
data() {
return {
formType: "edit", // addeditdetail
searchOptions: [],
searchValue: "",
resultList: [],
loading: false,
btnDisable: false,
gridList: [], //list--
qudaoArray: [],
formData: iniFmData(),
//
keyWords: "",
isFirst: true, //
// oss/file/uploadvariedfile
dialogImageUrl: "oss/file/uploadvariedfile",
uploadUlr:
window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile",
// upload_url: '', // URL
upload_name: "", //
replayImgList: [],
okflag: false,
formDataSearch: {
gridId: "",
name: "",
},
personTableShow: false,
selGridId: "",
selPersonIndex: "",
selPerson: {},
demandUserList: [],
casOptions: [],
optionProps: {
multiple: false,
value: "id",
label: "name",
children: "subCategory",
checkStrictly: true,
emitPath: false,
},
hideUploadBtn: false,
eventTypeOptions: [
{
label: "红灯事件",
value: 1,
},
{
label: "黄灯事件",
value: 2,
},
{
label: "蓝灯事件",
value: 3,
},
],
};
},
components: {
categoryArray,
},
computed: {
dataRule() {
let checkIdCard = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入身份证"));
} else {
if (!isCard(value)) {
callback(new Error("身份证号格式不正确"));
}
callback();
}
};
return {
gridId: [
{
required: true,
message: "所属网格不能为空",
trigger: "blur",
},
],
name: [
{
required: true,
message: "报事人不能为空",
trigger: "blur",
},
],
mobile: [
{
required: true,
message: "手机号不能为空",
trigger: "blur",
},
],
categoryList: [
{
required: true,
message: "事件分类不能为空",
trigger: "blur",
},
],
eventType: [
{
required: true,
message: "响应级别不能为空",
trigger: "blur",
},
],
sourceType: [
{
required: true,
message: "反映渠道不能为空",
trigger: "blur",
},
],
eventContent: [
{
required: true,
message: "事件内容不能为空",
trigger: "blur",
},
],
happenTime: [
{
required: true,
message: "发生时间不能为空",
trigger: "blur",
},
],
address: [
{
required: true,
message: "事件地址不能为空",
trigger: "blur",
},
],
longitude: [
{
required: true,
message: "坐标位置不能为空",
trigger: "blur",
},
],
};
},
},
props: {
source: {
//manage visiual
type: String,
default: "manage",
},
eventId: String,
eventDetailData: Object,
},
watch: {
"formData.name": function (val) {
this.$emit("changeName", val);
},
"formData.mobile": function (val) {
this.$emit("changeMobile", val);
},
"formData.reportUserId": function (val) {
this.$emit("changeUserId", val);
},
"formData.gridId": function (val) {
this.selGridId = val;
this.$emit("changeGridId", val);
},
eventDetailData(obj) {
this.syncDetail(obj);
},
},
async created() {
const { user } = this.$store.state;
this.agencyId = user.agencyId;
this.syncDetail();
this.loadGrid();
this.getCategoryList();
this.getQudaoOptions();
},
async mounted() {
this.initMap(this.formData.latitude, this.formData.longitude);
},
methods: {
syncDetail() {
const { eventDetailData: info } = this;
let obj = {
gridId: info.gridId, //
reportUserId: info.reportUserId, // ID
name: info.name, //
mobile: info.mobile, //
idCard: info.idCard, //
sourceType: info.sourceType, //
happenTime: info.happenTime, //
eventContent: info.eventContent, //
imageList: info.imageList || [], //
categoryList: [info.categoryId], //
iniCategoryId: info.categoryId, //
address: info.address, //
latitude: info.latitude, //
longitude: info.longitude, //
//
eventType: info.eventType,
};
this.formData = { ...this.formData, ...obj };
console.log("=syncDetail", this.formData);
},
handleChangeCate(obj) {
this.selCateObj = obj;
this.formData.categoryList = [];
let flag = JSON.stringify(obj) == "{}";
if (flag) this.formData.categoryList = [];
else this.formData.categoryList.push(this.selCateObj);
},
async handleShowPersonList() {
if (this.formData.gridId) {
await this.handleChangeGrid();
this.personTableShow = true;
} else {
this.$message.info("请先选择网格");
}
},
diaClose() {
this.personTableShow = false;
},
handleComfirmSelPerson() {
if (this.selPersonIndex === 0 || this.selPersonIndex) {
let selPerson = this.demandUserList[this.selPersonIndex];
this.formData.name = selPerson.demandUserName;
this.formData.mobile = selPerson.demandUserMobile;
this.formData.reportUserId = selPerson.demandUserId;
this.formData.idCard = selPerson.idCard;
this.personTableShow = false;
} else {
this.$message.info("请选择人员");
}
},
async handleChangeGrid() {
const url = "/epmetuser/icresiuser/demandusers";
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page"
let params = {
agencyId: "",
gridId: this.selGridId,
name: "",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.demandUserList = data;
} else {
this.$message.error(msg);
}
this.tableLoading = false;
},
async loadGrid() {
const url = "/gov/org/customergrid/gridoption";
let params = {
agencyId: this.agencyId,
purpose: "addorupdate",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.gridList = data;
} else {
this.$message.error(msg);
}
},
async getCategoryList() {
const url = "/gov/issue/issueprojectcategorydict/list";
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
let treeDataNew = this.filterTree(data);
++this.iscascaderShow;
this.casOptions = [];
this.selCategoryArray = [];
this.casOptions = treeDataNew;
} else {
this.$message.error(msg);
}
},
async getQudaoOptions() {
const url = "/sys/dict/data/dictlist";
const { data, code, msg } = await requestPost(url, {
dictType: "ic_event_source_type",
});
if (code === 0) {
this.qudaoArray = data;
} else {
this.$message.error(msg);
}
},
//
filterTree(arr) {
let childs = arr;
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory);
} else {
delete childs[i].subCategory;
}
}
}
return arr;
},
handleChangeAgency(value) {
// this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
// this.orgId = this.selCategoryArray.length > 0 ? this.selCategoryArray[this.selCategoryArray.length - 1] : ''
},
async getEventInfo() {
this.okflag = false;
this.$refs["ref_form1"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
return false;
} else {
this.$refs["ref_form2"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
return false;
} else {
if (
!formVltHelper.userOrMobile(
this.formData.mobile
)
) {
this.$message({
type: "error",
message: "手机号格式有误",
});
return false;
}
const regCard = /(^\d{15}$)|(^\d{17}(\d|X)$)/; //1518151817X
if (
this.formData.idCard &&
regCard.test(this.formData.idCard) === false
) {
this.$message({
type: "warning",
message: "请输入正确的身份证号码",
});
return false;
}
this.okflag = true;
}
});
}
});
},
removePic(file, fileList) {
this.formData.imageList.splice(
this.formData.imageList.findIndex((item) => item === file.url),
1
);
this.replayImgList.splice(
this.replayImgList.findIndex((item) => item.uid === file.uid),
1
);
this.hideUploadBtn = fileList.length >= 3;
},
// 3
handleEditChange(file, fileList) {
this.hideUploadBtn = fileList.length >= 3;
},
exceedPic() {
this.$message.warning("最多上传3张预览图片");
},
handleSuccess(response, file, fileList) {
this.replayImgList.push(file);
this.formData.imageList.push(response.data.url);
},
// init
initMap(latitude, longitude) {
map = new daiMap(
document.getElementById("app_event"),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45, //
}
);
//
map.on("dragend", (e) => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude);
},
async handleMoveCenter() {
//
const { lat, lng } = map.getCenter();
this.formData.latitude = lat;
this.formData.longitude = lng;
map.setMarker(lat, lng);
let { msg, data } = await map.getAddress(lat, lng);
if (msg == "success") {
this.formData.address = data.address;
this.searchValue = data.address;
this.searchOptions = [];
}
},
async remoteMethod(query) {
if (query !== "") {
this.loading = true;
const { msg, data } = await map.searchNearby(query);
this.loading = false;
this.resultList = [];
if (
msg == "success" &&
data.resultList &&
data.resultList.length > 0
) {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList;
this.searchOptions = this.resultList.map((item) => {
return {
value: `${item.hotPointID}`,
label: `${item.address + item.name}`,
};
});
}
} else {
this.searchOptions = [
{
value: "0",
label: "未检索到结果",
},
];
}
} else {
this.searchOptions = [];
}
},
handleClickKey(index) {
let selPosition = this.resultList[index];
let lonlat = selPosition.lonlat.split(" ");
map.setCenter(lonlat[1], lonlat[0]);
map.setMarker(lonlat[1], lonlat[0]);
this.formData.latitude = lonlat[1];
this.formData.longitude = lonlat[0];
this.formData.address = selPosition.address + selPosition.name;
},
resetData() {
this.formData = iniFmData();
this.replayImgList = [];
this.searchValue = "";
this.searchOptions = [];
this.resultList = [];
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/shequzhili/event-info.scss";
.item_width_4 {
width: 350px;
}
.div_map {
margin-top: 10px;
}
</style>
<style lang="scss">
.el-dialog__body {
padding: 0 10px 20px !important;
}
.hide {
.el-upload--picture-card {
display: none !important;
}
}
</style>

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

File diff suppressed because it is too large

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

@ -1,11 +1,12 @@
<template>
<div class="search">
<el-form ref="ref_form1"
:inline="false"
:model="formData"
:rules="dataRule">
<!-- <el-form-item label="事件分类"
<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">
@ -20,92 +21,109 @@
@change="handleChangeCate"></el-cascader>
</div>
</el-form-item> -->
<!-- 0上报 1阅收 3完结 4审核 5事件评价 6结案归档-->
<el-form-item label="办理状态"
prop="manageStatus"
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-select v-model="formData.manageStatus" placeholder="请选择办理状态">
<el-option
v-for="item in statusOption"
:label="item.label"
:value="item.value"
clearable
:key="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item
label="办理时间"
prop="manageTime"
label-width="150px"
style="display: block"
<!-- 0上报 1阅收 3完结 4审核 5事件评价 6结案归档-->
<el-form-item
label="办理状态"
prop="manageStatus"
label-width="150px"
:class="{ 'form-item': source === 'visiual' }"
style="display: block"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-select
v-model="formData.manageStatus"
placeholder="请选择办理状态"
>
<el-date-picker
v-model="formData.manageTime"
class="cell-width-1"
type="datetime"
placeholder="办理时间"
value-format="yyyy-MM-dd HH:mm:ss"
<el-option
v-for="item in statusOption"
:label="item.label"
:value="item.value"
clearable
:key="item.value"
>
</el-date-picker>
</el-form-item>
<el-form-item label="办理人"
prop="manageResi"
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-input class="cell-width-area"
placeholder="请输入办理人"
v-model="formData.manageResi"></el-input>
</div>
</el-form-item>
<el-form-item label="办理人电话"
prop="manageResiTel"
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-input class="cell-width-area"
placeholder="请输入办理人"
v-model="formData.manageResiTel"></el-input>
</div>
</el-form-item>
<el-form-item label="办理意见"
prop="content"
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<div :class="{'visiual-form':source==='visiual'}">
<el-input class="cell-width-area"
type="textarea"
maxlength="500"
show-word-limit
:rows="5"
placeholder="请输入回复内容,不超过500字"
v-model="formData.content"></el-input>
</div>
</el-form-item>
<el-form-item label=""
label-width="150px"
:class="{'form-item':source==='visiual'}"
style="display: block">
<el-checkbox :class="{'form-item':source==='visiual'}"
v-model="status">已完成</el-checkbox>
</el-form-item>
</el-form>
</div>
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item
label="办理时间"
prop="manageTime"
label-width="150px"
style="display: block"
>
<el-date-picker
v-model="formData.manageTime"
class="cell-width-1"
type="datetime"
placeholder="办理时间"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item
label="办理人"
prop="manageResi"
label-width="150px"
:class="{ 'form-item': source === 'visiual' }"
style="display: block"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
class="cell-width-area"
placeholder="请输入办理人"
v-model="formData.manageResi"
></el-input>
</div>
</el-form-item>
<el-form-item
label="办理人电话"
prop="manageResiTel"
label-width="150px"
:class="{ 'form-item': source === 'visiual' }"
style="display: block"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
class="cell-width-area"
placeholder="请输入办理人"
v-model="formData.manageResiTel"
></el-input>
</div>
</el-form-item>
<el-form-item
label="办理意见"
prop="content"
label-width="150px"
:class="{ 'form-item': source === 'visiual' }"
style="display: block"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
class="cell-width-area"
type="textarea"
maxlength="500"
show-word-limit
:rows="5"
placeholder="请输入回复内容,不超过500字"
v-model="formData.content"
></el-input>
</div>
</el-form-item>
<el-form-item
label=""
label-width="150px"
:class="{ 'form-item': source === 'visiual' }"
style="display: block"
>
<el-checkbox
:class="{ 'form-item': source === 'visiual' }"
v-model="status"
>已完成</el-checkbox
>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
@ -113,220 +131,241 @@ import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
import { isCard } from "@/utils/validate";
import replyOptions from "./replyOptions";
let loading; //
export default {
data () {
return {
btnDisable: false,
formData: {
operationType: '0',//[0: 1: 2:]
content: '',
manageStatus: '',
manageTime:'',
manageResi:'',
manageResiTel:''
},
status: false,
okflag: false,
// <!-- 0 1 2 3 4 5-->
eventDetailCopy: {},
statusOption:[
{label:'上报',value:0},
{label:'阅收',value:1},
{label:'完结',value:2},
{label:'审核',value:3},
{label:'事件评价',value:4},
{label:'结案归档',value:5}
],
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
};
},
components: {},
computed: {
dataRule () {
return {
content: [
{ required: true, message: "办理意见不能为空", trigger: "blur" },
],
manageStatus: [
{ required: true, message: "办理状态能为空", trigger: "blur" },
],
manageTime: [
{ required: true, message: "办理时间不能为空", trigger: "blur" },
],
manageResi: [
{ required: true, message: "办理人不能为空", trigger: "blur" },
],
manageResiTel: [
{ required: true, message: "办理人电话不能为空", trigger: "blur" },
],
};
},
},
props: {
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
source: {//manage visiual
type: String,
default: 'manage'
}
},
watch: {},
created () {
console.log(this.source)
},
async mounted () {
this.getCategoryList()
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) {
this.selCategoryArray = []
this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId)
this.selCategoryArray.push(this.eventDetailCopy.categoryId)
this.selCateObj = {
name: this.eventDetailCopy.categoryName,
id: this.eventDetailCopy.categoryId
}
}
}
},
methods: {
async getCategoryList () {
const url = "/gov/issue/issueprojectcategorydict/list"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let treeDataNew = this.filterTree(data)
//
++this.iscascaderShow
this.casOptions = []
this.casOptions = treeDataNew
} else {
this.$message.error(msg)
}
},
handleChangeCate () {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data)
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
},
//
filterTree (arr) {
let childs = arr
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory)
} else {
delete childs[i].subCategory
}
}
}
return arr
},
async getReplayInfo () {
this.okflag = false
this.$refs["ref_form1"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
if (this.status) {
if (!this.selCateObj || !this.selCateObj.id) {
this.$message.info("请填写事件分类");
return false
}
this.formData.status = 'closed_case'
} else {
this.formData.status = 'processing'
}
this.formData.categoryId = this.selCateObj.id
this.formData.categoryList = []
this.formData.categoryList.push(this.selCateObj)
this.okflag = true
}
});
},
resetData () {
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
data() {
return {
btnDisable: false,
formData: {
operationType: "0", //[0: 1: 2:]
content: "",
manageStatus: "",
manageTime: "",
manageResi: "",
manageResiTel: "",
},
status: false,
okflag: false,
// <!-- 0 1 2 3 4 5-->
eventDetailCopy: {},
statusOption: replyOptions,
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: "id",
label: "name",
children: "subCategory",
},
};
},
components: {},
computed: {
dataRule() {
return {
content: [
{
required: true,
message: "办理意见不能为空",
trigger: "blur",
},
],
manageStatus: [
{
required: true,
message: "办理状态能为空",
trigger: "blur",
},
],
manageTime: [
{
required: true,
message: "办理时间不能为空",
trigger: "blur",
},
],
manageResi: [
{
required: true,
message: "办理人不能为空",
trigger: "blur",
},
],
manageResiTel: [
{
required: true,
message: "办理人电话不能为空",
trigger: "blur",
},
],
};
},
},
props: {
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default() {
return {};
},
},
processData: Object,
source: {
//manage visiual
type: String,
default: "manage",
},
},
watch: {
processData() {
this.syncProcessData();
},
},
created() {
console.log(this.source);
this.syncProcessData();
},
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: {
syncProcessData() {
const { processData } = this;
this.formData = {
processId: processData.processId,
operationType: "0", //[0: 1: 2:]
content: processData.publicReply,
manageStatus: processData.manageStatus,
manageTime: processData.manageTime,
manageResi: processData.manageResi,
manageResiTel: processData.manageResiTel,
};
},
async getCategoryList() {
const url = "/gov/issue/issueprojectcategorydict/list";
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
let treeDataNew = this.filterTree(data);
//
++this.iscascaderShow;
this.casOptions = [];
this.casOptions = treeDataNew;
} else {
this.$message.error(msg);
}
},
handleChangeCate() {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data);
this.selCateObj =
this.$refs["myCascader"].getCheckedNodes()[0].data;
},
//
filterTree(arr) {
let childs = arr;
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory);
} else {
delete childs[i].subCategory;
}
}
}
return arr;
},
async getReplayInfo() {
this.okflag = false;
this.$refs["ref_form1"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
if (this.status) {
if (!this.selCateObj || !this.selCateObj.id) {
this.$message.info("请填写事件分类");
return false;
}
this.formData.status = "closed_case";
} else {
this.formData.status = "processing";
}
this.formData.categoryId = this.selCateObj.id;
this.formData.categoryList = [];
this.formData.categoryList.push(this.selCateObj);
this.okflag = true;
}
});
},
resetData() {},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
@import "@/assets/scss/modules/visual/a_customize.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
padding: 0 10px 20px !important;
}
</style>

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

@ -1,67 +1,73 @@
<template>
<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="operationType"
@change="handleChangeOperationType">
<el-radio v-if="!eventId"
label="">暂不处理</el-radio>
<el-radio label="0">回复</el-radio>
<!-- <el-radio label="1">立项</el-radio>
<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="operationType"
@change="handleChangeOperationType"
>
<el-radio v-if="!eventId" label="">暂不处理</el-radio>
<el-radio label="0">回复</el-radio>
<!-- <el-radio label="1">立项</el-radio>
<el-radio label="2">转服务</el-radio>
<el-radio label="3">转议题</el-radio> -->
</el-radio-group>
</el-form-item>
</el-form>
<div v-if="operationType==='0'">
<process-form-replay ref="ref_process_form_replay"
:source="source"
:eventDetailData="eventDetailData"
:eventId="eventId"></process-form-replay>
</div>
<div v-if="operationType==='1'">
<process-form-project ref="ref_process_form_project"
:source="source"
:eventDetailData="eventDetailData"
:gridId="gridId"
:eventId="eventId"></process-form-project>
</div>
<div v-if="operationType==='2'">
<process-form-demand ref="ref_process_form_demond"
:source="source"
:eventId="eventId"
:demandUserId="demandUserId"
:demandUserName="demandUserName"
:demandUserMobile="demandUserMobile"
:eventDetailData="eventDetailData"></process-form-demand>
</div>
<div v-if="operationType==='3'">
<process-form-issue ref="ref_process_form_issue"
:source="source"
:eventDetailData="eventDetailData"
:eventId="eventId"></process-form-issue>
</div>
</div>
</div>
</el-radio-group>
</el-form-item>
</el-form>
<div v-if="operationType === '0'">
<process-form-replay
ref="ref_process_form_replay"
:source="source"
:processData="processData"
:eventDetailData="eventDetailData"
:eventId="eventId"
></process-form-replay>
</div>
<div v-if="operationType === '1'">
<process-form-project
ref="ref_process_form_project"
:source="source"
:eventDetailData="eventDetailData"
:gridId="gridId"
:eventId="eventId"
></process-form-project>
</div>
<div v-if="operationType === '2'">
<process-form-demand
ref="ref_process_form_demond"
:source="source"
:eventId="eventId"
:demandUserId="demandUserId"
:demandUserName="demandUserName"
:demandUserMobile="demandUserMobile"
:eventDetailData="eventDetailData"
></process-form-demand>
</div>
<div v-if="operationType === '3'">
<process-form-issue
ref="ref_process_form_issue"
:source="source"
:eventDetailData="eventDetailData"
:eventId="eventId"
></process-form-issue>
</div>
</div>
</div>
</template>
<script>
@ -72,199 +78,186 @@ import processFormProject from "./process-form-project";
import processFormDemand from "./process-form-demand";
import processFormIssue from "./process-form-issue";
let loading; //
export default {
data () {
return {
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
operationType: '',
replayInfo: {},
demand: {},
project: {},
issueInfo: {},
okflag: false,
eventDetailCopy: {}
};
},
components: {
processFormReplay,
processFormProject,
processFormDemand,
processFormIssue
},
computed: {
dataRule () {
return {
operationType: [
{ required: true, message: "处理方式不能为空", trigger: "blur" },
],
};
},
},
props: {
demandUserId: {
type: String,
default: "",
},
demandUserName: {
type: String,
default: "",
},
demandUserMobile: {
type: String,
default: "",
},
gridId: {
type: String,
default: "",
},
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
source: {//manage visiual
type: String,
default: 'manage'
}
},
watch: {
},
created () {
console.log(this.source)
},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
}
},
methods: {
handleChangeOperationType (val) {
},
async getProcessInfo () {
this.okflag = false
if (this.operationType === '0') {
this.$refs.ref_process_form_replay.getReplayInfo()
if (this.$refs.ref_process_form_replay.okflag) {
this.replayInfo = this.$refs.ref_process_form_replay.formData
this.okflag = true
} else {
return false
}
} else if (this.operationType === '1') {
this.$refs.ref_process_form_project.getProjectInfo()
if (this.$refs.ref_process_form_project.okflag) {
this.project = this.$refs.ref_process_form_project.formData
//
this.okflag = true
} else {
return false
}
} else if (this.operationType === '2') {
this.$refs.ref_process_form_demond.getDemandInfo()
if (this.$refs.ref_process_form_demond.okflag) {
this.demand = this.$refs.ref_process_form_demond.formData
this.okflag = true
} else {
return false
}
} else if (this.operationType === '3') {
this.$refs.ref_process_form_issue.getIssueInfo()
if (this.$refs.ref_process_form_issue.okflag) {
this.issueInfo = this.$refs.ref_process_form_issue.formData
this.okflag = true
} else {
return false
}
}
},
handleCancle () {
this.resetData();
},
resetData () {
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
data() {
return {
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: "id",
label: "name",
children: "subCategory",
},
operationType: "",
replayInfo: {},
demand: {},
project: {},
issueInfo: {},
okflag: false,
eventDetailCopy: {},
};
},
components: {
processFormReplay,
processFormProject,
processFormDemand,
processFormIssue,
},
computed: {
dataRule() {
return {
operationType: [
{
required: true,
message: "处理方式不能为空",
trigger: "blur",
},
],
};
},
},
props: {
demandUserId: {
type: String,
default: "",
},
demandUserName: {
type: String,
default: "",
},
demandUserMobile: {
type: String,
default: "",
},
gridId: {
type: String,
default: "",
},
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default() {
return {};
},
},
processData: Object,
source: {
//manage visiual
type: String,
default: "manage",
},
},
watch: {
processData(val) {
if (val && val.processId) {
if (val.processName == "回复") {
this.operationType = "0";
}
}
},
},
created() {
console.log(this.source);
},
async mounted() {
const { user } = this.$store.state;
this.agencyId = user.agencyId;
if (this.eventId) {
this.eventDetailCopy = JSON.parse(
JSON.stringify(this.eventDetailData)
);
}
},
methods: {
handleChangeOperationType(val) {},
async getProcessInfo() {
this.okflag = false;
if (this.operationType === "0") {
this.$refs.ref_process_form_replay.getReplayInfo();
if (this.$refs.ref_process_form_replay.okflag) {
this.replayInfo =
this.$refs.ref_process_form_replay.formData;
this.okflag = true;
} else {
return false;
}
} else if (this.operationType === "1") {
this.$refs.ref_process_form_project.getProjectInfo();
if (this.$refs.ref_process_form_project.okflag) {
this.project = this.$refs.ref_process_form_project.formData;
//
this.okflag = true;
} else {
return false;
}
} else if (this.operationType === "2") {
this.$refs.ref_process_form_demond.getDemandInfo();
if (this.$refs.ref_process_form_demond.okflag) {
this.demand = this.$refs.ref_process_form_demond.formData;
this.okflag = true;
} else {
return false;
}
} else if (this.operationType === "3") {
this.$refs.ref_process_form_issue.getIssueInfo();
if (this.$refs.ref_process_form_issue.okflag) {
this.issueInfo = this.$refs.ref_process_form_issue.formData;
this.okflag = true;
} else {
return false;
}
}
},
handleCancle() {
this.resetData();
},
resetData() {},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
padding: 0 10px 20px !important;
}
</style>

8
src/views/modules/shequzhili/event/cpts/replyOptions.js

@ -0,0 +1,8 @@
export default [
{ label: "上报", value: 0 },
{ label: "阅收", value: 1 },
{ label: "完结", value: 2 },
{ label: "审核", value: 3 },
{ label: "事件评价", value: 4 },
{ label: "结案归档", value: 5 },
];

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

@ -181,7 +181,7 @@
size="small"
>导出</el-button
>
<!--
<!--
<el-button
@click="handleMarkDiffcult"
class="diy-button--export"
@ -394,13 +394,22 @@
fixed="right"
label="操作"
align="center"
width="100"
width="200"
>
<template slot-scope="scope">
<el-button
@click="handleUpdate(scope.row)"
type="text"
size="small"
class="div-table-button--edit"
>修改</el-button
>
<el-button
v-if="
scope.row.status === 'processing' &&
!scope.row.operationId
true ||
(scope.row.status === 'processing' &&
!scope.row.operationId)
"
@click="handleDispose(scope.row)"
type="text"
@ -455,7 +464,10 @@
</div>
<div
v-if="
pageType == 'dispose' || pageType == 'info' || pageType == 'add'
pageType == 'dispose' ||
pageType == 'info' ||
pageType == 'add' ||
pageType == 'edit'
"
>
<event-info
@ -826,6 +838,23 @@ export default {
}
},
//
async handleUpdate(row) {
this.eventId = row.icEventId;
const url = "/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
this.pageType = "edit";
} else {
this.$message.error(msg);
}
},
//
handleShowVoice(url) {
this.selVoiceUrl = url;

2
vue.config.js

@ -27,7 +27,7 @@ module.exports = {
assetsDir: 'static',
devServer: {
open: true,
port: 9004,
port: 9005,
overlay: {
errors: true,
warnings: true

Loading…
Cancel
Save