feat: 业务和项目标签名称统一从接口取
parent
b1474b229e
commit
15df2c6448
|
@ -15,7 +15,7 @@ const state = {
|
|||
sidebarColor: ''
|
||||
},
|
||||
pageConfig: {},
|
||||
systemConfig: {},
|
||||
systemConfig: JSON.parse(localStorage.getItem('systemConfig')) || {},
|
||||
userData: null,
|
||||
appPath: '',
|
||||
operateTime: '',
|
||||
|
@ -65,6 +65,10 @@ const mutations = {
|
|||
state.pageConfig = data
|
||||
},
|
||||
SETTING_SYSTEM_CONFIG(state, data) {
|
||||
// 为什么不用 csc 的方式 管理端父传子是异步方式 可能导致表格列渲染完成后接口还没返回
|
||||
data.projectConfigLabel = data.projectConfigLabel || '项目'
|
||||
data.serviceConfigLabel = data.serviceConfigLabel || '业务'
|
||||
localStorage.setItem('systemConfig', JSON.stringify(data))
|
||||
state.systemConfig = data
|
||||
},
|
||||
SETTING_THEME(state, data) {
|
||||
|
@ -110,7 +114,7 @@ const actions = {
|
|||
}
|
||||
},
|
||||
async GetSystemConfigs({ commit }) {
|
||||
const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime' });
|
||||
const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime,serviceConfigLabel,projectConfigLabel' });
|
||||
if (data.success) {
|
||||
commit('SETTING_SYSTEM_CONFIG', data.data);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/**
|
||||
* Created by HaijunZhang on 2019/4/28.
|
||||
*/
|
||||
/** * Created by HaijunZhang on 2019/4/28. */
|
||||
<template>
|
||||
<div>
|
||||
<el-divider></el-divider>
|
||||
|
@ -12,14 +10,14 @@
|
|||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<basic-form-item label="所属业务:">
|
||||
<basic-form-item :label="'所属' + $store.getters.systemConfig.serviceConfigLabel + ':'">
|
||||
<el-select v-model="addData.location.businessId" @change="getProject" clearable>
|
||||
<el-option v-for="(item, index) in bizsList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</basic-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<basic-form-item label="应用系统:">
|
||||
<basic-form-item :label="$store.getters.systemConfig.projectConfigLabel + ':'">
|
||||
<el-input v-model="projectName" v-if="itemData && !$route.query.id"></el-input>
|
||||
<el-select v-else v-model="addData.location.projectId" @change="getUser">
|
||||
<el-option v-for="(item, index) in projectList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||
|
@ -100,7 +98,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getBizs()
|
||||
this.getUser();
|
||||
this.getUser()
|
||||
if (this.itemData) {
|
||||
this.getProjectName(this.addData.location.projectId)
|
||||
} else {
|
||||
|
@ -120,10 +118,10 @@ export default {
|
|||
},
|
||||
async getProjectName(projectId) {
|
||||
// 未选择应用系统情况
|
||||
if (!projectId) return;
|
||||
const res = await getProjectDetailInfo(projectId);
|
||||
if (!projectId) return
|
||||
const res = await getProjectDetailInfo(projectId)
|
||||
if (res.success) {
|
||||
this.projectName = res.data.name;
|
||||
this.projectName = res.data.name
|
||||
}
|
||||
},
|
||||
getProject() {
|
||||
|
|
Loading…
Reference in New Issue