Commit 3c310c5a authored by 赵茹林's avatar 赵茹林

线上 [更新] 销售1、2、3部

parent 4112fa45
......@@ -89,6 +89,12 @@
padding: 0;
}
ol, ul {
margin: 0;
padding: 0;
list-style: none;
}
.el-collapse-item__arrow {
margin-left: 0;
}
......@@ -277,6 +283,38 @@
border-radius: 50%;
height: 50px;
}
.table-refresh-header {
display: inline-block;
cursor: help;
i {
color: #409eff;
}
}
.cell-link {
display: inline-block;
margin: 0 -6px;
padding: 0px 8px;
border-radius: 3px;
text-decoration: underline;
transition: color 240ms, background-color 240ms;
color: #444;
& + .cell-link {
margin-left: 0;
}
a {
color: #444;
transition: color 240ms, background-color 240ms;
}
&:hover {
background-color: #cce4ff;
color: #007fff;
a {
color: #007fff;
}
}
}
}
.update-time {
......@@ -288,4 +326,60 @@
font-size: 14px;
color: #606266;
}
.tabs-refresh {
margin-top: 10px;
&.el-tabs--card > .el-tabs__header {
margin-bottom: 10px;
/*margin-top: 10px;*/
margin-left: 10px;
/*padding-left: 10px;*/
/* background-color: #fff; */
/*padding-top: 10px;*/
padding-bottom: 1px;
}
&.el-tabs--card > .el-tabs__header .el-tabs__nav {
overflow: hidden;
}
&.el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
background-color: #fff;
}
}
// 修复样式
.el-tree-node__content {
.el-checkbox {
margin-right: 8px !important;
}
}
.custom-table {
margin-top: 20px;
width: 100%;
border: solid 1px #EBEEF5;
border-spacing: 0;
border-collapse: collapse;
thead {
color: #909399;
font-weight: 500;
th {
padding: 12px 10px;
border: 1px solid #EBEEF5;
}
}
tbody {
tr {
transition: background-color 240ms;
&:hover {
background-color: #F5F7FA;
}
td {
padding: 12px 10px;
border: 1px solid #EBEEF5;
}
}
}
}
</style>
......@@ -6,12 +6,10 @@
:visible.sync="show"
width="800px">
<div v-loading="loading">
<el-form ref="form" :model="form" :rules="rules" >
<el-form ref="form" :model="form" :rules="rules">
<el-row v-if="type===1">
<el-col :span="4"><label>ID</label></el-col>
<el-col :span="8">
{{teacherDetail.id}}
</el-col>
<el-col :span="8">{{teacherDetail.id}}</el-col>
<el-col :span="4"><label>创建时间</label></el-col>
<el-col :span="8">{{teacherDetail.created_at}}</el-col>
</el-row>
......@@ -19,7 +17,7 @@
<el-col :span="4"><label>昵称</label></el-col>
<el-col :span="8">
<span v-if="type === 1">{{teacherDetail.name}}</span>
<el-form-item v-if="type !== 1" prop="name">
<el-form-item v-if="type !== 1" prop="name">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
......@@ -61,10 +59,10 @@
<!--<el-input v-model="form.qr"></el-input>-->
<el-upload
action="/api/public/upload/zone"
list-type="picture-card"
:http-request="uploadFile"
:class="{disabled:!uploadShow}"
:before-upload="beforeAvatarUpload"
list-type="picture-card"
:file-list="imageList"
:on-success="handleAvatarSuccess"
:on-remove="handleRemove">
......@@ -84,46 +82,45 @@
<el-select v-model="form.squad" placeholder="请选择">
<el-option
v-for="i in 10"
:key="i"
:label="'T'+i"
:value="i">
:key="i+(index-1)*10"
:label="'T'+(i+(index-1)*10)"
:value="i+(index-1)*10">
</el-option>
</el-select>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" v-if="type !== 1">
<div slot="footer" class="dialog-footer" v-if="type !== 1">
<el-button @click="show = false">取 消</el-button>
<el-button type="primary" @click="sub">确 定</el-button>
</span>
</div>
</div>
</el-dialog>
</template>
<script>
import {getTeacherDetailApi,addTeacherApi,editTeacherApi,uploadFileApi} from "../../service/api";
import {getTeacherDetailApi, addTeacherApi, editTeacherApi, uploadFileApi} from "../../service/api";
export default {
name: "dialogObj",
props:[
'dialogObj'
props: [
'dialogObj',
'index'
],
data(){
return{
show:false,
data() {
return {
show: false,
id: '',
statusOption:[
{
label:'带班',
value:0
},
{
label:'不带班',
value:1
}
],
typeOption:[
statusOption: [{
label: '带班',
value: 0
}, {
label: '不带班',
value: 1
}],
/*typeOption:[
{
label:'老师',
value:0
......@@ -137,48 +134,44 @@
label:'市场',
value:3
}
],
loading:true,
type:0,
],*/
loading: true,
type: 0,
typeList: [],
title:'',
form:{
name:'',
type:0,
squad:'',
qr:'',
alias:'',
status:0,
media_id:''
title: '',
form: {
name: '',
type: 0,
squad: '',
qr: '',
alias: '',
status: 0,
media_id: ''
},
rules:{
name:[
{ required: true, message: '请输入名称', trigger: 'change' }
],
qr:[
{ required: true, message: '请输入二维码', trigger: 'change' }
]
rules: {
name: [ {required: true, message: '请输入名称', trigger: 'change'} ],
qr: [ {required: true, message: '请输入二维码', trigger: 'change'} ]
},
teacherDetail:{},
teacherDetail: {},
imageList: [],
uploadShow: true
}
},
methods:{
sub(){
if(this.imageList.length > 0){
this.form.qr = this.imageList[0].url;
methods: {
sub() {
if (this.imageList.length > 0) {
this.form.qr = this.imageList[0].url;
}
let json = {
name:this.form.name,
type:this.form.type,
qr:this.form.qr,
squad:this.form.squad,
alias:this.form.alias,
status:this.form.status,
name: this.form.name,
type: this.form.type,
qr: this.form.qr,
squad: this.form.squad,
alias: this.form.alias,
status: this.form.status,
media_id: this.form.media_id
};
switch(this.dialogObj.type){
switch (this.dialogObj.type) {
case 2:
this.$refs['form'].validate((valid) => {
if (valid) {
......@@ -195,8 +188,8 @@
break;
case 0:
this.$refs['form'].validate((valid) => {
if(valid){
addTeacherApi(json).then(res=>{
if (valid) {
addTeacherApi(json).then(res => {
this.$message({
type: 'success',
message: '新增成功!'
......@@ -209,29 +202,29 @@
break
}
},
beforeAvatarUpload(){
beforeAvatarUpload() {
this.uploadShow = false
},
handleRemove(){
handleRemove() {
this.uploadShow = true
},
handleAvatarSuccess(res) {
this.imageList = [{name:res.data.url,url:process.env.IMAGE_URL_HEAD + res.data.url}]
this.imageList = [{name: res.data.url, url: process.env.IMAGE_URL_HEAD + res.data.url}]
},
uploadFile(a) {
this.loading = true;
this.$store.dispatch('setProgress',{type:'new',id:a.file.uid});
this.$store.dispatch('setProgress', {type: 'new', id: a.file.uid});
this.fileUid = a.file.uid;
uploadFileApi({file:a.file,type:'all'}).then(res=>{
uploadFileApi({file: a.file, type: 'all'}).then(res => {
this.form.media_id = res.wechat_info ? res.wechat_info.media_id : '';
this.imageList = [{name:res.url,url:process.env.IMAGE_URL_HEAD + res.url}];
this.imageList = [{name: res.url, url: process.env.IMAGE_URL_HEAD + res.url}];
this.uploadShow = false;
this.loading = false;
this.$message({
type: 'success',
message: '上传成功!'
});
}).catch(()=>{
}).catch(() => {
this.loading = false;
})
},
......@@ -247,7 +240,8 @@
}
})
this.typeList = arr;
} else if (this.dialogObj.typeAdd == 0 || this.dialogObj.typeAdd == 2) {
// } else if (this.dialogObj.typeAdd == 0 || this.dialogObj.typeAdd == 2) {
} else {
let idx = this.dialogObj.teacherTypeList.findIndex(i => i.type == this.dialogObj.typeAdd);
if (idx > -1) {
this.typeList = [this.dialogObj.teacherTypeList[idx]]
......@@ -255,11 +249,11 @@
}
}
},
initDialog(){
initDialog() {
// console.log(this.dialogObj)
this.initType();
switch(this.dialogObj.type){
switch (this.dialogObj.type) {
case 0: // 添加
this.title = '新增';
this.show = this.dialogObj.show;
......@@ -269,7 +263,7 @@
this.form.qr = "";
this.form.squad = "";
this.form.type = String(this.dialogObj.typeAdd).indexOf(',')>-1 ? 3 : this.dialogObj.typeAdd;
this.form.type = String(this.dialogObj.typeAdd).indexOf(',') > -1 ? 3 : this.dialogObj.typeAdd;
this.form.status = 0;
this.imageList = [];
this.loading = false;
......@@ -308,48 +302,53 @@
}
},
watch:{
watch: {
'dialogObj.teacherTypeList'() {
console.log('listUpdate'); // todo 似乎无用?
this.initType();
},
dialogObj:{
dialogObj: {
handler: function () {
this.loading = true;
this.initDialog()
},
deep: true
},
show(value){
this.$emit("changeShow",value);
show(value) {
this.$emit("changeShow", value);
}
}
}
</script>
<style scoped lang="less">
.el-col{
.el-col {
min-height: 50px;
text-align: center;
margin-bottom: 20px;
line-height: 40px;
.el-select{
.el-select {
width: 100%;
}
img{
img {
width: 50px;
border-radius: 100px;
}
label{
label {
color: #5982e6;
}
}
.qr-img {
width: 148px !important;
border: none !important;
border-radius: 0 !important;
}
.dialog-footer{
.dialog-footer {
display: block;
text-align: center;
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -102,7 +102,7 @@ export default [{
value: '销售管理',
icon: 'icon-laoshi',
list: [{
value: '教师列表', // 老师用
value: '销售1部',
routerName: 'teacher',
path: '/teacher',
cover: '3-1',
......@@ -112,7 +112,7 @@ export default [{
component: e => require(['@/components/teacher'], e),
}
}, {
value: '增长运营列表', // 增长运营、TMK用
value: '销售2部', // 增长运营、TMK用
routerName: 'growth',
path: '/growth',
cover: '3-6',
......@@ -122,7 +122,7 @@ export default [{
component: e => require(['@/components/teacher/growth'], e),
}
}, {
value: '用户服务列表', // 用户服务用
value: '销售3部', // 用户服务用
routerName: 'userservice',
path: '/userservice',
cover: '3-7',
......
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