lyfO_o
2022-06-02 4d482d7ce36f1e779677cdaef0475b5a2030e31b
Merge remote-tracking branch 'origin/master' into master
已修改5个文件
126 ■■■■ 文件已修改
config/dev.env.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/inspectionTask.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePreventAction/hiddenDanger/inspectionTask/index.vue 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePreventAction/riskLevelManage/analyseUnit/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
config/dev.env.js
@@ -17,13 +17,13 @@
  //   BASE_API: '"http://220.171.99.118:4100"',
  //   IMG_API: '"http://220.171.99.118:4100/upload/"',
      // BASE_API: '"http://192.168.0.35:8006"',
      // // IMG_API: '"http://192.168.0.35:8006/upload/"',
      // BASE_API: '"http://192.168.0.35:8006"',
      // IMG_API: '"http://192.168.0.35:8006/upload/"',
      BASE_API: '"http://192.168.0.35:8006"',
      IMG_API: '"http://192.168.0.35:8006/upload/"',
      // BASE_API: '"http://192.168.0.62:8006"',
      // IMG_API: '"http://192.168.0.62:8006/upload/"',
    BASE_API: '"http://222.92.213.22:8006/zhongtai"',
    IMG_API: '"http://222.92.213.22:8006/zhongtai/upload/"',
    // BASE_API: '"http://222.92.213.22:8006/zhongtai"',
    // IMG_API: '"http://222.92.213.22:8006/zhongtai/upload/"',
    // NANO_API: '"http://222.92.213.22:8006/nanoweb"',
    // ZT_API:'"http://123.56.127.115:8011"'
    // BASE_API: '"http://localhost:8006"',
