Browse Source

事件选择网格员

master
dai 2 years ago
parent
commit
d6335e3ba0
  1. 41
      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

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

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

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

@ -61,6 +61,32 @@
>
</el-date-picker>
</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
label="办理人"
prop="manageResi"
@ -76,6 +102,7 @@
></el-input>
</div>
</el-form-item>
<el-form-item
label="办理人电话"
prop="manageResiTel"
@ -146,6 +173,7 @@ export default {
manageTime: "",
manageResi: "",
manageResiTel: "",
userId: "",
},
status: false,
@ -164,6 +192,8 @@ export default {
label: "name",
children: "subCategory",
},
griderList: [],
};
},
components: {},
@ -209,6 +239,11 @@ export default {
},
},
props: {
gridId: {
//id
type: String,
default: "",
},
eventId: {
type: String,
default: "",
@ -230,15 +265,19 @@ export default {
processData() {
this.syncProcessData();
},
gridId() {
this.getGriderList();
},
},
created() {
console.log(this.source);
this.syncProcessData();
this.getCategoryList();
this.getGriderList();
},
async mounted() {
this.getCategoryList();
if (this.eventId) {
this.eventDetailCopy = JSON.parse(
JSON.stringify(this.eventDetailData)
@ -265,8 +304,10 @@ export default {
methods: {
syncProcessData() {
const { processData } = this;
if (processData && processData.processId) {
this.formData = {
id: processData.processId,
userId: processData.userId || "",
processId: processData.processId,
operationType: "0", //[0: 1: 2:]
content: processData.publicReply,
@ -275,7 +316,17 @@ export default {
manageResi: processData.manageResi,
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() {
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() {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data);
this.selCateObj =

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

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

Loading…
Cancel
Save