|
@@ -56,6 +56,8 @@ import {useAppStore} from "~src/store";
|
|
import WbsTree from "../../data-fill/components/WbsTree.vue"
|
|
import WbsTree from "../../data-fill/components/WbsTree.vue"
|
|
import TestTree from "../material/components/TestTree.vue"
|
|
import TestTree from "../material/components/TestTree.vue"
|
|
import {getStoreData, setStoreData} from '~src/utils/storage'
|
|
import {getStoreData, setStoreData} from '~src/utils/storage'
|
|
|
|
+import dataApi from "~api/tentative/laboratory/print"
|
|
|
|
+import {getArrValue, getArrKeyValue, isIdCard, formValidate} from "vue-utils-plus"
|
|
|
|
|
|
//变量
|
|
//变量
|
|
const useAppState = useAppStore()
|
|
const useAppState = useAppStore()
|
|
@@ -89,18 +91,20 @@ const searchForm = ref({
|
|
const primaryKeyId = ref('')
|
|
const primaryKeyId = ref('')
|
|
const nodeItemInfo = ref({})
|
|
const nodeItemInfo = ref({})
|
|
const nodeDataInfo = ref({})
|
|
const nodeDataInfo = ref({})
|
|
-
|
|
|
|
|
|
+const clicID=ref('')
|
|
//树被点击
|
|
//树被点击
|
|
const wbsElTreeClick = ({node, data, keys}) => {
|
|
const wbsElTreeClick = ({node, data, keys}) => {
|
|
nodeItemInfo.value = node
|
|
nodeItemInfo.value = node
|
|
nodeDataInfo.value = data
|
|
nodeDataInfo.value = data
|
|
primaryKeyId.value = data['primaryKeyId'] || ''
|
|
primaryKeyId.value = data['primaryKeyId'] || ''
|
|
|
|
+ clicID.value=data['id']||''
|
|
|
|
+ console.log(data,'dtat');
|
|
//缓存自动展开
|
|
//缓存自动展开
|
|
treeAutoExpandKeys.value = keys
|
|
treeAutoExpandKeys.value = keys
|
|
setStoreData('wbsTreeExpandKeys',keys)
|
|
setStoreData('wbsTreeExpandKeys',keys)
|
|
//改变搜索表单数据
|
|
//改变搜索表单数据
|
|
- //searchForm.value.wbsId = data['contractIdRelation'] ? data['id'] : data['primaryKeyId']
|
|
|
|
- //searchForm.value.contractIdRelation = data['contractIdRelation']
|
|
|
|
|
|
+ searchForm.value.wbsId = projectInfo?.value.referenceWbsTemplateIdTrial
|
|
|
|
+ //searchForm.value.contractIdRelation = data['contractIdRelation'] projectInfo?.referenceWbsTemplateIdTrial
|
|
searchForm.value.current = 1;
|
|
searchForm.value.current = 1;
|
|
getTableData()
|
|
getTableData()
|
|
}
|
|
}
|
|
@@ -122,7 +126,22 @@ const tableColumn = ref([
|
|
const tableLoading = ref(false)
|
|
const tableLoading = ref(false)
|
|
const tableData = ref([])
|
|
const tableData = ref([])
|
|
const getTableData = async () => {
|
|
const getTableData = async () => {
|
|
-
|
|
|
|
|
|
+ tableLoading.value = true
|
|
|
|
+ const { error, code, data } = await dataApi.queryPage({
|
|
|
|
+ projectId: projectId.value,
|
|
|
|
+ parentId:clicID.value,
|
|
|
|
+ // contractId: contractId.value,
|
|
|
|
+ ...searchForm.value,
|
|
|
|
+ })
|
|
|
|
+ //处理数据
|
|
|
|
+ tableLoading.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ tableData.value = getArrValue(data['records'])
|
|
|
|
+ searchForm.value.total = data.total || 0
|
|
|
|
+ } else {
|
|
|
|
+ tableData.value = []
|
|
|
|
+ searchForm.value.total = 0
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//多选
|
|
//多选
|