Переглянути джерело

fix:#1164 7.12局端公文管理:手机端详情页面不显示公文内容相关问题

coder 2 роки тому
батько
коміт
aa5591feb9

+ 1 - 1
public/config.js

@@ -27,7 +27,7 @@ const production = {
 
 function isWhich() {
   if (window.location.href.includes('localhost')) {
-    return local
+    return production
   } else if (window.location.href.includes('bozedu')) {
     return development
   } else {

+ 4 - 1
src/pages/officialDocumentManager/documentLibrary/detail/documentDetail/index.vue

@@ -17,9 +17,12 @@ request({
   },
 }).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 curFileShowUrl = window.globalVariables.api
+    + appendUrl.replace(/\.\w+$/, '.pdf')
   const pdfh5 = new Pdfh5('#pdfContent', {
     pdfurl: curFileShowUrl,
     scrollEnable: false,

+ 2 - 1
src/pages/officialDocumentManager/myOfficialDocument/detail/index.vue

@@ -19,7 +19,8 @@ request({
   closeToast()
   detailData.value = res.data.one_info
   const appendUrl = res.data.one_info.gw_content.split('|')[0]
-  const curFileShowUrl = appendUrl.replace(/\.\w+$/, '.pdf')
+  const curFileShowUrl = window.globalVariables.api
+    + appendUrl.replace(/\.\w+$/, '.pdf')
   const pdfh5 = new Pdfh5('#pdfContent', {
     pdfurl: curFileShowUrl,
     scrollEnable: false,

+ 16 - 10
src/pages/officialDocumentManager/todoOffcialDoucument/detail/index.vue

@@ -1,7 +1,8 @@
 <script setup>
 import { closeToast, showLoadingToast, showToast } from 'vant'
 import Pdfh5 from 'pdfh5'
-
+import { userInfo } from "~/store/user";
+const { user_id } = userInfo;
 const { currentRoute } = useRouter()
 const route = currentRoute.value
 const gw_id = route.query.gw_id
@@ -23,7 +24,8 @@ function getData() {
     detailData.value = res.data.one_info
     shjl.value = res.data.one_info.shjl
     const appendUrl = res.data.one_info.gw_content.split('|')[0]
-    const curFileShowUrl = appendUrl.replace(/\.\w+$/, '.pdf')
+    const curFileShowUrl = window.globalVariables.api
+      + appendUrl.replace(/\.\w+$/, '.pdf')
     const pdfh5 = new Pdfh5('#pdfContent', {
       pdfurl: curFileShowUrl,
       scrollEnable: false,
@@ -36,7 +38,13 @@ getData()
 const auditchecked = ref('')
 const auditDialogShow = ref(false)
 const sh_reason = ref('')
-function clickAudit() {
+function clickAudit(item) {
+  let ShPerson = item.sh_user_id;
+  let localPerson = user_id;
+  if (ShPerson !== localPerson) {
+    showToast('请审核自己的项目')
+    return
+  }
   auditchecked.value = ''
   sh_reason.value = ''
   auditDialogShow.value = true
@@ -47,7 +55,7 @@ function beforeCloseDialog(action) {
       showToast('请选择审核结果')
       return false
     }
-    else if ((auditchecked.value === '2') && sh_reason.value == '') {
+    else if (sh_reason.value == '') {
       showToast('请填写意见')
       return false
     }
@@ -177,7 +185,7 @@ function dialogSubmit() {
                   通过
                 </div>
                 <div v-else-if="item.sh_status == 1">
-                  <van-button class="rightButton" type="primary" @click.stop="clickAudit()">
+                  <van-button class="rightButton" type="primary" @click.stop="clickAudit(item)">
                     审核
                   </van-button>
                 </div>
@@ -201,10 +209,8 @@ function dialogSubmit() {
       </div>
     </div>
     <div id="pdfContent" />
-    <van-dialog
-      v-model:show="auditDialogShow" title="审核" confirm-button-text="提交" show-cancel-button
-      :before-close="beforeCloseDialog"
-    >
+    <van-dialog v-model:show="auditDialogShow" title="审核" confirm-button-text="提交" show-cancel-button
+      :before-close="beforeCloseDialog">
       <div class="dialogDiv">
         <van-radio-group v-model="auditchecked">
           <van-cell-group inset>
@@ -220,7 +226,7 @@ function dialogSubmit() {
             </van-cell>
           </van-cell-group>
         </van-radio-group>
-        <van-field v-if="auditchecked === '3'" v-model="sh_reason" rows="3" autosize type="textarea" placeholder="填写意见" />
+        <van-field v-model="sh_reason" rows="3" autosize type="textarea" placeholder="填写意见" />
       </div>
     </van-dialog>
   </div>

+ 2 - 1
src/pages/officialDocumentManager/todoReadDoucument/detail/index.vue

@@ -20,7 +20,8 @@ request({
   closeToast()
   detailData.value = res.data.one_info
   const appendUrl = res.data.one_info.gw_content.split('|')[0]
-  const curFileShowUrl = appendUrl.replace(/\.\w+$/, '.pdf')
+  const curFileShowUrl = window.globalVariables.api
+    + appendUrl.replace(/\.\w+$/, '.pdf')
   const pdfh5 = new Pdfh5('#pdfContent', {
     pdfurl: curFileShowUrl,
     scrollEnable: false,

Різницю між файлами не показано, бо вона завелика
+ 90 - 0
src/store/produ/la.js


Різницю між файлами не показано, бо вона завелика
+ 102 - 0
src/store/produ/lwj.js


Різницю між файлами не показано, бо вона завелика
+ 97 - 0
src/store/produ/zlh1388.js


Різницю між файлами не показано, бо вона завелика
+ 97 - 0
src/store/produ/zlh1391.js


+ 7 - 7
src/store/user.js

@@ -1,17 +1,17 @@
 import { defineStore } from 'pinia'
 
-// import local from './local/la'
+// import produ from './produ/lwj'
 
 // localStorage.setItem(
 //   'userInfo',
-//   JSON.stringify(local),
+//   JSON.stringify(produ),
 // )
 
-const RoleMap = {
-  JLD: [1, 2, 3],
-  ZJ: [4, 5, 6],
-  JYZ: [7, 8],
-}
+// const RoleMap = {
+//   JLD: [1, 2, 3],
+//   ZJ: [4, 5, 6],
+//   JYZ: [7, 8],
+// }
 export const userInfo = JSON.parse(localStorage.getItem('userInfo'))
 const {
   token,