Commit 03fe24a419b140129a4d7817bfde5dc1eae6937b

Authored by 肖超群
2 parents 23c70a79 07289f55

Merge branch 'develop' of http://172.16.29.40:8010/wms/wms4 into develop

ant-design-vue-jeecg/src/components/tools/UserMenu.vue
... ... @@ -6,8 +6,15 @@
6 6 <a-icon type="search"></a-icon>
7 7 </span>
8 8 <!-- update-begin author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
9   - <component :is="searchMenuComp" v-show="searchMenuVisible || isMobile()" class="borders"
10   - :visible="searchMenuVisible" title="搜索菜单" :footer="null" @cancel="searchMenuVisible=false">
  9 + <component
  10 + :is="searchMenuComp"
  11 + v-show="searchMenuVisible || isMobile()"
  12 + class="borders"
  13 + :visible="searchMenuVisible"
  14 + title="搜索菜单"
  15 + :footer="null"
  16 + @cancel="searchMenuVisible = false"
  17 + >
11 18 <a-select
12 19 class="search-input"
13 20 showSearch
... ... @@ -15,13 +22,14 @@
15 22 placeholder="搜索菜单"
16 23 optionFilterProp="children"
17 24 :filterOption="filterOption"
18   - :open="isMobile()?true:null"
19   - :getPopupContainer="(node) => node.parentNode"
20   - :style="isMobile()?{width: '100%',marginBottom:'50px'}:{}"
  25 + :open="isMobile() ? true : null"
  26 + :getPopupContainer="node => node.parentNode"
  27 + :style="isMobile() ? { width: '100%', marginBottom: '50px' } : {}"
21 28 @change="searchMethods"
22 29 @blur="hiddenClick"
23 30 >
24   - <a-select-option v-for="(site,index) in searchMenuOptions" :key="index" :value="site.id">{{ site.meta.title }}
  31 + <a-select-option v-for="(site, index) in searchMenuOptions" :key="index" :value="site.id"
  32 + >{{ site.meta.title }}
25 33 </a-select-option>
26 34 </a-select>
27 35 </component>
... ... @@ -33,10 +41,10 @@
33 41 <!-- <a-icon type="question-circle-o"></a-icon>-->
34 42 <!-- </a>-->
35 43 <!-- </span>-->
36   - <header-notice class="action"/>
  44 + <header-notice class="action" />
37 45 <a-dropdown>
38 46 <span class="action action-full ant-dropdown-link user-dropdown-menu">
39   - <a-avatar class="avatar" size="small" :src="getAvatar()"/>
  47 + <a-avatar class="avatar" size="small" :src="getAvatar()" />
40 48 <span v-if="isDesktop()" style="padding: 0px 0px 0px 10px;">欢迎您,{{ nickname() }}</span>
41 49 </span>
42 50 <a-menu slot="overlay" class="user-dropdown-menu-wrapper">
... ... @@ -53,11 +61,11 @@
53 61 </router-link>
54 62 </a-menu-item> -->
55 63 <a-menu-item key="3" @click="systemSetting">
56   - <a-icon type="tool"/>
  64 + <a-icon type="tool" />
57 65 <span>系统设置</span>
58 66 </a-menu-item>
59 67 <a-menu-item key="4" @click="updatePassword">
60   - <a-icon type="setting"/>
  68 + <a-icon type="setting" />
61 69 <span>密码修改</span>
62 70 </a-menu-item>
63 71 <!-- <a-menu-item key="5" @click="updateCurrentDepart">
... ... @@ -65,9 +73,16 @@
65 73 <span>切换部门</span>
66 74 </a-menu-item> -->
67 75 <a-menu-item key="6" @click="clearCache">
68   - <a-icon type="sync"/>
  76 + <a-icon type="sync" />
69 77 <span>清理缓存</span>
70 78 </a-menu-item>
  79 + <a-menu-item key="7" @click="downWord">
  80 + <a-icon type="download" />
  81 + <span>操作说明书下载</span>
  82 + </a-menu-item>
  83 +
  84 + <!-- <a @click="downWord" style="height:59;line-height:59px;color: #d71345" v-if="manual === 'desktop'"> WMS操作手册</a> -->
  85 +
71 86 <!-- <a-menu-item key="2" disabled>
72 87 <a-icon type="setting"/>
73 88 <span>测试</span>
... ... @@ -83,7 +98,7 @@
83 98 </a-dropdown>
84 99 <span class="action">
85 100 <a class="logout_title" href="javascript:;" @click="handleLogout">
86   - <a-icon type="logout"/>
  101 + <a-icon type="logout" />
87 102 <span v-if="isDesktop()">&nbsp;退出登录</span>
88 103 </a>
89 104 </span>
... ... @@ -96,16 +111,17 @@
96 111 <script>
97 112 import HeaderNotice from './HeaderNotice'
98 113 import UserPassword from './UserPassword'
99   -import SettingDrawer from "@/components/setting/SettingDrawer";
  114 +import SettingDrawer from '@/components/setting/SettingDrawer'
100 115 import DepartSelect from './DepartSelect'
101   -import {mapActions, mapGetters, mapState} from 'vuex'
102   -import {mixinDevice} from '@/utils/mixin.js'
103   -import {getFileAccessHttpUrl, getAction} from "@/api/manage"
  116 +import { downLoad } from '@/api/api'
  117 +import { mapActions, mapGetters, mapState } from 'vuex'
  118 +import { mixinDevice } from '@/utils/mixin.js'
  119 +import { getFileAccessHttpUrl, getAction, downFile } from '@/api/manage'
104 120 import Vue from 'vue'
105   -import {UI_CACHE_DB_DICT_DATA} from "@/store/mutation-types"
  121 +import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
106 122  
107 123 export default {
108   - name: "UserMenu",
  124 + name: 'UserMenu',
109 125 mixins: [mixinDevice],
110 126 data() {
111 127 return {
... ... @@ -114,6 +130,9 @@ export default {
114 130 searchMenuComp: 'span',
115 131 searchMenuVisible: false,
116 132 // update-begin author:sunjianlei date:20200219 for: 头部菜单搜索规范命名 --------------
  133 + url: {
  134 + downLoad: '/sys/common/downLoad'
  135 + }
117 136 }
118 137 },
119 138 components: {
... ... @@ -148,7 +167,6 @@ export default {
148 167 ...mapState({
149 168 // 后台菜单
150 169 permissionMenuList: state => state.user.permissionList
151   -
152 170 })
153 171 },
154 172 /* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
... ... @@ -159,8 +177,8 @@ export default {
159 177 handler() {
160 178 this.searchMenuVisible = false
161 179 this.searchMenuComp = this.isMobile() ? 'a-modal' : 'span'
162   - },
163   - },
  180 + }
  181 + }
164 182 // update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框
165 183 },
166 184 methods: {
... ... @@ -171,9 +189,33 @@ export default {
171 189 hiddenClick() {
172 190 this.shows = false
173 191 },
  192 + downWord() {
  193 + var fileName = '华恒WMS4操作说明书.doc'
  194 + return downFile(this.url.downLoad, fileName).then(data => {
  195 + debugger
  196 + this.$message.info('华恒WMS4操作说明书开始下载....')
  197 + if (!data || data.size === 0) {
  198 + this.$message.error('文件下载失败')
  199 + return
  200 + }
  201 + if (typeof window.navigator.msSaveBlob !== 'undefined') {
  202 + window.navigator.msSaveBlob(new Blob([data]), fileName)
  203 + } else {
  204 + let url = window.URL.createObjectURL(new Blob([data]))
  205 + let link = document.createElement('a')
  206 + link.style.display = 'none'
  207 + link.href = url
  208 + link.setAttribute('download', fileName)
  209 + document.body.appendChild(link)
  210 + link.click()
  211 + document.body.removeChild(link) //下载完成移除元素
  212 + window.URL.revokeObjectURL(url) //释放掉blob对象
  213 + }
  214 + })
  215 + },
174 216 /* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
175   - ...mapActions(["Logout"]),
176   - ...mapGetters(["nickname", "avatar", "userInfo"]),
  217 + ...mapActions(['Logout']),
  218 + ...mapGetters(['nickname', 'avatar', 'userInfo']),
177 219 getAvatar() {
178 220 return getFileAccessHttpUrl(this.avatar())
179 221 },
... ... @@ -184,21 +226,23 @@ export default {
184 226 title: '提示',
185 227 content: '真的要注销登录吗 ?',
186 228 onOk() {
187   - return that.Logout({}).then(() => {
188   - // update-begin author:scott date:20211223 for:【JTC-198】退出登录体验不好
189   - //that.$router.push({ path: '/user/login' });
190   - window.location.reload()
191   - // update-end author:scott date:20211223 for:【JTC-198】退出登录体验不好
192   - }).catch(err => {
193   - that.$message.error({
194   - title: '错误',
195   - description: err.message
  229 + return that
  230 + .Logout({})
  231 + .then(() => {
  232 + // update-begin author:scott date:20211223 for:【JTC-198】退出登录体验不好
  233 + //that.$router.push({ path: '/user/login' });
  234 + window.location.reload()
  235 + // update-end author:scott date:20211223 for:【JTC-198】退出登录体验不好
  236 + })
  237 + .catch(err => {
  238 + that.$message.error({
  239 + title: '错误',
  240 + description: err.message
  241 + })
196 242 })
197   - })
198   - },
199   - onCancel() {
200 243 },
201   - });
  244 + onCancel() {}
  245 + })
202 246 },
203 247 updatePassword() {
204 248 let username = this.userInfo().username
... ... @@ -213,7 +257,7 @@ export default {
213 257 /* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
214 258 searchMenus(arr, menus) {
215 259 for (let i of menus) {
216   - if (!i.hidden && "layouts/RouteView" !== i.component) {
  260 + if (!i.hidden && 'layouts/RouteView' !== i.component) {
217 261 arr.push(i)
218 262 }
219 263 if (i.children && i.children.length > 0) {
... ... @@ -231,7 +275,7 @@ export default {
231 275 if (route.component.includes('layouts/IframePageView')) {
232 276 this.$router.push(route)
233 277 } else {
234   - this.$router.push({path: route.path})
  278 + this.$router.push({ path: route.path })
235 279 }
236 280 //update-end-author:sunjianlei date:20220111 for: 【JTC-702】【菜单搜索】菜单搜索里点击跳转的菜单,无法将Token信息传递过去
237 281 this.searchMenuVisible = false
... ... @@ -240,21 +284,23 @@ export default {
240 284 /*update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
241 285 /*update_begin author:liushaoqian date:20200507 for: 刷新缓存*/
242 286 clearCache() {
243   - getAction("sys/dict/refleshCache").then((res) => {
244   - if (res.success) {
245   - //重新加载缓存
246   - getAction("sys/dict/queryAllDictItems").then((res) => {
247   - if (res.success) {
248   - Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
249   - Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
250   - }
251   - })
252   - this.$message.success("刷新缓存完成!");
253   - }
254   - }).catch(e => {
255   - this.$message.warn("刷新缓存失败!");
256   - console.log("刷新失败", e)
257   - })
  287 + getAction('sys/dict/refleshCache')
  288 + .then(res => {
  289 + if (res.success) {
  290 + //重新加载缓存
  291 + getAction('sys/dict/queryAllDictItems').then(res => {
  292 + if (res.success) {
  293 + Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
  294 + Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
  295 + }
  296 + })
  297 + this.$message.success('刷新缓存完成!')
  298 + }
  299 + })
  300 + .catch(e => {
  301 + this.$message.warn('刷新缓存失败!')
  302 + console.log('刷新失败', e)
  303 + })
258 304 }
259 305 /*update_end author:liushaoqian date:20200507 for: 刷新缓存*/
260 306 }
... ... @@ -273,7 +319,8 @@ export default {
273 319 border: 0;
274 320 border-bottom: 1px solid white;
275 321  
276   - &__placeholder, &__field__placeholder {
  322 + &__placeholder,
  323 + &__field__placeholder {
277 324 color: inherit;
278 325 }
279 326 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java
... ... @@ -70,8 +70,8 @@ public class SysDepartRoleController extends JeecgController&lt;SysDepartRole, ISys
70 70 HttpServletRequest req) {
71 71 QueryWrapper<SysDepartRole> queryWrapper = QueryGenerator.initQueryWrapper(sysDepartRole, req.getParameterMap());
72 72 Page<SysDepartRole> page = new Page<SysDepartRole>(pageNo, pageSize);
73   - LoginUser user = (LoginUser)SecurityUtils.getSubject().getPrincipal();
74   - List<String> deptIds = null;
  73 +// LoginUser user = (LoginUser)SecurityUtils.getSubject().getPrincipal();
  74 +// List<String> deptIds = null;
75 75 // if(oConvertUtils.isEmpty(deptId)){
76 76 // if(oConvertUtils.isNotEmpty(user.getUserIdentity()) && user.getUserIdentity().equals(CommonConstant.USER_IDENTITY_2) ){
77 77 // deptIds = sysDepartService.getMySubDepIdsByDepId(user.getDepartIds());
... ...
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
... ... @@ -530,7 +530,7 @@ public class QuantityConstant {
530 530 public static final String RULE_DOCUMEMT_AUDIT_FLOW = "documentAduitFlow";
531 531 public static final String EMPTY_ROADWAY_DEFAULT = "emptyRoadWayDefault";
532 532 public static final String RULE_CANCEL_TASK = "cancelTask";
533   - public static final String RULE_DOWN_ADDRESS = "downAdress";
  533 + public static final String RULE_DOWN_ADDRESS = "downAddress";
534 534 public static final String TV_VERSION = "Tv-Ver";
535 535 public static final String RULE_SHIPMENT_ZONE = "shipmentZoneRule";
536 536 public static final String SHIPMENT_WHOLE_TASK_CLEAR_INVENTORY = "shipmentWholeTaskClearInventory";
... ...