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

更改了首页底部的列表

yxc 2 роки тому
батько
коміт
6203e64eec

+ 4 - 1
lzga-ui/src/router/index.js

@@ -113,7 +113,10 @@ export const constantRoutes = [{
         path: "/home/page/more",
         component: () => import('@/views1/Page/More/MoreView.vue'),
       },
-
+      {
+        path: "/home/page/more2",
+        component: () => import('@/views1/Page/More/More2View.vue'),
+      },
       ,
       {
         path: "/home/page/leftmores",

+ 10 - 10
lzga-ui/src/views1/File/Individual/Share/ShareView.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="containe">
-    <div class="top">
+    <!-- <div class="top">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item prop="isSecret" label="是否机密">
           <el-switch v-model="form.isSecret" active-value="1" inactive-value="0" @change="shareChange()"
@@ -8,7 +8,7 @@
           <span>(如果选择机密,则共享用户打开时需要输入自己的用户密码才能查看)</span>
         </el-form-item>
       </el-form>
-    </div>
+    </div> -->
     <div class="main">
       <div class="app-container">
         <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
@@ -291,19 +291,19 @@
     //   font-weight: bold;
     //   line-height: calc(100vh * (22 / 1080));
     // }
-.top{
-  margin-top: calc(100vh * (20 / 1080));
-  margin-bottom: calc(100vh * (20 / 1080));
-}
+// .top{
+//   margin-top: calc(100vh * (20 / 1080));
+//   margin-bottom: calc(100vh * (20 / 1080));
+// }
     .main {
       width: calc(100vw * (1876 / 1920));
-      height: calc(100vh * (850 / 1080));
-    
+      height: calc(100vh * (900 / 1080));
+      margin-top: calc(100vh * (50 / 1080));
       .app-container {
         width: calc(100vw * (1876 / 1920));
-        height: calc(100vh * (850 / 1080));
+        height: calc(100vh * (900 / 1080));
         background: url(../../../../assets/img/Group-615.png);
-        background-size: calc(100vw * (1876 / 1920)) calc(100vh * (850 / 1080));
+        background-size: calc(100vw * (1876 / 1920)) calc(100vh * (900 / 1080));
       }
 
       .mb8 {

+ 830 - 0
lzga-ui/src/views1/Page/More/More2View.vue

@@ -0,0 +1,830 @@
+<template>
+    <div class="containe">
+      <div class="main">
+        <div class="app-container">
+          <el-row :gutter="20">
+            <!--文件数据-->
+            <el-col :span="20" :xs="24" class="main-right">
+              <p>发送的文档</p>
+              <el-form
+                :model="queryParams"
+                ref="queryForm"
+                size="small"
+                :inline="true"
+                v-show="showSearch"
+                label-width="68px"
+                class="main-right-top"
+              >
+                <el-form-item label="文件名称" prop="docName">
+                  <el-input
+                    v-model="queryParams.docName"
+                    placeholder="请输入文件名称"
+                    clearable
+                    @keyup.enter.native="handleQuery"
+                  />
+                </el-form-item>
+                <el-form-item>
+                  <el-button
+                    type="primary"
+                    icon="el-icon-search"
+                    size="mini"
+                    @click="handleQuery"
+                    >搜索</el-button
+                  >
+                  <el-button
+                    icon="el-icon-refresh"
+                    size="mini"
+                    @click="resetQuery"
+                    class="reset1"
+                    >重置</el-button
+                  >
+                </el-form-item>
+              </el-form>
+  
+              <el-table
+                v-loading="loading"
+                :data="tableData1"
+                @selection-change="handleSelectionChange"
+                class="main-right-table"
+                height="calc(100vh * (700 / 1080))"
+                align="left"
+                :header-cell-style="{ 'text-align': 'center' }"
+              >
+                <el-table-column type="selection" width="55" align="center" />
+                <el-table-column label="文件名称" align="left" prop="docName" />
+                <el-table-column
+                  label="发件人"
+                  align="center"
+                  prop="user"
+                  width="100"
+                />
+                <el-table-column
+                  label="收到时间"
+                  align="center"
+                  prop="createTime"
+                />
+                <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"
+                  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-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 icon="el-icon-view" @click.native="handleDownload(scope.row)"  v-if="checkLevel(scope.row, 'download')">下载</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 icon="el-icon-edit" @click.native="handleUpdate(scope.row)" v-if="checkLevel(scope.row, 'modify')" v-hasPermi="['doc:info:edit']">修改</el-dropdown-item>
+                      <el-dropdown-item icon="el-icon-delete" @click.native="handleDelete(scope.row)" v-if="checkLevel(scope.row, 'del')"
+                        v-hasPermi="['doc:info:remove']">删除</el-dropdown-item>
+                    </el-dropdown-menu>
+                  </el-dropdown>
+                </template>
+                </el-table-column>
+              </el-table>
+  
+              <pagination
+                v-show="total > 0"
+                :total="total"
+                :page.sync="queryParams.pageNum"
+                :limit.sync="queryParams.pageSize"
+                @pagination="getList"
+              />
+            </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>
+  
+        </div>
+      </div>
+    </div>
+  </template>
+  
+  <script>
+  import "@/styles1/element-ui1.scss";
+  
+  import Cookies from "js-cookie";
+  import { delShare2 } from "@/api/doc/share1";
+  
+  import { listTag } from "@/api/doc/tag.js";
+  
+  import {
+    listInfo,
+    getInfo,
+    delInfo,
+    addInfo,
+    updateInfo,
+  } from "@/api/doc/info";
+  import {
+    listDir,
+    getDir,
+    delDir,
+    addDir,
+    updateDir,
+    personalList,
+  } from "@/api/doc/dir";
+  import { listLevel } from "@/api/doc/level";
+  
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+  
+  export default {
+    name: "Info",
+    components: {
+      Treeselect,
+    },
+    data() {
+      return {
+    //文件等级数据
+    levelOptions: [],
+
+        //底部左边表格数据
+        tableData1: [],
+  
+  
+        //标签列表
+        tags: [],
+  
+        //选择标签
+        dynamicTags: [],
+        inputVisible: false,
+        inputValue: "",
+  
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 文件基本信息表格数据
+        infoList: [],
+        //目录ID
+        dirId: undefined,
+        //目录数据
+        dirList: undefined,
+        //文件等级数据
+        levelOptions: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          docName: null,
+          docLevel: null,
+          createYear: null,
+          params: {
+            tagId: null,
+          },
+        },
+        // 表单参数
+        form: {},
+        defaultProps: {
+          children: "children",
+          label: "dirName",
+          id: "dirId",
+        },
+        // 表单校验
+        rules: {
+          docName: [
+            {
+              required: true,
+              message: "文件名称不能为空",
+              trigger: "blur",
+            },
+          ],
+          dirId: [
+            {
+              required: true,
+              message: "文件目录不能为空",
+              trigger: "blur",
+            },
+          ],
+          docLevel: [
+            {
+              required: true,
+              message: "文件级别不能为空",
+              trigger: "blur",
+            },
+          ],
+        },
+      };
+    },
+    created() {
+      this.dirTree();
+    },
+    mounted() {
+      this.getLists();
+    },
+  
+    watch: {
+      "form.docPath": function (path, old) {
+        if (path && path.lastIndexOf("/") > -1) {
+          let name = path.slice(path.lastIndexOf("/") + 1);
+          this.form.docName = name.split("_")[0];
+        }
+      },
+    },
+    methods: {
+      //底部表格数据
+      getLists() {
+        //左边表格
+        delShare2(this.queryParams).then((response) => {
+          // 给定义的列表空数组赋值
+          this.tableData1 = response.rows;
+        });
+      },
+  
+      //选择标签关闭
+      handleClose(tag) {
+        this.form.tagList.map((i, index) => {
+          if (tag == i.tagName) {
+            this.form.tagList.splice(index, 1);
+          }
+        });
+        this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+      },
+  
+      showInput() {
+        if (this.dynamicTags.length >= 5) {
+          this.inputVisible = false;
+          alert("标签数不允许超过五个");
+        } else {
+          this.inputVisible = true;
+          this.$nextTick((_) => {
+            this.$refs.saveTagInput.$refs.input.focus();
+          });
+        }
+      },
+      //固定的标签
+      handleInputConfirm1(tag) {
+        if (this.dynamicTags.indexOf(tag.tagName) == -1) {
+          this.dynamicTags.push(tag.tagName);
+          this.form.tagList.push({
+            tagId: tag.tagId,
+            tagName: tag.tagName,
+          });
+        }
+  
+        if (this.dynamicTags.length > 5) {
+          alert("标签数不允许超过五个");
+          this.dynamicTags.pop();
+        }
+      },
+      //自定义标签
+      handleInputConfirm() {
+        let inputValue = this.inputValue;
+  
+        //查询输入的标签在固定标签里是否存在
+        var Newtags = this.tags.find((value) => value.tagName == inputValue);
+        // console.log(a);
+        //删除标签
+        if (this.dynamicTags.indexOf(inputValue) != -1) {
+          this.dynamicTags.pop();
+          this.form.tagList.pop();
+        }
+        if (inputValue) {
+          this.dynamicTags.push(inputValue);
+        }
+        this.inputVisible = false;
+        this.inputValue = "";
+        //判断输入的标签在固定标签里是否存在,存在则换成固定标签
+        if (Newtags) {
+          this.form.tagList.push({
+            tagId: Newtags.tagId,
+            tagName: Newtags.tagName,
+          });
+        } else {
+          this.form.tagList.push({
+            tagName: inputValue,
+          });
+        }
+        // console.log(this.form);
+        if (this.dynamicTags.length > 5) {
+          alert("标签数不允许超过五个");
+          this.dynamicTags.pop();
+        }
+      },
+  
+      /** 转换目录信息数据结构 */
+      normalizer(node) {
+        if (node.children && !node.children.length) {
+          delete node.children;
+        }
+        return {
+          id: node.dirId,
+          label: node.dirName,
+          children: node.children,
+        };
+      },
+      // 节点单击事件
+      handleNodeClick(data) {
+        this.dirId = data.dirId;
+        this.queryParams.dirId = this.dirId;
+        this.queryParams.searchValue = this.spaceId;
+        this.handleQuery();
+      },
+  
+      /**下载按钮操作*/
+      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'),
+            );
+      },
+  
+      //在线编辑
+      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;
+        personalList().then((response) => {
+          this.dirId = response.data[0].dirId;
+          this.spaceId = response.data[0].spaceId;
+          this.dirList = this.handleTree(response.data, "dirId");
+  
+          this.queryParams.dirId = this.dirId;
+          this.queryParams.searchValue = this.spaceId;
+          this.getList();
+          //获取文件级别数据
+          listLevel().then((response) => {
+            this.levelOptions = response.rows;
+          });
+          this.loading = false;
+  
+          //标签数据
+          listTag().then((res) => {
+            this.tags = res.rows;
+          });
+        });
+      },
+      /**处理文档级别数据*/
+      fileLevelData(row, col, value) {
+        try {
+          const obj = this.levelOptions.find((item) => item.levelId == value);
+          return obj.levelName;
+        } catch (e) {}
+      },
+      /**根据文档级别显示数据*/
+      checkLevel(row, role) {
+        try {
+          const obj = this.levelOptions.find(
+            (item) => item.levelId == row.docLevel
+          );
+          if (obj.levelRole.indexOf(role) != -1) {
+            return true;
+          } else {
+            return false;
+          }
+        } catch (e) {}
+      },
+      /** 查询文件基本信息列表 */
+      getList() {
+        this.loading = true;
+        delShare2(this.queryParams).then((response) => {
+          this.infoList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+  
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          docId: null,
+          dirId: this.dirId,
+          docName: null,
+          docType: null,
+          docSize: null,
+          classifyId: null,
+          docDesc: null,
+          docPath: null,
+          docLevel: null,
+          allowEdit: null,
+          docOf: null,
+          owner: null,
+          createYear: null,
+          createBy: null,
+          createTime: null,
+          updateBy: null,
+          updateTime: null,
+          remark: null,
+          isDel: null,
+          searchValue: this.spaceId,
+          tagList: [],
+        };
+        this.resetForm("form");
+        this.dynamicTags = [];
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.queryParams.dirId = this.dirId;
+        this.queryParams.searchValue = this.spaceId;
+        this.queryParams.params.tagId = null;
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map((item) => item.docId);
+        this.single = selection.length !== 1;
+        this.multiple = !selection.length;
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
+        this.open = true;
+        this.title = "添加文件基本信息";
+        // this.dynamicTags=[];
+        // console.log(this.dynamicTags);
+      },
+      /** 修改按钮操作 */
+      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);
+        });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            if (this.form.docId != null) {
+              updateInfo(this.form).then((response) => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              addInfo(this.form).then((response) => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        });
+  
+        // console.log(this.dynamicTags.length);
+        // console.log(this.form);
+        // console.log(this.dynamicTags);
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const docIds = row.docId || this.ids;
+        this.$modal
+          .confirm('是否确认删除文件基本信息编号为"' + docIds + '"的数据项?')
+          .then(function () {
+            return delInfo(docIds);
+          })
+          .then(() => {
+            this.getList();
+            this.$modal.msgSuccess("删除成功");
+          })
+          .catch(() => {});
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        this.download(
+          "doc/info/export",
+          {
+            ...this.queryParams,
+          },
+          `info_${new Date().getTime()}.xlsx`
+        );
+      },
+      /**格式化文件大小数据*/
+      fileSizeData(row, col, value) {
+        const KB = 1;
+        const MB = KB * 1024;
+        const GB = MB * 1024;
+        if (value < MB) {
+          return `${(value / KB).toFixed(2)} KB`;
+        } else if (value < GB) {
+          return `${(value / MB).toFixed(2)} MB`;
+        } else {
+          return `${(value / GB).toFixed(2)} GB`;
+        }
+      },
+     
+  
+     
+    },
+  };
+  </script>
+  
+  <style scoped lang='scss'>
+  .containe {
+    color: #7ea4c8;
+    font-size: 0.14rem;
+    font-family: PingFang SC-Medium, PingFang SC;
+    font-weight: 500;
+    padding-left: calc(100vw * (20 / 1920));
+  
+    .main {
+      width: calc(100vw * (1880 / 1920));
+      height: calc(100vh * (950 / 1080));
+      margin-top: calc(100vh * (30 / 1080));
+      .app-container {
+        width: calc(100vw * (1880 / 1920));
+        height: calc(100vh * (950 / 1080));
+        padding: 0;
+      }
+      .main-right {
+        width: calc(100vw * (1880 / 1920));
+        height: calc(100vh * (950 / 1080));
+        background: url(../../../assets/img/Group-610.png);
+        background-size: calc(100vw * (1880 / 1920)) calc(100vh * (950 / 1080));
+        margin-left: calc(100vw * (10 / 1920));
+        p {
+          color: #ffffffff;
+          font-size: 0.16rem;
+          padding-left: calc(100vw * (15 / 1920));
+          padding-top: calc(100vh * (20 / 1080));
+        }
+  
+        .main-right-top {
+          height: calc(100vh * (60 / 1080));
+          margin-top: calc(100vw * (25 / 1920));
+          margin-bottom: calc(100vw * (20 / 1920));
+          margin-left: calc(100vw * (10 / 1920));
+          .reset1 {
+            color: #2e8aecff;
+            background: transparent;
+            border: 1px solid #2e8aecff;
+          }
+        }
+  
+        .main-right-table {
+          width: calc(100vw * (1840 / 1920));
+          height: calc(100vh * (930 / 1080));
+          margin-left: calc(100vw * (8 / 1920));
+          background: transparent;
+          color: #7ea4c8ff;
+          overflow: auto;
+        }
+  
+        //表格底部
+        .pagination-container {
+          width: calc(100vw * (1810 / 1920));
+          height: calc(100vh * (50 / 1080));
+          background: transparent;
+          padding: 0 !important;
+          margin: 0;
+          margin-left: calc(100vw * (20 / 1920));
+          margin-top: calc(100vh * (10 / 1080));
+        }
+      }
+    }
+    //机密验证界面
+    .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%;
+      }
+    }
+  }
+  
+  //标签按钮
+  ::v-deep .el-tag {
+    color: #df9439ff;
+    border: 1px solid #ff9839ff;
+    background: #bba99240;
+    margin-left: 3px;
+    margin-bottom: 3px;
+    height: calc(100vh * (35 / 1080));
+    line-height: calc(100vh * (35 / 1080));
+  }
+  
+  
+  //右边顶部字体样式
+  ::v-deep .el-form-item__label{
+    color: #2e8aecff;
+  }
+  
+  //右边顶部搜索框样式
+  ::v-deep .el-input__inner {
+    background-color: transparent;
+    border: 1px solid #01d1ffff;
+    color: #ffffffcc;
+  }
+  
+  ::v-deep .el-form-item--small .el-form-item__content {
+    width: calc(100vw * (220 / 1920));
+  }
+  
+  //右边顶部标签搜索
+  ::v-deep .el-select > .el-input {
+    width: calc(100vw * (180 / 1920));
+  }
+  
+  //右边表格线条隐藏
+  ::v-deep .el-table::before {
+    height: 0;
+  }
+  
+  //table样式
+  ::v-deep .el-table th {
+    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;
+  }
+  
+  //按钮的样式
+  ::v-deep .el-button--primary.is-plain,
+  .el-button--success.is-plain.is-disabled,
+  .el-button--danger.is-plain.is-disabled,
+  .el-button--warning.is-plain,
+  .el-button--success.is-plain,
+  .el-button--danger.is-plain {
+    background-color: #002a5cff;
+    border: none;
+    color: #2e8aec;
+  }
+  </style>
+  

+ 97 - 86
lzga-ui/src/views1/Page/More/MoreView.vue

@@ -64,12 +64,8 @@
                 prop="createTime"
               />
               <el-table-column label="文件类型" align="center" prop="docType" />
-              <el-table-column
-                label="机密"
-                align="center"
-                prop="isSecret"
-                width="90"
-              />
+              <el-table-column prop="docLevel" label="文件级别" width="80" :formatter="fileLevelData">
+          </el-table-column>
               <el-table-column
                 label="标签"
                 align="center"
@@ -94,9 +90,21 @@
                     size="mini"
                     type="text"
                     icon="el-icon-view"
-                    @click="isSecretRole(scope.row)"
+                    @click="handlePreview(scope.row)"
+                    v-if="checkLevel(scope.row, 'view')"
                     >预览</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 icon="el-icon-view" @click.native="handleDownload(scope.row)"  v-if="checkLevel(scope.row, 'download')">下载</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 icon="el-icon-edit" @click.native="handleUpdate(scope.row)" v-if="checkLevel(scope.row, 'modify')" v-hasPermi="['doc:info:edit']">修改</el-dropdown-item>
+                      <el-dropdown-item icon="el-icon-delete" @click.native="handleDelete(scope.row)" v-if="checkLevel(scope.row, 'del')"
+                        v-hasPermi="['doc:info:remove']">删除</el-dropdown-item>
+                    </el-dropdown-menu>
+                  </el-dropdown>
                 </template>
               </el-table-column>
             </el-table>
@@ -200,7 +208,7 @@
         </el-dialog>
 
         <!-- 是否机密文件 -->
-        <div class="jm" v-if="check">
+        <!-- <div class="jm" v-if="check">
           <el-form
             ref="loginForm"
             :model="loginForm"
@@ -235,7 +243,7 @@
           </el-form>
 
           <el-button class="gb1" icon="el-icon-close" size="small" circle @click="gb1" />
-        </div>
+        </div> -->
       </div>
     </div>
   </div>
@@ -249,6 +257,7 @@ import { delShare1 } from "@/api/doc/share1";
 
 import { listTag } from "@/api/doc/tag.js";
 
+
 import {
   listInfo,
   getInfo,
@@ -276,25 +285,27 @@ export default {
   },
   data() {
     return {
-      //机密文件的账号密码内容
-      loginForm: {
-        username: "admin",
-        password: "admin123",
-      },
-      //机密文件的账号密码验证规则
-      loginRules: {
-        username: [
-          { required: true, trigger: "blur", message: "请输入您的用户名" },
-        ],
-        password: [
-          { required: true, trigger: "blur", message: "请输入您的密码" },
-        ],
-      },
+        //文件等级数据
+        levelOptions: [],
+      // //机密文件的账号密码内容
+      // loginForm: {
+      //   username: "admin",
+      //   password: "admin123",
+      // },
+      // //机密文件的账号密码验证规则
+      // loginRules: {
+      //   username: [
+      //     { required: true, trigger: "blur", message: "请输入您的用户名" },
+      //   ],
+      //   password: [
+      //     { required: true, trigger: "blur", message: "请输入您的密码" },
+      //   ],
+      // },
       //底部左边表格数据
       tableData1: [],
 
       // 机密界面
-      check: false,
+      // check: false,
 
       //标签列表
       tags: [],
@@ -396,11 +407,11 @@ export default {
         // 给定义的列表空数组赋值
         this.tableData1 = response.rows;
         //改变是否机密的值
-        var newisSecret = this.tableData1.map((item) => item.isSecret);
-        // console.log(a);
-        newisSecret = response.rows.map(
-          (i) => (i.isSecret = i.isSecret == 1 ? "是" : "否")
-        );
+        // var newisSecret = this.tableData1.map((item) => item.isSecret);
+        // // console.log(a);
+        // newisSecret = response.rows.map(
+        //   (i) => (i.isSecret = i.isSecret == 1 ? "是" : "否")
+        // );
         // console.log(newisSecret);
       });
     },
@@ -506,22 +517,20 @@ export default {
     },
 
     // 是否机密
-    isSecretRole(row) {
-      // console.log(`row=${row}`);
-      if (row.isSecret == "是") {
-        this.check = true;
-        this.currentRow = row;
-      }
-    },
+    // isSecretRole(row) {
+    //   // console.log(`row=${row}`);
+    //   if (row.isSecret == "是") {
+    //     this.check = true;
+    //     this.currentRow = row;
+    //   }
+    // },
     //预览
     handlePreview(row) {
-      row = this.currentRow;
-      this.$tab.openPage(
-        window.open(
-          "/individual/Pre/user/" + row.docId + "?row=" + JSON.stringify(row),
-          "_blank"
-        )
-      );
+      row.isEdit = false;
+          this.$tab.openPage(
+            window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
+              '_blank'),
+          );
     },
 
     //在线编辑
@@ -559,8 +568,10 @@ export default {
     },
     /**处理文档级别数据*/
     fileLevelData(row, col, value) {
-      const obj = this.levelOptions.find((item) => item.levelId == value);
-      return obj.levelName;
+      try {
+          const obj = this.levelOptions.find((item) => item.levelId == value);
+          return obj.levelName;
+        } catch (e) {}
     },
     /**根据文档级别显示数据*/
     checkLevel(row, role) {
@@ -726,49 +737,49 @@ export default {
       }
     },
     //验证账号密码
-    getCookie() {
-      const username = Cookies.get("username");
-      const password = Cookies.get("password");
-      const rememberMe = Cookies.get("rememberMe");
-      this.loginForm = {
-        username: username === undefined ? this.loginForm.username : username,
-        password:
-          password === undefined ? this.loginForm.password : decrypt(password),
-        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
-      };
-    },
+    // getCookie() {
+    //   const username = Cookies.get("username");
+    //   const password = Cookies.get("password");
+    //   const rememberMe = Cookies.get("rememberMe");
+    //   this.loginForm = {
+    //     username: username === undefined ? this.loginForm.username : username,
+    //     password:
+    //       password === undefined ? this.loginForm.password : decrypt(password),
+    //     rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
+    //   };
+    // },
 
     //验证账号密码
