diff --git a/flossom-ui/src/views/system/mode/index.vue b/flossom-ui/src/views/system/mode/index.vue index dbbf17f..5338c9f 100644 --- a/flossom-ui/src/views/system/mode/index.vue +++ b/flossom-ui/src/views/system/mode/index.vue @@ -542,19 +542,13 @@ export default { modeTime: [ { required: true, message: "模式时长不能为空", trigger: "blur" } ], - technologyInfo: [ - { required: true, message: "使用技术不能为空", trigger: "change" } - ], - effectContent: [ - { required: true, message: "使用技术不能为空", trigger: "blur" } - ], } }; }, created() { this.getList(); this.getDeptTree(); - this.getCombineList(); + }, methods: { getCombineList(){ @@ -570,6 +564,8 @@ export default { this.total = response.total; this.loading = false; }); + // 查询组合数据 + this.getCombineList(); }, setModeType(){ this.form.modeType = null; @@ -711,6 +707,26 @@ export default { } // 组合实体 this.form.combineData = this.combineData; + let technologyFlag = false; + let effectContent = false; + if (this.form.combineData.length>0){ + this.form.combineData.forEach(data => { + if (!data.technologyArray) { + technologyFlag = true; + } + if (!data.effectContent) { + effectContent = true; + } + }) + } + if (technologyFlag) { + this.$message.error("使用技术不能为空"); + return; + } + if (effectContent) { + this.$message.error("模式功效不能为空"); + return; + } this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { @@ -876,7 +892,6 @@ export default { this.$modal.msgError("弹出内容不能为空"); return ; } - console.log("提交后的数据==》",this.openSourceForm) if (!this.openSourceForm.openSourceUrl) { this.$modal.msgError("弹出图片/视频不能为空"); return ; @@ -946,6 +961,9 @@ export default { this.serviceData = this.serviceData.filter(x => x.id != row.id); } }, + handleRemoveService(file){ + console.log(file); + }, // 统一上传操作 uploadServiceSuccess(response, file, fileList, item){ if(response.code == '200') { @@ -955,10 +973,12 @@ export default { const index = indexArray[0]; const flag = indexArray[1]; if ('start' == flag) { + this.serviceData[index].classHide = true; this.serviceData[index].startSourceArray = []; this.serviceData[index].startSource = response.data.url; this.serviceData[index].startSourceArray.push({name:response.data.name,url:response.data.url}) } else { + this.serviceData[index].classHide = true; this.serviceData[index].stopSourceArray = []; this.serviceData[index].stopSource = response.data.url; this.serviceData[index].stopSourceArray.push({name:response.data.name,url:response.data.url})