Merge branch 'dev-yjl' into 'shenzhen-dev'

演示平台页面bug修复

See merge request !118
This commit is contained in:
袁晶琳 2023-03-15 10:01:06 +08:00
commit 1b2419e29b
7 changed files with 569 additions and 372 deletions

View File

@ -20,7 +20,7 @@ var PROJECT = {
}
var PROJECT_TYPE = PROJECT.local_test
var PROJECT_TYPE = PROJECT.online_zjsj
var headerShow = true; // 是否显示头部
var tabsShow = true; // 是否显示tabs

View File

@ -10,7 +10,7 @@
>
<div slot="default" class="coordinate-picking">
<!-- 地址 -->
{{$t('message.alarmValueSet.gdAddress')}}:
{{ $t('message.alarmValueSet.gdAddress') }}:
<el-input
size="medium"
v-model="coordinateInfo.city"
@ -19,14 +19,14 @@
></el-input>
<!-- <el-button type="primary" size="medium" @click="search">查询</el-button>-->
<!-- 经度 -->
{{$t('message.alarmValueSet.longitude')}}:
{{ $t('message.alarmValueSet.longitude') }}:
<el-input
size="medium"
v-model="coordinateInfo.lng"
:placeholder="$t('message.alarmValueSet.placeholder')"
></el-input>
<!-- 纬度 -->
{{$t('message.alarmValueSet.latitude')}}:
{{ $t('message.alarmValueSet.latitude') }}:
<el-input
size="medium"
v-model="coordinateInfo.lat"
@ -34,7 +34,7 @@
></el-input>
<el-button size="medium" type="primary" @click="submit">
<!-- 提交 -->
{{$t('message.alarmValueSet.submit')}}
{{ $t('message.alarmValueSet.submit') }}
</el-button>
</div>
<div id="container"></div>
@ -50,58 +50,63 @@ export default {
default: {}
}
},
name: "gd-map",
name: 'gd-map',
data() {
return {
coordinateInfo: {
city:"",
lng: "",
lat: ""
city: '',
lng: '',
lat: ''
},
map: {},
auto: {},
placeSearch: {},
dialogVisible: true
};
}
},
mounted() {
// console.log("", this.addProjectForm);
this.coordinateInfo.city = this.addProjectForm.areaName
this.coordinateInfo.lng = this.addProjectForm.longitude
this.coordinateInfo.lng = this.addProjectForm.longitude
this.coordinateInfo.lat = this.addProjectForm.latitude
this.$nextTick(() => {
this.initMap();
});
this.initMap()
})
},
methods: {
initMap() {
//
this.map = new AMap.Map("container", {
this.map = new AMap.Map('container', {
resizeEnable: true,
center:[ this.addProjectForm.longitude != "" ? this.addProjectForm.longitude : "112.5",
this.addProjectForm.latitude != "" ? this.addProjectForm.latitude : "23"
]
});
center: [
this.addProjectForm.longitude != ''
? this.addProjectForm.longitude
: '112.5',
this.addProjectForm.latitude != ''
? this.addProjectForm.latitude
: '23'
]
})
//
var autoOptions = {
input: "tipinput"
};
this.auto = new AMap.Autocomplete(autoOptions);
input: 'tipinput'
}
this.auto = new AMap.Autocomplete(autoOptions)
this.placeSearch = new AMap.PlaceSearch({
map: this.map
}); //
AMap.event.addListener(this.auto, "select", this.select); //
this.map.on("click", e => {
this.coordinateInfo.lng = e.lnglat.getLng();
this.coordinateInfo.lat = e.lnglat.getLat();
}) //
AMap.event.addListener(this.auto, 'select', this.select) //
this.map.on('click', (e) => {
this.coordinateInfo.lng = e.lnglat.getLng()
this.coordinateInfo.lat = e.lnglat.getLat()
// console.log(' [ ' + e.lnglat.getLng() + ',' + e.lnglat.getLat() + ' ] ');
});
})
},
select(e) {
console.log("select", e);
this.placeSearch.setCity(e.poi.adcode);
this.placeSearch.search(e.poi.name); //
console.log('select', e)
this.placeSearch.setCity(e.poi.adcode)
this.placeSearch.search(e.poi.name) //
},
search() {
// console.log('a', e.poi.adcode, 'name', e.poi.name, '----------placeSearch', this.placeSearch)
@ -109,13 +114,13 @@ export default {
// this.placeSearch.search(e.poi.name); //
},
submit() {
this.$emit("save", this.coordinateInfo);
this.$emit('save', this.coordinateInfo)
},
closeMap() {
this.$emit("closeMap", false);
this.$emit('closeMap', false)
}
}
};
}
</script>
<style lang="less" scoped>

View File

