13937891274
2022-05-17 331c3bed75c95d13d79e84f5ba4d0500716fc703
src/views/oneFromanother/index.vue
@@ -4,7 +4,7 @@
            <el-form-item label="下发单位">
               <el-select v-model="listQuery.form.ht_typesub" placeholder="请选择">
                    <el-option
                        v-for="item in YHLXList"
                        v-for="item in XFDWList"
                        :key="item.value"
                        :label="item.value"
                        :value="item.value">
@@ -17,7 +17,7 @@
            <el-form-item label="隐患类别">
                <el-select v-model="listQuery.form.ht_typesub" placeholder="请选择">
                    <el-option
                        v-for="item in YHLXList"
                        v-for="item in YHLBList"
                        :key="item.value"
                        :label="item.value"
                        :value="item.value">
@@ -40,7 +40,7 @@
               <el-form-item label="检查类别">
                <el-select v-model="listQuery.form.ht_typesub" placeholder="请选择">
                    <el-option
                        v-for="item in YHLXList"
                        v-for="item in JCLBList"
                        :key="item.value"
                        :label="item.value"
                        :value="item.value">
@@ -76,30 +76,38 @@
            <el-radio-button label="已自查">已自查</el-radio-button>
          </el-radio-group>
            </el-col>
            <el-col :span="14" style="text-align:right;">
            <el-col :span="14" v-if="radio1=='待自查'" style="text-align:right;">
                <el-button class="btns" type="primary" size="small" @click="sendBath()">管理专业</el-button>
            </el-col>
              <el-col :span="14" v-if="radio1=='已自查'" style="text-align:right;">
                <el-button class="btns" type="primary" size="small" @click="sendBath()">撤销</el-button>
            </el-col>
        </el-row>
         <el-table ref="dataTable" :data="tableData" style="width: 100%" @selection-change="handleSelectionChange">
         <el-table
            v-loading="listLoading"
            :data="tableData"
            style="width: 100%"
            @selection-change="changeBox">
            <el-table-column type="selection" width="55" align="center"></el-table-column>
          <el-table-column prop="check_date" label="检查时间" width="120" align="center">
                    <template slot-scope="scope">
                    <!-- <template slot-scope="scope">
                        <label>{{ formatDate(scope.row.check_date)}}</label><br/>
                        <label>{{ scope.row.check_class}}</label>
                    </template>
                    </template> -->
                </el-table-column>
            <el-table-column prop="check_branch" label="检查单位" align="center"></el-table-column>
            <el-table-column prop="check_main_branch" label="检查单位" align="center"></el-table-column>
            <el-table-column prop="checktype" label="检查类别" align="center"></el-table-column>
                <el-table-column prop="measure" label="被检单位" align="center"></el-table-column>
            <el-table-column prop="date" label="隐患类别" align="center"></el-table-column>
            <el-table-column prop="DTRisk_level" label="隐患级别" align="center"></el-table-column>
            <el-table-column prop="warningLevel" label="隐患地点" align="center"></el-table-column>
            <el-table-column prop="curWarningLevel" label="内容" width="200" align="center"></el-table-column>
            <el-table-column prop="curWarningLevel" label="下发单位" align="center"></el-table-column>
                <el-table-column prop="ht_community" label="被检单位" align="center"></el-table-column>
            <el-table-column prop="ht_typesub" label="隐患类别" align="center"></el-table-column>
            <el-table-column prop="ht_level" label="隐患级别" align="center"></el-table-column>
            <el-table-column prop="address" label="隐患地点" align="center"></el-table-column>
            <el-table-column prop="ht_content" label="内容" width="200" align="center"></el-table-column>
            <el-table-column prop="push_branch" label="下发单位" align="center"></el-table-column>
            <el-table-column prop="date" label="流程操作" align="center">
                <template slot-scope="scope">
                    <el-button @click="handleClick(scope.row)" type="text" size="small">不存在</el-button>
                    <el-button @click="handleClick(scope.row)" type="text" size="small">存在</el-button>
                    <el-button @click="handleClick(scope.row)" type="text"  size="small">不存在</el-button>
                    <el-button @click="handleClick(scope.row)" type="text" v-if="radio1=='已自查'" size="small">追查结果</el-button>
                    <el-button @click="handleClick(scope.row,'存在')" type="text"  v-if="radio1=='待自查'" size="small">存在</el-button>
                </template>
            </el-table-column>
        </el-table>
@@ -116,17 +124,123 @@
            >
            </el-pagination>
        </div>
    </div>
</template>
<script>
    import { getPageList } from "@/api/sgyhpczl/oneFromanother"
    import {initJCBM, initYHLX, initJCLB, initYHJB} from "@/api/sgyhpczl/initSelect";
    export default{
        data(){
            return{
                listQuery:{
                    form:{}
                    page:1,
                    limit:10,
                    type: 0,
                    form:{},
                },
                radio1:'待自查',
                currentPage: 1,
                pageSize: 10,
                recordTotal: 0,
                XFDWList:[],
                YHLBList:[],
                YHJBList:[],
                JCLBList:[],
                tableData:[],
                exportData:[],
                selectedList:[],
                radio1:'待自查',
                listLoading: false,
            }
        },
        mounted() {
            this.getPageList();
            this.initJCLB();
            this.initXFDW();
            this.initYHJB();
            this.initYHLB();
        },
        methods:{
            sendBath(){
                this.$router.push({
                    path:'/manage'
                })
            },
            handleClick(data,val){
                if(val=='存在'){
                    this.$router.push({
                        path:'/exist'
                    })
                }
            },
            initXFDW(){
                initJCBM(1).then(res=>{
                    if (res.data.ok==1){
                        this.XFDWList=res.data.data
                    } else{
                        this.$message({type:'error', message:res.data.msg, duration:3000})
                    }
                })
            },
            initYHLB(){
                initYHLX().then(res=>{
                    if (res.data.ok==1){
                        this.YHLBList=res.data.data
                    } else{
                        this.$message({type:'error', message:res.data.msg, duration:3000})
                    }
                })
            },
            initYHJB(){
                initYHJB().then(res=>{
                    if (res.data.ok==1){
                        this.YHJBList=res.data.data
                    } else{
                        this.$message({type:'error', message:res.data.msg, duration:3000})
                    }
                })
            },
            initJCLB(){
                initJCLB().then(res=>{
                    if (res.data.ok==1){
                        this.JCLBList=res.data.data
                    } else{
                        this.$message({type:'error', message:res.data.msg, duration:3000})
                    }
                })
            },
            //搜索
            getPageList(){
                this.listQuery.page=1
                // this.checkTime()
                getPageList(this.listQuery).then(res=>{
                    if (res.data.ok==1) {
                        this.tableData = res.data.data.items
                        this.recordTotal=res.data.data.total
                    }else{
                        this.$message({type:'error', message:res.data.msg, duration:3000})
                    }
                })
            },
            reset(){
                this.getPageList()
            },
            changeBox(val){
                this.selectedList = []
                val.forEach((item) => {
                    this.selectedList.push(item)
                })
            },
            handleSizeChange(val){
                this.listQuery.limit = val
                this.getPageListForPagination();
            },
            handleCurrentChange(val){
                this.listQuery.page = val
                this.getPageListForPagination();
            },
        }
    }
</script>
@@ -161,4 +275,4 @@
    background-color: #034ea2;
    background-color: #034ea2;
}
</style>
</style>