项目管理新增

This commit is contained in:
Yuanjianghong 2021-09-13 16:30:02 +08:00
parent 10c77ddb1d
commit 4c25eb3b75
7 changed files with 92 additions and 55 deletions

View File

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

View File

@ -178,6 +178,8 @@
created () { created () {
/** /**
* 获取到机构树展开顶级下树节点考虑到后期数据量变大不建议全部展开 * 获取到机构树展开顶级下树节点考虑到后期数据量变大不建议全部展开
完犊子你的决策支撑写完了可以的呢
我反正用不上这两天发展党员还可以凑凑
*/ */
orgList().then(res => { orgList().then(res => {
this.treeLoading = false this.treeLoading = false

View File

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

View File

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

View File

@ -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>
//jsjsjson //jsjsjson
//import from '' //import from 's'
import { STable } from '@/components' import { STable } from '@/components'
import ProjectCourseSelect from './ProjectCourseSelect.vue' import ProjectCourseSelect from './ProjectCourseSelect.vue'

View File

@ -44,7 +44,7 @@
//import from '' //import from ''
/**------------------------------------------------------------ */ /**------------------------------------------------------------ */
420500199901110031
/**----------------------------------------------------------------- */ /**----------------------------------------------------------------- */
export default { export default {

View File

@ -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>
//jsjsjson //jsjsjson
//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