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

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

View File

@ -381,6 +381,20 @@ export default {
getProjectApplication(){ getProjectApplication(){
this.$get('/project_application/get/' + getCurrentProjectID()+"/PERFORMANCE_SHARE_REPORT_TIME", res => { this.$get('/project_application/get/' + getCurrentProjectID()+"/PERFORMANCE_SHARE_REPORT_TIME", res => {
if(res.data){ 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; this.application = res.data;
} }
}); });

View File

@ -2,11 +2,11 @@
<app-manage-item :title="title" :append-span="3" :middle-span="12" :prepend-span="9"> <app-manage-item :title="title" :append-span="3" :middle-span="12" :prepend-span="9">
<template #middle> <template #middle>
<el-row> <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('commons.validity_period') }}</div>
<div class="timing_name" v-if="!shareLink">{{ $t('project.keep_recent') }}</div> <div class="timing_name" v-if="!shareLink">{{ $t('project.keep_recent') }}</div>
</el-col> </el-col>
<el-col span="16"> <el-col :span="16">
<el-select v-model="selfQuantity" placeholder=" " size="mini" filterable <el-select v-model="selfQuantity" placeholder=" " size="mini" filterable
allow-create allow-create
class="timing_select" :disabled="selfChoose"> class="timing_select" :disabled="selfChoose">
@ -27,7 +27,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-col> </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> <div class="timing_name" v-if="!shareLink" style="margin-left: 3px;">{{ $t('commons.report') }}</div>
</el-col> </el-col>
</el-row> </el-row>
@ -92,7 +92,7 @@ export default {
}, },
data() { data() {
return { return {
selfQuantity: "", selfQuantity: Number,
selfUnit: "", selfUnit: "",
selfChoose: this.choose, selfChoose: this.choose,
selfExpr: this.expr, selfExpr: this.expr,
@ -106,6 +106,19 @@ export default {
this.selfChoose = false; this.selfChoose = false;
return 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:choose", val);
this.$emit("update:expr", this.selfQuantity + this.selfUnit); this.$emit("update:expr", this.selfQuantity + this.selfUnit);
this.$emit("chooseChange"); 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+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+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+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> </el-tabs>
<ms-main-container> <ms-main-container>
<ms-person-from-setting v-if="activeIndex==='commons.personal_setting'" :form = form @getPlatformInfo = "getPlatformInfo" @cancel = "cancel" /> <ms-person-from-setting v-if="activeIndex==='commons.personal_setting'" :form = form @getPlatformInfo = "getPlatformInfo" @cancel = "cancel" />
@ -65,7 +65,6 @@
//persons: getMenus('person'), //persons: getMenus('person'),
activeIndex: 'commons.personal_setting', activeIndex: 'commons.personal_setting',
ruleForm:{}, ruleForm:{},
isShowText:false,
hasJira: false, hasJira: false,
hasTapd: false, hasTapd: false,
hasZentao: false, hasZentao: false,
@ -190,10 +189,7 @@
}, },
}, },
created() { created() {
this.isShowText = hasPermission('PERSONAL_INFORMATION:READ+THIRD_ACCOUNT');
this.initTableData(); this.initTableData();
} }
} }

View File

@ -84,6 +84,20 @@ export default {
getProjectApplication(){ getProjectApplication(){
this.$get('/project_application/get/' + getCurrentProjectID()+"/TRACK_SHARE_REPORT_TIME", res => { this.$get('/project_application/get/' + getCurrentProjectID()+"/TRACK_SHARE_REPORT_TIME", res => {
if(res.data){ 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; this.application = res.data;
} }
}); });

View File

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

View File

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

View File

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