forked from mt-fe-group/mt-yd-ui
update 设备的工段绑定
This commit is contained in:
parent
d5af6a01f5
commit
ae8a3668c8
@ -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 = '设备绑定'
|
||||
|
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user