|
|
@ -15,31 +15,10 @@ export default { |
|
|
|
return { |
|
|
|
dictMapData: {}, |
|
|
|
xcTreeData: [], |
|
|
|
tableData: [ |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, // 1对应堤顶 |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
{ content: "", photos: "", isNormal: "", problems: "" }, |
|
|
|
], |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 树转换 |
|
|
|
transformArr(treeList) { |
|
|
|
// 递归获取广度 |
|
|
|
function getW(item, w = 0) { |
|
|
@ -65,51 +44,16 @@ export default { |
|
|
|
return treeList; |
|
|
|
}, |
|
|
|
|
|
|
|
handleSpanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
|
if (columnIndex === 0) { |
|
|
|
if ( |
|
|
|
rowIndex < 4 || |
|
|
|
(rowIndex > 4 && rowIndex < 9) || |
|
|
|
(rowIndex > 8 && rowIndex < 11) || |
|
|
|
(rowIndex > 10 && rowIndex < 13) || |
|
|
|
(rowIndex > 12 && rowIndex < 18) |
|
|
|
) { |
|
|
|
if ( |
|
|
|
rowIndex === 0 || |
|
|
|
rowIndex === 5 || |
|
|
|
rowIndex === 9 || |
|
|
|
rowIndex === 11 || |
|
|
|
rowIndex === 13 |
|
|
|
) { |
|
|
|
return { |
|
|
|
rowspan: [4, 4, 2, 2, 5][[0, 5, 9, 11, 13].indexOf(rowIndex)], |
|
|
|
colspan: 1, |
|
|
|
}; |
|
|
|
} else { |
|
|
|
return { |
|
|
|
rowspan: 0, |
|
|
|
colspan: 0, |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
getDetailsData() { |
|
|
|
getDikePatrolDetails(this.$route.query.id).then((res) => { |
|
|
|
console.log("getDikePatrolDetails >>>>> ", res); |
|
|
|
if (res.data?.items) { |
|
|
|
this.tableData[0].photos = res.data.items[0]?.imgs || "无"; |
|
|
|
this.tableData[0].content = res.data.items[0]?.content || ""; |
|
|
|
this.tableData[0].problems = res.data.items[0]?.problem || "无"; |
|
|
|
this.tableData[0].isNormal = res.data.items[0]?.status ? "是" : "否"; |
|
|
|
} |
|
|
|
console.log("详情 >>>>> ", res); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
getCheckingDictTree("df_xs_c_classfy").then((res) => { |
|
|
|
this.xcTreeData = this.transformArr(res?.data); |
|
|
|
console.log("this.xcTreeData >>>>> ", this.xcTreeData); |
|
|
|
}); |
|
|
|
getDictMapData("df_xs_c_classfy").then((res) => { |
|
|
|
this.dictMapData = res?.data || {}; |
|
|
@ -248,19 +192,19 @@ export default { |
|
|
|
.masking { |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
|
width: 800px; |
|
|
|
width: 70%; |
|
|
|
height: 100%; |
|
|
|
right: 0; |
|
|
|
z-index: 10; |
|
|
|
background-color: #fff; |
|
|
|
transition: left 0.5s ease-in-out; |
|
|
|
box-shadow: -8px 0px 38px 0px rgba(0, 0, 0, 0.6); |
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
.close-btn { |
|
|
|
width: 32px; |
|
|
|
height: 32px; |
|
|
|
position: absolute; |
|
|
|
top: 48px; |
|
|
|
top: 32px; |
|
|
|
left: -16px; |
|
|
|
background-color: #fff; |
|
|
|
border: 1px solid #dcdcdc; |
|
|
@ -277,14 +221,16 @@ export default { |
|
|
|
|
|
|
|
.drawer-title { |
|
|
|
width: 100%; |
|
|
|
height: 64px; |
|
|
|
line-height: 64px; |
|
|
|
height: 48px; |
|
|
|
line-height: 48px; |
|
|
|
padding-left: 16px; |
|
|
|
border-bottom: 1px solid #e7e7e7; |
|
|
|
} |
|
|
|
|
|
|
|
.center-table { |
|
|
|
padding: 16px; |
|
|
|
height: calc(100% - 48px); |
|
|
|
overflow: auto; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|