Commit 05670a1b authored by yaqizhang's avatar yaqizhang

55555

parent a9943e8f
...@@ -1150,7 +1150,7 @@ class gaodeMap { ...@@ -1150,7 +1150,7 @@ class gaodeMap {
}); });
let infoWindow = new AMap.InfoWindow({ let infoWindow = new AMap.InfoWindow({
isCustom: true, isCustom: true,
content: `<span style='border:1px solid #80d8ff;background:#fff'>${pipeName}</span>`, content: `<div style='max-width:150px;border:1px solid #80d8ff;background:#fff'>${pipeName}</div>`,
anchor: "left-top", anchor: "left-top",
offset: new AMap.Pixel(20, -20) offset: new AMap.Pixel(20, -20)
}); });
...@@ -1167,9 +1167,11 @@ class gaodeMap { ...@@ -1167,9 +1167,11 @@ class gaodeMap {
infoWindow.close(); infoWindow.close();
}); });
map.add(polyline); map.add(polyline);
const path = eval(coordinates)[0]; const path1 = eval(coordinates)[0];
const path2 = eval(coordinates)[1];
// map.setFitView(); // map.setFitView();
map.setCenter([+path[0], +path[1]], false); const path3 = [(Number(path1[0])+Number(path2[0]) )/2 ,(Number(path1[1])+Number(path2[1]) )/2];
map.setCenter(path3, false);
// const lntlat = eval(coordinates)[0]; // const lntlat = eval(coordinates)[0];
// map.panTo(lntlat) // map.panTo(lntlat)
......
...@@ -281,8 +281,8 @@ export default { ...@@ -281,8 +281,8 @@ export default {
this.getDetail(); this.getDetail();
}, },
mounted() { mounted() {
let gaoMap = new gaodeMap("石家庄"); // let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap; // this.gaoMap = gaoMap;
}, },
methods: { methods: {
initData(getData1, getData2, getData3) { initData(getData1, getData2, getData3) {
...@@ -663,6 +663,13 @@ export default { ...@@ -663,6 +663,13 @@ export default {
if(this.form.pipeList != null){ if(this.form.pipeList != null){
let pipe = this.form.pipeList[0]; let pipe = this.form.pipeList[0];
const {coordinates} = this.form.pipeList[0];
const path1 = eval(coordinates)[0];
const path2 = eval(coordinates)[1];
const path3 = [(Number(path1[0]) + Number(path2[0])) / 2, (Number(path1[1]) + Number(path2[1])) / 2];
let gaoMap = new gaodeMap("石家庄",path3);
this.gaoMap=gaoMap;
console.log("pipe", pipe); console.log("pipe", pipe);
this.dataListdetail.push(pipe); this.dataListdetail.push(pipe);
this.gaoMap.onlyLine(pipe); this.gaoMap.onlyLine(pipe);
...@@ -672,8 +679,11 @@ export default { ...@@ -672,8 +679,11 @@ export default {
let device = this.form.deviceList[0]; let device = this.form.deviceList[0];
console.log("device", device); console.log("device", device);
this.dataListdetail.push(device); this.dataListdetail.push(device);
this.gaoMap.resetMapCenter([device.longitude, device.latitude]); let gaoMap = new gaodeMap("石家庄",[device.longitude, device.latitude]);
this.gaoMap = gaoMap;
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, device); this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, device);
// this.gaoMap.resetMapCenter([device.longitude, device.latitude]);
} }
var getData1 = []; var getData1 = [];
......
...@@ -6,14 +6,17 @@ ...@@ -6,14 +6,17 @@
<div style="height: 45px;" @click="$router.go(-1)"> <div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回 <el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
</el-button> </el-button>
<div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png" style="width: 25px;" alt=""></div> <div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png"
style="width: 25px;" alt=""></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="width: 100%;height: 45px;"> <el-row style="width: 100%;height: 45px;">
<el-col :span="24"> <el-col :span="24">
<div style=""> <div style="">
<ul><li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">管道管理详情</li></ul> <ul>
<li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">管道管理详情</li>
</ul>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -22,7 +25,9 @@ ...@@ -22,7 +25,9 @@
<el-row style="width: 100%;"> <el-row style="width: 100%;">
<el-col :span="24"> <el-col :span="24">
<div style="color: #31EAEA;height: 25px;"> <div style="color: #31EAEA;height: 25px;">
<ul><li>详细信息</li></ul> <ul>
<li>详细信息</li>
</ul>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -70,27 +75,18 @@ ...@@ -70,27 +75,18 @@
</el-form> </el-form>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<div id="marbox" style="width: 100%;height: 390px;margin-top: -35px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;"> <div id="marbox"
style="width: 100%;height: 390px;margin-top: -35px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;">
<div style="width: 100%;height: 100%" id="container"></div> <div style="width: 100%;height: 100%" id="container"></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;"> <div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;">
<el-button <el-button size="normal" type="primary" icon="el-icon-edit" @click="handleUpdate(form)"
size="normal" v-hasPermi="['device:pipe:edit']">修改</el-button>
type="primary" <el-button size="normal" type="primary" icon="el-icon-delete" @click="handleDelete(form)"
icon="el-icon-edit" v-hasPermi="['device:pipe:remove']">删除</el-button>
@click="handleUpdate(form)"
v-hasPermi="['device:pipe:edit']"
>修改</el-button>
<el-button
size="normal"
type="primary"
icon="el-icon-delete"
@click="handleDelete(form)"
v-hasPermi="['device:pipe:remove']"
>删除</el-button>
<!-- 添加或修改管道信息对话框 --> <!-- 添加或修改管道信息对话框 -->
...@@ -109,10 +105,7 @@ ...@@ -109,10 +105,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="管道长度" prop="pipeLength"> <el-form-item label="管道长度" prop="pipeLength">
<el-input type="number" min="0" v-model="editForm.pipeLength" placeholder="请输入管道长度"> <el-input type="number" min="0" v-model="editForm.pipeLength" placeholder="请输入管道长度">
<i <i slot="suffix" style="color: #000; font-style: normal; margin-right: 10px"></i>
slot="suffix"
style="color: #000; font-style: normal; margin-right: 10px"
></i>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -153,24 +146,15 @@ ...@@ -153,24 +146,15 @@
</el-col> </el-col>
<el-col> <el-col>
<el-form-item label="管道图片上传" prop="iconUrl"> <el-form-item label="管道图片上传" prop="iconUrl">
<MyFileUpload <MyFileUpload listType="picture-card" @resFun="getFileInfo" @remove="listRemove" :fileArr="fileList" />
listType="picture-card"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="editForm.iconUrl"></el-input> <el-input v-show="false" disabled v-model="editForm.iconUrl"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col> <el-col>
<el-form-item label="安装日期" prop="installationTime"> <el-form-item label="安装日期" prop="installationTime">
<el-col :span="11"> <el-col :span="11">
<el-date-picker clearable size="small" <el-date-picker clearable size="small" style="width: 100%" v-model="editForm.installationTime"
style="width: 100%" type="date" value-format="yyyy-MM-dd" placeholder="请选择安装日期">
v-model="editForm.installationTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择安装日期">
</el-date-picker> </el-date-picker>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -187,13 +171,8 @@ ...@@ -187,13 +171,8 @@
</div> </div>
</el-dialog> </el-dialog>
<Mapdialog <Mapdialog v-if="loadmap" :dialogTableVisible="dialogTableVisible" @dialogcancelFun="dialogcancelFun"
v-if="loadmap" @confirmFun="confirmFun($event)" :str="str"></Mapdialog>
:dialogTableVisible="dialogTableVisible"
@dialogcancelFun="dialogcancelFun"
@confirmFun="confirmFun($event)"
:str="str"
></Mapdialog>
</div> </div>
</div> </div>
...@@ -269,6 +248,9 @@ ...@@ -269,6 +248,9 @@
created() { created() {
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
this.pipeId = this.$route.query.pipeId; this.pipeId = this.$route.query.pipeId;
},
mounted() {
this.getDetail(); this.getDetail();
this.getDicts("t_pipe_type").then(response => { this.getDicts("t_pipe_type").then(response => {
this.typeOptions = response.data; this.typeOptions = response.data;
...@@ -276,19 +258,22 @@ ...@@ -276,19 +258,22 @@
this.getDicts("t_pipe_pressure").then(response => { this.getDicts("t_pipe_pressure").then(response => {
this.pressureOptions = response.data; this.pressureOptions = response.data;
}); });
},
mounted(){
let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap;
}, },
methods: { methods: {
getDetail (){ getDetail() {
getPipe(this.pipeId).then(response =>{ getPipe(this.pipeId).then(response => {
this.form = response.data; this.form = response.data;
const { coordinates } = this.form;
const path1 = eval(coordinates)[0];
const path2 = eval(coordinates)[1];
const path3 = [(Number(path1[0]) + Number(path2[0])) / 2, (Number(path1[1]) + Number(path2[1])) / 2];
let gaoMap = new gaodeMap("石家庄", path3);
this.gaoMap = gaoMap;
this.gaoMap.onlyLine(this.form); this.gaoMap.onlyLine(this.form);
}); });
}, },
getFileInfo(res){ getFileInfo(res) {
this.editForm.iconUrl = res.url; this.editForm.iconUrl = res.url;
}, },
listRemove(e) { listRemove(e) {
...@@ -321,7 +306,7 @@ ...@@ -321,7 +306,7 @@
url: this.editForm.iconUrl, url: this.editForm.iconUrl,
}); });
} }
if(this.editForm.coordinates){ if (this.editForm.coordinates) {
this.str = this.editForm.coordinates; this.str = this.editForm.coordinates;
} }
this.open = true; this.open = true;
...@@ -345,7 +330,7 @@ ...@@ -345,7 +330,7 @@
handleDelete(res) { handleDelete(res) {
res.isDel = "1"; res.isDel = "1";
var devices = " "; var devices = " ";
for(var i = 0; i < res.deviceInfoList.length; i++){ for (var i = 0; i < res.deviceInfoList.length; i++) {
var obj = res.deviceInfoList[i]; var obj = res.deviceInfoList[i];
devices = devices + obj.deviceName + " "; devices = devices + obj.deviceName + " ";
} }
...@@ -371,10 +356,14 @@ ...@@ -371,10 +356,14 @@
width: 100%; width: 100%;
margin: 20px 0; margin: 20px 0;
} }
.feedbackTime-div{
float: left;margin-left: 150px;margin-top: 10px; .feedbackTime-div {
float: left;
margin-left: 150px;
margin-top: 10px;
} }
.feedbackTime{
.feedbackTime {
height: 120px; height: 120px;
width: 120px; width: 120px;
float: left; float: left;
...@@ -385,19 +374,24 @@ ...@@ -385,19 +374,24 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.el-card__body { .el-card__body {
padding: 5px 20px 20px 20px; padding: 5px 20px 20px 20px;
} }
.detail .el-form{
.detail .el-form {
width: 20%; width: 20%;
} }
.detail .el-form-item{
.detail .el-form-item {
margin-bottom: 0px; margin-bottom: 0px;
} }
.avatar-uploader{
.avatar-uploader {
width: 25%; width: 25%;
float: left; float: left;
} }
.avatar-uploader .el-upload { .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 6px; border-radius: 6px;
...@@ -405,9 +399,11 @@ ...@@ -405,9 +399,11 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.avatar-uploader .el-upload:hover { .avatar-uploader .el-upload:hover {
border-color: #409EFF; border-color: #409EFF;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
...@@ -416,12 +412,14 @@ ...@@ -416,12 +412,14 @@
line-height: 178px; line-height: 178px;
text-align: center; text-align: center;
} }
.avatar { .avatar {
width: 178px; width: 178px;
height: 178px; height: 178px;
display: block; display: block;
} }
li{
li {
font-size: 15px; font-size: 15px;
font-weight: 900; font-weight: 900;
} }
......
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
import FileUpload from '@/components/FileUpload'; import FileUpload from '@/components/FileUpload';
import Cookie from 'js-cookie'; import Cookie from 'js-cookie';
import { deviceTree } from "@/api/device/deviceInfo"; import { deviceTree } from "@/api/device/deviceInfo";
import gaodeMap from "utils/gaodeMap.js"; import c from "utils/gaodeMap.js";
import {map, DEVICE_TYPE} from "utils/gaodeMap.js"; import {map, DEVICE_TYPE} from "utils/gaodeMap.js";
import { inspectorList } from "@/api/system/user"; import { inspectorList } from "@/api/system/user";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment