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

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

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