commit
This commit is contained in:
@@ -308,7 +308,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
|||||||
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
||||||
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
||||||
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
||||||
// throw new BaseException("用户名或者密码不正确");
|
throw new BaseException("用户名或者密码不正确");
|
||||||
}
|
}
|
||||||
user = this.fetchLinks(user, "unit");
|
user = this.fetchLinks(user, "unit");
|
||||||
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
||||||
|
|||||||
@@ -327,11 +327,10 @@ function createLoading(text = '加载中...') {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBaseSubAppPath() {
|
function getBaseSubAppPath(pathname = window.location.pathname) {
|
||||||
const pathname = window.location.pathname;
|
|
||||||
const startIndex = pathname.indexOf('/platform');
|
const startIndex = pathname.indexOf('/platform');
|
||||||
if (startIndex === -1) {
|
if (startIndex === -1) {
|
||||||
throw new Error('Target path not found in URL');
|
return pathname
|
||||||
}
|
}
|
||||||
return pathname.substring(startIndex);
|
return pathname.substring(startIndex);
|
||||||
}
|
}
|
||||||
@@ -341,7 +340,7 @@ function getFullSubAppPath() {
|
|||||||
const search = window.location.search; // 包含 ?appId=...
|
const search = window.location.search; // 包含 ?appId=...
|
||||||
const startIndex = pathname.indexOf('/platform');
|
const startIndex = pathname.indexOf('/platform');
|
||||||
if (startIndex === -1) {
|
if (startIndex === -1) {
|
||||||
throw new Error('Target path not found in URL');
|
return pathname
|
||||||
}
|
}
|
||||||
return pathname.substring(startIndex) + search;
|
return pathname.substring(startIndex) + search;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -309,6 +309,7 @@ layout("/layouts/v4/baseLayout.html"){
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
menuSelect(index, indexPath) {
|
menuSelect(index, indexPath) {
|
||||||
|
debugger
|
||||||
try {
|
try {
|
||||||
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
|
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
|
||||||
window.sessionStorage.setItem("zhgh_sub_app_left_menu_active_index-" + app.id, index)
|
window.sessionStorage.setItem("zhgh_sub_app_left_menu_active_index-" + app.id, index)
|
||||||
@@ -318,6 +319,7 @@ layout("/layouts/v4/baseLayout.html"){
|
|||||||
},
|
},
|
||||||
// 获取菜单
|
// 获取菜单
|
||||||
getMenus(appId) {
|
getMenus(appId) {
|
||||||
|
debugger
|
||||||
if (!appId) return
|
if (!appId) return
|
||||||
this.$axios.post("/platform/sys/user/subAppMenus", {appId}).then((res) => {
|
this.$axios.post("/platform/sys/user/subAppMenus", {appId}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@@ -332,6 +334,7 @@ layout("/layouts/v4/baseLayout.html"){
|
|||||||
|
|
||||||
// 设置应用信息
|
// 设置应用信息
|
||||||
setAppInfo(app) {
|
setAppInfo(app) {
|
||||||
|
debugger
|
||||||
if (app) {
|
if (app) {
|
||||||
// 储存到缓存
|
// 储存到缓存
|
||||||
window.sessionStorage.setItem("zhgh_sub_app", JSON.stringify(app))
|
window.sessionStorage.setItem("zhgh_sub_app", JSON.stringify(app))
|
||||||
@@ -347,6 +350,7 @@ layout("/layouts/v4/baseLayout.html"){
|
|||||||
},
|
},
|
||||||
// 菜单回显
|
// 菜单回显
|
||||||
echoMenus() {
|
echoMenus() {
|
||||||
|
debugger
|
||||||
try {
|
try {
|
||||||
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
|
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
|
||||||
this.activeMenuIndex = window.sessionStorage.getItem("zhgh_sub_app_left_menu_active_index-" + app.id)
|
this.activeMenuIndex = window.sessionStorage.getItem("zhgh_sub_app_left_menu_active_index-" + app.id)
|
||||||
@@ -367,6 +371,7 @@ layout("/layouts/v4/baseLayout.html"){
|
|||||||
|
|
||||||
// 地址选中
|
// 地址选中
|
||||||
hrefSelect() {
|
hrefSelect() {
|
||||||
|
debugger
|
||||||
function findMenuPath(menus, targetHref) {
|
function findMenuPath(menus, targetHref) {
|
||||||
function search(items, path) {
|
function search(items, path) {
|
||||||
for (const item of items) {
|
for (const item of items) {
|
||||||
@@ -385,7 +390,7 @@ layout("/layouts/v4/baseLayout.html"){
|
|||||||
return search(menus, []);
|
return search(menus, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = findMenuPath(this.menus, getBaseSubAppPath())
|
const result = findMenuPath(this.menus, window.location.pathname)
|
||||||
if(result){
|
if(result){
|
||||||
this.activeMenuIndex = result[result.length-1]['id']
|
this.activeMenuIndex = result[result.length-1]['id']
|
||||||
this.openedMenus = result.map(v=>v.id)
|
this.openedMenus = result.map(v=>v.id)
|
||||||
@@ -399,6 +404,7 @@ layout("/layouts/v4/baseLayout.html"){
|
|||||||
|
|
||||||
// 默认选中
|
// 默认选中
|
||||||
defaultSelect() {
|
defaultSelect() {
|
||||||
|
debugger
|
||||||
// 查找第一个有href的子菜单
|
// 查找第一个有href的子菜单
|
||||||
function findFirstChildWithHref(menus) {
|
function findFirstChildWithHref(menus) {
|
||||||
for (const menu of menus) {
|
for (const menu of menus) {
|
||||||
@@ -424,22 +430,33 @@ layout("/layouts/v4/baseLayout.html"){
|
|||||||
}
|
}
|
||||||
|
|
||||||
const result = findFirstChildWithHref(this.menus)
|
const result = findFirstChildWithHref(this.menus)
|
||||||
|
debugger
|
||||||
if (result) {
|
if (result) {
|
||||||
this.activeMenuIndex = result.menu.id
|
this.activeMenuIndex = result.menu.id
|
||||||
this.openedMenus = result.parentIds
|
this.openedMenus = result.parentIds
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.menuSelect(this.activeMenuIndex, this.openedMenus)
|
this.menuSelect(this.activeMenuIndex, this.openedMenus)
|
||||||
// 使用pjax跳转
|
// 使用pjax跳转
|
||||||
commonUtil.pjaxPush(result.menu.href)
|
commonUtil.pjaxPush(getBaseSubAppPath(result.menu.href))
|
||||||
|
|
||||||
|
/*const tempLink = document.createElement('a')
|
||||||
|
tempLink.href = result.menu.href
|
||||||
|
tempLink.setAttribute('data-pjax', '')
|
||||||
|
tempLink.style.display = 'none'
|
||||||
|
document.body.appendChild(tempLink)
|
||||||
|
tempLink.click()
|
||||||
|
document.body.removeChild(tempLink)*/
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
debugger
|
||||||
// 页面加载时获取到正确的菜单
|
// 页面加载时获取到正确的菜单
|
||||||
const pathname = getFullSubAppPath()
|
const pathname = window.location.pathname
|
||||||
if (!pathname.startsWith("/platform/v4/subApp")) {
|
if (!pathname.startsWith("/platform/v4/subApp")) {
|
||||||
this.$axios.post("/platform/sys/user/rootMenuByPath", {pathname}).then((res) => {
|
const path = getFullSubAppPath()
|
||||||
|
this.$axios.post("/platform/sys/user/rootMenuByPath", {pathname: path}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.setAppInfo(res.data)
|
this.setAppInfo(res.data)
|
||||||
this.getMenus(res.data?.id)
|
this.getMenus(res.data?.id)
|
||||||
|
|||||||
@@ -178,7 +178,8 @@ const todo = {
|
|||||||
// 处理任务
|
// 处理任务
|
||||||
onView(task) {
|
onView(task) {
|
||||||
const {taskId, taskKey, instanceId, businessNo, formKey} = task;
|
const {taskId, taskKey, instanceId, businessNo, formKey} = task;
|
||||||
|
this.$toast("暂未开通从当前地址点击查看!");
|
||||||
|
return;
|
||||||
if (!formKey) {
|
if (!formKey) {
|
||||||
this.$toast("当前流程没有配置地址");
|
this.$toast("当前流程没有配置地址");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user