wxy 4 年之前
父节点
当前提交
b64d4d017d
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. 9 3
      src/views/kjpdCenter/basicInfo/index.vue

+ 9 - 3
src/views/kjpdCenter/basicInfo/index.vue

@@ -24,7 +24,9 @@
                   类型
                 </el-col>
                 <el-col :span="24">
-                  <el-input v-model="form.type" placeholder="请输入类型"></el-input>
+                  <el-select v-model="form.type" placeholder="请选择类型">
+                    <el-option v-for="item in options" :key="item.name" :label="item.name" :value="item.name"> </el-option>
+                  </el-select>
                 </el-col>
               </el-form-item>
             </el-col>
@@ -102,16 +104,20 @@ export default {
   data: function() {
     return {
       form: {},
+      options: [],
     };
   },
   created() {
     this.search();
   },
   methods: {
-    ...markettype(['fetch', 'update']),
+    ...markettype(['fetch', 'update', 'query']),
     async search() {
+      const res1 = await this.query({ category: '04' });
+      if (this.$checkRes(res1)) {
+        this.$set(this, `options`, res1.data);
+      }
       this.form = this.user;
-      // console.log(this.form);
       const res = await this.fetch(this.user.type);
       this.$set(this.form, `type`, res.data.name);
     },