| | |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item prop="desc" label="总结描述:"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="8" |
| | | v-model.trim="state.dataForm.desc" |
| | | size="large" |
| | | placeholder="请输入总结描述" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item prop="desc" label="总结描述:">--> |
| | | <!-- <el-input--> |
| | | <!-- type="textarea"--> |
| | | <!-- :rows="8"--> |
| | | <!-- v-model.trim="state.dataForm.desc"--> |
| | | <!-- size="large"--> |
| | | <!-- placeholder="请输入总结描述"--> |
| | | <!-- >--> |
| | | <!-- </el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="附件上传:"> |
| | | <el-upload |
| | | :disabled="projectType==='view'" |
| | |
| | | :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> |
| | | </el-form-item> |
| | |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import axios from "axios"; |
| | | import {archiveProject, checkProject, getFileInfo, getProjectInfo} from "@/api/projectManage"; |
| | | import Cookies from "js-cookie"; |
| | | |
| | | const emit = defineEmits(["getNextStatus"]); |
| | | const prop = defineProps(['projectId']) |
| | |
| | | desc:'', |
| | | }, |
| | | rules: { |
| | | desc: [{ required: true, message: "总结描述不能为空", trigger: "blur" }], |
| | | // desc: [{ required: true, message: "总结描述不能为空", trigger: "blur" }], |
| | | projectEndTime:[{ required: true, message: "结束日期不能为空", trigger: "blur" }] |
| | | }, |
| | | uploadUrl: import.meta.env.VITE_APP_BASE_API + '/common/upload', |
| | |
| | | Authorization: getToken() |
| | | }, |
| | | fileList: [], |
| | | projectId: null |
| | | projectId: null, |
| | | isAdmin: false |
| | | }); |
| | | |
| | | const userInfo = ref() |
| | | onMounted(async () => { |
| | | if(prop.projectId){ |
| | | state.projectId = prop.projectId |
| | | } |
| | | userInfo.value = JSON.parse(Cookies.get('userInfo')) |
| | | state.isAdmin = userInfo.value.admin |
| | | }) |
| | | |
| | | const formRef = ref() |
| | |
| | | let valid = null |
| | | if(type === 'confirm'){ |
| | | valid = await formRef.value.validate(); |
| | | if (state.isAdmin) { |
| | | ElMessage.warning("当前用户暂无权限"); |
| | | return; |
| | | } |
| | | } |
| | | if(type === 'confirm'){ |
| | | if(valid){ |
| | |
| | | state.fileList = state.fileList.map(item => { |
| | | return { |
| | | name: item.name, |
| | | originalFileName: item.name, |
| | | filePath: item.response.url, |
| | | fileName:item.response.fileName, |
| | | projectId: state.projectId, |
| | |
| | | } |
| | | |
| | | 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 |
| | | } |