瀏覽代碼

完成了文档管理、个人设置、系统管理模块的静态界面

yxc 2 年之前
父節點
當前提交
97cd158100

+ 7 - 0
src/api/doc/dir.js

@@ -8,6 +8,13 @@ export function listDir(query) {
     params: query
   })
 }
+// 查询目录信息列表
+export function personalList() {
+  return request({
+    url: '/doc/dir/list/personal',
+    method: 'get',
+  })
+}
 
 // 查询目录信息详细
 export function getDir(dirId) {

+ 8 - 0
src/api/doc/space.js

@@ -41,4 +41,12 @@ export function delSpace(spaceId) {
     url: '/doc/space/' + spaceId,
     method: 'delete'
   })
+}
+
+// 查询当前登录用户空间
+export function getPersonalSpace() {
+  return request({
+    url: '/doc/space/personal',
+    method: 'get'
+  })
 }

+ 30 - 0
src/router/index.js

@@ -130,8 +130,38 @@ export const constantRoutes = [
         component: () => import('@/views1/Personal/PersonalView.vue')
       },
       {
+        path: "/home/personal/classify",
+        component: () => import('@/views1/Personal/Classify/ClassifyView.vue')
+      },
+      {
+        path: "/home/personal/space",
+        component: () => import('@/views1/Personal/Space/SpaceView.vue')
+      },
+      {
+        path: "/home/personal/modify",
+        component: () => import('@/views1/Personal/Modify/ModifyView.vue')
+      },
+      {
         path: "/home/system",
         component: () => import('@/views1/System/SystemView.vue')
+      },
+      {
+        path: "/home/system/organization",
+        component: () => import('@/views1/System/Organization/OrganizationView.vue')
+      },
+      {
+        path: "/home/system/user",
+        component: () => import('@/views1/System/User/UserView.vue')
+      },
+      {
+        path: "/home/system/authority",
+        component: () => import('@/views1/System/Authority/AuthorityView.vue')
+      },{
+        path: "/home/system/notes",
+        component: () => import('@/views1/System/Notes/NotesView.vue')
+      },{
+        path: "/home/system/space",
+        component: () => import('@/views1/System/Space/SpaceView.vue')
       }
     ],
   },

+ 194 - 313
src/views/doc/dir/index.vue

@@ -1,207 +1,55 @@
 <template>
   <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="spaceId">
-        <el-input
-          v-model="queryParams.spaceId"
-          placeholder="请输入空间ID"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+    <!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="父目录ID" prop="parentId">
-        <el-input
-          v-model="queryParams.parentId"
-          placeholder="请输入父目录ID"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+        <el-input v-model="queryParams.parentId" placeholder="请输入父目录ID" clearable @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="目录名称" prop="dirName">
-        <el-input
-          v-model="queryParams.dirName"
-          placeholder="请输入目录名称"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="目录路径" prop="dirPath">
-        <el-input
-          v-model="queryParams.dirPath"
-          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>
-      <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-input v-model="queryParams.dirName" 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:dir: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:dir: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:dir:remove']"
-        >删除</el-button>
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+          v-hasPermi="['doc:dir:add']">新增</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:dir:export']"
-        >导出</el-button>
+        <el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">展开/折叠</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="dirList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="目录ID" align="center" prop="dirId" />
-      <el-table-column label="空间ID" align="center" prop="spaceId" />
-      <el-table-column label="父目录ID" align="center" prop="parentId" />
+    <el-table v-if="refreshTable" v-loading="loading" :data="dirList" row-key="dirId" :default-expand-all="isExpandAll"
+      :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
       <el-table-column label="目录名称" align="center" prop="dirName" />
