From 0c226692e92f63616d25ccc2990ef5a0f6edb479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E7=95=85?= Date: Mon, 13 Sep 2021 21:33:15 +0800 Subject: [PATCH] add --- src/views/sce/sceInfo/index.vue | 160 +++++++++++++++++++++++--------- src/views/sce/tips/index.vue | 12 ++- 2 files changed, 127 insertions(+), 45 deletions(-) diff --git a/src/views/sce/sceInfo/index.vue b/src/views/sce/sceInfo/index.vue index 8e50fa0..bc58548 100644 --- a/src/views/sce/sceInfo/index.vue +++ b/src/views/sce/sceInfo/index.vue @@ -94,7 +94,11 @@ /> - +

基本信息

- + - + - +

剧本图片

@@ -180,7 +196,10 @@ @@ -228,6 +247,7 @@
新增

剧本资源

- + 本地上传 网易云地址 @@ -258,9 +282,13 @@

- {{ item.processName }} + {{ item.processNames }}
-
+
关联流程 @@ -359,7 +387,7 @@ label="关联流程" > @@ -373,7 +401,11 @@
- + 本地上传 网易云地址 @@ -397,9 +429,13 @@

- {{ item.processName }} + {{ item.processNames }}
-
+
@@ -518,7 +554,11 @@
- + 本地上传 网易云地址 @@ -542,9 +582,13 @@

- {{ item.processName }} + {{ item.processNames }}
-
+
@@ -782,7 +826,8 @@ export default { musicIdnex: "", videoIndex: "", dataList: {}, - disabled:false + disabled: false, + disabledButton:false }; }, mounted() { @@ -809,6 +854,32 @@ export default { } } }, + changCode() { + console.log(this.ruleForm.processesList, "输入的值"); + 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 + ) { + console.log(i, s); + if ( + this.ruleForm.processesList[i].code == + this.ruleForm.processesList[s].code + ) { + this.$message({ + message: "输入的流程编号有重复,请重新输入", + type: "error" + }); + this.disabledButton = true + }else{ + this.disabledButton = false + } + } + } + } + }, //获取列表 async queryList() { this.loading = true; @@ -888,15 +959,16 @@ export default { sourceType: n.sourceType, title: n.title, url: n.url, + processNames: n.processNames, processId: n.processId.split(",") }; }); this.radioImg = n.sourceType; } else if (n.mediaType == 1 && n.sourceType == 1) { a.push(n); - var tmp = [] - this.imgData = a - + var tmp = []; + this.imgData = a; + this.radioImg = n.sourceType; } if (n.mediaType == 2 && n.sourceType == 1) { @@ -912,6 +984,7 @@ export default { sourceType: n.sourceType, title: n.title, url: n.url, + processNames: n.processNames, processId: n.processId.split(",") }; }); @@ -929,6 +1002,7 @@ export default { sourceType: n.sourceType, title: n.title, url: n.url, + processNames: n.processNames, processId: n.processId.split(",") }; }); @@ -962,14 +1036,14 @@ export default { radioVideo: [], resourcesList: [] }; - this.imgData = [] - this.musicData = [] - this.videoData = [] + this.imgData = []; + this.musicData = []; + this.videoData = []; this.radioMusic = 1; this.radioVideo = 1; this.radioImg = 1; this.dialog.Visible = true; - this.disabled = false + this.disabled = false; this.type = "add"; this.dialog.title = "新增剧本"; }, @@ -1010,20 +1084,20 @@ export default { let data = this.ruleForm.radioImg .concat(this.ruleForm.radioMusic) .concat(this.ruleForm.radioVideo); - let a = [] - let b = this.ruleForm.processesList.map((n)=>{ - if(n.title != ''){ - a.push(n) - } - }) - this.ruleForm.processesList = a.map((n)=>{ - return{ - title:n.title, - code:n.code, - introduction:n.introduction, - sort:n.sort + let a = []; + let b = this.ruleForm.processesList.map(n => { + if (n.title != "") { + a.push(n); } - }) + }); + this.ruleForm.processesList = a.map(n => { + return { + title: n.title, + code: n.code, + introduction: n.introduction, + sort: n.sort + }; + }); let list = []; data.map(n => { if (n.url != "") { @@ -1083,14 +1157,14 @@ export default { this.queryListDetail(row.id); this.dialog.Visible = true; this.type = "edit"; - this.disabled = false + this.disabled = false; this.dialog.title = "编辑剧本"; }, // 查看 handleView(row) { this.queryListDetail(row.id); this.type = "view"; - this.disabled = true + this.disabled = true; this.dialog.Visible = true; }, // 删除 @@ -1257,7 +1331,7 @@ export default { uploadFile(formdata).then(res => { this.imgData.push({ url: res.data.wjUrl, - processName: "", + processNames: "", title: res.data.wjDx }); this.imgType = true; @@ -1270,7 +1344,7 @@ export default { uploadFile(formdata).then(res => { this.musicData.push({ url: res.data.wjUrl, - processName: "", + processNames: "", title: res.data.wjDx }); this.musicType = true; @@ -1283,7 +1357,7 @@ export default { uploadFile(formdata).then(res => { this.videoData.push({ url: res.data.wjUrl, - processName: "", + processNames: "", title: res.data.wjDx }); this.radioType = true; diff --git a/src/views/sce/tips/index.vue b/src/views/sce/tips/index.vue index 8f040ce..6fbb8dd 100644 --- a/src/views/sce/tips/index.vue +++ b/src/views/sce/tips/index.vue @@ -8,7 +8,7 @@ v-model="queryParams.query.scenarioId" clearable placeholder="请选择剧本标题" - @change="chageLc" + @change="queryLc" @visible-change='foucsLc' >