src/api/inspectionTask.js
@@ -35,14 +35,23 @@
    })
}
export function closeInspectionTask(data) {
    return request({
        headers: {
            'Authorization': getToken()
        },
        url: process.env.BASE_API + '/safecheck/work/close?workId=' + data,
        method: 'post',
    })
}
export function deleteInspectionTask(data) {
    return request({
        headers: {
            'Authorization': getToken()
        },
        url: process.env.BASE_API + '/riskAnaUnit/del',
        url: process.env.BASE_API + '/safecheck/work/delete?workId=' + data,
        method: 'post',
        data:data
    })
}
src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue
@@ -20,7 +20,7 @@
                   <el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width">
                    <template slot-scope="scope">
                        <el-button type="text" @click="showMeasureDetail(scope.row)" v-show="ifEdit">详情</el-button>
                        <el-button type="text" style="color:red;" @click="deleteById(scope.$index)">删除</el-button>
                        <el-button type="text" style="color:red;" @click="deleteById(scope.$index,scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -111,7 +111,7 @@
                    }
                }
            },
            deleteById(value){
            deleteById(value,scope){
                if(this.title === '新建巡检计划设定'){
                    this.inspectionPointData.splice(value,1)
                }else{
@@ -120,7 +120,8 @@
                    cancelButtonText:'取消',
                    type:'warning',
                    }).then(()=> {
                        deleteInspectionControlAction({workId:value.workId,measureId:value.measureId}).then( (res)=>{
                        debugger
                        deleteInspectionControlAction({workId:scope.workId,measureId:scope.measureId}).then( (res)=>{
                            if(res.data.code === '200'){
                                this.getControlActionList()
                                this.$notify({
src/views/doublePreventAction/hiddenDanger/inspectionTask/index.vue
@@ -22,7 +22,7 @@
            </div>
            <div class="basic_search">
                <span>巡检任务状态:</span>
                <el-select v-model="listQuery.status">
                <el-select v-model="listQuery.status" clearable>
                    <el-option
                        v-for="item in statusList"
                        :key="item.id"
@@ -104,10 +104,21 @@
                </el-table-column>
                <el-table-column label="创建时间" prop="createTime" align="center">
                </el-table-column>
                <el-table-column label="状态" prop="createTime" align="center">
                    <template slot-scope="scope">
                        <div v-for="item in statusList">
                            <div v-show="scope.row.status === item.id">
                                <el-tag :type="scope.row.status === 1 ? 'primary' : (scope.row.status === 2 ? 'warning' : (scope.row.status === 3 ? 'danger' : 'info'))">{{item.name}}</el-tag>
                            </div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width">
                    <template slot-scope="scope">
                        <el-button type="text" @click="showAnalyseUnitForm(scope.row,'编辑')">编辑</el-button>
                        <el-button type="text" style="color: red" @click="deleteById(scope.row)">删除</el-button>
                        <el-button type="text" @click="openTask(scope.row,'编辑')">开启</el-button>
                        <el-button type="text" style="color: red" @click="closeTask(scope.row)">关闭</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -281,7 +292,12 @@
    import { mapGetters } from 'vuex'
    import { computePageCount } from '@/utils'
    import inspectionPoint from './components/inpectionPoint'
    import { getInspectionTask , addInspectionTask, updateInspectionTask} from "../../../../api/inspectionTask";
    import {
        getInspectionTask,
        addInspectionTask,
        updateInspectionTask,
        deleteInspectionTask, closeInspectionTask
    } from "../../../../api/inspectionTask";
    import {getAllDepartment, getDepartmentList} from "../../../../api/departmentManage";
    import {safetyInspectionItemName} from "../../../../api/safetySelfInspection";
    export default {
@@ -326,7 +342,7 @@
                userList:[],
                // noticeUidList:[],
                execUidList:[],
                statusList:[{name:'任务开启',id:1},{id:2,name:'任务关闭'}],
                statusList:[{name:'任务开启',id:1},{id:2,name:'任务关闭'},{id:3,name:'删除'},{id:4,name:'过期'}],
                intervalSecondsList:[{id:3600,name:'1小时'},{id:7200,name:'2小时'},{id:21600,name:'6小时'},{id:28800,name:'8小时'},{id:43200,name:'12小时'},{id:86400,name:'1天'},{id:17280,name:'2天'},{id:604800,name:'每周'},{id:2592000,name:'每月'},{id:7862400,name:'每季度'}],
                noticeSecondsList:[{id:600,name:'10分'},{id:3600,name:'1小时'},{id:7200,name:'2小时'},{id:21600,name:'6小时'},{id:43200,name:'12小时'},{id:86400,name:'1天'}],
                effectSecondsList:[{id:1800,name:'30分'},{id:3600,name:'1小时'},{id:7200,name:'2小时'},{id:21600,name:'6小时'},{id:43200,name:'12小时'},{id:86400,name:'1天'}],
@@ -472,7 +488,7 @@
                    this.execDepartment = this.handleDepartment(JSON.parse(JSON.stringify(value)).execUid)
                    this.changeExec()
                    this.inspectionTaskForm = JSON.parse(JSON.stringify(value))
                    this.inspectionTaskForm.execUid = value.execUname
                    this.inspectionTaskForm.execUid = value.execUid
                    // this.inspectionTaskForm.noticeUid = value.noticeUname
                     setTimeout(() => {
                        this.$refs.inspectionPoint.inspectionPointData =  this.inspectionTaskForm.checkContents
@@ -536,7 +552,8 @@
                                    // noticeUid: this.inspectionTaskForm.noticeUid,
                                    startTime: this.inspectionTaskForm.startTime,
                                    status: this.inspectionTaskForm.status,
                                    workId: this.inspectionTaskForm.workId
                                    workId: this.inspectionTaskForm.workId,
                                    title: this.inspectionTaskForm.title
                                    }).then((res)=>{
                                    if(res.data.code === '200'){
                                        this.inspectionTaskVisible = false
@@ -577,13 +594,66 @@
                    return true
                }
            },
            openTask(val,type){
                if(val.status !== 2){
                    this.$message({
                        type:'warning',
                        message:'当前状态不可开启'
                    })
                    return
                }
                this.showAnalyseUnitForm(val,type)
                this.inspectionTaskForm.status = 1
            },
            closeTask(val){
                if(val.status !== 1){
                    this.$message({
                        type:'warning',
                        message:'当前状态不可关闭'
                    })
                    return
                }
                this.$confirm('关闭此条任务,是否继续','提示',{
                    confirmButtonText:'确定',
                    cancelButtonText:'取消',
                    type:'warning',
                }).then(()=> {
                    closeInspectionTask(val.workId).then( (res)=>{
                        if(res.data.code === '200'){
                            this.getInspectionTaskData()
                            this.$notify({
                                title:'成功',
                                message:'关闭成功',
                                type:'success',
                                duration:2000,
                            })
                        }else{
                            this.$message({
                                type:'warning',
                                message:res.data.message
                            })
                        }
                    })
                })
            },
            deleteById(val){
                if(val.status !== 2){
                    this.$message({
                        type:'warning',
                        message:'当前状态不可删除'
                    })
                    return
                }
                this.$confirm('删除此条信息,是否继续','提示',{
                    confirmButtonText:'确定',
                    cancelButtonText:'取消',
                    type:'warning',
                }).then(()=> {
                    deleteAnalyseUnit({id:val.id}).then( ()=>{
                    deleteInspectionTask(val.workId).then( (res)=>{
                        if(res.data.code === '200'){
                        this.getInspectionTaskData()
                        this.$notify({
                            title:'成功',
@@ -591,6 +661,12 @@
                            type:'success',
                            duration:2000,
                        })
                        }else{
                            this.$message({
                                type:'warning',
                                message:res.data.message
                            })
                        }
                    })
                })
            },
src/views/doublePreventAction/riskLevelManage/analyseUnit/index.vue
@@ -30,6 +30,7 @@
            </div>
            <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button>
            <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showAnalyseUnitForm('','新增')">新增</el-button>
            <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary"  @click="showDepartmentChart()">图表</el-button>
        </div>
        <div class="table_content">
            <el-table
@@ -82,8 +83,6 @@
        <el-dialog :title="title" :visible.sync="analyseUnitVisible" :modal-append-to-body="false" :close-on-click-modal="false" width="600px">
            <el-form ref="analyseUnitForm" :rules="analyseUnitFormRules" :model="analyseUnitForm" label-position="right" label-width="165px">
                <el-form-item label="责任部门" prop="hazardDep">
                    <el-row>
                        <el-col :span="21">
                            <el-select v-model="analyseUnitForm.hazardDep" value-key="item" class="analyseUnit_input" @change="departmentChange" @clear="departmentClear">
                                <el-option
                                    v-for="item in departmentList"
@@ -92,13 +91,6 @@
                                    :label="item.department"
                                ></el-option>
                            </el-select>
                        </el-col>
                        <el-col :span="3">
                            <img src="../../../../assets/map.png" class="image" @click="showDepartmentChart"></img>
                        </el-col>
                    </el-row>
                </el-form-item>
                <el-form-item label="责任人" prop="hazardLiablePerson">
                    <el-select v-model="analyseUnitForm.hazardLiablePerson" value-key="item" class="analyseUnit_input"@change="personChange" @clear="personClear" >