|
@@ -5,7 +5,10 @@
|
|
|
<div class="main-box">
|
|
|
<div class="inner-left" style="overflow: hidden">
|
|
|
<div class="button-list">
|
|
|
- <el-button size="medium" type="" @click="addMenu">
|
|
|
+ <el-button size="mini" type="" @click="addRootMenu" :disabled="authData != '2'" >
|
|
|
+ 添加根目录</el-button
|
|
|
+ >
|
|
|
+ <el-button size="mini" type="" @click="addMenu">
|
|
|
添加子目录</el-button
|
|
|
>
|
|
|
<el-button size="medium" type="" @click="delMenu"> 删除 </el-button>
|
|
@@ -90,7 +93,11 @@
|
|
|
</div>
|
|
|
<div class="tree-action"></div>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="inner-right">
|
|
|
+ <div class="search">
|
|
|
+ <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
|
|
|
+ </div>
|
|
|
<div style="margin-bottom: 10px">
|
|
|
<el-button
|
|
|
v-show="actionName"
|
|
@@ -106,7 +113,7 @@
|
|
|
</div>
|
|
|
<div class="tabbox">
|
|
|
<el-table
|
|
|
- height="calc(100% + 50px)"
|
|
|
+ height="calc(100% )"
|
|
|
class="com-table"
|
|
|
ref="multipleTable"
|
|
|
:data="tableData"
|
|
@@ -323,10 +330,12 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import mySearch from "../../../components/search.vue";
|
|
|
import toolList from "../../../components/toolList";
|
|
|
import myUpload from "../../../components/upload";
|
|
|
export default {
|
|
|
components: {
|
|
|
+ mySearch,
|
|
|
toolList,
|
|
|
myUpload,
|
|
|
},
|
|
@@ -334,6 +343,14 @@ export default {
|
|
|
return {
|
|
|
loadinged: false,
|
|
|
addDialogStatus: false,
|
|
|
+ searchList: [
|
|
|
+ {
|
|
|
+ type: 'input',
|
|
|
+ tit: '材料名称',
|
|
|
+ value: '',
|
|
|
+ width: '98%',
|
|
|
+ },
|
|
|
+ ],
|
|
|
tooltit: "文件共享管理",
|
|
|
loading: false,
|
|
|
defaultExpand: true,
|
|
@@ -345,6 +362,7 @@ export default {
|
|
|
checkedNodes: [], // 选中节点的node值
|
|
|
roleData: "", // 某一条数据
|
|
|
tableData: [], // 表格数据源
|
|
|
+ authData: "", //权限数据
|
|
|
infolist: {
|
|
|
isFile: "1",
|
|
|
title: "", // 材料名称
|
|
@@ -416,6 +434,10 @@ export default {
|
|
|
isFile: "1",
|
|
|
id: "",
|
|
|
},
|
|
|
+ paramsSearch: {
|
|
|
+ isFile: "1",
|
|
|
+ id: "",
|
|
|
+ },
|
|
|
fileInfo: {
|
|
|
type: "bt1n",
|
|
|
typename: "上传文件",
|
|
@@ -429,7 +451,6 @@ export default {
|
|
|
idList: [],
|
|
|
};
|
|
|
},
|
|
|
-
|
|
|
methods: {
|
|
|
clearClick() {
|
|
|
this.actionName = "";
|
|
@@ -507,6 +528,14 @@ export default {
|
|
|
handleSelectionChange(val) {
|
|
|
this.idList = val;
|
|
|
},
|
|
|
+ //搜索数据
|
|
|
+ searchInfo(v) {
|
|
|
+ this.paramsSearch = {};
|
|
|
+ v[0] ? this.paramsSearch.title = v[0] : '';
|
|
|
+ this.paramsSearch.isFile = "1";
|
|
|
+ // this.paramsSearch.parentId = this.infolist.parentId;
|
|
|
+ this.getList(this.paramsSearch, this.pageSize);
|
|
|
+ },
|
|
|
// 附件下载
|
|
|
downLoad(fileData) {
|
|
|
this.$http({
|
|
@@ -655,6 +684,15 @@ export default {
|
|
|
this.formData.id = "";
|
|
|
}
|
|
|
},
|
|
|
+ // 新增根目录
|
|
|
+ addRootMenu() {
|
|
|
+ this.addDialogStatus = true;
|
|
|
+ this.subType = "保存";
|
|
|
+ this.formData.parentId = 0;
|
|
|
+ this.formData.parentName = this.formData.title;
|
|
|
+ this.formData.title = "";
|
|
|
+ this.formData.id = "";
|
|
|
+ },
|
|
|
// 树展开\折叠
|
|
|
treeAction(val) {
|
|
|
val == 1 ? (this.defaultExpand = true) : (this.defaultExpand = false);
|
|
@@ -792,6 +830,21 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 获取权限
|
|
|
+ getAuthData() {
|
|
|
+ this.$http({
|
|
|
+ url: "/market/cmkFileShare/queryAuth",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: {},
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ this.authData = res.data.auth;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
toTreeData(data) {
|
|
|
var pos = {};
|
|
|
var tree = [];
|
|
@@ -870,6 +923,7 @@ export default {
|
|
|
mounted() {
|
|
|
this.getData();
|
|
|
this.getList(this.params, this.pageSize);
|
|
|
+ this.getAuthData();
|
|
|
},
|
|
|
};
|
|
|
</script>
|