Admin
2022-11-24 f330cf8c266964baff0817c11227dae2f2e5ac83
src/views/specialCheck/components/areaEnterprises.vue
@@ -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,21 @@
        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
                console.log(row.checkUnitType,'type')
                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.unitType = row.checkUnitType
                    t.$refs.detail.enterpriseType = t.enterpriseType
                    t.$refs.detail.getEnterpriseInfo()
                    t.$refs.detail.dialogVisible = true
                }
            }
        },
    }