Compare commits
No commits in common. "ef6e2e395fef00df6222e6a44448db3b9207386f" and "137647ba2e433ac50f0d1554358830433970ce20" have entirely different histories.
ef6e2e395f
...
137647ba2e
|
@ -14,13 +14,6 @@ export const constantRoutes = [
|
||||||
title: '登录',
|
title: '登录',
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/callback',
|
|
||||||
name: 'Callback',
|
|
||||||
component: () => import('@/views/callback/index'),
|
|
||||||
title: '回调',
|
|
||||||
hidden: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/404',
|
path: '/404',
|
||||||
name: '404',
|
name: '404',
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="main-box" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex'
|
|
||||||
import { getOneIdToken } from '@/api/user'
|
|
||||||
export default {
|
|
||||||
name: 'CallBack',
|
|
||||||
computed: {
|
|
||||||
...mapGetters([
|
|
||||||
'name'
|
|
||||||
])
|
|
||||||
},
|
|
||||||
async mounted() {
|
|
||||||
debugger
|
|
||||||
// 获取 URL 参数中的 code
|
|
||||||
// const urlParams = new URLSearchParams(window.location.hash.substring(1))
|
|
||||||
// const code = urlParams.get('code')
|
|
||||||
// alert('callback page')
|
|
||||||
// this.$router.push({ path: '/nav' })
|
|
||||||
const urlParams = new URLSearchParams(window.location.search)
|
|
||||||
const code = urlParams.get('code')
|
|
||||||
// 在这里可以将 code 发送到后端进行处理
|
|
||||||
if (code) {
|
|
||||||
// 发送 code 给后端进行验证和处理
|
|
||||||
const response = await getOneIdToken(code)
|
|
||||||
console.log(response)
|
|
||||||
if (response) {
|
|
||||||
// console.log('response.Token:' + response.Token)
|
|
||||||
// 存token
|
|
||||||
this.$store.dispatch('user/commitToken', response)
|
|
||||||
// 重新加载路由 这里不对
|
|
||||||
// resetRouter() 这个没用,还把你的路由破坏了
|
|
||||||
// console.log(this.$store.state.user, this.$store.state.token)
|
|
||||||
this.$router.push({ path: '/nav' })
|
|
||||||
} else {
|
|
||||||
console.log('No token found with code')
|
|
||||||
// window.location.href = 'https://api.oneid.siemens.com.cn/api/bff/v1.2/developer/ciam/oauth/authorize?client_id=1b867769c8cb221fb7fdb0f8beba6138TwXkI4mX8um&response_type=code&redirect_uri=http://csdc.siemens.com.cn:8001/#/callback&scope=openid phone email profile user:ciam:commonapi'
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 如果没有 code,则处理错误, 跳转回登录页面
|
|
||||||
console.error('No code found in URL parameters.')
|
|
||||||
// window.location.href = 'https://api.oneid.siemens.com.cn/api/bff/v1.2/developer/ciam/oauth/authorize?client_id=1b867769c8cb221fb7fdb0f8beba6138TwXkI4mX8um&response_type=code&redirect_uri=http://csdc.siemens.com.cn:8001/#/callback&scope=openid phone email profile user:ciam:commonapi'
|
|
||||||
// window.location.href = 'https://oneid.siemens.com.cn/frontend/login?idaasAppId=siemens_ciam2'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.main-box {
|
|
||||||
background-image: url("../../assets/dashboard-background.png");
|
|
||||||
background-size: 100% 100%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
height: 100vh;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -478,14 +478,7 @@
|
||||||
:trigger-on-focus="false"
|
:trigger-on-focus="false"
|
||||||
@select="handleSelect"
|
@select="handleSelect"
|
||||||
/> -->
|
/> -->
|
||||||
<el-select
|
<el-select v-model="addStatusForm.costCenter" placeholder="请选择成本号">
|
||||||
v-model="addStatusForm.costCenter"
|
|
||||||
placeholder="请选择成本号"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
allow-create
|
|
||||||
@blur="InsertCostCenterSelect"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in costList"
|
v-for="(item, index) in costList"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@ -627,14 +620,7 @@
|
||||||
:trigger-on-focus="false"
|
:trigger-on-focus="false"
|
||||||
@select="handleSelect"
|
@select="handleSelect"
|
||||||
/> -->
|
/> -->
|
||||||
<el-select
|
<el-select v-model="editStatusForm.workRecordsList[0].costCenter" placeholder="请选择成本号">
|
||||||
v-model="editStatusForm.workRecordsList[0].costCenter"
|
|
||||||
placeholder="请选择成本号"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
allow-create
|
|
||||||
@blur="EditCostCenterSelect"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in costList"
|
v-for="(item, index) in costList"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@ -745,14 +731,7 @@
|
||||||
:trigger-on-focus="false"
|
:trigger-on-focus="false"
|
||||||
@select="handleSelect"
|
@select="handleSelect"
|
||||||
/> -->
|
/> -->
|
||||||
<el-select
|
<el-select v-model="editStatusForm.costCenterOfNewOrder" placeholder="请选择成本号">
|
||||||
v-model="editStatusForm.costCenterOfNewOrder"
|
|
||||||
placeholder="请选择成本号"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
allow-create
|
|
||||||
@blur="EditNewCostCenterSelect"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in costList"
|
v-for="(item, index) in costList"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@ -1272,6 +1251,7 @@ export default {
|
||||||
this.handleMonthLastDay()
|
this.handleMonthLastDay()
|
||||||
this.dayScreen()
|
this.dayScreen()
|
||||||
const { page, limit, departmentId } = this
|
const { page, limit, departmentId } = this
|
||||||
|
console.log(this.departmentId + '++++++')
|
||||||
var queryInfo = {
|
var queryInfo = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
limit: this.limit,
|
limit: this.limit,
|
||||||
|
@ -1280,7 +1260,6 @@ export default {
|
||||||
reign: this.region.trim(),
|
reign: this.region.trim(),
|
||||||
city: this.city.trim()
|
city: this.city.trim()
|
||||||
}
|
}
|
||||||
console.log(this.departmentId)
|
|
||||||
const resultOfSelectEngisByDept =
|
const resultOfSelectEngisByDept =
|
||||||
await this.$API.user.reqGetUserPageWithSkills(queryInfo)// select.reqSelectEngisByDept(page, limit, departmentId)
|
await this.$API.user.reqGetUserPageWithSkills(queryInfo)// select.reqSelectEngisByDept(page, limit, departmentId)
|
||||||
if (resultOfSelectEngisByDept.code === 0) {
|
if (resultOfSelectEngisByDept.code === 0) {
|
||||||
|
@ -1303,7 +1282,7 @@ export default {
|
||||||
page,
|
page,
|
||||||
limit
|
limit
|
||||||
)
|
)
|
||||||
console.log(this.engiArray, resOfSelectEngiStatusByMap)
|
|
||||||
if (resOfSelectEngiStatusByMap.code === 0) {
|
if (resOfSelectEngiStatusByMap.code === 0) {
|
||||||
var EngiStatusMap = resOfSelectEngiStatusByMap.data
|
var EngiStatusMap = resOfSelectEngiStatusByMap.data
|
||||||
for (const i in EngiStatusMap) {
|
for (const i in EngiStatusMap) {
|
||||||
|
@ -2159,25 +2138,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
return dropdownData
|
return dropdownData
|
||||||
},
|
|
||||||
InsertCostCenterSelect(e) {
|
|
||||||
const value = e.target.value // 输入框值
|
|
||||||
if (value) { // 你输入才有这个值 不为空,如果你下拉框选择的话 这个值为空
|
|
||||||
this.addStatusForm.costCenter = value
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// cost center下拉框 失去焦点 自动
|
|
||||||
EditCostCenterSelect(e) {
|
|
||||||
const value = e.target.value // 输入框值
|
|
||||||
if (value) { // 你输入才有这个值 不为空,如果你下拉框选择的话 这个值为空
|
|
||||||
this.editStatusForm.workRecordsList[0].costCenter = value
|
|
||||||
}
|
|
||||||
},
|
|
||||||
EditNewCostCenterSelect(e) {
|
|
||||||
const value = e.target.value // 输入框值
|
|
||||||
if (value) { // 你输入才有这个值 不为空,如果你下拉框选择的话 这个值为空
|
|
||||||
this.editStatusForm.costCenterOfNewOrder = value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
Loading…
Reference in New Issue