修改切換角色
This commit is contained in:
@@ -596,6 +596,7 @@ module.exports = {
|
|||||||
StandardImplementationDate: 'Standard implementation date',
|
StandardImplementationDate: 'Standard implementation date',
|
||||||
regulatoryEngineer: 'Regulation Engineer',
|
regulatoryEngineer: 'Regulation Engineer',
|
||||||
certifiedEngineer: 'Homologation Engineer',
|
certifiedEngineer: 'Homologation Engineer',
|
||||||
|
regulatoryEngineerOrcertifiedEngineer:'Regulation Engineer Or Homologation Engineer',
|
||||||
engineeringInterfacePerson: 'Engineering Interface',
|
engineeringInterfacePerson: 'Engineering Interface',
|
||||||
typeOfDeliverables: 'Type of deliverables',
|
typeOfDeliverables: 'Type of deliverables',
|
||||||
deliverableTemplate: 'Deliverable template',
|
deliverableTemplate: 'Deliverable template',
|
||||||
@@ -918,4 +919,5 @@ module.exports = {
|
|||||||
and: 'and',
|
and: 'and',
|
||||||
judge:'Judge',
|
judge:'Judge',
|
||||||
pleaseWaitWhileRunning:'Please wait while running',
|
pleaseWaitWhileRunning:'Please wait while running',
|
||||||
|
roleSwitching:'Role switching',
|
||||||
}
|
}
|
||||||
@@ -604,6 +604,7 @@ module.exports = {
|
|||||||
StandardImplementationDate: '标准实施日期',
|
StandardImplementationDate: '标准实施日期',
|
||||||
regulatoryEngineer: '法规工程师',
|
regulatoryEngineer: '法规工程师',
|
||||||
certifiedEngineer: '认证工程师',
|
certifiedEngineer: '认证工程师',
|
||||||
|
regulatoryEngineerOrcertifiedEngineer:'法规工程师/认证工程师',
|
||||||
judge: '判断',
|
judge: '判断',
|
||||||
engineeringInterfacePerson: '工程接口人',
|
engineeringInterfacePerson: '工程接口人',
|
||||||
typeOfDeliverables: '交付物类型',
|
typeOfDeliverables: '交付物类型',
|
||||||
@@ -922,5 +923,6 @@ module.exports = {
|
|||||||
Statusis: '状态为',
|
Statusis: '状态为',
|
||||||
toHavePermission: '才有权限',
|
toHavePermission: '才有权限',
|
||||||
and: '并且',
|
and: '并且',
|
||||||
pleaseWaitWhileRunning: '运行中请稍等'
|
pleaseWaitWhileRunning: '运行中请稍等',
|
||||||
|
roleSwitching:'角色切换',
|
||||||
}
|
}
|
||||||
@@ -92,6 +92,10 @@
|
|||||||
<a-icon type="user"/>
|
<a-icon type="user"/>
|
||||||
{{ $t('ExportReport') }}
|
{{ $t('ExportReport') }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="operator-text-title" @click="batSettingClick">
|
||||||
|
<a-icon type="setting"/>
|
||||||
|
{{ $t('batSetting') }}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="operator-text" style="position: relative">
|
<div class="operator-text" style="position: relative">
|
||||||
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
|
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
|
||||||
@@ -109,9 +113,9 @@
|
|||||||
<a-icon type="plus"/>
|
<a-icon type="plus"/>
|
||||||
{{ $t('add') }}
|
{{ $t('add') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text" @click="batSettingClick">
|
<div class="operator-text" @click="roleSwitchingClick">
|
||||||
<a-icon type="setting"/>
|
<a-icon type="setting"/>
|
||||||
{{ $t('batSetting') }}
|
{{ $t('roleSwitching') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 19px">
|
<div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 19px">
|
||||||
@@ -127,6 +131,11 @@
|
|||||||
<a-icon type="setting"/>
|
<a-icon type="setting"/>
|
||||||
{{ $t('batSetting') }}
|
{{ $t('batSetting') }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="operator-text" v-if="this.$route.query.studioEngineer == this.userInfo().id"
|
||||||
|
@click="roleSwitchingClick">
|
||||||
|
<a-icon type="setting"/>
|
||||||
|
{{ $t('roleSwitching') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%">
|
<div style="width: 100%">
|
||||||
@@ -305,6 +314,45 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
<a-modal
|
||||||
|
:title="$t('roleSwitching')"
|
||||||
|
:width="500"
|
||||||
|
:visible="visibleRoleSwitching"
|
||||||
|
:confirm-loading="confirmLoadingRoleSwitching"
|
||||||
|
:maskClosable="false"
|
||||||
|
@ok="handleOkRoleSwitching"
|
||||||
|
@cancel="handleCancelRoleSwitching"
|
||||||
|
>
|
||||||
|
<a-form-model :model="formInlineRoleSwitching" class="formAdd" :rules="rulesRoleSwitching"
|
||||||
|
ref="ruleFormRoleSwitching">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text-index">
|
||||||
|
<div class="title-text-Comment">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('roleSwitching')">{{$t('roleSwitching')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModelComment" :prop="'roleSwitchingCode'">
|
||||||
|
<a-select allowClear :placeholder="$t('pleaseSelect')+$t('roleSwitching')"
|
||||||
|
v-model="formInlineRoleSwitching.roleSwitchingCode">
|
||||||
|
<!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
|
||||||
|
<a-select-option :value="'0'">
|
||||||
|
<span class="itemOption-index" :title="$t('StudioEngineer')">
|
||||||
|
{{$t('StudioEngineer')}}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
<a-select-option :value="'4'">
|
||||||
|
<span class="itemOption-index" :title="$t('regulatoryEngineerOrcertifiedEngineer')">
|
||||||
|
{{$t('regulatoryEngineerOrcertifiedEngineer')}}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-modal>
|
||||||
<resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef"/>
|
<resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef"/>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -746,13 +794,26 @@
|
|||||||
text: this.$t('zoneOfApplication'),
|
text: this.$t('zoneOfApplication'),
|
||||||
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
visibleRoleSwitching: false,
|
||||||
|
confirmLoadingRoleSwitching: false,
|
||||||
|
formInlineRoleSwitching: {},
|
||||||
|
rulesRoleSwitching: {
|
||||||
|
roleSwitchingCode: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('roleSwitching') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.$route.query.studioEngineer == this.userInfo().id) {
|
if (this.$route.query.studioEngineer == this.userInfo().id) {
|
||||||
this.isDisplay = true
|
this.isDisplay = true
|
||||||
|
this.formInlineRoleSwitching.roleSwitchingCode = '0'
|
||||||
} else {
|
} else {
|
||||||
this.isDisplay = false
|
this.isDisplay = false
|
||||||
}
|
}
|
||||||
@@ -905,6 +966,34 @@
|
|||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.addModelRef.addModel()
|
this.$refs.addModelRef.addModel()
|
||||||
},
|
},
|
||||||
|
handleOkRoleSwitching() {
|
||||||
|
this.$refs.ruleFormRoleSwitching.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.formInlineRoleSwitching.roleSwitchingCode == '0') {
|
||||||
|
this.isDisplay = true
|
||||||
|
} else {
|
||||||
|
this.isDisplay = false
|
||||||
|
}
|
||||||
|
this.visibleRoleSwitching = false
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancelRoleSwitching() {
|
||||||
|
this.visibleRoleSwitching = false
|
||||||
|
},
|
||||||
|
roleSwitchingClick() {
|
||||||
|
this.visibleRoleSwitching = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleFormRoleSwitching.clearValidate()
|
||||||
|
if (this.isDisplay) {
|
||||||
|
this.formInlineRoleSwitching.roleSwitchingCode = '0'
|
||||||
|
} else {
|
||||||
|
this.formInlineRoleSwitching.roleSwitchingCode = '4'
|
||||||
|
}
|
||||||
|
this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
|
||||||
|
})
|
||||||
|
},
|
||||||
handleDel() {
|
handleDel() {
|
||||||
if (this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys.length > 0) {
|
||||||
let _this = this
|
let _this = this
|
||||||
@@ -995,10 +1084,17 @@
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
|
let roleCode
|
||||||
|
if (this.isDisplay) {
|
||||||
|
roleCode = 0
|
||||||
|
} else {
|
||||||
|
roleCode = 4
|
||||||
|
}
|
||||||
let query = {
|
let query = {
|
||||||
...this.queryParamQuery,
|
...this.queryParamQuery,
|
||||||
...this.queryParam,
|
...this.queryParam,
|
||||||
projectLibraryId: this.$route.query.id
|
projectLibraryId: this.$route.query.id,
|
||||||
|
roleCode: roleCode
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
@@ -1589,7 +1685,9 @@
|
|||||||
.box-input .ant-select-selection__rendered {
|
.box-input .ant-select-selection__rendered {
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
}
|
}
|
||||||
|
.popconfirm{
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
.popconfirm .ant-popover-buttons {
|
.popconfirm .ant-popover-buttons {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,19 +136,19 @@
|
|||||||
title: this.$t('RoleCode'),
|
title: this.$t('RoleCode'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'roleCode',
|
dataIndex: 'roleCode',
|
||||||
width: 180
|
width: 280
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('roleName'),
|
title: this.$t('roleName'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'roleName',
|
dataIndex: 'roleName',
|
||||||
width: 180
|
width: 280
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('createTime'),
|
title: this.$t('createTime'),
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 280,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return moment(text).format('YYYY-MM-DD')
|
return moment(text).format('YYYY-MM-DD')
|
||||||
|
|||||||
Reference in New Issue
Block a user