|
@@ -73,21 +73,9 @@
|
|
|
delDir,
|
|
|
addDir,
|
|
|
updateDir,
|
|
|
- deptList
|
|
|
+ publicList
|
|
|
} from "@/api/doc/dir";
|
|
|
|
|
|
- import {
|
|
|
- getDeptSpace
|
|
|
- } from "@/api/doc/space";
|
|
|
-
|
|
|
- import {
|
|
|
- listExpand,
|
|
|
- getExpand,
|
|
|
- delExpand,
|
|
|
- addExpand,
|
|
|
- updateExpand
|
|
|
- } from "@/api/doc/expand";
|
|
|
-
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
@@ -137,47 +125,19 @@
|
|
|
message: "上级目录不能为空",
|
|
|
trigger: "blur"
|
|
|
}],
|
|
|
- },
|
|
|
- // 表单校验
|
|
|
- rulesSpace: {
|
|
|
- expandCap: [{
|
|
|
- required: true,
|
|
|
- message: "扩容容量不能为空",
|
|
|
- trigger: "blur"
|
|
|
- }],
|
|
|
- remark: [{
|
|
|
- required: true,
|
|
|
- message: "申请理由不能为空",
|
|
|
- trigger: "blur"
|
|
|
- }],
|
|
|
- },
|
|
|
- percentage:0
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
- // this.spaceInfo();
|
|
|
},
|
|
|
methods: {
|
|
|
- /** 查询个人空间相关信息 */
|
|
|
- spaceInfo() {
|
|
|
- this.loading = true;
|
|
|
- getDeptSpace().then(response => {
|
|
|
- this.spaceData = response.data;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- },
|
|
|
/** 查询目录信息列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- deptList().then(response => {
|
|
|
+ publicList().then(response => {
|
|
|
this.dirList = this.handleTree(response.data, "dirId");
|
|
|
this.loading = false;
|
|
|
- getDeptSpace().then(response => {
|
|
|
- this.spaceData = response.data;
|
|
|
- this.loading = false;
|
|
|
- return this.percentage =(this.spaceData.usedCap/this.spaceData.spaceCap)*100;
|
|
|
- });
|
|
|
});
|
|
|
},
|
|
|
/** 转换目录信息数据结构 */
|
|
@@ -238,26 +198,7 @@
|
|
|
}
|
|
|
this.open = true;
|
|
|
this.title = "添加目录信息";
|
|
|
- deptList().then(response => {
|
|
|
- this.form.spaceId = response.data[0].spaceId;
|
|
|
- this.dirOptions = this.handleTree(response.data, "dirId");
|
|
|
- });
|
|
|
- },
|
|
|
- /** 扩容申请 */
|
|
|
- handleExpand(row) {
|
|
|
- this.formSpace.currentCap = this.spaceData.spaceCap;
|
|
|
- this.formSpace.spaceId = this.spaceData.spaceId;
|
|
|
- this.formSpace.spaceName = this.spaceData.spaceName;
|
|
|
- this.reset();
|
|
|
- // this.getTreeselect();
|
|
|
- if (row != null && row.dirId) {
|
|
|
- this.form.parentId = row.dirId;
|
|
|
- // } else {
|
|
|
- // this.form.parentId = 0;
|
|
|
- }
|
|
|
- this.openSpace = true;
|
|
|
- this.title = "扩容申请";
|
|
|
- deptList().then(response => {
|
|
|
+ publicList().then(response => {
|
|
|
this.form.spaceId = response.data[0].spaceId;
|
|
|
this.dirOptions = this.handleTree(response.data, "dirId");
|
|
|
});
|
|
@@ -305,18 +246,6 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- /** 提交按钮 */
|
|
|
- submitFormSpace() {
|
|
|
- console.log(this.formSpace);
|
|
|
- this.$refs["formSpace"].validate(valid => {
|
|
|
- if (valid) {
|
|
|
- addExpand(this.formSpace).then(response => {
|
|
|
- this.$modal.msgSuccess("扩容申请提交成功");
|
|
|
- this.openSpace = false;
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
this.$modal.confirm('是否确认删除目录信息编号为"' + row.dirId + '"的数据项?').then(function() {
|