项目管理更新

This commit is contained in:
Yjhon 2021-12-03 16:18:34 +08:00
parent 9aef31c7cb
commit 174a4314ac
10 changed files with 432 additions and 418 deletions

View File

@ -1,26 +1,35 @@
import request from '@/utils/request'
const questionApi = {
add: 'courseManagement/question/addOrUpdate',
get: '/courseManagement/question/details',
// 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"
add: 'courseManagement/question/addOrUpdate',
get: '/courseManagement/question/details',
// 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",
getQuestionNumByCourseIds: '/courseManagement/question/getQuestionNumByCourseIds',
}
// 题目新增
export function questionAdd (params) {
return request({
url: questionApi.add,
method: 'post',
data: 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',
data: params
})
}
// export function menuGet (params) {
// return request({
@ -38,30 +47,28 @@ export function questionAdd (params) {
// }
export function deleteQuestion (params) {
return request({
url: questionApi.del,
method: 'delete',
params: params
})
export function deleteQuestion(params) {
return request({
url: questionApi.del,
method: 'delete',
params: params
})
}
// 查看课程详情
export function getQuestionDeatil (params) {
return request({
url:questionApi.get,
method:'get',
params:params
})
export function getQuestionDeatil(params) {
return request({
url: questionApi.get,
method: 'get',
params: params
})
}
// 题目批量导入
export function importTemplate (params) {
return request({
url: questionApi.importTemplate,
method: 'post',
params: params
})
}
export function importTemplate(params) {
return request({
url: questionApi.importTemplate,
method: 'post',
params: params
})
}

View File

@ -1,151 +1,136 @@
<template>
<page-header-wrapper title="项目基础信息">
<template v-slot:content>
<a-descriptions size="small" :column="isMobile ? 1 : 2">
<a-descriptions-item label="项目名称">曲丽丽</a-descriptions-item>
<a-descriptions-item label="培训类型">2017-07-07</a-descriptions-item>
<a-descriptions-item label="培训种类"><a href="">12421</a></a-descriptions-item>
<a-descriptions-item label="培训方式">2017-07-07</a-descriptions-item>
<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-radio :default-checked="false" :disabled="disabled"> Disabled </a-radio>
<a-radio default-checked :disabled="disabled"> Disabled </a-radio>
</a-descriptions-item>
<a-descriptions-item label="备注">请于两个工作日内确认</a-descriptions-item>
</a-descriptions>
<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">
<a-descriptions-item label="项目名称">曲丽丽</a-descriptions-item>
<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>
<a-descriptions-item label="培训类型">2017-07-07</a-descriptions-item>
<a-descriptions-item label="培训种类"><a href="">12421</a></a-descriptions-item>
<a-descriptions-item label="培训方式">2017-07-07</a-descriptions-item>
<a-card :bordered="false" title="流程进度">
<a-steps :direction="(isMobile && 'vertical') || 'horizontal'" :current="1" progressDot>
<a-step>
<template v-slot:title>
<span>创建项目</span>
</template>
<template v-slot:description>
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
曲丽丽<a-icon type="dingding" style="margin-left: 8px" />
<div>2016-12-12 12:32</div>
</div>
</template>
</a-step>
<a-step>
<template v-slot:title>
<span>部门初审</span>
</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" />
<div><a>催一下</a></div>
</div>
</template>
</a-step>
<a-step title="财务复核" />
<a-step title="完成" />
</a-steps>
</a-card>
<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-radio :default-checked="false" :disabled="disabled"> Disabled </a-radio>
<a-radio default-checked :disabled="disabled"> Disabled </a-radio>
</a-descriptions-item> -->
<a-descriptions-item label="备注">请于两个工作日内确认</a-descriptions-item>
</a-descriptions>
</template>
<a-card style="margin-top: 24px" :bordered="false" title="用户信息">
<a-descriptions>
<a-descriptions-item label="用户姓名">付晓晓</a-descriptions-item>
<a-descriptions-item label="会员卡号">32943898021309809423</a-descriptions-item>
<a-descriptions-item label="身份证">3321944288191034921</a-descriptions-item>
<a-descriptions-item label="联系方式">18112345678</a-descriptions-item>
<a-descriptions-item label="联系地址">浙江省杭州市西湖区黄姑山路工专路交叉路口</a-descriptions-item>
</a-descriptions>
<a-descriptions title="信息组">
<a-descriptions-item label="某某数据">725</a-descriptions-item>
<a-descriptions-item label="该数据更新时间">2018-08-08</a-descriptions-item>
<a-descriptions-item></a-descriptions-item>
<a-descriptions-item label="某某数据">725</a-descriptions-item>
<a-descriptions-item label="该数据更新时间">2018-08-08</a-descriptions-item>
<a-descriptions-item></a-descriptions-item>
</a-descriptions>
<a-card type="inner" title="多层信息组">
<a-descriptions title="组名称" size="small">
<a-descriptions-item label="负责人">林东东</a-descriptions-item>
<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
>
<!-- <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> -->
<!-- <a-card :bordered="false" title="流程进度">
<a-steps :direction="(isMobile && 'vertical') || 'horizontal'" :current="1" progressDot>
<a-step>
<template v-slot:title>
<span>创建项目</span>
</template>
<template v-slot:description>
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
曲丽丽
<a-icon type="dingding" style="margin-left: 8px" />
<div>2016-12-12 12:32</div>
</div>
</template>
</a-step>
<a-step>
<template v-slot:title>
<span>部门初审</span>
</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" />
<div><a>催一下</a></div>
</div>
</template>
</a-step>
<a-step title="财务复核" />
<a-step title="完成" />
</a-steps>
</a-card> -->
<a-card style="margin-top: 24px" :bordered="false" title="用户信息">
<a-descriptions>
<a-descriptions-item label="用户姓名">付晓晓</a-descriptions-item>
<a-descriptions-item label="会员卡号">32943898021309809423</a-descriptions-item>
<a-descriptions-item label="身份证">3321944288191034921</a-descriptions-item>
<a-descriptions-item label="联系方式">18112345678</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
>
</a-descriptions>
<a-divider style="margin: 16px 0" />
<a-descriptions title="组名称" size="small" :col="2">
<a-descriptions-item label="负责人">付小小</a-descriptions-item>
<a-descriptions-item label="角色码">1234567</a-descriptions-item>
<a-descriptions title="信息组">
<a-descriptions-item label="某某数据">725</a-descriptions-item>
<a-descriptions-item label="该数据更新时间">2018-08-08</a-descriptions-item>
<a-descriptions-item></a-descriptions-item>
<a-descriptions-item label="某某数据">725</a-descriptions-item>
<a-descriptions-item label="该数据更新时间">2018-08-08</a-descriptions-item>
<a-descriptions-item></a-descriptions-item>
</a-descriptions>
<a-card type="inner" title="多层信息组">
<a-descriptions title="组名称" size="small">
<a-descriptions-item label="负责人">林东东</a-descriptions-item>
<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>
<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>
</a-descriptions>
<a-divider style="margin: 16px 0" />
<a-descriptions title="组名称" size="small" :col="2">
<a-descriptions-item label="负责人">付小小</a-descriptions-item>
<a-descriptions-item label="角色码">1234567</a-descriptions-item>
</a-descriptions>
</a-card>
</a-card>
</a-card>
<a-card style="margin-top: 24px" :bordered="false" title="用户近半年来电记录">
<div class="no-data"><a-icon type="frown-o" />暂无数据</div>
</a-card>
<a-card style="margin-top: 24px" :bordered="false" title="用户近半年来电记录">
<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"
>
<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"
>
<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"
>
<template slot="status" slot-scope="status">
<a-badge :status="status | statusTypeFilter" :text="status | statusFilter" />
</template>
</a-table>
</a-card>
</page-header-wrapper>
">
<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">
<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">
<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>

View File

@ -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, //
},
})

