|
@@ -2,7 +2,7 @@
|
|
|
* @Author : yuanrunwei
|
|
|
* @Date : 2021-12-04 14:23:58
|
|
|
* @LastEditors: daiqisheng
|
|
|
- * @LastEditTime: 2022-04-05 17:41:20
|
|
|
+ * @LastEditTime: 2022-04-07 14:42:33
|
|
|
* @FilePath : \spfm-market-front\src\pages\main\performance\components\sheet.vue
|
|
|
-->
|
|
|
<template>
|
|
@@ -28,7 +28,7 @@
|
|
|
<el-button type="primary" @click="handleFullscreen()">全屏显示</el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- v-if="!status || superviseFlag === '1'"
|
|
|
+ v-if="!status || status === '2' || superviseFlag === '1'"
|
|
|
@click="handleSupervise('confirm')"
|
|
|
>督办</el-button
|
|
|
>
|
|
@@ -814,18 +814,46 @@ export default {
|
|
|
} else {
|
|
|
if (type === "2") {
|
|
|
// 暂存
|
|
|
+ let value = {};
|
|
|
+ if (!this.templateType) {
|
|
|
+ this.$message.error("请输入模板类型");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ Object.values(this.superviseForm).filter((el) => el !== "")
|
|
|
+ .length === 3
|
|
|
+ ) {
|
|
|
+ value = {
|
|
|
+ templateId: this.id,
|
|
|
+ distributeEndTime: this.superviseForm.endTime, // 督办设置的截止时间
|
|
|
+ distributeTime: this.superviseForm.write, // 派发时间–或者叫—填报时间
|
|
|
+ distributeType: this.superviseForm.distribute, //派发周期类型 派发周期类型 0.月 1.季度 2.半年 3.年
|
|
|
+ superviseFlag: 1, //督办标识 0.不是 1.是
|
|
|
+ templateType: this.templateType, //模板类型
|
|
|
+ templateContent: JSON.stringify(data), //文件内容
|
|
|
+ templateName: workbook_name, //模板名称
|
|
|
+ templateUrl: "", //文件链接
|
|
|
+ status: type,
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ value = {
|
|
|
+ templateId: this.id,
|
|
|
+ superviseFlag: 0, //督办标识 0.不是 1.是
|
|
|
+ templateType: this.templateType, //模板类型
|
|
|
+ templateContent: JSON.stringify(data), //文件内容
|
|
|
+ templateName: workbook_name, //模板名称
|
|
|
+ templateUrl: "", //文件链接
|
|
|
+ status: type,
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
await this.$http({
|
|
|
- url: "/market/CMKFileTemplate/UptateCMKFileTemplateById", // 新增
|
|
|
+ url: "/market/CMKFileTemplate/UptateCMKFileTemplateById", //
|
|
|
method: "post",
|
|
|
headers: {
|
|
|
"Content-Type": "application/json",
|
|
|
},
|
|
|
- data: {
|
|
|
- templateId: this.id,
|
|
|
- templateContent: JSON.stringify(data),
|
|
|
- templateName: workbook_name,
|
|
|
- status: type,
|
|
|
- },
|
|
|
+ data: value,
|
|
|
});
|
|
|
this.$emit("save");
|
|
|
return;
|
|
@@ -1059,19 +1087,51 @@ export default {
|
|
|
const sheet_name = window.luckysheet.getSheet().name;
|
|
|
const data = window.luckysheet.getSheet(sheet_name);
|
|
|
const workbook_name = window.luckysheet.getWorkbookName();
|
|
|
+
|
|
|
+ let value = {};
|
|
|
+ if (!this.templateType) {
|
|
|
+ this.$message.error("请输入模板类型");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ Object.values(this.superviseForm).filter((el) => el !== "").length === 3
|
|
|
+ ) {
|
|
|
+ value = {
|
|
|
+ templateId: this.id,
|
|
|
+ distributeEndTime: this.superviseForm.endTime, // 督办设置的截止时间
|
|
|
+ distributeTime: this.superviseForm.write, // 派发时间–或者叫—填报时间
|
|
|
+ distributeType: this.superviseForm.distribute, //派发周期类型 派发周期类型 0.月 1.季度 2.半年 3.年
|
|
|
+ superviseFlag: 1, //督办标识 0.不是 1.是
|
|
|
+ templateType: this.templateType, //模板类型
|
|
|
+ templateContent: JSON.stringify(data), //文件内容
|
|
|
+ templateName: workbook_name, //模板名称
|
|
|
+ templateUrl: "", //文件链接
|
|
|
+ status: "0",
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ value = {
|
|
|
+ templateId: this.id,
|
|
|
+ superviseFlag: 0, //督办标识 0.不是 1.是
|
|
|
+ templateType: this.templateType, //模板类型
|
|
|
+ templateContent: JSON.stringify(data), //文件内容
|
|
|
+ templateName: workbook_name, //模板名称
|
|
|
+ templateUrl: "", //文件链接
|
|
|
+ status: "0",
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
this.$http({
|
|
|
url: "/market/CMKFileTemplate/UptateCMKFileTemplateById",
|
|
|
method: "post",
|
|
|
headers: {
|
|
|
"Content-Type": "application/json",
|
|
|
},
|
|
|
- data: {
|
|
|
- templateId: this.id,
|
|
|
- templateContent: JSON.stringify(data),
|
|
|
- templateName: workbook_name,
|
|
|
- status: "0",
|
|
|
- },
|
|
|
+ data: value,
|
|
|
}).then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "保存成功",
|
|
|
+ });
|
|
|
this.$emit("save");
|
|
|
});
|
|
|
},
|