项目调整,培训计划变更
This commit is contained in:
parent
372890bc7a
commit
8f4387f5cc
|
@ -32,6 +32,7 @@
|
||||||
"mockjs2": "1.0.8",
|
"mockjs2": "1.0.8",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
|
"qs": "^6.10.3",
|
||||||
"react-draft-wysiwyg": "^1.14.7",
|
"react-draft-wysiwyg": "^1.14.7",
|
||||||
"store": "^2.0.12",
|
"store": "^2.0.12",
|
||||||
"viser-vue": "^2.4.6",
|
"viser-vue": "^2.4.6",
|
||||||
|
|
|
@ -5,6 +5,7 @@ import notification from 'ant-design-vue/es/notification'
|
||||||
import { VueAxios } from './axios'
|
import { VueAxios } from './axios'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
import router from '../router'
|
import router from '../router'
|
||||||
|
import qs from 'qs'
|
||||||
|
|
||||||
const SUCCESS_CODE = 200
|
const SUCCESS_CODE = 200
|
||||||
const INVALID_TOKEN_CODE = 401
|
const INVALID_TOKEN_CODE = 401
|
||||||
|
@ -60,6 +61,13 @@ request.interceptors.request.use(config => {
|
||||||
config.data = {}
|
config.data = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// get方法传递数组的处理(重点代码)
|
||||||
|
if (config.method === 'get') {
|
||||||
|
config.paramsSerializer = function(params) {
|
||||||
|
return qs.stringify(params, { arrayFormat: 'repeat' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
}, errorHandler)
|
}, errorHandler)
|
||||||
|
|
||||||
|
|
|
@ -40,16 +40,16 @@
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<template>
|
<template>
|
||||||
<a-popconfirm title="是否发布?" @confirm="() => handledRelease(record)">
|
<a-popconfirm title="是否发布?" @confirm="() => handledRelease(record)">
|
||||||
<a v-if="hasPerm(power.release) && record.status == '1'" href="javascript:;">发布</a>
|
<a v-if="hasPerm(power.release) && record.status == '1' && record.projectType != 0" href="javascript:;">发布</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
<!-- <a v-if="hasPerm(power.release) && record.status == '1'" href="javascript:;" @click="handledRelease(record)">发布</a> -->
|
<!-- <a v-if="hasPerm(power.release) && record.status == '1'" href="javascript:;" @click="handledRelease(record)">发布</a> -->
|
||||||
<a-divider type="vertical" v-if="hasPerm(power.edit) && hasPerm('project:list') && hasPerm(power.release) && record.status == '1'" />
|
<a-divider type="vertical" v-if="hasPerm(power.edit) && hasPerm('project:list') && hasPerm(power.release) && record.status == '1' && record.projectType != 0 " />
|
||||||
<a v-if="hasPerm('project:list') " href="javascript:;" @click="getDetail(record)">详情</a>
|
<a v-if="hasPerm('project:list') " href="javascript:;" @click="getDetail(record)">详情</a>
|
||||||
<a-divider type="vertical" v-if="hasPerm(power.edit) && hasPerm('project:list') && ['1'].includes(record.status)" />
|
<a-divider type="vertical" v-if="hasPerm(power.edit) && hasPerm('project:list') && ['1'].includes(record.status) && (record.projectType != 0 || queryParam.type != 'model')" />
|
||||||
<a v-if="hasPerm(power.edit) && ['1'].includes(record.status)" href="javascript:;" @click="handledCreate(record)">修改</a>
|
<a v-if="hasPerm(power.edit) && ['1'].includes(record.status) && (record.projectType != 0 || queryParam.type != 'model') " href="javascript:;" @click="handledCreate(record)">修改</a>
|
||||||
<a-divider type="vertical" v-if="hasPerm(power.del) && hasPerm('project:list') && ['1'].includes(record.status)" />
|
<a-divider type="vertical" v-if="hasPerm(power.del) && hasPerm('project:list') && ['1'].includes(record.status) && (record.projectType != 0 || queryParam.type != 'model') " />
|
||||||
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
||||||
<a v-if="hasPerm(power.del) && ['1'].includes(record.status)" href="javascript:;">删除</a>
|
<a v-if="hasPerm(power.del) && ['1'].includes(record.status) && (record.projectType != 0 || queryParam.type != 'model') " href="javascript:;">删除</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
<a-divider type="vertical" v-if="queryParam.type == 'model'" />
|
<a-divider type="vertical" v-if="queryParam.type == 'model'" />
|
||||||
<a v-if="queryParam.type == 'model'" href="javascript:;" @click="handledCreate(record)">编辑后发布到自主项目</a>
|
<a v-if="queryParam.type == 'model'" href="javascript:;" @click="handledCreate(record)">编辑后发布到自主项目</a>
|
||||||
|
@ -111,6 +111,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '项目状态',
|
title: '项目状态',
|
||||||
|
key: 'status',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
customRender: (text, record, index) => {
|
customRender: (text, record, index) => {
|
||||||
//项目状态 1-未发布 2-未开始 3-进行中 4-已完成
|
//项目状态 1-未发布 2-未开始 3-进行中 4-已完成
|
||||||
|
@ -124,7 +125,7 @@ export default {
|
||||||
return '进行中'
|
return '进行中'
|
||||||
}
|
}
|
||||||
if (text == 4) {
|
if (text == 4) {
|
||||||
return '已完成'
|
return '已结束'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -133,6 +134,7 @@ export default {
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: 200,
|
width: 200,
|
||||||
|
key: 'action',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
|
@ -204,6 +206,7 @@ export default {
|
||||||
},
|
},
|
||||||
//变更类型
|
//变更类型
|
||||||
changeType(path) {
|
changeType(path) {
|
||||||
|
console.log('变更路由:',path)
|
||||||
var arr = []
|
var arr = []
|
||||||
if (path) {
|
if (path) {
|
||||||
arr = path.split('/')
|
arr = path.split('/')
|
||||||
|
@ -212,6 +215,23 @@ export default {
|
||||||
}
|
}
|
||||||
let str = arr[arr.length - 1]
|
let str = arr[arr.length - 1]
|
||||||
this.queryParam.type = str
|
this.queryParam.type = str
|
||||||
|
|
||||||
|
/** 控制表格列的显示 */
|
||||||
|
if (str === 'sys' || str === 'model') {
|
||||||
|
let c = this.columns;
|
||||||
|
// console.log('columns-------c', c)
|
||||||
|
// let d = c.filter(item => {return item.key != 'startDate'})
|
||||||
|
// let e = d.filter(item => {return item.key != 'personNum'})
|
||||||
|
// 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 != 'status'})
|
||||||
|
|
||||||
|
this.columns = c
|
||||||
|
console.log('columns-------', this.columns)
|
||||||
|
}
|
||||||
|
|
||||||
//系统推荐权限
|
//系统推荐权限
|
||||||
str === 'sys' ? this.power.add = 'project:sys:add' : this.power.add = 'project:add'
|
str === 'sys' ? this.power.add = 'project:sys:add' : this.power.add = 'project:add'
|
||||||
str === 'sys' ? this.power.del = 'project:sys:del' : this.power.del = 'project:del'
|
str === 'sys' ? this.power.del = 'project:sys:del' : this.power.del = 'project:del'
|
||||||
|
|
|
@ -1,19 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- PageHeader 第二种使用方式 (v-slot) -->
|
<!-- PageHeader 第二种使用方式 (v-slot) -->
|
||||||
<a-card :bordered="false" :title="title">
|
<a-card :bordered="false" :title="title">
|
||||||
<a-steps class="steps" :current="currentTab">
|
<a-steps ref="steps" class="steps" :current="currentTab">
|
||||||
<a-step title="基本信息" />
|
<a-step key="basic" title="基本信息" :disabled="true" />
|
||||||
<!-- <a-step title="选择单位" /> -->
|
<!-- <a-step title="选择单位" /> -->
|
||||||
<a-step title="选择课程" />
|
<a-step key="course" title="选择课程" :disabled="true" />
|
||||||
<a-step v-if="this.form.projectType != 0" title="选择人员" />
|
<a-step key="person" title="选择人员" :disabled="true" />
|
||||||
<a-step v-if="['2', '4'].includes(form.trainWay)" title="组卷策略" />
|
<!-- v-if="this.form.projectType != 0" -->
|
||||||
<a-step :title="this.result ? '完成' : '失败'" />
|
<a-step key="zujuan" title="组卷策略" :disabled="true" />
|
||||||
|
<!-- v-if="['2', '4'].includes(form.trainWay)" -->
|
||||||
|
<a-step key="result" :title="this.result ? '完成' : '失败'" :disabled="true" />
|
||||||
</a-steps>
|
</a-steps>
|
||||||
<div class="content" >
|
<div class="content" >
|
||||||
<!-- <keep-alive exclude="result"> -->
|
<!-- <keep-alive exclude="result"> -->
|
||||||
<step1 v-if="currentTab === 0" :projectForm="form" @nextStep="nextStep" @close="close" @setFormType="setFormType" />
|
<step1 v-if="currentTab === 0" :projectForm="form" @nextStep="nextStep" @close="close" @setFormType="setFormType" />
|
||||||
<!-- <step2 v-if="currentTab === 1" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" @executeSave="executeSave"/> -->
|
<!-- <step2 v-if="currentTab === 1" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" @executeSave="executeSave"/> -->
|
||||||
<step3 v-if="currentTab === 1" :projectForm="form" :courseChange="courseChange" @nextStep="nextStep" @prevStep="prevStep" />
|
<step3 v-if="currentTab === 1" :projectForm="form" :courseChange="courseChange" @nextStep="nextStep" @prevStep="prevStep" @executeSave="executeSave" @executeIssue="executeIssue" />
|
||||||
<step4 v-if="currentTab === 2" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" @executeSave="executeSave" @executeIssue="executeIssue" />
|
<step4 v-if="currentTab === 2" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" @executeSave="executeSave" @executeIssue="executeIssue" />
|
||||||
<step5 v-if="currentTab === 3" :projectForm="form" @prevStep="prevStep" @executeSave="executeSave" @executeIssue="executeIssue" />
|
<step5 v-if="currentTab === 3" :projectForm="form" @prevStep="prevStep" @executeSave="executeSave" @executeIssue="executeIssue" />
|
||||||
<result v-if="currentTab === 4" :projectForm="form" @prevStep="prevStep" :projectSaveStatus="status" @close="close" />
|
<result v-if="currentTab === 4" :projectForm="form" @prevStep="prevStep" :projectSaveStatus="status" @close="close" />
|
||||||
|
@ -59,6 +61,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
currentTab: 0,
|
currentTab: 0,
|
||||||
|
currentTab: 0,
|
||||||
sourcePath: '',
|
sourcePath: '',
|
||||||
t: '',
|
t: '',
|
||||||
labelCol: { xs: { span: 24 }, sm: { span: 6 } },
|
labelCol: { xs: { span: 24 }, sm: { span: 6 } },
|
||||||
|
@ -68,6 +71,7 @@ export default {
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
type: '',
|
type: '',
|
||||||
form: {
|
form: {
|
||||||
|
stag: 0, //标记,大于0表示被编辑过
|
||||||
t: this.$route.query.t,
|
t: this.$route.query.t,
|
||||||
projectType: 0,
|
projectType: 0,
|
||||||
trainWay: '4',
|
trainWay: '4',
|
||||||
|
@ -119,12 +123,18 @@ export default {
|
||||||
if (beChange) {
|
if (beChange) {
|
||||||
this.courseChange = beChange
|
this.courseChange = beChange
|
||||||
}
|
}
|
||||||
if (this.currentTab < 5) {
|
if (this.currentTab < 4) {
|
||||||
if (childValue) {
|
if (childValue) {
|
||||||
this.form = childValue
|
this.form = childValue
|
||||||
}
|
}
|
||||||
|
if (this.form.projectType == 0 && this.currentTab == 1) {
|
||||||
|
this.currentTab = 3
|
||||||
|
} else {
|
||||||
this.currentTab += 1
|
this.currentTab += 1
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
console.log('currentTab key:', this.$refs.steps.$slots.default)
|
||||||
|
console.log('currentTab:', this.currentTab, 'currentTab:', this.currentTab)
|
||||||
console.log('ProjectStepForm表单数据', this.form)
|
console.log('ProjectStepForm表单数据', this.form)
|
||||||
},
|
},
|
||||||
//上一步
|
//上一步
|
||||||
|
@ -137,8 +147,13 @@ export default {
|
||||||
if (childValue) {
|
if (childValue) {
|
||||||
this.form = childValue
|
this.form = childValue
|
||||||
}
|
}
|
||||||
|
if (this.form.projectType == 0 && this.currentTab == 2) {
|
||||||
|
this.currentTab = 1
|
||||||
|
} else {
|
||||||
this.currentTab -= 1
|
this.currentTab -= 1
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
console.log('currentTab:', this.currentTab, 'currentTab:', this.currentTab)
|
||||||
console.log('ProjectStepForm表单数据', this.form)
|
console.log('ProjectStepForm表单数据', this.form)
|
||||||
},
|
},
|
||||||
//关闭页面,跳转list页面
|
//关闭页面,跳转list页面
|
||||||
|
|
|
@ -43,7 +43,9 @@
|
||||||
<project-course-select ref="CourseSelect" @selectKeyDataSubmit="selectKeyDataChange" :tabDisabled="tabDisabled" :selectRows="selData"></project-course-select>
|
<project-course-select ref="CourseSelect" @selectKeyDataSubmit="selectKeyDataChange" :tabDisabled="tabDisabled" :selectRows="selData"></project-course-select>
|
||||||
<a-col :span="24" style="text-align: center;margin-top: 10px;">
|
<a-col :span="24" style="text-align: center;margin-top: 10px;">
|
||||||
<a-button type="primary" size="default" @click="toPrep" style="margin-right: 8px;">上一步</a-button>
|
<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-button v-if="['2','4'].includes(form.trainWay) || form.projectType != 0 " type="primary" size="default" @click="toNext">下一步</a-button>
|
||||||
|
<a-button v-if="['1','3'].includes(form.trainWay) && form.projectType == 0 " type="primary" size="default" @click="toSaveOrIssue('save')" style="margin-right: 8px;">保存</a-button>
|
||||||
|
<a-button v-if="['1','3'].includes(form.trainWay) && form.projectType == 0 " type="primary" size="default" @click="toSaveOrIssue('issue')">发布</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-drawer title="课程预览" :destroyOnClose="true" placement="right" width="1200" :closable="true" :visible="courseVisible" @close="drawerClose">
|
<a-drawer title="课程预览" :destroyOnClose="true" placement="right" width="1200" :closable="true" :visible="courseVisible" @close="drawerClose">
|
||||||
<courseware-list :courseId="selectCourseId"></courseware-list>
|
<courseware-list :courseId="selectCourseId"></courseware-list>
|
||||||
|
@ -153,9 +155,29 @@ export default {
|
||||||
else if (type === 'topic') this.requiredTopicVisible = true;
|
else if (type === 'topic') this.requiredTopicVisible = true;
|
||||||
else if (type === 'question') this.questionVisible = true;
|
else if (type === 'question') this.questionVisible = true;
|
||||||
},
|
},
|
||||||
/** 删除table项 */
|
// 保存 && 发布
|
||||||
handleDelete(record){
|
toSaveOrIssue(type) {
|
||||||
|
this.form.lessonIds = []
|
||||||
|
let ids = this.queryParam.ids.split(',')
|
||||||
|
ids.forEach((id, index, arr) => {
|
||||||
|
if (id != '') {
|
||||||
|
this.form.lessonIds.push({ ids: id, sort: index })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (this.form.lessonIds.length > 0) {
|
||||||
|
console.log('进来了')
|
||||||
|
if (type != 'issue') {
|
||||||
|
console.log('save')
|
||||||
|
this.form.projectStatus = 1
|
||||||
|
this.$emit('executeSave', this.form)
|
||||||
|
} else {
|
||||||
|
console.log('issue')
|
||||||
|
this.form.projectStatus = 2
|
||||||
|
this.$emit('executeIssue', this.form)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.warning('培训课程不能为空')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//计算总学时,总分数,总课时
|
//计算总学时,总分数,总课时
|
||||||
calc(data) {
|
calc(data) {
|
||||||
|
@ -174,9 +196,12 @@ export default {
|
||||||
let ids = this.queryParam.ids.split(',')
|
let ids = this.queryParam.ids.split(',')
|
||||||
ids.forEach((id, index, arr) => {
|
ids.forEach((id, index, arr) => {
|
||||||
// console.log('id-----------------------', id)
|
// console.log('id-----------------------', id)
|
||||||
|
if (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) {
|
||||||
|
console.log('----------', this.form.lessonIds)
|
||||||
this.$emit('nextStep', this.form, this.beChange)
|
this.$emit('nextStep', this.form, this.beChange)
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning('培训课程不能为空')
|
this.$message.warning('培训课程不能为空')
|
||||||
|
@ -187,7 +212,9 @@ export default {
|
||||||
this.form.lessonIds = []
|
this.form.lessonIds = []
|
||||||
let ids = this.queryParam.ids.split(',')
|
let ids = this.queryParam.ids.split(',')
|
||||||
ids.forEach((id, index, arr) => {
|
ids.forEach((id, index, arr) => {
|
||||||
|
if (id != '') {
|
||||||
this.form.lessonIds.push({ ids: id, sort: index })
|
this.form.lessonIds.push({ ids: id, sort: index })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// console.log('toPrep', this.form)
|
// console.log('toPrep', this.form)
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
<a-col :span="4" id="tree">
|
<a-col :span="4" id="tree">
|
||||||
<a-menu v-model="menuKey" mode="horizontal" @select="menuChack">
|
<a-menu v-model="menuKey" mode="horizontal" @select="menuChack">
|
||||||
<a-menu-item key="sys">系统课程</a-menu-item>
|
<a-menu-item key="sys">系统课程</a-menu-item>
|
||||||
<a-menu-item key="self" :disabled="tabDis">自主课程</a-menu-item>
|
<a-menu-item key="self" >自主课程</a-menu-item>
|
||||||
|
<!-- :disabled="tabDis" -->
|
||||||
</a-menu>
|
</a-menu>
|
||||||
<!-- :defaultExpandedKeys="defaultExpandedKeys" -->
|
<!-- :defaultExpandedKeys="defaultExpandedKeys" -->
|
||||||
<a-tree :treeData="treeData" @select="onSelect" :defaultExpandAll="true" :replaceFields="replaceFields">
|
<a-tree :treeData="treeData" @select="onSelect" :defaultExpandAll="true" :replaceFields="replaceFields">
|
||||||
|
@ -20,6 +21,13 @@
|
||||||
<a-form-item label="课程名称">
|
<a-form-item label="课程名称">
|
||||||
<a-input v-model="queryParam.name" placeholder="请输入课程名称" />
|
<a-input v-model="queryParam.name" placeholder="请输入课程名称" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="标签名称">
|
||||||
|
<a-select mode="tags" style="width: 300px" placeholder="标签选择" @change="handleTagChange" :value="queryParam.tags">
|
||||||
|
<a-select-option v-for="(item,index) in dictCourseTag" :key="index" :value="item.value">
|
||||||
|
{{ item.name }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
@ -51,6 +59,7 @@
|
||||||
// 例如:import 《组件名称》 from '《组件路径》'
|
// 例如:import 《组件名称》 from '《组件路径》'
|
||||||
import { coursewareClassList } from '@/api/course/courseware'
|
import { coursewareClassList } from '@/api/course/courseware'
|
||||||
import { listByClass } from '@/api/course/course'
|
import { listByClass } from '@/api/course/course'
|
||||||
|
import { dictionaryDropDown } from '@/api/sys/dictionaryItem'
|
||||||
import { STable } from '@/components'
|
import { STable } from '@/components'
|
||||||
const rootParentId = 0
|
const rootParentId = 0
|
||||||
|
|
||||||
|
@ -75,10 +84,11 @@ export default {
|
||||||
tabDis: this.tabDisabled,
|
tabDis: this.tabDisabled,
|
||||||
menuKey: ['sys'], //默认系统课程
|
menuKey: ['sys'], //默认系统课程
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParam: { name: '', classType: 1, type: 1 },
|
queryParam: { name: '', classType: 1, type: 1, tags: [] },
|
||||||
replaceFields: { children: 'children', title: 'name', key: 'value', value: 'id' },
|
replaceFields: { children: 'children', title: 'name', key: 'value', value: 'id' },
|
||||||
expandedKeys: [],
|
expandedKeys: [],
|
||||||
autoExpandParent: true,
|
autoExpandParent: true,
|
||||||
|
dictCourseTag: [], //课程标签
|
||||||
// defaultExpandedKeys: [],
|
// defaultExpandedKeys: [],
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
selectedRows: [],
|
selectedRows: [],
|
||||||
|
@ -111,12 +121,19 @@ export default {
|
||||||
//菜单改变,
|
//菜单改变,
|
||||||
menuChack() {
|
menuChack() {
|
||||||
console.log('menuKey', this.menuKey)
|
console.log('menuKey', this.menuKey)
|
||||||
|
|
||||||
|
//菜单改变后清空查询参数
|
||||||
|
this.queryParam.name = null
|
||||||
|
this.queryParam.tags = []
|
||||||
|
|
||||||
let type = 2;
|
let type = 2;
|
||||||
console.log('菜单改变', this.menuKey[0])
|
console.log('菜单改变', this.menuKey[0])
|
||||||
if (this.menuKey[0] === 'self') type = 1;
|
if (this.menuKey[0] === 'self') type = 1;
|
||||||
this.queryParam.type = type
|
this.queryParam.type = type
|
||||||
this.getCourseTreeData(type);
|
this.getCourseTreeData(type);
|
||||||
this.$refs.table.refresh(true);
|
this.$refs.table.refresh(true);
|
||||||
|
this.queryParam.name = null
|
||||||
|
this.queryParam.tags = []
|
||||||
},
|
},
|
||||||
// 编辑打开页面初始化
|
// 编辑打开页面初始化
|
||||||
edit(record) {
|
edit(record) {
|
||||||
|
@ -147,6 +164,21 @@ export default {
|
||||||
this.selectedRowKeys = this.uniqueKeys([...this.selectedRowKeys, ...selectedRowKeys])
|
this.selectedRowKeys = this.uniqueKeys([...this.selectedRowKeys, ...selectedRowKeys])
|
||||||
this.selectedRows = this.unique([...this.selectedRows, ...selectedRows])
|
this.selectedRows = this.unique([...this.selectedRows, ...selectedRows])
|
||||||
},
|
},
|
||||||
|
//字典课程标签项
|
||||||
|
dictionaryItemDown(code) {
|
||||||
|
// 标签项 默认选中的多选框
|
||||||
|
dictionaryDropDown({ dictionaryCode: code }).then((res) => {
|
||||||
|
const tagList = res.data
|
||||||
|
for (let i = 0; i < tagList.length; i++) {
|
||||||
|
tagList[i].value = tagList[i].value.toString()
|
||||||
|
}
|
||||||
|
this.dictCourseTag = tagList
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//标签选择器
|
||||||
|
handleTagChange(value) {
|
||||||
|
this.queryParam.tags = value
|
||||||
|
},
|
||||||
|
|
||||||
/** table取消勾选 */
|
/** table取消勾选 */
|
||||||
tableOnSelect(record, selected, selectedRows, nativeEvent) {
|
tableOnSelect(record, selected, selectedRows, nativeEvent) {
|
||||||
|
@ -243,6 +275,7 @@ export default {
|
||||||
// 生命周期 - 创建完成(可以访问当前this实例)
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
||||||
created() {
|
created() {
|
||||||
this.getCourseTreeData(0) //进来首先获取系统课程
|
this.getCourseTreeData(0) //进来首先获取系统课程
|
||||||
|
this.dictionaryItemDown('0008') //课程标签字典
|
||||||
},
|
},
|
||||||
// 生命周期 - 挂载完成(可以访问DOM元素)
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
||||||
mounted() { },
|
mounted() { },
|
||||||
|
|
|
@ -93,13 +93,6 @@
|
||||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }" prop="examNumber">
|
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }" prop="examNumber">
|
||||||
<a-input-number v-model="form.examNumber" :min="0" style="width: 100%" />
|
<a-input-number v-model="form.examNumber" :min="0" style="width: 100%" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<!-- <span> 补考次数: </span>
|
|
||||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
|
||||||
<a-input-number v-model="form.resitNumber" :min="0" style="width: 100%" />
|
|
||||||
</a-form-model-item>
|
|
||||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
|
||||||
<a-button type="primary" @click="randomResit"> 随机补考 </a-button>
|
|
||||||
</a-form-model-item> -->
|
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
|
@ -167,14 +160,16 @@ export default {
|
||||||
dictGet,
|
dictGet,
|
||||||
classList
|
classList
|
||||||
},
|
},
|
||||||
|
computed: {},
|
||||||
created(ClassList) {
|
created(ClassList) {
|
||||||
console.log('第一个表单创建了')
|
console.log('第一个表单创建了')
|
||||||
if (this.$route.query.projectId) {
|
if (this.$route.query.projectId && this.projectForm.stag == 0) {
|
||||||
getProjectDetail({ id: this.$route.query.projectId }).then(res => {
|
getProjectDetail({ id: this.$route.query.projectId }).then(res => {
|
||||||
let form = res.data;
|
let form = res.data;
|
||||||
if (this.$route.query.t == 'model') {
|
if (this.$route.query.t == 'model') {
|
||||||
console.log('form', form)
|
console.log('form', form)
|
||||||
form.projectType = 1;
|
form.projectType = 1;
|
||||||
|
form.id = null;
|
||||||
}
|
}
|
||||||
this.form = form;
|
this.form = form;
|
||||||
this.$emit('setFormType', this.form.trainWay)
|
this.$emit('setFormType', this.form.trainWay)
|
||||||
|
@ -223,10 +218,49 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/** 条件判断隐藏 */
|
||||||
|
condition() {
|
||||||
|
let f = this.form;
|
||||||
|
console.log('条件判断')
|
||||||
|
if (f.projectType == 0) {
|
||||||
|
f.trainSdate = null;
|
||||||
|
f.trainEdate = null;
|
||||||
|
f.practiceSdate = null;
|
||||||
|
f.practiceEdate = null;
|
||||||
|
f.examSdate = null;
|
||||||
|
f.examEdate = null;
|
||||||
|
f.examNumber = null;
|
||||||
|
f.mockExam = null;
|
||||||
|
} else {
|
||||||
|
if (f.trainWay == '1') {
|
||||||
|
f.practiceSdate = null;
|
||||||
|
f.practiceEdate = null;
|
||||||
|
f.examSdate = null;
|
||||||
|
f.examEdate = null;
|
||||||
|
f.examNumber = null;
|
||||||
|
f.mockExam = null;
|
||||||
|
}
|
||||||
|
if (f.trainWay == '2') {
|
||||||
|
f.practiceSdate = null;
|
||||||
|
f.practiceEdate = null;
|
||||||
|
f.trainSdate = null;
|
||||||
|
f.trainEdate = null;
|
||||||
|
}
|
||||||
|
if (f.trainWay == '3') {
|
||||||
|
f.examSdate = null;
|
||||||
|
f.examEdate = null;
|
||||||
|
f.examNumber = null;
|
||||||
|
f.mockExam = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.form = f;
|
||||||
|
},
|
||||||
|
|
||||||
//跳转到下一页面
|
//跳转到下一页面
|
||||||
//下一步,跳转页面带上from对象
|
//下一步,跳转页面带上from对象
|
||||||
toNext() {
|
toNext() {
|
||||||
// console.log('toNext', this.form)
|
this.form.stag = 1;
|
||||||
|
this.condition();
|
||||||
this.$refs.form.validate(validate => {
|
this.$refs.form.validate(validate => {
|
||||||
if (validate) {
|
if (validate) {
|
||||||
this.$emit('nextStep', this.form)
|
this.$emit('nextStep', this.form)
|
||||||
|
@ -237,5 +271,6 @@ export default {
|
||||||
destroyed() {
|
destroyed() {
|
||||||
console.log('第一个表单销毁了')
|
console.log('第一个表单销毁了')
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<a-card :bordered="false" title="组卷策略信息">
|
<a-card :bordered="false" title="组卷策略信息">
|
||||||
<a-form-model :rules="rules" :model="form" v-bind="formItemLayout">
|
<a-form-model ref="form" :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">
|
||||||
<a-form-model-item label="总分" prop="totalScore">
|
<a-form-model-item label="总分" prop="totalScore">
|
||||||
|
@ -35,13 +35,7 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
<a-card :bordered="false" title="组卷策略详情">
|
<a-card :bordered="false" title="组卷策略详情">
|
||||||
<a-table
|
<a-table :columns="columns" :data-source="tableData" bordered :position="{ disabled: false }" :pagination="false">
|
||||||
:columns="columns"
|
|
||||||
:data-source="tableData"
|
|
||||||
bordered
|
|
||||||
:position="{ disabled: false }"
|
|
||||||
:pagination="false"
|
|
||||||
>
|
|
||||||
<template slot="topicNum" slot-scope="text, record">
|
<template slot="topicNum" slot-scope="text, record">
|
||||||
<a-input-number style="margin: -5px 0" v-model="record.topicNum" :min="0" :max="record.totalNum" />
|
<a-input-number style="margin: -5px 0" v-model="record.topicNum" :min="0" :max="record.totalNum" />
|
||||||
</template>
|
</template>
|
||||||
|
@ -158,13 +152,21 @@ export default {
|
||||||
toSave() {
|
toSave() {
|
||||||
this.form.testPaperTactics = this.tableData.filter((Item) => { return Item.topicNum && Item.topicScore });
|
this.form.testPaperTactics = this.tableData.filter((Item) => { return Item.topicNum && Item.topicScore });
|
||||||
this.form.projectStatus = 1
|
this.form.projectStatus = 1
|
||||||
|
this.$refs.form.validate(validate => {
|
||||||
|
if (validate) {
|
||||||
this.$emit('executeSave', this.form)
|
this.$emit('executeSave', this.form)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//发布
|
//发布
|
||||||
toIssue() {
|
toIssue() {
|
||||||
this.form.testPaperTactics = this.tableData.filter((Item) => { return Item.topicNum && Item.topicScore });
|
this.form.testPaperTactics = this.tableData.filter((Item) => { return Item.topicNum && Item.topicScore });
|
||||||
this.form.projectStatus = 2
|
this.form.projectStatus = 2
|
||||||
|
this.$refs.form.validate(validate => {
|
||||||
|
if (validate) {
|
||||||
this.$emit('executeIssue', this.form)
|
this.$emit('executeIssue', this.form)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//上一步
|
//上一步
|
||||||
toPrev() {
|
toPrev() {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
:form="queryParam"
|
:form="queryParam"
|
||||||
:list="queryOptions"
|
:list="queryOptions"
|
||||||
@search="handleRefresh"
|
@search="handleRefresh"
|
||||||
@reset="() => {;(queryParam = {}), handleRefresh()}"
|
@reset="() => {(queryParam = {}), handleRefresh()}"
|
||||||
></SearchCom>
|
></SearchCom>
|
||||||
<br/>
|
<br/>
|
||||||
<a-space class="table-operator" direction="horizontal">
|
<a-space class="table-operator" direction="horizontal">
|
||||||
|
@ -69,10 +69,10 @@ export default {
|
||||||
//这里存放数据
|
//这里存放数据
|
||||||
return {
|
return {
|
||||||
queryParam: {
|
queryParam: {
|
||||||
status: this.$route.query.terminalTrainStatus || null,
|
status: null, //this.$route.query.terminalTrainStatus ||
|
||||||
name: this.$route.query.terminalTrainName || null,
|
name: null, //this.$route.query.terminalTrainName ||
|
||||||
startDate: this.$route.query.terminalTrainStartDate || null,
|
startDate: null, //this.$route.query.terminalTrainStartDate ||
|
||||||
endDate: this.$route.query.terminalTrainEndDate || null,
|
endDate: null, //this.$route.query.terminalTrainEndDate ||
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '序号', width: 'auto', align: 'center', dataIndex: 'id', key: 'id', scopedSlots: { customRender: 'serial' }, },
|
{ title: '序号', width: 'auto', align: 'center', dataIndex: 'id', key: 'id', scopedSlots: { customRender: 'serial' }, },
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
<template>
|
||||||
|
<a-card :bordered="false" title="培训计划">
|
||||||
|
|
||||||
|
</a-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||||
|
// 例如:import 《组件名称》 from '《组件路径》'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
// import引入的组件需要注入到对象中才能使用
|
||||||
|
components: {},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
// 这里存放数据
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
// 计算属性 类似于data概念
|
||||||
|
computed: {},
|
||||||
|
// 监控data中的数据变化
|
||||||
|
watch: {},
|
||||||
|
// 方法集合
|
||||||
|
methods: {},
|
||||||
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
||||||
|
created() { },
|
||||||
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
||||||
|
mounted() { },
|
||||||
|
// 生命周期 - 创建之前
|
||||||
|
beforeCreate() { },
|
||||||
|
// 生命周期 - 挂载之前
|
||||||
|
beforeMount() { },
|
||||||
|
// 生命周期 - 更新之前
|
||||||
|
beforeUpdate() { },
|
||||||
|
// 生命周期 - 更新之后
|
||||||
|
updated() { },
|
||||||
|
// 生命周期 - 销毁之前
|
||||||
|
beforeDestroy() { },
|
||||||
|
// 生命周期 - 销毁完成
|
||||||
|
destroyed() { },
|
||||||
|
// 如果页面有keep-alive缓存功能,这个函数会触发
|
||||||
|
activated() { }
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
|
@ -0,0 +1,138 @@
|
||||||
|
<template>
|
||||||
|
<a-card :bordered="false" :title="title">
|
||||||
|
<a-space direction="vertical" style="width: 100%">
|
||||||
|
<a-space direction="horizontal">
|
||||||
|
培训计划名称:
|
||||||
|
<a-input v-model="queryParam.name" style="width: 100%" />
|
||||||
|
计划年度:
|
||||||
|
<a-select v-model="queryParam.year" placeholder="请选择" default-value="null" style="width: 150px">
|
||||||
|
<a-select-option value="null">全部</a-select-option>
|
||||||
|
<a-select-option value="2022">2022年度</a-select-option>
|
||||||
|
<a-select-option value="2023">2023年度</a-select-option>
|
||||||
|
<a-select-option value="2024">2024年度</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
|
||||||
|
<a-button type="primary" icon="search" @click="$refs.table.refresh(true)">查询</a-button>
|
||||||
|
<a-button icon="redo" @click="() => (queryParam.name=null,queryParam.year=null)">重置</a-button>
|
||||||
|
<a-button type="primary" icon="plus" @click="handledCreate">新增培训计划</a-button>
|
||||||
|
</a-space>
|
||||||
|
|
||||||
|
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData" :pageNum="Number(this.$route.query.projectPageNum) || 1">
|
||||||
|
<span slot="serial" slot-scope="text, record, index">
|
||||||
|
{{ index + 1 }}
|
||||||
|
</span>
|
||||||
|
<span slot="action" slot-scope="text, record">
|
||||||
|
<template>
|
||||||
|
<a-popconfirm title="是否发布?" @confirm="() => handledRelease(record)">
|
||||||
|
<a href="javascript:;">发布</a>
|
||||||
|
</a-popconfirm>
|
||||||
|
</template>
|
||||||
|
</span>
|
||||||
|
</s-table>
|
||||||
|
</a-space>
|
||||||
|
</a-card>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||||
|
// 例如:import 《组件名称》 from '《组件路径》'
|
||||||
|
import { STable } from '@/components'
|
||||||
|
import { getProjectList, releaseProject, projectDel } from '@/api/project/project'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
// import引入的组件需要注入到对象中才能使用
|
||||||
|
components: {
|
||||||
|
STable,
|
||||||
|
},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
// 这里存放数据
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
queryParam: {
|
||||||
|
name: '',
|
||||||
|
year: '',
|
||||||
|
type: '',
|
||||||
|
},
|
||||||
|
|
||||||
|
// 表头
|
||||||
|
columns: [
|
||||||
|
{ title: '序号', key: 'id', dataIndex: 'id', width: 60, scopedSlots: { customRender: 'serial' } },
|
||||||
|
{ title: '计划名称', dataIndex: 'projectName', key: 'projectName' },
|
||||||
|
{ title: '年度', dataIndex: 'startDate', key: 'startDate', customRender: (text, record, index) => { return record.year + ' 年度 ' } },
|
||||||
|
{
|
||||||
|
title: '项目状态', key: 'status', dataIndex: 'status',
|
||||||
|
customRender: (text, record, index) => {
|
||||||
|
//项目状态 1-未发布 2-未开始 3-进行中 4-已完成
|
||||||
|
if (text == 1) {
|
||||||
|
return '未发布'
|
||||||
|
}
|
||||||
|
if (text == 2) {
|
||||||
|
return '未开始'
|
||||||
|
}
|
||||||
|
if (text == 3) {
|
||||||
|
return '进行中'
|
||||||
|
}
|
||||||
|
if (text == 4) {
|
||||||
|
return '已结束'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ title: '创建人员', key: 'createBy', dataIndex: 'createBy' },
|
||||||
|
{ title: '创建时间', key: 'createDate', dataIndex: 'createDate' },
|
||||||
|
{ title: '操作', width: 200, key: 'action', align: 'center', scopedSlots: { customRender: 'action' }, },
|
||||||
|
],
|
||||||
|
// 加载数据方法 必须为 Promise 对象
|
||||||
|
loadData: (parameter) => {
|
||||||
|
return getProjectList(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||||
|
return res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
// 计算属性 类似于data概念
|
||||||
|
computed: {},
|
||||||
|
// 监控data中的数据变化
|
||||||
|
watch: {
|
||||||
|
$route(to, from) { //to是前往的路由 from是去往的路由 同一个组件只会渲染一次
|
||||||
|
this.changeType(to.path)
|
||||||
|
this.$refs.table.refresh(true)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// 方法集合
|
||||||
|
methods: {
|
||||||
|
//变更类型
|
||||||
|
changeType(path) {
|
||||||
|
console.log('变更路由:', path)
|
||||||
|
var arr = []
|
||||||
|
if (path) {
|
||||||
|
arr = path.split('/')
|
||||||
|
} else {
|
||||||
|
arr = this.$route.path.split('/')
|
||||||
|
}
|
||||||
|
let str = arr[arr.length - 1]
|
||||||
|
this.queryParam.type = str
|
||||||
|
str == 'year' ? this.title='年度培训计划列表' : this.title='单位培训计划列表'
|
||||||
|
},
|
||||||
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
||||||
|
created() { this.changeType(this.$route.path) },
|
||||||
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
||||||
|
mounted() { },
|
||||||
|
// 生命周期 - 创建之前
|
||||||
|
beforeCreate() { },
|
||||||
|
// 生命周期 - 挂载之前
|
||||||
|
beforeMount() { },
|
||||||
|
// 生命周期 - 更新之前
|
||||||
|
beforeUpdate() { },
|
||||||
|
// 生命周期 - 更新之后
|
||||||
|
updated() { },
|
||||||
|
// 生命周期 - 销毁之前
|
||||||
|
beforeDestroy() { },
|
||||||
|
// 生命周期 - 销毁完成
|
||||||
|
destroyed() { },
|
||||||
|
// 如果页面有keep-alive缓存功能,这个函数会触发
|
||||||
|
activated() { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
Loading…
Reference in New Issue