台账新增修改添加objName
This commit is contained in:
@@ -1107,7 +1107,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
label="测量点性质:"
|
||||
label="电网标志:"
|
||||
:prop="
|
||||
'deviceParam.' +
|
||||
[deviceIndex] +
|
||||
@@ -1119,14 +1119,14 @@
|
||||
"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: '请选择测量点性质',
|
||||
message: '请选择电网标志',
|
||||
trigger: 'blur'
|
||||
}"
|
||||
>
|
||||
<el-select
|
||||
filterable
|
||||
v-model="lineItem.powerFlag"
|
||||
placeholder="请选择测量点性质"
|
||||
placeholder="请选择电网标志"
|
||||
:disabled="pageStatus == 1"
|
||||
@change="lineItem.objId = ''"
|
||||
>
|
||||
@@ -1146,8 +1146,9 @@
|
||||
<el-select
|
||||
filterable
|
||||
v-model="lineItem.objId"
|
||||
placeholder="请选择用户名称"
|
||||
placeholder="请选择用户"
|
||||
:disabled="pageStatus == 1"
|
||||
@change="(val) => handleSelect(lineItem, val)"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
@@ -2202,6 +2203,22 @@ const category = () => {
|
||||
bigList.value = convertToTree(res.data)
|
||||
})
|
||||
}
|
||||
|
||||
//用户对象chage事件
|
||||
const handleSelect = (item, selectedId) => {
|
||||
// 清空选择
|
||||
if (!selectedId) {
|
||||
item.projectName = ''
|
||||
return
|
||||
}
|
||||
// 过滤当前下拉数据源
|
||||
|
||||
const options = newStationIdArr.value.find(i => i.id === selectedId)
|
||||
if (options) {
|
||||
item.objName = options.projectName
|
||||
}
|
||||
}
|
||||
|
||||
// 组装用户大小类
|
||||
const convertToTree = (data: any) => {
|
||||
const nodeMap: any = {}
|
||||
|
||||
Reference in New Issue
Block a user