|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
<Modal
|
|
|
|
|
v-model="dispalyModal"
|
|
|
|
|
width="1000"
|
|
|
|
|
:loading="loading"
|
|
|
|
|
:mask-closable="false"
|
|
|
|
|
@on-cancel="cancel"
|
|
|
|
|
@on-ok="save"
|
|
|
|
@ -127,6 +128,7 @@ export default {
|
|
|
|
|
modal_loading: false,
|
|
|
|
|
imageName: "212",
|
|
|
|
|
formValidate: {},
|
|
|
|
|
loading: true,
|
|
|
|
|
ruleValidate: {
|
|
|
|
|
name: [
|
|
|
|
|
{ required: true, message: "活动名称不能为空", trigger: "blur" },
|
|
|
|
@ -148,6 +150,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
addActivityModal(val) {
|
|
|
|
|
console.log(111, val);
|
|
|
|
|
this.dispalyModal = val;
|
|
|
|
|
if (val === true && this.id) {
|
|
|
|
|
this.getActivityData();
|
|
|
|
@ -225,7 +228,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
}).then(function(res) {
|
|
|
|
|
if (res.data.success) {
|
|
|
|
|
me.formValidate.logo = res.data.results;
|
|
|
|
|
// me.formValidate.logo = res.data.results;
|
|
|
|
|
me.$set(me.formValidate, "logo", res.data.results);
|
|
|
|
|
console.log(me.formValidate.logo);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
@ -234,6 +239,7 @@ export default {
|
|
|
|
|
let that = this;
|
|
|
|
|
if (that.formValidate.params.length <= 0) {
|
|
|
|
|
that.$Message.error("至少需要填写一个活动类型!");
|
|
|
|
|
that.loading = false;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (
|
|
|
|
@ -242,8 +248,10 @@ export default {
|
|
|
|
|
that.formValidate.logo.length <= 0
|
|
|
|
|
) {
|
|
|
|
|
that.$Message.error("请上传活动封面!");
|
|
|
|
|
that.loading = false;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
this.loading = true;
|
|
|
|
|
this.$refs["formValidate"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
// param = JSON.stringify(param)
|
|
|
|
@ -256,6 +264,7 @@ export default {
|
|
|
|
|
} else {
|
|
|
|
|
that.$Message.error("表单验证失败!");
|
|
|
|
|
}
|
|
|
|
|
that.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|