yxc 2 years ago
parent
commit
1811284798

+ 6 - 6
src/views1/File/Individual/IndividualView.vue

@@ -107,20 +107,20 @@
               <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                 <template slot-scope="scope">
                   <el-button size="mini" type="text" icon="el-icon-view" @click="handlePreview(scope.row)"
-                    v-if="checkLevel(scope.row, 'view')">预览</el-button>
+                   >预览</el-button>
                   <el-dropdown size="mini">
                     <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
                     <el-dropdown-menu slot="dropdown">
                       <el-dropdown-item icon="el-icon-view" @click.native="handleShare(scope.row)"
-                        v-if="checkLevel(scope.row, 'share')">分享</el-dropdown-item>
+                       >分享</el-dropdown-item>
                       <el-dropdown-item icon="el-icon-view" @click.native="handleDownload(scope.row)"
-                        v-if="checkLevel(scope.row, 'download')">下载</el-dropdown-item>
+                      >下载</el-dropdown-item>
                       <el-dropdown-item icon="el-icon-view" @click.native="handleEdit(scope.row)"
-                        v-if="checkLevel(scope.row, 'edit')">在线编辑</el-dropdown-item>
+                       >在线编辑</el-dropdown-item>
                       <el-dropdown-item icon="el-icon-edit" @click.native="handleUpdate(scope.row)"
-                        v-hasPermi="['doc:info:edit']" v-if="checkLevel(scope.row, 'modify')">修改</el-dropdown-item>
+                        v-hasPermi="['doc:info:edit']" >修改</el-dropdown-item>
                       <el-dropdown-item icon="el-icon-delete" @click.native="handleDelete(scope.row)"
-                        v-hasPermi="['doc:info:remove']" v-if="checkLevel(scope.row, 'del')">删除</el-dropdown-item>
+                        v-hasPermi="['doc:info:remove']">删除</el-dropdown-item>
                     </el-dropdown-menu>
                   </el-dropdown>
                 </template>

+ 3 - 2
src/views1/Page/LeftMores/LeftMoresView.vue

@@ -44,7 +44,6 @@
               :data="msgList"
               @selection-change="handleSelectionChange"
             >
-              <el-table-column type="selection" width="55" align="center" />
               <el-table-column label="通知标题" align="center" prop="msgTitle" />
               <el-table-column label="通知内容" align="center">
               <template slot-scope="scope">
@@ -127,6 +126,8 @@
       
       <script>
   import "@/styles1/element-ui1.scss";
