Prechádzať zdrojové kódy

借阅查询页面修改

duy 5 mesiacov pred
rodič
commit
72c5f49911
1 zmenil súbory, kde vykonal 171 pridanie a 32 odobranie
  1. 171 32
      src/views/using/borrow/query.vue

+ 171 - 32
src/views/using/borrow/query.vue

@@ -3,12 +3,65 @@
         <template #tree>
             <HcTree :project-id="projectId" :contract-id="contractId" :auto-expand-keys="treeAutoExpandKeys" @node-tap="projectTreeClick" @node-loading="treeNodeLoading" @menu-tap="ElTreeMenuClick" />
         </template>
-        <hc-new-card v-show="!isCarrySpotChecksDrawer" title="已形成的案卷">
-            <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" is-new :index-style="{ width: 60 }" @row-click="tableRowClick">
-                <template #name="{ row }">
-                    <div class="text-link">{{ row?.name }}</div>
-                </template>
-            </HcTable>
+        <hc-new-card v-show="!isCarrySpotChecksDrawer">
+            <template #header>
+                <div class="w-40">
+                    <el-select v-model="searchForm.storageTime" clearable placeholder="保管期限">
+                        <el-option v-for="item in retentionPeriod" :key="item.value" :label="item.label" :value="item.value" />
+                    </el-select>
+                </div>
+                <div class="ml-3 w-40">
+                    <el-select v-model="searchForm.secretLevel" clearable placeholder="密级">
+                        <el-option v-for="item in securityLevelData" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+                    </el-select>
+                </div>
+             
+                <div class="ml-3 w-56">
+                    <el-input v-model="searchForm.name" clearable block placeholder="请输入名称关键词检索" @keyup="keyUpEvent" />
+                </div>
+              
+               
+                <div class="ml-2">
+                    <el-button type="primary" @click="searchClick">
+                        <HcIcon name="search-2" />
+                        <span>搜索</span>
+                    </el-button>
+                </div>
+            </template>
+            <div :class="tableFileShow ? 'file-table' : ''" class="table-file">
+                <div class="hc-c-table-box">
+                    <HcTable
+                        ref="tableRef" :column="tableColumn" :datas="tableData" :index-style="{ width: 60 }"
+                        :loading="tableLoading" is-new
+                        :ui="hoverHand ? 'hover-hand' : ''"
+                        @row-click="rowNameClick" 
+                    >
+                        <template #name="{ row }">
+                            <div class="text-link text-blue'" @click.stop="tableRowClick(row)">{{ row?.name }}</div>
+                        </template>
+                    </HcTable>
+                </div>
+                <div v-if="tableFileShow" class="hc-f-table-box">
+                    <div class="header-box">
+                        <div class="header">卷内文件</div>
+                        <div class="hc-icon-close text-hover">
+                            <HcIcon class="hc-icon-close text-hover" name="close" style=" color:rgb(64, 149, 229);" @click="closetableFile" />
+                        </div>
+                    </div>
+                    <div class="hc-file-table-box">
+                        <HcTable
+                            ref="tableFileRef" :column="innertableColumn" :datas="intableData" :index-style="{ width: 60 }"
+                            :loading="intableLoading" is-new
+                            :ui="hoverHand ? 'hover-hand' : ''"
+                        >
+                            <template #fileName="{ row }">
+                                <div class="text-link text-blue" @click.stop="tableFileRowClick(row)">{{ row?.fileName }}</div>
+                            </template>
+                        </HcTable>
+                    </div>
+                </div>
+            </div>
+         
             <template #action>
                 <HcPages :pages="searchForm" :sizes="[20, 50, 100, 200, 300, 500]" @change="pageChange" />
             </template>
@@ -151,6 +204,7 @@ import { getStoreValue, setStoreValue } from '~src/utils/storage'
 import tuningApi from '~api/archiveConfig/tuning.js'
 import archiveQueryApi from '~api/using/query.js'
 import inspectApi from '~api/transfer/inspects.js'
+import tasksApi from '~api/tasks/data'
 
 //变量
 const useAppState = useAppStore()
@@ -159,7 +213,7 @@ const contractId = ref(useAppState.getContractId)
 const projectInfo = ref(useAppState.getProjectInfo)
 const isCollapse = ref(useAppState.getCollapse)
 const isBubble = ref(useAppState.getBubble)
