zs 2 anni fa
parent
commit
5c7608c866
2 ha cambiato i file con 17 aggiunte e 33 eliminazioni
  1. 2 33
      src/views/system/act/detail.vue
  2. 15 0
      src/views/system/act/goods.vue

+ 2 - 33
src/views/system/act/detail.vue

@@ -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)) {

+ 15 - 0
src/views/system/act/goods.vue

@@ -82,6 +82,21 @@ export default {
         // this.$set(this, 'total', res.total);
       }
     },
+    // 点击选中
+    handleSelect(item) {
+      console.log(item);
+    },
+    querySearchAsync(queryString, cb) {
+      console.log(queryString);
+      console.log(cb);
+      // var restaurants = this.restaurants;
+      // var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
+
+      // clearTimeout(this.timeout);
+      // this.timeout = setTimeout(() => {
+      //   cb(results);
+      // }, 3000 * Math.random());
+    },
     // 新增
     toAdd({ data }) {
       console.log(data);