|
@@ -129,8 +129,9 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div v-if="successScd">
|
|
<div v-if="successScd">
|
|
- <el-button style="width: 200px;height: 30px;" @click="backMent">返回</el-button>
|
|
|
|
- <el-button style="width: 200px;height: 30px;" type="primary" @click="iedSave">保存</el-button>
|
|
|
|
|
|
+ <el-button style="width: 100px;height: 30px;" @click="backMent">返回</el-button>
|
|
|
|
+ <el-button style="width: 100px;height: 30px;" @click="aginParseArea">重新解析</el-button>
|
|
|
|
+ <el-button style="width: 100px;height: 30px;" type="primary" @click="iedSave">保存</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 模态框组件 -->
|
|
<!-- 模态框组件 -->
|
|
@@ -290,18 +291,7 @@ export default {
|
|
loadScdId.value = res.data.scd_id
|
|
loadScdId.value = res.data.scd_id
|
|
scdName.value = res.data.scd_info.scd_name
|
|
scdName.value = res.data.scd_info.scd_name
|
|
successScd.value = true
|
|
successScd.value = true
|
|
- scd.getLoadScd({ scd_id: res.data.scd_id * 1 }).then(res => {
|
|
|
|
- if (res.code == 0) {
|
|
|
|
- successScd.value = true
|
|
|
|
- anyData.value = res.data.map(item => {
|
|
|
|
- //获取可能有问题的ied数量,比如没找到的装置
|
|
|
|
- let alertieds= item.ieds==null ? [] : item.ieds.filter((r)=>{
|
|
|
|
- return r.attr_desc==null || r.attr_desc=='';
|
|
|
|
- })
|
|
|
|
- return { ...item, isLog: alertieds.length>0 ? true : false,filterLength:alertieds.length }; // 使用展开运算符为每个对象添加一个名为 isLog 的新属性,并设置其值为 true
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ loadAreaInfo(res.data.scd_id * 1)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
@@ -311,6 +301,23 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ function loadAreaInfo(scdid){
|
|
|
|
+ mx.value=[]
|
|
|
|
+ iedLoading.value = true
|
|
|
|
+ scd.getLoadScd({ scd_id: scdid}).then(res => {
|
|
|
|
+ iedLoading.value = false
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ successScd.value = true
|
|
|
|
+ anyData.value = res.data.map(item => {
|
|
|
|
+ //获取可能有问题的ied数量,比如没找到的装置
|
|
|
|
+ let alertieds= item.ieds==null ? [] : item.ieds.filter((r)=>{
|
|
|
|
+ return r.attr_desc==null || r.attr_desc=='';
|
|
|
|
+ })
|
|
|
|
+ return { ...item, isLog: alertieds.length>0 ? true : false,filterLength:alertieds.length }; // 使用展开运算符为每个对象添加一个名为 isLog 的新属性,并设置其值为 true
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
function searchAllFlash() {
|
|
function searchAllFlash() {
|
|
flashPower.getAllArea({}).then(res => {
|
|
flashPower.getAllArea({}).then(res => {
|
|
flashPower.getAllFlashPower({ pid: res.data[0].pid }).then(res => {
|
|
flashPower.getAllFlashPower({ pid: res.data[0].pid }).then(res => {
|
|
@@ -394,24 +401,7 @@ export default {
|
|
})
|
|
})
|
|
saveLoading.value = false
|
|
saveLoading.value = false
|
|
// emit("createBack", 0)
|
|
// emit("createBack", 0)
|
|
- scd.getLoadScd({ scd_id: loadScdId.value - 0 }).then(res => {
|
|
|
|
- if (res.code == 0) {
|
|
|
|
- successScd.value = true
|
|
|
|
- anyData.value = res.data.map(item => {
|
|
|
|
- //获取可能有问题的ied数量,比如没找到的装置
|
|
|
|
- let alertieds= item.ieds==null ? [] : item.ieds.filter((r)=>{
|
|
|
|
- return r.attr_desc==null || r.attr_desc=='';
|
|
|
|
- })
|
|
|
|
- return { ...item, isLog: alertieds.length>0 ? true : false,filterLength: alertieds.length}; // 使用展开运算符为每个对象添加一个名为 isLog 的新属性,并设置其值为 true
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- ElMessage({
|
|
|
|
- message: res.msg,
|
|
|
|
- type: "error"
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ loadAreaInfo(loadScdId.value * 1)
|
|
} else {
|
|
} else {
|
|
ElMessage({
|
|
ElMessage({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -483,6 +473,32 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ function aginParseArea(){
|
|
|
|
+ ElMessageBox.confirm('将清除原来的间隔数据,确定吗?', '间隔解析').then(() => {
|
|
|
|
+ scd.aginParseArea({scd_id:loadScdId.value*1}).then(res=>{
|
|
|
|
+ if(res.code==0){
|
|
|
|
+ ElMessage({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "间隔解析成功!",
|
|
|
|
+ duration: 1500,
|
|
|
|
+ })
|
|
|
|
+ loadAreaInfo(loadScdId.value * 1)
|
|
|
|
+ }else{
|
|
|
|
+ ElMessage({
|
|
|
|
+ type: "error",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ duration: 3000,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }).catch(res=>{
|
|
|
|
+ ElMessage({
|
|
|
|
+ type: "error",
|
|
|
|
+ message: "服务器发生异常!",
|
|
|
|
+ duration: 3000,
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }).catch(() => { })
|
|
|
|
+ }
|
|
function iedSave() {
|
|
function iedSave() {
|
|
scd.stickIed({ scd_id: loadScdId.value - 0, area_id: loadAreaId.value - 0, ied_ids: iedName.value }).then(res => {
|
|
scd.stickIed({ scd_id: loadScdId.value - 0, area_id: loadAreaId.value - 0, ied_ids: iedName.value }).then(res => {
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
@@ -491,7 +507,7 @@ export default {
|
|
message: "间隔装置设置保存成功!",
|
|
message: "间隔装置设置保存成功!",
|
|
duration: 1500,
|
|
duration: 1500,
|
|
})
|
|
})
|
|
- // emit("createBack", 0)
|
|
|
|
|
|
+ loadAreaInfo(loadScdId.value*1)
|
|
} else {
|
|
} else {
|
|
ElMessage({
|
|
ElMessage({
|
|
type: "error",
|
|
type: "error",
|
|
@@ -630,6 +646,7 @@ export default {
|
|
resetForm,
|
|
resetForm,
|
|
flashLevel,
|
|
flashLevel,
|
|
tagClick,//tag标签的点击事件
|
|
tagClick,//tag标签的点击事件
|
|
|
|
+ aginParseArea,
|
|
editAndAdd,
|
|
editAndAdd,
|
|
textIs,
|
|
textIs,
|
|
saveLoading,
|
|
saveLoading,
|