马宇豪
2025-05-22 20e7bce4b0c485698ce0f6e59f9e074e455476a5
修改导出
已修改6个文件
30 ■■■■ 文件已修改
index.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/static/exampleScience.docx 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/assessApply/components/reportDialog.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/assessApply/index.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/assessApply/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/identify/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
index.html
@@ -4,6 +4,10 @@
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="Cache-Control" content="no-cache,no-store,must-revalidate"/>
        <meta http-equiv="Cache" content="no-cache">
        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Expires" content="0" />
        <meta
            name="keywords"
            content="vue-next-admin,vue-prev-admin,vue-admin-wonderful,后台管理系统一站式平台模板,希望可以帮你完成快速开发。vue2.x,vue2.0,vue2,vue3,vue3.x,vue3.0,CompositionAPI,typescript,element plus,element,plus,admin,wonderful,wonderful-next,vue-next-admin,vite,vite-admin,快速,高效,后台模板,后台系统,管理系统"
public/static/exampleScience.docx
Binary files differ
src/views/analyse/assessApply/components/reportDialog.vue
@@ -275,6 +275,7 @@
    },
    allPersonList: [],
    allRoomList: [],
    phaList: [],
    systemPersonList: [],
    experimentTypeList: [
      {id: 1, name: '化学类'},
@@ -333,7 +334,6 @@
        //     }
        // }
    }
    console.log(reportDialogState.reportForm,'form')
};
const isValidKey = (key: string | number | symbol, object:object): key is keyof typeof object =>{
@@ -345,7 +345,8 @@
    experimentId: id,
    pageIndex: 1,
    pageSize: 10,
    tag: 3
    tag: 3,
    exportTag:true
  });
  if(res.data.code === 100){
    reportDialogState.reportForm = {
@@ -384,6 +385,7 @@
          reportDialogState.reportForm[i] = res.data.data[0][i];
        }
      }
      reportDialogState.phaList = res.data.data[0].riskPlanMethodBO ?res.data.data[0].riskPlanMethodBO: []
      const arr = reportDialogState.reportForm.experimentAndType.map(item => item.type.experimentType)
      typeValue.value = arr.join(',')
    }
@@ -543,9 +545,13 @@
    }
  })
  data.riskLevel = levelExample
  data.tableData = data.oldRiskAssess ?data.oldRiskAssess: []
  // data.tableData = data.oldRiskAssess ?data.oldRiskAssess: []
  data.phaData = reportDialogState.phaList.map(item=>{
    return {
      ...item,
      riskLevelName: item.riskLevel == 1?'低风险':item.riskLevel == 2?'一般风险':item.riskLevel == 3?'较大风险':item.riskLevel == 4?'重大风险':'--'
    }
  })
  data.riskSource = data.riskSource ? data.riskSource.map(item => {
    return {
      ...item,
@@ -555,7 +561,7 @@
  data.safeRiskAnalysis = data.safeRiskAnalysis ?data.safeRiskAnalysis : ''
  console.log(data,'data')
  try {
    generateWordDocument(templatePath, data, `材料科学姑苏实验室安全风险评估表---${data.experimentName}.docx`);
src/views/analyse/assessApply/index.ts
@@ -34,6 +34,7 @@
    reportFormRules: object
    allPersonList: Array<AllPersonListType>
    systemPersonList: Array<AllPersonListType>
    phaList: []
    allRoomList: Array<RoomType>,
    experimentTypeList: Array<Type>
    riskSourceTypeList: Array<Type>
src/views/analyse/assessApply/index.vue
@@ -69,8 +69,8 @@
                        </el-table-column>
                        <el-table-column label="操作" width="250" fixed="right">
                            <template #default="scope">
                                <el-button size="small" v-if="scope.row.stage == 3" text type="primary" :icon="Edit" @click="toReport(scope.row,0)">生成评估报告</el-button>
                                <el-button size="small" v-if="scope.row.stage == 4" text type="primary" :icon="Edit" @click="toReport(scope.row,1)">重新生成报告</el-button>
                                <el-button size="small" v-if="scope.row.stage >= 3 && !scope.row.reportId" text type="primary" :icon="Edit" @click="toReport(scope.row,0)">生成评估报告</el-button>
                                <el-button size="small" v-if="scope.row.stage >= 3 && scope.row.reportId" text type="primary" :icon="Edit" @click="toReport(scope.row,1)">重新生成报告</el-button>
                                <el-button size="small" text type="primary" :icon="Edit" @click="openRiskDialog(scope.row)">管理实验风险单元</el-button>
                                <el-button size="small" v-if="scope.row.stage == 4 && !scope.row.assessPerson" text type="primary" :icon="View" @click="openReportDialog('提交', scope.row)">提交审批</el-button>
                                <el-button size="small" v-if="scope.row.stage == 4 && scope.row.assessPerson" text type="primary" :icon="View" @click="openReportDialog('修改', scope.row)">修改</el-button>
src/views/analyse/identify/index.vue
@@ -21,10 +21,11 @@
              :json-data="identifyState.allData"
              :fields="fields"
              default-value="--"
              type="primary"
              name="风险辨识记录.xls"
              v-if="identifyState.isAdmin"
          >
            <el-button plain :icon="Download" style="margin-left: 12px">导出</el-button>
            <el-button type="primary" :icon="Download" style="margin-left: 12px">导出</el-button>
          </vue3-json-excel>
        </div>
      </el-row>