-      <el-table-column label="目录路径" align="center" prop="dirPath" />
-      <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" 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:dir:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['doc:dir:remove']"
-          >删除</el-button>
+          <el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)"
+            v-hasPermi="['doc:dir:add']">新增</el-button>
+          <el-button v-if="scope.row.parentId != 0" size="mini" type="text" icon="el-icon-edit"
+            @click="handleUpdate(scope.row)" v-hasPermi="['doc:dir:edit']">修改</el-button>
+          <el-button v-if="scope.row.parentId != 0" size="mini" type="text" icon="el-icon-delete"
+            @click="handleDelete(scope.row)" v-hasPermi="['doc:dir: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="空间ID" prop="spaceId">
-          <el-input v-model="form.spaceId" placeholder="请输入空间ID" />
-        </el-form-item>
-        <el-form-item label="父目录ID" prop="parentId">
-          <el-input v-model="form.parentId" placeholder="请输入父目录ID" />
+        <el-form-item label="上级目录" prop="parentId">
+          <treeselect v-model="form.parentId" :options="dirOptions" :normalizer="normalizer" placeholder="请选择上级目录" />
         </el-form-item>
         <el-form-item label="目录名称" prop="dirName">
           <el-input v-model="form.dirName" placeholder="请输入目录名称" />
         </el-form-item>
-        <el-form-item label="目录路径" prop="dirPath">
-          <el-input v-model="form.dirPath" placeholder="请输入目录路径" />
-        </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-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -213,155 +61,188 @@
 </template>
 
 <script>
