master
xy 3 years ago
parent d90edb70bb
commit 415c0acfd9

@ -20,6 +20,7 @@ const getDefaultState = () => {
name: '', name: '',
username:'', username:'',
avatar: '', avatar: '',
department: {},
roles: [] roles: []
} }
} }
@ -47,6 +48,9 @@ const mutations = {
}, },
SET_ROLES: (state, roles) => { SET_ROLES: (state, roles) => {
state.roles = roles state.roles = roles
},
SET_DEPARTMENT: (state, department) => {
state.department = department
} }
} }
@ -123,7 +127,8 @@ const actions = {
roles, roles,
name, name,
username, username,
avatar avatar,
department
} = response } = response
commit('SET_USERNAME',username) commit('SET_USERNAME',username)
@ -131,6 +136,7 @@ const actions = {
commit('SET_ROLES', roles) commit('SET_ROLES', roles)
commit('SET_NAME', name) commit('SET_NAME', name)
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)
commit('SET_DEPARTMENT',department)
resolve(response) resolve(response)
}).catch(error => { }).catch(error => {
reject(error) reject(error)

@ -243,6 +243,8 @@ export default {
if (val) { if (val) {
if (this.type === "editor") { if (this.type === "editor") {
this.getDetail(); this.getDetail();
} else {
this.form.plan_department_id = this.$store.state.user.department?.id
} }
} else { } else {
this.id = ""; this.id = "";

@ -1,6 +1,6 @@
<template> <template>
<div style="padding: 0 20px;"> <div style="padding: 0 20px;">
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="绩效指标"> <lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="预算计划">
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<div class="selects"> <div class="selects">

@ -121,23 +121,18 @@
width: 320, width: 320,
align: "left", align: "left",
customFn: (row) => { customFn: (row) => {
{ if (row.act_plan_link.length > 0) {
if (row.act_plan_link.length > 0) { return row.act_plan_link.map(item => {
return row.act_plan_link.map(item => { return (
return ( < div > [{ <div>
item.plan.year [{item.plan?.year}] - {item.plan?.name}
}] - { <br/>
item.plan.name [使用金额] {item.use_money} </div>
} < br / > [使用金额] { )
item.use_money })
}
< /div>)
})
}
}
} }
}, }
},
{ {
prop: 'status', prop: 'status',
label: '状态', label: '状态',

Loading…
Cancel
Save