diff --git a/src/views/project/ProjectDetail.vue b/src/views/project/ProjectDetail.vue
index 51c8e80..0047c48 100644
--- a/src/views/project/ProjectDetail.vue
+++ b/src/views/project/ProjectDetail.vue
@@ -12,15 +12,16 @@
{{projectBasicInfo.trainSdate + ' - ' + projectBasicInfo.trainEdate}}
{{projectBasicInfo.practiceSdate + ' - ' + projectBasicInfo.practiceEdate}}
{{projectBasicInfo.examSdate + ' - ' + projectBasicInfo.examEdate}}
- {{projectBasicInfo.examNumber + '次'}}
- {{projectBasicInfo.mockExam == 1 ? '允许':'不允许'}}
+
+ {{projectBasicInfo.examNumber + '次'}}
+ {{projectBasicInfo.mockExam == 1 ? '允许':'不允许'}}
{{projectBasicInfo.remark}}
-
+
diff --git a/src/views/project/ProjectList.vue b/src/views/project/ProjectList.vue
index 4f3572a..9721159 100644
--- a/src/views/project/ProjectList.vue
+++ b/src/views/project/ProjectList.vue
@@ -97,7 +97,7 @@ export default {
return record.startDate + ' - ' + record.endDate
},
},
- { title: '人数', key: 'personNum', dataIndex: 'personNum', customRender: (text) => text + '人' },
+ // { title: '人数', key: 'personNum', dataIndex: 'personNum', customRender: (text) => text + '人' },
{
title: '项目类型', dataIndex: 'trainType', key: 'trainType', customRender: (text, record, index) => {
//项目类型
@@ -225,7 +225,7 @@ export default {
// let f = e.filter(item => {return item.key != 'status'})
c = c.filter(item => {return item.key != 'startDate'})
- c = c.filter(item => {return item.key != 'personNum'})
+ // c = c.filter(item => {return item.key != 'personNum'})
c = c.filter(item => {return item.key != 'status'})
this.columns = c
diff --git a/src/views/project/trainPlan/TrainPlanForm.vue b/src/views/project/trainPlan/TrainPlanForm.vue
index b087edc..98eff1a 100644
--- a/src/views/project/trainPlan/TrainPlanForm.vue
+++ b/src/views/project/trainPlan/TrainPlanForm.vue
@@ -9,8 +9,15 @@
{{ entity }}年度
- 选择项目
-
+
+
+
+
+ 选择项目
+
{{ index + 1 }}
@@ -19,13 +26,17 @@
- 保存
+ 保存
+
关闭
-
-
+
+
@@ -37,6 +48,9 @@
import { STable } from '@/components'
import { getProjectList } from '@/api/project/project'
import { trainPlanAdd, trainPlanGet } from '@/api/trainplan';
+import { orgList } from '@/api/org/org'
+import { listToTree } from '@/utils/util'
+const rootParentId = 0
export default {
// import引入的组件需要注入到对象中才能使用
@@ -47,6 +61,7 @@ export default {
return {
disabled: false,
title: '年度培训计划',
+ orgTree: [],
queryParam: {
pageNum: 1,
pageSize: 20
@@ -58,6 +73,7 @@ export default {
type: 2, //默认年度计划
name: '',
year: '',
+ orgId: '',
projectIds: [],
status: 1, //未发布
},
@@ -65,13 +81,20 @@ export default {
selectedRowKeys: [],
rules: {
name: [{ required: true, message: '请输入培训计划名称', trigger: 'blur' }],
+ orgId: [{ required: true, message: '请选择培训单位', trigger: 'change' }],
year: [{ required: true, message: '请选择培训计划年度', trigger: 'change' }],
},
- wayEmun:['培训','考试','培训-练习','培训-练习-考试'],
+ replaceFields: {
+ children: 'children',
+ title: 'name',
+ key: 'id',
+ value: 'id'
+ },
+ wayEmun: ['培训', '考试', '培训-练习', '培训-练习-考试'],
columns: [
{ title: '序号', key: 'id', dataIndex: 'id', width: 60, scopedSlots: { customRender: 'serial' } },
{ title: '项目名称', dataIndex: 'projectName', key: 'projectName' },
- { title: '项目类型', key: 'trainWay', dataIndex: 'trainWay',customRender: (text, record, index) => { return this.wayEmun[Number(text)-1] } },
+ { title: '项目类型', key: 'trainWay', dataIndex: 'trainWay', customRender: (text, record, index) => { return this.wayEmun[Number(text) - 1] } },
{ title: '创建人', dataIndex: 'createBy', key: 'createBy' },
{ title: '创建时间', dataIndex: 'createDate', key: 'createDate' }
],
@@ -205,12 +228,22 @@ export default {
this.years.push(new Date().getFullYear() - 2 + i);
}
console.log('YEARS', this.years)
- }
+ },
+ /**
+ * 获取机构树,并加载于表单中
+ */
+ getOrgTree() {
+ const params = { orgType: this.orgType }
+ orgList(params).then((res) => {
+ const orgList = listToTree(res.data, [], rootParentId)
+ this.orgTree = orgList
+ })
+ },
},
// 生命周期 - 创建完成(可以访问当前this实例)
created() {
let id = this.$route.query.trainPlanId;
-
+ this.getOrgTree();
this.initYears();
if (id) {
trainPlanGet({ id: id }).then((res) => {
@@ -221,7 +254,7 @@ export default {
this.columns = this.columns.filter(item => { return item.key != 'createBy' })
this.columns = this.columns.filter(item => { return item.key != 'createDate' })
- this.columns.push({title:'参与人数',dataIndex:'signCount',key:'signCount'});
+ this.columns.push({ title: '参与人数', dataIndex: 'signCount', key: 'signCount' });
})
}
if (this.$route.query.t != 'year') {