设备台账属性修改
This commit is contained in:
parent
e21ef7fe3e
commit
ec2c510027
@ -147,12 +147,12 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属线路:">
|
||||
<el-input placeholder="请输入所属线路" v-model="editDeviceData.belongingLine" style="width: 200px" />
|
||||
<el-input placeholder="请输入所属线路" v-model="editDeviceData.belongLine" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标杆机组:">
|
||||
<el-switch v-model="editDeviceData.isbenchMarkUnit" />
|
||||
<el-switch @change="edithandleSwitchChange" :active-value="1" :inactive-value="0" v-model="editDeviceData.standard" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -302,12 +302,17 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属线路:">
|
||||
<el-input placeholder="请输入所属线路" v-model="editAddDeviceData.belongingLine" style="width: 200px" />
|
||||
<el-input placeholder="请输入所属线路" v-model="editAddDeviceData.belongLine" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标杆机组:">
|
||||
<el-switch v-model="editAddDeviceData.isbenchMarkUnit" />
|
||||
<el-switch
|
||||
@change="addhandleSwitchChange"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
v-model="editAddDeviceData.standard"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -536,6 +541,7 @@ const handleNodeClick = (data: any) => {
|
||||
formQuery.objectType = data.equipmentTypeId
|
||||
equipQuery(formQuery).then((res) => {
|
||||
deviceList.value = res.rows
|
||||
|
||||
pageTotal.value = res.total
|
||||
})
|
||||
equipModeList({
|
||||
@ -626,8 +632,8 @@ const addDeviceList = () => {
|
||||
editAddDeviceData.orgId = ''
|
||||
editAddDeviceData.parentEquipmentId = ''
|
||||
editAddDeviceData.iotModelId = ''
|
||||
editAddDeviceData.belongingLine = ''
|
||||
editAddDeviceData.isbenchMarkUnit = false
|
||||
editAddDeviceData.belongLine = ''
|
||||
editAddDeviceData.standard = 0
|
||||
}
|
||||
|
||||
// 查看设备详情
|
||||
@ -648,8 +654,8 @@ const editDeviceData = reactive({
|
||||
parentEquipmentId: '',
|
||||
iotModelId: '',
|
||||
id: '',
|
||||
belongingLine: '',
|
||||
isbenchMarkUnit: false,
|
||||
belongLine: '',
|
||||
standard: 0,
|
||||
})
|
||||
|
||||
const size = ref<'default' | 'large' | 'small'>('default')
|
||||
@ -677,8 +683,8 @@ const viewDeviceDetails = (data: any) => {
|
||||
editDeviceData.orgId = data.row.orgId
|
||||
editDeviceData.parentEquipmentId = data.row.parentEquipmentId
|
||||
editDeviceData.iotModelId = data.row.iotModelId
|
||||
editDeviceData.belongingLine = data.row.belongingLine
|
||||
editDeviceData.isbenchMarkUnit = data.row.isbenchMarkUnit
|
||||
editDeviceData.belongLine = data.row.belongLine
|
||||
editDeviceData.standard = data.row.standard || 0
|
||||
}
|
||||
|
||||
// 设备删除
|
||||
@ -798,9 +804,15 @@ const editAddDeviceData = reactive({
|
||||
orgId: '',
|
||||
parentEquipmentId: '',
|
||||
iotModelId: '',
|
||||
belongingLine: '',
|
||||
isbenchMarkUnit: false,
|
||||
belongLine: '',
|
||||
standard: 0,
|
||||
})
|
||||
const addhandleSwitchChange = (value: any) => {
|
||||
editAddDeviceData.standard = value ? 1 : 0
|
||||
}
|
||||
const edithandleSwitchChange = (value: any) => {
|
||||
editDeviceData.standard = value ? 1 : 0
|
||||
}
|
||||
|
||||
// 设备新增字段校验
|
||||
const editAddDeviceRules = reactive({
|
||||
@ -832,7 +844,6 @@ const saveAddData = () => {
|
||||
editAddDeviceData.objectType = ele.equipmentTypeId
|
||||
}
|
||||
})
|
||||
|
||||
equipAdd(editAddDeviceData).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
|
Loading…
Reference in New Issue
Block a user