|
@@ -39,10 +39,15 @@ const props = defineProps({
|
|
|
type: Boolean,
|
|
|
default: false,
|
|
|
},
|
|
|
+ uploadAnniu: {
|
|
|
+ //cid中是否点击了上传按钮
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ },
|
|
|
});
|
|
|
|
|
|
const clickRow = ref(props.clickRowDatas);
|
|
|
-let tagList = ref(null); //左侧更改的设备列表
|
|
|
+let tagList = ref(props.iedRelation?Object.values(props.iedRelation)[0]:''); //左侧更改的设备列表
|
|
|
|
|
|
//CID数据,点击差异的每一条数据
|
|
|
const CodeInfoCid = ref(props.clickCodeInfoCid);
|
|
@@ -60,6 +65,14 @@ watch(
|
|
|
}
|
|
|
}
|
|
|
);
|
|
|
+//点击了上传按钮并点击了确认清空线条
|
|
|
+watch(
|
|
|
+ () => props.uploadAnniu,
|
|
|
+ () => {
|
|
|
+ clickLineResult();
|
|
|
+ clickLineResultMain();
|
|
|
+ }
|
|
|
+);
|
|
|
//对比文件:头部对比的单个数据
|
|
|
watch(
|
|
|
() => props.clickRowDatas,
|
|
@@ -76,6 +89,7 @@ watch(
|
|
|
if (newValue) {
|
|
|
dones();
|
|
|
tagList.value = newValue;
|
|
|
+ console.log(' tagList.value3333', tagList.value)
|
|
|
clickLineResult();
|
|
|
clickLineResultMain();
|
|
|
if (clickRow.value && clickRow.value.id) {
|
|
@@ -101,15 +115,14 @@ const cClickCode = ref(props.clickCodeValue); //点击侧边栏差异项的code
|
|
|
watch(
|
|
|
() => props.clickCodeValue,
|
|
|
(newValue) => {
|
|
|
+ cClickCode.value = newValue;
|
|
|
if (newValue) {
|
|
|
- console.log('newValue', newValue)
|
|
|
isDiffdescUpAdd.value = false; //点击侧边栏的时候站控层的这个先置为空
|
|
|
isDiffdescUpDel.value = false;
|
|
|
- cClickCode.value = newValue;
|
|
|
CodeImg(newValue); //找到差异项对应的图片进行展示
|
|
|
clickLineResult(); //重置
|
|
|
clickLineResultMain(); //重置
|
|
|
- if (clickRow.value && clickRow.value.id) {
|
|
|
+ if (clickRow.value && clickRow.value.id && newValue) {
|
|
|
getData();
|
|
|
} else if (CodeInfoCid.value) {
|
|
|
getDataCid();
|
|
@@ -163,7 +176,7 @@ const getData = async () => {
|
|
|
comptype: "u",
|
|
|
itemcode: cClickCode.value,
|
|
|
});
|
|
|
- if (!res||!res.data || !res.data.length) return (loading.value = false);
|
|
|
+ if (!res || !res.data || !res.data.length) return (loading.value = false);
|
|
|
if (res.data && cClickCode.value != "scd.ied") {
|
|
|
res.data.forEach((item) => {
|
|
|
let text;
|
|
@@ -180,7 +193,7 @@ const getData = async () => {
|
|
|
});
|
|
|
};
|
|
|
const getDataCid = () => {
|
|
|
- dones()
|
|
|
+ dones();
|
|
|
const cidsnode = CodeInfoCid.value.childItemCid;
|
|
|
if (cClickCode.value == "scd.ied" && cidsnode && cidsnode.length > 0) {
|
|
|
//装置基本信息
|
|
@@ -188,7 +201,7 @@ const getDataCid = () => {
|
|
|
} else if (cClickCode.value != "scd.ied" && cidsnode && cidsnode.length > 0) {
|
|
|
//除开装置信息
|
|
|
mapList.value = cidsnode;
|
|
|
- if(!mapList.value) return;
|
|
|
+ if (!mapList.value) return;
|
|
|
mapList.value.forEach((item) => {
|
|
|
commonGetData(item);
|
|
|
});
|
|
@@ -397,7 +410,7 @@ const clickUpTypeImgUpAdd = (arr, event) => {
|
|
|
}
|
|
|
//新增 的数据
|
|
|
let itemsToAdd = [];
|
|
|
- if(! CommunicationS1.value) return;
|
|
|
+ if (!CommunicationS1.value) return;
|
|
|
CommunicationS1.value.forEach((item) => {
|
|
|
if (item.nnerTextRight == "空") {
|
|
|
itemsToAdd.push({ ...item, add: true });
|
|
@@ -448,7 +461,7 @@ const clickUpTypeImg = (arr, event) => {
|
|
|
) {
|
|
|
if (typeof arr[0][key] === "object") {
|
|
|
// 如果当前属性的值是另一个对象,则进一步检查
|
|
|
- if(!arr[0][key]) return;
|
|
|
+ if (!arr[0][key]) return;
|
|
|
for (let subKey in arr[0][key]) {
|
|
|
//遍历当前对象的所有子属性。
|
|
|
// 检查子属性是否存在于两个输入对象中,并且它们的值是否不同。
|
|
@@ -907,10 +920,7 @@ watch(
|
|
|
//连线===
|
|
|
onMounted(() => {
|
|
|
CodeImg(props.clickCodeValue);
|
|
|
- if (props.iedRelation) {
|
|
|
- tagList.value = Object.values(props.iedRelation)[0];
|
|
|
- }
|
|
|
- if (clickRow.value && clickRow.value.id&&!props.isCid) {
|
|
|
+ if (clickRow.value && clickRow.value.id && !props.isCid) {
|
|
|
getData();
|
|
|
}
|
|
|
});
|
|
@@ -952,14 +962,19 @@ onMounted(() => {
|
|
|
:id="item.diff_object_name.replace(/[^\w\s]/g, '')"
|
|
|
>
|
|
|
<div class="item-img">
|
|
|
- <img :src="codeImg" alt="" class="type-img" @click="
|
|
|
- clickUpTypeImgLeft(
|
|
|
- item.diff_desc,
|
|
|
- $event,
|
|
|
- item.diff_object_name,
|
|
|
- item
|
|
|
- )
|
|
|
- "/>
|
|
|
+ <img
|
|
|
+ :src="codeImg"
|
|
|
+ alt=""
|
|
|
+ class="type-img"
|
|
|
+ @click="
|
|
|
+ clickUpTypeImgLeft(
|
|
|
+ item.diff_desc,
|
|
|
+ $event,
|
|
|
+ item.diff_object_name,
|
|
|
+ item
|
|
|
+ )
|
|
|
+ "
|
|
|
+ />
|
|
|
<img loading="lazy" :src="modify0" alt="" class="type-img-mini" />
|
|
|
</div>
|
|
|
<div class="wraps">{{ item.diff_object_name }}</div>
|
|
@@ -972,8 +987,8 @@ onMounted(() => {
|
|
|
id="leftBasic"
|
|
|
>
|
|
|
<div class="item-img">
|
|
|
- <img loading="lazy" :src="codeImg" alt="" class="type-img" />
|
|
|
- <img loading="lazy" :src="modify0" alt="" class="type-img-mini" />
|
|
|
+ <img loading="lazy" :src="codeImg" alt="" class="type-img" />
|
|
|
+ <img loading="lazy" :src="modify0" alt="" class="type-img-mini" />
|
|
|
</div>
|
|
|
<div class="wraps">基本信息</div>
|
|
|
</div>
|
|
@@ -987,7 +1002,13 @@ onMounted(() => {
|
|
|
:ref="(el) => setdomLeftMain(el, item.diff_object_name)"
|
|
|
>
|
|
|
<div class="item-img">
|
|
|
- <img loading="lazy" :src="codeImg" alt="" class="type-img" @click="clickTypeImg(item, $event)"/>
|
|
|
+ <img
|
|
|
+ loading="lazy"
|
|
|
+ :src="codeImg"
|
|
|
+ alt=""
|
|
|
+ class="type-img"
|
|
|
+ @click="clickTypeImg(item, $event)"
|
|
|
+ />
|
|
|
<img loading="lazy" :src="newly0" alt="" class="type-img-mini" />
|
|
|
</div>
|
|
|
<div class="wraps">{{ item.diff_object_name }}</div>
|
|
@@ -1035,19 +1056,23 @@ onMounted(() => {
|
|
|
v-for="(item, index) in dataU"
|
|
|
:key="index"
|
|
|
class="left-item-cont"
|
|
|
-
|
|
|
:id="item.diff_object_name.replace(/[^\w\s]/g, '')"
|
|
|
:ref="(el) => setdomRightMain(el, item.diff_object_name)"
|
|
|
>
|
|
|
<div class="item-img">
|
|
|
- <img :src="codeImg" alt="" class="type-img" @click="
|
|
|
- clickUpTypeImgRight(
|
|
|
- item.diff_desc,
|
|
|
- $event,
|
|
|
- item.diff_object_name,
|
|
|
- item
|
|
|
- )
|
|
|
- "/>
|
|
|
+ <img
|
|
|
+ :src="codeImg"
|
|
|
+ alt=""
|
|
|
+ class="type-img"
|
|
|
+ @click="
|
|
|
+ clickUpTypeImgRight(
|
|
|
+ item.diff_desc,
|
|
|
+ $event,
|
|
|
+ item.diff_object_name,
|
|
|
+ item
|
|
|
+ )
|
|
|
+ "
|
|
|
+ />
|
|
|
<img loading="lazy" :src="modify0" alt="" class="type-img-mini" />
|
|
|
</div>
|
|
|
<div class="wraps">{{ item.diff_object_name }}</div>
|
|
@@ -1075,7 +1100,13 @@ onMounted(() => {
|
|
|
:ref="(el) => setdomRightMain(el, item.diff_object_name)"
|
|
|
>
|
|
|
<div class="item-img">
|
|
|
- <img loading="lazy" :src="codeImg" alt="" class="type-img" @click="clickTypeImgDel(item, $event)" />
|
|
|
+ <img
|
|
|
+ loading="lazy"
|
|
|
+ :src="codeImg"
|
|
|
+ alt=""
|
|
|
+ class="type-img"
|
|
|
+ @click="clickTypeImgDel(item, $event)"
|
|
|
+ />
|
|
|
<img loading="lazy" :src="del0" alt="" class="type-img-mini" />
|
|
|
</div>
|
|
|
<div class="wraps">{{ item.diff_object_name }}</div>
|
|
@@ -1499,8 +1530,9 @@ onMounted(() => {
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
margin-bottom: 45px;
|
|
|
- width: 141px;
|
|
|
+ width: 120px;
|
|
|
height: 23px;
|
|
|
+ word-wrap: break-word;
|
|
|
}
|
|
|
.right-difference {
|
|
|
position: absolute;
|