+
-
+
+
+ {{ $t('initiatingProcess') }}
+
+
+
+ {{ $t('returnToStudio') }}
+
+
+
+ {{ $t('Approved') }}
+
+
+
+ {{ $t('returnedForApproval') }}
+
+
+
+ {{ $t('missionAccepted') }}
+
+
+
+ {{ $t('missionRejection') }}
+
+
+
+
+ {{ $t('turnToDo') }}
+
+
@@ -160,6 +222,7 @@
+
+ style="width: 100%"/>
@@ -195,6 +258,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -205,8 +302,10 @@
import transferList from './components/transferList'
import addModel from './components/addModel'
import batSetting from './components/batSetting'
+ import modifyHistory from './components/modifyHistoryList'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
- import moment from "moment";
+ import moment from 'moment'
+ import { mapGetters } from 'vuex'
export default {
name: 'index',
@@ -216,18 +315,19 @@
transferList,
certificationDirectory,
batSetting,
- addModel
+ addModel,
+ modifyHistory
},
data() {
return {
queryParam: {},
fieldList: [],
queryParamQuery: {},
- formInline:{},
+ formInline: {},
toggleSearchStatus: false,
- confirmLoading:false,
- listTitle:'',
- visible:false,
+ confirmLoading: false,
+ listTitle: '',
+ visible: false,
rules: {
endTime: [
{
@@ -235,7 +335,7 @@
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
trigger: 'change'
}
- ],
+ ]
},
url: {
list: '/project/projectCertificationInventoryEO/page',
@@ -243,12 +343,28 @@
exportData: '',
deleteBatch: '/project/projectCertificationInventoryEO/deleteBatch',
setBatch: '/project/projectCertificationInventoryEO/setBatch',
- deleteOne: '/project/projectCertificationInventoryEO/delete'
+ deleteOne: '/project/projectCertificationInventoryEO/delete',
+ AndUserId: '/project/projectLibraryRoleRelEO/queryByProjectLibraryIdAndUserId',
+ AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit'
},
- processStatusList: [],
dataSource: [],
+ roleSwitchingCode:'',
loading: false,
- columns: [
+ roleSwitchingList: [],
+ visibleRoleSwitching: false,
+ confirmLoadingRoleSwitching: false,
+ formInlineRoleSwitching: {},
+ AndUserId: '',
+ rulesRoleSwitching: {
+ roleSwitchingCode: [
+ {
+ required: true,
+ message: this.$t('roleSwitching') + this.$t('cannotEmpty'),
+ trigger: 'change'
+ }
+ ]
+ },
+ columnsAll: [
{
title: this.$t('category'),
align: 'left',
@@ -375,9 +491,31 @@
}
},
mounted() {
- this.getList()
+ // this.getList()
+ this.getRoleByUserId(() => {
+ this.getAndUserId()
+ })
+ },
+ computed: {
+ columns: function() {
+ let columns = JSON.parse(JSON.stringify(this.columnsAll))
+ if (this.roleSwitchingCode == 11 ||
+ this.roleSwitchingCode == 12 || this.roleSwitchingCode == 13 || this.roleSwitchingCode == 14) {
+ for (let i = 0; i < columns.length; i++) {
+ if (columns[i].title == this.$t('operation')) {
+ columns.splice(i, 1)
+ i--
+ }
+ }
+ }
+ return columns
+ }
},
methods: {
+ ...mapGetters(['userInfo']),
+ disabledDate(current) {
+ return current && current < moment().subtract(1, 'day')
+ },
searchQuery() {
this.selectedRowKeys = []
this.getList()
@@ -417,7 +555,8 @@
let query = {
...this.queryParamQuery,
...queryParam,
- projectLibraryId: this.$route.query.id
+ projectLibraryId: this.$route.query.id,
+ roleCode: this.formInlineRoleSwitching.roleSwitchingCode
}
this.loading = true
getAction(this.url.list, query).then((res) => {
@@ -435,9 +574,9 @@
this.$refs.transferListRef.transferModel()
},
BatchSettingClick() {
- if (this.selectedRowKeys && this.selectedRowKeys.length > 0){
+ if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
- }else{
+ } else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
@@ -515,38 +654,38 @@
},
releaseClick() {
this.listTitle = this.$t('Deadline')
- if(this.selectedRowKeysList.length < 1){
+ if (this.selectedRowKeysList.length < 1) {
this.$message.warning(this.$t('selectLeastOne'))
- }else{
+ } else {
this.visible = true
}
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
- let selectedRowKeys = []
- this.selectedRowKeysList.forEach(res => {
- selectedRowKeys.push(res.id)
- })
- let query = {
- ids: selectedRowKeys.join(','),
- projectLibraryId: this.$route.query.id,
- ...this.formInline
+ let selectedRowKeys = []
+ this.selectedRowKeysList.forEach(res => {
+ selectedRowKeys.push(res.id)
+ })
+ let query = {
+ ids: selectedRowKeys.join(','),
+ projectLibraryId: this.$route.query.id,
+ ...this.formInline
+ }
+ this.confirmLoading = true
+ postAction('/project/projectCertificationInventoryEO/issue', query).then((res) => {
+ if (res.success) {
+ this.$message.success(this.$t('OperationSuccessful'))
+ this.visible = false
+ this.selectedRowKeys = []
+ this.confirmLoading = false
+ this.getList()
+ } else {
+ this.$message.warning(this.$t('operationFailed'))
+ this.confirmLoading = false
}
- this.confirmLoading = true
- postAction('/project/projectCertificationInventoryEO/issue', query).then((res) => {
- if (res.success) {
- this.$message.success(this.$t('OperationSuccessful'))
- this.visible = false
- this.selectedRowKeys = []
- this.confirmLoading = false
- this.getList()
- } else {
- this.$message.warning(this.$t('operationFailed'))
- this.confirmLoading = false
- }
- this.detailedSuccessList = []
- })
+ this.detailedSuccessList = []
+ })
}
})
},
@@ -590,7 +729,85 @@
})
},
modifyHistoryClick() {
-
+ this.$refs.modifyHistoryRef.getList()
+ },
+ getRoleByUserId(callback) {
+ getAction('/project/projectCertificationInventoryEO/getRoleByUserId', { projectLibraryId: this.$route.query.id }).then((res) => {
+ if (res.success) {
+ this.roleSwitchingList = res.result || []
+ } else {
+ this.roleSwitchingList = []
+ }
+ callback && callback()
+ })
+ },
+ getAndUserId() {
+ let query = {
+ projectLibraryId: this.$route.query.id,
+ userId: this.userInfo().id,
+ modelType: 'Certification inventory'
+ }
+ 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) {
+ if (!(this.roleSwitchingList.some(val => val.roleCode == this.formInlineRoleSwitching.roleSwitchingCode))) {
+ this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingList[0] ? this.roleSwitchingList[0].roleCode : ''
+ }
+ } else {
+ this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingList[0] ? this.roleSwitchingList[0].roleCode : ''
+ }
+ this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode
+ this.getList()
+ } else {
+ this.JLoading = false
+ }
+ })
+ },
+ roleSwitchingClick() {
+ this.visibleRoleSwitching = true
+ this.$nextTick(() => {
+ this.$refs.ruleFormRoleSwitching.clearValidate()
+ if (!this.formInlineRoleSwitching.roleSwitchingCode) {
+ this.formInlineRoleSwitching.roleSwitchingCode = '0'
+ }
+ if (!(this.roleSwitchingList.some(val => val.roleCode == this.formInlineRoleSwitching.roleSwitchingCode))) {
+ this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingList[0] ? this.roleSwitchingList[0].roleCode : ''
+ }
+ this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode
+ this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
+ })
+ },
+ handleOkRoleSwitching() {
+ this.$refs.ruleFormRoleSwitching.validate(valid => {
+ if (valid) {
+ let query = {
+ roleCode: this.formInlineRoleSwitching.roleSwitchingCode,
+ id: this.AndUserId,
+ projectLibraryId: this.$route.query.id,
+ modelType: 'Certification inventory'
+ }
+ this.confirmLoadingRoleSwitching = true
+ postAction(this.url.AndUserIdEdit, query).then((res) => {
+ if (res.success) {
+ this.isRoleSwitching = true
+ this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode
+ this.$message.success(this.$t('OperationSuccessful'))
+ this.visibleRoleSwitching = false
+ this.confirmLoadingRoleSwitching = false
+ this.getList()
+ } else {
+ this.confirmLoadingRoleSwitching = false
+ this.$message.warning(this.$t('operationFailed'))
+ }
+ })
+ }
+ })
+ },
+ handleCancelRoleSwitching() {
+ this.visibleRoleSwitching = false
}
}
}
diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue
index fa45597e2..669e66bda 100644
--- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue
+++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue
@@ -207,12 +207,12 @@
{{ $t('add') }}
-
- {{ $t('roleSwitching') }}
-