dev
parent
8f2e872166
commit
640e3def28
@ -0,0 +1,82 @@
|
||||
import request from "@/utils/request";
|
||||
function customParamsSerializer(params) {
|
||||
let result = '';
|
||||
for (let key in params) {
|
||||
if (params.hasOwnProperty(key)) {
|
||||
if (Array.isArray(params[key])) {
|
||||
params[key].forEach((item,index) => {
|
||||
if(item.key){
|
||||
result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
|
||||
|
||||
}else{
|
||||
result +=`${key}[${index}]=${item}&`
|
||||
}
|
||||
});
|
||||
} else {
|
||||
result += `${key}=${params[key]}&`;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.slice(0, -1);
|
||||
}
|
||||
|
||||
export function index(params,isLoading = false) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/course-signs/index",
|
||||
params,
|
||||
paramsSerializer: customParamsSerializer,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function show(params, isLoading = true) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/course-signs/show",
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/api/admin/course-signs/save",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(params) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/course-signs/destroy",
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function updateStatus(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/api/admin/course-signs/batch-update-status",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateFeeStatus(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/api/admin/course-signs/batch-update-fee-status",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sendNotice(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/api/admin/course-signs/batch-notice",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
import request from "@/utils/request";
|
||||
function customParamsSerializer(params) {
|
||||
let result = '';
|
||||
for (let key in params) {
|
||||
if (params.hasOwnProperty(key)) {
|
||||
if (Array.isArray(params[key])) {
|
||||
params[key].forEach((item,index) => {
|
||||
if(item.key){
|
||||
result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
|
||||
|
||||
}else{
|
||||
result +=`${key}[${index}]=${item}&`
|
||||
}
|
||||
});
|
||||
} else {
|
||||
result += `${key}=${params[key]}&`;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.slice(0, -1);
|
||||
}
|
||||
export function index(params,isLoading = false) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/course-settings/index",
|
||||
params,
|
||||
paramsSerializer: customParamsSerializer,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function show(params, isLoading = true) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/course-settings/show",
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/api/admin/course-settings/save",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(params) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/course-settings/destroy",
|
||||
params
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
import request from "@/utils/request";
|
||||
function customParamsSerializer(params) {
|
||||
let result = '';
|
||||
for (let key in params) {
|
||||
if (params.hasOwnProperty(key)) {
|
||||
if (Array.isArray(params[key])) {
|
||||
params[key].forEach((item,index) => {
|
||||
if(item.key){
|
||||
result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
|
||||
|
||||
}else{
|
||||
result +=`${key}[${index}]=${item}&`
|
||||
}
|
||||
});
|
||||
} else {
|
||||
result += `${key}=${params[key]}&`;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.slice(0, -1);
|
||||
}
|
||||
export function index(params,isLoading = false) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/courses/index",
|
||||
params,
|
||||
paramsSerializer: customParamsSerializer,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function show(params, isLoading = true) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/courses/show",
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/api/admin/courses/save",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(params) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/courses/destroy",
|
||||
params
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
import request from "@/utils/request";
|
||||
function customParamsSerializer(params) {
|
||||
let result = '';
|
||||
for (let key in params) {
|
||||
if (params.hasOwnProperty(key)) {
|
||||
if (Array.isArray(params[key])) {
|
||||
params[key].forEach((item,index) => {
|
||||
if(item.key){
|
||||
result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
|
||||
|
||||
}else{
|
||||
result +=`${key}[${index}]=${item}&`
|
||||
}
|
||||
});
|
||||
} else {
|
||||
result += `${key}=${params[key]}&`;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.slice(0, -1);
|
||||
}
|
||||
|
||||
export function index(params,isLoading = false) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/users/index",
|
||||
params,
|
||||
paramsSerializer: customParamsSerializer,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function indexStudy(params,isLoading = false) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/users/study",
|
||||
params,
|
||||
paramsSerializer: customParamsSerializer,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function show(params, isLoading = true) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/users/show",
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(params) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/users/destroy",
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function importStudy(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/api/admin/users/import-study",
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
false_or_true: [{
|
||||
id: 0,
|
||||
value: '否'
|
||||
}, {
|
||||
id: 1,
|
||||
value: '是'
|
||||
}],
|
||||
apply_status_list:[{
|
||||
id: 0,
|
||||
value: '待审核'
|
||||
}, {
|
||||
id: 1,
|
||||
value: '通过'
|
||||
}, {
|
||||
id: 1,
|
||||
value: '驳回'
|
||||
}],
|
||||
fee_status_list:[{
|
||||
id: 0,
|
||||
value: '待缴费'
|
||||
}, {
|
||||
id: 1,
|
||||
value: '缴费成功'
|
||||
}, {
|
||||
id: 1,
|
||||
value: '缴费失败'
|
||||
}],
|
||||
// 课程
|
||||
course_type: [{
|
||||
id: 1,
|
||||
value: '长期课程'
|
||||
}, {
|
||||
id: 2,
|
||||
value: '短期课程'
|
||||
}],
|
||||
course_status: [{
|
||||
id: 0,
|
||||
value: '待发布',
|
||||
type: 'info'
|
||||
}, {
|
||||
id: 1,
|
||||
value: '已发布',
|
||||
type: ''
|
||||
}],
|
||||
course_date: [{
|
||||
value: '未开始',
|
||||
type: 'info',
|
||||
}, {
|
||||
value: '进行中',
|
||||
type: '',
|
||||
}, {
|
||||
value: '已结束',
|
||||
type: 'success',
|
||||
}],
|
||||
// 学员
|
||||
company_education: [{
|
||||
id: 1,
|
||||
value: '小学'
|
||||
}, {
|
||||
id: 2,
|
||||
value: '初中'
|
||||
}, {
|
||||
id: 3,
|
||||
value: '高中'
|
||||
}, {
|
||||
id: 4,
|
||||
value: '专科'
|
||||
}, {
|
||||
id: 5,
|
||||
value: '本科'
|
||||
}, {
|
||||
id: 6,
|
||||
value: '硕士'
|
||||
}, {
|
||||
id: 7,
|
||||
value: '博士'
|
||||
}],
|
||||
company_type_list:[{
|
||||
id: 0,
|
||||
value: '上市公司'
|
||||
}, {
|
||||
id: 1,
|
||||
value: '上市公司子公司'
|
||||
}],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
},
|
||||
};
|
||||
@ -0,0 +1,255 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div>
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content">
|
||||
<div class="searchwrap" style="display: flex;align-items: center;">
|
||||
<div>
|
||||
<el-input v-model="select.name" placeholder="请输入课程名称"></el-input>
|
||||
</div>
|
||||
<div>
|
||||
<el-date-picker v-model="select.daterange" type="daterange" range-separator="至" start-placeholder="开课日期"
|
||||
value-format="yyyy-MM-dd" format="yyyy-MM-dd" end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div>
|
||||
<el-select v-model="select.type" placeholder="请选择类别" clearable>
|
||||
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" size="small">查询</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</lx-header>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<xy-table :list="list" :total="total" :table-item="table_item">
|
||||
</xy-table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
index
|
||||
} from "@/api/apply/index.js"
|
||||
import myMixins from "@/mixin/selectMixin.js";
|
||||
export default {
|
||||
mixins: [myMixins],
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
name: '',
|
||||
daterange: '',
|
||||
type: ''
|
||||
},
|
||||
type_options: [{
|
||||
id: 0,
|
||||
value: '常规课程'
|
||||
}, {
|
||||
id: 1,
|
||||
value: '短期课程'
|
||||
}],
|
||||
status_options: [{
|
||||
id: 0,
|
||||
value: '进行中'
|
||||
}, {
|
||||
id: 1,
|
||||
value: '未开始'
|
||||
}],
|
||||
list: [{
|
||||
name: '第六期高级科创人才研修班',
|
||||
daterange: '2024.3.1-2024.9.1',
|
||||
type: '常规课程',
|
||||
total: 60,
|
||||
now_apply: 50,
|
||||
success_apply: 20,
|
||||
no_apply: 5,
|
||||
by_apply: 25
|
||||
}],
|
||||
total: 0,
|
||||
table_item: [{
|
||||
prop: 'name',
|
||||
label: '课程名称',
|
||||
align: 'left'
|
||||
}, {
|
||||
prop: 'daterange',
|
||||
label: '开课日期',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
}, {
|
||||
prop: 'type',
|
||||
label: '类别',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
}, {
|
||||
prop: 'total',
|
||||
label: '拟开课人数',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
}, {
|
||||
prop: 'now_apply',
|
||||
label: '目前报名人数',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
customFn: (cell) => {
|
||||
return ( < div style = {
|
||||
{
|
||||
cursor: 'pointer',
|
||||
color: "blue",
|
||||
textDecoration: "underline"
|
||||
}
|
||||
}
|
||||
on = {
|
||||
{
|
||||
['click']: (e) => {
|
||||
if (cell.now_apply < 1) {
|
||||
return
|
||||
}
|
||||
this.goApply(cell, '')
|
||||
}
|
||||
}
|
||||
} > {
|
||||
cell.now_apply ? cell.now_apply : 0
|
||||
} < /div> )
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'success_apply',
|
||||
label: '审核通过人数',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
customFn: (cell) => {
|
||||
return ( < div style = {
|
||||
{
|
||||
cursor: 'pointer',
|
||||
color: "blue",
|
||||
textDecoration: "underline"
|
||||
}
|
||||
}
|
||||
on = {
|
||||
{
|
||||
['click']: (e) => {
|
||||
if (cell.success_apply < 1) {
|
||||
return
|
||||
}
|
||||
this.goApply(cell, 1)
|
||||
}
|
||||
}
|
||||
} > {
|
||||
cell.success_apply ? cell.success_apply : 0
|
||||
} < /div> )
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'no_apply',
|
||||
label: '审核不通过人数',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
customFn: (cell) => {
|
||||
return ( < div style = {
|
||||
{
|
||||
cursor: 'pointer',
|
||||
color: "blue",
|
||||
textDecoration: "underline"
|
||||
}
|
||||
}
|
||||
on = {
|
||||
{
|
||||
['click']: (e) => {
|
||||
if (cell.no_apply < 1) {
|
||||
return
|
||||
}
|
||||
this.goApply(cell, 2)
|
||||
}
|
||||
}
|
||||
} > {
|
||||
cell.no_apply ? cell.no_apply : 0
|
||||
} < /div> )
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'by_apply',
|
||||
label: '待审核人数',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
customFn: (cell) => {
|
||||
return ( < div style = {
|
||||
{
|
||||
cursor: 'pointer',
|
||||
color: "blue",
|
||||
textDecoration: "underline"
|
||||
}
|
||||
}
|
||||
on = {
|
||||
{
|
||||
['click']: (e) => {
|
||||
if (cell.by_apply < 1) {
|
||||
return
|
||||
}
|
||||
this.goApply(cell, 0)
|
||||
}
|
||||
}
|
||||
} > {
|
||||
cell.by_apply ? cell.by_apply : 0
|
||||
} < /div> )
|
||||
}
|
||||
}]
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
goApply(row, status) {
|
||||
let value = ''
|
||||
this.course_type.map(item => {
|
||||
if (item.id == row.type) {
|
||||
value = item.value
|
||||
}
|
||||
})
|
||||
|
||||
this.$router.push({
|
||||
path: '/course/apply_list',
|
||||
query: {
|
||||
title: row.name,
|
||||
id: row.id,
|
||||
status: status,
|
||||
date: row.start_date + '至' + row.end_date,
|
||||
leibie: value
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.searchwrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
|
||||
span {
|
||||
min-width: 70px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue