From 8b9344aa1fb3d7893ea408383a8ba62abe5ebeca Mon Sep 17 00:00:00 2001 From: lct123456 <lucht> Date: 星期一, 25 四月 2022 21:45:18 +0800 Subject: [PATCH] 地图 --- src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue | 1 src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue | 29 +++---- src/components/Tab/Model.vue | 6 + src/views/doublePreventAction/riskLevelManage/fourColorMap/index.vue | 21 ++++- src/views/doublePreventAction/hiddenDanger/inspectionRecord/components/detail.vue | 160 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 195 insertions(+), 22 deletions(-) diff --git a/src/components/Tab/Model.vue b/src/components/Tab/Model.vue index 7b613e7..4b62e25 100644 --- a/src/components/Tab/Model.vue +++ b/src/components/Tab/Model.vue @@ -101,7 +101,13 @@ return this.timestamp && global.map ? global.map.models : []; } }, + mounted() { + this.beginSet() + }, methods: { + beginSet() { + this.focusHandle(this.models[0].id) + }, editHandle(model) { if (!global.map) return; this.model = { diff --git a/src/views/doublePreventAction/hiddenDanger/inspectionRecord/components/detail.vue b/src/views/doublePreventAction/hiddenDanger/inspectionRecord/components/detail.vue new file mode 100644 index 0000000..96ca670 --- /dev/null +++ b/src/views/doublePreventAction/hiddenDanger/inspectionRecord/components/detail.vue @@ -0,0 +1,160 @@ +<template> + <div class="app-container"> + <el-dialog title="巡检记录详情" :visible.sync="inspectionRecordFormVisible" append-to-body :close-on-click-modal="false" width="40%"> + <el-form ref="inspectionRecordForm" :model="inspectionRecordForm" label-position="right" label-width="120px"> + <el-row> + <el-col :span="12"> + <el-form-item label="任务名称" prop="title"> + <el-input v-model="inspectionRecordForm.title" class="analyseUnit_input" :disabled="ifShow"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="检查类型" prop="type"> + <el-select v-model="inspectionRecordForm.type" class="analyseUnit_input" :disabled="ifShow"> + <el-option + v-for="item in typeList" + :key=item.id + :label=item.name + :value=item.id + ></el-option> + </el-select> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="任务名称" prop="noticeUname"> + <el-input v-model="inspectionRecordForm.noticeUname" class="analyseUnit_input" :disabled="ifShow"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="检查类型" prop="execUname"> + <el-input v-model="inspectionRecordForm.execUname" class="analyseUnit_input" :disabled="ifShow"> + </el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="巡检开始时间" prop="startTime"> + <el-date-picker v-model="inspectionRecordForm.execUname" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="周期开始时间" class="analyseUnit_input" :disabled="ifShow" ></el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="巡检结束时间" prop="startTime"> + <el-date-picker v-model="inspectionRecordForm.execUname" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="周期开始时间" class="analyseUnit_input" :disabled="ifShow"></el-date-picker> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="巡检提交时间" prop="execUname"> + <el-date-picker v-model="inspectionRecordForm.execUname" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="周期开始时间" class="analyseUnit_input" :disabled="ifShow"></el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="任务状态" prop="status"> + <el-select v-model="inspectionRecordForm.status" class="analyseUnit_input" :disabled="ifShow"> + <el-option + v-for="item in statusList" + :key="item.id" + :label="item.name" + :value="item.id" + > + </el-option> + </el-select> + </el-form-item> + </el-col> + </el-row> + </el-form> + </el-dialog> + <el-dialog title="巡检单元详情" :visible.sync="inspectionRecordDetailFormVisible" append-to-body :close-on-click-modal="false" width="30%"> + <el-form ref="inspectionRecordDetailForm" :model="inspectionRecordDetailForm" label-position="right" label-width="120px"> + <el-row> + <el-col :span="24"> + <el-form-item label="隐患排查内容" prop="content"> + <el-input v-model="inspectionRecordDetailForm.content" class="input" :disabled="ifShow"> + </el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="24"> + <el-form-item label="上报说明" prop="info"> + <el-input v-model="inspectionRecordDetailForm.info" class="input" :disabled="ifShow"> + </el-input> + </el-form-item> + </el-col> + + </el-row> + <el-row> + <el-col :span="24"> + <el-form-item label="上报照片" prop="img"> + <el-input v-model="inspectionRecordDetailForm.img" class="input" :disabled="ifShow"> + </el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="24"> + <el-form-item label="状态" prop="status"> + <el-select v-model="inspectionRecordDetailForm.status" class="input" :disabled="ifShow"> + <el-option + v-for="item in statusList" + :key="item.id" + :label="item.name" + :value="item.id" + > + </el-option> + </el-select> + </el-form-item> + </el-col> + </el-row> + </el-form> + </el-dialog> + </div> +</template> + +<script> + export default { + name: "detail", + data(){ + return{ + inspectionRecordForm:{}, + inspectionRecordFormVisible:false, + inspectionRecordDetailForm:{}, + inspectionRecordDetailFormVisible:false, + ifShow:true, + typeList:[{id:1,name:'日常检查'},{id:2,name:'周期检查'}], + statusList:[{id:1,name:'待巡检'},{id:2,name:'巡检中'},{id:3,name:'已完成'},{id:4,name:'超时未巡检'},{id:5,name:'已取消'}], + } + }, + components:{ + + }, + methods:{ + showInspectionRecordForm(value) { + this.inspectionRecordFormVisible = true + this.inspectionRecordForm = JSON.parse(JSON.stringify(value)) + }, + showInspectionRecordDetailForm(value) { + this.inspectionRecordDetailFormVisible = true + this.inspectionRecordDetailForm = value + } + } + } +</script> + +<style scoped> +/deep/.filter-container{ + padding-left: 0px !important; +} + .analyseUnit_input{ + width:200px; + } + .input{ + width:400px; + } +</style> diff --git a/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue b/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue index b68cee8..34e3041 100644 --- a/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue +++ b/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue @@ -102,7 +102,7 @@ </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="showMeasureDetail(scope.row)">详情</el-button> + <el-button type="text" @click="showInspectionRecordDetailForm(scope.row)">详情</el-button> </template> </el-table-column> </el-table> @@ -132,7 +132,7 @@ </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="showInspectionRecordForm(scope.row,'编辑')">查看</el-button> + <el-button type="text" @click="showInspectionRecordDetailForm(scope.row,'编辑')">查看</el-button> </template> </el-table-column> </el-table> @@ -177,16 +177,19 @@ <el-button @click="unitFormVisible = false">取消</el-button> </div> </el-dialog> + <detail ref="detail"></detail> </div> </template> <script> + import detail from './components/detail.vue' import { mapGetters } from 'vuex' import { computePageCount } from '@/utils' import { getInspectionRecord } from '@/api/inspectionTask' import {getAllDepartment, getDepartmentList} from "../../../../api/departmentManage"; import {safetyInspectionItemName} from "../../../../api/safetySelfInspection"; export default { + components: { detail }, name: 'index', filters: { parseType(type){ @@ -257,6 +260,9 @@ }, } }, + components: { + detail + }, created() { this.getInspectionRecordData() this.getDepartment() @@ -299,20 +305,11 @@ }) } }, - showAnalyseUnitForm(value,type){ - this.inspectionRecordVisible = true - this.$nextTick(() =>{ - this.$refs["analyseUnitForm"].clearValidate() - }) - if(type === '新增'){ - this.title = '新增' - this.inspectionRecordData = { - - } - }else{ - this.title = '修改' - this.inspectionRecordData = value - } + showInspectionRecordForm(value){ + this.$refs.detail.showInspectionRecordForm(value) + }, + showInspectionRecordDetailForm(value) { + this.$refs.detail.showInspectionRecordDetailForm(value) }, refreshHandle(){ this.getInspectionRecordData() diff --git a/src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue b/src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue index d5607ac..083b51d 100644 --- a/src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue +++ b/src/views/doublePreventAction/hiddenDanger/inspectionTask/components/inpectionPoint.vue @@ -111,7 +111,6 @@ }, deleteById(value){ if(this.title === '新建巡检计划设定'){ - debugger this.inspectionPointData.splice(value,1) }else{ this.$confirm('删除此条措施,是否继续','提示',{ diff --git a/src/views/doublePreventAction/riskLevelManage/fourColorMap/index.vue b/src/views/doublePreventAction/riskLevelManage/fourColorMap/index.vue index 5ef5f54..274bc3e 100644 --- a/src/views/doublePreventAction/riskLevelManage/fourColorMap/index.vue +++ b/src/views/doublePreventAction/riskLevelManage/fourColorMap/index.vue @@ -1,8 +1,18 @@ <template> - <div class="map-layout"> - <Map @init="init" :option="option" v-if="option" /> - <Tab v-if="loaded" /> - </div> +<div style="height:1000px;width:100%;background:#FFFFFF;padding:20px"> + <el-tabs v-model="activeName"> + <el-tab-pane label="60万吨" name="first"> + <div class="map-layout"> + <Map @init="init" :option="option" v-if="option" /> + <Tab v-if="loaded" /> + </div></el-tab-pane> + <el-tab-pane label="130万吨" name="second"> + + </el-tab-pane> + </el-tabs> +</div> + + </template> <script> @@ -23,6 +33,7 @@ }, data() { return { + activeName:'first', loaded: false, map: null, option: null, @@ -261,7 +272,7 @@ <style scoped> .map-layout { - height: 100%; + height: 920px;; position: relative; } -- Gitblit v1.9.2