From dbcbde4397e0d0d28cf77a1cfafbe9a801d32182 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期三, 23 十月 2024 17:54:02 +0800
Subject: [PATCH] 日志、类型Action、修改细节
---
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue | 34 +-
Source/plt-web/plt-web-ui/src/views/system/role/index.vue | 6
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog.vue | 3
Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue | 191 ++++++++---
Source/plt-web/plt-web-ui/src/views/system/log/index.vue | 4
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue | 36 --
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue | 22
Source/plt-web/plt-web-ui/src/App.vue | 6
Source/plt-web/plt-web-ui/src/views/system/user/index.vue | 6
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/plShow.vue | 8
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/dialog.vue | 293 +++++++++++++++++++
Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue | 263 +++++++++++++----
Source/plt-web/plt-web-ui/src/api/system/log/logBasic.js | 2
13 files changed, 675 insertions(+), 199 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/App.vue b/Source/plt-web/plt-web-ui/src/App.vue
index b83a1ca..22920ce 100644
--- a/Source/plt-web/plt-web-ui/src/App.vue
+++ b/Source/plt-web/plt-web-ui/src/App.vue
@@ -138,6 +138,12 @@
margin-bottom: 5px;
}
}
+.smallBtn {
+ width: 82px;
+ text-align: center;
+ padding-left: 4.5px;
+}
+
/***闅愯棌鏍戞噿鍔犺浇鏃惰妭鐐逛笂鐨刲oading锛岄槻姝㈣妭鐐规姈鍔�*****/
.el-tree .el-tree-node__loading-icon{
display: none !important;
diff --git a/Source/plt-web/plt-web-ui/src/api/system/log/logBasic.js b/Source/plt-web/plt-web-ui/src/api/system/log/logBasic.js
index 47160ae..e350c06 100644
--- a/Source/plt-web/plt-web-ui/src/api/system/log/logBasic.js
+++ b/Source/plt-web/plt-web-ui/src/api/system/log/logBasic.js
@@ -48,7 +48,7 @@
// 瀵煎嚭
export const exportLog = (params) => {
return request({
- url: '/api/loginBasicController/exportLog',
+ url: '/api/loginBasicController/exportLogs',
method: 'get',
headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'},
responseType: 'blob',
diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue
index bf99a6a..65e61c2 100644
--- a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue
+++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue
@@ -6,10 +6,9 @@
:visible.sync="visible"
append-to-body="true"
class="avue-dialog"
- style="text-align: center"
- width="50%"
+ width="830px"
@close="dialogClose">
- <div style="margin-bottom: 20px;" v-if="topMethodsObj !== {} && topMethodsObj">
+ <div style="height: 42px;line-height: 30px;margin-top: -5px;" v-if="topMethodsObj !== {} && topMethodsObj">
<div>
<span>瀵煎嚭鏂瑰紡锛�</span>
<el-radio-group v-model="radio">
@@ -18,24 +17,27 @@
<el-radio :label="2" v-if="topMethodsObj.page">椤电爜</el-radio>
</el-radio-group>
<span v-if="radio === 2" style="margin-left: 20px;color: #F56C6C; ">
- <el-input v-model="pageExport" style="width: 150px"></el-input> 锛堣緭鍏ラ〉鐮佹垨鑰呴〉闈㈣寖鍥达紝濡傦細1-10锛�</span>
+ <el-input v-model="pageExport" style="width: 150px" size="mini"></el-input> 锛堣緭鍏ラ〉鐮佹垨鑰呴〉闈㈣寖鍥达紝濡傦細1-10锛�</span>
</div>
</div>
- <el-transfer
- v-model="rightRoleData"
- v-loading="loading"
- :data="data"
- :filter-method="filterMethod"
- :render-content="renderFunc"
- :titles="transferTitle"
- filter-placeholder="鍏抽敭璇嶆悳绱�"
- filterable
- style="text-align: left; display: inline-block;">
- </el-transfer>
+ <div style="text-align: center">
+ <el-transfer
+ v-model="rightRoleData"
+ v-loading="loading"
+ :data="data"
+ :filter-method="filterMethod"
+ :render-content="renderFunc"
+ :titles="transferTitle"
+ filter-placeholder="鍏抽敭璇嶆悳绱�"
+ filterable
+ style="text-align:left;display: inline-block;">
+ </el-transfer>
+ </div>
+
<div slot="footer" class="dialog-footer">
<div v-if="bottomValue" class="valueInfo">宸茶缃殑鍊间负锛歔{{ bottomValue }}]</div>
- <el-button size="small" @click="visible = false">鍙� 娑�</el-button>
<el-button size="small" type="primary" @click="sendHandler">纭� 瀹�</el-button>
+ <el-button size="small" @click="visible = false">鍙� 娑�</el-button>
</div>
</el-dialog>
</template>
diff --git a/Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue b/Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue
index 308c333..1a286ff 100644
--- a/Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue
@@ -1,33 +1,18 @@
<template>
+ <!--绫诲瀷Action-->
<el-container>
-
<el-aside>
<basic-container>
- <div ref="TreeBox" style="height: calc(100vh - 144px);!important;">
- <div class="headerCon">
- <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓
- </el-button>
- <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">淇敼
- </el-button>
- <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">鍒犻櫎
- </el-button>
- <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
- </el-button>
- <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">瀵煎叆
- </el-button>
- <el-button class="smallBtn" plain size="small" type="primary"
- @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿
- </el-button>
- </div>
+ <div ref="TreeBox" style="height: calc(100vh - 154px);!important;">
<!-- 宸︿晶鏍� -->
- <div style="height: calc(100vh - 280px);">
+ <div style="height: calc(100vh - 190px);">
<avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
- <span slot-scope="{ node, data }" class="el-tree-node__label">
- <span style="font-size: 15px">
- <i class="el-icon-s-promotion"></i>
- {{ (node || {}).label }}
- </span>
- </span>
+ <span slot-scope="{ node, data }" class="el-tree-node__label">
+ <span style="font-size: 15px">
+ <i class="el-icon-s-promotion"></i>
+ {{ (node || {}).label }}
+ </span>
+ </span>
</avue-tree>
</div>
</div>
@@ -36,6 +21,19 @@
<el-main>
<basic-container>
+ <avue-crud
+ ref="crud"
+ :data="data"
+ :option="option"
+ :table-loading="tableLoading"
+ @selection-change="selectChangeHandler"
+ @row-click="rowClickHandler">
+ <template slot="menuLeft">
+ <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">娣诲姞</el-button>
+ <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">绉婚櫎</el-button>
+ </template>
+ </avue-crud>
+ <action-dialog ref="actionDialog"></action-dialog>
</basic-container>
</el-main>
@@ -43,8 +41,188 @@
</template>
<script>
+import basicOption from "@/util/basic-option";
+import {
+ cloneUIContextData,
+ delUIContextData, expUIContextData,
+ getBizTree, getExpContextTree,
+ gridUIContextData,
+ saveUIContextData,
+ updateUIContextData
+} from "@/api/UI/uiDefine";
+import func from "@/util/func";
+import actionDialog from "@/views/modelingMenu/ui/Aciton/dialog"
+
export default {
- name: "index"
+ name: "index",
+ components:{actionDialog},
+ data() {
+ return {
+ treeOption: {
+ height: 'auto',
+ defaultExpandAll: true,
+ menu: false,
+ addBtn: false,
+ props: {
+ label: 'text',
+ value: 'oid',
+ children: 'children'
+ }
+ },
+ nodeRow: {},
+ treeData: [],
+ searchParams: {
+ },
+ tableLoading: false,
+ selectList: [],
+ option: {
+ ...basicOption,
+ calcHeight: -50,
+ addBtn: false,
+ editBtn: false,
+ delBtn: false,
+ tip: false,
+ searchMenuSpan: 6,
+ align: 'left',
+ menu:false,
+ column: [
+ {
+ label: '缂栧彿',
+ prop: 'plCode',
+ overHidden: true,
+ search: true
+ },
+ {
+ label: '鍚嶇О',
+ prop: 'plName',
+ overHidden: true,
+ search: true
+ },
+ {
+ label: 'C/S绫昏矾寰�',
+ prop: 'plCSClass',
+ search: true,
+ searchLabelWidth:120,
+ overHidden: true,
+ },
+ {
+ label: 'B/S閾炬帴鍦板潃',
+ prop: 'plBSUrl',
+ search: true,
+ searchLabelWidth:120,
+ overHidden: true,
+ },
+ {
+ label: '绫诲瀷',
+ prop: 'plTypeType',
+ search: true,
+ type: 'select',
+ width:100,
+ dicData: [{
+ label: '涓氬姟绫诲瀷',
+ value: 'business'
+ }, {
+ label: '閾炬帴绫诲瀷',
+ value: 'link'
+ }]
+ },
+ {
+ label: '鎻忚堪',
+ prop: 'plDesc',
+ search: true,
+ overHidden: true,
+ },
+ ]
+ },
+ data: [],
+ }
+ },
+ created() {
+ this.getTreeList();
+ },
+ methods: {
+ //鏍戣〃鏌ヨ
+ getTreeList() {
+ const loading = this.$loading({});
+ getBizTree().then(res => {
+ this.treeData = [res.data.obj];
+ loading.close();
+ }).catch(error => {
+ loading.close();
+ })
+ },
+ // 鏍戠偣鍑�
+ nodeClick(row) {
+ if (row.oid) {
+ this.nodeRow = row;
+ this.tableLoading = true;
+ this.getTableList();
+ }
+ },
+ getTableList() {
+ const params = Object.assign(this.searchParams, {
+ 'conditionMap[btmName]': this.nodeRow.attributes.name,
+ })
+ gridUIContextData(1, 50, params).then(res => {
+ this.data = res.data.data;
+ this.$refs.crud.clearSelection();
+ this.tableLoading = false;
+ })
+ },
+ // 澶氶��
+ selectChangeHandler(row) {
+ this.selectList = row;
+ },
+ // 琛岀偣鍑�
+ rowClickHandler(row) {
+ func.rowClickHandler(
+ row,
+ this.$refs.crud,
+ this.lastIndex,
+ (newIndex) => {
+ this.lastIndex = newIndex;
+ },
+ () => {
+ this.selectList = [];
+ }
+ );
+ },
+
+ //鍒涘缓
+ addHandler() {
+ if (this.nodeRow && this.nodeRow.oid && this.nodeRow.oid!='') {
+ this.$refs.actionDialog.openDialog(this.nodeRow);
+ } else {
+ this.$message.error('璇烽�夋嫨涓氬姟绫诲瀷');
+ }
+ },
+ delHandler() {
+ if (this.selectList.length <= 0) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ const params = {
+ oids: this.selectList.map(item => item.plOId).join(',')
+ }
+ this.$confirm('鏄惁绉婚櫎閫変腑鐨凙ction锛�', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ delUIContextData(params).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success('鍒犻櫎鎴愬姛');
+ this.getTableList();
+ }
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ },
+ }
}
</script>
@@ -53,40 +231,5 @@
.el-scrollbar__wrap {
overflow: auto !important;
}
- .headerCon{
- .el-button{
- width: 82px;
- }
- }
}
-
-.headerCon {
- display: flex;
- flex-wrap: wrap;
- margin-bottom: 5px;
-
- .el-button + .el-button {
- margin-left: 5px;
- }
-
- .el-button {
- margin-top: 5px;
- }
-}
-
-.headerCon > .el-button:nth-child(4) {
- margin-left: 0;
-}
-
-.headerCon > .el-button:nth-child(7) {
- margin-left: 0;
-}
-
-
-.smallBtn {
- width: 82px;
- text-align: center;
- padding-left: 4.5px;
-}
-
</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/dialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/dialog.vue
new file mode 100644
index 0000000..b7d3214
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/dialog.vue
@@ -0,0 +1,293 @@
+<template>
+ <el-dialog v-dialogDrag
+ :append-to-body="true"
+ :close-on-click-modal="false"
+ :destroy-on-close="true"
+ :title="dialog.title"
+ :visible.sync="dialog.showDialog"
+ class="avue-dialog"
+ width="1400px"
+ @close="cancelDialog">
+ <el-container>
+ <el-aside>
+ <basic-container>
+ <!-- 宸︿晶鏍� -->
+ <div style="height: 200px;">
+ <avue-tree
+ ref="tree"
+ v-model="treeForm"
+ :data="treeData"
+ :option="treeOption"
+ @node-click="nodeClick">
+ <span slot-scope="{ node, data }" class="el-tree-node__label">
+ <span style="font-size: 15px">
+ <i class="el-icon-s-promotion"></i>
+ {{ (node || {}).label }}
+ </span>
+ </span>
+ </avue-tree>
+ </div>
+ </basic-container>
+ </el-aside>
+
+ <el-main>
+ <basic-container>
+ <div>
+ <avue-crud
+ ref="crud"
+ :data="data"
+ :option="option"
+ :page.sync="page"
+ :table-loading="tableLoading"
+ @search-change="handleSearch"
+ @search-reset="handleReset"
+ @refresh-change="handleRefresh"
+ @selection-change="selectChangeHandler"
+ @row-click="rowClickHandler">
+ <template slot="plTypeType" slot-scope="{row}">
+ <el-tag :type="row.plTypeType === 'business' ? '' : 'success'">
+ {{ row.plTypeType === 'business' ? '涓氬姟绫诲瀷' : '閾炬帴绫诲瀷' }}
+ </el-tag>
+ </template>
+ </avue-crud>
+ </div>
+ </basic-container>
+ </el-main>
+ </el-container>
+ <div slot="footer" class="dialog-footer avue-dialog__footer">
+ <el-button size="small" type="primary" @click="submitDialog">纭� 瀹�</el-button>
+ <el-button size="small" @click="cancelDialog">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+</template>
+
+<script>
+import {
+ getActionTree,
+ getActionTableData,
+ saveAction,
+ updateAction,
+ exportAction,
+ deleteAction,
+ getPLActionParam,
+ savePLActionParam,
+ updatePLActionParam,
+ deletePLActionParam,
+ saveActionCls,
+ updateActionCls,
+ deleteActionCls
+} from '@/api/UI/Action/api'
+import func from "@/util/func";
+import basicOption from "@/util/basic-option";
+import {clonePageDef, cloneTabButton, clonetabPage} from "@/api/UI/uiDefine";
+
+export default {
+ name: "index",
+ data() {
+ return {
+ dialog: {
+ showDialog: false,
+ title: "閫夋嫨Action",
+ loading: false,
+ type: "add",
+ },
+ currenRow: {}, // action褰撳墠琛屼俊鎭�
+ tableLoading: false,
+ lastIndex: null,
+ selectList: [],
+ data: [],
+ option: {
+ ...basicOption,
+ addBtn: false,
+ height: 200,
+ highlightCurrentRow: true,
+ menu:false,
+ column: [
+ {
+ label: '缂栧彿',
+ prop: 'plCode',
+ overHidden: true,
+ search: true
+ },
+ {
+ label: '鍚嶇О',
+ prop: 'plName',
+ overHidden: true,
+ search: true
+ },
+ {
+ label: 'C/S绫昏矾寰�',
+ prop: 'plCSClass',
+ search: true,
+ searchLabelWidth:120,
+ overHidden: true,
+ },
+ {
+ label: 'B/S閾炬帴鍦板潃',
+ prop: 'plBSUrl',
+ search: true,
+ searchLabelWidth:120,
+ overHidden: true,
+ },
+ {
+ label: '绫诲瀷',
+ prop: 'plTypeType',
+ search: true,
+ type: 'select',
+ width:100,
+ dicData: [{
+ label: '涓氬姟绫诲瀷',
+ value: 'business'
+ }, {
+ label: '閾炬帴绫诲瀷',
+ value: 'link'
+ }]
+ },
+ {
+ label: '鎻忚堪',
+ prop: 'plDesc',
+ search: true,
+ overHidden: true,
+ },
+ ]
+ },
+ treeNodeRow: {},
+ treeForm: {},
+ treeOption: {
+ addBtn: false,
+ defaultExpandedKeys: ['root'],
+ props: {
+ label: 'name',
+ value: 'id',
+ children: 'childs'
+ }
+ },
+ treeData: [],
+ }
+ },
+ created() {
+ },
+ methods: {
+ openDialog(data) {
+ this.dialog.showDialog = true;
+ this.getTreeList()
+ this.data = [];
+ },
+ cancelDialog() {
+ this.dialog.loading = false;
+ this.dialog.showDialog = false;
+ },
+ submitDialog() {
+ if (this.selectList.length==0) {
+ this.$message.error('璇烽�夋嫨Action');
+ return;
+ }
+ const saveFunction = {
+ 'pageDef': ''
+ };
+ saveFunction[this.type](params).then(res => {
+ if(res.data.code == 200){
+ this.$message.success(res.data.obj);
+ this.cancelDialog();
+ }
+ })
+ },
+ // 宸︿晶鏍戣姹�
+ getTreeList(status) {
+ const params = {
+ isExp: status ? true : false
+ }
+ getActionTree(params).then(res => {
+ const data = res.data.obj;
+ this.treeData = [data];
+ })
+ },
+
+ // 宸︿晶鏍戣鐐瑰嚮
+ nodeClick(row) {
+ this.treeNodeRow = row;
+ this.getRightTableList(row);
+ this.bottomData = [];
+ },
+
+ // 澶撮儴鍒锋柊鎸夐挳
+ handleRefresh() {
+ if (func.isEmptyObject(this.treeNodeRow)) {
+ return;
+ }
+ this.getRightTableList(this.treeNodeRow);
+ },
+
+ // 鍙充晶琛ㄦ牸淇℃伅
+ getRightTableList(row) {
+ this.tableLoading = true;
+ const params = {
+ plactioncls: row.id
+ }
+ getActionTableData(params).then(res => {
+ const data = res.data.data;
+ this.data = data;
+ this.tableLoading = false;
+ })
+ },
+
+ // 琛ㄦ牸澶氶��
+ selectChangeHandler(row) {
+ this.selectList = row;
+ },
+
+ // 琛岀偣鍑�
+ rowClickHandler(row) {
+ this.currenRow = row;
+ func.rowClickHandler(
+ row,
+ this.$refs.crud,
+ this.lastIndex,
+ (newIndex) => {
+ this.lastIndex = newIndex;
+ },
+ () => {
+ this.selectList = [];
+ }
+ );
+ },
+
+ // 鎼滅储
+ handleSearch(params, done) {
+ if (func.isEmptyObject(this.treeNodeRow)) {
+ this.$message.error('璇峰厛鍦ㄥ乏渚ч�夋嫨鑺傜偣鍚庢搷浣�');
+ return done();
+ }
+ this.tableLoading = true;
+ const apiParams = {
+ plactioncls: this.treeNodeRow.id === 'root' ? '' : this.treeNodeRow.id,
+ ...params
+ }
+
+ getActionTableData(apiParams).then(res => {
+ const data = res.data.data;
+ this.data = data;
+ this.tableLoading = false;
+ })
+ done();
+ },
+
+ // 閲嶇疆鎼滅储鏉′欢
+ handleReset() {
+ if (func.isEmptyObject(this.treeNodeRow)) {
+ this.$message.error('璇峰厛鍦ㄥ乏渚ч�夋嫨鑺傜偣鍚庢搷浣�');
+ return;
+ }
+ this.getRightTableList(this.treeNodeRow);
+ },
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep {
+ .el-scrollbar__wrap {
+ overflow: auto !important;
+ }
+}
+</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue
index 873a1b4..6b235af 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue
@@ -180,10 +180,12 @@
addBtn: false,
height: 350,
highlightCurrentRow: true,
+ menuWidth:160,
column: [
{
label: '缂栧彿',
prop: 'plCode',
+ overHidden: true,
search: true,
rules: [
{
@@ -196,6 +198,7 @@
{
label: '鍚嶇О',
prop: 'plName',
+ overHidden: true,
search: true,
rules: [
{
@@ -206,9 +209,10 @@
]
},
{
- label: '绫昏矾寰�',
+ label: 'C/S绫昏矾寰�',
prop: 'plCSClass',
search: true,
+ searchLabelWidth:120,
overHidden: true,
},
{
@@ -231,15 +235,18 @@
dicData: []
},
{
- label: '閾炬帴鍦板潃',
+ label: 'B/S閾炬帴鍦板潃',
prop: 'plBSUrl',
search: true,
+ searchLabelWidth:120,
+ overHidden: true,
},
{
label: '绫诲瀷',
prop: 'plTypeType',
search: true,
type: 'select',
+ width:100,
dicData: [{
label: '涓氬姟绫诲瀷',
value: 'business'
@@ -335,7 +342,9 @@
const data = res.data.obj;
this.treeData = [data];
const selectTreeData = this.option.column.find(item => item.prop === 'plActionCls'); // 鎵惧埌action娣诲姞鍒嗙被鏍�
- selectTreeData.dicData = [data];
+ const dicData=[data];
+ dicData[0].disabled=true;//鏍硅妭鐐逛笉鑳介��
+ selectTreeData.dicData = dicData;
})
},
@@ -719,11 +728,4 @@
overflow: auto !important;
}
}
-
-.smallBtn {
- width: 82px;
- text-align: center;
- padding-left: 4.5px;
-}
-
</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
index 0bf39a8..3f3e282 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
@@ -689,41 +689,5 @@
.el-scrollbar__wrap {
overflow: auto !important;
}
-
- .headerCon {
- .el-button {
- width: 82px;
- }
- }
}
-
-.headerCon {
- display: flex;
- flex-wrap: wrap;
- margin-bottom: 5px;
-
- .el-button + .el-button {
- margin-left: 5px;
- }
-
- .el-button {
- margin-top: 5px;
- }
-}
-
-.headerCon > .el-button:nth-child(4) {
- margin-left: 0;
-}
-
-.headerCon > .el-button:nth-child(7) {
- margin-left: 0;
-}
-
-
-.smallBtn {
- width: 82px;
- text-align: center;
- padding-left: 4.5px;
-}
-
</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog.vue
index ba6cc76..842412b 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog.vue
@@ -40,14 +40,13 @@
</el-main>
</el-container>
<div class="dialog-footer avue-dialog__footer">
- <el-button plain size="small" type="primary" @click="submitDialog">淇� 瀛�</el-button>
+ <el-button size="small" type="primary" @click="submitDialog">淇� 瀛�</el-button>
<el-button size="small" @click="cancelDialog">鍙� 娑�</el-button>
</div>
</el-dialog>
</template>
<script>
-import {getUIAuthor} from "@/api/authority/ui/uiAuthor";
import {getBizTree, getAllLevelTreeByBtm, clonePageDef, clonetabPage, cloneTabButton} from "@/api/UI/uiDefine";
export default {
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/plShow.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/plShow.vue
index a3f0c72..14102a9 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/plShow.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/plShow.vue
@@ -40,7 +40,7 @@
width="800px"
@close="dialogClose"
>
- <el-form ref="form" :model="form" :rules="rules" label-width="100px" size="small">
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px" size="small" style="margin-bottom: 30px;">
<el-row>
<el-col :span="12">
<el-form-item label="椤甸潰缂栫爜锛�" prop="plCode">
@@ -93,9 +93,9 @@
<div>4銆佽緭鍏ユ椂锛屼笉瑕佹暡鍥炶溅鎹㈣銆�</div>
</div>
</el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogClose">鍙� 娑�</el-button>
- <el-button type="primary" @click="saveHandler">纭� 瀹�</el-button>
+ <span slot="footer" class="dialog-footer avue-dialog__footer">
+ <el-button size="small" type="primary" @click="saveHandler">淇� 瀛�</el-button>
+ <el-button size="small" @click="dialogClose">鍙� 娑�</el-button>
</span>
</el-dialog>
<clone-dialog ref="cloneDialog" :fromOid="fromOid" :sourceOId="sourceOId" type="tabPage" paramsType="ui"></clone-dialog>
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 ae1270c..adbd870 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
@@ -5,19 +5,24 @@
ref="logCrud"
: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"
+ @row-save="rowSaveHandler"
+ @row-update="rowUpdateHandler"
+ @row-del="rowDeleteHandler"
>
<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}">
+ <el-button icon="el-icon-user" type="text" size="small" @click="userHandler(row,index)">鍒嗛厤鎴愬憳</el-button>
+ </template>
</avue-crud>
+ <!-- 鍒嗛厤鎴愬憳绌挎妗� -->
+ <transfer ref="transfer" :left-role-data="leftRoleData" :right-role-data="rightRoleData"
+ :transferTitle="transferTitle" title="鏂囦欢鏌滄坊鍔犳垚鍛�"
+ @transferSend="roleSendHandler">
+ </transfer>
</basic-container>
</template>
@@ -25,6 +30,8 @@
import {exportLog, getLogListByContion} from "@/api/system/log/logBasic";
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",
@@ -34,90 +41,123 @@
tableData: [],
option: {
...basicOption,
- addBtn:false,
- editBtn: false,
- delBtn: false,
calcHeight: -60,
align:'left',
headerAlign:'center',
- menu:false,
- searchMenuSpan: 6,
- searchIcon:false,
+ menuWidth:260,
+ dialogMenuPosition: 'right',
+ dialogWidth:600,
column: [
{
label: '鍗峰悕',
prop: 'truename',
- width: 300
- }, {
- label: '鏈哄櫒绫诲瀷',
- prop: 'username',
- width: 150
- },{
- label: '璺緞鍚嶇О',
- prop: 'userIp'
- },{
- label: '棣栭�夎矾寰�',
- prop: 'moduleName',
+ width: 200,
+ span: 24,
+ rules: [{ required: true, message: '璇疯緭鍏ュ嵎鍚�', trigger: 'blur' }]
},{
label: '鏈嶅姟鍣�',
prop: 'type',
- width: 150
+ span: 24,
+ rules: [{ required: true, message: '璇疯緭鍏ユ湇鍔″櫒', trigger: 'blur' }]
},{
label: '鍗锋湇鍔�',
prop: 'date',
+ span: 24,
+ rules: [{ required: true, message: '璇疯緭鍏ュ嵎鏈嶅姟', trigger: 'blur' }]
+ }, {
+ label: '鏈哄櫒绫诲瀷',
+ prop: 'username',
+ width: 120,
+ span: 24,
+ type:'radio',
+ dicData:[{
+ label:'Unix',
+ value:'Unix'
+ },{
+ label:'Win NT',
+ value:'Win NT'
+ }],
+ value:'Win NT'
+ },{
+ label: '璺緞鍚嶇О',
+ prop: 'userIp',
+ span: 24,
+ overHidden: true,
+ rules: [{ required: true, message: '璇疯緭鍏ヨ矾寰勫悕绉�', trigger: 'blur' }]
+ },{
+ label: '棣栭�夎矾寰�',
+ prop: 'loc',
+ width: 120,
+ span: 24,
+ type: 'switch',
+ value:false
}]
},
- page: {
- currentPage: 1,
- pageSize: 50,
- total: 0,
- pageSizes: [10, 30, 50, 100],
- },
- searchParams: {}
+ currentRow:null,
+ leftRoleData: [], // 鍒嗛厤鎴愬憳绌挎妗嗗乏渚у垵濮嬫暟鎹�
+ rightRoleData: [], // 鍒嗛厤鎴愬憳绌挎妗嗗彸渚у垵濮嬫暟鎹�
+ transferTitle: ['鏂囦欢鏌滃鎴愬憳', '鏂囦欢鏌滃唴鎴愬憳'],
}
},
methods: {
// 琛ㄦ牸璇锋眰
getTableList() {
this.tableLoading = true;
- getLogListByContion(this.page.currentPage, this.page.pageSize, {'logType':this.$route.query.logType,...this.searchParams}).then(res => {
+ getLogListByContion(1, 50, {}).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();
+ // 鏂板
+ rowSaveHandler(row, done,loading) {
+ addUser(row).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.obj);
+ this.getTableList();
+ done();
+ }
+ }).catch(err => {
+ loading()
+ });
},
- // 閲嶇疆鎼滅储鏉′欢
- handleReset() {
- this.searchParams = {};
- this.getTableList();
+ // 缂栬緫
+ rowUpdateHandler(row, index, done,loading) {
+ updateUser(row).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.obj);
+ this.getTableList();
+ done()
+ }
+ }).catch(err => {
+ loading()
+ });
},
- // 鏉℃暟
- sizeChange(val) {
- this.page.pageSize = val;
- },
+ // 鍒犻櫎
+ rowDeleteHandler(row) {
+ let params = {
+ ids: row.id
+ }
- // 椤电爜
- currentChange(val) {
- this.page.currentPage = val;
- },
-
- handleRefresh(){
- this.getTableList();
+ this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎褰撳墠鐨勫嵎鑺傜偣鍚楋紵', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ deleteUser(params).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.obj);
+ this.getTableList();
+ }
+ });
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
},
// 瀵煎嚭
exportClickHandler() {
@@ -129,6 +169,39 @@
loading.close();
})
},
+
+ //鍒嗛厤鎴愬憳
+ userHandler(row,index){
+ this.currentRow=row;
+ Promise.all([
+ listUserUnInRoleOid({pkRole: row.id}),
+ listUserByRoleOid({pkRole: row.id})
+ ]).then(([unInRoleRes, byRoleRes]) => {
+ if (unInRoleRes.data.code === 200 && byRoleRes.data.code === 200) {
+ const leftData = [...unInRoleRes.data.data, ...byRoleRes.data.data];
+ // 缁勮濂界┛姊鍙敤鏁版嵁
+ this.leftRoleData = leftData.map(item => {
+ return {
+ name: item.name + `(${item.id})`,
+ oid: item.oid
+ }
+ })
+ this.rightRoleData = byRoleRes.data.data.map(item => item.oid);
+ this.$refs.transfer.visible = true;
+ }
+ });
+ },
+ // 鍒嗛厤鎴愬憳绌挎妗嗗洖濉�
+ roleSendHandler(row) {
+ let params = {
+ userOids: row.join(','),
+ roleId: this.currentRow.id
+ }
+ saveRight(params).then(res => {
+ this.$message.success(res.data.obj);
+ this.getTableList();
+ })
+ },
}
}
</script>
diff --git a/Source/plt-web/plt-web-ui/src/views/system/log/index.vue b/Source/plt-web/plt-web-ui/src/views/system/log/index.vue
index 9b02091..08d3a02 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/log/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/log/index.vue
@@ -112,7 +112,7 @@
// 琛ㄦ牸璇锋眰
getTableList() {
this.tableLoading = true;
- getLogListByContion(this.page.currentPage, this.page.pageSize, {'logType': this.$route.query.logType, ...this.searchParams}).then(res => {
+ getLogListByContion(this.page.currentPage, this.page.pageSize, {'logType': this.$route.query.logType,'roleType':this.$route.query.roleType, ...this.searchParams}).then(res => {
this.tableData = res.data.data;
this.page.total = res.data.total;
this.tableLoading = false;
@@ -154,7 +154,7 @@
// 瀵煎嚭
exportClickHandler() {
const loading = this.$loading({});
- exportLog().then(res => {
+ exportLog({'pageNo':1,'pageSize':-1,'logType': this.$route.query.logType,'roleType':this.$route.query.roleType, ...this.searchParams}).then(res => {
func.downloadFileByBlobHandler(res);
this.createdLoading = false
this.$message.success('瀵煎嚭鎴愬姛');
diff --git a/Source/plt-web/plt-web-ui/src/views/system/role/index.vue b/Source/plt-web/plt-web-ui/src/views/system/role/index.vue
index 80a085f..53aaddb 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/role/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/role/index.vue
@@ -30,7 +30,7 @@
</template>
</avue-crud>
- <!-- 鍒嗛厤瑙掕壊绌挎妗� -->
+ <!-- 鍒嗛厤鎴愬憳绌挎妗� -->
<transfer ref="transfer" :left-role-data="leftRoleData" :right-role-data="rightRoleData"
:transferTitle="transferTitle" title="瑙掕壊娣诲姞鎴愬憳"
@transferSend="roleSendHandler">
@@ -296,8 +296,6 @@
this.rightRoleData = byRoleRes.data.data.map(item => item.oid);
this.$refs.transfer.visible = true;
}
- }).catch(err => {
- console.error(err);
});
},
@@ -311,8 +309,6 @@
saveRight(params).then(res => {
this.$message.success(res.data.obj);
this.getTableList();
- }).catch(err => {
- this.$message.error(err)
})
},
diff --git a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
index f51774b..2f6ccea 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
@@ -93,8 +93,8 @@
</div>
<div slot="footer" class="dialog-footer">
- <el-button size="small" @click="pwdVisible = false">鍙� 娑�</el-button>
<el-button size="small" type="primary" @click="savePwdHandler">纭� 瀹�</el-button>
+ <el-button size="small" @click="pwdVisible = false">鍙� 娑�</el-button>
</div>
</el-dialog>
@@ -119,8 +119,8 @@
>
</avue-crud>
<div slot="footer" class="dialog-footer">
- <el-button size="small" @click="departVisible = false">鍙� 娑�</el-button>
<el-button size="small" type="primary" @click="saveDepartHandler">纭� 瀹�</el-button>
+ <el-button size="small" @click="departVisible = false">鍙� 娑�</el-button>
</div>
</el-dialog>
</basic-container>
@@ -408,7 +408,6 @@
}
}).catch(err => {
loading()
- console.log(err);
})
},
@@ -439,7 +438,6 @@
}
}).catch(err => {
loading()
- console.log(err);
});
},
--
Gitblit v1.9.3