scada节点配置工序单元修改为下拉可输入
This commit is contained in:
6
.env
6
.env
@@ -15,4 +15,8 @@ VUE_APP_I18N_FALLBACK_LOCALE=en
|
||||
|
||||
# element 颜色
|
||||
VUE_APP_ELEMENT_COLOR=#409EFF
|
||||
VUE_APP_HSLSERVER_PASSWORD=123456
|
||||
VUE_APP_HSLSERVER_PASSWORD=123456
|
||||
|
||||
#==true出现下拉,数据来源于MES
|
||||
#==false 手动输入,以及不渲染mes的设备编码
|
||||
VUE_APP_CHOOSABLE=true
|
||||
@@ -41,12 +41,14 @@
|
||||
<script>
|
||||
import tips from './tips.md'
|
||||
import jschardet from 'jschardet'
|
||||
import { assign, each, pick, pickBy, startsWith, includes, every } from 'lodash'
|
||||
import { assign, each, map, pick, pickBy, startsWith, includes, every } from 'lodash'
|
||||
//import { getWorkingsubclassAll } from '@/api/basic/device'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
tips,
|
||||
choosable: process.env.VUE_APP_CHOOSABLE,
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
@@ -176,7 +178,14 @@ export default {
|
||||
}
|
||||
},
|
||||
working_subclass: {
|
||||
title: '工序单元'
|
||||
title: '工序单元',
|
||||
component: {
|
||||
name: 'el-select',
|
||||
filterable: true,
|
||||
allowCreate: true,
|
||||
options: this.WorkingsubclassData,
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
note: {
|
||||
title: '备注'
|
||||
@@ -225,6 +234,10 @@ export default {
|
||||
},
|
||||
// 普通的新增
|
||||
addRow () {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.d2Crud.handleFormTemplateMode('working_subclass').component.options = this.WorkingsubclassData
|
||||
this.$refs.d2Crud.$forceUpdate()
|
||||
})
|
||||
this.$refs.d2Crud.showDialog({
|
||||
mode: 'add'
|
||||
})
|
||||
@@ -313,9 +326,19 @@ export default {
|
||||
type: 'warning'
|
||||
})
|
||||
done()
|
||||
},
|
||||
getWorkingsubclassAll () {
|
||||
// getWorkingsubclassAll().then(res=>{
|
||||
// this.WorkingsubclassData = map(res.data, (o) => {
|
||||
// return { value: o.code, label: o.name }
|
||||
// })
|
||||
// })
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (this.choosable === 'true') {
|
||||
this.getWorkingsubclassAll()
|
||||
}
|
||||
this.getNodes()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user