项目管理新增
This commit is contained in:
parent
4c25eb3b75
commit
15a836e28b
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<a-card :bordered="false" title="人员档案">
|
<a-card :bordered="false" title="项目管理">
|
||||||
<a-space direction="vertical" style="width: 100%">
|
<a-space direction="vertical" style="width: 100%">
|
||||||
<a-space direction="horizontal">
|
<a-space direction="horizontal">
|
||||||
项目名:
|
项目名:
|
||||||
|
|
|
@ -16,16 +16,37 @@
|
||||||
<span slot="serial" slot-scope="text, record, index">
|
<span slot="serial" slot-scope="text, record, index">
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</span>
|
</span>
|
||||||
<span slot="action" slot-scope="text, record">
|
<template slot="action" slot-scope="text, record">
|
||||||
<template>
|
<a-dropdown
|
||||||
<a-button type="primary" @click="$refs.table.refresh(false)">课程预览</a-button>
|
v-if="
|
||||||
<a-button type="primary" @click="$refs.table.refresh(false)">题库预览</a-button>
|
hasPerm('archives:user:autotrain:list') ||
|
||||||
<a-button type="primary" @click="$refs.table.refresh(false)">必选题设置</a-button>
|
hasPerm('archives:user:terminaltrain:list') ||
|
||||||
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
hasPerm('archives:user:selfStudy:list') ||
|
||||||
<a-button type="primary" @click="$refs.table.refresh(true)">删除</a-button>
|
hasPerm('archives:user:violation:list')
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<a class="ant-dropdown-link"
|
||||||
|
>操作
|
||||||
|
<a-icon type="down" />
|
||||||
|
</a>
|
||||||
|
<a-menu slot="overlay">
|
||||||
|
<a-menu-item v-if="hasPerm('archives:user:autotrain:list') || hasPerm('archives:user:terminaltrain:list')">
|
||||||
|
<a href="javascript:;" @click="archivesProject(record)">发布</a>
|
||||||
|
</a-menu-item>
|
||||||
|
<a-menu-item v-if="hasPerm('archives:user:selfStudy:list')">
|
||||||
|
<a href="javascript:;" @click="archivesSelfStudy(record)">详情</a>
|
||||||
|
</a-menu-item>
|
||||||
|
<a-menu-item v-if="hasPerm('archives:user:violation:list')">
|
||||||
|
<a href="javascript:;" @click="archivesViolation(record)">修改</a>
|
||||||
|
</a-menu-item>
|
||||||
|
<a-menu-item>
|
||||||
|
<a-popconfirm title="是否删除?" @confirm="() => delTerminalTrain(record)">
|
||||||
|
<a href="javascript:;">删 除</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
|
</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
</a-dropdown>
|
||||||
</template>
|
</template>
|
||||||
</span>
|
|
||||||
</s-table>
|
</s-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
@ -34,22 +55,30 @@
|
||||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||||
//例如:import 《组件名称》 from '《组件路径》'
|
//例如:import 《组件名称》 from '《组件路径》'
|
||||||
import { SearchCom, STable } from '@/components'
|
import { SearchCom, STable } from '@/components'
|
||||||
import { terminalTrainList } from '@/api/project/terminalTrain'
|
import { terminalTrainList,terminalTrainDel } from '@/api/project/terminalTrain'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
//import引入的组件需要注入到对象中才能使用
|
//import引入的组件需要注入到对象中才能使用
|
||||||
components: { SearchCom, STable, terminalTrainList },
|
components: { SearchCom, STable, terminalTrainList,terminalTrainDel },
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
//这里存放数据
|
//这里存放数据
|
||||||
return {
|
return {
|
||||||
queryParam: {
|
queryParam: {
|
||||||
status: this.$route.query.terminalTrainQueryProjectStatus || '',
|
status: this.$route.query.terminalTrainQueryProjectStatus || null,
|
||||||
name: this.$route.query.terminalTrainQueryProjectName || '',
|
name: this.$route.query.terminalTrainQueryProjectName || null,
|
||||||
startDate: this.$route.query.terminalTrainQueryStartDate || null,
|
startDate: this.$route.query.terminalTrainQueryStartDate || null,
|
||||||
endDate: this.$route.query.terminalTrainQueryEndDate || null,
|
endDate: this.$route.query.terminalTrainQueryEndDate || null,
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
width: 'auto',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'id',
|
||||||
|
key: 'id',
|
||||||
|
scopedSlots: { customRender: 'serial' },
|
||||||
|
},
|
||||||
{ title: '项目名称', width: 'auto', align: 'center', dataIndex: 'projectName', key: 'projectName' },
|
{ title: '项目名称', width: 'auto', align: 'center', dataIndex: 'projectName', key: 'projectName' },
|
||||||
{
|
{
|
||||||
title: '时间',
|
title: '时间',
|
||||||
|
@ -63,17 +92,19 @@ export default {
|
||||||
title: '人数',
|
title: '人数',
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'personNum',
|
dataIndex: 'num',
|
||||||
key: 'personNum',
|
key: 'num',
|
||||||
customRender: (record) => record.signNum + '/' + record.personNum,
|
customRender: (text, record, index) => {
|
||||||
|
return record.signNum + ' / ' + record.personNum
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ title: '培训类型', width: 'auto', align: 'center', dataIndex: 'projectType', key: 'projectType' },
|
{ title: '培训类型', width: 'auto', align: 'center', dataIndex: 'projectType', key: 'projectType' },
|
||||||
{
|
{
|
||||||
title: '项目状态',
|
title: '项目状态',
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'finishState',
|
dataIndex: 'status',
|
||||||
key: 'finishState',
|
key: 'status',
|
||||||
customRender: (text, record, index) => {
|
customRender: (text, record, index) => {
|
||||||
// 完成状态 0-未完成 1-已完成
|
// 完成状态 0-未完成 1-已完成
|
||||||
if (text == 0) return '未完成'
|
if (text == 0) return '未完成'
|
||||||
|
@ -86,6 +117,8 @@ export default {
|
||||||
],
|
],
|
||||||
loadData: (parameter) => {
|
loadData: (parameter) => {
|
||||||
return terminalTrainList(Object.assign(parameter, this.queryParam)).then((res) => {
|
return terminalTrainList(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||||
|
const record = {signNum : 20, personNum: 40}
|
||||||
|
console.log(record.signNum + '/' + record.personNum)
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -119,8 +152,19 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
//方法集合
|
//方法集合
|
||||||
methods: {
|
methods: {
|
||||||
handleRefresh() {
|
//刷新列表
|
||||||
console.log('handleRefresh',this.queryParam)
|
handleRefresh(bool) {
|
||||||
|
console.log('handleRefresh', this.queryParam)
|
||||||
|
this.$refs.table.refresh(bool)
|
||||||
|
},
|
||||||
|
delTerminalTrain(record){
|
||||||
|
console.log("delete Id:",record.id)
|
||||||
|
terminalTrainDel({ids:record.id}).then((res => {
|
||||||
|
console.log(res)
|
||||||
|
if(res.code == 200){
|
||||||
|
this.$message.info('删除成功')
|
||||||
|
}
|
||||||
|
}))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {}, //生命周期 - 创建完成(可以访问当前this实例)
|
created() {}, //生命周期 - 创建完成(可以访问当前this实例)
|
||||||
|
|
Loading…
Reference in New Issue