学工导出
This commit is contained in:
@@ -243,7 +243,9 @@ export default {
|
||||
|
||||
auditForm: {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
surveyList:[]
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -16,13 +16,17 @@
|
||||
<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 label="主题" prop="surveyId">
|
||||
<el-select clearable v-model="queryParams.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>
|
||||
<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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="itineraryList">
|
||||
@@ -172,6 +176,7 @@
|
||||
<script>
|
||||
import { isEmpty, fullLoading } from "@/api/helpFunc";
|
||||
import { listXg as listView, updateStuHomeGpsAddr } from "@/api/survey/itinerary";
|
||||
import { listAllSurvey } from "@/api/survey/survey";
|
||||
|
||||
export default {
|
||||
name: "Itinerary",
|
||||
@@ -242,8 +247,23 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.listAllSurvey();
|
||||
},
|
||||
methods: {
|
||||
async listAllSurvey() {
|
||||
let res = await listAllSurvey();
|
||||
if (res.code == 200) {
|
||||
this.surveyList = [...res.data];
|
||||
}
|
||||
},
|
||||
handleExport() {
|
||||
let sdata = { ...this.queryParams };
|
||||
sdata.pageNum = null;
|
||||
sdata.pageSize = null;
|
||||
this.download('survey/itinerary/xgExport', {
|
||||
...sdata
|
||||
}, `学生假期离校返校填写记录_${new Date().getTime()}.xlsx`);
|
||||
},
|
||||
updateStuHomeGpsAddr() {
|
||||
if (!isEmpty(this.form.homeGps) && isEmpty(this.form.homeGpsAddr)) {
|
||||
let loading = fullLoading(this);
|
||||
|
||||
Reference in New Issue
Block a user