功能调试
This commit is contained in:
@@ -20,7 +20,7 @@ export function getDevCount(id) {
|
|||||||
url: '/cs-device-boot/deviceUser/devCount',
|
url: '/cs-device-boot/deviceUser/devCount',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
||||||
data: {id},
|
data: { id },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,12 +48,13 @@ export function addDevice(params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 直连设备注册
|
// 直连设备注册
|
||||||
export function registerDevice(nDid) {
|
export function registerDevice(nDid, type) {
|
||||||
return request({
|
return request({
|
||||||
url: '/access-boot/device/register',
|
url: '/access-boot/device/register',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
nDid,
|
nDid,
|
||||||
|
type,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -95,7 +96,7 @@ export const transferDevice = (id, userId) => {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
ids: id,
|
ids: id,
|
||||||
userId: userId || uni.getStorageSync('userInfo').userIndex
|
userId: userId || uni.getStorageSync('userInfo').userIndex,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -163,7 +164,7 @@ export const queryDeviceUser = (devId) => {
|
|||||||
url: '/cs-device-boot/deviceUser/queryUserById',
|
url: '/cs-device-boot/deviceUser/queryUserById',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
devId
|
devId,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -175,4 +176,22 @@ export const cancelShare = (params) => {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: params,
|
data: params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 取消调试
|
||||||
|
export const cancelDebug = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/cs-device-boot/EquipmentDelivery/deleteTest',
|
||||||
|
method: 'POST',
|
||||||
|
data: params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 完成调试
|
||||||
|
export const finishDebug = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/cs-device-boot/EquipmentDelivery/testcompletion',
|
||||||
|
method: 'POST',
|
||||||
|
data: params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<uni-card
|
<uni-card
|
||||||
:title="device.equipmentName"
|
:title="device.equipmentName"
|
||||||
:sub-title="device.mac"
|
:sub-title="device.mac"
|
||||||
:extra="device.isPrimaryUser?'主用户':'子用户'"
|
:extra="device.isPrimaryUser ? '主用户' : '子用户'"
|
||||||
padding="0"
|
padding="0"
|
||||||
@click="jump(device)"
|
@click="jump(device)"
|
||||||
:thumbnail="deviceIcon(device.runStatus)"
|
:thumbnail="deviceIcon(device.runStatus)"
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
<text>项目名称</text>
|
<text>项目名称</text>
|
||||||
<text>{{ device.projectName }}</text>
|
<text>{{ device.projectName }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="device-body-item mt6" v-if="device.process == 2 || device.process == 3">
|
||||||
|
<text>设备状态</text>
|
||||||
|
<text>{{ device.process == 2 ? '功能调试' : '出厂调试' }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-card>
|
</uni-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -30,9 +34,8 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
device: {
|
device: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {},
|
||||||
}
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
deviceIcon(e) {
|
deviceIcon(e) {
|
||||||
@@ -52,13 +55,19 @@ export default {
|
|||||||
},
|
},
|
||||||
jump() {
|
jump() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/device/APF/detail?id=' + this.device.equipmentId + '&isPrimaryUser=' + this.device.isPrimaryUser,
|
url:
|
||||||
|
'/pages/device/APF/detail?id=' +
|
||||||
|
this.device.equipmentId +
|
||||||
|
'&isPrimaryUser=' +
|
||||||
|
this.device.isPrimaryUser +
|
||||||
|
'&process=' +
|
||||||
|
this.device.process,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang="scss">
|
||||||
.device-body {
|
.device-body {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
|
|
||||||
@@ -67,4 +76,4 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -29,14 +29,13 @@
|
|||||||
<view class="module">
|
<view class="module">
|
||||||
<view class="grid-card">
|
<view class="grid-card">
|
||||||
<view class="grid-card-content-2">
|
<view class="grid-card-content-2">
|
||||||
<template v-for="(item,index) in IOData">
|
<template v-for="(item, index) in IOData">
|
||||||
<view class="item">{{ item.clDid }}</view>
|
<view class="item">{{ item.clDid }}</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view style="width: 30rpx"> {{ item.value || '-' }}</view>
|
<view style="width: 30rpx"> {{ item.value || '-' }}</view>
|
||||||
<view v-if="item.value"> °C</view>
|
<view v-if="item.value"> °C</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -53,7 +52,7 @@
|
|||||||
v-for="(item, index) in navMenuList"
|
v-for="(item, index) in navMenuList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="navMenuClick(index)"
|
@click="navMenuClick(index)"
|
||||||
>{{ item.text }}
|
>{{ item.text }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -87,6 +86,18 @@
|
|||||||
<uni-popup-share title="分享到"></uni-popup-share>
|
<uni-popup-share title="分享到"></uni-popup-share>
|
||||||
<view style="height: 40rpx; background: #fff"></view>
|
<view style="height: 40rpx; background: #fff"></view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
<!-- 完成调试输入框 -->
|
||||||
|
<uni-popup ref="inputDialog" type="dialog">
|
||||||
|
<uni-popup-dialog
|
||||||
|
ref="inputClose"
|
||||||
|
mode="input"
|
||||||
|
:title="dialogType"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
:before-close="true"
|
||||||
|
@close="dialogInputClose"
|
||||||
|
@confirm="dialogInputConfirm"
|
||||||
|
></uni-popup-dialog>
|
||||||
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</Cn-page>
|
</Cn-page>
|
||||||
@@ -97,10 +108,10 @@ import xieBo from './comp/xieBo.vue'
|
|||||||
import power from './comp/power.vue'
|
import power from './comp/power.vue'
|
||||||
import oscillogram from './comp/oscillogram.vue'
|
import oscillogram from './comp/oscillogram.vue'
|
||||||
import IO from './comp/IO.vue'
|
import IO from './comp/IO.vue'
|
||||||
import {queryTopologyDiagram, deleteDevice} from '@/common/api/device'
|
import { queryTopologyDiagram, deleteDevice, cancelDebug, finishDebug } from '@/common/api/device'
|
||||||
import {MQTT_IP, MQTT_OPTIONS} from '@/common/js/mqtt.js'
|
import { MQTT_IP, MQTT_OPTIONS } from '@/common/js/mqtt.js'
|
||||||
import mqtt from 'mqtt/dist/mqtt.js'
|
import mqtt from 'mqtt/dist/mqtt.js'
|
||||||
import {base64ToPath, pathToBase64} from 'image-tools'
|
import { base64ToPath, pathToBase64 } from 'image-tools'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -112,6 +123,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dialogType: '',
|
||||||
domLoading: true,
|
domLoading: true,
|
||||||
loading: true,
|
loading: true,
|
||||||
deviceInfo: {},
|
deviceInfo: {},
|
||||||
@@ -159,13 +171,14 @@ export default {
|
|||||||
topolodyData: [],
|
topolodyData: [],
|
||||||
basicData: [],
|
basicData: [],
|
||||||
IOData: [],
|
IOData: [],
|
||||||
|
pageOptions: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
trigger(e) {
|
trigger(e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
if (e.item.text === '分享') {
|
if (e.item.text === '分享') {
|
||||||
uni.navigateTo({url: '/pages/device/share?id=' + this.devId})
|
uni.navigateTo({ url: '/pages/device/share?id=' + this.devId })
|
||||||
} else if (e.item.text === '删除') {
|
} else if (e.item.text === '删除') {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -190,17 +203,17 @@ export default {
|
|||||||
} else if (e.item.text === '下载') {
|
} else if (e.item.text === '下载') {
|
||||||
this.$util.toast('下载成功')
|
this.$util.toast('下载成功')
|
||||||
} else if (e.item.text === '记录') {
|
} else if (e.item.text === '记录') {
|
||||||
uni.navigateTo({url: '/pages/device/APF/record'})
|
uni.navigateTo({ url: '/pages/device/APF/record' })
|
||||||
} else if (e.item.text === '告警') {
|
} else if (e.item.text === '告警') {
|
||||||
uni.navigateTo({url: '/pages/device/APF/report'})
|
uni.navigateTo({ url: '/pages/device/APF/report' })
|
||||||
} else if (e.item.text === '关于') {
|
} else if (e.item.text === '关于') {
|
||||||
uni.navigateTo({url: '/pages/device/APF/about?id=' + this.devId})
|
uni.navigateTo({ url: '/pages/device/APF/about?id=' + this.devId })
|
||||||
} else if (e.item.text === '移交') {
|
} else if (e.item.text === '移交') {
|
||||||
uni.navigateTo({url: '/pages/device/transfer?id=' + this.devId})
|
uni.navigateTo({ url: '/pages/device/transfer?id=' + this.devId })
|
||||||
} else if (e.item.text === '反馈') {
|
} else if (e.item.text === '反馈') {
|
||||||
uni.navigateTo({url: '/pages/device/feedback'})
|
uni.navigateTo({ url: '/pages/device/feedback' })
|
||||||
} else if (e.item.text === '用户') {
|
} else if (e.item.text === '用户') {
|
||||||
uni.navigateTo({url: '/pages/device/user?id=' + this.devId + '&isPrimaryUser=' + this.isPrimaryUser})
|
uni.navigateTo({ url: '/pages/device/user?id=' + this.devId + '&isPrimaryUser=' + this.isPrimaryUser })
|
||||||
} else if (e.item.text === '报表') {
|
} else if (e.item.text === '报表') {
|
||||||
this.$util.toast('效果是直接打开报表')
|
this.$util.toast('效果是直接打开报表')
|
||||||
} else if (e.item.text === '版本') {
|
} else if (e.item.text === '版本') {
|
||||||
@@ -215,12 +228,59 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/device/edit?deviceInfo=' + encodeURIComponent(JSON.stringify(data)),
|
url: '/pages/device/edit?deviceInfo=' + encodeURIComponent(JSON.stringify(data)),
|
||||||
})
|
})
|
||||||
|
} else if (e.item.text === '取消调试') {
|
||||||
|
this.cancelDebug()
|
||||||
|
} else if (e.item.text === '完成调试') {
|
||||||
|
this.finishDebug()
|
||||||
}
|
}
|
||||||
this.$refs.fab.close()
|
this.$refs.fab.close()
|
||||||
},
|
},
|
||||||
|
// 取消调试
|
||||||
|
cancelDebug() {
|
||||||
|
this.dialogType = '取消调试'
|
||||||
|
this.$refs.inputDialog.open()
|
||||||
|
},
|
||||||
|
// 完成调试
|
||||||
|
finishDebug() {
|
||||||
|
this.dialogType = '完成调试'
|
||||||
|
this.$refs.inputDialog.open()
|
||||||
|
},
|
||||||
|
dialogInputClose() {
|
||||||
|
this.$refs.inputDialog.close()
|
||||||
|
},
|
||||||
|
dialogInputConfirm(val) {
|
||||||
|
if (!val) {
|
||||||
|
this.$util.toast('请输入备注')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.dialogType == '取消调试') {
|
||||||
|
cancelDebug({
|
||||||
|
deviceId: this.devId,
|
||||||
|
remark: val,
|
||||||
|
type: Number(this.pageOptions.process),
|
||||||
|
}).then((res) => {
|
||||||
|
this.$util.toast(res.message)
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1500)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
finishDebug({
|
||||||
|
deviceId: this.devId,
|
||||||
|
remark: val,
|
||||||
|
type: Number(this.pageOptions.process),
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
this.$util.toast(res.message)
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1500)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
navMenuClick(idx) {
|
navMenuClick(idx) {
|
||||||
this.navMenuActive = idx
|
this.navMenuActive = idx
|
||||||
uni.pageScrollTo({scrollTop: 0, duration: 0})
|
uni.pageScrollTo({ scrollTop: 0, duration: 0 })
|
||||||
},
|
},
|
||||||
downloadImg() {
|
downloadImg() {
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
@@ -231,18 +291,16 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
console.log('init')
|
console.log('init')
|
||||||
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.domLoading = true
|
this.domLoading = true
|
||||||
queryTopologyDiagram(this.devId).then((res) => {
|
queryTopologyDiagram(this.devId).then((res) => {
|
||||||
res.data.filePath = this.$config.static + res.data.filePath
|
res.data.filePath = this.$config.static + res.data.filePath
|
||||||
this.deviceInfo = res.data
|
this.deviceInfo = res.data
|
||||||
this.downloadImg()
|
this.downloadImg()
|
||||||
uni.setNavigationBarTitle({title: this.deviceInfo.devName || '设备详情'})
|
uni.setNavigationBarTitle({ title: this.deviceInfo.devName || '设备详情' })
|
||||||
this.topolodyData = this.topolodyData.filter((item) => {
|
this.topolodyData = this.topolodyData.filter((item) => {
|
||||||
let index = this.deviceInfo.appsLineTopologyDiagramPO.findIndex((element) => {
|
let index = this.deviceInfo.appsLineTopologyDiagramPO.findIndex((element) => {
|
||||||
element.label = element.name
|
element.label = element.name
|
||||||
@@ -344,7 +402,7 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
this.IOData = JSON.parse(message.toString())
|
this.IOData = JSON.parse(message.toString())
|
||||||
this.IOData.forEach(item => {
|
this.IOData.forEach((item) => {
|
||||||
if (item.value === 0) {
|
if (item.value === 0) {
|
||||||
item.value = '0'
|
item.value = '0'
|
||||||
} else if (!item.value) {
|
} else if (!item.value) {
|
||||||
@@ -360,7 +418,7 @@ export default {
|
|||||||
let arr = []
|
let arr = []
|
||||||
element.showKey.forEach((key) => {
|
element.showKey.forEach((key) => {
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
if (item.statisticalName === key && item.phase === 'avg' ) {
|
if (item.statisticalName === key && item.phase === 'avg') {
|
||||||
arr.push(key + ':' + item.statisticalData)
|
arr.push(key + ':' + item.statisticalData)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -377,41 +435,60 @@ export default {
|
|||||||
this.client.end()
|
this.client.end()
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
this.pageOptions = options
|
||||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||||
this.devId = options.id
|
this.devId = options.id
|
||||||
this.isPrimaryUser = options.isPrimaryUser
|
this.isPrimaryUser = options.isPrimaryUser
|
||||||
if (this.isPrimaryUser == 1) {
|
if (this.pageOptions.process == 2 || this.pageOptions.process == 3) {
|
||||||
this.content.splice(
|
this.content.splice(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
{
|
|
||||||
iconPath: '/static/transfer.png',
|
|
||||||
text: '移交',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
iconPath: '/static/feedback.png',
|
iconPath: '/static/feedback.png',
|
||||||
text: '编辑',
|
text: '编辑',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
iconPath: '/static/delate.png',
|
iconPath: '/static/delate.png',
|
||||||
text: '删除',
|
text: '取消调试',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
iconPath: '/static/delate.png',
|
||||||
|
text: '完成调试',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if (this.userInfo.authorities === 'app_vip_user') {
|
} else {
|
||||||
this.content.splice(3, 0, {
|
if (this.isPrimaryUser == 1) {
|
||||||
iconPath: '/static/share.png',
|
this.content.splice(
|
||||||
text: '分享',
|
0,
|
||||||
|
0,
|
||||||
|
{
|
||||||
|
iconPath: '/static/transfer.png',
|
||||||
|
text: '移交',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
iconPath: '/static/feedback.png',
|
||||||
|
text: '编辑',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
iconPath: '/static/delate.png',
|
||||||
|
text: '删除',
|
||||||
|
},
|
||||||
|
)
|
||||||
|
if (this.userInfo.authorities === 'app_vip_user') {
|
||||||
|
this.content.splice(3, 0, {
|
||||||
|
iconPath: '/static/share.png',
|
||||||
|
text: '分享',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.userInfo.authorities !== 'tourist') {
|
||||||
|
this.content.splice(0, 0, {
|
||||||
|
iconPath: '/static/subordinate.png',
|
||||||
|
text: '用户',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (this.userInfo.authorities !== 'tourist') {
|
this.topolodyData = this.$util.getDictData('Line_Position').map((item) => {
|
||||||
this.content.splice(0, 0, {
|
|
||||||
iconPath: '/static/subordinate.png',
|
|
||||||
text: '用户',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.topolodyData = this.$util.getDictData('Line_Position').map(item => {
|
|
||||||
switch (item.name) {
|
switch (item.name) {
|
||||||
case '电网侧':
|
case '电网侧':
|
||||||
item.showKey = ['Apf_ThdA_Sys(%)']
|
item.showKey = ['Apf_ThdA_Sys(%)']
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ export default {
|
|||||||
if (!this.formData.nDid) {
|
if (!this.formData.nDid) {
|
||||||
return this.$util.toast('请输入设备识别码')
|
return this.$util.toast('请输入设备识别码')
|
||||||
}
|
}
|
||||||
registerDevice(this.formData.nDid).then((res) => {
|
registerDevice(this.formData.nDid, Number(this.options.type)).then((res) => {
|
||||||
getModel(this.formData.nDid).then((res) => {
|
getModel(this.formData.nDid).then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.pointList = res.data.map((item) => {
|
this.pointList = res.data.map((item) => {
|
||||||
|
|||||||
@@ -13,20 +13,37 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import list from "@/common/js/list";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
mixins: [list],
|
||||||
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '灿能'
|
loading: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad () {
|
onShow() {
|
||||||
|
this.init()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
jump () {
|
init() {
|
||||||
console.log(123);
|
let dictData = this.$util.getDictData('app_event')
|
||||||
uni.navigateTo({ url: '/pages/message/termList' })
|
console.log(dictData)
|
||||||
}
|
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||||
|
this.store.params.type = 3
|
||||||
|
this.store.firstCallBack = (res) => {
|
||||||
|
this.store.data.forEach(item => {
|
||||||
|
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
|
||||||
|
})
|
||||||
|
console.log(this.store.data)
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
this.store.reload()
|
||||||
|
},
|
||||||
|
jump(item) {
|
||||||
|
let str = JSON.stringify(item).replace(/%/g,'百分比')
|
||||||
|
uni.navigateTo({url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str)})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -13,13 +13,37 @@
|
|||||||
</Cn-page>
|
</Cn-page>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import list from "@/common/js/list";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
mixins: [list],
|
||||||
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false
|
loading: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
init() {
|
||||||
|
let dictData = this.$util.getDictData('app_event')
|
||||||
|
console.log(dictData)
|
||||||
|
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||||
|
this.store.params.type = 2
|
||||||
|
this.store.firstCallBack = (res) => {
|
||||||
|
this.store.data.forEach(item => {
|
||||||
|
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
|
||||||
|
})
|
||||||
|
console.log(this.store.data)
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
this.store.reload()
|
||||||
|
},
|
||||||
|
jump(item) {
|
||||||
|
let str = JSON.stringify(item).replace(/%/g,'百分比')
|
||||||
|
uni.navigateTo({url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str)})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -10,21 +10,38 @@
|
|||||||
<uni-load-more status="nomore"></uni-load-more>
|
<uni-load-more status="nomore"></uni-load-more>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import list from "@/common/js/list";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
mixins: [list],
|
||||||
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '灿能'
|
loading: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad () {
|
onShow() {
|
||||||
|
this.init()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
jump(){
|
init() {
|
||||||
uni.navigateTo({ url: '/pages/message/steadyList' })
|
let dictData = this.$util.getDictData('app_event')
|
||||||
}
|
console.log(dictData)
|
||||||
|
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||||
|
this.store.params.type = 1
|
||||||
|
this.store.firstCallBack = (res) => {
|
||||||
|
this.store.data.forEach(item => {
|
||||||
|
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
|
||||||
|
})
|
||||||
|
console.log(this.store.data)
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
this.store.reload()
|
||||||
|
},
|
||||||
|
jump(item) {
|
||||||
|
let str = JSON.stringify(item).replace(/%/g,'百分比')
|
||||||
|
uni.navigateTo({url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str)})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user