+
回复人:
{{ item.departmentName }}
@@ -200,29 +243,35 @@
-
+
-
+
-
@@ -239,11 +288,10 @@ import eventDetail from "./event-detail";
import processForm from "./process-form";
let loading; // 加载动画
-function iniData () {
+function iniData() {
return {
formData: {
- operationType: '',
-
+ operationType: "",
},
eventInfoData: {},
replayInfo: {},
@@ -252,20 +300,21 @@ function iniData () {
issueInfo: {},
//新增
- demandUserId: '',
- demandUserName: '',
- demandUserMobile: '',
- gridId: '',
+ demandUserId: "",
+ demandUserName: "",
+ demandUserMobile: "",
+ gridId: "",
eventDetailCopy: {},
projectProcess: [],
- projectPageType: 'info',
- pageTypeCopy: '',
+ projectPageType: "info",
+ pageTypeCopy: "",
- issuePageType: '',
+ issuePageType: "",
issueDetailData: {},
+ sourceType: "",
};
}
@@ -282,15 +331,16 @@ export default {
},
eventDetailData: {
type: Object,
- default () {
- return {}
- }
+ default() {
+ return {};
+ },
},
- source: {//展示来源:manage 管理平台 visiual 可视化平台
+ source: {
+ //展示来源:manage 管理平台 visiual 可视化平台
type: String,
- default: 'manage'
- }
+ default: "manage",
+ },
},
components: {
@@ -301,7 +351,7 @@ export default {
processForm,
projectInfoOrigin,
demandInfoOrigin,
- issueInfoOrigin
+ issueInfoOrigin,
},
data: iniData,
@@ -309,7 +359,7 @@ export default {
computed: {},
watch: {
- eventId () {
+ eventId() {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
@@ -317,14 +367,11 @@ export default {
// this.getApiData();
},
},
- created () {
-
-
- },
- mounted () {
- this.pageTypeCopy = this.pageType
- if (this.pageTypeCopy !== 'add') {
- this.getProjectProcess()
+ created() {},
+ mounted() {
+ this.pageTypeCopy = this.pageType;
+ if (this.pageTypeCopy !== "add") {
+ this.getProjectProcess();
}
if (this.eventId) {
@@ -333,24 +380,21 @@ export default {
},
methods: {
- changeName (val) {
- this.demandUserName = val
+ changeName(val) {
+ this.demandUserName = val;
},
- changeMobile (val) {
-
- this.demandUserMobile = val
+ changeMobile(val) {
+ this.demandUserMobile = val;
},
- changeUserId (val) {
-
- this.demandUserId = val
+ changeUserId(val) {
+ this.demandUserId = val;
},
- changeGridId (val) {
-
- this.gridId = val
+ changeGridId(val) {
+ this.gridId = val;
},
//加载组织数据
- async getProjectProcess () {
+ async getProjectProcess() {
const url = "/governance/icEvent/process";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/process";
@@ -371,198 +415,196 @@ export default {
}
},
- getEventInfo () {
- this.$refs.ref_add.getEventInfo()
+ getEventInfo() {
+ this.$refs.ref_add.getEventInfo();
if (this.$refs.ref_add.okflag) {
-
- this.eventInfoData = this.$refs.ref_add.formData
+ this.eventInfoData = this.$refs.ref_add.formData;
} else {
- return false
+ return false;
}
- console.log('eventInfo', this.eventInfoData)
+ console.log("eventInfo", this.eventInfoData);
},
- async handleComfirm () {
- this.startLoading()
- if (this.pageTypeCopy === 'add') {
- await this.handelAdd()
+ async handleComfirm() {
+ this.startLoading();
+ if (this.pageTypeCopy === "add") {
+ await this.handelAdd();
}
- if (this.pageTypeCopy === 'dispose') {
- await this.handelDispose()
+ if (this.pageTypeCopy === "dispose") {
+ await this.handelDispose();
}
- this.endLoading()
+ this.endLoading();
},
- async handelAdd () {
-
- this.$refs.ref_add.getEventInfo()
+ async handelAdd() {
+ this.$refs.ref_add.getEventInfo();
if (this.$refs.ref_add.okflag) {
- this.eventInfoData = this.$refs.ref_add.formData
+ this.eventInfoData = this.$refs.ref_add.formData;
} else {
- return false
+ return false;
}
- console.log('eventInfo', this.eventInfoData)
-
- this.$refs.ref_processinfo_add.getProcessInfo()
- if (this.$refs.ref_processinfo_add.okflag) {
+ console.log("eventInfo", this.eventInfoData);
- this.formData.operationType = this.$refs.ref_processinfo_add.operationType
- this.eventInfoData.operationType = this.$refs.ref_processinfo_add.operationType
+ this.$refs.ref_processinfo_add.getProcessInfo();
+ // if (this.$refs.ref_processinfo_add.okflag) {
+ this.formData.operationType =
+ this.$refs.ref_processinfo_add.operationType;
+ this.eventInfoData.operationType =
+ this.$refs.ref_processinfo_add.operationType;
- if (this.formData.operationType === '0') {
- this.project = {}
- this.demand = {}
- this.replayInfo = this.$refs.ref_processinfo_add.replayInfo
- console.log('replayInfo', this.replayInfo)
-
- //回复属性赋值
- this.eventInfoData.content = this.replayInfo.content
- this.eventInfoData.status = this.replayInfo.status
- if (this.replayInfo.categoryId) {
- this.eventInfoData.categoryList = []
- this.eventInfoData.categoryList.push(this.replayInfo.categoryId)
- }
-
-
- } else if (this.formData.operationType === '1') {
- this.replayInfo = {}
- this.demand = {}
- this.project = this.$refs.ref_processinfo_add.project
- //项目的属性同事件一样
- this.project.gridId = this.eventInfoData.gridId
-
- if (this.project.categoryList && this.project.categoryList.length > 0) {
- this.eventInfoData.categoryList = []
- this.eventInfoData.categoryList.push(this.project.categoryList[0].id)
- }
-
- console.log('projectInfo', this.project)
-
- } else if (this.formData.operationType === '2') {
- this.replayInfo = {}
- this.project = {}
- this.demand = this.$refs.ref_processinfo_add.demand
- this.demand.gridId = this.eventInfoData.gridId
- //需求的属性同事件一样
- // this.eventInfoData.categoryList = []
- // this.eventInfoData.categoryList.push(this.demand.categoryId)
- console.log('demond', this.demand)
- } else if (this.formData.operationType === '3') {
- this.project = {}
- this.demand = {}
- this.replayInfo = {}
- this.issueInfo = this.$refs.ref_processinfo_add.issueInfo
-
- if (this.issueInfo.categoryList && this.issueInfo.categoryList.length > 0) {
- this.eventInfoData.categoryList = []
- this.eventInfoData.categoryList.push(this.issueInfo.categoryList[0].id)
- }
- console.log('issueInfo', this.issueInfo)
+ if (this.formData.operationType === "0") {
+ this.project = {};
+ this.demand = {};
+ this.replayInfo = this.$refs.ref_processinfo_add.replayInfo;
+ console.log("replayInfo", this.replayInfo);
+ //回复属性赋值
+ this.eventInfoData.content = this.replayInfo.content;
+ this.eventInfoData.status = this.replayInfo.status;
+ if (this.replayInfo.categoryId) {
+ this.eventInfoData.categoryList = [];
+ this.eventInfoData.categoryList.push(this.replayInfo.categoryId);
+ }
+ } else if (this.formData.operationType === "1") {
+ this.replayInfo = {};
+ this.demand = {};
+ this.project = this.$refs.ref_processinfo_add.project;
+ //项目的属性同事件一样
+ this.project.gridId = this.eventInfoData.gridId;
+
+ if (this.project.categoryList && this.project.categoryList.length > 0) {
+ this.eventInfoData.categoryList = [];
+ this.eventInfoData.categoryList.push(this.project.categoryList[0].id);
}
+ console.log("projectInfo", this.project);
+ } else if (this.formData.operationType === "2") {
+ this.replayInfo = {};
+ this.project = {};
+ this.demand = this.$refs.ref_processinfo_add.demand;
+ this.demand.gridId = this.eventInfoData.gridId;
+ //需求的属性同事件一样
+ // this.eventInfoData.categoryList = []
+ // this.eventInfoData.categoryList.push(this.demand.categoryId)
+ console.log("demond", this.demand);
+ } else if (this.formData.operationType === "3") {
+ this.project = {};
+ this.demand = {};
+ this.replayInfo = {};
+ this.issueInfo = this.$refs.ref_processinfo_add.issueInfo;
+
+ if (
+ this.issueInfo.categoryList &&
+ this.issueInfo.categoryList.length > 0
+ ) {
+ this.eventInfoData.categoryList = [];
+ this.eventInfoData.categoryList.push(
+ this.issueInfo.categoryList[0].id
+ );
+ }
+ console.log("issueInfo", this.issueInfo);
}
+ // }
+
this.formData = {
...this.eventInfoData,
// replayInfo: this.replayInfo,
project: this.project,
demand: this.demand,
- issueInfo: this.issueInfo
- }
+ issueInfo: this.issueInfo,
+ };
- console.log('this.formData', this.formData)
- await this.submit()
+ console.log("this.formData", this.formData);
+ await this.submit();
},
- async submit () {
- const url = "/governance/icEvent/add";
-
- const { formData } = this;
- 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()
-
+ async submit() {
+ if (
+ (this.formData.operationType == 3 && this.issueInfo.issueTitle) ||
+ (this.formData.operationType == 2 && this.demand.demandUserName) ||
+ (this.formData.operationType == 1 && this.project.categoryList) ||
+ (this.formData.operationType == 0 && this.eventInfoData.content) ||
+ this.formData.operationType == 4
+ ) {
+ const url = "/governance/icEvent/add";
+ const { formData } = this;
+ 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);
}
- this.$emit("handleOk");
- } else {
- this.$message.error(msg);
+ }else if(this.formData.operationType == ''){
+ this.$message.error('请选择处理方式!')
}
},
- async handelDispose () {
- this.$refs.ref_processinfo_dispose.getProcessInfo()
+ 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.formData.operationType = this.$refs.ref_processinfo_dispose.operationType
-
- if (this.formData.operationType === '0') {
-
- this.project = {}
- this.demand = {}
- this.replayInfo = this.$refs.ref_processinfo_dispose.replayInfo
+ if (this.formData.operationType === "0") {
+ this.project = {};
+ this.demand = {};
+ this.replayInfo = this.$refs.ref_processinfo_dispose.replayInfo;
- this.replayInfo.icEventId = this.eventId
- console.log('replayInfo', this.replayInfo)
+ this.replayInfo.icEventId = this.eventId;
+ console.log("replayInfo", this.replayInfo);
//回复属性赋值
- let url = '/governance/icEvent/reply'
- await this.submitDispose(url, this.replayInfo)
-
- } else if (this.formData.operationType === '1') {
- this.replayInfo = {}
- this.demand = {}
- this.project = this.$refs.ref_processinfo_dispose.project
+ let url = "/governance/icEvent/reply";
+ await this.submitDispose(url, this.replayInfo);
+ } else if (this.formData.operationType === "1") {
+ this.replayInfo = {};
+ this.demand = {};
+ this.project = this.$refs.ref_processinfo_dispose.project;
//项目的属性同事件一样
- this.project.icEventId = this.eventId
- console.log('projectInfo', this.project)
- let url = '/governance/icEvent/icEventToProject'
- await this.submitDispose(url, this.project)
-
- } else if (this.formData.operationType === '2') {
- this.replayInfo = {}
- this.project = {}
- this.demand = this.$refs.ref_processinfo_dispose.demand
+ this.project.icEventId = this.eventId;
+ console.log("projectInfo", this.project);
+ let url = "/governance/icEvent/icEventToProject";
+ await this.submitDispose(url, this.project);
+ } else if (this.formData.operationType === "2") {
+ this.replayInfo = {};
+ this.project = {};
+ this.demand = this.$refs.ref_processinfo_dispose.demand;
//需求的属性同事件一样
- this.demand.icEventId = this.eventId
- console.log('demond', this.demand)
- let url = '/governance/icEvent/icEventToDemand'
- await this.submitDispose(url, this.demand)
- } else if (this.formData.operationType === '3') {
- this.replayInfo = {}
- this.demand = {}
- this.project = {}
- this.issueInfo = this.$refs.ref_processinfo_dispose.issueInfo
+ this.demand.icEventId = this.eventId;
+ console.log("demond", this.demand);
+ let url = "/governance/icEvent/icEventToDemand";
+ await this.submitDispose(url, this.demand);
+ } else if (this.formData.operationType === "3") {
+ this.replayInfo = {};
+ this.demand = {};
+ this.project = {};
+ this.issueInfo = this.$refs.ref_processinfo_dispose.issueInfo;
//项目的属性同事件一样
- console.log('issueInfo', this.issueInfo)
- let url = '/governance/icEvent/icEventToIssue'
- await this.submitDispose(url, this.issueInfo)
-
+ console.log("issueInfo", this.issueInfo);
+ let url = "/governance/icEvent/icEventToIssue";
+ await this.submitDispose(url, this.issueInfo);
} else {
this.$message.info("请选择一种处理方式");
}
-
} else {
- return false
+ return false;
}
-
},
- async submitDispose (url, params) {
+ async submitDispose(url, params) {
const { data, code, msg } = await requestPost(url, {
-
...params,
});
if (code === 0) {
-
this.$message.success("操作成功!");
this.$emit("handleOk");
@@ -571,32 +613,31 @@ export default {
}
},
- handleClose () {
- if (this.pageTypeCopy === 'add') {
- this.eventInfo = this.$refs.ref_add.resetData()
+ handleClose() {
+ if (this.pageTypeCopy === "add") {
+ this.eventInfo = this.$refs.ref_add.resetData();
}
this.$emit("handleClose");
},
- handleToProject () {
- if (this.eventDetailCopy.status === 'processing') {
- this.projectPageType = 'edit'
+ handleToProject(type) {
+ if (this.eventDetailCopy.status === "processing") {
+ this.projectPageType = "edit";
} else {
- this.projectPageType = 'info'
+ this.projectPageType = "info";
}
- this.pageTypeCopy = 'project'
-
+ this.sourceType = "event";
+ this.pageTypeCopy = "project";
},
- handleToDemand () {
+ handleToDemand() {
// if (this.eventDetailCopy.status === 'processing') {
// this.projectPageType = 'edit'
// } else {
// this.projectPageType = 'info'
// }
- this.pageTypeCopy = 'demand'
-
+ this.pageTypeCopy = "demand";
},
- async handleToIssue () {
+ async handleToIssue() {
const url = "/governance/manage/votingissuedetail";
const { data, code, msg } = await requestPost(url, {
@@ -604,29 +645,25 @@ export default {
});
if (code === 0) {
-
this.issueDetailData = { ...data };
-
} else {
this.$message.error(msg);
}
- if (this.issueDetailData.issueStatus === 'voting') {
- this.issuePageType = 'dispose'
+ if (this.issueDetailData.issueStatus === "voting") {
+ this.issuePageType = "dispose";
} else {
- this.issuePageType = 'info'
+ this.issuePageType = "info";
}
- this.pageTypeCopy = 'issue'
+ this.pageTypeCopy = "issue";
},
- handleCloseProject () {
- this.getProjectProcess()
- this.pageTypeCopy = 'info'
-
-
+ handleCloseProject() {
+ this.getProjectProcess();
+ this.pageTypeCopy = "info";
},
// 开启加载动画
- startLoading () {
+ startLoading() {
loading = Loading.service({
lock: true, // 是否锁定
text: "正在加载……", // 加载中需要显示的文字
@@ -634,7 +671,7 @@ export default {
});
},
// 结束加载动画
- endLoading () {
+ endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close();
diff --git a/src/views/modules/shequzhili/event/cpts/process-form-replay.vue b/src/views/modules/shequzhili/event/cpts/process-form-replay.vue
index 639bfef75..e2b8a9997 100644
--- a/src/views/modules/shequzhili/event/cpts/process-form-replay.vue
+++ b/src/views/modules/shequzhili/event/cpts/process-form-replay.vue
@@ -1,15 +1,18 @@
-
-
-
-
+
+
+
-
+ @handleChangeCate="handleChangeCate"
+ >
-
-
-
+
+
+
-
-
- 已完成
+
+ 已完成
-
-
@@ -62,16 +74,15 @@ import { isCard } from "@/utils/validate";
import myCascader from "./myCascader.vue";
let loading; // 加载动画
-
export default {
- data () {
+ data() {
return {
btnDisable: false,
formData: {
- operationType: '0',//处理方式[0:已回复 1:已转项目 2:已转需求]
- content: '',
- status: '',
- categoryList:[]
+ operationType: "0", //处理方式[0:已回复 1:已转项目 2:已转需求]
+ content: "",
+ status: "",
+ categoryList: [],
},
status: false,
@@ -85,28 +96,32 @@ export default {
selCateObj: {},
optionProps: {
multiple: false,
- value: 'id',
- label: 'name',
- children: 'subCategory',
+ value: "id",
+ label: "name",
+ children: "subCategory",
},
-
- };
- },
- components: {myCascader},
- computed: {
- dataRule () {
-
- return {
+ dataRule:{
content: [
{ required: true, message: "回复内容不能为空", trigger: "blur" },
],
- categoryList:[
- {required:true,message:"事件分类不能为空",trigger:"blur"}
- ]
- };
- },
-
-
+ categoryList: [
+ // { required: true, message: "事件分类不能为空", trigger: "blur" },
+ ],
+ }
+ };
+ },
+ components: { myCascader },
+ computed: {
+ // dataRule() {
+ // return {
+ // content: [
+ // { required: true, message: "回复内容不能为空", trigger: "blur" },
+ // ],
+ // categoryList: [
+ // { required: true, message: "事件分类不能为空", trigger: "blur" },
+ // ],
+ // };
+ // },
},
props: {
eventId: {
@@ -115,122 +130,128 @@ export default {
},
eventDetailData: {
type: Object,
- default () {
- return {}
- }
+ default() {
+ return {};
+ },
},
- source: {//展示来源:manage 管理平台 visiual 可视化平台
+ source: {
+ //展示来源:manage 管理平台 visiual 可视化平台
type: String,
- default: 'manage'
- }
+ default: "manage",
+ },
},
watch: {},
- created () {
-
- console.log(this.source)
-
+ created() {
+ console.log(this.source);
},
- async mounted () {
-
- this.getCategoryList()
+ 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)
+ 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
- }
+ id: this.eventDetailCopy.categoryId,
+ };
}
}
},
methods: {
- async getCategoryList () {
- const url = "/governance/issueprojectcategorydict/list"
+ async getCategoryList() {
+ const url = "/governance/issueprojectcategorydict/list";
- let params = {}
+ let params = {};
- const { data, code, msg } = await requestPost(url, params)
+ const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
-
- let treeDataNew = this.filterTree(data)
+ let treeDataNew = this.filterTree(data);
//组织级联数据
- ++this.iscascaderShow
- this.casOptions = []
-
- this.casOptions = treeDataNew
+ ++this.iscascaderShow;
+ this.casOptions = [];
+ this.casOptions = treeDataNew;
} else {
- this.$message.error(msg)
+ this.$message.error(msg);
}
-
},
- handleChangeCate (obj) {
+ handleChangeCate(obj) {
// console.log(this.$refs["myCascader"].getCheckedNodes()[0].data)
// this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
- this.selCateObj = obj
+ if(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);
+ }else{
+ this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
+ }
},
//重构树,去除网格
- filterTree (arr) {
- let childs = arr
+ 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)
+ this.filterTree(childs[i].subCategory);
} else {
- delete childs[i].subCategory
+ delete childs[i].subCategory;
}
}
}
- return arr
+ return arr;
},
- async getReplayInfo () {
- this.okflag = false
+ async getReplayInfo() {
+ this.okflag = false;
this.$refs["ref_form1"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
-
} else {
-
if (this.status) {
-
+ console.log(this.selCateObj);
if (!this.selCateObj || !this.selCateObj.id) {
- this.$message.info("请填写事件分类");
- return false
+ this.$message.error("请选择事件分类");
+ return false;
}
- this.formData.status = 'closed_case'
+ this.formData.status = "closed_case";
} else {
- this.formData.status = 'processing'
+ this.formData.status = "processing";
}
- this.formData.categoryId = this.selCateObj.id
- this.formData.categoryList = []
- this.formData.categoryList.push(this.selCateObj)
+ this.formData.categoryId = this.selCateObj.id;
+ this.formData.categoryList = [];
+ this.formData.categoryList.push(this.selCateObj);
- this.okflag = true
+ this.okflag = true;
}
});
},
-
- resetData () {
-
+ handleChangeStatus(val){
+ console.log(val);
+ if(!val){
+ this.$set(this.dataRule,'categoryList',[])
+ }else{
+ this.$set(this.dataRule,'categoryList',[{ required: true, message: "事件分类不能为空", trigger: "blur" }])
+ }
+ console.log(this.dataRule);
},
+ resetData() {},
// 开启加载动画
- startLoading () {
+ startLoading() {
loading = Loading.service({
lock: true, // 是否锁定
text: "正在加载……", // 加载中需要显示的文字
@@ -238,7 +259,7 @@ export default {
});
},
// 结束加载动画
- endLoading () {
+ endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close();
diff --git a/src/views/modules/shequzhili/event/cpts/process-form.vue b/src/views/modules/shequzhili/event/cpts/process-form.vue
index 5ef9b381d..8c087f74a 100644
--- a/src/views/modules/shequzhili/event/cpts/process-form.vue
+++ b/src/views/modules/shequzhili/event/cpts/process-form.vue
@@ -15,7 +15,7 @@
v-model="operationType"
@change="handleChangeOperationType">
暂不处理
+ label="4">暂不处理
回复
立项
转服务