修改角色切换
This commit is contained in:
@@ -353,6 +353,7 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
<JLoading :loading="JLoading">{{$t('dataLoading')}}</JLoading>
|
||||||
<resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef"/>
|
<resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef"/>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -681,6 +682,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
visibleFile: false,
|
visibleFile: false,
|
||||||
|
JLoading:false,
|
||||||
formInlineComment: {},
|
formInlineComment: {},
|
||||||
rulesComment: {
|
rulesComment: {
|
||||||
commentContent: [
|
commentContent: [
|
||||||
@@ -736,7 +738,9 @@
|
|||||||
setBatch: '/project/projectLawsInventoryEO/setBatch',//批量设置
|
setBatch: '/project/projectLawsInventoryEO/setBatch',//批量设置
|
||||||
copyUrl: '/project/projectLawsInventoryEO/copyInfoByIds',//复制
|
copyUrl: '/project/projectLawsInventoryEO/copyInfoByIds',//复制
|
||||||
transferUrl: '/project/projectLawsInventoryEO/getPageInfoDummy',//调取
|
transferUrl: '/project/projectLawsInventoryEO/getPageInfoDummy',//调取
|
||||||
ExportReportUrl: '/project/projectLawsInventoryEO/downloadDocxReport'
|
ExportReportUrl: '/project/projectLawsInventoryEO/downloadDocxReport',
|
||||||
|
AndUserId: '/project/projectLibraryRoleRelEO/queryByProjectLibraryIdAndUserId',
|
||||||
|
AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit'
|
||||||
},
|
},
|
||||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -798,6 +802,7 @@
|
|||||||
visibleRoleSwitching: false,
|
visibleRoleSwitching: false,
|
||||||
confirmLoadingRoleSwitching: false,
|
confirmLoadingRoleSwitching: false,
|
||||||
formInlineRoleSwitching: {},
|
formInlineRoleSwitching: {},
|
||||||
|
AndUserId: '',
|
||||||
rulesRoleSwitching: {
|
rulesRoleSwitching: {
|
||||||
roleSwitchingCode: [
|
roleSwitchingCode: [
|
||||||
{
|
{
|
||||||
@@ -812,8 +817,8 @@
|
|||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.$route.query.studioEngineer == this.userInfo().id) {
|
if (this.$route.query.studioEngineer == this.userInfo().id) {
|
||||||
this.isDisplay = true
|
this.JLoading = true
|
||||||
this.formInlineRoleSwitching.roleSwitchingCode = '0'
|
this.getAndUserId()
|
||||||
} else {
|
} else {
|
||||||
this.isDisplay = false
|
this.isDisplay = false
|
||||||
}
|
}
|
||||||
@@ -845,6 +850,27 @@
|
|||||||
handleModule() {
|
handleModule() {
|
||||||
downloadFile(this.url.exportTemplate, this.$t('listOfRegulations') + this.$t('importTemplate') + '.xls', {})
|
downloadFile(this.url.exportTemplate, this.$t('listOfRegulations') + this.$t('importTemplate') + '.xls', {})
|
||||||
},
|
},
|
||||||
|
getAndUserId() {
|
||||||
|
let query = {
|
||||||
|
projectLibraryId: this.$route.query.id,
|
||||||
|
userId: this.userInfo().id
|
||||||
|
}
|
||||||
|
getAction(this.url.AndUserId, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.isDisplay = true
|
||||||
|
this.formInlineRoleSwitching.roleSwitchingCode = res.result.roleCode
|
||||||
|
this.AndUserId = res.result.id
|
||||||
|
if (this.formInlineRoleSwitching.roleSwitchingCode == '0') {
|
||||||
|
this.isDisplay = true
|
||||||
|
} else {
|
||||||
|
this.isDisplay = false
|
||||||
|
}
|
||||||
|
this.JLoading = false
|
||||||
|
}else{
|
||||||
|
this.JLoading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
ExportReportClick() {
|
ExportReportClick() {
|
||||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||||
if (selectedRowKeys && selectedRowKeys.length == 0) {
|
if (selectedRowKeys && selectedRowKeys.length == 0) {
|
||||||
@@ -969,13 +995,27 @@
|
|||||||
handleOkRoleSwitching() {
|
handleOkRoleSwitching() {
|
||||||
this.$refs.ruleFormRoleSwitching.validate(valid => {
|
this.$refs.ruleFormRoleSwitching.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.formInlineRoleSwitching.roleSwitchingCode == '0') {
|
let query = {
|
||||||
this.isDisplay = true
|
roleCode: this.formInlineRoleSwitching.roleSwitchingCode,
|
||||||
} else {
|
id: this.AndUserId
|
||||||
this.isDisplay = false
|
|
||||||
}
|
}
|
||||||
this.visibleRoleSwitching = false
|
this.confirmLoadingRoleSwitching = true
|
||||||
this.getList()
|
postAction(this.url.AndUserIdEdit, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
if (this.formInlineRoleSwitching.roleSwitchingCode == '0') {
|
||||||
|
this.isDisplay = true
|
||||||
|
} else {
|
||||||
|
this.isDisplay = false
|
||||||
|
}
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.visibleRoleSwitching = false
|
||||||
|
this.confirmLoadingRoleSwitching = false
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.confirmLoadingRoleSwitching = false
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user