|
@@ -60,10 +60,9 @@
|
|
|
<el-card class="box-card">
|
|
<el-card class="box-card">
|
|
|
<equip-item :is_online="item.device_status">
|
|
<equip-item :is_online="item.device_status">
|
|
|
<span
|
|
<span
|
|
|
- v-show="userType == 1"
|
|
|
|
|
slot="set"
|
|
slot="set"
|
|
|
class="superOperate el-icon-setting"
|
|
class="superOperate el-icon-setting"
|
|
|
- @click="equipOperation(item.d_id, item.imei, item.device_name)"
|
|
|
|
|
|
|
+ @click="equipOperation(item)"
|
|
|
></span>
|
|
></span>
|
|
|
<span slot="title">虫情测报</span>
|
|
<span slot="title">虫情测报</span>
|
|
|
<div slot="content" class="content">
|
|
<div slot="content" class="content">
|
|
@@ -90,6 +89,30 @@
|
|
|
</span>
|
|
</span>
|
|
|
</p>
|
|
</p>
|
|
|
<p>
|
|
<p>
|
|
|
|
|
+ <i class="iconfont icon-yonghu"></i>
|
|
|
|
|
+ 隶属海关组织 :
|
|
|
|
|
+ <span v-if="item.org_list.length == 1">{{
|
|
|
|
|
+ item.org_name
|
|
|
|
|
+ }}</span>
|
|
|
|
|
+ <el-popover
|
|
|
|
|
+ ref="popover"
|
|
|
|
|
+ placement="right"
|
|
|
|
|
+ title=""
|
|
|
|
|
+ width="150"
|
|
|
|
|
+ trigger="hover"
|
|
|
|
|
+ v-else
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="popover-content" v-html="content"></div>
|
|
|
|
|
+ <span @mouseover="orglisthover(item)" slot="reference"
|
|
|
|
|
+ >{{ item.org_list[0].org_name }}...</span
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-popover>
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p>
|
|
|
|
|
+ <i class="iconfont icon-biaoqian"></i>
|
|
|
|
|
+ 所属监测点 : {{ item.point_name}}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p>
|
|
|
<i class="iconfont icon-shijian"></i>
|
|
<i class="iconfont icon-shijian"></i>
|
|
|
最新上报时间 : {{ (item.uptime * 1000) | formatTime }}
|
|
最新上报时间 : {{ (item.uptime * 1000) | formatTime }}
|
|
|
</p>
|
|
</p>
|
|
@@ -197,7 +220,26 @@
|
|
|
<p style="color: #eb6765" v-if="scope.row.is_online == 0">离线</p>
|
|
<p style="color: #eb6765" v-if="scope.row.is_online == 0">离线</p>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="dtype" label="设备版本"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="dtype" label="组织">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span v-if="scope.row.org_list.length == 1">{{
|
|
|
|
|
+ scope.row.org_list[0].org_name
|
|
|
|
|
+ }}</span>
|
|
|
|
|
+ <el-popover
|
|
|
|
|
+ ref="popover"
|
|
|
|
|
+ placement="right"
|
|
|
|
|
+ title="组织列表"
|
|
|
|
|
+ width="150"
|
|
|
|
|
+ trigger="hover"
|
|
|
|
|
+ v-else
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="popover-content" v-html="content"></div>
|
|
|
|
|
+ <span @mouseover="orglisthover(scope.row)" slot="reference"
|
|
|
|
|
+ >{{ scope.row.org_list[0].org_name }}...</span
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-popover>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="status_time" label="最新上报时间">
|
|
<el-table-column prop="status_time" label="最新上报时间">
|
|
|
<template slot-scope="scope">{{
|
|
<template slot-scope="scope">{{
|
|
|
(scope.row.uptime * 1000) | formatTime
|
|
(scope.row.uptime * 1000) | formatTime
|
|
@@ -473,162 +515,116 @@
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<!-- 管理员操作弹框 -->
|
|
<!-- 管理员操作弹框 -->
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
- title="管理员操作"
|
|
|
|
|
|
|
+ title="测报灯设置"
|
|
|
:visible.sync="operationDialogVisible"
|
|
:visible.sync="operationDialogVisible"
|
|
|
- width="360px"
|
|
|
|
|
|
|
+ width="30%"
|
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
|
:close-on-press-escape="false"
|
|
:close-on-press-escape="false"
|
|
|
>
|
|
>
|
|
|
- <div class="item">
|
|
|
|
|
- <span>设备编号 : </span><span>{{ equipInfo.device_id }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="item" v-if="equipInfo.device_name">
|
|
|
|
|
- <span>设备名称 : </span><span>{{ equipInfo.device_name }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="tit">联网模块</div>
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="equipBtnControl('dtu_update')"
|
|
|
|
|
- >升级</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="equipBtnControl('dtu_reboot')"
|
|
|
|
|
- >重启</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button type="primary" size="mini" @click="mqttInfo"
|
|
|
|
|
- >MQTT配置</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button type="primary" size="mini" @click="equipBtnControl('yfwlw')"
|
|
|
|
|
- >平台切换</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <div class="tit">电路板更换</div>
|
|
|
|
|
- <el-row>
|
|
|
|
|
- <el-button type="primary" size="mini">查看原始imei</el-button>
|
|
|
|
|
- <el-button type="primary" @click="replaceImei" size="mini"
|
|
|
|
|
- >更改imei</el-button
|
|
|
|
|
- >
|
|
|
|
|
- </el-row>
|
|
|
|
|
- <div class="tit">强制操作</div>
|
|
|
|
|
- <el-row>
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="danger"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="equipBtnControl('takephoto')"
|
|
|
|
|
- >拍照</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button type="danger" size="mini" @click="equipBtnControl('update')"
|
|
|
|
|
- >升级</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button type="danger" size="mini" @click="equipBtnControl('reboot')"
|
|
|
|
|
- >重启</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="danger"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="equipBtnControl('open_shake')"
|
|
|
|
|
- >震动开启</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="danger"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="equipBtnControl('close_shake')"
|
|
|
|
|
- >震动关闭</el-button
|
|
|
|
|
- >
|
|
|
|
|
- </el-row>
|
|
|
|
|
-
|
|
|
|
|
- <div class="tit">升级文件更新</div>
|
|
|
|
|
- <div style="display: flex">
|
|
|
|
|
- <!-- <el-upload
|
|
|
|
|
- style="margin: 0 10px 0 0"
|
|
|
|
|
- class="upload-demo"
|
|
|
|
|
- ref="upControl"
|
|
|
|
|
- action
|
|
|
|
|
- :http-request="fileUploadSectionFile"
|
|
|
|
|
- :with-credentials="true"
|
|
|
|
|
- :auto-upload="true"
|
|
|
|
|
- multiple
|
|
|
|
|
- :file-list="fileList"
|
|
|
|
|
- :show-file-list="false"
|
|
|
|
|
- >
|
|
|
|
|
- <el-button size="small" type="primary">控制板</el-button>
|
|
|
|
|
- </el-upload>
|
|
|
|
|
-
|
|
|
|
|
- <el-upload
|
|
|
|
|
- class="upload-demo"
|
|
|
|
|
- ref="upControl"
|
|
|
|
|
- action
|
|
|
|
|
- :http-request="fileUploadSectionFile"
|
|
|
|
|
- :with-credentials="true"
|
|
|
|
|
- :auto-upload="true"
|
|
|
|
|
- multiple
|
|
|
|
|
- :file-list="fileList"
|
|
|
|
|
- :show-file-list="false"
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ :model="ruleForm"
|
|
|
|
|
+ :rules="rules"
|
|
|
|
|
+ ref="ruleForm"
|
|
|
|
|
+ label-width="100px"
|
|
|
|
|
+ class="demo-ruleForm"
|
|
|
>
|
|
>
|
|
|
- <el-button size="small" type="primary">联网模块</el-button>
|
|
|
|
|
- </el-upload> -->
|
|
|
|
|
|
|
+ <el-form-item label="设备名称" prop="device_name">
|
|
|
|
|
+ <el-input v-model="ruleForm.device_name"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="隶属海关" prop="org_id">
|
|
|
|
|
+ <el-cascader
|
|
|
|
|
+ :change-on-select="true"
|
|
|
|
|
+ v-model="ruleForm.org_id"
|
|
|
|
|
+ :options="versionsoptions"
|
|
|
|
|
+ :props="defaultParams"
|
|
|
|
|
+ :clearable="true"
|
|
|
|
|
+ placeholder="请选择隶属海关"
|
|
|
|
|
+ ></el-cascader>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="所在监测点" prop="point_id">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="ruleForm.point_id"
|
|
|
|
|
+ placeholder="请选择所在监测点"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in traponsoptions"
|
|
|
|
|
+ :label="item.point_name"
|
|
|
|
|
+ :value="item.point_id"
|
|
|
|
|
+ :key="item.point_id"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <div class="addtrapbox" style="display: flex">
|
|
|
|
|
+ <el-form-item label="所在纬度" prop="lng">
|
|
|
|
|
+ <el-input v-model="ruleForm.lng"></el-input>
|
|
|
|
|
+ <p style="height: 24px; padding-left: 16px">
|
|
|
|
|
+ {{ ToDegrees(ruleForm.lng, "lng") }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="所在纬度" prop="lat">
|
|
|
|
|
+ <el-input v-model="ruleForm.lat"></el-input>
|
|
|
|
|
+ <p style="height: 24px; padding-left: 16px">
|
|
|
|
|
+ {{ ToDegrees(ruleForm.lat, "lat") }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="buttonbox">
|
|
|
|
|
+ <el-button type="info" size="mini" @click="dingwei"
|
|
|
|
|
+ >地图选点</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="resetForm('ruleForm')" size="mini">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="submitForm('ruleForm')" size="mini"
|
|
|
|
|
+ >确 定</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
- <!-- MQTT配置 -->
|
|
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
- title="MQTT配置"
|
|
|
|
|
- :visible.sync="mqttDialogVisible"
|
|
|
|
|
- width="450px"
|
|
|
|
|
- :close-on-click-modal="false"
|
|
|
|
|
- :close-on-press-escape="false"
|
|
|
|
|
- @close="mqttDialogClosed"
|
|
|
|
|
|
|
+ class="map_dialog"
|
|
|
|
|
+ title="地图选点"
|
|
|
|
|
+ :visible.sync="addLocationDialogVisible"
|
|
|
|
|
+ width="820px"
|
|
|
|
|
+ @closed="addLocationDialogClosed"
|
|
|
>
|
|
>
|
|
|
<el-form
|
|
<el-form
|
|
|
- ref="mqttConfigRef"
|
|
|
|
|
- :model="mqttConfig"
|
|
|
|
|
- label-position="right"
|
|
|
|
|
- label-width="130px"
|
|
|
|
|
- :rules="mqttFormRules"
|
|
|
|
|
|
|
+ :inline="true"
|
|
|
|
|
+ :model="locationForm"
|
|
|
|
|
+ class="demo-form-inline"
|
|
|
|
|
+ size="mini"
|
|
|
>
|
|
>
|
|
|
- <el-form-item label="MQTT用户名:" prop="muid">
|
|
|
|
|
- <el-input v-model="mqttConfig.muid"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="MQTT密码:" prop="mpwd">
|
|
|
|
|
- <el-input type="password" v-model="mqttConfig.mpwd"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="MQTT地址:" prop="mip">
|
|
|
|
|
- <el-input v-model="mqttConfig.mip"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="MQTT端口:" prop="mport">
|
|
|
|
|
- <el-input v-model="mqttConfig.mport"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="上传地址:" prop="mpub">
|
|
|
|
|
- <el-input v-model="mqttConfig.mpub"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="下发地址:" prop="msub">
|
|
|
|
|
- <el-input v-model="mqttConfig.msub"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="FTP用户名:" prop="fuid">
|
|
|
|
|
- <el-input v-model="mqttConfig.fuid"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="FTP密码:" prop="fpwd">
|
|
|
|
|
- <el-input type="password" v-model="mqttConfig.fpwd"></el-input>
|
|
|
|
|
|
|
+ <el-form-item label="经度">
|
|
|
|
|
+ <el-input clearable v-model="locationForm.lng"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="图片上传地址:" prop="fip">
|
|
|
|
|
- <el-input v-model="mqttConfig.fip"></el-input>
|
|
|
|
|
|
|
+ <el-form-item label="纬度">
|
|
|
|
|
+ <el-input clearable v-model="locationForm.lat"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="图片上传端口:" prop="fport">
|
|
|
|
|
- <el-input v-model="mqttConfig.fport"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item style="text-align: right">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="default"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="mqttDialogVisible = false"
|
|
|
|
|
- >取消</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button type="primary" size="mini" @click="mqttSubm"
|
|
|
|
|
- >确定</el-button
|
|
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="locationSearch"
|
|
|
|
|
+ >定位</el-button
|
|
|
>
|
|
>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入地区检索"
|
|
|
|
|
+ v-model="addr"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ @change="addrChange()"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
+ <div class="amap-demo" id="mapContainer2" style="height: 400px"></div>
|
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="addLocationDialogVisible = false" size="mini"
|
|
|
|
|
+ >取 消</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button type="primary" @click="addLocationSubm" size="mini"
|
|
|
|
|
+ >确 定</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -637,6 +633,7 @@ import SearchBar from "@/components/SearchBar";
|
|
|
// import TopModule from "@/components/TopModule";
|
|
// import TopModule from "@/components/TopModule";
|
|
|
import EquipItem from "@/components/EquipItem";
|
|
import EquipItem from "@/components/EquipItem";
|
|
|
import Circulation from "../../../../static/js/equipState_dict.json";
|
|
import Circulation from "../../../../static/js/equipState_dict.json";
|
|
|
|
|
+import { isArray } from "highcharts";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
filters: {
|
|
filters: {
|
|
@@ -727,24 +724,6 @@ export default {
|
|
|
fip: "",
|
|
fip: "",
|
|
|
fport: "",
|
|
fport: "",
|
|
|
},
|
|
},
|
|
|
- mqttFormRules: {
|
|
|
|
|
- muid: [
|
|
|
|
|
- { required: true, message: "请填写MQTT用户名", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- mpwd: [{ required: true, message: "请填写MQTT密码", trigger: "blur" }],
|
|
|
|
|
- mip: [{ required: true, message: "请填写MQTT地址", trigger: "blur" }],
|
|
|
|
|
- mport: [{ required: true, message: "请填写MQTT端口", trigger: "blur" }],
|
|
|
|
|
- mpub: [{ required: true, message: "请填写上传地址", trigger: "blur" }],
|
|
|
|
|
- msub: [{ required: true, message: "请填写下发地址", trigger: "blur" }],
|
|
|
|
|
- // fuid: [{ required: true, message: '请填写FTP用户名', trigger: 'blur' }],
|
|
|
|
|
- // fpwd: [{ required: true, message: '请填写FTP密码', trigger: 'blur' }],
|
|
|
|
|
- fip: [
|
|
|
|
|
- { required: true, message: "请填写图片上传地址", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- fport: [
|
|
|
|
|
- { required: true, message: "请填写图片上传端口", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
loading: true,
|
|
loading: true,
|
|
|
equipStateDict: {}, //
|
|
equipStateDict: {}, //
|
|
|
|
|
|
|
@@ -770,6 +749,48 @@ export default {
|
|
|
label: "计数",
|
|
label: "计数",
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|
|
|
|
|
+ versionsoptions: [], //组织
|
|
|
|
|
+ traponsoptions: [], //监测点
|
|
|
|
|
+ defaultParams: {
|
|
|
|
|
+ label: "org_name",
|
|
|
|
|
+ value: "id",
|
|
|
|
|
+ children: "childrens",
|
|
|
|
|
+ multiple: true,
|
|
|
|
|
+ checkStrictly: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ ruleForm: {
|
|
|
|
|
+ // org_name:"",
|
|
|
|
|
+ device_name: "",
|
|
|
|
|
+ org_id: [],
|
|
|
|
|
+ point_id: "",
|
|
|
|
|
+ lng: "",
|
|
|
|
|
+ lat: "",
|
|
|
|
|
+ device_name: "",
|
|
|
|
|
+ device_id: "",
|
|
|
|
|
+ },
|
|
|
|
|
+ rules: {
|
|
|
|
|
+ device_name: [
|
|
|
|
|
+ { required: true, message: "请输入设备名称", trigger: "blur" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ lng: [{ required: true, message: "请输入经度", trigger: "blur" }],
|
|
|
|
|
+ lat: [{ required: true, message: "请输入纬度", trigger: "blur" }],
|
|
|
|
|
+ org_id: [
|
|
|
|
|
+ { required: true, message: "请选择隶属海关", trigger: "change" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ point_id: [
|
|
|
|
|
+ { required: true, message: "请选择所在监测点", trigger: "change" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ //地图属性
|
|
|
|
|
+ addLocationDialogVisible: false,
|
|
|
|
|
+ locationForm: {
|
|
|
|
|
+ lng: "",
|
|
|
|
|
+ lat: "",
|
|
|
|
|
+ },
|
|
|
|
|
+ addr: "", //搜索栏地址
|
|
|
|
|
+ address: "", //地图上标签地址
|
|
|
|
|
+ center: [114.05, 22.55],
|
|
|
|
|
+ content: "",
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -784,6 +805,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
console.log("mounted");
|
|
console.log("mounted");
|
|
|
this.getEquipList();
|
|
this.getEquipList();
|
|
|
|
|
+ this.getmon();
|
|
|
},
|
|
},
|
|
|
activated() {
|
|
activated() {
|
|
|
this.getEquipList();
|
|
this.getEquipList();
|
|
@@ -867,7 +889,7 @@ export default {
|
|
|
dataDetails(e_id, d_id, data) {
|
|
dataDetails(e_id, d_id, data) {
|
|
|
this.device_id = e_id;
|
|
this.device_id = e_id;
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
- path: `/index/cbdDataDetails/${e_id}/${d_id}`,
|
|
|
|
|
|
|
+ path: `/index/DataDetails/${e_id}/${d_id}`,
|
|
|
query: {
|
|
query: {
|
|
|
addr: data.address,
|
|
addr: data.address,
|
|
|
name: data.device_name,
|
|
name: data.device_name,
|
|
@@ -878,7 +900,7 @@ export default {
|
|
|
viewPhotoDialog(id, d_id, name, addr) {
|
|
viewPhotoDialog(id, d_id, name, addr) {
|
|
|
this.device_id = id;
|
|
this.device_id = id;
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
- path: `/index/cbdDataPhotos/${id}`,
|
|
|
|
|
|
|
+ path: `/index/DataPhotos/${id}`,
|
|
|
query: { d_id: d_id, name: name, addr: addr },
|
|
query: { d_id: d_id, name: name, addr: addr },
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -1027,69 +1049,107 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- equipOperation(d_id, device_id, device_name) {
|
|
|
|
|
- this.d_id = d_id;
|
|
|
|
|
- this.equipInfo = { device_id, device_name };
|
|
|
|
|
|
|
+ equipOperation(item) {
|
|
|
|
|
+ console.log(item);
|
|
|
|
|
+ this.ruleForm.device_id = item.imei;
|
|
|
|
|
+ this.ruleForm.device_name = item.device_name;
|
|
|
|
|
+ this.ruleForm.lng = item.lng;
|
|
|
|
|
+ this.ruleForm.lat = item.lat;
|
|
|
|
|
+ this.ruleForm.point_id = item.point_id;
|
|
|
|
|
+
|
|
|
|
|
+ this.d_id = item.d_id;
|
|
|
|
|
+ this.equipInfo = {
|
|
|
|
|
+ device_id: item.device_id,
|
|
|
|
|
+ device_name: item.device_name,
|
|
|
|
|
+ };
|
|
|
this.operationDialogVisible = true;
|
|
this.operationDialogVisible = true;
|
|
|
- },
|
|
|
|
|
- equipBtnControl(cmd) {
|
|
|
|
|
- let loading = this.$loading({
|
|
|
|
|
- lock: true,
|
|
|
|
|
- text: "Loading",
|
|
|
|
|
- spinner: "el-icon-loading",
|
|
|
|
|
- background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
- });
|
|
|
|
|
- if (cmd == "dtu_update") {
|
|
|
|
|
- var name = "联网模块升级";
|
|
|
|
|
- } else if (cmd == "dtu_reboot") {
|
|
|
|
|
- var name = "联网模块重启";
|
|
|
|
|
- } else if (cmd == "takephoto") {
|
|
|
|
|
- var name = "拍照";
|
|
|
|
|
- } else if (cmd == "update") {
|
|
|
|
|
- var name = "强制升级";
|
|
|
|
|
- } else if (cmd == "reboot") {
|
|
|
|
|
- var name = "强制重启";
|
|
|
|
|
- } else if (cmd == "open_shake") {
|
|
|
|
|
- var name = "强制震动开启";
|
|
|
|
|
- } else if (cmd == "close_shake") {
|
|
|
|
|
- var name = "强制震动关闭";
|
|
|
|
|
- } else if (cmd == "yfwlw") {
|
|
|
|
|
- var name = "平台切换";
|
|
|
|
|
- } else if (cmd == "imei") {
|
|
|
|
|
- var name = "修改设备号";
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- this.$confirm("此操作对设备进行" + name + ", 是否继续?", "提示", {
|
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
- type: "warning",
|
|
|
|
|
- })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- this.$axios({
|
|
|
|
|
- method: "POST",
|
|
|
|
|
- url: "/api/api_gateway?method=forecast.send_control.admin_device_control",
|
|
|
|
|
- data: this.qs.stringify({
|
|
|
|
|
- cmd,
|
|
|
|
|
- device_type_id: 3,
|
|
|
|
|
- d_id: this.d_id,
|
|
|
|
|
- imei: this.replaceImeiData, // 更换imei
|
|
|
|
|
- }),
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- if (res.data.message == "") {
|
|
|
|
|
- this.$message.success("指令下发成功!");
|
|
|
|
|
|
|
+ // for (var key in this.ruleForm) {
|
|
|
|
|
+ // this.ruleForm[key] = e[key];
|
|
|
|
|
+ // }
|
|
|
|
|
+ this.ruleForm.org_id = [];
|
|
|
|
|
+ for (var i = 0; i < item.org_list.length; i++) {
|
|
|
|
|
+ var arr = [item.org_list[i].org_id];
|
|
|
|
|
+ this.ruleForm.org_id.push(arr);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.superior_org_list.length != 0) {
|
|
|
|
|
+ var data = item.superior_org_list;
|
|
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
|
|
+ // console.log(data[i])
|
|
|
|
|
+ if (data[i].superior_org.length > 1) {
|
|
|
|
|
+ var data2 = data[i].superior_org;
|
|
|
|
|
+ // console.log(data2)
|
|
|
|
|
+ for (var j = 0; j < data2.length; j++) {
|
|
|
|
|
+ // console.log(data2[j])
|
|
|
|
|
+ this.ruleForm.org_id[i].unshift(data2[j].org_id);
|
|
|
}
|
|
}
|
|
|
- loading.close();
|
|
|
|
|
- });
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- type: "info",
|
|
|
|
|
- message: name + "已取消",
|
|
|
|
|
- duration: 1500,
|
|
|
|
|
- });
|
|
|
|
|
- loading.close();
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (data[i].superior_org.length != 0) {
|
|
|
|
|
+ this.ruleForm.org_id[i].unshift(data[i].superior_org[0].org_id);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(this.ruleForm);
|
|
|
},
|
|
},
|
|
|
|
|
+ // equipBtnControl(cmd) {
|
|
|
|
|
+ // let loading = this.$loading({
|
|
|
|
|
+ // lock: true,
|
|
|
|
|
+ // text: "Loading",
|
|
|
|
|
+ // spinner: "el-icon-loading",
|
|
|
|
|
+ // background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
+ // });
|
|
|
|
|
+ // if (cmd == "dtu_update") {
|
|
|
|
|
+ // var name = "联网模块升级";
|
|
|
|
|
+ // } else if (cmd == "dtu_reboot") {
|
|
|
|
|
+ // var name = "联网模块重启";
|
|
|
|
|
+ // } else if (cmd == "takephoto") {
|
|
|
|
|
+ // var name = "拍照";
|
|
|
|
|
+ // } else if (cmd == "update") {
|
|
|
|
|
+ // var name = "强制升级";
|
|
|
|
|
+ // } else if (cmd == "reboot") {
|
|
|
|
|
+ // var name = "强制重启";
|
|
|
|
|
+ // } else if (cmd == "open_shake") {
|
|
|
|
|
+ // var name = "强制震动开启";
|
|
|
|
|
+ // } else if (cmd == "close_shake") {
|
|
|
|
|
+ // var name = "强制震动关闭";
|
|
|
|
|
+ // } else if (cmd == "yfwlw") {
|
|
|
|
|
+ // var name = "平台切换";
|
|
|
|
|
+ // } else if (cmd == "imei") {
|
|
|
|
|
+ // var name = "修改设备号";
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // this.$confirm("此操作对设备进行" + name + ", 是否继续?", "提示", {
|
|
|
|
|
+ // confirmButtonText: "确定",
|
|
|
|
|
+ // cancelButtonText: "取消",
|
|
|
|
|
+ // type: "warning",
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .then(() => {
|
|
|
|
|
+ // this.$axios({
|
|
|
|
|
+ // method: "POST",
|
|
|
|
|
+ // url: "/api/api_gateway?method=forecast.send_control.admin_device_control",
|
|
|
|
|
+ // data: this.qs.stringify({
|
|
|
|
|
+ // cmd,
|
|
|
|
|
+ // device_type_id: 3,
|
|
|
|
|
+ // d_id: this.d_id,
|
|
|
|
|
+ // imei: this.replaceImeiData, // 更换imei
|
|
|
|
|
+ // }),
|
|
|
|
|
+ // }).then((res) => {
|
|
|
|
|
+ // if (res.data.message == "") {
|
|
|
|
|
+ // this.$message.success("指令下发成功!");
|
|
|
|
|
+ // }
|
|
|
|
|
+ // loading.close();
|
|
|
|
|
+ // });
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .catch(() => {
|
|
|
|
|
+ // this.$message({
|
|
|
|
|
+ // type: "info",
|
|
|
|
|
+ // message: name + "已取消",
|
|
|
|
|
+ // duration: 1500,
|
|
|
|
|
+ // });
|
|
|
|
|
+ // loading.close();
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
|
|
|
|
|
// 设备版本、用户筛选
|
|
// 设备版本、用户筛选
|
|
|
searchChange() {
|
|
searchChange() {
|
|
@@ -1203,7 +1263,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
.then(({ value }) => {
|
|
.then(({ value }) => {
|
|
|
this.replaceImeiData = value;
|
|
this.replaceImeiData = value;
|
|
|
- this.equipBtnControl("imei");
|
|
|
|
|
|
|
+ // this.equipBtnControl("imei");
|
|
|
})
|
|
})
|
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
this.$message({
|
|
this.$message({
|
|
@@ -1292,6 +1352,272 @@ export default {
|
|
|
this.$message.error("操作失败,请重试!");
|
|
this.$message.error("操作失败,请重试!");
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ submitForm(formName) {
|
|
|
|
|
+ // console.log(isArray(this.ruleForm.org_id));
|
|
|
|
|
+ var org_id=[];
|
|
|
|
|
+ // if (Array.isArray(this.ruleForm.org_id)) {
|
|
|
|
|
+ // org_id = this.ruleForm.org_id[this.ruleForm.org_id.length - 1];
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // org_id = this.ruleForm.org_id;
|
|
|
|
|
+ // }
|
|
|
|
|
+ if (Array.isArray(this.ruleForm.org_id)) {
|
|
|
|
|
+ for (var i = 0; i < this.ruleForm.org_id.length; i++) {
|
|
|
|
|
+ org_id.push(
|
|
|
|
|
+ this.ruleForm.org_id[i][this.ruleForm.org_id[i].length - 1]
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ // org_id = this.ruleForm.org_id[this.ruleForm.org_id.length - 1];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ org_id = this.ruleForm.org_id;
|
|
|
|
|
+ }
|
|
|
|
|
+ org_id = org_id.join("/");
|
|
|
|
|
+ console.log(this.ruleForm)
|
|
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ this.$axios({
|
|
|
|
|
+ method: "POST",
|
|
|
|
|
+ url: "/api/api_gateway?method=monitor_manage.cbd_manage.add_device_info",
|
|
|
|
|
+ data: this.qs.stringify({
|
|
|
|
|
+ org_id: org_id, // 非必传(num) 诱捕器id 修改项
|
|
|
|
|
+ point_id: this.ruleForm.point_id, // 必传(string) 设备编号
|
|
|
|
|
+ lat: this.ToDigital(this.ruleForm.lat), // 必传(string) 纬度
|
|
|
|
|
+ lng: this.ToDigital(this.ruleForm.lng), //
|
|
|
|
|
+ device_id: this.ruleForm.device_id,
|
|
|
|
|
+ device_name: this.ruleForm.device_name,
|
|
|
|
|
+ }),
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ if (res.data.data) {
|
|
|
|
|
+ // var message = "";
|
|
|
|
|
+ // if (this.parameter == "add") {
|
|
|
|
|
+ // // console.log(this.$data.addtitle)
|
|
|
|
|
+ // message = "添加成功!";
|
|
|
|
|
+ // } else if (this.parameter == "modify") {
|
|
|
|
|
+ // message = "修改成功!";
|
|
|
|
|
+ // }
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: "修改成功!",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
|
|
+ this.operationDialogVisible = false;
|
|
|
|
|
+ this.getEquipList();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: "添加失败" + res.data.message,
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "请将信息填写完全",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ resetForm(formName) {
|
|
|
|
|
+ this.operationDialogVisible = false;
|
|
|
|
|
+ this.$refs[formName].resetFields();
|
|
|
|
|
+ for (var key in this.ruleForm) {
|
|
|
|
|
+ this.ruleForm[key] = "";
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ getmon() {
|
|
|
|
|
+ //获取监测点列表 组织列表
|
|
|
|
|
+ this.$axios({
|
|
|
|
|
+ method: "POST",
|
|
|
|
|
+ url: "/api/api_gateway?method=sysmenage.usermanager.org_list",
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ console.log(res.data.data);
|
|
|
|
|
+ this.versionsoptions = res.data.data.page_list; //组织
|
|
|
|
|
+ this.traponsoptions = res.data.data.point_data;
|
|
|
|
|
+ this.inducer_data = res.data.data.inducer_data;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ init() {
|
|
|
|
|
+ console.log(document.getElementById("mapContainer2"));
|
|
|
|
|
+ var map = new AMap.Map("mapContainer2", {
|
|
|
|
|
+ center: this.center,
|
|
|
|
|
+ resizeEnable: true,
|
|
|
|
|
+ zoom: 10,
|
|
|
|
|
+ lang: "en",
|
|
|
|
|
+ });
|
|
|
|
|
+ AMap.plugin(["AMap.ToolBar", "AMap.Geocoder"], () => {
|
|
|
|
|
+ map.addControl(new AMap.ToolBar());
|
|
|
|
|
+ this.geocoder = new AMap.Geocoder({
|
|
|
|
|
+ city: "全国",
|
|
|
|
|
+ radius: 1000,
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ var marker = new AMap.Marker({
|
|
|
|
|
+ position: this.center,
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(this.center);
|
|
|
|
|
+ marker.setMap(map);
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ this.map = map;
|
|
|
|
|
+ this.testevent();
|
|
|
|
|
+ },
|
|
|
|
|
+ addrChange() {
|
|
|
|
|
+ //位置搜索
|
|
|
|
|
+ var marker = new AMap.Marker();
|
|
|
|
|
+ this.geocoder.getLocation(this.addr, (status, result) => {
|
|
|
|
|
+ if (status === "complete" && result.geocodes.length) {
|
|
|
|
|
+ var lnglat = result.geocodes[0].location;
|
|
|
|
|
+ marker.setPosition(lnglat);
|
|
|
|
|
+ this.map.add(marker);
|
|
|
|
|
+ this.map.setFitView(marker);
|
|
|
|
|
+ this.locationForm = {
|
|
|
|
|
+ lat: lnglat.lat,
|
|
|
|
|
+ lng: lnglat.lng,
|
|
|
|
|
+ };
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error("根据地址查询位置失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 地图点击事件
|
|
|
|
|
+ testevent() {
|
|
|
|
|
+ this.map.on("click", (ev) => {
|
|
|
|
|
+ var lnglat = [ev.lnglat.lng, ev.lnglat.lat];
|
|
|
|
|
+ this.locationForm = { lng: lnglat[0], lat: lnglat[1] };
|
|
|
|
|
+ this.map.clearMap();
|
|
|
|
|
+ var marker = new AMap.Marker({
|
|
|
|
|
+ position: lnglat,
|
|
|
|
|
+ });
|
|
|
|
|
+ marker.setMap(this.map);
|
|
|
|
|
+ this.getAddress(lnglat);
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ new AMap.InfoWindow({
|
|
|
|
|
+ content: "<h5>" + "当前选中地址" + "</h5>" + this.address,
|
|
|
|
|
+ offset: new AMap.Pixel(0, -32),
|
|
|
|
|
+ }).open(this.map, lnglat);
|
|
|
|
|
+ }, 100);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getAddress(lnglat) {
|
|
|
|
|
+ AMap.plugin("AMap.Geocoder", () => {
|
|
|
|
|
+ this.geocoder.getAddress(lnglat, (status, result) => {
|
|
|
|
|
+ if (status === "complete" && result.info === "OK") {
|
|
|
|
|
+ this.address = result.regeocode.formattedAddress;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ addLocationSubm() {
|
|
|
|
|
+ //点击确定
|
|
|
|
|
+ this.ruleForm.lng = this.locationForm.lng;
|
|
|
|
|
+ this.ruleForm.lat = this.locationForm.lat;
|
|
|
|
|
+ console.log(this.ruleForm)
|
|
|
|
|
+ this.addLocationDialogVisible = false;
|
|
|
|
|
+ },
|
|
|
|
|
+ addLocationDialogClosed() {
|
|
|
|
|
+ //弹框关闭时
|
|
|
|
|
+ this.locationForm = { lat: "", lng: "" };
|
|
|
|
|
+ this.center = [];
|
|
|
|
|
+ this.map = null;
|
|
|
|
|
+ },
|
|
|
|
|
+ locationSearch() {
|
|
|
|
|
+ if (this.locationForm.lat && this.locationForm.lng) {
|
|
|
|
|
+ let lnglat = [this.locationForm.lng, this.locationForm.lat];
|
|
|
|
|
+ var marker = new AMap.Marker({
|
|
|
|
|
+ position: lnglat,
|
|
|
|
|
+ });
|
|
|
|
|
+ marker.setMap(this.map);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.warning("请输入经纬度!");
|
|
|
|
|
+ // return fasle;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ dingwei() {
|
|
|
|
|
+ if (this.ruleForm.lng != "" && this.ruleForm.lng != 0) {
|
|
|
|
|
+ this.center[0] = this.ruleForm.lng;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.ruleForm.lat != "" && this.ruleForm.lat != 0) {
|
|
|
|
|
+ this.center[1] = this.ruleForm.lat;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.addLocationDialogVisible = true;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.init();
|
|
|
|
|
+ }, 500);
|
|
|
|
|
+ },
|
|
|
|
|
+ //度转度°分′秒″
|
|
|
|
|
+ ToDegrees(val, type) {
|
|
|
|
|
+ if (typeof val == "undefined" || val == "" || isNaN(val)) {
|
|
|
|
|
+ return val;
|
|
|
|
|
+ }
|
|
|
|
|
+ val = val.toString();
|
|
|
|
|
+ var A = "";
|
|
|
|
|
+ if (type == "lng") {
|
|
|
|
|
+ A = val > 0 ? "E" : "W";
|
|
|
|
|
+ } else if (type == "lat") {
|
|
|
|
|
+ A = val > 0 ? "N" : "S";
|
|
|
|
|
+ }
|
|
|
|
|
+ var i = val.indexOf(".");
|
|
|
|
|
+ var strDu = i < 0 ? val : val.substring(0, i); //获取度
|
|
|
|
|
+ var strFen = 0;
|
|
|
|
|
+ var strMiao = 0;
|
|
|
|
|
+ if (i > 0) {
|
|
|
|
|
+ var strFen = "0" + val.substring(i);
|
|
|
|
|
+ strFen = strFen * 60 + "";
|
|
|
|
|
+ i = strFen.indexOf(".");
|
|
|
|
|
+ if (i > 0) {
|
|
|
|
|
+ strMiao = "0" + strFen.substring(i);
|
|
|
|
|
+ strFen = strFen.substring(0, i); //获取分
|
|
|
|
|
+ strMiao = strMiao * 60 + "";
|
|
|
|
|
+ i = strMiao.indexOf(".");
|
|
|
|
|
+ strMiao = strMiao.substring(0, i + 4); //取到小数点后面三位
|
|
|
|
|
+ strMiao = parseFloat(strMiao).toFixed(2); //精确小数点后面两位
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(strDu, strFen, strMiao);
|
|
|
|
|
+ return strDu + "°" + strFen + "′" + strMiao + "″" + A;
|
|
|
|
|
+ },
|
|
|
|
|
+ //度°分′秒″转度
|
|
|
|
|
+ ToDigital(lnglat) {
|
|
|
|
|
+ console.log(lnglat);
|
|
|
|
|
+ if (!isNaN(lnglat)) {
|
|
|
|
|
+ return lnglat;
|
|
|
|
|
+ }
|
|
|
|
|
+ lnglat = lnglat.toString();
|
|
|
|
|
+ var strDu, strFen, strMiao;
|
|
|
|
|
+ var duindex = lnglat.indexOf("°"); //字符度的下标
|
|
|
|
|
+ var fenindex = lnglat.indexOf("′"); //字符分的下标
|
|
|
|
|
+ var miaoindex = lnglat.indexOf("″"); //字符秒的下标
|
|
|
|
|
+ strDu = lnglat.slice(0, duindex);
|
|
|
|
|
+ strFen = lnglat.slice(duindex + 1, fenindex);
|
|
|
|
|
+ strMiao = lnglat.slice(fenindex + 1, miaoindex);
|
|
|
|
|
+ // len = len > 6 || typeof len == "undefined" ? 6 : len; //精确到小数点后最多六位
|
|
|
|
|
+ strDu =
|
|
|
|
|
+ typeof strDu == "undefined" || strDu == "" ? 0 : parseFloat(strDu);
|
|
|
|
|
+ strFen =
|
|
|
|
|
+ typeof strFen == "undefined" || strFen == ""
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : parseFloat(strFen) / 60;
|
|
|
|
|
+ strMiao =
|
|
|
|
|
+ typeof strMiao == "undefined" || strMiao == ""
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : parseFloat(strMiao) / 3600;
|
|
|
|
|
+ var digital = strDu + strFen + strMiao;
|
|
|
|
|
+ if (digital == 0) {
|
|
|
|
|
+ return "";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return digital.toFixed(6);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ orglisthover(e) {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ var str = ``;
|
|
|
|
|
+ for (var i = 0; i < e.org_list.length; i++) {
|
|
|
|
|
+ str += `<p>` + e.org_list[i].org_name + `</p>`;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.content = str;
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|
|
|
SearchBar,
|
|
SearchBar,
|
|
@@ -1340,6 +1666,14 @@ export default {
|
|
|
margin-right: 8px;
|
|
margin-right: 8px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.buttonbox {
|
|
|
|
|
+ margin-bottom: 23px;
|
|
|
|
|
+ padding-left: 100px;
|
|
|
|
|
+ /deep/.el-button {
|
|
|
|
|
+ background-color: #409eff;
|
|
|
|
|
+ border-color: #409eff;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
.real-time {
|
|
.real-time {
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -1446,10 +1780,10 @@ export default {
|
|
|
/deep/.el-button--mini {
|
|
/deep/.el-button--mini {
|
|
|
padding: 6px 8px !important;
|
|
padding: 6px 8px !important;
|
|
|
}
|
|
}
|
|
|
- /deep/.el-button--info{
|
|
|
|
|
- color: #FFF;
|
|
|
|
|
- background-color: #409EFF;
|
|
|
|
|
- border-color: #409EFF;
|
|
|
|
|
|
|
+ /deep/.el-button--info {
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background-color: #409eff;
|
|
|
|
|
+ border-color: #409eff;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|