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

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

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

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

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

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

Loading…
Cancel
Save