¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 |
| | | }) |
| | | } |
| | |
| | | <basic-container> |
| | | <avue-crud |
| | | ref="logCrud" |
| | | v-model="form" |
| | | :data="tableData" |
| | | :option="option" |
| | | :table-loading="tableLoading" |
| | |
| | | <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" |
| | |
| | | </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: { |
| | |
| | | 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, |
| | |
| | | // è¡¨æ ¼è¯·æ± |
| | | getTableList() { |
| | | this.tableLoading = true; |
| | | getLogListByContion(1, 50, {}).then(res => { |
| | | getPvolumesPage().then(res => { |
| | | this.tableData = res.data.data; |
| | | this.tableLoading = false; |
| | | }) |
| | |
| | | |
| | | // æ°å¢ |
| | | 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(); |
| | |
| | | |
| | | // ç¼è¾ |
| | | 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(); |
| | |
| | | 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(); |
| | |
| | | // å¯¼åº |
| | | exportClickHandler() { |
| | | const loading = this.$loading({}); |
| | | exportLog().then(res => { |
| | | exportPvolumes().then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.createdLoading = false |
| | | this.$message.success('å¯¼åºæå'); |