-    submitForm(row) {
-      this.$refs.loginForm.validate((valid) => {
-        if (valid) {
-          if (this.loginForm.rememberMe) {
-            Cookies.set("username", this.loginForm.username, { expires: 30 });
-            Cookies.set("password", encrypt(this.loginForm.password), {
-              expires: 30,
-            });
-          } else {
-            Cookies.remove("username");
-            Cookies.remove("password");
-          }
-          this.$store
-            .dispatch("Login", this.loginForm)
-            .then(() => {
-              // 登录成功
-              this.currentLoginStatus = 1;
-              // 关闭登录界面
-              this.check = false;
-              // console.log("登录成功", "关闭登录界面");
-
-              // console.log("预览界面");
-              this.handlePreview(row);
-            })
-            .catch(() => {
-              this.currentLoginStatus = 0;
-            });
-        }
-      });
-    },
+    // submitForm(row) {
+    //   this.$refs.loginForm.validate((valid) => {
+    //     if (valid) {
+    //       if (this.loginForm.rememberMe) {
+    //         Cookies.set("username", this.loginForm.username, { expires: 30 });
+    //         Cookies.set("password", encrypt(this.loginForm.password), {
+    //           expires: 30,
+    //         });
+    //       } else {
+    //         Cookies.remove("username");
+    //         Cookies.remove("password");
+    //       }
+    //       this.$store
+    //         .dispatch("Login", this.loginForm)
+    //         .then(() => {
+    //           // 登录成功
+    //           this.currentLoginStatus = 1;
+    //           // 关闭登录界面
+    //           this.check = false;
+    //           // console.log("登录成功", "关闭登录界面");
+
+    //           // console.log("预览界面");
+    //           this.handlePreview(row);
+    //         })
+    //         .catch(() => {
+    //           this.currentLoginStatus = 0;
+    //         });
+    //     }
+    //   });
+    // },
   },
 };
 </script>

