| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="18"> |
| | | <el-form-item> |
| | | <el-upload accept="image/*,.pdf,.doc,.docx,.xlsx,.xls" |
| | | :action="state.uploadUrl" |
| | | :disabled="state.disabled" |
| | | :headers="state.header" |
| | | method="post" |
| | | :on-success="handleAvatarSuccess" |
| | | :on-exceed="showTip" |
| | | v-model:file-list="state.fileList" |
| | | :on-remove="handleRemove" |
| | | :data="state.uploadData" |
| | | :on-preview="handlePreview" |
| | | :limit='1' |
| | | <el-upload |
| | | v-if="state.formData.isReviseManual === 1" |
| | | accept="image/*,.pdf,.doc,.docx,.xlsx,.xls" |
| | | :action="state.uploadUrl" |
| | | :disabled="projectType === 'view' || isEnd" |
| | | :headers="state.header" |
| | | method="post" |
| | | :on-success="handleAvatarSuccess" |
| | | :on-exceed="showTip" |
| | | v-model:file-list="state.fileList" |
| | | :on-remove="handleRemove" |
| | | :data="state.uploadData" |
| | | :on-preview="handlePreview" |
| | | :limit='1' |
| | | > |
| | | <el-button type="primary">附件上传</el-button> |
| | | <template #tip> |
| | |
| | | import {delAccessoryFile, getAccessoryFile} from "@/api/projectManage/project"; |
| | | import axios from "axios"; |
| | | import {delFile, getFiles} from "@/api/projectManage/siteCheckRcd"; |
| | | import { useRoute } from 'vue-router' |
| | | const route = useRoute() |
| | | const emit = defineEmits(["getNextStatus"]); |
| | | const prop = defineProps(['projectId']) |
| | | const state = reactive({ |
| | |
| | | state.uploadData.projectId = val; |
| | | getProcessFiles(val); |
| | | } |
| | | isEnd.value = Cookies.get('end') |
| | | projectType.value = route.query.type; |
| | | }) |
| | | |
| | | const projectType = ref(''); |
| | | const isEnd = ref('') |
| | | const riskOpen = async (type,val) => { |
| | | state.uploadData.projectId = val; |
| | | projectType.value = route.query.type; |
| | | isEnd.value = Cookies.get('end') |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | if(type === 'detail'){ |
| | | state.disabled = true |
| | |
| | | const handleAvatarSuccess = (res) => { |
| | | if(res.code === 200){ |
| | | getProcessFiles() |
| | | console.log("if",state.fileList) |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '文件上传成功' |
| | | // }) |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件上传成功' |
| | | }) |
| | | }else { |
| | | state.fileList.splice(state.fileList.indexOf(uploadFile),1) |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '文件上传失败' |
| | | message: res.message |
| | | }) |
| | | } |
| | | |
| | | } |
| | | const handlePreview = (file) => { |
| | | let path = ""; |