|
@@ -24,7 +24,9 @@
|
|
类型
|
|
类型
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<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-col>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -102,16 +104,20 @@ export default {
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
form: {},
|
|
form: {},
|
|
|
|
+ options: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.search();
|
|
this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...markettype(['fetch', 'update']),
|
|
|
|
|
|
+ ...markettype(['fetch', 'update', 'query']),
|
|
async search() {
|
|
async search() {
|
|
|
|
+ const res1 = await this.query({ category: '04' });
|
|
|
|
+ if (this.$checkRes(res1)) {
|
|
|
|
+ this.$set(this, `options`, res1.data);
|
|
|
|
+ }
|
|
this.form = this.user;
|
|
this.form = this.user;
|
|
- // console.log(this.form);
|
|
|
|
const res = await this.fetch(this.user.type);
|
|
const res = await this.fetch(this.user.type);
|
|
this.$set(this.form, `type`, res.data.name);
|
|
this.$set(this.form, `type`, res.data.name);
|
|
},
|
|
},
|