@@ -300,12 +300,31 @@
-
-
- {{ $t('roleSwitching') }} ({{ $t(this.rolename)}})
-
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
@@ -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;
+ }
+
\ No newline at end of file