|
@@ -35,7 +35,7 @@
|
|
|
<el-button color="#FF986A" size="small" class="text-white">添加到元素库</el-button>
|
|
|
<el-button color="#2550A2" size="small" class="text-white">关联WBS并创建元素</el-button>
|
|
|
</template>
|
|
|
- <hc-table ref="tabRef" :column="tableColumn" :datas="tableData" :index-style="{ width: 60 }">
|
|
|
+ <hc-table ref="tabRef" :column="tableColumn" :datas="tableData" :index-style="{ width: 60 }" @row-click="tableRowClick">
|
|
|
<template #textInfo="{ row }">
|
|
|
<hc-table-input v-model="row.textInfo" />
|
|
|
</template>
|
|
@@ -192,7 +192,7 @@ const excelClick = async (item) => {
|
|
|
const arr = tableData.value
|
|
|
let key = item.target.getAttribute('data-index')
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
- let xys = arr[i].xys.split(',')
|
|
|
+ let xys = isNullES(arr[i].xys) ? [] : arr[i].xys.split(',')
|
|
|
if (xys.indexOf(key) > -1) {
|
|
|
tabRef.value?.tableRef?.setCurrentRow(arr[i])
|
|
|
await tableScrollToRow(i)
|
|
@@ -208,6 +208,12 @@ const tableScrollToRow = async (index) => {
|
|
|
tabRef.value?.tableRef?.setScrollTop(row.offsetTop)
|
|
|
}
|
|
|
|
|
|
+//表格的某一行被点击
|
|
|
+const tableRowClick = ({ row }) => {
|
|
|
+ let xys = isNullES(row.xys) ? [] : row.xys.split(',')
|
|
|
+ excelRef.value?.setSelect(xys)
|
|
|
+}
|
|
|
+
|
|
|
//保存元素表格
|
|
|
const saveRowClick = (row) => {
|
|
|
|