| | |
| | | |
| | | // 查询 |
| | | export function fetchTree (data) { |
| | | return request.post('/visitsAdmin/cloudService/system/menu/treeList', data) |
| | | return request.post('/visitsAdmin/cloudService/system/menu/treeList', data ||{}) |
| | | } |
| | | |
| | | // 新建 |
| | |
| | | <div>服务中心</div> |
| | | <div class="linellae"></div> |
| | | </div> |
| | | <div class="item" @click="getHeaderNav('0')">安防中心</div> |
| | | <div class="item" v-for="(item,index) in topMenuList.list" :key="item.id" @click="getHeaderNav(item)" :index="index">{{item.label}}</div> |
| | | <!-- <div class="item" @click="getHeaderNav('0')">安防中心</div> |
| | | <div class="item" @click="getHeaderNav('1')">消控中心</div> |
| | | <div class="item" @click="getHeaderNav('2')">能管中心</div> |
| | | <div class="item" @click="getHeaderNav('7')">后勤中心</div> |
| | | <div class="item" @click="getHeaderNav('3')">驾驶舱</div> |
| | | <div class="item" @click="getHeaderNav('3')">驾驶舱</div>--> |
| | | <!-- <div class="item" @click="handleTest">测试</div> --> |
| | | </div> |
| | | <!-- <div class="title-en">Diagnosis of Intelligent Manufacturing Integrated Service Platfrom</div> --> |
| | |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | data () { |
| | | return { |
| | | title: process.env.VUE_APP_TITLE, |
| | | headerNavData: {}, |
| | |
| | | ], |
| | | newPwd: [ |
| | | { required: true, message: '请输入密码', trigger: 'blur' }, |
| | | { validator: this.validatePassword, trigger: 'blur' }, |
| | | { validator: this.validatePassword, trigger: 'blur' } |
| | | ], |
| | | confirmPwd: [ |
| | | { required: true, message: '请再次输入新密码' } |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState(['menuData', 'userInfo']), |
| | | ...mapState(['menuData', 'userInfo', 'topMenuList']) |
| | | // title () { |
| | | // return this.$route.meta.title |
| | | // } |
| | | }, |
| | | created() { |
| | | created () { |
| | | |
| | | }, |
| | | mounted() { |
| | | mounted () { |
| | | // needChangePwd 0 : 默认密码需要修改,1 不需要 |
| | | if (this.userInfo && (!this.userInfo.needChangePwd || this.userInfo.needChangePwd == '0')) { |
| | | this.visible.changePwd = true |
| | |
| | | }, |
| | | filters: { |
| | | // 展示名称 |
| | | displayName(userInfo) { |
| | | displayName (userInfo) { |
| | | if (userInfo == null) { |
| | | return '' |
| | | } |
| | |
| | | methods: { |
| | | ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo']), |
| | | // 修改密码 |
| | | changePwd() { |
| | | changePwd () { |
| | | this.visible.changePwd = true |
| | | this.$nextTick(() => { |
| | | this.$refs.changePwdDataForm.resetFields() |
| | | }) |
| | | }, |
| | | validatePassword(rule, value, callback) { |
| | | validatePassword (rule, value, callback) { |
| | | if (!value) { |
| | | callback(new Error('请输入密码')) |
| | | } else { |
| | |
| | | } |
| | | } |
| | | }, |
| | | getHeaderNav(type) { |
| | | getHeaderNav (item) { |
| | | if (item.url && item.url === 'goHKAF' && item.params != null) { |
| | | this.getHKAFHeaderNav(item.params) |
| | | } else if (item.url && item.url.indexOf('http') === 0) { |
| | | window.open(item.url, '_blank') |
| | | } |
| | | }, |
| | | getHKAFHeaderNav (type) { |
| | | getAppHeaderNav(type).then(res => { |
| | | window.open(res, "_blank") |
| | | window.open(res, '_blank') |
| | | }) |
| | | }, |
| | | handleTest() { |
| | | handleTest () { |
| | | const myWindow = window.open('https://10.50.250.253/portal/ui/index?componentId=dfe&componentMenuId=process_apply') |
| | | setTimeout(() => { |
| | | const params = { |
| | | componentId: 'dfe', |
| | | componentMenuId: 'process_apply', |
| | | callback: { |
| | | method: 'dealTlncMsg', argument: { |
| | | "msgId": "98c256b9-aaff-11ef-8347-fa163ee2c57c", |
| | | "moduleId": "dfeFlowTodoModuleId", |
| | | "msgTitle": "请及时处理13856591439发起的请假申请", |
| | | "msgStatus": "0", |
| | | "msgCreateTime": "今天 15:33", |
| | | "msgCreateTimeIso": "2024-11-25T15:33:42.000+08:00", |
| | | "serverTime": 1732531014591, |
| | | "menuCode": "process_apply", |
| | | "msgStatusStr": "待处理", |
| | | "comId": "dfe", |
| | | "userId": "13856591439", |
| | | "extendNoShow": "{\"processInstanceId\":\"98a57fe0-aaff-11ef-8347-fa163ee2c57c\",\"processId\":\"process_dabcfdd39f1b6f46d36a9f4ff6ce1080\",\"param\":{\"sourceType\":\"todo\",\"modelCode\":\"tb_leave_dfe_for_dfe_runtime\",\"processNodeId\":\"UserTask_dde7d83377343a2d5fa1f60c23b023ef\",\"taskId\":\"98c256b9-aaff-11ef-8347-fa163ee2c57c\"},\"process.param.appId\":\"32ca8770-6f85-11ec-b5a3-991864da52a6\",\"appId\":\"32ca8770-6f85-11ec-b5a3-991864da52a6\",\"name\":\"请假申请\",\"taskId\":\"98c256b9-aaff-11ef-8347-fa163ee2c57c\",\"taskNodeId\":\"UserTask_dde7d83377343a2d5fa1f60c23b023ef\",\"url\":\"/dfe-form/process/tlnc/apply\"}", |
| | | "targetComId": "dfe", |
| | | "moduleName": "流程待办", |
| | | "tid": "99cad778-aaff-11ef-9dbf-ff08ba71965c", |
| | | "msgEndTime": null, |
| | | "msgEndTimeIso": "", |
| | | "picUrl": "", |
| | | "extendJson": "{\"key1\":\"请及时处理陈鸿飞发起的请假申请\"}", |
| | | "extendParam": null, |
| | | "extendCascade": null, |
| | | "createUser": "13856591439", |
| | | "webCascadeUrl": null, |
| | | "h5CascadeUrl": null, |
| | | "cascadeTodoOpenType": null, |
| | | "cascadeSourceConfigId": null, |
| | | "h5Url": "/h5/pages/form-page/form-page?returnPath=-1&appId=32ca8770-6f85-11ec-b5a3-991864da52a6&taskId=98c256b9-aaff-11ef-8347-fa163ee2c57c&processNodeId=UserTask_dde7d83377343a2d5fa1f60c23b023ef&modelCode=tb_leave_dfe_for_dfe_runtime&type=flowHandle&component=form-apply&_sn=true", |
| | | "segmentId": "dfe-form", |
| | | "lastUsers": "陈鸿飞", |
| | | "currentUsers": "陈鸿飞", |
| | | "todoTypeCode": "dfe@@tlnc_placeholder_tlnc@@dfeFlowTodoModuleId", |
| | | "currentUserIds": "13856591439", |
| | | "lastUserIds": "13856591439", |
| | | "msgDesc": null, |
| | | "widgetUrl": null, |
| | | "detailType": null, |
| | | "widgetWidth": null, |
| | | "widgetHeight": null, |
| | | "userIdList": null, |
| | | "statusName": null, |
| | | "arriveTime": null, |
| | | "stayTime": null, |
| | | "todoType": null, |
| | | "cascadePort": null, |
| | | "openMode": null |
| | | method: 'dealTlncMsg', |
| | | argument: { |
| | | msgId: '98c256b9-aaff-11ef-8347-fa163ee2c57c', |
| | | moduleId: 'dfeFlowTodoModuleId', |
| | | msgTitle: '请及时处理13856591439发起的请假申请', |
| | | msgStatus: '0', |
| | | msgCreateTime: '今天 15:33', |
| | | msgCreateTimeIso: '2024-11-25T15:33:42.000+08:00', |
| | | serverTime: 1732531014591, |
| | | menuCode: 'process_apply', |
| | | msgStatusStr: '待处理', |
| | | comId: 'dfe', |
| | | userId: '13856591439', |
| | | extendNoShow: '{"processInstanceId":"98a57fe0-aaff-11ef-8347-fa163ee2c57c","processId":"process_dabcfdd39f1b6f46d36a9f4ff6ce1080","param":{"sourceType":"todo","modelCode":"tb_leave_dfe_for_dfe_runtime","processNodeId":"UserTask_dde7d83377343a2d5fa1f60c23b023ef","taskId":"98c256b9-aaff-11ef-8347-fa163ee2c57c"},"process.param.appId":"32ca8770-6f85-11ec-b5a3-991864da52a6","appId":"32ca8770-6f85-11ec-b5a3-991864da52a6","name":"请假申请","taskId":"98c256b9-aaff-11ef-8347-fa163ee2c57c","taskNodeId":"UserTask_dde7d83377343a2d5fa1f60c23b023ef","url":"/dfe-form/process/tlnc/apply"}', |
| | | targetComId: 'dfe', |
| | | moduleName: '流程待办', |
| | | tid: '99cad778-aaff-11ef-9dbf-ff08ba71965c', |
| | | msgEndTime: null, |
| | | msgEndTimeIso: '', |
| | | picUrl: '', |
| | | extendJson: '{"key1":"请及时处理陈鸿飞发起的请假申请"}', |
| | | extendParam: null, |
| | | extendCascade: null, |
| | | createUser: '13856591439', |
| | | webCascadeUrl: null, |
| | | h5CascadeUrl: null, |
| | | cascadeTodoOpenType: null, |
| | | cascadeSourceConfigId: null, |
| | | h5Url: '/h5/pages/form-page/form-page?returnPath=-1&appId=32ca8770-6f85-11ec-b5a3-991864da52a6&taskId=98c256b9-aaff-11ef-8347-fa163ee2c57c&processNodeId=UserTask_dde7d83377343a2d5fa1f60c23b023ef&modelCode=tb_leave_dfe_for_dfe_runtime&type=flowHandle&component=form-apply&_sn=true', |
| | | segmentId: 'dfe-form', |
| | | lastUsers: '陈鸿飞', |
| | | currentUsers: '陈鸿飞', |
| | | todoTypeCode: 'dfe@@tlnc_placeholder_tlnc@@dfeFlowTodoModuleId', |
| | | currentUserIds: '13856591439', |
| | | lastUserIds: '13856591439', |
| | | msgDesc: null, |
| | | widgetUrl: null, |
| | | detailType: null, |
| | | widgetWidth: null, |
| | | widgetHeight: null, |
| | | userIdList: null, |
| | | statusName: null, |
| | | arriveTime: null, |
| | | stayTime: null, |
| | | todoType: null, |
| | | cascadePort: null, |
| | | openMode: null |
| | | } |
| | | }, |
| | | msgType: 'tlnc' |
| | | } |
| | | let argus = JSON.stringify(params) |
| | | const argus = JSON.stringify(params) |
| | | myWindow.postMessage('{"method":"goToApp","argument":' + argus + '}', '*') |
| | | }, 8000) |
| | | }, |
| | | // 确定修改密码 |
| | | confirmChangePwd() { |
| | | confirmChangePwd () { |
| | | if (this.isWorking.changePwd) { |
| | | return |
| | | } |
| | |
| | | }) |
| | | }, |
| | | // 退出登录 |
| | | logout() { |
| | | logout () { |
| | | logout() |
| | | .then(() => { |
| | | this.clearUserInfo() |
| | |
| | | const height = window.innerHeight |
| | | // console.log('main_app========================:'+height) |
| | | const height13 = this.getEleHeghtByClassName('common-header',0) |
| | | const height5 = document.getElementsByTagName('thead') && document.getElementsByTagName('thead')[0] ? document.getElementsByTagName('thead')[0].clientHeight : 0 |
| | | const height5 = document.getElementsByTagName( 'thead') && document.getElementsByTagName('thead')[0] ? document.getElementsByTagName('thead')[0].clientHeight : 0 |
| | | if (document.getElementsByClassName('main_app') && document.getElementsByClassName('main_app')[0]) { |
| | | // console.log('main_app========================') |
| | | // alert(height) |
| | |
| | | > |
| | | <p class="tip" v-if="form.parent != null && form.id == null">为 <em>{{parentName}}</em> 新建子菜单</p> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="上级菜单" prop="parentId"> |
| | | <el-form-item label="上级菜单" prop="parentId" v-if="form.type !== 1"> |
| | | <MenuSelect v-if="visible" v-model="form.parentId" placeholder="请选择上级菜单" :exclude-id="excludeMenuId" clearable :inline="false"/> |
| | | </el-form-item> |
| | | <el-form-item label="菜单名称" prop="name" required> |
| | |
| | | <el-form-item label="携带参数" prop="params"> |
| | | <el-input v-model="form.params" placeholder="请输入携带参数" v-trim maxlength="200"/> |
| | | </el-form-item> |
| | | <el-form-item label="图标" prop="icon" class="form-item-icon"> |
| | | <el-form-item label="图标" prop="icon" class="form-item-icon" v-if="form.type !== 1"> |
| | | <el-radio-group v-model="form.icon"> |
| | | <el-radio :label="icon" v-for="icon in icons" :key="icon"> |
| | | <i :class="{[icon]: true}"></i> |
| | |
| | | id: null, |
| | | parentId: null, |
| | | name: '', |
| | | params:'', |
| | | params: '', |
| | | path: '', |
| | | icon: '', |
| | | type: '', |
| | | remark: '' |
| | | }, |
| | | // 验证规则 |
| | |
| | | * @target: 编辑的菜单对象 |
| | | * @parent: 新建时的上级菜单 |
| | | */ |
| | | open (title, target, parent) { |
| | | open (title, target, parent,type) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.form.type = type || 0 |
| | | // 新建,menu为空时表示新建菜单 |
| | | if (target == null) { |
| | | this.excludeMenuId = null |
| | |
| | | this.form.id = null |
| | | this.form.parentId = parent == null ? null : parent.id |
| | | this.parentName = parent == null ? null : parent.name |
| | | // this.form.type = parent == null ? 0 : parent.type |
| | | }) |
| | | return |
| | | } |
| | |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | this.form.type = this.form.type || 0 |
| | | }) |
| | | } |
| | | }, |
| | |
| | | this.$store.commit('resetMenus') |
| | | // 获取菜单 |
| | | const storeMenus = this.$store.state.menuData.list |
| | | const storeTopMenus = this.$store.state.topMenuList.list |
| | | if (storeMenus.length > 0 && this.homePage == null) { |
| | | this.setHomePage(storeMenus[0]) |
| | | } |
| | | await fetchMenuTree() |
| | | .then(menus => { |
| | | .then(allmenus => { |
| | | // 添加菜单 |
| | | var menus = allmenus.filter(item => { |
| | | return item.type !== 1 |
| | | }) |
| | | var topList = allmenus.filter(item => { |
| | | return item.type === 1 |
| | | }) |
| | | console.log(topList) |
| | | storeMenus.push.apply(storeMenus, menus) |
| | | storeTopMenus.push.apply(storeTopMenus, topList) |
| | | // 添加路由 |
| | | this.__addRouters(storeMenus) |
| | | // 404 |
| | |
| | | // 是否收起 |
| | | collapse: false |
| | | }, |
| | | topMenuList: { |
| | | // 菜单列表 |
| | | list: [], |
| | | // 是否收起 |
| | | collapse: false |
| | | }, |
| | | // tags数组 |
| | | tags: [], |
| | | // tagsview标签显示隐藏 |
| | |
| | | <template> |
| | | <TableLayout class="menu-layout" :permissions="['system:menu:query']"> |
| | | <el-form ref="searchForm" slot="search-form" label-width="100px" inline> |
| | | <div class="platgroup_tabs"> |
| | | <div class="tab" :class="{ active: activeGroup === item.id }" @click="groupClick(item)" |
| | | v-for="(item, i) in groupList" :key="i"> |
| | | {{ item.name }} |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['system:menu:create', 'system:menu:delete', 'system:menu:sort']"> |
| | | <li><el-button type="primary" @click="$refs.operaMenuWindow.open('新建一级菜单')" icon="el-icon-plus" v-permissions="['system:menu:create']">新建</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaMenuWindow.open(activeGroup==0?'新建一级菜单':'新建顶部导航菜单',null,null,activeGroup)" icon="el-icon-plus" v-permissions="['system:menu:create']">新建</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['system:menu:delete']">删除</el-button></li> |
| | | <li><el-button @click="sort('top')" :loading="isWorking.sort" icon="el-icon-sort-up" v-permissions="['system:menu:sort']">上移</el-button></li> |
| | | <li><el-button @click="sort('bottom')" :loading="isWorking.sort" icon="el-icon-sort-down" v-permissions="['system:menu:sort']">下移</el-button></li> |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" fixed="left"></el-table-column> |
| | | <el-table-column prop="name" label="菜单名称" fixed="left" min-width="160px"></el-table-column> |
| | | <el-table-column prop="icon" label="图标" min-width="80px" class-name="table-column-icon"> |
| | | <el-table-column prop="name" label="菜单名称" fixed="left" min-width="160px" show-tooltip-when-overflow></el-table-column> |
| | | <el-table-column prop="icon" v-if="activeGroup !== 1" label="图标" min-width="80px" class-name="table-column-icon"> |
| | | <template slot-scope="{row}"> |
| | | <i v-if="row.icon != null && row.icon !== ''" :class="{[row.icon]: true}"></i> |
| | | <template v-else>未设置</template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="path" label="访问路径" min-width="140px"></el-table-column> |
| | | <el-table-column prop="path" label="访问路径" show-tooltip-when-overflow min-width="220px"></el-table-column> |
| | | <el-table-column prop="params" label="参数" min-width="120px"></el-table-column> |
| | | <el-table-column prop="remark" label="备注" min-width="120px"></el-table-column> |
| | | <el-table-column prop="createUser" label="创建人" min-width="100px"> |
| | |
| | | <template slot-scope="{row}">{{row.updateUserInfo == null ? '' : row.updateUserInfo.username}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="updateTime" label="更新时间" min-width="140px"></el-table-column> |
| | | <el-table-column prop="disabled" label="是否启用" min-width="80px"> |
| | | <el-table-column prop="disabled" label="是否启用" min-width="80px" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch v-model="row.disabled" :active-value="false" :inactive-value="true" @change="switchDisabled(row)"/> |
| | | </template> |
| | |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" @click="$refs.operaMenuWindow.open('编辑菜单', row)" v-permissions="['system:menu:update']">编辑</el-button> |
| | | <el-button type="text" icon="el-icon-plus" @click="$refs.operaMenuWindow.open('新建子菜单', null, row)" v-permissions="['system:menu:create']">新建子菜单</el-button> |
| | | <el-button type="text" icon="el-icon-edit" @click="$refs.operaMenuWindow.open('编辑菜单', row,null,activeGroup)" v-permissions="['system:menu:update']">编辑</el-button> |
| | | <el-button v-if="activeGroup !== 1" type="text" icon="el-icon-plus" @click="$refs.operaMenuWindow.open('新建子菜单', null, row,activeGroup)" v-permissions="['system:menu:create']">新建子菜单</el-button> |
| | | <el-button v-if="!row.fixed" type="text" icon="el-icon-delete" @click="deleteById(row)" v-permissions="['system:menu:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | data () { |
| | | return { |
| | | // 是否正在处理中 |
| | | activeGroup: 0, |
| | | groupList:[{id:0,name: "服务中心菜单"},{id:1,name: "顶部导航配置"}], |
| | | isWorking: { |
| | | sort: false |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | groupClick(item){ |
| | | this.activeGroup = item.id |
| | | this.handlePageChange(); |
| | | }, |
| | | // 查询数据 |
| | | handlePageChange () { |
| | | this.isWorking.search = true |
| | | fetchTree() |
| | | fetchTree({type: this.activeGroup}) |
| | | .then(records => { |
| | | this.tableData.list = records |
| | | }) |
| | |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/assets/style/variables.scss"; |
| | | .platgroup_tabs { |
| | | flex: 1; |
| | | display: flex; |
| | | border-bottom: 1px solid #dfe2e8; |
| | | |
| | | .tab { |
| | | color: #666666; |
| | | margin-right: 40px; |
| | | cursor: pointer; |
| | | padding-bottom: 18px; |
| | | border-bottom: 2px solid #fff; |
| | | } |
| | | |
| | | .active { |
| | | font-weight: 500; |
| | | font-size: 15px; |
| | | color: #222222; |
| | | border-bottom: 2px solid $primary-color; |
| | | } |
| | | } |
| | | .menu-layout { |
| | | /deep/ .table-content { |
| | | margin-top: 0; |
| | | margin-top: 0px; |
| | | } |
| | | } |
| | | // 图标列 |
| | |
| | | password: nacos |
| | | config: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | # namespace: dev_renkang |
| | | username: nacos |
| | | password: nacos |
| | |
| | | password: nacos |
| | | config: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | # namespace: dev_renkang |
| | | username: nacos |
| | | password: nacos |
| | |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | # namespace: dev_renkang |
| | | # namespace: wuhu_visit_dev |
| | | namespace: dmvisit_dev |
| | | username: nacos |
| | | password: nacos |
| | |
| | | spring: |
| | | # 数据源配置 |
| | | datasource: |
| | | # url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | # username: doumee |
| | | # password: rtjgfEr@&0c0m |
| | | url: jdbc:mysql://10.50.250.178:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://10.50.250.178:3306/wuhuyancao?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: Atwl@2024 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | spring: |
| | | # 数据源配置 |
| | | datasource: |
| | | url: jdbc:mysql://192.168.0.211:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://192.168.0.211:3306/wuhuyancao?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: Doumee@168 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | # namespace: dmvisit |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | | gateway: |
| | |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | # namespace: dmvisit |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | | gateway: |
| | |
| | | @ApiOperation("查询列表树") |
| | | @PostMapping("/treeList") |
| | | @CloudRequiredPermission("system:menu:query") |
| | | public ApiResponse<List<SystemMenuListVO>> findTree (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(systemMenuBiz.findTree()); |
| | | public ApiResponse<List<SystemMenuListVO>> findTree (@RequestBody SystemMenu param,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(systemMenuBiz.findTree(param )); |
| | | } |
| | | |
| | | @PreventRepeat |
| | |
| | | return ApiResponse.success(systemMenuBiz.findTree(this.getLoginUser(null).getId())); |
| | | } |
| | | |
| | | @ApiOperation("查询顶部导航树") |
| | | @PostMapping("/topList") |
| | | @RequiresPermissions("system:menu:query") |
| | | public ApiResponse<List<SystemMenu>> findTopList () { |
| | | return ApiResponse.success(systemMenuBiz.findTopList()); |
| | | } |
| | | |
| | | @ApiOperation("查询列表树") |
| | | @PostMapping("/treeList") |
| | | @RequiresPermissions("system:menu:query") |
| | | public ApiResponse<List<SystemMenuListVO>> findTree () { |
| | | return ApiResponse.success(systemMenuBiz.findTree()); |
| | | return ApiResponse.success(systemMenuBiz.findTree(new SystemMenu())); |
| | | } |
| | | |
| | | @PreventRepeat |
| | |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | List<SystemMenuListVO> findTree(); |
| | | List<SystemMenuListVO> findTree(SystemMenu param); |
| | | |
| | | /** |
| | | * 删除 |
| | |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | List<SystemMenu> findTopList(); |
| | | } |
| | |
| | | import com.doumee.biz.system.SystemMenuBiz; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.UpdateSystemMenuSortDTO; |
| | | import com.doumee.dao.system.model.SystemMenu; |
| | | import com.doumee.dao.system.vo.SystemMenuListVO; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<SystemMenuListVO> findTree() { |
| | | List<SystemMenuListVO> menus = systemMenuService.findList(); |
| | | public List<SystemMenu> findTopList() { |
| | | SystemMenu param =new SystemMenu(); |
| | | param.setDeleted(Boolean.FALSE); |
| | | param.setType(Constants.ONE); |
| | | List<SystemMenu> menus = systemMenuService.findList(param); |
| | | return menus; |
| | | } |
| | | @Override |
| | | public List<SystemMenuListVO> findTree(SystemMenu param) { |
| | | List<SystemMenuListVO> menus = systemMenuService.findManageList(param); |
| | | List<SystemMenuListVO> rootMenus = new ArrayList<>(); |
| | | // 添加根菜单 |
| | | for (SystemMenu menu : menus) { |
| | | for (SystemMenuListVO menu : menus) { |
| | | if (menu.getParentId() == null) { |
| | | SystemMenuListVO rootMenu = new SystemMenuListVO(); |
| | | BeanUtils.copyProperties(menu, rootMenu, "children"); |
| | |
| | | nodeVO.setLabel(menu.getName()); |
| | | nodeVO.setUrl(menu.getPath()); |
| | | nodeVO.setParams(menu.getParams()); |
| | | nodeVO.setType(menu.getType()); |
| | | nodeVO.setIcon(menu.getIcon()); |
| | | nodeVO.setChildren(new ArrayList<>()); |
| | | rootNodes.add(nodeVO); |
| | |
| | | } |
| | | List<Integer> handledIds = new ArrayList<>(); |
| | | for (SystemMenu menu : menus) { |
| | | if(!Constants.equalsInteger(menu.getType(),Constants.ZERO)){ |
| | | continue; |
| | | } |
| | | if (parent.getId().equals(menu.getParentId())) { |
| | | SystemMenuListVO child = new SystemMenuListVO(); |
| | | BeanUtils.copyProperties(menu, child, "children"); |
| | |
| | | } |
| | | List<Integer> handledIds = new ArrayList<>(); |
| | | for (SystemMenu menu : menus) { |
| | | if(!Constants.equalsInteger(menu.getType(),Constants.ZERO)){ |
| | | continue; |
| | | } |
| | | if (parent.getId().equals(menu.getParentId())) { |
| | | SystemMenuNodeVO child = new SystemMenuNodeVO(); |
| | | child.setId(menu.getId()); |
| | |
| | | child.setUrl(menu.getPath()); |
| | | child.setParams(menu.getParams()); |
| | | child.setIcon(menu.getIcon()); |
| | | child.setType(menu.getType()); |
| | | child.setIndex("menu_" + menu.getId()); |
| | | child.setChildren(new ArrayList<>()); |
| | | parent.getChildren().add(child); |
| | |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | List<SystemMenuListVO> selectManageList(); |
| | | List<SystemMenuListVO> selectManageList(SystemMenu menu); |
| | | |
| | | /** |
| | | * 根据用户ID查询 |
| | |
| | | @ApiModelProperty(value = "上一级菜单", example = "1") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private Integer parentId; |
| | | @ApiModelProperty(value = "类型 0服务中心菜单 1顶部导航,默认 0", example = "1") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "菜单名称") |
| | | @NotBlank(message = "菜单名称不能为空", groups = {OperaType.Create.class, OperaType.Update.class}) |
| | |
| | | |
| | | @ApiModelProperty(value = "菜单唯一标识(前端专用)") |
| | | private String index; |
| | | @ApiModelProperty(value = "菜单类型 0服务中心 1顶部导航") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "图标") |
| | | private String icon; |
| | |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | List<SystemMenuListVO> findList(); |
| | | List<SystemMenuListVO> findManageList(SystemMenu param); |
| | | |
| | | /** |
| | | * 查询一级菜单列表 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<SystemMenuListVO> findList() { |
| | | return systemMenuMapper.selectManageList(); |
| | | public List<SystemMenuListVO> findManageList(SystemMenu menu) { |
| | | return systemMenuMapper.selectManageList(menu); |
| | | } |
| | | |
| | | @Override |
| | |
| | | <result column="UPDATE_USER_NAME" property="username"/> |
| | | </association> |
| | | </resultMap> |
| | | <select id="selectManageList" resultMap="SystemMenuListVO"> |
| | | <select id="selectManageList" resultMap="SystemMenuListVO" parameterType="com.doumee.dao.system.model.SystemMenu"> |
| | | SELECT |
| | | menu.`ID`, menu.`PARENT_ID`,menu.params, menu.`NAME`, menu.`PATH`, menu.`FIXED`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED`, |
| | | menu.`ID`, menu.`type`, menu.`PARENT_ID`,menu.params, menu.`NAME`, menu.`PATH`, menu.`FIXED`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED`, |
| | | create_user.ID CREATE_USER_ID, create_user.`USERNAME` CREATE_USER_NAME, |
| | | update_user.ID UPDETE_USER_ID, update_user.`USERNAME` UPDATE_USER_NAME |
| | | FROM SYSTEM_MENU menu |
| | |
| | | LEFT JOIN `SYSTEM_USER` update_user ON update_user.ID = menu.UPDATE_USER |
| | | <where> |
| | | menu.DELETED = 0 |
| | | <if test="type!=null"> and menu.type=#{type}</if> |
| | | </where> |
| | | ORDER BY menu.SORT |
| | | </select> |
| | |
| | | <!-- 查询菜单树 --> |
| | | <select id="selectByUserId" parameterType="java.lang.Integer" resultType="com.doumee.dao.system.model.SystemMenu"> |
| | | SELECT |
| | | DISTINCT menu.`ID`, menu.`PARENT_ID`,menu.params, menu.`NAME`, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | DISTINCT menu.`ID`, menu.`type`,menu.`PARENT_ID`,menu.params, menu.`NAME`, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | FROM `SYSTEM_MENU` menu |
| | | INNER JOIN SYSTEM_ROLE_MENU role_menu ON role_menu.MENU_ID = menu.ID AND role_menu.DELETED = 0 |
| | | INNER JOIN SYSTEM_USER_ROLE user_role ON user_role.ROLE_ID = role_menu.ROLE_ID AND user_role.DELETED = 0 |
| | |
| | | <!-- 根据角色ID查询菜单列表 --> |
| | | <select id="selectByRoleId" parameterType="java.lang.Integer" resultType="com.doumee.dao.system.model.SystemMenu"> |
| | | SELECT |
| | | menu.`ID`, menu.`PARENT_ID`, menu.`NAME`,menu.params, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | menu.`ID`, menu.`type`,menu.`PARENT_ID`, menu.`NAME`,menu.params, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | FROM `SYSTEM_MENU` menu |
| | | INNER JOIN `SYSTEM_ROLE_MENU` role_menu ON role_menu.MENU_ID = menu.ID AND role_menu.DELETED = 0 |
| | | <where> |
| | |
| | | spring: |
| | | # 数据源配置 |
| | | datasource: |
| | | url: jdbc:mysql://112.26.66.25:3306/antaiwuliu?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://112.26.66.25:3306/wuhuyancao?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: Doumee@168&QWERT |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | # namespace: dmvisit |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | | knife4j: |
| | |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | # namespace: dmvisit |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | | knife4j: |
| | |
| | | spring: |
| | | # 数据源配置 |
| | | datasource: |
| | | url: jdbc:mysql://192.168.0.211:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://192.168.0.211:3306/wuhuyancao?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: Doumee@168 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |