Commit e2bbbff2 by 郑艺斌

fix: 地图增加厂区

parent 38e8c73b
Showing with 22 additions and 3 deletions
......@@ -8,6 +8,12 @@
<el-form-item label="地图ID" prop="thirdId">
<el-input v-model="formData.thirdId" placeholder="地图ID"></el-input>
</el-form-item>
<el-form-item label="厂区:" prop="factoryId">
<el-select v-model="formData.factoryId" placeholder="请选择厂区">
<el-option v-for="item in factoryOptions" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="备注:">
<el-input type="textarea" v-model="formData.remark" :rows="3"></el-input>
</el-form-item>
......@@ -32,9 +38,11 @@
<script>
import MapAdmin from '@/api/siteAdmin/MapAdmin'
import FactoryAdmin from '@/api/siteAdmin/FactoryAdmin'
export default {
MapAdmin: null,
FactoryAdmin: null,
name: '',
components: {},
props: {
......@@ -68,10 +76,14 @@ export default {
thirdId: [
{ required: true, message: '请输入地图ID', trigger: 'blur' },
],
factoryId: [
{ required: true, message: '请选择厂区', trigger: 'change' },
],
sort: [
{ required: true, message: '请输入排序', trigger: 'blur' },
]
}
],
},
factoryOptions: []
}
},
watch: {},
......@@ -132,12 +144,19 @@ export default {
dialogClose () {
this.$parent._data.dialogConfig.open = false
},
// 获取厂区下拉列表
getFactoryList () {
this.FactoryAdmin.getFactoryList().then(({ data }) => {
this.factoryOptions = data
})
},
},
created () {
this.MapAdmin = new MapAdmin()
this.FactoryAdmin = new FactoryAdmin()
},
mounted () {
this.getFactoryList()
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment