智能柜
This commit is contained in:
1 parent
ec0bca6bb2
commit
d188c10079
2 files changed
+137
-16
No files matched your search
@@ -1,35 +1,73 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div v-loading="loading" class="layout-padding-auto layout-padding-view" style="overflow: scroll !important">
|
||||
<el-descriptions border :column="4" title="经营信息">
|
||||
<el-descriptions :column="3" title="经营信息" border>
|
||||
<template #extra>
|
||||
<el-tooltip class="item" effect="dark" :content="$t('queryTree.refresh')" placement="top">
|
||||
<el-button circle icon="Refresh" @click="doRefresh" />
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<el-descriptions-item label="今日交易金额:"> {{ displayPrice(0) }} </el-descriptions-item>
|
||||
<el-descriptions-item label="本月交易金额:"> {{ displayPrice(0) }} </el-descriptions-item>
|
||||
<el-descriptions-item label="本年交易金额:" :span="2"> {{ displayPrice(0) }} </el-descriptions-item>
|
||||
<el-descriptions-item label="今日交易金额:">{{ displayPrice(0) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="本月交易金额:">{{ displayPrice(0) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="本年交易金额:">{{ displayPrice(0) }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions :column="4" title="智能柜设置">
|
||||
<template #extra>
|
||||
<div class="flex justify-center items-center">
|
||||
<el-button icon="Edit" type="primary" @click="doBind"> 修改 </el-button>
|
||||
<el-button icon="Edit" type="primary" @click="doBind">修改</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<el-descriptions-item label="商户名称"> {{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="设备编号"> {{ doorSetting.id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="设备名称"> {{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="机器编号"> {{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="外部设备编号"> {{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="SIM卡号"> {{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="地址"> {{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="商户名称:">{{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="设备编号:">{{ doorSetting.id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="设备名称:">{{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="机器编号:">{{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="外部设备编号:">{{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="SIM卡号:">{{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="柜子层数:">{{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="地址:">{{}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions :column="3" title="运行信息">
|
||||
<template #extra>
|
||||
<div class="flex justify-center items-center">
|
||||
<el-button icon="Edit" type="primary" @click="doVolumeSetting">音量设置</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<el-descriptions-item label="销售状态:">{{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="设备状态:">{{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="电源状态:">{{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="网络状态:">{{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="媒体音量:">{{}}</el-descriptions-item>
|
||||
<el-descriptions-item label="系统音量:">{{}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions :column="0" title="货柜商品">
|
||||
<template #extra>
|
||||
<div class="flex justify-center items-center">
|
||||
<el-button icon="Edit" type="primary">设置</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="114514-1">
|
||||
<div class="bg-slate-400 my-4 p-4 text-black flex items-center" v-for="(item, index) in new Array(6).fill('某层')" :key="index">
|
||||
<div>{{ item }}</div>
|
||||
<div></div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="114514-2">22</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<!-- 音量设置 -->
|
||||
<volume-setting ref="volumeSettingRef" @refreshVolume="refreshVolume" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemHardDoorManager">
|
||||
import VolumeSetting from "./volume-setting.vue"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
|
||||
@@ -42,8 +80,11 @@ const doorSetting = ref<any>({})
|
||||
const loading = ref(false)
|
||||
|
||||
const state = reactive<any>({
|
||||
mediaVolume: "",
|
||||
systemVolume: "",
|
||||
queryForm: {},
|
||||
})
|
||||
const volumeSettingRef = ref()
|
||||
|
||||
onMounted(async () => {
|
||||
await getDetail()
|
||||
@@ -81,12 +122,17 @@ const doBind = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 重启
|
||||
const doRestart = async () => {
|
||||
const pa = {}
|
||||
// 音量设置
|
||||
const doVolumeSetting = async () => {
|
||||
if (volumeSettingRef.value) {
|
||||
volumeSettingRef.value.openDialog()
|
||||
}
|
||||
}
|
||||
const refreshVolume = (data: { hardId: string; mediaVolume: number; systemVolume: number }) => {
|
||||
state.mediaVolume = data.mediaVolume
|
||||
state.systemVolume = data.systemVolume
|
||||
}
|
||||
|
||||
// 刷新
|
||||
const doRefresh = async () => {
|
||||
try {
|
||||
loading.value = true
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<el-dialog title="音量设置" v-model="visible" :close-on-click-modal="true" draggable>
|
||||
<el-form :model="form" label-width="90px" v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="媒体音量:" prop="mediaVolume">
|
||||
<el-slider v-model="form.mediaVolume" :step="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="系统音量:" prop="systemVolume">
|
||||
<el-slider v-model="form.systemVolume" :step="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" :disabled="loading">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="volume-setting">
|
||||
import { getByCabinetNo } from "/@/api/hard/hard-door-manager"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
|
||||
const emit = defineEmits(["refreshVolume"])
|
||||
|
||||
const visible = ref(false)
|
||||
const loading = ref(false)
|
||||
|
||||
const form = reactive<{
|
||||
hardId: string
|
||||
mediaVolume: number
|
||||
systemVolume: number
|
||||
}>({
|
||||
hardId: "",
|
||||
mediaVolume: 80,
|
||||
systemVolume: 80,
|
||||
})
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (id: string) => {
|
||||
visible.value = true
|
||||
if (id) {
|
||||
// gethardDoorManagerData(id)
|
||||
}
|
||||
}
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
if (!form.hardId) {
|
||||
useMessage().error("设备id不存在")
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
loading.value = true
|
||||
await getByCabinetNo(form)
|
||||
useMessage().success("保存成功")
|
||||
visible.value = false
|
||||
emit("refreshVolume", form)
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
openDialog,
|
||||
})
|
||||
</script>
|
||||
Reference in new issue
Block a user