Commit 5dfb865c authored by Administrator's avatar Administrator

编辑设备

parent 84ab88cf
Pipeline #93 failed with stages
......@@ -180,7 +180,7 @@
</el-form-item>
<el-form-item label="设备坐标" label-width="100px">
<el-input v-model="updevicedata.devicecoord" style="width:50%"></el-input>
<el-button type="primary" @click="accuracy">
<el-button type="primary" @click="drawerMap = true">
拾取坐标
</el-button>
</el-form-item>
......@@ -220,6 +220,9 @@
</el-form-item>
</el-form>
</el-card>
<el-drawer title="拾取坐标" :visible.sync="drawerMap" :modal="false" :direction="directionMap" :before-close="handleClose" size="70%" :with-header="false">
<div><CoordinateMap @map-confirm="mapConfirmData" @giveLnglat="getLnglat"></CoordinateMap></div>
</el-drawer>
</el-drawer>
</div>
</template>
......@@ -231,12 +234,15 @@ import waves from '@/directive/waves'; // 水波纹效果
import clip from '@/utils/clipboard';
import { parseTime } from '@/utils';
import checkPermission from '@/utils/permission';
import CoordinateMap from '@/components/coordinateMap';
export default {
name: 'Devicetype',
components: { Pagination },
components: { Pagination, CoordinateMap },
directives: { waves },
data() {
return {
drawerMap: false,
directionMap: 'rtl',
tableKey: 0,
downloadLoading: false,
pvData: [],
......@@ -282,6 +288,18 @@ export default {
},
methods: {
mapConfirmData(text) {
if (text.state === true) {
this.updevicedata.devicecoord = text.location;
this.drawerMap = false;
}
if (text.state === false) {
this.drawerMap = false;
}
},
getLnglat(lnglnt) {
console.log(lnglnt);
},
checkPermission,
getList() {
deviceTypeList()
......
......@@ -62,7 +62,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="230" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="userUpdate(scope.row.id)">编辑</el-button>
<el-button v-if="scope.row.state<3" type="primary" size="mini" @click="userUpdate(scope.row.id)">编辑</el-button>
<el-popover width="160" trigger="click" placement="top">
<p>此删除,分丢弃废纸篓,和删除</p>
<div style="text-align: right; margin: 0">
......
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