Commit f748a398 authored by chenfenglei's avatar chenfenglei

清除缓存上移,老师列表limit100

parent c1f5e035
...@@ -122,6 +122,12 @@ ...@@ -122,6 +122,12 @@
<el-table-column <el-table-column
type="selection" type="selection"
width="55"> width="55">
</el-table-column>
<el-table-column
label="备注">
<template slot-scope="scope">
{{ scope.row.desc}}
</template>
</el-table-column> </el-table-column>
<el-table-column label="用户" className="f-c" width="150" sortable prop="user_id"> <el-table-column label="用户" className="f-c" width="150" sortable prop="user_id">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -200,12 +206,6 @@ ...@@ -200,12 +206,6 @@
{{ scope.row.weight}} {{ scope.row.weight}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="备注">
<template slot-scope="scope">
{{ scope.row.desc}}
</template>
</el-table-column>
<el-table-column label="操作" width="320"> <el-table-column label="操作" width="320">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="warning" size="mini" @click="editPrivilege(scope.row)">编辑</el-button> <el-button type="warning" size="mini" @click="editPrivilege(scope.row)">编辑</el-button>
......
...@@ -2,19 +2,22 @@ ...@@ -2,19 +2,22 @@
<div class="head-index"> <div class="head-index">
<img class="logo" :src="iconUrl" @click="toHome"/>{{$store.state.userName}} <img class="logo" :src="iconUrl" @click="toHome"/>{{$store.state.userName}}
<div class="fl-r"> <div class="fl-r">
<el-button round size="mini" class="edit-btn" @click="dialogUpdate=true">修改密码 </el-button>
<el-button round size="mini" class="edit-btn" @click="logOut">退出登录 </el-button>
<el-dropdown> <el-dropdown>
<el-button round size="mini" class="edit-password" >账号管理 <i class="el-icon-arrow-down el-icon--right"></i></el-button> <el-button round size="mini" class="edit-btn" >工具管理 <i class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="dialogVisible=true">修改密码</el-dropdown-item> <el-dropdown-item @click.native="entranceObj.show=true">无需登录入口</el-dropdown-item>
<el-dropdown-item @click.native="logOut">退出登录</el-dropdown-item> <el-dropdown-item @click.native="qrcodeObj.show=true">生成二维码</el-dropdown-item>
<el-dropdown-item @click.native="linkObj.show=true">生成短链接</el-dropdown-item>
<el-dropdown-item @click.native="userObj.show=true">清除缓存</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<!-- <el-button round size="mini" style="clear:both" @click="logOut">退出登录</el-button> -->
</div> </div>
<el-dialog <el-dialog
title="修改密码" title="修改密码"
:visible.sync="dialogVisible" :visible.sync="dialogUpdate"
center center
width="400px"> width="400px">
<el-form ref="ruleForm2" label-width="80px" :model="ruleForm2" :rules="rules2"> <el-form ref="ruleForm2" label-width="80px" :model="ruleForm2" :rules="rules2">
...@@ -29,146 +32,171 @@ ...@@ -29,146 +32,171 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogUpdate = false">取 消</el-button>
<el-button type="primary" @click="changePass">确 定</el-button> <el-button type="primary" @click="changePass">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<clear-cache :userObj="userObj" />
<entrance :entranceObj="entranceObj" />
<get-link :linkObj="linkObj" />
<getqr-code :qrcodeObj="qrcodeObj" />
</div> </div>
</template> </template>
<script> <script>
import {logoutApi,editAdminPasswordApi} from "../../service/api"; import clearCache from "./other/clearCache";
import iconUrl from '../../assets/logos.png' import entrance from "./other/entrance";
import cookie from '../../util/cookie' import getLink from "./other/getLink";
import md5 from 'js-md5'; import getqrCode from "./other/getqrCode";
export default { import { logoutApi, editAdminPasswordApi } from "../../service/api";
import iconUrl from "../../assets/logos.png";
import cookie from "../../util/cookie";
import md5 from "js-md5";
export default {
name: "headIndex", name: "headIndex",
data(){ data() {
var validateOldPass = (rule, value, callback) => { var validateOldPass = (rule, value, callback) => {
if (value === '') { if (value === "") {
callback(new Error('请输入密码')); callback(new Error("请输入密码"));
} else { } else {
callback(); callback();
} }
}; };
var validatePass = (rule, value, callback) => { var validatePass = (rule, value, callback) => {
if (value === '') { if (value === "") {
callback(new Error('请输入新密码')); callback(new Error("请输入新密码"));
} else { } else {
if (this.ruleForm2.checkPass !== '') { if (this.ruleForm2.checkPass !== "") {
this.$refs.ruleForm2.validateField('checkPass'); this.$refs.ruleForm2.validateField("checkPass");
} }
callback(); callback();
} }
}; };
var validatePass2 = (rule, value, callback) => { var validatePass2 = (rule, value, callback) => {
if (value === '') { if (value === "") {
callback(new Error('请再次输入密码')); callback(new Error("请再次输入密码"));
} else if (value !== this.ruleForm2.pass) { } else if (value !== this.ruleForm2.pass) {
callback(new Error('两次输入密码不一致!')); callback(new Error("两次输入密码不一致!"));
} else { } else {
callback(); callback();
} }
}; };
return { return {
iconUrl:iconUrl, userObj:{
dialogVisible:false, title:'清除缓存',
show:false
},
entranceObj:{
title:'无需登录入口',
show:false
},
linkObj:{
title:'生成短链接',
show:false
},
qrcodeObj:{
title:'生成二维码',
show:false
},
iconUrl: iconUrl,
dialogUpdate: false,
rules2: { rules2: {
pass: [ pass: [{ validator: validatePass, trigger: "blur" }],
{validator: validatePass, trigger: 'blur'} checkPass: [{ validator: validatePass2, trigger: "blur" }],
], oldPass: [{ validator: validateOldPass, trigger: "blur" }]
checkPass: [
{validator: validatePass2, trigger: 'blur'}
],
oldPass:[
{validator: validateOldPass, trigger: 'blur'}
]
}, },
ruleForm2:{ ruleForm2: {
oldPass:'', oldPass: "",
checkPass:'', checkPass: "",
pass:'' pass: ""
}
} }
};
},
components:{
clearCache,
entrance,
getLink,
getqrCode
}, },
methods:{ methods: {
a(){ a() {
console.log("aa") console.log("aa");
}, },
logOut(){ logOut() {
this.$confirm('确定退出系统?', '提示', { this.$confirm("确定退出系统?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning"
}).then(() => {
logoutApi().then(()=>{
cookie.delete('cc_token');
this.$store.dispatch('setToken','');
this.$store.dispatch('setUserName','');
window.location.href = '/#/login'
}) })
}).catch(() => { .then(() => {
logoutApi().then(() => {
cookie.delete("cc_token");
this.$store.dispatch("setToken", "");
this.$store.dispatch("setUserName", "");
window.location.href = "/#/login";
}); });
})
.catch(() => {});
}, },
changePass(){ changePass() {
this.$refs['ruleForm2'].validate((valid) => { this.$refs["ruleForm2"].validate(valid => {
if (valid) { if (valid) {
let json = { let json = {
passwd_new:md5(this.ruleForm2.pass), passwd_new: md5(this.ruleForm2.pass),
passwd_old:md5(this.ruleForm2.oldPass) passwd_old: md5(this.ruleForm2.oldPass)
}; };
editAdminPasswordApi(json).then(res=>{ editAdminPasswordApi(json).then(res => {
this.$alert('修改成功,请重新登录', '成功', { this.$alert("修改成功,请重新登录", "成功", {
confirmButtonText: '确定', confirmButtonText: "确定",
callback: action => { callback: action => {
logoutApi().then(()=>{ logoutApi().then(() => {
cookie.delete('cc_token'); cookie.delete("cc_token");
this.$store.dispatch('setToken',''); this.$store.dispatch("setToken", "");
this.$store.dispatch('setUserName',''); this.$store.dispatch("setUserName", "");
window.location.href = '/#/login' window.location.href = "/#/login";
}) });
} }
}); });
}) });
} else { } else {
console.log('error submit!!'); console.log("error submit!!");
return false; return false;
} }
}); });
}, },
toHome(){ toHome() {
this.$router.push({name:'first'}) this.$router.push({ name: "first" });
}
} }
} }
};
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@import "../../util/public"; @import "../../util/public";
.head-index{ .head-index {
height: 100%; height: 100%;
line-height: 60px; line-height: 60px;
.logo{ .logo {
height: 50px; height: 50px;
vertical-align: middle; vertical-align: middle;
margin-right: 20px; margin-right: 20px;
position: relative; position: relative;
top: -5px; top: -5px;
} }
} }
.btn-div{ .btn-div {
text-align: center; text-align: center;
} }
.edit-password{ .edit-btn {
margin-left: 10px; margin-left: 10px;
} }
.el-dropdown { .el-dropdown {
vertical-align: top; vertical-align: top;
} }
.el-dropdown + .el-dropdown { .el-dropdown + .el-dropdown {
margin-left: 15px; margin-left: 15px;
} }
.el-icon-arrow-down { .el-icon-arrow-down {
font-size: 12px; font-size: 12px;
} }
</style> </style>
<template> <template>
<div class="clearCache"> <el-dialog :title="userObj.title"
:visible.sync="userObj.show" center
width="800px">
<el-table <el-table
:data="cacheList" :data="cacheList"
style="width: 100%;"> style="width: 100%;">
...@@ -17,14 +19,22 @@ ...@@ -17,14 +19,22 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </el-dialog>
</template> </template>
<script> <script>
import {clearCacheListApi} from "../../service/api" import {clearCacheListApi} from "../../../service/api"
export default { export default {
name:"ClearCache",
props:[
'userObj'
],
data(){ data(){
return{ return{
cacheList:[{name:"主题列表",key:"course_relation_list"},{name:"课包列表",key:"course_category_list "},{name:"课包内容",key:"element_detail"}] cacheList:[
{name:"主题列表",key:"course_relation_list"},
{name:"课包列表",key:"course_category_list "},
{name:"课包内容",key:"element_detail"}
]
} }
}, },
methods:{ methods:{
......
<template>
<el-dialog :title="entranceObj.title"
:visible.sync="entranceObj.show" center
width="80%">
</el-dialog>
</template>
<script>
export default {
name:"entrance",
props:[
'entranceObj'
],
data(){
return{
}
},
methods:{
}
}
</script>
<style scoped lang="less">
</style>
<template>
<el-dialog :title="linkObj.title"
:visible.sync="linkObj.show" center
width="800px">
<el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
<el-form-item
label="输入链接"
prop="age"
:rules="[
{ required: true, message: '内容不能为空'}
]"
>
<el-input type="link" v-model.number="form.link" autocomplete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('form')">获取</el-button>
</el-form-item>
</el-form>
<div class="link_content" v-if="content.show">
<div class="content">
<el-input v-model="content.text" disabled></el-input>
</div>
<el-button type="primary" >复制链接</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: "getLink",
props: ["linkObj"],
data() {
return {
form: {
link: ""
},
content:{
show:true,
text:""
}
};
},
methods: {
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
alert("submit!");
} else {
console.log("error submit!!");
return false;
}
});
}
}
};
</script>
<style scoped lang="less">
.content{
height: 100px;
}
</style>
\ No newline at end of file
<template>
<el-dialog :title="qrcodeObj.title"
:visible.sync="qrcodeObj.show" center
width="800px">
<el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
<el-form-item
label="输入链接"
prop="age"
:rules="[
{ required: true, message: '内容不能为空'}
]"
>
<el-input type="link" v-model.number="form.link" autocomplete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('form')">获取</el-button>
</el-form-item>
</el-form>
<div class="link_content" v-if="content.show">
<div class="content">
</div>
<el-button type="primary" >下载二维码</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: "getqrCode",
props: ["qrcodeObj"],
data() {
return {
form: {
link: ""
},
content:{
show:true
}
};
},
methods: {
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
alert("submit!");
} else {
console.log("error submit!!");
return false;
}
});
}
}
};
</script>
<style scoped lang="less">
.content{
width: 300px;
height: 300px;
background: red;
margin: 0 auto;
}
</style>
\ No newline at end of file
<template>
<div>
</div>
</template>
<script>
export default {
name: "notBuyClass",
data(){
return{
}
},
mounted(){
},
methods:{
}
}
</script>
<style scoped>
</style>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="带班老师" prop="teacherList" v-if = "!form.id"> <el-form-item label="带班老师" prop="teacherList" v-if = "!form.id">
<el-select v-model="form.teacherList" multiple placeholder="请选择" @change="onTeacher1Change"> <el-select v-model="form.teacherList" placeholder="请选择" @change="onTeacher1Change">
<el-option <el-option
v-for="item in teacher1Options" v-for="item in teacher1Options"
:key="item.id" :key="item.id"
...@@ -236,7 +236,12 @@ ...@@ -236,7 +236,12 @@
}); });
}, },
getTeachers(){ getTeachers(){
getTeacherListApi().then((res)=>{ let json1 = {
page: 1,
limit: 100
};
getTeacherListApi(json1).then((res)=>{
console.log(res.list)
this.teacherOptions = res.list; this.teacherOptions = res.list;
this.teacher1Options = res.list; this.teacher1Options = res.list;
this.teacher2Options = res.list; this.teacher2Options = res.list;
...@@ -300,9 +305,9 @@ ...@@ -300,9 +305,9 @@
} }
}, },
mounted(){ mounted(){
// this.initPage() // this.initPage()
this.getGoodsOption();
this.getTeachers(); this.getTeachers();
this.getGoodsOption();
} }
} }
</script> </script>
......
...@@ -166,6 +166,7 @@ ...@@ -166,6 +166,7 @@
} }
}, },
editIndex(data){ editIndex(data){
console.log(data)
this.dialogObj={ this.dialogObj={
show:true, show:true,
type:1, type:1,
......
...@@ -754,3 +754,8 @@ const getJoinNumUrl = 'api/admin/class/teacher/group/num/'; ...@@ -754,3 +754,8 @@ const getJoinNumUrl = 'api/admin/class/teacher/group/num/';
export const getJoinNumApi = function (id) { export const getJoinNumApi = function (id) {
return Vue.prototype.$fetch(`${getJoinNumUrl}${id}`) return Vue.prototype.$fetch(`${getJoinNumUrl}${id}`)
}; };
// 未购买列表
// const getNotBuyUrl = '';
// export const getNotBuyApi = function (id) {
// return Vue.prototype.$fetch(`${getNotBuyUrl}${id}`)
// };
...@@ -177,6 +177,17 @@ export default [ ...@@ -177,6 +177,17 @@ export default [
component: e=>require(['@/components/coupon'],e), component: e=>require(['@/components/coupon'],e),
} }
}, },
{
value:'未购买列表',
routerName:'notBuyClass',
path:'/notBuyClass',
cover:'5-7',
router:{
path: '/notBuyClass',
name:'notBuyClass',
component: e=>require(['@/components/notBuyClass'],e),
}
},
{ {
value:'业绩排行', value:'业绩排行',
routerName:'achievement', routerName:'achievement',
...@@ -396,16 +407,6 @@ export default [ ...@@ -396,16 +407,6 @@ export default [
component: e=>require(['@/components/system/sysConfig'],e), component: e=>require(['@/components/system/sysConfig'],e),
} }
},{
value:'清除缓存',
routerName:'clearCache',
path:'/clearCache',
cover:'8-6',
router:{
path: '/clearCache',
name:'clearCache',
component: e=>require(['@/components/system/clearCache'],e),
}
}, },
{ {
value:'操作日志', value:'操作日志',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment