董国庆
2025-06-21 caaace44a0f0049b6a645d6e0a511af6adf7c1e0
专业报告审批修改bug
17个文件已修改
711 ■■■■ 已修改文件
laboratory/src/components/chooseProject/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/feasibilityReport/add.vue 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/feasibilityReport/components/approval/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/feasibilityReport/index.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/feasibilityStudy/add.vue 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/feasibilityStudy/components/approval/index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/feasibilityStudy/index.vue 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/processDevelopment/add.vue 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/processDevelopment/components/approval/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/processDevelopment/index.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/projectProposalLibrary/add.vue 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/projectProposalLibrary/components/approval/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/projectProposalLibrary/index.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/verificationRelease/add.vue 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/verificationRelease/components/approval/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/verificationRelease/index.vue 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/components/chooseProject/index.vue
@@ -73,6 +73,10 @@
    },
    methods: {
        open() {
            if(this.form.date && this.form.date.length === 2){
                this.form.startTime=this.form.date[0]
                this.form.endTime=this.form.date[1]
            }
            getDataList({ ...this.form }).then(res => {
                console.log('/////////////', res);
                this.tableData = res.data.records || []
laboratory/src/router/index.js
@@ -508,7 +508,7 @@
            {
                path: "editVerificationRelease",
                meta: {
                    title: "新增验证与发布",
                    title: "编辑验证与发布",
                    hide: true,
                    keepAlive: true,
                },
laboratory/src/views/reportLibrary/feasibilityReport/add.vue
@@ -27,7 +27,7 @@
                    </div>
                </div>
                <el-form-item prop="reportCode" style="margin-top: 38px">
                    <el-input v-model="form.reportCode" style="width: 100%;" placeholder="请输入报告编号" />
                    <el-input v-model="form.reportCode" disabled style="width: 100%;" placeholder="请输入报告编号" />
                </el-form-item>
                <div class="header-title" style="width: 100%;">
@@ -57,8 +57,10 @@
                    </div>
                </div>
                <el-form-item prop="name" style="margin-top: 38px">
                    <el-upload action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList">
                    <el-upload action="#" :file-list="fileList" :http-request="handleUpload"
                        :before-upload="beforeUpload" :on-remove="handleRemove">
                        <el-button size="small" type="primary">点击上传</el-button>
                        <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div>
                    </el-upload>
                </el-form-item>
@@ -77,6 +79,7 @@
import AiEditor from '@/components/AiEditor'
import chooseProject from '@/components/chooseProject'
import { addData, getDetail, editData } from './service'
import { customUploadRequest, getFullUrl } from '@/utils/utils'
export default {
    components: {
@@ -89,15 +92,16 @@
            form: {
                reportCode: "",
                reportName: "",
                reportText: ""
                reportText: "",
                feasibilityReportFiles:[]
            },
            tableData: [],
            fileList: [], // 附件列表
            showChoose: false,
            rules: {
                reportCode: [
                    { required: true, message: '请输入报告编号', trigger: 'blur' }
                ],
                // reportCode: [
                //     { required: true, message: '请输入报告编号', trigger: 'blur' }
                // ],
                reportName: [
                    { required: true, message: '请输入报告名称', trigger: 'blur' }
                ],
@@ -117,13 +121,77 @@
            getDetail(this.$route.query.id).then(res => {
                this.form = res
                this.tableData = [{ ...res.projectTeam, staffName: res.staffNames }]
                this.fileList = res.fileList
                if (res.feasibilityReportFiles && res.feasibilityReportFiles.length > 0) {
                    this.fileList = res.feasibilityReportFiles.map(file => ({
                        name: file.fileName,
                        url: getFullUrl(file.fileUrl),
                        uid: file.id
                    }))
                    this.form.feasibilityReportFiles = res.fileList
                } else {
                    this.fileList = []
                    this.form.feasibilityReportFiles = []
                }
            })
        },
        getProjectData(data) {
            this.tableData = [data]
            this.$forceUpdate()
            this.showChoose = false
        },
           // 上传前校验
           beforeUpload(file) {
            return true;
        },
        // 自定义上传处理
        handleUpload(options) {
            const { file, onSuccess, onError } = options;
            // 使用封装的customUploadRequest方法
            customUploadRequest({
                file,
                onSuccess: (res) => {
                    console.log()
                    if (res.code === 200) {
                        const fileObj = {
                            id: new Date().getTime(),
                            reportId: this.$route.query.id ? this.$route.query.id : '',
                            fileUrl: res.msg || res.data || '',
                            reportType: 2, // 报告类型
                            fileName: file.name,
                            fileSize: file.size,
                        };
                        // 添加到文件列表显示
                        this.fileList.push({
                            name: file.name,
                            url: getFullUrl(fileObj.fileUrl),
                            uid: fileObj.id
                        });
                        // 添加到表单数据
                        this.form.feasibilityReportFiles.push(fileObj);
                        this.$message.success('文件上传成功');
                        onSuccess(res);
                    } else {
                        this.$message.error(res.message || '文件上传失败');
                        onError();
                    }
                },
                onError: (err) => {
                    this.$message.error('文件上传失败');
                    onError(err);
                }
            });
        },
        // 删除文件
        handleRemove(file) {
            const index = this.fileList.findIndex(item => item.name === file.name);
            if (index !== -1) {
                this.fileList.splice(index, 1);
                this.form.feasibilityReportFiles.splice(index, 1);
            }
        },
        submit() {
            if (this.tableData.length == 0) {
@@ -183,9 +251,19 @@
                if (valid) {
                    this.loading = true
                    if (this.$route.query.id) {
                        editData({ ...data, id: this.$route.query.id }).then(res => {
                            if (res.code === 200) {
                                this.$message.success('修改成功')
                                this.$router.back()
                            } else {
                                this.$message.error(res.message)
                            }
                        })
                    } else {
                    addData({ ...data }).then(res => {
                        if (res.code === 200) {
                            this.$message.success('提交成功')
                                this.$message.success('发布成功')
                            this.$router.back()
                        } else {
                            this.$message.error(res.message)
@@ -194,6 +272,7 @@
                        this.loading = false
                    })
                }
                }
            })
        },
    },
laboratory/src/views/reportLibrary/feasibilityReport/components/approval/index.vue
@@ -78,7 +78,7 @@
                            <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2">
                                通过
                            </div>
                            <div class="reject" :class="status == '3' && 'activeStatus'" @click.stop="status = 3">
                            <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4">
                                驳回
                            </div>
                        </div>
@@ -96,7 +96,7 @@
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确认</el-button>
        </div>
    </el-dialog>
</template>
@@ -192,6 +192,7 @@
                        type: data.status === 2 ? "primary" : "danger",
                        mode: "list",
                        fields: [
                        { label: "审核结果:", value: data.status == 4 ? '驳回' : "通过" || "" },
                            { label: "审批意见:", value: data.auditRemark || "" },
                            { label: "审核人:", value: data.auditPersonName || "" },
                            { label: "审核时间:", value: data.auditTime || "" },
@@ -220,7 +221,7 @@
                        type: "success",
                        mode: "list",
                        fields: [
                            { label: "已评定" },
                            { label: "评定状态:已评定" },
                            { label: "评定人:", value: data.evaluatePersonName || "" },
                            { label: "评定时间:", value: data.evaluateTime || "" }
                        ],
laboratory/src/views/reportLibrary/feasibilityReport/index.vue
@@ -37,8 +37,8 @@
                        </el-select>
                    </el-form-item>
                    <el-form-item label="" style="margin-left: 63px;">
                        <el-button type="default" style="margin-right: 10px;">重置</el-button>
                        <el-button type="primary">查询</el-button>
                        <el-button type="default" style="margin-right: 10px;" @click="handleReset">重置</el-button>
                        <el-button type="primary" @click="handleSearch">查询</el-button>
                    </el-form-item>
                </el-form>
            </template>
@@ -75,11 +75,11 @@
                    <template #default="{ row }">
                        <el-button type="text" @click="handleApproval(row)"
                            v-if="row.status == 1 && [1, 2].includes(roleType)">审核</el-button>
                        <el-button type="text" @click="handleDetail(row)">详情</el-button>
                        <el-button type="text" @click="handleDetail(row)" v-if="!isDraft">详情</el-button>
                        <el-button type="text" @click="handleEdit(row)"
                        v-if="[4, 5].includes(row.status) && roleType == 3">编辑</el-button>
                         v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">编辑</el-button>
                        <el-button type="text" @click="handleDelete(row)"
                            v-if="[4, 5].includes(row.status) && roleType == 3">删除</el-button>
                             v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">删除</el-button>
                      
                        <el-button type="text" @click="handleRevoke(row)"
                            v-if="row.status == 1 && roleType == 3">撤销审批</el-button>
@@ -217,6 +217,16 @@
            } else {
                data = this.form
            }
            // 处理日期范围
            if (data.date && data.date.length === 2) {
                data.startTime = this.formatDate(data.date[0])
                data.endTime = this.formatDate(data.date[1])
            } else {
                data.startTime = ''
                data.endTime = ''
            }
            getDataList(data).then(res => {
                if (res.code === 200) {
                    this.tableData = res.data.records || []
@@ -238,6 +248,27 @@
                    this.getList()
                }
            })
        },
        handleReset() {
            this.form.teamName = ''
            this.form.reportName = ''
            this.form.reportCode = ''
            this.form.date = ''
            this.form.status = ''
            this.form.startTime = ''
            this.form.endTime = ''
            this.form.pageNum = 1
            this.getList()
        },
        handleSearch() {
            this.form.pageNum = 1
            this.getList()
        },
        formatDate(date) {
            const year = date.getFullYear()
            const month = String(date.getMonth() + 1).padStart(2, '0')
            const day = String(date.getDate()).padStart(2, '0')
            return `${year}-${month}-${day}`
        }
    }
}
laboratory/src/views/reportLibrary/feasibilityStudy/add.vue
@@ -28,7 +28,7 @@
                    </div>
                </div>
                <el-form-item prop="reportCode" style="margin-top: 38px">
                    <el-input v-model="form.reportCode" style="width: 100%;" placeholder="请输入报告编号" />
                    <el-input v-model="form.reportCode" disabled style="width: 100%;" placeholder="请输入报告编号" />
                </el-form-item>
                <div class="header-title" style="width: 100%;">
@@ -58,8 +58,10 @@
                    </div>
                </div>
                <el-form-item prop="name" style="margin-top: 38px">
                    <el-upload action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList">
                    <el-upload action="#" :file-list="fileList" :http-request="handleUpload"
                        :before-upload="beforeUpload" :on-remove="handleRemove">
                        <el-button size="small" type="primary">点击上传</el-button>
                        <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div>
                    </el-upload>
                </el-form-item>
@@ -78,6 +80,8 @@
import AiEditor from '@/components/AiEditor'
import chooseProject from '@/components/chooseProject'
import { addData, getDetail, editData } from './service'
import { customUploadRequest, getFullUrl } from '@/utils/utils'
export default {
    components: {
        AiEditor,
@@ -89,15 +93,16 @@
            form: {
                reportCode: "",
                reportName: "",
                reportText: ""
                reportText: "",
                feasibilityReportFiles: [] // 添加附件数组
            },
            tableData: [],
            fileList: [], // 附件列表
            showChoose: false,
            rules: {
                reportCode: [
                    { required: true, message: '请输入报告编号', trigger: 'blur' }
                ],
                // reportCode: [
                //     { required: true, message: '请输入报告编号', trigger: 'blur' }
                // ],
                reportName: [
                    { required: true, message: '请输入报告名称', trigger: 'blur' }
                ],
@@ -117,7 +122,18 @@
            getDetail(this.$route.query.id).then(res => {
                this.form = res
                this.tableData = [{ ...res.projectTeam, staffName: res.staffNames }]
                this.fileList = res.fileList
                // 处理文件回显
                if (res.feasibilityReportFiles && res.feasibilityReportFiles.length > 0) {
                    this.fileList = res.feasibilityReportFiles.map(file => ({
                        name: file.fileName,
                        url: getFullUrl(file.fileUrl),
                        uid: file.id
                    }))
                    this.form.feasibilityReportFiles = res.fileList
                } else {
                    this.fileList = []
                    this.form.feasibilityReportFiles = []
                }
            })
        },
        //获取选择项目组数据
@@ -125,6 +141,60 @@
            this.tableData = [data]
            this.$forceUpdate()
            this.showChoose = false
        },
        // 上传前校验
        beforeUpload(file) {
            return true;
        },
        // 自定义上传处理
        handleUpload(options) {
            const { file, onSuccess, onError } = options;
            // 使用封装的customUploadRequest方法
            customUploadRequest({
                file,
                onSuccess: (res) => {
                    console.log()
                    if (res.code === 200) {
                        const fileObj = {
                            id: new Date().getTime(),
                            reportId: this.$route.query.id ? this.$route.query.id : '',
                            fileUrl: res.msg || res.data || '',
                            reportType: 1, // 可行性研究报告类型
                            fileName: file.name,
                            fileSize: file.size,
                        };
                        // 添加到文件列表显示
                        this.fileList.push({
                            name: file.name,
                            url: getFullUrl(fileObj.fileUrl),
                            uid: fileObj.id
                        });
                        // 添加到表单数据
                        this.form.feasibilityReportFiles.push(fileObj);
                        this.$message.success('文件上传成功');
                        onSuccess(res);
                    } else {
                        this.$message.error(res.message || '文件上传失败');
                        onError();
                    }
                },
                onError: (err) => {
                    this.$message.error('文件上传失败');
                    onError(err);
                }
            });
        },
        // 删除文件
        handleRemove(file) {
            const index = this.fileList.findIndex(item => item.name === file.name);
            if (index !== -1) {
                this.fileList.splice(index, 1);
                this.form.feasibilityReportFiles.splice(index, 1);
            }
        },
        submit() {
            console.log(this.$refs.materialEditor.getContent());
@@ -186,9 +256,19 @@
                if (valid) {
                    this.loading = true
                    if (this.$route.query.id) {
                        editData({ ...data, id: this.$route.query.id }).then(res => {
                            if (res.code === 200) {
                                this.$message.success('修改成功')
                                this.$router.back()
                            } else {
                                this.$message.error(res.message)
                            }
                        })
                    } else {
                    addData({ ...data }).then(res => {
                        if (res.code === 200) {
                            this.$message.success('提交成功')
                                this.$message.success('发布成功')
                            this.$router.back()
                        } else {
                            this.$message.error(res.message)
@@ -197,6 +277,7 @@
                        this.loading = false
                    })
                }
                }
            })
        },
    },
laboratory/src/views/reportLibrary/feasibilityStudy/components/approval/index.vue
@@ -78,7 +78,7 @@
                            <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2">
                                通过
                            </div>
                            <div class="reject" :class="status == '3' && 'activeStatus'" @click.stop="status = 3">
                            <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4">
                                驳回
                            </div>
                        </div>
@@ -96,7 +96,7 @@
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确认</el-button>
        </div>
    </el-dialog>
</template>
@@ -187,11 +187,12 @@
                    ]
                });
                if (data.status == 2 || data.status == 3) {
                if (data.status == 2 || data.status == 4) {
                    processData.push({
                        type: data.status === 2 ? "primary" : "danger",
                        type: 'primary',
                        mode: "list",
                        fields: [
                            { label: "审核结果:", value: data.status == 4 ? '驳回' : "通过" || "" },
                            { label: "审批意见:", value: data.auditRemark || "" },
                            { label: "审核人:", value: data.auditPersonName || "" },
                            { label: "审核时间:", value: data.auditTime || "" },
@@ -220,7 +221,7 @@
                        type: "success",
                        mode: "list",
                        fields: [
                            { label: "已评定" },
                            { label: "评定状态:已评定" },
                            { label: "评定人:", value: data.evaluatePersonName || "" },
                            { label: "评定时间:", value: data.evaluateTime || "" }
                        ],
laboratory/src/views/reportLibrary/feasibilityStudy/index.vue
@@ -37,8 +37,8 @@
                        </el-select>
                    </el-form-item>
                    <el-form-item label="" style="margin-left: 63px;">
                        <el-button type="default" style="margin-right: 10px;">重置</el-button>
                        <el-button type="primary">查询</el-button>
                        <el-button type="default" style="margin-right: 10px;" @click="handleReset">重置</el-button>
                        <el-button type="primary" @click="handleSearch">查询</el-button>
                    </el-form-item>
                </el-form>
            </template>
@@ -75,11 +75,12 @@
                    <template #default="{ row }">
                        <el-button type="text" @click="handleApproval(row)"
                            v-if="row.status == 1 && [1, 2].includes(roleType)">审核</el-button>
                        <el-button type="text" @click="handleDetail(row)">详情</el-button>
                        <el-button type="text" @click="handleDelete(row)"
                            v-if="[4, 5].includes(row.status) && roleType == 3">删除</el-button>
                        <el-button type="text" @click="handleDetail(row)" v-if="!isDraft">详情</el-button>
                        <el-button type="text" @click="handleEdit(row)"
                            v-if="[4, 5].includes(row.status) && roleType == 3">编辑</el-button>
                            v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">编辑</el-button>
                        <el-button type="text" @click="handleDelete(row)"
                            v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">删除</el-button>
                        <el-button type="text" @click="handleRevoke(row)"
                            v-if="row.status == 1 && roleType == 3">撤销审批</el-button>
                    </template>
@@ -216,6 +217,16 @@
            } else {
                data = this.form
            }
            // 处理日期范围
            if (this.form.date && this.form.date.length === 2) {
                data.startTime = this.form.date[0]
                data.endTime = this.form.date[1]
            } else {
                data.startTime = ''
                data.endTime = ''
            }
            getDataList(data).then(res => {
                if (res.code === 200) {
                    this.tableData = res.data.records || []
@@ -237,6 +248,18 @@
                    this.getList()
                }
            })
        },
        handleReset() {
            this.form.pageNum = 1
            this.form.teamName = ''
            this.form.reportName = ''
            this.form.reportCode = ''
            this.form.date = ''
            this.form.status = ''
            this.getList()
        },
        handleSearch() {
            this.getList()
        }
    }
}
@@ -295,7 +318,7 @@
    justify-content: center;
    // margin-bottom: 21px;
    font-family: SourceHanSansCN, SourceHanSansCN;
    font-weight: bold;
    font-size: 18px;
    color: #606266;
    line-height: 27px;
@@ -316,7 +339,6 @@
    justify-content: center;
    // margin-bottom: 21px;
    font-family: SourceHanSansCN, SourceHanSansCN;
    font-weight: bold;
    font-size: 18px;
    color: #049C9A;
    line-height: 27px;
laboratory/src/views/reportLibrary/processDevelopment/add.vue
@@ -28,7 +28,7 @@
                    </div>
                </div>
                <el-form-item prop="reportCode" style="margin-top: 38px">
                    <el-input v-model="form.reportCode" style="width: 100%;" placeholder="请输入报告编号" />
                    <el-input v-model="form.reportCode" disabled style="width: 100%;" placeholder="请输入报告编号" />
                </el-form-item>
                <div class="header-title" style="width: 100%;">
@@ -58,8 +58,10 @@
                    </div>
                </div>
                <el-form-item prop="name" style="margin-top: 38px">
                    <el-upload action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList">
                    <el-upload action="#" :file-list="fileList" :http-request="handleUpload"
                        :before-upload="beforeUpload" :on-remove="handleRemove">
                        <el-button size="small" type="primary">点击上传</el-button>
                        <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div>
                    </el-upload>
                </el-form-item>
@@ -78,6 +80,7 @@
import AiEditor from '@/components/AiEditor'
import chooseProject from '@/components/chooseProject'
import { addData, getDetail, editData } from './service'
import { customUploadRequest, getFullUrl } from '@/utils/utils'
export default {
    components: {
        AiEditor,
@@ -89,15 +92,16 @@
            form: {
                reportCode: "",
                reportName: "",
                reportText: ""
                reportText: "",
                feasibilityReportFiles: [] // 添加附件数组
            },
            tableData: [],
            fileList: [], // 附件列表
            showChoose: false,
            rules: {
                reportCode: [
                    { required: true, message: '请输入报告编号', trigger: 'blur' }
                ],
                // reportCode: [
                //     { required: true, message: '请输入报告编号', trigger: 'blur' }
                // ],
                reportName: [
                    { required: true, message: '请输入报告名称', trigger: 'blur' }
                ],
@@ -117,7 +121,17 @@
            getDetail(this.$route.query.id).then(res => {
                this.form = res
                this.tableData = [{ ...res.projectTeam, staffName: res.staffNames }]
                this.fileList = res.fileList
                if (res.feasibilityReportFiles && res.feasibilityReportFiles.length > 0) {
                    this.fileList = res.feasibilityReportFiles.map(file => ({
                        name: file.fileName,
                        url: getFullUrl(file.fileUrl),
                        uid: file.id
                    }))
                    this.form.feasibilityReportFiles = res.fileList
                } else {
                    this.fileList = []
                    this.form.feasibilityReportFiles = []
                }
            })
        },
        //获取选择项目组数据
@@ -125,6 +139,60 @@
            this.tableData = [data]
            this.$forceUpdate()
            this.showChoose = false
        },
        // 上传前校验
        beforeUpload(file) {
            return true;
        },
        // 自定义上传处理
        handleUpload(options) {
            const { file, onSuccess, onError } = options;
            // 使用封装的customUploadRequest方法
            customUploadRequest({
                file,
                onSuccess: (res) => {
                    console.log()
                    if (res.code === 200) {
                        const fileObj = {
                            id: new Date().getTime(),
                            reportId: this.$route.query.id ? this.$route.query.id : '',
                            fileUrl: res.msg || res.data || '',
                            reportType: 3, // 可行性研究报告类型
                            fileName: file.name,
                            fileSize: file.size,
                        };
                        // 添加到文件列表显示
                        this.fileList.push({
                            name: file.name,
                            url: getFullUrl(fileObj.fileUrl),
                            uid: fileObj.id
                        });
                        // 添加到表单数据
                        this.form.feasibilityReportFiles.push(fileObj);
                        this.$message.success('文件上传成功');
                        onSuccess(res);
                    } else {
                        this.$message.error(res.message || '文件上传失败');
                        onError();
                    }
                },
                onError: (err) => {
                    this.$message.error('文件上传失败');
                    onError(err);
                }
            });
        },
        // 删除文件
        handleRemove(file) {
            const index = this.fileList.findIndex(item => item.name === file.name);
            if (index !== -1) {
                this.fileList.splice(index, 1);
                this.form.feasibilityReportFiles.splice(index, 1);
            }
        },
        submit() {
            console.log(this.$refs.materialEditor.getContent());
@@ -186,9 +254,19 @@
                if (valid) {
                    this.loading = true
                    if (this.$route.query.id) {
                        editData({ ...data, id: this.$route.query.id }).then(res => {
                            if (res.code === 200) {
                                this.$message.success('修改成功')
                                this.$router.back()
                            } else {
                                this.$message.error(res.message)
                            }
                        })
                    } else {
                    addData({ ...data }).then(res => {
                        if (res.code === 200) {
                            this.$message.success('提交成功')
                                this.$message.success('发布成功')
                            this.$router.back()
                        } else {
                            this.$message.error(res.message)
@@ -197,6 +275,7 @@
                        this.loading = false
                    })
                }
                }
            })
        },
    },
