杨豪
3 years ago
20 changed files with 902 additions and 340 deletions
Binary file not shown.
@ -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 } |
@ -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 } |
@ -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> |
@ -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' |
||||
// crud交由presenter持有 |
||||
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> |
@ -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"; |
||||
|
||||
// crud交由presenter持有 |
||||
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…
Reference in new issue