From 3f6bf89b1985b6668f02ffcc9af577b412e92e45 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期一, 24 三月 2025 17:17:45 +0800 Subject: [PATCH] bug修改 --- src/views/safetyReview/projectManage/components/projectArchive.vue | 30 +++++++++++++++++++----------- 1 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/views/safetyReview/projectManage/components/projectArchive.vue b/src/views/safetyReview/projectManage/components/projectArchive.vue index 94f3b59..85aff7c 100644 --- a/src/views/safetyReview/projectManage/components/projectArchive.vue +++ b/src/views/safetyReview/projectManage/components/projectArchive.vue @@ -12,7 +12,7 @@ <el-table-column label="序号" width="60" align="center" type="index"></el-table-column> <el-table-column label="名称" align="center" class-name="small-padding fixed-width"> <template #default="scope"> - <el-input v-model="scope.row.name" show-word-limit type="text" size="large"/> + <span type="text" size="large">{{scope.row.name}}</span> </template> </el-table-column> <el-table-column label="是否必须文件" align="center" class-name="small-padding fixed-width"> @@ -32,7 +32,7 @@ <template #default="scope"> <el-upload accept=".pdf,.doc,.docx" :action="state.uploadUrl" - :disabled="projectType === 'detail'" + :disabled="projectType === 'view' || isEnd" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile,scope.row)" @@ -70,9 +70,9 @@ 项目合同额<span style="font-size: 13px;color: red;font-weight: normal;display: inline-block;margin-left: 6px">预估合同金额,归档阶段可以进行修改。仅支持数字,单位万元,小数点后最多两位,数值范围(0.01-999.99)</span> </template> <el-input - v-model="state.actualContract.actualContractMoney" + v-model.trim="state.actualContract.actualContractMoney" + @input="state.actualContract.actualContractMoney= state.actualContract.actualContractMoney.replace(/[^0-9.\/\-]/g,'')" size="large" - type="number" placeholder="请输入项目合同额" > <template #append>万元</template> @@ -82,7 +82,7 @@ </el-row> <el-form-item label="实际合同额说明"> <el-input - v-model="state.actualContract.actualContractIntroduction" + v-model.trim="state.actualContract.actualContractIntroduction" :autosize="{ minRows: 6 }" maxlength="100" show-word-limit @@ -103,6 +103,8 @@ import axios from "axios"; import {delAccessoryFile, getAccessoryFile} from "@/api/projectManage/project"; import {addProcessMaterial, getProcessMaterialDetail, editProcessMaterial} from "@/api/projectManage/riskAnalysis"; +import { useRoute } from 'vue-router' +const route = useRoute() const props = defineProps(['projectId']) const emit = defineEmits(["getNextStatus"]); const state = reactive({ @@ -158,6 +160,8 @@ // const res = await getAccessoryFile({projectId: val,moduleType: 9}); // console.log('res',res) } + isEnd.value = Cookies.get('end') + projectType.value = route.query.type; }); const getRecord = async (val) =>{ @@ -172,8 +176,10 @@ } const projectType = ref('') +const isEnd = ref('') const riskOpen = async (type,val) => { - projectType.value = type; + projectType.value = route.query.type; + isEnd.value = Cookies.get('end') state.uploadData.projectId = val; if(type === 'detail' || type === 'edit' ){ const res = await getProcessMaterialDetail({projectId: val}); @@ -344,27 +350,29 @@ } const handleRemove = async (file, uploadFiles) => { - console.log("file",file) + if (file && file.status == 'success') { + console.log("file", file) let accessoryFileId = ""; - if(file.id){ + if (file.id) { accessoryFileId = file.id - }else { + } else { accessoryFileId = file.response.data.id } const res = await delAccessoryFile(accessoryFileId) - if(res.code == 200){ + if (res.code == 200) { // ElMessage({ // type: 'success', // message: '文件已删除' // }) - }else{ + } else { ElMessage({ type: 'warning', message: res.message }) } } +} defineExpose({ riskOpen -- Gitblit v1.9.2