马宇豪
2024-11-26 bd19a941293d124d7c58c6d351e7e86c1fa15559
src/views/dataUpload/saftyBaseInfo/judgeReport/index.vue
@@ -24,6 +24,14 @@
                    <el-button v-if="scope.row.files !== ''" size="small" text type="primary" @click="openFile(scope.row.files)">查看</el-button>
                  </template>
                </el-table-column>
                <el-table-column prop="threeMeanwhileType" label="安全三同时文件类型" show-overflow-tooltip>
                  <template #default="scope">
                    <span v-if="scope.row.type == 2">
                      {{getTypeName(scope.row.threeMeanwhileType)}}
                    </span>
                    <span v-else>/</span>
                  </template>
                </el-table-column>
                <el-table-column label="操作" width="140">
                    <template #default="scope">
                        <el-button size="small" text type="primary" @click="openDialog('update',scope.row)">重新上报</el-button>
@@ -67,6 +75,7 @@
    pageSize: number
  }
  total: null | number
  typeList: Array<object>
}
export default defineComponent({
@@ -81,7 +90,29 @@
          pageIndex: 1,
          pageSize: 10
        },
        total: null
        total: null,
        typeList: [
          {
            value: 'TMT1',
            label: '立项文件'
          },
          {
            value: 'TMT2',
            label: '安全预评价报告',
          },
          {
            value: 'TMT3',
            label: '设计专篇'
          },
          {
            value: 'TMT4',
            label: '安全验收报告'
          },
          {
            value: 'TMT5',
            label: '安全现状报告'
          }
        ]
      });
      // 页面加载时
@@ -103,7 +134,11 @@
      }
      const openDialog=(type:string,data:object)=>{
        reportRef.value.open(type,data)
        reportRef.value.open(type,data,state.typeList)
      }
      const getTypeName = (type: string)=>{
        return state.typeList.find(i=>i.value == type)?.label
      }
      const openFile=(file: string)=>{
@@ -162,6 +197,7 @@
      return {
        reportRef,
        openFile,
        getTypeName,
        openDialog,
        getData,
        onRowDel,