角色切换修改 责任领域改为认证类别 状态下拉框修改
This commit is contained in:
@@ -33,28 +33,28 @@
|
|||||||
v-model="formInline.paramsName"></a-input>
|
v-model="formInline.paramsName"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="8">
|
<!-- <a-col :md="6" :sm="8">-->
|
||||||
<div class="box-title-text">
|
<!-- <div class="box-title-text">-->
|
||||||
<div class="title-text" :title="$t('NareaOfResponsibility')">
|
<!-- <div class="title-text" :title="$t('NareaOfResponsibility')">-->
|
||||||
<span>{{$t('NareaOfResponsibility')}}</span>
|
<!-- <span>{{$t('NareaOfResponsibility')}}</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
<!-- <j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
|
||||||
:placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"
|
<!-- :placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"-->
|
||||||
:type="'select'"
|
<!-- :type="'select'"-->
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</a-col>
|
<!-- </a-col>-->
|
||||||
<!-- <a-col :md="6" :sm="8">-->
|
<a-col :md="6" :sm="8">
|
||||||
<!-- <div class="box-title-text">-->
|
<div class="box-title-text">
|
||||||
<!-- <div class="title-text" :title="$t('certificationCategory')">-->
|
<div class="title-text" :title="$t('certificationCategory')">
|
||||||
<!-- <span>{{$t('certificationCategory')}}</span>-->
|
<span>{{$t('certificationCategory')}}</span>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.certCategory"-->
|
<j-dict-select-tag class="box-input" v-model="formInline.certCategory"
|
||||||
<!-- :placeholder="$t('PleaseSelect')+$t('certificationCategory')"-->
|
:placeholder="$t('PleaseSelect')+$t('certificationCategory')"
|
||||||
<!-- :type="'select'"-->
|
:type="'select'"
|
||||||
<!-- :triggerChange="false" :dictCode="'cert_category'"/>-->
|
:triggerChange="false" :dictCode="'cert_category'"/>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<!-- </a-col>-->
|
</a-col>
|
||||||
<template v-if="toggleSearchStatus">
|
<template v-if="toggleSearchStatus">
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
@@ -300,12 +300,31 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
<!-- 角色切换 -->
|
<!-- 角色切换 -->
|
||||||
<div class="operator-text"
|
<!-- <div class="operator-text"-->
|
||||||
v-if="!this.$route.query.it"
|
<!-- v-if="!this.$route.query.it"-->
|
||||||
@click="roleSwitchingClick">
|
<!-- @click="roleSwitchingClick">-->
|
||||||
<a-icon type="select"/>
|
<!-- <a-icon type="select"/>-->
|
||||||
{{ $t('roleSwitching') }} ({{ $t(this.rolename)}})
|
<!-- {{ $t('roleSwitching') }} ({{ $t(this.rolename)}})-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
<a-popconfirm overlayClassName="popconfirmDetails"
|
||||||
|
:visible="visible"
|
||||||
|
@visibleChange="handleVisibleChange"
|
||||||
|
placement="bottomRight">
|
||||||
|
<template slot="title" id="popconfirmDetails">
|
||||||
|
<div @click="roleSwitchingClick(item.value)"
|
||||||
|
v-for="(item,index) in RoleType"
|
||||||
|
class="operator-text-title"
|
||||||
|
:class="{'operator-text-title-color':item.label == rolename ? true : false}"
|
||||||
|
:title="item.label">
|
||||||
|
{{ item.label }}
|
||||||
|
</div>
|
||||||
|
<JLoading :loading="JTextLoading"></JLoading>
|
||||||
|
</template>
|
||||||
|
<div class="operator-text" style="position: relative">
|
||||||
|
<a-icon type="select"/>
|
||||||
|
{{rolename}}
|
||||||
|
</div>
|
||||||
|
</a-popconfirm>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%">
|
<div style="width: 100%">
|
||||||
<!-- 表格-10控件-->
|
<!-- 表格-10控件-->
|
||||||
@@ -609,47 +628,47 @@
|
|||||||
this.statusList = [
|
this.statusList = [
|
||||||
{
|
{
|
||||||
value: '1',
|
value: '1',
|
||||||
title: this.$t('CollectionInitiated'),
|
text: this.$t('CollectionInitiated'),
|
||||||
key: '1'
|
key: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '2',
|
value: '2',
|
||||||
title: this.$t('handledInterface'),
|
text: this.$t('handledInterface'),
|
||||||
key: '2'
|
key: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
title: this.$t('ReturnedPerson'),
|
text: this.$t('ReturnedPerson'),
|
||||||
key: '3'
|
key: '3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '4',
|
value: '4',
|
||||||
title: this.$t('completed'),
|
text: this.$t('completed'),
|
||||||
key: '4'
|
key: '4'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '5',
|
value: '5',
|
||||||
title: this.$t('Filledreturn'),
|
text: this.$t('Filledreturn'),
|
||||||
key: '5'
|
key: '5'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '6',
|
value: '6',
|
||||||
title: this.$t('Submitted'),
|
text: this.$t('Submitted'),
|
||||||
key: '6'
|
key: '6'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '7',
|
value: '7',
|
||||||
title: this.$t('ReturnedEngineer'),
|
text: this.$t('ReturnedEngineer'),
|
||||||
key: '7'
|
key: '7'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '8',
|
value: '8',
|
||||||
title: this.$t('SynchronizedLibrary'),
|
text: this.$t('SynchronizedLibrary'),
|
||||||
key: '8'
|
key: '8'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '9',
|
value: '9',
|
||||||
title: this.$t('alteration'),
|
text: this.$t('alteration'),
|
||||||
key: '9'
|
key: '9'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -747,6 +766,7 @@
|
|||||||
customizevisible: false,
|
customizevisible: false,
|
||||||
indeterminate: false,
|
indeterminate: false,
|
||||||
checkAll: false,
|
checkAll: false,
|
||||||
|
visible: false,
|
||||||
selectedValue: [],
|
selectedValue: [],
|
||||||
checkedList: ['nio_number', 'params_name', 'operation'],
|
checkedList: ['nio_number', 'params_name', 'operation'],
|
||||||
// customizeList: [
|
// customizeList: [
|
||||||
@@ -875,6 +895,7 @@
|
|||||||
selectedRowKeysArray: '',
|
selectedRowKeysArray: '',
|
||||||
templatetitle: '',
|
templatetitle: '',
|
||||||
templatetitleId: '',
|
templatetitleId: '',
|
||||||
|
roleSwitchName: '',
|
||||||
rowId: '',
|
rowId: '',
|
||||||
version: 0,
|
version: 0,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
@@ -905,6 +926,8 @@
|
|||||||
},
|
},
|
||||||
rules: {},
|
rules: {},
|
||||||
FreezeList: [], // 冻结字段
|
FreezeList: [], // 冻结字段
|
||||||
|
roleSwitchingList: [],
|
||||||
|
JTextLoading: false,
|
||||||
visibleRoleSwitching: false, // 角色切换
|
visibleRoleSwitching: false, // 角色切换
|
||||||
confirmLoadingRoleSwitching: false,
|
confirmLoadingRoleSwitching: false,
|
||||||
formInlineRoleSwitching: {},
|
formInlineRoleSwitching: {},
|
||||||
@@ -1011,7 +1034,9 @@
|
|||||||
clearTimeout(this.timerOne)
|
clearTimeout(this.timerOne)
|
||||||
}, 300000)
|
}, 300000)
|
||||||
},
|
},
|
||||||
|
handleVisibleChange(visible) {
|
||||||
|
this.visible = visible
|
||||||
|
},
|
||||||
handleToggleSearch() {
|
handleToggleSearch() {
|
||||||
this.toggleSearchStatus = !this.toggleSearchStatus
|
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||||
},
|
},
|
||||||
@@ -1092,41 +1117,104 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
roleSwitchingClick() {
|
roleSwitchingClick(roleCode) {
|
||||||
this.visibleRoleSwitching = true
|
console.log(roleCode,1111)
|
||||||
|
this.JTextLoading = true
|
||||||
|
// this.visibleRoleSwitching = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.formInlineRoleSwitching.roleSwitchingCode = this.currentPersonRole
|
this.formInlineRoleSwitching.roleSwitchingCode = this.currentPersonRole
|
||||||
this.$refs.ruleFormRoleSwitching.clearValidate()
|
// this.$refs.ruleFormRoleSwitching.clearValidate()
|
||||||
clearTimeout(this.timeBatch)
|
clearTimeout(this.timeBatch)
|
||||||
this.timeBatch = setTimeout(() => {
|
this.timeBatch = setTimeout(() => {
|
||||||
if (this.currentPersonRole == 'dre') {
|
if (this.currentPersonRole == 'dre') {
|
||||||
this.handlePreservation()
|
this.handlePreservation()
|
||||||
}
|
}
|
||||||
}, 10000)
|
}, 10000)
|
||||||
// if (this.currentPersonRole == 'dre') {
|
|
||||||
// this.timeBatch = setInterval(() => {
|
|
||||||
// this.handlePreservation();
|
|
||||||
// }, 10000);
|
|
||||||
// var interval = setInterval(this.handlePreservation(),10000);
|
|
||||||
// /* if 5 minutes no operation then logout */
|
|
||||||
// var maxTime = 120; // seconds
|
|
||||||
// var time = maxTime;
|
|
||||||
// $('body').on('keydown mousemove mousedown', function(e) {
|
|
||||||
// time = maxTime; // reset
|
|
||||||
// });
|
|
||||||
// var intervalId = setInterval(function() {
|
|
||||||
// time--;
|
|
||||||
// if (time <= 0) {
|
|
||||||
// ShowInvalidLoginMessage();
|
|
||||||
// clearInterval(intervalId);
|
|
||||||
// }
|
|
||||||
// }, 10000)
|
|
||||||
// function ShowInvalidLoginMessage() {
|
|
||||||
// // 停止定时器
|
|
||||||
// clearInterval(interval);
|
|
||||||
// }
|
|
||||||
// }
|
// }
|
||||||
})
|
})
|
||||||
|
if (this.$route.query.type == '1') {
|
||||||
|
let query = {
|
||||||
|
userType: roleCode ? roleCode : this.$route.query.userType,
|
||||||
|
paramsManifestId: this.$route.query.id,
|
||||||
|
projectId: this.$route.query.projectId,
|
||||||
|
userId: this.userInfo().id
|
||||||
|
}
|
||||||
|
this.confirmLoadingRoleSwitching = true
|
||||||
|
postAction('/params/userTypeLog/edit', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.currentPersonRole = roleCode ? roleCode : this.$route.query.userType
|
||||||
|
this.visibleRoleSwitching = false
|
||||||
|
this.confirmLoadingRoleSwitching = false
|
||||||
|
this.JTextLoading = false
|
||||||
|
this.visible = false
|
||||||
|
localStorage.setItem('currentPersonRole', JSON.stringify(roleCode ? roleCode : this.$route.query.userType))
|
||||||
|
this.RoleType.forEach((item, index) => {
|
||||||
|
if (item.value == this.currentPersonRole) {
|
||||||
|
this.rolename = item.label
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.selectedRowKeysValue = []
|
||||||
|
} else {
|
||||||
|
this.confirmLoadingRoleSwitching = false
|
||||||
|
this.JTextLoading = false
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// this.$refs.ruleFormRoleSwitching.validate(valid => {
|
||||||
|
// if (valid) {
|
||||||
|
let query = {
|
||||||
|
userType: roleCode,
|
||||||
|
paramsManifestId: this.$route.query.id,
|
||||||
|
projectId: this.$route.query.projectId,
|
||||||
|
userId: this.userInfo().id
|
||||||
|
}
|
||||||
|
this.confirmLoadingRoleSwitching = true
|
||||||
|
postAction('/params/userTypeLog/edit', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.currentPersonRole = roleCode
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.visibleRoleSwitching = false
|
||||||
|
this.confirmLoadingRoleSwitching = false
|
||||||
|
this.JTextLoading = false
|
||||||
|
this.visible = false
|
||||||
|
localStorage.setItem('currentPersonRole', JSON.stringify(roleCode))
|
||||||
|
this.RoleType.forEach((item, index) => {
|
||||||
|
if (item.value == this.currentPersonRole) {
|
||||||
|
this.rolename = item.label
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.selectedRowKeysValue = []
|
||||||
|
} else {
|
||||||
|
this.confirmLoadingRoleSwitching = false
|
||||||
|
this.JTextLoading = false
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
// let query = {
|
||||||
|
// roleCode: roleSwitchingCode,
|
||||||
|
// id: this.AndUserId,
|
||||||
|
// projectLibraryId: this.$route.query.id,
|
||||||
|
// modelType: 'Laws inventory'
|
||||||
|
// }
|
||||||
|
// // this.confirmLoadingRoleSwitching = true
|
||||||
|
// postAction(this.url.AndUserIdEdit, query).then((res) => {
|
||||||
|
// if (res.success) {
|
||||||
|
// this.roleSwitchingCode = roleSwitchingCode
|
||||||
|
// this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
// // this.visibleRoleSwitching = false
|
||||||
|
// // this.confirmLoadingRoleSwitching = false
|
||||||
|
// this.$emit('getRoleSwitch', roleSwitchingCode)
|
||||||
|
// this.selectedRowKeys = []
|
||||||
|
// this.getList()
|
||||||
|
// } else {
|
||||||
|
// this.confirmLoadingRoleSwitching = false
|
||||||
|
// this.$message.warning(this.$t('operationFailed'))
|
||||||
|
// }
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
GetgetLoginUserType() {
|
GetgetLoginUserType() {
|
||||||
this.$refs.CollectionTabel.getLoginUserType()
|
this.$refs.CollectionTabel.getLoginUserType()
|
||||||
@@ -2694,9 +2782,26 @@
|
|||||||
.text-wraning {
|
.text-wraning {
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
.operator-text-title-color {
|
||||||
|
color: #00B3BE;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang='less'>
|
<style lang='less'>
|
||||||
.popconfirmIndex .ant-popover-message-title {
|
.popconfirmIndex .ant-popover-message-title {
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
.popconfirmDetails {
|
||||||
|
z-index: 999;
|
||||||
|
/*top: 42px !important;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.popconfirmDetails .ant-popover-buttons {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popconfirmDetails .anticon-exclamation-circle {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user