+
+  import { delShare1, delShare2, notice, msg } from "@/api/doc/share1";
   
   import {
     listMsg,
@@ -236,7 +237,7 @@
       /** 查询系统通知列表 */
       getList() {
         this.loading = true;
-        listMsg(this.queryParams).then((response) => {
+        notice(this.queryParams).then((response) => {
           this.msgList = response.rows;
           this.total = response.total;
           this.loading = false;

+ 327 - 131
src/views1/Page/More/More2View.vue

@@ -66,20 +66,20 @@
                 <el-table-column label="文件类型" align="center" prop="docType" />
                 <el-table-column prop="docLevel" label="文件级别" width="80" :formatter="fileLevelData">
           </el-table-column>
-                <el-table-column
-                  label="标签"
-                  align="center"
-                  prop="tagName"
-                  width="250"
-                >
-                  <template slot-scope="scope">
-                    <div v-if="scope.row.tagList != []">
-                      <el-tag v-for="item in scope.row.tagList" :key="item.tagId">
-                        {{ item.tagName }}
-                      </el-tag>
-                    </div>
-                  </template>
-                </el-table-column>
+          <el-table-column
+                label="标签"
+                align="center"
+                prop="tagName"
+                width="250"
+              >
+                <template slot-scope="scope">
+                  <div v-if="scope.row.tagList != []">
+                    <el-tag v-for="item in scope.row.tagList" :key="item.tagId">
+                      {{ item.tagName }}
+                    </el-tag>
+                  </div>
+                </template>
+              </el-table-column>
                 <el-table-column
                   label="操作"
                   align="center"
@@ -119,93 +119,66 @@
             </el-col>
           </el-row>
   
-          <!-- 添加或修改文件基本信息对话框 -->
-          <el-dialog
-            :title="title"
-            :visible.sync="open"
-            width="500px"
-            append-to-body
-            custom-class="el-dialog5"
-          >
-            <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-              <el-form-item label="" prop="docPath">
-                <!-- <el-input v-model="form.docPath" placeholder="请输入文件路径" /> -->
-                <file-upload v-model="form.docPath" />
-              </el-form-item>
-              <el-form-item label="文件目录" prop="dirId">
-                <treeselect
-                  v-model="form.dirId"
-                  :options="dirList"
-                  :normalizer="normalizer"
-                  placeholder="请选择文件目录"
-                />
-              </el-form-item>
-              <el-form-item label="文件名称" prop="docName">
-                <el-input v-model="form.docName" placeholder="请输入文件名称" />
-              </el-form-item>
-              <el-form-item label="文件级别" prop="docLevel">
-                <el-select v-model="form.docLevel" placeholder="请选择文件级别">
-                  <el-option
-                    v-for="item in levelOptions"
-                    :key="item.levelId"
-                    :label="item.levelName"
-                    :value="item.levelId"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="选择标签(最多5个)" prop="tagName" color="red">
-                <el-tag
-                  :key="tag"
-                  v-for="tag in dynamicTags"
-                  closable
-                  :disable-transitions="false"
-                  @close="handleClose(tag)"
-                >
-                  {{ tag }}
-                </el-tag>
-                <el-input
-                  class="input-new-tag"
-                  v-if="inputVisible"
-                  v-model="inputValue"
-                  ref="saveTagInput"
-                  size="small"
-                  @keyup.enter.native="handleInputConfirm"
-                  @blur="handleInputConfirm"
-                  maxlength="5"
-                  placeholder="最多输入五个字"
-                >
-                </el-input>
-                <el-button
-                  v-else
-                  class="button-new-tag"
-                  size="small"
-                  @click="showInput"
-                  >添加标签</el-button
-                >
-              </el-form-item>
-              <el-form-item label="文件标签" color="red">
-                <el-tag
-                  v-for="tag in tags"
-                  :key="tag.tagName"
-                  :type="tag.type"
-                  @click="handleInputConfirm1(tag)"
-                >
-                  {{ tag.tagName }}
-                </el-tag>
-              </el-form-item>
-              <el-form-item label="文件描述">
-                <el-input
-                  v-model="form.docDesc"
-                  type="textarea"
-                  placeholder="请输入内容"
-                />
-              </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitForm">确 定</el-button>
-              <el-button @click="cancel">取 消</el-button>
-            </div>
-          </el-dialog>
+           <!-- 添加或修改文件基本信息对话框 -->
+           <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body custom-class="el-dialog5">
+          <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+            <el-form-item label="" prop="docPath">
+              <!-- <el-input v-model="form.docPath" placeholder="请输入文件路径" /> -->
+              <file-upload v-model="form.docPath" />
+            </el-form-item>
+            <el-form-item label="文件目录" prop="dirId">
+              <treeselect v-model="form.dirId" :options="dirList" :normalizer="normalizer" placeholder="请选择文件目录" />
+            </el-form-item>
+            <el-form-item label="文件名称" prop="docName">
+              <el-input v-model="form.docName" placeholder="请输入文件名称" />
+            </el-form-item>
+            <el-form-item label="文件级别" prop="docLevel">
+              <el-select v-model="form.docLevel" placeholder="请选择文件级别">
+                <el-option v-for="item in levelOptions" :key="item.levelId" :label="item.levelName"
+                  :value="item.levelId"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="选择标签(最多5个)" prop="tagName" color="red">
+              <el-tag :key="tag" v-for="tag in dynamicTags" closable :disable-transitions="false"
+                @close="handleClose(tag)">
+                {{ tag }}
+              </el-tag>
+              <el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
+                @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" maxlength="5" placeholder="最多输入五个字">
+              </el-input>
+              <el-button v-else class="button-new-tag" size="small" @click="showInput">添加标签</el-button>
+            </el-form-item>
+            <el-form-item label="文件标签" color="red">
+              <el-tag v-for="tag in tags" :key="tag.tagName" :type="tag.type" @click="handleInputConfirm1(tag)">
+                {{ tag.tagName }}
+              </el-tag>
+            </el-form-item>
+            <el-form-item label="文件描述">
+              <el-input v-model="form.docDesc" type="textarea" placeholder="请输入内容" />
+            </el-form-item>
+          </el-form>
+          <div slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="submitForm">确 定</el-button>
+            <el-button @click="cancel">取 消</el-button>
+          </div>
+        </el-dialog>
+
+        <!-- 预览对话框 -->
+        <div class="dhk" v-if="preview">
+          <video :src="vid" controls v-if="vid1"></video>
+          <audio :src="aud" controls v-if="aud1"></audio>
+
+          <div class="image-container" v-if="img1">
+            <el-image :src="imgg" ref="imageRef" style="max-width: 100%" @mousewheel.prevent="gunlun" />
+            <el-button-group>
+              <el-button icon="el-icon-refresh-left" @click="rotate(-90)" title="向左旋转"></el-button>
+              <el-button icon="el-icon-refresh-right" @click="rotate(90)" title="向右旋转"></el-button>
+              <el-button icon="el-icon-zoom-in" @click="scale(0.1)" title="放大"></el-button>
+              <el-button icon="el-icon-zoom-out" @click="scale(-0.1)" title="缩小"></el-button>
+            </el-button-group>
+          </div>
+          <el-button class="gb" icon="el-icon-close" circle @click="gb" />
+        </div>
   
         </div>
       </div>
@@ -247,6 +220,22 @@
     },
     data() {
       return {
+         //预览图片的旋转缩放
+       scalePercentage: 1,
+        rotationAngle: 0,
+
+        // 预览界面
+        preview: false,
+
+        //视频路径和显示
+        vid: "",
+        vid1: false,
+        //音频路径和显示
+        aud: "",
+        aud1: false,
+        //图片路径和显示
+        imgg: "",
+        img1: false,
     //文件等级数据
     levelOptions: [],
 
@@ -335,6 +324,7 @@
     },
     mounted() {
       this.getLists();
+
     },
   
     watch: {
@@ -354,6 +344,39 @@
           this.tableData1 = response.rows;
         });
       },
+      // 滚轮滑动放大缩小
+ gunlun(e) {
+        const image = this.$refs.imageRef.$el.querySelector("img");
+        if (e.deltaY > 0) {
+          // console.log("鼠标向下滚动,图片缩小");
+          this.scalePercentage -= 0.1;
+          image.style.transform = `scale(${this.scalePercentage})`;
+        } else {
+          // console.log("鼠标向上滚动,图片放大");
+          this.scalePercentage += 0.1;
+          image.style.transform = `scale(${this.scalePercentage})`;
+        }
+      },
+
+
+      //预览图片的旋转
+      rotate(angle) {
+        this.rotationAngle += angle;
+        const image = this.$refs.imageRef.$el.querySelector("img");
+        image.style.transform = `rotate(${this.rotationAngle}deg)`;
+        console.log(image.style.transform);
+      },
+      //预览图片的缩放
+      scale(delta) {
+        this.scalePercentage += delta;
+        const image = this.$refs.imageRef.$el.querySelector("img");
+        image.style.transform = `scale(${this.scalePercentage})`;
+      },
+
+      // 预览关闭
+      gb() {
+        this.preview = false;
+      },
   
       //选择标签关闭
       handleClose(tag) {
@@ -445,29 +468,85 @@
         this.handleQuery();
       },
   
+     //分享
+   handleShare(row) {
+        this.$router.push("/home/file/individual/share/user/" + row.docId);
+      },
       /**下载按钮操作*/
       handleDownload(row) {
         location.href = row.docPath;
       },
-  
-  
-      //预览
-      handlePreview(row) {
-        row.isEdit = false;
-            this.$tab.openPage(
-              window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
-                '_blank'),
-            );
+
+    // 检验关闭
+    gb1() {
+      this.check = false;
+    },
+
+    // 是否机密
+    // isSecretRole(row) {
+    //   // console.log(`row=${row}`);
+    //   if (row.isSecret == "是") {
+    //     this.check = true;
+    //     this.currentRow = row;
+    //   }
+    // },
+   //预览
+   handlePreview(row) {
+        // console.log(row);
+        // console.log( this.$route.meta.title);
+        // row.isEdit = false;
+        // this.$tab.openPage(
+        //   // "文件[" + row.docName + "]预览",
+        // document.title = row.docName,
+        //   // window.open("/individual/Pre/user/" + row.docId, '_blank'),
+        //   // row
+        // );
+
+        //图片后缀名
+        var pictures = ['jpeg', 'tiff', 'raw', 'bmp', 'gif', 'png', 'jpg'];
+        //音频后缀名
+        var audios = ['mid', 'mp3', 'wav', 'wma', 'ra', 'ogg', 'flac', 'aac', 'ape'];
+        //视频后缀名
+        var videos = ['asf', 'avi', 'mp4', 'ogm', 'ifo', 'mpg', 'mov', 'mpeg', 'mpg', 'vob', 'wmv', 'rm', 'rmvb'];
+
+        //判断后缀名
+        if (videos.some(item => item == row.docType)) {
+          this.preview = true;
+          this.vid1 = true;
+          this.aud1 = false;
+          this.img1 = false;
+          this.vid = row.docPath;
+        } else if (audios.some(item => item == row.docType)) {
+          this.preview = true;
+          this.aud1 = true;
+          this.vid1 = false;
+          this.img1 = false;
+          this.aud = row.docPath;
+        } else if (pictures.some(item => item == row.docType)) {
+          this.preview = true;
+          this.aud1 = false;
+          this.vid1 = false;
+          this.img1 = true;
+          this.imgg = row.docPath;
+        } else {
+          row.isEdit = false;
+          this.$tab.openPage(
+            window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
+              '_blank'),
+            // window.open("/individual/Pre/user/" + row.docId +"/title/"+ row.docName, '_blank'),
+          );
+          // console.log(111);
+        }
+        // console.log(row.docPath);
+        // console.log(vid);
       },
-  
+
       //在线编辑
       handleEdit(row) {
         row.isEdit = true;
         this.$tab.openPage(
-          window.open(
-            "/individual/Pre/user/" + row.docId + "?row=" + JSON.stringify(row),
-            "_blank"
-          )
+          window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
+            '_blank')
         );
       },
       //先获取左边目录树,拿到目录ID和spaceId才能查询
@@ -587,7 +666,7 @@
       handleUpdate(row) {
         this.reset();
         const docId = row.docId || this.ids;
-        getInfo(docId, row.createYear).then((response) => {
+        getInfo(docId, row.docYear).then((response) => {
           this.form = response.data;
           this.open = true;
           this.title = "修改文件基本信息";
@@ -727,32 +806,70 @@
         }
       }
     }
-    //机密验证界面
-    .jm {
-      width: calc(100vw * (530 / 1920));
-      height: calc(100vh * (370 / 1080));
+
+//预览弹窗
+.dhk {
+      width: calc(100vw * (1200 / 1920));
+      height: calc(100vh * (850 / 1080));
       // background: salmon;
-      background: url(../../../assets/img/Group-585.png);
-      background-size: calc(100vw * (530 / 1920)) calc(100vh * (370 / 1080));
-      padding-top: calc(100vw * (50 / 1920));
+      background: #0F1540FF;
       position: absolute;
-      top: 25%;
-      left: 35%;
+      top: 10%;
+      left: 20%;
       z-index: 99;
       display: flex;
-      // justify-content: center;
+      justify-content: center;
       align-items: center;
-      .gb1 {
+
+      .gb {
         position: absolute;
-        top: 10%;
-        right: 8%;
+        top: 0;
+        right: 0;
+      }
+
+      video {
+        width: calc(100vw * (1440 / 1920));
+        height: calc(100vh * (810 / 1080));
+      }
+
+      .el-image {
+        width: calc(100vw * (960 / 1920));
+        height: calc(100vh * (720 / 1080));
       }
+
       .el-button-group {
         position: absolute;
-        top: 10%;
-        right: 1%;
+        bottom: 0;
+        left: 35%;
       }
     }
+
+    //机密验证界面
+    // .jm {
+    //   width: calc(100vw * (530 / 1920));
+    //   height: calc(100vh * (370 / 1080));
+    //   // background: salmon;
+    //   background: url(../../../assets/img/Group-585.png);
+    //   background-size: calc(100vw * (530 / 1920)) calc(100vh * (370 / 1080));
+    //   padding-top: calc(100vw * (50 / 1920));
+    //   position: absolute;
+    //   top: 25%;
+    //   left: 35%;
+    //   z-index: 99;
+    //   display: flex;
+    //   // justify-content: center;
+    //   align-items: center;
+    //   .gb1 {
+    //     position: absolute;
+    //     top: 10%;
+    //     right: 8%;
+    //   }
+    //   .el-button-group {
+    //     position: absolute;
+    //     top: 10%;
+    //     right: 1%;
+    //   }
+    // }
   }
   
   //标签按钮
@@ -826,5 +943,84 @@
     border: none;
     color: #2e8aec;
   }
+
+  //新增/修改弹窗样式
+  ::v-deep .el-dialog__title {
+    color: white;
+  }
+
+  ::v-deep .el-dialog .el-form-item {
+    margin-top: calc(100vw * (30 / 1920));
+  }
+
+  ::v-deep .el-upload-list__item:hover {
+    background: #002659ff;
+  }
+
+  //建议框样式
+  ::v-deep .el-textarea__inner {
+    background: transparent;
+    resize: none;
+  }
+
+  //传文件的内容颜色
+  ::v-deep .el-link.el-link--default {
+    color: #006c9aff;
+  }
+  //上传弹窗位置高度
+  ::v-deep .el-dialog:not(.is-fullscreen) {
+    margin-top: 1vh !important;
+  }
+
+//弹窗
+::v-deep .el-dialog5 {
+    width: calc(100vw * (800 / 1920)) !important;
+    height: calc(100vh * (1050 / 1080)) !important;
+    background: url(../../../assets/img/Group-585.png);
+    background-size: calc(100vw * (800 / 1920)) calc(100vh * (1050 / 1080));
+
+    //弹窗中间内容
+    .el-dialog__body {
+      // width: calc(100vw * (620 / 1920)) ;
+      height: calc(100vh * (780 / 1080));
+      margin-top: calc(100vh * (50 / 1080));
+      margin-bottom: calc(100vh * (20 / 1080));
+      padding-right: 50px;
+      overflow: auto;
+      // background: salmon;
+    }
+
+    .el-dialog__header {
+      padding-bottom: 0;
+    }
+
+    .el-upload__tip {
+      font-size: 12px;
+      color: #006c9aff;
+      margin-top: 0px;
+    }
+
+    .el-upload-list__item {
+      margin: 0;
+    }
+
+    .el-tag+.el-tag {
+      margin-left: 10px;
+    }
+
+    .button-new-tag {
+      margin-left: 10px;
+      height: 32px;
+      line-height: 30px;
+      padding-top: 0;
+      padding-bottom: 0;
+    }
+
+    .input-new-tag {
+      width: 90px;
+      margin-left: 10px;
+      vertical-align: bottom;
+    }
+  }
   </style>
   

+ 290 - 109
src/views1/Page/More/MoreView.vue

@@ -119,86 +119,42 @@
           </el-col>
         </el-row>
 
-        <!-- 添加或修改文件基本信息对话框 -->
-        <el-dialog
-          :title="title"
-          :visible.sync="open"
-          width="500px"
-          append-to-body
-          custom-class="el-dialog5"
-        >
+         <!-- 添加或修改文件基本信息对话框 -->
+         <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body custom-class="el-dialog5">
           <el-form ref="form" :model="form" :rules="rules" label-width="80px">
             <el-form-item label="" prop="docPath">
               <!-- <el-input v-model="form.docPath" placeholder="请输入文件路径" /> -->
               <file-upload v-model="form.docPath" />
             </el-form-item>
             <el-form-item label="文件目录" prop="dirId">
-              <treeselect
-                v-model="form.dirId"
-                :options="dirList"
-                :normalizer="normalizer"
-                placeholder="请选择文件目录"
-              />
+              <treeselect v-model="form.dirId" :options="dirList" :normalizer="normalizer" placeholder="请选择文件目录" />
             </el-form-item>
             <el-form-item label="文件名称" prop="docName">
               <el-input v-model="form.docName" placeholder="请输入文件名称" />
             </el-form-item>
             <el-form-item label="文件级别" prop="docLevel">
               <el-select v-model="form.docLevel" placeholder="请选择文件级别">
-                <el-option
-                  v-for="item in levelOptions"
-                  :key="item.levelId"
-                  :label="item.levelName"
-                  :value="item.levelId"
-                ></el-option>
+                <el-option v-for="item in levelOptions" :key="item.levelId" :label="item.levelName"
+                  :value="item.levelId"></el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="选择标签(最多5个)" prop="tagName" color="red">
-              <el-tag
-                :key="tag"
-                v-for="tag in dynamicTags"
-                closable
-                :disable-transitions="false"
-                @close="handleClose(tag)"
-              >
+              <el-tag :key="tag" v-for="tag in dynamicTags" closable :disable-transitions="false"
+                @close="handleClose(tag)">
                 {{ tag }}
               </el-tag>
-              <el-input
-                class="input-new-tag"
-                v-if="inputVisible"
-                v-model="inputValue"
-                ref="saveTagInput"
-                size="small"
-                @keyup.enter.native="handleInputConfirm"
-                @blur="handleInputConfirm"
-                maxlength="5"
-                placeholder="最多输入五个字"
-              >
+              <el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
+                @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" maxlength="5" placeholder="最多输入五个字">
               </el-input>
-              <el-button
-                v-else
-                class="button-new-tag"
-                size="small"
-                @click="showInput"
-                >添加标签</el-button
-              >
+              <el-button v-else class="button-new-tag" size="small" @click="showInput">添加标签</el-button>
             </el-form-item>
             <el-form-item label="文件标签" color="red">
-              <el-tag
-                v-for="tag in tags"
-                :key="tag.tagName"
-                :type="tag.type"
-                @click="handleInputConfirm1(tag)"
-              >
+              <el-tag v-for="tag in tags" :key="tag.tagName" :type="tag.type" @click="handleInputConfirm1(tag)">
                 {{ tag.tagName }}
               </el-tag>
             </el-form-item>
             <el-form-item label="文件描述">
-              <el-input
-                v-model="form.docDesc"
-                type="textarea"
-                placeholder="请输入内容"
-              />
+              <el-input v-model="form.docDesc" type="textarea" placeholder="请输入内容" />
             </el-form-item>
           </el-form>
           <div slot="footer" class="dialog-footer">
@@ -207,6 +163,23 @@
           </div>
         </el-dialog>
 
+        <!-- 预览对话框 -->
+        <div class="dhk" v-if="preview">
+          <video :src="vid" controls v-if="vid1"></video>
+          <audio :src="aud" controls v-if="aud1"></audio>
+
+          <div class="image-container" v-if="img1">
+            <el-image :src="imgg" ref="imageRef" style="max-width: 100%" @mousewheel.prevent="gunlun" />
+            <el-button-group>
+              <el-button icon="el-icon-refresh-left" @click="rotate(-90)" title="向左旋转"></el-button>
+              <el-button icon="el-icon-refresh-right" @click="rotate(90)" title="向右旋转"></el-button>
+              <el-button icon="el-icon-zoom-in" @click="scale(0.1)" title="放大"></el-button>
+              <el-button icon="el-icon-zoom-out" @click="scale(-0.1)" title="缩小"></el-button>
+            </el-button-group>
+          </div>
+          <el-button class="gb" icon="el-icon-close" circle @click="gb" />
+        </div>
+
         <!-- 是否机密文件 -->
         <!-- <div class="jm" v-if="check">
           <el-form
@@ -285,6 +258,22 @@ export default {
   },
   data() {
     return {
+       //预览图片的旋转缩放
+       scalePercentage: 1,
+        rotationAngle: 0,
+
+        // 预览界面
+        preview: false,
+
+        //视频路径和显示
+        vid: "",
+        vid1: false,
+        //音频路径和显示
+        aud: "",
+        aud1: false,
+        //图片路径和显示
+        imgg: "",
+        img1: false,
         //文件等级数据
         levelOptions: [],
       // //机密文件的账号密码内容
@@ -388,6 +377,7 @@ export default {
   },
   mounted() {
     this.getLists();
+    
   },
 
   watch: {
@@ -401,7 +391,7 @@ export default {
   methods: {
     //底部表格数据
     getLists() {
-      //左边表格
+      //表格
       delShare1(this.queryParams).then((response) => {
         // console.log(response.rows,'111111111');
         // 给定义的列表空数组赋值
@@ -415,7 +405,39 @@ export default {
         // console.log(newisSecret);
       });
     },
+ // 滚轮滑动放大缩小
+ gunlun(e) {
+        const image = this.$refs.imageRef.$el.querySelector("img");
+        if (e.deltaY > 0) {
+          // console.log("鼠标向下滚动,图片缩小");
+          this.scalePercentage -= 0.1;
+          image.style.transform = `scale(${this.scalePercentage})`;
+        } else {
+          // console.log("鼠标向上滚动,图片放大");
+          this.scalePercentage += 0.1;
+          image.style.transform = `scale(${this.scalePercentage})`;
+        }
+      },
 
+
+      //预览图片的旋转
+      rotate(angle) {
+        this.rotationAngle += angle;
+        const image = this.$refs.imageRef.$el.querySelector("img");
+        image.style.transform = `rotate(${this.rotationAngle}deg)`;
+        console.log(image.style.transform);
+      },
+      //预览图片的缩放
+      scale(delta) {
+        this.scalePercentage += delta;
+        const image = this.$refs.imageRef.$el.querySelector("img");
+        image.style.transform = `scale(${this.scalePercentage})`;
+      },
+
+      // 预览关闭
+      gb() {
+        this.preview = false;
+      },
     //选择标签关闭
     handleClose(tag) {
       this.form.tagList.map((i, index) => {
@@ -506,10 +528,14 @@ export default {
       this.handleQuery();
     },
 
-    /**下载按钮操作*/
-    handleDownload(row) {
-      location.href = row.docPath;
-    },
+   //分享
+   handleShare(row) {
+        this.$router.push("/home/file/individual/share/user/" + row.docId);
+      },
+      /**下载按钮操作*/
+      handleDownload(row) {
+        location.href = row.docPath;
+      },
 
     // 检验关闭
     gb1() {
@@ -524,25 +550,65 @@ export default {
     //     this.currentRow = row;
     //   }
     // },
-    //预览
-    handlePreview(row) {
-      row.isEdit = false;
+   //预览
+   handlePreview(row) {
+        // console.log(row);
+        // console.log( this.$route.meta.title);
+        // row.isEdit = false;
+        // this.$tab.openPage(
+        //   // "文件[" + row.docName + "]预览",
+        // document.title = row.docName,
+        //   // window.open("/individual/Pre/user/" + row.docId, '_blank'),
+        //   // row
+        // );
+
+        //图片后缀名
+        var pictures = ['jpeg', 'tiff', 'raw', 'bmp', 'gif', 'png', 'jpg'];
+        //音频后缀名
+        var audios = ['mid', 'mp3', 'wav', 'wma', 'ra', 'ogg', 'flac', 'aac', 'ape'];
+        //视频后缀名
+        var videos = ['asf', 'avi', 'mp4', 'ogm', 'ifo', 'mpg', 'mov', 'mpeg', 'mpg', 'vob', 'wmv', 'rm', 'rmvb'];
+
+        //判断后缀名
+        if (videos.some(item => item == row.docType)) {
+          this.preview = true;
+          this.vid1 = true;
+          this.aud1 = false;
+          this.img1 = false;
+          this.vid = row.docPath;
+        } else if (audios.some(item => item == row.docType)) {
+          this.preview = true;
+          this.aud1 = true;
+          this.vid1 = false;
+          this.img1 = false;
+          this.aud = row.docPath;
+        } else if (pictures.some(item => item == row.docType)) {
+          this.preview = true;
+          this.aud1 = false;
+          this.vid1 = false;
+          this.img1 = true;
+          this.imgg = row.docPath;
+        } else {
+          row.isEdit = false;
           this.$tab.openPage(
             window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
               '_blank'),
+            // window.open("/individual/Pre/user/" + row.docId +"/title/"+ row.docName, '_blank'),
           );
-    },
+          // console.log(111);
+        }
+        // console.log(row.docPath);
+        // console.log(vid);
+      },
 
-    //在线编辑
-    handleEdit(row) {
-      row.isEdit = true;
-      this.$tab.openPage(
-        window.open(
-          "/individual/Pre/user/" + row.docId + "?row=" + JSON.stringify(row),
-          "_blank"
-        )
-      );
-    },
+      //在线编辑
+      handleEdit(row) {
+        row.isEdit = true;
+        this.$tab.openPage(
+          window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
+            '_blank')
+        );
+      },
     //先获取左边目录树,拿到目录ID和spaceId才能查询
     dirTree() {
       this.loading = true;
@@ -664,17 +730,16 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
-      const docId = row.docId || this.ids;
-      getInfo(docId, row.createYear).then((response) => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改文件基本信息";
-        this.dynamicTags = this.form.tagList.map((item) => item.tagName);
-        // console.log(this.dynamicTags);
-        // console.log(this.form);
-      });
-    },
+        this.reset();
+        const docId = row.docId || this.ids;
+        getInfo(docId, row.docYear).then((response) => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改文件基本信息";
+          this.dynamicTags = this.form.tagList.map(item => item.tagName);
+          this.form.dirId=this.dirList[0].dirId;
+        });
+      },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate((valid) => {
@@ -847,32 +912,69 @@ export default {
       }
     }
   }
-  //机密验证界面
-  .jm {
-    width: calc(100vw * (530 / 1920));
-    height: calc(100vh * (370 / 1080));
-    // background: salmon;
-    background: url(../../../assets/img/Group-585.png);
-    background-size: calc(100vw * (530 / 1920)) calc(100vh * (370 / 1080));
-    padding-top: calc(100vw * (50 / 1920));
-    position: absolute;
-    top: 25%;
-    left: 35%;
-    z-index: 99;
-    display: flex;
-    // justify-content: center;
-    align-items: center;
-    .gb1 {
-      position: absolute;
-      top: 10%;
-      right: 8%;
-    }
-    .el-button-group {
+
+  //预览弹窗
+  .dhk {
+      width: calc(100vw * (1200 / 1920));
+      height: calc(100vh * (850 / 1080));
+      // background: salmon;
+      background: #0F1540FF;
       position: absolute;
       top: 10%;
-      right: 1%;
+      left: 20%;
+      z-index: 99;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+
+      .gb {
+        position: absolute;
+        top: 0;
+        right: 0;
+      }
+
+      video {
+        width: calc(100vw * (1440 / 1920));
+        height: calc(100vh * (810 / 1080));
+      }
+
+      .el-image {
+        width: calc(100vw * (960 / 1920));
+        height: calc(100vh * (720 / 1080));
+      }
+
+      .el-button-group {
+        position: absolute;
+        bottom: 0;
+        left: 35%;
+      }
     }
-  }
+  //机密验证界面
+  // .jm {
+  //   width: calc(100vw * (530 / 1920));
+  //   height: calc(100vh * (370 / 1080));
+  //   // background: salmon;
+  //   background: url(../../../assets/img/Group-585.png);
+  //   background-size: calc(100vw * (530 / 1920)) calc(100vh * (370 / 1080));
+  //   padding-top: calc(100vw * (50 / 1920));
+  //   position: absolute;
+  //   top: 25%;
+  //   left: 35%;
+  //   z-index: 99;
+  //   display: flex;
+  //   // justify-content: center;
+  //   align-items: center;
+  //   .gb1 {
+  //     position: absolute;
+  //     top: 10%;
+  //     right: 8%;
+  //   }
+  //   .el-button-group {
+  //     position: absolute;
+  //     top: 10%;
+  //     right: 1%;
+  //   }
+  // }
 }
 
 //标签按钮
@@ -946,4 +1048,83 @@ export default {
   border: none;
   color: #2e8aec;
 }
+
+  //新增/修改弹窗样式
+  ::v-deep .el-dialog__title {
+    color: white;
+  }
+
+  ::v-deep .el-dialog .el-form-item {
+    margin-top: calc(100vw * (30 / 1920));
+  }
+
+  ::v-deep .el-upload-list__item:hover {
+    background: #002659ff;
+  }
+
+  //建议框样式
+  ::v-deep .el-textarea__inner {
+    background: transparent;
+    resize: none;
+  }
+
+  //传文件的内容颜色
+  ::v-deep .el-link.el-link--default {
+    color: #006c9aff;
+  }
+  //上传弹窗位置高度
+  ::v-deep .el-dialog:not(.is-fullscreen) {
+    margin-top: 1vh !important;
+  }
+
+//弹窗
+::v-deep .el-dialog5 {
+    width: calc(100vw * (800 / 1920)) !important;
+    height: calc(100vh * (1050 / 1080)) !important;
+    background: url(../../../assets/img/Group-585.png);
+    background-size: calc(100vw * (800 / 1920)) calc(100vh * (1050 / 1080));
+
+    //弹窗中间内容
+    .el-dialog__body {
+      // width: calc(100vw * (620 / 1920)) ;
+      height: calc(100vh * (780 / 1080));
+      margin-top: calc(100vh * (50 / 1080));
+      margin-bottom: calc(100vh * (20 / 1080));
+      padding-right: 50px;
+      overflow: auto;
+      // background: salmon;
+    }
+
+    .el-dialog__header {
+      padding-bottom: 0;
+    }
+
+    .el-upload__tip {
+      font-size: 12px;
+      color: #006c9aff;
+      margin-top: 0px;
+    }
+
+    .el-upload-list__item {
+      margin: 0;
+    }
+
+    .el-tag+.el-tag {
+      margin-left: 10px;
+    }
+
+    .button-new-tag {
+      margin-left: 10px;
+      height: 32px;
+      line-height: 30px;
+      padding-top: 0;
+      padding-bottom: 0;
+    }
+
+    .input-new-tag {
+      width: 90px;
+      margin-left: 10px;
+      vertical-align: bottom;
+    }
+  }
 </style>

+ 60 - 40
src/views1/Page/PageView.vue

@@ -25,16 +25,12 @@
       </div>
       <div class="cen">
         <div class="cen—top">
-          <!-- <el-dropdown class="cen—top-left">
-            <span class="el-dropdown-link">
-              全部文档<i class="el-icon-caret-bottom el-icon--right"></i>
-            </span>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item>个人文档</el-dropdown-item>
-              <el-dropdown-item>部门文档</el-dropdown-item>
-              <el-dropdown-item>公共文档</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown> -->
+          <el-select v-model="type" class="cen—top-left">
+            <el-option value="1" label="公共文档">公共文档</el-option>
+            <el-option value="2" label="部门文档">部门文档</el-option>
+            <el-option value="3" label="个人文档">个人文档</el-option>
+          </el-select>
+
           <div class="cen—top-right">
             <div class="cen—top-div">
               <el-input
@@ -115,7 +111,12 @@
           </el-table-column>
           <el-table-column prop="docType" label="文件类型" width="80">
           </el-table-column>
-          <el-table-column prop="docLevel" label="文件级别" width="80" :formatter="fileLevelData">
+          <el-table-column
+            prop="docLevel"
+            label="文件级别"
+            width="80"
+            :formatter="fileLevelData"
+          >
           </el-table-column>
           <el-table-column
             label="操作"
@@ -152,7 +153,12 @@
           </el-table-column>
           <el-table-column prop="docType" label="文件类型" width="120">
           </el-table-column>
-          <el-table-column prop="docLevel" label="文件级别" width="80" :formatter="fileLevelData">
+          <el-table-column
+            prop="docLevel"
+            label="文件级别"
+            width="80"
+            :formatter="fileLevelData"
+          >
           </el-table-column>
           <el-table-column
             label="操作"
@@ -280,8 +286,8 @@ import { delShare1, delShare2, notice, msg } from "@/api/doc/share1";
 export default {
   data() {
     return {
-        //文件等级数据
-        levelOptions: [],
+      //文件等级数据
+      levelOptions: [],
       //内容详细弹窗
       look1: false,
       //内容详细弹窗内容
@@ -291,6 +297,7 @@ export default {
       //中间消息列表
       msg: [],
       //搜索
+      type: "1",
       input: "",
       //机密文件的账号密码内容
       // loginForm: {
@@ -371,7 +378,10 @@ export default {
 
     // 搜索跳转
     jumpSearch() {
-      this.$router.push({path:"/home/retrieval",query:{datas:this.input} });
+      this.$router.push({
+        path: "/home/retrieval",
+        query: { datas: this.input, data2:this.type },
+      });
       // sessionStorage.setItem("suju", this.input);
     },
     //底部左边表格更多跳转
@@ -398,7 +408,7 @@ export default {
         // );
         // console.log(newisSecret);
       });
-      
+
       //右边边表格
       delShare2(this.queryParams).then((response) => {
         // console.log(response.rows,'111111111');
@@ -412,19 +422,19 @@ export default {
         // );
         // console.log(newisSecret);
       });
-        //获取文件级别数据
-        listLevel().then((response) => {
-            this.levelOptions = response.rows;
-          });
+      //获取文件级别数据
+      listLevel().then((response) => {
+        this.levelOptions = response.rows;
+      });
     },
 
-       /**处理文档级别数据*/
-       fileLevelData(row, col, value) {
-        try {
-          const obj = this.levelOptions.find((item) => item.levelId == value);
-          return obj.levelName;
-        } catch (e) {}
-      },
+    /**处理文档级别数据*/
+    fileLevelData(row, col, value) {
+      try {
+        const obj = this.levelOptions.find((item) => item.levelId == value);
+        return obj.levelName;
+      } catch (e) {}
+    },
     // 滚轮滑动放大缩小
     gunlun(e) {
       const image = this.$refs.imageRef.$el.querySelector("img");
@@ -527,10 +537,12 @@ export default {
         this.imgg = row.docPath;
       } else {
         row.isEdit = false;
-          this.$tab.openPage(
-            window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
-              '_blank'),
-          );
+        this.$tab.openPage(
+          window.open(
+            "/individual/Pre/user/" + row.docId + "?row=" + JSON.stringify(row),
+            "_blank"
+          )
+        );
       }
     },
     //验证账号密码
@@ -809,20 +821,20 @@ export default {
       }
     }
     .cen {
-      width: calc(100vw * (784 / 1920));
+      width: calc(100vw * (804 / 1920));
       height: calc(100vh * (600 / 1080));
       // background: aqua;
       position: relative;
       .cen—top {
-        width: calc(100vw * (633 / 1920));
+        width: calc(100vw * (700 / 1920));
         height: calc(100vh * (40 / 1080));
         // background: salmon;
         // overflow: hidden;
-        margin-left: calc(100vw * (81 / 1920));
+        margin-left: calc(100vw * (61 / 1920));
         display: flex;
         align-items: center;
         .cen—top-left {
-          width: calc(100vw * (90 / 1920));
+          width: calc(100vw * (130 / 1920));
           height: calc(100vh * (36 / 1080));
           // background: seagreen;
           margin-right: calc(100vw * (5 / 1920));
@@ -830,6 +842,14 @@ export default {
           color: #2e8aecff;
           display: flex;
           align-items: center;
+          ::v-deep .el-input--medium .el-input__inner{
+            height: 26px;
+            line-height: 26px;
+            font-size: 12px;
+          }
+          ::v-deep .el-input__suffix{
+            height: 120%;
+          }
           .el-dropdown-link {
             cursor: pointer;
             color: #409eff;
@@ -839,9 +859,9 @@ export default {
           }
         }
         .cen—top-right {
-          width: calc(100vw * (536 / 1920));
+          width: calc(100vw * (526 / 1920));
           height: calc(100vh * (36 / 1080));
-          margin-left: calc(100vw * (60 / 1920));
+          // margin-left: calc(100vw * (60 / 1920));
           // background: skyblue;
           .cen—top-div {
             position: relative;
@@ -854,7 +874,7 @@ export default {
               top: calc(100vh * (7 / 1080));
             }
             .searchs {
-              width: calc(100vw * (436 / 1920));
+              width: calc(100vw * (420 / 1920));
               ::v-deep .el-input__inner {
                 height: calc(100vh * (36 / 1080)) !important;
                 padding-left: calc(100vw * (50 / 1920));
@@ -1190,8 +1210,8 @@ export default {
   color: #ffffffcc;
 }
 //底部表格超出显示滚动条
-::v-deep .el-table--scrollable-x .el-table__body-wrapper{
- overflow: auto;
+::v-deep .el-table--scrollable-x .el-table__body-wrapper {
+  overflow: auto;
 }
 
 //通知内容详细

+ 4 - 2
src/views1/Page/RightMores/RightMoresView.vue

@@ -46,7 +46,7 @@
               :data="msgList"
               @selection-change="handleSelectionChange"
             >
-              <el-table-column type="selection" width="55" align="center" />
+              <!-- <el-table-column type="selection" width="55" align="center" /> -->
               <el-table-column label="消息标题" align="center" prop="msgTitle" />
               <el-table-column label="消息内容" align="center">
               <template slot-scope="scope">
@@ -115,6 +115,8 @@
       
       <script>
   import "@/styles1/element-ui1.scss";
+
+  import { delShare1, delShare2, notice, msg } from "@/api/doc/share1";
   
   import {
     listMsg,
@@ -202,7 +204,7 @@
       /** 查询系统消息列表 */
       getList() {
         this.loading = true;
-        listMsg(this.queryParams).then(response => {
+        msg(this.queryParams).then(response => {
           this.msgList = response.rows;
           this.total = response.total;
           this.loading = false;

+ 37 - 33
src/views1/Personal/Messages/MessagesView.vue

@@ -38,7 +38,7 @@
                 >
               </el-form-item>
             </el-form>
-
+  
             <el-row :gutter="10" class="mb8">
               <el-col :span="1.5">
                 <el-button
@@ -47,6 +47,7 @@
                   icon="el-icon-plus"
                   size="mini"
                   @click="handleAdd"
+                  v-hasPermi="['doc:msg:add']"
                   >新增</el-button
                 >
               </el-col>
@@ -58,6 +59,7 @@
                   size="mini"
                   :disabled="single"
                   @click="handleUpdate"
+                  v-hasPermi="['doc:msg:edit']"
                   >修改</el-button
                 >
               </el-col>
@@ -69,6 +71,7 @@
                   size="mini"
                   :disabled="multiple"
                   @click="handleDelete"
+                  v-hasPermi="['doc:msg:remove']"
                   >删除</el-button
                 >
               </el-col>
@@ -77,7 +80,7 @@
                 @queryTable="getList"
               ></right-toolbar>
             </el-row>
-
+  
             <el-table
               v-loading="loading"
               :data="msgList"
@@ -90,7 +93,7 @@
               <el-button size="small" @click="looks(scope.row)">查看</el-button>
               </template>
               </el-table-column>
-
+              
               <el-table-column
                 label="发布时间"
                 align="center"
@@ -122,7 +125,7 @@
                 </template>
               </el-table-column>
             </el-table>
-
+  
             <pagination
               v-show="total > 0"
               :total="total"
@@ -130,7 +133,7 @@
               :limit.sync="queryParams.pageSize"
               @pagination="getList"
             />
-
+  
             <!-- 添加或修改系统通知对话框 -->
             <el-dialog
               :title="title"
@@ -146,7 +149,7 @@
            <el-form-item label="消息内容">
              <textarea v-model="form.msgContent" cols="50px" rows="17px" style="background: transparent; color: #7ea4c8ff;border: 1px solid #006c9aff;">
 
-             </textarea>
+             </textarea>  
               </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -154,7 +157,7 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
             </el-dialog>
-
+  
             <!-- 通知内容 -->
             <el-dialog
               title="通知内容"
@@ -163,7 +166,7 @@
               custom-class="el-dialog6"
             >
               <div class="main" v-html="details">
-
+              
               </div>
               <span slot="footer" class="dialog-footer1">
                 <el-button type="primary" @click="look1 = false">确 定</el-button>
@@ -175,10 +178,10 @@
       </div>
     </div>
   </template>
-
+      
       <script>
   import "@/styles1/element-ui1.scss";
-
+  
   import {
     listMsg,
     getMsg,
@@ -186,7 +189,7 @@
     addMsg,
     updateMsg
   } from "@/api/doc/msg";
-
+  
   export default {
     name: "Msg",
     data() {
@@ -195,7 +198,7 @@
         look1: false,
         //通知内容
         details:"",
-
+  
        // 部门树选项
        deptOptions: undefined,
         // 遮罩层
@@ -366,7 +369,7 @@
     },
   };
   </script>
-
+      
       <style scoped lang='scss'>
   .containe {
     color: #7ea4c8;
@@ -453,19 +456,19 @@
           background: #016c9aa6;
           color: #2e8aec;
         }
-
+  
         ::v-deep .el-table tr {
           background: transparent;
         }
-
+  
         ::v-deep .el-table tbody tr:hover > td {
           background-color: #016c9a78 !important;
         }
-
+  
         ::v-deep .el-table td.el-table__cell {
           border-bottom: 1px solid #006c9aff;
         }
-
+  
         ::v-deep .el-table th.el-table__cell.is-leaf {
           border-bottom: 1px solid #006c9aff;
         }
@@ -497,32 +500,32 @@
       }
     }
   }
-
+  
   //新增/修改弹窗样式
   ::v-deep .el-dialog__title {
     color: white;
   }
-
+  
   ::v-deep .el-dialog .el-form-item {
     margin-top: calc(100vw * (30 / 1920));
   }
-
+  
   ::v-deep .el-upload-list__item:hover {
     background: #002659ff;
   }
-
+  
   //弹窗底部按钮的位置
   ::v-deep .el-dialog__footer {
     padding: 0;
   }
-
+  
   //弹窗关闭按钮
   ::v-deep .el-dialog__headerbtn {
     top: calc(100vh * (45 / 1080));
     right: calc(100vw * (20 / 1920));
     font-size: 20px;
   }
-
+  
   ::v-deep .el-dialog5 {
     width: calc(100vw * (800 / 1920)) !important;
     height: calc(100vh * (950 / 1080)) !important;
@@ -532,7 +535,7 @@
     ::v-deep .el-dialog:not(.is-fullscreen) {
       margin-top: 2vh !important;
     }
-
+  
     //弹窗中间内容
     .el-dialog__body {
       // width: calc(100vw * (620 / 1920)) ;
@@ -542,28 +545,28 @@
       padding-right: 50px;
       overflow: auto;
     }
-
+  
     .el-dialog__header {
       padding-bottom: 0;
     }
     .el-form-item__label {
       color: #2e8aecff;
     }
-
+  
     .el-upload__tip {
       font-size: 12px;
       color: #006c9aff;
       margin-top: 0px;
     }
-
+  
     .el-upload-list__item {
       margin: 0;
     }
-
+  
     .el-tag + .el-tag {
       margin-left: 10px;
     }
-
+  
     .button-new-tag {
       margin-left: 10px;
       height: 32px;
@@ -571,7 +574,7 @@
       padding-top: 0;
       padding-bottom: 0;
     }
-
+  
     .input-new-tag {
       width: 90px;
       margin-left: 10px;
@@ -627,6 +630,7 @@
     }
   }
   </style>
-
-
-
+      
+    
+    
+    

+ 9 - 9
src/views1/Personal/Notice/NoticeView.vue

@@ -61,11 +61,11 @@
               <el-form-item label="通知标题" prop="msgTitle">
                 <el-input v-model="form.msgTitle" placeholder="请输入通知标题" />
               </el-form-item>
-              <el-form-item label="接收对象" prop="msgAcceptList">
+              <el-form-item label="接收对象" prop="msgAcceptSelect">
                 <treeselect v-model="form.msgAcceptList" :multiple="true" :options="deptOptions" :show-count="true"
                   :disable-branch-nodes="false" placeholder="请选择部门"></treeselect>
               </el-form-item>
-              <el-form-item label="通知内容" prop="msgContent">
+              <el-form-item label="通知内容">
                 <textarea v-model="form.msgContent" cols="50px" rows="17px"
                   style="background: transparent; color: #7ea4c8ff;border: 1px solid #006c9aff;">
 
@@ -165,22 +165,22 @@
             required: true,
             message: "通知标题不能为空",
             trigger: "blur",
-          }],
+          }, ],
           msgType: [{
             required: true,
             message: "通知类型不能为空",
             trigger: "change",
-          }],
+          }, ],
           msgContent: [{
             required: true,
             message: "通知内容不能为空",
             trigger: "blur",
-          }],
-          msgAcceptList: [{
+          }, ],
+          msgAcceptType: [{
             required: true,
-            message: "接收对象不能为空",
+            message: "对象类型不能为空",
             trigger: "change",
-          }],
+          }, ],
         },
       };
     },
@@ -608,4 +608,4 @@
       overflow: auto;
     }
   }
-</style>
+</style>

+ 330 - 232
src/views1/Retrieval/RetrievalView.vue

@@ -4,16 +4,62 @@
       <img src="../../assets/img/Group 467.png" alt="" />
     </div>
     <div class="search">
-      <el-select v-model="type">
-        <el-option value="1">公共文档</el-option>
-        <el-option value="2">部门文档</el-option>
-        <el-option value="3">个人文档</el-option>
-      </el-select>
-      <el-input auto-complete="on" type="text" name="content" placeholder="请输入查询关键字" v-model="input"
-        @keyup.enter.native="searchPre"></el-input>
+      <!-- <el-select v-model="type">
+        <el-option value="1" label="公共文档">公共文档</el-option>
+        <el-option value="2" label="部门文档">部门文档</el-option>
+        <el-option value="3" label="个人文档">个人文档</el-option>
+      </el-select> -->
+      <el-input
+        auto-complete="on"
+        type="text"
+        name="content"
+        placeholder="请输入查询关键字"
+        v-model="input"
+        @keyup.enter.native="searchPre"
+      ></el-input>
       <span class="cen—top-span" @click="searchPre">快速搜索</span>
-      <img src="../../assets/img/ri:search-2-line@2x.png" class="cen—top-img" />
+      <img
+        src="../../assets/img/ri:search-2-line@2x.png"
+        class="cen—top-img"
+      />
     </div>
+
+    <div class="main1">
+      <div class="range">
+        <p class="range-p">文档范围:</p>
+        <el-radio-group v-model="type" size="small" class="range-ul" fill="#2E8AECFF" text-color="#fff">
+      <el-radio-button label="1">公共文档</el-radio-button>
+      <el-radio-button label="2">部门文档</el-radio-button>
+      <el-radio-button label="3">个人文档</el-radio-button>
+    </el-radio-group>
+      </div>
+      <!-- <div class="category">
+        <p class="range-p">文档分类:</p>
+        <ul class="range-ul">
+          <li>公共文档</li>
+          <li>部门文档</li>
+          <li>个人文档</li>
+        </ul>
+      </div> -->
+      <!-- <div class="time">
+        <span>时间选择:</span>
+        <el-checkbox-group v-model="checkList">
+          <el-checkbox label="不限"></el-checkbox>
+          <el-checkbox label="30天"></el-checkbox>
+          <el-checkbox label="7天"></el-checkbox>
+          <el-checkbox label="1天"></el-checkbox>
+          <el-date-picker
+            v-model="value1"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+          >
+          </el-date-picker>
+        </el-checkbox-group>
+      </div> -->
+    </div>
+
     <div class="mains" @scroll="handleScroll" v-if="mains_data2">
       <div v-for="item in count" :key="item.id" class="main-main">
         <div class="one" @click="docName(item.id, item.content.info)">
@@ -29,8 +75,13 @@
             {{ item.content.info.createTime }}
           </div>
         </div>
-        <div class="three" v-for="highlightFieldsContentItem in item.highlightFields.content"
-          :key="highlightFieldsContentItem.id" v-html="highlightFieldsContentItem" style="white-space: normal"></div>
+        <div
+          class="three"
+          v-for="highlightFieldsContentItem in item.highlightFields.content"
+          :key="highlightFieldsContentItem.id"
+          v-html="highlightFieldsContentItem"
+          style="white-space: normal"
+        ></div>
         <ul class="four">
           <li v-for="tagName in item.content.info.tagList" :key="tagName.id">
             {{ tagName.tagName }}
@@ -50,270 +101,317 @@
 </template>
 
 <script>
-  import {
-    ret
-  } from "@/api/doc/share1.js";
-
-  export default {
-    data() {
-      return {
-        //搜索框绑定
-        input: "",
-        type: "",
-        //搜索出来的数据
-        count: [],
-        page: 0,
-        size: 3,
-        mains_data: false,
-        mains_data2: false,
-      };
+import { ret } from "@/api/doc/share1.js";
+
+export default {
+  data() {
+    return {
+      //搜索框绑定
+      input: "",
+      type: "",
+      //搜索出来的数据
+      count: [],
+      page: 0,
+      size: 3,
+      mains_data: false,
+      mains_data2: false,
+      checkList: [],
+      value1: "",
+    };
+  },
+  created() {
+    this.input = this.$route.query.datas;
+
+    if (this.input) {
+      this.type = this.$route.query.data2;
+      this.searchs();  
+    }else{
+      this.type="1"
+    }
+  },
+  watch: {
+    $route: {
+      handler(val, oldval) {
+        this.input = this.$route.query.datas;
+        this.count = [];
+        if (this.input != "") {
+          this.searchs();
+        } else {
+          this.mains_data = true;
+          this.mains_data2 = false;
+        }
+      },
+      // 深度观察监听
+      deep: true,
+    },
+  },
+  mounted() {
+    //添加滚动条事件
+    window.addEventListener("scroll", this.handleScroll, true);
+  },
+  methods: {
+    // 点击搜索调用的方法
+    searchPre() {
+      this.$router.push({
+        path: "/home/retrieval",
+        query: { datas: this.input, data2: this.type },
+      });
     },
-    created() {
-      this.input = this.$route.query.datas;
-      if (this.input) {
+    handleScroll() {
+      const container = document.querySelector(".mains");
+      const { scrollTop, scrollHeight, clientHeight } = container;
+      // console.log('scrollHeight',scrollHeight);
+      // console.log('clientHeight',clientHeight);
+      // console.log(scrollTop);
+      // 是否达到页面底部
+      if (scrollTop + clientHeight >= scrollHeight) {
+        // console.log('滚动到底部了!')
+        this.page += 1;
+        // 执行加载
         this.searchs();
       }
     },
-    watch: {
-      $route: {
-        handler(val, oldval) {
-          this.input = this.$route.query.datas;
-          this.count = [];
-          if (this.input != "") {
-            this.searchs();
-          } else {
-            this.mains_data = true;
-            this.mains_data2 = false;
-          }
-        },
-        // 深度观察监听
-        deep: true,
-      },
-    },
-    mounted() {
-      //添加滚动条事件
-      window.addEventListener("scroll", this.handleScroll, true);
-    },
-    methods: {
-      // 点击搜索调用的方法
-      searchPre() {
-        this.$router.push("/home/retrieval?datas=" + this.input);
-      },
-      handleScroll() {
-        const container = document.querySelector(".mains");
-        const {
-          scrollTop,
-          scrollHeight,
-          clientHeight
-        } = container;
-        // console.log('scrollHeight',scrollHeight);
-        // console.log('clientHeight',clientHeight);
-        // console.log(scrollTop);
-        // 是否达到页面底部
-        if (scrollTop + clientHeight >= scrollHeight) {
-          // console.log('滚动到底部了!')
-          this.page += 1;
-          // 执行加载
-          this.searchs();
-        }
-      },
 
-      //查找返回的数据
-      searchs() {
-        ret({
-          content: this.input,
-          type: this.type,
-          page: this.page,
-          size: this.size,
-        }).then((item) => {
-          // console.log('item=',item)
-          if (item.length > 0) {
-            this.count.push(...item);
-            this.mains_data = false;
-            this.mains_data2 = true;
-          } else {
-            this.input = "";
-            this.mains_data = true;
-            this.mains_data2 = false;
-          }
-        });
-      },
-      //预览界面
-      docName(curentDocId, value) {
-        this.$tab.openPage(
-          // window.open("/individual/Pre/user/" + curentDocId, "_blank"),
-          window.open(
-            "/individual/Pre/user/" +
+    //查找返回的数据
+    searchs() {
+      ret({
+        content: this.input,
+        type: this.type,
+        page: this.page,
+        size: this.size,
+      }).then((item) => {
+        // console.log('item=',item)
+        if (item.length > 0) {
+          this.count.push(...item);
+          this.mains_data = false;
+          this.mains_data2 = true;
+        } else {
+          this.input = "";
+          this.mains_data = true;
+          this.mains_data2 = false;
+        }
+      });
+    },
+    //预览界面
+    docName(curentDocId, value) {
+      this.$tab.openPage(
+        // window.open("/individual/Pre/user/" + curentDocId, "_blank"),
+        window.open(
+          "/individual/Pre/user/" +
             curentDocId +
             "?value=" +
             JSON.stringify(value),
-            "_blank"
-          )
-        );
-      },
+          "_blank"
+        )
+      );
     },
-  };
+  },
+};
 </script>
 <style lang='scss'>
-  .three {
-    margin-bottom: calc(100vw * (10 / 1920));
+.three {
+  margin-bottom: calc(100vw * (10 / 1920));
 
-    em {
-      color: #f00 !important;
-    }
+  em {
+    color: #f00 !important;
   }
+}
 </style>
 <style scoped lang='scss'>
-  .containe {
-    color: #7ea4c8;
-    font-size: 0.14rem;
-    font-family: PingFang SC-Medium, PingFang SC;
-    font-weight: 500;
-  }
+.containe {
+  color: #7ea4c8;
+  font-size: 0.14rem;
+  font-family: PingFang SC-Medium, PingFang SC;
+  font-weight: 500;
+}
 
-  .picture {
-    width: calc(100vw * (220 / 1920));
-    height: calc(100vh * (57 / 1080));
-    margin-left: calc(100vw * (860 / 1920));
-    margin-top: calc(100vh * (100 / 1080));
-    margin-bottom: calc(100vh * (40 / 1080));
-
-    img {
-      width: 100%;
-      height: 100%;
-      display: block;
-    }
-  }
+.picture {
+  width: calc(100vw * (220 / 1920));
+  height: calc(100vh * (57 / 1080));
+  margin-left: calc(100vw * (860 / 1920));
+  margin-top: calc(100vh * (100 / 1080));
+  margin-bottom: calc(100vh * (40 / 1080));
 
-  .search {
-    width: calc(100vw * (864 / 1920));
-    height: calc(100vh * (50 / 1080));
-    margin-left: calc(100vw * (528 / 1920));
-    margin-bottom: calc(100vh * (50 / 1080));
-    position: relative;
+  img {
+    width: 100%;
+    height: 100%;
+    display: block;
   }
+}
 
-  .cen—top-img {
-    width: calc(100vw * (24 / 1920));
-    height: calc(100vh * (24 / 1080));
-    position: absolute;
-    left: calc(100vw * (15 / 1920));
-    top: calc(100vh * (15 / 1080));
-  }
+.search {
+  width: calc(100vw * (864 / 1920));
+  height: calc(100vh * (50 / 1080));
+  margin-left: calc(100vw * (528 / 1920));
+  margin-bottom: calc(100vh * (50 / 1080));
+  position: relative;
+  // background: salmon;
+}
 
-  .el-input {
-    width: calc(100vw * (750 / 1920));
-    height: calc(100vh * (50 / 1080));
-    margin-right: calc(100vw * (14 / 1920));
-  }
+.main1 {
+  width: calc(100vw * (1100 / 1920));
+  height: calc(100vh * (100 / 1080));
+  // background: seagreen;
+  margin-left: calc(100vw * (528 / 1920));
+  margin-bottom: calc(100vh * (20 / 1080));
+  .range,
+  .category {
+    width: calc(100vw * (480 / 1920));
+    height: calc(100vh * (36 / 1080));
+    // margin-left: calc(100vw * (528 / 1920));
+    margin-bottom: calc(100vh * (30 / 1080));
+    line-height: calc(100vh * (36 / 1080));
+    display: flex;
+    .range-ul {
+      display: flex;
+      list-style: none;
+      padding: 0;
+     ::v-deep .el-radio-button__inner {
 
-  .cen—top-span {
-    display: inline-block;
-    width: calc(100vw * (100 / 1920));
-    height: calc(100vh * (50 / 1080));
-    background: #2e8aecff;
-    color: #ffffffcc;
-    text-align: center;
-    line-height: calc(100vh * (50 / 1080));
-
-    &:hover {
-      cursor: pointer;
+      background: transparent;
+      color: #7EA4C8FF;
+      border: none;
+      }
     }
   }
-
-  .mains {
-    width: calc(100vw * (1450 / 1920));
-    height: calc(100vh * (600 / 1080));
-    // background: seagreen;
-    margin-left: calc(100vw * (230 / 1920));
-    overflow: auto;
-  }
-
-  .mains_prompt {
+  .time {
+    width: calc(100vw * (1333 / 1920));
+    height: calc(100vh * (36 / 1080));
+    // margin-left: calc(100vw * (528 / 1920));
     display: flex;
     align-items: center;
-    margin-left: calc(100vw * (850 / 1920));
-    margin-top: calc(100vh * (20 / 1080));
+    .el-checkbox-group {
+      .el-checkbox {
+        margin-right: calc(100vw * (40 / 1920));
+      }
+      .el-date-picker {
+        height: calc(100vh * (36 / 1080));
+      }
+    }
   }
+}
 
-  .empty {
-    width: 100%;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
+.cen—top-img {
+  width: calc(100vw * (24 / 1920));
+  height: calc(100vh * (24 / 1080));
+  position: absolute;
+  left: calc(100vw * (15 / 1920));
+  top: calc(100vh * (15 / 1080));
+}
 
-    img {
-      width: calc(100vw * (160 / 1920));
-      height: calc(100vh * (160 / 1080));
-      margin-top: calc(100vh * (150 / 1080));
-    }
-  }
+.el-input {
+  width: calc(100vw * (750 / 1920));
+  height: calc(100vh * (50 / 1080));
+  margin-right: calc(100vw * (14 / 1920));
+}
 
-  .main-main {
-    width: calc(100vw * (1430 / 1920));
-    // height: calc(100vh * (220 / 1080));
-    padding: calc(100vh * (20 / 1080));
-    border-bottom: 1px dashed #083b61ff;
-  }
+.cen—top-span {
+  display: inline-block;
+  width: calc(100vw * (100 / 1920));
+  height: calc(100vh * (50 / 1080));
+  background: #2e8aecff;
+  color: #ffffffcc;
+  text-align: center;
+  line-height: calc(100vh * (50 / 1080));
 
-  .one {
-    margin-bottom: calc(100vw * (10 / 1920));
-    color: #2e8aecff;
-    font-size: 14px;
-    text-decoration: underline;
+  &:hover {
+    cursor: pointer;
   }
+}
 
-  .two {
-    margin-bottom: calc(100vh * (10 / 1080));
-    display: flex;
+.mains {
+  width: calc(100vw * (1450 / 1920));
+  height: calc(100vh * (500 / 1080));
+  // background: seagreen;
+  margin-left: calc(100vw * (300 / 1920));
+  overflow: auto;
+}
 
-    .two1 {
-      margin-right: calc(100vw * (30 / 1920));
-    }
+.mains_prompt {
+  display: flex;
+  align-items: center;
+  margin-left: calc(100vw * (900 / 1920));
+  margin-top: calc(100vh * (20 / 1080));
+}
 
-    img {
-      vertical-align: middle;
-    }
-  }
+.empty {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
 
-  .four {
-    display: flex;
-    list-style: none;
-    padding: 0;
-
-    li {
-      //  width: calc(100vw * (62 / 1920));
-      //  height: calc(100vh * (24 / 1080));
-      border: 1px solid #ff9839ff;
-      background: #bba99240;
-      padding: 0 5px;
-      margin-right: calc(100vw * (5 / 1920));
-    }
+  img {
+    width: calc(100vw * (160 / 1920));
+    height: calc(100vh * (160 / 1080));
+    margin-top: calc(100vh * (150 / 1080));
   }
+}
 
-  //滚动条样式
-  ::-webkit-scrollbar {
-    width: 3.5px;
-  }
+.main-main {
+  width: calc(100vw * (1430 / 1920));
+  // height: calc(100vh * (220 / 1080));
+  padding: calc(100vh * (20 / 1080));
+  border-bottom: 1px dashed #083b61ff;
+}
 
-  ::-webkit-scrollbar-track {
-    background-color: rgba(0, 0, 0, 0);
-  }
+.one {
+  margin-bottom: calc(100vw * (10 / 1920));
+  color: #2e8aecff;
+  font-size: 14px;
+  text-decoration: underline;
+}
 
-  ::-webkit-scrollbar-thumb {
-    background: #2e8aec;
-    border-radius: 3px;
+.two {
+  margin-bottom: calc(100vh * (10 / 1080));
+  display: flex;
+
+  .two1 {
+    margin-right: calc(100vw * (30 / 1920));
   }
 
-  ::-webkit-scrollbar-thumb:hover {
-    background: #2e8aec;
+  img {
+    vertical-align: middle;
   }
+}
+
+.four {
+  display: flex;
+  list-style: none;
+  padding: 0;
 
-  ::v-deep .el-input--medium .el-input__inner {
-    padding-left: calc(100vw * (50 / 1920));
-    background: #14265e80;
-    border: 1px solid #01d1ffff;
-    color: #7ea4c8ff;
+  li {
+    //  width: calc(100vw * (62 / 1920));
+    //  height: calc(100vh * (24 / 1080));
+    border: 1px solid #ff9839ff;
+    background: #bba99240;
+    padding: 0 5px;
+    margin-right: calc(100vw * (5 / 1920));
   }
+}
+
+//滚动条样式
+::-webkit-scrollbar {
+  width: 3.5px;
+}
+
+::-webkit-scrollbar-track {
+  background-color: rgba(0, 0, 0, 0);
+}
+
+::-webkit-scrollbar-thumb {
+  background: #2e8aec;
+  border-radius: 3px;
+}
+
+::-webkit-scrollbar-thumb:hover {
+  background: #2e8aec;
+}
+
+::v-deep .el-input--medium .el-input__inner {
+  padding-left: calc(100vw * (50 / 1920));
+  background: #14265e80;
+  border: 1px solid #01d1ffff;
+  color: #7ea4c8ff;
+}
 </style>