Merge remote-tracking branch 'origin/master'
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import {getIcons} from "@/api/UI/Icons"; |
| | | import store from "@/store"; |
| | | |
| | | export default { |
| | | name: "app", |
| | | data() { |
| | |
| | | }, |
| | | watch: {}, |
| | | created() { |
| | | |
| | | //获取所有图标,存在session |
| | | getIcons().then(res => { |
| | | store.dispatch("setIcons", res.data.data); |
| | | }) |
| | | }, |
| | | methods: {}, |
| | | computed: {} |
| | |
| | | }); |
| | | } |
| | | |
| | | // 获取当前用户在线人数信息 |
| | | export function getOnlinUsers() { |
| | | return request({ |
| | | url: "/api/hmSysModConfigController/getOnlinUsers", |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // 配置项查询 |
| | | export function getAppConfigDetailsByID(params) { |
| | | return request({ |
| | |
| | | @close="dialogClose"> |
| | | <div style="display: flex;justify-content: space-between;flex-wrap: wrap"> |
| | | <div class="tag-group"> |
| | | <span class="tag-group__title">分类</span> |
| | | <span class="tag-group__title" v-if="types.length>0">分组</span> |
| | | <el-tag |
| | | v-for="item in types" |
| | | :key="item.key" |
| | |
| | | margin-top: 0 !important; |
| | | } |
| | | .avue-dialog .el-dialog__body{ |
| | | padding: 20px 20px 0px 20px; // 上右下左 取消表格下边距(会出现滚动条) |
| | | padding: 15px 15px 0px 15px; // 上右下左 取消表格下边距(会出现滚动条) |
| | | margin-bottom: 10px !important; |
| | | } |
| | | .avue-dialog .el-dialog__body .avue-form{ |
| | |
| | | height: 14px !important; |
| | | margin-right: 3px; |
| | | } |
| | | .el-tree-node__label [class*=" el-icon-"],.el-tree-node__label [class^=el-icon-]{ |
| | | font-size: 14px;margin-top: 3px; |
| | | } |
| | | |
| | | .el-select{ |
| | | width: 100%; |
| | |
| | | this.dialog.loading = false; |
| | | this.dialog.showDialog = false; |
| | | this.$refs.tree.setCurrentKey(null); |
| | | this.$emit('cancelAction',null); |
| | | }, |
| | | submitDialog() { |
| | | if (this.selectList.length==0) { |
| | |
| | | this.$emit('updataAction', this.selectList[0]); |
| | | } |
| | | |
| | | this.cancelDialog(); |
| | | |
| | | this.dialog.loading = false; |
| | | this.dialog.showDialog = false; |
| | | this.$refs.tree.setCurrentKey(null); |
| | | }, |
| | | // 左侧树请求 |
| | | getTreeList(status) { |
| | |
| | | |
| | | <el-main> |
| | | <basic-container v-if="treeNodeRow.id === 'root' "> |
| | | <div class="headerCon"> |
| | | <el-button v-if="permissionList.addBtn" icon="el-icon-plus" plain size="small" type="primary" @click="addTreeClickHandler">创建 |
| | | <div> |
| | | <avue-crud |
| | | ref="treeCrud" |
| | | v-model="treeForm" |
| | | :data="treeData[0].children" |
| | | :option="treeCrudOption" |
| | | @row-del="rowTreeDelHandler" |
| | | @row-save="rowTreeSaveHandler" |
| | | @row-update="rowTreeUpdataHandler" |
| | | @refresh-change="handleRefresh"> |
| | | <template slot="menuLeft"> |
| | | <el-button v-if="permissionList.addBtn" icon="el-icon-plus" plain size="small" type="primary" @click="addTreeClickHandler(treeNodeRow)">创建 |
| | | </el-button> |
| | | <!--<el-button v-if="permissionList.editBtn" icon="el-icon-edit" plain size="small" type="primary" @click="editTreeClickHandler">修改 |
| | | </el-button> |
| | |
| | | </el-button> |
| | | <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导出 |
| | | </el-button> |
| | | </div> |
| | | <div> |
| | | <avue-crud |
| | | ref="treeCrud" |
| | | v-model="treeForm" |
| | | :data="treeData[0].childs" |
| | | :option="treeCrudOption" |
| | | @row-del="rowTreeDelHandler" |
| | | @row-save="rowTreeSaveHandler" |
| | | @row-update="rowTreeUpdataHandler" |
| | | @refresh-change="handleRefresh"> |
| | | </template> |
| | | <template #menu="{ row, size }"> |
| | | <el-button v-if="permissionList.addBtn" :size="size" icon="el-icon-plus" |
| | | text |
| | | type="text" |
| | | @click="addTreeClickHandler(row)">新增子级</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | | </basic-container> |
| | |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childs' |
| | | children: 'children' |
| | | } |
| | | }, |
| | | treeData: [] |
| | |
| | | addBtn: false, |
| | | calcHeight: -50, |
| | | highlightCurrentRow: true, |
| | | menuWidth: 160, |
| | | rowKey: 'id', |
| | | rowParentKey: 'pid', |
| | | menuWidth: 300, |
| | | span: 24, |
| | | labelWidth: 100, |
| | | dialogWidth: '800', |
| | | align:'left', |
| | | column: [{ |
| | | label: '分类名称', |
| | | prop: 'name', |
| | |
| | | }, { |
| | | label: '父主类', |
| | | prop: 'pidName', |
| | | formatter:function(row){ |
| | | if(row.pid=='root'){ |
| | | return 'Action分类' |
| | | } |
| | | }, |
| | | disabled: true, |
| | | span: 24 |
| | | }, { |
| | |
| | | } |
| | | getActionTree(params).then(res => { |
| | | const data = res.data.obj; |
| | | this.treeData = [data]; |
| | | this.treeData = this.treeDataFormAtter([data],'Action分类'); |
| | | const selectTreeData = this.option.column.find(item => item.prop === 'plActionCls'); // 找到action添加分类树 |
| | | const dicData=[data]; |
| | | dicData[0].disabled=true;//根节点不能选 |
| | |
| | | }) |
| | | }, |
| | | |
| | | treeDataFormAtter(items,pidName) { |
| | | return items.map(item => { |
| | | // 转换当前节点的属性 |
| | | const formList = { |
| | | ...item, |
| | | pidName:pidName, |
| | | children: item.childs && item.childs.length > 0 ? this.treeDataFormAtter(item.childs,item.name) : undefined |
| | | }; |
| | | return formList; |
| | | }); |
| | | }, |
| | | |
| | | // 左侧树行点击 |
| | | nodeClick(row) { |
| | | this.treeNodeRow = row; |
| | | if(this.treeNodeRow.id !== 'root'){ |
| | | this.getRightTableList(row); |
| | | this.bottomData = []; |
| | | } |
| | | }, |
| | | |
| | | // 头部刷新按钮 |
| | |
| | | }, |
| | | |
| | | // 左侧树创建 |
| | | addTreeClickHandler() { |
| | | if (func.isEmptyObject(this.treeNodeRow)) { |
| | | addTreeClickHandler(row) { |
| | | let parentRow=row; |
| | | if(!row || !row.id){ |
| | | parentRow=this.treeNodeRow |
| | | } |
| | | if (func.isEmptyObject(parentRow)) { |
| | | this.$message.error('请选择一条分类进行添加'); |
| | | return; |
| | | } |
| | | if (!this.treeNodeRow.id && this.treeNodeRow.name=='未分类') { |
| | | if (!parentRow.id && parentRow.name=='未分类') { |
| | | this.$message.error('未分类下不能创建子分类'); |
| | | return; |
| | | } |
| | | const {createTime, creator, name, id, description} = this.treeNodeRow; |
| | | const {createTime, creator, name, id, description} = parentRow; |
| | | this.$set(this.treeForm, 'createTime', func.formattedDate(createTime)); |
| | | this.$set(this.treeForm, 'creator', creator); |
| | | this.$set(this.treeForm, 'pid', id); |
| | |
| | | <basic-container> |
| | | <div style="display: flex;justify-content: space-between;flex-wrap: wrap"> |
| | | <div class="tag-group"> |
| | | <span class="tag-group__title">分组</span> |
| | | <span class="tag-group__title" v-if="types.length>0">分组</span> |
| | | <el-tag |
| | | v-for="item in types" |
| | | :key="item.key" |
| | |
| | | }, |
| | | created() { |
| | | this.getGroups(); |
| | | this.initList(); }, |
| | | this.initList(); |
| | | }, |
| | | methods:{ |
| | | getGroups() { |
| | | getDicts('EnumIconGroups').then(res => { |
| | |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | title="配置按钮" |
| | | width="75%" |
| | | @close="dialogClose"> |
| | | width="1200px" |
| | | @close="$refs.form.clearValidate();disabledBtn=true;"> |
| | | <el-container v-loading="dialogLoading"> |
| | | <el-header style="height: 40px !important;"> |
| | | <el-header style="height: 40px !important;padding-left: 5px;"> |
| | | <div style="display: flex"> |
| | | <el-button :disabled="!disabledBtn" plain size="mini" type="primary" @click="addClickBtnHandler">添加 |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" @click="addClickBtnHandler">添加 |
| | | </el-button> |
| | | <el-button :disabled="!disabledBtn" plain size="mini" type="primary" @click="editClickBtnHandler">修改 |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" @click="editClickBtnHandler">修改 |
| | | </el-button> |
| | | <el-button :disabled="!disabledBtn" plain size="mini" type="danger" @click="delClickBtnHandler">删除 |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="danger" @click="delClickBtnHandler">删除 |
| | | </el-button> |
| | | <el-button :disabled="disabledBtn" plain size="mini" type="primary" @click="saveClickBtnHandler">保存 |
| | | <el-button v-show="!disabledBtn" :disabled="disabledBtn" plain size="mini" icon="el-icon-check" type="success" @click="saveClickBtnHandler">保存 |
| | | </el-button> |
| | | <el-button :disabled="disabledBtn" plain size="mini" type="primary" @click="escClickBtnHandler">取消 |
| | | <el-button v-show="!disabledBtn" :disabled="disabledBtn" plain size="mini" icon="el-icon-close" type="danger" @click="escClickBtnHandler">取消 |
| | | </el-button> |
| | | <el-button plain size="mini" type="primary" @click="changeBottomBtnHandler">调整为下级按钮</el-button> |
| | | <el-button plain size="mini" type="primary" @click="changeTopBtnHandler">调整为上级按钮</el-button> |
| | | <el-button plain size="mini" type="primary" @click="cloneClickBtnHandler">复制到其他组件</el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeBottomBtnHandler">调整为下级按钮</el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeTopBtnHandler">调整为上级按钮</el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="cloneClickBtnHandler">复制到其他组件</el-button> |
| | | </div> |
| | | </el-header> |
| | | <el-container> |
| | | <el-aside width="20%"> |
| | | <el-aside width="25%"> |
| | | <basic-container> |
| | | <div style="height:650px;"> |
| | | <avue-tree |
| | |
| | | node-key="value" |
| | | @node-click="nodeTreeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 14px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | <span style="display: flex"> |
| | | <i v-if="data.oId=='parentNode'" class="iconShow el-icon-s-home"></i> |
| | | <icon-show v-else :name="data.iconPath"></icon-show> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | |
| | | <el-main> |
| | | <basic-container> |
| | | <el-divider content-position="left">基础信息</el-divider> |
| | | <el-form ref="form" :model="basicForm" :rules="rules" label-width="90px" size="small" |
| | | <el-form ref="form" :model="basicForm" :rules="rules" label-width="100px" size="small" |
| | | style="margin-top: 20px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item :inline-message='true' label="编号:" prop="seq"> |
| | | <el-input-number v-model="basicForm.seq" :disabled="disabledBtn" :max="9999" :min="1" |
| | | controls-position="right"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item :inline-message='true' label="名称:" prop="label"> |
| | | <el-col :span="14"> |
| | | <el-input v-model="basicForm.label" :readonly="disabledBtn"></el-input> |
| | | </el-col> |
| | | <el-input v-model="basicForm.label" :disabled="disabledBtn"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-form-item label="Action:" prop="Action"> |
| | | <el-col :span="14"> |
| | | <div style="display: flex"> |
| | | <el-input v-model="basicForm.actionName" :readonly="disabledBtn"></el-input> |
| | | <el-button :disabled="disabledBtn" size="mini" style="margin-left: 10px" type="success" |
| | | @click="actionFoucus">选择 |
| | | </el-button> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="Action:" prop="actionName"> |
| | | <el-input v-model="basicForm.actionName" :disabled="disabledBtn" :clearable="true" @focus="actionFoucus" @clear="clearActionValue"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer" @click="actionFoucus"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="是否授权:" prop="authorization"> |
| | |
| | | <el-radio v-model="basicForm.authorization" :disabled="disabledBtn" label="1">否</el-radio> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="24"> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="是否显示:" prop="show"> |
| | | <el-radio v-model="basicForm.show" :disabled="disabledBtn" label="0">是</el-radio> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-col :span="12" v-show="basicForm.show=='0'"> |
| | | <el-form-item label="显示方式:" prop="showType"> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="text">文字</el-radio> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="image">图标</el-radio> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="textandimage">文字和图标 |
| | | </el-radio> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="textandimage">文字和图标</el-radio> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" v-show="basicForm.show=='0' && (basicForm.displayMode=='image'||basicForm.displayMode=='textandimage')"> |
| | | <el-form-item label="图标:" prop="iconPath"> |
| | | <input-icon v-model="basicForm.iconPath" :disabled="disabledBtn"></input-icon> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="提示信息:" prop="desc"> |
| | | <el-input v-model="basicForm.desc" :readonly="disabledBtn" type="textarea"></el-input> |
| | | <el-input v-model="basicForm.desc" :disabled="disabledBtn" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | |
| | | </el-container> |
| | | </el-container> |
| | | </el-dialog> |
| | | <action-dialog ref="actionDialog" @updataAction="actionSaveHandler"></action-dialog> |
| | | <action-dialog ref="actionDialog" @cancelAction="actionCancelHandler" @updataAction="actionSaveHandler"></action-dialog> |
| | | <clone-dialog ref="cloneDialog" :fromOid="fromOid" :sourceOId="sourceOId" paramsType="tab" |
| | | type="pageDef"></clone-dialog> |
| | | <clone-dialog ref="cloneBtnDialog" :fromOid="formBtnOid" :sourceOId="sourceBtnOid" paramsType="pageDef" |
| | |
| | | editBtn: false, |
| | | delBtn: false, |
| | | refreshBtn: false, |
| | | dialogWidth:'600', |
| | | menuWidth:'150', |
| | | column: [ |
| | | { |
| | | label: '名称', |
| | | prop: 'name', |
| | | width:180, |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | |
| | | { |
| | | label: '值', |
| | | prop: 'value', |
| | | type:'textarea', |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | |
| | | ], |
| | | label: [ |
| | | {required: true, message: '请输入名称', trigger: 'blur'}, |
| | | ], |
| | | actionName: [ |
| | | {required: true, message: '请选择Action', trigger: 'blur'}, |
| | | ], |
| | | }, |
| | | // 按钮设计 基础信息 |
| | |
| | | value: value |
| | | })) : []; |
| | | this.disabledBtn = true; |
| | | this.$refs.form.clearValidate() |
| | | }, |
| | | |
| | | // 按钮设计参数信息删除 |
| | |
| | | |
| | | // 按钮设计保存 |
| | | saveClickBtnHandler() { |
| | | if (this.basicForm.show == '0' && (this.basicForm.displayMode == 'image' || this.basicForm.displayMode == 'textandimage') && this.basicForm.iconPath == '') { |
| | | this.$message.error('请选择图标'); |
| | | return; |
| | | } |
| | | this.$refs.form.validate((valid, done) => { |
| | | if (valid) { |
| | | this.dialogLoading = true; |
| | | const saveFunction = this.saveType === 'add' ? addTapButton : updateTapButton; |
| | | const bottomParams = {}; |
| | |
| | | bottomParams[item.name] = item.value |
| | | }) |
| | | } |
| | | |
| | | const params = this.saveType === 'add' ? { |
| | | ...this.basicForm, |
| | | parentId: this.nodeTreeRow.oId === 'parentNode' ? '' : this.nodeTreeRow.parentId, |
| | |
| | | }).catch(err => { |
| | | this.dialogLoading = false; |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | done(); |
| | | }); |
| | | }, |
| | | |
| | | // 按钮设计删除 |
| | |
| | | actionSaveHandler(val) { |
| | | this.$set(this.basicForm, 'actionName', val.plName); |
| | | this.$set(this.basicForm, 'actionOId', val.plOId); |
| | | this.$refs.form.clearValidate('Action') |
| | | }, |
| | | // action选择弹窗直接关闭 |
| | | actionCancelHandler() { |
| | | if(this.basicForm.actionOId){ |
| | | this.$refs.form.clearValidate('Action') |
| | | } |
| | | }, |
| | | |
| | | //清除action |
| | | clearActionValue(){ |
| | | this.$set(this.basicForm, 'actionName', ''); |
| | | this.$set(this.basicForm, 'actionOId', ''); |
| | | }, |
| | | // 打开克隆对话框 |
| | | rowCloneHandler(row) { |
| | | this.fromOid = this.sourceData.plOId; |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="序号:" prop="plSeq"> |
| | | <el-input v-model="form.plSeq"></el-input> |
| | | <el-input-number v-model="form.plSeq" :max="9999" :min="1" |
| | | controls-position="right"></el-input-number > |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | }, |
| | | // 编辑按钮 |
| | | rowEditBtnClick(row) { |
| | | this.form=row; |
| | | this.form=JSON.parse(JSON.stringify(row)); |
| | | this.dialogType = 'edit'; |
| | | this.dialogVisible = true; |
| | | }, |
| | |
| | | } else { |
| | | return false; |
| | | } |
| | | done(); |
| | | }); |
| | | }, |
| | | rowCloneHandler(row) { |
| | |
| | | <el-button icon="el-icon-close" plain size="small" type="danger" @click="deleteOperationClickHandler">删除 |
| | | </el-button> |
| | | </div> |
| | | <el-form ref="form" :model="form" label-width="85px" size="small" style="max-height: calc(100vh - 200px);overflow: auto;"> |
| | | <el-form ref="form" :model="form" label-width="100px" size="small" |
| | | style="max-height: calc(100vh - 200px);overflow: auto;"> |
| | | <span v-if="form.category !== 1"> |
| | | <el-form-item label="模块名:"> |
| | | <el-form-item> |
| | | <span slot="label" style="display:inline-block;"> |
| | | 菜单标识: |
| | | <el-tooltip class="item" content="请输入英文字符,并保证唯一性!" effect="dark" placement="top-start"> |
| | | <i class='el-icon-star-on' style="color: #F56C6C"/> |
| | | </el-tooltip> |
| | | </span> |
| | | <el-input v-model="form.alias" :disabled="!editStatus && !addStatus" |
| | | placeholder="请输入英文字符,并保证唯一性!"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <span slot="label" style="display:inline-block;"> |
| | | 模块名: |
| | | <i class='el-icon-star-on' style="color: #F56C6C"/> |
| | | </span> |
| | | <el-input v-model="form.name" :disabled="!editStatus && !addStatus" placeholder="请输入模块名"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="模块别名:"> |
| | | <el-input v-model="form.alias" :disabled="!editStatus && !addStatus" placeholder="模块别名用来记录日志使用"></el-input> |
| | | <el-form-item> |
| | | <span slot="label" style="display:inline-block;"> |
| | | 序号: |
| | | <el-tooltip class="item" content="数字,描述该模块在其父模块下的显示顺序" effect="dark" placement="top-start"> |
| | | <i class='el-icon-star-on' style="color: #F56C6C"/> |
| | | </el-tooltip> |
| | | </span> |
| | | <el-input v-model="form.sort" :disabled="!editStatus && !addStatus" |
| | | placeholder="数字,描述该模块在其父模块下的显示顺序"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.functionType === 0" label="C/S:"> |
| | | <el-input v-model="form.pathC" :disabled="!editStatus && !addStatus" :rows="2" placeholder="请输入C/S路径" |
| | |
| | | <el-form-item v-if="form.functionType === 0" label=".NET:"> |
| | | <el-input v-model="form.resourceDotNet" :disabled="!editStatus && !addStatus" :rows="2" |
| | | placeholder="请输入.NET" type="textarea"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="序号:"> |
| | | <el-input v-model="form.sort" :disabled="!editStatus && !addStatus" |
| | | placeholder="数字,描述该模块在其父模块下的显示顺序"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="图标:"> |
| | | <input-icon v-model="form.source" :disabled="!editStatus && !addStatus" placeholder="请选择图标"> |
| | |
| | | this.$message.error('模块名不能为空'); |
| | | return |
| | | } |
| | | if (!this.form.alias) { |
| | | this.$message.error('菜单标识不能为空'); |
| | | return |
| | | } |
| | | if (this.form.name.length > 128) { |
| | | this.$message.error('模块名长度不能超过128!'); |
| | | return |
| | |
| | | this.$message.error('模块名不能为空'); |
| | | return |
| | | } |
| | | if (!this.form.alias) { |
| | | this.$message.error('菜单标识不能为空'); |
| | | return |
| | | } |
| | | if (this.form.name.length > 128) { |
| | | this.$message.error('模块名长度超过128!'); |
| | | return |
| | |
| | | <el-button icon="el-icon-close" plain size="small" type="danger" @click="deleteOperationClickHandler">删除 |
| | | </el-button> |
| | | </div> |
| | | <el-form ref="form" :model="form" label-width="85px" style="max-height: calc(100vh - 200px);overflow: auto;"> |
| | | <el-form ref="form" :model="form" label-width="100px" style="max-height: calc(100vh - 200px);overflow: auto;"> |
| | | <span v-if="form.category !== 1"> |
| | | <el-form-item label="模块名:"> |
| | | <el-form-item> |
| | | <span slot="label" style="display:inline-block;"> |
| | | 菜单标识: |
| | | <el-tooltip class="item" effect="dark" content="请输入英文字符,并保证唯一性!" placement="top-start"> |
| | | <i class='el-icon-star-on' style="color: #F56C6C"/> |
| | | </el-tooltip> |
| | | </span> |
| | | <el-input v-model="form.alias" :disabled="!editStatus && !addStatus" |
| | | placeholder="请输入英文字符,并保证唯一性!"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <span slot="label" style="display:inline-block;"> |
| | | 模块名: |
| | | <i class='el-icon-star-on' style="color: #F56C6C"/> |
| | | </span> |
| | | <el-input v-model="form.name" :disabled="!editStatus && !addStatus" placeholder="请输入模块名"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="模块别名:"> |
| | | <el-input v-model="form.alias" :disabled="!editStatus && !addStatus" placeholder="模块别名用来记录日志使用"></el-input> |
| | | <el-form-item> |
| | | <span slot="label" style="display:inline-block;"> |
| | | 序号: |
| | | <el-tooltip class="item" content="数字,描述该模块在其父模块下的显示顺序" effect="dark" placement="top-start"> |
| | | <i class='el-icon-star-on' style="color: #F56C6C"/> |
| | | </el-tooltip> |
| | | </span> |
| | | <el-input v-model="form.sort" :disabled="!editStatus && !addStatus" |
| | | placeholder="数字,描述该模块在其父模块下的显示顺序"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.functionType === 0" label="C/S:"> |
| | | <el-input v-model="form.pathC" :disabled="!editStatus && !addStatus" :rows="2" placeholder="请输入C/S路径" |
| | |
| | | <el-form-item v-if="form.functionType === 0" label=".NET:"> |
| | | <el-input v-model="form.resourceDotNet" :disabled="!editStatus && !addStatus" :rows="2" |
| | | placeholder="请输入.NET" type="textarea"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="序号:"> |
| | | <el-input v-model="form.sort" :disabled="!editStatus && !addStatus" |
| | | placeholder="数字,描述该模块在其父模块下的显示顺序"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="图标:"> |
| | | <input-icon v-model="form.source" :disabled="!editStatus && !addStatus" placeholder="请选择图标"> |
| | |
| | | this.$message.error('模块名不能为空'); |
| | | return |
| | | } |
| | | if (!this.form.alias) { |
| | | this.$message.error('菜单标识不能为空'); |
| | | return |
| | | } |
| | | if (this.form.name.length > 128) { |
| | | this.$message.error('模块名长度不能超过128!'); |
| | | return |
| | |
| | | this.$message.error('模块名不能为空'); |
| | | return |
| | | } |
| | | if (!this.form.alias) { |
| | | this.$message.error('菜单标识不能为空'); |
| | | return |
| | | } |
| | | if (this.form.name.length > 128) { |
| | | this.$message.error('模块名长度超过128!'); |
| | | return |
| | |
| | | <avue-tree :key="refresh" ref="tree" :data="treeData" :option="treeOption" node-key="id" |
| | | @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span> |
| | | <i class="el-icon-s-promotion"></i> |
| | | <span style="display: flex"> |
| | | <icon-show :name="data.icon"></icon-show> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="别名:"> |
| | | <el-input v-model="form.alias" :disabled="!editStatus && !addStatus" placeholder="请输入别名"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="图标:"> |
| | | <input-icon v-model="form.source" :disabled="!editStatus && !addStatus" placeholder="请选择图标"> |
| | | </input-icon> |
| | | </el-form-item> |
| | | <el-form-item label="顺序:"> |
| | | <el-input-number v-model="form.sort" :disabled="!editStatus && !addStatus" :max="9999" :min="0" |
| | |
| | | ...item, |
| | | id: item.id, |
| | | name: item.name, |
| | | leaf: !item.hasChildren |
| | | leaf: !item.hasChildren, |
| | | icon: item.source || 'iconoir:home' |
| | | } |
| | | })) |
| | | }) |
| | |
| | | <template> |
| | | <basic-container> |
| | | <div class="container"> |
| | | <el-form ref="form" :model="form" label-width="150px"> |
| | | <el-form-item label="当前在线用户人数"> |
| | | <div style="display: flex;"> |
| | | <el-input v-model="form.currentOnlineUser" :readOnly="true"></el-input> |
| | | <el-button plain type="primary" style="margin-left: 10px" @click="getOnlineUsersNum"> 刷新</el-button> |
| | | <div style="display: flex;justify-content: space-between;align-items: center"> |
| | | <h3>当前在线人员信息</h3> |
| | | <el-button type="primary" size="small" plain style="margin-right: 10px" @click="getOnlinUsersHandler">刷新</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <avue-crud :data="data" :option="option" :table-loading="loading" ></avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getOnlineUsersNum |
| | | getOnlinUsers |
| | | } from "@/api/systemModel/systemConfig/api" |
| | | import basicOption from '@/util/basic-option'; |
| | | import func from "@/util/func"; |
| | | export default { |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | form: { |
| | | currentOnlineUser: '0' |
| | | loading:false, |
| | | data:[], |
| | | option:{ |
| | | ...basicOption, |
| | | refreshBtn:false, |
| | | addBtn:false, |
| | | menu:false, |
| | | column:[ |
| | | { |
| | | label:'用户OID', |
| | | prop:'oid', |
| | | overHidden:true, |
| | | }, |
| | | { |
| | | label:'用户账号', |
| | | prop:'userId' |
| | | }, |
| | | { |
| | | label:'用户姓名', |
| | | prop:'userName' |
| | | }, |
| | | { |
| | | label:'机器ip', |
| | | prop:'ip' |
| | | }, |
| | | { |
| | | label:'登录时间', |
| | | prop:'loginTime' |
| | | }, |
| | | { |
| | | label:'最后操作时间', |
| | | prop:'lastRequestTs' |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getOnlineUsersNum(); |
| | | this.getOnlinUsersHandler(); |
| | | }, |
| | | methods: { |
| | | // 左侧树查询 |
| | | getOnlineUsersNum() { |
| | | getOnlineUsersNum().then(res => { |
| | | getOnlinUsersHandler() { |
| | | this.loading = true; |
| | | getOnlinUsers().then(res => { |
| | | if (res.data.code === 200) { |
| | | const data = res.data.obj; |
| | | this.form.currentOnlineUser = data; |
| | | const data = res.data.data; |
| | | this.data = data.map(item => { |
| | | return{ |
| | | ...item, |
| | | loginTime:func.formattedDate(item.loginTime), |
| | | lastRequestTs:func.formattedDate(item.lastRequestTs), |
| | | } |
| | | }) |
| | | this.loading = false; |
| | | } |
| | | }) |
| | | } |