Просмотр исходного кода

Merge branch 'dev' of http://94.191.59.107:3000/wukai/lzga-doc into dev

yxc 2 лет назад
Родитель
Сommit
a0d0c12166

+ 0 - 5
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/controller/DocDirController.java

@@ -64,7 +64,6 @@ public class DocDirController extends BaseController {
     /**
      * 查询个人空间的目录
      */
-    @RequiresPermissions("doc:dir:list")
     @GetMapping("/list/personal")
     public AjaxResult personalList() {
         //1.先查询个人空间,如果没有则创建
@@ -200,7 +199,6 @@ public class DocDirController extends BaseController {
     /**
      * 获取目录信息详细信息
      */
-    @RequiresPermissions("doc:dir:query")
     @GetMapping(value = "/{dirId}")
     public AjaxResult getInfo(@PathVariable("dirId") Long dirId) {
         return success(docDirService.selectDocDirByDirId(dirId));
@@ -209,7 +207,6 @@ public class DocDirController extends BaseController {
     /**
      * 新增目录信息
      */
-    @RequiresPermissions("doc:dir:add")
     @Log(title = "目录信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody DocDir docDir) {
@@ -219,7 +216,6 @@ public class DocDirController extends BaseController {
     /**
      * 修改目录信息
      */
-    @RequiresPermissions("doc:dir:edit")
     @Log(title = "目录信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody DocDir docDir) {
@@ -229,7 +225,6 @@ public class DocDirController extends BaseController {
     /**
      * 删除目录信息
      */
-    @RequiresPermissions("doc:dir:remove")
     @Log(title = "目录信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{dirId}")
     public AjaxResult remove(@PathVariable Long dirId) {

+ 0 - 9
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/controller/DocShareAccepterController.java

@@ -39,7 +39,6 @@ public class DocShareAccepterController extends BaseController {
     /**
      * 查询未分配成员列表
      */
-    @RequiresPermissions("doc:shareAccepter:list")
     @GetMapping("/unallocatedList")
     public TableDataInfo unallocatedList(DocShareAccepter docShareAccepter) {
         startPage();
@@ -50,7 +49,6 @@ public class DocShareAccepterController extends BaseController {
     /**
      * 分配分组成员
      */
-    @RequiresPermissions("doc:shareAccepter:list")
     @Log(title = "分组成员", businessType = BusinessType.GRANT)
     @PutMapping("/selectAll")
     public AjaxResult selectShareUserAll(Long docId, Long[] userIds) {
@@ -60,7 +58,6 @@ public class DocShareAccepterController extends BaseController {
     /**
      * 批量取消授权用户
      */
-    @RequiresPermissions("doc:shareAccepter:list")
     @Log(title = "分组成员", businessType = BusinessType.GRANT)
     @PutMapping("/cancelAll")
     public AjaxResult cancelShareUserAll(Long docId, Long[] userIds) {
@@ -70,7 +67,6 @@ public class DocShareAccepterController extends BaseController {
     /**
      * 查询文档分享接收人列表
      */
-    @RequiresPermissions("doc:shareAccepter:list")
     @GetMapping("/list")
     public TableDataInfo list(DocShareAccepter docShareAccepter) {
         startPage();
@@ -81,7 +77,6 @@ public class DocShareAccepterController extends BaseController {
     /**
      * 导出文档分享接收人列表
      */
-    @RequiresPermissions("doc:shareAccepter:export")
     @Log(title = "文档分享接收人", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, DocShareAccepter docShareAccepter) {
@@ -93,7 +88,6 @@ public class DocShareAccepterController extends BaseController {
     /**
      * 获取文档分享接收人详细信息
      */
-    @RequiresPermissions("doc:shareAccepter:query")
     @GetMapping(value = "/{docId}")
     public AjaxResult getInfo(@PathVariable("docId") Long docId) {
         return success(docShareAccepterService.selectDocShareAccepterByDocId(docId));
@@ -102,7 +96,6 @@ public class DocShareAccepterController extends BaseController {
     /**
      * 新增文档分享接收人
      */
-    @RequiresPermissions("doc:shareAccepter:add")
     @Log(title = "文档分享接收人", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody DocShareAccepter docShareAccepter) {
@@ -112,7 +105,6 @@ public class DocShareAccepterController extends BaseController {
     /**
      * 修改文档分享接收人
      */
-    @RequiresPermissions("doc:shareAccepter:edit")
     @Log(title = "文档分享接收人", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody DocShareAccepter docShareAccepter) {
@@ -122,7 +114,6 @@ public class DocShareAccepterController extends BaseController {
     /**
      * 删除文档分享接收人
      */
-    @RequiresPermissions("doc:shareAccepter:remove")
     @Log(title = "文档分享接收人", businessType = BusinessType.DELETE)
     @DeleteMapping("/{docIds}")
     public AjaxResult remove(@PathVariable Long[] docIds) {

+ 0 - 6
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/controller/DocShareController.java

@@ -38,7 +38,6 @@ public class DocShareController extends BaseController {
     /**
      * 查询文档分享列表
      */
-    @RequiresPermissions("doc:share:list")
     @GetMapping("/list")
     public TableDataInfo list(DocShare docShare) {
         startPage();
@@ -49,7 +48,6 @@ public class DocShareController extends BaseController {
     /**
      * 导出文档分享列表
      */
-    @RequiresPermissions("doc:share:export")
     @Log(title = "文档分享", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, DocShare docShare) {
@@ -61,7 +59,6 @@ public class DocShareController extends BaseController {
     /**
      * 获取文档分享详细信息
      */
-    @RequiresPermissions("doc:share:query")
     @GetMapping(value = "/{docId}")
     public AjaxResult getInfo(@PathVariable("docId") Long docId) {
         return success(docShareService.selectDocShareByDocId(docId));
@@ -70,7 +67,6 @@ public class DocShareController extends BaseController {
     /**
      * 新增文档分享
      */
-    @RequiresPermissions("doc:share:add")
     @Log(title = "文档分享", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody DocShare docShare) {
@@ -80,7 +76,6 @@ public class DocShareController extends BaseController {
     /**
      * 修改文档分享
      */
-    @RequiresPermissions("doc:share:edit")
     @Log(title = "文档分享", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody DocShare docShare) {
@@ -90,7 +85,6 @@ public class DocShareController extends BaseController {
     /**
      * 删除文档分享
      */
-    @RequiresPermissions("doc:share:remove")
     @Log(title = "文档分享", businessType = BusinessType.DELETE)
     @DeleteMapping("/{docIds}")
     public AjaxResult remove(@PathVariable Long[] docIds) {

+ 0 - 1
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/controller/DocTagController.java

@@ -39,7 +39,6 @@ public class DocTagController extends BaseController {
     /**
      * 查询文档标签列表
      */
-    @RequiresPermissions("doc:tag:list")
     @GetMapping("/list")
     public TableDataInfo list(DocTag docTag) {
         startPage();

+ 3 - 2
lzga-modules/lzga-doc/src/main/resources/mapper/doc/DocGroupMapper.xml

@@ -54,8 +54,9 @@
         <where>
             is_del!='1'
             <choose>
-                <when test="searchValue!=null and searchValue=='1'">and (GROUP_MANAGER = #{groupManager} or group_id in
-                    (select group_id from doc_group_user where user_id=#{groupManager}))
+                <when test="searchValue!=null and searchValue == '1'.toString()">
+                    and (GROUP_MANAGER = #{groupManager} or
+                    group_id in (select group_id from doc_group_user where user_id=#{groupManager}))
                 </when>
                 <otherwise>and GROUP_MANAGER = #{groupManager}</otherwise>
             </choose>

+ 406 - 0
lzga-ui/src/views/doc/info/deptDoc.vue

@@ -0,0 +1,406 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="20">
+      <!--目录数据-->
+      <el-col :span="4" :xs="24">
+        <div class="head-container">
+          <el-tree :data="dirList" :props="defaultProps" :expand-on-click-node="false" ref="tree" node-key="id"
+            default-expand-all highlight-current @node-click="handleNodeClick" />
+        </div>
+      </el-col>
+      <!--文件数据-->
+      <el-col :span="16" :xs=24>
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
+          label-width="68px">
+          <el-form-item label="文件名称" prop="docName">
+            <el-input v-model="queryParams.docName" placeholder="请输入文件名称" clearable @keyup.enter.native="handleQuery" />
+          </el-form-item>
+          <el-form-item label="文件级别" prop="docLevel">
+            <el-select v-model="queryParams.docLevel" placeholder="请选择文件级别" @change="handleQuery">
+              <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="文件年份" prop="createYear">
+            <el-input v-model="queryParams.createYear" 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">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+              v-hasRole="['dept.manager']">上传</el-button>
+          </el-col>
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+
+        <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
+          <el-table-column type="selection" width="55" align="center" />
+          <el-table-column label="文件名称" align="center" prop="docName" />
+          <el-table-column label="文件大小" align="center" prop="docSize" :formatter="fileSizeData" />
+          <el-table-column label="修改时间" align="center" prop="updateTime" />
+          <el-table-column label="文件级别" align="center" prop="docLevel" :formatter="fileLevelData" />
+          <el-table-column label="文件年份" align="center" prop="createYear" />
+          <el-table-column label="标签" align="center" prop="tagName" />
+          <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)">预览</el-button>
+              <el-button size="mini" type="text" icon="el-icon-download"
+                @click="handleDownload(scope.row)">下载</el-button>
+              <el-button size="mini" type="text" icon="el-icon-view" @click="handleEdit(scope.row)" v-hasRole="
+                ['dept.manager']">在线编辑</el-button>
+              <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+                v-hasRole="['dept.manager']">修改</el-button>
+              <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
+                v-hasRole="['dept.manager']">删除</el-button>
+            </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>
+      <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="文件描述">
+          <el-input v-model="form.docDesc" type="textarea" 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="文件标签" prop="docLevel">
+          <el-input v-model="form.docTag" 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>
+</template>
+
+<script>
+  import {
+    listInfo,
+    getInfo,
+    delInfo,
+    addInfo,
+    updateInfo
+  } from "@/api/doc/info";
+  import {
+    deptList
+  } 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 {
+        // 遮罩层
+        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,
+        },
+        // 表单参数
+        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();
+    },
+    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: {
+      /** 转换目录信息数据结构 */
+      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();
+      },
+      //分享
+      handleShare(row) {
+        this.$router.push("/doc/share-user/user/" + row.docId);
+      },
+      /**下载按钮操作*/
+      handleDownload(row) {
+        location.href = row.docPath;
+      },
+      //预览
+      handlePreview(row) {
+        row.isEdit = false;
+        this.$tab.openPage("文件[" + row.docName + "]预览", '/doc/oo-edit/index/' + row.docId, row);
+      },
+      //在线编辑
+      handleEdit(row) {
+        row.isEdit = true;
+        this.$tab.openPage("文件[" + row.docName + "]在线编辑", '/doc/oo-edit/index/' + row.docId, row);
+      },
+      //先获取左边目录树,拿到目录ID和spaceId才能查询
+      dirTree() {
+        this.loading = true;
+        deptList().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;
+        });
+      },
+      /** 查询文件基本信息列表 */
+      getList() {
+        this.loading = true;
+        listInfo(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
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        // const para = {
+        //   tagId: 123
+        // }
+        // this.queryParams.params = para;
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.queryParams.dirId = this.dirId;
+        this.queryParams.searchValue = this.spaceId;
+        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 = "添加文件基本信息";
+      },
+      /** 修改按钮操作 */
+      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 = "修改文件基本信息";
+        });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            //这句是要删掉的
+            this.form.tagList = [{
+              tagId: 1,
+              tagName: '十四大'
+            }];
+            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();
+              });
+            }
+          }
+        });
+      },
+      /** 删除按钮操作 */
+      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`;
+        }
+      },
+      /**处理文档级别数据*/
+      fileLevelData(row, col, value) {
+        try {
+          const obj = this.levelOptions.find(level => level.levelId == row.docLevel);
+          return obj.levelName;
+        } catch (e) {}
+      },
+      /**根据文件级别,设置是否显示*/
+      checkLevel(row, role) {
+        try {
+          const obj = this.levelOptions.find(level => level.levelId == row.docLevel);
+          if (obj.levelRole.indexOf(role) != -1) {
+            return true;
+          } else {
+            return false;
+          }
+        } catch (e) {}
+      }
+    }
+  };
+</script>

+ 5 - 0
lzga-ui/src/views/doc/info/index.vue

@@ -351,6 +351,11 @@
       submitForm() {
         this.$refs["form"].validate(valid => {
           if (valid) {
+            //这句是要删掉的
+            this.form.tagList = [{
+              tagId: 1,
+              tagName: '十四大'
+            }];
             if (this.form.docId != null) {
               updateInfo(this.form).then(response => {
                 this.$modal.msgSuccess("修改成功");

+ 406 - 0
lzga-ui/src/views/doc/info/publicDoc.vue

@@ -0,0 +1,406 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="20">
+      <!--目录数据-->
+      <el-col :span="4" :xs="24">
+        <div class="head-container">
+          <el-tree :data="dirList" :props="defaultProps" :expand-on-click-node="false" ref="tree" node-key="id"
+            default-expand-all highlight-current @node-click="handleNodeClick" />
+        </div>
+      </el-col>
+      <!--文件数据-->
+      <el-col :span="16" :xs=24>
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
+          label-width="68px">
+          <el-form-item label="文件名称" prop="docName">
+            <el-input v-model="queryParams.docName" placeholder="请输入文件名称" clearable @keyup.enter.native="handleQuery" />
+          </el-form-item>
+          <el-form-item label="文件级别" prop="docLevel">
+            <el-select v-model="queryParams.docLevel" placeholder="请选择文件级别" @change="handleQuery">
+              <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="文件年份" prop="createYear">
+            <el-input v-model="queryParams.createYear" 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">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+              v-hasRole="['public.manager']">上传</el-button>
+          </el-col>
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+
+        <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
+          <el-table-column type="selection" width="55" align="center" />
+          <el-table-column label="文件名称" align="center" prop="docName" />
+          <el-table-column label="文件大小" align="center" prop="docSize" :formatter="fileSizeData" />
+          <el-table-column label="修改时间" align="center" prop="updateTime" />
+          <el-table-column label="文件级别" align="center" prop="docLevel" :formatter="fileLevelData" />
+          <el-table-column label="文件年份" align="center" prop="createYear" />
+          <el-table-column label="标签" align="center" prop="tagName" />
+          <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)">预览</el-button>
+              <el-button size="mini" type="text" icon="el-icon-download"
+                @click="handleDownload(scope.row)">下载</el-button>
+              <el-button size="mini" type="text" icon="el-icon-view" @click="handleEdit(scope.row)" v-hasRole="
+                ['public.manager']">在线编辑</el-button>
+              <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+                v-hasRole="['public.manager']">修改</el-button>
+              <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
+                v-hasRole="['public.manager']">删除</el-button>
+            </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>
+      <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="文件描述">
+          <el-input v-model="form.docDesc" type="textarea" 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="文件标签" prop="docLevel">
+          <el-input v-model="form.docTag" 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>
+</template>
+
+<script>
+  import {
+    listInfo,
+    getInfo,
+    delInfo,
+    addInfo,
+    updateInfo
+  } from "@/api/doc/info";
+  import {
+    publicList
+  } 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 {
+        // 遮罩层
+        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,
+        },
+        // 表单参数
+        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();
+    },
+    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: {
+      /** 转换目录信息数据结构 */
+      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();
+      },
+      //分享
+      handleShare(row) {
+        this.$router.push("/doc/share-user/user/" + row.docId);
+      },
+      /**下载按钮操作*/
+      handleDownload(row) {
+        location.href = row.docPath;
+      },
+      //预览
+      handlePreview(row) {
+        row.isEdit = false;
+        this.$tab.openPage("文件[" + row.docName + "]预览", '/doc/oo-edit/index/' + row.docId, row);
+      },
+      //在线编辑
+      handleEdit(row) {
+        row.isEdit = true;
+        this.$tab.openPage("文件[" + row.docName + "]在线编辑", '/doc/oo-edit/index/' + row.docId, row);
+      },
+      //先获取左边目录树,拿到目录ID和spaceId才能查询
+      dirTree() {
+        this.loading = true;
+        publicList().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;
+        });
+      },
+      /** 查询文件基本信息列表 */
+      getList() {
+        this.loading = true;
+        listInfo(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
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        // const para = {
+        //   tagId: 123
+        // }
+        // this.queryParams.params = para;
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.queryParams.dirId = this.dirId;
+        this.queryParams.searchValue = this.spaceId;
+        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 = "添加文件基本信息";
+      },
+      /** 修改按钮操作 */
+      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 = "修改文件基本信息";
+        });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            //这句是要删掉的
+            this.form.tagList = [{
+              tagId: 1,
+              tagName: '十四大'
+            }];
+            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();
+              });
+            }
+          }
+        });
+      },
+      /** 删除按钮操作 */
+      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`;
+        }
+      },
+      /**处理文档级别数据*/
+      fileLevelData(row, col, value) {
+        try {
+          const obj = this.levelOptions.find(level => level.levelId == row.docLevel);
+          return obj.levelName;
+        } catch (e) {}
+      },
+      /**根据文件级别,设置是否显示*/
+      checkLevel(row, role) {
+        try {
+          const obj = this.levelOptions.find(level => level.levelId == row.docLevel);
+          if (obj.levelRole.indexOf(role) != -1) {
+            return true;
+          } else {
+            return false;
+          }
+        } catch (e) {}
+      }
+    }
+  };
+</script>

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

@@ -14,67 +14,71 @@
     <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()" active-color="red"> </el-switch>
-         <span>(如果选择机密,则共享用户打开时需要输入自己的用户密码才能查看)</span>
+          <el-switch v-model="form.isSecret" active-value="1" inactive-value="0" @change="shareChange()"
+            active-color="red"> </el-switch>
+          <span>(如果选择机密,则共享用户打开时需要输入自己的用户密码才能查看)</span>
         </el-form-item>
         <el-form-item prop="onlyOneTime" label="阅后即焚">
-          <el-switch v-model="form.onlyOneTime" active-value="1" inactive-value="0" @change="shareChange()" active-color="red"> </el-switch>
+          <el-switch v-model="form.onlyOneTime" active-value="1" inactive-value="0" @change="shareChange()"
+            active-color="red"> </el-switch>
           <span>(如果选择阅后即焚,则共享用户只能打开一次)</span>
         </el-form-item>
       </el-form>
     </div>
     <div class="main">
       <div class="app-container">
-      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-        <el-form-item label="用户ID" prop="userId">
-          <el-input v-model="queryParams.userId" placeholder="请输入用户ID" clearable @keyup.enter.native="handleQuery" />
-        </el-form-item>
-        <el-form-item label="用户姓名" prop="userName">
-          <el-input v-model="queryParams.userName" 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="resetq">重置</el-button>
-        </el-form-item>
-      </el-form>
-  
-      <el-row :gutter="10" class="mb8">
-        <el-col :span="1.5">
-          <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
-            v-hasPermi="['doc:groupUser:add']">添加人员</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button type="danger" plain icon="el-icon-circle-close" size="mini" :disabled="multiple"
-            @click="cancelGroupUserAll" v-hasPermi="['doc:groupUser:remove']">删除人员</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button type="warning" plain icon="el-icon-arrow-left" size="mini" @click="handleClose">返回</el-button>
-        </el-col>
-        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-      </el-row>
-  
-      <el-table v-loading="loading" :data="groupUserList" @selection-change="handleSelectionChange">
-        <el-table-column type="selection" width="55" align="center" />
-        <el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" />
-        <el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true" />
-        <el-table-column label="邮箱" prop="email" :show-overflow-tooltip="true" />
-        <el-table-column label="手机" prop="phonenumber" :show-overflow-tooltip="true" />
-        <el-table-column label="状态" align="center" prop="status">
-          <template slot-scope="scope">
-            <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
-          </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-circle-close" @click="cancelGroupUser(scope.row)"
-              v-hasPermi="['doc:groupUser:remove']">删除人员</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-  
-      <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
-      <select-user ref="select" :docId="queryParams.docId" @ok="handleQuery" />
-    </div>
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
+          label-width="68px">
+          <el-form-item label="用户ID" prop="userId">
+            <el-input v-model="queryParams.userId" placeholder="请输入用户ID" clearable @keyup.enter.native="handleQuery" />
+          </el-form-item>
+          <el-form-item label="用户姓名" prop="userName">
+            <el-input v-model="queryParams.userName" 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="resetq">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">添加人员</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button type="danger" plain icon="el-icon-circle-close" size="mini" :disabled="multiple"
+              @click="cancelGroupUserAll">删除人员</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button type="warning" plain icon="el-icon-arrow-left" size="mini" @click="handleClose">返回</el-button>
+          </el-col>
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+
+        <el-table v-loading="loading" :data="groupUserList" @selection-change="handleSelectionChange">
+          <el-table-column type="selection" width="55" align="center" />
+          <el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" />
+          <el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true" />
+          <el-table-column label="邮箱" prop="email" :show-overflow-tooltip="true" />
+          <el-table-column label="手机" prop="phonenumber" :show-overflow-tooltip="true" />
+          <el-table-column label="状态" align="center" prop="status">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
+            </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-circle-close" @click="cancelGroupUser(scope.row)">删除人员</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination v-show=" total>0" :total="total" :page.sync="queryParams.pageNum"
+                :limit.sync="queryParams.pageSize"
+                @pagination="getList" />
+                <select-user ref="select" :docId="queryParams.docId" @ok="handleQuery" />
+      </div>
 
 
 
@@ -83,201 +87,203 @@
     </div>
   </div>
 </template>
-  
-  <script>
+
+<script>
   import "@/styles1/element-ui1.scss";
 
-    import {
-      listShareAccepter,
-      getShareAccepter,
-      delShareAccepter,
-      addShareAccepter,
-      updateShareAccepter,
-      shareUserCancelAll
-    } from "@/api/doc/shareAccepter";
-  
-    import {
-      listShare,
-      getShare,
-      delShare,
-      addShare,
-      updateShare
-    } from "@/api/doc/share";
-  
-    import selectUser from "./selectUser";
-    export default {
-      name: "GroupUser",
-      dicts: ['sys_yes_no'],
-      components: {
-        selectUser
+  import {
+    listShareAccepter,
+    getShareAccepter,
+    delShareAccepter,
+    addShareAccepter,
+    updateShareAccepter,
+    shareUserCancelAll
+  } from "@/api/doc/shareAccepter";
+
+  import {
+    listShare,
+    getShare,
+    delShare,
+    addShare,
+    updateShare
+  } from "@/api/doc/share";
+
+  import selectUser from "./selectUser";
+  export default {
+    name: "GroupUser",
+    dicts: ['sys_yes_no'],
+    components: {
+      selectUser
+    },
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 分组成员表格数据
+        groupUserList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          userId: null,
+          userName: null
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {}
+      };
+    },
+    created() {
+      const docId = this.$route.params && this.$route.params.docId;
+      if (docId) {
+        this.queryParams.docId = docId;
+        this.getList();
+      }
+    },
+    methods: {
+      shareChange() {
+        this.form.docId = this.queryParams.docId;
+        updateShare(this.form).then(response => {
+          this.$modal.msgSuccess("修改成功");
+        });
       },
-      data() {
-        return {
-          // 遮罩层
-          loading: true,
-          // 选中数组
-          ids: [],
-          // 非单个禁用
-          single: true,
-          // 非多个禁用
-          multiple: true,
-          // 显示搜索条件
-          showSearch: true,
-          // 总条数
-          total: 0,
-          // 分组成员表格数据
-          groupUserList: [],
-          // 弹出层标题
-          title: "",
-          // 是否显示弹出层
-          open: false,
-          // 查询参数
-          queryParams: {
-            pageNum: 1,
-            pageSize: 10,
-            userId: null,
-            userName: null
-          },
-          // 表单参数
-          form: {},
-          // 表单校验
-          rules: {}
+      // 返回按钮
+      handleClose() {
+        const obj = {
+          path: "/home/file/individual"
         };
+        this.$tab.closeOpenPage(obj);
       },
-      created() {
-        const docId = this.$route.params && this.$route.params.docId;
-        if (docId) {
-          this.queryParams.docId = docId;
-          this.getList();
-        }
+      /** 查询分组成员列表 */
+      getList() {
+        this.loading = true;
+        getShare(this.queryParams.docId).then(response => {
+          this.form.isSecret = response.data.isSecret;
+          this.form.onlyOneTime = response.data.onlyOneTime;
+        });
+
+        listShareAccepter(this.queryParams).then(response => {
+          this.groupUserList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
       },
-      methods: {
-        shareChange() {
-          this.form.docId = this.queryParams.docId;
-          updateShare(this.form).then(response => {
-            this.$modal.msgSuccess("修改成功");
-          });
-        },
-        // 返回按钮
-        handleClose() {
-          const obj = {
-            path: "/home/file/individual"
-          };
-          this.$tab.closeOpenPage(obj);
-        },
-        /** 查询分组成员列表 */
-        getList() {
-          this.loading = true;
-          getShare(this.queryParams.docId).then(response => {
-            this.form.isSecret = response.data.isSecret;
-            this.form.onlyOneTime = response.data.onlyOneTime;
-          });
-  
-          listShareAccepter(this.queryParams).then(response => {
-            this.groupUserList = response.rows;
-            this.total = response.total;
-            this.loading = false;
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          docId: null,
+          userId: null,
+          userName: null
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.userId)
+        this.single = selection.length !== 1
+        this.multiple = !selection.length
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.$refs.select.show();
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.docId != null) {
+              updateGroupUser(this.form).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              addGroupUser(this.form).then(response => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        });
+      },
+      /** 删除按钮操作 */
+      cancelGroupUserAll(row) {
+        const docId = this.queryParams.docId;
+        const userIds = this.ids.join(",");
+        this.$modal.confirm('是否确认删除选中的分组成员?').then(function() {
+          return shareUserCancelAll({
+            docId: docId,
+            userIds: userIds
           });
-        },
-        // 取消按钮
-        cancel() {
-          this.open = false;
-          this.reset();
-        },
-        // 表单重置
-        reset() {
-          this.form = {
-            docId: null,
-            userId: null,
-            userName: null
-          };
-          this.resetForm("form");
-        },
-        /** 搜索按钮操作 */
-        handleQuery() {
-          this.queryParams.pageNum = 1;
+        }).then(() => {
           this.getList();
-        },
-        /** 重置按钮操作 */
-        resetQuery() {
-          this.resetForm("queryForm");
-          this.handleQuery();
-        },
-        // 多选框选中数据
-        handleSelectionChange(selection) {
-          this.ids = selection.map(item => item.userId)
-          this.single = selection.length !== 1
-          this.multiple = !selection.length
-        },
-        /** 新增按钮操作 */
-        handleAdd() {
-          this.$refs.select.show();
-        },
-        /** 提交按钮 */
-        submitForm() {
-          this.$refs["form"].validate(valid => {
-            if (valid) {
-              if (this.form.docId != null) {
-                updateGroupUser(this.form).then(response => {
-                  this.$modal.msgSuccess("修改成功");
-                  this.open = false;
-                  this.getList();
-                });
-              } else {
-                addGroupUser(this.form).then(response => {
-                  this.$modal.msgSuccess("新增成功");
-                  this.open = false;
-                  this.getList();
-                });
-              }
-            }
+          this.$modal.msgSuccess("删除成功");
+        }).catch(() => {});
+      },
+      /** 删除按钮操作 */
+      cancelGroupUser(row) {
+        const docId = this.queryParams.docId;
+        const userIds = row.userId
+        this.$modal.confirm('是否确认删除分组成员"' + row.userName + '"的数据项?').then(function() {
+          return shareUserCancelAll({
+            docId: docId,
+            userIds: userIds
           });
-        },
-        /** 删除按钮操作 */
-        cancelGroupUserAll(row) {
-          const docId = this.queryParams.docId;
-          const userIds = this.ids.join(",");
-          this.$modal.confirm('是否确认删除选中的分组成员?').then(function() {
-            return shareUserCancelAll({
-              docId: docId,
-              userIds: userIds
-            });
-          }).then(() => {
-            this.getList();
-            this.$modal.msgSuccess("删除成功");
-          }).catch(() => {});
-        },
-        /** 删除按钮操作 */
-        cancelGroupUser(row) {
-          const docId = this.queryParams.docId;
-          const userIds = row.userId
-          this.$modal.confirm('是否确认删除分组成员"' + row.userName + '"的数据项?').then(function() {
-            return shareUserCancelAll({
-              docId: docId,
-              userIds: userIds
-            });
-          }).then(() => {
-            this.getList();
-            this.$modal.msgSuccess("删除成功");
-          }).catch(() => {});
-        },
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        }).catch(() => {});
       },
-    };
-  </script>
+    },
+  };
+</script>
 
-  <style scoped lang='scss'>
+<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));
+
     .header {
       height: calc(100vh * (22 / 1080));
       margin-top: calc(100vh * (20 / 1080));
       margin-bottom: calc(100vh * (20 / 1080));
       display: flex;
       align-items: center;
+
       img {
         width: calc(100vw * (16 / 1920));
         height: calc(100vh * (16 / 1080));
@@ -285,10 +291,12 @@
         margin-left: 3px;
         margin-right: 3px;
       }
+
       .top1 {
         color: #2e8aecff;
       }
     }
+
     .title {
       height: calc(100vh * (22 / 1080));
       margin-top: calc(100vh * (20 / 1080));
@@ -298,85 +306,101 @@
       font-weight: bold;
       line-height: calc(100vh * (22 / 1080));
     }
+
     .main {
       width: calc(100vw * (1876 / 1920));
       height: calc(100vh * (800 / 1080));
+
       .app-container {
         width: calc(100vw * (1876 / 1920));
         height: calc(100vh * (800 / 1080));
         background: url(../../../../assets/img/Group-615.png);
         background-size: calc(100vw * (1876 / 1920)) calc(100vh * (800 / 1080));
       }
-        .mb8 {
-          margin-top: 5px;
-        }
-        //表格底部
-        .pagination-container {
-          background: transparent;
-          padding: 0 !important;
-          margin: 0;
-        }
-        //重置搜索
-        .resetq{
-          color: #2E8AECFF;
-          background: transparent;
-          border: 1px solid #2E8AECFF; 
-        }
+
+      .mb8 {
+        margin-top: 5px;
+      }
+
+      //表格底部
+      .pagination-container {
+        background: transparent;
+        padding: 0 !important;
+        margin: 0;
+      }
+
+      //重置搜索
+      .resetq {
+        color: #2E8AECFF;
+        background: transparent;
+        border: 1px solid #2E8AECFF;
+      }
     }
   }
+
   //开关按钮前面的字体颜色
   ::v-deep .el-form-item__label {
     color: #2E8AECFF;
-}
+  }
+
   //开关按钮之间的间距
   ::v-deep .el-form-item {
     margin-bottom: 5px;
-} 
-//搜索刷新按钮颜色
-::v-deep .el-button.is-circle {
-  background: #006c9aff;
-  color: white;
-}
-//table样式
-::v-deep .el-table {
-  height: calc(100vh * (590 / 1080));
-  background: transparent;
-  color: #7ea4c8ff;
-}
-::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-table::before {
-  height: 0;
-}
-//按钮的样式
-::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 {
-  background-color: #002a5cff;
-  border: none;
-  color: #2e8aec;
-}
-//右边顶部搜索框样式
-::v-deep .el-input__inner {
-  background-color: transparent;
-  border: 1px solid #01d1ffff;
-  color: #ffffffcc;
-}
-  </style>
-  
+  }
+
+  //搜索刷新按钮颜色
+  ::v-deep .el-button.is-circle {
+    background: #006c9aff;
+    color: white;
+  }
+
+  //table样式
+  ::v-deep .el-table {
+    height: calc(100vh * (590 / 1080));
+    background: transparent;
+    color: #7ea4c8ff;
+  }
+
+  ::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-table::before {
+    height: 0;
+  }
+
+  //按钮的样式
+  ::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 {
+    background-color: #002a5cff;
+    border: none;
+    color: #2e8aec;
+  }
+
+  //右边顶部搜索框样式
+  ::v-deep .el-input__inner {
+    background-color: transparent;
+    border: 1px solid #01d1ffff;
+    color: #ffffffcc;
+  }
+</style>