优化以及查询组合数据

master
elliott 2 years ago
parent 8aa8c5071a
commit 44f82f5659

@ -542,19 +542,13 @@ export default {
modeTime: [ modeTime: [
{ required: true, message: "模式时长不能为空", trigger: "blur" } { required: true, message: "模式时长不能为空", trigger: "blur" }
], ],
technologyInfo: [
{ required: true, message: "使用技术不能为空", trigger: "change" }
],
effectContent: [
{ required: true, message: "使用技术不能为空", trigger: "blur" }
],
} }
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getDeptTree(); this.getDeptTree();
this.getCombineList();
}, },
methods: { methods: {
getCombineList(){ getCombineList(){
@ -570,6 +564,8 @@ export default {
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
//
this.getCombineList();
}, },
setModeType(){ setModeType(){
this.form.modeType = null; this.form.modeType = null;
@ -711,6 +707,26 @@ export default {
} }
// //
this.form.combineData = this.combineData; 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 => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
@ -876,7 +892,6 @@ export default {
this.$modal.msgError("弹出内容不能为空"); this.$modal.msgError("弹出内容不能为空");
return ; return ;
} }
console.log("提交后的数据==》",this.openSourceForm)
if (!this.openSourceForm.openSourceUrl) { if (!this.openSourceForm.openSourceUrl) {
this.$modal.msgError("弹出图片/视频不能为空"); this.$modal.msgError("弹出图片/视频不能为空");
return ; return ;
@ -946,6 +961,9 @@ export default {
this.serviceData = this.serviceData.filter(x => x.id != row.id); this.serviceData = this.serviceData.filter(x => x.id != row.id);
} }
}, },
handleRemoveService(file){
console.log(file);
},
// //
uploadServiceSuccess(response, file, fileList, item){ uploadServiceSuccess(response, file, fileList, item){
if(response.code == '200') { if(response.code == '200') {
@ -955,10 +973,12 @@ export default {
const index = indexArray[0]; const index = indexArray[0];
const flag = indexArray[1]; const flag = indexArray[1];
if ('start' == flag) { if ('start' == flag) {
this.serviceData[index].classHide = true;
this.serviceData[index].startSourceArray = []; this.serviceData[index].startSourceArray = [];
this.serviceData[index].startSource = response.data.url; this.serviceData[index].startSource = response.data.url;
this.serviceData[index].startSourceArray.push({name:response.data.name,url:response.data.url}) this.serviceData[index].startSourceArray.push({name:response.data.name,url:response.data.url})
} else { } else {
this.serviceData[index].classHide = true;
this.serviceData[index].stopSourceArray = []; this.serviceData[index].stopSourceArray = [];
this.serviceData[index].stopSource = response.data.url; this.serviceData[index].stopSource = response.data.url;
this.serviceData[index].stopSourceArray.push({name:response.data.name,url:response.data.url}) this.serviceData[index].stopSourceArray.push({name:response.data.name,url:response.data.url})

Loading…
Cancel
Save