Browse Source

档案新加页面

duy 3 months ago
parent
commit
8c1646641c

+ 26 - 0
src/router/modules/base.js

@@ -205,6 +205,32 @@ export default [
                 meta: { title: '档案查询' },
                 component: () => import('~src/views/using/query.vue'),
             },
+            {
+                path: '/using/borrow',
+                name: 'using-borrow',
+                meta: { title: '档案借阅' },
+                redirect: '/using/borrow',
+                children: [
+                    {
+                        path: '/using/borrow/borrow',
+                        name: 'using-borrow-borrow',
+                        meta: { title: '档案借阅' },
+                        component: () => import('~src/views/using/borrow/borrow.vue'),
+                    },
+                    {
+                        path: '/using/borrow-query',
+                        name: 'using-borrow-query',
+                        meta: { title: '借阅查询' },
+                        component: () => import('~src/views/using/borrow/query.vue'),
+                    },
+                    {
+                        path: '/using/borrow-ledger',
+                        name: 'using-borrow-ledger',
+                        meta: { title: '借阅台账' },
+                        component: () => import('~src/views/using/borrow/ledger.vue'),
+                    },
+                ],
+            },
         ],
     },
     {

+ 3 - 0
src/router/modules/token.js

@@ -16,4 +16,7 @@ export default [
     'test-index',
    'custody-save', //案卷保管
    'custody-ledger', //案卷台账
+   'using-borrow-query',
+   'using-borrow-borrow',
+   'using-borrow-ledger',
 ]

+ 6 - 57
src/views/custody/ledger.vue

@@ -1,12 +1,5 @@
 <template>
-    <hc-body :loading="treeLoading" :project-nmae="projectInfo?.name" split>
-        <template #tree>
-            <HcTree
-                :auto-expand-keys="treeAutoExpandKeys" :contract-id="contractId" :project-id="projectId"
-                @node-tap="nodeElTreeClick" @menu-tap="ElTreeMenuClick"
-                @node-loading="treeNodeLoading"
-            />
-        </template>
+    <hc-body>
         <hc-new-card>
             <template #header>
                 <div class="ml-4 w-40">
@@ -39,7 +32,7 @@
                 <div class="hc-c-table-box">
                     <HcTable
                         ref="tableRef" :check-style="{ width: 29 }" :column="tableColumn" :datas="tableData"
-                        :index-style="{ width: 70 }" :is-arr-index="false" :loading="tableLoading" :ui="hoverHand ? 'hover-hand' : ''"
+                        :index-style="{ width: 70 }" :is-arr-index="false" :loading="tableLoading" 
                         is-new is-current-row
                     >
                         <template #index="{ index }">
@@ -58,7 +51,7 @@
 <script setup>
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
-import HcTree from '~src/components/tree/hc-tree.vue'
+
 import { getArrValue } from 'js-fast-way'
 
 
@@ -66,8 +59,7 @@ import tuningApi from '~api/archiveConfig/tuning.js'
 
 
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
-import { toPdfPage } from '~uti/btn-auth'
-import tasksApi from '~api/tasks/data'
+
 
 //变量
 const useAppState = useAppStore()
@@ -94,33 +86,6 @@ onMounted(() => {
 
 
 
-//树加载
-const treeLoading = ref(true)
-const treeNodeLoading = () => {
-    treeLoading.value = false
-}
-
-//项目树被点击
-
-// const isBuiltDrawing = ref(0)
-//自动展开缓存
-const treeAutoExpandKeys = ref(getStoreValue('turningExpandKeys') || [])
-const nodeElTreeClick = ({ node, data, keys, key }) => {
-    //缓存展开的节点
-    setStoreValue('turningExpandKeys', keys)
-    treeAutoExpandKeys.value = keys || []
-    console.log('点击', data)
-    searchForm.value.total = 0
-    searchForm.value.current = 1
-    searchForm.value.size = 20
-    searchForm.value.nodeIds = data.id || ''
-    getTableData()
-}
-//树菜单被点击
-const ElTreeMenuClick = async ({ key, node, data, keys }) => {
-    setStoreValue('turningExpandKeys', keys)
-    treeAutoExpandKeys.value = keys || []
-}
 
 //日期时间被选择
 const betweenTime = ref(null)
@@ -211,22 +176,6 @@ const getTableData = async () => {
 //设置表头
 </script>
 
-<style lang="scss" scoped>
-@import '~style/archives/tuning.scss';
-// @import '~style/file/scoped/collection.scss';
-</style>
 
-<style lang="scss">
-// @import '~style/file/collection.scss';
-@import '../../styles/theme/archives/tuning.scss';
-.text-disable {
-    cursor: not-allowed
-}
-.hover-hand {
-    cursor: pointer;
-}
-.panel-body .el-checkbox {
-    white-space: normal;
-    height: auto;
-}
-</style>
+
+

+ 222 - 0
src/views/using/borrow/borrow.vue

@@ -0,0 +1,222 @@
+<template>
+    <hc-body :loading="treeLoading" :project-nmae="projectInfo?.name" split>
+        <template #tree>
+            <HcTree
+                :auto-expand-keys="treeAutoExpandKeys" :contract-id="contractId" :project-id="projectId"
+                @node-tap="nodeElTreeClick" @menu-tap="ElTreeMenuClick"
+                @node-loading="treeNodeLoading"
+            />
+        </template>
+        <hc-new-card>
+            <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-64">
+                    <HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate" />
+                </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="body">
+                <div class="hc-c-table-box">
+                    <HcTable
+                        ref="tableRef" :check-style="{ width: 29 }" :column="tableColumn" :datas="tableData"
+                        :index-style="{ width: 70 }" :is-arr-index="false" :loading="tableLoading" :ui="hoverHand ? 'hover-hand' : ''"
+                        is-new is-current-row
+                    >
+                        <template #index="{ index }">
+                            <span>{{ index + 1 }}</span>
+                        </template>
+                    </HcTable>
+                </div>
+            </div>
+            <template #action>
+                <HcPages :pages="searchForm" :sizes="[20, 50, 100, 200, 300, 500]" @change="pageChange" />
+            </template>
+        </hc-new-card>
+    </hc-body>
+</template>
+
+<script setup>
+import { onMounted, ref, watch } from 'vue'
+import { useAppStore } from '~src/store'
+import HcTree from '~src/components/tree/hc-tree.vue'
+import { getArrValue } from 'js-fast-way'
+
+
+import tasksApi from '~api/tasks/data'
+
+
+import { getStoreValue, setStoreValue } from '~src/utils/storage'
+import { toPdfPage } from '~uti/btn-auth'
+
+
+//变量
+const useAppState = useAppStore()
+const projectId = ref(useAppState.getProjectId)
+const contractId = ref(useAppState.getContractId)
+const projectInfo = ref(useAppState.getProjectInfo)
+const isCollapse = ref(useAppState.getCollapse)
+const hoverHand = ref(true)
+
+//监听
+watch(() => [
+    useAppState.getCollapse,
+], ([Collapse]) => {
+    isCollapse.value = Collapse
+})
+
+//渲染完成
+onMounted(() => {
+ 
+    setTableColumns()
+    getSecurityLevel()
+  
+
+})
+
+
+
+//树加载
+const treeLoading = ref(true)
+const treeNodeLoading = () => {
+    treeLoading.value = false
+}
+
+//项目树被点击
+
+// const isBuiltDrawing = ref(0)
+//自动展开缓存
+const treeAutoExpandKeys = ref(getStoreValue('turningExpandKeys') || [])
+const nodeElTreeClick = ({ node, data, keys, key }) => {
+    //缓存展开的节点
+    setStoreValue('turningExpandKeys', keys)
+    treeAutoExpandKeys.value = keys || []
+    console.log('点击', data)
+    searchForm.value.total = 0
+    searchForm.value.current = 1
+    searchForm.value.size = 20
+    searchForm.value.nodeIds = data.id || ''
+    getTableData()
+}
+//树菜单被点击
+const ElTreeMenuClick = async ({ key, node, data, keys }) => {
+    setStoreValue('turningExpandKeys', keys)
+    treeAutoExpandKeys.value = keys || []
+}
+
+//日期时间被选择
+const betweenTime = ref(null)
+const betweenTimeUpdate = ({ val, arr }) => {
+    betweenTime.value = arr
+    searchForm.value.startTimeValue = val['start']
+    searchForm.value.endTimeValue = val['end']
+}
+//保管期限
+const retentionPeriod = ref([
+    { label: '永久', value: '3' },
+    { label: '30年', value: '2' },
+    { label: '10年', value: '1' },
+])
+
+//获取密级
+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 searchForm = ref({
+    contractId: null, storageTime:'', secretLevel:'', name:'', startTimeValue: '', endTimeValue: '',
+    current: 1, size: 20, total: 0,
+})
+const searchClick = ()=>{
+    getTableData()
+}
+//回车搜索
+const keyUpEvent = (e) => {
+    if (e.key === 'Enter') {
+        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([])
+//设置表头
+const setTableColumns = () => {
+    tableColumn.value = [
+        { key: 'fileNumber', name: '标段' },
+        { key: 'name', name: '移交人', width: 300 },
+        { key: 'storageTimeValue', name: '移交时间' },
+        { key: 'secretLevelValue', name: '登记表' },
+        { key: 'pageN', name: '清单' },
+     
+    ]
+}
+const tableData = ref([
+    { fileNumber: 'T.J01标', name: '张三', storageTimeValue: '2022-06-20 14:52:30', secretLevelValue: '电子档案移交接收登记表(TJ01标)', pageN: '电子档案移交接收登记表(TJ01标)' },
+])
+//获取数据
+const tableLoading = ref(false)
+const getTableData = async () => {
+ 
+    // tableLoading.value = true
+    // const { error, code, data } = await tuningApi.pageByArchive({
+    //     ...searchForm.value,
+    //     projectId: projectId.value,
+    //     contractId: contractId.value,
+    //     isArchive: 1,
+    // })
+    // tableLoading.value = false
+    // if (!error && code === 200) {
+    //     tableData.value = getArrValue(data?.records)
+    //     searchForm.value.total = data?.total || 0
+    // } else {
+    //     tableData.value = []
+    //     searchForm.value.total = 0
+    // }
+}
+
+
+
+//设置表头
+</script>
+

+ 213 - 0
src/views/using/borrow/ledger.vue

@@ -0,0 +1,213 @@
+<template>
+    <hc-body :loading="treeLoading" :project-nmae="projectInfo?.name" split>
+        <template #tree>
+            <HcTree
+                :auto-expand-keys="treeAutoExpandKeys" :contract-id="contractId" :project-id="projectId"
+                @node-tap="nodeElTreeClick" @menu-tap="ElTreeMenuClick"
+                @node-loading="treeNodeLoading"
+            />
+        </template>
+        <hc-new-card>
+            <template #header>
+                <div class="ml-4 w-40">
+                    <el-select v-model="searchForm.storageTime" clearable placeholder="标段">
+                        <el-option v-for="item in sectionData" :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 transferornData" :key="item.value" :label="item.label" :value="item.value" />
+                    </el-select>
+                </div>
+                <div class="ml-3 w-64">
+                    <HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate" />
+                </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="body">
+                <div class="hc-c-table-box">
+                    <HcTable
+                        ref="tableRef" :check-style="{ width: 29 }" :column="tableColumn" :datas="tableData"
+                        :index-style="{ width: 70 }" :is-arr-index="false" :loading="tableLoading" :ui="hoverHand ? 'hover-hand' : ''"
+                        is-new is-current-row
+                    >
+                        <template #index="{ index }">
+                            <span>{{ index + 1 }}</span>
+                        </template>
+                    </HcTable>
+                </div>
+            </div>
+            <template #action>
+                <HcPages :pages="searchForm" :sizes="[20, 50, 100, 200, 300, 500]" @change="pageChange" />
+            </template>
+        </hc-new-card>
+    </hc-body>
+</template>
+
+<script setup>
+import { onMounted, ref, watch } from 'vue'
+import { useAppStore } from '~src/store'
+import HcTree from '~src/components/tree/hc-tree.vue'
+import { getArrValue } from 'js-fast-way'
+
+
+import tuningApi from '~api/archiveConfig/tuning.js'
+
+
+import { getStoreValue, setStoreValue } from '~src/utils/storage'
+import { toPdfPage } from '~uti/btn-auth'
+import tasksApi from '~api/tasks/data'
+
+//变量
+const useAppState = useAppStore()
+const projectId = ref(useAppState.getProjectId)
+const contractId = ref(useAppState.getContractId)
+const projectInfo = ref(useAppState.getProjectInfo)
+const isCollapse = ref(useAppState.getCollapse)
+const hoverHand = ref(true)
+
+//监听
+watch(() => [
+    useAppState.getCollapse,
+], ([Collapse]) => {
+    isCollapse.value = Collapse
+})
+
+//渲染完成
+onMounted(() => {
+ 
+    setTableColumns()
+  
+
+})
+
+
+
+//树加载
+const treeLoading = ref(true)
+const treeNodeLoading = () => {
+    treeLoading.value = false
+}
+
+//项目树被点击
+
+// const isBuiltDrawing = ref(0)
+//自动展开缓存
+const treeAutoExpandKeys = ref(getStoreValue('turningExpandKeys') || [])
+const nodeElTreeClick = ({ node, data, keys, key }) => {
+    //缓存展开的节点
+    setStoreValue('turningExpandKeys', keys)
+    treeAutoExpandKeys.value = keys || []
+    console.log('点击', data)
+    searchForm.value.total = 0
+    searchForm.value.current = 1
+    searchForm.value.size = 20
+    searchForm.value.nodeIds = data.id || ''
+    getTableData()
+}
+//树菜单被点击
+const ElTreeMenuClick = async ({ key, node, data, keys }) => {
+    setStoreValue('turningExpandKeys', keys)
+    treeAutoExpandKeys.value = keys || []
+}
+
+//日期时间被选择
+const betweenTime = ref(null)
+const betweenTimeUpdate = ({ val, arr }) => {
+    betweenTime.value = arr
+    searchForm.value.startTimeValue = val['start']
+    searchForm.value.endTimeValue = val['end']
+}
+//标段
+const sectionData = ref([
+    { label: 'T.J01标', value: '3' },
+    { label: 'T.J02标', value: '2' },
+    { label: 'T.J03标', value: '1' },
+])
+const transferornData = ref([
+    { label: '张三', value: '3' },
+    { label: '李四', value: '2' },
+    { label: '王五', value: '1' },
+])
+
+
+
+//搜索表单
+const searchForm = ref({
+    contractId: null, storageTime:'', secretLevel:'', name:'', startTimeValue: '', endTimeValue: '',
+    current: 1, size: 20, total: 0,
+})
+const searchClick = ()=>{
+    getTableData()
+}
+//回车搜索
+const keyUpEvent = (e) => {
+    if (e.key === 'Enter') {
+        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([])
+//设置表头
+const setTableColumns = () => {
+    tableColumn.value = [
+        { key: 'fileNumber', name: '标段' },
+        { key: 'name', name: '移交人', width: 300 },
+        { key: 'storageTimeValue', name: '移交时间' },
+        { key: 'secretLevelValue', name: '登记表' },
+        { key: 'pageN', name: '清单' },
+     
+    ]
+}
+const tableData = ref([
+    { fileNumber: 'T.J01标', name: '张三', storageTimeValue: '2022-06-20 14:52:30', secretLevelValue: '电子档案移交接收登记表(TJ01标)', pageN: '电子档案移交接收登记表(TJ01标)' },
+])
+//获取数据
+const tableLoading = ref(false)
+const getTableData = async () => {
+ 
+    // tableLoading.value = true
+    // const { error, code, data } = await tuningApi.pageByArchive({
+    //     ...searchForm.value,
+    //     projectId: projectId.value,
+    //     contractId: contractId.value,
+    //     isArchive: 1,
+    // })
+    // tableLoading.value = false
+    // if (!error && code === 200) {
+    //     tableData.value = getArrValue(data?.records)
+    //     searchForm.value.total = data?.total || 0
+    // } else {
+    //     tableData.value = []
+    //     searchForm.value.total = 0
+    // }
+}
+
+
+
+//设置表头
+</script>
+

+ 5 - 0
src/views/using/borrow/query.vue

@@ -0,0 +1,5 @@
+<template>
+    <div>
+        <h1>借阅查询</h1>
+    </div>
+</template>