附件:
-
@@ -242,6 +245,8 @@ function iniData() {
issueDetailData: {},
sourceType: "",
+
+ level:''
};
}
@@ -317,6 +322,9 @@ export default {
changeGridId(val) {
this.gridId = val;
},
+ changeLevel(val) {
+ this.level = val;
+ },
watchImg(src) {
window.open(src);
},
@@ -414,113 +422,125 @@ export default {
|| 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, {
- ...formData,
+ ...params,
});
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);
- }
- },
+ },
- 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(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";
- },
+ 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 url = "/governance/manage/votingissuedetail";
- const { data, code, msg } = await requestPost(url, {
- issueId: this.eventDetailCopy.operationId,
- });
+ const { data, code, msg } = await requestPost(url, {
+ issueId: this.eventDetailCopy.operationId,
+ });
- if (code === 0) {
- this.issueDetailData = { ...data };
- } else {
- this.$message.error(msg);
- }
+ 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";
- },
+ if (this.issueDetailData.issueStatus === "voting") {
+ this.issuePageType = "dispose";
+ } else {
+ this.issuePageType = "info";
+ }
+ this.pageTypeCopy = "issue";
+ },
+ handleCloseProject() {
+ this.getProjectProcess();
+ this.pageTypeCopy = "info";
+ },
- // 开启加载动画
- startLoading() {
- loading = Loading.service({
- lock: true, // 是否锁定
- text: "正在加载……", // 加载中需要显示的文字
- background: "rgba(0,0,0,.7)", // 背景颜色
- });
- },
- // 结束加载动画
- endLoading() {
- // clearTimeout(timer);
- if (loading) {
- loading.close();
- }
+ // 开启加载动画
+ startLoading() {
+ loading = Loading.service({
+ lock: true, // 是否锁定
+ text: "正在加载……", // 加载中需要显示的文字
+ background: "rgba(0,0,0,.7)", // 背景颜色
+ });
+ },
+ // 结束加载动画
+ endLoading() {
+ // clearTimeout(timer);
+ if (loading) {
+ loading.close();
+ }
+ },
},
- },
-};
+ };