Browse Source

上传代码

master
杨豪 3 years ago
parent
commit
09453073f1
  1. BIN
      dist.rar
  2. 27
      src/api/Blessing.js
  3. 27
      src/api/BlessingLamp.js
  4. 4
      src/api/StudyList.js
  5. 10
      src/api/cyCourse.js
  6. 7
      src/views/article/index.vue
  7. 271
      src/views/course/addCourseDetail.vue
  8. 30
      src/views/course/addStudy.vue
  9. 29
      src/views/course/courseLevel.vue
  10. 206
      src/views/course/courseManage.vue
  11. 7
      src/views/course/index.vue
  12. 125
      src/views/course/studyList.vue
  13. 95
      src/views/shop/user/index.vue
  14. 16
      src/views/shop/user/master.vue
  15. 4
      src/views/shop/user/sMaster.vue
  16. 49
      src/views/system/configManage/index.vue
  17. 7
      src/views/tools/storage/qiniu/index.vue
  18. 12
      src/views/wechat/article/form.vue
  19. 203
      src/views/zen/lighting.vue
  20. 113
      src/views/zen/lightingList.vue

BIN
dist.rar

Binary file not shown.

27
src/api/Blessing.js

@ -0,0 +1,27 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/Blessing',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/Blessing/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/Blessing',
method: 'put',
data
})
}
export default { add, edit, del }

27
src/api/BlessingLamp.js

@ -0,0 +1,27 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/BlessingLamp',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/BlessingLamp/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/BlessingLamp',
method: 'put',
data
})
}
export default { add, edit, del }

4
src/api/StudyList.js

@ -24,9 +24,9 @@ export function edit(data) {
}) })
} }
export function get(id) { export function get(data) {
return request({ return request({
url: 'api/StudyList/info/?id=' + id, url: 'api/StudyList/info/?date=' + data.date + '&id=' + data.id,
method: 'get' method: 'get'
}) })
} }

10
src/api/cyCourse.js

@ -1,5 +1,13 @@
import request from '@/utils/request' import request from '@/utils/request'
export function get(data) {
return request({
url: 'api/cyCourse?id='+data,
method: 'get',
data
})
}
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/cyCourse', url: 'api/cyCourse',
@ -44,4 +52,4 @@ export function getCourseLevel(data) {
}) })
} }
export default { add, edit, del, courseSeat, getCourseManage, getCourseLevel } export default { get, add, edit, del, courseSeat, getCourseManage, getCourseLevel }

7
src/views/article/index.vue

