diff --git a/.env.development b/.env.development index 9306a6d..fe9577c 100644 --- a/.env.development +++ b/.env.development @@ -7,7 +7,7 @@ VUE_APP_GATEWAY_URL="/dev-api" # 服务地址 VUE_APP_BASE_API_URL="http://192.168.2.187:8081" # 服务前-- 请严格遵守格式 不允许换行 -VUE_APP_SERVICE_PREFIX= '{"system":"/system","file":"/file-zy","prevention":"/prevention-zy"}' +VUE_APP_SERVICE_PREFIX= '{"system":"/system","file":"/file-zy","prevention":"/prevention-yx"}' # 是否显示全部菜单 VUE_APP_ALL_MENU = false # 微前端地址 diff --git a/package.json b/package.json index bbab8da..612c6ac 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "test", + "name": "prevention", "version": "0.1.0", "private": true, "scripts": { diff --git a/src/service/plan.service.ts b/src/service/plan.service.ts index ce6562e..dcd5314 100644 --- a/src/service/plan.service.ts +++ b/src/service/plan.service.ts @@ -37,8 +37,17 @@ export default class PlanService extends BaseService{ } } + public getRecordTabList(params: any):Promise>>{ + const url = this.prefix.prevention+'/danger/task/table'; + return this.get(url,params,true) + } public getRecordList(params: any):Promise>>{ - const url = this.prefix.prevention+'/danger/record/list'; + const url = this.prefix.prevention+'/danger/task/inspect'; + return this.get(url,params,true) + } + + public getTroubleList(params: any):Promise>>{ + const url = this.prefix.prevention+'/danger/trouble/list'; return this.get(url,params,true) } } \ No newline at end of file diff --git a/src/service/task.service.ts b/src/service/task.service.ts index b72971a..eade67b 100644 --- a/src/service/task.service.ts +++ b/src/service/task.service.ts @@ -34,4 +34,18 @@ export default class TaskService extends BaseService{ return this.put(url,params,{},showLoading) } } -} \ No newline at end of file + + public getRecordTabList(params: any):Promise>>{ + const url = this.prefix.prevention+'/danger/task/table'; + return this.get(url,params,true) + } + public getRecordList(params: any):Promise>>{ + const url = this.prefix.prevention+'/danger/task/inspect'; + return this.get(url,params,true) + } + + public getTroubleList(params: any):Promise>>{ + const url = this.prefix.prevention+'/danger/trouble/list'; + return this.get(url,params,true) + } +} diff --git a/src/views/hiddenDanger/clap.component.vue b/src/views/hiddenDanger/clap.component.vue index 5474230..b2cb59c 100644 --- a/src/views/hiddenDanger/clap.component.vue +++ b/src/views/hiddenDanger/clap.component.vue @@ -13,6 +13,7 @@ import NoteService from '@/service/note.service'; import UnitService from '@/service/unit.service'; import MapComponent from "@/components/map.component.vue" import mapboxgl from "mapbox-gl"; +import moment from 'moment'; @Component({ template, components:{ @@ -44,7 +45,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent public tableActionWidth = "150px"; public isReadonly = false; - + public account = JSON.parse(localStorage.getItem("account") as string); public showMap = false; public center = [118.751353,31.969568]; public marker:any; @@ -268,8 +269,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent showError:false, unit:{ type:"btn", - hide:this.isReadonly, - name:"点击定位", + name:this.isReadonly?"查看定位":"点击定位", value:"fixed", btnType:"primary" } @@ -369,7 +369,6 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent key:"violateNumber", type:"number", width:"calc(50% - 20px)", - require:true, showError:false, },{ name:"专业分类", @@ -386,7 +385,6 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent format:"occurNodeName", type:"select", width:"calc(50% - 20px)", - require:true, showError:false, datas:this.$store.state.prevention_occur_step, },{ @@ -394,14 +392,12 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent key:"violateTerm", type:"textarea", width:"100%", - require:true, showError:false, },{ name:"隐患整改要求", key:"reformDemand", type:"textarea", width:"100%", - require:true, showError:false, }] } @@ -421,9 +417,10 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent } public addMarker(){ - this.marker = new mapboxgl.Marker({draggable:true}) + this.marker = new mapboxgl.Marker({draggable:!this.isReadonly}) .setLngLat(this.center) .addTo(this.map); + this.map.flyTo({center:this.center}) } public change(data,item){ @@ -485,7 +482,15 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent this.isReadonly = !!isRead; this.fileList = []; this.photoList = []; - this.updateParams = {type:"随手拍",locationName:"",number:null,photo:1} + this.updateParams = { + type:"随手拍", + locationName:"", + inspectUserId:this.account.userId, + inspectUserName:this.account.nickName, + number:null, + photo:1, + inspectTime:moment().format("YYYY-MM-DD HH:mm") + } if(!row){ this.tableService.getNumber().then(res=>{ @@ -512,6 +517,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent },res.data) // 地图定位 this.center = [res.data.locationLng,res.data.locationLat]; + this.buildUpdateForm() // 获取url this.tableService.getFileUrls({ids:res.data.resourceId.split(",")}).then((photos:any)=>{ @@ -545,7 +551,8 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent const lngLat = this.marker.getLngLat(); this.updateParams.locationLng = lngLat.lng; this.updateParams.locationLat = lngLat.lat; - this.updateParams.locationName = lngLat.lng+","+lngLat.lat; + this.center = [lngLat.lng,lngLat.lat] + // this.updateParams.locationName = lngLat.lng+","+lngLat.lat; this.handleClose() } diff --git a/src/views/hiddenDanger/common.component.html b/src/views/hiddenDanger/common.component.html index fdb27ea..7e3ab26 100644 --- a/src/views/hiddenDanger/common.component.html +++ b/src/views/hiddenDanger/common.component.html @@ -32,10 +32,10 @@ 修改 删除 下发 - 启用 - 停用 + 启用 + 停用 检查情况 - 检查 + 检查 抄送 移交 中断 @@ -59,14 +59,14 @@ - -
- - {{item.name}} + +
+ + {{item.name}}
- +
{{scope.$index+1}}
@@ -84,7 +84,7 @@
- + -
- - {{item.name}} + + {{item.name}}
-
- +
+
{{scope.$index+1}}
-
{{scope.row.name}}
+
{{scope.row.itemName}}
-
{{scope.row.content}}
+
{{scope.row.itemContent}}
-
{{scope.row.reason}}
+
{{scope.row.itemReason}}
-
+
{{scope.row.itemExecuteNames}}
- -
+ +
+ + 正常 + 异常 + +
- -
+ +
+ +
-
- - -
隐患登记情况
+
+ 添加 + 批量删除 +
@@ -186,17 +188,6 @@
-
- - -
- +