| | |
| | | <el-form :model="state.dataForm" ref="dataForm" :inline="true" style="margin-top: 10px" label-width="180px" > |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目名称(事由):"> |
| | | <el-form-item label="出差事由:"> |
| | | <span>{{state.dataForm.projectName}}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-table-column label="身份证号" prop="idCard" align="center" /> |
| | | <el-table-column label="等级" prop="ratingLevel" align="center" > |
| | | <template #default="scope"> |
| | | <span>{{scope.row.ratingLevel == 1 ?'一级':scope.row.ratingLevel == 2?'二级':scope.row.ratingLevel == 3 ?'三级':''}}</span> |
| | | <span>{{scope.row.ratingLevel == 1 ?'一级':scope.row.ratingLevel == 1?'二级':scope.row.ratingLevel == 3?'三级':scope.row.ratingLevel == 10?'库外':''}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="专业领域" prop="domain" align="center" /> |
| | |
| | | <span v-else>否</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="180"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" :disabled="state.dataForm.state >= 2 || state.isAdmin" v-if="scope.row.teamLeader === 1" @click="scope.row.teamLeader = 0">取消组长</el-button> |
| | | <el-button link type="primary" :disabled="state.dataForm.state >= 2 || state.isAdmin" v-else @click="scope.row.teamLeader = 1">设为组长</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="180">--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-button link type="primary" :disabled="state.dataForm.state >= 2 || state.isAdmin" v-if="scope.row.teamLeader === 1" @click="scope.row.teamLeader = 0">取消组长</el-button>--> |
| | | <!-- <el-button link type="primary" :disabled="state.dataForm.state >= 2 || state.isAdmin" v-else @click="scope.row.teamLeader = 1">设为组长</el-button>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | |
| | | <el-upload :disabled="projectType==='view' || isView" accept=".pdf" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :on-preview="handlePictureCardPreview" :limit='1' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)"> |
| | | <el-button type="primary">上传附件PDF</el-button> |
| | | <template #tip> |
| | | <div class="el-upload__tip">上传文件尺寸小于5M,最多可上传1份</div> |
| | | <div class="el-upload__tip">上传文件尺寸小于15M,最多可上传1份</div> |
| | | </template> |
| | | </el-upload> |
| | | </div> |
| | |
| | | import {getToken} from "@/utils/auth"; |
| | | import axios from "axios"; |
| | | import {generateWordDocument} from "@/views/safetyReview/projectManage/components/exportWord"; |
| | | import {addProject, checkProject, choose, getCheckInfo, getFileInfo, getProjectList} from "@/api/projectManage"; |
| | | import { |
| | | addProject, |
| | | checkProject, |
| | | choose, |
| | | chooseBuildCheck, |
| | | getCheckInfo, |
| | | getFileInfo, |
| | | getProjectList |
| | | } from "@/api/projectManage"; |
| | | import Cookies from "js-cookie"; |
| | | import moment from "moment"; |
| | | const emit = defineEmits(["getNextStatus","backStatus"]); |
| | |
| | | projectAddress: '', |
| | | remark: '', |
| | | projectCheckTime: '', |
| | | state: '' |
| | | state: '', |
| | | projectCode: '' |
| | | }, |
| | | jobCategoryArr: [], |
| | | queryParams: { |
| | |
| | | step: 3, |
| | | saveData: state.dataList |
| | | } |
| | | const res = await choose(data); |
| | | const res = await chooseBuildCheck(data); |
| | | if(res.code == 200){ |
| | | await getList() |
| | | dialogVisible.value = true |
| | |
| | | ElMessage.warning('审批不通过') |
| | | emit('backStatus', state.projectId); |
| | | dialogVisible.value = false |
| | | removeRandomNum() |
| | | |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const removeRandomNum = () => { |
| | | const rnData = localStorage.getItem('randomNum') |
| | | let rnDataArray = [] |
| | | if (rnData) { |
| | | try { |
| | | rnDataArray = JSON.parse(rnData); |
| | | } catch (e) { |
| | | console.error('数据解析失败,重置为空数组'); |
| | | } |
| | | } |
| | | const indexRN = rnDataArray.findIndex(obj => obj.projectId == state.projectId) |
| | | if(indexRN !== -1){ |
| | | rnDataArray.splice(indexRN,1) |
| | | } |
| | | localStorage.setItem('randomNum', JSON.stringify(rnDataArray)); |
| | | } |
| | | |
| | | const getList = async () => { |
| | |
| | | } |
| | | |
| | | const picSize = async (rawFile) => { |
| | | if(rawFile.size / 1024 / 1024 > 5){ |
| | | if(rawFile.size / 1024 / 1024 > 15){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '文件大小不能超过5M' |
| | | message: '文件大小不能超过15M' |
| | | }); |
| | | return false |
| | | } |
| | |
| | | const handleRemove = async (file, uploadFile) => { |
| | | } |
| | | |
| | | const templatePath = '/example.docx'; |
| | | const templatePath = '/example.docx' |
| | | const startGeneration = async () => { |
| | | const data = state.dataForm |
| | | let day = new Date(data.projectDateEnd).getTime() - new Date(data.projectDateStart).getTime(); |
| | | let dayCount = Math.floor(day / 86400000) ; |
| | | let dayCount = Math.floor(day / 86400000) + 1; |
| | | data.planTime = moment(data.projectDateStart).format('YYYY年MM月DD日') + ' 至 ' + moment(data.projectDateEnd).format('YYYY年MM月DD日') +','+`共计${dayCount}天。` |
| | | |
| | | // state.jobCategoryArr.forEach(item => { |
| | |
| | | return { |
| | | ...item, |
| | | selectionTime: item.selectionTime ? moment(item.selectionTime).format('YYYY年MM月DD日 HH:mm:ss') : '--', |
| | | expertRemark: item.expertRemark ? item.expertRemark : '' |
| | | expertRemark: item.expertRemark ? item.expertRemark : '', |
| | | phone: item.phone ? item.phone: '', |
| | | isInside: item.expertType == 1 ? '是' : item.expertType == 2 ? '否': '' |
| | | } |
| | | }) |
| | | console.log('dataList',state.dataList) |
| | | data.expertNum = data.tableData.length |
| | | data.isInside = '是' |
| | | console.log('dataList',state.dataList,data.expertNum) |
| | | try { |
| | | generateWordDocument(templatePath, data); |
| | | generateWordDocument(templatePath, data, '专家选用审批单.docx'); |
| | | } catch (error){ |
| | | ElMessage({ |
| | | type: 'warning', |