duy před 5 měsíci
rodič
revize
16b36cc74a

+ 1 - 1
src/styles/data-fill/division.scss

@@ -7,7 +7,7 @@
     .project-info {
         position: relative;
         margin-bottom: 24px;
-        height: calc(100% - 298px);
+        height: var(--project-info-height);
         // height: calc(100% - 238px);
     }
     .footer-box {

+ 10 - 4
src/views/data-fill/collapse-form/index.vue

@@ -89,7 +89,7 @@
                                 评定汇总
                             </el-link>
                             <el-link
-                                
+                                v-if="isTemplateType"
                                 
                                 type="primary"
                                 @click="autoClick(item)"
@@ -740,8 +740,9 @@ const tree_AutoExpandKeys = ref(props.treeAutoExpandKeys)
 const treenodeDataInfo = ref(props.treenodeDataInfo)
 const newlistdata = ref(props.newlistdata)
 const isEnableBulk = ref(true)
+// const isEnableBulk = ref(false)
 const contractInfo = ref(props.contractInfo)
-
+const isTemplateType = ref(useAppState.contractInfo?.templateType === 2)
 //表单变量
 const formDataList = ref([])
 const formKeyIds = ref('')
@@ -934,8 +935,13 @@ const tableFormItemNode = ref({}) //临时信息
 const setTableFormMenu = (info) => {
     let newArr = [],
     infos = getObjValue(info)
-    const isOpen = infos['isOpenRandomNumber'] ?? 0
-     newArr.push({ label: '设置自动获取数据', key: 'auto' })
+// 从infos对象中获取isOpenRandomNumber属性值,如果该属性不存在则返回0
+// 用于控制是否开启随机数功能的开关
+const isOpen = infos['isOpenRandomNumber'] ?? 0
+    if (isTemplateType.value) {
+        newArr.push({ label: '设置自动获取数据', key: 'auto' })
+    }
+    
     if (isOpen === 1 && isStatus.value !== 3) {
         newArr.push({ label: '插入设计值/频率', key: 'design' })
     }

+ 1 - 1
src/views/data-fill/components/divisionDialog.vue

@@ -222,7 +222,7 @@ const sureClick = async (type) => {
         const { error, code, msg } = await wbsApi.saveContractTreeNode({
             projectId: projectId.value,
             contractId: contractId.value,
-            saveType: 4, //仅当前节点
+            saveType: 4, //节点划分,多对多
             allSelectedList: allSelectedList.value,
             halfSelectedList: halfSelectedList.value,
             currentNodePrimaryKeyId:  leftPid.value,

+ 11 - 5
src/views/data-fill/division.vue

@@ -39,9 +39,10 @@
             <div class="horizontal-drag-line" @mousedown="onmousedown" />
         </div>
         <div class="hc-page-content-box hc-division-page">
-            <div style="height: 50px" class="mb-2">
+            <div v-if="isTemplateType" style="height: 50px" class="mb-2">
                 <hc-card class="text-right">
                     <el-button
+                   
                         hc-btn
                         type="warning"
                         @click="divisionClick"
@@ -87,7 +88,7 @@
                     </HcTable>
                 </HcNewCard>
             </div>
-            <div class="project-info">
+            <div class="project-info" :style="contentStyle">
                 <hc-new-card title="当前节点工程用表信息">
                     <template #extra>
                         <el-button
@@ -99,6 +100,7 @@
                             <span>引用元素表</span>
                         </el-button>
                         <el-button
+                            v-if="isTemplateType"
                             hc-btn
                             color="#3EB1A5"
                             class="text-white"
@@ -582,7 +584,7 @@
                     <div class="left flex items-center">
                         <div class="mr-4">选中方式:</div>
                         <el-radio-group v-model="addTreeNodeType">
-                            <!-- <el-radio value="3">当前及子节点</el-radio> -->
+                            <el-radio value="3">当前及子节点</el-radio>
                             <el-radio class="ml-4" value="2">
                                 仅当前节点
                             </el-radio>
@@ -1097,7 +1099,7 @@
 </template>
 
 <script setup>
-import { nextTick, onActivated, onMounted, ref, watch } from 'vue'
+import { computed, nextTick, onActivated, onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { useRouter } from 'vue-router'
 import HcUpload from './components/division/HcUpload.vue'
@@ -1142,7 +1144,7 @@ const isCollapse = ref(useAppState.getCollapse)
 const contractInfo = ref(useAppState.getContractInfo)
 const { contractType } = contractInfo.value
 const classifyType = ref(contractType === 2 ? '2' : '1')
-
+const isTemplateType = ref(useAppState.contractInfo?.templateType === 2)
 //监听
 watch(
     () => [useAppState.getCollapse],
@@ -2812,6 +2814,10 @@ const saveNodeNmeClick = async () => {
         }
    
 }
+// 添加计算属性
+const contentStyle = computed(() => ({
+    '--project-info-height': !isTemplateType.value ? 'calc(100% - 238px)' : 'calc(100% - 298px)',
+}))
 </script>
 
 <style lang="scss" scoped>

+ 6 - 4
src/views/data-fill/wbs.vue

@@ -145,13 +145,14 @@
                     @change="authBtnTabClick"
                 >
                     <template #extra>
-                        <div v-if="ListItemDatas.length > 0" class="mr-1 flex items-center justify-center whitespace-nowrap">
+                        <div v-if="ListItemDatas.length > 0 && isTemplateType" class="mr-1 flex items-center justify-center whitespace-nowrap">
                             <div class="font-500">  文件题名</div>
                             <div class="title-input h-[30px] flex items-center leading-[30px]" :style="{ width: titleInput ? '' : '100px' }">{{ titleInput }}</div>
                         </div>
                         
                         <HcTooltip keys="node_base_data">
                             <el-button
+                                v-if="isTemplateType"
                                 hc-btn
                                 type="primary"
                                 :disabled="
@@ -385,8 +386,8 @@
             <HcDrawer
                 v-model="isDrawer"
                 to-id="wbs-node-tree-card-target"
+                is-close
                 @close="drawerClose"
-                isClose
             >
                 <!-- 清表列表 -->
                 <el-scrollbar
@@ -955,7 +956,7 @@
                                 仅当前节点
                             </el-radio>
                             <el-radio value="1">当前及父节点</el-radio>
-                            <!-- <el-radio value="1">当前子节点</el-radio> -->
+                            <!-- <el-radio value="1">当前子节点</el-radio> -->
                         </el-radio-group>
                     </div>
                     <div class="right">
@@ -1439,7 +1440,7 @@ const isCollapse = ref(useAppState.getCollapse)
 const userInfo = ref(useAppState.getUserInfo)
 const isLayout = ref(useAppState.isLayout)
 const leftWidth = ref(440)
-
+const isTemplateType = ref(useAppState.contractInfo?.templateType === 2)
 //路由参数
 const routerQuery = useRoutes?.query
 // const typeName = routerQuery?.type || 'map'
@@ -1505,6 +1506,7 @@ onMounted(() => {
     treeLoading.value = typeName === 'tree'
     const treeWidth = useAppState.getTreeWidth
     leftWidth.value = isNullES(treeWidth) || treeWidth <= 0 ? 440 : treeWidth
+    console.log(contractInfo.value, 'contractInfo.value')
     setContractType(contractInfo.value?.contractType)
     getDictionaryApi()
     getStandardTypeOptions()

+ 1 - 1
src/views/other/components/ListItem.vue

@@ -1107,7 +1107,7 @@ const setTableFormMenu = (info) => {
     if (isOpen === 1) {
         newArr.push({ label: '插入设计值/频率', key: 'IDVF' })
     }
-    //newArr.push({label: '插入设计值/频率', key: "IDVF"})
+    newArr.push({ label: '插入设计值/频率', key: 'IDVF' })
     newArr.push({ label: '插入特殊字符', key: 'special' })
     newArr.push({ label: '关联试验数据', key: 'CTD' }),
         newArr.push({ label: '关联试验文件', key: 'file' })