diff --git a/src/views/sce/sceInfo/index.vue b/src/views/sce/sceInfo/index.vue index 58fd576..333b761 100644 --- a/src/views/sce/sceInfo/index.vue +++ b/src/views/sce/sceInfo/index.vue @@ -98,6 +98,7 @@ :title="dialog.title" :visible.sync="dialog.Visible" width="1000px" + :before-close="handleClose" > -
+

开本流程

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
{ + done(); + this.type = '' + }) + .catch(_ => {}); + }, + changSort(val) { + if (this.ruleForm.processesList.length > 1) { + for (var i = 0; i < this.ruleForm.processesList.length; i++) { + let s = i + 1; + if ( + s < this.ruleForm.processesList.length || + s == this.ruleForm.processesList.length + ) { + if ( + this.ruleForm.processesList[i].sort == + this.ruleForm.processesList[s].sort + ) { + this.$message({ + message: "输入的流程排序有重复,请重新输入", + type: "error" + }); + this.ruleForm.processesList[s].sort = ""; + console.log(val); + this.disabledButton = true; + } else { + this.disabledButton = false; + } + } + } + } + }, + changCode(val) { if (this.ruleForm.processesList.length > 1) { for (var i = 0; i < this.ruleForm.processesList.length; i++) { let s = i + 1; @@ -945,6 +1024,8 @@ export default { message: "输入的流程编号有重复,请重新输入", type: "error" }); + this.ruleForm.processesList[s].code = ""; + console.log(val); this.disabledButton = true; } else { this.disabledButton = false; @@ -961,9 +1042,7 @@ export default { this.tableData = res.data.rows; this.total = res.data.total; this.loading = false; - } catch (err) { - - } + } catch (err) {} }, //搜索 search() { @@ -994,9 +1073,7 @@ export default { try { let res = await queryFindList({}); this.lcData = res.data; - } catch (err) { - - } + } catch (err) {} }, //获取详情 async queryListDetail(id) { @@ -1164,12 +1241,11 @@ export default { // this.radioVideo = 2; // } // }); - } catch (err) { - - } + } catch (err) {} }, // 新增 handleAdd() { + this.type = "add"; this.ruleForm = { studioName: "", title: "", @@ -1184,7 +1260,7 @@ export default { radioVideo: [], resourcesList: [] }; - this.dataImg = [] + this.dataImg = []; this.imgData = []; this.musicData = []; this.videoData = []; @@ -1192,34 +1268,33 @@ export default { this.radioVideo = 1; this.radioImg = 1; this.disabled = false; - this.type = "add"; this.dialog.title = "新增剧本"; setTimeout(() => { this.dialog.Visible = true; }, 500); }, async subMit() { - if (this.imgType == true && this.radioImg == 1) { - this.$message({ - message: "请绑定图片相关流程", - type: "error" - }); - return false; - } - if (this.musicType == true && this.radioMusic == 1) { - this.$message({ - message: "请绑定音频相关流程", - type: "error" - }); - return false; - } - if (this.videoType == true && this.radioVideo == 1) { - this.$message({ - message: "请绑定视频相关流程", - type: "error" - }); - return false; - } + // if (this.imgType == true && this.radioImg == 1) { + // this.$message({ + // message: "请绑定图片相关流程", + // type: "error" + // }); + // return false; + // } + // if (this.musicType == true && this.radioMusic == 1) { + // this.$message({ + // message: "请绑定音频相关流程", + // type: "error" + // }); + // return false; + // } + // if (this.videoType == true && this.radioVideo == 1) { + // this.$message({ + // message: "请绑定视频相关流程", + // type: "error" + // }); + // return false; + // } this.ruleForm.imgUrl = this.dataImg.join(","); if (this.radioImg == 1) { this.ruleForm.radioImg = this.imgData; @@ -1299,11 +1374,10 @@ export default { } } }); - } catch (err) { - - } + } catch (err) {} }, subEsc() { + this.type = '' this.ruleForm = { studioName: "", title: "", @@ -1348,8 +1422,10 @@ export default { }, // 查看 handleView(row) { - this.queryListDetail(row.id); + console.log(this.type, 41231); this.type = "view"; + console.log(this.type, 41231222); + this.queryListDetail(row.id); this.disabled = true; setTimeout(() => { this.dialog.Visible = true; @@ -1373,9 +1449,7 @@ export default { type: "error" }); } - } catch (err) { - - } + } catch (err) {} }, handleAvatar(res, file, fileList) { // console.log(res, file, "整个"); @@ -1393,11 +1467,9 @@ export default { let res = await uploadFile(formData); // this.ruleForm.cover = res.data.wjUrl; this.$set(this.ruleForm, "cover", res.data.wjUrl); - } catch (err) { - - } + } catch (err) {} }, - changeImgs({file}) { + changeImgs({ file }) { let formData = new FormData(); formData.append("file", file); formData.append("type", "product"); @@ -1531,7 +1603,7 @@ export default { processNames: "", title: res.data.wjDx, mediaType: 1, - sourceType:1 + sourceType: 1 }); this.imgType = true; }); @@ -1546,7 +1618,7 @@ export default { processNames: "", title: res.data.wjDx, mediaType: 1, - sourceType:2 + sourceType: 2 }); this.musicType = true; }); @@ -1561,13 +1633,13 @@ export default { processNames: "", title: res.data.wjDx, mediaType: 1, - sourceType:3 + sourceType: 3 }); this.radioType = true; }); }, - delDataImg(item,index){ - this.dataImg.splice(index,1) + delDataImg(item, index) { + this.dataImg.splice(index, 1); delFile({ wjUrl: item }).then(res => { if (res.code == 200) { this.$message.success("删除成功"); @@ -1666,7 +1738,7 @@ export default { this.$message.warning("禁止输入小数以及负数"); e.target.value = ""; } - }, + } } };