项目管理收尾
This commit is contained in:
parent
4200f1b952
commit
07147a4db1
|
@ -6,6 +6,7 @@ const projectApi = {
|
|||
list: 'project/pageList',
|
||||
get: 'project/get',
|
||||
projectCourseList: '',
|
||||
release: '/project/release',
|
||||
}
|
||||
|
||||
export function projectAdd(params) {
|
||||
|
@ -40,3 +41,10 @@ export function getProjectDetail (params) {
|
|||
})
|
||||
}
|
||||
|
||||
export function releaseProject(params) {
|
||||
return request({
|
||||
url: projectApi.release,
|
||||
method: 'post',
|
||||
params: params
|
||||
})
|
||||
}
|
|
@ -4,7 +4,8 @@ const terminalTrainApi = {
|
|||
edit: '/project/terminal/addOrUpdate',
|
||||
del: '/project/terminal/del',
|
||||
list: '/project/terminal/pageList',
|
||||
get: '/project/terminal/get'
|
||||
get: '/project/terminal/get',
|
||||
release: '/project/terminal/release', //发布项目
|
||||
}
|
||||
|
||||
export function terminalTrainEdit(params) {
|
||||
|
@ -43,3 +44,13 @@ export function terminalTrainGet(params) {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
// releaseTerminalTrain
|
||||
export function releaseTerminalTrain(params) {
|
||||
console.log("terminalTrainRelease------------{}", params)
|
||||
return request({
|
||||
url: terminalTrainApi.release,
|
||||
method: 'put',
|
||||
params: params
|
||||
})
|
||||
}
|
|
@ -38,7 +38,7 @@
|
|||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<template>
|
||||
<a v-if="hasPerm(power.release) && record.status == 1" href="javascript:;" @click="handledRelease(record)">发布</a>
|
||||
<a v-if="hasPerm(power.release) && record.status == '1'" href="javascript:;" @click="handledRelease(record)">发布</a>
|
||||
<a-divider type="vertical" v-if="hasPerm(power.edit) && hasPerm('project:list')" />
|
||||
<a v-if="hasPerm('project:list')" href="javascript:;" @click="getDetail(record)">详情</a>
|
||||
<a-divider type="vertical" v-if="hasPerm(power.edit) && hasPerm('project:list')" />
|
||||
|
@ -56,7 +56,7 @@
|
|||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { getProjectList } from '@/api/project/project'
|
||||
import { getProjectList,releaseProject } from '@/api/project/project'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -149,7 +149,12 @@ export default {
|
|||
methods: {
|
||||
//发布项目
|
||||
handledRelease(record){
|
||||
|
||||
releaseProject({id: record.id}).then((res) => {
|
||||
if(res.code == 200){
|
||||
this.$message.success('项目:'+record.projectName+' 发布成功!');
|
||||
this.$refs.table.refresh(false);
|
||||
}
|
||||
})
|
||||
},
|
||||
//编辑时获取详情
|
||||
getDetail(record) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div class="content">
|
||||
<!-- <keep-alive exclude="result"> -->
|
||||
<step1 v-if="currentTab === 0" :projectForm="form" @nextStep="nextStep" @close="close" @setFormType="setFormType"/>
|
||||
<step2 v-if="currentTab === 1" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" />
|
||||
<step2 v-if="currentTab === 1" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" @executeSave="executeSave"/>
|
||||
<step3 v-if="currentTab === 2" :projectForm="form" :courseChange="courseChange" @nextStep="nextStep" @prevStep="prevStep" />
|
||||
<step4 v-if="currentTab === 3" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" />
|
||||
<step5
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
<a-menu-item key="sys">系统课程</a-menu-item>
|
||||
<a-menu-item key="self">自主课程</a-menu-item>
|
||||
</a-menu>
|
||||
<a-tree :treeData="treeData" @select="onSelect" :defaultExpandAll="true" :defaultExpandedKeys="defaultExpandedKeys" :replaceFields="replaceFields">
|
||||
<!-- :defaultExpandedKeys="defaultExpandedKeys" -->
|
||||
<a-tree :treeData="treeData" @select="onSelect" :defaultExpandAll="true" :replaceFields="replaceFields">
|
||||
<a-icon slot="switcherIcon" type="down" />
|
||||
</a-tree>
|
||||
</a-col>
|
||||
|
@ -22,7 +23,7 @@
|
|||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<s-table ref="table" :columns="columns" :data="loadData" :rowKey="(record) => record.id" :rowSelection="{ selectedRowKeys: selectedRowKeys, selectedRows: selectedRows, onChange: onSelectChange }">
|
||||
<s-table ref="table" :columns="columns" :data="loadData" :rowKey="(record) => record.value" :rowSelection="{ selectedRowKeys: selectedRowKeys, selectedRows: selectedRows, onChange: onSelectChange }">
|
||||
<span slot="serial" slot-scope="text, record, index">
|
||||
{{ index + 1 }}
|
||||
</span>
|
||||
|
@ -70,10 +71,10 @@ export default {
|
|||
|
||||
// 查询参数
|
||||
queryParam: { name: '', classType: 0 ,type: 0},
|
||||
replaceFields: { children: 'children', title: 'name', key: 'id', value: 'id' },
|
||||
replaceFields: { children: 'children', title: 'name', key: 'key', value: 'value' },
|
||||
expandedKeys: [],
|
||||
autoExpandParent: true,
|
||||
defaultExpandedKeys: [],
|
||||
// defaultExpandedKeys: [],
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
treeData: [],
|
||||
|
@ -200,7 +201,7 @@ export default {
|
|||
const list2tree1 = (list, parentId) => {
|
||||
return list.filter((item) => {
|
||||
// 默认选中第一个节点
|
||||
if (this.treeDataOne) this.treeDataOne.push(item.id)
|
||||
if (this.treeDataOne) this.treeDataOne.push(item.value)
|
||||
if (item.parentId === parentId) {
|
||||
item.children = list2tree1(list, item.id)
|
||||
return true
|
||||
|
|
|
@ -128,8 +128,10 @@ export default {
|
|||
},
|
||||
//提交表单
|
||||
handleSubmit() {
|
||||
console.log('提交表单保存')
|
||||
this.form.unitIds = this.targetKeys
|
||||
if (this.form.unitIds.length > 0) {
|
||||
console.log('进来判断')
|
||||
this.$emit('executeSave', this.form)
|
||||
} else {
|
||||
this.$message.warning('请选择培训单位')
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||
//例如:import 《组件名称》 from '《组件路径》'
|
||||
import { SearchCom, STable } from '@/components'
|
||||
import { terminalTrainList, terminalTrainDel } from '@/api/project/terminalTrain'
|
||||
import { terminalTrainList, terminalTrainDel ,releaseTerminalTrain } from '@/api/project/terminalTrain'
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用
|
||||
|
@ -157,7 +157,13 @@ export default {
|
|||
},
|
||||
//发布项目
|
||||
executeRelease(record) {
|
||||
console.log('发布项目 id:', record.id)
|
||||
// console.log('发布项目 id:', record.id)
|
||||
releaseTerminalTrain({id:record.id}).then((res) => {
|
||||
if(res.code == 200){
|
||||
this.$message.success('项目:'+record.projectName+' 发布成功!');
|
||||
this.$refs.table.refresh(false);
|
||||
}
|
||||
})
|
||||
},
|
||||
//跳转详情页面
|
||||
getDetail(record) {
|
||||
|
|
Loading…
Reference in New Issue