+ 128 - 103
lzga-ui/src/views1/Page/PageView.vue

@@ -109,13 +109,13 @@
         >
           <el-table-column prop="docName" label="文件名" width="180">
           </el-table-column>
-          <el-table-column prop="user" label="发件人" width="140">
+          <el-table-column prop="user" label="发件人" width="120">
           </el-table-column>
           <el-table-column prop="createTime" label="收到时间" width="160">
           </el-table-column>
-          <el-table-column prop="docType" label="文件类型" width="100">
+          <el-table-column prop="docType" label="文件类型" width="80">
           </el-table-column>
-          <el-table-column prop="isSecret" label="机密" width="50">
+          <el-table-column prop="docLevel" label="文件级别" width="80" :formatter="fileLevelData">
           </el-table-column>
           <el-table-column
             label="操作"
@@ -127,7 +127,7 @@
                 size="mini"
                 type="text"
                 icon="el-icon-view"
-                @click="isSecretRole(scope.row)"
+                @click="handlePreview(scope.row)"
                 >预览</el-button
               >
             </template>
@@ -137,6 +137,7 @@
       <div class="right">
         <div class="right-top">
           <h3>最近发送的文件</h3>
+          <p @click="mores2">更多</p>
         </div>
         <el-table
           :data="tableData2"
@@ -145,13 +146,13 @@
           class="right-main"
           height="calc(100vh * (230 / 1080))"
         >
-          <el-table-column prop="docName" label="文件名" width="200">
+          <el-table-column prop="docName" label="文件名" width="180">
           </el-table-column>
           <el-table-column prop="createTime" label="收到时间" width="180">
           </el-table-column>
           <el-table-column prop="docType" label="文件类型" width="120">
           </el-table-column>
-          <el-table-column prop="isSecret" label="机密" width="50">
+          <el-table-column prop="docLevel" label="文件级别" width="80" :formatter="fileLevelData">
           </el-table-column>
           <el-table-column
             label="操作"
@@ -163,7 +164,7 @@
                 size="mini"
                 type="text"
                 icon="el-icon-view"
-                @click="isSecretRole(scope.row)"
+                @click="handlePreview(scope.row)"
                 >预览</el-button
               >
             </template>
@@ -209,7 +210,7 @@
       <el-button class="gb" icon="el-icon-close" circle @click="gb" />
     </div>
     <!-- 是否机密文件 -->
-    <div class="jm" v-if="check">
+    <!-- <div class="jm" v-if="check">
       <el-form
         ref="loginForm"
         :model="loginForm"
@@ -250,7 +251,7 @@
         circle
         @click="gb1"
       />
-    </div>
+    </div> -->
 
     <!-- 查看详细 -->
     <el-dialog
@@ -273,10 +274,14 @@ import Cookies from "js-cookie";
 
 import "@/styles1/element-ui1.scss";
 
+import { listLevel } from "@/api/doc/level";
+
 import { delShare1, delShare2, notice, msg } from "@/api/doc/share1";
 export default {
   data() {
     return {
+        //文件等级数据
+        levelOptions: [],
       //内容详细弹窗
       look1: false,
       //内容详细弹窗内容
@@ -288,19 +293,19 @@ export default {
       //搜索
       input: "",
       //机密文件的账号密码内容
-      loginForm: {
-        username: "",
-        password: "",
-      },
+      // loginForm: {
+      //   username: "",
+      //   password: "",
+      // },
       //机密文件的账号密码验证规则
-      loginRules: {
-        username: [
-          { required: true, trigger: "blur", message: "请输入您的用户名" },
-        ],
-        password: [
-          { required: true, trigger: "blur", message: "请输入您的密码" },
-        ],
-      },
+      // loginRules: {
+      //   username: [
+      //     { required: true, trigger: "blur", message: "请输入您的用户名" },
+      //   ],
+      //   password: [
+      //     { required: true, trigger: "blur", message: "请输入您的密码" },
+      //   ],
+      // },
 
       //底部左边表格数据
       tableData1: [],
@@ -315,7 +320,7 @@ export default {
       preview: false,
 
       // 机密界面
-      check: false,
+      // check: false,
 
       //视频路径和显示
       vid: "",
@@ -334,7 +339,7 @@ export default {
     this.getList();
     this.noticesList();
     this.msgList();
-    this.loginForm.username = sessionStorage.getItem("name");
+    // this.loginForm.username = sessionStorage.getItem("name");
   },
   methods: {
     //通知内容更多
@@ -369,10 +374,14 @@ export default {
       this.$router.push({path:"/home/retrieval",query:{datas:this.input} });
       // sessionStorage.setItem("suju", this.input);
     },
-    //底部表格更多跳转
+    //底部左边表格更多跳转
     mores() {
       this.$router.push("/home/page/more");
     },
+    //底部右边表格更多跳转
+    mores2() {
+      this.$router.push("/home/page/more2");
+    },
 
     //底部表格数据
     getList() {
@@ -382,27 +391,40 @@ export default {
         // 给定义的列表空数组赋值
         this.tableData1 = response.rows;
         //改变是否机密的值
-        var newisSecret = this.tableData1.map((item) => item.isSecret);
-        // console.log(a);
-        newisSecret = response.rows.map(
-          (i) => (i.isSecret = i.isSecret == 1 ? "是" : "否")
-        );
+        // var newisSecret = this.tableData1.map((item) => item.isSecret);
+        // // console.log(a);
+        // newisSecret = response.rows.map(
+        //   (i) => (i.isSecret = i.isSecret == 1 ? "是" : "否")
+        // );
         // console.log(newisSecret);
       });
+      
       //右边边表格
       delShare2(this.queryParams).then((response) => {
         // console.log(response.rows,'111111111');
         // 给定义的列表空数组赋值
         this.tableData2 = response.rows;
-        //改变是否机密的值
-        var newisSecret = this.tableData2.map((item) => item.isSecret);
-        // console.log(a);
-        newisSecret = response.rows.map(
-          (i) => (i.isSecret = i.isSecret == 1 ? "是" : "否")
-        );
+        // //改变是否机密的值
+        // var newisSecret = this.tableData2.map((item) => item.isSecret);
+        // // console.log(a);
+        // newisSecret = response.rows.map(
+        //   (i) => (i.isSecret = i.isSecret == 1 ? "是" : "否")
+        // );
         // console.log(newisSecret);
       });
+        //获取文件级别数据
+        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) {}
+      },
     // 滚轮滑动放大缩小
     gunlun(e) {
       const image = this.$refs.imageRef.$el.querySelector("img");
@@ -435,24 +457,24 @@ export default {
     },
 
     // 检验关闭
-    gb1() {
-      this.check = false;
-    },
+    // gb1() {
+    //   this.check = false;
+    // },
 
     // 是否机密
-    isSecretRole(row) {
-      this.currentRow = row;
-      // console.log(`row=${row}`);
-      if (row.isSecret == "是") {
-        this.check = true;
-      }else{
-        this.handlePreview(row)
-      }
-    },
+    // isSecretRole(row) {
+    //   this.currentRow = row;
+    //   // console.log(`row=${row}`);
+    //   if (row.isSecret == "是") {
+    //     this.check = true;
+    //   }else{
+    //     this.handlePreview(row)
+    //   }
+    // },
 
     //预览
     handlePreview(row) {
-      row = this.currentRow;
+      // row = this.currentRow;
       //图片后缀名
       var pictures = ["jpeg", "tiff", "raw", "bmp", "gif", "png", "jpg"];
       //音频后缀名
@@ -505,63 +527,56 @@ 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"
-          )
-
-          // window.open("/individual/Pre/user/" + row.docId +"/title/"+ row.docName, '_blank'),
-        );
-        // console.log(111);
+          this.$tab.openPage(
+            window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
+              '_blank'),
+          );
       }
-      // console.log(row.docPath);
-      // console.log(vid);
     },
     //验证账号密码
-    getCookie() {
-      const username = Cookies.get("username");
-      const password = Cookies.get("password");
-      const rememberMe = Cookies.get("rememberMe");
-      this.loginForm = {
-        username: username === undefined ? this.loginForm.username : username,
-        password:
-          password === undefined ? this.loginForm.password : decrypt(password),
-        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
-      };
-    },
+    // getCookie() {
+    //   const username = Cookies.get("username");
+    //   const password = Cookies.get("password");
+    //   const rememberMe = Cookies.get("rememberMe");
+    //   this.loginForm = {
+    //     username: username === undefined ? this.loginForm.username : username,
+    //     password:
+    //       password === undefined ? this.loginForm.password : decrypt(password),
+    //     rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
+    //   };
+    // },
 
     //验证账号密码
-    submitForm(row) {
-      this.$refs.loginForm.validate((valid) => {
-        if (valid) {
-          if (this.loginForm.rememberMe) {
-            Cookies.set("username", this.loginForm.username, { expires: 30 });
-            Cookies.set("password", encrypt(this.loginForm.password), {
-              expires: 30,
-            });
-          } else {
-            Cookies.remove("username");
-            Cookies.remove("password");
-          }
-          this.$store
-            .dispatch("Login", this.loginForm)
-            .then(() => {
-              // 登录成功
-              this.currentLoginStatus = 1;
-              // 关闭登录界面
-              this.check = false;
-              // console.log("登录成功", "关闭登录界面");
+    // submitForm(row) {
+    //   this.$refs.loginForm.validate((valid) => {
+    //     if (valid) {
+    //       if (this.loginForm.rememberMe) {
+    //         Cookies.set("username", this.loginForm.username, { expires: 30 });
+    //         Cookies.set("password", encrypt(this.loginForm.password), {
+    //           expires: 30,
+    //         });
+    //       } else {
+    //         Cookies.remove("username");
+    //         Cookies.remove("password");
+    //       }
+    //       this.$store
+    //         .dispatch("Login", this.loginForm)
+    //         .then(() => {
+    //           // 登录成功
+    //           this.currentLoginStatus = 1;
+    //           // 关闭登录界面
+    //           this.check = false;
+    //           // console.log("登录成功", "关闭登录界面");
 
-              // console.log("预览界面");
-              this.handlePreview(row);
-            })
-            .catch(() => {
-              this.currentLoginStatus = 0;
-            });
-        }
-      });
-    },
+    //           // console.log("预览界面");
+    //           this.handlePreview(row);
+    //         })
+    //         .catch(() => {
+    //           this.currentLoginStatus = 0;
+    //         });
+    //     }
+    //   });
+    // },
   },
 };
 </script>
@@ -1010,20 +1025,30 @@ export default {
       background-size: calc(100vw * (920 / 1920)) calc(100vh * (304 / 1080));
       padding-left: 10px;
       .right-top {
-        width: calc(100vw * (900 / 1920));
+        width: calc(100vw * (880 / 1920));
         height: calc(100vh * (40 / 1080));
         color: #ffffff;
         margin-top: 10px;
         background: url(../../assets/img/main_left_decorate.png);
-        background-size: cover;
+        background-size: calc(100vw * (880 / 1920)) calc(100vh * (40 / 1080));
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
         h3 {
-          padding-top: calc(100vh * (10 / 1080));
           padding-left: 10px;
-          margin: 0;
           font-size: 0.2rem;
           font-weight: bold;
           font-family: YouSheBiaoTiHei-Regular, YouSheBiaoTiHei;
         }
+        p {
+          padding-right: 10px;
+          font-size: 0.2rem;
+          color: #2e8aecff;
+          font-family: PingFang SC-Medium;
+          &:hover {
+            cursor: pointer;
+          }
+        }
       }
       .right-main {
         margin-top: calc(100vh * (8 / 1080));