Merge branch 'main' of http://47.112.118.149:10082/xgxt_sd/zhxg_pc
This commit is contained in:
@@ -22,3 +22,11 @@ export function syncClassinfo() {
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
// 新查询班级列表
|
||||
export function listBj(query) {
|
||||
return request({
|
||||
url: '/syncdata/classInfoList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -22,3 +22,19 @@ export function syncMajorinfo() {
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
//新查询专业列表
|
||||
export function listZhuanYe(query) {
|
||||
return request({
|
||||
url: '/syncdata/getSpecialtyInfoList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//同步专业信息
|
||||
export function syncZhuanYeInfo() {
|
||||
return request({
|
||||
url: '/syncdata/synchronousSpecialtyInfoList',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
151
src/views/stuCQS/synchronous-data/sync-class/syncBj.vue
Normal file
151
src/views/stuCQS/synchronous-data/sync-class/syncBj.vue
Normal file
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true"
|
||||
label-width="72px">
|
||||
<el-form-item label="班级代码" prop="bjdm">
|
||||
<el-input v-model="queryParams.bjdm" 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 v-hasPermi="['system:middle:export']" type="warning" plain icon="el-icon-download"
|
||||
size="mini" @click="handleExport">导出</el-button>
|
||||
<el-col :span="1.5">
|
||||
<el-button v-hasPermi="['system:middle:add']" type="primary" plain icon="el-icon-plus" size="mini"
|
||||
@click="handleSync">同步数据</el-button>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="middleList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="班级代码" align="center" prop="bjdm" />
|
||||
<el-table-column label="专业代码" align="center" prop="zyid" />
|
||||
<el-table-column label="班级名称" align="center" prop="bjmc" />
|
||||
<el-table-column label="年级代码" align="center" prop="njid" />
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { listBj, syncClassinfo, getClassdm} from '@/api/stuCQS/synchronous-data/sync-class'
|
||||
|
||||
export default {
|
||||
name: 'Middle',
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 【请填写功能名称】表格数据
|
||||
middleList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
BJID: null,
|
||||
bjdm: null,
|
||||
bjjc:null,
|
||||
bjmc: null,
|
||||
njid: null,
|
||||
zyid : null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
//关键字查询
|
||||
getbjdm() {
|
||||
this.loading = true
|
||||
getClassdm(this.queryParams.bjdm).then(response => {
|
||||
this.middleList = response.data
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 查询【请填写功能名称】列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listBj(this.queryParams).then(response => {
|
||||
this.middleList = [...response.rows]
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
BJID: null,
|
||||
bjdm: null,
|
||||
bjjc:null,
|
||||
bjmc: null,
|
||||
njid: null,
|
||||
zyid : null,
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getbjdm()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/middle/export', {
|
||||
...this.queryParams
|
||||
}, `middle_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
handleSync() {
|
||||
syncClassinfo().then(res => {
|
||||
this.$modal.msgSuccess(res.msg)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -222,7 +222,6 @@ export default {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listInstructor(this.queryParams).then(response => {
|
||||
console.log(response.data);
|
||||
this.middleList = response.data
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
|
||||
@@ -73,20 +73,20 @@ export default {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/middle/export', {
|
||||
...this.queryParams
|
||||
}, `middle_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
//同步数据
|
||||
handleSync() {
|
||||
syncInstructorinfonew().then(res => {
|
||||
async handleSync() {
|
||||
let res = await syncInstructorinfonew()
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess(res.msg)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
110
src/views/stuCQS/synchronous-data/sync-major/syncZhuanYe.vue
Normal file
110
src/views/stuCQS/synchronous-data/sync-major/syncZhuanYe.vue
Normal file
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true"
|
||||
label-width="72px">
|
||||
<el-form-item label="专业代码" prop="zydm">
|
||||
<el-input v-model="queryParams.zydm" 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 v-hasPermi="['system:middle:export']" type="warning" plain icon="el-icon-download"
|
||||
size="mini">导出</el-button>
|
||||
<el-col :span="1.5">
|
||||
<el-button v-hasPermi="['system:middle:add']" type="primary" plain icon="el-icon-plus" size="mini"
|
||||
@click="handleSync">同步数据</el-button>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="middleList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="专业代码" align="center" prop="zydm" />
|
||||
<el-table-column label="专业简称" align="center" prop="zyjc" />
|
||||
<el-table-column label="专业名称" align="center" prop="zymc" />
|
||||
<el-table-column label="院校名称" align="center" prop="yxmc" />
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { listZhuanYe, syncZhuanYeInfo } from '@/api/stuCQS/synchronous-data/sync-major'
|
||||
|
||||
export default {
|
||||
name: 'Middle',
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 【请填写功能名称】表格数据
|
||||
middleList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
zydm: null,
|
||||
zyjc: null,
|
||||
zymc: null,
|
||||
yxmc: null
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
/** 查询【请填写功能名称】列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listZhuanYe(this.queryParams).then(response => {
|
||||
this.middleList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/middle/export', {
|
||||
...this.queryParams
|
||||
}, `middle_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
async handleSync() {
|
||||
let res = await syncZhuanYeInfo()
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess(res.msg)
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,13 +1,9 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="120px">
|
||||
<el-form-item label="主题" prop="surveyId">
|
||||
<el-select v-model="queryParams.surveyId" clearable placeholder="请选择去向调查">
|
||||
<el-option v-for="item in surveyList" :key="item.surveyId" :value="item.surveyId"
|
||||
:label="item.surveyName"
|
||||
/>
|
||||
<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">
|
||||
@@ -17,21 +13,17 @@
|
||||
<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-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
|
||||
/>
|
||||
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-button type="warning" plain icon="el-icon-download" size="mini"
|
||||
@click="handleExport"
|
||||
>导出学生填写记录(可以先搜索再导出)</el-button>
|
||||
@click="handleExport">导出学生填写记录(可以先搜索再导出)</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="itineraryList">
|
||||
@@ -59,16 +51,13 @@
|
||||
</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>
|
||||
<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"
|
||||
/>
|
||||
<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">
|
||||
@@ -95,10 +84,8 @@
|
||||
<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-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 />
|
||||
@@ -125,6 +112,10 @@
|
||||
<el-input :value="form.willAddr" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.isLeave == '1'" label="去向地-详细地址">
|
||||
<el-input v-model="form.willDetailAddr" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.isLeave == '1'" label="预计离校时间">
|
||||
<el-input :value="form.willLeaveTime" readonly />
|
||||
</el-form-item>
|
||||
@@ -134,15 +125,13 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.isLeave == '1' && !isEmpty(form.homeGps)"
|
||||
:label="form.isHome == '1' ? '到家定位经纬度' : '到目的地定位经纬度'"
|
||||
>
|
||||
:label="form.isHome == '1' ? '到家定位经纬度' : '到目的地定位经纬度'">
|
||||
<el-input :value="form.homeGps" readonly />
|
||||
<span style="color: red;font-size: 12px;">(*定位可能有误差)</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.isLeave == '1' && !isEmpty(form.homeGpsAddr)"
|
||||
:label="form.isHome == '1' ? '到家定位详细地址' : '到目的地定位详细地址'"
|
||||
>
|
||||
:label="form.isHome == '1' ? '到家定位详细地址' : '到目的地定位详细地址'">
|
||||
<el-input :value="form.homeGpsAddr" readonly />
|
||||
<span style="color: red;font-size: 12px;">(*定位可能有误差)</span>
|
||||
</el-form-item>
|
||||
@@ -156,9 +145,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.isLeave == '0'" label="留校事由">
|
||||
<el-input type="textarea" :autosize="{ minRows: 6, maxRows: 10 }" :value="form.stayReason"
|
||||
readonly
|
||||
/>
|
||||
<el-input type="textarea" :autosize="{ minRows: 6, maxRows: 10 }" :value="form.stayReason" readonly />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
@@ -167,199 +154,199 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fullLoading, isEmpty } from '@/api/helpFunc'
|
||||
import { listFdyAll as listView, updateStuHomeGpsAddr } from '@/api/survey/itinerary'
|
||||
import { listAllSurvey } from '@/api/survey/survey'
|
||||
import { fullLoading, isEmpty } 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: {
|
||||
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: [],//班级名称
|
||||
},
|
||||
classVlue1: [],//班级搜索选择
|
||||
ClassNameList: [],//班级名称
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
||||
auditForm: {
|
||||
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: {
|
||||
handleExport() {
|
||||
let sdata = { ...this.queryParams }
|
||||
sdata.pageNum = null
|
||||
sdata.pageSize = null
|
||||
this.download('survey/itinerary/fdyExport', {
|
||||
...sdata
|
||||
}, `学生假期离校返校填写记录_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
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 = '定位失败'
|
||||
}
|
||||
}
|
||||
},
|
||||
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: {
|
||||
handleExport() {
|
||||
let sdata = { ...this.queryParams }
|
||||
sdata.pageNum = null
|
||||
sdata.pageSize = null
|
||||
this.download('survey/itinerary/fdyExport', {
|
||||
...sdata
|
||||
}, `学生假期离校返校填写记录_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
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;
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -136,7 +136,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否离校">
|
||||
<el-input :value="form.isLeave == '1' ? '是' : '否'" readonly />
|
||||
<el-input :value="form.isLeave == '1' ? '是' : '否'" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.isLeave == '1'" label="预计离校时间">
|
||||
@@ -149,6 +149,10 @@
|
||||
<el-input v-model="form.willAddr" placeholder="请输入去向地" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.isLeave == '1'" label="去向地-详细地址">
|
||||
<el-input v-model="form.willDetailAddr" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.isLeave == '1'" label="预计返校时间">
|
||||
<el-date-picker v-model="form.scheduledReturnTime" type="datetime" placeholder="选择预计返校时间"
|
||||
format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;"
|
||||
@@ -156,7 +160,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.isLeave == '0'" label="预计留校时间">
|
||||
<el-input v-model="form.willStayTime" readonly style="width: 100%;" />
|
||||
<el-input v-model="form.willStayTime" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.isLeave == '0'" label="留校事由">
|
||||
@@ -501,7 +505,7 @@ export default {
|
||||
this.$message.info('请选择去向调查')
|
||||
return
|
||||
}
|
||||
// // 重置页码为1,避免fromIndex > toIndex错误
|
||||
// // 重置页码为1,避免fromIndex > toIndex错误
|
||||
// this.lookParams.pageNum = 1;
|
||||
let loading = fullLoading(this)
|
||||
let res = await listFdyStuLeave(this.lookParams)
|
||||
@@ -564,7 +568,7 @@ export default {
|
||||
}
|
||||
} catch (error) {
|
||||
loading.close()
|
||||
this.$message.error('驳回失败:' + error.message)
|
||||
this.$message.error('驳回失败:' + error.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -610,7 +614,7 @@ export default {
|
||||
loading.close()
|
||||
|
||||
if (res.code == 200) {
|
||||
this.$message.success('编辑保存成功!')
|
||||
this.$message.success('编辑保存成功!')
|
||||
// 刷新列表数据
|
||||
this.getList()
|
||||
} else {
|
||||
@@ -618,7 +622,7 @@ export default {
|
||||
}
|
||||
} catch (error) {
|
||||
loading.close()
|
||||
this.$message.error('编辑保存失败:' + error.message)
|
||||
this.$message.error('编辑保存失败:' + error.message)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}</el-radio>
|
||||
</el-radio-group> -->
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-select v-model="form.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.teacher_status"
|
||||
:key="dict.value"
|
||||
|
||||
Reference in New Issue
Block a user