Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

ZaiZai 1 жил өмнө
parent
commit
904f097335

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
         "dayjs": "^1.11.10",
         "echarts": "^5.4.2",
         "element-plus": "^2.4.1",
-        "hc-vue3-ui": "^2.5.6",
+        "hc-vue3-ui": "^2.6.0",
         "js-base64": "^3.7.5",
         "js-cookie": "^3.0.5",
         "js-fast-way": "^0.3.0",

+ 38 - 1
src/global/components/hc-report-modal/index.vue

@@ -8,10 +8,15 @@
                 <el-date-picker v-model="formModel.startDate" type="date" class="block" value-format="YYYY-MM-DD" :clearable="false" />
             </el-form-item>
             <el-form-item v-if="isDatas && reportDatas.length > 0" label="申请内容">
-                <div class="task-tag-data-box">
+                <!-- <div class="task-tag-data-box">
                     <template v-for="(item, index) in reportDatas" :key="item.id">
                         <el-tag type="info" size="default" closable @close="taskTagClose(index)">{{ item.name }}</el-tag>
                     </template>
+                </div> -->
+                <div v-infinite-scroll="load" class="task-tag-data-box" style="overflow: auto">
+                    <template v-for="(item, index) in tableData" :key="index">
+                        <el-tag type="info" size="default" closable @close="taskTagClose(index)">{{ item.name }}</el-tag>
+                    </template>
                 </div>
             </el-form-item>
             <el-form-item label="上传附件">