laboratory/src/views/reportLibrary/processDevelopment/components/approval/index.vue
@@ -78,7 +78,7 @@
                            <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2">
                                通过
                            </div>
                            <div class="reject" :class="status == '3' && 'activeStatus'" @click.stop="status = 3">
                            <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4">
                                驳回
                            </div>
                        </div>
@@ -96,7 +96,7 @@
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确定</el-button>
        </div>
    </el-dialog>
</template>
@@ -189,9 +189,10 @@
                if (data.status == 2 || data.status == 3) {
                    processData.push({
                        type: data.status === 2 ? "primary" : "danger",
                        type: "primary",
                        mode: "list",
                        fields: [
                        { label: "审核结果:", value: data.status == 4 ? '驳回' : "通过" || "" },
                            { label: "审批意见:", value: data.auditRemark || "" },
                            { label: "审核人:", value: data.auditPersonName || "" },
                            { label: "审核时间:", value: data.auditTime || "" },
@@ -220,7 +221,7 @@
                        type: "success",
                        mode: "list",
                        fields: [
                            { label: "已评定" },
                            { label: "评定状态:已评定" },
                            { label: "评定人:", value: data.evaluatePersonName || "" },
                            { label: "评定时间:", value: data.evaluateTime || "" }
                        ],
laboratory/src/views/reportLibrary/processDevelopment/index.vue
@@ -37,8 +37,8 @@
                        </el-select>
                    </el-form-item>
                    <el-form-item label="" style="margin-left: 63px;">
                        <el-button type="default" style="margin-right: 10px;">重置</el-button>
                        <el-button type="primary">查询</el-button>
                        <el-button type="default" style="margin-right: 10px;" @click="handleReset">重置</el-button>
                        <el-button type="primary" @click="handleSearch">查询</el-button>
                    </el-form-item>
                </el-form>
            </template>
@@ -75,11 +75,12 @@
                    <template #default="{ row }">
                        <el-button type="text" @click="handleApproval(row)"
                            v-if="row.status == 1 && [1, 2].includes(roleType)">审核</el-button>
                        <el-button type="text" @click="handleDetail(row)">详情</el-button>
                        <el-button type="text" @click="handleDelete(row)"
                            v-if="[4, 5].includes(row.status) && roleType == 3">删除</el-button>
                        <el-button type="text" @click="handleDetail(row)" v-if="!isDraft">详情</el-button>
                        <el-button type="text" @click="handleEdit(row)"
                            v-if="[4, 5].includes(row.status) && roleType == 3">编辑</el-button>
                             v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">编辑</el-button>
                        <el-button type="text" @click="handleDelete(row)"
                             v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">删除</el-button>
                        <el-button type="text" @click="handleRevoke(row)"
                            v-if="row.status == 1 && roleType == 3">撤销审批</el-button>
                    </template>
@@ -216,6 +217,14 @@
            } else {
                data = this.form
            }
            // 处理日期范围
            if (this.form.date && this.form.date.length === 2) {
                data.startTime = this.form.date[0]
                data.endTime = this.form.date[1]
            } else {
                data.startTime = ''
                data.endTime = ''
            }
            getDataList(data).then(res => {
                if (res.code === 200) {
                    this.tableData = res.data.records || []
@@ -237,6 +246,18 @@
                    this.getList()
                }
            })
        },
        handleReset() {
            this.form.pageNum = 1
            this.form.teamName = ''
            this.form.reportName = ''
            this.form.reportCode = ''
            this.form.date = ''
            this.form.status = ''
            this.getList()
        },
        handleSearch() {
            this.getList()
        }
    }
}
laboratory/src/views/reportLibrary/projectProposalLibrary/add.vue
@@ -28,7 +28,7 @@
                    </div>
                </div>
                <el-form-item prop="reportCode" style="margin-top: 38px">
                    <el-input v-model="form.reportCode" style="width: 100%;" placeholder="请输入报告编号" />
                    <el-input v-model="form.reportCode" disabled style="width: 100%;" placeholder="请输入报告编号" />
                </el-form-item>
                <div class="header-title" style="width: 100%;">
@@ -58,8 +58,10 @@
                    </div>
                </div>
                <el-form-item prop="name" style="margin-top: 38px">
                    <el-upload action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList">
                    <el-upload action="#" :file-list="fileList" :http-request="handleUpload"
                        :before-upload="beforeUpload" :on-remove="handleRemove">
                        <el-button size="small" type="primary">点击上传</el-button>
                        <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div>
                    </el-upload>
                </el-form-item>
@@ -78,6 +80,7 @@
import AiEditor from '@/components/AiEditor'
import chooseProject from '@/components/chooseProject'
import { addData, getDetail, editData } from './service'
import { customUploadRequest, getFullUrl } from '@/utils/utils'
export default {
    components: {
        AiEditor,
@@ -89,15 +92,15 @@
            form: {
                reportCode: "",
                reportName: "",
                reportText: ""
                reportText: "", feasibilityReportFiles: [] // 添加附件数组
            },
            tableData: [],
            fileList: [], // 附件列表
            showChoose: false,
            rules: {
                reportCode: [
                    { required: true, message: '请输入报告编号', trigger: 'blur' }
                ],
                // reportCode: [
                //     { required: true, message: '请输入报告编号', trigger: 'blur' }
                // ],
                reportName: [
                    { required: true, message: '请输入报告名称', trigger: 'blur' }
                ],
@@ -117,7 +120,18 @@
            getDetail(this.$route.query.id).then(res => {
                this.form = res
                this.tableData = [{ ...res.projectTeam, staffName: res.staffNames }]
                this.fileList = res.fileList
                // 处理文件回显
                if (res.feasibilityReportFiles && res.feasibilityReportFiles.length > 0) {
                    this.fileList = res.feasibilityReportFiles.map(file => ({
                        name: file.fileName,
                        url: getFullUrl(file.fileUrl),
                        uid: file.id
                    }))
                    this.form.feasibilityReportFiles = res.fileList
                } else {
                    this.fileList = []
                    this.form.feasibilityReportFiles = []
                }
            })
        },
        //获取选择项目组数据
@@ -125,6 +139,61 @@
            this.tableData = [data]
            this.$forceUpdate()
            this.showChoose = false
        },
         // 上传前校验
         beforeUpload(file) {
            return true;
        },
        // 自定义上传处理
        handleUpload(options) {
            const { file, onSuccess, onError } = options;
            // 使用封装的customUploadRequest方法
            customUploadRequest({
                file,
                onSuccess: (res) => {
                    console.log()
                    if (res.code === 200) {
                        const fileObj = {
                            id: new Date().getTime(),
                            reportId: this.$route.query.id ? this.$route.query.id : '',
                            fileUrl: res.msg || res.data || '',
                            reportType: 1, // 可行性研究报告类型
                            fileName: file.name,
                            fileSize: file.size,
                        };
                        // 添加到文件列表显示
                        this.fileList.push({
                            name: file.name,
                            url: getFullUrl(fileObj.fileUrl),
                            uid: fileObj.id
                        });
                        // 添加到表单数据
                        this.form.feasibilityReportFiles.push(fileObj);
                        this.$message.success('文件上传成功');
                        onSuccess(res);
                    } else {
                        this.$message.error(res.message || '文件上传失败');
                        onError();
                    }
                },
                onError: (err) => {
                    this.$message.error('文件上传失败');
                    onError(err);
                }
            });
        },
        // 删除文件
        handleRemove(file) {
            const index = this.fileList.findIndex(item => item.name === file.name);
            if (index !== -1) {
                this.fileList.splice(index, 1);
                this.form.feasibilityReportFiles.splice(index, 1);
            }
        },
        submit() {
            console.log(this.$refs.materialEditor.getContent());
@@ -184,9 +253,19 @@
                if (valid) {
                    this.loading = true
                    if (this.$route.query.id) {
                        editData({ ...data, id: this.$route.query.id }).then(res => {
                            if (res.code === 200) {
                                this.$message.success('修改成功')
                                this.$router.back()
                            } else {
                                this.$message.error(res.message)
                            }
                        })
                    } else {
                    addData({ ...data }).then(res => {
                        if (res.code === 200) {
                            this.$message.success('提交成功')
                                this.$message.success('发布成功')
                            this.$router.back()
                        } else {
                            this.$message.error(res.message)
@@ -195,6 +274,7 @@
                        this.loading = false
                    })
                }
                }
            })
        },
    },
laboratory/src/views/reportLibrary/projectProposalLibrary/components/approval/index.vue
@@ -78,7 +78,7 @@
                            <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2">
                                通过
                            </div>
                            <div class="reject" :class="status == '3' && 'activeStatus'" @click.stop="status = 3">
                            <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4">
                                驳回
                            </div>
                        </div>
@@ -96,7 +96,7 @@
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确定</el-button>
        </div>
    </el-dialog>
</template>
laboratory/src/views/reportLibrary/projectProposalLibrary/index.vue
@@ -36,8 +36,8 @@
                        </el-select>
                    </el-form-item>
                    <el-form-item label="" style="margin-left: 63px;">
                        <el-button type="default" style="margin-right: 10px;">重置</el-button>
                        <el-button type="primary">查询</el-button>
                        <el-button type="default" style="margin-right: 10px;" @click="handleReset">重置</el-button>
                        <el-button type="primary" @click="handleSearch">查询</el-button>
                    </el-form-item>
                </el-form>
            </template>
@@ -73,11 +73,12 @@
                    <template #default="{ row }">
                        <el-button type="text" @click="handleApproval(row)"
                            v-if="row.status == 1 && [1, 2].includes(roleType)">审核</el-button>
                        <el-button type="text" @click="handleDetail(row)">详情</el-button>
                        <el-button type="text" @click="handleDelete(row)"
                            v-if="[4, 5].includes(row.status) && roleType == 3">删除</el-button>
                        <el-button type="text" @click="handleDetail(row)" v-if="!isDraft">详情</el-button>
                        <el-button type="text" @click="handleEdit(row)"
                            v-if="[4, 5].includes(row.status) && roleType == 3">编辑</el-button>
                            v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">编辑</el-button>
                        <el-button type="text" @click="handleDelete(row)"
                            v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">删除</el-button>
                        <el-button type="text" @click="handleRevoke(row)"
                            v-if="row.status == 1 && roleType == 3">撤销审批</el-button>
                    </template>
@@ -211,6 +212,15 @@
            } else {
                data = this.form
            }
            // 处理日期范围
            if (this.form.date && this.form.date.length === 2) {
                data.startTime = this.form.date[0]
                data.endTime = this.form.date[1]
            } else {
                data.startTime = ''
                data.endTime = ''
            }
            getDataList(data).then(res => {
                if (res.code === 200) {
                    this.tableData = res.data.records || []
@@ -232,6 +242,18 @@
                    this.getList()
                }
            })
        },
        handleReset() {
            this.form.pageNum = 1
            this.form.teamName = ''
            this.form.reportName = ''
            this.form.reportCode = ''
            this.form.date = ''
            this.form.status = ''
            this.getList()
        },
        handleSearch() {
            this.getList()
        }
    }
}
laboratory/src/views/reportLibrary/verificationRelease/add.vue
@@ -28,7 +28,7 @@
                    </div>
                </div>
                <el-form-item prop="reportCode" style="margin-top: 38px">
                    <el-input v-model="form.reportCode" style="width: 100%;" placeholder="请输入报告编号" />
                    <el-input v-model="form.reportCode" disabled style="width: 100%;" placeholder="请输入报告编号" />
                </el-form-item>
                <div class="header-title" style="width: 100%;">
@@ -58,8 +58,10 @@
                    </div>
                </div>
                <el-form-item prop="name" style="margin-top: 38px">
                    <el-upload action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList">
                    <el-upload action="#" :file-list="fileList" :http-request="handleUpload"
                        :before-upload="beforeUpload" :on-remove="handleRemove">
                        <el-button size="small" type="primary">点击上传</el-button>
                        <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div>
                    </el-upload>
                </el-form-item>
