Commit cd8c7626 authored by 黄奎's avatar 黄奎

页面修改

parent 5ed2eafc
...@@ -90,15 +90,14 @@ ...@@ -90,15 +90,14 @@
background: #F0F2F5 !important; background: #F0F2F5 !important;
border: 0; border: 0;
} }
</style> </style>
<template> <template>
<div class="schedulVisit"> <div class="schedulVisit">
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="stickycreatInsertStr-column-table schedul_Vtable" separator="none" :data="data" :columns="columns" class="stickycreatInsertStr-column-table schedul_Vtable" separator="none" :data="data" :columns="columns"
row-key="name" :visible-columns="visibleColumns"> row-key="name">
<template v-slot:top="props"> <template>
<div class="fangkeTitle" ref="fkdj">访客登记</div> <div class="fangkeTitle" ref="fkdj">访客登记</div>
<span class="fangkeNumb">{{data.length}}</span> <span class="fangkeNumb">{{data.length}}</span>
<div class="visit_Date"> <div class="visit_Date">
...@@ -157,28 +156,9 @@ ...@@ -157,28 +156,9 @@
</el-popover> </el-popover>
</div> </div>
</template> </template>
<template v-slot:body-cell-VisitTimes="props">
<q-td :props="props">
<span>{{props.row.VisitTimes==0?'首次':props.row.VisitTimes}}</span>
</q-td>
</template>
<template v-slot:body-cell-VisitorStatus="props">
<q-td :props="props">
<img v-if="props.row.VisitorStatus==1" src="../../assets/images/normal.png" />
<img v-if="props.row.VisitorStatus==2" src="../../assets/images/vip.png" />
<img v-if="props.row.VisitorStatus==3" src="../../assets/images/blackList.png" />
</q-td>
</template>
<template v-slot:body-cell-Evaluate="props">
<q-td :props="props">
{{getRemarks(props.row.Evaluate)}}
</q-td>
</template>
<template v-slot:body-cell-Remark="props">
<q-td :props="props">
{{getRemarks(props.row.Remark)}}
</q-td>
</template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" /> :input="true" @input="changePage" />
...@@ -230,7 +210,8 @@ ...@@ -230,7 +210,8 @@
<q-btn flat size="xs" icon="edit" slot="reference" @click="EditVisitor(props.row.Id)" color="accent" <q-btn flat size="xs" icon="edit" slot="reference" @click="EditVisitor(props.row.Id)" color="accent"
style="font-weight:400" label="编辑" v-if="DutyAuthObj.isShowEdit" /> style="font-weight:400" label="编辑" v-if="DutyAuthObj.isShowEdit" />
</el-popover> </el-popover>
<q-btn flat size="xs" @click="getDetail(props.row)" icon="iconfont icon-View" color="accent" style="font-weight:400" label="详情" /> <q-btn flat size="xs" @click="getDetail(props.row)" icon="iconfont icon-View" color="accent"
style="font-weight:400" label="详情" />
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
...@@ -240,11 +221,8 @@ ...@@ -240,11 +221,8 @@
</template> </template>
<script> <script>
import { import {
queryVisitorPage, getStudentPage
queryVisitor, } from "../../api/school";
updateVisitor,
setVisitor,
} from '../../api/scheduling/schedu'
import { import {
getGuestBasicsEnumList getGuestBasicsEnumList
} from '../../api/sale/sale' } from '../../api/sale/sale'
...@@ -267,41 +245,35 @@ ...@@ -267,41 +245,35 @@
data() { data() {
return { return {
columns: [{ columns: [{
name: 'Name', name: 'StuName',
label: '姓名', label: '姓名',
required: true, required: true,
field: 'Name', field: 'StuName',
align: 'left' align: 'left'
}, },
{ {
name: 'Tel', name: 'StuSexStr',
field: 'Tel', field: 'StuSexStr',
label: '电话', label: '性别',
align: 'left', align: 'left',
}, },
{ {
name: 'WeChatNum', name: 'StuTel',
field: 'WeChatNum', field: 'StuTel',
label: '微信', label: '电话',
align: 'left' align: 'left',
},
{
name: 'CourseName',
label: '兴趣课程',
field: 'CourseName',
align: 'left'
}, },
{ {
name: 'StudyTime', name: 'StuStageName',
label: '学习时间', field: 'StuStageName',
field: 'StudyTime', label: '客户阶段',
align: 'left' align: 'left',
}, },
{ {
name: 'LevelType', name: 'CreateTimeStr',
label: '当前水平', field: 'CreateTimeStr',
field: 'LevelType', label: '创建时间',
align: 'left' align: 'left',
}, },
{ {
name: 'CreateByName', name: 'CreateByName',
...@@ -309,30 +281,12 @@ ...@@ -309,30 +281,12 @@
field: 'CreateByName', field: 'CreateByName',
align: 'left' align: 'left'
}, },
{
name: 'VisitorStatus',
label: '状态',
field: 'VisitorStatus',
align: 'left'
},
{
name: 'Evaluate',
label: '意向评估',
field: 'Evaluate',
align: 'left'
},
{ {
name: 'VisitTimes', name: 'VisitTimes',
label: '到访次数', label: '到访次数',
field: 'VisitTimes', field: 'VisitTimes',
align: 'left' align: 'left'
}, },
{
name: 'Remark',
label: '备注',
field: 'Remark',
align: 'left'
},
{ {
name: 'optioned', name: 'optioned',
label: '操作', label: '操作',
...@@ -346,7 +300,7 @@ ...@@ -346,7 +300,7 @@
pageIndex: 1, pageIndex: 1,
pageSize: 5, pageSize: 5,
rowsPerPage: 5, rowsPerPage: 5,
PlanId: 0, IsQueryMyStu: 1,
KeyWords: "", KeyWords: "",
}, },
addMsg: { addMsg: {
...@@ -380,11 +334,7 @@ ...@@ -380,11 +334,7 @@
isShowAdd: true, //是否显示新增按钮【默认显示】 isShowAdd: true, //是否显示新增按钮【默认显示】
isShowEdit: true, //是否显示编辑按钮【默认显示】 isShowEdit: true, //是否显示编辑按钮【默认显示】
}, },
//表格可见列
visibleColumns: [
'Name', 'Tel', 'WeChatNum', 'CourseName', 'StudyTime', "LevelType",
"CreateByName", "VisitorStatus", "Evaluate", 'VisitTimes', 'Remark', 'optioned'
], //可见列
rules: { //表单必填验证 rules: { //表单必填验证
Name: [{ Name: [{
...@@ -423,8 +373,8 @@ ...@@ -423,8 +373,8 @@
trigger: 'blur' trigger: 'blur'
}] }]
}, },
sendObj:{}, sendObj: {},
isShowDetail:false isShowDetail: false
} }
}, },
...@@ -456,7 +406,7 @@ ...@@ -456,7 +406,7 @@
} }
}); });
}, },
submitForm2(addMsg2){ submitForm2(addMsg2) {
this.$refs[addMsg2].validate((valid) => { this.$refs[addMsg2].validate((valid) => {
if (valid) { if (valid) {
this.SaveVisitor(); this.SaveVisitor();
...@@ -501,7 +451,8 @@ ...@@ -501,7 +451,8 @@
//获取访客列表 //获取访客列表
getVisitoryPage() { getVisitoryPage() {
this.loading = true; this.loading = true;
queryVisitorPage(this.msg).then(res => { getStudentPage(this.msg).then(res => {
console.log("res", res)
this.loading = false this.loading = false
this.data = res.Data.PageData; this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount; this.pageCount = res.Data.PageCount;
...@@ -548,7 +499,7 @@ ...@@ -548,7 +499,7 @@
this.addMsg.VisitorStatus = ''; this.addMsg.VisitorStatus = '';
this.addMsg.Evaluate = ""; this.addMsg.Evaluate = "";
this.addMsg.Remark = ""; this.addMsg.Remark = "";
this.$refs.addMsg1.resetFields(); this.$refs.addMsg1.resetFields();
}, },
//保存 //保存
SaveVisitor() { SaveVisitor() {
...@@ -558,32 +509,30 @@ ...@@ -558,32 +509,30 @@
this.isShowVform = false; this.isShowVform = false;
this.getVisitoryPage(); this.getVisitoryPage();
this.clearAddMsg(); this.clearAddMsg();
this.$refs.addMsg1.resetFields(); this.$refs.addMsg1.resetFields();
this.$refs.addMsg2.resetFields(); this.$refs.addMsg2.resetFields();
}) })
}, },
//过滤备注显示 //过滤备注显示
getRemarks(remark){ getRemarks(remark) {
if(remark.length>10){ if (remark.length > 10) {
return remark.substring(0,10)+'...'; return remark.substring(0, 10) + '...';
}else{ } else {
return remark; return remark;
} }
}, },
//获取详情 //获取详情
getDetail(obj){ getDetail(obj) {
this.sendObj = obj; this.sendObj = obj;
this.isShowDetail=true; this.isShowDetail = true;
}, },
//关闭 //关闭
closeDetail(){ closeDetail() {
this.isShowDetail=false; this.isShowDetail = false;
} }
} }
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style>
</style> \ No newline at end of file
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