@@ -168,6 +173,14 @@ watch(() => [
         ...addition,
     }
     reportDatas.value = datas
+         //判断数据长度有没有9个,有就先添加9个,没有直接获取所有数据
+         if (reportDatas.value.length > 9) {
+          for (let i = 0;i < needle.value ;i++) {
+            tableData.value[i] = reportDatas.value[i]
+          }
+        } else {
+          tableData.value = reportDatas.value
+        }
     if (val) {
         getProcessDatasApi()
     }
@@ -290,6 +303,27 @@ const HcUploadFileSuccess = (res) => {
     formModel.value.attachmentPdfUrl = res.resData.link
     formModel.value.attachmentPdfUrlName = res.resData.originalName
 }
+const tableData = ref([])
+const needle = ref(10)
+const load = async () => {
+    const res = await queryData()
+          if (res) {
+            tableData.value = res
+          }
+}
+const queryData = async ()=>{
+    console.log('查询数据')
+        let ortab = tableData.value
+        if (needle.value < reportDatas.value.length) {
+           let pusharr = reportDatas.value.slice(needle.value, needle.value + 10)
+            pusharr.forEach((ele)=>{
+                ortab.push(ele)
+          })
+          needle.value = needle.value + 10
+          return ortab
+        }
+      
+}
 </script>
 
 <style lang="scss">
@@ -303,6 +337,9 @@ const HcUploadFileSuccess = (res) => {
     align-items: center;
     flex-flow: row wrap;
     width: 100%;
+    max-height: 300px;
+    overflow-y: auto;
+    overflow-x: hidden;
     .el-tag {
         margin: 5px;
     }

+ 76 - 98
src/views/config/parameter.vue

@@ -15,48 +15,71 @@
                         </el-button>
                     </HcTooltip>
                 </template>
-                <div class="hc-page-content-box-list">
-                    <div class="hc-page-content-box-list-title">
-                        归档目录树选择范围
+                <el-scrollbar>
+                    <div class="hc-page-content-box-list">
+                        <div class="hc-page-content-box-list-title">
+                            归档目录树选择范围
+                        </div>
+                        <el-alert title="选择对应的归档范围,目录树内容也会随之改变" type="error" :closable="false" />
+                        <div class="hc-card-header-tree-checkbox">
+                            <el-checkbox-group v-model="projectTypeList">
+                                <el-checkbox :label="1">
+                                    公路工程
+                                </el-checkbox>
+                                <el-checkbox :label="2">
+                                    水里水电工程
+                                </el-checkbox>
+                            </el-checkbox-group>
+                        </div>
                     </div>
-                    <el-alert title="选择对应的归档范围,目录树内容也会随之改变" type="error" :closable="false" />
-                    <div class="hc-card-header-tree-checkbox">
-                        <el-checkbox-group v-model="projectTypeList">
-                            <el-checkbox :label="1">
-                                公路工程
-                            </el-checkbox>
-                            <el-checkbox :label="2">
-                                水里水电工程
-                            </el-checkbox>
-                        </el-checkbox-group>
+                    <div class="hc-page-content-box-list">
+                        <div class="hc-page-content-box-list-title">
+                            案卷四要素设置
+                        </div>
+                        <el-alert title="勾选是否要生成封面、脊背、卷内目录、备考表" type="error" :closable="false" />
+                        <div class="hc-card-header-tree-checkbox">
+                            <el-checkbox-group v-model="factorTypeList">
+                                <el-checkbox label="1">
+                                    案卷封面
+                                </el-checkbox>
+                                <el-checkbox label="2">
+                                    卷内目录
+                                </el-checkbox>
+                                <el-checkbox label="3">
+                                    脊背
+                                </el-checkbox>
+                                <el-checkbox label="4">
+                                    备考表
+                                </el-checkbox>
+
+                                <el-checkbox label="5">
+                                    生成页码
+                                </el-checkbox>
+                            </el-checkbox-group>
+                        </div>
                     </div>
-                </div>
-                <div class="hc-page-content-box-list">
-                    <div class="hc-page-content-box-list-title">
-                        案卷四要素设置
+                    <div class="hc-page-content-box-list">
+                        <div class="hc-page-content-box-list-title">
+                            组卷流水号设置
+                        </div>
+                        <el-alert title="配置流水号生成的规则,是否设置有虚号及位数" type="error" :closable="false" />
+                        <div class="hc-card-header-tree-checkbox">
+                            <el-radio-group v-model="dirType">
+                                <el-radio :label="1">按档案主目录类别生成后缀流水号</el-radio>
+                                <el-radio :label="0">按档案目录从上至下的顺序生成流水号</el-radio>
+                            </el-radio-group>
+                            <div class="mt-4">
+                                <el-radio-group v-model="indexType">
+                                    <el-radio :label="1">有虚号</el-radio>
+                                    <el-radio :label="0">无虚号</el-radio>
+                                </el-radio-group>
+                            </div>
+                            <div class="mt-4">
+                                <el-input-number v-model="indexNum" :min="0" :max="10" />
+                            </div>
+                        </div>
                     </div>
-                    <el-alert title="勾选是否要生成封面、脊背、卷内目录、备考表" type="error" :closable="false" />
-                    <div class="hc-card-header-tree-checkbox">
-                        <el-checkbox-group v-model="factorTypeList">
-                            <el-checkbox label="1">
-                                案卷封面
-                            </el-checkbox>
-                            <el-checkbox label="2">
-                                卷内目录
-                            </el-checkbox>
-                            <el-checkbox label="3">
-                                脊背
-                            </el-checkbox>
-                            <el-checkbox label="4">
-                                备考表
-                            </el-checkbox>
-
-                            <el-checkbox label="5">
-                                生成页码
-                            </el-checkbox>
-                        </el-checkbox-group>
-                    </div>
-                </div>
+                </el-scrollbar>
             </hc-new-card>
         </div>
     </div>
@@ -77,7 +100,10 @@ const isCollapse = ref(useAppState.getCollapse)
 const projectTypeList = ref([])
 const factorTypeList = ref([])
 const config = ref({})
-
+//组卷流水号设置
+const dirType = ref(0)//目录类型
+const indexType = ref(0)//流水号类型
+const indexNum = ref(0)//虚位数
 //监听
 watch(() => [
     useAppState.getCollapse,
@@ -96,72 +122,17 @@ const searchForm = ref({
     current: 1, size: 20, total: 0,
 })
 
-//树相关的变量
-const primaryKeyId = ref('')
 
-//日期时间被选择
-const betweenTime = ref(null)
-const betweenTimeUpdate = ({ arr, query }) => {
-    betweenTime.value = arr
-    searchForm.value.betweenTime = query
-}
 
-//搜索
-const searchClick = () => {
-    searchForm.value.current = 1
-    getTableData()
-}
 
-//分页被点击
-const pageChange = ({ current, size }) => {
-    searchForm.value.current = current
-    searchForm.value.size = size
-    getTableData()
-}
 
-//表格数据
-const tableRef = ref(null)
-const tableColumn = ref([
-    { key:'key1', name: '报告编号' },
-    { key:'key2', name: '工程部位' },
-    { key:'key3', name: '试验日期' },
-    { key:'key4', name: '样品编号' },
-    { key:'key5', name: '生产厂家' },
-    { key:'key6', name: '规格型号' },
-    { key:'key7', name: '代表数量' },
-    { key:'key8', name: '密度(开kg/m3)' },
-    { key:'key9', name: '比表面积(m2/kg)' },
-    { key:'key10', name: '细度(%)' },
-    { key:'key11', name: '标准稠度用水量(%)' },
-    { key:'key12', name: '初凝结时间(min)' },
-    { key:'key13', name: '终凝结时间(min)' },
-    { key:'key14', name: '安定性霍氏夹法' },
-    { key:'key15', name: '抗折3D胶砂强度(Mpa)' },
-    { key:'key16', name: '抗折28D胶砂强度(Mpa)' },
-    { key:'key17', name: '抗压3D胶砂强度(Mpa)' },
-    { key:'key18', name: '抗压28D胶砂强度(Mpa)' },
-    { key:'key19', name: '试验结果' },
-    { key:'key20', name: '检测类型' },
-    { key:'key21', name: '检测人' },
-])
-const tableData = ref([])
-
-//获取数据
-const tableLoading = ref(false)
-const getTableData = async () => {
 
-}
 
-//多选
-const tableCheckedKeys = ref([])
-const tableSelection = (rows) => {
-    tableCheckedKeys.value = rows
-}
 
-//删除
-const delModalClick = () => {
 
-}
+
+
+
 
 
 const getConfigByProjectId = async ()=>{
@@ -173,6 +144,9 @@ const getConfigByProjectId = async ()=>{
         // 如果projectType 为 1 则选中 公路工程,为 2,则选中水里水电工程,为3,则两个都选中
         // factorType信息为字符串,格式为"1,2,3,4",包含 1,则选中案卷封面,包含2则选中卷内目录,包含3则选中脊背,包含4则选中备考表
         config.value = res.data
+        dirType.value = res.data['dirType'] || 0//目录类型
+        indexType.value = res.data['indexType'] || 0//流水号类型
+        indexNum.value = res.data['indexNum'] || 0//虚位树
         if (config.value.projectType == 1 || config.value.projectType == 2) {
             projectTypeList.value = [config.value.projectType]
         } else if (config.value.projectType == 3) {
@@ -201,6 +175,10 @@ const uploadModalClick = async () => {
         projectId:projectId.value,
         factorType:factorType,
         projectType:projectType,
+        dirType:dirType.value,
+        indexType:indexType.value,
+        indexNum:indexNum.value,
+
     })
 
     if (code == 200) {

+ 1 - 1
src/views/transfer/components/carry-spot-checks.vue

@@ -62,7 +62,7 @@
                         :is-index="false" :loading="cscTableLoading" is-new :index-style="{ width: 60 }"
                     >
                         <template #name="{ row }">
-                            <div :class="row.id === checkId ? 'text-link' : 'text-hover'" @click="changePdf(row)">{{ row?.fileName }}</div>
+                            <div :class="row.id === checkId ? 'bg-orange-400' : 'text-hover'" @click="changePdf(row)">{{ row?.fileName }}</div>
                         </template>
                     </HcTable>
 

+ 54 - 13
src/views/transfer/components/table-collect.vue

@@ -1,6 +1,8 @@
 <template>
     <hc-new-card scrollbar>
-        <template #header />
+        <template #header>
+            <HcTooltip keys="file_collection_btn_upload_scanned_files"> <el-checkbox v-model="checkedval" label="全选" size="large" @change="clickAll" /> </HcTooltip>
+        </template>
         <template #extra>
             <!-- <HcNewSwitch :datas="tabData" :keys="tabKey" :round="false" @change="tabChange" /> -->
             <el-button hc-btn color="#626aef">
@@ -23,21 +25,18 @@
             </HcTooltip>
         </template>
         <div v-loading="totalLoaing" class="h-screen">
-            <div v-for="(item) in totalData" :key="item.unitInfo">
+            <div v-for="(item, index) in totalData" :key="item.unitInfo">
                 <div class="hc-card-table-title">{{ item.unitInfo }}</div>
-                <template v-for="(item1) in item.nodeLists" :key="item1.nodeInfo">
+                <template v-for="(item1, index1) in item.nodeLists" :key="item1.nodeInfo">
                     <HcCardItem v-if="item1.list && item1.list.length > 0" ui="h-half">
                         <template #header>
+                            <!-- <el-checkbox v-model="item1.checkedval" label="全选" size="large" @change="clickAll($event, index)" />  -->
                             <span>{{ item1.nodeInfo }}</span>
+                           
                             <!-- <span class="text-gray">(238卷)</span> -->
                         </template>
                         <div :style="`height: ${item1.list !== null && item1.list.length > 9 ? '300px' : 'auto'};`">
-                            <!-- <HcTable
-                                ref="tableRef" :column="tableColumn" :datas="item1.list" :loading="tableLoading"
-                                is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
-                                @selection-change="tableSelection"
-                            /> -->
-                            <visualTable ref="visuatable" :table-data="item1.list " @getTableKeys="getTableKeys" />
+                            <visualTable ref="visuatable" :table-data="item1.list " :index-num="index" @getTableKeys="getTableKeys($event, index1)" />
                         </div>
                     </HcCardItem>
                 </template>
@@ -57,7 +56,7 @@
         :ids="reportIds"
         is-datas
         :datas="reportDatas"
-        @hide="showReportModal = false"
+        @hide="hidereport"
         @finish="showReportFinish"
         @tagClose="reportTaskTagClose"
     />
@@ -118,6 +117,7 @@ const getBtnstatus = async ()=>{
     }
 }
 const totalData = ref([])
+const totalTabledata = ref([])
 const totalLoaing = ref(false)
 const getTotalData = async ()=>{
     totalLoaing.value = true
@@ -128,11 +128,25 @@ const getTotalData = async ()=>{
     if (!error && code === 200) {
         console.log(data, 'data')
         totalData.value = getArrValue(data)
+        getTotalTabledata(totalData.value)
     } else {
         totalData.value = []
      
     }
 }
+const getTotalTabledata = (data)=>{
+    totalTabledata.value = []
+    data.forEach((ele)=>{
+       ele.nodeLists.forEach((ele1)=>{
+        if (ele1.list !== null) {
+            ele1?.list.forEach((ele2)=>{
+                totalTabledata.value.push(ele2)
+            })
+        }
+            
+       })
+    })
+}
 
 
 
@@ -150,8 +164,27 @@ const getTotalData = async ()=>{
 
 //上报
 const tableKeys = ref([])
-const getTableKeys = (val)=>{
-    tableKeys.value = val
+const reprotTitle = ref(new Map())
+const getTableKeys = (val, index)=>{
+    let arr = []
+    reprotTitle.value.set(index, val)
+    for (const value of reprotTitle.value.values()) {
+        console.log(value)
+        value.forEach((ele)=>{
+            arr.push(ele)
+        })
+     }
+     tableKeys.value = arr
+
+}
+const checkedval = ref(false)
+const clickAll = (val)=>{
+    if (val) {
+        tableKeys.value = totalTabledata.value
+    } else {
+        tableKeys.value = []
+    }
+    // visuatable.value[index].tableSelectAll(val)
 }
 const reportIds = ref('')
 const reportTaskName = ref('')
@@ -159,6 +192,7 @@ const reportDatas = ref([])
 const showReportModal = ref(false)
 const reportLoading = ref(false)
 const reportModalClick = async () => {
+
     const rows = tableKeys.value
     console.log(rows, 'rows验收申请行')
     if (rows.length > 0) {
@@ -182,13 +216,20 @@ const reportModalClick = async () => {
         window.$message?.warning('请先勾选需要申请验收的数据')
     }
 }
+const hidereport = ()=>{
+    showReportModal.value = false
+    checkedval.value = false
+    visuatable.value.forEach((ele, index)=>{
+        visuatable.value[index]?.clearSelection()
+    })
+}
 const visuatable = ref(null)
 //上报的审批内容移除
 const reportTaskTagClose = (index) => {
     // const row = tableKeys.value[index]
     console.log(visuatable.value[0])
     tableKeys.value.splice(index, 1)
-
+  
     // // tableRef.value?.toggleRowSelection(row, false)
     // console.log(visuatable.value[index], '1111')
 }

+ 28 - 15
src/views/transfer/components/visual-table.vue

@@ -4,12 +4,12 @@
         ref="tableRef"
         :column="tableColumn" :datas="tableData" :loading="tableLoaing"
         is-new :index-style="{ width: 60 }" :is-check="isCheck" :check-style="{ width: 29 }"
-        @selection-change="tableSelection" @select-all="tableSelectAll"
+        @selection-change="tableSelection"
     />
 </template>
 
 <script setup>
-import { onMounted, onUnmounted, ref, watch } from 'vue'
+import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
 const props = defineProps({
     tableData: {
         type: Array,
@@ -19,27 +19,29 @@ const props = defineProps({
       type:Boolean,
       default:true,
     },
+    indexNum:{
+      type:Number,
+      default:0,
+    },
 })
 //事件
 const emit = defineEmits(['getTableKeys'])
 const isCheck = ref(props.isCheck)
 const allData = ref(props.tableData)
+const indexNum = ref(props.indexNum)
 const needle = ref(10)//数据指针 默认19
 const tableData = ref([])
 const tableLoaing = ref(false)
 //多选
 const tableKeys = ref([])
 const tableSelection = (rows) => {
+
     tableKeys.value = rows
-    emit('getTableKeys', rows)
-}
-const tableSelectAll = (rows)=>{
-  if (rows.length > 0) {
-    tableKeys.value = allData.value 
-    emit('getTableKeys', allData.value )
-  }
-  
+    emit('getTableKeys', rows, indexNum.value)
+
 }
+//返回当前选中的行
+
 //表头
 const tableRef = ref(null)
 const tableColumn = ref([
@@ -53,9 +55,11 @@ const tableColumn = ref([
 watch(() => [
     props.tableData,
     props.isCheck,
-], ([Data, Check]) => {
+    props.indexNum,
+], ([Data, Check, index]) => {
     allData.value = Data
     isCheck.value = Check
+    indexNum.value = index
     tableData.value = []
         //判断数据长度有没有9个,有就先添加9个,没有直接获取所有数据
         if (allData.value.length > 9) {
@@ -96,19 +100,28 @@ const scrollBehavior = async (e)=>{
       if (scrollDirection === 'down') {
         // 获取提供实际滚动的容器
         const dom = tableRef.value.tableRef.$refs.bodyWrapper.getElementsByClassName('el-scrollbar__wrap')[0]
-        
         const { clientHeight, scrollTop, scrollHeight } = dom
-        // 父容器高度 + 子容器距离父容器顶端的高度 = 子容器可滚动的高度
-        if (clientHeight + scrollTop === scrollHeight) {
+      // 容差值(根据页面缩放比例调整)
+        const tolerance = 8 // 可根据需要调整
+        // 计算剩余可滚动距离
+        const remainingScroll = scrollHeight - clientHeight - scrollTop
+        console.log(remainingScroll, 'remainingScroll')
+        if (remainingScroll <= tolerance) {
           console.log('竖向滚动条已经滚动到底部')
           const res = await queryData()
           if (res) {
             tableData.value = res
           }
-         
         }
       }
 }
+const clearSelection = ()=>{
+  tableRef.value?.clearSelection()
+}
+// 暴露出去
+defineExpose({
+  clearSelection,
+})
 </script>
 
 <style lang='scss' scoped>

+ 2 - 2
src/views/transfer/preliminary-examination.vue

@@ -27,7 +27,7 @@
             <div class="horizontal-drag-line" @mousedown="onmousedown" />
         </div>
         <div v-show="!isCarrySpotChecksDrawer" class="hc-page-content-box">
-            <hc-new-card>
+            <hc-new-card padding>
                 <template #header>
                     <HcIcon name="volume-up" />
                     <span class="ml-2">您本次验收抽检案卷共</span>
@@ -62,7 +62,7 @@
                 <div class="hc-card-diy-table-box">
                     <HcTable
                         :column="tableColumn" :datas="tableData" :loading="tableLoading"
-                        heights="auto" is-new :index-style="{ width: 60 }"
+                        is-new :index-style="{ width: 60 }"
                     >
                         <template #key4="{ row, index }">
                             <span :style="row.key4_1 === '1' ? 'color: #81b337' : ''">{{ row.key4 }}</span>

+ 4 - 4
yarn.lock

@@ -1449,10 +1449,10 @@ has@^1.0.3:
   dependencies:
     function-bind "^1.1.1"
 
-hc-vue3-ui@^2.5.6:
-  version "2.5.6"
-  resolved "http://47.110.251.215:9000/hc-vue3-ui/-/hc-vue3-ui-2.5.6.tgz#5636da1a865c76e6a0b695505aaddc1fbe24e342"
-  integrity sha512-L1NaQ7Q33k1d/JoUTnhvRSYvbYCNfb+yPkCkhB4jYHk7o7Vnm23gpI3thqNkUKFK9z7pa555Dk26PH0ICXpxMg==
+hc-vue3-ui@^2.6.0:
+  version "2.6.0"
+  resolved "http://47.110.251.215:9000/hc-vue3-ui/-/hc-vue3-ui-2.6.0.tgz#b50f371f0e2325e950180d827b0951a1b1a3ef7a"
+  integrity sha512-pmw+nDg5H0ePzv3mVVt0rtT1WcX9Nctlly0YCk6ONUefBvwc1N1lPzGE6wV4RGGB6MYQ5sn3VxHaAc1Kj7yCsw==
   dependencies:
     axios "^1.6.2"
     dayjs "^1.11.10"