@@ -78,6 +80,7 @@
import AiEditor from '@/components/AiEditor'
import chooseProject from '@/components/chooseProject'
import { addData, getDetail, editData } from './service'
import { customUploadRequest, getFullUrl } from '@/utils/utils'
export default {
    components: {
        AiEditor,
@@ -89,15 +92,16 @@
            form: {
                reportCode: "",
                reportName: "",
                reportText: ""
                reportText: "",
                feasibilityReportFiles: [] // 添加附件数组
            },
            tableData: [],
            fileList: [], // 附件列表
            showChoose: false,
            rules: {
                reportCode: [
                    { required: true, message: '请输入报告编号', trigger: 'blur' }
                ],
                // reportCode: [
                //     { required: true, message: '请输入报告编号', trigger: 'blur' }
                // ],
                reportName: [
                    { required: true, message: '请输入报告名称', trigger: 'blur' }
                ],
@@ -117,7 +121,18 @@
            getDetail(this.$route.query.id).then(res => {
                this.form = res
                this.tableData = [{ ...res.projectTeam, staffName: res.staffNames }]
                this.fileList = res.fileList
                // 处理文件回显
                if (res.feasibilityReportFiles && res.feasibilityReportFiles.length > 0) {
                    this.fileList = res.feasibilityReportFiles.map(file => ({
                        name: file.fileName,
                        url: getFullUrl(file.fileUrl),
                        uid: file.id
                    }))
                    this.form.feasibilityReportFiles = res.fileList
                } else {
                    this.fileList = []
                    this.form.feasibilityReportFiles = []
                }
            })
        },
        //获取选择项目组数据
@@ -125,6 +140,61 @@
            this.tableData = [data]
            this.$forceUpdate()
            this.showChoose = false
        },
        // 上传前校验
        beforeUpload(file) {
            return true;
        },
        // 自定义上传处理
        handleUpload(options) {
            const { file, onSuccess, onError } = options;
            // 使用封装的customUploadRequest方法
            customUploadRequest({
                file,
                onSuccess: (res) => {
                    console.log()
                    if (res.code === 200) {
                        const fileObj = {
                            id: new Date().getTime(),
                            reportId: this.$route.query.id ? this.$route.query.id : '',
                            fileUrl: res.msg || res.data || '',
                            reportType: 4, // 可行性研究报告类型
                            fileName: file.name,
                            fileSize: file.size,
                        };
                        // 添加到文件列表显示
                        this.fileList.push({
                            name: file.name,
                            url: getFullUrl(fileObj.fileUrl),
                            uid: fileObj.id
                        });
                        // 添加到表单数据
                        this.form.feasibilityReportFiles.push(fileObj);
                        this.$message.success('文件上传成功');
                        onSuccess(res);
                    } else {
                        this.$message.error(res.message || '文件上传失败');
                        onError();
                    }
                },
                onError: (err) => {
                    this.$message.error('文件上传失败');
                    onError(err);
                }
            });
        },
        // 删除文件
        handleRemove(file) {
            const index = this.fileList.findIndex(item => item.name === file.name);
            if (index !== -1) {
                this.fileList.splice(index, 1);
                this.form.feasibilityReportFiles.splice(index, 1);
            }
        },
        submit() {
            console.log(this.$refs.materialEditor.getContent());
@@ -140,6 +210,7 @@
                }
                let data = {
                    ...this.form,
                    reportType: 4,
                    status: 1,
                    reportText: this.$refs.materialEditor.getContent(),
                    teamId: this.tableData[0].id
@@ -175,6 +246,7 @@
            this.$refs.form.validate((valid) => {
                let data = {
                    ...this.form,
                    reportType: 4,
                    status: -1,
                    reportText: this.$refs.materialEditor.getContent(),
                    teamId: this.tableData[0].id
@@ -184,9 +256,19 @@
                if (valid) {
                    this.loading = true
                    if (this.$route.query.id) {
                        editData({ ...data, id: this.$route.query.id }).then(res => {
                            if (res.code === 200) {
                                this.$message.success('修改成功')
                                this.$router.back()
                            } else {
                                this.$message.error(res.message)
                            }
                        })
                    } else {
                    addData({ ...data }).then(res => {
                        if (res.code === 200) {
                            this.$message.success('提交成功')
                                this.$message.success('发布成功')
                            this.$router.back()
                        } else {
                            this.$message.error(res.message)
@@ -195,6 +277,7 @@
                        this.loading = false
                    })
                }
                }
            })
        },
    },
laboratory/src/views/reportLibrary/verificationRelease/components/approval/index.vue
@@ -78,7 +78,7 @@
                            <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2">
                                通过
                            </div>
                            <div class="reject" :class="status == '3' && 'activeStatus'" @click.stop="status = 3">
                            <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4">
                                驳回
                            </div>
                        </div>
@@ -96,7 +96,7 @@
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确定</el-button>
        </div>
    </el-dialog>
</template>
@@ -189,9 +189,10 @@
                if (data.status == 2 || data.status == 3) {
                    processData.push({
                        type: data.status === 2 ? "primary" : "danger",
                        type: "primary",
                        mode: "list",
                        fields: [
                            { label: "审核结果:", value: data.status == 4 ? '驳回' : "通过" || "" },
                            { label: "审批意见:", value: data.auditRemark || "" },
                            { label: "审核人:", value: data.auditPersonName || "" },
                            { label: "审核时间:", value: data.auditTime || "" },
@@ -220,7 +221,7 @@
                        type: "success",
                        mode: "list",
                        fields: [
                            { label: "已评定" },
                            { label: "评定状态:已评定" },
                            { label: "评定人:", value: data.evaluatePersonName || "" },
                            { label: "评定时间:", value: data.evaluateTime || "" }
                        ],
laboratory/src/views/reportLibrary/verificationRelease/index.vue
@@ -37,8 +37,8 @@
                        </el-select>
                    </el-form-item>
                    <el-form-item label="" style="margin-left: 63px;">
                        <el-button type="default" style="margin-right: 10px;">重置</el-button>
                        <el-button type="primary">查询</el-button>
                        <el-button type="default" style="margin-right: 10px;" @click="handleReset">重置</el-button>
                        <el-button type="primary"  @click="handleSearch">查询</el-button>
                    </el-form-item>
                </el-form>
            </template>
@@ -75,11 +75,12 @@
                    <template #default="{ row }">
                        <el-button type="text" @click="handleApproval(row)"
                            v-if="row.status == 1 && [1, 2].includes(roleType)">审核</el-button>
                        <el-button type="text" @click="handleDetail(row)">详情</el-button>
                        <el-button type="text" @click="handleDelete(row)"
                            v-if="[4, 5].includes(row.status) && roleType == 3">删除</el-button>
                        <el-button type="text" @click="handleDetail(row)" v-if="!isDraft">详情</el-button>
                        <el-button type="text" @click="handleEdit(row)"
                            v-if="[4, 5].includes(row.status) && roleType == 3">编辑</el-button>
                            v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">编辑</el-button>
                        <el-button type="text" @click="handleDelete(row)"
                            v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">删除</el-button>
                        <el-button type="text" @click="handleRevoke(row)"
                            v-if="row.status == 1 && roleType == 3">撤销审批</el-button>
                    </template>
@@ -137,6 +138,18 @@
    },
    methods: {
        handleReset() {
            this.form.pageNum = 1
            this.form.teamName = ''
            this.form.reportName = ''
            this.form.reportCode = ''
            this.form.date = ''
            this.form.status = ''
            this.getList()
        },
        handleSearch() {
            this.getList()
        },
        handleApproval(row) {
            this.rowData = row
            this.showApproval = true
@@ -148,14 +161,14 @@
        },
        handleEdit(row) {
            this.$router.push({
                path: '/reportLibrary/',
                path: '/reportLibrary/editVerificationRelease',
                query: {
                    id: row.id
                }
            })
        },
        handleAddProject() {
            this.$router.push('/reportLibrary/addProjectProposalLibrary')
            this.$router.push('/reportLibrary/addVerificationRelease')
        },
        changeTab(status) {
            if (status == -1) {
@@ -214,6 +227,14 @@
            } else {
                data = this.form
            }
              // 处理日期范围
              if (this.form.date && this.form.date.length === 2) {
                data.startTime = this.form.date[0]
                data.endTime = this.form.date[1]
            } else {
                data.startTime = ''
                data.endTime = ''
            }
            getDataList(data).then(res => {
                if (res.code === 200) {
                    this.tableData = res.data.records || []