Преглед на файлове

查询关联工程用途部位树加参数

duy преди 2 години
родител
ревизия
3c488b7553
променени са 2 файла, в които са добавени 18 реда и са изтрити 5 реда
  1. 6 1
      src/views/tentative/detect/components/ListItem.vue
  2. 12 4
      src/views/tentative/detect/test-form.vue

+ 6 - 1
src/views/tentative/detect/components/ListItem.vue

@@ -175,6 +175,10 @@ const props = defineProps({
     deviceUseIds:{
         type: String,
         default: () => ('')
+    },
+    checkTableId:{
+        type: String,
+        default: () => ('')
     }
 })
 
@@ -250,6 +254,7 @@ const CollapseChange = async (name) => {
         getOffsetTop(name)
         const index = names[1]
         const item = listDatas.value[index]
+          emit('upcheckTableId', item.id)
         formKeyIds.value = getValString(item.pKeyId)
         if (!item.isTableFormRender) {
             //获取已填写的数据
@@ -891,7 +896,7 @@ const specialNodeClick = async () => {
 }
 
 //事件
-const emit = defineEmits(['renew','offsetTop','updeviceUseIds'])
+const emit = defineEmits(['renew','offsetTop','updeviceUseIds','upcheckTableId'])
 
 //被点击
 const getOffsetTop = (key = '') => {

+ 12 - 4
src/views/tentative/detect/test-form.vue

@@ -12,7 +12,7 @@
                 </el-button>
             </template>
             <template #extra>
-                <el-button type="primary" hc-btn @click="linksRelateModalClick">关联工程用途及部位</el-button>
+                <el-button type="primary" hc-btn @click="linksRelateModalClick" :disabled="!checkTabId">关联工程用途及部位</el-button>
                 <el-button :type="isMixRatioTestIds ? 'primary' : ''" hc-btn :disabled="!isMixRatioTestIds" @click="linksRawModalClick">关联原材检测报告</el-button>
                 <el-button type="primary" hc-btn @click="linksSampleModalClick">关联取样</el-button>
             </template>
@@ -45,6 +45,7 @@
                 <ListItem ref="ListItemRef" :datas="listItemData" :status="1" :baseData="listItemBaseData" @offsetTop="ListItemOffsetTop" @renew="getTableDataAll" 
                 :deviceUseIds="listDeviceUseIds"
                  @updeviceUseIds="updeviceUseIds"
+                 @upcheckTableId="upcheckTableId"
                 />
             </el-scrollbar>
             <template #action>
@@ -143,6 +144,7 @@ import {getArrValue, getObjValue, getObjNullValue} from "vue-utils-plus";
 import {getDictionary} from "~api/other";
 import {rowsToId} from "~uti/tools";
 import dayjs from "dayjs"
+import { Loading } from "element-plus/es/components/loading/src/service";
 
 
 //变量
@@ -260,7 +262,10 @@ const ListItemOffsetTop = (offsetTop) => {
         ListItemScrollRef.value?.setScrollTop(offsetTop)
     }
 }
-
+const checkTabId=ref('')
+const upcheckTableId = (val) => {
+    checkTabId.value=val
+}
 //关联工程用途及部位 树
 const linksRelateModal = ref(false)
 const linksRelateModalClick = () => {
@@ -268,6 +273,7 @@ const linksRelateModalClick = () => {
     linksRelateSearchTreeVal.value=''
     getContractInfoTreeApi()
 }
+
 //获取导入树
 const unmatchedTreeData = ref([])
 const defaultCheckarrIds=ref([])
@@ -275,7 +281,8 @@ const getContractInfoTreeApi = async () => {
     const {error, code, data} = await divisionApi.getengineerInfoTree1({
         projectId: projectId.value,
         contractId: contractId.value,
-        wbsId: projectInfo?.value.referenceWbsTemplateId
+        wbsId: projectInfo?.value.referenceWbsTemplateId,
+        selfId:checkTabId.value
     })
     //判断状态
     if (!error && code === 200) {
@@ -485,7 +492,7 @@ const tableFormSaveClick = async () => {
         if (!error && code === 200) {
             window?.$message?.success('保存成功')
             listItemBaseData.value.deviceUseIds=''
-            
+            checkTabId.value=''
             //bussPdfsClick()
             getTableDataAll()
         }
@@ -567,6 +574,7 @@ const toBackClick = () => {
 const updeviceUseIds = (val) => {
     listItemBaseData.value.deviceUseIds=val
 }
+
 </script>
 
 <style lang="scss" scoped>