|
@@ -12,6 +12,8 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import {ref, nextTick, watch} from "vue";
|
|
import {ref, nextTick, watch} from "vue";
|
|
|
|
+import archiveFileApi from "~api/archiveFile/archiveFile";
|
|
|
|
+import {getArrValue} from "js-fast-way"
|
|
|
|
|
|
//参数
|
|
//参数
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -38,8 +40,12 @@ const nodeData = ref(props.treeData);
|
|
watch(() => [
|
|
watch(() => [
|
|
props.treeData
|
|
props.treeData
|
|
], ([treeData]) => {
|
|
], ([treeData]) => {
|
|
|
|
+ console.log(treeData,'treeData');
|
|
nodeData.value = treeData;
|
|
nodeData.value = treeData;
|
|
setQueryData(treeData)
|
|
setQueryData(treeData)
|
|
|
|
+},
|
|
|
|
+{
|
|
|
|
+ deep: true
|
|
})
|
|
})
|
|
|
|
|
|
//渲染完成
|
|
//渲染完成
|
|
@@ -49,6 +55,8 @@ nextTick(() => {
|
|
|
|
|
|
//获取相关数据
|
|
//获取相关数据
|
|
const setQueryData = (data) => {
|
|
const setQueryData = (data) => {
|
|
|
|
+ console.log(11111);
|
|
|
|
+ searchForm.value.nodeIds=data.id
|
|
/*const cid = data?.contractIdRelation || ''
|
|
/*const cid = data?.contractIdRelation || ''
|
|
const wbsId = data['contractIdRelation'] ? data['id'] : data['primaryKeyId']
|
|
const wbsId = data['contractIdRelation'] ? data['id'] : data['primaryKeyId']
|
|
if (wbsId) {
|
|
if (wbsId) {
|
|
@@ -65,13 +73,15 @@ const searchForm = ref({
|
|
})
|
|
})
|
|
|
|
|
|
//tab数据和相关处理
|
|
//tab数据和相关处理
|
|
-const tabKey = ref('tab1')
|
|
|
|
|
|
+const tabKey = ref('1')
|
|
const tabData = ref([
|
|
const tabData = ref([
|
|
- {key:'tab1', name: '需要整改的文件'},
|
|
|
|
- {key:'tab2', name: '已整改记录'}
|
|
|
|
|
|
+ {key:'1', name: '需要整改的文件'},
|
|
|
|
+ {key:'2', name: '已整改记录'}
|
|
]);
|
|
]);
|
|
const tabChange = (item) => {
|
|
const tabChange = (item) => {
|
|
tabKey.value = item?.key;
|
|
tabKey.value = item?.key;
|
|
|
|
+ getTableData()
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -86,7 +96,7 @@ const pageChange = ({current, size}) => {
|
|
const tableRef = ref(null)
|
|
const tableRef = ref(null)
|
|
const tableColumn = ref([
|
|
const tableColumn = ref([
|
|
{key:'key1', name: '所属案卷'},
|
|
{key:'key1', name: '所属案卷'},
|
|
- {key:'key2', name: '具体文件'},
|
|
|
|
|
|
+ {key:'fileName', name: '具体文件'},
|
|
{key:'key3', name: '问题描述'}
|
|
{key:'key3', name: '问题描述'}
|
|
])
|
|
])
|
|
const tableData = ref([])
|
|
const tableData = ref([])
|
|
@@ -94,19 +104,26 @@ const tableData = ref([])
|
|
//获取数据
|
|
//获取数据
|
|
const tableLoading = ref(false)
|
|
const tableLoading = ref(false)
|
|
const getTableData = async () => {
|
|
const getTableData = async () => {
|
|
- /*tableInternalLoading.value = true
|
|
|
|
- const {error, code, data} = await internalApi.queryInternalPage({
|
|
|
|
- ...searchInternalForm.value,
|
|
|
|
|
|
+ tableLoading.value = true
|
|
|
|
+ const { error, code, data } = await archiveFileApi.getarchiveFilePage({
|
|
|
|
+ ...searchForm.value,
|
|
|
|
+ nodeIds: nodeData.value.id,
|
|
projectId: projectId.value,
|
|
projectId: projectId.value,
|
|
|
|
+ contractId: contractId.value,
|
|
|
|
+ rectification:tabKey.value
|
|
})
|
|
})
|
|
- //判断状态
|
|
|
|
- tableInternalLoading.value = false
|
|
|
|
|
|
+ tableLoading.value = false
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
- tableInternalData.value = getArrValue(data['records'])
|
|
|
|
- searchInternalForm.value.total = data['total'] || 0
|
|
|
|
|
|
+ tableData.value = getArrValue(data['records'])
|
|
|
|
+ searchForm.value.total = data['total'] || 0
|
|
} else {
|
|
} else {
|
|
- tableInternalData.value = []
|
|
|
|
- searchInternalForm.value.total = 0
|
|
|
|
- }*/
|
|
|
|
|
|
+ tableData.value = []
|
|
|
|
+ searchForm.value.total = 0
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+// 暴露出去
|
|
|
|
+defineExpose({
|
|
|
|
+ getTableData,
|
|
|
|
+
|
|
|
|
+})
|
|
</script>
|
|
</script>
|