新增巷道model的selete框数据更改为球机请求列表后的数据

merge-requests/1/head
张鑫 5 years ago
parent ebaa6e6b02
commit 42881e7101

@ -1,8 +1,13 @@
<template>
<div>
<a-button type="primary" class="add" @click="showModel('add','')">
新增球机
</a-button>
<div class="button-box">
<a-button type="primary" class="add" @click="showModel('add','')">
新增球机
</a-button>
<a-button type="primary" class="plc">
PLC IO表配置
</a-button>
</div>
<a-table
:columns="columns"
:row-key="record => record.id"
@ -147,10 +152,16 @@ export default {
}
};
</script>
<style lang="scss">
.add{
<style lang="scss" scoped>
.button-box{
position: absolute;
top:0;
right: 20px;
display: flex;
align-items: center;
justify-content: center;
.add{
margin-right: 20px;
}
}
</style>

@ -26,7 +26,6 @@
{ rules: [{ required: true, message: '请选择球机IP!' }] },
]"
placeholder="选择球机IP"
@change="handleSelectChangeLeft"
>
<a-select-option value="192.168.11.6">
192.168.11.6

@ -166,7 +166,7 @@ export default {
}
};
</script>
<style lang="scss">
<style lang="scss" scoped>
.add{
position: absolute;
top:0;

@ -144,12 +144,10 @@
'camera1Id',
]"
placeholder="选择球机"
@dropdownVisibleChange="handleSelectCamera"
>
<a-select-option value="0">
球机1
</a-select-option>
<a-select-option value="1">
球机2
<a-select-option v-for="item in camera1Id" :key="item.id" :value="item.id">
{{item.name}}
</a-select-option>
</a-select>
</a-form-item>
@ -160,11 +158,8 @@
]"
placeholder="选择球机"
>
<a-select-option value="0">
球机3
</a-select-option>
<a-select-option value="1">
球机4
<a-select-option v-for="item in camera1Id" :key="item.id" :value="item.id">
{{item.name}}
</a-select-option>
</a-select>
</a-form-item>
@ -236,6 +231,7 @@ export default {
leftType:'',
rightType:'',
id:'',
camera1Id:[],
mdata:[]
};
},
@ -314,6 +310,16 @@ export default {
})
this.rightType = value //data
},
handleSelectCamera(){
this.$api.httpApi.getCameraList({
data: {
pageNum:0,
pageSize:0,
}
}).then(res => {
this.camera1Id = res.data.list;
});
}
},
};
</script>

Loading…
Cancel
Save