Commit 9af6b704 by tangjiale

修改需求改动

parent 3e30b0a7
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com * @eMail: 932055106@qq.com
* @Date: 2022-06-06 09:28:37 * @Date: 2022-06-06 09:28:37
* @LastEditors: tangjiale * @LastEditors: tangjiale
* @LastEditTime: 2022-06-11 13:54:16 * @LastEditTime: 2022-06-14 19:18:12
--> -->
<template> <template>
<div class="add-course-bg"> <div class="add-course-bg">
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
<t-select v-model="param.courseStep" placeholder="请选择" :ds="[{name:'小学组',value:1},{name:'初中组',value:2},{name:'高中组',value:3}]"></t-select> <t-select v-model="param.courseStep" placeholder="请选择" :ds="[{name:'小学组',value:1},{name:'初中组',value:2},{name:'高中组',value:3}]"></t-select>
</el-form-item> </el-form-item>
<el-form-item label="课程类型:" prop="type"> <el-form-item label="课程类型:" prop="type">
<t-select v-model="param.type" placeholder="请选择" :ds="[{name:'体验课',value:1},{name:'正式班课',value:2}]"></t-select> <t-select v-model="param.type" placeholder="请选择" :ds="[{name:'正式班课',value:1},{name:'体验课',value:2}]"></t-select>
</el-form-item>
<el-form-item label="课程层次:" prop="leveId">
<t-select v-model="param.leveId" placeholder="请选择" :ds="[{name:'基础班',value:1},{name:'提高班',value:2},{name:'精英班',value:3},{name:'赛事班',value:4}]"></t-select>
</el-form-item> </el-form-item>
<el-form-item label="课时:" prop="classHour"> <el-form-item label="课时:" prop="classHour">
<el-input v-model="param.classHour" placeholder="请输入数字" onkeyup="this.value=this.value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g,'$1')" <el-input v-model="param.classHour" placeholder="请输入数字" onkeyup="this.value=this.value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g,'$1')"
...@@ -62,7 +65,7 @@ ...@@ -62,7 +65,7 @@
<template> <template>
<img class="image-ctn" v-if="param.poster" :src="param.poster"> <img class="image-ctn" v-if="param.poster" :src="param.poster">
<div class="upload-ctn" v-else> <div class="upload-ctn" v-else>
<div class="tip">课程图片大小不能超过3MB</div> <div class="tip">课程图片大小不能超过3MB,图片宽高比例最好为16/10</div>
<div class="upload-bg"> <div class="upload-bg">
<i class="el-icon-plus avatar-uploader-icon"></i> <i class="el-icon-plus avatar-uploader-icon"></i>
添加上传图片 添加上传图片
...@@ -153,8 +156,9 @@ export default { ...@@ -153,8 +156,9 @@ export default {
const suffix = img === 'jpg' const suffix = img === 'jpg'
const suffix2 = img === 'png' const suffix2 = img === 'png'
const suffix3 = img === 'jpeg' const suffix3 = img === 'jpeg'
const suffix4 = img === 'JPG'
const isLt1M = file.size / 1024 / 1024 <= 3; const isLt1M = file.size / 1024 / 1024 <= 3;
if (!suffix && !suffix2 && !suffix3) { if (!suffix && !suffix2 && !suffix3 && !suffix4) {
this.$message.error("只能上传图片!"); this.$message.error("只能上传图片!");
return false return false
} }
...@@ -217,7 +221,7 @@ export default { ...@@ -217,7 +221,7 @@ export default {
} }
let param = { let param = {
...that.param, ...that.param,
status:form, //0未发布 1已发布 status:that.param.status == 1 ? 1 : form, //0未发布 1已发布
schIds:that.checkList.join(','), schIds:that.checkList.join(','),
} }
//单位:分 //单位:分
...@@ -236,9 +240,9 @@ export default { ...@@ -236,9 +240,9 @@ export default {
let that = this let that = this
this.$service.course.queryCourseDetail(id).then(res =>{ this.$service.course.queryCourseDetail(id).then(res =>{
let {name='',courseTime='',courseStep = '',schIds = '',status = '',type = '', let {name='',courseTime='',courseStep = '',schIds = '',status = '',type = '',
pxEmployeeList = [],poster = '',detail = '',classHour = '',id = '',cost = ''} = res pxEmployeeList = [],poster = '',leveId = '',detail = '',classHour = '',id = '',cost = ''} = res
this.param = { this.param = {
id,name,courseTime,courseStep,status,type,poster,detail,classHour,cost:cost / 100 id,name,courseTime,courseStep,status,type,leveId,poster,detail,classHour,cost:cost / 100
} }
let arr = schIds.split(',') let arr = schIds.split(',')
if(arr.length){ if(arr.length){
...@@ -293,25 +297,25 @@ export default { ...@@ -293,25 +297,25 @@ export default {
margin-right: 15px; margin-right: 15px;
} }
/deep/ .el-input .el-input__inner{ /deep/ .el-input .el-input__inner{
width: 248px; width: 228px;
} }
} }
/deep/ .el-form-item__content{ /deep/ .el-form-item__content{
height: auto !important; height: auto !important;
} }
.image-ctn{ .image-ctn{
height: 150px; height: 186px;
width: 200px; width: 300px;
object-fit: cover; object-fit: cover;
object-position: center; object-position: center;
} }
.upload-bg{ .upload-bg{
cursor: pointer; cursor: pointer;
height: 150px; height: 186px;
width: 200px; width: 300px;
border: 1px solid #000000; border: 1px solid #000000;
.el-icon-plus{ .el-icon-plus{
margin-top: 40px; margin-top: 60px;
display: block !important; display: block !important;
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com * @eMail: 932055106@qq.com
* @Date: 2022-06-02 15:02:39 * @Date: 2022-06-02 15:02:39
* @LastEditors: tangjiale * @LastEditors: tangjiale
* @LastEditTime: 2022-06-09 17:23:26 * @LastEditTime: 2022-06-14 19:02:32
--> -->
<template> <template>
<div> <div>
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
<el-form-item label="所在校区" prop="schIds"> <el-form-item label="所在校区" prop="schIds">
<t-select v-model="param.schIds" :ds="{service:'base', func: 'getUserAllSchList'}"></t-select> <t-select v-model="param.schIds" :ds="{service:'base', func: 'getUserAllSchList'}"></t-select>
</el-form-item> </el-form-item>
<el-form-item label="就读学校" prop="readSchName">
<el-input v-model="param.readSchName" placeholder="请输入就读学校名称" style="width:222px"></el-input>
</el-form-item>
<div class="btns"> <div class="btns">
...@@ -58,7 +61,8 @@ export default { ...@@ -58,7 +61,8 @@ export default {
fatherPhone:'', fatherPhone:'',
motherPhone:'', motherPhone:'',
otherPhone:'', otherPhone:'',
schIds:'' schIds:'',
readSchName:''
}, },
rules:{ rules:{
...@@ -78,8 +82,8 @@ export default { ...@@ -78,8 +82,8 @@ export default {
}, },
queryDetail(id){ queryDetail(id){
this.$service.student.queryStudentDetail(id).then(res =>{ this.$service.student.queryStudentDetail(id).then(res =>{
let {id,name,birthday,gender,fatherPhone,motherPhone,otherPhone,schIds} = res let {id,name,birthday,gender,fatherPhone,motherPhone,otherPhone,schIds,readSchName} = res
this.param = {id,name,birthday,gender,fatherPhone,motherPhone,otherPhone,schIds} this.param = {id,name,birthday,gender,fatherPhone,motherPhone,otherPhone,schIds,readSchName}
}) })
}, },
onSubmit(){ onSubmit(){
......
...@@ -3,12 +3,11 @@ ...@@ -3,12 +3,11 @@
* @eMail: 932055106@qq.com * @eMail: 932055106@qq.com
* @Date: 2022-06-02 14:08:46 * @Date: 2022-06-02 14:08:46
* @LastEditors: tangjiale * @LastEditors: tangjiale
* @LastEditTime: 2022-06-11 13:49:44 * @LastEditTime: 2022-06-14 19:05:42
--> -->
<template> <template>
<div class="page-bg"> <div class="page-bg">
<!-- autoLoad -->
<t-table autoLoad ref="table" :options="options" :params="params" <t-table autoLoad ref="table" :options="options" :params="params"
@row-btn-click="onRowButtonClick"> @row-btn-click="onRowButtonClick">
<!-- 操作栏 --> <!-- 操作栏 -->
...@@ -28,6 +27,7 @@ ...@@ -28,6 +27,7 @@
<script> <script>
import addCourse from './components/add-course.vue' import addCourse from './components/add-course.vue'
const courseStep = ['','小学组','初中组','高中组'] const courseStep = ['','小学组','初中组','高中组']
const courseLevel = ['','基础班','提高班','精英版','赛事班']
export default { export default {
services:['base','course'], services:['base','course'],
components:{addCourse}, components:{addCourse},
...@@ -48,6 +48,9 @@ export default { ...@@ -48,6 +48,9 @@ export default {
label: '课程属性:', field: 'courseStep', type: 'select',autoSelect:true,required:true, label: '课程属性:', field: 'courseStep', type: 'select',autoSelect:true,required:true,
ds: [{name:'全部',value:''}, {name:'小学组',value:1}, {name:'初中组',value:2},{name:'高中组',value:3}] ds: [{name:'全部',value:''}, {name:'小学组',value:1}, {name:'初中组',value:2},{name:'高中组',value:3}]
},{ },{
label: '课程层次:', field: 'leveId', type: 'select',autoSelect:true,required:true,
ds: [{name:'全部',value:''}, {name:'基础班',value:1},{name:'提高班',value:2},{name:'精英班',value:3},{name:'赛事班',value:4}]
},{
label: '课程类型:', field: 'valid', type: 'select',autoSelect:true,required:true, label: '课程类型:', field: 'valid', type: 'select',autoSelect:true,required:true,
ds: [{name:'全部',value:''}, {name:'体验课',value:1}, {name:'正式班课',value:0}] ds: [{name:'全部',value:''}, {name:'体验课',value:1}, {name:'正式班课',value:0}]
},{ },{
...@@ -68,6 +71,9 @@ export default { ...@@ -68,6 +71,9 @@ export default {
title: "课程属性",type: 'customField',width:'140px', title: "课程属性",type: 'customField',width:'140px',
fieldFunction: row => courseStep[row.courseStep], fieldFunction: row => courseStep[row.courseStep],
},{ },{
title: "课程层次",type: 'customField',width:'140px',
fieldFunction: row => courseLevel[row.leveId],
},{
title: "课时",width:'140px', title: "课时",width:'140px',
type: 'customField', type: 'customField',
fieldFunction: row => row.classHour + '课时', fieldFunction: row => row.classHour + '课时',
...@@ -76,7 +82,7 @@ export default { ...@@ -76,7 +82,7 @@ export default {
fieldFunction: row => (row.cost / 100), fieldFunction: row => (row.cost / 100),
},{ },{
title: "课程类型", type: 'customField',width:'140px', title: "课程类型", type: 'customField',width:'140px',
fieldFunction: row => row.type == 0 ?'体验课' : '正式课', fieldFunction: row => (row.type == 1 ?'正式课' : '体验课'),
}, },
{ {
title: "操作", title: "操作",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com * @eMail: 932055106@qq.com
* @Date: 2022-06-02 14:08:46 * @Date: 2022-06-02 14:08:46
* @LastEditors: tangjiale * @LastEditors: tangjiale
* @LastEditTime: 2022-06-10 14:04:54 * @LastEditTime: 2022-06-14 19:10:38
--> -->
<template> <template>
<div class="page-bg"> <div class="page-bg">
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
}, },
{ {
title: "出生日期",type: 'customField', title: "出生日期",type: 'customField',
fieldFunction: row => row.birthday.slice(0,10) fieldFunction: row => row.birthday
}, },
{title: "爸爸手机号",field: "fatherPhone"}, {title: "爸爸手机号",field: "fatherPhone"},
{title: "妈妈手机号",field: "motherPhone"}, {title: "妈妈手机号",field: "motherPhone"},
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
title: "所在校区",type: 'customField', title: "所在校区",type: 'customField',
fieldFunction: row => (row.schoolList.map(e => e.name)).join(','), fieldFunction: row => (row.schoolList.map(e => e.name)).join(','),
}, },
{title: "就读学校",field: "readSchName"},
{ {
title: "操作", title: "操作",
width: "160px",fixed:'right', width: "160px",fixed:'right',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment