项目管理更新
This commit is contained in:
parent
7357344acf
commit
7f7adf9ef5
|
@ -26,7 +26,7 @@ export function questionAdd(params) {
|
||||||
// 题目数量
|
// 题目数量
|
||||||
export function getQuestionNumByCourseIds(params) {
|
export function getQuestionNumByCourseIds(params) {
|
||||||
return request({
|
return request({
|
||||||
url: questionApi.add,
|
url: questionApi.getQuestionNumByCourseIds,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<a-card :bordered="false" title="项目课程信息">
|
<a-card class="coures" :bordered="false" title="项目课程信息">
|
||||||
<template slot="extra">
|
<!-- <template slot="extra">
|
||||||
<a-button type="primary" size="default" @click="toNext">下一步</a-button>
|
<a-button type="primary" size="default" @click="toNext">下一步</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template slot="extra">
|
<template slot="extra">
|
||||||
<a-button type="primary" size="default" @click="toPrep">上一步</a-button>
|
<a-button type="primary" size="default" @click="toPrep">上一步</a-button>
|
||||||
</template>
|
</template> -->
|
||||||
<a-space direction="vertical" style="width: 100%">
|
<a-space direction="vertical" style="width: 100%">
|
||||||
<a-space direction="horizontal">
|
<a-space direction="horizontal">
|
||||||
<span>总课时:{{ totalHours }}H , 总学时要求:{{ totalLearnHours }}H , 总题目数量:{{ totalTopicNum }} </span>
|
<span>总课时:{{ totalHours }}H , 总学时要求:{{ totalLearnHours }}H , 总题目数量:{{ totalTopicNum }} </span>
|
||||||
|
@ -22,19 +22,18 @@
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<template>
|
<template>
|
||||||
<a-dropdown>
|
<a-dropdown>
|
||||||
<a class="ant-dropdown-link"
|
<a class="ant-dropdown-link">操作
|
||||||
>操作
|
|
||||||
<a-icon type="down" />
|
<a-icon type="down" />
|
||||||
</a>
|
</a>
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a href="javascript:;" @click="$refs.table.refresh(false)">课程预览</a>
|
<a href="javascript:;" @click="openVisible('course',record)">课程预览</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a href="javascript:;" @click="$refs.table.refresh(false)">题库预览</a>
|
<a href="javascript:;" @click="openVisible('question',record)">题库预览</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a href="javascript:;" @click="$refs.table.refresh(false)">必选题设置</a>
|
<a href="javascript:;" @click="openVisible('topic',record)">必选题设置</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
||||||
|
@ -48,6 +47,19 @@
|
||||||
</s-table>
|
</s-table>
|
||||||
</a-space>
|
</a-space>
|
||||||
<project-course-select ref="CourseSelect" @selectKeyDataSubmit="selectKeyDataChange" :selectRows="selData"></project-course-select>
|
<project-course-select ref="CourseSelect" @selectKeyDataSubmit="selectKeyDataChange" :selectRows="selData"></project-course-select>
|
||||||
|
<a-col :span="24" style="text-align: center;">
|
||||||
|
<a-button type="primary" size="default" @click="toPrep" style="margin-right: 8px;">上一步</a-button>
|
||||||
|
<a-button type="primary" size="default" @click="toNext">下一步</a-button>
|
||||||
|
</a-col>
|
||||||
|
<a-drawer title="课程预览" placement="right" width="1200" :closable="true" :visible="courseVisible" @close="drawerClose">
|
||||||
|
<p>课程预览</p>
|
||||||
|
</a-drawer>
|
||||||
|
<a-drawer title="题库预览" placement="right" width="1200" :closable="true" :visible="questionVisible" @close="drawerClose">
|
||||||
|
<p>题库预览</p>
|
||||||
|
</a-drawer>
|
||||||
|
<a-drawer title="必选题设置" placement="right" width="1200" :closable="true" :visible="requiredTopicVisible" @close="drawerClose">
|
||||||
|
<p>必选题设置</p>
|
||||||
|
</a-drawer>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -73,13 +85,18 @@ export default {
|
||||||
//这里存放数据
|
//这里存放数据
|
||||||
return {
|
return {
|
||||||
form: this.projectForm,
|
form: this.projectForm,
|
||||||
selData:[],
|
selData: [],
|
||||||
labelCol: {},
|
labelCol: {},
|
||||||
wrapperCol: {},
|
wrapperCol: {},
|
||||||
vertical: 'vertical',
|
vertical: 'vertical',
|
||||||
totalHours: 0, //总课时
|
totalHours: 0, //总课时
|
||||||
totalLearnHours: 0, //总学时
|
totalLearnHours: 0, //总学时
|
||||||
totalTopicNum: 0, //题目数量
|
totalTopicNum: 0, //题目数量
|
||||||
|
|
||||||
|
courseVisible: false, //课程预览页面显示控制
|
||||||
|
questionVisible: false, //题库预览页面显示控制
|
||||||
|
requiredTopicVisible:false, //必选题设置显示控制
|
||||||
|
|
||||||
queryParam: {
|
queryParam: {
|
||||||
ids: '',
|
ids: '',
|
||||||
}, //查询数据
|
}, //查询数据
|
||||||
|
@ -119,12 +136,25 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
//方法集合
|
//方法集合
|
||||||
methods: {
|
methods: {
|
||||||
|
//关闭抽屉
|
||||||
|
drawerClose(){
|
||||||
|
this.courseVisible = false;
|
||||||
|
this.requiredTopicVisible = false;
|
||||||
|
this.questionVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
//打开抽屉
|
||||||
|
openVisible(type) {
|
||||||
|
if(type === 'course') this.courseVisible = true;
|
||||||
|
else if(type === 'topic') this.requiredTopicVisible = true;
|
||||||
|
else if(type === 'question') this.questionVisible = true;
|
||||||
|
},
|
||||||
//计算总学时,总分数,总课时
|
//计算总学时,总分数,总课时
|
||||||
calc(data){
|
calc(data) {
|
||||||
this.totalHours = 0
|
this.totalHours = 0
|
||||||
this.totalLearnHours = 0
|
this.totalLearnHours = 0
|
||||||
this.totalTopicNum = 0
|
this.totalTopicNum = 0
|
||||||
data.forEach((item)=>{
|
data.forEach((item) => {
|
||||||
this.totalHours = this.totalHours + parseInt(item.courseHours)
|
this.totalHours = this.totalHours + parseInt(item.courseHours)
|
||||||
this.totalLearnHours = this.totalLearnHours + parseInt(item.learnHours)
|
this.totalLearnHours = this.totalLearnHours + parseInt(item.learnHours)
|
||||||
this.totalTopicNum = this.totalTopicNum + parseInt(item.topicNumber)
|
this.totalTopicNum = this.totalTopicNum + parseInt(item.topicNumber)
|
||||||
|
@ -138,9 +168,9 @@ export default {
|
||||||
// console.log('id-----------------------', id)
|
// console.log('id-----------------------', id)
|
||||||
this.form.lessonIds.push({ ids: id, sort: index })
|
this.form.lessonIds.push({ ids: id, sort: index })
|
||||||
})
|
})
|
||||||
if(this.form.lessonIds.length > 0){
|
if (this.form.lessonIds.length > 0) {
|
||||||
this.$emit('nextStep', this.form)
|
this.$emit('nextStep', this.form)
|
||||||
}else{
|
} else {
|
||||||
this.$message.warning('培训课程不能为空')
|
this.$message.warning('培训课程不能为空')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -159,7 +189,7 @@ export default {
|
||||||
initIds() {
|
initIds() {
|
||||||
// console.log('this.projectForm.lessonIds',this.projectForm.lessonIds)
|
// console.log('this.projectForm.lessonIds',this.projectForm.lessonIds)
|
||||||
let str = [];
|
let str = [];
|
||||||
if(this.projectForm.lessonIds) str = this.projectForm.lessonIds
|
if (this.projectForm.lessonIds) str = this.projectForm.lessonIds
|
||||||
// let str = this.projectForm.lessonIds.join(',') || []
|
// let str = this.projectForm.lessonIds.join(',') || []
|
||||||
// console.log('initIds', str)
|
// console.log('initIds', str)
|
||||||
if (str && str.length > 0) {
|
if (str && str.length > 0) {
|
||||||
|
@ -171,8 +201,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//选择课程完毕,提交到list页面
|
//选择课程完毕,提交到list页面
|
||||||
selectKeyDataChange(childValue){
|
selectKeyDataChange(childValue) {
|
||||||
console.log('list page - selectKeyDataSubmit',childValue)
|
console.log('list page - selectKeyDataSubmit', childValue)
|
||||||
this.queryParam.ids = childValue
|
this.queryParam.ids = childValue
|
||||||
this.$refs.table.refresh(true)
|
this.$refs.table.refresh(true)
|
||||||
}
|
}
|
||||||
|
@ -182,14 +212,14 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.initIds()
|
this.initIds()
|
||||||
},
|
},
|
||||||
mounted() {}, //生命周期 - 挂载完成(可以访问DOM元素)
|
mounted() { }, //生命周期 - 挂载完成(可以访问DOM元素)
|
||||||
beforeCreate() {}, //生命周期 - 创建之前
|
beforeCreate() { }, //生命周期 - 创建之前
|
||||||
beforeMount() {}, //生命周期 - 挂载之前
|
beforeMount() { }, //生命周期 - 挂载之前
|
||||||
beforeUpdate() {}, //生命周期 - 更新之前
|
beforeUpdate() { }, //生命周期 - 更新之前
|
||||||
updated() {}, //生命周期 - 更新之后
|
updated() { }, //生命周期 - 更新之后
|
||||||
beforeDestroy() {}, //生命周期 - 销毁之前
|
beforeDestroy() { }, //生命周期 - 销毁之前
|
||||||
destroyed() {}, //生命周期 - 销毁完成
|
destroyed() { }, //生命周期 - 销毁完成
|
||||||
activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -124,7 +124,7 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-col :span="24" style="text-align: center;">
|
<a-col :span="24" style="text-align: center;">
|
||||||
<a-button type="primary" size="default" @click="toNext">下一步</a-button>
|
<a-button type="primary" size="default" @click="toNext" style="margin-right: 8px;">下一步</a-button>
|
||||||
<a-button type="default" size="default" @click="close">退出</a-button>
|
<a-button type="default" size="default" @click="close">退出</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
|
|
|
@ -1,23 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<a-card :bordered="false" title="项目人员信息">
|
<a-card :bordered="false" title="项目人员信息">
|
||||||
<template slot="extra">
|
<!-- <template slot="extra">
|
||||||
<a-button type="primary" size="default" @click="toNext">下一步</a-button>
|
<a-button type="primary" size="default" @click="toNext">下一步</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template slot="extra">
|
<template slot="extra">
|
||||||
<a-button type="primary" size="default" @click="toPrev">上一步</a-button>
|
<a-button type="primary" size="default" @click="toPrev">上一步</a-button>
|
||||||
</template>
|
</template> -->
|
||||||
<a-row type="flex" justify="center" align="top">
|
<a-row type="flex" justify="center" align="top">
|
||||||
<a-col :span="4" id="tree">
|
<a-col :span="4" id="tree">
|
||||||
<a-page-header title="单位列表" sub-title="" />
|
<a-page-header title="单位列表" sub-title="" />
|
||||||
<div v-if="this.orgTree != ''">
|
<div v-if="this.orgTree != ''">
|
||||||
<a-tree
|
<a-tree :treeData="orgTree" v-if="orgTree.length" @select="onSelect" :defaultExpandAll="true" :defaultExpandedKeys="defaultExpandedKeys" :replaceFields="replaceFields">
|
||||||
:treeData="orgTree"
|
|
||||||
v-if="orgTree.length"
|
|
||||||
@select="onSelect"
|
|
||||||
:defaultExpandAll="true"
|
|
||||||
:defaultExpandedKeys="defaultExpandedKeys"
|
|
||||||
:replaceFields="replaceFields"
|
|
||||||
>
|
|
||||||
<a-icon slot="switcherIcon" type="down" />
|
<a-icon slot="switcherIcon" type="down" />
|
||||||
</a-tree>
|
</a-tree>
|
||||||
</div>
|
</div>
|
||||||
|
@ -42,13 +35,7 @@
|
||||||
<a-button style="margin-left: 8px" @click="() => (queryParam = {})">重置</a-button>
|
<a-button style="margin-left: 8px" @click="() => (queryParam = {})">重置</a-button>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
<s-table
|
<s-table ref="table" :columns="columns" :data="loadData" :rowKey="(record) => record.id" :rowSelection="{ selectedRowKeys: selectedRowKeys, selectedRows: selectedRows, onChange: onSelectChange }">
|
||||||
ref="table"
|
|
||||||
:columns="columns"
|
|
||||||
:data="loadData"
|
|
||||||
:rowKey="(record) => record.id"
|
|
||||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, selectedRows: selectedRows, onChange: onSelectChange }"
|
|
||||||
>
|
|
||||||
<span slot="serial" slot-scope="text, record, index">
|
<span slot="serial" slot-scope="text, record, index">
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -64,6 +51,10 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
<a-col :span="24" style="text-align: center;">
|
||||||
|
<a-button type="primary" size="default" @click="toPrev" style="margin-right: 8px;">上一步</a-button>
|
||||||
|
<a-button type="primary" size="default" @click="toNext">下一步</a-button>
|
||||||
|
</a-col>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -129,9 +120,9 @@ export default {
|
||||||
toNext() {
|
toNext() {
|
||||||
this.form.projectPersonLists = this.selectedRows
|
this.form.projectPersonLists = this.selectedRows
|
||||||
this.form.personIds = this.selectedRowKeys
|
this.form.personIds = this.selectedRowKeys
|
||||||
if(this.form.personIds.length > 0){
|
if (this.form.personIds.length > 0) {
|
||||||
this.$emit('nextStep', this.form)
|
this.$emit('nextStep', this.form)
|
||||||
}else{
|
} else {
|
||||||
this.$message.warning('培训人员不能为空')
|
this.$message.warning('培训人员不能为空')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -224,21 +215,21 @@ export default {
|
||||||
this.getOrgTree()
|
this.getOrgTree()
|
||||||
},
|
},
|
||||||
// 生命周期 - 挂载完成(可以访问DOM元素)
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
||||||
mounted() {},
|
mounted() { },
|
||||||
// 生命周期 - 创建之前
|
// 生命周期 - 创建之前
|
||||||
beforeCreate() {},
|
beforeCreate() { },
|
||||||
// 生命周期 - 挂载之前
|
// 生命周期 - 挂载之前
|
||||||
beforeMount() {},
|
beforeMount() { },
|
||||||
// 生命周期 - 更新之前
|
// 生命周期 - 更新之前
|
||||||
beforeUpdate() {},
|
beforeUpdate() { },
|
||||||
// 生命周期 - 更新之后
|
// 生命周期 - 更新之后
|
||||||
updated() {},
|
updated() { },
|
||||||
// 生命周期 - 销毁之前
|
// 生命周期 - 销毁之前
|
||||||
beforeDestroy() {},
|
beforeDestroy() { },
|
||||||
// 生命周期 - 销毁完成
|
// 生命周期 - 销毁完成
|
||||||
destroyed() {},
|
destroyed() { },
|
||||||
// 如果页面有keep-alive缓存功能,这个函数会触发
|
// 如果页面有keep-alive缓存功能,这个函数会触发
|
||||||
activated() {},
|
activated() { },
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<a-card :bordered="false" title="组卷策略信息">
|
<a-card :bordered="false" title="组卷策略信息">
|
||||||
<template slot="extra">
|
<!-- <template slot="extra">
|
||||||
<a-button type="primary" size="default" @click="toPrev">上一步</a-button>
|
<a-button type="primary" size="default" @click="toPrev">上一步</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template slot="extra">
|
<template slot="extra">
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template slot="extra">
|
<template slot="extra">
|
||||||
<a-button type="primary" size="default" @click="toIssue">发布</a-button>
|
<a-button type="primary" size="default" @click="toIssue">发布</a-button>
|
||||||
</template>
|
</template> -->
|
||||||
<a-form-model :rules="rules" :model="form" v-bind="formItemLayout">
|
<a-form-model :rules="rules" :model="form" v-bind="formItemLayout">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="10" :sm="12">
|
<a-col :md="10" :sm="12">
|
||||||
|
@ -54,6 +54,11 @@
|
||||||
</a-table>
|
</a-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
|
<a-col :span="24" style="text-align: center;">
|
||||||
|
<a-button type="primary" size="default" @click="toPrev" style="margin-right: 8px;">上一步</a-button>
|
||||||
|
<a-button type="primary" size="default" @click="toSave" style="margin-right: 8px;">保存</a-button>
|
||||||
|
<a-button type="primary" size="default" @click="toIssue">发布</a-button>
|
||||||
|
</a-col>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -118,7 +123,7 @@ export default {
|
||||||
title: '总分',
|
title: '总分',
|
||||||
dataIndex: 'totalScore',
|
dataIndex: 'totalScore',
|
||||||
customRender: (value, row, index) => {
|
customRender: (value, row, index) => {
|
||||||
return { children: value, attrs: { rowSpan: index == 0 ? 3 : 0 } }
|
return { children: value, attrs: { rowSpan: index == 0 ? 5 : 0 } }
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -149,8 +154,11 @@ export default {
|
||||||
},
|
},
|
||||||
// 生命周期 - 创建完成(可以访问当前this实例)
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
||||||
created() {
|
created() {
|
||||||
if(this.tableData.length == 0){
|
if (this.tableData.length == 0) {
|
||||||
getQuestionNumByCourseIds({ids:this.form.lessonIds}).then((res) => {
|
let ids = this.form.lessonIds.map((t) => {
|
||||||
|
return parseInt(t.ids);
|
||||||
|
})
|
||||||
|
getQuestionNumByCourseIds({ ids: ids}).then((res) => {
|
||||||
this.tableData = res.data
|
this.tableData = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -174,4 +182,4 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
</style>
|
</style>ß
|
Loading…
Reference in New Issue