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": { "uniStatistics": {
"enable": false "enable": false
}, },
"sassImplementationName": "node-sass",
"h5": { "h5": {
"title": "芯程物联", "title": "芯程物联",
"router": { "router": {

View File

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

View File

@ -144,9 +144,18 @@
<script> <script>
import projectConfig from '@/env.config.js'; import projectConfig from '@/env.config.js';
import { mapState, mapMutations } from 'vuex'; import {
import { logout, secureBind, wechatBind } from '@/apis/modules/common'; mapState,
import { deviceRelateUser } from '@/apis/modules/device'; mapMutations
} from 'vuex';
import {
logout,
secureBind,
wechatBind
} from '@/apis/modules/common';
import {
deviceRelateUser
} from '@/apis/modules/device';
export default { export default {
components: {}, 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; font-size: 30rpx;
color: #333; color: #333;
overflow: hidden; overflow: hidden;
font-weight: 500; font-weight: 500;
} }
/deep/.uni-list-item__container { ::v-deep .uni-list-item__container {
padding: 30rpx; padding: 30rpx;
} }

View File

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

View File

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

View File

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