fix(配置): 部署报错修复

This commit is contained in:
Zhunianya
2026-04-02 14:41:11 +08:00
parent 08aeb1593c
commit 09d62b413f
5 changed files with 106 additions and 120 deletions

View File

@@ -20,9 +20,9 @@
<screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip :content="$t('navbar.layoutSize')" effect="dark" placement="bottom">
<langSelect id="lang-select" class="right-menu-item hover-effect" />
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip>
<langSelect id="lang-select" class="right-menu-item hover-effect" style="font-size: 26px" />
</template>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">

View File

@@ -1,49 +1,50 @@
import Cookies from 'js-cookie';
module.exports = {
/**
* 侧边栏主题 深色主题theme-dark浅色主题theme-light
*/
sideTheme: 'theme-dark',
/**
* 是否系统布局配置
*/
showSettings: false,
/**
* 是否显示顶部导航
*/
topNav: false,
/**
* 是否显示 tagsView
*/
tagsView: false,
/**
* 是否固定头部
*/
fixedHeader: false,
/**
* 是否显示logo
*/
sidebarLogo: true,
/**
* 是否显示动态标题
*/
dynamicTitle: false,
/**
* @type {string | array} 'production' | ['production', 'development']
* @description Need show err logs component.
* The default is only used in the production env
* If you want to also use it in dev, you can pass ['production', 'development']
*/
errorLog: 'production',
export default {
/**
* 默认语言 先從cookies拿沒有從瀏覽器語言拿最後用'zh-CN'
*/
language: Cookies.get('language') || navigator.language || navigator.browserLanguage || 'zh-CN',
}
* 侧边栏主题 深色主题theme-dark浅色主题theme-light
*/
sideTheme: 'theme-dark',
/**
* 是否系统布局配置
*/
showSettings: false,
/**
* 是否显示顶部导航
*/
topNav: false,
/**
* 是否显示 tagsView
*/
tagsView: false,
/**
* 是否固定头部
*/
fixedHeader: false,
/**
* 是否显示logo
*/
sidebarLogo: true,
/**
* 是否显示动态标题
*/
dynamicTitle: false,
/**
* @type {string | array} 'production' | ['production', 'development']
* @description Need show err logs component.
* The default is only used in the production env
* If you want to also use it in dev, you can pass ['production', 'development']
*/
errorLog: 'production',
/**
* 默认语言 先從cookies拿沒有從
*/
language: Cookies.get('language') || navigator.language || navigator.browserLanguage || 'zh-CN',
};

View File

@@ -220,7 +220,7 @@
<div style="width: 100%; text-align: center; font-size: 14px; color: #666; line-height: 32px; margin-top: 50px">
<span>
Copyright © 2021-2022
Copyright © 2021-2026
<a href="https://fastbee.cn/" target="_blank">FastBee</a>
|
<a href="https://fastbee.cn/" target="_blank">{{ $t('home.fengxinIoT') }}</a>

View File

