修改认证参数角色切换

This commit is contained in:
zyx.net
2022-07-26 12:21:45 +08:00
parent 47eb23796c
commit 6acd3f1fd9
5 changed files with 154 additions and 121 deletions
+3
View File
@@ -1186,4 +1186,7 @@ module.exports = {
translatedText:'Translated Text', translatedText:'Translated Text',
Administrativeprivileges:'Administrativ Pprivileges', Administrativeprivileges:'Administrativ Pprivileges',
Checkthepermissions:'Check The Permissions', Checkthepermissions:'Check The Permissions',
selectDirectorylocation: 'Please select the directory location to add the folder',
Fileuploaded:'File uploaded, please wait',
uploadedbyyourself:'You can only delete files and data uploaded by yourself',
} }
+3
View File
@@ -577,6 +577,7 @@ module.exports = {
documentSplitTemplate: '文档拆分模板', documentSplitTemplate: '文档拆分模板',
batSetting: '批量设置', batSetting: '批量设置',
selectDirectoryTerms: '请选择添加条款的目录位置', selectDirectoryTerms: '请选择添加条款的目录位置',
selectDirectorylocation: '请选择添加文件夹的目录位置',
OnlyWordItem: '只有GSO文件类型,才能拆分pdf文件,请重新选择文件', OnlyWordItem: '只有GSO文件类型,才能拆分pdf文件,请重新选择文件',
OnlyWord: '只能导入word文件', OnlyWord: '只能导入word文件',
labelAreaDeleted: '若进行删除,则该展示区域下标签项都将被删除', labelAreaDeleted: '若进行删除,则该展示区域下标签项都将被删除',
@@ -916,6 +917,7 @@ module.exports = {
startMonth: '开始日期', startMonth: '开始日期',
endMonth: '结束日期', endMonth: '结束日期',
Importing: '导入中...', Importing: '导入中...',
Fileuploaded:'文件上传中,请稍后',
projectDeliveryDescription: '工程交付说明', projectDeliveryDescription: '工程交付说明',
cancelConfirm: '取消确认', cancelConfirm: '取消确认',
currentInformation: '当前信息', currentInformation: '当前信息',
@@ -1190,4 +1192,5 @@ module.exports = {
translatedText:'译文', translatedText:'译文',
Administrativeprivileges:'管理权限', Administrativeprivileges:'管理权限',
Checkthepermissions:'查看权限', Checkthepermissions:'查看权限',
uploadedbyyourself:'只能删除自己上传的文件数据',
} }
@@ -1,96 +1,70 @@
<template> <template>
<div> <div>
<a-modal <a-modal
:title="title" :title="title"
:maskClosable="false" :maskClosable="false"
:width="800" :width="800"
placement="right" placement="right"
:closable="true" :closable="true"
@cancel="handleCancel" @cancel="handleCancel"
:visible="visible" :visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;"> style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading"> <a-spin :tip="this.$t('Fileuploaded')" :spinning='spinning'>
<a-form> <a-form>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm"> <a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('fileName')">{{$t('fileName')}}</span> :title="$t('fileName')">{{$t('fileName')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="fileName"> <a-form-model-item class="itemModel" prop="sourceFileId">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
@click="clickButtonToUpload('fileName')"> @click="clickButtonToUpload('sourceFileId')">
{{ (formInline['fileName'] === 'null' || formInline['fileName'] === '' || {{ (formInline.sourceFileId === 'null' || formInline.sourceFileId === '' ||
formInline['fileName'] == null) ? $t('clickUpload') : $t('viewUploadedFiles') formInline.sourceFileId == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('fileDeclaration')">{{$t('fileDeclaration')}}</span> <span class="title-text-text" :title="$t('fileDeclaration')">{{$t('fileDeclaration')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="region"> <a-form-model-item class="itemModel" prop="description">
<a-input class="box-input add-input" <a-input class="box-input add-input"
type="textarea" type="textarea"
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('fileDeclaration')" :placeholder="$t('PleaseEnter')+$t('fileDeclaration')"
v-model="formInline.description"/> v-model="formInline.description"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<!-- <a-row :gutter="24">--> </a-form-model>
<!-- <a-col :span="24">--> </a-form>
<!-- <div class="box-title-text">--> </a-spin>
<!-- <div class="title-text">--> <div class="drawer-bootom-button">
<!-- <span class="title-text-text"--> <a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<!-- :title="$t('Openpersonnel')">{{$t('Openpersonnel')}}</span>--> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
<!-- </div>--> </div>
<!-- <a-form-model-item class="itemModel" prop="description">--> </a-modal>
<!-- <PersonnelSelection-->
<!-- :query="{db_field_name:'Openpersonnel',db_field_txt:$t('Openpersonnel')}"-->
<!-- :personneQuery="formInline"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- v-model="formInline.Openpersonnel"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="24">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Downloadprivileges')">{{$t('Downloadprivileges')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="description">-->
<!-- <PersonnelSelection-->
<!-- :query="{db_field_name:'Downloadprivileges',db_field_txt:$t('Downloadprivileges')}"-->
<!-- :personneQuery="formInline"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- v-model="formInline.lawEngineerName"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
</a-form-model>
</a-form>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-modal>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/> <uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
<!-- <div class="loading-box" v-if="spinning">-->
<!-- <div class="loading-content">-->
<!-- <a-icon class="loading" type="loading"/>-->
<!-- <div class="loading-tips">-->
<!-- {{this.$t('Fileuploaded')}}...-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div> </div>
</template> </template>
@@ -106,26 +80,29 @@ export default {
PersonnelSelection, PersonnelSelection,
uploadFile uploadFile
}, },
props: ['url'], // props: ['url'],
data() { data() {
return { return {
formInline: {}, formInline: {},
confirmLoading: false, confirmLoading: false,
spinning: false,
visible: false, visible: false,
url: {
add: 'params/template/add',
edit: 'params/template/edit',
},
rules: { rules: {
paramsTemplateName:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('parameterTemplate'), trigger: 'blur' },
{ min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
],
description:[ description:[
{ min:1, max: 300, message: this.$t('cantExeed')+'300'+this.$t('characters'), trigger: 'blur' }, // { required: true, message: this.$t('PleaseEnter')+this.$t('fileDeclaration'), trigger: 'blur' },
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
], ],
state: [ sourceFileId: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('status'), trigger: 'change' }, {
required: true,
message: this.$t('fileName') + this.$t('cannotEmpty'),
trigger: 'change'
}
], ],
region: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('zoneOfApplication'), trigger: 'change' },
]
}, },
disabled: false, disabled: false,
projectNameList: [], projectNameList: [],
@@ -162,7 +139,12 @@ export default {
}) })
}, },
handleCancel() { handleCancel() {
this.visible = false if(this.spinning == true){
this.visible = true
return
}else{
this.visible = false
}
}, },
handleSubmit() { handleSubmit() {
if(this.formInline.paramsTemplateName !== undefined) { if(this.formInline.paramsTemplateName !== undefined) {
@@ -170,6 +152,7 @@ export default {
} }
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
this.spinning = true
let url = '' let url = ''
let Action let Action
if (this.formInline.id) { if (this.formInline.id) {
@@ -185,14 +168,14 @@ export default {
query[res] = query[res].join(',') query[res] = query[res].join(',')
} }
}) })
this.confirmLoading = true postAction(url, query).then((res) => {
Action(url, query).then((res) => {
if (res.success) { if (res.success) {
this.confirmLoading = false this.spinning = false
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.visible = false this.visible = false
this.$emit('addModelList') this.$emit('addModelList')
} else { } else {
this.spinning = false
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false this.confirmLoading = false
} }
@@ -357,4 +340,40 @@ export default {
.ant-input-disabled { .ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important; color: rgba(0, 0, 0, 0.65) !important;
} }
</style>
<style scoped lang="less">
.loading-box {
position: fixed;
top: 0;
left: 0;
z-index: 9999900;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.9);
border-radius: 8px;
user-select: none;
.loading-content {
position: absolute;
top: 50%;
left: 50%;
color: #21c9cc;
transform: translate(-50%, -50%);
text-align: center;
.loading {
font-size: 28px;
}
.spin-loading {
animation: rotating 2s linear infinite;
}
.loading-tips {
margin-top: 5px;
font-size: 16px;
color: #21c9cc;
}
}
}
</style> </style>
+21 -12
View File
@@ -164,7 +164,7 @@
/> />
</div> </div>
<!-- 上传文件--> <!-- 上传文件-->
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/> <addModel ref="addModelRef" @addModelList="addModelList"/>
<!-- 文件详情--> <!-- 文件详情-->
<handleModel :url="url" ref="handleModelRef" /> <handleModel :url="url" ref="handleModelRef" />
<!-- 添加节点--> <!-- 添加节点-->
@@ -189,14 +189,14 @@
<a-form-model-item :label="$t('Foldername')" prop="name"> <a-form-model-item :label="$t('Foldername')" prop="name">
<a-input class="box-input add-input" v-model="form.name" :placeholder="$t('PleaseEnter')+$t('Foldername')"/> <a-input class="box-input add-input" v-model="form.name" :placeholder="$t('PleaseEnter')+$t('Foldername')"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item :label="$t('Administrativeprivileges')" prop="itemName"> <a-form-model-item :label="$t('Administrativeprivileges')" prop="Administrativeprivileges">
<PersonnelSelection class="box-input add-input" <PersonnelSelection class="box-input add-input"
:personneQuery="form" :personneQuery="form"
:query="{db_field_name:'Administrativeprivileges',db_field_txt:$t('Administrativeprivileges')}" :query="{db_field_name:'Administrativeprivileges',db_field_txt:$t('Administrativeprivileges')}"
@change="PersonnelSelectionChange" @change="PersonnelSelectionChange"
v-model="form.Administrativeprivileges"/> v-model="form.Administrativeprivileges"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item :label="$t('Checkthepermissions')" prop="itemName"> <a-form-model-item :label="$t('Checkthepermissions')" prop="Checkthepermissions">
<PersonnelSelection <PersonnelSelection
class="box-input add-input" class="box-input add-input"
:personneQuery="form" :personneQuery="form"
@@ -283,15 +283,17 @@ export default {
form: {}, form: {},
rules: { rules: {
name: [ name: [
{ required: true, message: this.$t('PleaseEnter') + this.$t('clauseNo'), trigger: 'blur' }, { required: true, message: this.$t('PleaseEnter') + this.$t('Foldername'), trigger: 'blur' },
{ min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' } { min: 1, max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' }
], ],
itemName: [ Administrativeprivileges: [
{ required: true, message: this.$t('PleaseEnter') + this.$t('clauseName'), trigger: 'blur' }, { required: true, message: this.$t('PleaseSelect') + this.$t('Administrativeprivileges'), trigger: 'change' },
{ min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' } ],
Checkthepermissions: [
{ required: true, message: this.$t('PleaseSelect') + this.$t('Checkthepermissions'), trigger: 'change' },
], ],
displaySeq: [ displaySeq: [
{ required: true, message: this.$t('PleaseEnter') + this.$t('serialNumber'), trigger: 'blur' } { required: true, message: this.$t('PleaseEnter') + this.$t('Folderorder'), trigger: 'blur' }
// { min: 1, max: 99999, message: this.$t('cantExeed') + '99999' + this.$t('characters'), trigger: 'blur' }, // { min: 1, max: 99999, message: this.$t('cantExeed') + '99999' + this.$t('characters'), trigger: 'blur' },
] ]
}, },
@@ -809,8 +811,15 @@ export default {
downloadFile('split/sarFileSplitItems/exportSplitInfoZip', name, query, this.selectClear) downloadFile('split/sarFileSplitItems/exportSplitInfoZip', name, query, this.selectClear)
}, },
onChange(){ onChange(value,dateString){
if (this.queryParams.uploadTime && this.queryParams.uploadTime.length > 0) {
let dateOne = moment(dateString[0]).format('YYYY-MM-DD')
let dateTwo = moment(dateString[1]).format('YYYY-MM-DD')
this.queryParams.uploadTime = [dateOne, dateTwo]
} else {
this.queryParams.uploadTime = []
// this.queryParamOne[item + '_name'] = []
}
}, },
selectClear() { selectClear() {
this.$refs.splitDetailTabel.selectedRowKeys = [] this.$refs.splitDetailTabel.selectedRowKeys = []
@@ -959,7 +968,7 @@ export default {
if (this.menuId) { if (this.menuId) {
this.$refs.addModelRef.addModel() this.$refs.addModelRef.addModel()
} else { } else {
this.$message.warning(this.$t('selectDirectoryTerms')) this.$message.warning(this.$t('selectDirectorylocation'))
} }
}, },
@@ -3,7 +3,7 @@
<div class="Virtual-detail-header" style="position: fixed;top: 0"> <div class="Virtual-detail-header" style="position: fixed;top: 0">
<div class="Virtual-detail-title"> <div class="Virtual-detail-title">
<span> <span>
{{$t('ParameteItemCollectionList')}}({{$t(this.$route.query.projectName)}}) — {{$t(this.paramsManifest.title)}} {{$t('ParameteItemCollectionList')}}({{$t(this.$route.query.projectName)}}) — {{$t(this.$route.query.title)}}
</span> </span>
</div> </div>
</div> </div>
@@ -648,7 +648,6 @@
mounted() { mounted() {
this.GetgetLoginUserType() this.GetgetLoginUserType()
console.log(this.currentPersonRole) console.log(this.currentPersonRole)
this.LoginUserType()
setTimeout(() => { setTimeout(() => {
if (this.currentPersonRole == 'dre') { if (this.currentPersonRole == 'dre') {
this.handlePreservation() this.handlePreservation()
@@ -1035,12 +1034,12 @@
this.currentPersonRole = currentPersonRole || userType || val[0].value this.currentPersonRole = currentPersonRole || userType || val[0].value
} }
this.RoleType = val this.RoleType = val
this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || userType || val[0].value this.RoleType.forEach((item,index) => {
val.forEach((item,index) => {
if(item.value == this.currentPersonRole){ if(item.value == this.currentPersonRole){
this.rolename = item.label this.rolename = item.label
} }
}) })
this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || userType || val[0].value
this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching } this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
}, },
// 表格所选中得行内容 // 表格所选中得行内容