|
|
@@ -60,7 +60,7 @@
|
|
|
</view>
|
|
|
<view class="data-column-right">
|
|
|
<view class="device-image-container">
|
|
|
- <image class="device-image" src="https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/cbd.png" mode="aspectFit"></image>
|
|
|
+ <image class="device-image" :src="formatDevImg" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -86,7 +86,7 @@
|
|
|
<view class="chart-content">
|
|
|
<view class="chart-canvas-container" v-if="!show" :key="chartKey">
|
|
|
<!-- <div id="tempChart" class="chart-canvas"></div> -->
|
|
|
- <qiun-data-charts type="line" :chartData="chartData" :canvas2d="true" :inScrollView="true" :opts="opts" :ontouch="true"/>
|
|
|
+ <qiun-data-charts type="line" :chartData="chartData" :canvas2d="true" :inScrollView="true" :opts="opts" :ontouch="true" v-show="xData.length"/>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -189,7 +189,7 @@
|
|
|
</view>
|
|
|
<view class="sim-item">
|
|
|
<text class="sim-label">已使用:</text>
|
|
|
- <text class="sim-value"><text style="color: #0BBC58">{{ deviceInfoStatic.used }}</text>/{{ deviceInfoStatic.total }}</text>
|
|
|
+ <text class="sim-value"><text style="color: #0BBC58">{{ deviceInfoStatic.used || ''}}</text>/{{ deviceInfoStatic.total || '' }}</text>
|
|
|
</view>
|
|
|
<view class="sim-item">
|
|
|
<text class="sim-value">
|
|
|
@@ -221,15 +221,18 @@
|
|
|
</view>
|
|
|
<view slot="expanded">
|
|
|
<view class="general-images">
|
|
|
- <view class="general-image edit-border" @click="editData">
|
|
|
+ <view class="general-image edit-border" :class="{'edit-border2':isShowPhoto}" @click="editData">
|
|
|
<image :src="editBorder" class="image-icon"></image>
|
|
|
</view>
|
|
|
- <view class="general-image sim-border" @click="simData">
|
|
|
+ <view class="general-image sim-border" :class="{'sim-border2':isShowPhoto}" @click="simData">
|
|
|
<image :src="simBorder" class="image-icon"></image>
|
|
|
</view>
|
|
|
- <view class="general-image setting-border" @click="openSettings">
|
|
|
+ <view class="general-image setting-border" :class="{'setting-border2':isShowPhoto}" @click="openSettings">
|
|
|
<image :src="settingBorder" class="image-icon"></image>
|
|
|
</view>
|
|
|
+ <view class="general-image photo-border" @click="openPhoto" v-if="isShowPhoto">
|
|
|
+ <image :src="photoBorder" class="image-icon"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</floatButton>
|
|
|
@@ -246,6 +249,7 @@ import general from '../assets/general.png';
|
|
|
import editBorder from '../assets/editBorder.png';
|
|
|
import settingBorder from '../assets/settingBorder.png';
|
|
|
import simBorder from '../assets/simBorder.png';
|
|
|
+import photoBorder from '../assets/photoBorder.png';
|
|
|
let chartInstance = null;
|
|
|
|
|
|
export default {
|
|
|
@@ -283,22 +287,22 @@ export default {
|
|
|
components: {
|
|
|
floatButton,
|
|
|
},
|
|
|
- computed:{
|
|
|
- totalPages(){
|
|
|
- return Math.ceil(this.totalPage / this.page_size)
|
|
|
- }
|
|
|
- },
|
|
|
data() {
|
|
|
return {
|
|
|
setting,
|
|
|
general,
|
|
|
editBorder,
|
|
|
settingBorder,
|
|
|
+ photoBorder,
|
|
|
simBorder,
|
|
|
+ devImage:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/cbd.png',
|
|
|
+ baseDevice:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image',
|
|
|
+ devImg:'',
|
|
|
activeTab: 0,
|
|
|
edit,
|
|
|
sim,
|
|
|
show:false,
|
|
|
+ isShowPhoto:false,
|
|
|
show1:true,
|
|
|
equipStateDict:{},
|
|
|
chartTabs: [
|
|
|
@@ -352,6 +356,14 @@ export default {
|
|
|
mounted(){
|
|
|
this.equipStateDict = Circulation
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ totalPages(){
|
|
|
+ return Math.ceil(this.totalPage / this.page_size) || 1
|
|
|
+ },
|
|
|
+ formatDevImg() {
|
|
|
+ return `https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/${this.devImg}.png`;
|
|
|
+ },
|
|
|
+ },
|
|
|
watch:{
|
|
|
polylineList:{
|
|
|
handler(newVal, oldVal){
|
|
|
@@ -364,6 +376,31 @@ export default {
|
|
|
deep:true,
|
|
|
immediate:true,
|
|
|
},
|
|
|
+ deviceInfo:{
|
|
|
+ handler(newVal, oldVal){
|
|
|
+ if (newVal.device_model == '11'){
|
|
|
+ this.devImg = 'cbd4.1'
|
|
|
+ this.isShowPhoto = true
|
|
|
+ } else if(newVal.device_model == '12'){
|
|
|
+ this.devImg = 'cbd1'
|
|
|
+ this.isShowPhoto = false
|
|
|
+ } else if(newVal.device_model == '13'){
|
|
|
+ this.devImg = 'cbd5'
|
|
|
+ this.isShowPhoto = true
|
|
|
+ } else if(newVal.device_model == '14'){
|
|
|
+ this.devImg = 'cbd6'
|
|
|
+ this.isShowPhoto = true
|
|
|
+ } else if(newVal.device_model == '15'){
|
|
|
+ this.devImg = 'gkcbd1'
|
|
|
+ this.isShowPhoto = false
|
|
|
+ } else{
|
|
|
+ this.devImg = 'cbd'
|
|
|
+ this.isShowPhoto = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep:true,
|
|
|
+ immediate:true,
|
|
|
+ },
|
|
|
deviceHistoryList:{
|
|
|
handler(newVal, oldVal){
|
|
|
this.historyData = []
|
|
|
@@ -378,6 +415,20 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ async openPhoto(){
|
|
|
+ const res = await this.$myRequest({
|
|
|
+ url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
|
|
|
+ method: 'POST',
|
|
|
+ data: {
|
|
|
+ device_type_id: this.deviceInfo.type,
|
|
|
+ d_id: this.deviceInfo.d_id,
|
|
|
+ cmd: 'takephoto',
|
|
|
+ },
|
|
|
+ });
|
|
|
+ if(res){
|
|
|
+ this.$u.toast('拍照成功')
|
|
|
+ }
|
|
|
+ },
|
|
|
editData(){
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/afterSale/addafter?d_id=' + this.deviceInfo.d_id +'&device_id='+this.deviceInfo.id + '&device_type=' + this.deviceInfo.type,
|
|
|
@@ -631,8 +682,9 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
updateChartsData(){
|
|
|
+ const categories = this.xData.length ? this.xData : [];
|
|
|
const lineData = {
|
|
|
- categories: this.xData,
|
|
|
+ categories,
|
|
|
series: [
|
|
|
{
|
|
|
name: this.chartTabs[this.activeChartTab].name,
|
|
|
@@ -727,6 +779,7 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
+ background: #ffffff;
|
|
|
transition: all 0.3s ease;
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
|
.general-icon{
|
|
|
@@ -745,6 +798,7 @@ export default {
|
|
|
width: 80rpx;
|
|
|
height: 80rpx;
|
|
|
border-radius: 50%;
|
|
|
+ background: #ffffff;
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
|
display:flex;
|
|
|
align-items: center;
|
|
|
@@ -766,6 +820,22 @@ export default {
|
|
|
top: -40rpx;
|
|
|
left: -180rpx;
|
|
|
}
|
|
|
+ .edit-border2{
|
|
|
+ top: 60rpx;
|
|
|
+ left: -70rpx;
|
|
|
+ }
|
|
|
+ .sim-border2{
|
|
|
+ top: -75rpx;
|
|
|
+ left: -150rpx;
|
|
|
+ }
|
|
|
+ .setting-border2{
|
|
|
+ top: 20rpx;
|
|
|
+ left: -150rpx;
|
|
|
+ }
|
|
|
+ .photo-border{
|
|
|
+ top: -135rpx;
|
|
|
+ left: -70rpx;
|
|
|
+ }
|
|
|
}
|
|
|
/* 主要数据面板 */
|
|
|
.main-data-panel {
|