wenhongquan 11 months ago
parent
commit
b7b866b74f
2 changed files with 5 additions and 3 deletions
  1. 3 1
      src/components/pdfview/index.vue
  2. 2 2
      src/views/project/list/index.vue

+ 3 - 1
src/components/pdfview/index.vue

@@ -9,6 +9,8 @@
         <PicShow v-if="showjb" :src="props.src" />
       </div>
 
+
+
       <iframe v-loading style="width:100%;height:100%;border:none" v-if="!ispic " :src="`${currentPdf}`" />
       <!--      <div style="height: 100%;overflow-y: auto" v-if="!usepdf">-->
       <!--        &lt;!&ndash; <div v-for="page in pages" :key="page" style="width: 100%;">-->
@@ -69,7 +71,7 @@ watchEffect(() => {
   }else{
     usepdf.value = true;
   }
-  if (usepdf.value) {
+  if (usepdf.value||ismobile.value) {
     // if(props.size>1024*1024*20){
     // }else{
       currentPdf.value = `https://filesystem.njdnyjs.com/preview/?url=${encodeURIComponent(props.src)}&isprint=${props.isprint}`

+ 2 - 2
src/views/project/list/index.vue

@@ -517,7 +517,7 @@ const getnextdata = (page: number) => {
     searchForm.value["createBy"]=useUserStore().userId;
     delete  searchForm.value.status;
   }
-  if(userroles.indexOf("superadmin")!=-1){
+  if(JSON.stringify(userroles).indexOf("admin")!=-1){
      delete searchForm.value.createBy
   }
 
@@ -541,7 +541,7 @@ onMounted(() => {
   if(route.query.status!=undefined){
     status.value = route.query.status+""
   }
-  if(userroles.indexOf("superadmin")!=-1){
+  if(JSON.stringify(userroles).indexOf("admin")!=-1){
     isnormal = true
     status.value ="1";
   }