| | |
| | | </div> |
| | | </template> |
| | | <template #footer> |
| | | <div style="flex: auto"> |
| | | <el-button type="primary" @click="searchClick">查询</el-button> |
| | | <el-button type="warning" @click="reset">重置</el-button> |
| | | <el-button @click="confirmClick">取消</el-button> |
| | | |
| | | <div style="display: flex;align-items: center;justify-content: space-between"> |
| | | <vue3-json-excel |
| | | :json-data="expertList" |
| | | :fields="fields" |
| | | name="专家汇总表.xlsx" |
| | | > |
| | | <el-button type="primary" plain @click="handleExport">导出专家汇总表</el-button> |
| | | </vue3-json-excel> |
| | | <div> |
| | | <el-button type="primary" @click="searchClick">查询</el-button> |
| | | <el-button type="warning" @click="reset">重置</el-button> |
| | | <el-button @click="confirmClick">取消</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-drawer> |
| | |
| | | // import {delProject, getProjectList, getProjectStatistics} from "@/api/projectManage/project"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import Cookies from "js-cookie" |
| | | import {delProject, exportData, getProjectList, getProjectNum} from "@/api/projectManage"; |
| | | import {delProject, exportData, exportExpertData, getProjectList, getProjectNum} from "@/api/projectManage"; |
| | | // import * as XLSX from 'xlsx'; |
| | | import XLSX from 'xlsx-js-style'; |
| | | import {listDept} from "@/api/system/dept"; |
| | |
| | | } |
| | | }); |
| | | |
| | | const expertList = ref([]) |
| | | // 导出表格 |
| | | const fields = ref({ |
| | | '姓名':'expertName', |
| | | '处室':'deptName', |
| | | '专家费': 'expertFee', |
| | | '申请时间': 'createTime', |
| | | '事由': 'projectName', |
| | | }); |
| | | |
| | | const searchTime = ref([]); |
| | | const area = ref([]); |
| | | const stateList = ref([ |
| | |
| | | getList() |
| | | getDeptList() |
| | | getStatistics() |
| | | exportEData() |
| | | // getArea(); |
| | | // getBusinessList(); |
| | | // getRiskList(); |
| | |
| | | } |
| | | } |
| | | |
| | | const exportEData = async () => { |
| | | const {pageSize,pageNum,step,...data} = search.queryParams |
| | | const res = await exportExpertData(data); |
| | | if (res.code == 200) { |
| | | |
| | | if(res.data && res.data.length > 0){ |
| | | expertList.value = res.data |
| | | }else { |
| | | expertList.value = [] |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const handleExport = () => { |
| | | if(expertList.value && expertList.value.length == 0){ |
| | | ElMessage.warning('暂无数据导出') |
| | | } |
| | | } |
| | | function getDeptList() { |
| | | listDept({ |
| | | deptName: undefined, |
| | |
| | | } |
| | | getList(); |
| | | getStatistics(); |
| | | exportEData() |
| | | showDrawer.value = false; |
| | | } |
| | | const reset = () => { |