|
@@ -17,10 +17,6 @@
|
|
|
<el-option v-for="i in isuseList" :key="i.model" :label="i.label" :value="i.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" @click="timesubmitForm('act_time')" size="mini">提交</el-button>
|
|
|
- <el-button @click="resetForm('act_time')" size="mini">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
</template>
|
|
|
<template #content>
|
|
@@ -33,10 +29,6 @@
|
|
|
<el-option v-for="i in isuseList" :key="i.model" :label="i.label" :value="i.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" @click="contentonSubmit('content')" size="mini">提交</el-button>
|
|
|
- <el-button @click="resetForm('content')" size="mini">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
</template>
|
|
|
<template #is_use>
|
|
@@ -109,34 +101,11 @@ export default {
|
|
|
this.$set(this.content, `is_use`, '0');
|
|
|
}
|
|
|
},
|
|
|
- // 活动时间提交
|
|
|
- timesubmitForm(formName) {
|
|
|
- this.$refs[formName].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.$set(this.form, `act_time`, this.act_time);
|
|
|
- } else {
|
|
|
- console.log('error submit!!');
|
|
|
- return false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- resetForm(type) {
|
|
|
- this.$set(this, type, {});
|
|
|
- },
|
|
|
- // 说明提交
|
|
|
- contentonSubmit(formName) {
|
|
|
- this.$refs[formName].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.$set(this.form, `content`, this.content);
|
|
|
- } else {
|
|
|
- console.log('error submit!!');
|
|
|
- return false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
// 提交
|
|
|
async onSubmit({ data }) {
|
|
|
let res;
|
|
|
+ this.$set(this.form, `act_time`, this.act_time);
|
|
|
+ this.$set(this.form, `content`, this.content);
|
|
|
if (data.id) res = await this.update(data);
|
|
|
else res = await this.create(data);
|
|
|
if (this.$checkRes(res)) {
|