1
0
forked from dyf/dyf-vue-ui

Compare commits

...

3 Commits

Author SHA1 Message Date
6d6d395bff 670控制中心小调整 2025-10-09 11:50:07 +08:00
75a7da4a19 Merge branch 'main' of http://47.107.152.87:3000/liubiao/dyf-vue-ui 2025-10-09 11:48:55 +08:00
72699abdec 修改一些体验性问题 2025-10-08 14:19:47 +08:00
15 changed files with 198 additions and 96 deletions

BIN
src/assets/images/di.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/assets/images/diAc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/assets/images/high.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/assets/images/rb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
src/assets/images/rbAc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
src/assets/images/sg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
src/assets/images/sgAc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
src/assets/images/zhong.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -79,6 +79,7 @@ const hasOneShowingChild = (parent: RouteRecordRaw, children?: RouteRecordRaw[])
}; };
const resolvePath = (routePath: string, routeQuery?: string): any => { const resolvePath = (routePath: string, routeQuery?: string): any => {
if (isExternal(routePath)) { if (isExternal(routePath)) {
return routePath; return routePath;
} }

View File

@ -19,8 +19,8 @@
<el-row :gutter="20" class="content-row" :class="deviceDetail.sta_ShakeBit == 1 || deviceDetail.staSOSGrade == 1 ? '' : 'displayNone'"> <el-row :gutter="20" class="content-row" :class="deviceDetail.sta_ShakeBit == 1 || deviceDetail.staSOSGrade == 1 ? '' : 'displayNone'">
<el-col :lg="24" :xs="24"> <el-col :lg="24" :xs="24">
<div class="staticRwo" :class="deviceDetail.sta_ShakeBit == 1 ? '' : 'displayNone'">设备静止报警中!</div> <div class="staticRwo" :class="deviceDetail.sta_ShakeBit == 1 ? '' : 'displayNone'">设备静止报警中!</div>
<div class="staticRwo" :class="deviceDetail.staSOSGrade == 1 ? '' : 'displayNone'" @click="showClose()"> <div class="staticRwo" :class="(deviceDetail.staSOSGrade == 1 && Status.timeOut>0) ? '' : 'displayNone'" @click="showClose()">
设备强制报警中,<span v-show="Status.timeOut>0">{{ Status.timeOut }}S</span>! 设备强制报警中<span v-show="Status.timeOut>0">,{{ Status.timeOut }}S</span>!
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -102,7 +102,7 @@
<el-input v-if="deviceDetail" placeholder="请输入职位" v-model="deviceDetail.personnelInfo.name" /> <el-input v-if="deviceDetail" placeholder="请输入职位" v-model="deviceDetail.personnelInfo.name" />
</div> </div>
<div class="form-item"> <div class="form-item">
<span class="form-label">姓名</span> <span class="form-label">姓名:</span>
<el-input v-if="deviceDetail" placeholder="请输入姓名" v-model="deviceDetail.personnelInfo.position" /> <el-input v-if="deviceDetail" placeholder="请输入姓名" v-model="deviceDetail.personnelInfo.position" />
</div> </div>
<div class="form-item"> <div class="form-item">
@ -206,11 +206,24 @@ const router = useRouter();
// 导入图片资源(确保路径正确) // 导入图片资源(确保路径正确)
import strongLightDefault from '@/assets/images/strong-light.png'; import strongLightDefault from '@/assets/images/strong-light.png';
import strongLightActive from '@/assets/images/strong-light_HL.png'; import strongLightActive from '@/assets/images/strong-light_HL.png';
import weakLightDefault from '@/assets/images/weak-light.png'; import floodLightDefault from '@/assets/images/flood-light.png';
import weakLightActive from '@/assets/images/weak-light_HL.png'; import floodLightActive from '@/assets/images/flood-light_HL.png';
import di from '@/assets/images/di.png';
import diAc from '@/assets/images/diAc.png';
import high from '@/assets/images/high.png';
import highAc from '@/assets/images/highAc.png';
import rb from '@/assets/images/rb.png';
import rbAc from '@/assets/images/rbAc.png';
import sg from '@/assets/images/sg.png';
import sgAc from '@/assets/images/sgAc.png';
import zhong from '@/assets/images/zhong.png';
import zhongAc from '@/assets/images/zhongAc.png';
import closeDefault from '@/assets/images/close.png'; import closeDefault from '@/assets/images/close.png';
import closeActive from '@/assets/images/close_HL.png'; import closeActive from '@/assets/images/close_HL.png';
import { hi } from 'element-plus/es/locale/index.mjs';
const fullscreenLoading = ref(false); const fullscreenLoading = ref(false);
var timer = null; var timer = null;
const sendTextLoading = ref(false); const sendTextLoading = ref(false);
@ -248,8 +261,8 @@ const lightModes = ref<any[]>([
{ {
id: '2', id: '2',
name: '弱光', name: '弱光',
icon: weakLightDefault, icon: floodLightDefault,
activeIcon: weakLightActive, activeIcon: floodLightActive,
active: false active: false
}, },
{ {
@ -265,24 +278,24 @@ const sosModes = ref<any[]>([
{ {
id: '1', id: '1',
name: '声光报警', name: '声光报警',
icon: strongLightDefault, // 直接使用导入的变量 icon: sg, // 直接使用导入的变量
activeIcon: strongLightActive, activeIcon: sgAc,
active: false active: false
}, },
{ {
id: '2', id: '2',
name: '红蓝模式', name: '红蓝模式',
icon: strongLightDefault, // 直接使用导入的变量 icon: rb, // 直接使用导入的变量
activeIcon: strongLightActive, activeIcon: rbAc,
active: false active: false
}, },
{ {
id: '0', id: '0',
name: '关闭', name: '关闭',
icon: strongLightDefault, // 直接使用导入的变量 icon: closeDefault, // 直接使用导入的变量
activeIcon: strongLightActive, activeIcon: closeActive,
active: false active: false
} }
@ -292,32 +305,32 @@ const staticModes = ref<any[]>([
{ {
id: '3', id: '3',
name: '高档', name: '高档',
icon: strongLightDefault, // 直接使用导入的变量 icon: high, // 直接使用导入的变量
activeIcon: strongLightActive, activeIcon: highAc,
active: false active: false
}, },
{ {
id: '2', id: '2',
name: '中档', name: '中档',
icon: strongLightDefault, // 直接使用导入的变量 icon: zhong, // 直接使用导入的变量
activeIcon: strongLightActive, activeIcon:zhongAc,
active: false active: false
}, },
{ {
id: '1', id: '1',
name: '低档', name: '低档',
icon: strongLightDefault, // 直接使用导入的变量 icon: di, // 直接使用导入的变量
activeIcon: strongLightActive, activeIcon: diAc,
active: false active: false
}, },
{ {
id: '0', id: '0',
name: '关闭', name: '关闭',
icon: strongLightDefault, // 直接使用导入的变量 icon: closeDefault, // 直接使用导入的变量
activeIcon: strongLightActive, activeIcon: closeActive,
active: false active: false
} }

View File

@ -47,7 +47,7 @@
v-model="advanceSearch.Date" v-model="advanceSearch.Date"
type="daterange" type="daterange"
format="YYYY-MM-DD" format="YYYY-MM-DD"
style="width: 240px;" style="width: 240px"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
range-separator="-" range-separator="-"
start-placeholder="开始日期" start-placeholder="开始日期"
@ -102,7 +102,6 @@
> >
<div class="form"> <div class="form">
<el-form :model="cEdit" ref="formRef" style="max-width: 750px" :rules="rules"> <el-form :model="cEdit" ref="formRef" style="max-width: 750px" :rules="rules">
<el-form-item label="设备名称" label-position="right" prop="deviceId"> <el-form-item label="设备名称" label-position="right" prop="deviceId">
<!-- <el-input v-model="selectedRow['deviceName']" :readonly="true" @click.stop="ShowDevice('Edit', true)" placeholder="请选择设备" /> --> <!-- <el-input v-model="selectedRow['deviceName']" :readonly="true" @click.stop="ShowDevice('Edit', true)" placeholder="请选择设备" /> -->
<el-select v-model="cEdit.deviceId" placeholder="选择设备" clearable :disabled="!cEdit.isEdit" filterable> <el-select v-model="cEdit.deviceId" placeholder="选择设备" clearable :disabled="!cEdit.isEdit" filterable>
@ -143,6 +142,7 @@
accept=".jpg,.jpeg,.png,.gif.webp" accept=".jpg,.jpeg,.png,.gif.webp"
:limit="9" :limit="9"
list-type="picture-card" list-type="picture-card"
:class="{ 'hide-add-btn': !cEdit.isEdit }"
> >
<el-icon> <el-icon>
<Plus /> <Plus />
@ -154,7 +154,7 @@
<img :src="file.url" class="el-upload-list__item-thumbnail" /> <img :src="file.url" class="el-upload-list__item-thumbnail" />
<!-- 操作按钮组 --> <!-- 操作按钮组 -->
<div class="el-upload-list__item-actions"> <div class="el-upload-list__item-actions" v-show="cEdit.isEdit">
<!-- 自定义删除按钮 --> <!-- 自定义删除按钮 -->
<span class="el-upload-list__item-delete" @click.stop="dropImg('before', file, index)"> <span class="el-upload-list__item-delete" @click.stop="dropImg('before', file, index)">
<el-icon> <el-icon>
@ -179,6 +179,7 @@
accept=".jpg,.jpeg,.png,.gif.webp" accept=".jpg,.jpeg,.png,.gif.webp"
:limit="9" :limit="9"
list-type="picture-card" list-type="picture-card"
:class="{ 'hide-add-btn': !cEdit.isEdit }"
> >
<el-icon> <el-icon>
<Plus /> <Plus />
@ -189,7 +190,7 @@
<!-- 图片缩略图 --> <!-- 图片缩略图 -->
<img :src="file.url" class="el-upload-list__item-thumbnail" /> <img :src="file.url" class="el-upload-list__item-thumbnail" />
<!-- 操作按钮组 --> <!-- 操作按钮组 -->
<div class="el-upload-list__item-actions"> <div class="el-upload-list__item-actions" v-show="cEdit.isEdit">
<!-- 自定义删除按钮 --> <!-- 自定义删除按钮 -->
<span class="el-upload-list__item-delete" @click.stop="dropImg('after', file, index)"> <span class="el-upload-list__item-delete" @click.stop="dropImg('after', file, index)">
<el-icon> <el-icon>
@ -338,7 +339,6 @@
import api from '@/api/equipmentManagement/repairRecords/index'; import api from '@/api/equipmentManagement/repairRecords/index';
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
var grid = ref(null); var grid = ref(null);
var deviceGrid = ref(null); var deviceGrid = ref(null);
@ -490,15 +490,12 @@ function DropRecord(arr = undefined) {
() => { () => {
showloading('fullLoading'); showloading('fullLoading');
arr = arr.map((item) => item.recordId); arr = arr.map((item) => item.recordId);
api.dropRepir(arr).then(res=>{ api.dropRepir(arr).then((res) => {
if (res && res.code == 200) { if (res && res.code == 200) {
Search(); Search();
} }
alert(res.msg); alert(res.msg);
}); });
}, },
hideConfirm, hideConfirm,
'提示' '提示'
@ -590,7 +587,7 @@ function ShowEdit(item = undefined, isEdit = true,formEl=undefined) {
return { name: v.imageId, url: v.imageUrl, id: v.imageId }; return { name: v.imageId, url: v.imageUrl, id: v.imageId };
}); });
if (!formEl) return if (!formEl) return;
formEl.validate(); formEl.validate();
} }
@ -671,10 +668,11 @@ var dropImg = (type, file, index) => {
//保存表单数据 //保存表单数据
function SaveFormData(formEl: FormInstance | undefined) { function SaveFormData(formEl: FormInstance | undefined) {
if (!cEdit.isEdit) { if (!cEdit.isEdit) {
CloseEdit();
return; return;
} }
if (!formEl) return if (!formEl) return;
let submit = () => { let submit = () => {
showloading('fullLoading'); showloading('fullLoading');
@ -737,14 +735,12 @@ function SaveFormData(formEl: FormInstance | undefined) {
hideloading(); hideloading();
}); });
}, 0); }, 0);
} };
formEl.validate((valid) => { formEl.validate((valid) => {
if (valid) { if (valid) {
submit(); submit();
} }
}) });
} }
//导出 //导出
@ -1087,4 +1083,8 @@ input:focus {
// margin-right: 8px !important; // margin-right: 8px !important;
// } // }
:deep .hide-add-btn .el-upload.is-disabled,
.hide-add-btn .el-upload.is-disabled {
display: none !important;
}
</style> </style>

View File

@ -0,0 +1,83 @@
<template>
<el-form :model="user" label-width="80px">
<div v-for="item in user">
<el-form-item :label="item.dictLabel" prop="dictLabel">
<el-input v-model="item.dictLabel" disabled />
</el-form-item>
<el-form-item label="版本号" prop="dictValue">
<el-input v-model="item.dictValue" placeholder="请输入版本号" clearable />
</el-form-item>
<el-form-item label="下载地址" prop="remark">
<el-input v-model="item.remark" placeholder="请输入wgt下载地址" clearable />
</el-form-item>
</div>
<el-form-item>
<el-button type="primary" @click="submit">保存</el-button>
</el-form-item>
</el-form>
</template>
<script setup lang="ts">
import request from '@/utils/request';
const user = ref([
{
'dictValue': '',
'dictLabel': 'ios',
'remark': ''
},
{
'dictValue': '',
'dictLabel': 'android',
'remark': ''
}
]);
function getCfg() {
request({
url: '/app/auth/version',
method: 'get'
}).then((res) => {
if (res && res.code === 200) {
user.value.forEach((v) => {
let f = res.data.find((item) => {
return item.dictLabel === v.dictLabel;
});
if (f) {
v.dictValue = f.dictValue;
v.remark = f.remark;
}
});
}
});
}
function submit() {
let flag = [];
user.value.forEach((v) => {
let keys = Object.keys(v);
keys.forEach((k) => {
if (!v[k]) {
flag.push(false);
}
});
});
if (flag.length > 0) {
ElMessageBox.alert('所有项都是必填');
return;
}
request({
url: '/api/xinghan/device/UpVersion',
method: 'post',
data: user.value
}).then((res) => {
if (res && res.code === 200) {
ElMessageBox.alert('操作成功');
}
});
}
onMounted(() => {
getCfg();
});
</script>

View File

@ -61,6 +61,9 @@
<el-tab-pane label="在线设备" name="onlineDevice"> <el-tab-pane label="在线设备" name="onlineDevice">
<onlineDevice :devices="state.devices" /> <onlineDevice :devices="state.devices" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="App版本" name="appVer">
<appVer />
</el-tab-pane>
</el-tabs> </el-tabs>
</el-card> </el-card>
</el-col> </el-col>
@ -78,7 +81,7 @@ import { getAuthList } from '@/api/system/social/auth';
import { getUserProfile } from '@/api/system/user'; import { getUserProfile } from '@/api/system/user';
import { getOnline } from '@/api/monitor/online'; import { getOnline } from '@/api/monitor/online';
import { UserVO } from '@/api/system/user/types'; import { UserVO } from '@/api/system/user/types';
import appVer from './appVer.vue';
const activeTab = ref('userinfo'); const activeTab = ref('userinfo');
interface State { interface State {
user: Partial<UserVO>; user: Partial<UserVO>;
@ -86,13 +89,15 @@ interface State {
postGroup: string; postGroup: string;
auths: any; auths: any;
devices: any; devices: any;
vers: any;
} }
const state = ref<State>({ const state = ref<State>({
user: {}, user: {},
roleGroup: '', roleGroup: '',
postGroup: '', postGroup: '',
auths: [], auths: [],
devices: [] devices: [],
vers: ''
}); });
const userForm = ref({}); const userForm = ref({});