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,16 +10,16 @@
|
|||
</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-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>
|
||||
</el-select>
|
||||
</basic-form-item>
|
||||
|
@ -30,14 +28,14 @@
|
|||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<basic-form-item label="申请人:">
|
||||
<el-select v-model="addData.location.creatorId" >
|
||||
<el-select v-model="addData.location.creatorId">
|
||||
<el-option v-for="(item, index) in userList" :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="使用人:">
|
||||
<el-select v-model="addData.location.ownerId" >
|
||||
<el-select v-model="addData.location.ownerId">
|
||||
<el-option v-for="(item, index) in userList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</basic-form-item>
|
||||
|
@ -46,7 +44,7 @@
|
|||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<basic-form-item label="维护人:">
|
||||
<el-select v-model="addData.location.menderId" >
|
||||
<el-select v-model="addData.location.menderId">
|
||||
<el-option v-for="(item, index) in userList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</basic-form-item>
|
||||
|
@ -94,13 +92,13 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
userData () {
|
||||
userData() {
|
||||
return this.$store.state.app.userData
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBizs()
|
||||
this.getUser();
|
||||
this.getUser()
|
||||
if (this.itemData) {
|
||||
this.getProjectName(this.addData.location.projectId)
|
||||
} else {
|
||||
|
@ -108,7 +106,7 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
getBizs () {
|
||||
getBizs() {
|
||||
getBizs({
|
||||
page: 1,
|
||||
rows: 9999
|
||||
|
@ -120,13 +118,13 @@ 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 () {
|
||||
getProject() {
|
||||
conditionProject({
|
||||
condition: JSON.stringify({
|
||||
condition: 'listApplyProjects',
|
||||
|
@ -139,7 +137,7 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
getUser () {
|
||||
getUser() {
|
||||
getUser({
|
||||
page: 1,
|
||||
rows: 9999,
|
||||
|
|
Loading…
Reference in New Issue