@ -29,11 +29,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="author" label="作者" /> <el-table-column prop="author" label="作者" />
<el-table-column prop="cname" label="文章分类" />
<el-table-column :show-overflow-tooltip="true" prop="createTime" label="创建日期"> <el-table-column :show-overflow-tooltip="true" prop="createTime" label="创建日期">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createTime }}</span> <span>{{ scope.row.createTime }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="chargeType" label="收费类型">
<template slot-scope="scope">
<span>{{ scope.row.chargeType == 0 ? '免费' : scope.row.chargeType == 1 ? '收费' : '积分'}}</span>
</template>
</el-table-column>
<el-table-column prop="visit" label="浏览次数" />
<el-table-column v-if="checkPermission(['admin','YXARTICLE_ALL','YXARTICLE_EDIT','YXARTICLE_DELETE'])" label="操作" width="220px" align="center"> <el-table-column v-if="checkPermission(['admin','YXARTICLE_ALL','YXARTICLE_EDIT','YXARTICLE_DELETE'])" label="操作" width="220px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-permission="['admin','YXARTICLE_ALL','YXARTICLE_EDIT']" size="mini" <el-button v-permission="['admin','YXARTICLE_ALL','YXARTICLE_EDIT']" size="mini"

271
src/views/course/addCourseDetail.vue

@ -0,0 +1,271 @@
<template>
<div class="addCourseDetail-box">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="120px">
<el-form-item label="课程等级" prop="level">
<el-select v-model="form.level">
<el-option v-for="item in levelList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="课程分类" prop="categoryIds">
<el-cascader
v-model="form.categoryIds"
:options="categoryList"
:show-all-levels="false"
:props="{ checkStrictly: true }">
</el-cascader>
</el-form-item>
<el-form-item label="课程图片" prop="imageArr">
<picUpload v-model="form.imageArr[0]"></picUpload>
</el-form-item>
<el-form-item label="课程名称" prop="courseName">
<el-input v-model="form.courseName" style="width:80%" />
</el-form-item>
<el-form-item label="课程简介" prop="courseIntroduce">
<!-- <el-input type="textarea" v-model="form.courseIntroduce" /> -->
<ueditor-wrap v-model="form.courseIntroduce" :config="myConfig" @beforeInit="addCustomDialog" style="width: 90%;"></ueditor-wrap>
</el-form-item>
<el-form-item label="课程天数" prop="dayCount">
<el-input v-model="form.dayCount" placeholder="请填写课程天数" style="width:80%" @input="countChange"></el-input>
</el-form-item>
<el-form-item label="课程表" v-if="form.courseScheduleList.length>0" prop="courseContent">
<el-input
type="textarea"
style="margin-bottom:10px;wdith:80%;"
v-for="(item,index) in form.courseScheduleList"
:key="index"
:placeholder="'请输入第'+ item.day + '天的课程内容'"
v-model="item.courseContent"></el-input>
</el-form-item>
<div style="text-align:right;padding-right:150px;box-sizing:border-box;">
<!-- <el-button type="error" >取消</el-button> -->
<el-button type="primary" @click="submit">确认</el-button>
</div>
</el-form>
</div>
</template>
<script>
import crudCyCourse from '@/api/cyCourse'
import picUpload from '@/components/pic-upload'
import MaterialList from "@/components/material"
import UeditorWrap from 'vue-ueditor-wrap';
import { initData } from '@/api/data'
export default {
name: 'courseManage',
components: {picUpload ,MaterialList,UeditorWrap},
data() {
return {
form:{
masters:[],
categoryIds: null,
level:null,
courseName: '',
categoryName: null,
courseIntroduce: null,
seatArrange: 1,
chargeType: 0,
dayCount:'',
courseCharge: null,
createTime: null,
updateTime: null,
deleted: null,
createUser: null,
updateUser: null,
imageInput: '',
imageArr: [],
courseScheduleList:[],
},
courseTime:null,
signTime:null,
permission: {
add: ['admin', 'cyCourse:add'],
edit: ['admin', 'cyCourse:edit'],
view: ['admin', 'cyCourse:view'],
del: ['admin', 'cyCourse:del']
},
categoryList: [],
rules: {
courseName:[
{ required: true, message: '请填写课程名称', trigger: 'blur' }
],
level: [
{ required: true, message: '请选择课程等级', trigger: 'blur' }
],
categoryIds: [
{ required: true, message: '请选择课程分类', trigger: 'blur' }
],
courseIntroduce: [
{ required: true, message: '请填写课程简介', trigger: 'blur' }
],
dayCount: [
{ required: true, message: '请填写课程天数', trigger: 'blur' }
],
},
masterList:[],
levelList:[],
myConfig: {
autoHeightEnabled: false, //
initialFrameHeight: 500, //
initialFrameWidth: '100%', //
UEDITOR_HOME_URL: '/UEditor/',
serverUrl: ''
},
}
},
watch: {
},
created(){
this.form.id = this.$route.params.id
this.$nextTick(() => {
//this.init()
if(this.form.id){
crudCyCourse.get(this.form.id).then(data => {
this.form = data.content[0]
})
}
})
this.getCategory()
this.getCourseLevel()
},
mounted(){
// console.log(crudCourseMaster)
this.$http('api/CourseMaster','get').then((res)=>{
this.masterList = res.content
})
},
methods: {
addCustomDialog () {
window.UE.registerUI('yshop', function (editor, uiName) {
let dialog = new window.UE.ui.Dialog({
iframeUrl: '/yshop/materia/index',
editor: editor,
name: uiName,
title: '上传图片',
cssRules: 'width:1200px;height:500px;padding:20px;'
});
this.dialog = dialog;
var btn = new window.UE.ui.Button({
name: 'dialog-button',
title: '上传图片',
cssRules: `background-image: url(../../../assets/images/icons.png);background-position: -726px -77px;`,
onclick: function () {
dialog.render();
dialog.open();
}
});
return btn;
}, 37);
},
getCourseLevel(){
crudCyCourse.getCourseLevel().then((res)=>{
this.levelList = res.content
})
},
submitSetSeat(){
console.log(this.seatForm)
let data = {
colNum: this.seatForm.colNum,
rowNum: this.seatForm.rowNum,
courseId: this.seatForm.courseId,
}
crudCyCourse.courseSeat(this.seatForm).then((res)=>{
this.$message({
type:'success',
message:'操作成功!'
}).catch((res)=>{
console.log(res)
})
})
},
getCategory(){
initData('/api/CourseCategory',this.getQueryParams()).then((res)=>{
// console.log(res)
res.content.forEach((item)=>{
item.label = item.categoryName
item.value = item.id
item.children = item.categoryList
item.categoryList.forEach((child)=>{
child.label = child.categoryName
child.value = child.id
child.children = child.categoryList
})
})
this.categoryList = res.content
})
},
getQueryParams: function() {
return {
page: 0,
size: 200,
sort: ['id,desc'],
}
},
countChange(){
let num = this.form.dayCount;
this.form.courseScheduleList = [];
for(let i = 0; i < num; i++){
this.form.courseScheduleList.push({day:i+1, courseContent:''})
}
},
submit(){
if(!this.form.id){
this.form.isModel = 1
this.doAdd()
} else{
this.form.isModel = 1
this.doEdit()
}
},
doAdd(){
this.form.isModel = 1
this.$refs['form'].validate((valid) => {
if (valid) {
crudCyCourse.add(this.form).then((res)=>{
this.$notify({
title: '添加成功',
type: 'success',
duration: 1500
})
this.loading = false
setTimeout(() => {
this.$router.push({ path: '/course/courseManage' });
}, 1500);
})
} else {
console.log('error submit!!');
return false;
}
});
},
doEdit() {
crudCyCourse.edit(this.form).then(res => {
this.$notify({
title: '修改成功',
type: 'success',
duration: 1500
})
setTimeout(() => {
this.$router.push({ path: '/course/courseManage' });
}, 1500);
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
}
}
</script>
<style scoped>
.addCourseDetail-box{
padding: 20px;
box-shadow: border-box;
}
</style>

30
src/views/course/addStudy.vue

@ -1,9 +1,9 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="110px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="110px">
<el-form-item label="课程分类"> <el-form-item label="榜单分类">
<el-cascader <el-cascader
v-model="form.categoryId" v-model="form.categoryIds"
:options="categoryList" :options="categoryList"
:show-all-levels="false" :show-all-levels="false"
:props="{ checkStrictly: true }" :props="{ checkStrictly: true }"
@ -13,8 +13,8 @@
<el-form-item label="榜单名称"> <el-form-item label="榜单名称">
<el-input v-model="form.listName" style="width: 370px;" /> <el-input v-model="form.listName" style="width: 370px;" />
</el-form-item> </el-form-item>
<el-form-item label="榜单图片"> <el-form-item label="榜单图片" prop="imgPath">
<picUpload v-model="form.imageInput"></picUpload> <picUpload v-model="form.imgPath"></picUpload>
</el-form-item> </el-form-item>
<el-form-item label="打榜时间"> <el-form-item label="打榜时间">
<el-date-picker <el-date-picker
@ -62,29 +62,16 @@
placeholder="请选择报名结束时间"> placeholder="请选择报名结束时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<!-- <el-form-item label="要求打卡次数">
<el-input-number v-model="form.clockTimes" :min="1" label="请输入要求打卡次数"></el-input-number>
</el-form-item> -->
<el-form-item label="允许缺卡次数"> <el-form-item label="允许缺卡次数">
<el-input-number v-model="form.missedClockTimes" :min="1" label="请输入允许缺卡次数"></el-input-number> <el-input-number v-model="form.missedClockTimes" :min="1" label="请输入允许缺卡次数"></el-input-number>
</el-form-item> </el-form-item>
<!-- <el-form-item label="榜单状态">
<el-radio-group v-model="form.listState">
<el-radio :label="0">未开始</el-radio>
<el-radio :label="1">打榜中</el-radio>
<el-radio :label="2">已完成</el-radio>
<el-radio :label="3">已取消</el-radio>
</el-radio-group>
</el-form-item> -->
<el-form-item label="榜单介绍"> <el-form-item label="榜单介绍">
<!--<editor v-model="form.content" />-->
<ueditor-wrap v-model="form.content" :config="myConfig" @beforeInit="addCustomDialog" style="width: 90%;"></ueditor-wrap> <ueditor-wrap v-model="form.content" :config="myConfig" @beforeInit="addCustomDialog" style="width: 90%;"></ueditor-wrap>
</el-form-item> </el-form-item>
<el-form-item label="奖惩积分"> <el-form-item label="奖惩积分">
<el-input v-model="form.integral" style="width: 370px;" /> <el-input v-model="form.integral" style="width: 370px;" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!--<el-button type="text" @click="cancel">取消</el-button>-->
<el-button :loading="loading" type="primary" @click="doSubmit">保存</el-button> <el-button :loading="loading" type="primary" @click="doSubmit">保存</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -105,7 +92,7 @@ export default {
form: { form: {
id: null, id: null,
categoryId: null, categoryId: null,
imgPath: null, imgPath: '',
content: null, content: null,
listStartTime: null, listStartTime: null,
listEndTime: null, listEndTime: null,
@ -156,7 +143,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
//this.init() //this.init()
if(this.form.id){ if(this.form.id){
console.log(this.form.id)
get(this.form.id).then(data => { get(this.form.id).then(data => {
this.form = data this.form = data
}) })
@ -189,7 +175,7 @@ export default {
}, },
handleChange(value){ handleChange(value){
console.log(value) console.log(value)
this.form.categoryId = value[value.length-1]; this.form.categoryIds = value;
}, },
addCustomDialog () { addCustomDialog () {
window.UE.registerUI('yshop', function (editor, uiName) { window.UE.registerUI('yshop', function (editor, uiName) {
@ -226,7 +212,7 @@ export default {
} }
}, },
doAdd() { doAdd() {
this.form.imgPath = this.form.imageInput; this.form.cids = this.form.categoryIds;
add(this.form).then(res => { add(this.form).then(res => {
this.resetForm() this.resetForm()
this.$notify({ this.$notify({
@ -245,7 +231,7 @@ export default {
}) })
}, },
doEdit() { doEdit() {
this.form.imgPath = this.form.imageInput; this.form.cids = this.form.categoryIds;
edit(this.form).then(res => { edit(this.form).then(res => {
this.resetForm() this.resetForm()
this.$notify({ this.$notify({

29
src/views/course/courseLevel.vue

@ -7,9 +7,6 @@
<!--表单组件--> <!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="id">
<el-input v-model="form.id" style="width: 370px;" />
</el-form-item>
<el-form-item label="课程价格"> <el-form-item label="课程价格">
<el-input v-model="form.price" style="width: 370px;" /> <el-input v-model="form.price" style="width: 370px;" />
</el-form-item> </el-form-item>
@ -19,15 +16,6 @@
<el-form-item label="等级名称"> <el-form-item label="等级名称">
<el-input v-model="form.name" style="width: 370px;" /> <el-input v-model="form.name" style="width: 370px;" />
</el-form-item> </el-form-item>
<el-form-item label="createTime">
<el-input v-model="form.createTime" style="width: 370px;" />
</el-form-item>
<el-form-item label="updateTime">
<el-input v-model="form.updateTime" style="width: 370px;" />
</el-form-item>
<el-form-item label="isDel">
<el-input v-model="form.isDel" style="width: 370px;" />
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button> <el-button type="text" @click="crud.cancelCU">取消</el-button>
@ -37,21 +25,9 @@
<!--表格渲染--> <!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column v-if="columns.visible('id')" prop="id" label="id" />
<el-table-column v-if="columns.visible('price')" prop="price" label="课程价格" />
<el-table-column v-if="columns.visible('level')" prop="level" label="等级" /> <el-table-column v-if="columns.visible('level')" prop="level" label="等级" />
<el-table-column v-if="columns.visible('name')" prop="name" label="等级名称" /> <el-table-column v-if="columns.visible('name')" prop="name" label="等级名称" />
<el-table-column v-if="columns.visible('createTime')" prop="createTime" label="createTime"> <el-table-column v-if="columns.visible('price')" prop="price" label="课程价格" />
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="columns.visible('updateTime')" prop="updateTime" label="updateTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="columns.visible('isDel')" prop="isDel" label="isDel" />
<el-table-column v-permission="['admin','CourseLevel:edit','CourseLevel:del']" label="操作" width="150px" align="center"> <el-table-column v-permission="['admin','CourseLevel:edit','CourseLevel:del']" label="操作" width="150px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<udOperation <udOperation
@ -78,14 +54,13 @@ import MaterialList from "@/components/material";
// crudpresenter // crudpresenter
const defaultCrud = CRUD({ title: '课程等级表', url: 'api/CourseLevel', sort: 'id,desc', crudMethod: { ...crudCourseLevel }}) const defaultCrud = CRUD({ title: '课程等级表', url: 'api/CourseLevel', sort: 'id,desc', crudMethod: { ...crudCourseLevel }})
const defaultForm = { id: null, price: null, level: null, name: null, createTime: null, updateTime: null, isDel: null } const defaultForm = { price: null, level: null, name: null }
export default { export default {
name: 'CourseLevel', name: 'CourseLevel',
components: { pagination, crudOperation, rrOperation, udOperation ,MaterialList}, components: { pagination, crudOperation, rrOperation, udOperation ,MaterialList},
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()],
data() { data() {
return { return {
permission: { permission: {
add: ['admin', 'CourseLevel:add'], add: ['admin', 'CourseLevel:add'],
edit: ['admin', 'CourseLevel:edit'], edit: ['admin', 'CourseLevel:edit'],

206
src/views/course/courseManage.vue

@ -3,66 +3,28 @@
<!--工具栏--> <!--工具栏-->
<div class="head-container"> <div class="head-container">
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'--> <!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" /> <!-- <crudOperation :permission="permission" /> -->
<div style="display: inline-block;margin: 0px 2px;">
<el-button
v-permission="['admin','YXARTICLE_ALL','YXARTICLE_CREATE']"
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus">
<router-link :to="'/course/addCourseDetail'"> 新增 </router-link>
</el-button>
</div>
<el-input <el-input
v-model="query.courseName" v-model="query.courseName"
clearable placeholder="输入搜索内容" clearable placeholder="输入搜索内容"
style="width: 200px;" style="width: 200px;"
class="filter-item" class="filter-item"
@keyup.enter.native="crud.toQuery" /> @keyup.enter.native="crud.toQuery" />
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="120px">
<el-form-item label="课程等级" prop="level">
<el-select v-model="form.level">
<el-option v-for="item in levelList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="课程分类" prop="categoryIds">
<el-cascader
v-model="form.categoryIds"
:options="categoryList"
:show-all-levels="false"
:props="{ checkStrictly: true }"
@change="handleChange">
</el-cascader>
</el-form-item>
<el-form-item label="课程图片" prop="imageInput">
<picUpload v-model="form.imageInput"></picUpload>
</el-form-item>
<el-form-item label="课程名称" prop="courseName">
<el-input v-model="form.courseName" />
</el-form-item>
<el-form-item label="课程简介" prop="courseIntroduce">
<el-input type="textarea" v-model="form.courseIntroduce" />
</el-form-item>
<el-form-item label="课程天数" prop="dayCount">
<el-input v-model="form.dayCount" placeholder="请填写课程天数" @input="countChange"></el-input>
</el-form-item>
<el-form-item label="课程表" v-if="form.courseScheduleList.length>0" prop="courseContent">
<el-input
type="textarea"
style="margin-bottom:10px;"
v-for="(item,index) in form.courseScheduleList"
:key="index"
:placeholder="'请输入第'+ item.day + '天的课程内容'"
v-model="item.courseContent"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="submit">确认</el-button>
</div>
</el-dialog>
<!--表格渲染--> <!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column v-if="columns.visible('id')" prop="id" label="id" width="75"/> <el-table-column prop="id" label="id" width="75"/>
<el-table-column v-if="columns.visible('courseName')" prop="courseName" label="课程名称"/> <el-table-column prop="courseName" label="课程名称"/>
<el-table-column prop="imageArr" label="课程封面"> <el-table-column prop="imageArr" label="课程封面">
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="scope.row.imageArr[0]" style="color: #42b983" target="_blank"> <a :href="scope.row.imageArr[0]" style="color: #42b983" target="_blank">
@ -70,15 +32,31 @@
</a> </a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="columns.visible('categoryName')" prop="categoryName" label="分类名称" /> <el-table-column prop="categoryName" label="分类名称" />
<el-table-column v-if="columns.visible('courseIntroduce')" prop="courseIntroduce" label="课程简介" :show-overflow-tooltip="true"/> <!-- <el-table-column prop="courseIntroduce" label="课程简介" :show-overflow-tooltip="true"/> -->
<el-table-column ref="table" prop="dayCount" label="课程天数"></el-table-column> <el-table-column ref="table" prop="dayCount" label="课程天数"></el-table-column>
<el-table-column v-permission="['admin','cyCourse:del']" label="操作" width="260px" align="center"> <el-table-column v-permission="['admin','cyCourse:del']" label="操作" width="260px" align="center">
<template slot-scope="scope"> <!-- <template slot-scope="scope">
<udOperation <udOperation
:data="scope.row" :data="scope.row"
:permission="permission" :permission="permission"
/> /> -->
<template slot-scope="scope">
<el-button size="mini" type="primary" icon="el-icon-edit">
<router-link :to="'/course/addCourseDetail/'+scope.row.id">编辑</router-link>
</el-button>
<el-popover
:ref="scope.row.id"
placement="top"
width="180"
>
<p>确定删除本条数据吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
<el-button type="primary" size="mini" @click="crud.doDelete(scope.row)">确定</el-button>
</div>
<el-button slot="reference" type="danger" icon="el-icon-delete" size="mini">删除</el-button>
</el-popover>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -90,7 +68,6 @@
<script> <script>
import crudCyCourse from '@/api/cyCourse' import crudCyCourse from '@/api/cyCourse'
import crudCourseMaster from "@/api/CourseMaster";
import CRUD, { presenter, header, form, crud } from '@crud/crud' import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation' import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation' import crudOperation from '@crud/CRUD.operation'
@ -99,7 +76,6 @@ import pagination from '@crud/Pagination'
import picUpload from '@/components/pic-upload' import picUpload from '@/components/pic-upload'
import MaterialList from "@/components/material" import MaterialList from "@/components/material"
import { initData } from '@/api/data' import { initData } from '@/api/data'
import { parseTime } from '@/utils/index'
// crudpresenter // crudpresenter
const defaultCrud = CRUD({ const defaultCrud = CRUD({
@ -109,31 +85,10 @@ const defaultCrud = CRUD({
isModel:1, isModel:1,
crudMethod: { ...crudCyCourse } crudMethod: { ...crudCyCourse }
}) })
const defaultForm = {
id: null,
masters:[],
categoryIds: null,
level:null,
courseName: '',
categoryName: null,
courseIntroduce: null,
seatArrange: 1,
chargeType: 0,
dayCount:'',
courseCharge: null,
createTime: null,
updateTime: null,
deleted: null,
createUser: null,
updateUser: null,
imageInput: '',
imageArr: [],
courseScheduleList:[],
}
export default { export default {
name: 'courseManage', name: 'courseManage',
components: {picUpload, pagination, crudOperation, rrOperation, udOperation ,MaterialList}, components: {picUpload, pagination, crudOperation, rrOperation, udOperation ,MaterialList},
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], mixins: [presenter(defaultCrud), header(), crud()],
data() { data() {
return { return {
courseTime:null, courseTime:null,
@ -145,23 +100,6 @@ export default {
del: ['admin', 'cyCourse:del'] del: ['admin', 'cyCourse:del']
}, },
categoryList: [], categoryList: [],
rules: {
courseName:[
{ required: true, message: '请填写课程名称', trigger: 'blur' }
],
level: [
{ required: true, message: '请选择课程等级', trigger: 'blur' }
],
categoryIds: [
{ required: true, message: '请选择课程分类', trigger: 'blur' }
],
courseIntroduce: [
{ required: true, message: '请填写课程简介', trigger: 'blur' }
],
dayCount: [
{ required: true, message: '请填写课程天数', trigger: 'blur' }
],
},
detailDialog:false, detailDialog:false,
detail:{}, detail:{},
signUpData:[], signUpData:[],
@ -172,15 +110,13 @@ export default {
colNum:'', colNum:'',
courseId:'' courseId:''
}, },
levelList:[] levelList:[],
} }
}, },
watch: { watch: {
}, },
created(){ created(){
this.getCategory()
this.getCourseLevel()
}, },
mounted(){ mounted(){
// console.log(crudCourseMaster) // console.log(crudCourseMaster)
@ -189,84 +125,12 @@ export default {
}) })
}, },
methods: { methods: {
getCourseLevel(){
crudCyCourse.getCourseLevel().then((res)=>{
this.levelList = res.content
})
},
createSeat(id){
this.seatForm.courseId = id;
this.showCreateSeat = true;
},
submitSetSeat(){
console.log(this.seatForm)
let data = {
colNum: this.seatForm.colNum,
rowNum: this.seatForm.rowNum,
courseId: this.seatForm.courseId,
}
crudCyCourse.courseSeat(this.seatForm).then((res)=>{
this.$message({
type:'success',
message:'操作成功!'
}).catch((res)=>{
console.log(res)
})
})
},
cancelSubmit(){
this.showCreateSeat = false;
this.seatForm = {
rowNum:'',
colNum:'',
courseId:'',
}
},
handleChange(value){
console.log(value)
// this.form.categoryId = value;
},
// //
[CRUD.HOOK.beforeRefresh]() { [CRUD.HOOK.beforeRefresh]() {
return true return true
}, // }, //
[CRUD.HOOK.afterToCU](crud, form) { [CRUD.HOOK.afterToCU](crud, form) {
}, },
getCategory(){
initData('/api/CourseCategory',this.getQueryParams()).then((res)=>{
// console.log(res)
res.content.forEach((item)=>{
item.label = item.categoryName
item.value = item.id
item.children = item.categoryList
item.categoryList.forEach((child)=>{
child.label = child.categoryName
child.value = child.id
child.children = child.categoryList
})
})
this.categoryList = res.content
})
},
getQueryParams: function() {
return {
page: 0,
size: 200,
sort: ['id,desc'],
}
},
countChange(){
let num = this.form.dayCount;
for(let i = 0; i < num; i++){
this.form.courseScheduleList.push({day:i+1, courseContent:''})
}
},
submit(){
this.form.imageArr = [this.form.imageInput]
this.form.isModel = 1
this.crud.submitCU()
},
} }
} }

7
src/views/course/index.vue

@ -123,7 +123,7 @@
<el-table-column v-if="columns.visible('id')" prop="id" label="id" width="75"/> <el-table-column v-if="columns.visible('id')" prop="id" label="id" width="75"/>
<el-table-column v-if="columns.visible('courseName')" prop="courseName" label="课程名称"/> <el-table-column v-if="columns.visible('courseName')" prop="courseName" label="课程名称"/>
<el-table-column v-if="columns.visible('categoryName')" prop="categoryName" label="分类名称" /> <el-table-column v-if="columns.visible('categoryName')" prop="categoryName" label="分类名称" />
<el-table-column v-if="columns.visible('courseIntroduce')" prop="courseIntroduce" label="课程简介" :show-overflow-tooltip="true"/> <!-- <el-table-column v-if="columns.visible('courseIntroduce')" prop="courseIntroduce" label="课程简介" :show-overflow-tooltip="true"/> -->
<el-table-column prop="courseState" label="课程状态"> <el-table-column prop="courseState" label="课程状态">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.courseState == 1 ? '进行中' : scope.row.courseState == 2 ? '已结束' : '未开始' }}</span> <span>{{scope.row.courseState == 1 ? '进行中' : scope.row.courseState == 2 ? '已结束' : '未开始' }}</span>
@ -152,7 +152,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="columns.visible('coursePlace')" prop="coursePlace" label="开课地点"/> <el-table-column v-if="columns.visible('coursePlace')" prop="coursePlace" label="开课地点"/>
<el-table-column v-if="columns.visible('courseEnterPerson')" prop="courseEnterPerson" label="报名人数" /> <el-table-column prop="realEnterPerson" label="已报名人数">
</el-table-column>
<el-table-column prop="courseEnterPerson" label="总报名人数">
</el-table-column>
<el-table-column v-if="columns.visible('courseCharge')" prop="courseCharge" label="费用" /> <el-table-column v-if="columns.visible('courseCharge')" prop="courseCharge" label="费用" />
<el-table-column v-permission="['admin','cyCourse:del']" label="操作" width="260px" align="center"> <el-table-column v-permission="['admin','cyCourse:del']" label="操作" width="260px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">

125
src/views/course/studyList.vue

@ -16,8 +16,8 @@
<!--表格渲染--> <!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column v-if="columns.visible('id')" prop="id" label="id" /> <el-table-column v-if="columns.visible('listName')" prop="listName" label="榜单名称" />
<el-table-column v-if="columns.visible('categoryName')" prop="categoryName" label="课程分类" /> <el-table-column v-if="columns.visible('categoryName')" prop="categoryName" label="榜单分类" />
<el-table-column v-if="columns.visible('courseStartTime')" prop="courseStartTime" label="打榜时间" :show-overflow-tooltip="true"> <el-table-column v-if="columns.visible('courseStartTime')" prop="courseStartTime" label="打榜时间" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.listStartTime)}} ~ {{parseTime(scope.row.listEndTime)}}</span> <span>{{ parseTime(scope.row.listStartTime)}} ~ {{parseTime(scope.row.listEndTime)}}</span>
@ -38,20 +38,11 @@
<span>{{ parseTime(scope.row.enterEndTime) }}</span> <span>{{ parseTime(scope.row.enterEndTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="columns.visible('listName')" prop="listName" label="榜单名称" />
<el-table-column v-if="columns.visible('missedClockTimes')" prop="missedClockTimes" label="允许缺卡次数" /> <el-table-column v-if="columns.visible('missedClockTimes')" prop="missedClockTimes" label="允许缺卡次数" />
<!-- <el-table-column v-if="columns.visible('listState')" prop="listState" label="榜单状态">
<template slot-scope="scope">
<span v-if="scope.row.listState == 0">未开始</span>
<span v-if="scope.row.listState == 1">打榜中</span>
<span v-if="scope.row.listState == 2">已完成</span>
<span v-if="scope.row.listState == 3">已取消</span>
</template>
</el-table-column> -->
<el-table-column v-if="columns.visible('integral')" prop="integral" label="奖惩积分" /> <el-table-column v-if="columns.visible('integral')" prop="integral" label="奖惩积分" />
<el-table-column label="操作" width="170px" align="center"> <el-table-column label="操作" width="200px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" icon="el-icon-edit"> <el-button size="mini" type="primary">
<router-link :to="'/course/addStudy/'+scope.row.id">编辑</router-link> <router-link :to="'/course/addStudy/'+scope.row.id">编辑</router-link>
</el-button> </el-button>
<el-popover <el-popover
@ -64,14 +55,73 @@
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button> <el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
<el-button type="primary" size="mini" @click="crud.doDelete(scope.row)">确定</el-button> <el-button type="primary" size="mini" @click="crud.doDelete(scope.row)">确定</el-button>
</div> </div>
<el-button slot="reference" type="danger" icon="el-icon-delete" size="mini">删除</el-button> <el-button slot="reference" type="danger" size="mini">删除</el-button>
</el-popover> </el-popover>
<el-button size="mini" type="primary" @click="seeMore(scope.row)">详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
<pagination /> <pagination />
</div> </div>
<el-dialog
title="榜单详情"
width="75%"
:visible.sync="showDetailDialog">
<div>
<el-date-picker
v-model="data.date"
@change="dateChange"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择打榜日期"> </el-date-picker>
<div class="detail-box">
<el-row>
<el-col :span="8">
<span>榜单名称</span> <span>{{studyDetail.listName}}</span>
</el-col>
<el-col :span="8">
<span>已打卡人数</span> <span>{{studyDetail.listName}}</span>
</el-col>
<el-col :span="8" >
<span>榜单分类</span> <span>{{studyDetail.categoryName}}</span>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<span>打榜时间</span> <span>{{studyDetail.listStartTime}}</span>
</el-col>
<el-col :span="8">
<span>签到时间</span> <span>{{studyDetail.signStartTime}} ~ {{studyDetail.signEndTime}}</span>
</el-col>
<el-col :span="8">
<span>截止时间</span> <span>{{studyDetail.listEndTime}}</span>
</el-col>
</el-row>
</div>
<el-table :data="studyDetail.recordDtos" style="width: 100%" border>
<el-table-column prop="realName" label="会员昵称">
</el-table-column>
<el-table-column prop="avatar" label="会员头像">
<template slot-scope="scope">
<a :href="scope.row.avatar" style="color: #42b983" target="_blank">
<img :src="scope.row.avatar" alt="点击打开" style="width:38px;height:38px;border-radius:4px;">
</a>
</template>
</el-table-column>
<el-table-column prop="content" label="打卡内容"></el-table-column>
<el-table-column prop="" label="内容图片">
<template slot-scope="scope">
<img :src="item" alt="" v-for="(item,index) in scope.row.imgPaths" :key="index" style="width:38px;height:38px;border-radius:4px;">
</template>
</el-table-column>
</el-table>
</div>
<div slot="footer">
<el-button type="primary" @click="showDetailDialog = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -83,8 +133,6 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation' import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import MaterialList from "@/components/material"; import MaterialList from "@/components/material";
import { del } from '@/api/StudyList'
import initData from '@/mixins/crud'
// crudpresenter // crudpresenter
const defaultCrud = CRUD({ title: '学习榜', url: 'api/StudyList', sort: 'id,desc', crudMethod: { ...crudStudyList }}) const defaultCrud = CRUD({ title: '学习榜', url: 'api/StudyList', sort: 'id,desc', crudMethod: { ...crudStudyList }})
const defaultForm = { const defaultForm = {
@ -118,11 +166,25 @@ export default {
}, },
rules: { rules: {
}, },
showDetailDialog: false,
studyId: '',
studyDetail: [],
data: {
id: '',
date: '',
}
} }
}, },
watch: { watch: {
}, },
created(){ created(){
var d = new Date();
let y = d.getFullYear(),
m = d.getMonth() < 10 ? '0' + d.getMonth() : d.getMonth(),
day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate();
this.date = y + '-' + m + '-' + day
console.log(this.date)
}, },
methods: { methods: {
// //
@ -135,6 +197,20 @@ export default {
console.log('data',data) console.log('data',data)
this.$refs[data.id].doClose() this.$refs[data.id].doClose()
}, },
seeMore(item){
this.showDetailDialog = true
this.data.id = item.id
this.getStudyDetail()
},
dateChange(){
this.getStudyDetail()
},
getStudyDetail(){
crudStudyList.get(this.data).then((res)=>{
this.studyDetail = res
})
}
} }
} }
@ -156,4 +232,21 @@ export default {
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
} }
.detail-box{
width: 100%;
font-size: 16px;
padding: 24px;
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.18);
border-radius: 12px;
margin: 20px 0;
}
.el-row{
margin: 24px 0;
}
.title-w{
font-size:19px;
font-weight: bold;
margin: 32px 0;
color: #000;
}
</style> </style>

95
src/views/shop/user/index.vue

@ -4,17 +4,17 @@
<div class="head-container"> <div class="head-container">
<!-- 搜索 --> <!-- 搜索 -->
<el-input v-model="query.value" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery" /> <el-input v-model="query.value" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery" />
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px"> <el-select v-model="query.key" clearable placeholder="类型" class="filter-item" style="width: 130px">
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key" /> <el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key" />
</el-select> </el-select>
<el-select v-model="userType" clearable placeholder="用户来源" class="filter-item" style="width: 130px"> <!-- <el-select v-model="userType" clearable placeholder="用户来源" class="filter-item" style="width: 130px">
<el-option <el-option
v-for="item in statusOptions" v-for="item in statusOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select> -->
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button> <el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 --> <!-- 新增 -->
<el-button <el-button
@ -24,48 +24,31 @@
icon="el-icon-refresh" icon="el-icon-refresh"
@click="toQuery" @click="toQuery"
>刷新</el-button> >刷新</el-button>
<el-button class="filter-item" size="mini" type="warning" @click="moveMember">会员转移</el-button>
</div> </div>
<!--表单组件--> <!--表单组件-->
<eForm ref="form" :is-add="isAdd" /> <eForm ref="form" :is-add="isAdd" />
<pForm ref="formp" :is-add="isAdd" /> <pForm ref="formp" :is-add="isAdd" />
<detail ref="formd" /> <detail ref="formd" />
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;" @selection-change="selectionChangeHandler">
<el-table-column prop="uid" label="用户id" /> <el-table-column type="selection" width="55" />
<el-table-column prop="nickname" label="用户昵称" /> <el-table-column prop="nickname" label="用户昵称" />
<el-table-column prop="realName" label="真实姓名" />
<el-table-column ref="table" prop="avatar" label="用户头像"> <el-table-column ref="table" prop="avatar" label="用户头像">
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="scope.row.avatar" style="color: #42b983" target="_blank"><img :src="scope.row.avatar" alt="点击打开" class="el-avatar"></a> <a :href="scope.row.avatar" style="color: #42b983" target="_blank"><img :src="scope.row.avatar" alt="点击打开" class="el-avatar"></a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="phone" label="手机号码" /> <el-table-column prop="phone" label="手机号码" />
<!-- <el-table-column prop="nowMoney" label="用户余额" /> <el-table-column label="性别">
<el-table-column prop="brokeragePrice" label="佣金金额" /> -->
<el-table-column prop="integral" label="用户积分" />
<el-table-column prop="createTime" label="创建日期" width="140">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<div @click="onStatus(scope.row.uid,scope.row.status)">
<el-tag v-if="scope.row.status == 1" style="cursor: pointer" :type="''">正常</el-tag>
<el-tag v-else style="cursor: pointer" :type=" 'info' ">禁用</el-tag>
</div>
</template>
</el-table-column>
<el-table-column label="用户来源" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <span>{{scope.row.gender == 0 ? '女' : '男'}}</span>
<el-tag v-if="scope.row.userType == 'wechat'">公众号</el-tag>
<el-tag v-else-if="scope.row.userType == 'routine'">小程序</el-tag>
<el-tag v-else>H5</el-tag>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="spreadUid" label="推荐人" /> <el-table-column prop="integral" label="用户积分" />
<el-table-column prop="payCount" label="购买次数" /> <el-table-column prop="idCard" label="身份证号码" />
<el-table-column prop="city" label="区域" />
<el-table-column v-if="checkPermission(['admin','YXUSER_ALL','YXUSER_EDIT','YXUSER_DELETE'])" label="操作" width="215" align="center" fixed="right"> <el-table-column v-if="checkPermission(['admin','YXUSER_ALL','YXUSER_EDIT','YXUSER_DELETE'])" label="操作" width="215" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button <!-- <el-button
@ -86,30 +69,26 @@
type="primary" type="primary"
@click="editP(scope.row)" @click="editP(scope.row)"
>修改余额</el-button> >修改余额</el-button>
<!-- <el-dropdown size="mini" split-button type="primary" trigger="click">
操作
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>
<el-button
v-permission="['admin','YXUSER_ALL','YXUSER_EDIT']"
size="mini"
type="primary"
@click="edit(scope.row)"
>修改用户</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button
v-permission="['admin','YXUSER_ALL','YXUSER_EDIT']"
size="mini"
type="primary"
@click="editP(scope.row)"
>修改余额</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-dialog
title="选择转移到的服务老师"
:visible.sync="checkMasterDialog"
width="500">
<el-select v-model="master" placeholder="">
<el-option
v-for="item in masterList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<div slot="footer">
<el-button @click="checkMasterDialog = false"> </el-button>
<el-button type="primary" @click="checkMasterDialog = false"> </el-button>
</div>
</el-dialog>
<!--分页组件--> <!--分页组件-->
<el-pagination <el-pagination
:total="total" :total="total"
@ -138,14 +117,18 @@ export default {
delLoading: false, delLoading: false,
userType: '', userType: '',
queryTypeOptions: [ queryTypeOptions: [
{ key: 'nickname', display_name: '用户昵称' }, { key: 'nickName', display_name: '用户昵称' },
{ key: 'phone', display_name: '手机号码' } { key: 'phone', display_name: '手机号码' },
{ key: 'city', display_name: '所在城市' }
], ],
statusOptions: [ statusOptions: [
{ value: 'routine', label: '小程序' }, { value: 'routine', label: '小程序' },
{ value: 'wechat', label: '公众号' }, { value: 'wechat', label: '公众号' },
{ value: 'H5', label: 'H5' } { value: 'H5', label: 'H5' }
] ],
checkMasterDialog: false,
master:'',
masterList: []
} }
}, },
created() { created() {
@ -154,6 +137,12 @@ export default {
}) })
}, },
methods: { methods: {
selectionChangeHandler(val){
console.log(val)
},
moveMember(){
},
formatTime, formatTime,
checkPermission, checkPermission,
onStatus(id, status) { onStatus(id, status) {

16
src/views/shop/user/master.vue

@ -23,10 +23,15 @@
</el-form-item> </el-form-item>
<el-form-item label="照片路径" prop="photoPath"> <el-form-item label="照片路径" prop="photoPath">
<picUpload v-model="form.photoPath"></picUpload> <picUpload v-model="form.photoPath"></picUpload>
<!-- <el-input v-model="form.photoPath" style="width: 370px" /> -->
</el-form-item> </el-form-item>
<el-form-item label="个人简介"> <el-form-item label="个人简介">
<el-input type="textarea" v-model="form.introduction" style="width: 370px" /> <el-input type="textarea" v-model="form.introduction" rows="6" style="width: 370px" />
</el-form-item>
<el-form-item label="简介排版">
<el-radio-group v-model="form.introductionType">
<el-radio :label="0">居左</el-radio>
<el-radio :label="1">居中</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -65,6 +70,12 @@
prop="introduction" prop="introduction"
label="个人简介" label="个人简介"
/> />
<el-table-column v-if="columns.visible('introductionType')" prop="introductionType" label="个人简介" >
<template slot-scope="scope">
<span>{{scope.row.introductionType == 0 ? '居左' : '居中'}}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
v-if="columns.visible('arrangeNum')" v-if="columns.visible('arrangeNum')"
prop="arrangeNum" prop="arrangeNum"
@ -119,6 +130,7 @@ const defaultForm = {
isDel: null, isDel: null,
arrangeNum: null, arrangeNum: null,
finishedNum: null, finishedNum: null,
introductionType: 0,
}; };
export default { export default {
name: "CourseMaster", name: "CourseMaster",

4
src/views/shop/user/sMaster.vue

@ -35,9 +35,9 @@
<a :href="scope.row.avatar" style="color: #42b983" target="_blank"><img :src="scope.row.avatar" alt="点击打开" class="el-avatar"></a> <a :href="scope.row.avatar" style="color: #42b983" target="_blank"><img :src="scope.row.avatar" alt="点击打开" class="el-avatar"></a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column ref="table" prop="avatar" label="工作照"> <el-table-column ref="table" prop="workPhoto" label="工作照">
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="scope.row.avatar" style="color: #42b983" target="_blank"><img :src="scope.row.avatar" alt="点击打开" class="el-avatar"></a> <a :href="scope.row.workPhoto" style="color: #42b983" target="_blank"><img :src="scope.row.workPhoto" alt="点击打开" class="el-avatar"></a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="phone" label="手机号码" /> <el-table-column prop="phone" label="手机号码" />

49
src/views/system/configManage/index.vue

@ -11,6 +11,10 @@
<el-form-item label="服务人员电话" prop="serviceStaffPhone"> <el-form-item label="服务人员电话" prop="serviceStaffPhone">
<el-input v-model="form.serviceStaffPhone" style="width: 35%" /> <el-input v-model="form.serviceStaffPhone" style="width: 35%" />
</el-form-item> </el-form-item>
<el-form-item label="点灯祈福">
<el-radio v-model="form.flag" :label="0">不显示</el-radio>
<el-radio v-model="form.flag" :label="1">显示</el-radio>
</el-form-item>
<!-- <el-form-item label="能量大师的会员等级" prop="userHighestLevel"> <!-- <el-form-item label="能量大师的会员等级" prop="userHighestLevel">
<el-input v-model="form.userHighestLevel" style="width: 35%" /> <el-input v-model="form.userHighestLevel" style="width: 35%" />
</el-form-item> --> </el-form-item> -->
@ -35,36 +39,8 @@ export default {
return { return {
loading:false, loading:false,
form:{ form:{
"signInfos": [ "signInfos": [],
{ flag:0
"day": "第一天",
"signNum": "10"
},
{
"day": "第二天",
"signNum": "20"
},
{
"day": "第三天",
"signNum": "30"
},
{
"day": "第四天",
"signNum": "40"
},
{
"day": "第五天",
"signNum": "50"
},
{
"day": "第六天",
"signNum": "60"
},
{
"day": "第七天",
"signNum": "100"
}
]
}, },
rules: { rules: {
sellerActivityCode: [ sellerActivityCode: [
@ -76,10 +52,13 @@ export default {
serviceStaffPhone: [ serviceStaffPhone: [
{ required: true, message: '服务人员电话不能为空', trigger: 'blur' } { required: true, message: '服务人员电话不能为空', trigger: 'blur' }
], ],
// completedNum: [ },
// { required: true, message: '', trigger: 'blur' } queryArr: [
// ] "seller_activity_code",
} "blessing_flag",
"unlock_all_article_price",
"service_staff_phone","completed_num"
]
} }
}, },
mounted(){ mounted(){
@ -87,7 +66,7 @@ export default {
}, },
methods: { methods: {
getConfigs(){ getConfigs(){
getConfigs(["seller_activity_code","unlock_all_article_price","service_staff_phone","completed_num"]).then((res)=>{ getConfigs(this.queryArr).then((res)=>{
this.form = res this.form = res
}) })
}, },

7
src/views/tools/storage/qiniu/index.vue

@ -64,6 +64,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="columns.visible('suffix')" :show-overflow-tooltip="true" prop="suffix" label="文件类型" @selection-change="crud.selectionChangeHandler" /> <el-table-column v-if="columns.visible('suffix')" :show-overflow-tooltip="true" prop="suffix" label="文件类型" @selection-change="crud.selectionChangeHandler" />
<el-table-column label="预览">
<template slot-scope="scope">
<a :href="'https://qiniu.upload.gznl.top/'+scope.row.name + scope.row.suffix" style="color: #42b983" target="_blank">
<img :src="'https://qiniu.upload.gznl.top/'+scope.row.name + '.' + scope.row.suffix" alt="点击打开" style="width:38px;height:38px;border-radius:4px;">
</a>
</template>
</el-table-column>
<el-table-column v-if="columns.visible('bucket')" prop="bucket" label="空间名称" /> <el-table-column v-if="columns.visible('bucket')" prop="bucket" label="空间名称" />
<el-table-column v-if="columns.visible('size')" prop="size" label="文件大小" /> <el-table-column v-if="columns.visible('size')" prop="size" label="文件大小" />
<el-table-column v-if="columns.visible('type')" prop="type" label="空间类型" /> <el-table-column v-if="columns.visible('type')" prop="type" label="空间类型" />

12
src/views/wechat/article/form.vue

@ -13,7 +13,7 @@
</el-form-item> </el-form-item>
<el-form-item label="文章分类"> <el-form-item label="文章分类">
<el-cascader <el-cascader
v-model="form.categoryId" v-model="form.cids"
:options="categoryList" :options="categoryList"
:show-all-levels="false" :show-all-levels="false"
:props="{ checkStrictly: true }" :props="{ checkStrictly: true }"
@ -81,7 +81,7 @@ export default {
loading: false, dialog: false, loading: false, dialog: false,
form: { form: {
id: '', id: '',
cid: '', cids: [],
categoryId:'', categoryId:'',
chargeType:0, chargeType:0,
articleCharge:'', articleCharge:'',
@ -174,9 +174,7 @@ export default {
} }
}, },
handleChange(value){ handleChange(value){
console.log(value) this.form.cids = value;
this.form.categoryId = value[value.length-1];
this.form.cid = value[value.length-1];
}, },
addCustomDialog () { addCustomDialog () {
window.UE.registerUI('yshop', function (editor, uiName) { window.UE.registerUI('yshop', function (editor, uiName) {
@ -246,7 +244,7 @@ export default {
this.loading = false this.loading = false
// this.$parent.init() // this.$parent.init()
setTimeout(() => { setTimeout(() => {
this.$router.push({ path: '/wechat/wearticle' }); this.$router.push({ path: '/article/index' });
}, 500); }, 500);
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
@ -258,7 +256,7 @@ export default {
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
this.form = { this.form = {
id: '', id: '',
cid: '', cids: [],
chargeType:0, chargeType:0,
categoryId:'', categoryId:'',
articleCharge:'', articleCharge:'',

203
src/views/zen/lighting.vue

@ -0,0 +1,203 @@
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="70%">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="130px">
<el-form-item label="祈福灯名称" prop="lampName">
<el-input v-model="form.lampName" style="width: 370px;" />
</el-form-item>
<el-form-item label="祈福灯图片">
<!-- <el-input v-model="form.lampPic" style="width: 370px;" /> -->
<picUpload v-model="form.lampPic"></picUpload>
</el-form-item>
<el-form-item label="详情图文">
<picUpload v-model="form.lampDetail"></picUpload>
<!-- <el-upload
:action="qiNiuUploadApi"
:headers="headers"
list-type="picture-card"
:limit="4"
:on-preview="handlePictureCardPreview"
:on-success="handleUploadSuccess"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog> -->
</el-form-item>
<el-form-item label="祈福灯介绍">
<el-input v-model="form.lampIntroduce" style="width: 370px;" />
</el-form-item>
<el-form-item label="亮灯天数">
<el-input v-model="form.lightDays" style="width: 370px;" />
</el-form-item>
<el-form-item label="点灯费用">
<el-input v-model="form.lampPrice" style="width: 370px;" />
</el-form-item>
<el-form-item label="是否置顶">
<el-switch
v-model="form.isTop"
:active-value="1"
:inactive-value="0"
active-text="是"
inactive-text="否">
</el-switch>
</el-form-item>
<el-form-item label="是否展示在小程序" prop="isShow">
<el-switch
v-model="form.isShow"
:active-value="1"
:inactive-value="0"
active-text="是"
inactive-text="否">
</el-switch>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="error" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" />
<el-table-column v-if="columns.visible('lampName')" prop="lampName" label="祈福灯名称" />
<el-table-column prop="lampPic" label="祈福灯图片">
<template slot-scope="scope">
<a :href="scope.row.lampPic" style="color: #42b983" target="_blank">
<img :src="scope.row.lampPic" alt="点击打开" style="width:38px;height:38px;border-radius:4px;">
</a>
</template>
</el-table-column>
<el-table-column v-if="columns.visible('lampIntroduce')" prop="lampIntroduce" label="介绍" />
<el-table-column v-if="columns.visible('lampDetail')" prop="lampDetail" label="详情" />
<el-table-column v-if="columns.visible('lightDays')" prop="lightDays" label="亮灯天数" />
<el-table-column v-if="columns.visible('lampPrice')" prop="lampPrice" label="点灯费用" />
<el-table-column v-if="columns.visible('isTop')" prop="isTop" label="是否置顶">
<template slot-scope="scope">
<span>{{ scope.row.isTop ? '是' : '否' }}</span>
</template>
</el-table-column>
<el-table-column v-if="columns.visible('isShow')" prop="isShow" label="是否展示在小程序">
<template slot-scope="scope">
<span>{{ scope.row.isShow ? '是' : '否' }}</span>
</template>
</el-table-column>
<el-table-column v-permission="['admin','BlessingLamp:edit','BlessingLamp:del']" label="操作" width="150px" align="center">
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="permission"
/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
import crudBlessingLamp from '@/api/BlessingLamp'
import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import MaterialList from "@/components/material"
import picUpload from '@/components/pic-upload'
import { mapGetters } from 'vuex'
import { getToken } from '@/utils/auth'
// crudpresenter
const defaultCrud = CRUD({
title: '祈福灯表',
url: 'api/BlessingLamp',
sort: 'id,desc',
crudMethod: { ...crudBlessingLamp }
})
const defaultForm = {
id: null,
lampName: null,
lampPic: '',
lampIntroduce: null,
lampDetail: null,
lightDays: null,
lampPrice: null,
isTop: 0,
isShow: 1,
}
export default {
name: 'BlessingLamp',
components: { pagination, picUpload, crudOperation, rrOperation, udOperation ,MaterialList},
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()],
data() {
return {
permission: {
add: ['admin', 'BlessingLamp:add'],
edit: ['admin', 'BlessingLamp:edit'],
del: ['admin', 'BlessingLamp:del']
},
rules: {
lampName: [
{ required: true, message: '祈福灯名称不能为空', trigger: 'blur' }
]
},
headers: {
'Authorization': getToken()
},
dialogImageUrl: '',
dialogVisible: false,
dialogImageList:[]
}
},
computed: {
...mapGetters([
'qiNiuUploadApi'
])
},
methods: {
//
[CRUD.HOOK.beforeRefresh]() {
return true
},
//
[CRUD.HOOK.afterToCU](crud, form) {
},
handleRemove(file, fileList) {
this.dialogImageList = fileList
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
handleUploadSuccess(response, file, fileList){
this.dialogImageList.push(response.data)
},
}
}
</script>
<style scoped>
.table-img {
display: inline-block;
text-align: center;
background: #ccc;
color: #fff;
white-space: nowrap;
position: relative;
overflow: hidden;
vertical-align: middle;
width: 32px;
height: 32px;
line-height: 32px;
}
</style>

113
src/views/zen/lightingList.vue

@ -0,0 +1,113 @@
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<!-- <crudOperation :permission="permission" /> -->
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" />
<el-table-column v-if="columns.visible('blessingPersonNickname')" prop="blessingPersonNickname" label="祈福人昵称" />
<el-table-column v-if="columns.visible('blessingPersonPhoto')" prop="blessingPersonPhoto" label="祈福人头像">
<template slot-scope="scope">
<a :href="scope.row.blessingPersonPhoto" style="color: #42b983" target="_blank">
<img :src="scope.row.blessingPersonPhoto" alt="点击打开" style="width:38px;height:38px;border-radius:4px;">
</a>
</template>
</el-table-column>
<el-table-column v-if="columns.visible('blessingLampId')" prop="blessingLampId" label="祈福灯id" />
<el-table-column v-if="columns.visible('blessingLampName')" prop="blessingLampName" label="祈福灯名称" />
<el-table-column v-if="columns.visible('blessingPersonRealname')" prop="blessingPersonRealname" label="祈福人姓名" />
<el-table-column v-if="columns.visible('blessingPersonBirth')" prop="blessingPersonBirth" label="祈福人生日" />
<el-table-column v-if="columns.visible('blessingContent')" prop="blessingContent" label="祈福内容" />
<el-table-column v-if="columns.visible('lampLightDays')" prop="lampLightDays" label="持续时间" />
<el-table-column v-if="columns.visible('blessingDate')" prop="blessingDate" label="祈福时间">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.blessingDate) }}</span>
</template>
</el-table-column>
<el-table-column v-if="columns.visible('beBlessedTimes')" prop="beBlessedTimes" label="为他祈福人数" />
<el-table-column v-if="columns.visible('lampState')" prop="lampState" label="点灯状态">
<template slot-scope="scope">
<span>{{ lampState == 0 ? '熄灭' : '点亮' }}</span>
</template>
</el-table-column>
<el-table-column v-permission="['admin','Blessing:edit','Blessing:del']" label="操作" width="150px" align="center">
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="permission"
/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
import crudBlessing from '@/api/Blessing'
import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import MaterialList from "@/components/material";
// crudpresenter
const defaultCrud = CRUD({ title: '祈福表', url: 'api/Blessing', sort: 'id,desc', crudMethod: { ...crudBlessing }})
const defaultForm = { id: null, blessingPersonNickname: null, blessingPersonPhoto: null, blessingLampId: null, blessingLampName: null, blessingPersonRealname: null, blessingPersonBirth: null, blessingContent: null, lampLightDays: null, blessingDate: null, beBlessedTimes: null, lampState: null, createTime: null, updateTime: null, isDel: null }
export default {
name: 'Blessing',
components: { pagination, crudOperation, rrOperation, udOperation ,MaterialList},
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()],
data() {
return {
permission: {
add: ['admin', 'Blessing:add'],
edit: ['admin', 'Blessing:edit'],
del: ['admin', 'Blessing:del']
},
rules: {
id: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
isDel: [
{ required: true, message: '不能为空', trigger: 'blur' }
]
} }
},
watch: {
},
methods: {
//
[CRUD.HOOK.beforeRefresh]() {
return true
}, //
[CRUD.HOOK.afterToCU](crud, form) {
},
}
}
</script>
<style scoped>
.table-img {
display: inline-block;
text-align: center;
background: #ccc;
color: #fff;
white-space: nowrap;
position: relative;
overflow: hidden;
vertical-align: middle;
width: 32px;
height: 32px;
line-height: 32px;
}
</style>
Loading…
Cancel
Save