فهرست منبع

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

yxc 2 سال پیش
والد
کامیت
3fa03adcfb
6فایلهای تغییر یافته به همراه437 افزوده شده و 418 حذف شده
  1. 1 1
      src/api/doc/group.js
  2. 1 1
      src/api/doc/groupUser.js
  3. 4 0
      src/views/doc/dir/index.vue
  4. 173 303
      src/views/doc/group/index.vue
  5. 244 110
      src/views/doc/groupUser/index.vue
  6. 14 3
      src/views/doc/info/index.vue

+ 1 - 1
src/api/doc/group.js

@@ -41,4 +41,4 @@ export function delGroup(groupId) {
     url: '/doc/group/' + groupId,
     method: 'delete'
   })
-}
+}

+ 1 - 1
src/api/doc/groupUser.js

@@ -41,4 +41,4 @@ export function delGroupUser(groupId) {
     url: '/doc/groupUser/' + groupId,
     method: 'delete'
   })
-}
+}

+ 4 - 0
src/views/doc/dir/index.vue

@@ -257,6 +257,10 @@
       },
       /** 扩容申请 */
       handleExpand(row) {
+        console.log(this.spaceData);
+        return false;
+
+
         this.formSpace.currentCap = this.spaceData.spaceCap;
         this.formSpace.spaceId = this.spaceData.spaceId;
         this.formSpace.spaceName = this.spaceData.spaceName;

+ 173 - 303
src/views/doc/group/index.vue

@@ -2,60 +2,15 @@
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="分组名称" prop="groupName">
-        <el-input
-          v-model="queryParams.groupName"
-          placeholder="请输入分组名称"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+        <el-input v-model="queryParams.groupName" placeholder="请输入分组名称" clearable @keyup.enter.native="handleQuery" />
       </el-form-item>
-      <el-form-item label="创建人" prop="createBy">
-        <el-input
-          v-model="queryParams.createBy"
-          placeholder="请输入创建人"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+      <el-form-item label="分组管理员" prop="groupManager">
+        <el-input v-model="queryParams.groupManager" placeholder="请输入分组管理员" clearable
+          @keyup.enter.native="handleQuery" />
       </el-form-item>
-      <el-form-item label="创建时间" prop="createTime">
-        <el-date-picker clearable
-          v-model="queryParams.createTime"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="请选择创建时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="更新人" prop="updateBy">
-        <el-input
-          v-model="queryParams.updateBy"
-          placeholder="请输入更新人"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="更新时间" prop="updateTime">
-        <el-date-picker clearable
-          v-model="queryParams.updateTime"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="请选择更新时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="备注" prop="remark">
-        <el-input
-          v-model="queryParams.remark"
-          placeholder="请输入备注"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="逻辑删除标志;1/非1" prop="isDel">
-        <el-input
-          v-model="queryParams.isDel"
-          placeholder="请输入逻辑删除标志;1/非1"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+      <el-form-item label="分组管理员姓名" prop="groupManagerName">
+        <el-input v-model="queryParams.groupManagerName" 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>
@@ -65,46 +20,20 @@
 
     <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:group:add']"
-        >新增</el-button>
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+          v-hasPermi="['doc:group:add']">新增</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['doc:group:edit']"
-        >修改</el-button>
+        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
+          v-hasPermi="['doc:group:edit']">修改</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['doc:group:remove']"
-        >删除</el-button>
+        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
+          v-hasPermi="['doc:group:remove']">删除</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['doc:group:export']"
-        >导出</el-button>
+        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
+          v-hasPermi="['doc:group:export']">导出</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -113,47 +42,20 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="分组ID" align="center" prop="groupId" />
       <el-table-column label="分组名称" align="center" prop="groupName" />
-      <el-table-column label="创建人" align="center" prop="createBy" />
-      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="更新人" align="center" prop="updateBy" />
-      <el-table-column label="更新时间" align="center" prop="updateTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" />
-      <el-table-column label="逻辑删除标志;1/非1" align="center" prop="isDel" />
+      <el-table-column label="分组管理员" align="center" prop="groupManager" />
+      <el-table-column label="分组管理员姓名" align="center" prop="groupManagerName" />
       <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-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['doc:group:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['doc:group:remove']"
-          >删除</el-button>
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+            v-hasPermi="['doc:group:edit']">修改</el-button>
+          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
+            v-hasPermi="['doc:group: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"
-    />
+
+    <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+      @pagination="getList" />
 
     <!-- 添加或修改分组对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -161,25 +63,21 @@
         <el-form-item label="分组名称" prop="groupName">
           <el-input v-model="form.groupName" placeholder="请输入分组名称" />
         </el-form-item>
+        <el-form-item label="分组管理员" prop="groupManager">
+          <el-input v-model="form.groupManager" placeholder="请输入分组管理员" />
+        </el-form-item>
+        <el-form-item label="分组管理员姓名" prop="groupManagerName">
+          <el-input v-model="form.groupManagerName" placeholder="请输入分组管理员姓名" />
+        </el-form-item>
+        <el-form-item label="创建人ID" prop="creater">
+          <el-input v-model="form.creater" placeholder="请输入创建人ID" />
+        </el-form-item>
         <el-form-item label="备注" prop="remark">
           <el-input v-model="form.remark" placeholder="请输入备注" />
         </el-form-item>
         <el-form-item label="逻辑删除标志;1/非1" prop="isDel">
           <el-input v-model="form.isDel" placeholder="请输入逻辑删除标志;1/非1" />
         </el-form-item>
-        <el-divider content-position="center">分组成员信息</el-divider>
-        <el-row :gutter="10" class="mb8">
-          <el-col :span="1.5">
-            <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddDocGroupUser">添加</el-button>
-          </el-col>
-          <el-col :span="1.5">
-            <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteDocGroupUser">删除</el-button>
-          </el-col>
-        </el-row>
-        <el-table :data="docGroupUserList" :row-class-name="rowDocGroupUserIndex" @selection-change="handleDocGroupUserSelectionChange" ref="docGroupUser">
-          <el-table-column type="selection" width="50" align="center" />
-          <el-table-column label="序号" align="center" prop="index" width="50"/>
-        </el-table>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -190,181 +88,153 @@
 </template>
 
 <script>
-import { listGroup, getGroup, delGroup, addGroup, updateGroup } from "@/api/doc/group";
+  import {
+    listGroup,
+    getGroup,
+    delGroup,
+    addGroup,
+    updateGroup
+  } from "@/api/doc/group";
 
-export default {
-  name: "Group",
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 子表选中数据
-      checkedDocGroupUser: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 分组表格数据
-      groupList: [],
-      // 分组成员表格数据
-      docGroupUserList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        groupName: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-        remark: null,
-        isDel: null
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询分组列表 */
-    getList() {
-      this.loading = true;
-      listGroup(this.queryParams).then(response => {
-        this.groupList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        groupId: null,
-        groupName: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-        remark: null,
-        isDel: null
+  export default {
+    name: "Group",
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 分组表格数据
+        groupList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          groupName: null,
+          groupManager: null,
+          groupManagerName: null,
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {}
       };
-      this.docGroupUserList = [];
-      this.resetForm("form");
     },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
+    created() {
       this.getList();
     },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.groupId)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加分组";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const groupId = row.groupId || this.ids
-      getGroup(groupId).then(response => {
-        this.form = response.data;
-        this.docGroupUserList = response.data.docGroupUserList;
+    methods: {
+      /** 查询分组列表 */
+      getList() {
+        this.loading = true;
+        listGroup(this.queryParams).then(response => {
+          this.groupList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          groupId: null,
+          groupName: null,
+          groupManager: null,
+          groupManagerName: null,
+          creater: null,
+          createBy: null,
+          createTime: null,
+          updateBy: null,
+          updateTime: null,
+          remark: null,
+          isDel: 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.groupId)
+        this.single = selection.length !== 1
+        this.multiple = !selection.length
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
         this.open = true;
-        this.title = "修改分组";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          this.form.docGroupUserList = this.docGroupUserList;
-          if (this.form.groupId != null) {
-            updateGroup(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addGroup(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+        this.title = "添加分组";
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+        const groupId = row.groupId || this.ids
+        getGroup(groupId).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改分组";
+        });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.groupId != null) {
+              updateGroup(this.form).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              addGroup(this.form).then(response => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
           }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const groupIds = row.groupId || this.ids;
-      this.$modal.confirm('是否确认删除分组编号为"' + groupIds + '"的数据项?').then(function() {
-        return delGroup(groupIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    },
-	/** 分组成员序号 */
-    rowDocGroupUserIndex({ row, rowIndex }) {
-      row.index = rowIndex + 1;
-    },
-    /** 分组成员添加按钮操作 */
-    handleAddDocGroupUser() {
-      let obj = {};
-      this.docGroupUserList.push(obj);
-    },
-    /** 分组成员删除按钮操作 */
-    handleDeleteDocGroupUser() {
-      if (this.checkedDocGroupUser.length == 0) {
-        this.$modal.msgError("请先选择要删除的分组成员数据");
-      } else {
-        const docGroupUserList = this.docGroupUserList;
-        const checkedDocGroupUser = this.checkedDocGroupUser;
-        this.docGroupUserList = docGroupUserList.filter(function(item) {
-          return checkedDocGroupUser.indexOf(item.index) == -1
         });
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const groupIds = row.groupId || this.ids;
+        this.$modal.confirm('是否确认删除分组编号为"' + groupIds + '"的数据项?').then(function() {
+          return delGroup(groupIds);
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        }).catch(() => {});
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        this.download('doc/group/export', {
+          ...this.queryParams
+        }, `group_${new Date().getTime()}.xlsx`)
       }
-    },
-    /** 复选框选中数据 */
-    handleDocGroupUserSelectionChange(selection) {
-      this.checkedDocGroupUser = selection.map(item => item.index)
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('doc/group/export', {
-        ...this.queryParams
-      }, `group_${new Date().getTime()}.xlsx`)
     }
-  }
-};
-</script>
+  };
+</script>

+ 244 - 110
src/views/doc/groupUser/index.vue

@@ -1,122 +1,256 @@
 <template>
-  <div id="app">
-    <div class='qualityManual-container'>
-      <div>
-        <button style='width: 120px;' type='primary' @click='getFile'>word</button>
-        <button style='width: 120px;' type='primary' @click='getExcelFile'>Excel</button>
-        <button style='width: 120px;' type='primary' @click='getPptFile'>ppt</button>
-        <button style='width: 120px;' type='primary' @click='close'>关闭</button>
-      </div>
-      <div v-if='show' class='qualityManual-container-office'>
-        <vab-only-office :option='option' />
+  <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">重置</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="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['doc:groupUser:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['doc:groupUser:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['doc:groupUser:export']"
+        >导出</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="分组ID" align="center" prop="groupId" />
+      <el-table-column label="用户ID" align="center" prop="userId" />
+      <el-table-column label="用户姓名" align="center" prop="userName" />
+      <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-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['doc:groupUser:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(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"
+    />
+
+    <!-- 添加或修改分组成员对话框 -->
+    <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="userName">
+          <el-input v-model="form.userName" 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>
-    </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-  import vabOnlyOffice from '@/views/doc/oo/onlyoffice.vue'
+import { listGroupUser, getGroupUser, delGroupUser, addGroupUser, updateGroupUser } from "@/api/doc/groupUser";
 
-  export default {
-    name: 'App',
-    components: {
-      vabOnlyOffice
-    },
-    data() {
-      return {
-        //参考vabOnlyOffice组件参数配置
-        option: {
-          url: '', //在线文档地址
-          isEdit: '', //是否允许编辑
-          fileType: '', //文件扩展名
-          title: '', //文件标题
-          user: {
-            id: null, //用户ID
-            name: '' //用户姓名
-          },
-          editUrl: '' //回调地址
-        },
-        show: false //是否显示
+export default {
+  name: "GroupUser",
+  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() {
+    this.getList();
+  },
+  methods: {
+    /** 查询分组成员列表 */
+    getList() {
+      this.loading = true;
+      listGroupUser(this.queryParams).then(response => {
+        this.groupUserList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
-    methods: {
-      getFile() {
-        this.show = true
-        // getAction('/file/selectById', { id: this.id }).then(res => {
-        this.option.isEdit = false
-        this.option.url = 'http://192.168.1.26:9300/statics/2023/04/03/产品研发会议纪要20230314_20230403170635A001.doc'
-        this.option.title = '测试word'
-        this.option.fileType = 'docx'
-        this.option.user = {
-          id: 12,
-          name: '张三'
-        }
-        // })
-      },
-      close() {
-        this.show = false
-      },
-      getExcelFile() {
-        this.show = true
-        // getAction('/file/selectById', { id: this.id }).then(res => {
-        // this.option.key = "11889900-3321";
-        this.option.isEdit = true
-        this.option.url = 'http://192.168.1.26:9300/statics/2023/03/20/第一阶段工作内容V1.0_20230320114614A002.xlsx'
-        this.option.title = '测试excel'
-        this.option.fileType = 'xlsx'
-        this.option.user = {
-            id: 13,
-            name: '李四'
-          },
-          this.option.editUrl = 'http://192.168.1.26:8080/doc/groupUser/save?test=1'
-        // })
-      },
-      close() {
-        this.show = false
-      },
-      getPptFile() {
-        this.show = true
-        // getAction('/file/selectById', { id: this.id }).then(res => {
-        this.option.isEdit = true
-        this.option.url = 'http://192.168.1.26:9300/statics/2023/03/20/项目管理培训06-项目时间管理.ppt'
-        this.option.title = '测试ppt'
-        this.option.fileType = 'ppt'
-        this.option.user = {
-          id: 14,
-          name: '王五'
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        groupId: 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.groupId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加分组成员";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const groupId = row.groupId || this.ids
+      getGroupUser(groupId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改分组成员";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.groupId != 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();
+            });
+          }
         }
-        // })
-      },
-      close() {
-        this.show = false
-      },
+      });
     },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const groupIds = row.groupId || this.ids;
+      this.$modal.confirm('是否确认删除分组成员编号为"' + groupIds + '"的数据项?').then(function() {
+        return delGroupUser(groupIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('doc/groupUser/export', {
+        ...this.queryParams
+      }, `groupUser_${new Date().getTime()}.xlsx`)
+    }
   }
-</script>
-
-<style>
-  html,
-  body {
-    height: '900px';
-  }
-
-  #app {
-    font-family: Avenir, Helvetica, Arial, sans-serif;
-    -webkit-font-smoothing: antialiased;
-    -moz-osx-font-smoothing: grayscale;
-    text-align: center;
-    color: #2c3e50;
-    height: '900px';
-
-  }
-
-  .qualityManual-container {
-    padding: 0 !important;
-    height: '900px';
-  }
-
-  .qualityManual-container-office {
-    width: 100%;
-    height: '900px';
-  }
-</style>
+};
+</script>

+ 14 - 3
src/views/doc/info/index.vue

@@ -59,8 +59,8 @@
           <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-view" @click="handlePreview(scope.row)">下载</el-button>
+              <el-button size="mini" type="text" icon="el-icon-view" @click="handleShare(scope.row)">分享</el-button>
+              <el-button size="mini" type="text" icon="el-icon-view" @click="handleDownload(scope.row)">下载</el-button>
               <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-view" @click="handleEdit(scope.row)">在线编辑</el-button>
               <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
@@ -224,6 +224,17 @@
         this.queryParams.searchValue = this.spaceId;
         this.handleQuery();
       },
+      //分享
+      handleShare(row) {
+        row.isEdit = false;
+        this.$tab.openPage("文件[" + row.docName + "]预览", '/doc/oo-edit/index/' + row.docId, row);
+      },
+      //下载
+      handleDownload(row) {
+        this.download(row.docPath, null, row.docName + "." + row.docType);
+        row.isEdit = false;
+        this.$tab.openPage("文件[" + row.docName + "]预览", '/doc/oo-edit/index/' + row.docId, row);
+      },
       //预览
       handlePreview(row) {
         row.isEdit = false;
@@ -377,4 +388,4 @@
       }
     }
   };
-</script>
+</script>