|
|
@@ -35,10 +35,11 @@
|
|
|
@on-change="loadData(true)"
|
|
|
@imported="loadData(true)">
|
|
|
<template #extQuery>
|
|
|
- <el-button v-auth="'washDevice.add'" size="default" plain type="success" class="ml10" @click="handleRowClick('add',null)">
|
|
|
+ <el-button v-auth="'washDevice.add'" size="default" plain type="success" class="ml10" @click="handleRowClick('add',null)">
|
|
|
<SvgIcon name="ele-FolderAdd"/>
|
|
|
新增
|
|
|
- </el-button></template>
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
<!-- <template #extraQuery></template>
|
|
|
<template #extraLeft></template>
|
|
|
<template #extraRight></template>-->
|
|
|
@@ -56,7 +57,7 @@
|
|
|
<ext-page class="page-pager" v-model:value="state.pageQuery" @change="loadData(false)"/>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
- <DeviceDialog ref="device_dialog_ref" @refresh="loadData(true)"/>
|
|
|
+ <DeviceDialog ref="device_dialog_ref" @refresh="loadData(true)"/>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts" name="adminStationDevice">
|
|
|
@@ -100,18 +101,41 @@ const state = reactive({
|
|
|
exportConfig: {},
|
|
|
columns: [
|
|
|
// {type: 'selection', width: 60, align: 'center', fixed: 'left'},
|
|
|
- {label: '站点ID', prop: 'stationId', width: 80,query: true, type: 'text', resizable: true},
|
|
|
- {label: '站点名称', prop: 'stationName', width: 150,query: true, type: 'text', resizable: true},
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '站点',
|
|
|
+ prop: 'stationId',
|
|
|
+ width: 80,
|
|
|
+ query: true,
|
|
|
+ type: 'select',
|
|
|
+ hide: true,
|
|
|
+ resizable: true,
|
|
|
+ conf: {url: 'washStation/list', labelKey: 'stationName', valueKey: 'stationId', dataKey: 'list'}
|
|
|
+ },
|
|
|
{label: '设备编号', prop: 'shortId', width: 100, query: true, type: 'text', resizable: true, fixed: 'left'},
|
|
|
+ {
|
|
|
+ label: '站点名称', prop: 'stationName', width: 180, query: false, type: 'render', resizable: true,
|
|
|
+ render: (h: any, row: any, rowData: any) => {
|
|
|
+ return (
|
|
|
+ h('div', {
|
|
|
+ class: 'flex-align-items-center text-align-center'
|
|
|
+ }, [
|
|
|
+ h("div", {}, rowData.stationId),
|
|
|
+ h("hr"),
|
|
|
+ h("div", {}, rowData.stationName)
|
|
|
+ ])
|
|
|
+ )
|
|
|
+ }
|
|
|
+ },
|
|
|
// {label: '设备名称', prop: 'deviceName', width: 180, query: true, type: 'text', resizable: true, fixed: 'left'},
|
|
|
// {label: '产品key', prop: 'productKey', width: 180, query: true, type: 'text', resizable: true},
|
|
|
- {label: '状态', prop: 'state', width: 90,query: true, type: 'dict', conf: {dict: 'WashDevice.status'}, resizable: true},
|
|
|
+ {label: '状态', prop: 'state', width: 90, query: true, type: 'dict', conf: {dict: 'WashDevice.status'}, resizable: true},
|
|
|
// {label: '设备状态', prop: 'fsmState', width: 90, query: true, type: 'text', resizable: true},
|
|
|
{
|
|
|
label: '运行时长', prop: 'uptimeMs', width: 100, query: false, type: 'render', resizable: true,
|
|
|
render: (h: any, row: any) => {
|
|
|
return (
|
|
|
- h('div', null,u.fmt.fmtDuration(row))
|
|
|
+ h('div', null, u.fmt.fmtDuration(row))
|
|
|
)
|
|
|
}
|
|
|
},
|
|
|
@@ -135,6 +159,15 @@ const state = reactive({
|
|
|
handleRowClick('edit', row)
|
|
|
}
|
|
|
}, () => '编辑') : '',
|
|
|
+ proxy.$auth('washDevice.modify') ?
|
|
|
+ h(ElButton, {
|
|
|
+ type: 'primary',
|
|
|
+ text: true,
|
|
|
+ size: 'small',
|
|
|
+ onClick: () => {
|
|
|
+ // handleRowClick('edit', row)
|
|
|
+ }
|
|
|
+ }, () => '结算') : '',
|
|
|
proxy.$auth('washDevice.remove') ?
|
|
|
h(ElButton, {
|
|
|
type: 'danger',
|