update 设备的工段绑定

This commit is contained in:
g7hoo 2022-09-30 15:04:19 +08:00
förälder d5af6a01f5
incheckning ae8a3668c8
2 ändrade filer med 37 tillägg och 2 borttagningar

Visa fil

@ -275,7 +275,7 @@ t.ws.code = '工段编码'
t.ws.binded = '已绑定的设备'
t.ws.unbind = '设备名称'
t.ws.eqbindplaceholder = '选择一个设备进行绑定'
t.ws.sort = '排序'
t.ws.sort = '工段排序'
t.ws.setorder = '请输入工段中设备的顺序'
t.ws.bind = '绑定'
t.ws.eqbind = '设备绑定'

Visa fil

@ -11,7 +11,15 @@
</el-form-item>
</el-form>
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
<base-table
:page="pageIndex"
:size="pageSize"
:data="dataList"
:table-head-configs="tableConfigs"
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
/>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
@ -54,6 +62,7 @@ const tableConfigs = [
{ prop: 'groupName', name: i18n.t('eq.group') },
{ prop: 'enName', name: i18n.t('enname') },
{ prop: 'abbr', name: i18n.t('abbr') },
{ prop: 'sectionName', name: i18n.t('ws.title') },
{
prop: 'details',
name: i18n.t('detail'),
@ -85,6 +94,17 @@ const addOrUpdateConfigs = {
type: 'select',
options: []
},
{
name: 'sectionId',
label: i18n.t('ws.title'),
required: true,
type: 'select',
options: []
},
{
name: 'sort',
label: i18n.t('ws.sort')
},
{
name: 'groupId',
label: i18n.t('eq.group'),
@ -263,9 +283,24 @@ export default {
console.log('activated')
this.getDataList()
this.getGroupList()
this.getWsList()
this.getTypeList()
},
methods: {
//
getWsList() {
this.$http({
url: this.$http.adornUrl('/monitoring/workshopSection/list'),
method: 'get'
}).then(({ data : res }) => {
const wsConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'sectionId')
wsConfig.options =
res.data?.map(item => ({
value: item.id,
label: item.name
})) || []
})
},
//
getTypeList() {
this.$http({