-import { listDir, getDir, delDir, addDir, updateDir } from "@/api/doc/dir";
+  import {
+    listDir,
+    getDir,
+    delDir,
+    addDir,
+    updateDir,
+    personalList
+  } from "@/api/doc/dir";
+  import {
+    getPersonalSpace
+  } from "@/api/doc/space";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
-export default {
-  name: "Dir",
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 目录信息表格数据
-      dirList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        spaceId: null,
-        parentId: null,
-        dirName: null,
-        dirPath: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-        remark: null,
-        isDel: null
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询目录信息列表 */
-    getList() {
-      this.loading = true;
-      listDir(this.queryParams).then(response => {
-        this.dirList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
+  export default {
+    name: "Dir",
+    components: {
+      Treeselect
     },
-    // 表单重置
-    reset() {
-      this.form = {
-        dirId: null,
-        spaceId: null,
-        parentId: null,
-        dirName: null,
-        dirPath: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-        remark: null,
-        isDel: null
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 目录信息表格数据
+        dirList: [],
+        // 目录信息树选项
+        dirOptions: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 是否展开,默认全部展开
+        isExpandAll: true,
+        // 重新渲染表格状态
+        refreshTable: true,
+        // 查询参数
+        queryParams: {
+          parentId: null,
+          dirName: null,
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        // 表单校验
+        rules: {
+          dirName: [{
+            required: true,
+            message: "目录名称不能为空",
+            trigger: "blur"
+          }],
+          parentId: [{
+            required: true,
+            message: "上级目录不能为空",
+            trigger: "blur"
+          }],
+        }
       };
-      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.dirId)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加目录信息";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const dirId = row.dirId || this.ids
-      getDir(dirId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改目录信息";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.dirId != null) {
-            updateDir(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addDir(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
+    methods: {
+      /** 查询目录信息列表 */
+      getList() {
+        this.loading = true;
+        personalList().then(response => {
+          this.dirList = this.handleTree(response.data, "dirId");
+          this.loading = false;
+        });
+      },
+      /** 转换目录信息数据结构 */
+      normalizer(node) {
+        if (node.children && !node.children.length) {
+          delete node.children;
         }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const dirIds = row.dirId || this.ids;
-      this.$modal.confirm('是否确认删除目录信息编号为"' + dirIds + '"的数据项?').then(function() {
-        return delDir(dirIds);
-      }).then(() => {
+        return {
+          id: node.dirId,
+          label: node.dirName,
+          children: node.children
+        };
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          dirId: null,
+          spaceId: null,
+          parentId: null,
+          dirName: null,
+          dirPath: null,
+          createBy: null,
+          createTime: null,
+          updateBy: null,
+          updateTime: null,
+          remark: null,
+          isDel: null
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
         this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('doc/dir/export', {
-        ...this.queryParams
-      }, `dir_${new Date().getTime()}.xlsx`)
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+      /** 新增按钮操作 */
+      handleAdd(row) {
+        this.reset();
+        // this.getTreeselect();
+        if (row != null && row.dirId) {
+          this.form.parentId = row.dirId;
+          // } else {
+          // 	this.form.parentId = 0;
+        }
+        this.open = true;
+        this.title = "添加目录信息";
+        personalList().then(response => {
+          this.form.spaceId = response.data[0].spaceId;
+          this.dirOptions = this.handleTree(response.data, "dirId");
+        });
+      },
+      /** 展开/折叠操作 */
+      toggleExpandAll() {
+        this.refreshTable = false;
+        this.isExpandAll = !this.isExpandAll;
+        this.$nextTick(() => {
+          this.refreshTable = true;
+        });
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+        if (row != null) {
+          this.form.parentId = row.dirId;
+        }
+        getDir(row.dirId).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改目录信息";
+        });
+        personalList().then(response => {
+          this.dirOptions = this.handleTree(response.data, "dirId");
+        });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.dirId != null) {
+              updateDir(this.form).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              addDir(this.form).then(response => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        });
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        this.$modal.confirm('是否确认删除目录信息编号为"' + row.dirId + '"的数据项?').then(function() {
+          return delDir(row.dirId);
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        }).catch(() => {});
+      }
     }
-  }
-};
-</script>
+  };
+</script>

+ 217 - 160
src/views/doc/expand/index.vue

@@ -2,13 +2,28 @@
   <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="spaceId">
-        <el-input v-model="queryParams.spaceId" placeholder="请输入空间ID" clearable @keyup.enter.native="handleQuery" />
+        <el-input
+          v-model="queryParams.spaceId"
+          placeholder="请输入空间ID"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
       <el-form-item label="当前容量" prop="currentCap">
-        <el-input v-model="queryParams.currentCap" placeholder="请输入当前容量" clearable @keyup.enter.native="handleQuery" />
+        <el-input
+          v-model="queryParams.currentCap"
+          placeholder="请输入当前容量"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
       <el-form-item label="扩充容量" prop="expandCap">
-        <el-input v-model="queryParams.expandCap" placeholder="请输入扩充容量" clearable @keyup.enter.native="handleQuery" />
+        <el-input
+          v-model="queryParams.expandCap"
+          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>
@@ -18,20 +33,46 @@
 
     <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:expand:add']">新增</el-button>
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['doc:expand: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:expand:edit']">修改</el-button>
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['doc:expand: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:expand:remove']">删除</el-button>
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['doc:expand: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:expand:export']">导出</el-button>
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['doc:expand:export']"
+        >导出</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -46,16 +87,31 @@
       <el-table-column label="备注" align="center" prop="remark" />
       <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:expand:edit']">修改</el-button>
-          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
-            v-hasPermi="['doc:expand:remove']">删除</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['doc:expand:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['doc:expand: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>
@@ -79,153 +135,154 @@
 </template>
 
 <script>
-  import {
-    listExpand,
-    getExpand,
-    delExpand,
-    addExpand,
-    updateExpand
-  } from "@/api/doc/expand";
+import { listExpand, getExpand, delExpand, addExpand, updateExpand } from "@/api/doc/expand";
 
-  export default {
-    name: "Expand",
-    data() {
-      return {
-        // 遮罩层
-        loading: true,
-        // 选中数组
-        ids: [],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true,
-        // 显示搜索条件
-        showSearch: true,
-        // 总条数
-        total: 0,
-        // 扩容申请表格数据
-        expandList: [],
-        // 弹出层标题
-        title: "",
-        // 是否显示弹出层
-        open: false,
-        // 查询参数
-        queryParams: {
-          pageNum: 1,
-          pageSize: 10,
-          spaceId: null,
-          currentCap: null,
-          expandCap: null,
-        },
-        // 表单参数
-        form: {},
-        // 表单校验
-        rules: {}
+export default {
+  name: "Expand",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 扩容申请表格数据
+      expandList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        spaceId: null,
+        currentCap: null,
+        expandCap: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        expandCap: [
+          { required: true, message: "扩充容量不能为空", trigger: "blur" }
+        ],
+        remark: [
+          { required: true, message: "备注不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询扩容申请列表 */
+    getList() {
+      this.loading = true;
+      listExpand(this.queryParams).then(response => {
+        this.expandList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        expandId: null,
+        spaceId: null,
+        currentCap: null,
+        expandCap: null,
+        expandStatus: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null,
+        isDel: null
       };
+      this.resetForm("form");
     },
-    created() {
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
       this.getList();
     },
-    methods: {
-      /** 查询扩容申请列表 */
-      getList() {
-        this.loading = true;
-        listExpand(this.queryParams).then(response => {
-          this.expandList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        });
-      },
-      // 取消按钮
-      cancel() {
-        this.open = false;
-        this.reset();
-      },
-      // 表单重置
-      reset() {
-        this.form = {
-          expandId: null,
-          spaceId: null,
-          currentCap: null,
-          expandCap: null,
-          expandStatus: 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.expandId)
-        this.single = selection.length !== 1
-        this.multiple = !selection.length
-      },
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.reset();
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.expandId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加扩容申请";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const expandId = row.expandId || this.ids
+      getExpand(expandId).then(response => {
+        this.form = response.data;
         this.open = true;
-        this.title = "添加扩容申请";
-      },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        const expandId = row.expandId || this.ids
-        getExpand(expandId).then(response => {
-          this.form = response.data;
-          this.open = true;
-          this.title = "修改扩容申请";
-        });
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            if (this.form.expandId != null) {
-              updateExpand(this.form).then(response => {
-                this.$modal.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });
-            } else {
-              addExpand(this.form).then(response => {
-                this.$modal.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
-            }
+        this.title = "修改扩容申请";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.expandId != null) {
+            updateExpand(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addExpand(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
           }
-        });
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const expandIds = row.expandId || this.ids;
-        this.$modal.confirm('是否确认删除扩容申请编号为"' + expandIds + '"的数据项?').then(function() {
-          return delExpand(expandIds);
-        }).then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
-        }).catch(() => {});
-      },
-      /** 导出按钮操作 */
-      handleExport() {
-        this.download('doc/expand/export', {
-          ...this.queryParams
-        }, `expand_${new Date().getTime()}.xlsx`)
-      }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const expandIds = row.expandId || this.ids;
+      this.$modal.confirm('是否确认删除扩容申请编号为"' + expandIds + '"的数据项?').then(function() {
+        return delExpand(expandIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('doc/expand/export', {
+        ...this.queryParams
+      }, `expand_${new Date().getTime()}.xlsx`)
     }
-  };
-</script>
+  }
+};
+</script>

+ 192 - 226
src/views/system/dept/index.vue

@@ -2,21 +2,12 @@
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
       <el-form-item label="部门名称" prop="deptName">
-        <el-input
-          v-model="queryParams.deptName"
-          placeholder="请输入部门名称"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+        <el-input v-model="queryParams.deptName" placeholder="请输入部门名称" clearable @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="状态" prop="status">
         <el-select v-model="queryParams.status" placeholder="部门状态" clearable>
-          <el-option
-            v-for="dict in dict.type.sys_normal_disable"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
+          <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label"
+            :value="dict.value" />
         </el-select>
       </el-form-item>
       <el-form-item>
@@ -27,40 +18,22 @@
 
     <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="['system:dept:add']"
-        >新增</el-button>
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+          v-hasPermi="['system:dept:add']">新增</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="info"
-          plain
-          icon="el-icon-sort"
-          size="mini"
-          @click="toggleExpandAll"
-        >展开/折叠</el-button>
+        <el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">展开/折叠</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table
-      v-if="refreshTable"
-      v-loading="loading"
-      :data="deptList"
-      row-key="deptId"
-      :default-expand-all="isExpandAll"
-      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
-    >
+    <el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId"
+      :default-expand-all="isExpandAll" :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
       <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
       <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
       <el-table-column prop="status" label="状态" width="100">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
+          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
         </template>
       </el-table-column>
       <el-table-column label="创建时间" align="center" prop="createTime" width="200">
@@ -70,28 +43,12 @@
       </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-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:dept:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-plus"
-            @click="handleAdd(scope.row)"
-            v-hasPermi="['system:dept:add']"
-          >新增</el-button>
-          <el-button
-            v-if="scope.row.parentId != 0"
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['system:dept:remove']"
-          >删除</el-button>
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+            v-hasPermi="['system:dept:edit']">修改</el-button>
+          <el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)"
+            v-hasPermi="['system:dept:add']">新增</el-button>
+          <el-button v-if="scope.row.parentId != 0" size="mini" type="text" icon="el-icon-delete"
+            @click="handleDelete(scope.row)" v-hasPermi="['system:dept:remove']">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -102,7 +59,8 @@
         <el-row>
           <el-col :span="24" v-if="form.parentId !== 0">
             <el-form-item label="上级部门" prop="parentId">
-              <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
+              <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer"
+                placeholder="选择上级部门" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -139,11 +97,8 @@
           <el-col :span="12">
             <el-form-item label="部门状态">
               <el-radio-group v-model="form.status">
-                <el-radio
-                  v-for="dict in dict.type.sys_normal_disable"
-                  :key="dict.value"
-                  :label="dict.value"
-                >{{dict.label}}</el-radio>
+                <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value"
+                  :label="dict.value">{{dict.label}}</el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>
@@ -158,179 +113,190 @@
 </template>
 
 <script>
-import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+  import {
+    listDept,
+    getDept,
+    delDept,
+    addDept,
+    updateDept,
+    listDeptExcludeChild
+  } from "@/api/system/dept";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
-export default {
-  name: "Dept",
-  dicts: ['sys_normal_disable'],
-  components: { Treeselect },
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 表格树数据
-      deptList: [],
-      // 部门树选项
-      deptOptions: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 是否展开,默认全部展开
-      isExpandAll: true,
-      // 重新渲染表格状态
-      refreshTable: true,
-      // 查询参数
-      queryParams: {
-        deptName: undefined,
-        status: undefined
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        parentId: [
-          { required: true, message: "上级部门不能为空", trigger: "blur" }
-        ],
-        deptName: [
-          { required: true, message: "部门名称不能为空", trigger: "blur" }
-        ],
-        orderNum: [
-          { required: true, message: "显示排序不能为空", trigger: "blur" }
-        ],
-        email: [
-          {
+  export default {
+    name: "Dept",
+    dicts: ['sys_normal_disable'],
+    components: {
+      Treeselect
+    },
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 表格树数据
+        deptList: [],
+        // 部门树选项
+        deptOptions: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 是否展开,默认全部展开
+        isExpandAll: true,
+        // 重新渲染表格状态
+        refreshTable: true,
+        // 查询参数
+        queryParams: {
+          deptName: undefined,
+          status: undefined
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {
+          parentId: [{
+            required: true,
+            message: "上级部门不能为空",
+            trigger: "blur"
+          }],
+          deptName: [{
+            required: true,
+            message: "部门名称不能为空",
+            trigger: "blur"
+          }],
+          orderNum: [{
+            required: true,
+            message: "显示排序不能为空",
+            trigger: "blur"
+          }],
+          email: [{
             type: "email",
             message: "请输入正确的邮箱地址",
             trigger: ["blur", "change"]
-          }
-        ],
-        phone: [
-          {
+          }],
+          phone: [{
             pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
             message: "请输入正确的手机号码",
             trigger: "blur"
-          }
-        ]
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询部门列表 */
-    getList() {
-      this.loading = true;
-      listDept(this.queryParams).then(response => {
-        this.deptList = this.handleTree(response.data, "deptId");
-        this.loading = false;
-      });
-    },
-    /** 转换部门数据结构 */
-    normalizer(node) {
-      if (node.children && !node.children.length) {
-        delete node.children;
-      }
-      return {
-        id: node.deptId,
-        label: node.deptName,
-        children: node.children
-      };
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        deptId: undefined,
-        parentId: undefined,
-        deptName: undefined,
-        orderNum: undefined,
-        leader: undefined,
-        phone: undefined,
-        email: undefined,
-        status: "0"
+          }]
+        }
       };
-      this.resetForm("form");
     },
-    /** 搜索按钮操作 */
-    handleQuery() {
+    created() {
       this.getList();
     },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    /** 新增按钮操作 */
-    handleAdd(row) {
-      this.reset();
-      if (row != undefined) {
-        this.form.parentId = row.deptId;
-      }
-      this.open = true;
-      this.title = "添加部门";
-      listDept().then(response => {
-        this.deptOptions = this.handleTree(response.data, "deptId");
-      });
-    },
-    /** 展开/折叠操作 */
-    toggleExpandAll() {
-      this.refreshTable = false;
-      this.isExpandAll = !this.isExpandAll;
-      this.$nextTick(() => {
-        this.refreshTable = true;
-      });
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      getDept(row.deptId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改部门";
-      });
-      listDeptExcludeChild(row.deptId).then(response => {
-        this.deptOptions = this.handleTree(response.data, "deptId");
-      });
-    },
-    /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.deptId != undefined) {
-            updateDept(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addDept(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
+    methods: {
+      /** 查询部门列表 */
+      getList() {
+        this.loading = true;
+        listDept(this.queryParams).then(response => {
+          this.deptList = this.handleTree(response.data, "deptId");
+          this.loading = false;
+        });
+      },
+      /** 转换部门数据结构 */
+      normalizer(node) {
+        if (node.children && !node.children.length) {
+          delete node.children;
         }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      this.$modal.confirm('删除部门时会删除该部门下的存储空间!是否确认删除名称为"' + row.deptName + '"的部门?').then(function() {
-        return delDept(row.deptId);
-      }).then(() => {
+        return {
+          id: node.deptId,
+          label: node.deptName,
+          children: node.children
+        };
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          deptId: undefined,
+          parentId: undefined,
+          deptName: undefined,
+          orderNum: undefined,
+          leader: undefined,
+          phone: undefined,
+          email: undefined,
+          status: "0"
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
         this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+      /** 新增按钮操作 */
+      handleAdd(row) {
+        this.reset();
+        if (row != undefined) {
+          this.form.parentId = row.deptId;
+        }
+        this.open = true;
+        this.title = "添加部门";
+        listDept().then(response => {
+          this.deptOptions = this.handleTree(response.data, "deptId");
+        });
+      },
+      /** 展开/折叠操作 */
+      toggleExpandAll() {
+        this.refreshTable = false;
+        this.isExpandAll = !this.isExpandAll;
+        this.$nextTick(() => {
+          this.refreshTable = true;
+        });
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+        getDept(row.deptId).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改部门";
+        });
+        listDeptExcludeChild(row.deptId).then(response => {
+          this.deptOptions = this.handleTree(response.data, "deptId");
+        });
+      },
+      /** 提交按钮 */
+      submitForm: function() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.deptId != undefined) {
+              updateDept(this.form).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              addDept(this.form).then(response => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        });
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        this.$modal.confirm('删除部门时会删除该部门下的存储空间!是否确认删除名称为"' + row.deptName + '"的部门?').then(function() {
+          return delDept(row.deptId);
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        }).catch(() => {});
+      }
     }
-  }
-};
-</script>
+  };
+</script>

+ 15 - 15
src/views1/File/FileView.vue

@@ -3,22 +3,22 @@
 </template>
 
 <script>
-import part from "./Part/PartView";
-import publi from "./Publi/PublicView";
-import individual from "./Individual/IndividualView";
-import set from "./Set/SetView";
+// import part from "./Part/PartView";
+// import publi from "./Publi/PublicView";
+// import individual from "./Individual/IndividualView";
+// import set from "./Set/SetView";
 
-export default {
-  data() {
-    return {};
-  },
-  components: {
-    part,
-    publi,
-    individual,
-    set
-  },
-};
+// export default {
+//   data() {
+//     return {};
+//   },
+//   components: {
+//     part,
+//     publi,
+//     individual,
+//     set
+//   },
+// };
 </script>
 
 <style scoped lang='scss'>

+ 1 - 1
src/views1/Personal/PersonalView.vue

@@ -1,5 +1,5 @@
 <template>
-<h1>个人设置</h1>
+<router-view></router-view>
 </template>
 
 <script>

+ 1 - 1
src/views1/System/SystemView.vue

@@ -1,5 +1,5 @@
 <template>
-<h1>系统管理</h1>
+<router-view></router-view>
 </template>
 
 <script>