forked from dyf/dyf-vue-ui
670控制中心小调整
This commit is contained in:
@ -19,8 +19,8 @@
|
||||
<el-row :gutter="20" class="content-row" :class="deviceDetail.sta_ShakeBit == 1 || deviceDetail.staSOSGrade == 1 ? '' : 'displayNone'">
|
||||
<el-col :lg="24" :xs="24">
|
||||
<div class="staticRwo" :class="deviceDetail.sta_ShakeBit == 1 ? '' : 'displayNone'">设备静止报警中!</div>
|
||||
<div class="staticRwo" :class="deviceDetail.staSOSGrade == 1 ? '' : 'displayNone'" @click="showClose()">
|
||||
设备强制报警中,<span v-show="Status.timeOut>0">{{ Status.timeOut }}S</span>!
|
||||
<div class="staticRwo" :class="(deviceDetail.staSOSGrade == 1 && Status.timeOut>0) ? '' : 'displayNone'" @click="showClose()">
|
||||
设备强制报警中<span v-show="Status.timeOut>0">,{{ Status.timeOut }}S</span>!
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -102,7 +102,7 @@
|
||||
<el-input v-if="deviceDetail" placeholder="请输入职位" v-model="deviceDetail.personnelInfo.name" />
|
||||
</div>
|
||||
<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" />
|
||||
</div>
|
||||
<div class="form-item">
|
||||
@ -206,11 +206,24 @@ const router = useRouter();
|
||||
// 导入图片资源(确保路径正确)
|
||||
import strongLightDefault from '@/assets/images/strong-light.png';
|
||||
import strongLightActive from '@/assets/images/strong-light_HL.png';
|
||||
import weakLightDefault from '@/assets/images/weak-light.png';
|
||||
import weakLightActive from '@/assets/images/weak-light_HL.png';
|
||||
import floodLightDefault from '@/assets/images/flood-light.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 closeActive from '@/assets/images/close_HL.png';
|
||||
import { hi } from 'element-plus/es/locale/index.mjs';
|
||||
|
||||
const fullscreenLoading = ref(false);
|
||||
var timer = null;
|
||||
const sendTextLoading = ref(false);
|
||||
@ -248,8 +261,8 @@ const lightModes = ref<any[]>([
|
||||
{
|
||||
id: '2',
|
||||
name: '弱光',
|
||||
icon: weakLightDefault,
|
||||
activeIcon: weakLightActive,
|
||||
icon: floodLightDefault,
|
||||
activeIcon: floodLightActive,
|
||||
active: false
|
||||
},
|
||||
{
|
||||
@ -265,24 +278,24 @@ const sosModes = ref<any[]>([
|
||||
{
|
||||
id: '1',
|
||||
name: '声光报警',
|
||||
icon: strongLightDefault, // 直接使用导入的变量
|
||||
activeIcon: strongLightActive,
|
||||
icon: sg, // 直接使用导入的变量
|
||||
activeIcon: sgAc,
|
||||
|
||||
active: false
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '红蓝模式',
|
||||
icon: strongLightDefault, // 直接使用导入的变量
|
||||
activeIcon: strongLightActive,
|
||||
icon: rb, // 直接使用导入的变量
|
||||
activeIcon: rbAc,
|
||||
|
||||
active: false
|
||||
},
|
||||
{
|
||||
id: '0',
|
||||
name: '关闭',
|
||||
icon: strongLightDefault, // 直接使用导入的变量
|
||||
activeIcon: strongLightActive,
|
||||
icon: closeDefault, // 直接使用导入的变量
|
||||
activeIcon: closeActive,
|
||||
|
||||
active: false
|
||||
}
|
||||
@ -292,32 +305,32 @@ const staticModes = ref<any[]>([
|
||||
{
|
||||
id: '3',
|
||||
name: '高档',
|
||||
icon: strongLightDefault, // 直接使用导入的变量
|
||||
activeIcon: strongLightActive,
|
||||
icon: high, // 直接使用导入的变量
|
||||
activeIcon: highAc,
|
||||
|
||||
active: false
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '中档',
|
||||
icon: strongLightDefault, // 直接使用导入的变量
|
||||
activeIcon: strongLightActive,
|
||||
icon: zhong, // 直接使用导入的变量
|
||||
activeIcon:zhongAc,
|
||||
|
||||
active: false
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '低档',
|
||||
icon: strongLightDefault, // 直接使用导入的变量
|
||||
activeIcon: strongLightActive,
|
||||
icon: di, // 直接使用导入的变量
|
||||
activeIcon: diAc,
|
||||
|
||||
active: false
|
||||
},
|
||||
{
|
||||
id: '0',
|
||||
name: '关闭',
|
||||
icon: strongLightDefault, // 直接使用导入的变量
|
||||
activeIcon: strongLightActive,
|
||||
icon: closeDefault, // 直接使用导入的变量
|
||||
activeIcon: closeActive,
|
||||
|
||||
active: false
|
||||
}
|
||||
|
||||
83
src/views/system/user/profile/appVer.vue
Normal file
83
src/views/system/user/profile/appVer.vue
Normal 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>
|
||||
@ -61,6 +61,9 @@
|
||||
<el-tab-pane label="在线设备" name="onlineDevice">
|
||||
<onlineDevice :devices="state.devices" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="App版本" name="appVer">
|
||||
<appVer />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</el-col>
|
||||
@ -78,7 +81,7 @@ import { getAuthList } from '@/api/system/social/auth';
|
||||
import { getUserProfile } from '@/api/system/user';
|
||||
import { getOnline } from '@/api/monitor/online';
|
||||
import { UserVO } from '@/api/system/user/types';
|
||||
|
||||
import appVer from './appVer.vue';
|
||||
const activeTab = ref('userinfo');
|
||||
interface State {
|
||||
user: Partial<UserVO>;
|
||||
@ -86,13 +89,15 @@ interface State {
|
||||
postGroup: string;
|
||||
auths: any;
|
||||
devices: any;
|
||||
vers: any;
|
||||
}
|
||||
const state = ref<State>({
|
||||
user: {},
|
||||
roleGroup: '',
|
||||
postGroup: '',
|
||||
auths: [],
|
||||
devices: []
|
||||
devices: [],
|
||||
vers: ''
|
||||
});
|
||||
|
||||
const userForm = ref({});
|
||||
|
||||
Reference in New Issue
Block a user