初始化
This commit is contained in:
1055
src/views/survey/basedata/index.vue
Normal file
1055
src/views/survey/basedata/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
111
src/views/survey/cpnt/MultiDatePicker.vue
Normal file
111
src/views/survey/cpnt/MultiDatePicker.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<div class="multi-date-picker">
|
||||
<el-date-picker
|
||||
v-model="selectedDate"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
:picker-options="pickerOptions"
|
||||
@change="handleDateChange"
|
||||
>
|
||||
</el-date-picker>
|
||||
|
||||
<div class="selected-dates">
|
||||
<el-tag
|
||||
v-for="(date, index) in selectedDates"
|
||||
:key="index"
|
||||
closable
|
||||
@close="removeDate(index)"
|
||||
>
|
||||
{{ formatDate(date) }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'MultiDatePicker',
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedDate: null,
|
||||
selectedDates: [...this.value],
|
||||
pickerOptions: {
|
||||
disabledDate: (date) => {
|
||||
// 可选:禁用已选择的日期,避免重复
|
||||
return this.selectedDates.some(
|
||||
selected => this.isSameDay(selected, date)
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value(newVal) {
|
||||
this.selectedDates = [...newVal];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleDateChange(date) {
|
||||
if (!date) return;
|
||||
|
||||
// 检查是否已存在相同日期
|
||||
const isExist = this.selectedDates.some(
|
||||
selected => this.isSameDay(selected, date)
|
||||
);
|
||||
|
||||
if (!isExist) {
|
||||
this.selectedDates.push(date);
|
||||
this.emitUpdate();
|
||||
}
|
||||
|
||||
this.selectedDate = null; // 清空选择器以便再次选择
|
||||
},
|
||||
removeDate(index) {
|
||||
this.selectedDates.splice(index, 1);
|
||||
this.emitUpdate();
|
||||
},
|
||||
isSameDay(date1, date2) {
|
||||
return (
|
||||
date1.getFullYear() === date2.getFullYear() &&
|
||||
date1.getMonth() === date2.getMonth() &&
|
||||
date1.getDate() === date2.getDate()
|
||||
);
|
||||
},
|
||||
formatDate(date) {
|
||||
return date.toLocaleDateString('zh-CN');
|
||||
},
|
||||
emitUpdate() {
|
||||
// 按照日期排序
|
||||
this.selectedDates.sort((a, b) => a - b);
|
||||
// 触发更新事件
|
||||
this.$emit('input', [...this.selectedDates]);
|
||||
this.$emit('change', [...this.selectedDates]);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.multi-date-picker {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.selected-dates {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.el-tag {
|
||||
margin-right: 5px;
|
||||
}
|
||||
</style>
|
||||
516
src/views/survey/index.vue
Normal file
516
src/views/survey/index.vue
Normal file
@@ -0,0 +1,516 @@
|
||||
<!-- 代码已包含 CSS:使用 TailwindCSS , 安装 TailwindCSS 后方可看到布局样式效果 -->
|
||||
|
||||
<template>
|
||||
<div class="dashboard">
|
||||
<!-- 顶部标题 -->
|
||||
<div class="header">
|
||||
<div class="main-title">学生在校查寝情况分析</div>
|
||||
<div class="title-divider"></div>
|
||||
<div class="time">{{ currentTime }}</div>
|
||||
</div>
|
||||
<!-- 核心数据展示区 -->
|
||||
<div class="core-data-area">
|
||||
<div v-for="(item, index) in coreData" :key="index" class="stat-card">
|
||||
<div class="stat-label">{{ item.label }}</div>
|
||||
<div class="stat-value">{{ item.value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 图表展示区 -->
|
||||
<div class="charts-area">
|
||||
<!-- 学院分布 -->
|
||||
<div class="chart-card">
|
||||
<div class="chart-title">各学院学生去向分布</div>
|
||||
<div ref="collegeChart" class="chart-content"></div>
|
||||
</div>
|
||||
<!-- 各学院应返校统计 -->
|
||||
<div class="chart-card">
|
||||
<div class="chart-title">各学院应返校统计</div>
|
||||
<div ref="returnChart" class="chart-content"></div>
|
||||
</div>
|
||||
<!-- 趋势图 -->
|
||||
<div class="chart-card">
|
||||
<div class="chart-title">各学院返校情况</div>
|
||||
<div ref="trendChart" class="chart-content"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 底部数据区 -->
|
||||
<div class="bottom-area">
|
||||
<!-- 实时动态 -->
|
||||
<div class="data-card">
|
||||
<div class="data-title">实时动态</div>
|
||||
<div class="realtime-logs">
|
||||
<transition-group name="fade" tag="div">
|
||||
<div v-for="(log, index) in realtimeLogs" :key="log" class="log-item">
|
||||
{{ log }}
|
||||
</div>
|
||||
</transition-group>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 异常统计 -->
|
||||
<div class="data-card">
|
||||
<div class="data-title">各学院未返校原因数量</div>
|
||||
<div ref="exceptionChart" class="chart-content-small"></div>
|
||||
</div>
|
||||
<!-- 实习统计 -->
|
||||
<div class="data-card">
|
||||
<div class="data-title">各学院实习人数统计</div>
|
||||
<div ref="timeChart" class="chart-content-small"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
currentTime: '',
|
||||
coreData: [
|
||||
{ label: '签到人数', value: '4578' },
|
||||
{ label: '请假人数', value: '234' },
|
||||
{ label: '离校登记人数', value: '567' },
|
||||
{ label: '返校登记人数', value: '512' },
|
||||
{ label: '未返校登记人数', value: '55' },
|
||||
{ label: '实习人数', value: '289' }
|
||||
],
|
||||
realtimeLogs: [
|
||||
'陈思远 于 2025-03-20 18:30 完成晚查寝签到',
|
||||
'林雨萱 于 2025-03-20 18:15 请假外出审批通过',
|
||||
'黄梓轩 于 2025-03-20 17:45 未按时返校',
|
||||
'赵雅芝 于 2025-03-20 17:30 已完成返校登记',
|
||||
'宋明阳 于 2025-03-20 17:15 晚归登记'
|
||||
]
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
updateTime() {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(now.getDate()).padStart(2, '0');
|
||||
const hours = String(now.getHours()).padStart(2, '0');
|
||||
const minutes = String(now.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(now.getSeconds()).padStart(2, '0');
|
||||
this.currentTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
// 初始化时间
|
||||
this.updateTime();
|
||||
setInterval(this.updateTime, 1000);
|
||||
|
||||
// 初始化学院分布图表
|
||||
const collegeChartInstance = echarts.init(this.$refs.collegeChart);
|
||||
collegeChartInstance.setOption({
|
||||
animation: false,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: ['离校人数', '留校人数'],
|
||||
textStyle: {
|
||||
color: '#8eb3e8'
|
||||
},
|
||||
right: 10,
|
||||
top: 0
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['计算机学院', '机械学院', '电子学院', '经管学院', '外语学院'],
|
||||
axisLabel: {
|
||||
color: '#8eb3e8',
|
||||
interval: 0,
|
||||
rotate: 30
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
color: '#8eb3e8'
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '离校人数',
|
||||
type: 'bar',
|
||||
stack: 'total',
|
||||
data: [456, 389, 423, 378, 345],
|
||||
itemStyle: {
|
||||
color: '#3498db'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '留校人数',
|
||||
type: 'bar',
|
||||
stack: 'total',
|
||||
data: [178, 156, 145, 167, 123],
|
||||
itemStyle: {
|
||||
color: '#e74c3c'
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// 初始化应返校统计图表
|
||||
const returnChartInstance = echarts.init(this.$refs.returnChart);
|
||||
returnChartInstance.setOption({
|
||||
animation: false,
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
right: 10,
|
||||
top: 'center',
|
||||
textStyle: {
|
||||
color: '#8eb3e8'
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '应返校统计',
|
||||
type: 'pie',
|
||||
radius: ['50%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#0c2b5a',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: 'outside',
|
||||
formatter: '{b}: {c}人',
|
||||
color: '#8eb3e8'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: 14,
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
data: [
|
||||
{ value: 1245, name: '计算机学院', itemStyle: { color: '#3498db' } },
|
||||
{ value: 986, name: '机械学院', itemStyle: { color: '#2ecc71' } },
|
||||
{ value: 867, name: '电子学院', itemStyle: { color: '#e74c3c' } },
|
||||
{ value: 756, name: '经管学院', itemStyle: { color: '#f1c40f' } },
|
||||
{ value: 543, name: '外语学院', itemStyle: { color: '#9b59b6' } }
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// 初始化趋势图表
|
||||
const trendChartInstance = echarts.init(this.$refs.trendChart);
|
||||
trendChartInstance.setOption({
|
||||
animation: false,
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: ['已返校', '未返校', '实习人数'],
|
||||
textStyle: {
|
||||
color: '#8eb3e8'
|
||||
},
|
||||
right: 10,
|
||||
top: 0
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['计算机学院', '机械学院', '电子学院', '经管学院', '外语学院'],
|
||||
axisLabel: {
|
||||
color: '#8eb3e8',
|
||||
interval: 0,
|
||||
rotate: 30
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
color: '#8eb3e8'
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '已返校',
|
||||
data: [1156, 1023, 978, 945, 867],
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: '#2ecc71'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '未返校',
|
||||
data: [89, 67, 78, 56, 45],
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: '#e74c3c'
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
// 初始化异常统计图表
|
||||
const exceptionChartInstance = echarts.init(this.$refs.exceptionChart);
|
||||
exceptionChartInstance.setOption({
|
||||
animation: false,
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c}人'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
right: 10,
|
||||
top: 'center',
|
||||
textStyle: {
|
||||
color: '#8eb3e8',
|
||||
fontSize: 12
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
type: 'pie',
|
||||
radius: '65%',
|
||||
center: ['40%', '50%'],
|
||||
data: [
|
||||
{ value: 15, name: '路上' },
|
||||
{ value: 45, name: '病假' },
|
||||
{ value: 12, name: '无票' },
|
||||
{ value: 23, name: '无课请事假延时' },
|
||||
{ value: 34, name: '事假' },
|
||||
{ value: 8, name: '红白事' },
|
||||
{ value: 18, name: '考试' },
|
||||
{ value: 25, name: '参赛' },
|
||||
{ value: 16, name: '兵检或役前训练' },
|
||||
{ value: 5, name: '退学或休学' }
|
||||
],
|
||||
itemStyle: {
|
||||
borderRadius: 6,
|
||||
borderColor: '#0c2b5a',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
// 初始化实习统计图表
|
||||
const timeChartInstance = echarts.init(this.$refs.timeChart);
|
||||
timeChartInstance.setOption({
|
||||
animation: false,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
formatter: '{b}: {c}人'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['计算机学院', '机械学院', '电子学院', '经管学院', '外语学院'],
|
||||
axisLabel: {
|
||||
color: '#8eb3e8',
|
||||
interval: 0,
|
||||
rotate: 30
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '人数',
|
||||
nameTextStyle: {
|
||||
color: '#8eb3e8'
|
||||
},
|
||||
axisLabel: {
|
||||
color: '#8eb3e8'
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '实习人数',
|
||||
data: [89, 76, 65, 45, 14],
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: '#3498db'
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
color: '#8eb3e8'
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
.dashboard {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #061c3d 0%, #0a2a4d 100%);
|
||||
color: #fff;
|
||||
padding: 32px;
|
||||
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 2.2rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.2em;
|
||||
margin-bottom: 8px;
|
||||
text-shadow: 0 0 8px #3b82f6, 0 0 16px #1e40af;
|
||||
}
|
||||
|
||||
.title-divider {
|
||||
width: 128px;
|
||||
height: 6px;
|
||||
background: linear-gradient(90deg, #60a5fa 0%, #2563eb 50%, #60a5fa 100%);
|
||||
border-radius: 3px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 1.1rem;
|
||||
color: #a5b4fc;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.core-data-area {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(6, 1fr);
|
||||
gap: 24px;
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
border: 1.5px solid #2563eb;
|
||||
background: linear-gradient(135deg, rgba(12, 43, 90, 0.95), rgba(24, 60, 108, 0.85));
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 4px 24px 0 rgba(36, 99, 235, 0.15);
|
||||
padding: 24px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
|
||||
.stat-card:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 1.1rem;
|
||||
color: #60a5fa;
|
||||
margin-bottom: 8px;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: #3b82f6;
|
||||
text-shadow: 0 0 6px #60a5fa, 0 0 12px #2563eb;
|
||||
}
|
||||
|
||||
.charts-area {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 24px;
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
|
||||
.chart-card {
|
||||
border: 1.5px solid #2563eb;
|
||||
background: linear-gradient(135deg, rgba(12, 43, 90, 0.95), rgba(24, 60, 108, 0.85));
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 4px 24px 0 rgba(36, 99, 235, 0.15);
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.chart-title {
|
||||
font-size: 1.1rem;
|
||||
color: #60a5fa;
|
||||
margin-bottom: 16px;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.chart-content {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.bottom-area {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.data-card {
|
||||
border: 1.5px solid #2563eb;
|
||||
background: linear-gradient(135deg, rgba(12, 43, 90, 0.95), rgba(24, 60, 108, 0.85));
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 4px 24px 0 rgba(36, 99, 235, 0.15);
|
||||
padding: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.data-title {
|
||||
font-size: 1.1rem;
|
||||
color: #60a5fa;
|
||||
margin-bottom: 16px;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.realtime-logs {
|
||||
overflow-y: auto;
|
||||
max-height: 200px;
|
||||
padding-right: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.log-item {
|
||||
font-size: 0.98rem;
|
||||
color: #c7d2fe;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #2563eb;
|
||||
}
|
||||
|
||||
.log-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.chart-content-small {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
402
src/views/survey/itinerary/index.vue
Normal file
402
src/views/survey/itinerary/index.vue
Normal file
@@ -0,0 +1,402 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="40px">
|
||||
<el-form-item label="学号" prop="stuNo">
|
||||
<el-input v-model="queryParams.stuNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="classId">
|
||||
<el-cascader placeholder="请选择班级" v-model="classVlue1" :show-all-levels="false" :options="ClassNameList"
|
||||
@change="handleChange1" clearable filterable>
|
||||
<template slot-scope="{ node, data }">
|
||||
<span>{{ data.label }}</span>
|
||||
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||
</template>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio v-model="statusModel" label="1">待审核</el-radio>
|
||||
<el-radio v-model="statusModel" label="2">已审核</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" icon="el-icon-edit" size="mini" :disabled="multiple"
|
||||
@click="handleUpdate">批量审核</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['survey:itinerary:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="itineraryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="returnSchoolId" />
|
||||
<el-table-column label="学号" align="center" prop="stuNo" />
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="班级" align="center" prop="className" />
|
||||
<el-table-column label="学院" align="center" prop="deptName" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||
<!-- <el-table-column label="紧急联系人" align="center" prop="emergencyContact" />
|
||||
<el-table-column label="紧急联系人电话" align="center" prop="emergencyContactPhone" />< -->
|
||||
<!-- <el-table-column label="所在校区" align="center" prop="schoolDistrict" />
|
||||
<el-table-column label="公寓楼" align="center" prop="apartment" />
|
||||
<el-table-column label="宿舍号" align="center" prop="room" /> -->
|
||||
<el-table-column label="计划返校时间" align="center" prop="scheduledReturnTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.scheduledReturnTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否到校" align="center" prop="reachSchoolStatus" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.reachSchoolStatus == '0' ? '否' : '是' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="家长姓名" align="center" prop="parentName" />
|
||||
<el-table-column label="家长电话" align="center" prop="parentPhone" />
|
||||
<el-table-column label="家长是否知晓" align="center" prop="know" />
|
||||
<!-- <el-table-column label="未返校原因分类" align="center" prop="absentSchoolType" />
|
||||
<el-table-column label="未返校详细原因" align="center" prop="absentSchoolRemark" /> -->
|
||||
<el-table-column label="到校定位" align="center" prop="attendSchoolGps" />
|
||||
<el-table-column label="到校时间" align="center" prop="attendSchoolTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.attendSchoolTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.status === '2'">已审核</el-tag>
|
||||
<el-tag type="info" v-if="scope.row.status === '1'">待审核</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">审核</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleDetails(scope.row)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!--学生假期返校详细对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
|
||||
<el-form ref="form" :disabled="!editable" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row :gutter="100">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="学号:">
|
||||
<span>{{ form.stuNo }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名:">
|
||||
<span>{{ form.name }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="班级:">
|
||||
<span>{{ form.className }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="学院:">
|
||||
<span>{{ form.deptName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话:">
|
||||
<span>{{ form.phone }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="紧急联系人:">
|
||||
<span>{{ form.emergencyContact }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="紧急联系人电话:">
|
||||
<span>{{ form.emergencyContactPhone }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所在校区:">
|
||||
<span>{{ form.schoolDistrict }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公寓楼:">
|
||||
<span>{{ form.apartment }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="宿舍号:">
|
||||
<span>{{ form.room }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计划返校时间:">
|
||||
<span>{{ form.scheduledReturnTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="家长姓名:">
|
||||
<span>{{ form.parentName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="家长电话:">
|
||||
<span>{{ form.parentPhone }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="家长是否知晓:">
|
||||
<span>{{ form.know }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="未返校详细原因:">
|
||||
<span>{{ form.absentSchoolRemark }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="到校定位:">
|
||||
<span>{{ form.attendSchoolGps }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="到校时间:">
|
||||
<span>{{ form.attendSchoolTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态:">
|
||||
<el-tag type="success" v-if="form.status === '2'">已审核</el-tag>
|
||||
<el-tag type="info" v-if="form.status === '1'">待审核</el-tag>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listItinerary, getItinerary, delItinerary, addItinerary, batchAuditItinerary } from "@/api/survey/itinerary";
|
||||
import { getClassName } from "@/api/stuCQS/basedata/student";
|
||||
import { getDeptName } from "@/api/system/dept";
|
||||
import StuPic from "@/views/basedata/private/StuPic";
|
||||
import Treeselect from '@riophae/vue-treeselect';
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css';
|
||||
export default {
|
||||
name: "Itinerary",
|
||||
components: {
|
||||
StuPic, Treeselect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusModel: '1',
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 学生假期返校表格数据
|
||||
itineraryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: '1',
|
||||
surveyId: null
|
||||
},
|
||||
dept_list: [],
|
||||
deptForm: {
|
||||
|
||||
},
|
||||
classVlue1: [],//班级搜索选择
|
||||
ClassNameList: [],//班级名称
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.listDept();
|
||||
this.getClassNameList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询学生假期返校列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listItinerary(this.queryParams).then(response => {
|
||||
this.itineraryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getClassNameList() {
|
||||
getClassName().then(res => {
|
||||
this.ClassNameList = res.data
|
||||
})
|
||||
},
|
||||
async listDept() {
|
||||
let res = await getDeptName();
|
||||
this.dept_list = [...res.data];
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
returnSchoolId: null,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: null,
|
||||
surveyId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.classId = this.classVlue1[2];
|
||||
this.queryParams.status = this.statusModel;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.classVlue1 = [],
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.returnSchoolId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加学生假期返校";
|
||||
},
|
||||
/** 审核学生假期返校 */
|
||||
handleUpdate(row) {
|
||||
const returnSchoolIds = row.returnSchoolId || this.ids;
|
||||
this.$modal.confirm('你确定要审核吗?').then(function () {
|
||||
return batchAuditItinerary(returnSchoolIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleDetails(row) {
|
||||
const returnSchoolId = row.returnSchoolId || this.id;
|
||||
getItinerary(returnSchoolId).then(response => {
|
||||
this.editable = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "查看学生返校详情";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.returnSchoolId != null) {
|
||||
updateItinerary(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addItinerary(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const returnSchoolIds = row.returnSchoolId || this.ids;
|
||||
this.$modal.confirm('是否确认删除学生假期返校编号为"' + returnSchoolIds + '"的数据项?').then(function () {
|
||||
return delItinerary(returnSchoolIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('survey/itinerary/export', {
|
||||
...this.queryParams
|
||||
}, `itinerary_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
339
src/views/survey/leave/FdyAll.vue
Normal file
339
src/views/survey/leave/FdyAll.vue
Normal file
@@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="120px">
|
||||
<el-form-item label="主题" prop="surveyName">
|
||||
<el-select clearable v-model="queryParams.surveyName" placeholder="请选择去向调查">
|
||||
<el-option v-for="item in surveyList" :key="item.surveyId" :value="item.surveyName"
|
||||
:label="item.surveyName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学号" prop="stuNo">
|
||||
<el-input v-model="queryParams.stuNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="className">
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预计离校日期" prop="willLeaveTime">
|
||||
<el-date-picker v-model="queryParams.willLeaveTime" type="date" placeholder="请选择预计离校日期"
|
||||
value-format="yyyy-MM-dd" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="itineraryList">
|
||||
<el-table-column label="#" align="center" prop="returnSchoolId" />
|
||||
<el-table-column label="主题" align="center" prop="surveyName" />
|
||||
<el-table-column label="学号" align="center" prop="stuNo" width="120" />
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="班级" align="center" prop="className" width="300" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" width="140" />
|
||||
<el-table-column label="是否离校" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isLeave == "1" ? "是" : "否" }}
|
||||
<div v-if="scope.row.isLeave == 1">{{ scope.row.isLeave == "1" && scope.row.isHome == "是" ? "已到家" :
|
||||
"未到家" }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态" align="center" prop="configType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sur_status" :value="scope.row.leaveStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view"
|
||||
@click="auditVClick(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="920px" append-to-body>
|
||||
<el-form ref="form" class="lookForm" size="mini" label-width="160px">
|
||||
<el-form-item label="是否通过">
|
||||
<el-select :disabled="true" v-model="form.leaveStatus" placeholder="请选择是否通过">
|
||||
<el-option label="通过" value="2"></el-option>
|
||||
<el-option label="打回" value="10"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="主题">
|
||||
<el-input v-model="form.surveyName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="学院">
|
||||
<el-input v-model="form.moreDeptName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级">
|
||||
<el-input v-model="form.className" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="学号">
|
||||
<el-input v-model="form.stuNo" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="form.name" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="宿舍">
|
||||
<el-input
|
||||
:value="form.campusName + '--' + form.parkName + '--' + form.buildingName + '--' + form.roomNo"
|
||||
readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话">
|
||||
<el-input v-model="form.phone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人">
|
||||
<el-input v-model="form.emergencyContact" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人电话">
|
||||
<el-input v-model="form.emergencyContactPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长姓名">
|
||||
<el-input v-model="form.famName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长电话">
|
||||
<el-input v-model="form.famPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长是否知晓">
|
||||
<el-input v-model="form.famKnow" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否离校">
|
||||
<el-input :value="form.isLeave == '1' ? '是' : '否'" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="去向地" v-if="form.isLeave == '1' && !isEmpty(form.willAddr)">
|
||||
<el-input :value="form.willAddr" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="预计离校时间" v-if="form.isLeave == '1'">
|
||||
<el-input :value="form.willLeaveTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否到家" v-if="form.isLeave == '1'">
|
||||
<el-input :value="form.isHome == '1' ? '是' : '否'" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="form.isHome == '1' ? '到家定位经纬度' : '到目的地定位经纬度'"
|
||||
v-if="form.isLeave == '1' && !isEmpty(form.homeGps)">
|
||||
<el-input :value="form.homeGps" readonly />
|
||||
<span style="color: red;font-size: 12px;">(*定位可能有误差)</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="form.isHome == '1' ? '到家定位详细地址' : '到目的地定位详细地址'"
|
||||
v-if="form.isLeave == '1' && !isEmpty(form.homeGpsAddr)">
|
||||
<el-input :value="form.homeGpsAddr" readonly />
|
||||
<span style="color: red;font-size: 12px;">(*定位可能有误差)</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="定位时间" v-if="!isEmpty(form.homeGpsTime)">
|
||||
<el-input :value="form.homeGpsTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="预计留校时间" v-if="form.isLeave == '0'">
|
||||
<el-input :value="form.willStayTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="留校事由" v-if="form.isLeave == '0'">
|
||||
<el-input type="textarea" :autosize="{ minRows: 6, maxRows: 10 }" :value="form.stayReason"
|
||||
readonly />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { isEmpty, fullLoading } from "@/api/helpFunc";
|
||||
import { listFdyAll as listView, updateStuHomeGpsAddr } from "@/api/survey/itinerary";
|
||||
import { listAllSurvey } from "@/api/survey/survey";
|
||||
|
||||
export default {
|
||||
name: "Itinerary",
|
||||
dicts: ['sur_status'],
|
||||
data() {
|
||||
return {
|
||||
isEmpty,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 学生假期返校表格数据
|
||||
itineraryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: null,
|
||||
surveyId: null,
|
||||
surveyName: null,
|
||||
className: null,
|
||||
},
|
||||
dept_list: [],
|
||||
deptForm: {
|
||||
|
||||
},
|
||||
classVlue1: [],//班级搜索选择
|
||||
ClassNameList: [],//班级名称
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
||||
auditForm: {
|
||||
|
||||
},
|
||||
surveyList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if (!isEmpty(this.$store.sur)) {
|
||||
if (!isEmpty(this.$store.sur.willLeaveTime)) {
|
||||
this.queryParams.willLeaveTime = this.$store.sur.willLeaveTime;
|
||||
}
|
||||
}
|
||||
this.getList();
|
||||
this.listAllSurvey();
|
||||
},
|
||||
methods: {
|
||||
async listAllSurvey() {
|
||||
let res = await listAllSurvey();
|
||||
if (res.code == 200) {
|
||||
this.surveyList = [...res.data];
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listView(this.queryParams).then(response => {
|
||||
this.itineraryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
returnSchoolId: null,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: null,
|
||||
surveyId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.classVlue1 = [],
|
||||
this.handleQuery();
|
||||
},
|
||||
auditVClick(row) {
|
||||
this.form = {};
|
||||
this.form = { ...row };
|
||||
this.updateStuHomeGpsAddr();
|
||||
this.open = true;
|
||||
},
|
||||
updateStuHomeGpsAddr() {
|
||||
if (!isEmpty(this.form.homeGps) && isEmpty(this.form.homeGpsAddr)) {
|
||||
let loading = fullLoading(this);
|
||||
this.fetchLocation(this.form.homeGps);
|
||||
loading.close();
|
||||
}
|
||||
},
|
||||
fetchLocation(latlng) {
|
||||
this.cleanup();
|
||||
window.baiduCallback = this.baiduCallback;
|
||||
const script = document.createElement('script');
|
||||
script.src =
|
||||
`https://api.map.baidu.com/reverse_geocoding/v3/?ak=HUWNwlsBGdZk85kkDkfl3MCYVEqaTey1&output=json&coordtype=gcj02ll&location=${latlng}&callback=baiduCallback`;
|
||||
document.body.appendChild(script);
|
||||
setTimeout(() => {
|
||||
this.cleanup();
|
||||
}, 5000);
|
||||
},
|
||||
cleanup() {
|
||||
const scripts = document.querySelectorAll('script[src*="reverse_geocoding"]');
|
||||
scripts.forEach(script => script.remove());
|
||||
window.baiduCallback = null;
|
||||
},
|
||||
async baiduCallback(data) {
|
||||
if (data.status == 0) {
|
||||
this.form.homeGpsAddr = data.result.formatted_address;
|
||||
await updateStuHomeGpsAddr(this.form);
|
||||
this.getList();
|
||||
} else {
|
||||
this.form.homeGpsAddr = "定位失败";
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.lookForm {
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
546
src/views/survey/leave/fdy.vue
Normal file
546
src/views/survey/leave/fdy.vue
Normal file
@@ -0,0 +1,546 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="40px">
|
||||
<el-form-item label="主题" prop="surveyName">
|
||||
<el-select clearable v-model="queryParams.surveyName" placeholder="请选择去向调查">
|
||||
<el-option v-for="item in surveyList" :key="item.surveyId" :value="item.surveyName"
|
||||
:label="item.surveyName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学号" prop="stuNo">
|
||||
<el-input v-model="queryParams.stuNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="班级" prop="className">
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" icon="el-icon-edit" size="mini" :disabled="multiple" plain
|
||||
@click="manyAudit">批量审核通过</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-view" size="mini" plain @click="lookVClick">查看离校填写情况</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-view" size="mini" plain @click="willVClick">查看预计离校情况</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="itineraryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="20" align="center" />
|
||||
<el-table-column label="#" align="center" prop="returnSchoolId" />
|
||||
<el-table-column label="主题" align="center" prop="surveyName" />
|
||||
<el-table-column label="学号" align="center" prop="stuNo" width="120" />
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="班级" align="center" prop="className" width="200" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" width="140" />
|
||||
<el-table-column label="家长是否知晓" align="center" prop="famKnow" width="100" />
|
||||
<el-table-column label="是否离校" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isLeave == "1" ? "是" : "否" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预计离校时间" align="center" prop="willLeaveTime" width="140" />
|
||||
<el-table-column label="去向地" align="center" prop="willAddr" width="140" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit"
|
||||
@click="auditVClick(scope.row)">审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!--学生假期返校详细对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-form ref="form" class="lookForm" size="mini" label-width="120px">
|
||||
<el-form-item label="是否通过">
|
||||
<el-select v-model="auditForm.leaveStatus" placeholder="请选择是否通过">
|
||||
<el-option label="通过" value="2"></el-option>
|
||||
<el-option label="打回" value="10"></el-option>
|
||||
</el-select>
|
||||
<el-button @click="doAudit" type="success">审核</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="主题">
|
||||
<el-input v-model="form.surveyName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="学院">
|
||||
<el-input v-model="form.moreDeptName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级">
|
||||
<el-input v-model="form.className" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="学号">
|
||||
<el-input v-model="form.stuNo" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="form.name" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="宿舍">
|
||||
<el-input
|
||||
:value="form.campusName + '--' + form.parkName + '--' + form.buildingName + '--' + form.roomNo"
|
||||
readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话">
|
||||
<el-input v-model="form.phone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人">
|
||||
<el-input v-model="form.emergencyContact" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人电话">
|
||||
<el-input v-model="form.emergencyContactPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长姓名">
|
||||
<el-input v-model="form.famName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长电话">
|
||||
<el-input v-model="form.famPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长是否知晓">
|
||||
<el-input v-model="form.famKnow" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否离校">
|
||||
<el-input :value="form.isLeave == '1' ? '是' : '否'" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="预计离校时间" v-if="form.isLeave == '1'">
|
||||
<el-input :value="form.willLeaveTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="去向地" v-if="form.isLeave == '1' && !isEmpty(form.willAddr)">
|
||||
<el-input :value="form.willAddr" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="预计留校时间" v-if="form.isLeave == '0'">
|
||||
<el-input :value="form.willStayTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="留校事由" v-if="form.isLeave == '0'">
|
||||
<el-input type="textarea" :autosize="{ minRows: 6, maxRows: 10 }" :value="form.stayReason"
|
||||
readonly />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog title="查看学生离校填写情况" :visible.sync="lookV" width="1000px" append-to-body :close-on-click-modal="false">
|
||||
<el-form class="lookForm" :model="lookParams" ref="lookParams" size="small" :inline="true"
|
||||
label-width="80px">
|
||||
<el-form-item label="去向调查" prop="surveyId">
|
||||
<el-select v-model="lookParams.surveyId" placeholder="请选择去向调查">
|
||||
<el-option v-for="item in surveyList" :key="item.surveyId" :value="item.surveyId"
|
||||
:label="item.surveyName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学号" prop="stuNo">
|
||||
<el-input v-model="lookParams.stuNo" placeholder="请输入学号" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="lookParams.name" placeholder="请输入姓名" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="className">
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="lookQuery">搜索</el-button>
|
||||
<el-button type="success" icon="el-icon-position" size="mini"
|
||||
@click="sendMsg">向未填写学生推送企业微信消息</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="lookList">
|
||||
<el-table-column label="班级" align="center" prop="className" />
|
||||
<el-table-column label="学号" align="center" prop="stuNo" />
|
||||
<el-table-column label="姓名" align="center" prop="stuName" />
|
||||
<el-table-column label="学生状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.srs_stu_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否填写" align="center" prop="editStatus" />
|
||||
</el-table>
|
||||
<pagination v-show="lookTotal > 0" :total="lookTotal" :page.sync="lookParams.pageNum"
|
||||
:limit.sync="lookParams.pageSize" @pagination="lookQuery" />
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="查看学生预计离校情况" :visible.sync="willV" width="1000px" append-to-body :close-on-click-modal="false">
|
||||
<el-form size="small" :inline="true" label-width="40px">
|
||||
<el-form-item label="主题" prop="willId">
|
||||
<el-select clearable v-model="willId" placeholder="请选择去向调查">
|
||||
<el-option v-for="item in surveyList" :key="item.surveyId" :value="item.surveyId"
|
||||
:label="item.surveyName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="willQuery">查看</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
数据更新时间:{{ new Date().toLocaleString() }}<el-button @click="exportWillLeave">导出</el-button>
|
||||
<el-table id="willLeaveTable" v-if="willV" :border="true" :data="willList">
|
||||
<el-table-column label="班级" align="center" prop="class_name" width="180" />
|
||||
<el-table-column label="学生数" align="center" prop="stu_num" />
|
||||
<el-table-column label="提交数" align="center" prop="submit_num" />
|
||||
<el-table-column label="到家人数" align="center" prop="home_num" />
|
||||
<el-table-column label="每日预计离校人数" align="center">
|
||||
<el-table-column v-for="(v, i) in willFields" :key="i" :label="v.label" align="center"
|
||||
:prop="v.value" width="180">
|
||||
<template slot="header">
|
||||
<div @click="lookWillLeaveVClick(v)" style="cursor: pointer;">
|
||||
<span style="text-decoration: underline;">{{ v.label }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row[v.value] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="留校学生" align="center" prop="stay_num" />
|
||||
</el-table>
|
||||
<table id="tempTable2">
|
||||
|
||||
</table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="查看学生预计离校情况" :visible.sync="lookWillLeaveV" width="1000px" append-to-body
|
||||
:close-on-click-modal="false">
|
||||
<FdyAll v-if="lookWillLeaveV" />
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { isEmpty, fullLoading } from "@/api/helpFunc";
|
||||
import { listFdy as listView, leaveAudit, manyLeaveAudit, listFdyStuLeave, sendFdyStuLeaveMsg, countFdyClassWillLeave } from "@/api/survey/itinerary";
|
||||
import { listAllSurvey } from "@/api/survey/survey";
|
||||
import XLSX from 'xlsx';
|
||||
|
||||
import FdyAll from "./FdyAll.vue";
|
||||
|
||||
export default {
|
||||
name: "Itinerary",
|
||||
components: {
|
||||
FdyAll
|
||||
},
|
||||
dicts: ['srs_stu_status'],
|
||||
data() {
|
||||
return {
|
||||
isEmpty,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 学生假期返校表格数据
|
||||
itineraryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: null,
|
||||
surveyId: null,
|
||||
surveyName: null,
|
||||
className: null,
|
||||
},
|
||||
dept_list: [],
|
||||
deptForm: {
|
||||
|
||||
},
|
||||
classVlue1: [],//班级搜索选择
|
||||
ClassNameList: [],//班级名称
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
||||
auditForm: {
|
||||
|
||||
},
|
||||
|
||||
lookV: false,
|
||||
lookParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
lookTotal: 0,
|
||||
lookList: [],
|
||||
surveyList: [],
|
||||
|
||||
willV: false,
|
||||
willList: [],
|
||||
willId: null,
|
||||
willFields: [],
|
||||
|
||||
lookWillLeaveV: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.listAllSurvey();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$store.sur = {};
|
||||
},
|
||||
methods: {
|
||||
lookWillLeaveVClick(v) {
|
||||
this.$store.sur = {};
|
||||
this.$store.sur.willLeaveTime = v.label.replace("预计离校人数", "");
|
||||
this.lookWillLeaveV = true;
|
||||
|
||||
},
|
||||
|
||||
exportWillLeave() {
|
||||
if (isEmpty(this.willId)) {
|
||||
this.$message.info("请选择您要导出的去向调查");
|
||||
return;
|
||||
}
|
||||
|
||||
if (document.getElementById('willLeaveTable') == null) {
|
||||
this.$message.info("请等待数据加载完毕");
|
||||
return;
|
||||
}
|
||||
|
||||
let title = this.surveyList.find(item => item.surveyId == this.willId).surveyName;
|
||||
|
||||
let thead = document.getElementById('willLeaveTable').getElementsByTagName('thead')[0];
|
||||
let tbody = document.getElementById('willLeaveTable').getElementsByTagName('tbody')[0];
|
||||
let tempTable = document.getElementById('tempTable2');
|
||||
if (thead) {
|
||||
tempTable.appendChild(thead.cloneNode(true))
|
||||
}
|
||||
if (tbody) {
|
||||
tempTable.appendChild(tbody.cloneNode(true))
|
||||
}
|
||||
const wb = XLSX.utils.table_to_book(tempTable, { sheet: 'Sheet1' })
|
||||
XLSX.writeFile(wb, title + "学生预计离校情况.xlsx");
|
||||
tempTable.innerHTML = '';
|
||||
},
|
||||
willQuery() {
|
||||
if (isEmpty(this.willId)) {
|
||||
this.$message.info("请选择您要查看的去向调查");
|
||||
return;
|
||||
}
|
||||
this.countFdyClassWillLeave();
|
||||
},
|
||||
willVClick() {
|
||||
this.willId = null;
|
||||
this.willV = true;
|
||||
},
|
||||
async countFdyClassWillLeave() {
|
||||
this.willList = [];
|
||||
|
||||
let tempFields = [];
|
||||
let loading = fullLoading(this);
|
||||
let res = await countFdyClassWillLeave(this.willId);
|
||||
loading.close();
|
||||
if (res.code == 200) {
|
||||
let data = [...res.data];
|
||||
for (let key in data[0]) {
|
||||
if (key.includes('预计离校')) {
|
||||
tempFields.push({
|
||||
label: key,
|
||||
value: key
|
||||
});
|
||||
}
|
||||
}
|
||||
tempFields.sort((a, b) => {
|
||||
// 提取日期部分并转为Date对象进行比较
|
||||
const dateA = new Date(a.label.slice(0, 10));
|
||||
const dateB = new Date(b.label.slice(0, 10));
|
||||
return dateA - dateB;
|
||||
});
|
||||
this.willFields = [...tempFields];
|
||||
this.willList = [...data];
|
||||
}
|
||||
},
|
||||
|
||||
async sendMsg() {
|
||||
let sdata = { ...this.lookParams };
|
||||
if (isEmpty(sdata.surveyId)) {
|
||||
this.$message.info("请选择去向调查");
|
||||
return;
|
||||
}
|
||||
let loading = fullLoading(this);
|
||||
let res = await sendFdyStuLeaveMsg(sdata);
|
||||
loading.close();
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.msg);
|
||||
}
|
||||
},
|
||||
async lookQuery() {
|
||||
if (isEmpty(this.lookParams.surveyId)) {
|
||||
this.$message.info("请选择去向调查");
|
||||
return;
|
||||
}
|
||||
let loading = fullLoading(this);
|
||||
let res = await listFdyStuLeave(this.lookParams);
|
||||
loading.close();
|
||||
if (res.code == 200) {
|
||||
this.lookList = [...res.rows];
|
||||
this.lookTotal = res.total;
|
||||
}
|
||||
},
|
||||
async listAllSurvey() {
|
||||
let res = await listAllSurvey();
|
||||
if (res.code == 200) {
|
||||
this.surveyList = [...res.data];
|
||||
}
|
||||
},
|
||||
lookVClick() {
|
||||
this.lookV = true;
|
||||
},
|
||||
manyAudit() {
|
||||
let sdata = [...this.ids];
|
||||
if (isEmpty(sdata)) {
|
||||
this.$message.info("请选择要审核的记录");
|
||||
return;
|
||||
}
|
||||
this.$confirm('是否批量通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
let loading = fullLoading(this);
|
||||
let res = await manyLeaveAudit(sdata);
|
||||
loading.close();
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.msg);
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
},
|
||||
async doAudit() {
|
||||
let sdata = { ...this.auditForm };
|
||||
console.log(sdata);
|
||||
if (isEmpty(sdata.leaveStatus)) {
|
||||
this.$message.info("请选择是否通过");
|
||||
return;
|
||||
}
|
||||
|
||||
let loading = fullLoading(this);
|
||||
let res = await leaveAudit(sdata);
|
||||
loading.close();
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.msg);
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listView(this.queryParams).then(response => {
|
||||
this.itineraryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
returnSchoolId: null,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: null,
|
||||
surveyId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.classVlue1 = [],
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.returnSchoolId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
auditVClick(row) {
|
||||
this.auditForm = {};
|
||||
this.auditForm.returnSchoolId = row.returnSchoolId;
|
||||
this.form = {};
|
||||
this.form = { ...row };
|
||||
this.open = true;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.lookForm {
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
356
src/views/survey/return/FdyAll.vue
Normal file
356
src/views/survey/return/FdyAll.vue
Normal file
@@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="40px">
|
||||
<el-form-item label="主题" prop="surveyName">
|
||||
<el-select clearable v-model="queryParams.surveyName" placeholder="请选择去向调查">
|
||||
<el-option v-for="item in surveyList" :key="item.surveyId" :value="item.surveyName"
|
||||
:label="item.surveyName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学号" prop="stuNo">
|
||||
<el-input v-model="queryParams.stuNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="className">
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="itineraryList">
|
||||
<el-table-column label="#" align="center" prop="returnSchoolId" />
|
||||
<el-table-column label="主题" align="center" prop="surveyName" width="120" />
|
||||
<el-table-column label="学号" align="center" prop="stuNo" width="120" />
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="班级" align="center" prop="className" width="300" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" width="140" />
|
||||
<el-table-column label="是否离校" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isLeave == "1" ? "是" : "否" }}
|
||||
<div v-if="scope.row.isLeave == 1">{{ scope.row.isLeave == "1" && scope.row.isHome == "是" ? "已到家" :
|
||||
"未到家" }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否到校" prop="reachSchoolStatus" align="center" />
|
||||
<el-table-column label="离校审核状态" align="center" prop="configType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sur_status" :value="scope.row.leaveStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到校审核状态" align="center" prop="configType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sur_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view"
|
||||
@click="auditVClick(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="920px" append-to-body>
|
||||
<el-form ref="form" class="lookForm" size="mini" label-width="160px">
|
||||
<el-form-item label="主题">
|
||||
<el-input v-model="form.surveyName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级">
|
||||
<el-input v-model="form.className" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="学院">
|
||||
<el-input v-model="form.moreDeptName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="学号">
|
||||
<el-input v-model="form.stuNo" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="form.name" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="宿舍">
|
||||
<el-input
|
||||
:value="form.campusName + '--' + form.parkName + '--' + form.buildingName + '--' + form.roomNo"
|
||||
readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话">
|
||||
<el-input v-model="form.phone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人">
|
||||
<el-input v-model="form.emergencyContact" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人电话">
|
||||
<el-input v-model="form.emergencyContactPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长姓名">
|
||||
<el-input v-model="form.famName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长电话">
|
||||
<el-input v-model="form.famPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长是否知晓">
|
||||
<el-input v-model="form.famKnow" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否离校">
|
||||
<el-input :value="form.isLeave == '1' ? '是' : '否'" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="去向地" v-if="form.isLeave == '1' && !isEmpty(form.willAddr)">
|
||||
<el-input :value="form.willAddr" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="预计离校时间" v-if="form.isLeave == '1'">
|
||||
<el-input :value="form.willLeaveTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否到家" v-if="form.isLeave == '1'">
|
||||
<el-input :value="form.isHome == '1' ? '是' : '否'" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="form.isHome == '1' ? '到家定位经纬度' : '到目的地定位经纬度'"
|
||||
v-if="form.isLeave == '1' && !isEmpty(form.homeGps)">
|
||||
<el-input :value="form.homeGps" readonly />
|
||||
<span style="color: red;font-size: 12px;">(*定位可能有误差)</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="form.isHome == '1' ? '到家定位详细地址' : '到目的地定位详细地址'"
|
||||
v-if="form.isLeave == '1' && !isEmpty(form.homeGpsAddr)">
|
||||
<el-input :value="form.homeGpsAddr" readonly />
|
||||
<span style="color: red;font-size: 12px;">(*定位可能有误差)</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="定位时间" v-if="!isEmpty(form.homeGpsTime)">
|
||||
<el-input :value="form.homeGpsTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="预计留校时间" v-if="form.isLeave == '0'">
|
||||
<el-input :value="form.willStayTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="留校事由" v-if="form.isLeave == '0'">
|
||||
<el-input type="textarea" :autosize="{ minRows: 6, maxRows: 10 }" :value="form.stayReason"
|
||||
readonly />
|
||||
</el-form-item>
|
||||
<hr />
|
||||
<el-form-item label="计划返校时间">
|
||||
<el-input v-model="form.scheduledReturnTime" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长姓名">
|
||||
<el-input v-model="form.parentName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长电话">
|
||||
<el-input v-model="form.parentPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长是否知晓">
|
||||
<el-input v-model="form.know" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!isEmpty(form.reachSchoolStatus)" label="是否到校">
|
||||
<el-input v-model="form.reachSchoolStatus" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.reachSchoolStatus == '是'" label="到校时间">
|
||||
<el-input v-model="form.attendSchoolTime" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.reachSchoolStatus == '否'" label="未返校原因分类">
|
||||
<el-input v-model="form.absentSchoolType" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.reachSchoolStatus == '否'" label="未返校详细原因">
|
||||
<el-input readonly type="textarea" :autosize="{ minRows: 6, maxRows: 10 }"
|
||||
v-model="form.absentSchoolRemark" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { isEmpty, fullLoading } from "@/api/helpFunc";
|
||||
import { listFdyAll as listView, updateStuHomeGpsAddr } from "@/api/survey/itinerary";
|
||||
import { listAllSurvey } from "@/api/survey/survey";
|
||||
|
||||
export default {
|
||||
name: "Itinerary",
|
||||
dicts: ['sur_status'],
|
||||
data() {
|
||||
return {
|
||||
isEmpty,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 学生假期返校表格数据
|
||||
itineraryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: null,
|
||||
surveyId: null,
|
||||
surveyName: null,
|
||||
className: null,
|
||||
},
|
||||
dept_list: [],
|
||||
deptForm: {
|
||||
|
||||
},
|
||||
classVlue1: [],//班级搜索选择
|
||||
ClassNameList: [],//班级名称
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
||||
auditForm: {
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.listAllSurvey();
|
||||
},
|
||||
methods: {
|
||||
async listAllSurvey() {
|
||||
let res = await listAllSurvey();
|
||||
if (res.code == 200) {
|
||||
this.surveyList = [...res.data];
|
||||
}
|
||||
},
|
||||
updateStuHomeGpsAddr() {
|
||||
if (!isEmpty(this.form.homeGps) && isEmpty(this.form.homeGpsAddr)) {
|
||||
let loading = fullLoading(this);
|
||||
this.fetchLocation(this.form.homeGps);
|
||||
loading.close();
|
||||
}
|
||||
},
|
||||
fetchLocation(latlng) {
|
||||
this.cleanup();
|
||||
window.baiduCallback = this.baiduCallback;
|
||||
const script = document.createElement('script');
|
||||
script.src =
|
||||
`https://api.map.baidu.com/reverse_geocoding/v3/?ak=HUWNwlsBGdZk85kkDkfl3MCYVEqaTey1&output=json&coordtype=gcj02ll&location=${latlng}&callback=baiduCallback`;
|
||||
document.body.appendChild(script);
|
||||
setTimeout(() => {
|
||||
this.cleanup();
|
||||
}, 5000);
|
||||
},
|
||||
cleanup() {
|
||||
const scripts = document.querySelectorAll('script[src*="reverse_geocoding"]');
|
||||
scripts.forEach(script => script.remove());
|
||||
window.baiduCallback = null;
|
||||
},
|
||||
async baiduCallback(data) {
|
||||
if (data.status == 0) {
|
||||
this.form.homeGpsAddr = data.result.formatted_address;
|
||||
await updateStuHomeGpsAddr(this.form);
|
||||
this.getList();
|
||||
} else {
|
||||
this.form.homeGpsAddr = "定位失败";
|
||||
}
|
||||
},
|
||||
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listView(this.queryParams).then(response => {
|
||||
this.itineraryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
returnSchoolId: null,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: null,
|
||||
surveyId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.classVlue1 = [],
|
||||
this.handleQuery();
|
||||
},
|
||||
auditVClick(row) {
|
||||
this.form = {};
|
||||
this.form = { ...row };
|
||||
this.updateStuHomeGpsAddr();
|
||||
this.open = true;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.lookForm {
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
392
src/views/survey/return/fdy.vue
Normal file
392
src/views/survey/return/fdy.vue
Normal file
@@ -0,0 +1,392 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="40px">
|
||||
<el-form-item label="主题" prop="surveyName">
|
||||
<el-select clearable v-model="queryParams.surveyName" placeholder="请选择去向调查">
|
||||
<el-option v-for="item in surveyList" :key="item.surveyId" :value="item.surveyName"
|
||||
:label="item.surveyName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学号" prop="stuNo">
|
||||
<el-input v-model="queryParams.stuNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="className">
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" icon="el-icon-edit" size="mini" :disabled="multiple"
|
||||
@click="manyAudit">批量审核通过</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-view" size="mini" plain @click="lookVClick">查看返校填写情况</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="itineraryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="#" align="center" prop="returnSchoolId" />
|
||||
<el-table-column label="主题" align="center" prop="surveyName" width="120" />
|
||||
<el-table-column label="学号" align="center" prop="stuNo" width="120" />
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="班级" align="center" prop="className" width="300" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" width="140" />
|
||||
<el-table-column label="是否离校" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isLeave == "1" ? "是" : "否" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit"
|
||||
@click="auditVClick(scope.row)">审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!--学生假期返校详细对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-form ref="form" class="lookForm" size="mini" label-width="120px">
|
||||
<el-form-item label="是否通过">
|
||||
<el-select v-model="auditForm.status" placeholder="请选择是否通过">
|
||||
<el-option label="通过" value="2"></el-option>
|
||||
<el-option label="打回" value="10"></el-option>
|
||||
</el-select>
|
||||
<el-button @click="doAudit" type="success">审核</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="主题">
|
||||
<el-input v-model="form.surveyName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="学院">
|
||||
<el-input v-model="form.moreDeptName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级">
|
||||
<el-input v-model="form.className" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="学号">
|
||||
<el-input v-model="form.stuNo" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="form.name" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="宿舍">
|
||||
<el-input
|
||||
:value="form.campusName + '--' + form.parkName + '--' + form.buildingName + '--' + form.roomNo"
|
||||
readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话">
|
||||
<el-input v-model="form.phone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人">
|
||||
<el-input v-model="form.emergencyContact" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人电话">
|
||||
<el-input v-model="form.emergencyContactPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长姓名">
|
||||
<el-input v-model="form.parentName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长电话">
|
||||
<el-input v-model="form.parentPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长是否知晓">
|
||||
<el-input v-model="form.know" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否离校">
|
||||
<el-input :value="form.isLeave == '1' ? '是' : '否'" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="计划返校时间">
|
||||
<el-input :value="form.scheduledReturnTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="!isEmpty(form.reachSchoolStatus)" label="是否到校">
|
||||
<el-input v-model="form.reachSchoolStatus" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.reachSchoolStatus == '是'" label="到校时间">
|
||||
<el-input v-model="form.attendSchoolTime" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.reachSchoolStatus == '否'" label="未返校原因分类">
|
||||
<el-input v-model="form.absentSchoolType" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.reachSchoolStatus == '否'" label="未返校详细原因">
|
||||
<el-input readonly type="textarea" :autosize="{ minRows: 6, maxRows: 10 }"
|
||||
v-model="form.absentSchoolRemark" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="查看学生返校填写情况" :visible.sync="lookV" width="1000px" append-to-body :close-on-click-modal="false">
|
||||
<el-form class="lookForm" :model="lookParams" ref="lookParams" size="small" :inline="true"
|
||||
label-width="80px">
|
||||
<el-form-item label="去向调查" prop="surveyId">
|
||||
<el-select v-model="lookParams.surveyId" placeholder="请选择去向调查">
|
||||
<el-option v-for="item in surveyList" :key="item.surveyId" :value="item.surveyId"
|
||||
:label="item.surveyName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学号" prop="stuNo">
|
||||
<el-input v-model="lookParams.stuNo" placeholder="请输入学号" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="lookParams.name" placeholder="请输入姓名" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="className">
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="lookQuery">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="lookList">
|
||||
<el-table-column label="班级" align="center" prop="className" />
|
||||
<el-table-column label="学号" align="center" prop="stuNo" />
|
||||
<el-table-column label="姓名" align="center" prop="stuName" />
|
||||
<el-table-column label="学生状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.srs_stu_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否填写" align="center" prop="editStatus" />
|
||||
</el-table>
|
||||
<pagination v-show="lookTotal > 0" :total="lookTotal" :page.sync="lookParams.pageNum"
|
||||
:limit.sync="lookParams.pageSize" @pagination="lookQuery" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { isEmpty, fullLoading } from "@/api/helpFunc";
|
||||
import { listFdyReturn as listView, returnAudit, manyReturnAudit, listFdyStuReturn } from "@/api/survey/itinerary";
|
||||
import { listAllSurvey } from "@/api/survey/survey";
|
||||
|
||||
export default {
|
||||
name: "Itinerary",
|
||||
dicts: ['srs_stu_status'],
|
||||
data() {
|
||||
return {
|
||||
isEmpty,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 学生假期返校表格数据
|
||||
itineraryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: null,
|
||||
surveyId: null,
|
||||
surveyName: null,
|
||||
className: null,
|
||||
},
|
||||
dept_list: [],
|
||||
deptForm: {
|
||||
|
||||
},
|
||||
classVlue1: [],//班级搜索选择
|
||||
ClassNameList: [],//班级名称
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
||||
auditForm: {
|
||||
|
||||
},
|
||||
|
||||
lookV: false,
|
||||
lookParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
lookList: [],
|
||||
surveyList: [],
|
||||
lookTotal: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.listAllSurvey();
|
||||
},
|
||||
methods: {
|
||||
async lookQuery() {
|
||||
if (isEmpty(this.lookParams.surveyId)) {
|
||||
this.$message.info("请选择去向调查");
|
||||
return;
|
||||
}
|
||||
let loading = fullLoading(this);
|
||||
let res = await listFdyStuReturn(this.lookParams);
|
||||
loading.close();
|
||||
if (res.code == 200) {
|
||||
this.lookList = [...res.data];
|
||||
}
|
||||
},
|
||||
async listAllSurvey() {
|
||||
let res = await listAllSurvey();
|
||||
if (res.code == 200) {
|
||||
this.surveyList = [...res.data];
|
||||
}
|
||||
},
|
||||
lookVClick() {
|
||||
this.lookV = true;
|
||||
},
|
||||
manyAudit() {
|
||||
let sdata = [...this.ids];
|
||||
if (isEmpty(sdata)) {
|
||||
this.$message.info("请选择要审核的记录");
|
||||
return;
|
||||
}
|
||||
this.$confirm('是否批量通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
let loading = fullLoading(this);
|
||||
let res = await manyReturnAudit(sdata);
|
||||
loading.close();
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.msg);
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
},
|
||||
async doAudit() {
|
||||
let sdata = { ...this.auditForm };
|
||||
console.log(sdata);
|
||||
if (isEmpty(sdata.status)) {
|
||||
this.$message.info("请选择是否通过");
|
||||
return;
|
||||
}
|
||||
|
||||
let loading = fullLoading(this);
|
||||
let res = await returnAudit(sdata);
|
||||
loading.close();
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.msg);
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listView(this.queryParams).then(response => {
|
||||
this.itineraryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
returnSchoolId: null,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: null,
|
||||
surveyId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.classVlue1 = [],
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.returnSchoolId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
auditVClick(row) {
|
||||
this.auditForm = {};
|
||||
this.auditForm.returnSchoolId = row.returnSchoolId;
|
||||
this.form = {};
|
||||
this.form = { ...row };
|
||||
this.open = true;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.lookForm {
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
347
src/views/survey/xg/index.vue
Normal file
347
src/views/survey/xg/index.vue
Normal file
@@ -0,0 +1,347 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="40px">
|
||||
<el-form-item label="学院" prop="moreDeptName">
|
||||
<el-input v-model="queryParams.moreDeptName" placeholder="请输入学院" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="className">
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学号" prop="stuNo">
|
||||
<el-input v-model="queryParams.stuNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="主题" prop="surveyName">
|
||||
<el-input v-model="queryParams.surveyName" placeholder="请输入主题" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="itineraryList">
|
||||
<el-table-column label="#" align="center" prop="returnSchoolId" />
|
||||
<el-table-column label="主题" align="center" prop="surveyName" width="120" />
|
||||
<el-table-column label="学号" align="center" prop="stuNo" width="120" />
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="班级" align="center" prop="className" width="300" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" width="140" />
|
||||
<el-table-column label="是否离校" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isLeave == "1" ? "是" : "否" }}
|
||||
<div v-if="scope.row.isLeave == 1">{{ scope.row.isLeave == "1" && scope.row.isHome == "是" ? "已到家" :
|
||||
"未到家" }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否到校" prop="reachSchoolStatus" align="center" />
|
||||
<el-table-column label="离校审核状态" align="center" prop="configType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sur_status" :value="scope.row.leaveStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到校审核状态" align="center" prop="configType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sur_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view"
|
||||
@click="auditVClick(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="920px" append-to-body>
|
||||
<el-form ref="form" class="lookForm" size="mini" label-width="160px">
|
||||
<el-form-item label="主题">
|
||||
<el-input v-model="form.surveyName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级">
|
||||
<el-input v-model="form.className" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="学院">
|
||||
<el-input v-model="form.moreDeptName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="学号">
|
||||
<el-input v-model="form.stuNo" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="form.name" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="宿舍">
|
||||
<el-input
|
||||
:value="form.campusName + '--' + form.parkName + '--' + form.buildingName + '--' + form.roomNo"
|
||||
readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话">
|
||||
<el-input v-model="form.phone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人">
|
||||
<el-input v-model="form.emergencyContact" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人电话">
|
||||
<el-input v-model="form.emergencyContactPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长姓名">
|
||||
<el-input v-model="form.famName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长电话">
|
||||
<el-input v-model="form.famPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长是否知晓">
|
||||
<el-input v-model="form.famKnow" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否离校">
|
||||
<el-input :value="form.isLeave == '1' ? '是' : '否'" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="预计离校时间" v-if="form.isLeave == '1'">
|
||||
<el-input :value="form.willLeaveTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否到家" v-if="form.isLeave == '1'">
|
||||
<el-input :value="form.isHome == '1' ? '是' : '否'" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="form.isHome == '1' ? '到家定位经纬度' : '到目的地定位经纬度'"
|
||||
v-if="form.isLeave == '1' && !isEmpty(form.homeGps)">
|
||||
<el-input :value="form.homeGps" readonly />
|
||||
<span style="color: red;font-size: 12px;">(*定位可能有误差)</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="form.isHome == '1' ? '到家定位详细地址' : '到目的地定位详细地址'"
|
||||
v-if="form.isLeave == '1' && !isEmpty(form.homeGpsAddr)">
|
||||
<el-input :value="form.homeGpsAddr" readonly />
|
||||
<span style="color: red;font-size: 12px;">(*定位可能有误差)</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="定位时间" v-if="!isEmpty(form.homeGpsTime)">
|
||||
<el-input :value="form.homeGpsTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="预计留校时间" v-if="form.isLeave == '0'">
|
||||
<el-input :value="form.willStayTime" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="留校事由" v-if="form.isLeave == '0'">
|
||||
<el-input type="textarea" :autosize="{ minRows: 6, maxRows: 10 }" :value="form.stayReason"
|
||||
readonly />
|
||||
</el-form-item>
|
||||
<hr />
|
||||
<el-form-item label="计划返校时间">
|
||||
<el-input v-model="form.scheduledReturnTime" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长姓名">
|
||||
<el-input v-model="form.parentName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长电话">
|
||||
<el-input v-model="form.parentPhone" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="家长是否知晓">
|
||||
<el-input v-model="form.know" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!isEmpty(form.reachSchoolStatus)" label="是否到校">
|
||||
<el-input v-model="form.reachSchoolStatus" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.reachSchoolStatus == '是'" label="到校时间">
|
||||
<el-input v-model="form.attendSchoolTime" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.reachSchoolStatus == '否'" label="未返校原因分类">
|
||||
<el-input v-model="form.absentSchoolType" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.reachSchoolStatus == '否'" label="未返校详细原因">
|
||||
<el-input readonly type="textarea" :autosize="{ minRows: 6, maxRows: 10 }"
|
||||
v-model="form.absentSchoolRemark" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { isEmpty, fullLoading } from "@/api/helpFunc";
|
||||
import { listXg as listView, updateStuHomeGpsAddr } from "@/api/survey/itinerary";
|
||||
|
||||
export default {
|
||||
name: "Itinerary",
|
||||
dicts: ['sur_status'],
|
||||
data() {
|
||||
return {
|
||||
isEmpty,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 学生假期返校表格数据
|
||||
itineraryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: null,
|
||||
surveyId: null,
|
||||
surveyName: null,
|
||||
className: null,
|
||||
},
|
||||
dept_list: [],
|
||||
deptForm: {
|
||||
|
||||
},
|
||||
classVlue1: [],//班级搜索选择
|
||||
ClassNameList: [],//班级名称
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
||||
auditForm: {
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
updateStuHomeGpsAddr() {
|
||||
if (!isEmpty(this.form.homeGps) && isEmpty(this.form.homeGpsAddr)) {
|
||||
let loading = fullLoading(this);
|
||||
this.fetchLocation(this.form.homeGps);
|
||||
loading.close();
|
||||
}
|
||||
},
|
||||
fetchLocation(latlng) {
|
||||
this.cleanup();
|
||||
window.baiduCallback = this.baiduCallback;
|
||||
const script = document.createElement('script');
|
||||
script.src =
|
||||
`https://api.map.baidu.com/reverse_geocoding/v3/?ak=HUWNwlsBGdZk85kkDkfl3MCYVEqaTey1&output=json&coordtype=gcj02ll&location=${latlng}&callback=baiduCallback`;
|
||||
document.body.appendChild(script);
|
||||
setTimeout(() => {
|
||||
this.cleanup();
|
||||
}, 5000);
|
||||
},
|
||||
cleanup() {
|
||||
const scripts = document.querySelectorAll('script[src*="reverse_geocoding"]');
|
||||
scripts.forEach(script => script.remove());
|
||||
window.baiduCallback = null;
|
||||
},
|
||||
async baiduCallback(data) {
|
||||
if (data.status == 0) {
|
||||
this.form.homeGpsAddr = data.result.formatted_address;
|
||||
await updateStuHomeGpsAddr(this.form);
|
||||
this.getList();
|
||||
} else {
|
||||
this.form.homeGpsAddr = "定位失败";
|
||||
}
|
||||
},
|
||||
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listView(this.queryParams).then(response => {
|
||||
this.itineraryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
returnSchoolId: null,
|
||||
deptId: null,
|
||||
stuNo: null,
|
||||
classId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
emergencyContact: null,
|
||||
emergencyContactPhone: null,
|
||||
schoolDistrict: null,
|
||||
apartment: null,
|
||||
room: null,
|
||||
scheduledReturnTime: null,
|
||||
reachSchoolStatus: null,
|
||||
parentName: null,
|
||||
parentPhone: null,
|
||||
know: null,
|
||||
absentSchoolType: null,
|
||||
absentSchoolRemark: null,
|
||||
attendSchoolGps: null,
|
||||
attendSchoolTime: null,
|
||||
status: null,
|
||||
surveyId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.classVlue1 = [],
|
||||
this.handleQuery();
|
||||
},
|
||||
auditVClick(row) {
|
||||
this.form = {};
|
||||
this.form = { ...row };
|
||||
this.updateStuHomeGpsAddr();
|
||||
this.open = true;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.lookForm {
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user