|
@@ -150,9 +150,17 @@ export default {
|
|
|
model_id: modelIds.value - 0,
|
|
|
ied_type: starts.value.ied_type,
|
|
|
sv_or_goose: gv.value,
|
|
|
- in_or_out: "输出"
|
|
|
+ in_or_out: "输出",
|
|
|
+ ref_ied_type:ends.value.ied_type
|
|
|
}).then(res => {
|
|
|
- if (res.data) {
|
|
|
+ //if ( res.data) {
|
|
|
+ //liling:避免提示空错误提示,res.data为空不代表接口有错误,所以先判断接口code值
|
|
|
+ pastLoading.value = false
|
|
|
+ if ( res.code==0) {
|
|
|
+ if ( res.data==null) {
|
|
|
+ curList.value = [];
|
|
|
+ return;
|
|
|
+ }
|
|
|
let tmpList = [];
|
|
|
//对结果进行重排排序:将已关联到输出装置的端子排在前面
|
|
|
res.data.forEach((item, index) => {
|
|
@@ -164,7 +172,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
curList.value = tmpList
|
|
|
- pastLoading.value = false
|
|
|
+ //pastLoading.value = false
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
message: res.msg,
|
|
@@ -176,10 +184,17 @@ export default {
|
|
|
model_id: modelIds.value - 0,
|
|
|
ied_type: ends.value.ied_type,
|
|
|
sv_or_goose: gv.value,
|
|
|
- in_or_out: "接收"
|
|
|
+ in_or_out: "接收",
|
|
|
+ ref_ied_type:starts.value.ied_type
|
|
|
}).then(res => {
|
|
|
console.log(res.data, '!!!!!');
|
|
|
- if (res.data) {
|
|
|
+ //if ( res.data) {
|
|
|
+ //liling:避免提示空错误提示,res.data为空不代表接口有错误,所以先判断接口code值
|
|
|
+ if ( res.code==0) {
|
|
|
+ if ( res.data==null) {
|
|
|
+ outList.value = [];
|
|
|
+ return;
|
|
|
+ }
|
|
|
//对结果进行重排排序:将已关联到输出装置的端子排在前面
|
|
|
let tmpList = [];
|
|
|
res.data.forEach((item, index) => {
|
|
@@ -200,12 +215,12 @@ export default {
|
|
|
end: item.id
|
|
|
};
|
|
|
let starts = document.getElementById(line.start);
|
|
|
- let ends = document.getElementById(line.end);
|
|
|
+ let ends = document.getElementById(line.end).parentNode;
|
|
|
console.log(starts, ends, '??????');
|
|
|
// 检查 starts 和 ends 是否存在
|
|
|
if (starts && ends) {
|
|
|
leaderLineList.value.push(new LeaderLine(starts, ends, {
|
|
|
- color: "black",
|
|
|
+ color: "#ccc",
|
|
|
size: 2,
|
|
|
path: "straight",
|
|
|
startSocket: "right",
|
|
@@ -228,6 +243,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
curList.value.sort((obj1, obj2) => {
|
|
|
+ if(outList.value[0]==null) return 1;
|
|
|
const nameB = outList.value[0].fcda_name;
|
|
|
if (obj1.fcda_name === nameB) return -1; // 将 name 与数组 b 中第一个对象的 name 属性相等的对象移到数组的第一位
|
|
|
if (obj2.fcda_name === nameB) return 1;
|
|
@@ -587,8 +603,9 @@ export default {
|
|
|
|
|
|
:deep(.el-checkbox) {
|
|
|
width: 300px !important;
|
|
|
- height: 50px !important;
|
|
|
+ height: 42px !important;
|
|
|
margin-right: 0 !important;
|
|
|
+ margin-bottom: 10px !important;
|
|
|
}
|
|
|
|
|
|
:deep(.el-checkbox__label) {
|