This commit is contained in:
sjl
2025-01-16 14:24:55 +08:00
parent 891c6d8e93
commit 55ae64b3e1
8 changed files with 113 additions and 32 deletions

View File

@@ -142,21 +142,21 @@
</el-dropdown>
</div> -->
<el-button
<!-- <el-button
type='primary'
link
:icon='Download'
@click="openDrawer('报告下载', scope.row)"
v-if='form.activeTabs === 3 && form.activeChildTabs === 0 && scope.row.reportState === 1'
>报告下载
</el-button>
</el-button> -->
<el-button
type='primary'
link
:icon='Postcard'
@click="openDrawer('报告生成', scope.row)"
v-if='form.activeTabs === 3 && scope.row.reportState !== 1'
v-if='form.activeTabs === 3 '
>报告生成
</el-button>
<!-- <el-button
@@ -477,6 +477,7 @@ const getTableList = async (params: any) => {
} else {
checkStateList.value = checkStateTable.value
}
console.log('tablegetBoundPqDevList')
return getBoundPqDevList({
'planId': props.id,
'checkStateList': checkStateList.value,
@@ -659,10 +660,12 @@ const handleSelectionChange = (selection: any[]) => {
//查询
const handleSearch = () => {
console.log('handleSearchgetBoundPqDevList')
proTable.value?.getTableList()
}
//重置
const handleRefresh = () => {
console.log('handleRefreshgetBoundPqDevList')
form.value.search = null
form.value.checkStatus = null
form.value.checkResult = null
@@ -772,7 +775,11 @@ function tableHeaderInit(val: number) {
break
}
//console.log("test",columns);
handleRefresh()
form.value.search = null
form.value.checkStatus = null
form.value.checkResult = null
form.value.checkReportStatus = null
//handleRefresh()
}
function refreshStatusList() {
@@ -980,7 +987,7 @@ const handleTest = async (val: string) => {
const data = reactive({
socketServe: socketClient.Instance,
});
const url = 'ws://localhost:7777/hello?name=cdf';
const url = 'ws://192.168.1.127:7777/hello?name=cdf';
socketClient.Instance.connect(url);
data.socketServe = socketClient.Instance;
data.socketServe.registerCallBack('aaa', (res: { code: number; }) => {
@@ -1034,6 +1041,8 @@ const handleTest = async (val: string) => {
ElMessage.success('归档成功!')
}
})
emit('batchGenerateClicked') // 触发事件
}

View File

@@ -56,6 +56,7 @@ const searchForm = ref({
})
const defaultChecked = ref<string[]>([]) // 明确类型为 number[]
const getTreeData = (val: any) => {
defaultChecked.value = []
data.value = val
if (data.value.length > 0 && data.value[0].children.length > 0) {
@@ -76,6 +77,30 @@ const getTreeData = (val: any) => {
}
//点击表格后左侧树刷新,高亮显示对应节点
const clickTableToTree = (val: any,id:any) => {
defaultChecked.value = []
data.value = val
let node = ref('')
if (data.value.length > 0) {
for (let i = 0; i < data.value.length; i++){
for (let j = 0; j < data.value[i].children.length; j++) {
if (data.value[i].children[j].id == id) {
node.value = data.value[i].children[j].id
break;
}
}
}
// 使用 nextTick 确保在 DOM 更新后调用 setCurrentKey
nextTick(() => {
treeRef.value?.setCurrentKey(node.value);
idd.value = node.value
});
}
}
const {updateSelectedTreeNode} = defineProps<{
updateSelectedTreeNode:Function;
}>();
@@ -123,7 +148,7 @@ const detail = () => {
onMounted(() => {
// console.log()
})
defineExpose({ getTreeData })
defineExpose({ getTreeData ,clickTableToTree})
</script>