|
@@ -72,12 +72,13 @@ export default {
|
|
|
let intE = ref("")
|
|
|
const datatypes = ref(null);//判断点击的是第一层还是第二层的电压
|
|
|
watch(() => props.selectIndex, (newVal) => {
|
|
|
- result.value = newVal
|
|
|
+ result.value = newVal;
|
|
|
+ datatypes.value = null;
|
|
|
searchFlashLel()
|
|
|
})
|
|
|
watch(() => props.moduleIndex, (newVal) => {
|
|
|
size.value = newVal;
|
|
|
- handleModelNodeClick(datatypes.value)
|
|
|
+ commonClick(datatypes.value)
|
|
|
// litLine.getAllm({ pageno: index.value, pagesize: size.value, vol_id: intE.value ? intE.value - 0 : "" }).then(res => {
|
|
|
// if (res.code == 0) {
|
|
|
// loading.value = true
|
|
@@ -95,8 +96,7 @@ export default {
|
|
|
})
|
|
|
watch(() => props.moduleSize, (newVal) => {
|
|
|
index.value = newVal;
|
|
|
- console.log('index.value', )
|
|
|
- handleModelNodeClick(datatypes.value)
|
|
|
+ commonClick(datatypes.value)
|
|
|
// litLine.getAllm({ pageno: index.value, pagesize: size.value, vol_id: intE.value ? intE.value - 0 : "" }).then(res => {
|
|
|
// if (res.code == 0) {
|
|
|
// loading.value = true
|
|
@@ -111,13 +111,11 @@ export default {
|
|
|
// })
|
|
|
// }
|
|
|
// })
|
|
|
-
|
|
|
-
|
|
|
})
|
|
|
function searchLine() {
|
|
|
if (props.moduleIndex && props.moduleSize) {
|
|
|
size.value = props.moduleSize;
|
|
|
- index.value = props.moduleIndex
|
|
|
+ index.value = props.moduleIndex;
|
|
|
} else {
|
|
|
size.value = 10
|
|
|
index.value = 1
|
|
@@ -130,7 +128,7 @@ export default {
|
|
|
if (props.selectIndex == 1) {
|
|
|
vif.value = false
|
|
|
// 获取每个电压等级下的接线方式
|
|
|
- litLine.getAllLine({ pageno: 1, pagesize: 10 }).then(res2 => {
|
|
|
+ litLine.getAllLine({ pageno: 1, pagesize: 10000 }).then(res2 => {
|
|
|
for (let i = 0; i < res2.data.length; i++) {
|
|
|
const vol_level_id = res2.data[i].vol_level_id
|
|
|
res.data.filter((item) => {
|
|
@@ -149,7 +147,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
function handleNodeClick(e) {
|
|
|
- console.log('333333333', 333333333)
|
|
|
+ console.log('ewerwrwr', 999999)
|
|
|
litLine.getAllLine({ pageno: 1, pagesize: 10, vol_id: e.id?e.id - 0:null }).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
loading.value = true
|
|
@@ -165,14 +163,11 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- function handleModelNodeClick(e) {
|
|
|
- console.log('e.datatype=========', e.datatype)
|
|
|
- datatypes.value = e;
|
|
|
- // 模型管理
|
|
|
- if (e.datatype === 'linkstyle') {
|
|
|
- console.log('44444444', 44444444)
|
|
|
+ function commonClick(e){
|
|
|
+ console.log('eeeeeeeeee', e)
|
|
|
+ if (e&&e.datatype === 'linkstyle') {
|
|
|
// 接线方式
|
|
|
- litLine.getAllm({ pageno: index.value, pagesize:size.value , line_link_style: e.id }).then(res => {
|
|
|
+ litLine.getAllm({ pageno: index.value, pagesize:size.value, line_link_style: e.id }).then(res => {
|
|
|
|
|
|
if (res.code == 0) {
|
|
|
loading.value = true
|
|
@@ -187,15 +182,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
- console.log('55555', 55555)
|
|
|
// 电压等级
|
|
|
- intE.value = e.id
|
|
|
- litLine.getAllm({ pageno: index.value, pagesize: size.value, vol_id: intE.value - 0 }).then(res => {
|
|
|
+ intE.value = e?e.id*1:null;
|
|
|
+ litLine.getAllm({ pageno: index.value, pagesize: size.value, vol_id: intE.value }).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
loading.value = true
|
|
|
counts.value = res.count
|
|
|
emit("lineBack", loading.value)
|
|
|
- emit("volBack", res.data, e.id, counts.value)
|
|
|
+ emit("volBack", res.data, intE.value, counts.value)
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
message: res.msg,
|
|
@@ -205,6 +199,11 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+ function handleModelNodeClick(e) {
|
|
|
+ datatypes.value = e;
|
|
|
+ // 模型管理
|
|
|
+ commonClick(e)
|
|
|
+ }
|
|
|
function pClick(row, num) {
|
|
|
selectIndex.value = num
|
|
|
litLine.getAllLine({ pageno: 1, pagesize: 10, vol_id: row.id - 0 }).then(res => {
|
|
@@ -236,6 +235,7 @@ export default {
|
|
|
size,
|
|
|
index,
|
|
|
intE,
|
|
|
+ commonClick
|
|
|
}
|
|
|
},
|
|
|
components: {
|