Merge remote-tracking branch 'origin/fourthStage' into fourthStage
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
NODE_ENV=production
|
||||
VUE_APP_TAG_FLAG=1
|
||||
VUE_APP_LOGIN_PAGE='https://iam-uat.sinotruk.com:7011/idp/oauth2/authorize?redirect_uri=http://srms-test.sinotruk.com/dashboard/analysis&state=123&client_id=SRMS&response_type=code'
|
||||
VUE_APP_LOGIN_PAGE='https://iam-uat-new.sinotruk.com/idp/oauth2/authorize?redirect_uri=http://srms-test.sinotruk.com/dashboard/analysis&state=123&client_id=SRMS&response_type=code'
|
||||
VUE_APP_CURRENT_SYSTEM='IAM'
|
||||
VUE_APP_LOGOUT_PAGE='https://iam-uat.sinotruk.com:7011/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=http://srms-test.sinotruk.com/dashboard/analysis&redirectToLogin=true&entityId=SRMS'
|
||||
VUE_APP_LOGOUT_PAGE='https://iam-uat-new.sinotruk.com/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=http://srms-test.sinotruk.com/dashboard/analysis&redirectToLogin=true&entityId=SRMS'
|
||||
+38
-21
@@ -15,29 +15,46 @@ const whiteList = ['/user/login', '/user/register', '/user/register-result', '/u
|
||||
whiteList.push(OAUTH2_LOGIN_PAGE_PATH)
|
||||
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
// 单点登录
|
||||
// 单点登录-OA单点登录
|
||||
if (to.query.ticket) {
|
||||
const { result } = await getTodoSSOUserInfo({ ticket: to.query.ticket })
|
||||
const userInfo = result.userInfo
|
||||
Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000)
|
||||
store.commit('SET_TOKEN', result.token)
|
||||
store.commit('SET_INFO', userInfo)
|
||||
store.commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() })
|
||||
store.commit('SET_AVATAR', userInfo.avatar)
|
||||
const { result, success, message } = await getTodoSSOUserInfo({ ticket: to.query.ticket })
|
||||
if (!success) {
|
||||
Vue.prototype.$message.warning(message, 3, () => {
|
||||
window.location.replace(process.env.VUE_APP_LOGOUT_PAGE)
|
||||
})
|
||||
// 必须切断执行
|
||||
return
|
||||
} else {
|
||||
const userInfo = result.userInfo
|
||||
Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000)
|
||||
store.commit('SET_TOKEN', result.token)
|
||||
store.commit('SET_INFO', userInfo)
|
||||
store.commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() })
|
||||
store.commit('SET_AVATAR', userInfo.avatar)
|
||||
}
|
||||
} else if (to.query.code) {
|
||||
const { result } = await getSSOUserInfo({ code: to.query.code })
|
||||
const userInfo = result.userInfo
|
||||
Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000)
|
||||
store.commit('SET_TOKEN', result.token)
|
||||
store.commit('SET_INFO', userInfo)
|
||||
store.commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() })
|
||||
store.commit('SET_AVATAR', userInfo.avatar)
|
||||
// 研发大前台单点登录
|
||||
const { result, success, message } = await getSSOUserInfo({ code: to.query.code })
|
||||
if (!success) {
|
||||
Vue.prototype.$message.warning(message, 3, () => {
|
||||
window.location.replace(process.env.VUE_APP_LOGOUT_PAGE)
|
||||
})
|
||||
// 必须切断执行
|
||||
return
|
||||
} else {
|
||||
const userInfo = result.userInfo
|
||||
Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000)
|
||||
store.commit('SET_TOKEN', result.token)
|
||||
store.commit('SET_INFO', userInfo)
|
||||
store.commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() })
|
||||
store.commit('SET_AVATAR', userInfo.avatar)
|
||||
}
|
||||
}
|
||||
// 处理是否是嵌入其他系统,是需要隐藏左侧和上面,如果当前值是true,就不需要修改了
|
||||
const isEmbedded = store.getters.isEmbedded
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<div class="result-source-wrapper">
|
||||
<p class="result-source">{{ resourceTypeOptions.find(i => i.key === item.resourceType).label }}</p>
|
||||
</div>
|
||||
<div v-show="item.standardState === StandardStatus.ABOLISH.value" class="result-source-wrapper" >
|
||||
<div v-show="judgeAbolish(item)" class="result-source-wrapper" >
|
||||
<p class="result-abolish">{{ StandardStatus.ABOLISH.text }}</p>
|
||||
</div>
|
||||
<p class="result-date">{{ $t('dashboard.generalSearch.releaseDate') }} {{ item.releaseDate || global.emptyLine }}</p>
|
||||
@@ -134,7 +134,7 @@ import {
|
||||
} from '@/api/dashboard'
|
||||
import { isHasPermission } from '@/utils/hasPermission'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { StandardStatus } from '@/enums/commonEnums'
|
||||
import { StandardStatus, EnterpriseStandardStatus } from '@/enums/commonEnums'
|
||||
import {
|
||||
getDomesticStandardFormModal,
|
||||
getDomesticStandardDetail,
|
||||
@@ -244,6 +244,18 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
isHasPermission,
|
||||
|
||||
// 判断是否是废止标准
|
||||
judgeAbolish (item) {
|
||||
// console.log('judgeAbolish')
|
||||
// console.log('item', item)
|
||||
if (item.resourceType === '3') { // 企业标准 判断 废止
|
||||
return item.standardState === EnterpriseStandardStatus.ABOLISH.value
|
||||
} else { // 国内标准 海外标准 判断 废止
|
||||
return item.standardState === StandardStatus.ABOLISH.value
|
||||
}
|
||||
},
|
||||
|
||||
// 获取要显示数量的筛选条件的数据
|
||||
initFilterData (callback) {
|
||||
const param = {}
|
||||
|
||||
@@ -186,7 +186,7 @@ export default {
|
||||
...mapGetters(['userInfo']),
|
||||
goBack () {
|
||||
this.$router.push({
|
||||
path: '/documentTool/documentComparison'
|
||||
path: '/docTool/docComparison'
|
||||
})
|
||||
},
|
||||
// 评论按钮点击
|
||||
|
||||
@@ -286,7 +286,7 @@ export default {
|
||||
item.isDisplay = 1
|
||||
}
|
||||
this.$router.push({
|
||||
path: '/documentTool/ComparisonResults',
|
||||
path: '/docTool/ComparisonResults',
|
||||
query: {
|
||||
id: item.id,
|
||||
isDisplay: item.isDisplay
|
||||
@@ -325,7 +325,7 @@ export default {
|
||||
*/
|
||||
edit (row) {
|
||||
this.$router.push({
|
||||
path: '/documentTool/DocumentDataComparison',
|
||||
path: '/docTool/DocDataComparison',
|
||||
query: {
|
||||
id: row.id
|
||||
}
|
||||
@@ -336,7 +336,7 @@ export default {
|
||||
*/
|
||||
initiatingProcessClick () {
|
||||
this.$router.push({
|
||||
path: '/documentTool/InitiateComparison'
|
||||
path: '/docTool/InitiateComparison'
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -293,7 +293,7 @@ export default {
|
||||
// 查看对比结果按钮点击
|
||||
viewTheComparisonResultsClick () {
|
||||
this.$router.push({
|
||||
path: '/documentTool/ComparisonResults',
|
||||
path: '/docTool/ComparisonResults',
|
||||
query: {
|
||||
id: this.$route.query.id,
|
||||
isDisplay: 2
|
||||
@@ -475,7 +475,7 @@ export default {
|
||||
},
|
||||
handleBack () {
|
||||
this.$router.push({
|
||||
path: '/documentTool/documentComparison'
|
||||
path: '/docTool/docComparison'
|
||||
})
|
||||
},
|
||||
changeLeftCatalogueShow () {
|
||||
|
||||
@@ -284,7 +284,7 @@ export default {
|
||||
...mapGetters(['userInfo']),
|
||||
goBack () {
|
||||
this.$router.push({
|
||||
path: '/documentTool/documentComparison'
|
||||
path: '/docTool/docComparison'
|
||||
})
|
||||
},
|
||||
searchQueryLeft () {
|
||||
@@ -354,7 +354,7 @@ export default {
|
||||
this.loading = false
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.$router.push({
|
||||
path: '/documentTool/DocumentDataComparison',
|
||||
path: '/docTool/DocDataComparison',
|
||||
query: {
|
||||
id: res.result
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ export default {
|
||||
// 编辑
|
||||
handleEdit (record) {
|
||||
this.$router.push({
|
||||
path: '/documentTool/DocumentSplitDetail',
|
||||
path: '/docTool/DocSplitDetail',
|
||||
query: {
|
||||
infoId: record.id,
|
||||
infoNumber: record.serialNumber,
|
||||
@@ -303,7 +303,7 @@ export default {
|
||||
*/
|
||||
handleDetail ({ id }) {
|
||||
this.$openPageNewSheet({
|
||||
path: '/documentTool/StandardSplitSheet',
|
||||
path: '/docTool/StandardSplitSheet',
|
||||
query: {
|
||||
id
|
||||
}
|
||||
|
||||
@@ -32,6 +32,11 @@
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<div class="table-operator" v-if="dataSource.length < 6" v-has="'sys:friendshipLink:add'">
|
||||
<!-- 新增 -->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
|
||||
</div>
|
||||
|
||||
<!-- table区域-begin -->
|
||||
<div>
|
||||
<j-table
|
||||
|
||||
@@ -99,6 +99,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.edit({})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible = true
|
||||
this.form.resetFields()
|
||||
|
||||
-9
@@ -500,7 +500,6 @@
|
||||
<!-- 配合单位 -->
|
||||
<div class="box-title-text form-flex-item-half">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.suitUnit')">
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.suitUnit') }}
|
||||
</span>
|
||||
@@ -714,14 +713,6 @@ export default {
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.standardPusher') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 配合单位
|
||||
cooperationUnit: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.suitUnit') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
isLook: false, // 是否是查看
|
||||
|
||||
-9
@@ -478,7 +478,6 @@
|
||||
<!-- 配合单位 -->
|
||||
<div class="box-title-text form-flex-item-half">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.suitUnit')">
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.suitUnit') }}
|
||||
</span>
|
||||
@@ -721,14 +720,6 @@ export default {
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.standardPusher') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 配合单位
|
||||
cooperationUnit: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.suitUnit') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
isLook: false, // 是否是查看
|
||||
|
||||
@@ -446,7 +446,6 @@
|
||||
<!-- 配合单位 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.suitUnit')">
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.suitUnit') }}
|
||||
</span>
|
||||
@@ -461,7 +460,6 @@
|
||||
<!-- 隶属工作组 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.revisionPlanActivelyReport.affiliatedWorkingGroup')">
|
||||
{{ $t('workCenter.revisionPlanActivelyReport.affiliatedWorkingGroup') }}
|
||||
</span>
|
||||
@@ -948,22 +946,6 @@ export default {
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.standardPusher') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 配合单位
|
||||
cooperationUnit: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.suitUnit') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 隶属工作组
|
||||
workGroup: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.revisionPlanActivelyReport.affiliatedWorkingGroup') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
// 各模块的收齐和展开状态
|
||||
|
||||
@@ -459,6 +459,9 @@ export default {
|
||||
}
|
||||
},
|
||||
getData () {
|
||||
if (this.isEditSetData) {
|
||||
return
|
||||
}
|
||||
const formInline = Object.assign({}, this.formInline)
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] instanceof Array) {
|
||||
@@ -475,6 +478,9 @@ export default {
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
async getDataValidate () {
|
||||
if (this.isEditSetData) {
|
||||
return
|
||||
}
|
||||
let data = {}
|
||||
await this.$refs.ruleForm.validate(valid => {
|
||||
console.log(valid)
|
||||
|
||||
Reference in New Issue
Block a user