能源设备
parent
e9eec7986a
commit
dd0d818353
@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
// 查询能源设备列表
|
||||
export function getEnergyDevice(params) {
|
||||
return request({
|
||||
url: '/admin-api/mes/energy-device/page',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 修改能源设备
|
||||
export function updateEnergyDeviceCheckRecord(data) {
|
||||
return request({
|
||||
url: '/admin-api/mes/energy-device/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除能源设备
|
||||
export function deleteEnergyDevice(id) {
|
||||
return request({
|
||||
url: '/admin-api/mes/energy-device/delete?id='+id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询抄表记录
|
||||
export function getEnergyDeviceCheckRecord(params) {
|
||||
return request({
|
||||
url: '/admin-api/mes/energy-device/energy-device-check-record/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 新增抄表记录
|
||||
export function createEnergyDeviceCheckRecord(data) {
|
||||
return request({
|
||||
url: '/admin-api/mes/energy-device/energy-device-check-record/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除抄表记录
|
||||
export function deleteEnergyDeviceCheckRecordById(id) {
|
||||
return request({
|
||||
url: '/admin-api/mes/energy-device/energy-device-check-record/delete?id='+id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-sticky
|
||||
class="sticky"
|
||||
:custom-nav-height="0"
|
||||
>
|
||||
<u-navbar
|
||||
title="工位安排"
|
||||
bg-color="transparent"
|
||||
:auto-back="true"
|
||||
:title-style="{ fontWeight: 'bold' }"
|
||||
safe-area-inset-top
|
||||
placeholder
|
||||
/>
|
||||
</u-sticky>
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
</script>
|
||||
<style lang="sass" scoped>
|
||||
.sticky
|
||||
background: linear-gradient(180deg, #d4e9ff 0%, #f3f9ff 100%)
|
||||
backdrop-filter: blur(27.18px)
|
||||
box-shadow: 0 1px 1px 0 rgba(0, 72, 145, 0.1), 0 0.5px 0 0 rgba(0, 0, 0, 0.1)
|
||||
</style>
|
||||
@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-sticky
|
||||
class="sticky"
|
||||
:custom-nav-height="0"
|
||||
>
|
||||
<u-navbar
|
||||
title="重置最后抄表值"
|
||||
bg-color="transparent"
|
||||
:auto-back="true"
|
||||
:title-style="{ fontWeight: 'bold' }"
|
||||
safe-area-inset-top
|
||||
placeholder
|
||||
/>
|
||||
</u-sticky>
|
||||
<view class="container">
|
||||
<!-- 自定义表单校验 -->
|
||||
<uni-forms labelWidth="105px" :modelValue="formData">
|
||||
<uni-forms-item label="名称">
|
||||
<u-input v-model="formData.name" disabled/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="编码">
|
||||
<u-input v-model="formData.code" disabled/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="上次抄表时间" name="lastCheckTime">
|
||||
<uni-datetime-picker v-model="formData.lastCheckTime" type="date" :clear-icon="true" placeholder="选择上次抄表时间"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="最后抄表值" name="lastCheckValue">
|
||||
<u-input v-model="formData.lastCheckValue"></u-input>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<view class="u-flex justify-end">
|
||||
<view @click="submit()">
|
||||
<u-button type="success">
|
||||
<uni-icons type="checkbox" class="u-m-r-10"/>
|
||||
确定
|
||||
</u-button></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import tab from "@/plugins/tab";
|
||||
import { updateEnergyDeviceCheckRecord } from "@/api/mes/application";
|
||||
import modal from "@/plugins/modal";
|
||||
|
||||
const formData = ref({
|
||||
name: undefined,
|
||||
code: undefined,
|
||||
id: undefined,
|
||||
lastCheckTime: undefined,
|
||||
lastCheckValue: undefined,
|
||||
})
|
||||
|
||||
const submit = async ()=>{
|
||||
await updateEnergyDeviceCheckRecord(formData.value)
|
||||
modal.msgSuccess("修改成功")
|
||||
await tab.navigateBack()
|
||||
// 通知组件刷新列表
|
||||
uni.$emit('success', true)
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
formData.value.name = tab.getParams().name
|
||||
formData.value.id = tab.getParams().id
|
||||
formData.value.lastCheckTime = tab.getParams().time
|
||||
formData.value.lastCheckValue = tab.getParams().value
|
||||
formData.value.code = tab.getParams().code
|
||||
formData.value.isEnable = tab.getParams().isEnable
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
.sticky
|
||||
background: linear-gradient(180deg, #d4e9ff 0%, #f3f9ff 100%)
|
||||
backdrop-filter: blur(27.18px)
|
||||
box-shadow: 0 1px 1px 0 rgba(0, 72, 145, 0.1), 0 0.5px 0 0 rgba(0, 0, 0, 0.1)
|
||||
.container
|
||||
padding: 20rpx
|
||||
margin: 20rpx
|
||||
background-color: #ffffff
|
||||
.uniui-checkbox:before
|
||||
color: #ffffff
|
||||
.u-button
|
||||
height: 35px
|
||||
</style>
|
||||
@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-sticky
|
||||
class="sticky"
|
||||
:custom-nav-height="0"
|
||||
>
|
||||
<u-navbar
|
||||
title="我的应用"
|
||||
bg-color="transparent"
|
||||
:auto-back="false"
|
||||
:title-style="{ fontWeight: 'bold' }"
|
||||
left-icon=""
|
||||
safe-area-inset-top
|
||||
placeholder
|
||||
/>
|
||||
</u-sticky>
|
||||
<view class="container-wrap">
|
||||
<view
|
||||
v-for="(item,index) in appList"
|
||||
:key="item.title"
|
||||
class="app-list"
|
||||
>
|
||||
<view
|
||||
class="u-flex u-flex-between"
|
||||
>
|
||||
<view class="app-title">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<u-icon
|
||||
name="arrow-right"
|
||||
color="#333333"
|
||||
size="14"
|
||||
/>
|
||||
</view>
|
||||
<u-row class="model-container">
|
||||
<u-col v-for="(app, index) in item.list" :key="app.id" span="3">
|
||||
<view class="u-flex u-flex-center" @click="navTo(path[index])">
|
||||
<view class="item u-flex u-flex-column">
|
||||
<u-image
|
||||
:show-loading="true"
|
||||
:src="app.img"
|
||||
width="96rpx"
|
||||
height="96rpx"
|
||||
/>
|
||||
<text class="text">
|
||||
{{ app.text }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import tab from "@/plugins/tab";
|
||||
|
||||
const appList = ref([
|
||||
{
|
||||
title: '基础数据',
|
||||
list: [
|
||||
{
|
||||
id: 1,
|
||||
img: '/static/images/icon/arrangement.png',
|
||||
text: '工位安排'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
img: '/static/images/icon/energy.png',
|
||||
text: '能源设备'
|
||||
}
|
||||
]
|
||||
}
|
||||
])
|
||||
|
||||
const path = ['/pages/application/components/deskArrangement','/pages/application/components/energyEquipment']
|
||||
const navTo = (url) => {
|
||||
tab.navigateTo(url)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
.page
|
||||
width: 100%
|
||||
|
||||
.sticky
|
||||
background: linear-gradient(180deg, #d4e9ff 0%, #f3f9ff 100%)
|
||||
backdrop-filter: blur(27.18px)
|
||||
box-shadow: 0 1px 1px 0 rgba(0, 72, 145, 0.1), 0 0.5px 0 0 rgba(0, 0, 0, 0.1)
|
||||
|
||||
.container-wrap
|
||||
padding: 20rpx
|
||||
.app-list
|
||||
background-color: #ffffff
|
||||
padding: 20rpx 10rpx
|
||||
border-radius: 20rpx
|
||||
.app-title
|
||||
color: #343434
|
||||
font-size: 28rpx
|
||||
font-weight: bold
|
||||
.model-container
|
||||
flex-wrap: wrap
|
||||
.item
|
||||
box-sizing: border-box
|
||||
padding: 24rpx
|
||||
&:active
|
||||
background-color: #f1f1f1
|
||||
border-radius: 20rpx
|
||||
.text
|
||||
margin-top: 8rpx
|
||||
color: #595959
|
||||
font-size: 24rpx
|
||||
+ .app-list
|
||||
margin-top: 20rpx
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 543 B |
Binary file not shown.
|
After Width: | Height: | Size: 569 B |
Loading…
Reference in New Issue