|
@@ -179,6 +179,7 @@
|
|
|
</el-button>
|
|
|
<el-button v-if="titname != '查看' && visionsts == '2'" type="primary" @click="dialogCli(1)">打 回
|
|
|
</el-button>
|
|
|
+ <el-button v-if="titname == '添加'" type="primary" @click="temp">保 存</el-button>
|
|
|
<el-button v-if="titname == '添加'" type="primary" @click="checkexa = true">确 定</el-button>
|
|
|
<el-button v-if="titname == '查看'" @click="dialogCli(3)">确 定</el-button>
|
|
|
<el-button @click="dialogCli(3)">取 消</el-button>
|
|
@@ -337,9 +338,53 @@
|
|
|
url: '/market/cChannelDemand/demandCarryImport',
|
|
|
fileList: []
|
|
|
},
|
|
|
+ tempSave: false,
|
|
|
}
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ tempSave (value) {
|
|
|
+ if (value) {
|
|
|
+ // 监听编辑状态,每20秒请求一次,注意函数不加()
|
|
|
+ this.timer = window.setInterval(this.temp, 20000)
|
|
|
+ } else {
|
|
|
+ // 停止监听
|
|
|
+ clearInterval(this.timer)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ temp() {
|
|
|
+ if (JSON.stringify(this.infolist)=='{}') {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let params = {};
|
|
|
+ params.infolist = this.infolist
|
|
|
+ params.fileList = [];
|
|
|
+ params.attList = [];
|
|
|
+ this.attList.forEach(item => {
|
|
|
+ let file = {
|
|
|
+ id: item.fileCode,
|
|
|
+ fileCode: item.fileCode,
|
|
|
+ fileName: item.fileName,
|
|
|
+ name: item.fileName
|
|
|
+ };
|
|
|
+ params.fileList.push(file);
|
|
|
+ params.attList.push(file);
|
|
|
+ });
|
|
|
+ this.$http({
|
|
|
+ url: "/market/bpmTemp/temp",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ bpmType: "1",
|
|
|
+ content: JSON.stringify(params),
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ //console.log(res)
|
|
|
+ });
|
|
|
+ },
|
|
|
deletes() {
|
|
|
this.treeListonly = {};
|
|
|
this.closeList = !this.closeList;
|
|
@@ -400,9 +445,23 @@
|
|
|
this.titname = '审批';
|
|
|
this.disableStatus = true;
|
|
|
} else if (v === 3) {
|
|
|
- this.titname = '添加';
|
|
|
- this.visionchonly = false;
|
|
|
- this.disableStatus = false;
|
|
|
+ this.$http({
|
|
|
+ url: '/market/bpmTemp/query',
|
|
|
+ method: "post",
|
|
|
+ headers: {"Content-Type": "application/json",},
|
|
|
+ data: {bpmType: "1"},
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ let content = JSON.parse(res.data.content);
|
|
|
+ this.infolist = content.infolist;
|
|
|
+ this.attList = content.attList;
|
|
|
+ this.fileInfo.fileList = content.fileList;
|
|
|
+ }
|
|
|
+ this.tempSave = true;
|
|
|
+ this.titname = '添加';
|
|
|
+ this.visionchonly = false;
|
|
|
+ this.disableStatus = false;
|
|
|
+ });
|
|
|
return
|
|
|
}
|
|
|
this.$http({
|
|
@@ -517,6 +576,7 @@
|
|
|
this.attList = [];
|
|
|
this.fileInfo.fileList = [];
|
|
|
this.checkexa = false;
|
|
|
+ this.tempSave = false;
|
|
|
return
|
|
|
}
|
|
|
let _this = this;
|
|
@@ -613,7 +673,20 @@
|
|
|
attchFileId: this.attList[i].attchFileId,
|
|
|
});
|
|
|
}
|
|
|
- param.params.attList = JSON.stringify(attList)
|
|
|
+ param.params.attList = JSON.stringify(attList);
|
|
|
+
|
|
|
+ this.$http({
|
|
|
+ url: "/market/bpmTemp/del",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ bpmType: "1",
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ //console.log(res)
|
|
|
+ });
|
|
|
}
|
|
|
this.submitInfo("/bpm/api/submitTask", param);
|
|
|
}
|