Browse Source

事件选择网格员

master
dai 2 years ago
parent
commit
d6335e3ba0
  1. 39
      src/views/modules/shequzhili/event/cpts/event-info.vue
  2. 91
      src/views/modules/shequzhili/event/cpts/process-form-replay.vue
  3. 1
      src/views/modules/shequzhili/event/cpts/process-form.vue

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

@ -105,6 +105,7 @@
<process-form <process-form
ref="ref_processinfo_dispose" ref="ref_processinfo_dispose"
:source="source" :source="source"
:gridId="gridId"
:eventId="eventId" :eventId="eventId"
:eventDetailData="eventDetailData" :eventDetailData="eventDetailData"
:processData="editProcessData" :processData="editProcessData"
@ -152,23 +153,38 @@
> >
<div class="item-row"> <div class="item-row">
<div class="name"> <div class="name">
{{ item.manageStatusName || item.processName }} {{
item.manageStatusName ||
item.processName
}}
</div> </div>
<div class="date"> <div class="date">
{{ item.manageTime || item.processTime }} {{
item.manageTime || item.processTime
}}
</div>
<div class="btn" @click="editProcess(item)">
编辑
</div> </div>
<div class="btn" @click="editProcess(item)">编辑</div>
</div> </div>
<div v-if="item.type === 'event'"> <div v-if="item.type === 'event'">
<div class="detail"> <div class="detail">
<div class="detail-field">办理人</div> <div class="detail-field">办理人</div>
<div class="detail-value"> <div class="detail-value">
{{ item.manageResi || item.departmentName }} {{
item.manageResi ||
item.departmentName
}}
</div> </div>
</div> </div>
<div class="detail" v-if="item.manageResiTel"> <div
<div class="detail-field">办理人电话</div> class="detail"
v-if="item.manageResiTel"
>
<div class="detail-field">
办理人电话
</div>
<div class="detail-value"> <div class="detail-value">
{{ item.manageResiTel }} {{ item.manageResiTel }}
</div> </div>
@ -421,7 +437,7 @@ function iniData() {
issuePageType: "", issuePageType: "",
issueDetailData: {}, issueDetailData: {},
editProcessData:{} editProcessData: {},
}; };
} }
@ -514,7 +530,10 @@ export default {
if (code === 0) { if (code === 0) {
this.projectProcess = data.map((item) => { this.projectProcess = data.map((item) => {
if (typeof item.manageStatus=='number' && item.processName == "回复") { if (
typeof item.manageStatus == "number" &&
item.processName == "回复"
) {
item.manageStatusName = item.manageStatusName =
replyOptions[item.manageStatus].label; replyOptions[item.manageStatus].label;
} }
@ -712,7 +731,9 @@ export default {
this.replayInfo.icEventId = this.eventId; this.replayInfo.icEventId = this.eventId;
console.log("replayInfo", this.replayInfo); console.log("replayInfo", this.replayInfo);
// //
let url = this.replayInfo.processId ? "/gov/project/icEvent/updateReply" : "/gov/project/icEvent/reply"; let url = this.replayInfo.processId
? "/gov/project/icEvent/updateReply"
: "/gov/project/icEvent/reply";
await this.submitDispose(url, this.replayInfo); await this.submitDispose(url, this.replayInfo);
} else if (this.formData.operationType === "1") { } else if (this.formData.operationType === "1") {
this.replayInfo = {}; this.replayInfo = {};

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

@ -61,6 +61,32 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item
label="选择办理工作人员"
prop="userId"
label-width="150px"
:class="{ 'form-item': source === 'visiual' }"
style="display: block"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-select
v-model="formData.userId"
placeholder="请选择办理状态"
@change="handleChangeStaff"
>
<el-option
v-for="item in griderList"
:label="item.staffName"
:value="item.staffId"
clearable
:key="item.staffId"
>
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item <el-form-item
label="办理人" label="办理人"
prop="manageResi" prop="manageResi"
@ -76,6 +102,7 @@
></el-input> ></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="办理人电话" label="办理人电话"
prop="manageResiTel" prop="manageResiTel"
@ -146,6 +173,7 @@ export default {
manageTime: "", manageTime: "",
manageResi: "", manageResi: "",
manageResiTel: "", manageResiTel: "",
userId: "",
}, },
status: false, status: false,
@ -164,6 +192,8 @@ export default {
label: "name", label: "name",
children: "subCategory", children: "subCategory",
}, },
griderList: [],
}; };
}, },
components: {}, components: {},
@ -209,6 +239,11 @@ export default {
}, },
}, },
props: { props: {
gridId: {
//id
type: String,
default: "",
},
eventId: { eventId: {
type: String, type: String,
default: "", default: "",
@ -230,15 +265,19 @@ export default {
processData() { processData() {
this.syncProcessData(); this.syncProcessData();
}, },
gridId() {
this.getGriderList();
},
}, },
created() { created() {
console.log(this.source); console.log(this.source);
this.syncProcessData(); this.syncProcessData();
this.getCategoryList();
this.getGriderList();
}, },
async mounted() { async mounted() {
this.getCategoryList();
if (this.eventId) { if (this.eventId) {
this.eventDetailCopy = JSON.parse( this.eventDetailCopy = JSON.parse(
JSON.stringify(this.eventDetailData) JSON.stringify(this.eventDetailData)
@ -265,8 +304,10 @@ export default {
methods: { methods: {
syncProcessData() { syncProcessData() {
const { processData } = this; const { processData } = this;
if (processData && processData.processId) {
this.formData = { this.formData = {
id: processData.processId, id: processData.processId,
userId: processData.userId || "",
processId: processData.processId, processId: processData.processId,
operationType: "0", //[0: 1: 2:] operationType: "0", //[0: 1: 2:]
content: processData.publicReply, content: processData.publicReply,
@ -275,7 +316,17 @@ export default {
manageResi: processData.manageResi, manageResi: processData.manageResi,
manageResiTel: processData.manageResiTel, manageResiTel: processData.manageResiTel,
}; };
}
}, },
handleChangeStaff(id) {
console.log(id);
const { griderList } = this;
let item = griderList.find((item) => item.staffId == id);
this.formData.manageResi = item.staffName;
this.formData.manageResiTel = item.mobile;
},
async getCategoryList() { async getCategoryList() {
const url = "/gov/issue/issueprojectcategorydict/list"; const url = "/gov/issue/issueprojectcategorydict/list";
@ -296,6 +347,44 @@ export default {
} }
}, },
async getGriderList() {
const gridId = this.eventDetailData.gridId || this.gridId;
console.log("============getGriderList", gridId);
if (!gridId) return;
const url = "/data/aggregator/epmetuser/listStaffByOrgAndRoles";
let params = {
orgId: gridId, //ID
orgType: "grid", //
name: "",
mobile: "",
roleKeys: ["grid_member", "grid_manager"],
workType: "",
pageSize: 200, //200
pageNo: 1,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
if (data) {
let ids = [];
this.griderList = (data.list || []).filter((item) => {
if (ids.find((val) => val == item.staffId)) {
return false;
} else {
ids.push(item.staffId);
return true;
}
});
}
} else {
// this.$message.error(msg);
}
},
handleChangeCate() { handleChangeCate() {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data); console.log(this.$refs["myCascader"].getCheckedNodes()[0].data);
this.selCateObj = this.selCateObj =

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

@ -31,6 +31,7 @@
<process-form-replay <process-form-replay
ref="ref_process_form_replay" ref="ref_process_form_replay"
:source="source" :source="source"
:gridId="gridId"
:processData="processData" :processData="processData"
:eventDetailData="eventDetailData" :eventDetailData="eventDetailData"
:eventId="eventId" :eventId="eventId"

Loading…
Cancel
Save