From 425972c5f4bd56e8bbe97dddb785cc70dcc3b878 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期四, 24 十月 2024 17:21:14 +0800
Subject: [PATCH] 文件柜管理
---
/dev/null | 155 -------------------------------
Source/plt-web/plt-web-ui/src/api/system/fileCab/api.js | 41 ++++++++
Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue | 52 ++++++----
3 files changed, 73 insertions(+), 175 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/api/system/fileCab/api.js b/Source/plt-web/plt-web-ui/src/api/system/fileCab/api.js
new file mode 100644
index 0000000..9b23bdf
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/api/system/fileCab/api.js
@@ -0,0 +1,41 @@
+import request from '@/router/axios';
+
+// 鍒楄〃鏌ヨ
+export function getPvolumesPage(params) {
+ return request({
+ url: "/api/pvolumesController/getPvolumesPage",
+ method: "get",
+ params
+ });
+}
+export function savePvolume(params) {
+ return request({
+ url: "/api/pvolumesController/savePvolume",
+ method: "post",
+ data: params
+ });
+}
+export function updatePvolume(params) {
+ return request({
+ url: "/api/pvolumesController/updatePvolume",
+ method: "post",
+ data: params
+ });
+}
+export function deletePvolume(params) {
+ return request({
+ url: "/api/pvolumesController/deletePvolume",
+ method: "delete",
+ params
+ })
+}
+// 瀵煎嚭
+export const exportPvolumes = (params) => {
+ return request({
+ url: '/api/pvolumesController/exportPvolumes',
+ method: 'POST',
+ headers: {'Content-Type': 'application/json;charset=UTF-8'},
+ responseType: 'blob',
+ data: params
+ })
+}
diff --git a/Source/plt-web/plt-web-ui/src/api/system/fileManager/index.vue b/Source/plt-web/plt-web-ui/src/api/system/fileManager/index.vue
deleted file mode 100644
index aecd46e..0000000
--- a/Source/plt-web/plt-web-ui/src/api/system/fileManager/index.vue
+++ /dev/null
@@ -1,155 +0,0 @@
-<template>
- <!--鏂囦欢鏌滅鐞�-->
- <basic-container>
- <avue-crud
- ref="fileCrud"
- :data="tableData"
- :option="option"
- :page.sync="page"
- :table-loading="tableLoading"
- @on-load="getTableList"
- @refresh-change="handleRefresh"
- @search-change="handleSearch"
- @search-reset="handleReset"
- @size-change="sizeChange"
- @current-change="currentChange"
- >
- <template slot="menuLeft" slot-scope="scope">
- <el-button icon="el-icon-download" plain size="small" type="primary" @click="allDelHandler">瀵煎嚭</el-button>
- </template>
- </avue-crud>
- </basic-container>
-</template>
-
-<script>
-import basicOption from "@/util/basic-option";
-import {getLogListByContion} from "@/api/system/log/logBasic";
-
-export default {
- name: "index",
- data: function () {
- return {
- tableLoading: false,
- tableData: [],
- option: {
- ...basicOption,
- addBtn:false,
- editBtn: false,
- delBtn: false,
- calcHeight: -60,
- align:'left',
- headerAlign:'center',
- menu:false,
- searchMenuSpan: 6,
- searchIcon:false,
- column: [
- {
- label: '鐢ㄦ埛鍚�',
- prop: 'truename',
- search:true,
- searchSpan: 4,
- searchLabel:'鎿嶄綔鐢ㄦ埛',
- type:'select',
- dicUrl:'/api/loginBasicController/getOperatingUsers',
- sortable:true,
- width: 150
- }, {
- label: '濮撳悕',
- prop: 'username',
- sortable:true,
- width: 150
- },{
- label: '鐢ㄦ埛IP',
- prop: 'userIp',
- search:true,
- searchSpan: 4,
- sortable:true,
- width: 150
- },{
- label: '妯″潡',
- prop: 'moduleName',
- sortable:true,
- overHidden: true,
- },{
- label: '鎿嶄綔',
- prop: 'type',
- sortable:true,
- width: 150
- },{
- label: '鏃堕棿',
- prop: 'date',
- type:'date',
- search:true,
- searchOrder: 1,
- searchSpan: 8,
- searchRange: true,
- searchLabel:'鏌ヨ鏃ユ湡',
- valueFormat:'yyyy-MM-dd',
- width: 160
- },{
- label: '鎻忚堪',
- prop: 'result',
- overHidden: true,
- width:380,
- },
- ]
- },
- page: {
- currentPage: 1,
- pageSize: 50,
- total: 0,
- pageSizes: [10, 30, 50, 100],
- },
- searchParams: {}
- }
- },
- methods: {
- // 琛ㄦ牸璇锋眰
- getTableList() {
- this.tableLoading = true;
- getLogListByContion(this.page.currentPage, this.page.pageSize, {'logType':this.$route.query.logType,...this.searchParams}).then(res => {
- this.tableData = res.data.data;
- this.page.total = res.data.total;
- this.tableLoading = false;
- })
- },
-
- // 鎼滅储鏌ヨ
- handleSearch(params, done) {
- this.searchParams = {
- userName:params.truename,
- ipText:params.userIp,
- startDate:params.date[0],
- endDate:params.date[1]
- };
-
- this.getTableList();
- done();
- },
-
- // 閲嶇疆鎼滅储鏉′欢
- handleReset() {
- this.searchParams = {};
- this.getTableList();
- },
-
- // 鏉℃暟
- sizeChange(val) {
- this.page.pageSize = val;
- },
-
- // 椤电爜
- currentChange(val) {
- this.page.currentPage = val;
- },
-
- handleRefresh(){
- this.getTableList();
- }
- }
-}
-</script>
-
-<style scoped>
-
-</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue b/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue
index adbd870..b0427c1 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue
@@ -3,6 +3,7 @@
<basic-container>
<avue-crud
ref="logCrud"
+ v-model="form"
:data="tableData"
:option="option"
:table-loading="tableLoading"
@@ -14,9 +15,9 @@
<template slot="menuLeft" slot-scope="scope">
<el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button>
</template>
- <template #menu="{row,index,size}">
+ <!--<template #menu="{row,index,size}">
<el-button icon="el-icon-user" type="text" size="small" @click="userHandler(row,index)">鍒嗛厤鎴愬憳</el-button>
- </template>
+ </template>-->
</avue-crud>
<!-- 鍒嗛厤鎴愬憳绌挎妗� -->
<transfer ref="transfer" :left-role-data="leftRoleData" :right-role-data="rightRoleData"
@@ -27,16 +28,16 @@
</template>
<script>
-import {exportLog, getLogListByContion} from "@/api/system/log/logBasic";
+import {exportPvolumes, getPvolumesPage,savePvolume,updatePvolume,deletePvolume} from "@/api/system/fileCab/api";
import func from "@/util/func";
import basicOption from "@/util/basic-option";
-import {addUser, deleteUser, updateUser} from "@/api/system/user/api";
import {listUserByRoleOid, listUserUnInRoleOid, saveRight} from "@/api/system/role/api";
export default {
name: "index",
data: function () {
return {
+ form:{},
tableLoading: false,
tableData: [],
option: {
@@ -44,53 +45,64 @@
calcHeight: -60,
align:'left',
headerAlign:'center',
- menuWidth:260,
+ menuWidth:160,
dialogMenuPosition: 'right',
dialogWidth:600,
column: [
{
label: '鍗峰悕',
- prop: 'truename',
+ prop: 'name',
width: 200,
span: 24,
rules: [{ required: true, message: '璇疯緭鍏ュ嵎鍚�', trigger: 'blur' }]
},{
label: '鏈嶅姟鍣�',
- prop: 'type',
+ prop: 'host',
span: 24,
rules: [{ required: true, message: '璇疯緭鍏ユ湇鍔″櫒', trigger: 'blur' }]
},{
label: '鍗锋湇鍔�',
- prop: 'date',
+ prop: 'service',
span: 24,
rules: [{ required: true, message: '璇疯緭鍏ュ嵎鏈嶅姟', trigger: 'blur' }]
}, {
label: '鏈哄櫒绫诲瀷',
- prop: 'username',
+ prop: 'type',
width: 120,
span: 24,
type:'radio',
dicData:[{
label:'Unix',
- value:'Unix'
+ value:0
},{
label:'Win NT',
- value:'Win NT'
+ value:1
}],
- value:'Win NT'
+ value:1
},{
label: '璺緞鍚嶇О',
- prop: 'userIp',
+ prop: 'path',
span: 24,
overHidden: true,
rules: [{ required: true, message: '璇疯緭鍏ヨ矾寰勫悕绉�', trigger: 'blur' }]
},{
label: '棣栭�夎矾寰�',
- prop: 'loc',
+ prop: 'isvalid',
width: 120,
span: 24,
type: 'switch',
- value:false
+ value:false,
+ beforeChange: (done) => {debugger;
+ this.$confirm('鎮ㄧ‘瀹炶淇敼鍗风殑棣栭�夎矾寰勫悧锛�', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ done(true);
+ }).catch(() => {
+ done(false);
+ });
+ },
}]
},
currentRow:null,
@@ -103,7 +115,7 @@
// 琛ㄦ牸璇锋眰
getTableList() {
this.tableLoading = true;
- getLogListByContion(1, 50, {}).then(res => {
+ getPvolumesPage().then(res => {
this.tableData = res.data.data;
this.tableLoading = false;
})
@@ -111,7 +123,7 @@
// 鏂板
rowSaveHandler(row, done,loading) {
- addUser(row).then(res => {
+ savePvolume(row).then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.obj);
this.getTableList();
@@ -124,7 +136,7 @@
// 缂栬緫
rowUpdateHandler(row, index, done,loading) {
- updateUser(row).then(res => {
+ updatePvolume(row).then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.obj);
this.getTableList();
@@ -146,7 +158,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- deleteUser(params).then(res => {
+ deletePvolume(params).then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.obj);
this.getTableList();
@@ -162,7 +174,7 @@
// 瀵煎嚭
exportClickHandler() {
const loading = this.$loading({});
- exportLog().then(res => {
+ exportPvolumes().then(res => {
func.downloadFileByBlobHandler(res);
this.createdLoading = false
this.$message.success('瀵煎嚭鎴愬姛');
--
Gitblit v1.9.3