feat:柜子信息
This commit is contained in:
1 parent
fa45796edd
commit
a4193f7b5a
4 files changed
+20
-33
No files matched your search
+2
-2
@@ -11,14 +11,14 @@ ENV = 'development'
|
||||
# VITE_ADMIN_PROXY_PATH = http://47.96.250.9:8089/api/ # 测试线上
|
||||
# VITE_ADMIN_PROXY_PATH = http://pjcloud.center.takin.cc/
|
||||
# VITE_ADMIN_PROXY_PATH = http://localhost:9999/
|
||||
VITE_ADMIN_PROXY_PATH = http://192.168.101.81:9999/ # 邓-本地
|
||||
VITE_ADMIN_PROXY_PATH = http://192.168.101.107:9999/ # 邓-本地
|
||||
# VITE_ADMIN_PROXY_PATH = http://59.202.170.152:81/api # 正式环境线上
|
||||
|
||||
# 图片访问基础地址
|
||||
# VITE_IMAGE_BASE_PATH = http://47.96.250.9:8089/api # 测试线上
|
||||
# VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc
|
||||
# VITE_IMAGE_BASE_PATH = http://localhost:9999
|
||||
VITE_IMAGE_BASE_PATH = http://192.168.101.81:9999 # 邓-本地
|
||||
VITE_IMAGE_BASE_PATH = http://192.168.101.107:9999 # 邓-本地
|
||||
# VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境线上
|
||||
|
||||
# 代码生成服务地址
|
||||
|
||||
@@ -6,7 +6,7 @@ import request from "/@/utils/request"
|
||||
* @param systemVolume 系统音量
|
||||
* @param mediaVolume 媒体音量
|
||||
*/
|
||||
export function getByCabinetNo(data?: { hardId: any; systemVolume: any; mediaVolume: any }) {
|
||||
export function changeVolume(data?: { hardId: any; systemVolume: any; mediaVolume: any }) {
|
||||
return request({
|
||||
url: "/hard/hard-door-manager/change-volume",
|
||||
method: "post",
|
||||
|
||||
@@ -7,28 +7,14 @@
|
||||
<el-input v-model="form.imei" placeholder="请输入设备IMEI卡号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="内置设备号:" prop="bbb">
|
||||
<el-input v-model="form.bbb" placeholder="请输入内置设备号" />
|
||||
<el-form-item label="内置设备编号:" prop="deviceCode">
|
||||
<el-input v-model="form.deviceCode" placeholder="请输入内置设备号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="外部设备编号:" prop="hardId">
|
||||
<el-input v-model="form.hardId" placeholder="请输入外部设备编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="SIM卡号:" prop="sim">
|
||||
<el-input v-model="form.sim" placeholder="请输入SIM卡号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="柜子层数:" prop="aaa">
|
||||
<el-input v-model="form.aaa" placeholder="请输入柜子层数" />
|
||||
<el-form-item label="柜子层数:" prop="doorCount">
|
||||
<el-input v-model="form.doorCount" placeholder="请输入柜子层数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -53,29 +39,30 @@ const form = reactive<any>({
|
||||
id: "",
|
||||
hardId: "",
|
||||
imei: "",
|
||||
doorCount: "",
|
||||
deviceCode: "",
|
||||
})
|
||||
|
||||
const dataRules = ref({})
|
||||
const dataRules = ref({
|
||||
imei: [{ required: true, message: "设备IMEI卡号不能为空", trigger: "blur" }],
|
||||
deviceCode: [{ required: true, message: "内置设备编号:不能为空", trigger: "blur" }],
|
||||
doorCount: [{ required: true, message: "柜子层数不能为空", trigger: "blur" }],
|
||||
})
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = async (id: string) => {
|
||||
const openDialog = async (hardId: string) => {
|
||||
visible.value = true
|
||||
form.id = ""
|
||||
|
||||
form.hardId = hardId
|
||||
dataFormRef.value?.resetFields()
|
||||
|
||||
if (id) {
|
||||
form.id = id
|
||||
const res = await hardDoorManager.getObj(id)
|
||||
if (hardId) {
|
||||
const res = await hardDoorManager.getByHardId({ hardId: hardId })
|
||||
Object.assign(form, res.data)
|
||||
}
|
||||
}
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
if (!form.id) return useMessage().error("设备id不存在")
|
||||
|
||||
if (!form.hardId) return useMessage().error("设备id不存在")
|
||||
const valid = await dataFormRef.value.validate().catch(() => {})
|
||||
if (!valid) return
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="volume-setting">
|
||||
import { getByCabinetNo } from "/@/api/hard/hard-door-manager"
|
||||
import { changeVolume } from "/@/api/hard/hard-door-manager"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
|
||||
const emit = defineEmits(["refreshVolume"])
|
||||
@@ -56,7 +56,7 @@ const onSubmit = async () => {
|
||||
|
||||
try {
|
||||
loading.value = true
|
||||
await getByCabinetNo(form)
|
||||
await changeVolume(form)
|
||||
useMessage().success("保存成功")
|
||||
visible.value = false
|
||||
emit("refreshVolume", form)
|
||||
|
||||
Reference in new issue
Block a user