角色切换修改 责任领域改为认证类别 状态下拉框修改
This commit is contained in:
@@ -33,28 +33,28 @@
|
||||
v-model="formInline.paramsName"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('NareaOfResponsibility')">
|
||||
<span>{{$t('NareaOfResponsibility')}}</span>
|
||||
</div>
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <div class="box-title-text">-->
|
||||
<!-- <div class="title-text" :title="$t('certificationCategory')">-->
|
||||
<!-- <span>{{$t('certificationCategory')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.certCategory"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('certificationCategory')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'cert_category'"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <div class="box-title-text">-->
|
||||
<!-- <div class="title-text" :title="$t('NareaOfResponsibility')">-->
|
||||
<!-- <span>{{$t('NareaOfResponsibility')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('certificationCategory')">
|
||||
<span>{{$t('certificationCategory')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.certCategory"
|
||||
:placeholder="$t('PleaseSelect')+$t('certificationCategory')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'cert_category'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
@@ -300,12 +300,31 @@
|
||||
</div>
|
||||
</a-popconfirm>
|
||||
<!-- 角色切换 -->
|
||||
<div class="operator-text"
|
||||
v-if="!this.$route.query.it"
|
||||
@click="roleSwitchingClick">
|
||||
<a-icon type="select"/>
|
||||
{{ $t('roleSwitching') }} ({{ $t(this.rolename)}})
|
||||
</div>
|
||||
<!-- <div class="operator-text"-->
|
||||
<!-- v-if="!this.$route.query.it"-->
|
||||
<!-- @click="roleSwitchingClick">-->
|
||||
<!-- <a-icon type="select"/>-->
|
||||
<!-- {{ $t('roleSwitching') }} ({{ $t(this.rolename)}})-->
|
||||
<!-- </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 style="width: 100%">
|
||||
<!-- 表格-10控件-->
|
||||
@@ -609,47 +628,47 @@
|
||||
this.statusList = [
|
||||
{
|
||||
value: '1',
|
||||
title: this.$t('CollectionInitiated'),
|
||||
text: this.$t('CollectionInitiated'),
|
||||
key: '1'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
title: this.$t('handledInterface'),
|
||||
text: this.$t('handledInterface'),
|
||||
key: '2'
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
title: this.$t('ReturnedPerson'),
|
||||
text: this.$t('ReturnedPerson'),
|
||||
key: '3'
|
||||
},
|
||||
{
|
||||
value: '4',
|
||||
title: this.$t('completed'),
|
||||
text: this.$t('completed'),
|
||||
key: '4'
|
||||
},
|
||||
{
|
||||
value: '5',
|
||||
title: this.$t('Filledreturn'),
|
||||
text: this.$t('Filledreturn'),
|
||||
key: '5'
|
||||
},
|
||||
{
|
||||
value: '6',
|
||||
title: this.$t('Submitted'),
|
||||
text: this.$t('Submitted'),
|
||||
key: '6'
|
||||
},
|
||||
{
|
||||
value: '7',
|
||||
title: this.$t('ReturnedEngineer'),
|
||||
text: this.$t('ReturnedEngineer'),
|
||||
key: '7'
|
||||
},
|
||||
{
|
||||
value: '8',
|
||||
title: this.$t('SynchronizedLibrary'),
|
||||
text: this.$t('SynchronizedLibrary'),
|
||||
key: '8'
|
||||
},
|
||||
{
|
||||
value: '9',
|
||||
title: this.$t('alteration'),
|
||||
text: this.$t('alteration'),
|
||||
key: '9'
|
||||
}
|
||||
]
|
||||
@@ -747,6 +766,7 @@
|
||||
customizevisible: false,
|
||||
indeterminate: false,
|
||||
checkAll: false,
|
||||
visible: false,
|
||||
selectedValue: [],
|
||||
checkedList: ['nio_number', 'params_name', 'operation'],
|
||||
// customizeList: [
|
||||
@@ -875,6 +895,7 @@
|
||||
selectedRowKeysArray: '',
|
||||
templatetitle: '',
|
||||
templatetitleId: '',
|
||||
roleSwitchName: '',
|
||||
rowId: '',
|
||||
version: 0,
|
||||
confirmLoading: false,
|
||||
@@ -905,6 +926,8 @@
|
||||
},
|
||||
rules: {},
|
||||
FreezeList: [], // 冻结字段
|
||||
roleSwitchingList: [],
|
||||
JTextLoading: false,
|
||||
visibleRoleSwitching: false, // 角色切换
|
||||
confirmLoadingRoleSwitching: false,
|
||||
formInlineRoleSwitching: {},
|
||||
@@ -1011,7 +1034,9 @@
|
||||
clearTimeout(this.timerOne)
|
||||
}, 300000)
|
||||
},
|
||||
|
||||
handleVisibleChange(visible) {
|
||||
this.visible = visible
|
||||
},
|
||||
handleToggleSearch() {
|
||||
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||
},
|
||||
@@ -1092,41 +1117,104 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
roleSwitchingClick() {
|
||||
this.visibleRoleSwitching = true
|
||||
roleSwitchingClick(roleCode) {
|
||||
console.log(roleCode,1111)
|
||||
this.JTextLoading = true
|
||||
// this.visibleRoleSwitching = true
|
||||
this.$nextTick(() => {
|
||||
this.formInlineRoleSwitching.roleSwitchingCode = this.currentPersonRole
|
||||
this.$refs.ruleFormRoleSwitching.clearValidate()
|
||||
// this.$refs.ruleFormRoleSwitching.clearValidate()
|
||||
clearTimeout(this.timeBatch)
|
||||
this.timeBatch = setTimeout(() => {
|
||||
if (this.currentPersonRole == 'dre') {
|
||||
this.handlePreservation()
|
||||
}
|
||||
}, 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() {
|
||||
this.$refs.CollectionTabel.getLoginUserType()
|
||||
@@ -2694,9 +2782,26 @@
|
||||
.text-wraning {
|
||||
word-break: break-word;
|
||||
}
|
||||
.operator-text-title-color {
|
||||
color: #00B3BE;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.popconfirmIndex .ant-popover-message-title {
|
||||
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>
|
||||
Reference in New Issue
Block a user