Browse Source

feat:与局端数据一致

coder 2 years ago
parent
commit
79254ed1f0

+ 5 - 19
src/pages/officialDocumentManager/documentLibrary/index.vue

@@ -21,6 +21,7 @@ function onLoad() {
       limit: 20,
       gw_fb: 1,
       gw_fb_depart: isBureau ? "" : "1",
+      display_all: isBureau ? '1' : "",
       ...param,
     },
   }).then((res) => {
@@ -51,29 +52,14 @@ function cellClick(gw_id) {
 
 <template>
   <div>
-    <van-search
-      v-model="param.keyword"
-      :clearable="false"
-      show-action
-      placeholder="请输入搜索关键词"
-      @search="onClickSearch"
-    >
+    <van-search v-model="param.keyword" :clearable="false" show-action placeholder="请输入搜索关键词" @search="onClickSearch">
       <template #action>
         <div @click="onClickSearch">搜索</div>
       </template>
     </van-search>
-    <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 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>

+ 8 - 1
src/pages/officialDocumentManager/todoReadDoucument/index.vue

@@ -1,11 +1,18 @@
 <script setup>
 import bureauDocument from './bureauDocument/index.vue'
 import schoolDoucment from './schoolDoucment/index.vue'
+
+import { userInfo } from "~/store/user";
+
+const { uo_type } = userInfo;
+const isBureau = ref(false); // 当前用户是否局端
+isBureau.value = uo_type === "1";
 </script>
 
 <template>
   <div>
-    <van-tabs :sticky="true">
+    <bureauDocument v-if="isBureau" />
+    <van-tabs :sticky="true" v-if="!isBureau">
       <van-tab title="教育局发文">
         <bureauDocument />
       </van-tab>