鲁班七号
2023-01-09 a25e34a84abe514f6e6bf39781c337eea1fd01d3
src/views/specialCheck/components/areaEnterprises.vue
@@ -21,7 +21,7 @@
                <el-table-column label="检查单位" prop="checkUnitName" align="center"></el-table-column>
                <el-table-column label="检查层级" prop="checkUnitType" align="center">
                    <template slot-scope="scope">
                        <span>{{ scope.row.checkUnitType ==1?'省级':(scope.row.checkUnitType ==2?'市级':(scope.row.checkUnitType ==3?'区县级':'自查')) }}</span>
                        <span>{{ scope.row.checkUnitType ==1?'省级':(scope.row.checkUnitType ==2?'地(州、市)级':(scope.row.checkUnitType ==3?'区县级':'自查')) }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="隐患总数" prop="hiddendangerSum" align="center"></el-table-column>
@@ -32,7 +32,7 @@
                <el-table-column label="检查时间" prop="checkTime" align="center"></el-table-column>
                <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
                    <template slot-scope="scope">
                        <el-button type="text" @click="toCheck(scope.row.id)">查看</el-button>
                        <el-button type="text" @click="toCheck(scope.row)">查看</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -41,6 +41,7 @@
          <el-button type="primary" @click="dialogVisible = false">确认</el-button>
        </span>
        <check-details ref="report"></check-details>
        <supervision-details ref="detail"></supervision-details>
    </el-dialog>
</template>
@@ -48,10 +49,12 @@
    import {computePageCount} from "@/utils";
    import { getSpotCheckRecord } from "@/api/specialCheck";
    import checkDetails from "../../selfCheck/components/checkDetails"
    import supervisionDetails from "../../selfCheck/components/supervisionDetails";
    export default {
        name: "areaEnterprises",
        components: {
            supervisionDetails,
            checkDetails
        },
        data(){
@@ -68,12 +71,20 @@
        watch: {
        },
        methods:{
            toCheck(id){
            toCheck(row){
                const t = this
                t.$refs.report.id = id
                t.$refs.report.enterpriseType = t.enterpriseType
                t.$refs.report.getEnterpriseInfo()
                t.$refs.report.dialogVisible = true
                if(row.checkUnitType == 4){
                    t.$refs.report.id = row.id
                    t.$refs.report.enterpriseType = t.enterpriseType
                    t.$refs.report.getEnterpriseInfo()
                    t.$refs.report.dialogVisible = true
                }else{
                    t.$refs.detail.id = row.id
                    t.$refs.detail.checkUnitType = row.checkUnitType
                    t.$refs.detail.enterpriseType = t.enterpriseType
                    t.$refs.detail.getEnterpriseInfo()
                    t.$refs.detail.dialogVisible = true
                }
            }
        },
    }