|
@@ -11,7 +11,14 @@
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
<a-form-model-item label="点位名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tagname">
|
|
|
- <a-input v-model="model.tagname" placeholder="请输入点位名" ></a-input>
|
|
|
+ <!-- <a-input v-model="model.tagname" placeholder="请输入点位名" ></a-input> -->
|
|
|
+ <a-select
|
|
|
+ v-model="model.tagname"
|
|
|
+ placeholder="请选择点位"
|
|
|
+ show-search
|
|
|
+ allowClear
|
|
|
+ :options="pointOptions">
|
|
|
+ </a-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
@@ -121,8 +128,11 @@
|
|
|
url: {
|
|
|
add: "/tpmTag/tpmTag/add",
|
|
|
edit: "/tpmTag/tpmTag/edit",
|
|
|
- queryById: "/tpmTag/tpmTag/queryById"
|
|
|
- }
|
|
|
+ queryById: "/tpmTag/tpmTag/queryById",
|
|
|
+ getPoint: "/tpmIoserverTag/tpmIoserverTag/tagList"
|
|
|
+ },
|
|
|
+ // 点位数据
|
|
|
+ pointOptions: []
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -133,6 +143,8 @@
|
|
|
created () {
|
|
|
//备份model原始值
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
|
|
+ // 获取点位下拉列表
|
|
|
+ this.getPointOptions()
|
|
|
},
|
|
|
methods: {
|
|
|
add () {
|
|
@@ -171,6 +183,18 @@
|
|
|
|
|
|
})
|
|
|
},
|
|
|
+ getPointOptions() {
|
|
|
+ getAction(this.url.getPoint).then((res) => {
|
|
|
+ console.log(1111,res.result)
|
|
|
+ this.pointOptions = res.result.map(item => {
|
|
|
+ return {
|
|
|
+ // value: item.id,
|
|
|
+ value: item.tagname,
|
|
|
+ label: item.tagname
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|