7 changed files with 271 additions and 4 deletions
@ -0,0 +1,189 @@ |
|||||||
|
<template> |
||||||
|
<div class="storage-info-wrap"> |
||||||
|
<!-- <EdfsWrap class="storage-info-from-wrap"> |
||||||
|
<div class="from"> |
||||||
|
<div class="from-input"> |
||||||
|
<div class="from-row"> |
||||||
|
<div class="label">设备序列:</div> |
||||||
|
<el-input |
||||||
|
v-model="queryParams.number" |
||||||
|
placeholder="请输入设备序列号" |
||||||
|
clearable |
||||||
|
@keyup.enter="handleQuery" |
||||||
|
/> |
||||||
|
</div> |
||||||
|
<div class="from-row"> |
||||||
|
<div class="label">设备名称:</div> |
||||||
|
<el-input |
||||||
|
v-model="queryParams.deviceName" |
||||||
|
placeholder="请输入设备名称" |
||||||
|
clearable |
||||||
|
@keyup.enter="handleQuery" |
||||||
|
/> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="from-row"> |
||||||
|
<div class="label">注册时段:</div> |
||||||
|
<el-date-picker |
||||||
|
v-model="queryParams.createTime" |
||||||
|
value-format="YYYY-MM-DD HH:mm:ss" |
||||||
|
type="datetimerange" |
||||||
|
start-placeholder="开始时间" |
||||||
|
end-placeholder="结束时间" |
||||||
|
/> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="btn-group"> |
||||||
|
<el-button @click="addDevice"><Icon icon="ep:plus" />添加设备</el-button> |
||||||
|
|
||||||
|
<el-button @click="handleQuery"><Icon icon="ep:search" />搜索</el-button> |
||||||
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" />重置</el-button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</EdfsWrap> --> |
||||||
|
<EdfsWrap title="设备信息列表" class="storage-info-table"> |
||||||
|
<EdfsTable |
||||||
|
class="table" |
||||||
|
v-loading="loading" |
||||||
|
:data="list" |
||||||
|
:highlight-current-row="true" |
||||||
|
:page-total="total" |
||||||
|
:current-page="queryParams.pageNo" |
||||||
|
:page-size="queryParams.pageSize" |
||||||
|
row-class-name="row" |
||||||
|
@pageCurrentChange="handleJump" |
||||||
|
> |
||||||
|
<template v-for="(col, idx) in tableCol" :key="idx"> |
||||||
|
<el-table-column |
||||||
|
v-if="col.prop.endsWith('Time')" |
||||||
|
:label="col.label" |
||||||
|
:min-width="col.minWidth" |
||||||
|
> |
||||||
|
<template #default="scope"> |
||||||
|
{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column |
||||||
|
v-else |
||||||
|
:prop="col.prop" |
||||||
|
:label="col.label" |
||||||
|
:min-width="col.minWidth" |
||||||
|
/> |
||||||
|
</template> |
||||||
|
|
||||||
|
<el-table-column label="操作" width="190" align="center"> |
||||||
|
<template #default="scope"> |
||||||
|
<EdfsButton |
||||||
|
link |
||||||
|
type="success" |
||||||
|
inner-text="添加维修信息" |
||||||
|
@click="addMaintain(scope.row)" |
||||||
|
/> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
</EdfsTable> |
||||||
|
</EdfsWrap> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script setup lang="ts"> |
||||||
|
import dayjs from 'dayjs' |
||||||
|
import EdfsWrap from '@/components/dashboard/Edfs-wrap.vue' |
||||||
|
import EdfsTable from '@/components/dashboard/Edfs-table/index.vue' |
||||||
|
import { tableCol } from './utils' |
||||||
|
import { isResError } from '@/hooks/useMessage' |
||||||
|
import { getStorageOutPage } from '@/api/module/eam/device/storage' |
||||||
|
import { useRouter } from 'vue-router' |
||||||
|
|
||||||
|
const router = useRouter() |
||||||
|
const loading = ref(true) |
||||||
|
const total = ref(0) |
||||||
|
const list = ref<any>([]) |
||||||
|
const queryParams = reactive({ |
||||||
|
pageNo: 1, |
||||||
|
pageSize: 10, |
||||||
|
// number: undefined, |
||||||
|
// deviceName: undefined, |
||||||
|
// status: undefined, |
||||||
|
// code: undefined, |
||||||
|
// createTime: [], |
||||||
|
}) |
||||||
|
|
||||||
|
const getList = async () => { |
||||||
|
loading.value = true |
||||||
|
|
||||||
|
const res = await getStorageOutPage(queryParams) |
||||||
|
|
||||||
|
if (!isResError(res)) { |
||||||
|
list.value = res.data.list |
||||||
|
total.value = res.data.total |
||||||
|
} |
||||||
|
|
||||||
|
loading.value = false |
||||||
|
} |
||||||
|
|
||||||
|
const handleQuery = () => { |
||||||
|
queryParams.pageNo = 1 |
||||||
|
getList() |
||||||
|
} |
||||||
|
function handleJump(page: number) { |
||||||
|
queryParams.pageNo = page |
||||||
|
getList() |
||||||
|
} |
||||||
|
|
||||||
|
function addMaintain(row: any) { |
||||||
|
router.push({ |
||||||
|
path: '/device/deviceOperation', |
||||||
|
query: { action: 'update', type: 'maintain', id: row.deviceId }, |
||||||
|
}) |
||||||
|
} |
||||||
|
onMounted(() => { |
||||||
|
getList() |
||||||
|
}) |
||||||
|
</script> |
||||||
|
|
||||||
|
<style scoped lang="scss"> |
||||||
|
.storage-info-wrap { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
row-gap: 10px; |
||||||
|
.storage-info-from-wrap { |
||||||
|
height: auto; |
||||||
|
width: 100%; |
||||||
|
.from { |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
justify-content: space-around; |
||||||
|
height: 100%; |
||||||
|
width: 100%; |
||||||
|
.from-input { |
||||||
|
display: flex; |
||||||
|
width: 100%; |
||||||
|
column-gap: 20px; |
||||||
|
row-gap: 10px; |
||||||
|
flex-wrap: wrap; |
||||||
|
.from-row { |
||||||
|
min-width: 270px; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
column-gap: 4px; |
||||||
|
.label { |
||||||
|
white-space: nowrap; |
||||||
|
width: 70px; |
||||||
|
color: var(--label-text); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.storage-info-table { |
||||||
|
flex: 1; |
||||||
|
.table { |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
@ -0,0 +1,7 @@ |
|||||||
|
export const tableCol = [ |
||||||
|
{ label: '出库设备', prop: 'deviceId', minWidth: '12%' }, |
||||||
|
{ label: '客户', prop: 'customerId', minWidth: '10%' }, |
||||||
|
{ label: '出库价格', prop: 'price', minWidth: '10%' }, |
||||||
|
// { label: '出库单名称', prop: 'name', minWidth: '10%' },
|
||||||
|
{ label: '描述', prop: 'description', minWidth: '16%' }, |
||||||
|
] |
@ -0,0 +1,64 @@ |
|||||||
|
<template> |
||||||
|
<div class="config-page-wrap"> |
||||||
|
<EdfsWrap title="系统常规配置" class="base"> |
||||||
|
<div class="config-item"> |
||||||
|
<div class="description"> |
||||||
|
<div class="title">开启文件存储</div> |
||||||
|
<div class="desc"> |
||||||
|
开启文件存储后,可支持上传固件文件,请在开启前部署好文件存储服务 |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="opt"> |
||||||
|
<el-switch |
||||||
|
v-model="isEnableFileStorage" |
||||||
|
active-color="#13ce66" |
||||||
|
inactive-color="#ff4949" |
||||||
|
active-text="开启" |
||||||
|
inactive-text="关闭" |
||||||
|
/> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</EdfsWrap> |
||||||
|
<EdfsWrap title="文件存储接入配置" class="file" v-if="isEnableFileStorage"></EdfsWrap> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script setup lang="ts"> |
||||||
|
import EdfsWrap from '@/components/dashboard/Edfs-wrap.vue' |
||||||
|
const isEnableFileStorage = ref(false) |
||||||
|
</script> |
||||||
|
|
||||||
|
<style scoped lang="scss"> |
||||||
|
.config-page-wrap { |
||||||
|
display: flex; |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
|
||||||
|
column-gap: 10px; |
||||||
|
.config-item { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: space-between; |
||||||
|
|
||||||
|
.description { |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
.title { |
||||||
|
font-size: 16px; |
||||||
|
font-weight: 500; |
||||||
|
color: var(--label-text); |
||||||
|
} |
||||||
|
.desc { |
||||||
|
font-size: 14px; |
||||||
|
color: var(--text-desc); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.base { |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
.file { |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
Loading…
Reference in new issue