修改切換角色
This commit is contained in:
@@ -92,6 +92,10 @@
|
||||
<a-icon type="user"/>
|
||||
{{ $t('ExportReport') }}
|
||||
</div>
|
||||
<div class="operator-text-title" @click="batSettingClick">
|
||||
<a-icon type="setting"/>
|
||||
{{ $t('batSetting') }}
|
||||
</div>
|
||||
</template>
|
||||
<div class="operator-text" style="position: relative">
|
||||
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
|
||||
@@ -109,9 +113,9 @@
|
||||
<a-icon type="plus"/>
|
||||
{{ $t('add') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="batSettingClick">
|
||||
<div class="operator-text" @click="roleSwitchingClick">
|
||||
<a-icon type="setting"/>
|
||||
{{ $t('batSetting') }}
|
||||
{{ $t('roleSwitching') }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 19px">
|
||||
@@ -127,6 +131,11 @@
|
||||
<a-icon type="setting"/>
|
||||
{{ $t('batSetting') }}
|
||||
</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 style="width: 100%">
|
||||
@@ -305,6 +314,45 @@
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</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"/>
|
||||
</a-card>
|
||||
</template>
|
||||
@@ -746,13 +794,26 @@
|
||||
text: this.$t('zoneOfApplication'),
|
||||
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
}
|
||||
]
|
||||
],
|
||||
visibleRoleSwitching: false,
|
||||
confirmLoadingRoleSwitching: false,
|
||||
formInlineRoleSwitching: {},
|
||||
rulesRoleSwitching: {
|
||||
roleSwitchingCode: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('roleSwitching') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
if (this.$route.query.studioEngineer == this.userInfo().id) {
|
||||
this.isDisplay = true
|
||||
this.formInlineRoleSwitching.roleSwitchingCode = '0'
|
||||
} else {
|
||||
this.isDisplay = false
|
||||
}
|
||||
@@ -905,6 +966,34 @@
|
||||
handleAdd() {
|
||||
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() {
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
let _this = this
|
||||
@@ -995,10 +1084,17 @@
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
let roleCode
|
||||
if (this.isDisplay) {
|
||||
roleCode = 0
|
||||
} else {
|
||||
roleCode = 4
|
||||
}
|
||||
let query = {
|
||||
...this.queryParamQuery,
|
||||
...this.queryParam,
|
||||
projectLibraryId: this.$route.query.id
|
||||
projectLibraryId: this.$route.query.id,
|
||||
roleCode: roleCode
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
@@ -1589,7 +1685,9 @@
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
}
|
||||
|
||||
.popconfirm{
|
||||
z-index: 999;
|
||||
}
|
||||
.popconfirm .ant-popover-buttons {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user