Commit 7d71ecfe authored by xinzhedeai's avatar xinzhedeai

电子档案馆权限分配

parent 96d073d2
......@@ -15,7 +15,7 @@ export default {
saveFolderAuth: (data) => {
return request({
url: 'api/document-catalogue',
url: 'api/document-catalogue/distributionCatalogue',
method: 'post',
data
})
......@@ -30,8 +30,23 @@ export default {
*/
// 获取所有目录
getDataList: (pageParam) => {
return request({
// url: 'api/document-catalogue/all',
url: 'api/document-catalogue/tree',
method: 'get',
params: pageParam
})
},
/**
* 目录-文件 显示页面
* @param {*} pageParam
* @returns
*/
// 获取所有目录
getAllDocList: (pageParam) => {
return request({
url: 'api/document-catalogue/all',
// url: 'api/document-catalogue/tree',
method: 'get',
params: pageParam
})
......
......@@ -12,9 +12,8 @@
placeholder="用户名/昵称"
style="width: 200px"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<el-button type="primary" size="mini">查询</el-button>
<el-button type="primary" size="mini" @click="search">查询</el-button>
</div>
<el-table
highlight-current-row
......@@ -46,7 +45,7 @@
type="primary"
size="mini"
@click="saveFolderAuth"
:loading="menuLoading"
:loading="saveAuthLoading"
>保存</el-button
>
</div>
......@@ -69,35 +68,35 @@
circle
size="small"
style="margin-left: 40px"
@click="data.editWhether = true"
@click="changeAuth(data, 'viewWhether')"
></el-button>
<el-button
:type="`${data.editWhether ? 'primary' : 'default'}`"
icon="el-icon-edit"
circle
size="small"
@click="data.editWhether = true"
@click="changeAuth(data, 'editWhether')"
></el-button>
<el-button
:type="`${data.deleteWhether ? 'primary' : 'default'}`"
icon="el-icon-delete"
circle
size="small"
@click="data.deleteWhether = true"
@click="changeAuth(data, 'deleteWhether')"
></el-button>
<el-button
:type="`${data.uploadWhether ? 'primary' : 'default'}`"
icon="el-icon-upload2"
circle
size="small"
@click="data.uploadWhether = true"
@click="changeAuth(data, 'uploadWhether')"
></el-button>
<el-button
:type="`${data.downloadWhether ? 'primary' : 'default'}`"
icon="el-icon-download"
circle
size="small"
@click="data.downloadWhether = true"
@click="changeAuth(data, 'downloadWhether')"
></el-button>
</div>
</div>
......@@ -129,10 +128,11 @@ export default {
defaultProps: { children: "children", label: "name", isLeaf: "leaf" },
currentUserId: 0,
currentName: "",
menuLoading: false,
saveAuthLoading: false,
showButton: false,
folders: [],
menuIds: [],
// tempAuthObj: {} // 操作权限数据集合
};
},
computed: {},
......@@ -141,6 +141,16 @@ export default {
},
created() {},
methods: {
search(){
this.getDataList4User()
},
changeAuth(data, attr) {
data[attr] = !data[attr];
// console.log('*****', data)
// deelete
// this.tempAuthObj[data.id] =
},
// 触发单选
handleCurrentChange4table(val, oldVal) {
if (val) {
......@@ -163,24 +173,25 @@ export default {
// 当前第几页
handleCurrentChange(val) {
this.page = val;
this.getFolderByUserId();
this.getDataList4User();
},
getDataList4User() {
edocApi
.getDataList4User({
page: this.page,
page: this.page > 0 ? this.page - 1 : this.page,
size: this.size,
fluzz: this.query.fluzz,
blurry: this.query.blurry,
})
.then((res) => {
console.log("res", res);
this.dataList = res.content;
this.totalElement = res.totalElements;
});
},
getFolderByUserId() {
edocApi
.getDataList({
.getAllDocList({
userId: this.currentUserId,
})
.then((res) => {
......@@ -227,14 +238,17 @@ export default {
});
edocApi
.saveFolderAuth({
data: this.folders,
userId: this.currentUserId,
// data: JSON.stringify(this.folders),
documentCatalogueVos: this.folders
})
.then(() => {
this.$message.success("操作成功");
this.menuLoading = false;
this.saveAuthLoading = false;
})
.catch((err) => {
this.menuLoading = false;
this.saveAuthLoading = false;
});
loading.close();
},
......@@ -255,4 +269,5 @@ export default {
height: 36px;
}
</style>
\ No newline at end of file
de9l9l9l9l9l ;;;;;;;;;;;;;;;;;O
<((O9l9l9l9l))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment