| | |
| | | // 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"', |
| | |
| | | }) |
| | | } |
| | | |
| | | 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 |
| | | }) |
| | | } |
| | | |
| | |
| | | <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> |
| | |
| | | } |
| | | } |
| | | }, |
| | | deleteById(value){ |
| | | deleteById(value,scope){ |
| | | if(this.title === '新建巡检计划设定'){ |
| | | this.inspectionPointData.splice(value,1) |
| | | }else{ |
| | |
| | | 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({ |
| | |
| | | </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" |
| | |
| | | </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> |
| | |
| | | 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 { |
| | |
| | | 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天'}], |
| | |
| | | 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 |
| | |
| | | // 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 |
| | |
| | | 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:'成功', |
| | |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |