Merge branch 'main' of http://47.109.205.240:3000/Web/digital-agriculture-admin
This commit is contained in:
commit
994db5fbf0
@ -22,7 +22,7 @@
|
||||
</el-upload>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible" title="预览" width="500" append-to-body>
|
||||
<video controls autoplay :src="'/dev-api' + dialogImageUrl" style="display: block; max-width: 100%; margin: 0 auto; height: 400px"></video>
|
||||
<video controls autoplay :src="dialogImageUrl" style="display: block; max-width: 100%; margin: 0 auto; height: 400px"></video>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -70,7 +70,10 @@ import {
|
||||
|
||||
//日历组建
|
||||
import VCalendar from 'v-calendar';
|
||||
|
||||
import { fileUrl } from '@/utils/filesAssist';
|
||||
if (fileUrl) {
|
||||
Vue.prototype.$fileUrl = fileUrl;
|
||||
}
|
||||
// datav组件 ,会导致生成文件无法打开
|
||||
Vue.use(loading);
|
||||
Vue.use(borderBox13);
|
||||
|
13
src/utils/filesAssist.js
Normal file
13
src/utils/filesAssist.js
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @param {String | null |undefined}}
|
||||
* @return {String}
|
||||
*/
|
||||
|
||||
export function fileUrl(url = '') {
|
||||
console.log('_url', url);
|
||||
let _url = url;
|
||||
if (!_url.startsWith('http')) {
|
||||
_url = window.location.origin + _url;
|
||||
}
|
||||
return _url;
|
||||
}
|
@ -43,12 +43,12 @@
|
||||
<!-- 添加设备按钮 -->
|
||||
<el-popover v-if="!isAdmin" placement="right-start" width="100" trigger="click" v-model="isShow2">
|
||||
<div v-for="item in product" :key="item.productId" class="product flex aic" @click="addDevice(item)">
|
||||
<img :src="baseUrl + item.imgUrl" alt="" />{{ item.productName }}
|
||||
<img :src="item.imgUrl" alt="" />{{ item.productName }}
|
||||
</div>
|
||||
<i class="btn el-icon-bangzhu" slot="reference"></i>
|
||||
</el-popover>
|
||||
</div>
|
||||
<img class="followPoint" v-show="followPointShow" :src="baseUrl + deviceImgUrl" alt="" />
|
||||
<img class="followPoint" v-show="followPointShow" :src="deviceImgUrl" alt="" />
|
||||
<!-- 地图工具按钮 -->
|
||||
<div class="tool">
|
||||
<el-tooltip transition="el-zoom-in-center" class="item" effect="dark" content="尺子" placement="left">
|
||||
@ -95,9 +95,7 @@
|
||||
<div class="label"><i class="el-icon-printer el_icon"></i>设备</div>
|
||||
<li class="control_item" v-for="(item, index) in deviceProduct" :key="index">
|
||||
<div class="icon">
|
||||
<img :src="baseUrl + item.imgUrl" alt="" />{{
|
||||
item.productName.length > 7 ? `${item.productName.substring(0, 7)}...` : item.productName
|
||||
}}
|
||||
<img :src="item.imgUrl" alt="" />{{ item.productName.length > 7 ? `${item.productName.substring(0, 7)}...` : item.productName }}
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox v-model="item.show" @change="show(item)"></el-checkbox>
|
||||
@ -164,7 +162,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseUrl: process.env.VUE_APP_BASE_API,
|
||||
drawer: false, //抽屉控制
|
||||
drawer2: false, //抽屉控制
|
||||
drawer3: false,
|
||||
@ -396,7 +393,7 @@ export default {
|
||||
this.marker = [];
|
||||
var markerContent = document.createElement('div');
|
||||
var markerImg = document.createElement('img');
|
||||
markerImg.src = this.baseUrl + this.deviceImgUrl;
|
||||
markerImg.src = this.deviceImgUrl;
|
||||
markerImg.setAttribute('width', '20px');
|
||||
markerImg.setAttribute('height', '20px');
|
||||
markerContent.appendChild(markerImg);
|
||||
@ -543,7 +540,7 @@ export default {
|
||||
item.children.forEach((device) => {
|
||||
let marker = new this.AMap.Marker({
|
||||
icon: new this.AMap.Icon({
|
||||
image: this.baseUrl + device.imgUrl,
|
||||
image: device.imgUrl,
|
||||
imageSize: new this.AMap.Size(26, 26),
|
||||
}),
|
||||
position: [device.longitude, device.latitude],
|
||||
@ -889,18 +886,10 @@ export default {
|
||||
opacity: 1;
|
||||
-webkit-transform: scaleX(1);
|
||||
transform: scaleX(1);
|
||||
-webkit-transition:
|
||||
opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1),
|
||||
-webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
||||
transition:
|
||||
opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1),
|
||||
-webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
||||
transition:
|
||||
transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
|
||||
opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
||||
transition:
|
||||
transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
|
||||
opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1),
|
||||
-webkit-transition: opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1), -webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
||||
transition: opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1), -webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
||||
transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
||||
transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1),
|
||||
-webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
||||
-webkit-transform-origin: center right;
|
||||
transform-origin: center right;
|
||||
|
@ -29,7 +29,7 @@
|
||||
@click="moveTo(item, 2)"
|
||||
>
|
||||
<div>
|
||||
<img class="height-20 width-20 margin-right-6" :src="baseUrl + item.imgUrl.split(',')[1]" alt="" />{{
|
||||
<img class="height-20 width-20 margin-right-6" :src="item.imgUrl.split(',')[1]" alt="" />{{
|
||||
item.deviceName.length > 10 ? `${item.deviceName.substring(0, 10)}...` : item.deviceName
|
||||
}}
|
||||
</div>
|
||||
@ -72,7 +72,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseUrl: process.env.VUE_APP_BASE_API,
|
||||
activeIndex1: null,
|
||||
activeName: 'area',
|
||||
total: 0,
|
||||
|
@ -41,7 +41,7 @@
|
||||
:w="Number(layout.img.w)"
|
||||
:h="Number(layout.img.h)"
|
||||
>
|
||||
<el-image class="w100 h100" :src="device.imgUrl ? $baseUrl + device.imgUrl.split(',')[0] : ''" fit="fill" :lazy="true"></el-image>
|
||||
<el-image class="w100 h100" :src="device.imgUrl ? device.imgUrl.split(',')[0] : ''" fit="fill" :lazy="true"></el-image>
|
||||
</vue-draggable-resizable>
|
||||
|
||||
<vue-draggable-resizable
|
||||
|
Loading…
x
Reference in New Issue
Block a user