修改技术监督删除功能
This commit is contained in:
@@ -217,6 +217,33 @@
|
||||
class="form-item"
|
||||
label="变电站:"
|
||||
:prop="'subStationParam.name'"
|
||||
v-if="VITE_FLAG"
|
||||
:rules="{ required: true, message: '请输入变电站名称', trigger: 'blur' }"
|
||||
>
|
||||
<el-select
|
||||
v-model="AddProjectBO.subStationParam.name"
|
||||
placeholder="请选择变电站"
|
||||
filterable
|
||||
@change="subStationChange"
|
||||
:disabled="
|
||||
nodeLevel > 400 && (pageStatus == 3 || pageStatus == 2)
|
||||
? pageStatus == 3 || pageStatus == 2
|
||||
: pageStatus == 1
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in powerStationList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
label="变电站:"
|
||||
v-else
|
||||
:prop="'subStationParam.name'"
|
||||
:rules="{ required: true, message: '请输入变电站名称', trigger: 'blur' }"
|
||||
>
|
||||
<el-input
|
||||
@@ -1536,6 +1563,7 @@ import {
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getYwZtSubstation } from '@/api/device-boot/device'
|
||||
const size = ref(0)
|
||||
const TerminalRef = ref()
|
||||
const pageHeight = mainHeight(20)
|
||||
@@ -1552,7 +1580,7 @@ const treeOptions: any = ref([])
|
||||
const deviceIndex: any = ref('0')
|
||||
const busBarIndex: any = ref('0')
|
||||
const lineIndex: any = ref('0')
|
||||
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||
const projectId: any = ref('0')
|
||||
const provinceId: any = ref('0')
|
||||
const gdId: any = ref('0')
|
||||
@@ -1562,7 +1590,7 @@ const busBarId: any = ref('0')
|
||||
const lineId: any = ref('0')
|
||||
|
||||
const updateProject: any = ref(null)
|
||||
|
||||
const powerStationList: any = ref([])
|
||||
const currentGdName: any = ref('')
|
||||
const affiliatiedFrontArr: any = ref([])
|
||||
const comTypeStatusArr = dictData.getBasicData('Front_Type')
|
||||
@@ -1836,9 +1864,7 @@ const arrdess: any = ref((rule: any, value: any, callback: any) => {
|
||||
callback(new Error('请输入正确IP/MAC地址'))
|
||||
}
|
||||
})
|
||||
selectDown().then(res => {
|
||||
newStationIdArr.value = res.data
|
||||
})
|
||||
|
||||
/**经度 */
|
||||
const lngff: any = ref((rule: any, value: any, callback: any) => {
|
||||
let reg1 = /^(([1-9]\d?)|(1[0-7]\d))(\.\d{1,6})|180|0(\.\d{1,6})?/
|
||||
@@ -2002,6 +2028,14 @@ const add = () => {
|
||||
monitorPointDetail.value.businessType = industryTypeArr[0].value
|
||||
monitorPointDetail.value.loadType = loadTypeArr[0].id
|
||||
}
|
||||
//变电站变化
|
||||
const subStationChange=(e:any)=>{
|
||||
let list= powerStationList.value.filter((item:any)=>item.name==e)
|
||||
AddProjectBO.value.subStationParam.lng=list[0].lng||0
|
||||
AddProjectBO.value.subStationParam.lat=list[0].lat||0
|
||||
AddProjectBO.value.subStationParam.scale=list[0].scale
|
||||
console.log("🚀 ~ subStationChange ~ list:", list)
|
||||
}
|
||||
/**新增项目 */
|
||||
const addProject = () => {
|
||||
nodeLevel.value = 100
|
||||
@@ -2087,7 +2121,7 @@ const remove = () => {
|
||||
const next = async () => {
|
||||
await mainForm.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
console.log("🚀 ~ awaitmainForm.value.validate ~ nodeLevel.value:", nodeLevel.value)
|
||||
console.log('🚀 ~ awaitmainForm.value.validate ~ nodeLevel.value:', nodeLevel.value)
|
||||
|
||||
switch (nodeLevel.value) {
|
||||
case 100:
|
||||
@@ -2323,7 +2357,7 @@ const getNodeIndex = () => {
|
||||
}
|
||||
/**查询节点内容 */
|
||||
const queryNodeContent = () => {
|
||||
console.log("🚀 ~ queryNodeContent ~ nodeData.value:", nodeData.value)
|
||||
console.log('🚀 ~ queryNodeContent ~ nodeData.value:', nodeData.value)
|
||||
|
||||
if (nodeData.value.id == null) {
|
||||
// ElMessage.warning('1111111')
|
||||
@@ -2814,11 +2848,24 @@ const area = () => {
|
||||
deviceBODetail.value.updateTime = year + '-' + month + '-' + day
|
||||
deviceBODetail.value.nextTimeCheck = year + 1 + '-' + month + '-' + (day - 1 > 10 ? day - 1 : '0' + (day - 1))
|
||||
}
|
||||
const setDown = () => {
|
||||
selectDown().then(res => {
|
||||
newStationIdArr.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
const dom = document.getElementById('navigation-splitpanes')
|
||||
if (dom) {
|
||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
||||
}
|
||||
if (VITE_FLAG) {
|
||||
getYwZtSubstation({ orgId: '' }).then(res => {
|
||||
powerStationList.value=res.data
|
||||
})
|
||||
} else {
|
||||
setDown()
|
||||
}
|
||||
})
|
||||
area()
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user