@ -218,7 +218,12 @@
</div>
</el-dialog>
<!--高德地图-->
<gd-map v-if="showMap" @closeMap="closeMap" @save="getLngLat"></gd-map>
<gd-map
v-if="showMap"
:addProjectForm="addProjectForm"
@closeMap="closeMap"
@save="getLngLat"
></gd-map>
</div>
</template>
<script>
@ -295,7 +300,33 @@ export default {
supplyList: [],
supplyDetail: null,
configDialog: false,
supplierId: ''
supplierId: '',
addProjectForm: {
placeCode: '',
areaCode: '',
buildingNum: '',
bulidStatus: '',
cityCode: '',
companySn: '',
constructionStage: '',
engineeringPurpose: '',
households: '',
latitude: '',
layoutImage: '',
longitude: '',
projectAcreage: '',
projectAddress: '',
projectName: '',
projectNumber: '',
projectType: '',
provincesCode: '',
saleAcreage: '',
startWorkDate: '',
structureType: '',
projectManage: '',
projectTel: '',
majorProjectType: 0
}
}
},
methods: {

View File

@ -215,7 +215,12 @@
</div>
</el-dialog>
<!--高德地图-->
<gd-map v-if="showMap" @closeMap="closeMap" @save="getLngLat"></gd-map>
<gd-map
v-if="showMap"
@closeMap="closeMap"
@save="getLngLat"
:addProjectForm="addProjectForm"
></gd-map>
</div>
</template>
<script>
@ -292,7 +297,33 @@ export default {
supplyList: [],
supplyDetail: null,
configDialog: false,
supplierId: ''
supplierId: '',
addProjectForm: {
placeCode: '',
areaCode: '',
buildingNum: '',
bulidStatus: '',
cityCode: '',
companySn: '',
constructionStage: '',
engineeringPurpose: '',
households: '',
latitude: '',
layoutImage: '',
longitude: '',
projectAcreage: '',
projectAddress: '',
projectName: '',
projectNumber: '',
projectType: '',
provincesCode: '',
saleAcreage: '',
startWorkDate: '',
structureType: '',
projectManage: '',
projectTel: '',
majorProjectType: 0
}
}
},
methods: {

View File

@ -2218,9 +2218,11 @@ export default {
getDepartmentList() {
let data = {
enterpriseId: this.checkedId,
projectSn: this.projectSn
projectSn: this.projectSn,
personType: 2
}
getDepartmentInfoList(data).then((res) => {
console.log('部门列表数据=====', res)
if (res.code == 200) {
this.checkedTeamId = 0
this.teamListData = res.result

View File

@ -3,7 +3,7 @@
<div class="left fullHeight whiteBlock">
<div class="title">
<!-- 全景图片 -->
<span>{{$t('message.AICenter.panorama')}}</span>
<span>{{ $t('message.AICenter.panorama') }}</span>
</div>
<div class="list_content">
<vue-scroll v-if="panoramaList.length > 0">
@ -31,10 +31,12 @@
</div>
</vue-scroll>
<div class="placeholderBox" v-else>
{{ $t("message.personnelPosition.mapManage.no_data") }}
{{ $t('message.personnelPosition.mapManage.no_data') }}
</div>
</div>
<div class="addFirm" @click="addPanoramicBtn">{{$t('message.AICenter.addPanorama')}}</div>
<div class="addFirm" @click="addPanoramicBtn">
{{ $t('message.AICenter.addPanorama') }}
</div>
</div>
<div class="right fullHeight whiteBlock" v-show="panoramaList.length > 0">
<div class="flex2 btn_wrap">
@ -55,16 +57,22 @@
style="margin-left: 15px"
type="primary"
@click="editMarkBtn"
>{{ editMark ? $t('message.AICenter.cancel') : $t('message.AICenter.editLocation') }}</el-button
>{{
editMark
? $t('message.AICenter.cancel')
: $t('message.AICenter.editLocation')
}}</el-button
>
</div>
<div id="photosphere" class="photosphere"></div>
<div id="photosphere" class="photosphere">
<img :src="$store.state.FILEURL + imageUrl" alt="" />
</div>
</div>
<div class="right fullHeight whiteBlock" v-if="panoramaList.length == 0">
<div class="nodata_wrap">
<img src="@/assets/images/noData.png" />
<div>{{ $t("message.laborMange.noData") }}</div>
<div>{{ $t('message.laborMange.noData') }}</div>
</div>
</div>
@ -84,10 +92,16 @@
class="dialogFormBox"
>
<el-form-item
:label="$t('message.AICenter.photoName')+':'"
:label="$t('message.AICenter.photoName') + ':'"
prop="imageName"
:rules="[
{ required: true, message: $t('message.AICenter.placeholder')+$t('message.AICenter.photoName'), trigger: 'blur' },
{
required: true,
message:
$t('message.AICenter.placeholder') +
$t('message.AICenter.photoName'),
trigger: 'blur'
}
]"
>
<el-input
@ -96,10 +110,14 @@
></el-input>
</el-form-item>
<el-form-item
:label="$t('message.AICenter.updataPhoto')+':'"
:label="$t('message.AICenter.updataPhoto') + ':'"
prop="imageUrl"
:rules="[
{ required: true, message: $t('message.AICenter.pleaseUpdataPhoto'), trigger: 'blur' },
{
required: true,
message: $t('message.AICenter.pleaseUpdataPhoto'),
trigger: 'blur'
}
]"
>
<el-upload
@ -125,14 +143,14 @@
@click="addPanoramicDialog = false"
icon="el-icon-circle-close"
size="medium"
>{{ $t("message.personnelPosition.cancel") }}
>{{ $t('message.personnelPosition.cancel') }}
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="savePanoramicFn('imgForm')"
size="medium"
>{{ $t("message.personnelPosition.determine") }}
>{{ $t('message.personnelPosition.determine') }}
</el-button>
</div>
</el-form>
@ -152,7 +170,7 @@
<div class="flex3" style="height: 86%">
<div class="left">
<div class="title">
<span>{{$t('message.AICenter.devType')}}</span>
<span>{{ $t('message.AICenter.devType') }}</span>
</div>
<vue-scroll v-if="devList.length > 0" style="height: 100%">
<div
@ -174,7 +192,10 @@
class="tables"
ref="multipleTable"
>
<el-table-column :label="$t('message.AICenter.choose')" width="80">
<el-table-column
:label="$t('message.AICenter.choose')"
width="80"
>
<template slot-scope="scope">
<el-radio
v-model="checkDevId"
@ -183,9 +204,15 @@
></el-radio>
</template>
</el-table-column>
<el-table-column prop="name" :label="$t('message.AICenter.devName')">
<el-table-column
prop="name"
:label="$t('message.AICenter.devName')"
>
</el-table-column>
<el-table-column prop="devSn" :label="$t('message.AICenter.devNo')">
<el-table-column
prop="devSn"
:label="$t('message.AICenter.devNo')"
>
</el-table-column>
</el-table>
</vue-scroll>
@ -196,19 +223,19 @@
<el-button
class="cancleBtn"
@click="
dialogVisible = false;
checkDevId = '';
dialogVisible = false
checkDevId = ''
"
icon="el-icon-circle-close"
size="medium"
>{{ $t("message.personnelPosition.cancel") }}
>{{ $t('message.personnelPosition.cancel') }}
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="saveMark"
size="medium"
>{{ $t("message.personnelPosition.determine") }}
>{{ $t('message.personnelPosition.determine') }}
</el-button>
</div>
</div>
@ -223,35 +250,35 @@ import {
deletePanoramicImageApi,
getDevMarkListApi,
addMarkerApi,
deleteMarkerApi,
} from "@/assets/js/api/panoramic.js";
deleteMarkerApi
} from '@/assets/js/api/panoramic.js'
export default {
data() {
return {
uploadUrl: "",
fileUrl: "",
projectSn: "",
uploadUrl: '',
fileUrl: '',
projectSn: '',
panoramaList: [], //
addPanoramicDialog: false, //
dialogTitle: this.$t('message.AICenter.addPanorama2'),
imgForm: {
imageUrl: "",
imageName: "",
imageUrl: '',
imageName: ''
},
isEditType: false, //
//
nextPano: {
imageUrl: "",
imageName: "",
imageUrl: '',
imageName: ''
},
activePanoramicIndex: 0, //
//---
devList:this.$t('message.AICenter.devList'),
devList: this.$t('message.AICenter.devList'),
//
markLocation: {
longitude: "",
latitude: "",
longitude: '',
latitude: ''
},
//
panoramadata: null,
@ -259,171 +286,178 @@ export default {
activeDevIndex: 0, //
editMark: false, //
dialogVisible: false,
checkDevId: "", //
};
checkDevId: '', //
imageUrl: '' //
}
},
created() {
this.uploadUrl = this.$store.state.UPLOADURL;
this.fileUrl = this.$store.state.FILEURL;
this.projectSn = this.$store.state.projectSn;
this.uploadUrl = this.$store.state.UPLOADURL
this.fileUrl = this.$store.state.FILEURL
this.projectSn = this.$store.state.projectSn
},
mounted() {
this.getPanoramaList();
this.getPanoramaList()
},
methods: {
//
getPanoramaList() {
let data = {
projectSn: this.projectSn,
};
projectSn: this.projectSn
}
getPanoramaListApi(data).then((res) => {
if (res.code == 200) {
this.panoramaList = res.result;
this.panoramaList = res.result
if (res.result.length > 0) {
this.editMark = false;
this.imageUrl = res.result[0].imageUrl
this.editMark = false
if (this.panoramadata) {
this.panoramadata.destroy();
this.nextPano = res.result[this.activePanoramicIndex];
this.panoramadata.destroy()
this.nextPano = res.result[this.activePanoramicIndex]
} else {
this.activePanoramicIndex = 0;
this.nextPano = res.result[0];
this.activePanoramicIndex = 0
this.nextPano = res.result[0]
}
setTimeout(() => {
this.$nextTick(() => {
this.showPhoto();
this.getDevMarkList(2);
});
}, 10);
this.showPhoto()
this.getDevMarkList(2)
})
}, 10)
}
}
});
})
},
//
addPanoramicBtn() {
this.imgForm = {
imageUrl: "",
imageName: "",
};
this.isEditType = false;
this.dialogTitle = this.$t('message.AICenter.addPanorama2');
this.addPanoramicDialog = true;
imageUrl: '',
imageName: ''
}
this.isEditType = false
this.dialogTitle = this.$t('message.AICenter.addPanorama2')
this.addPanoramicDialog = true
setTimeout(() => {
this.$refs.imgForm.clearValidate();
}, 300);
this.$refs.imgForm.clearValidate()
}, 300)
},
// ||
savePanoramicFn(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let data = this.imgForm;
data.projectSn = this.projectSn;
let data = this.imgForm
data.projectSn = this.projectSn
if (!this.isEditType) {
addPanoramicImageApi(data).then((res) => {
if (res.code == 200) {
// this.$message.success(res.message);
this.$message.success("操作成功");
this.addPanoramicDialog = false;
this.getPanoramaList();
this.$message.success('操作成功')
this.addPanoramicDialog = false
this.getPanoramaList()
} else {
this.$message.error(res.message);
this.$message.error(res.message)
}
});
})
} else {
editPanoramicImageApi(data).then((res) => {
if (res.code == 200) {
// this.$message.success(res.message);
this.$message.success("上传成功");
this.addPanoramicDialog = false;
this.getPanoramaList();
this.$message.success('上传成功')
this.addPanoramicDialog = false
this.getPanoramaList()
} else {
// this.$message.error(res.message);
this.$message.error("上传失败");
this.$message.error('上传失败')
}
});
})
}
} else {
return false;
return false
}
});
})
},
//
changePanoramicFn(val, index) {
this.activePanoramicIndex = index;
this.nextPano = val;
this.editMark = false;
this.activePanoramicIndex = index
this.nextPano = val
this.editMark = false
this.imageUrl = val.imageUrl
setTimeout(() => {
if (this.panoramadata) {
this.panoramadata.destroy();
this.panoramadata.destroy()
}
this.$nextTick(() => {
this.showPhoto();
this.getDevMarkList(2);
});
}, 10);
this.showPhoto()
this.getDevMarkList(2)
})
}, 10)
},
//
editPanoramicFn(val) {
this.imgForm = JSON.parse(JSON.stringify(val));
this.dialogTitle = this.$t('message.AICenter.editPanorama');
this.isEditType = true;
this.addPanoramicDialog = true;
this.imgForm = JSON.parse(JSON.stringify(val))
this.dialogTitle = this.$t('message.AICenter.editPanorama')
this.isEditType = true
this.addPanoramicDialog = true
},
//
deletePanoramicFn(val) {
this.$confirm(this.$t('message.AICenter.tipText'), this.$t('message.AICenter.tip'), {
confirmButtonText: this.$t('message.AICenter.confirm'),
cancelButtonText: this.$t('message.AICenter.cancel'),
type: "warning",
})
this.$confirm(
this.$t('message.AICenter.tipText'),
this.$t('message.AICenter.tip'),
{
confirmButtonText: this.$t('message.AICenter.confirm'),
cancelButtonText: this.$t('message.AICenter.cancel'),
type: 'warning'
}
)
.then(() => {
let data = { id: val.id };
let data = { id: val.id }
deletePanoramicImageApi(data).then((res) => {
if (res.code == 200) {
this.$message({
type: "success",
message: this.$t('message.AICenter.deleteSuccess')+'!',
});
this.getPanoramaList();
this.activePanoramicIndex = 0;
type: 'success',
message: this.$t('message.AICenter.deleteSuccess') + '!'
})
this.getPanoramaList()
this.activePanoramicIndex = 0
} else {
this.$message.error(res.message);
this.$message.error(res.message)
}
});
})
})
.catch(() => {
this.$message({
type: "info",
message: this.$t('message.AICenter.cancelDelete'),
});
});
type: 'info',
message: this.$t('message.AICenter.cancelDelete')
})
})
},
//
handleSuccess(file) {
this.$message.success(this.$t('message.AICenter.updateSuccess'));
this.imgForm.imageUrl = file.data[0].imageUrl;
this.$message.success(this.$t('message.AICenter.updateSuccess'))
this.imgForm.imageUrl = file.data[0].imageUrl
},
//
handlePictureCardPreview(file) {
console.log(file);
console.log(file)
},
//
handleRemove(file) {
console.log(file);
console.log(file)
},
//
showPhoto() {
let that = this;
this.displayPanoramadata = true;
let that = this
this.displayPanoramadata = true
this.panoramadata = new PhotoSphereViewer.Viewer({
container: document.querySelector("#photosphere"),
container: document.querySelector('#photosphere'),
panorama: this.fileUrl + this.nextPano.imageUrl,
plugins: [
[
@ -438,10 +472,10 @@ export default {
// width: 32,
// height: 32,
// },
],
},
],
],
]
}
]
]
// caption: '', //
// // loading_img: this.loading_img, //null
// // longitude_range: [-7 * Math.PI / 8, 7 * Math.PI / 8], //
@ -463,62 +497,65 @@ export default {
// let a = that.nextPano.nodes;
// return a;
// })(),
});
})
const markersPlugin = (this.markersPlugin = this.panoramadata.getPlugin(
PhotoSphereViewer.MarkersPlugin
));
))
//
markersPlugin.on("select-marker", (e, marker) => {
markersPlugin.on('select-marker', (e, marker) => {
that
.$confirm(this.$t('message.AICenter.tipText2')+'?', this.$t('message.AICenter.tip'), {
confirmButtonText: this.$t('message.AICenter.confirm'),
cancelButtonText: this.$t('message.AICenter.cancel'),
type: "warning",
})
.$confirm(
this.$t('message.AICenter.tipText2') + '?',
this.$t('message.AICenter.tip'),
{
confirmButtonText: this.$t('message.AICenter.confirm'),
cancelButtonText: this.$t('message.AICenter.cancel'),
type: 'warning'
}
)
.then(() => {
deleteMarkerApi({ id: marker.id }).then((res) => {
if (res.code == 200) {
that.$message({
type: "success",
message: this.$t('message.AICenter.deleteSuccess')+'!',
});
type: 'success',
message: this.$t('message.AICenter.deleteSuccess') + '!'
})
//
markersPlugin.removeMarker({ id: marker.id });
markersPlugin.removeMarker({ id: marker.id })
} else {
that.$message({
type: "error",
message: res.message,
});
type: 'error',
message: res.message
})
}
});
})
})
.catch(() => {
that.$message({
type: "info",
message: this.$t('message.AICenter.cancelDelete')+'!',
});
});
});
type: 'info',
message: this.$t('message.AICenter.cancelDelete') + '!'
})
})
})
},
// ||
editMarkBtn() {
let that = this;
this.editMark = !this.editMark;
let that = this
this.editMark = !this.editMark
//
if (this.editMark) {
this.panoramadata.on("click", function (e) {
this.panoramadata.on('click', function (e) {
that.markLocation = {
longitude: e.args[0].longitude,
latitude: e.args[0].latitude,
};
that.dialogVisible = true;
that.getDevMarkList(1);
});
latitude: e.args[0].latitude
}
that.dialogVisible = true
that.getDevMarkList(1)
})
} else {
this.panoramadata.__events.click.splice(1, 1); // addMarker
this.panoramadata.__events.click.splice(1, 1) // addMarker
}
},
//
@ -528,59 +565,58 @@ export default {
panoramaId: this.nextPano.id,
projectSn: this.projectSn,
selectType: type,
devType: "",
};
devType: ''
}
getDevMarkListApi(data).then((res) => {
if (res.result.length > 0) {
let result = JSON.parse(JSON.stringify(res.result));
let result = JSON.parse(JSON.stringify(res.result))
if (type == 1) {
this.devList.forEach((element, index) => {
let arr = [];
let arr = []
result.forEach((val) => {
if (element.type == val.devType) {
arr.push(val);
arr.push(val)
}
});
element.list = arr;
});
})
element.list = arr
})
} else {
//
if (this.markersPlugin) {
this.markersPlugin.clearMarkers();
this.markersPlugin.clearMarkers()
}
console.log(this.markersPlugin)
console.log(this.markersPlugin)
result.forEach((item, index) => {
var icon = null;
var icon = null
switch (Number(item.devType)) {
case 1:
icon = require("@/assets/images/dataBoard/devIcon-car.png");
break;
icon = require('@/assets/images/dataBoard/devIcon-car.png')
break
case 2:
icon = require("@/assets/images/dataBoard/devIcon-tower.png");
break;
icon = require('@/assets/images/dataBoard/devIcon-tower.png')
break
case 3:
icon = require("@/assets/images/dataBoard/devIcon-lifter.png");
break;
icon = require('@/assets/images/dataBoard/devIcon-lifter.png')
break
case 4:
icon = require("@/assets/images/dataBoard/devIcon-camera.png");
break;
icon = require('@/assets/images/dataBoard/devIcon-camera.png')
break
case 5:
icon = require("@/assets/images/dataBoard/devIcon-electric.png");
break;
icon = require('@/assets/images/dataBoard/devIcon-electric.png')
break
case 6:
icon = require("@/assets/images/dataBoard/devIcon-green.png");
break;
icon = require('@/assets/images/dataBoard/devIcon-green.png')
break
case 7:
icon = require("@/assets/images/dataBoard/devIcon-face.png");
break;
icon = require('@/assets/images/dataBoard/devIcon-face.png')
break
case 8:
icon = require("@/assets/images/dataBoard/devIcon-chamber.png");
break;
icon = require('@/assets/images/dataBoard/devIcon-chamber.png')
break
}
const markersPlugin = (this.markersPlugin = this.panoramadata.getPlugin(
PhotoSphereViewer.MarkersPlugin
));
const markersPlugin = (this.markersPlugin =
this.panoramadata.getPlugin(PhotoSphereViewer.MarkersPlugin))
setTimeout(() => {
markersPlugin.addMarker({
id: item.id,
@ -589,46 +625,47 @@ export default {
image: icon,
width: 42,
height: 42,
anchor: "bottom center",
tooltip: this.$t('message.AICenter.devName')+':' + item.name,
anchor: 'bottom center',
tooltip:
this.$t('message.AICenter.devName') + ':' + item.name,
data: {
generated: true,
},
});
}, 200);
});
generated: true
}
})
}, 200)
})
}
}
});
})
},
//
changeDevFn(val, index) {
this.activeDevIndex = index;
this.activeDevIndex = index
},
//
saveMark() {
let data = {};
let checkDev = this.checkDevId.split(",");
data.devType = checkDev[0];
data.devId = checkDev[2];
data.longitude = this.markLocation.longitude;
data.latitude = this.markLocation.latitude;
data.panoramaId = this.nextPano.id;
data.projectSn = this.projectSn;
let data = {}
let checkDev = this.checkDevId.split(',')
data.devType = checkDev[0]
data.devId = checkDev[2]
data.longitude = this.markLocation.longitude
data.latitude = this.markLocation.latitude
data.panoramaId = this.nextPano.id
data.projectSn = this.projectSn
addMarkerApi(data).then((res) => {
if (res.code == 200) {
this.$message.success(this.$t('message.AICenter.addSuccess'));
this.dialogVisible = false;
this.getDevMarkList(2);
this.$message.success(this.$t('message.AICenter.addSuccess'))
this.dialogVisible = false
this.getDevMarkList(2)
} else {
this.$message.error(res.message);
this.$message.error(res.message)
}
});
},
},
};
})
}
}
}
</script>
<style lang="less" scoped>
.title {
@ -643,7 +680,7 @@ export default {
display: inline-block;
&::before {
content: "";
content: '';
position: absolute;
bottom: -1px;
left: 0;
@ -712,7 +749,7 @@ export default {
background-color: rgba(81, 129, 246, 0.1);
&::after {
content: "";
content: '';
position: absolute;
top: 0;
left: 0;

View File

@ -33,7 +33,7 @@
$t("message.lifter.demand")
}}</el-button> -->
<el-button type="primary" @click="addMaintenanceBtn">{{
$t("message.videoManage.add")
$t('message.videoManage.add')
}}</el-button>
</el-form-item>
</el-form>
@ -45,13 +45,21 @@
style="width: 100%"
height="540px"
>
<!-- 设备型号 -->
<el-table-column prop="devModel" :label="$t('message.lifter.equipmentModel')" align="center">
<!-- 设备型号 -->
<el-table-column
prop="devModel"
:label="$t('message.lifter.equipmentModel')"
align="center"
>
</el-table-column>
<!-- 现场编号 -->
<el-table-column prop="sceneNumber" :label="$t('message.lifter.siteNumber')" align="center">
<el-table-column
prop="sceneNumber"
:label="$t('message.lifter.siteNumber')"
align="center"
>
<template slot-scope="scope">
{{scope.row.devType}}
{{ scope.row.devType }}
</template>
</el-table-column>
<!-- 最终安装高度 -->
@ -83,20 +91,42 @@
>
</el-table-column>
<!-- 计划安装时间 -->
<el-table-column prop="planInstallTime" :label="$t('message.lifter.planInstallTime')" align="center"></el-table-column>
<el-table-column
prop="planInstallTime"
:label="$t('message.lifter.planInstallTime')"
align="center"
></el-table-column>
<!-- 创建时间 -->
<el-table-column prop="createTime" :label="$t('message.lifter.creationTime')"></el-table-column>
<el-table-column
prop="createTime"
:label="$t('message.lifter.creationTime')"
></el-table-column>
<!-- 创建人 -->
<el-table-column prop="createUser" :label="$t('message.lifter.creator')"></el-table-column>
<el-table-column
prop="createUser"
:label="$t('message.lifter.creator')"
></el-table-column>
<!-- 操作 -->
<el-table-column :label="$t('message.lifter.operation')" width="300px" align="center">
<el-table-column
:label="$t('message.lifter.operation')"
width="300px"
align="center"
>
<template slot-scope="scope">
<!-- 详情 -->
<div class="table_btn"><i class="el-icon-document"></i>{{ $t('message.lifter.details') }}</div>
<div class="table_btn">
<i class="el-icon-document"></i
>{{ $t('message.lifter.details') }}
</div>
<!-- 编辑 -->
<div class="table_btn"><i class="el-icon-edit-outline"></i>{{ $t('message.lifter.edit') }}</div>
<div class="table_btn">
<i class="el-icon-edit-outline"></i
>{{ $t('message.lifter.edit') }}
</div>
<!-- 删除 -->
<div class="table_btn delete_btn"><i class="el-icon-delete"></i>{{ $t('message.lifter.delete') }}</div>
<div class="table_btn delete_btn">
<i class="el-icon-delete"></i>{{ $t('message.lifter.delete') }}
</div>
</template>
</el-table-column>
</el-table>
@ -108,7 +138,7 @@
:page-sizes="$store.state.PAGESIZRS"
:page-size="pageSize"
layout="total, sizes, prev, pager, next"
:total="total"
:total="Number(total)"
background
></el-pagination>
</div>
@ -127,31 +157,48 @@
ref="maintenanceForm"
label-width="120px"
class="demo-ruleForm"
:rules="rules" size="medium"
:rules="rules"
size="medium"
>
<!-- 设备型号 -->
<el-form-item :label="$t('message.lifter.equipmentModel')" prop="devModel" required>
<!-- 设备型号 -->
<el-form-item
:label="$t('message.lifter.equipmentModel')"
prop="devModel"
required
>
<el-input
v-model="maintenanceForm.devModel"
:placeholder="$t('message.lifter.pleaseEnter')"
></el-input>
</el-form-item>
<!-- 首次安装高度 -->
<el-form-item :label="$t('message.lifter.firstInstallHeight')" prop="firstInstallHeight" required>
<el-form-item
:label="$t('message.lifter.firstInstallHeight')"
prop="firstInstallHeight"
required
>
<el-input
v-model="maintenanceForm.firstInstallHeight"
:placeholder="$t('message.lifter.pleaseEnter')"
></el-input>
</el-form-item>
<!-- 最终安装高度 -->
<el-form-item :label="$t('message.lifter.lastInstallHeight')" prop="finalInstallHeight" required>
<el-form-item
:label="$t('message.lifter.lastInstallHeight')"
prop="finalInstallHeight"
required
>
<el-input
v-model="maintenanceForm.finalInstallHeight"
:placeholder="$t('message.lifter.pleaseEnter')"
></el-input>
</el-form-item>
<!-- 计划拆除时间 -->
<el-form-item :label="$t('message.lifter.planDismantleTime')" prop="planDismantleTime" required>
<el-form-item
:label="$t('message.lifter.planDismantleTime')"
prop="planDismantleTime"
required
>
<el-date-picker
value-format="yyyy-MM-dd"
v-model="maintenanceForm.planDismantleTime"
@ -162,7 +209,11 @@
</el-date-picker>
</el-form-item>
<!-- 计划进场时间 -->
<el-form-item :label="$t('message.lifter.planMobilizationTime')" prop="planEnterTime" required>
<el-form-item
:label="$t('message.lifter.planMobilizationTime')"
prop="planEnterTime"
required
>
<el-date-picker
value-format="yyyy-MM-dd"
v-model="maintenanceForm.planEnterTime"
@ -173,7 +224,11 @@
</el-date-picker>
</el-form-item>
<!-- 计划安装时间 -->
<el-form-item :label="$t('message.lifter.planInstallTime')" prop="planInstallTime" required>
<el-form-item
:label="$t('message.lifter.planInstallTime')"
prop="planInstallTime"
required
>
<el-date-picker
value-format="yyyy-MM-dd"
v-model="maintenanceForm.planInstallTime"
@ -184,7 +239,11 @@
</el-date-picker>
</el-form-item>
<!-- 现场编号 -->
<el-form-item :label="$t('message.lifter.siteNumber')" prop="sceneNumber" required>
<el-form-item
:label="$t('message.lifter.siteNumber')"
prop="sceneNumber"
required
>
<el-input
v-model="maintenanceForm.sceneNumber"
:placeholder="$t('message.lifter.pleaseEnter')"
@ -193,9 +252,13 @@
</el-form>
<span slot="footer" class="dialog-footer">
<!-- -->
<el-button @click="dialogVisible = false" size="medium">{{ $t('message.lifter.cancel') }}</el-button>
<el-button @click="dialogVisible = false" size="medium">{{
$t('message.lifter.cancel')
}}</el-button>
<!-- -->
<el-button type="primary" @click="saveBtn" size="medium">{{ $t('message.lifter.determine') }}</el-button>
<el-button type="primary" @click="saveBtn" size="medium">{{
$t('message.lifter.determine')
}}</el-button>
</span>
</div>
</el-dialog>
@ -203,176 +266,195 @@
</vue-scroll>
</template>
<script>
import {
addMaintenanceRecordApi,
} from "@/assets/js/api/towerCrane";
import { addMaintenanceRecordApi } from '@/assets/js/api/towerCrane'
export default {
data() {
return {
projectSn: "",
projectSn: '',
pageType: 1,
navList:[{
name: this.$t('message.lifter.planningManagement'), //
id: '1'
},{
name: this.$t('message.lifter.equipmentRegistration'), //
id: '2'
},{
name: this.$t('message.lifter.supervisionAndFiling'), //
id: '3'
},{
name: this.$t('message.lifter.disclosureManagement'), //
id: '4'
},{
name: this.$t('message.lifter.acceptanceManagement'), //
id: '5'
},{
name: this.$t('message.lifter.supervisionSideStation'), //
id: '6'
},{
name: this.$t('message.lifter.inspectionManagement'), //
id: '7'
},{
name: this.$t('message.lifter.taskManagement'), //
id: '8'
}],
towerTypeList:[{
id: 1,
type: this.$t('message.lifter.towerCrane') //
},{
id: 2,
type: this.$t('message.lifter.elevator') //
},{
id: 3,
type: this.$t('message.lifter.gantryCrane')//
}],
devType: "",
navList: [
{
name: this.$t('message.lifter.planningManagement'), //
id: '1'
},
{
name: this.$t('message.lifter.equipmentRegistration'), //
id: '2'
},
{
name: this.$t('message.lifter.supervisionAndFiling'), //
id: '3'
},
{
name: this.$t('message.lifter.disclosureManagement'), //
id: '4'
},
{
name: this.$t('message.lifter.acceptanceManagement'), //
id: '5'
},
{
name: this.$t('message.lifter.supervisionSideStation'), //
id: '6'
},
{
name: this.$t('message.lifter.inspectionManagement'), //
id: '7'
},
{
name: this.$t('message.lifter.taskManagement'), //
id: '8'
}
],
towerTypeList: [
{
id: 1,
type: this.$t('message.lifter.towerCrane') //
},
{
id: 2,
type: this.$t('message.lifter.elevator') //
},
{
id: 3,
type: this.$t('message.lifter.gantryCrane') //
}
],
devType: '',
pageNo: 1,
pageSize: 10,
total: 0,
tableData: [],
uploadUrl: "",
fileUrl: "",
uploadUrl: '',
fileUrl: '',
dialogVisible: false,
managementInfoList: [],
maintenanceForm: {
},
maintenanceForm: {},
rules: {
//
devSn: [{ required: true, message: this.$t('message.lifter.pleaseSelectADevice'), trigger: "change" }],
devSn: [
{
required: true,
message: this.$t('message.lifter.pleaseSelectADevice'),
trigger: 'change'
}
],
//
maintenanceStatus: [
{
required: true,
message: this.$t('message.lifter.afterMaintenanceSta'),
trigger: "change",
},
trigger: 'change'
}
],
maintenanceTime: [
//
{ required: true, message: this.$t('message.lifter.pleaseSelectMainTime'), trigger: "change" },
{
required: true,
message: this.$t('message.lifter.pleaseSelectMainTime'),
trigger: 'change'
}
],
personLiable: [
//
{ required: true, message: this.$t('message.lifter.pSelectAMaintainer'), trigger: "change" },
{
required: true,
message: this.$t('message.lifter.pSelectAMaintainer'),
trigger: 'change'
}
],
maintenanceImage: [
//
{ required: true, message: this.$t('message.lifter.pleaseUploadPictures'), trigger: "change" },
],
},
};
{
required: true,
message: this.$t('message.lifter.pleaseUploadPictures'),
trigger: 'change'
}
]
}
}
},
created() {
this.projectSn = this.$store.state.projectSn;
this.uploadUrl = this.$store.state.UPLOADURL;
this.fileUrl = this.$store.state.FILEURL;
this.projectSn = this.$store.state.projectSn
this.uploadUrl = this.$store.state.UPLOADURL
this.fileUrl = this.$store.state.FILEURL
},
methods: {
changPageType(val){
changPageType(val) {
this.pageType = this.navList[val].id
},
//
refresh() {
this.devSn = "";
this.pageNo = 1;
this.pageSize = 10;
this.devSn = ''
this.pageNo = 1
this.pageSize = 10
},
//
addMaintenanceBtn() {
this.dialogVisible = true;
this.dialogVisible = true
setTimeout(() => {
this.$refs.maintenanceForm.clearValidate();
}, 200);
this.$refs.maintenanceForm.clearValidate()
}, 200)
},
//
handleClose() {
this.dialogVisible = false;
this.dialogVisible = false
},
//
saveBtn() {
this.$refs["maintenanceForm"].validate((valid) => {
this.$refs['maintenanceForm'].validate((valid) => {
if (valid) {
let data = this.maintenanceForm;
data.projectSn = this.projectSn;
let data = this.maintenanceForm
data.projectSn = this.projectSn
} else {
return false;
return false
}
});
})
},
handleSizeChange(val) {
this.pageSize = val;
this.pageSize = val
},
handleCurrentChange(val) {
this.pageNo = val;
},
},
};
this.pageNo = val
}
}
}
</script>
<style lang="less" scoped>
.alarmInfo {
width: 100%;
height: 100%;
.page_nav{
.page_nav {
height: 60px;
width: 100%;
padding-left: 27px;
box-sizing: border-box;
// line-height: 60px;
ul{
ul {
display: flex;
align-items: center;
height: 100%;
li{
li {
margin-right: 54px;
font-size: 14px;
display: inline-block;
cursor: pointer;
position: relative;
}
.nav_active{
.nav_active {
padding: 0 4px;
padding-bottom: 3px;
color: #88E7F0;
border-bottom: 1px solid #88E7F0;
color: #88e7f0;
border-bottom: 1px solid #88e7f0;
}
.nav_active::before{
content: "";
.nav_active::before {
content: '';
width: calc(100% + 6px);
height: 100%;
position: absolute;
@ -381,9 +463,18 @@ export default {
border-left: 0px solid;
border-right: 0px solid;
border-bottom: 2px solid;
background: linear-gradient(to top,rgba(136, 231, 240, 0.5),rgba(136, 231, 240, 0));
transform:perspective(0.5em) rotateX(-3deg);
border-image: linear-gradient(to top, rgba(136, 231, 240, 0.5), rgba(136, 231, 240, 0)) 1 1;
background: linear-gradient(
to top,
rgba(136, 231, 240, 0.5),
rgba(136, 231, 240, 0)
);
transform: perspective(0.5em) rotateX(-3deg);
border-image: linear-gradient(
to top,
rgba(136, 231, 240, 0.5),
rgba(136, 231, 240, 0)
)
1 1;
}
}
}
@ -405,27 +496,27 @@ export default {
.demo-ruleForm {
width: 90%;
}
.dialog_content{
.dialog_content {
margin: 0 20px;
}
.dialog-footer{
display: flex;
justify-content: flex-end;
.dialog-footer {
display: flex;
justify-content: flex-end;
}
.table_btn{
.table_btn {
display: inline-block;
margin-right: 30px;
cursor: pointer;
color: #7B818F;
i{
color: #7b818f;
i {
margin-right: 8px;
color: #88E7F0;
color: #88e7f0;
}
}
.delete_btn{
color: #FE6565;
i{
color: #FE6565;
}
.delete_btn {
color: #fe6565;
i {
color: #fe6565;
}
}
</style>