@@ -1,57 +1,52 @@
<template>
<el-dialog :title="$t('iot.group.device-list.849593-0')" :visible.sync="openDeviceList" width="800px" append-to-body>
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item :label="$t('iot.group.device-list.849593-1')" prop="deviceName">
<el-input v-model="queryParams.deviceName" :placeholder="$t('iot.group.device-list.849593-2')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('iot.group.device-list.849593-3') }}</el-button>
</el-form-item>
</el-form>
<el-dialog :title="$t('iot.group.device-list.849593-0')" :visible.sync="openDeviceList" width="800px" append-to-body>
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item :label="$t('iot.group.device-list.849593-1')" prop="deviceName">
<el-input v-model="queryParams.deviceName" :placeholder="$t('iot.group.device-list.849593-2')" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('iot.group.device-list.849593-3') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="deviceList" @select="handleSelectionChange" @select-all="handleSelectionAll" ref="multipleTable" size="mini" border>
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('iot.group.device-list.849593-4')" align="center" prop="deviceName" />
<el-table-column :label="$t('iot.group.device-list.849593-5')" align="center" prop="serialNumber" />
<el-table-column :label="$t('iot.group.device-list.849593-6')" align="center" prop="productName" />
<el-table-column :label="$t('iot.group.device-list.849593-7')" align="center">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.isOwner==0">{{ $t('iot.group.device-list.849593-8') }}</el-tag>
<el-tag type="primary" v-else>{{ $t('iot.group.device-list.849593-9') }}</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('iot.group.device-list.849593-10')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_device_status" :value="scope.row.status" />
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<el-table v-loading="loading" :data="deviceList" @select="handleSelectionChange" @select-all="handleSelectionAll" ref="multipleTable" size="mini" :border="false">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('iot.group.device-list.849593-4')" align="center" prop="deviceName" />
<el-table-column :label="$t('iot.group.device-list.849593-5')" align="center" prop="serialNumber" />
<el-table-column :label="$t('iot.group.device-list.849593-6')" align="center" prop="productName" />
<el-table-column :label="$t('iot.group.device-list.849593-7')" align="center">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.isOwner == 0">{{ $t('iot.group.device-list.849593-8') }}</el-tag>
<el-tag type="primary" v-else>{{ $t('iot.group.device-list.849593-9') }}</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('iot.group.device-list.849593-10')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_device_status" :value="scope.row.status" />
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleDeviceSelected">{{ $t('iot.group.device-list.849593-11') }}</el-button>
<el-button @click="closeSelectDeviceList">{{ $t('iot.group.device-list.849593-12') }}</el-button>
</div>
</el-dialog>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleDeviceSelected">{{ $t('iot.group.device-list.849593-11') }}</el-button>
<el-button @click="closeSelectDeviceList">{{ $t('iot.group.device-list.849593-12') }}</el-button>
</div>
</el-dialog>
</template>
<script>
import {
getDeviceIds,
updateDeviceGroups
} from "@/api/iot/group"
import {
listDeviceByGroup,
} from "@/api/iot/device";
import { getDeviceIds, updateDeviceGroups } from '@/api/iot/group';
import { listDeviceByGroup } from '@/api/iot/device';
export default {
name: "device-list",
name: 'device-list',
dicts: ['iot_device_status'],
props: {
group: {
type: Object,
default: null
}
default: null,
},
},
data() {
return {
@@ -97,16 +92,14 @@ export default {
this.getDeviceIdsByGroupId(this.deviceGroup.groupId);
}
},
immediate: true
}
},
created() {
immediate: true,
},
},
created() {},
methods: {
// 获取分组下关联的设备ID数组
getDeviceIdsByGroupId(groupId) {
getDeviceIds(groupId).then(response => {
getDeviceIds(groupId).then((response) => {
this.ids = response.data;
this.getList();
});
@@ -116,20 +109,20 @@ export default {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeActiveTime && '' != this.daterangeActiveTime) {
this.queryParams.params["beginActiveTime"] = this.daterangeActiveTime[0];
this.queryParams.params["endActiveTime"] = this.daterangeActiveTime[1];
this.queryParams.params['beginActiveTime'] = this.daterangeActiveTime[0];
this.queryParams.params['endActiveTime'] = this.daterangeActiveTime[1];
}
listDeviceByGroup(this.queryParams).then(response => {
listDeviceByGroup(this.queryParams).then((response) => {
this.deviceList = response.rows;
this.total = response.total;
this.loading = false;
// 设置分组关联的设备选中
this.deviceList.forEach(row => {
this.deviceList.forEach((row) => {
this.$nextTick(() => {
if (this.ids.some(x => x === row.deviceId)) {
if (this.ids.some((x) => x === row.deviceId)) {
this.$refs.multipleTable.toggleRowSelection(row, true);
}
})
});
});
});
},
@@ -141,7 +134,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.daterangeActiveTime = [];
this.resetForm("queryForm");
this.resetForm('queryForm');
this.handleQuery();
},
// 多选框选中数据
@@ -181,11 +174,11 @@ export default {
// 更新分组下的设备
handleDeviceSelected() {
this.group.deviceIds = this.ids;
updateDeviceGroups(this.group).then(response => {
updateDeviceGroups(this.group).then((response) => {
this.$modal.msgSuccess(this.$t('iot.group.device-list.849593-13'));
this.openDeviceList = false;
})
}
}
});
},
},
};
</script>

View File

@@ -109,9 +109,9 @@
</el-table-column>
</el-table>
<div class="pagination-container">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
<!-- <div class="pagination-container"> -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- </div> -->
</el-card>
</el-col>
</el-row>
@@ -586,7 +586,7 @@ export default {
.dept-card {
margin-bottom: 15px;
border-radius: 8px;
height: 810px;
height: 700px;
::v-deep .el-card__body {
padding: 18px;
@@ -604,6 +604,7 @@ export default {
.table-card {
border-radius: 8px;
height: 620px;
::v-deep .el-card__body {
padding: 18px;
@@ -637,8 +638,6 @@ export default {
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
@@ -658,13 +657,6 @@ export default {
}
}
.pagination-container {
line-height: 40px;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
}
::v-deep .el-pagination {
padding: 20px 0 0 0;
text-align: right;