项目管理新增
This commit is contained in:
parent
10c77ddb1d
commit
4c25eb3b75
|
@ -0,0 +1,30 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
const terminalTrainApi = {
|
||||||
|
edit: '/project/terminal/addOrUpdate',
|
||||||
|
del: '/project/terminal/del',
|
||||||
|
list: '/project/terminal/pageList'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function terminalTrainEdit(params) {
|
||||||
|
return request({
|
||||||
|
url: terminalTrainApi.add,
|
||||||
|
method: 'post',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function terminalTrainDel (params) {
|
||||||
|
return request({
|
||||||
|
url: terminalTrainApi.del,
|
||||||
|
method: 'delete',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function terminalTrainList(params) {
|
||||||
|
console.log("terminalTrainList------------{}", params)
|
||||||
|
return request({
|
||||||
|
url: terminalTrainApi.list,
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
|
@ -178,6 +178,8 @@
|
||||||
created () {
|
created () {
|
||||||
/**
|
/**
|
||||||
* 获取到机构树,展开顶级下树节点,考虑到后期数据量变大,不建议全部展开
|
* 获取到机构树,展开顶级下树节点,考虑到后期数据量变大,不建议全部展开
|
||||||
|
完犊子,你的决策支撑写完了?可以的呢
|
||||||
|
我反正用不上,这两天发展党员还可以凑凑
|
||||||
*/
|
*/
|
||||||
orgList().then(res => {
|
orgList().then(res => {
|
||||||
this.treeLoading = false
|
this.treeLoading = false
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
<a-steps class="steps" :current="currentTab">
|
<a-steps class="steps" :current="currentTab">
|
||||||
<a-step title="基本信息" />
|
<a-step title="基本信息" />
|
||||||
<a-step title="选择单位" />
|
<a-step title="选择单位" />
|
||||||
<a-step v-if="['2', '3', '4'].includes(form.trainWay)" title="选择课程" />
|
<!-- v-if="['2', '3', '4'].includes(form.trainWay)" -->
|
||||||
|
<a-step title="选择课程" />
|
||||||
<a-step title="选择人员" />
|
<a-step title="选择人员" />
|
||||||
<a-step title="完成" />
|
<a-step title="完成" />
|
||||||
</a-steps>
|
</a-steps>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<a-space align="baseline" direction="vertical" style="width: 100%">
|
<a-card :bordered="false" title="培训种类">
|
||||||
|
<div class="table-operator">
|
||||||
<a-button type="primary" icon="plus" @click="$refs.ClassForm.showModal()">新增种类</a-button>
|
<a-button type="primary" icon="plus" @click="$refs.ClassForm.showModal()">新增种类</a-button>
|
||||||
<s-table ref="table" rowKey="id" :columns="columns" :data="dataTable" style="width: 100%">
|
</div>
|
||||||
|
<s-table ref="table" rowKey="id" :columns="columns" :data="dataTable">
|
||||||
<span slot="serial" slot-scope="text, record, index">
|
<span slot="serial" slot-scope="text, record, index">
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -14,7 +16,7 @@
|
||||||
</span>
|
</span>
|
||||||
</s-table>
|
</s-table>
|
||||||
<class-form ref="ClassForm"></class-form>
|
<class-form ref="ClassForm"></class-form>
|
||||||
</a-space>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -32,11 +34,10 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '序号', key: 'id', dataIndex: 'id', width: 80, scopedSlots: { customRender: 'serial' } },
|
{ title: '序号', key: 'id', dataIndex: 'id', scopedSlots: { customRender: 'serial' } },
|
||||||
{ title: '项目种类名称', dataIndex: 'value', key: 'value', align: 'center' },
|
{ title: '项目种类名称', dataIndex: 'value', key: 'value', align: 'center' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: 200,
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
</span>
|
</span>
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<template>
|
<template>
|
||||||
<a-button type="primary" @click="$refs.table.refresh(true)">课程预览</a-button>
|
<a-button type="primary" @click="$refs.table.refresh(false)">课程预览</a-button>
|
||||||
<a-button type="primary" @click="$refs.table.refresh(true)">题库预览</a-button>
|
<a-button type="primary" @click="$refs.table.refresh(false)">题库预览</a-button>
|
||||||
<a-button type="primary" @click="$refs.table.refresh(true)">必选题设置</a-button>
|
<a-button type="primary" @click="$refs.table.refresh(false)">必选题设置</a-button>
|
||||||
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
||||||
<a-button type="primary" @click="$refs.table.refresh(true)">删除</a-button>
|
<a-button type="primary" @click="$refs.table.refresh(true)">删除</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||||
//例如:import 《组件名称》 from '《组件路径》'
|
//例如:import 《组件名称》 from '《s组件路径》'
|
||||||
import { STable } from '@/components'
|
import { STable } from '@/components'
|
||||||
import ProjectCourseSelect from './ProjectCourseSelect.vue'
|
import ProjectCourseSelect from './ProjectCourseSelect.vue'
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
//例如:import 《组件名称》 from '《组件路径》'
|
//例如:import 《组件名称》 from '《组件路径》'
|
||||||
|
|
||||||
/**------------------------------------------------------------ */
|
/**------------------------------------------------------------ */
|
||||||
|
420500199901110031
|
||||||
/**----------------------------------------------------------------- */
|
/**----------------------------------------------------------------- */
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -12,18 +12,20 @@
|
||||||
"
|
"
|
||||||
></SearchCom>
|
></SearchCom>
|
||||||
</div>
|
</div>
|
||||||
<s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData" :pageNum="Number(this.$route.query.archivesUserPageNum) || 1">
|
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
|
||||||
<template slot="action" slot-scope="text, record">
|
<span slot="serial" slot-scope="text, record, index">
|
||||||
<a href="javascript:;" @click="handleRefresh()">项目档案</a>
|
{{ index + 1 }}
|
||||||
<a-divider type="vertical" />
|
</span>
|
||||||
<a href="javascript:;" @click="handleRefresh()">自学档案</a>
|
<span slot="action" slot-scope="text, record">
|
||||||
<br />
|
<template>
|
||||||
<a href="javascript:;" @click="handleRefresh()">违章档案</a>
|
<a-button type="primary" @click="$refs.table.refresh(false)">课程预览</a-button>
|
||||||
<a-divider type="vertical" />
|
<a-button type="primary" @click="$refs.table.refresh(false)">题库预览</a-button>
|
||||||
<a-popconfirm title="确认导出?" cancelText="取消" okText="确认" @confirm="() => handleDelete(record)">
|
<a-button type="primary" @click="$refs.table.refresh(false)">必选题设置</a-button>
|
||||||
<a href="javascript:;"> 导出 </a>
|
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
||||||
|
<a-button type="primary" @click="$refs.table.refresh(true)">删除</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
|
</span>
|
||||||
</s-table>
|
</s-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
@ -31,29 +33,43 @@
|
||||||
<script>
|
<script>
|
||||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||||
//例如:import 《组件名称》 from '《组件路径》'
|
//例如:import 《组件名称》 from '《组件路径》'
|
||||||
import {SearchCom} from '@/components/SearchCom'
|
import { SearchCom, STable } from '@/components'
|
||||||
|
import { terminalTrainList } from '@/api/project/terminalTrain'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
//import引入的组件需要注入到对象中才能使用
|
//import引入的组件需要注入到对象中才能使用
|
||||||
components: { SearchCom },
|
components: { SearchCom, STable, terminalTrainList },
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
//这里存放数据
|
//这里存放数据
|
||||||
return {
|
return {
|
||||||
queryParam: {
|
queryParam: {
|
||||||
status: this.$route.query.terminalTrainQueryProjectStatus || '',
|
status: this.$route.query.terminalTrainQueryProjectStatus || '',
|
||||||
projectName: this.$route.query.terminalTrainQueryProjectName || '',
|
name: this.$route.query.terminalTrainQueryProjectName || '',
|
||||||
startDate: this.$route.query.terminalTrainQueryStartDate || '',
|
startDate: this.$route.query.terminalTrainQueryStartDate || null,
|
||||||
endDate: this.$route.query.terminalTrainQueryEndDate || '',
|
endDate: this.$route.query.terminalTrainQueryEndDate || null,
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '项目名称', width: 'auto', align: 'center', dataIndex: 'projectName', key: 'projectName' },
|
{ title: '项目名称', width: 'auto', align: 'center', dataIndex: 'projectName', key: 'projectName' },
|
||||||
{ title: '项目时间', width: 'auto', align: 'center', dataIndex: 'projectData', key: 'projectData' },
|
|
||||||
{ title: '受训角色', width: 'auto', align: 'center', dataIndex: 'roleName', key: 'roleName' },
|
|
||||||
{ title: '应修学时', width: 'auto', align: 'center', dataIndex: 'mustClassHour', key: 'mustClassHour' },
|
|
||||||
{ title: '已修学时', width: 'auto', align: 'center', dataIndex: 'alreadyClassHour', key: 'alreadyClassHour' },
|
|
||||||
{
|
{
|
||||||
title: '完成状态',
|
title: '时间',
|
||||||
|
dataIndex: 'date',
|
||||||
|
key: 'date',
|
||||||
|
customRender: (text, record, index) => {
|
||||||
|
return record.startDate + ' - ' + record.endDate
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '人数',
|
||||||
|
width: 'auto',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'personNum',
|
||||||
|
key: 'personNum',
|
||||||
|
customRender: (record) => record.signNum + '/' + record.personNum,
|
||||||
|
},
|
||||||
|
{ title: '培训类型', width: 'auto', align: 'center', dataIndex: 'projectType', key: 'projectType' },
|
||||||
|
{
|
||||||
|
title: '项目状态',
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'finishState',
|
dataIndex: 'finishState',
|
||||||
|
@ -64,28 +80,15 @@ export default {
|
||||||
else if (text == 1) return '已完成'
|
else if (text == 1) return '已完成'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ title: '总练习题量', width: 'auto', align: 'center', dataIndex: 'addUpExercises', key: 'addUpExercises' },
|
{ title: '创建人员', width: 'auto', align: 'center', dataIndex: 'createBy', key: 'createBy' },
|
||||||
{ title: '已练习题量', width: 'auto', align: 'center', dataIndex: 'alreadyExercises', key: 'alreadyExercises' },
|
{ title: '创建日期', width: 'auto', align: 'center', dataIndex: 'createDate', key: 'createDate' },
|
||||||
{ title: '答对题量', width: 'auto', align: 'center', dataIndex: 'yesTopic', key: 'yesTopic' },
|
|
||||||
{ title: '正确率', width: 'auto', align: 'center', dataIndex: 'yesRate', key: 'yesRate' },
|
|
||||||
{ title: '考试成绩', width: 'auto', align: 'center', dataIndex: 'testResult', key: 'testResult' },
|
|
||||||
{ title: '补考成绩', width: 'auto', align: 'center', dataIndex: 'mendTestResult', key: 'mendTestResult' },
|
|
||||||
{ title: '考试耗时', width: 'auto', align: 'center', dataIndex: 'testTime', key: 'testTime' },
|
|
||||||
{
|
|
||||||
title: '考试状态',
|
|
||||||
width: 'auto',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'testState',
|
|
||||||
key: 'testState',
|
|
||||||
customRender: (text, record, index) => {
|
|
||||||
// 考试状态 0-不合格 1-合格
|
|
||||||
if (text == 0) return '不合格'
|
|
||||||
else if (text == 1) return '合格'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ title: '操作', width: '90px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } },
|
{ title: '操作', width: '90px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } },
|
||||||
],
|
],
|
||||||
loadData: parameter => { return getArchivesUserList(Object.assign(parameter, this.queryParam)).then(res => { return res }) }
|
loadData: (parameter) => {
|
||||||
|
return terminalTrainList(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||||
|
return res
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//计算属性 类似于data概念
|
//计算属性 类似于data概念
|
||||||
|
@ -117,7 +120,7 @@ export default {
|
||||||
//方法集合
|
//方法集合
|
||||||
methods: {
|
methods: {
|
||||||
handleRefresh() {
|
handleRefresh() {
|
||||||
console.log('handleRefresh')
|
console.log('handleRefresh',this.queryParam)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {}, //生命周期 - 创建完成(可以访问当前this实例)
|
created() {}, //生命周期 - 创建完成(可以访问当前this实例)
|
||||||
|
|
Loading…
Reference in New Issue