Merge branch 'develop' into FOTON

This commit is contained in:
super_liu
2022-04-24 17:17:28 +08:00
9 changed files with 122 additions and 113 deletions
+100 -100
View File
@@ -225,109 +225,109 @@ export default {
} }
}, },
mounted() { mounted() {
this.setTheme(this.getTheme) // this.setTheme(this.getTheme)
//实现对字符码的截获,keypress中屏蔽了这些功能按键 // //实现对字符码的截获,keypress中屏蔽了这些功能按键
document.onkeypress = this.banBackSpace // document.onkeypress = this.banBackSpace
//对功能按键的获取 // //对功能按键的获取
document.onkeydown = this.banBackSpace // document.onkeydown = this.banBackSpace
this.visibilitychangeFn = (e) => { //这个方法是监测浏览器窗口发生变化的时候执行 // this.visibilitychangeFn = (e) => { //这个方法是监测浏览器窗口发生变化的时候执行
// 切换到当前页面 // // 切换到当前页面
if (document.hidden == false) { // if (document.hidden == false) {
const userInfoModifyTime = this.userInfoModifyTime // const userInfoModifyTime = this.userInfoModifyTime
const userInfoModifyTimeInLocalStorage = localStorage.getItem('userInfoModifyTime') // const userInfoModifyTimeInLocalStorage = localStorage.getItem('userInfoModifyTime')
//
// 用户未切换 不执行任何操作 // // 用户未切换 不执行任何操作
if (userInfoModifyTime === userInfoModifyTimeInLocalStorage) { // if (userInfoModifyTime === userInfoModifyTimeInLocalStorage) {
return // return
} // }
//
if (userInfoModifyTimeInLocalStorage === null && webLoginType === 'idm') { // if (userInfoModifyTimeInLocalStorage === null && webLoginType === 'idm') {
this.$store.dispatch('syncStorageData') // this.$store.dispatch('syncStorageData')
//
const currentPage = this.$route.name // const currentPage = this.$route.name
if (currentPage === 'Login') { // if (currentPage === 'Login') {
return // return
} // }
this.currentMinute = 3 // this.currentMinute = 3
this.loading && this.loading.close() // this.loading && this.loading.close()
this.loading = this.$loading({ // this.loading = this.$loading({
lock: true, // lock: true,
// text: 'Loading', // // text: 'Loading',
// spinner: 'el-icon-loading', // // spinner: 'el-icon-loading',
// background: 'rgba(0, 0, 0, 0.7)' // // background: 'rgba(0, 0, 0, 0.7)'
}); // });
this.messageForLogin && this.messageForLogin.close() // this.messageForLogin && this.messageForLogin.close()
this.messageForLogin = this.$message({ // this.messageForLogin = this.$message({
message: `用户已退出,${this.currentMinute}秒后将跳转到登录1页面`, // message: `用户已退出,${this.currentMinute}秒后将跳转到登录1页面`,
type: 'warning' // type: 'warning'
}) // })
//
//
this.intervalForLogin = setInterval(() => { // this.intervalForLogin = setInterval(() => {
if (this.currentMinute === 0) { // if (this.currentMinute === 0) {
clearInterval(this.intervalForLogin) // clearInterval(this.intervalForLogin)
this.loading.close() // this.loading.close()
//
this.$router.push('/login') // this.$router.push('/login')
console.log('切换到登录页面', currentPage) // console.log('切换到登录页面', currentPage)
} // }
this.currentMinute-- // this.currentMinute--
this.messageForLogin.message = `用户已退出,${this.currentMinute}秒后将跳转到登录页面` // this.messageForLogin.message = `用户已退出,${this.currentMinute}秒后将跳转到登录页面`
}, 0) // }, 0)
//
} else if (userInfoModifyTime !== userInfoModifyTimeInLocalStorage && webLoginType === 'idm') { // } else if (userInfoModifyTime !== userInfoModifyTimeInLocalStorage && webLoginType === 'idm') {
this.$store.dispatch('syncStorageData') // this.$store.dispatch('syncStorageData')
//
console.log('用户信息已更改,同步数据') // console.log('用户信息已更改,同步数据')
//
this.currentMinute = 3 // this.currentMinute = 3
//
this.loading && this.loading.close() // this.loading && this.loading.close()
this.loading = this.$loading({ // this.loading = this.$loading({
lock: true, // lock: true,
// text: 'Loading', // // text: 'Loading',
// spinner: 'el-icon-loading', // // spinner: 'el-icon-loading',
// background: 'rgba(0, 0, 0, 0.7)' // // background: 'rgba(0, 0, 0, 0.7)'
}); // });
//
this.messageForHome && this.messageForHome.close() // this.messageForHome && this.messageForHome.close()
this.messageForHome = this.$message({ // this.messageForHome = this.$message({
message: `用户已切换,${this.currentMinute}秒后将跳转到用户首页`, // message: `用户已切换,${this.currentMinute}秒后将跳转到用户首页`,
type: 'warning' // type: 'warning'
}) // })
this.intervalForHome = setInterval(() => { // this.intervalForHome = setInterval(() => {
if (this.currentMinute === 0) { // if (this.currentMinute === 0) {
clearInterval(this.intervalForHome) // clearInterval(this.intervalForHome)
this.loading.close() // this.loading.close()
//
this.$router.push({ // this.$router.push({
path: '/redirect', // path: '/redirect',
query: '/home2' // query: '/home2'
}) // })
} // }
this.currentMinute-- // this.currentMinute--
this.messageForHome.message = `用户已切换,${this.currentMinute}秒后将跳转到用户首页` // this.messageForHome.message = `用户已切换,${this.currentMinute}秒后将跳转到用户首页`
}, 1000) // }, 1000)
//
// const route = this.$router.resolve('/home') // // const route = this.$router.resolve('/home')
// this.$router.push({ // // this.$router.push({
// path: '/redirect', // // path: '/redirect',
// query: '/home' // // query: '/home'
// }) // // })
// location.reload(); // // location.reload();
} // }
//
} // }
} // }
document.addEventListener('visibilitychange', this.visibilitychangeFn); // document.addEventListener('visibilitychange', this.visibilitychangeFn);
}, },
beforeDestroy() { beforeDestroy() {
document.onkeypress = null // document.onkeypress = null
document.onkeydown = null // document.onkeydown = null
document.removeEventListener('visibilitychange', this.visibilitychangeFn) // document.removeEventListener('visibilitychange', this.visibilitychangeFn)
clearInterval(this.intervalForLogin) // clearInterval(this.intervalForLogin)
clearInterval(this.intervalForHome) // clearInterval(this.intervalForHome)
} }
} }
</script> </script>
+4
View File
@@ -71,6 +71,10 @@ router.beforeEach(function (to, from, next) {
return return
} }
if(webLoginType === 'idm' && toName === 'Login'){
window.location.href = ssoLoginUrlDev
}
let fromName = from.name let fromName = from.name
let token = store.state.token let token = store.state.token
let path = to.path; let path = to.path;
@@ -970,7 +970,7 @@
.bzjdStep3 { .bzjdStep3 {
.itemsTextBox { .itemsTextBox {
min-height: 300px; min-height: 300px;
max-height: 500px; max-height: 835px;
overflow: auto; overflow: auto;
line-height: 20px; line-height: 20px;
/deep/ td { /deep/ td {
@@ -316,7 +316,7 @@
<el-table-column <el-table-column
prop="createTime" prop="createTime"
label="创建时间" label="创建时间"
align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") : "" }}</span> <span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") : "" }}</span>
</template> </template>
@@ -898,7 +898,7 @@ export default {
form: { form: {
handler: function (val) { handler: function (val) {
if(val){ if(val){
this.$emit('formCancel', this.form, this.FBGBUSSFileList,this.LSBBBUSSFileList,this.BZSMBUSSFileList,this.QTWJBUSSFileList,this.GLWJBUSSFileList,this.FSDList,this.LXDList); this.$emit('formCancel', this.form, this.FBGBUSSFileList,this.LSBBBUSSFileList,this.BZSMBUSSFileList,this.QTWJBUSSFileList,this.GLWJBUSSFileList,this.LXDList,this.FSDList);
} }
}, },
deep: true //对象的深度验证 deep: true //对象的深度验证
@@ -178,6 +178,8 @@ export default {
callback(new Error('请先在线编辑,再提交流程!')) callback(new Error('请先在线编辑,再提交流程!'))
} }
} }
}else {
callback(new Error('请先在线编辑,再提交流程!'))
} }
}; };
return { return {
@@ -307,7 +309,7 @@ export default {
handler (val) { handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') { if (val !== '' && val !== null && typeof (val) !== 'undefined') {
if(val === '1'){ if(val === '1'){
if (this.bpnId === undefined) { if (this.bpnId === undefined || this.bpnId === "") {
this.getFsFile() this.getFsFile()
} }
} }
@@ -385,7 +387,6 @@ export default {
this.choiceZRRList(type, title, id) this.choiceZRRList(type, title, id)
}, },
formCancel (form, list1,list2,list3,list4,list5,list6,list7) { formCancel (form, list1,list2,list3,list4,list5,list6,list7) {
console.log(form)
this.qbfsForm = form this.qbfsForm = form
this.FBGBUSSFileList = list1 this.FBGBUSSFileList = list1
this.LSBBBUSSFileList = list2 this.LSBBBUSSFileList = list2
@@ -178,6 +178,8 @@ export default {
callback(new Error('请先在线编辑,再提交流程!')) callback(new Error('请先在线编辑,再提交流程!'))
} }
} }
}else {
callback(new Error('请先在线编辑,再提交流程!'))
} }
}; };
const validateFsOnlineFile = async (rule, value, callback) => { const validateFsOnlineFile = async (rule, value, callback) => {
@@ -192,6 +194,8 @@ export default {
callback(new Error('请先在线编辑,再提交流程!')) callback(new Error('请先在线编辑,再提交流程!'))
} }
} }
}else {
callback(new Error('请先在线编辑,再提交流程!'))
} }
}; };
return { return {
@@ -316,7 +320,7 @@ export default {
this.qbfsForm.QCRBUSS=nameList; this.qbfsForm.QCRBUSS=nameList;
this.formKey++ this.formKey++
} }
if(data !== undefined && data && data.length > 0){ if(data && data.length > 0){
const institutionIdList = this.unique(data.map(item => item.institutionId)).join(",") const institutionIdList = this.unique(data.map(item => item.institutionId)).join(",")
const institutionNameList = this.unique(data.map(item => item.institutionName)).join(",") const institutionNameList = this.unique(data.map(item => item.institutionName)).join(",")
this.qbfsForm.QCDWID = institutionIdList this.qbfsForm.QCDWID = institutionIdList
@@ -617,15 +617,15 @@ export default {
}, },
//流程提交 //流程提交
handleSubmit() { handleSubmit() {
if(this.$route.query.prcNum === undefined){ if(this.$route.query.prcNum === undefined || this.$route.query.type == '2'){
this.$refs['qbfsForm'].validate((valid) => { this.$refs['qbfsForm'].validate((valid) => {
if (valid) { if (valid) {
this.$refs['roleForm'].validate((valid) => { this.$refs['roleForm'].validate((valid) => {
if (valid) { if (valid) {
if (this.$route.query.type === 2) { if (this.$route.query.type == '2') {
this.isSubmit = true this.isSubmit = true
this.standardSearch.commentText = this.commentText this.standardSearch.commentText = this.commentText
var json = Object.assign(this.standardSearch, this.roleForm) var json = Object.assign( this.roleForm,this.standardSearch)
this.$http.post('lawss/activiti/completeTaskNew', { this.$http.post('lawss/activiti/completeTaskNew', {
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
userId : this.$store.getters.userInfo.userId, userId : this.$store.getters.userInfo.userId,
@@ -647,7 +647,7 @@ export default {
} else { } else {
this.isSubmit = true this.isSubmit = true
this.standardSearch.commentText = this.commentText this.standardSearch.commentText = this.commentText
var json = Object.assign(this.standardSearch, this.roleForm) var json = Object.assign(this.roleForm, this.standardSearch)
this.$http.post('lawss/activiti/startProcessRollBack', { this.$http.post('lawss/activiti/startProcessRollBack', {
createUser: this.$store.getters.userInfo.userId, createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName, createUserName: this.$store.getters.userInfo.userName,
@@ -133,7 +133,7 @@
<el-table-column <el-table-column
prop="standName" prop="standName"
label="中文名称" label="中文名称"
width="180px" min-width="180px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standName }}</a> <a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
@@ -142,7 +142,7 @@
<el-table-column <el-table-column
prop="standEnName" prop="standEnName"
align="center" align="center"
width="180px" min-width="180px"
label="英文名称"> label="英文名称">
<template slot-scope="scope"> <template slot-scope="scope">
<a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standEnName }}</a> <a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standEnName }}</a>
@@ -189,7 +189,7 @@
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
prop="sycpx" prop="sycpx"
width="180px" min-width="180px"
align="center" align="center"
label="适用产品线"> label="适用产品线">
</el-table-column> </el-table-column>