|
|
|
|
@@ -159,14 +159,12 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang='ts'>
|
|
|
|
|
|
|
|
|
|
import IPAddress from '@/components/IpAddress/index.vue'
|
|
|
|
|
import {dialogBig} from '@/utils/elementBind'
|
|
|
|
|
import {type Device} from '@/api/device/interface/device'
|
|
|
|
|
import {ElMessage, type FormItemRule} from 'element-plus'
|
|
|
|
|
import {addPqDev, updatePqDev} from '@/api/device/device'
|
|
|
|
|
import {computed, reactive, type Ref, ref} from 'vue'
|
|
|
|
|
import {computed, ref} from 'vue'
|
|
|
|
|
import {useDictStore} from '@/stores/modules/dict'
|
|
|
|
|
import {CirclePlus, Delete, EditPen} from '@element-plus/icons-vue'
|
|
|
|
|
// 使用 dayjs 库格式化
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
import MonitorTable from '@/views/machine/device/components/monitorTab.vue';
|
|
|
|
|
@@ -213,7 +211,7 @@ function useMetaInfo() {
|
|
|
|
|
icdId: '',
|
|
|
|
|
power: '',
|
|
|
|
|
preinvestmentPlan: '',
|
|
|
|
|
delegate:''
|
|
|
|
|
delegate: ''
|
|
|
|
|
})
|
|
|
|
|
return {dialogVisible, titleType, formContent}
|
|
|
|
|
}
|
|
|
|
|
@@ -244,7 +242,7 @@ const resetFormContent = () => {
|
|
|
|
|
icdId: '',
|
|
|
|
|
power: '',
|
|
|
|
|
preinvestmentPlan: '',
|
|
|
|
|
delegate:''
|
|
|
|
|
delegate: ''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -446,15 +444,17 @@ const handleDevTypeChange = (value: string) => {
|
|
|
|
|
formContent.value.devVolt = dev.devVolt; // 默认值为1
|
|
|
|
|
formContent.value.icdId = dev.icd
|
|
|
|
|
formContent.value.power = dev.power
|
|
|
|
|
// if (dev.name.includes('882B')) {
|
|
|
|
|
// formContent.value.ip = '172.17.102.220'
|
|
|
|
|
// } else if (dev.name.includes('882A')) {
|
|
|
|
|
// formContent.value.ip = '172.17.102.221'
|
|
|
|
|
// } else {
|
|
|
|
|
// formContent.value.ip = '172.17.102.200'
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(scene.value === '1'){
|
|
|
|
|
if (dev.name.includes('NPQS-581') || dev.name.includes('NPQS-580')) {
|
|
|
|
|
formContent.value.encryptionFlag = 1
|
|
|
|
|
formContent.value.series = 'Pqs&cn870299'
|
|
|
|
|
formContent.value.devKey = '!qaz@wsx3edc4rfv'
|
|
|
|
|
} else {
|
|
|
|
|
formContent.value.encryptionFlag = 0
|
|
|
|
|
formContent.value.series = null
|
|
|
|
|
formContent.value.devKey = null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
formContent.value.devChns = 1; // 默认值为1
|
|
|
|
|
formContent.value.devCurr = 1; // 默认值为1
|
|
|
|
|
|