wenhongquan 11 months ago
parent
commit
905e7c75a1
3 changed files with 25 additions and 17 deletions
  1. 9 5
      src/components/pdfview/index.vue
  2. 14 10
      src/views/project/list/index.vue
  3. 2 2
      vite.config.ts

+ 9 - 5
src/components/pdfview/index.vue

@@ -1,10 +1,13 @@
 <template>
   <div style="width: 100%;height:100%;position:absolute;text-align: center">
     <el-watermark :font="font" :content="watertext" style="width: 100%;height:100%;position:absolute">
-
       <el-image :src="props.src" v-if="ismobile && ispic"></el-image>
-      <PicShow :src="props.src" v-if="ispic && !ismobile" />
-
+      <!--      <PicShow :src="props.src" v-if="ispic && !ismobile" />-->
+      <div v-if="ispic && !ismobile" style="position:relative;">
+        <el-button style="position:fixed;top:15vh;left: 6%;" @click="showjb=!showjb">{{!showjb?"查看局部":"返回"}}</el-button>
+        <el-image v-if="!showjb" :src="props.src" :preview-src-list="[props.src]" :fit="'cover'" style="max-width:80%;"></el-image>
+        <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">-->
@@ -49,6 +52,8 @@ const font = ref({
   color: 'rgba(0, 0, 0, .15)',
 })
 
+const showjb = ref(false);
+
 const watertext = ref();
 const ispic = ref(false);
 const ismobile = ref(false);
@@ -94,5 +99,4 @@ onMounted(()=>{
 // const { pdf, pages } = usePDF(currentPdf)
 </script>
 
-<style lang="scss" >
-</style>
+<style lang="scss"></style>

+ 14 - 10
src/views/project/list/index.vue

@@ -114,6 +114,11 @@
             <dict-tag :options="sys_area" :value="scope.row.area" />
           </template>
         </el-table-column>
+        <el-table-column prop="qiuquan" label="丘权号" width="160" />
+
+        <el-table-column prop="addr" label="地址(公安门牌)"  />
+        <el-table-column prop="buildUnit" label="建设单位(或申请单位)"  />
+        <el-table-column prop="community" label="小区" width="100" />
         <el-table-column prop="ecode" label="电子档案编号" width="190">
           <template #default="scope">
             <div style="display: flex; justify-content: space-between">
@@ -138,18 +143,15 @@
                   v-if="scope.row.status != '1'"
                 >
                   <dict-tag :options="sys_project_status" :value="scope.row.status"
-                /></el-tag>
+                  /></el-tag>
               </el-tooltip>
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="qiuquan" label="丘权号" width="160" />
-        <el-table-column prop="buildUnit" label="建设单位(或申请单位)" width="200" />
-        <el-table-column prop="achievementDate" label="建档日期" width="110" />
         <el-table-column prop="saveAddr" label="存档位置" width="100" />
-        <el-table-column prop="addr" label="地址(公安门牌)" width="180" />
-        <el-table-column prop="community" label="小区" width="100" />
-        <el-table-column prop="remark" label="备注" width="180" />
+        <el-table-column prop="achievementDate" label="建档日期" width="110" />
+
+        <el-table-column prop="remark" label="备注"  />
         <el-table-column prop="address" label="操作">
           <template #default="scope">
             <div
@@ -172,7 +174,7 @@
                 >
               </div>
               <div
-                v-if="scope.row.status != '2' &&  status != '0'"
+                v-if="  status != '0'"
                 v-hasPermi="['filemanager.project.edit']"
 
               >
@@ -232,10 +234,12 @@
               <div style="float: right;">
                  <el-button type="primary" icon="DArrowRight" :disabled="ccindex+1>=filelist.length" @click="fileindexlook(ccindex+1)"></el-button>
               </div>
+
+             <el-button v-hasPermi="['filemanager.project.file.download']" v-if="(currentfile.fileSuffix+'').indexOf('pdf')==-1" type="primary" style="position:absolute;right: 0;top: -30vh;z-index: 11" @click="printfile(currentfile)">打印</el-button>
+
            </el-affix>
             <pdfview :src="currentfile.url" :ispic="(currentfile.fileSuffix+'').indexOf('pdf')==-1"  :isprint="hsp('filemanager.project.file.download')?1:0" :size="currentfile.size"></pdfview>
 
-            <el-button v-hasPermi="['filemanager.project.file.download']" v-if="(currentfile.fileSuffix+'').indexOf('pdf')==-1" type="primary" style="position:absolute;right: 0;top: 0;z-index: 11" @click="printfile(currentfile)">打印</el-button>
 
           <div  v-if=" hsp('filemanager.project.file.download')?false:true" style="position:absolute;right: 0px;top: 0px;z-index: 11;width:120px;height: 50px;background: #323639"   ></div>
 
@@ -380,7 +384,7 @@
         </el-table-column>
          <el-table-column prop="createTime" label="上传时间" width="180">
         </el-table-column>
-        <el-table-column prop="date" label="操作" width="200">
+        <el-table-column prop="date" label="操作" fixed="right" width="200">
           <template #default="scope">
              <div style="display: flex;gap:5px">
                <div> <el-button type="danger" v-hasPermi="['filemanager.project.file.delete']" v-if="status != '0'"  text size="small" @click="filedel(scope.row)">删除</el-button></div>

+ 2 - 2
vite.config.ts

@@ -26,8 +26,8 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
       open: true,
       proxy: {
         [env.VITE_APP_BASE_API]: {
-          // target: 'http://localhost:8080',
-          target: 'https://filesystem.njdnyjs.com/api',
+          target: 'http://localhost:8080',
+          // target: 'https://filesystem.njdnyjs.com/api',
           changeOrigin: true,
           ws: true,
           rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')