feat: 提升机管理、厂商负载走redis
This commit is contained in:
parent
307bbda253
commit
49f77d9b06
|
|
@ -1,36 +1,11 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
export interface MachineTaskChainVO {
|
|
||||||
id?: number
|
|
||||||
code: string
|
|
||||||
warehouse?: string
|
|
||||||
firstTaskVendor?: string
|
|
||||||
status?: string
|
|
||||||
type?: string
|
|
||||||
businessNo?: string
|
|
||||||
description?: string
|
|
||||||
sourceLocation?: string
|
|
||||||
sourcePoint?: string
|
|
||||||
sourceContainer?: string
|
|
||||||
targetType?: string
|
|
||||||
targetCode?: string
|
|
||||||
targetLocation?: string
|
|
||||||
targetPoint?: string
|
|
||||||
elevatorId?: number
|
|
||||||
priority?: number
|
|
||||||
executionTime?: number
|
|
||||||
completeTime?: string
|
|
||||||
cancelReason?: string
|
|
||||||
cancelTime?: string
|
|
||||||
createTime?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VendorLoadVO {
|
export interface VendorLoadVO {
|
||||||
vendor: string
|
vendor: string
|
||||||
vendorName: string
|
vendorName: string
|
||||||
maxConcurrent: number
|
maxConcurrent: number
|
||||||
currentLoad: number
|
currentLoad: number
|
||||||
chains: MachineTaskChainVO[]
|
chainCodes: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getVendorLoad() {
|
export function getVendorLoad() {
|
||||||
|
|
|
||||||
|
|
@ -27,17 +27,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div class="chain-list">
|
<div class="chain-list">
|
||||||
<div v-if="vendor.chains && vendor.chains.length > 0" class="chain-items">
|
<div v-if="vendor.chainCodes && vendor.chainCodes.length > 0" class="chain-items">
|
||||||
<div
|
<div
|
||||||
v-for="chain in vendor.chains"
|
v-for="code in vendor.chainCodes"
|
||||||
:key="chain.code"
|
:key="code"
|
||||||
class="chain-item"
|
class="chain-item"
|
||||||
@click="chain.code && goChainDetail(chain.code)"
|
@click="goChainDetail(code)"
|
||||||
>
|
>
|
||||||
<span class="chain-code">{{ chain.code }}</span>
|
<span class="chain-code">{{ code }}</span>
|
||||||
<el-tag v-bind="getChainStatusTag(chain.status || '')" size="small">
|
<el-tag type="info" size="small">执行中</el-tag>
|
||||||
{{ chainStatusMap[chain.status || ''] || chain.status }}
|
|
||||||
</el-tag>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-empty v-else description="暂无执行中任务链" :image-size="60" />
|
<el-empty v-else description="暂无执行中任务链" :image-size="60" />
|
||||||
|
|
@ -73,17 +71,15 @@
|
||||||
|
|
||||||
<div class="m-chain-list">
|
<div class="m-chain-list">
|
||||||
<div
|
<div
|
||||||
v-for="chain in (vendor.chains || [])"
|
v-for="code in (vendor.chainCodes || [])"
|
||||||
:key="chain.code"
|
:key="code"
|
||||||
class="m-chain-item"
|
class="m-chain-item"
|
||||||
@click="chain.code && goChainDetail(chain.code)"
|
@click="goChainDetail(code)"
|
||||||
>
|
>
|
||||||
<span class="m-chain-code">{{ chain.code }}</span>
|
<span class="m-chain-code">{{ code }}</span>
|
||||||
<el-tag v-bind="getChainStatusTag(chain.status || '')" size="small">
|
<el-tag type="info" size="small">执行中</el-tag>
|
||||||
{{ chainStatusMap[chain.status || ''] || chain.status }}
|
|
||||||
</el-tag>
|
|
||||||
</div>
|
</div>
|
||||||
<el-empty v-if="!vendor.chains?.length" description="暂无执行中任务链" :image-size="48" />
|
<el-empty v-if="!vendor.chainCodes?.length" description="暂无执行中任务链" :image-size="48" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -95,7 +91,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
defineOptions({ name: 'VendorLoadView' })
|
defineOptions({ name: 'VendorLoadView' })
|
||||||
import { getVendorLoad, type VendorLoadVO } from '@/api/vendorLoad'
|
import { getVendorLoad, type VendorLoadVO } from '@/api/vendorLoad'
|
||||||
import { chainStatusMap, getChainStatusTag } from '@/constants/chainStatus'
|
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDevice } from '@/composables/useDevice'
|
import { useDevice } from '@/composables/useDevice'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue