This commit is contained in:
JayJiaJun 2025-03-27 14:23:27 +08:00
parent d9766f43e8
commit 5b328629f8
6 changed files with 329 additions and 282 deletions

View File

@ -156,6 +156,7 @@
"uniStatistics": {
"enable": false
},
"sassImplementationName": "node-sass",
"h5": {
"title": "芯程物联",
"router": {

View File

@ -488,7 +488,7 @@
}
// popup
/deep/ .u-safe-bottom {
::v-deep .u-safe-bottom {
display: none;
}
}

View File

@ -144,9 +144,18 @@
<script>
import projectConfig from '@/env.config.js';
import { mapState, mapMutations } from 'vuex';
import { logout, secureBind, wechatBind } from '@/apis/modules/common';
import { deviceRelateUser } from '@/apis/modules/device';
import {
mapState,
mapMutations
} from 'vuex';
import {
logout,
secureBind,
wechatBind
} from '@/apis/modules/common';
import {
deviceRelateUser
} from '@/apis/modules/device';
export default {
components: {},
@ -705,14 +714,14 @@
/* 设置文字颜色 */
}
/deep/.uni-list-item__content-title[data-v-296a3d7e] {
::v-deep.uni-list-item__content-title[data-v-296a3d7e] {
font-size: 30rpx;
color: #333;
overflow: hidden;
font-weight: 500;
}
/deep/.uni-list-item__container {
::v-deep .uni-list-item__container {
padding: 30rpx;
}

View File

@ -78,9 +78,15 @@
import moment from 'moment';
import uniDataCheckbox from '@/pagesA/components/uni-data-checkbox/index.vue';
import uniPagination from '@/pagesA/components/uni-pagination/index.vue';
import { getSubGatewayList } from '@/apis/modules/gateway.js';
import { listThingsModel } from '@/apis/modules/device.js';
import { getHistoryList } from '@/apis/modules/deviceLog.js';
import {
getSubGatewayList
} from '@/apis/modules/gateway.js';
import {
listThingsModel
} from '@/apis/modules/device.js';
import {
getHistoryList
} from '@/apis/modules/deviceLog.js';
export default {
name: 'deviceHistory',
@ -236,7 +242,10 @@
},
//
handleDateTimeClick() {
const { beginTime, endTime } = this.queryParams;
const {
beginTime,
endTime
} = this.queryParams;
if (this.dateTimeIndex === 1) {
this.$refs.datetimePicker.innerValue = beginTime;
} else {
@ -246,7 +255,10 @@
},
// /
handleConfirmDateTime(e) {
const { beginTime, endTime } = this.queryParams;
const {
beginTime,
endTime
} = this.queryParams;
if (this.dateTimeIndex === 1) {
this.queryParams.beginTime = e.value;
this.dateTimeIndex = this.dateTimeIndex + 1;
@ -291,7 +303,9 @@
},
//
handleConfirmFilter() {
const { identifiers } = this.queryParams;
const {
identifiers
} = this.queryParams;
if (identifiers.length === 0) {
uni.showToast({
icon: 'none',
@ -304,14 +318,19 @@
},
//
getSlaveDatas() {
const { deviceId } = this.deviceInfo;
const {
deviceId
} = this.deviceInfo;
const params = {
gwDeviceId: deviceId,
pageNum: 1,
pageSize: 9999,
};
getSubGatewayList(params).then(res => {
const { code, rows } = res;
const {
code,
rows
} = res;
if (code === 200) {
this.slaveList = rows.map(item => ({
text: item.subDeviceName,
@ -323,14 +342,19 @@
},
//
getIdentifierList() {
const { deviceId } = this.deviceInfo;
const {
deviceId
} = this.deviceInfo;
const params = {
deviceId: deviceId,
pageNum: 1,
pageSize: 9999,
};
listThingsModel(params).then((res) => {
const { code, rows } = res;
const {
code,
rows
} = res;
if (code === 200) {
this.identifierList = rows.map(item => ({
text: item.modelName,
@ -348,8 +372,16 @@
},
//
getHistory() {
const { identifiers, beginTime, endTime, slaveId } = this.queryParams;
const { deviceId, serialNumber } = this.deviceInfo;
const {
identifiers,
beginTime,
endTime,
slaveId
} = this.queryParams;
const {
deviceId,
serialNumber
} = this.deviceInfo;
if (identifiers.length !== 0) {
const idenList = identifiers.map((item) => {
const iden = this.identifierList.find((chil) => chil.value === item);
@ -434,7 +466,7 @@
.time-shortcut {
width: 190rpx;
/deep/ .uni-select {
::v-deep .uni-select {
height: 70rpx;
}
}

View File

@ -1410,7 +1410,7 @@
padding: 0px 18px;
border-radius: 5px;
/deep/ .u-line:first-child {
::v-deep .u-line:first-child {
border-bottom: transparent !important;
}
}

View File

@ -19,7 +19,9 @@
</template>
<script>
import { updateDevice } from '@/apis/modules/device';
import {
updateDevice
} from '@/apis/modules/device';
export default {
data() {
@ -51,7 +53,10 @@
},
onLoad(option) {
this.data = JSON.parse(decodeURIComponent(option.item));
const { deviceName, firmwareVersion } = this.data;
const {
deviceName,
firmwareVersion
} = this.data;
this.model.name = deviceName;
this.model.version = firmwareVersion;
},
@ -102,7 +107,7 @@
.modbus-edit-wrap {
padding: 10px;
/deep/ .u-form-item__body__left__content__required {
::v-deep .u-form-item__body__left__content__required {
left: 5px;
}