|
@@ -83,7 +83,7 @@
|
|
|
</div>
|
|
|
<div class="hc-tree-scrollbar" v-loading="linksRelateTreeLoading" element-loading-text="获取数据中...">
|
|
|
<el-scrollbar>
|
|
|
- 树
|
|
|
+ <DivisionTree :datas="unmatchedTreeData" @nodeTap="divisionTreeClick" @nodeCheck="divisionTreeCheck"/>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -125,7 +125,9 @@ import {ref, watch, onMounted} from "vue";
|
|
|
import {useAppStore} from "~src/store";
|
|
|
import {useRouter, useRoute} from 'vue-router'
|
|
|
import ListItem from "./components/ListItem.vue"
|
|
|
+import DivisionTree from "./components/DivisionTree.vue"
|
|
|
import dataApi from "~api/tentative/detect/test";
|
|
|
+import divisionApi from "~api/data-fill/division";
|
|
|
import {getStoreData} from '~src/utils/storage'
|
|
|
import TestTree from "../material/components/TestTree.vue"
|
|
|
import {getArrValue, getObjValue, getObjNullValue} from "vue-utils-plus";
|
|
@@ -133,6 +135,7 @@ import {getDictionary} from "~api/other";
|
|
|
import {rowsToId} from "~uti/tools";
|
|
|
import dayjs from "dayjs"
|
|
|
|
|
|
+
|
|
|
//变量
|
|
|
const router = useRouter()
|
|
|
const useRoutes = useRoute()
|
|
@@ -253,14 +256,48 @@ const ListItemOffsetTop = (offsetTop) => {
|
|
|
const linksRelateModal = ref(false)
|
|
|
const linksRelateModalClick = () => {
|
|
|
linksRelateModal.value = true
|
|
|
+ getContractInfoTreeApi()
|
|
|
+}
|
|
|
+//获取导入树
|
|
|
+const unmatchedTreeData = ref([])
|
|
|
+const getContractInfoTreeApi = async () => {
|
|
|
+ const {error, code, data} = await divisionApi.getengineerInfoTree({
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ wbsId: projectInfo?.value.referenceWbsTemplateId
|
|
|
+ })
|
|
|
+ //判断状态
|
|
|
+ if (!error && code === 200) {
|
|
|
+ unmatchedTreeData.value = getArrValue(data)
|
|
|
+ } else {
|
|
|
+ unmatchedTreeData.value = []
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//关联树
|
|
|
+const divisionTreeItemInfo = ref({})
|
|
|
+const divisionTreeClick = ({data}) => {
|
|
|
+ divisionTreeItemInfo.value = data
|
|
|
}
|
|
|
+const checkrelationId=ref([])
|
|
|
+const checkrelationString=ref([])
|
|
|
|
|
|
+const divisionTreeCheck = (data) => {
|
|
|
+ console.log(data,'data');
|
|
|
+ checkrelationId.value=data
|
|
|
+}
|
|
|
const linksRelateSearchTreeVal = ref('')
|
|
|
const linksRelateTreeLoading = ref(false)
|
|
|
|
|
|
//确认关联
|
|
|
const linksRelateModalSave = () => {
|
|
|
linksRelateModal.value = false
|
|
|
+ console.log(checkrelationId.value,'checkrelationId.valu');
|
|
|
+ let idarr=[]
|
|
|
+ checkrelationId.value.forEach((item)=>{
|
|
|
+ idarr.push(item.primaryKeyId)
|
|
|
+ })
|
|
|
+ checkrelationString.value=idarr.toString()
|
|
|
}
|
|
|
const linksRelateModalClose = () => {
|
|
|
linksRelateModal.value = false
|
|
@@ -384,6 +421,8 @@ const linksSampleModalClose = () => {
|
|
|
//保存
|
|
|
const tableFormSaveLoading = ref(false)
|
|
|
const tableFormSaveClick = async () => {
|
|
|
+ console.log('保存',listItemBaseData.value);
|
|
|
+ listItemBaseData.value.projectPosition=checkrelationString.value
|
|
|
let FormData = ListItemRef.value?.getFormData()
|
|
|
let FormRegExpJson = ListItemRef.value?.getFormRegExpJson()
|
|
|
//效验数据
|
|
@@ -400,6 +439,7 @@ const tableFormSaveClick = async () => {
|
|
|
if (!error && code === 200) {
|
|
|
window?.$message?.success('保存成功')
|
|
|
listItemBaseData.value.deviceUseIds=''
|
|
|
+ listItemBaseData.value.projectPosition=''
|
|
|
//bussPdfsClick()
|
|
|
getTableDataAll()
|
|
|
}
|