| | |
| | | <el-button type="primary" :icon="Refresh" size="default" @click="reLoadData()" /> |
| | | </el-row> |
| | | <el-table ref="multipleTableRef" :data="applyData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }"> |
| | | <el-table-column property="workPermitNo" label="作业申请单号" width="180" /> |
| | | <el-table-column property="applyUname" label="申请人" /> |
| | | <el-table-column property="depName" label="部门名称" /> |
| | | <el-table-column property="operators" label="作业人" /> |
| | | <el-table-column property="workTypeDesc" label="作业类型" /> |
| | | <el-table-column property="workLevelDesc" label="作业等级" /> |
| | | <el-table-column property="applyTime" label="申请时间" width="180" /> |
| | | <el-table-column property="workPermitNo" label="作业申请单号" width="180" align="center"/> |
| | | <el-table-column property="applyUname" label="申请人" align="center"/> |
| | | <el-table-column property="depName" label="部门名称" align="center"/> |
| | | <el-table-column property="operators" label="作业人" align="center"/> |
| | | <el-table-column property="workTypeDesc" label="作业类型" align="center"/> |
| | | <el-table-column property="workLevelDesc" label="作业等级" align="center"/> |
| | | <el-table-column property="materialStatus" label="物资状态" align="center" width="180"> |
| | | <template #default="scope"> |
| | | <span>{{ scope.row.materialStatus==0?'未关联物资':(scope.row.materialStatus==1?'必选物资配备不足':(scope.row.materialStatus==2?'必选物资配备齐全':(scope.row.materialStatus==3?'物资配置专业':(scope.row.materialStatus==4?'物资配置高端':'-')))) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column property="applyTime" label="申请时间" width="180" align="center"/> |
| | | <el-table-column label="申请状态" align="center" width="180"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.status==2?'success':(scope.row.status==8||scope.row.status==9)?'warning':'danger'">{{ scope.row.statusDesc }}</el-tag> |
| | |
| | | |
| | | // 关键词查询记录 |
| | | const searchRecord = async () => { |
| | | if (state.searchWord == null && state.searchDep == null && state.searchDate == '') { |
| | | if (state.searchWord == null && state.searchDep == null && state.searchDate == []) { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请输入查询关键词' |
| | |
| | | const clearSearch = async () => { |
| | | state.searchWord = null; |
| | | state.searchDep = null; |
| | | state.searchDate = '' |
| | | state.searchDate = [] |
| | | getListByPage(); |
| | | }; |
| | | |
| | |
| | | // 导出方法 |
| | | const downLoadRecord = async (data: any) => { |
| | | // let res = await workApplyApi().postPrinting(data); |
| | | axios.post(import.meta.env.VITE_API_URL + `/work/apply/printing`,data,{headers:{'Content-Type': 'application/json','Authorization': `${Cookies.get('token')}`,'uid':`${Cookies.get('uid')}`},responseType: 'blob'}).then(res=>{ |
| | | axios.post(import.meta.env.VITE_API_URL + `/work/apply/printingPdf`,data,{headers:{'Content-Type': 'application/json','Authorization': `${Cookies.get('token')}`,'uid':`${Cookies.get('uid')}`},responseType: 'blob'}).then(res=>{ |
| | | if (res) { |
| | | const link = document.createElement('a') |
| | | let blob = new Blob([res.data],{type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'}) |
| | | let blob = new Blob([res.data],{type: 'application/pdf'}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | link.setAttribute("download", state.downLoadName + "作业证.docx"); |
| | | link.setAttribute("download", state.downLoadName + "作业证.pdf"); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |