diff --git a/ant-design-vue-jeecg/src/components/tools/UserMenu.vue b/ant-design-vue-jeecg/src/components/tools/UserMenu.vue index 2c8eb4a..0c60d06 100644 --- a/ant-design-vue-jeecg/src/components/tools/UserMenu.vue +++ b/ant-design-vue-jeecg/src/components/tools/UserMenu.vue @@ -6,8 +6,15 @@ <a-icon type="search"></a-icon> </span> <!-- update-begin author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 --> - <component :is="searchMenuComp" v-show="searchMenuVisible || isMobile()" class="borders" - :visible="searchMenuVisible" title="搜索菜单" :footer="null" @cancel="searchMenuVisible=false"> + <component + :is="searchMenuComp" + v-show="searchMenuVisible || isMobile()" + class="borders" + :visible="searchMenuVisible" + title="搜索菜单" + :footer="null" + @cancel="searchMenuVisible = false" + > <a-select class="search-input" showSearch @@ -15,13 +22,14 @@ placeholder="搜索菜单" optionFilterProp="children" :filterOption="filterOption" - :open="isMobile()?true:null" - :getPopupContainer="(node) => node.parentNode" - :style="isMobile()?{width: '100%',marginBottom:'50px'}:{}" + :open="isMobile() ? true : null" + :getPopupContainer="node => node.parentNode" + :style="isMobile() ? { width: '100%', marginBottom: '50px' } : {}" @change="searchMethods" @blur="hiddenClick" > - <a-select-option v-for="(site,index) in searchMenuOptions" :key="index" :value="site.id">{{ site.meta.title }} + <a-select-option v-for="(site, index) in searchMenuOptions" :key="index" :value="site.id" + >{{ site.meta.title }} </a-select-option> </a-select> </component> @@ -33,10 +41,10 @@ <!-- <a-icon type="question-circle-o"></a-icon>--> <!-- </a>--> <!-- </span>--> - <header-notice class="action"/> + <header-notice class="action" /> <a-dropdown> <span class="action action-full ant-dropdown-link user-dropdown-menu"> - <a-avatar class="avatar" size="small" :src="getAvatar()"/> + <a-avatar class="avatar" size="small" :src="getAvatar()" /> <span v-if="isDesktop()" style="padding: 0px 0px 0px 10px;">欢迎您,{{ nickname() }}</span> </span> <a-menu slot="overlay" class="user-dropdown-menu-wrapper"> @@ -53,11 +61,11 @@ </router-link> </a-menu-item> --> <a-menu-item key="3" @click="systemSetting"> - <a-icon type="tool"/> + <a-icon type="tool" /> <span>系统设置</span> </a-menu-item> <a-menu-item key="4" @click="updatePassword"> - <a-icon type="setting"/> + <a-icon type="setting" /> <span>密码修改</span> </a-menu-item> <!-- <a-menu-item key="5" @click="updateCurrentDepart"> @@ -65,9 +73,16 @@ <span>切换部门</span> </a-menu-item> --> <a-menu-item key="6" @click="clearCache"> - <a-icon type="sync"/> + <a-icon type="sync" /> <span>清理缓存</span> </a-menu-item> + <a-menu-item key="7" @click="downWord"> + <a-icon type="download" /> + <span>操作说明书下载</span> + </a-menu-item> + + <!-- <a @click="downWord" style="height:59;line-height:59px;color: #d71345" v-if="manual === 'desktop'"> WMS操作手册</a> --> + <!-- <a-menu-item key="2" disabled> <a-icon type="setting"/> <span>测试</span> @@ -83,7 +98,7 @@ </a-dropdown> <span class="action"> <a class="logout_title" href="javascript:;" @click="handleLogout"> - <a-icon type="logout"/> + <a-icon type="logout" /> <span v-if="isDesktop()"> 退出登录</span> </a> </span> @@ -96,16 +111,17 @@ <script> import HeaderNotice from './HeaderNotice' import UserPassword from './UserPassword' -import SettingDrawer from "@/components/setting/SettingDrawer"; +import SettingDrawer from '@/components/setting/SettingDrawer' import DepartSelect from './DepartSelect' -import {mapActions, mapGetters, mapState} from 'vuex' -import {mixinDevice} from '@/utils/mixin.js' -import {getFileAccessHttpUrl, getAction} from "@/api/manage" +import { downLoad } from '@/api/api' +import { mapActions, mapGetters, mapState } from 'vuex' +import { mixinDevice } from '@/utils/mixin.js' +import { getFileAccessHttpUrl, getAction, downFile } from '@/api/manage' import Vue from 'vue' -import {UI_CACHE_DB_DICT_DATA} from "@/store/mutation-types" +import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types' export default { - name: "UserMenu", + name: 'UserMenu', mixins: [mixinDevice], data() { return { @@ -114,6 +130,9 @@ export default { searchMenuComp: 'span', searchMenuVisible: false, // update-begin author:sunjianlei date:20200219 for: 头部菜单搜索规范命名 -------------- + url: { + downLoad: '/sys/common/downLoad' + } } }, components: { @@ -148,7 +167,6 @@ export default { ...mapState({ // 后台菜单 permissionMenuList: state => state.user.permissionList - }) }, /* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ @@ -159,8 +177,8 @@ export default { handler() { this.searchMenuVisible = false this.searchMenuComp = this.isMobile() ? 'a-modal' : 'span' - }, - }, + } + } // update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 }, methods: { @@ -171,9 +189,33 @@ export default { hiddenClick() { this.shows = false }, + downWord() { + var fileName = '华恒WMS4操作说明书.doc' + return downFile(this.url.downLoad, fileName).then(data => { + debugger + this.$message.info('华恒WMS4操作说明书开始下载....') + if (!data || data.size === 0) { + this.$message.error('文件下载失败') + return + } + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([data]), fileName) + } else { + let url = window.URL.createObjectURL(new Blob([data])) + let link = document.createElement('a') + link.style.display = 'none' + link.href = url + link.setAttribute('download', fileName) + document.body.appendChild(link) + link.click() + document.body.removeChild(link) //下载完成移除元素 + window.URL.revokeObjectURL(url) //释放掉blob对象 + } + }) + }, /* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ - ...mapActions(["Logout"]), - ...mapGetters(["nickname", "avatar", "userInfo"]), + ...mapActions(['Logout']), + ...mapGetters(['nickname', 'avatar', 'userInfo']), getAvatar() { return getFileAccessHttpUrl(this.avatar()) }, @@ -184,21 +226,23 @@ export default { title: '提示', content: '真的要注销登录吗 ?', onOk() { - return that.Logout({}).then(() => { - // update-begin author:scott date:20211223 for:【JTC-198】退出登录体验不好 - //that.$router.push({ path: '/user/login' }); - window.location.reload() - // update-end author:scott date:20211223 for:【JTC-198】退出登录体验不好 - }).catch(err => { - that.$message.error({ - title: '错误', - description: err.message + return that + .Logout({}) + .then(() => { + // update-begin author:scott date:20211223 for:【JTC-198】退出登录体验不好 + //that.$router.push({ path: '/user/login' }); + window.location.reload() + // update-end author:scott date:20211223 for:【JTC-198】退出登录体验不好 + }) + .catch(err => { + that.$message.error({ + title: '错误', + description: err.message + }) }) - }) - }, - onCancel() { }, - }); + onCancel() {} + }) }, updatePassword() { let username = this.userInfo().username @@ -213,7 +257,7 @@ export default { /* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ searchMenus(arr, menus) { for (let i of menus) { - if (!i.hidden && "layouts/RouteView" !== i.component) { + if (!i.hidden && 'layouts/RouteView' !== i.component) { arr.push(i) } if (i.children && i.children.length > 0) { @@ -231,7 +275,7 @@ export default { if (route.component.includes('layouts/IframePageView')) { this.$router.push(route) } else { - this.$router.push({path: route.path}) + this.$router.push({ path: route.path }) } //update-end-author:sunjianlei date:20220111 for: 【JTC-702】【菜单搜索】菜单搜索里点击跳转的菜单,无法将Token信息传递过去 this.searchMenuVisible = false @@ -240,21 +284,23 @@ export default { /*update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ /*update_begin author:liushaoqian date:20200507 for: 刷新缓存*/ clearCache() { - getAction("sys/dict/refleshCache").then((res) => { - if (res.success) { - //重新加载缓存 - getAction("sys/dict/queryAllDictItems").then((res) => { - if (res.success) { - Vue.ls.remove(UI_CACHE_DB_DICT_DATA) - Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000) - } - }) - this.$message.success("刷新缓存完成!"); - } - }).catch(e => { - this.$message.warn("刷新缓存失败!"); - console.log("刷新失败", e) - }) + getAction('sys/dict/refleshCache') + .then(res => { + if (res.success) { + //重新加载缓存 + getAction('sys/dict/queryAllDictItems').then(res => { + if (res.success) { + Vue.ls.remove(UI_CACHE_DB_DICT_DATA) + Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000) + } + }) + this.$message.success('刷新缓存完成!') + } + }) + .catch(e => { + this.$message.warn('刷新缓存失败!') + console.log('刷新失败', e) + }) } /*update_end author:liushaoqian date:20200507 for: 刷新缓存*/ } @@ -273,7 +319,8 @@ export default { border: 0; border-bottom: 1px solid white; - &__placeholder, &__field__placeholder { + &__placeholder, + &__field__placeholder { color: inherit; } } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java index 9c04828..5d9f4af 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java @@ -70,8 +70,8 @@ public class SysDepartRoleController extends JeecgController<SysDepartRole, ISys HttpServletRequest req) { QueryWrapper<SysDepartRole> queryWrapper = QueryGenerator.initQueryWrapper(sysDepartRole, req.getParameterMap()); Page<SysDepartRole> page = new Page<SysDepartRole>(pageNo, pageSize); - LoginUser user = (LoginUser)SecurityUtils.getSubject().getPrincipal(); - List<String> deptIds = null; +// LoginUser user = (LoginUser)SecurityUtils.getSubject().getPrincipal(); +// List<String> deptIds = null; // if(oConvertUtils.isEmpty(deptId)){ // if(oConvertUtils.isNotEmpty(user.getUserIdentity()) && user.getUserIdentity().equals(CommonConstant.USER_IDENTITY_2) ){ // deptIds = sysDepartService.getMySubDepIdsByDepId(user.getDepartIds()); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java b/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java index 2ef1aa8..7a33be5 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java @@ -530,7 +530,7 @@ public class QuantityConstant { public static final String RULE_DOCUMEMT_AUDIT_FLOW = "documentAduitFlow"; public static final String EMPTY_ROADWAY_DEFAULT = "emptyRoadWayDefault"; public static final String RULE_CANCEL_TASK = "cancelTask"; - public static final String RULE_DOWN_ADDRESS = "downAdress"; + public static final String RULE_DOWN_ADDRESS = "downAddress"; public static final String TV_VERSION = "Tv-Ver"; public static final String RULE_SHIPMENT_ZONE = "shipmentZoneRule"; public static final String SHIPMENT_WHOLE_TASK_CLEAR_INVENTORY = "shipmentWholeTaskClearInventory";