-const userInfo = ref(useAppState.getUserInfo)
+
 
 //监听
 watch(() => [
@@ -173,6 +227,7 @@ watch(() => [
 //渲染完成
 onMounted(() => {
     setTableColumns()
+    getSecurityLevel()
 })
 //缓存被激活时
 onActivated(() => {
@@ -184,10 +239,42 @@ const treeNodeLoading = () => {
     treeLoading.value = false
 }
 
+//搜索表单
+
+//保管期限
+const retentionPeriod = ref([
+    { label: '永久', value: '3' },
+    { label: '30年', value: '2' },
+    { label: '10年', value: '1' },
+])
 //搜索表单
 const searchForm = ref({
+    contractId: null, storageTime:'', secretLevel:'', name:'', 
     current: 1, size: 20, total: 0,
 })
+//获取密级
+const securityLevelData = ref([])
+const getSecurityLevel = async () => {
+    const { error, code, data } = await tasksApi.queryTaskTypeStatus({
+        typeOrStatus: 'security_level',
+    })
+    //处理数据
+    if (!error && code === 200) {
+        securityLevelData.value = getArrValue(data).filter(item => item.dictKey !== '0')
+    } else {
+        securityLevelData.value = []
+    }
+}
+//回车搜索
+const keyUpEvent = (e) => {
+    if (e.key === 'Enter') {
+        searchForm.value.current = 1
+        getTableData()
+    }
+}
+const searchClick = ()=>{
+    getTableData()
+}
 //截取日期
 const splitDate = (val)=>{
     if (val) {
@@ -232,14 +319,16 @@ const setTableColumns = () => {
     tableColumn.value = [
         { key: 'fileNumber', name: '档号', width:110 },
         { key: 'name', name: '案卷题名' },
-        { key: 'storageTimeValue', name: '保管期限', width:100 },
-        { key: 'pageN', name: '总页数', width:110 },
+        { key: 'secretLevelValue', name: '密级', width: 90 },
+        { key: 'storageTimeValue', name: '保管期限', width:90 },
+        { key: 'pageN', name: '总页数', width:100 },
         { key:'unit', name: '立卷单位', width: 140 },
-        { key:'remark', name: '备注', width: 110 },
+        { key:'remark', name: '借阅时间', width: 110 },
+      
     ]
 }
 const tableData = ref([])
-
+const hoverHand = ref(true)
 //获取数据
 const tableLoading = ref(false)
 const getTableData = async () => {
@@ -265,13 +354,24 @@ const getTableData = async () => {
 const isCarrySpotChecksDrawer = ref(false)
 const fileInfo = ref('')
 const checkmetaFileId = ref('')
-const tableRowClick = async ({ row }) => {
+const tableRowClick = async (row ) => {
     fileInfo.value = row
   await getArchiveFileListData()
+
+
     isCarrySpotChecksDrawer.value = true
+}
+const rowNameClick = async ({ row })=>{
+    tableFileShow.value = true
+    fileInfo.value = row
+  await getintableData(row.id)
+    
+   
 }
 //获取卷内文件数据
 const getArchiveFileListData = async ()=>{
+    console.log(fileInfo.value, 'fileInfo.value')
+    
     const { error, code, msg, data } = await archiveQueryApi.getArchiveFileList({
         id: fileInfo.value.id, //案卷id
 
@@ -284,8 +384,7 @@ const getArchiveFileListData = async ()=>{
         if (cscTableData1.value.length > 0) {
             checkmetaFileId.value = cscTableData1.value[0].id
             pdfUrl.value = cscTableData1.value[0]?.pdfFileUrl || ''
-            console.log( pdfUrl.value, '  pdfUrl.value ')
-            
+    
             checkId.value = cscTableData1.value[0].id
            
             
@@ -321,22 +420,9 @@ const changePdf = (row)=>{
 
 
 }
-const opid = ref('')
 
-//获取抽检意见
-const getopiniondata = async ()=>{
-    const { error, code, data, msg } = await inspectApi.getOpinion({
-        fileId: checkId.value,
-    })
-    if (!error && code === 200) {
-        console.log(data, 'data')
-        let opiniondata = getObjValue(data)
-        reform.value.content = opiniondata?.allOpinion
-        reform.value.type = opiniondata?.allOpinion?.length > 0 ? true : false
-        reform.value.myOpinion = opiniondata?.opinion
-        opid.value = opiniondata?.id
-    }
-}
+
+
 
 //类型tab数据和相关处理
 const tabTypeKey = ref('tab1')
@@ -469,7 +555,7 @@ const onCarrySpotChecksDrawerClose = () => {
     ishowFile.value = false
     checkmetaFileId.value = ''
     tabTypeKey.value = 'tab1'
-    getTableData()
+   
 }
 
 
@@ -494,6 +580,51 @@ const getmetaInfo = async (fileId)=>{
         cscmetaDataTabledata.value = []
     }
 }
+const tableFileShow = ref(false)
+const closetableFile = () => {
+    tableFileShow.value = false
+}
+
+const tableFileRowClick = async (row ) => {
+    await getArchiveFileListData()
+    checkmetaFileId.value = row.id
+            pdfUrl.value = row.pdfFileUrl || ''
+    
+            checkId.value = row.id
+    isCarrySpotChecksDrawer.value = true
+
+    ishowFile.value = true
+   
+}
+const tableFileRef = ref(null)
+const intableData = ref([])
+const intableLoading = ref(false)
+
+const innertableColumn = ref([
+    { key: 'fileNumber', name: '文件编号' },
+    { key: 'fileName', name: '文件题名', width: 500 },
+    { key: 'fileTime', name: '文件日期' },
+    { key: 'dutyUser', name: '责任者' },
+    { key: 'filePage', name: '页数' },
+
+])
+
+const getintableData = async (id) => {
+    intableLoading.value = true
+    const { error, code, data } = await tuningApi.getarchiveFilePage({
+        nodeIds: searchForm.value.nodeIds,
+        archiveId: id,
+        size: 1000,
+        current: 1,
+    })
+    intableLoading.value = false
+    if (!error && code === 200) {
+        intableData.value = getArrValue(data['records'])
+    } else {
+        intableData.value = []
+
+    }
+}
 </script>
 
 <style lang="scss">
@@ -503,7 +634,15 @@ const getmetaInfo = async (fileId)=>{
 <style lang="scss">
 @import '~style/transfer/inspects.scss';
 @import '~src/styles/theme/transfer/inspect.scss';
-.act-border{
-    border: 1px solid var(--el-color-primary);
+</style>
+
+<style lang="scss" scoped>
+@import '~style/archives/meta-data.scss';
+.hover-hand{
+    cursor: pointer;
 }
 </style>
+
+<style lang="scss">
+@import '~src/styles/theme/archives/meta-data.scss';
+</style>