ソースを参照

feat:公文管理系统-我的发文完成

DESKTOP-07F1812\coder 2 年 前
コミット
13a77d6db2

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
     "autoprefixer": "^10.4.14",
     "axios": "^1.4.0",
     "lib-flexible": "^0.3.2",
+    "pdfh5": "^1.4.3",
     "pinia": "^2.1.1",
     "pinia-plugin-persistedstate": "^3.1.0",
     "postcss-pxtorem": "^6.0.0",

+ 7 - 0
pnpm-lock.yaml

@@ -16,6 +16,9 @@ dependencies:
   lib-flexible:
     specifier: ^0.3.2
     version: 0.3.2
+  pdfh5:
+    specifier: ^1.4.3
+    version: 1.4.3
   pinia:
     specifier: ^2.1.1
     version: 2.1.1(typescript@5.0.4)(vue@3.3.2)
@@ -4274,6 +4277,10 @@ packages:
     resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==}
     dev: true
 
+  /pdfh5@1.4.3:
+    resolution: {integrity: sha512-gpIV1caef4Eibi9MEtWWMZUFGHFs+1jhm7OFZ309zEO9fxP3yJqYsp8V3LsQ9yjBkRysk/aMqFaZx0wNSMPbsg==}
+    dev: false
+
   /picocolors@1.0.0:
     resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
 

+ 1 - 0
src/main.ts

@@ -9,6 +9,7 @@ import 'amfe-flexible'
 import 'virtual:windi.css'
 import './styles/main.scss'
 import './styles/table.scss'
+import './styles/pdf.scss'
 
 const app = createApp(App)
 const pinia = createPinia()

+ 98 - 0
src/pages/officialDocumentManager/myOfficialDocument/detail/index.vue

@@ -0,0 +1,98 @@
+<script setup>
+import { closeToast, showLoadingToast } from 'vant'
+import Pdfh5 from 'pdfh5'
+
+const { currentRoute } = useRouter()
+const route = currentRoute.value
+const gw_id = route.query.gw_id
+const detailData = ref({})
+showLoadingToast({
+  message: '加载中...',
+  forbidClick: true,
+})
+request({
+  url: '/jdbg/gwgl_gw/detail',
+  data: {
+    gw_id,
+  },
+}).then((res) => {
+  closeToast()
+  detailData.value = res.data.one_info
+  const appendUrl = res.data.one_info.gw_content.split('|')[0]
+  const curFileShowUrl = appendUrl.replace(/\.\w+$/, '.pdf')
+  const pdfh5 = new Pdfh5('#pdfContent', {
+    pdfurl: curFileShowUrl,
+    scrollEnable: false,
+    zoomEnable: false,
+  })
+})
+</script>
+
+<template>
+  <div>
+    <div class="tableContainer">
+      <div class="topPart">
+        <table class="Tb" width="100%" cellspacing="0" cellpadding="0">
+          <tr>
+            <td class="titleOpt">
+              类型:
+            </td>
+            <td>{{ detailData.lb_name }}</td>
+          </tr>
+          <tr>
+            <td class="titleOpt">
+              标题:
+            </td>
+            <td>{{ detailData.gw_title }}</td>
+          </tr>
+          <tr>
+            <td class="titleOpt">
+              发文字号:
+            </td>
+            <td>{{ detailData.gw_zh }}</td>
+          </tr>
+          <tr>
+            <td class="titleOpt">
+              发起人:
+            </td>
+            <td>{{ detailData.gw_fqr_name }}</td>
+          </tr>
+          <tr>
+            <td class="titleOpt">
+              发起科室:
+            </td>
+            <td>{{ detailData.gw_fqks_name }}</td>
+          </tr>
+          <tr>
+            <td class="titleOpt">
+              发起时间:
+            </td>
+            <td>{{ detailData.create_dateline }}</td>
+          </tr>
+          <tr>
+            <td class="titleOpt">
+              当前步骤:
+            </td>
+            <td>{{ detailData.gw_bz }}</td>
+          </tr>
+          <tr>
+            <td class="titleOpt">
+              当前审核人:
+            </td>
+            <td>{{ detailData.gw_shr }}</td>
+          </tr>
+          <tr>
+            <td class="titleOpt">
+              状态:
+            </td>
+            <td>{{ detailData.gw_status_option_n }}</td>
+          </tr>
+        </table>
+      </div>
+    </div>
+
+    <div id="pdfContent" />
+  </div>
+</template>
+
+<style lang="scss" scoped></style>

+ 45 - 0
src/pages/officialDocumentManager/myOfficialDocument/index.vue

@@ -0,0 +1,45 @@
+<script setup>
+import { userInfo } from '~/store/user'
+
+const { uo_type } = userInfo
+const isBureau = ref(false)// 当前用户是否局端
+isBureau.value = uo_type === '1'
+
+const list = ref([])
+const loading = ref(false)
+const finished = ref(false)
+let page = 1
+function onLoad() {
+  loading.value = true
+  request({
+    url: '/jdbg/gwgl_gw/index',
+    data: {
+      page,
+      limit: 20,
+      my_gw: 1,
+      gw_fb_depart: isBureau ? '' : '1',
+    },
+  }).then((res) => {
+    const data = res.data
+    list.value = [...list.value, ...data.page_data]
+    finished.value = data.total_page === page
+    page++
+    loading.value = false
+  })
+}
+const router = useRouter()
+function cellClick(gw_id) {
+  router.push({ path: '/officialDocumentManager/myOfficialDocument/detail', query: { gw_id } })
+}
+</script>
+
+<template>
+  <div>
+    <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
+      <van-cell
+        v-for="(item, index) in list" :key="item" :title="`${index + 1}. ${item.gw_title}`"
+        @click="cellClick(item.gw_id)"
+      />
+    </van-list>
+  </div>
+</template>

+ 5 - 0
src/styles/main.scss

@@ -10,3 +10,8 @@ body,
 html.dark {
   background: #121212;
 }
+
+.border_bottom {
+  border-bottom: 2px solid #666;
+  border-top: 2px solid #666;
+}

File diff suppressed because it is too large
+ 212 - 0
src/styles/pdf.scss