Commit b52929e9 by qinjianhui

feat: 操作单操作日志

parent 7dd60816
......@@ -32,9 +32,12 @@ defineProps({
.log-list {
height: 500px;
overflow: auto;
font-size: 14px;
}
.log-item {
line-height: 26px;
white-space: pre-wrap;
word-break: break-all;
}
.log-item div:not(:last-child) {
margin-right: 6px;
......
......@@ -95,7 +95,11 @@
>
{{ item.customizedQuantity === 1 ? '单' : '多' }}
</div>
<Icon name="caozuorizhi" style="width: 28px; height: 28px">
<Icon
name="caozuorizhi"
style="width: 28px; height: 28px"
@click.stop="openLogDialog(item)"
>
<template #title>
<title>操作日志</title>
</template>
......@@ -211,16 +215,27 @@
@current-change="onCurrentPageChange"
/>
</div>
<el-dialog
v-model="logVisible"
title="操作日志"
width="1000px"
:close-on-click-modal="false"
>
<LogList :log-list="logList" />
<div v-if="!logList.length" class="empty-content">暂无数据</div>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ElMessage } from 'element-plus'
import { getCardLayoutListApi } from '@/api/factoryOrderNew'
import { getCardLayoutListApi, getFactoryOrderNewLogApi } from '@/api/factoryOrderNew'
import type { PaginationData } from '@/types/api'
import usePageList from '@/utils/hooks/usePageList'
import { operateOrderListData } from '@/types/api/factoryOrderNew'
import type { LogListData } from '@/types/api/order'
import LogList from '@/components/LogList.vue'
import platformJson from '../../../../json/platform.json'
const props = defineProps<{
......@@ -255,6 +270,8 @@ const {
})
const selectedItems = ref<operateOrderListData[]>([])
const logVisible = ref(false)
const logList = ref<LogListData[]>([])
const isSelected = (item: operateOrderListData) =>
selectedItems.value.some((s) => s.id === item.id)
......@@ -274,6 +291,17 @@ const copyText = (text: string) => {
ElMessage.success('复制成功')
}
const openLogDialog = async (item: operateOrderListData) => {
if (!item.podOrderId) return
try {
const res = await getFactoryOrderNewLogApi(item.podOrderId as number)
logList.value = (res.data || []) as unknown as LogListData[]
logVisible.value = true
} catch (e) {
// ignore
}
}
const clearSelection = () => {
selectedItems.value = []
emit('selection-change', [])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment