【update】-单点登录的修改;打包详情bug的修改
This commit is contained in:
@@ -4,6 +4,8 @@ import {UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
|
||||
|
||||
// idm 系统单点登录 获取用户信息
|
||||
const loginIdmPlatform = (params) => postAction(`/sys/singleSignOn?code=${params.code}`)
|
||||
// idm 系统单点登录 通过token获取userInfo
|
||||
const getUserInfo = (params) => getAction(`/sys/user/getUserInfoByToken`, params)
|
||||
//角色管理
|
||||
const addRole = (params)=>postAction('/sys/role/add',params)
|
||||
const editRole = (params)=>postAction('/sys/role/edit',params)
|
||||
@@ -195,6 +197,7 @@ export {
|
||||
getKeyIv,
|
||||
getContactsByCompanyNoLimit,
|
||||
loginIdmPlatform,
|
||||
getUserInfo,
|
||||
companyAdminResetPassword,
|
||||
companyAdminEnable,
|
||||
queryCompanyInfoById
|
||||
|
||||
+18
-4
@@ -7,7 +7,7 @@ import 'nprogress/nprogress.css' // progress bar style
|
||||
import { ACCESS_TOKEN, INDEX_MAIN_PAGE_PATH,USER_INFO } from '@/store/mutation-types'
|
||||
import { generateIndexRouter } from '@/utils/util'
|
||||
import { menuPermission } from './utils/hasPermission'
|
||||
import {loginIdmPlatform} from '@api/api'
|
||||
import {loginIdmPlatform, getUserInfo} from '@api/api'
|
||||
import {notification} from 'ant-design-vue'
|
||||
import { filterTreeData, isExternalTerminal } from './utils/util'
|
||||
|
||||
@@ -21,17 +21,31 @@ router.beforeEach(async (to, from, next) => {
|
||||
if (to.query.token) {
|
||||
Vue.ls.set(ACCESS_TOKEN, to.query.token, 7 * 24 * 60 * 60 * 1000)
|
||||
store.commit('SET_TOKEN', to.query.token)
|
||||
// 通过token获取登录的用户信息
|
||||
let userInfoFromUrlResult = await getUserInfo()
|
||||
if(userInfoFromUrlResult.success) {
|
||||
Vue.ls.set(USER_INFO, userInfoFromUrlResult.result , 7 * 24 * 60 * 60 * 1000)
|
||||
store.commit('SET_INFO', userInfoFromUrlResult.result)
|
||||
}
|
||||
// 判断是否是会员系统iframe嵌入的,如果是 不先做左侧菜单和 头部标签
|
||||
if(to.query.system === 'member') {
|
||||
store.commit('SET_SYSTEM', to.query.system)
|
||||
}
|
||||
}
|
||||
// idm系统单点登录
|
||||
if(to.path === '/user/login' && to.query.code){
|
||||
if(to.path === '/user/login' && to.query.code){
|
||||
let result = await loginIdmPlatform({code:to.query.code})
|
||||
if(result.success){
|
||||
Vue.ls.set(USER_INFO, result.result.userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(ACCESS_TOKEN, result.result.token, 7 * 24 * 60 * 60 * 1000)
|
||||
// TODO 判断当前用户是否是领导角色,如果是的话跳转到内网的网址的首页 并用token 登录
|
||||
let userInfo = result.result.userInfo
|
||||
const token = result.result.token
|
||||
// 领导角色需要跳转到内网,
|
||||
if(userInfo.roleCode.includes('bmfzr') || userInfo.roleCode.includes('sld') || userInfo.roleCode.includes('admin')) {
|
||||
window.open(`${window._CONFIG.intranetUrl}dashboard/analysis?token=${token}`, '_self')
|
||||
} else {
|
||||
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(ACCESS_TOKEN, token, 7 * 24 * 60 * 60 * 1000)
|
||||
}
|
||||
}else {
|
||||
notification['error']({
|
||||
message: '登录失败',
|
||||
|
||||
@@ -108,6 +108,13 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text+'') }}</template>
|
||||
<div class="table-text">{{ formatMoney(text+'') }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!-- 打包、需要发票、到账、开票、邮寄状态-->
|
||||
<template slot="status" slot-scope="text,record">
|
||||
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
|
||||
@@ -246,7 +253,8 @@ import ConfirmStageModule from '../financialManagement/arriveAndInvoicing/module
|
||||
import {getPayConfirmList} from '@/api/incomePaymentsApi'
|
||||
import InvoiceInfoChangeModule from './modules/InvoiceInfoChangeModule'
|
||||
import { ProjectTypeEnums } from '../../enums/commonEnums'
|
||||
import { getAction } from "../../api/manage";
|
||||
import { getAction } from '../../api/manage'
|
||||
import { formatMoney } from '../../utils/formatMoney'
|
||||
|
||||
const firstColumnTop = {
|
||||
title: '序号',
|
||||
@@ -275,12 +283,14 @@ const defaultTableColumns = [
|
||||
title: '待确收金额',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'receivableAmount'
|
||||
dataIndex: 'receivableAmount',
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'paidAmount'
|
||||
dataIndex: 'paidAmount',
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '打包',
|
||||
align: 'center',
|
||||
@@ -450,6 +460,7 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
formatMoney,
|
||||
getPayConfirmList,
|
||||
/**
|
||||
* 获取企业信息
|
||||
@@ -709,8 +720,8 @@ export default {
|
||||
let obj = {
|
||||
id: '1',
|
||||
title: '总计',
|
||||
receivableAmount: pageListObj.sumOfPaidAmount || '0.00' + '',
|
||||
paidAmount: pageListObj.sumOfReceivableAmount || '0.00' + ''
|
||||
receivableAmount: pageListObj.sumOfReceivableAmount || '0.00' + '',
|
||||
paidAmount: pageListObj.sumOfPaidAmount || '0.00' + ''
|
||||
}
|
||||
this.footerDataSource = [obj]
|
||||
if (pageListObj.total) {
|
||||
|
||||
Reference in New Issue
Block a user