feat: 业务和项目标签名称统一从接口取
parent
b1474b229e
commit
15df2c6448
|
@ -15,7 +15,7 @@ const state = {
|
||||||
sidebarColor: ''
|
sidebarColor: ''
|
||||||
},
|
},
|
||||||
pageConfig: {},
|
pageConfig: {},
|
||||||
systemConfig: {},
|
systemConfig: JSON.parse(localStorage.getItem('systemConfig')) || {},
|
||||||
userData: null,
|
userData: null,
|
||||||
appPath: '',
|
appPath: '',
|
||||||
operateTime: '',
|
operateTime: '',
|
||||||
|
@ -65,6 +65,10 @@ const mutations = {
|
||||||
state.pageConfig = data
|
state.pageConfig = data
|
||||||
},
|
},
|
||||||
SETTING_SYSTEM_CONFIG(state, data) {
|
SETTING_SYSTEM_CONFIG(state, data) {
|
||||||
|
// 为什么不用 csc 的方式 管理端父传子是异步方式 可能导致表格列渲染完成后接口还没返回
|
||||||
|
data.projectConfigLabel = data.projectConfigLabel || '项目'
|
||||||
|
data.serviceConfigLabel = data.serviceConfigLabel || '业务'
|
||||||
|
localStorage.setItem('systemConfig', JSON.stringify(data))
|
||||||
state.systemConfig = data
|
state.systemConfig = data
|
||||||
},
|
},
|
||||||
SETTING_THEME(state, data) {
|
SETTING_THEME(state, data) {
|
||||||
|
@ -110,7 +114,7 @@ const actions = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async GetSystemConfigs({ commit }) {
|
async GetSystemConfigs({ commit }) {
|
||||||
const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime' });
|
const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime,serviceConfigLabel,projectConfigLabel' });
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
commit('SETTING_SYSTEM_CONFIG', data.data);
|
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>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
|
@ -12,16 +10,16 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<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-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-option v-for="(item, index) in bizsList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</basic-form-item>
|
</basic-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<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-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-option v-for="(item, index) in projectList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</basic-form-item>
|
</basic-form-item>
|
||||||
|
@ -30,14 +28,14 @@
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<basic-form-item label="申请人:">
|
<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-option v-for="(item, index) in userList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</basic-form-item>
|
</basic-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<basic-form-item label="使用人:">
|
<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-option v-for="(item, index) in userList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</basic-form-item>
|
</basic-form-item>
|
||||||
|
@ -46,7 +44,7 @@
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<basic-form-item label="维护人:">
|
<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-option v-for="(item, index) in userList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</basic-form-item>
|
</basic-form-item>
|
||||||
|
@ -94,13 +92,13 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
userData () {
|
userData() {
|
||||||
return this.$store.state.app.userData
|
return this.$store.state.app.userData
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getBizs()
|
this.getBizs()
|
||||||
this.getUser();
|
this.getUser()
|
||||||
if (this.itemData) {
|
if (this.itemData) {
|
||||||
this.getProjectName(this.addData.location.projectId)
|
this.getProjectName(this.addData.location.projectId)
|
||||||
} else {
|
} else {
|
||||||
|
@ -108,7 +106,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getBizs () {
|
getBizs() {
|
||||||
getBizs({
|
getBizs({
|
||||||
page: 1,
|
page: 1,
|
||||||
rows: 9999
|
rows: 9999
|
||||||
|
@ -120,13 +118,13 @@ export default {
|
||||||
},
|
},
|
||||||
async getProjectName(projectId) {
|
async getProjectName(projectId) {
|
||||||
// 未选择应用系统情况
|
// 未选择应用系统情况
|
||||||
if (!projectId) return;
|
if (!projectId) return
|
||||||
const res = await getProjectDetailInfo(projectId);
|
const res = await getProjectDetailInfo(projectId)
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.projectName = res.data.name;
|
this.projectName = res.data.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getProject () {
|
getProject() {
|
||||||
conditionProject({
|
conditionProject({
|
||||||
condition: JSON.stringify({
|
condition: JSON.stringify({
|
||||||
condition: 'listApplyProjects',
|
condition: 'listApplyProjects',
|
||||||
|
@ -139,7 +137,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getUser () {
|
getUser() {
|
||||||
getUser({
|
getUser({
|
||||||
page: 1,
|
page: 1,
|
||||||
rows: 9999,
|
rows: 9999,
|
||||||
|
|
Loading…
Reference in New Issue