Compare commits
9 Commits
1c9c5ab639
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c2e698079d | |||
| cce863c590 | |||
| 09539ecfb8 | |||
| fee33a68c6 | |||
| 8584cc78b2 | |||
| 7d604dcd53 | |||
| 9ddb412b7a | |||
| ee50e38292 | |||
| 29752a70af |
@ -5,9 +5,9 @@ VITE_APP_TITLE = 云平台管理系统
|
||||
VITE_APP_ENV = 'development'
|
||||
|
||||
# 开发环境
|
||||
# VITE_APP_BASE_API = 'http://139.224.253.23:8000'
|
||||
VITE_APP_BASE_API = 'https://www.cnxhyc.com/jq'
|
||||
#VITE_APP_BASE_API = 'http://192.168.110.57:8000'
|
||||
VITE_APP_BASE_API = 'http://192.168.2.34:8000'
|
||||
#VITE_APP_BASE_API = 'https://www.cnxhyc.com/jq'
|
||||
# VITE_APP_BASE_API = 'http://192.168.110.57:8000'
|
||||
#代永飞接口
|
||||
# VITE_APP_BASE_API = 'http://457102h2d6.qicp.vip:24689'
|
||||
|
||||
|
||||
@ -2,16 +2,10 @@
|
||||
VITE_APP_TITLE = 云平台管理系统
|
||||
|
||||
# 生产环境配置 晶全1
|
||||
VITE_APP_ENV = 'production'
|
||||
|
||||
# 生产环境配置 富源晟2
|
||||
# VITE_APP_ENV = 'https://fuyuanshen.com/backend-fys'
|
||||
VITE_APP_ENV = 'https://www.cnxhyc.com'
|
||||
|
||||
# 应用访问路径 晶全1
|
||||
VITE_APP_CONTEXT_PATH = '/PC/'
|
||||
|
||||
# 高德地图Key
|
||||
VITE_AMAP_KEY='84a12a692ae378effdf741e16d584cd3'
|
||||
VITE_APP_CONTEXT_PATH = '/jingquan/'
|
||||
|
||||
# 应用访问路径 富源晟2
|
||||
#VITE_APP_CONTEXT_PATH = '/sys/'
|
||||
@ -23,12 +17,7 @@ VITE_APP_MONITOR_ADMIN = '/admin/applications'
|
||||
VITE_APP_SNAILJOB_ADMIN = '/snail-job'
|
||||
|
||||
# 生产环境 晶全3 代理访问
|
||||
VITE_APP_BASE_API = 'https://www.cnxhyc.com/jq'
|
||||
|
||||
# VITE_APP_BASE_API = 'http://139.224.253.23:8000'
|
||||
|
||||
# 生产环境 富源晟3
|
||||
#VITE_APP_BASE_API = '/backend-fys'
|
||||
VITE_APP_BASE_API = '/jq'
|
||||
|
||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||
VITE_BUILD_COMPRESS = gzip
|
||||
|
||||
@ -35,11 +35,13 @@
|
||||
"image-conversion": "2.1.1",
|
||||
"js-cookie": "3.0.5",
|
||||
"jsencrypt": "3.3.2",
|
||||
"lamejs": "^1.2.1",
|
||||
"mitt": "^3.0.1",
|
||||
"nprogress": "0.2.0",
|
||||
"paho-mqtt": "^1.1.0",
|
||||
"pinia": "3.0.2",
|
||||
"qrcode-vue3": "^1.7.1",
|
||||
"recorder-core": "^1.3.25011100",
|
||||
"screenfull": "6.0.2",
|
||||
"vue": "3.5.13",
|
||||
"vue-cropper": "1.1.1",
|
||||
@ -72,7 +74,7 @@
|
||||
"sass": "1.87.0",
|
||||
"terser": "^5.43.1",
|
||||
"typescript": "~5.8.3",
|
||||
"unocss": "^66.0.0",
|
||||
"unocss": "^0.58.0",
|
||||
"unplugin-auto-import": "19.1.2",
|
||||
"unplugin-icons": "22.1.0",
|
||||
"unplugin-vue-components": "28.5.0",
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { param } from '@/utils';
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 详情信息
|
||||
@ -7,10 +8,20 @@ export const deviceDeatil = (id: string) => {
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
// 灯光模式
|
||||
// 警示灯爆闪模式
|
||||
export const strobeMode = (data: any) => {
|
||||
return request({
|
||||
url: `/api/hby100j/device/strobeMode`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 灯光亮度
|
||||
function lightModeSettings (data: any) {
|
||||
return request({
|
||||
url: `/app/hby100j/device/lightAdjustment`,
|
||||
url: `/api/hby100j/device/lightAdjustment`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
@ -18,7 +29,7 @@ function lightModeSettings (data: any) {
|
||||
//频率调节
|
||||
function staticPowerSetting (data: any) {
|
||||
return request({
|
||||
url: `/app/hby100j/device/strobeFrequency`,
|
||||
url: `/api/hby100j/device/strobeFrequency`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
@ -26,7 +37,7 @@ function staticPowerSetting (data: any) {
|
||||
// 修改音量
|
||||
function settingUpdateVolume (data: any) {
|
||||
return request({
|
||||
url: `/app/hby100j/device/updateVolume`,
|
||||
url: `/api/hby100j/device/updateVolume`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
@ -35,17 +46,90 @@ function settingUpdateVolume (data: any) {
|
||||
// 强制报警
|
||||
function SosSetting (data: any) {
|
||||
return request({
|
||||
url: `/app/hby100j/device/forceAlarmActivation`,
|
||||
url: `/api/hby100j/device/forceAlarmActivation`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
// 语音列表
|
||||
function queryAudioFileList (params: any) {
|
||||
return request({
|
||||
url: `/api/video/queryAudioFileList`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
// 提取文本内容
|
||||
function extractText (data: any) {
|
||||
return request({
|
||||
url: `/api/video/extract`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
// 上传音频文件
|
||||
function uploadAudioToOss (data: any) {
|
||||
return request({
|
||||
url: `/api/video/uploadAudioToOss`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
// 文本转语音
|
||||
export function videTtsToOss(data:any) {
|
||||
return request({
|
||||
url: `/api/video/ttsToOss`,
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
// 重命名
|
||||
export function videRenameAudioFile(data:any) {
|
||||
return request({
|
||||
url: `/api/video/renameAudioFile`,
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
// 删除语音文件列表
|
||||
export function deviceDeleteAudioFile(params:any) {
|
||||
return request({
|
||||
url: `/api/video/deleteAudioFile`,
|
||||
method: 'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
// 更新语音,使用语音
|
||||
export function deviceUpdateVoice(data:any) {
|
||||
return request({
|
||||
url: `/api/hby100j/device/updateVoice`,
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
// 语音播放
|
||||
export function deviceVoiceBroadcast(data:any) {
|
||||
return request({
|
||||
url: `/api/hby100j/device/voiceBroadcast`,
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
deviceDeatil,
|
||||
lightModeSettings:lightModeSettings,
|
||||
SosSetting:SosSetting,
|
||||
staticPowerSetting:staticPowerSetting,
|
||||
settingUpdateVolume:settingUpdateVolume
|
||||
settingUpdateVolume:settingUpdateVolume,
|
||||
queryAudioFileList,
|
||||
videRenameAudioFile,
|
||||
deviceDeleteAudioFile,
|
||||
deviceUpdateVoice,
|
||||
videTtsToOss,
|
||||
uploadAudioToOss,
|
||||
extractText,
|
||||
strobeMode,
|
||||
deviceVoiceBroadcast
|
||||
};
|
||||
@ -1,3 +1,5 @@
|
||||
import { string } from "vue-types";
|
||||
|
||||
export interface deviceQuery {
|
||||
groupId: string;
|
||||
pageNum: number;
|
||||
@ -39,7 +41,9 @@ export interface DeviceDetail {
|
||||
strobeFrequency: string;
|
||||
volume: string;
|
||||
chargeState: string;
|
||||
alarmStatus: number
|
||||
alarmStatus: number,
|
||||
voiceStrobeAlarm?:number
|
||||
voiceBroadcast?:number
|
||||
}
|
||||
// 定义灯光模式的类型接口
|
||||
export interface LightMode {
|
||||
|
||||
BIN
src/assets/images/dw.png
Normal file
|
After Width: | Height: | Size: 523 B |
BIN
src/assets/images/hb.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/images/hbAc.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/assets/images/jwd.png
Normal file
|
After Width: | Height: | Size: 330 B |
BIN
src/assets/images/ly.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/assets/images/lz.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/assets/images/rg1.png
Normal file
|
After Width: | Height: | Size: 304 B |
BIN
src/assets/images/rg1Ac.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/assets/images/zk.png
Normal file
|
After Width: | Height: | Size: 320 B |
BIN
src/assets/images/zt.png
Normal file
|
After Width: | Height: | Size: 125 B |
BIN
src/assets/images/组 62.png
Normal file
|
After Width: | Height: | Size: 992 B |
@ -37,7 +37,7 @@
|
||||
<el-collapse-item name="1">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true" class="queryFormRef">
|
||||
<el-form-item label="设备类型" prop="deviceType">
|
||||
<el-select v-model="queryParams.deviceType" placeholder="设备类型" clearable>
|
||||
<el-select v-model="queryParams.deviceType" placeholder="设备类型" clearable filterable>
|
||||
<el-option v-for="item in deviceTypeOptions" :key="item.value" :label="item.typeName"
|
||||
:value="item.deviceTypeId" />
|
||||
</el-select>
|
||||
|
||||
@ -227,7 +227,7 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备类型" prop="deviceType">
|
||||
<el-select v-model="form.deviceType" placeholder="设备类型" @change="(id) => handleDeviceTypeChange(id)"
|
||||
>
|
||||
clearable filterable>
|
||||
<el-option v-for="item in deviceTypeOptions" :key="item.value" :label="item.typeName"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
@ -622,6 +622,7 @@ const handleAdd = async () => {
|
||||
};
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: deviceForm) => {
|
||||
debugger;
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改设备';
|
||||
@ -663,29 +664,29 @@ const handleDeviceTypeChange = async (deviceTypeId: string | number) => {
|
||||
showImeiField.value = false;
|
||||
communicationModeInfo.value = null;
|
||||
// 编辑时如果有值,根据已有值确定显示哪个字段
|
||||
if (form.value.id) {
|
||||
console.log('zheshi me1 ');
|
||||
// 1. 先判断:Mac 和 Imei 都有值(新增的关键分支)
|
||||
const hasMac = typeof form.value.deviceMac === 'string' && form.value.deviceMac.trim() !== '';
|
||||
const hasImei = typeof form.value.deviceImei === 'string' && form.value.deviceImei.trim() !== '';
|
||||
if (hasMac && hasImei) {
|
||||
//两个都有值:显示两个字段 + 都加校验
|
||||
showMacField.value = true;
|
||||
showImeiField.value = true;
|
||||
console.log('两个字段都有值');
|
||||
} else if (hasMac) {
|
||||
showMacField.value = true;
|
||||
showImeiField.value = false;
|
||||
rules.value.deviceImei = [];
|
||||
console.log('只有 Mac 有值');
|
||||
} else if (hasImei) {
|
||||
showImeiField.value = true;
|
||||
showMacField.value = false;
|
||||
rules.value.deviceMac = [];
|
||||
console.log('只有 Imei 有值');
|
||||
}
|
||||
return;
|
||||
}
|
||||
// if (form.value.id) {
|
||||
// console.log('zheshi me1 ');
|
||||
// // 1. 先判断:Mac 和 Imei 都有值(新增的关键分支)
|
||||
// const hasMac = typeof form.value.deviceMac === 'string' && form.value.deviceMac.trim() !== '';
|
||||
// const hasImei = typeof form.value.deviceImei === 'string' && form.value.deviceImei.trim() !== '';
|
||||
// if (hasMac && hasImei) {
|
||||
// //两个都有值:显示两个字段 + 都加校验
|
||||
// showMacField.value = true;
|
||||
// showImeiField.value = true;
|
||||
// console.log('两个字段都有值');
|
||||
// } else if (hasMac) {
|
||||
// showMacField.value = true;
|
||||
// showImeiField.value = false;
|
||||
// rules.value.deviceImei = [];
|
||||
// console.log('只有 Mac 有值');
|
||||
// } else if (hasImei) {
|
||||
// showImeiField.value = true;
|
||||
// showMacField.value = false;
|
||||
// rules.value.deviceMac = [];
|
||||
// console.log('只有 Imei 有值');
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
if (isProcessing) return;
|
||||
isProcessing = true;
|
||||
// 新增或编辑时没有值,根据设备类型获取通讯方式
|
||||
|
||||