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