项目管理更新
This commit is contained in:
parent
9aef31c7cb
commit
174a4314ac
|
@ -3,19 +3,28 @@ import request from '@/utils/request'
|
|||
const questionApi = {
|
||||
add: 'courseManagement/question/addOrUpdate',
|
||||
get: '/courseManagement/question/details',
|
||||
// update: 'sys/menu/update',
|
||||
// update: 'sys/menu/update',
|
||||
del: 'courseManagement/question/delete',
|
||||
// updateStatus: 'sys/menu/updateStatus',
|
||||
// list: '/courseManagement/course/listPage',
|
||||
// coursewareList:'/courseManagement/course/courseware/details',
|
||||
// questionList:'/courseManagement/course/questionList',
|
||||
importTemplate: "courseManagement/question/importTemplate"
|
||||
|
||||
// updateStatus: 'sys/menu/updateStatus',
|
||||
// list: '/courseManagement/course/listPage',
|
||||
// coursewareList:'/courseManagement/course/courseware/details',
|
||||
// questionList:'/courseManagement/course/questionList',
|
||||
importTemplate: "courseManagement/question/importTemplate",
|
||||
getQuestionNumByCourseIds: '/courseManagement/question/getQuestionNumByCourseIds',
|
||||
}
|
||||
|
||||
|
||||
// 题目新增
|
||||
export function questionAdd (params) {
|
||||
export function questionAdd(params) {
|
||||
return request({
|
||||
url: questionApi.add,
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 题目数量
|
||||
export function getQuestionNumByCourseIds(params) {
|
||||
return request({
|
||||
url: questionApi.add,
|
||||
method: 'post',
|
||||
|
@ -38,7 +47,7 @@ export function questionAdd (params) {
|
|||
// }
|
||||
|
||||
|
||||
export function deleteQuestion (params) {
|
||||
export function deleteQuestion(params) {
|
||||
return request({
|
||||
url: questionApi.del,
|
||||
method: 'delete',
|
||||
|
@ -47,21 +56,19 @@ export function deleteQuestion (params) {
|
|||
}
|
||||
|
||||
// 查看课程详情
|
||||
export function getQuestionDeatil (params) {
|
||||
export function getQuestionDeatil(params) {
|
||||
return request({
|
||||
url:questionApi.get,
|
||||
method:'get',
|
||||
params:params
|
||||
url: questionApi.get,
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 题目批量导入
|
||||
export function importTemplate (params) {
|
||||
export function importTemplate(params) {
|
||||
return request({
|
||||
url: questionApi.importTemplate,
|
||||
method: 'post',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<template>
|
||||
<a-card :bordered="false" title="终端培训详情">
|
||||
<template slot="extra">
|
||||
<a-button size="small" @click="close">返回</a-button>
|
||||
</template>
|
||||
<page-header-wrapper title="项目基础信息">
|
||||
<template v-slot:content>
|
||||
<a-descriptions size="small" :column="isMobile ? 1 : 2">
|
||||
|
@ -11,24 +15,24 @@
|
|||
<a-descriptions-item label="培训时间">XX 服务</a-descriptions-item>
|
||||
<a-descriptions-item label="练习类型">2017-07-07</a-descriptions-item>
|
||||
<a-descriptions-item label="考试时间">2017-07-07</a-descriptions-item>
|
||||
<a-descriptions-item label="补考">
|
||||
<!-- <a-descriptions-item label="补考">
|
||||
<a-radio :default-checked="false" :disabled="disabled"> Disabled </a-radio>
|
||||
<a-radio default-checked :disabled="disabled"> Disabled </a-radio>
|
||||
</a-descriptions-item>
|
||||
</a-descriptions-item> -->
|
||||
<a-descriptions-item label="备注">请于两个工作日内确认</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</template>
|
||||
|
||||
<template v-slot:extraContent>
|
||||
<!-- <template v-slot:extraContent>
|
||||
<a-row class="status-list">
|
||||
<a-col :xs="12" :sm="12">
|
||||
<div class="text">状态</div>
|
||||
<div class="heading">待审批</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
</template> -->
|
||||
|
||||
<a-card :bordered="false" title="流程进度">
|
||||
<!-- <a-card :bordered="false" title="流程进度">
|
||||
<a-steps :direction="(isMobile && 'vertical') || 'horizontal'" :current="1" progressDot>
|
||||
<a-step>
|
||||
<template v-slot:title>
|
||||
|
@ -36,7 +40,8 @@
|
|||
</template>
|
||||
<template v-slot:description>
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
曲丽丽<a-icon type="dingding" style="margin-left: 8px" />
|
||||
曲丽丽
|
||||
<a-icon type="dingding" style="margin-left: 8px" />
|
||||
<div>2016-12-12 12:32</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -47,7 +52,8 @@
|
|||
</template>
|
||||
<template v-slot:description>
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
周毛毛<a-icon type="dingding" style="color: rgb(0, 160, 233); margin-left: 8px" />
|
||||
周毛毛
|
||||
<a-icon type="dingding" style="color: rgb(0, 160, 233); margin-left: 8px" />
|
||||
<div><a>催一下</a></div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -55,7 +61,7 @@
|
|||
<a-step title="财务复核" />
|
||||
<a-step title="完成" />
|
||||
</a-steps>
|
||||
</a-card>
|
||||
</a-card> -->
|
||||
|
||||
<a-card style="margin-top: 24px" :bordered="false" title="用户信息">
|
||||
<a-descriptions>
|
||||
|
@ -79,16 +85,13 @@
|
|||
<a-descriptions-item label="角色码">1234567</a-descriptions-item>
|
||||
<a-descriptions-item label="所属部门">XX公司-YY部</a-descriptions-item>
|
||||
<a-descriptions-item label="过期时间">2018-08-08</a-descriptions-item>
|
||||
<a-descriptions-item label="描述"
|
||||
>这段描述很长很长很长很长很长很长很长很长很长很长很长很长很长很长...</a-descriptions-item
|
||||
>
|
||||
<a-descriptions-item label="描述">这段描述很长很长很长很长很长很长很长很长很长很长很长很长很长很长...</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<a-divider style="margin: 16px 0" />
|
||||
<a-descriptions title="组名称" size="small" :col="1">
|
||||
<a-descriptions-item label="学名">
|
||||
Citrullus lanatus (Thunb.) Matsum. et
|
||||
Nakai一年生蔓生藤本;茎、枝粗壮,具明显的棱。卷须较粗..</a-descriptions-item
|
||||
>
|
||||
Nakai一年生蔓生藤本;茎、枝粗壮,具明显的棱。卷须较粗..</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<a-divider style="margin: 16px 0" />
|
||||
<a-descriptions title="组名称" size="small" :col="2">
|
||||
|
@ -99,53 +102,35 @@
|
|||
</a-card>
|
||||
|
||||
<a-card style="margin-top: 24px" :bordered="false" title="用户近半年来电记录">
|
||||
<div class="no-data"><a-icon type="frown-o" />暂无数据</div>
|
||||
<div class="no-data">
|
||||
<a-icon type="frown-o" />暂无数据
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
<!-- 操作 -->
|
||||
<a-card
|
||||
style="margin-top: 24px"
|
||||
:bordered="false"
|
||||
:tabList="operationTabList"
|
||||
:activeTabKey="operationActiveTabKey"
|
||||
@tabChange="
|
||||
<a-card style="margin-top: 24px" :bordered="false" :tabList="operationTabList" :activeTabKey="operationActiveTabKey" @tabChange="
|
||||
(key) => {
|
||||
this.operationActiveTabKey = key
|
||||
}
|
||||
"
|
||||
>
|
||||
<a-table
|
||||
v-if="operationActiveTabKey === '1'"
|
||||
:columns="operationColumns"
|
||||
:dataSource="operation1"
|
||||
:pagination="false"
|
||||
>
|
||||
">
|
||||
<a-table v-if="operationActiveTabKey === '1'" :columns="operationColumns" :dataSource="operation1" :pagination="false">
|
||||
<template slot="status" slot-scope="status">
|
||||
<a-badge :status="status | statusTypeFilter" :text="status | statusFilter" />
|
||||
</template>
|
||||
</a-table>
|
||||
<a-table
|
||||
v-if="operationActiveTabKey === '2'"
|
||||
:columns="operationColumns"
|
||||
:dataSource="operation2"
|
||||
:pagination="false"
|
||||
>
|
||||
<a-table v-if="operationActiveTabKey === '2'" :columns="operationColumns" :dataSource="operation2" :pagination="false">
|
||||
<template slot="status" slot-scope="status">
|
||||
<a-badge :status="status | statusTypeFilter" :text="status | statusFilter" />
|
||||
</template>
|
||||
</a-table>
|
||||
<a-table
|
||||
v-if="operationActiveTabKey === '3'"
|
||||
:columns="operationColumns"
|
||||
:dataSource="operation3"
|
||||
:pagination="false"
|
||||
>
|
||||
<a-table v-if="operationActiveTabKey === '3'" :columns="operationColumns" :dataSource="operation3" :pagination="false">
|
||||
<template slot="status" slot-scope="status">
|
||||
<a-badge :status="status | statusTypeFilter" :text="status | statusFilter" />
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
</page-header-wrapper>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<template>
|
||||
<a v-if="hasPerm('project:edit')" href="javascript:;" @click="handledCreate(record)">修改</a>
|
||||
<a-divider type="vertical" />
|
||||
<a v-if="hasPerm('project:list')" href="javascript:;" @click="handleDetail(record)">详情</a>
|
||||
<a v-if="hasPerm('project:list')" href="javascript:;" @click="getDetail(record)">详情</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
||||
<a v-if="hasPerm('project:del')" href="javascript:;">删除</a>
|
||||
|
@ -149,6 +149,17 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
getDetail(record){
|
||||
this.$router.push({
|
||||
path: '/project/detail',
|
||||
query: {
|
||||
id: record.id, //自主项目还是系统项目,控制路由跳转
|
||||
t:this.queryParam.type,
|
||||
projectId: record.id, //项目id
|
||||
projectPageNum: this.$refs.table.localPagination.current, //当前页
|
||||
},
|
||||
})
|
||||
},
|
||||
// 增
|
||||
handledCreate(record) {
|
||||
this.$router.push({
|
||||
|
@ -156,7 +167,6 @@ export default {
|
|||
query: {
|
||||
t: this.queryParam.type, //自主项目还是系统项目,控制路由跳转
|
||||
projectId: record.id, //项目id
|
||||
projectQueryParam: this.queryParam, //查询参数
|
||||
projectPageNum: this.$refs.table.localPagination.current, //当前页
|
||||
},
|
||||
})
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
@executeSave="executeSave"
|
||||
@executeIssue="executeIssue"
|
||||
/>
|
||||
<result v-if="currentTab === 5" :projectForm="form" @prevStep="prevStep" :projectSaveStatus="status" />
|
||||
<result v-if="currentTab === 5" :projectForm="form" @prevStep="prevStep" :projectSaveStatus="status" @close="close" />
|
||||
<!-- </keep-alive> -->
|
||||
</div>
|
||||
</a-card>
|
||||
|
@ -82,6 +82,7 @@ export default {
|
|||
type: '',
|
||||
form: {
|
||||
t: this.$route.query.t,
|
||||
projectType: this.$route.query.t === 'sys' ? 0 : 1,
|
||||
trainWay: '2',
|
||||
totalScore: '100',
|
||||
},
|
||||
|
|
|
@ -105,7 +105,7 @@ export default {
|
|||
/** 新建的没有项目id,传当前的所选的课程id */
|
||||
return getCourseListByCourseIds(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
this.selData = res.data;
|
||||
console.log('list页面----selData',this.selData)
|
||||
// console.log('list页面----selData',this.selData)
|
||||
this.calc(res.data)
|
||||
return res.data
|
||||
})
|
||||
|
@ -135,12 +135,14 @@ export default {
|
|||
this.form.lessonIds = []
|
||||
let ids = this.queryParam.ids.split(',')
|
||||
ids.forEach((id, index, arr) => {
|
||||
console.log('id-----------------------', id)
|
||||
// console.log('id-----------------------', id)
|
||||
this.form.lessonIds.push({ ids: id, sort: index })
|
||||
})
|
||||
|
||||
console.log('ProjectCourseSelect-toNext', this.form)
|
||||
if(this.form.lessonIds.length > 0){
|
||||
this.$emit('nextStep', this.form)
|
||||
}else{
|
||||
this.$message.warning('培训课程不能为空')
|
||||
}
|
||||
},
|
||||
//上一步
|
||||
toPrep() {
|
||||
|
@ -150,16 +152,16 @@ export default {
|
|||
this.form.lessonIds.push({ ids: id, sort: index })
|
||||
})
|
||||
|
||||
console.log('toPrep', this.form)
|
||||
// console.log('toPrep', this.form)
|
||||
this.$emit('prevStep', this.form)
|
||||
},
|
||||
//初始化ids
|
||||
initIds() {
|
||||
console.log('this.projectForm.lessonIds',this.projectForm.lessonIds)
|
||||
// console.log('this.projectForm.lessonIds',this.projectForm.lessonIds)
|
||||
let str = [];
|
||||
if(this.projectForm.lessonIds) str = this.projectForm.lessonIds
|
||||
// let str = this.projectForm.lessonIds.join(',') || []
|
||||
console.log('initIds', str)
|
||||
// console.log('initIds', str)
|
||||
if (str && str.length > 0) {
|
||||
let arr = [];
|
||||
str.forEach((item) => {
|
||||
|
|
|
@ -6,17 +6,17 @@
|
|||
<template slot="extra">
|
||||
<a-button type="primary" size="default" @click="close">退出</a-button>
|
||||
</template>
|
||||
<a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" layout="horizontal">
|
||||
<a-form-model ref="form" :rules="rules" :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" layout="horizontal">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24">
|
||||
<a-form-model-item label="项目名称">
|
||||
<a-form-model-item label="项目名称" prop="projectName">
|
||||
<a-input v-model="form.projectName" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24">
|
||||
<a-form-model-item label="培训种类">
|
||||
<a-form-model-item label="培训种类" prop="trainClass">
|
||||
<a-select v-model="form.trainClass" placeholder="--请选择--">
|
||||
<a-select-option v-for="entity in trainClass" :key="entity.value"> {{ entity.name }} </a-select-option>
|
||||
</a-select>
|
||||
|
@ -24,7 +24,7 @@
|
|||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="培训类型">
|
||||
<a-form-model-item label="培训类型" prop="trainType">
|
||||
<a-select v-model="form.trainType" placeholder="--请选择--">
|
||||
<a-select-option value="1"> 必修课 </a-select-option>
|
||||
<a-select-option value="2"> 选修课 </a-select-option>
|
||||
|
@ -32,7 +32,7 @@
|
|||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="培训方式">
|
||||
<a-form-model-item label="培训方式" prop="trainWay">
|
||||
<a-select v-model="form.trainWay" placeholder="--请选择--">
|
||||
<a-select-option value="1"> 培训 </a-select-option>
|
||||
<a-select-option value="2"> 考试 </a-select-option>
|
||||
|
@ -42,67 +42,67 @@
|
|||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="人员类型">
|
||||
<a-form-model-item label="人员类型" prop="personType">
|
||||
<a-select v-model="form.personType" placeholder="--请选择--">
|
||||
<a-select-option v-for="item in personType" :key="item.value" > {{ item.name }} </a-select-option>
|
||||
<a-select-option v-for="item in personType" :key="item.value"> {{ item.name }} </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 时间选择器呢 -->
|
||||
<a-col :span="24">
|
||||
<a-form-item label="培训时间" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-form-model-item label="培训时间" style="margin-bottom: 0">
|
||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }" prop="trainSdate">
|
||||
<a-date-picker v-model="form.trainSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-model-item>
|
||||
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }" prop="trainEdate">
|
||||
<a-date-picker v-model="form.trainEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
</a-form-model-item>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 时间选择器 -->
|
||||
<a-col :span="24">
|
||||
<a-form-item v-if="['2', '3', '4'].includes(form.trainWay)" label="练习时间" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-form-model-item v-if="['2', '3', '4'].includes(form.trainWay)" label="练习时间" style="margin-bottom: 0">
|
||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }" prop="practiceSdate">
|
||||
<a-date-picker v-model="form.practiceSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-model-item>
|
||||
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }" prop="practiceEdate">
|
||||
<a-date-picker v-model="form.practiceEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
</a-form-model-item>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 时间选择器 -->
|
||||
<a-col :span="24">
|
||||
<a-form-item v-if="['2', '3', '4'].includes(form.trainWay)" label="考试时间" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-form-model-item v-if="['2', '3', '4'].includes(form.trainWay)" label="考试时间" style="margin-bottom: 0">
|
||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }" prop="examSdate">
|
||||
<a-date-picker v-model="form.examSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-model-item>
|
||||
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }" prop="examEdate">
|
||||
<a-date-picker v-model="form.examEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
</a-form-model-item>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 考试次数 -->
|
||||
<a-col :span="24">
|
||||
<a-form-item v-if="['2', '3', '4'].includes(form.trainWay)" label="考试次数" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||
<a-form-model-item v-if="['2', '3', '4'].includes(form.trainWay)" label="考试次数" style="margin-bottom: 0">
|
||||
<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-form-item>
|
||||
</a-form-model-item>
|
||||
<!-- <span> 补考次数: </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||
<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-item>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||
</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-item> -->
|
||||
</a-form-item>
|
||||
</a-form-model-item> -->
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="模拟考试" v-if="['2', '3', '4'].includes(form.trainWay)">
|
||||
<a-form-model-item label="模拟考试" v-if="['2', '3', '4'].includes(form.trainWay)" prop="mockExam">
|
||||
<a-radio-group v-model="form.mockExam">
|
||||
<a-radio value="1"> 允许 </a-radio>
|
||||
<a-radio value="0"> 不允许 </a-radio>
|
||||
|
@ -141,6 +141,21 @@ export default {
|
|||
confirmLoading: false,
|
||||
trainClass: [],
|
||||
form: this.projectForm,
|
||||
rules: {
|
||||
projectName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
|
||||
trainClass: [{ required: true, message: '请选择培训分类', trigger: 'blur' }],
|
||||
trainType: [{ required: true, message: '请选择培训类型', trigger: 'blur' }],
|
||||
trainWay: [{ required: true, message: '请选择培训方式', trigger: 'biur' }],
|
||||
personType: [{ required: true, message: '请选择人员类型', trigger: 'blur' }],
|
||||
trainSdate: [{ required: true, message: '请输入培训开始时间', trigger: 'change' }],
|
||||
trainEdate: [{ required: true, message: '请输入培训结束时间', trigger: 'change' }],
|
||||
practiceSdate: [{ required: true, message: '请输入练习开始时间', trigger: 'change' }],
|
||||
practiceEdate: [{ required: true, message: '请输入练习结束时间', trigger: 'change' }],
|
||||
examSdate: [{ required: true, message: '请输入考试开始时间', trigger: 'change' }],
|
||||
examEdate: [{ required: true, message: '请输入考试结束时间', trigger: 'change' }],
|
||||
examNumber: [{ required: true, message: '请输入考试次数', trigger: 'blur' }],
|
||||
mockExam: [{ required: true, message: '请选择是否允许模拟考试', trigger: 'change' }],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
@ -156,7 +171,7 @@ export default {
|
|||
methods: {
|
||||
close() {
|
||||
console.log('Form返回list页面')
|
||||
this.$emit('close');
|
||||
this.$emit('close')
|
||||
},
|
||||
//获取字典值,请求查询培训种类
|
||||
fetchTemplateData() {
|
||||
|
@ -171,7 +186,6 @@ export default {
|
|||
name: r.name,
|
||||
})
|
||||
})
|
||||
// console.log("111111111111111111111111111",this.personType)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -181,9 +195,9 @@ export default {
|
|||
let formData = { type: 1 }
|
||||
dictGet(formData).then((res) => {
|
||||
console.log(res)
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
const result = res.data
|
||||
result.forEach((r)=>{
|
||||
result.forEach((r) => {
|
||||
this.trainClass.push({
|
||||
value: r.id,
|
||||
name: r.name,
|
||||
|
@ -197,8 +211,12 @@ export default {
|
|||
//跳转到下一页面
|
||||
//下一步,跳转页面带上from对象
|
||||
toNext() {
|
||||
console.log('toNext', this.form)
|
||||
// console.log('toNext', this.form)
|
||||
this.$refs.form.validate((validate) => {
|
||||
if (validate) {
|
||||
this.$emit('nextStep', this.form)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
destroyed() {
|
||||
|
|
|
@ -129,7 +129,11 @@ export default {
|
|||
toNext() {
|
||||
this.form.projectPersonLists = this.selectedRows
|
||||
this.form.personIds = this.selectedRowKeys
|
||||
if(this.form.personIds.length > 0){
|
||||
this.$emit('nextStep', this.form)
|
||||
}else{
|
||||
this.$message.warning('培训人员不能为空')
|
||||
}
|
||||
},
|
||||
//上一步
|
||||
toPrev() {
|
||||
|
|
|
@ -9,27 +9,27 @@
|
|||
<template slot="extra">
|
||||
<a-button type="primary" size="default" @click="toIssue">发布</a-button>
|
||||
</template>
|
||||
<a-form-model :model="form" v-bind="formItemLayout">
|
||||
<a-form-model :rules="rules" :model="form" v-bind="formItemLayout">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="10" :sm="12">
|
||||
<a-form-model-item label="总分">
|
||||
<a-form-model-item label="总分" prop="totalScore">
|
||||
<a-input-number v-model="form.totalScore" :disabled="true" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :md="14" :sm="12">
|
||||
<a-form-model-item label="及格分数">
|
||||
<a-form-model-item label="及格分数" prop="passScore">
|
||||
<a-input-number v-model="form.passScore" :min="1" :max="100" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="10" :sm="12">
|
||||
<a-form-model-item label="考试时长">
|
||||
<a-form-model-item label="考试时长" prop="examTime">
|
||||
<a-input-number :min="0" v-model="form.examTime" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :md="14" :sm="12">
|
||||
<a-form-model-item label="默认组卷题量">
|
||||
<a-form-model-item label="默认组卷题量" prop="topicNumber">
|
||||
<a-input-number :min="0" v-model="form.topicNumber" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<a-row :gutter="24">
|
||||
<h4>考试开启条件:</h4>
|
||||
<a-col :md="10" :sm="12">
|
||||
<a-form-model-item label="学时时长">
|
||||
<a-form-model-item label="学时时长" prop="examOpenCondition">
|
||||
<a-input-number :min="0" v-model="form.examOpenCondition" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
@ -60,6 +60,7 @@
|
|||
<script>
|
||||
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||
// 例如:import 《组件名称》 from '《组件路径》'
|
||||
import { getQuestionNumByCourseIds } from '@/api/course/question/question'
|
||||
|
||||
export default {
|
||||
// import引入的组件需要注入到对象中才能使用
|
||||
|
@ -74,6 +75,16 @@ export default {
|
|||
return {
|
||||
form: this.projectForm,
|
||||
formItemLayout: { labelCol: { span: 4 }, wrapperCol: { span: 14 } },
|
||||
rules: {
|
||||
totalScore: [{ required: true, message: '请输入组卷总分', trigger: 'blur' }],
|
||||
trainClass: [{ required: true, message: '请选择培训分类', trigger: 'blur' }],
|
||||
projectName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
|
||||
trainClass: [{ required: true, message: '请选择培训分类', trigger: 'blur' }],
|
||||
projectName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
|
||||
trainClass: [{ required: true, message: '请选择培训分类', trigger: 'blur' }],
|
||||
projectName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
|
||||
trainClass: [{ required: true, message: '请选择培训分类', trigger: 'blur' }],
|
||||
},
|
||||
columns: [
|
||||
{ title: '序号', key: 'i', dataIndex: 'i', width: 70, scopedSlots: { customRender: 'serial' } },
|
||||
{
|
||||
|
@ -84,6 +95,8 @@ export default {
|
|||
if (text == 1) return '单选题'
|
||||
if (text == 2) return '多选题'
|
||||
if (text == 3) return '判断题'
|
||||
if (text == 4) return '简答题'
|
||||
if (text == 5) return '填空题'
|
||||
},
|
||||
},
|
||||
{ title: '总题量', dataIndex: 'totalNum', key: 'totalNum' },
|
||||
|
@ -109,32 +122,7 @@ export default {
|
|||
},
|
||||
},
|
||||
],
|
||||
tableData: this.projectForm.testPaperTactics || [
|
||||
{
|
||||
i: 1,
|
||||
topicType: 1,
|
||||
totalNum: 20,
|
||||
topicNum: 0,
|
||||
topicScore: 0,
|
||||
totalScore: 100,
|
||||
},
|
||||
{
|
||||
i: 2,
|
||||
topicType: 2,
|
||||
totalNum: 20,
|
||||
topicNum: 0,
|
||||
topicScore: 0,
|
||||
totalScore: 100,
|
||||
},
|
||||
{
|
||||
i: 3,
|
||||
topicType: 3,
|
||||
totalNum: 20,
|
||||
topicNum: 0,
|
||||
topicScore: 0,
|
||||
totalScore: 100,
|
||||
},
|
||||
],
|
||||
tableData: this.projectForm.testPaperTactics || [],
|
||||
}
|
||||
},
|
||||
// 计算属性 类似于data概念
|
||||
|
@ -160,23 +148,29 @@ export default {
|
|||
},
|
||||
},
|
||||
// 生命周期 - 创建完成(可以访问当前this实例)
|
||||
created() {},
|
||||
created() {
|
||||
if(this.tableData.length == 0){
|
||||
getQuestionNumByCourseIds({ids:this.form.lessonIds}).then((res) => {
|
||||
this.tableData = res.data
|
||||
})
|
||||
}
|
||||
},
|
||||
// 生命周期 - 挂载完成(可以访问DOM元素)
|
||||
mounted() {},
|
||||
mounted() { },
|
||||
// 生命周期 - 创建之前
|
||||
beforeCreate() {},
|
||||
beforeCreate() { },
|
||||
// 生命周期 - 挂载之前
|
||||
beforeMount() {},
|
||||
beforeMount() { },
|
||||
// 生命周期 - 更新之前
|
||||
beforeUpdate() {},
|
||||
beforeUpdate() { },
|
||||
// 生命周期 - 更新之后
|
||||
updated() {},
|
||||
updated() { },
|
||||
// 生命周期 - 销毁之前
|
||||
beforeDestroy() {},
|
||||
beforeDestroy() { },
|
||||
// 生命周期 - 销毁完成
|
||||
destroyed() {},
|
||||
destroyed() { },
|
||||
// 如果页面有keep-alive缓存功能,这个函数会触发
|
||||
activated() {},
|
||||
activated() { },
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
|
|
@ -1,44 +1,25 @@
|
|||
<template>
|
||||
<a-card :bordered="false" title="选择培训单位">
|
||||
<template slot="extra">
|
||||
<a-button type="primary" v-if="['2', '3', '4'].includes(form.trainWay)" size="default" @click="toNext"
|
||||
>下一步</a-button
|
||||
>
|
||||
</template>
|
||||
<template slot="extra">
|
||||
<a-button type="primary" size="default" @click="toPrep">上一步</a-button>
|
||||
</template>
|
||||
<template type="primary" v-if="form.trainWay === '1'" slot="extra">
|
||||
<a-button size="default" @click="close">完成</a-button>
|
||||
<template slot="extra">
|
||||
<a-button type="primary" v-if="['2', '3', '4'].includes(form.trainWay)" size="default" @click="toNext">下一步</a-button>
|
||||
</template>
|
||||
<a-transfer
|
||||
class="tree-transfer"
|
||||
:data-source="dataSource"
|
||||
:target-keys="targetKeys"
|
||||
:render="(item) => item.title"
|
||||
:show-select-all="false"
|
||||
@change="onChange"
|
||||
>
|
||||
<template type="primary" v-if="form.trainWay === '1'" slot="extra">
|
||||
<a-button size="default" @click="handleSubmit">保存</a-button>
|
||||
</template>
|
||||
<a-transfer class="tree-transfer" :data-source="dataSource" :target-keys="targetKeys" :render="(item) => item.title" :show-select-all="false" @change="onChange">
|
||||
<template slot="children" slot-scope="{ props: { direction, selectedKeys }, on: { itemSelect } }">
|
||||
<a-tree
|
||||
v-if="direction === 'left'"
|
||||
blockNode
|
||||
checkable
|
||||
checkStrictly
|
||||
defaultExpandAll
|
||||
:checkedKeys="[...selectedKeys, ...targetKeys]"
|
||||
:treeData="treeData"
|
||||
@check="
|
||||
<a-tree v-if="direction === 'left'" blockNode checkable checkStrictly defaultExpandAll :checkedKeys="[...selectedKeys, ...targetKeys]" :treeData="treeData" @check="
|
||||
(_, props) => {
|
||||
onChecked(_, props, [...selectedKeys, ...targetKeys], itemSelect)
|
||||
}
|
||||
"
|
||||
@select="
|
||||
" @select="
|
||||
(_, props) => {
|
||||
onChecked(_, props, [...selectedKeys, ...targetKeys], itemSelect)
|
||||
}
|
||||
"
|
||||
/>
|
||||
" />
|
||||
</template>
|
||||
</a-transfer>
|
||||
</a-card>
|
||||
|
@ -50,18 +31,18 @@
|
|||
import { orgList } from '@/api/org/org'
|
||||
import { listToTree } from '@/utils/util'
|
||||
|
||||
const treeData = [
|
||||
{ key: '0-0', title: '0-0' },
|
||||
{
|
||||
key: '0-1',
|
||||
title: '0-1',
|
||||
children: [
|
||||
{ key: '0-1-0', title: '0-1-0' },
|
||||
{ key: '0-1-1', title: '0-1-1' },
|
||||
],
|
||||
},
|
||||
{ key: '0-2', title: '0-3' },
|
||||
]
|
||||
const treeData = []
|
||||
// { key: '0-0', title: '0-0' },
|
||||
// {
|
||||
// key: '0-1',
|
||||
// title: '0-1',
|
||||
// children: [
|
||||
// { key: '0-1-0', title: '0-1-0' },
|
||||
// { key: '0-1-1', title: '0-1-1' },
|
||||
// ],
|
||||
// },
|
||||
// { key: '0-2', title: '0-3' },
|
||||
// ]
|
||||
|
||||
const transferDataSource = []
|
||||
|
||||
|
@ -99,7 +80,7 @@ export default {
|
|||
targetKeys: this.projectForm.unitIds || [],
|
||||
dataSource: transferDataSource,
|
||||
// treeData() {return handleTreeData(treeData, this.targetKeys)},
|
||||
treeData: []
|
||||
treeData: [],
|
||||
}
|
||||
},
|
||||
// 计算属性 类似于data概念
|
||||
|
@ -139,8 +120,11 @@ export default {
|
|||
//下一步
|
||||
toNext() {
|
||||
this.form.unitIds = this.targetKeys
|
||||
console.log('toNext', this.form)
|
||||
if (this.form.unitIds.length > 0) {
|
||||
this.$emit('nextStep', this.form)
|
||||
} else {
|
||||
this.$message.warning('请选择培训单位')
|
||||
}
|
||||
},
|
||||
//上一步
|
||||
toPrep() {
|
||||
|
@ -148,32 +132,41 @@ export default {
|
|||
console.log('toPrep', this.form)
|
||||
this.$emit('prevStep', this.form)
|
||||
},
|
||||
//提交表单
|
||||
handleSubmit() {
|
||||
this.form.unitIds = this.targetKeys
|
||||
if (this.form.unitIds.length > 0) {
|
||||
this.$emit('executeSave', this.form)
|
||||
} else {
|
||||
this.$message.warning('请选择培训单位')
|
||||
}
|
||||
},
|
||||
},
|
||||
// 生命周期 - 创建完成(可以访问当前this实例)
|
||||
created() {
|
||||
console.log('第2个表单创建了')
|
||||
// console.log('第2个表单创建了')
|
||||
this.getSourceList()
|
||||
console.log('form',this.form)
|
||||
// console.log('form', this.form)
|
||||
},
|
||||
|
||||
// 生命周期 - 挂载完成(可以访问DOM元素)
|
||||
mounted() {},
|
||||
mounted() { },
|
||||
// 生命周期 - 创建之前
|
||||
beforeCreate() {},
|
||||
beforeCreate() { },
|
||||
// 生命周期 - 挂载之前
|
||||
beforeMount() {},
|
||||
beforeMount() { },
|
||||
// 生命周期 - 更新之前
|
||||
beforeUpdate() {},
|
||||
beforeUpdate() { },
|
||||
// 生命周期 - 更新之后
|
||||
updated() {},
|
||||
updated() { },
|
||||
// 生命周期 - 销毁之前
|
||||
beforeDestroy() {},
|
||||
beforeDestroy() { },
|
||||
// 生命周期 - 销毁完成
|
||||
destroyed() {
|
||||
console.log('第2个表单销毁了')
|
||||
},
|
||||
// 如果页面有keep-alive缓存功能,这个函数会触发
|
||||
activated() {},
|
||||
activated() { },
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
|
|
@ -102,7 +102,7 @@ const vueConfig = {
|
|||
// 如果需要开启代理,请移除mockjs /src/main.jsL11
|
||||
proxy: {
|
||||
'/dawa': { // 捕获API的标志,如果API中有这个字符串,那么就开始匹配代理
|
||||
target: 'http://localhost:8080/', // 地址可以是域名,也可以是IP地址。比如API请求/api/getList, 会被代理到请求http://www.baidu.com/api/getList 。
|
||||
target: 'http://localhost:8000/', // 地址可以是域名,也可以是IP地址。比如API请求/api/getList, 会被代理到请求http://www.baidu.com/api/getList 。
|
||||
ws: false,
|
||||
changeOrigin: true // 如果target是域名需要额外添加一个参数changeOrigin: true,否则会代理失败。
|
||||
, pathRewrite: {
|
||||
|
|
Loading…
Reference in New Issue