32 changed files with 2611 additions and 2425 deletions
@ -1,7 +1,7 @@ |
|||
import * as THREE from 'three' |
|||
import BaseRenderer from '@/core/base/BaseRenderer.ts' |
|||
import Constract from '@/core/Constract.ts' |
|||
import Cl23dObject from "@/modules/cl2/Cl23dObject"; |
|||
import Cl23dObject from "./Cl23dObject"; |
|||
|
|||
/** |
|||
* ptr侧叉渲染器 |
|||
@ -1,7 +1,7 @@ |
|||
import * as THREE from 'three' |
|||
import BaseRenderer from '@/core/base/BaseRenderer.ts' |
|||
import Constract from '@/core/Constract.ts' |
|||
import Clx3dObject from "@/modules/clx/Clx3dObject"; |
|||
import Clx3dObject from "./Clx3dObject"; |
|||
|
|||
/** |
|||
* clx渲染器 |
|||
@ -1,12 +1,11 @@ |
|||
import { defineModule } from '@/core/manager/ModuleManager.ts' |
|||
import ClxRenderer from './ClxRenderer.ts' |
|||
import ClxInteraction from './ClxInteraction.ts' |
|||
import propertySetter from '@/modules/clx/ClxPropertySetter.ts' |
|||
import propertySetter from './ClxPropertySetter.ts' |
|||
|
|||
export const ITEM_TYPE_NAME = 'clx' |
|||
|
|||
export default defineModule(ITEM_TYPE_NAME, () => ({ |
|||
name: ITEM_TYPE_NAME, |
|||
renderer: new ClxRenderer(ITEM_TYPE_NAME), |
|||
interaction: new ClxInteraction(ITEM_TYPE_NAME), |
|||
setter: propertySetter |
|||
@ -1,12 +1,144 @@ |
|||
<script setup lang="ts"> |
|||
import { onMounted, reactive } from "vue"; |
|||
import { ElButton } from "element-plus"; |
|||
import { Search } from "@element-plus/icons-vue"; |
|||
import DataForm from "@/components/data-form/DataForm.vue"; |
|||
import type { FormField } from "@/components/data-form/DataFormTypes.ts"; |
|||
import { AgGridVue } from "ag-grid-vue3"; |
|||
import { type GridOptions } from "ag-grid-enterprise"; |
|||
import type { GridApi, GridReadyEvent } from "ag-grid-community"; |
|||
import { localeText as localeTextCn } from "@/components/yvTable/yv-aggrid-cn.locale"; |
|||
import { Request } from "@ease-forge/shared"; |
|||
import lodash from "lodash"; |
|||
|
|||
// 定义 Props 类型 |
|||
interface ComponentProps { |
|||
} |
|||
|
|||
// 读取组件 props 属性 |
|||
const props = withDefaults(defineProps<ComponentProps>(), {}); |
|||
|
|||
// 定义 State 类型 |
|||
interface ComponentState { |
|||
loading: boolean; |
|||
queryData: any; |
|||
grid1Data: Array<any>; |
|||
} |
|||
|
|||
// state 属性 |
|||
const state = reactive<ComponentState>({ |
|||
loading: false, |
|||
queryData: {}, |
|||
grid1Data: [], |
|||
}); |
|||
|
|||
// 定义 Data 类型 |
|||
interface ComponentData { |
|||
formFields?: Array<FormField>; |
|||
gridSetting: Partial<GridOptions>; |
|||
api?: GridApi; |
|||
} |
|||
|
|||
// 内部数据 |
|||
const data: ComponentData = { |
|||
formFields: [ |
|||
{ |
|||
dataPath: 'locCode', label: '货位编码', input: 'Input', |
|||
inputProps: { |
|||
placeholder: '货位编码', |
|||
clearable: true, |
|||
} |
|||
}, |
|||
], |
|||
gridSetting: { |
|||
localeText: localeTextCn, |
|||
// suppressNoRowsOverlay: true, |
|||
// suppressLoadingOverlay: true, |
|||
// 选择行配置 |
|||
rowSelection: "single", |
|||
columnDefs: [ |
|||
{ headerName: "环境ID", field: "envId" }, |
|||
{ headerName: "货位编码", field: "locCode" }, |
|||
{ headerName: "位置类型", field: "locType" }, |
|||
{ headerName: "路径点编码", field: "wayPoint" }, |
|||
{ headerName: "货位相对于路径方向", field: "locDirection" }, |
|||
{ headerName: "楼层数据", field: "catalogCode" }, |
|||
{ headerName: "位置编码", field: "rack" }, |
|||
{ headerName: "货架列", field: "bay" }, |
|||
{ headerName: "货架层", field: "level" }, |
|||
{ headerName: "货架格", field: "cell" }, |
|||
{ |
|||
headerName: "是否锁定", field: "isLock", |
|||
valueFormatter: params => lodash.toString(params.value) === "0" ? "否" : "是", |
|||
}, |
|||
{ |
|||
headerName: "是否冻结", field: "isFrozen", |
|||
valueFormatter: params => lodash.toString(params.value) === "0" ? "否" : "是", |
|||
}, |
|||
{ headerName: "创建时间", field: "createAt" }, |
|||
{ headerName: "创建人", field: "createBy" }, |
|||
{ headerName: "更新时间", field: "updateAt" }, |
|||
{ headerName: "更新人", field: "updateBy" }, |
|||
], |
|||
onGridReady(event: GridReadyEvent) { |
|||
data.api = event.api; |
|||
// data.api.setServerSideDatasource({ getRows: serverSideDatasource }); |
|||
}, |
|||
}, |
|||
}; |
|||
onMounted(reload); |
|||
|
|||
function reload() { |
|||
state.loading = true; |
|||
Request.request.get<Array<any>>( |
|||
"/api/workbench/DeviceManager@queryLocation", |
|||
{ |
|||
params: { |
|||
...state.queryData, |
|||
}, |
|||
}, |
|||
).then(data => { |
|||
state.grid1Data = data; |
|||
}).finally(() => state.loading = false); |
|||
} |
|||
</script> |
|||
|
|||
<template> |
|||
<div class="modeling-simulation"> |
|||
locations |
|||
</div> |
|||
<div class="dashboard flex-column-container"> |
|||
<div class="tools flex-item-fixed"> |
|||
<ElButton :icon="Search" :loading="state.loading" @click="reload">查询</ElButton> |
|||
</div> |
|||
<DataForm |
|||
class="query-form flex-item-fixed" |
|||
style="width: 500px;" |
|||
:data="state.queryData" |
|||
:formFields="data.formFields" |
|||
:columnCount="2" |
|||
layout="bothFixed" |
|||
labelWidth="85px" |
|||
inputWidth="200px" |
|||
/> |
|||
<AgGridVue |
|||
ref="gridRef" |
|||
:class="['ag-theme-alpine', 'yv-table', 'hi-light-selected-row','allow-vertical-line', 'flex-item-fill']" |
|||
v-bind="{...data.gridSetting}" |
|||
:modelValue="state.grid1Data" |
|||
> |
|||
</AgGridVue> |
|||
</div> |
|||
</template> |
|||
<script setup> |
|||
</script> |
|||
<style lang="less"> |
|||
.dashboard{ |
|||
|
|||
<style scoped> |
|||
.dashboard { |
|||
height: 100%; |
|||
} |
|||
|
|||
.tools { |
|||
margin-bottom: 8px; |
|||
} |
|||
|
|||
.query-form { |
|||
height: unset; |
|||
} |
|||
</style> |
|||
|
|||
|
|||
@ -1,12 +1,142 @@ |
|||
<script setup lang="ts"> |
|||
import { onMounted, reactive } from "vue"; |
|||
import { ElButton } from "element-plus"; |
|||
import { Search } from "@element-plus/icons-vue"; |
|||
import DataForm from "@/components/data-form/DataForm.vue"; |
|||
import type { FormField } from "@/components/data-form/DataFormTypes.ts"; |
|||
import { AgGridVue } from "ag-grid-vue3"; |
|||
import { type GridOptions } from "ag-grid-enterprise"; |
|||
import type { GridApi, GridReadyEvent } from "ag-grid-community"; |
|||
import { localeText as localeTextCn } from "@/components/yvTable/yv-aggrid-cn.locale"; |
|||
import { Request } from "@ease-forge/shared"; |
|||
import lodash from "lodash"; |
|||
|
|||
// 定义 Props 类型 |
|||
interface ComponentProps { |
|||
} |
|||
|
|||
// 读取组件 props 属性 |
|||
const props = withDefaults(defineProps<ComponentProps>(), {}); |
|||
|
|||
// 定义 State 类型 |
|||
interface ComponentState { |
|||
loading: boolean; |
|||
queryData: any; |
|||
grid1Data: Array<any>; |
|||
} |
|||
|
|||
// state 属性 |
|||
const state = reactive<ComponentState>({ |
|||
loading: false, |
|||
queryData: {}, |
|||
grid1Data: [], |
|||
}); |
|||
|
|||
// 定义 Data 类型 |
|||
interface ComponentData { |
|||
formFields?: Array<FormField>; |
|||
gridSetting: Partial<GridOptions>; |
|||
api?: GridApi; |
|||
} |
|||
|
|||
// 内部数据 |
|||
const data: ComponentData = { |
|||
formFields: [ |
|||
{ |
|||
dataPath: 'virtualFloorCode', label: '仿真车所在楼层', input: 'Input', |
|||
inputProps: { |
|||
placeholder: '仿真车所在楼层', |
|||
clearable: true, |
|||
} |
|||
}, |
|||
{ |
|||
dataPath: 'isActive', label: '是否激活', input: 'Checkbox', |
|||
inputProps: { |
|||
placeholder: '是否激活', |
|||
clearable: true, |
|||
} |
|||
}, |
|||
], |
|||
gridSetting: { |
|||
localeText: localeTextCn, |
|||
// suppressNoRowsOverlay: true, |
|||
// suppressLoadingOverlay: true, |
|||
// 选择行配置 |
|||
rowSelection: "single", |
|||
columnDefs: [ |
|||
{ headerName: "环境ID", field: "envId" }, |
|||
{ headerName: "执行器ID", field: "executorId" }, |
|||
{ headerName: "仿真车所在楼层", field: "virtualFloorCode" }, |
|||
{ headerName: "仿真车所在XYZ", field: "virtualLocationAt" }, |
|||
{ headerName: "仿真车配置详情", field: "virtualExecutorPayload" }, |
|||
{ |
|||
headerName: "是否激活", field: "isActive", |
|||
valueFormatter: params => lodash.toString(params.value) === "0" ? "否" : "是", |
|||
}, |
|||
{ headerName: "创建时间", field: "createAt" }, |
|||
{ headerName: "创建人", field: "createBy" }, |
|||
{ headerName: "更新时间", field: "updateAt" }, |
|||
{ headerName: "更新人", field: "updateBy" }, |
|||
], |
|||
onGridReady(event: GridReadyEvent) { |
|||
data.api = event.api; |
|||
// data.api.setServerSideDatasource({ getRows: serverSideDatasource }); |
|||
}, |
|||
}, |
|||
}; |
|||
onMounted(reload); |
|||
|
|||
function reload() { |
|||
state.loading = true; |
|||
Request.request.get<Array<any>>( |
|||
"/api/workbench/DeviceManager@queryExecutor", |
|||
{ |
|||
params: { |
|||
...state.queryData, |
|||
}, |
|||
}, |
|||
).then(data => { |
|||
state.grid1Data = data; |
|||
}).finally(() => state.loading = false); |
|||
} |
|||
</script> |
|||
|
|||
<template> |
|||
<div class="modeling-simulation"> |
|||
vehicles |
|||
</div> |
|||
<div class="dashboard flex-column-container"> |
|||
<div class="tools flex-item-fixed"> |
|||
<ElButton :icon="Search" :loading="state.loading" @click="reload">查询</ElButton> |
|||
</div> |
|||
<DataForm |
|||
class="query-form flex-item-fixed" |
|||
style="width: 500px;" |
|||
:data="state.queryData" |
|||
:formFields="data.formFields" |
|||
:columnCount="2" |
|||
layout="bothFixed" |
|||
labelWidth="120px" |
|||
inputWidth="200px" |
|||
/> |
|||
<AgGridVue |
|||
ref="gridRef" |
|||
:class="['ag-theme-alpine', 'yv-table', 'hi-light-selected-row','allow-vertical-line', 'flex-item-fill']" |
|||
v-bind="{...data.gridSetting}" |
|||
:modelValue="state.grid1Data" |
|||
> |
|||
</AgGridVue> |
|||
</div> |
|||
</template> |
|||
<script setup> |
|||
</script> |
|||
<style lang="less"> |
|||
.dashboard{ |
|||
|
|||
<style scoped> |
|||
.dashboard { |
|||
height: 100%; |
|||
} |
|||
|
|||
.tools { |
|||
margin-bottom: 8px; |
|||
} |
|||
|
|||
.query-form { |
|||
height: unset; |
|||
} |
|||
</style> |
|||
|
|||
|
|||
Loading…
Reference in new issue