Commit 34a6cc1f authored by 黄奎's avatar 黄奎

学员跟进调整

parent c59efe75
......@@ -778,4 +778,16 @@ export function GetStudentCoursePage(data) {
method: 'post',
data
})
}
/**
* 获取学员电话关联联系人
*/
export function getStuTelType()
{
return request({
url: '/User/GetStuTelType',
method: 'post',
data:{}
})
}
\ No newline at end of file
......@@ -800,5 +800,35 @@ export function RemoveStudentAdvisorConfig(data) {
});
}
/**
* 获取学员配置意向度
*/
export function getStuPurposeList(data) {
return request({
url: '/StudentStat/GetStudentConfigList',
method: 'post',
data
});
}
/**
* 根据Id删除学员配置意向度
*/
export function removeStuPurpose(data) {
return request({
url: '/StudentStat/RemoveStudentConfig',
method: 'post',
data
});
}
/**
* 新增修改学员配置意向度
*/
export function saveStuPurpose(data) {
return request({
url: '/StudentStat/SetStudentConfig',
method: 'post',
data
});
}
......@@ -26,7 +26,7 @@
.stage_label {
color: #606266;
flex-shrink: 0;
width: 65px;
width: 92px;
text-align: right;
}
......@@ -74,6 +74,7 @@
width: 100%;
overflow: hidden;
}
</style>
<template>
<div>
......@@ -129,6 +130,17 @@
</div>
</div>
</div>
<div class="customer_info_component">
<div class="customer_info_Stage">
<div class="stage_label">
<span class="student_require">*</span>电话关联人员
</div>
<div class="stage_value">
<q-select filled v-model="customObj.TelType" style="width:185px" dense :options="TelTypeList"
option-label="Name" option-value="Id" emit-value map-options />
</div>
</div>
</div>
<div class="customer_info_component" v-if="BelongType != 3">
<div class="customer_info_Stage">
<div class="stage_label">
......@@ -265,7 +277,8 @@
</div>
</div>
</div>
<div class="customer_info_component">
<!--2024-08-22 HK 注释-->
<!-- <div class="customer_info_component">
<div class="customer_info_Stage">
<div class="stage_label">
客户需求
......@@ -275,7 +288,7 @@
:disable="noEdit" option-label="Name" option-value="Id" emit-value map-options label="客户需求" />
</div>
</div>
</div>
</div> -->
<div class="customer_info_component">
<div class="customer_info_Stage">
<div class="stage_label">
......@@ -283,22 +296,16 @@
</div>
<div class="stage_value row items-center">
<div class="q-pr-lg text-blue row items-center" v-if="customObj.FileVoucher">
<el-image
v-if="customObj.FileVoucher.indexOf('.jpg')!=-1||customObj.FileVoucher.indexOf('.JPG')!=-1
<el-image v-if="customObj.FileVoucher.indexOf('.jpg')!=-1||customObj.FileVoucher.indexOf('.JPG')!=-1
||customObj.FileVoucher.indexOf('.png')!=-1||customObj.FileVoucher.indexOf('.PNG')!=-1"
style="height: 30px"
:src="customObj.FileVoucher"
:preview-src-list="[customObj.FileVoucher]"
:z-index="9999999"
fit="cover">
style="height: 30px" :src="customObj.FileVoucher" :preview-src-list="[customObj.FileVoucher]"
:z-index="9999999" fit="cover">
</el-image>
<a v-else :href="customObj.FileVoucher" target="_blank" rel="noopener noreferrer"
style="color:inherit;">
查看
</a>
<a v-else :href="customObj.FileVoucher" target="_blank" rel="noopener noreferrer" style="color:inherit;">
查看
</a>
</div>
<el-upload :before-upload="uploadVisitTableFile" :multiple="false"
action="" :show-file-list="false">
<el-upload :before-upload="uploadVisitTableFile" :multiple="false" action="" :show-file-list="false">
<q-btn color="primary" size="xs" unelevated label="上传">
<i class="el-icon-upload q-pl-xs"></i>
</q-btn>
......@@ -370,7 +377,8 @@
GetStudentTypeList,
getStudentDorpDownList,
GetNeedsList,
SetStudentVoucher,//上传到访表
SetStudentVoucher, //上传到访表
getStuTelType, //获取关系人下拉列表
} from "../../../api/school/index";
import {
getGuestBasicsEnumList,
......@@ -446,7 +454,8 @@
StuType: "", //客户类型
StuNeeds: 0, //客户需求
StuTel: "", //显示使用
FileVoucher: ""
FileVoucher: "",
TelType: 4, //电话关联人员
},
//日语基础列表
basicList: [],
......@@ -476,6 +485,7 @@
noEdit: false, //是否可以修改编辑客户信息
isHaveOrder: false, //学员是否有订单
userInfo: {}, //当前登录人员
TelTypeList: [], //学员关联联系人
};
},
created() {
......@@ -492,6 +502,7 @@
this.getCustomTypeList();
this.getStudentDorpDown();
this.getGetNeedsList();
this.queryStuTelType();
if (this.saveObj) {
if (this.saveObj.StuId > 0) {
......@@ -509,6 +520,11 @@
}
},
methods: {
queryStuTelType() {
getStuTelType().then(res => {
this.TelTypeList = res.Data;
});
},
UploadImage(file) {
UploadSelfFile("SetStudentVoucher", files, res => {
if (res.Code == 1) {
......@@ -540,10 +556,10 @@
UploadSelfFile("FileVoucher", files, res => {
if (res.Code == 1) {
this.customObj.FileVoucher = res.FileUrl
if(this.customObj.StuId>0){
if (this.customObj.StuId > 0) {
this.SetStudentVoucher()
}
}else{
} else {
this.$message.error('上传文件失败,请重新上传');
}
});
......@@ -555,15 +571,15 @@
}
});
},
SetStudentVoucher(){
SetStudentVoucher() {
let msg = {
StuId: this.customObj.StuId,
FileVoucher: this.customObj.FileVoucher
}
SetStudentVoucher(msg).then(res => {
if(res.Code==1){
if (res.Code == 1) {
this.$message.success('上传到访表成功')
}else{
} else {
this.$message.success('上传到访表失败')
}
})
......@@ -683,7 +699,7 @@
}
});
},
//获取员工列表
getEmployeeList() {
queryEmployee({
......@@ -832,6 +848,7 @@
this.customObj.StuNeeds = tempDate.StuNeeds;
this.customObj.StuTel = tempDate.StuTel;
this.customObj.FileVoucher = tempDate.FileVoucher;
this.customObj.TelType = tempDate.TelType;
//有订单
if (tempDate.OrderCount && tempDate.OrderCount > 0) {
this.isHaveOrder = true;
......@@ -873,10 +890,12 @@
},
}
};
</script>
<style scoped>
::v-deep .el-input__inner {
background: transparent;
border: none;
}
</style>
\ No newline at end of file
</style>
......@@ -54,6 +54,7 @@
height: 40px;
background-color: rgb(238, 238, 239);
}
</style>
<template>
<div class="stuList" :style="{ height: height }">
......@@ -77,8 +78,8 @@
<q-btn color="accent" class="q-mr-md" size="sm" icon="swap_horiz" label="转留学"
:disable="selection.length === 0" @click="transferAbroad" />
<q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="新增学员" @click="EditStudent(null)" />
<q-btn v-if="authObj && authObj.isShowDownload&&IsDownLoadStu()" color="accent" class="q-mr-md" size="sm" icon="download"
label="下载" @click="downloadStudent" />
<q-btn v-if="authObj && authObj.isShowDownload&&IsDownLoadStu()" color="accent" class="q-mr-md" size="sm"
icon="download" label="下载" @click="downloadStudent" />
</div>
<div class="page-option" v-if="pushMode">
<q-btn color="accent" unelevated class="q-mr-md" size="sm" icon="swap_horiz" label="转交"
......@@ -245,14 +246,12 @@
<div>
<template v-if="isInvite">
<q-toggle v-model="props.row.IsSureConsultTime" :false-value="0" :true-value="1"
@input="setInvite(props.row)"/>
@input="setInvite(props.row)" />
<q-tooltip>{{props.row.IsSureConsultTime?'确认邀约咨询30分钟以上':'确认邀约咨询30分钟以上'}}</q-tooltip>
</template>
<span v-else class="q-pr-sm text-grey-7">
<q-icon v-if="props.row.IsSureConsultTime" name="iconfont icon-yiyaoyue" size="20px"
color="primary"/>
<q-icon v-else name="iconfont icon-weiyaoyue" size="20px"
color="grey-5"/>
<q-icon v-if="props.row.IsSureConsultTime" name="iconfont icon-yiyaoyue" size="20px" color="primary" />
<q-icon v-else name="iconfont icon-weiyaoyue" size="20px" color="grey-5" />
</span>
</div>
<span>{{props.row.CreateByName}}</span>
......@@ -295,7 +294,9 @@
import {
SetStudentSureConsult, //邀约
} from "../../../api/school/index";
import { date } from 'quasar'
import {
date
} from 'quasar'
export default {
props: {
......@@ -413,12 +414,12 @@
field: "WeChatNo",
align: "left"
},
{
name: "StuTypeName",
label: "客户类型",
field: "StuTypeName",
align: "left"
},
// {
// name: "StuTypeName",
// label: "客户类型",
// field: "StuTypeName",
// align: "left"
// },
{
name: "StuStageName",
label: "客户阶段",
......@@ -431,12 +432,12 @@
field: "StuNeedsName",
align: "left"
},
{
name: "AdvisorExpectDate",
label: "期望达成协议日期",
field: "AdvisorExpectDate",
align: "left"
},
// {
// name: "AdvisorExpectDate",
// label: "期望达成协议日期",
// field: "AdvisorExpectDate",
// align: "left"
// },
{
name: "AdvisorStatusName",
label: "目前状态",
......@@ -503,12 +504,12 @@
field: "CreateTimeStr",
align: "left"
},
// {
// name: "IsSureConsultTime",
// label: "是否邀约",
// align: "left",
// field: "IsSureConsultTime"
// },
{
name: "MaxFollowTime",
label: "最近跟进时间",
field: "MaxFollowTime",
align: "left"
},
{
name: "CreateByName",
label: "负责人",
......@@ -578,7 +579,7 @@
...mapGetters(["logo", "name"])
},
methods: {
setInvite(row){
setInvite(row) {
let _this = this
this.$q.dialog({
title: '提示信息',
......@@ -588,7 +589,7 @@
ok: "确定",
cancel: "取消",
}).onOk(() => {
if(!_this.isInvite) return
if (!_this.isInvite) return
let msg = {
StuId: row.StuId,
IsSureConsultTime: row.IsSureConsultTime
......@@ -598,10 +599,11 @@
}
});
}).onCancel(() =>{
if(row.IsSureConsultTime==1){
}).onCancel(() => {
if (row.IsSureConsultTime == 1) {
return row.IsSureConsultTime = 0
}if(row.IsSureConsultTime==0){
}
if (row.IsSureConsultTime == 0) {
return row.IsSureConsultTime = 1
}
})
......@@ -819,8 +821,8 @@
transferOrder() {
let CreateTimeStr = date.formatDate(new Date(this.selection[0].CreateTimeStr), 'YYYY-MM-DD')
let CreateTimeStr2 = date.formatDate(new Date('2023-03-22'), 'YYYY-MM-DD')
if(CreateTimeStr>=CreateTimeStr2){
if(!this.selection[0].FileVoucher){
if (CreateTimeStr >= CreateTimeStr2) {
if (!this.selection[0].FileVoucher) {
this.$message.error('需先上传学员到访表')
return
}
......@@ -843,8 +845,8 @@
transferAbroad() {
let CreateTimeStr = date.formatDate(new Date(this.selection[0].CreateTimeStr), 'YYYY-MM-DD')
let CreateTimeStr2 = date.formatDate(new Date('2023-03-22'), 'YYYY-MM-DD')
if(CreateTimeStr>=CreateTimeStr2){
if(!this.selection[0].FileVoucher){
if (CreateTimeStr >= CreateTimeStr2) {
if (!this.selection[0].FileVoucher) {
this.$message.error('需先上传学员到访表')
return
}
......@@ -896,7 +898,7 @@
this.refreshStuList();
this.selection = [];
this.pushMode = false;
this.pushing=false;
this.pushing = false;
});
} else {
this.pushing = false;
......@@ -974,4 +976,5 @@
}
}
};
</script>
<template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 400px;max-width:400px;">
<q-card-section>
<div class="text-h6">{{optionTitle}}</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row wrap">
<q-input filled stack-label maxlength="50" :dense="false" v-model="objOption.ConfigName"
class="col-12 q-pb-lg" label="配置名称" />
</div>
<div class="row wrap">
<q-input filled stack-label maxlength="5" :dense="false" v-model="objOption.SortNum" class="col-12 q-pb-lg"
label="排序" @keyup.native="checkInteger(objOption,'SortNum')" />
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="saveStage" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
saveStuPurpose
} from '../../api/system/index'
export default {
props: {
saveObj: {
type: Object,
default: null
},
//类型(1-意向度)
ConfigType: {
type: Number,
default: 1,
}
},
data() {
return {
persistent: true,
saveLoading: false,
objOption: {
Id: 0,
ConfigType: 1,
ConfigName: '', //
SortNum: '' //编号
},
optionTitle: "",
}
},
mounted() {
this.initObj();
},
methods: {
//初始化表单
initObj() {
if (this.saveObj && this.saveObj.Id > 0) {
this.objOption.Id = this.saveObj.Id;
this.objOption.ConfigType = this.ConfigType;
this.objOption.ConfigName = this.saveObj.ConfigName;
this.objOption.SortNum = this.saveObj.SortNum;
if (this.ConfigType == 1) {
this.optionTitle = "修改【意向度】信息"
}
} else {
if (this.ConfigType == 1) {
this.optionTitle = "新增【意向度】信息"
}
this.objOption.Id = 0;
this.objOption.ConfigType = this.ConfigType;
this.objOption.ConfigName = '';
this.objOption.SortNum = '';
}
},
//关闭弹窗
closeSaveForm() {
this.$emit('close')
},
//保存菜单
saveStage() {
this.saveLoading = true
saveStuPurpose(this.objOption).then(res => {
this.saveLoading = false;
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success")
this.closeSaveForm()
}
})
}
}
}
</script>
<template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 400px;max-width:400px;">
<q-card-section>
<div class="text-h6">{{objOption.MenuId==0?'新增问卷调查信息':'修改问卷调查信息'}}</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="text-caption q-mb-lg q-px-md text-grey-6">问卷调查信息</div>
<div class="row wrap">
<q-input filled stack-label maxlength="40" :dense="false" v-model="objOption.Title" ref="Title"
class="col-12 q-pr-lg q-pb-lg" label="问卷名称" :rules="[val => !!val || '请填问卷名称']" />
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="setSurvey" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
saveEducationSurveyMain,
} from '../../api/common/common'
export default {
props: {
saveObj: {
type: Object,
default: null
}
},
data() {
return {
persistent: true,
objOption: {
Id: 0, //编号
Title: "", //问题名称
},
optionTitle: "",
saveLoading: false,
}
},
created() {
},
mounted() {
this.initObj()
},
methods: {
//初始化表单
initObj() {
if (this.saveObj && this.saveObj.Id > 0) {
this.objOption.Id = this.saveObj.Id;
this.objOption.Title = this.saveObj.Title;
this.optionTitle = "修改调查文件"
} else {
this.optionTitle = "新增调查问卷"
this.objOption.Id = 0;
}
},
//关闭弹窗
closeSaveForm() {
this.$emit('close')
this.persistent = false
},
//保存菜单
setSurvey() {
this.saveLoading = true;
saveEducationSurveyMain(this.objOption).then(res => {
this.saveLoading = false
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success")
this.closeSaveForm()
}).catch(() => {
this.saveLoading = false
})
}
},
}
</script>
......@@ -8,22 +8,27 @@
.Sysuser_Date .el-range-input {
background-color: transparent;
}
</style>
<template>
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @keyup.enter="resetSearch" @clear="resetSearch" dense clearable filled v-model="msg.StuName" label="昵称" maxlength="20" />
<q-input @keyup.enter="resetSearch" @clear="resetSearch" dense clearable filled v-model="msg.StuName"
label="昵称" maxlength="20" />
</div>
<div class="col-3">
<q-input @keyup.enter="resetSearch" @clear="resetSearch" dense clearable filled v-model="msg.StuTel" label="电话" maxlength="20" />
<q-input @keyup.enter="resetSearch" @clear="resetSearch" dense clearable filled v-model="msg.StuTel"
label="电话" maxlength="20" />
</div>
<div class="col-3">
<q-input @keyup.enter="resetSearch" @clear="resetSearch" dense clearable filled v-model="msg.QQ" label="QQ" maxlength="20" />
<q-input @keyup.enter="resetSearch" @clear="resetSearch" dense clearable filled v-model="msg.QQ" label="QQ"
maxlength="20" />
</div>
<div class="col-3">
<q-input @keyup.enter="resetSearch" @clear="resetSearch" dense clearable filled v-model="msg.WeChatNo" label="微信号" maxlength="20" />
<q-input @keyup.enter="resetSearch" @clear="resetSearch" dense clearable filled v-model="msg.WeChatNo"
label="微信号" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="resetSearch" dense filled v-model="msg.StuType" :options="customTypeList"
......@@ -40,10 +45,10 @@
</div>
<div class="col-3 Sysuser_Date">
<q-field filled dense>
 <template v-slot:control>
<el-date-picker v-model="dateArray" size="mini"  @change="resetSearch"  value-format="yyyy-MM-dd"
 type="daterange"  style="border:none;"  range-separator="至"  start-placeholder="开始时间"
 end-placeholder="结束时间" />    
<template v-slot:control>
<el-date-picker v-model="dateArray" size="mini" @change="resetSearch" value-format="yyyy-MM-dd"
type="daterange" style="border:none;" range-separator="至" start-placeholder="开始时间"
end-placeholder="结束时间" />
</template>
</q-field>
</div>
......@@ -58,18 +63,20 @@
</div>
<div class="col-3">
<q-select filled stack-label option-value="Id" @input="resetSearch" dense option-label="Name"
v-model="msg.AdvisorStatus" ref="AdvisorStatus" :options="consultList" clearable label="当前状态"
class="col-6 q-pb-lg" emit-value map-options />
v-model="msg.AdvisorStatus" ref="AdvisorStatus" :options="consultList" clearable label="当前状态" emit-value
map-options />
</div>
<div class="col-3">
<q-select filled stack-label option-value="Id" @input="resetSearch" dense option-label="Name"
v-model="msg.StuChannel" :options="channelList" clearable label="渠道" emit-value map-options />
</div>
<div class="col-3">
<q-select filled stack-label option-value="Id" @input="resetSearch" dense option-label="Name"
v-model="msg.StuChannel" :options="channelList" clearable label="渠道"
class="col-6 q-pb-lg" emit-value map-options />
v-model="msg.IsSureConsultTime" :options="visitList" clearable label="有效到访" emit-value map-options />
</div>
<div class="col-3">
<q-select filled stack-label option-value="Id" @input="resetSearch" dense option-label="Name"
v-model="msg.IsSureConsultTime" :options="visitList" clearable label="有效到访"
class="col-6 q-pb-lg" emit-value map-options />
v-model="msg.QOrderBy" :options="sortList" label="排序" emit-value map-options />
</div>
</div>
</div>
......@@ -144,7 +151,8 @@
CreateType: "", //来源类型
StuSourceId: "", //来源人编号
CategoryId: "", //同行编号
IsSureConsultTime: 0,// 0不限 1有效到访 2无效到访
IsSureConsultTime: 0, // 0不限 1有效到访 2无效到访
QOrderBy: 0, //排序
},
dateArray: [], //日期数组
pageCount: 0,
......@@ -158,10 +166,32 @@
Count: 0
},
consultList: [],
visitList: [
{Name:'不限',Id:0},
{Name:'只看有效到访',Id:1},
{Name:'只看无效到访',Id:2},
visitList: [{
Name: '不限',
Id: 0
},
{
Name: '只看有效到访',
Id: 1
},
{
Name: '只看无效到访',
Id: 2
},
],
//排序
sortList: [{
Id: 0,
Name: "默认"
},
{
Id: 1,
Name: "跟进时间倒序"
},
{
Id: 2,
Name: "跟进时间升序"
},
],
//渠道列表
channelList: [],
......@@ -298,7 +328,9 @@
},
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<template>
<div class="page-body">
<q-tabs v-model="tabCheck" narrow-indicator dense align="left" class="text-primary q-mb-sm">
<q-tab :ripple="false" :name="10" label="意向度"></q-tab>
<q-tab :ripple="false" :name="1" label="客户阶段" />
<q-tab :ripple="false" :name="2" label="客户类型" />
<q-tab :ripple="false" :name="3" label="学习目的" />
......@@ -20,6 +21,7 @@
<stuTarget v-if="tabCheck==7"></stuTarget>
<stuFlow v-if="tabCheck==8"></stuFlow>
<stuAbroad v-if="tabCheck==9"></stuAbroad>
<stupurpose v-if="tabCheck==10"></stupurpose>
</div>
</template>
<script>
......@@ -32,6 +34,8 @@
import stuTarget from "./stuTarget";
import stuFlow from "./stuFlow";
import stuAbroad from "./stuAbroad";
import stupurpose from "./stupurpose";
export default {
meta: {
title: "留学客户分配规则"
......@@ -45,12 +49,14 @@
stuDistributionRule,
stuTarget,
stuFlow,
stuAbroad
stuAbroad,
stupurpose
},
data() {
return {
tabCheck: 1
tabCheck: 10
};
}
};
</script>
\ No newline at end of file
</script>
<template>
<div class="page-body">
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table no-bottom-table" separator="none" :data="dataList" :columns="columns" row-key="name">
<template v-slot:top>
<div class="col-2 q-table__title">意向度</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增阶段" @click="addObj(null)" />
</div>
</template>
<template v-slot:body-cell-ConfigType="props">
<q-td :props="props">
<div>
<q-btn flat icon="edit" color="accent" style="font-weight:400" label="编辑" @click="addObj(props.row)" />
<q-btn flat icon="delete" color="negative" class="q-mr-xs" label="删除" @click="deletePurpose(props.row)" />
</div>
</q-td>
</template>
</q-table>
</div>
<stuconfig-form v-if="isShowStuConfigForm" :save-obj="stuConfigObj" @close="closeForm" @success="refreshPage">
</stuconfig-form>
</div>
</template>
<script>
import {
getStuPurposeList,
removeStuPurpose,
} from '../../api/system/index'
import stuconfigForm from '../../components/system/stuconfig-form'
export default {
meta: {
title: "意向度"
},
components: {
stuconfigForm
},
data() {
return {
columns: [{
name: '编号',
label: 'Id',
field: row => row.Id,
align: 'left'
}, {
name: 'ConfigName',
required: true,
label: '名称',
align: 'left',
field: row => row.ConfigName
},
{
name: 'SortNum',
required: true,
label: '排序',
align: 'left',
field: row => row.SortNum
},
{
name: 'ConfigType',
label: '操作',
field: 'ConfigType'
}
],
msg: {
rowsPerPage: 100
},
dataList: [],
loading: true,
isShowStuConfigForm: false,
stuConfigObj: {}
}
},
mounted() {
this.getList()
},
methods: {
deletePurpose(item) {
let delMsg = {
Id: item.Id
};
let tipMsg = `是否删除【` + item.ConfigName + `】?`
this.$q.dialog({
title: '提示信息',
message: tipMsg,
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
removeStuPurpose(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.getList();
}
})
}).onCancel(() => {
});
},
getList() {
this.loading = true;
getStuPurposeList({
ConfigType: 1
}).then(res => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data;
}
})
},
closeForm() {
this.isShowStuConfigForm = false
},
refreshPage() {
this.getList();
},
addObj(obj) {
if (obj) {
this.stuConfigObj = obj
} else {
this.stuConfigObj = null
}
this.isShowStuConfigForm = true;
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<template>
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" class="col-6 q-pr-lg q-pr-lg"
v-model="msg.Title" label="问卷名称" maxlength="20" @clear="resetSearch" />
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="none" :data="data" :columns="columns" row-key="name">
<template v-slot:top>
<div class="col-2 q-table__title">问卷调查管理</div>
<q-space />
<div class="page-option">
<q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="新增" @click="editSurveyMain(null)" />
</div>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="small" icon="edit" color="accent" style="font-weight: 400" label="编辑"
@click="editSurveyMain(props.row)" />
<q-btn flat size="small" icon="iconfont icon-View" color="accent" style="font-weight: 400" label="问卷详情"
@click="gotoSurveyQuestion(props.row)" />
<q-btn flat size="small" icon="edit" color="accent" style="font-weight: 400" label="生成二维码"
@click="createSurveyMainCode(props.row)">
<q-popup-proxy>
<div style="width: 185px; padding: 10px; border-radius: 8px">
<q-img :src="qrCodelUrl">
<template v-slot:loading>
<div class="text-subtitle1 text-white">Loading...</div>
</template>
</q-img>
</div>
</q-popup-proxy>
</q-btn>
<q-btn flat size="small" icon="delete" color="negative" style="font-weight: 400" label="删除"
@click="delSurveyMain(props.row)" />
</q-td>
</template>
</q-table>
<surveyMain-form v-if="isShowForm" :save-obj="surveyMainObjOption" @close="refreshPage" @success="refreshPage">
</surveyMain-form>
</div>
</div>
</template>
<script>
import {
queryEducationSurveyMainPage,
deleteEducationSurveyMain,
} from "../../api/common/common";
import {
queryQrCodeImage, //问卷调查二维码生成
} from "../../api/school/index";
import surveyMainForm from "../../components/system/surveyMain-form";
export default {
meta: {
title: "问卷调查管理",
},
components: {
surveyMainForm,
},
data() {
return {
currentUrl: "",
columns: [{
name: "Title",
label: "问卷名称",
field: "Title",
align: "left",
},
{
name: "QuestionCount",
label: "题目数量",
field: "QuestionCount",
align: "left",
},
{
name: "CreateByName",
label: "创建人",
field: "CreateByName",
align: "left",
},
{
name: "CreateTime",
label: "创建时间",
field: "CreateTime",
align: "left",
},
{
name: "UpdateTime",
label: "最近一次修改时间",
field: "UpdateTime",
align: "left",
},
{
name: "optioned",
label: "操作",
field: "Id",
},
],
data: [],
loading: true,
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
Title: "",
},
pageCount: 0,
isShowForm: false, //是否显示新增修改问卷
surveyMainObjOption: null,
qrCodelUrl: "",
};
},
mounted() {
this.currentUrl = this.$route.path;
this.resetSearch();
},
methods: {
//跳转到问卷问题列表
gotoSurveyQuestion(item) {
this.OpenNewUrl('/system/survey', {
MainId: item.Id
})
},
//点击生成二维码
createSurveyMainCode(item) {
let codeMsg = {
pUrl: "system/surveyStudent",
StudentId: 0,
StuName: "",
MainId: item.Id,
};
queryQrCodeImage(codeMsg).then((res) => {
if (res.Code == 1) {
this.qrCodelUrl = "data:image/png;base64," + res.Data;
codeMsg = {};
}
});
},
//删除问卷调查
delSurveyMain(item) {
var that = this;
this.$q
.dialog({
title: "提示信息",
message: "是否确定删除?",
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
})
.onOk(() => {
let delMsg = {
Id: item.Id,
};
deleteEducationSurveyMain(delMsg).then((res) => {
if (res.Code == 1) {
that.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "操作成功",
position: "top",
});
that.refreshPage();
}
});
});
},
//刷新页面
refreshPage() {
this.isShowForm = false;
this.surveyMainObjOption = null;
this.getSurveyMainPage();
},
//新增修改问卷
editSurveyMain(obj) {
if (obj != null) {
this.surveyMainObjOption = obj;
}
this.isShowForm = true;
},
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getSurveyMainPage();
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getSurveyMainPage();
},
//获取问卷分页列表
getSurveyMainPage() {
this.loading = true;
queryEducationSurveyMainPage(this.msg)
.then((res) => {
this.loading = false;
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
});
},
},
};
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
......@@ -97,7 +97,7 @@
},
data() {
return {
ActionStr: "/TeacherStatic/InitTeacherData",
ActionStr: "/CustomerStudent/TestPush",
parameterList: [{
Name: "",
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