mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
Merge pull request #3198 from xinnan-tech/py-device-calling
fix:用户别名缺失bug
This commit is contained in:
commit
941aaf10ce
4 changed files with 23 additions and 16 deletions
|
|
@ -304,7 +304,6 @@ public class DeviceServiceImpl extends BaseServiceImpl<DeviceDao, DeviceEntity>
|
||||||
return devices.stream().map(device -> {
|
return devices.stream().map(device -> {
|
||||||
UserShowDeviceListVO vo = ConvertUtils.sourceToTarget(device, UserShowDeviceListVO.class);
|
UserShowDeviceListVO vo = ConvertUtils.sourceToTarget(device, UserShowDeviceListVO.class);
|
||||||
vo.setDeviceType(device.getBoard());
|
vo.setDeviceType(device.getBoard());
|
||||||
vo.setBoard(device.getBoard());
|
|
||||||
// 设置UTC时间戳供前端使用时区转换
|
// 设置UTC时间戳供前端使用时区转换
|
||||||
if (device.getLastConnectedAt() != null) {
|
if (device.getLastConnectedAt() != null) {
|
||||||
vo.setLastConnectedAtTimestamp(device.getLastConnectedAt().getTime());
|
vo.setLastConnectedAtTimestamp(device.getLastConnectedAt().getTime());
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
package xiaozhi.modules.device.vo;
|
package xiaozhi.modules.device.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "用户显示设备列表VO")
|
@Schema(description = "用户显示设备列表VO")
|
||||||
public class UserShowDeviceListVO {
|
public class UserShowDeviceListVO {
|
||||||
|
|
@ -28,6 +29,9 @@ public class UserShowDeviceListVO {
|
||||||
@Schema(description = "mac地址")
|
@Schema(description = "mac地址")
|
||||||
private String macAddress;
|
private String macAddress;
|
||||||
|
|
||||||
|
@Schema(description = "设备别名")
|
||||||
|
private String alias;
|
||||||
|
|
||||||
@Schema(description = "开启OTA")
|
@Schema(description = "开启OTA")
|
||||||
private Integer otaUpgrade;
|
private Integer otaUpgrade;
|
||||||
|
|
||||||
|
|
|
||||||
BIN
main/manager-web/src/assets/header/address_book.png
Normal file
BIN
main/manager-web/src/assets/header/address_book.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.2 KiB |
|
|
@ -27,7 +27,8 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 普通用户显示音色克隆 -->
|
<!-- 普通用户显示音色克隆 -->
|
||||||
<div v-if="!userInfo.superAdmin && featureStatus.voiceClone" class="equipment-management"
|
<div v-if="!userInfo.superAdmin && featureStatus.voiceClone" class="equipment-management"
|
||||||
:class="{ 'active-tab': $route.path === '/voice-clone-management' }" @click="handleRouter('voiceCloneManagement')">
|
:class="{ 'active-tab': $route.path === '/voice-clone-management' }"
|
||||||
|
@click="handleRouter('voiceCloneManagement')">
|
||||||
<img loading="lazy" alt="" src="@/assets/header/voice.png" :style="{
|
<img loading="lazy" alt="" src="@/assets/header/voice.png" :style="{
|
||||||
filter:
|
filter:
|
||||||
$route.path === '/voice-clone-management'
|
$route.path === '/voice-clone-management'
|
||||||
|
|
@ -38,11 +39,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 超级管理员显示音色克隆下拉菜单 -->
|
<!-- 超级管理员显示音色克隆下拉菜单 -->
|
||||||
<el-dropdown v-if="userInfo.superAdmin && featureStatus.voiceClone" trigger="click" class="equipment-management more-dropdown" :class="{
|
<el-dropdown v-if="userInfo.superAdmin && featureStatus.voiceClone" trigger="click"
|
||||||
'active-tab':
|
class="equipment-management more-dropdown" :class="{
|
||||||
$route.path === '/voice-clone-management' ||
|
'active-tab':
|
||||||
$route.path === '/voice-resource-management',
|
$route.path === '/voice-clone-management' ||
|
||||||
}" @visible-change="handleVoiceCloneDropdownVisibleChange">
|
$route.path === '/voice-resource-management',
|
||||||
|
}" @visible-change="handleVoiceCloneDropdownVisibleChange">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<img loading="lazy" alt="" src="@/assets/header/voice.png" :style="{
|
<img loading="lazy" alt="" src="@/assets/header/voice.png" :style="{
|
||||||
filter:
|
filter:
|
||||||
|
|
@ -64,8 +66,8 @@
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
||||||
<div v-if="userInfo.superAdmin" class="equipment-management" :class="{ 'active-tab': $route.path === '/model-config' }"
|
<div v-if="userInfo.superAdmin" class="equipment-management"
|
||||||
@click="handleRouter('modelConfig')">
|
:class="{ 'active-tab': $route.path === '/model-config' }" @click="handleRouter('modelConfig')">
|
||||||
<img loading="lazy" alt="" src="@/assets/header/model_config.png" :style="{
|
<img loading="lazy" alt="" src="@/assets/header/model_config.png" :style="{
|
||||||
filter:
|
filter:
|
||||||
$route.path === '/model-config' ? 'brightness(0) invert(1)' : 'None',
|
$route.path === '/model-config' ? 'brightness(0) invert(1)' : 'None',
|
||||||
|
|
@ -84,7 +86,7 @@
|
||||||
<div v-if="featureStatus.addressBook" class="equipment-management"
|
<div v-if="featureStatus.addressBook" class="equipment-management"
|
||||||
:class="{ 'active-tab': $route.path === '/address-book-management' }"
|
:class="{ 'active-tab': $route.path === '/address-book-management' }"
|
||||||
@click="handleRouter('addressBookManagement')">
|
@click="handleRouter('addressBookManagement')">
|
||||||
<img loading="lazy" alt="" src="@/assets/header/knowledge_base.png" :style="{
|
<img loading="lazy" alt="" src="@/assets/header/address_book.png" :style="{
|
||||||
filter:
|
filter:
|
||||||
$route.path === '/address-book-management' ? 'brightness(0) invert(1)' : 'None',
|
$route.path === '/address-book-management' ? 'brightness(0) invert(1)' : 'None',
|
||||||
}" />
|
}" />
|
||||||
|
|
@ -144,8 +146,8 @@
|
||||||
{{ $t("header.serverSideManagement") }}
|
{{ $t("header.serverSideManagement") }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item @click.native="handleRouter('featureManagement')">
|
<el-dropdown-item @click.native="handleRouter('featureManagement')">
|
||||||
{{ $t("header.featureManagement") }}
|
{{ $t("header.featureManagement") }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -199,11 +201,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import userApi from "@/apis/module/user";
|
|
||||||
import i18n, { changeLanguage } from "@/i18n";
|
import i18n, { changeLanguage } from "@/i18n";
|
||||||
|
import featureManager from "@/utils/featureManager"; // 引入功能管理工具类
|
||||||
import { mapActions, mapState } from "vuex";
|
import { mapActions, mapState } from "vuex";
|
||||||
import ChangePasswordDialog from "./ChangePasswordDialog.vue"; // 引入修改密码弹窗组件
|
import ChangePasswordDialog from "./ChangePasswordDialog.vue"; // 引入修改密码弹窗组件
|
||||||
import featureManager from "@/utils/featureManager"; // 引入功能管理工具类
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "HeaderBar",
|
name: "HeaderBar",
|
||||||
|
|
@ -779,9 +780,11 @@ export default {
|
||||||
color: #909399;
|
color: #909399;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.more-dropdown {
|
.more-dropdown {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.more-dropdown .el-dropdown-link {
|
.more-dropdown .el-dropdown-link {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -829,6 +832,7 @@ export default {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-user-dropdown {
|
.el-user-dropdown {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue