提交 6bd44bbf 编写于 作者: K keyinghao

前端后台讲师工程

上级 82a55b8a
......@@ -22,7 +22,8 @@
"nprogress": "0.2.0",
"vue": "2.5.17",
"vue-router": "3.0.1",
"vuex": "3.0.1"
"vuex": "3.0.1",
"wangeditor": "^3.1.1"
},
"devDependencies": {
"autoprefixer": "8.5.0",
......
......@@ -101,10 +101,10 @@
layout="total, sizes, prev, pager, next, jumper"
:total="page.totalCount">
</el-pagination>
<add :visible="ctrl.addDialogVisible" :title="ctrl.addDialogTitle" @close-cllback="addCloseCllback"></add>
<edit :visible="ctrl.editDialogVisible" :formData="formData" :title="ctrl.editDialogTitle" @close-cllback="editCloseCllback"></edit>
<view-lecturer :visible="ctrl.viewVisible" :formData="viewData" :title="ctrl.ViewDialogTitle" :lecturerView="lecturerView" @close-cllback="viewCloseCllback"></view-lecturer>
<audit :visible="ctrl.auditDialogVisible" :formData="auditMap" :title="ctrl.auditDialogTitle" @close-cllback="auditCloseCllback"></audit>
<add :visible="ctrl.addDialogVisible" :title="ctrl.dialogTitle" @close-cllback="closeCllback"></add>
<edit :visible="ctrl.editDialogVisible" :formData="formData" :lecturerExt="lecturerExt" :title="ctrl.dialogTitle" @close-cllback="closeCllback"></edit>
<view-lecturer :visible="ctrl.viewVisible" :formData="formData" :lecturerExt="lecturerExt" :title="ctrl.dialogTitle" @close-cllback="closeCllback"></view-lecturer>
<audit :visible="ctrl.auditDialogVisible" :formData="auditMap" :title="ctrl.dialogTitle" @close-cllback="closeCllback"></audit>
</div>
</template>
<script>
......@@ -117,10 +117,6 @@
components: { Add, Edit, viewLecturer, Audit },
data() {
return {
map: {},
viewData: {},
formData: {},
lecturerView: {},
auditMap: {
id: '',
auditStatus: 1
......@@ -137,6 +133,10 @@
auditStatusList: []
},
list: [],
map: {},
formData: {},
lecturerExt: {},
title: '',
page: {
beginPageIndex: 1,
pageCurrent: 1,
......@@ -146,10 +146,10 @@
totalPage: 0
},
textAuditStatus: {
0: '待审核',
1: '审核通过',
2: '审核不通过'
}
0: '待审核',
1: '审核通过',
2: '审核不通过'
}
}
},
mounted() {
......@@ -179,8 +179,7 @@
},
// 重置查询条件
handleReset() {
this.map = {}
this.lecturerAuditList()
this.reload()
},
lecturerAuditList() {
this.load === true
......@@ -230,62 +229,49 @@
},
// 跳添加讲师弹窗
add() {
this.ctrl.addDialogTitle = '添加'
this.ctrl.dialogTitle = '添加'
this.ctrl.addDialogVisible = true
},
// 关闭添加讲师弹窗回调
addCloseCllback() {
this.ctrl.addDialogVisible = false;
this.reload()
},
// 修改跳页面操作
handleEdit(id) {
this.load === true
userApi.lecturerAuditView({ id: id }).then(row => {
this.formData = row.data
this.ctrl.load = false
}).catch(() => {
this.ctrl.load = false
})
this.ctrl.editDialogTitle = '编辑'
this.title = '信息修改'
this.getById(id, this.title)
this.ctrl.editDialogVisible = true
},
// 关闭编辑弹窗回调
editCloseCllback() {
this.formData = {}
this.ctrl.editDialogVisible = false
this.reload()
},
// 审核页面弹窗
handleAudit(row) {
this.auditMap.id = row.id
this.ctrl.auditDialogTitle = row.lecturerMobile
this.ctrl.dialogTitle = '审核'
this.ctrl.auditDialogVisible = true
},
// 关闭编辑弹窗回调
auditCloseCllback() {
// 跳查看讲师弹窗
handleView(id) {
this.title = '查看详情'
this.getById(id, this.title)
this.ctrl.viewVisible = true
},
// 关闭弹窗回调
closeCllback() {
this.ctrl.addDialogVisible = false;
this.ctrl.editDialogVisible = false
this.ctrl.viewVisible = false;
this.ctrl.auditDialogVisible = false
this.reload()
},
// 跳查看讲师弹窗
handleView(id) {
//查看讲师审核信息
getById(id, title) {
this.load === true
userApi.lecturerAuditView({ id: id }).then(res => {
this.viewData = res.data
this.formData = res.data
if (JSON.stringify(res.data.lecturerExt) !== '{}') {
this.lecturerView = res.data.lecturerExt
this.ctrl.ViewDialogTitle = res.data.lecturerMobile
this.lecturerExt = res.data.lecturerExt
}
console.log(res.data.lecturerMobile)
this.ctrl.dialogTitle = res.data.lecturerMobile + '-' + title
this.ctrl.load = false
}).catch(() => {
this.ctrl.load = true
})
this.ctrl.viewVisible = true
},
// 关闭查看讲师弹窗回调
viewCloseCllback() {
this.ctrl.viewVisible = false;
this.reload()
},
textAuditStatusClass(auditStatus) {
return {
......@@ -296,6 +282,9 @@
},
// 刷新当前页面
reload() {
this.map = {}
this.formData = {}
this.lecturerExt = {}
this.lecturerAuditList()
}
}
......
......@@ -35,7 +35,7 @@
</div></el-col>
</el-row>
<el-form-item label="讲师简介:">
<el-input v-model="formData.introduce"></el-input>
<div id="introduce"></div>
</el-form-item>
</div>
<el-alert class="title" :closable="false" title="讲师分成及银行信息" type="info" />
......@@ -44,29 +44,29 @@
<el-row>
<el-col :span="12"><div>
<el-form-item label="银行名称:">
<el-input :disabled="true" v-model="formData.bankName"></el-input>
<el-input :disabled="true" v-model="lecturerExt.bankName"></el-input>
</el-form-item>
</div></el-col>
<el-col :span="12"><div>
<el-form-item label="银行卡号:">
<el-input :disabled="true" v-model="formData.bankCardNo"></el-input>
<el-input :disabled="true" v-model="lecturerExt.bankCardNo"></el-input>
</el-form-item>
</div></el-col>
</el-row>
<el-row>
<el-col :span="12"><div>
<el-form-item label="开户名称:">
<el-input :disabled="true" v-model="formData.bankUserName"></el-input>
<el-input :disabled="true" v-model="lecturerExt.bankUserName"></el-input>
</el-form-item>
</div></el-col>
<el-col :span="12"><div>
<el-form-item label="银行卡号:">
<el-input :disabled="true" v-model="formData.bankIdCardNo"></el-input>
<el-input :disabled="true" v-model="lecturerExt.bankIdCardNo"></el-input>
</el-form-item>
</div></el-col>
</el-row>
<el-form-item label="支行名称:">
<el-input :disabled="true" v-model="formData.bankBranchName"></el-input>
<el-input :disabled="true" v-model="lecturerExt.bankBranchName"></el-input>
</el-form-item>
</div>
</el-form>
......@@ -94,6 +94,10 @@
type: Object,
default: () => {}
},
lecturerExt: {
type: Object,
default: () => {}
},
visible: {
type: Boolean,
default: false
......@@ -103,6 +107,19 @@
default: ''
}
},
watch: {
visible: function(val) {
if (val) {
console.log('加载富文本框=============')
const E = require('wangeditor')
this.editor2 = new E('#introduce')
this.editor2.customConfig.uploadImgMaxLength = 1
editor.customConfig.uploadImgMaxSize = 3 * 1024 *1024;
/* this.editor2.customConfig.customUploadImg = this.editorUpload*/
this.editor2.create();
}
}
},
methods: {
handleClose(done) {
this.$emit('close-cllback')
......
......@@ -85,8 +85,8 @@
layout="total, sizes, prev, pager, next, jumper"
:total="page.totalCount">
</el-pagination>
<edit :visible="ctrl.dialogVisible" :formData="formData" :title="ctrl.dialogTitle" @close-cllback="closeCllback"></edit>
<view-lecturer :visible="ctrl.viewVisible" :formData="viewData" :lecturerView="lecturerView" :title="ctrl.viewDialogTitle" @close-cllback="closeViewFind"></view-lecturer>
<edit :visible="ctrl.dialogVisible" :formData="formData" :lecturerExt="lecturerExt" :title="ctrl.dialogTitle" @close-cllback="closeCllback"></edit>
<view-lecturer :visible="ctrl.viewVisible" :formData="formData" :lecturerExt="lecturerExt" :title="ctrl.dialogTitle" @close-cllback="closeCllback"></view-lecturer>
</div>
</template>
<script>
......@@ -97,10 +97,11 @@
components: { Edit, viewLecturer },
data() {
return {
list: [],
map: {},
formData: {},
viewData: {},
lecturerView: {},
lecturerExt: {},
title: '',
ctrl: {
load: false,
dialogVisible: false,
......@@ -109,7 +110,6 @@
opts: {
statusIdList: []
},
list: [],
page: {
beginPageIndex: 1,
pageCurrent: 1,
......@@ -144,8 +144,7 @@
},
// 重置查询条件
handleReset() {
this.map = {}
this.lecturerList()
this.reload()
},
lecturerList() {
this.load === true
......@@ -195,44 +194,41 @@
},
// 修改跳页面操作
handleEdit(id) {
this.load === true
userApi.lecturerView({ id: id }).then(row => {
this.formData = row.data
this.ctrl.load = false
}).catch(() => {
this.ctrl.load = false
})
this.ctrl.dialogTitle = '编辑'
this.title = '信息修改'
this.getById(id, this.title)
this.ctrl.dialogVisible = true
},
// 关闭编辑弹窗回调
// 查看跳页面设置
handleView(id) {
this.title = '查看详情'
this.getById(id, this.title)
this.ctrl.viewVisible = true
},
// 关闭弹窗回调
closeCllback() {
this.ctrl.viewVisible = false;
this.ctrl.dialogVisible = false;
this.reload()
},
// 查看跳页面设置
handleView(id) {
this.load === true
// 刷新当前页面
reload() {
this.map = {}
this.formData = {}
this.lecturerExt = {}
this.lecturerList()
},
// 查看信息
getById(id, title) {
userApi.lecturerView({ id: id }).then(res => {
this.viewData = res.data
this.formData = res.data
if (JSON.stringify(res.data.lecturerExt) !== '{}') {
this.lecturerView = res.data.lecturerExt
this.lecturerExt = res.data.lecturerExt
}
this.ctrl.dialogTitle = res.data.lecturerMobile + '-' + title
this.ctrl.load = false
this.ctrl.viewDialogTitle = res.data.lecturerMobile
}).catch(() => {
this.ctrl.load = true
})
this.ctrl.viewVisible = true
},
// 关闭查看弹窗回调
closeViewFind() {
this.ctrl.viewVisible = false;
this.reload()
},
// 刷新当前页面
reload() {
this.lecturerList()
}
}
}
......
......@@ -80,53 +80,53 @@
</div></el-col>
<el-col :span="8"><div>
<el-form-item label="累计总收入:">
<span>{{lecturerView.totalIncome}}元</span>
<span>{{lecturerExt.totalIncome}}元</span>
</el-form-item>
</div></el-col>
</el-row>
<el-row>
<el-col :span="8"><div>
<el-form-item label="已提现金额:">
<span >{{lecturerView.historyMoney}}元</span>
<span >{{lecturerExt.historyMoney}}元</span>
</el-form-item>
</div></el-col>
<el-col :span="8"><div>
<el-form-item label="可提现金额:">
<span >{{lecturerView.enableBalances}}元</span>
<span >{{lecturerExt.enableBalances}}元</span>
</el-form-item>
</div></el-col>
<el-col :span="8"><div>
<el-form-item label="冻结金额:">
<span >{{lecturerView.freezeBalances}}元</span>
<span >{{lecturerExt.freezeBalances}}元</span>
</el-form-item>
</div></el-col>
</el-row>
<el-row>
<el-col :span="8"><div>
<el-form-item label="银行卡号:">
<span >{{lecturerView.bankCardNo}}</span>
<span >{{lecturerExt.bankCardNo}}</span>
</el-form-item>
</div></el-col>
<el-col :span="8"><div>
<el-form-item label="银行名称:">
<span >{{lecturerView.bankName}}</span>
<span >{{lecturerExt.bankName}}</span>
</el-form-item>
</div></el-col>
<el-col :span="8"><div>
<el-form-item label="支行名称:">
<span >{{lecturerView.bankBranchName}}</span>
<span >{{lecturerExt.bankBranchName}}</span>
</el-form-item>
</div></el-col>
</el-row>
<el-row>
<el-col :span="8"><div>
<el-form-item label="开户姓名:">
<span >{{lecturerView.bankUserName}}</span>
<span >{{lecturerExt.bankUserName}}</span>
</el-form-item>
</div></el-col>
<el-col :span="8"><div>
<el-form-item label="身份证号:">
<span >{{lecturerView.bankIdCardNo}}</span>
<span >{{lecturerExt.bankIdCardNo}}</span>
</el-form-item>
</div></el-col>
</el-row>
......@@ -155,7 +155,7 @@
type: Object,
default: () => {}
},
lecturerView: {
lecturerExt: {
type: Object,
default: () => {}
},
......@@ -168,11 +168,6 @@
default: ''
}
},
mounted() {
if (JSON.stringify(this.formData.lecturerExt) === '{}') {
this.lecturerExt = this.formData.lecturerExt
}
},
methods: {
textClass(isFree) {
return {
......
......@@ -3,13 +3,13 @@
<div>
<el-form :inline="true" size="mini">
<el-form-item label="用户手机">
<el-input v-model="params.mobile"></el-input>
<el-input v-model="map.mobile"></el-input>
</el-form-item>
<el-form-item label="昵称">
<el-input v-model="params.nickname"></el-input>
<el-input v-model="map.nickname"></el-input>
</el-form-item>
<el-form-item label="状态:" >
<el-select v-model="params.statusId" class="auto-width" clearable filterable placeholder="状态" style="width: 85px">
<el-select v-model="map.statusId" class="auto-width" clearable filterable placeholder="状态" style="width: 85px">
<el-option
v-for="item in opts.statusIdList"
:key="item.code"
......@@ -100,8 +100,8 @@
layout="total, sizes, prev, pager, next, jumper"
:total="page.totalCount">
</el-pagination>
<edit :visible="ctrl.dialogVisible" :formData="formdata" :title="ctrl.dialogTitle" @close-cllback="closeCllback"></edit>
<view-user :visible="ctrl.viewVisible" :formData="viewData" @close-cllback="closeViewFind"></view-user>
<edit :visible="ctrl.dialogVisible" :formData="formData" :title="ctrl.dialogTitle" @close-cllback="closeCllback"></edit>
<view-user :visible="ctrl.viewVisible" :formData="formData" @close-cllback="closeViewFind"></view-user>
</div>
</template>
<script>
......@@ -112,7 +112,6 @@
components: { Edit, viewUser },
data() {
return {
params: {},
map: {},
ctrl: {
load: false,
......@@ -155,8 +154,7 @@
}
}]
},
formdata: {},
viewData: {},
formData: {},
gmtCreate: ''
}
},
......@@ -179,12 +177,12 @@
},
// 注册时间段查询条件
changeTime() {
if (this.gmtCreate.length) {
this.params.beginGmtCreate = this.dateToString(this.gmtCreate[0])
this.params.endGmtCreate = this.dateToString(this.gmtCreate[1])
if (this.gmtCreate !== null && this.gmtCreate.length) {
this.map.beginGmtCreate = this.dateToString(this.gmtCreate[0])
this.map.endGmtCreate = this.dateToString(this.gmtCreate[1])
} else {
this.params.beginGmtCreate = ''
this.params.endTime = ''
this.map.beginGmtCreate = ''
this.map.endGmtCreate = ''
}
},
dateToString(date) {
......@@ -204,13 +202,12 @@
},
// 重置查询条件
handleReset() {
this.params = {}
this.userExtList()
this.reload()
},
// 分页列出用户信息
userExtList() {
this.ctrl.load = true
userApi.userExtList(this.params, this.page.pageCurrent, this.page.pageSize).then(res => {
userApi.userExtList(this.map, this.page.pageCurrent, this.page.pageSize).then(res => {
this.list = res.data.list
this.page.pageCurrent = res.data.pageCurrent
this.page.totalCount = res.data.totalCount
......@@ -220,20 +217,15 @@
this.ctrl.load = false
})
},
textClass(userType) {
return {
c_red: userType === 0,
c_blue: userType === 2
}
},
// 关闭编辑弹窗回调
closeCllback() {
this.ctrl.dialogVisible = false;
this.formData = {}
this.ctrl.dialogVisible = false
this.reload()
},
// 跳页面操作
// 跳修改弹窗页面
handleEdit(row) {
this.formdata = row
this.formData = row
this.ctrl.dialogTitle = '编辑'
this.ctrl.dialogVisible = true
},
......@@ -271,10 +263,11 @@
}
})
},
// 查看弹窗
handleView(id) {
this.ctrl.load = true
userApi.userExtView({ id: id }).then(res => {
this.viewData = res.data
this.formData = res.data
this.ctrl.load = false
}).catch(() => {
this.ctrl.load = false
......@@ -283,12 +276,20 @@
},
// 关闭查看弹窗回调
closeViewFind() {
this.ctrl.viewVisible = false;
this.formData = {}
this.ctrl.viewVisible = false
},
// 刷新当前页面
reload() {
this.page.pageCurrent = 1
this.map = {}
this.gmtCreate = ''
this.userExtList()
},
textClass(userType) {
return {
c_red: userType === 0,
c_blue: userType === 2
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册