fix(系统设置): 用户权限没有查看服务集成的权限个人信息三方tab也不展示

--user=郭雨琦 用户权限没有查看服务集成的权限个人信息三方tab也不展示_报告分享时间只能输入数字
This commit is contained in:
guoyuqi 2022-02-17 14:39:58 +08:00 committed by fit2-zhao
parent cffb03c9c9
commit 24e5319c36
7 changed files with 49 additions and 9 deletions

View File

@ -381,6 +381,20 @@ export default {
getProjectApplication(){
this.$get('/project_application/get/' + getCurrentProjectID()+"/PERFORMANCE_SHARE_REPORT_TIME", res => {
if(res.data){
let quantity = res.data.typeValue.substring(0, res.data.typeValue.length - 1);
let unit = res.data.typeValue.substring(res.data.typeValue.length - 1);
if(unit==='H'){
res.data.typeValue = quantity+this.$t('commons.date_unit.hour');
}else
if(unit==='D'){
res.data.typeValue = quantity+this.$t('commons.date_unit.day');
}else
if(unit==='M'){
res.data.typeValue = quantity+this.$t('commons.date_unit.month');
}else
if(unit==='Y'){
res.data.typeValue = quantity+this.$t('commons.date_unit.year');
}
this.application = res.data;
}
});

View File

@ -2,11 +2,11 @@
<app-manage-item :title="title" :append-span="3" :middle-span="12" :prepend-span="9">
<template #middle>
<el-row>
<el-col span="5">
<el-col :span="5">
<div class="timing_name" v-if="shareLink">{{ $t('commons.validity_period') }}</div>
<div class="timing_name" v-if="!shareLink">{{ $t('project.keep_recent') }}</div>
</el-col>
<el-col span="16">
<el-col :span="16">
<el-select v-model="selfQuantity" placeholder=" " size="mini" filterable
allow-create
class="timing_select" :disabled="selfChoose">
@ -27,7 +27,7 @@
</el-option>
</el-select>
</el-col>
<el-col span="3">
<el-col :span="3">
<div class="timing_name" v-if="!shareLink" style="margin-left: 3px;">{{ $t('commons.report') }}</div>
</el-col>
</el-row>
@ -92,7 +92,7 @@ export default {
},
data() {
return {
selfQuantity: "",
selfQuantity: Number,
selfUnit: "",
selfChoose: this.choose,
selfExpr: this.expr,
@ -106,6 +106,19 @@ export default {
this.selfChoose = false;
return false;
}
if(val && this.selfQuantity){
if(typeof this.selfQuantity!=='number'&&isNaN(parseInt(this.selfQuantity))){
this.$warning(this.$t('api_test.request.time')+this.$t('commons.type_of_num'));
this.selfChoose = false;
return false;
}
if(this.selfQuantity<=0||parseInt(this.selfQuantity)<=0){
this.$warning(this.$t('commons.adv_search.operators.gt')+"0");
this.selfChoose = false;
return false;
}
}
this.$emit("update:choose", val);
this.$emit("update:expr", this.selfQuantity + this.selfUnit);
this.$emit("chooseChange");

View File

@ -4,7 +4,7 @@
<el-tab-pane v-if="hasPermission('PERSONAL_INFORMATION:READ+EDIT')" name="commons.personal_setting" :label="$t('commons.personal_setting')" class="setting-item" ></el-tab-pane>
<el-tab-pane v-if="hasPermission('PERSONAL_INFORMATION:READ+API_KEYS')" name="commons.api_keys" :label="$t('commons.api_keys')" class="setting-item" ></el-tab-pane>
<el-tab-pane v-if="hasPermission('PERSONAL_INFORMATION:READ+EDIT_PASSWORD')" name="change_password" :label="$t('member.edit_password')" class="setting-item" ></el-tab-pane>
<el-tab-pane v-if="hasPermission('PERSONAL_INFORMATION:READ+THIRD_ACCOUNT')&&(hasJira||hasTapd||hasZentao||hasAzure)" name="third_account" :label="$t('commons.third_account')" class="setting-item" ></el-tab-pane>
<el-tab-pane v-if="hasPermission('PERSONAL_INFORMATION:READ+THIRD_ACCOUNT')&&(hasJira||hasTapd||hasZentao||hasAzure)&&hasPermission('WORKSPACE_SERVICE:READ')" name="third_account" :label="$t('commons.third_account')" class="setting-item" ></el-tab-pane>
</el-tabs>
<ms-main-container>
<ms-person-from-setting v-if="activeIndex==='commons.personal_setting'" :form = form @getPlatformInfo = "getPlatformInfo" @cancel = "cancel" />
@ -65,7 +65,6 @@
//persons: getMenus('person'),
activeIndex: 'commons.personal_setting',
ruleForm:{},
isShowText:false,
hasJira: false,
hasTapd: false,
hasZentao: false,
@ -190,10 +189,7 @@
},
},
created() {
this.isShowText = hasPermission('PERSONAL_INFORMATION:READ+THIRD_ACCOUNT');
this.initTableData();
}
}

View File

@ -84,6 +84,20 @@ export default {
getProjectApplication(){
this.$get('/project_application/get/' + getCurrentProjectID()+"/TRACK_SHARE_REPORT_TIME", res => {
if(res.data){
let quantity = res.data.typeValue.substring(0, res.data.typeValue.length - 1);
let unit = res.data.typeValue.substring(res.data.typeValue.length - 1);
if(unit==='H'){
res.data.typeValue = quantity+this.$t('commons.date_unit.hour');
}else
if(unit==='D'){
res.data.typeValue = quantity+this.$t('commons.date_unit.day');
}else
if(unit==='M'){
res.data.typeValue = quantity+this.$t('commons.date_unit.month');
}else
if(unit==='Y'){
res.data.typeValue = quantity+this.$t('commons.date_unit.year');
}
this.application = res.data;
}
});

View File

@ -240,6 +240,7 @@ export default {
cancel_follow_success: "Cancel Follow Success",
generate_test_data: "Generate test data",
type: "Type",
type_of_num:"Only Number",
validity_period:'Validity Period',
please_select_a_deadline: "Please select a deadline",
relationship: {

View File

@ -240,6 +240,7 @@ export default {
follow_success: "关注成功",
cancel_follow_success: "取消关注成功",
type: "类型",
type_of_num:"只能输入数字类型",
validity_period:'有效期',
please_select_a_deadline: "请选择截止时间",
relationship: {

View File

@ -240,6 +240,7 @@ export default {
follow_success: "關註成功",
cancel_follow_success: "取消關註成功",
type: "類型",
type_of_num:"只能輸入數字類型",
validity_period:'有效期',
please_select_a_deadline: "請選擇截止時間",
relationship: {