View File

@ -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',
},

View File

@ -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)
this.$emit('nextStep', 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) => {

View File

@ -3,119 +3,119 @@
<template slot="extra">
<a-button type="primary" size="default" @click="toNext">下一步</a-button>
</template>
<template slot="extra">
<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-row :gutter="24">
<a-col :md="24" :sm="24">
<a-form-model-item label="项目名称">
<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-select v-model="form.trainClass" placeholder="--请选择--">
<a-select-option v-for="entity in trainClass" :key="entity.value"> {{ entity.name }} </a-select-option>
</a-select>
<!-- <a-button type="primary" @click="$refs.classList.list()"> 新增种类 </a-button> -->
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="培训类型">
<a-select v-model="form.trainType" placeholder="--请选择--">
<a-select-option value="1"> 必修课 </a-select-option>
<a-select-option value="2"> 选修课 </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="培训方式">
<a-select v-model="form.trainWay" placeholder="--请选择--">
<a-select-option value="1"> 培训 </a-select-option>
<a-select-option value="2"> 考试 </a-select-option>
<a-select-option value="3"> 培训-练习 </a-select-option>
<a-select-option value="4"> 培训-练习-考试 </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="人员类型">
<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>
</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-date-picker v-model="form.trainSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
</a-form-item>
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
<a-date-picker v-model="form.trainEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
</a-form-item>
</a-form-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-date-picker v-model="form.practiceSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
</a-form-item>
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
<a-date-picker v-model="form.practiceEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
</a-form-item>
</a-form-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-date-picker v-model="form.examSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
</a-form-item>
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
<a-date-picker v-model="form.examEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
</a-form-item>
</a-form-item>
</a-col>
<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="项目名称" 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="培训种类" 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>
<!-- <a-button type="primary" @click="$refs.classList.list()"> 新增种类 </a-button> -->
</a-form-model-item>
</a-col>
<a-col :span="24">
<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>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<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>
<a-select-option value="3"> 培训-练习 </a-select-option>
<a-select-option value="4"> 培训-练习-考试 </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<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>
</a-form-model-item>
</a-col>
<!-- 时间选择器呢 -->
<a-col :span="24">
<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-model-item>
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
<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-model-item>
</a-form-model-item>
</a-col>
<!-- 时间选择器 -->
<a-col :span="24">
<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-model-item>
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
<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-model-item>
</a-form-model-item>
</a-col>
<!-- 时间选择器 -->
<a-col :span="24">
<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-model-item>
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
<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-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-input-number v-model="form.examNumber" :min="0" style="width: 100%" />
</a-form-item>
<!-- <span> 补考次数: </span>
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
<!-- 考试次数 -->
<a-col :span="24">
<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-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-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-col>
</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-radio-group v-model="form.mockExam">
<a-radio value="1"> 允许 </a-radio>
<a-radio value="0"> 不允许 </a-radio>
</a-radio-group>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注">
<a-input v-model="form.remark" type="textarea" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<a-col :span="24">
<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>
</a-radio-group>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注">
<a-input v-model="form.remark" type="textarea" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</a-card>
<!-- </page-header-wrapper> -->
<!-- <class-list ref="ClassList"></class-list> -->
@ -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)
this.$emit('nextStep', this.form)
// console.log('toNext', this.form)
this.$refs.form.validate((validate) => {
if (validate) {
this.$emit('nextStep', this.form)
}
})
},
},
destroyed() {

View File

@ -129,7 +129,11 @@ export default {
toNext() {
this.form.projectPersonLists = this.selectedRows
this.form.personIds = this.selectedRowKeys
this.$emit('nextStep', this.form)
if(this.form.personIds.length > 0){
this.$emit('nextStep', this.form)
}else{
this.$message.warning('培训人员不能为空')
}
},
//
toPrev() {

View File

@ -9,39 +9,39 @@
<template slot="extra">
<a-button type="primary" size="default" @click="toIssue">发布</a-button>
</template>
<a-form-model :model="form" v-bind="formItemLayout">
<a-row :gutter="24">
<a-col :md="10" :sm="12">
<a-form-model-item label="总分">
<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-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-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-input-number :min="0" v-model="form.topicNumber" />
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24">
<h4>考试开启条件</h4>
<a-col :md="10" :sm="12">
<a-form-model-item label="学时时长">
<a-input-number :min="0" v-model="form.examOpenCondition" />
</a-form-model-item>
</a-col>
</a-row>
<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="总分" 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="及格分数" 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="考试时长" 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="默认组卷题量" prop="topicNumber">
<a-input-number :min="0" v-model="form.topicNumber" />
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24">
<h4>考试开启条件</h4>
<a-col :md="10" :sm="12">
<a-form-model-item label="学时时长" prop="examOpenCondition">
<a-input-number :min="0" v-model="form.examOpenCondition" />
</a-form-model-item>
</a-col>
</a-row>
<a-card :bordered="false" title="组卷策略详情">
<a-table :columns="columns" :data-source="tableData" bordered :position="{ disabled: false }">
@ -60,6 +60,7 @@
<script>
// jsjsjson
// 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>

View File

@ -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)
this.$emit('nextStep', 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>

View File

@ -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: {