| | |
| | | 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 () => { |
| | |
| | | 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 ? '否': '' |
| | | } |
| | | }) |
| | | data.expertNum = data.tableData.length |