|
@@ -7,37 +7,171 @@
|
|
|
<el-card shadow="hover" header="基础信息">
|
|
|
<div class="basicInformation" v-loading="goods.loadingBasic">
|
|
|
<div class="basicInformation-left">
|
|
|
- <div v-for="(item, index) in goods.basicInformation.basicInfo" :key="index" class="item">
|
|
|
+ <div class="item">
|
|
|
<el-popover
|
|
|
placement="top-start"
|
|
|
- :title="item.goodsTitle"
|
|
|
:width="200"
|
|
|
+ title="物料名称"
|
|
|
trigger="hover"
|
|
|
- :content="item.goodsValue"
|
|
|
+ :content="goods.basicInformation.bomName"
|
|
|
>
|
|
|
<template #reference>
|
|
|
- <span class="m-2">{{item.goodsTitle}} : {{item.goodsValue}}</span>
|
|
|
+ <span class="m-2"> 物料名称: {{goods.basicInformation.bomName}}</span>
|
|
|
</template>
|
|
|
</el-popover>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="basicInformation-right" v-if="goods.basicInformation.goodsImg">
|
|
|
- <div @click="showBigPic(goods.basicInformation.goodsImg.imgUrl)">
|
|
|
- <el-image loading="lazy"
|
|
|
- alt="fgg"
|
|
|
- class="img"
|
|
|
- fit="fill"
|
|
|
- :src="goods.basicInformation.goodsImg.imgUrl" />
|
|
|
+ <div class="item">
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ title="物料号"
|
|
|
+ trigger="hover"
|
|
|
+ :content="goods.basicInformation.bomNo"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <span class="m-2"> 物料号: {{goods.basicInformation.bomNo}}</span>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ title="CPUID"
|
|
|
+ trigger="hover"
|
|
|
+ :content="goods.basicInformation.cpuId"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <span class="m-2"> CPUID: {{goods.basicInformation.cpuId}}</span>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ title="软件版本"
|
|
|
+ trigger="hover"
|
|
|
+ :content="goods.basicInformation.software_v"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <span class="m-2"> 软件版本: {{goods.basicInformation.software_v}}</span>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ title="状态"
|
|
|
+ trigger="hover"
|
|
|
+ :content="goods.basicInformation.status"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <span class="m-2"> 状态: {{goods.basicInformation.status}}</span>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ title="密钥状态"
|
|
|
+ trigger="hover"
|
|
|
+ :content="goods.basicInformation.key_name"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <span class="m-2"> 密钥状态: {{goods.basicInformation.key_name}}</span>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ title="团标状态"
|
|
|
+ trigger="hover"
|
|
|
+ :content="goods.basicInformation.stand_name"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <span class="m-2"> 团标状态: {{goods.basicInformation.stand_name}}</span>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ title="创建时间"
|
|
|
+ trigger="hover"
|
|
|
+ :content="goods.basicInformation.createTime"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <span class="m-2"> 创建时间: {{goods.basicInformation.createTime}}</span>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ trigger="hover"
|
|
|
+ title="备注"
|
|
|
+ :content="goods.basicInformation.remark"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <span class="m-2"> 备注: {{goods.basicInformation.remark}}</span>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ title="检测时间"
|
|
|
+ trigger="hover"
|
|
|
+ :content="goods.basicInformation.detectionTime"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <span class="m-2"> 检测时间: {{goods.basicInformation.detectionTime}}</span>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ :width="200"
|
|
|
+ title="检测员"
|
|
|
+ trigger="hover"
|
|
|
+ :content="goods.basicInformation.detectionEmployee"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <span class="m-2"> 检测员: {{goods.basicInformation.detectionEmployee}}</span>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
</div>
|
|
|
- <div class="text">{{goods.basicInformation.goodsImg.title}}</div>
|
|
|
</div>
|
|
|
+ <div class="basicInformation-right" >
|
|
|
+ <div @click="showBigPic(goods.basicInformation.img)" v-if="goods.basicInformation.img">
|
|
|
+ <el-image loading="lazy"
|
|
|
+ alt="fgg"
|
|
|
+ class="img"
|
|
|
+ fit="fill"
|
|
|
+ :src="goods.basicInformation.img" />
|
|
|
+ </div>
|
|
|
+ <div @click="showBigPic(goods.basicInformation.img)" v-else>
|
|
|
+ <div >
|
|
|
+ 暂无图片
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
|
|
|
<!-- 生产日志 -->
|
|
|
<el-col :xs="24" >
|
|
|
- <el-card style="height: 70vh" class="my-fill mt8" shadow="hover" header="生产日志">
|
|
|
+ <el-card style="height: 35vh" class="my-fill mt8" shadow="hover" header="生产日志">
|
|
|
<el-table v-loading="goods.loadingProduct" :data="goods.productionLog.tableData" row-key="id" style="width: 100%">
|
|
|
<el-table-column v-for="column in goods.productionLog.dynamicColumns" :key="column.prop" :prop="column.prop" :label="column.label" />
|
|
|
</el-table>
|
|
@@ -46,7 +180,7 @@
|
|
|
v-model:currentPage="goods.productionLog.pageInput.CurrentPage"
|
|
|
v-model:page-size="goods.productionLog.pageInput.PageSize"
|
|
|
:total="goods.productionLog.total"
|
|
|
- :page-sizes="[10, 20, 50, 100]"
|
|
|
+ :page-sizes="[5, 10, 20, 50, 100]"
|
|
|
small
|
|
|
background
|
|
|
@size-change="onProductionLogSizeChange"
|
|
@@ -59,7 +193,7 @@
|
|
|
|
|
|
<!-- 报警日志 -->
|
|
|
<el-col :span="24" >
|
|
|
- <el-card style="height: 70vh" class="my-fill mt8" shadow="hover" header="报警日志">
|
|
|
+ <el-card style="height: 35vh" class="my-fill mt8" shadow="hover" header="报警日志">
|
|
|
<el-table v-loading="goods.loadingAlarm" :data="goods.alarmLog.tableData" row-key="id" style="width: 100%">
|
|
|
<el-table-column v-for="column in goods.alarmLog.dynamicColumns" :key="column.prop" :prop="column.prop" :label="column.label" />
|
|
|
</el-table>
|
|
@@ -68,7 +202,7 @@
|
|
|
v-model:currentPage="goods.alarmLog.pageInput.CurrentPage"
|
|
|
v-model:page-size="goods.alarmLog.pageInput.PageSize"
|
|
|
:total="goods.alarmLog.total"
|
|
|
- :page-sizes="[10, 20, 50, 100]"
|
|
|
+ :page-sizes="[5, 10, 20, 50, 100]"
|
|
|
small
|
|
|
background
|
|
|
@size-change="onAlarmLogSizeChange"
|
|
@@ -100,13 +234,15 @@ import type {
|
|
|
goodsInformationBasic,
|
|
|
productionLog
|
|
|
} from "/@/api/admin/productionManagement/ComponentDetailsDto";
|
|
|
-import {adminProductGoodsInfoDto} from "/@/api/admin/productionManagement/ComponentDetailsDto";
|
|
|
+import {adminProductGoodsInfoDto, filterData} from "/@/api/admin/productionManagement/ComponentDetailsDto";
|
|
|
import type {columnsProps, pageInput} from "/@/api/admin/shareDto/shareDto";
|
|
|
|
|
|
//组件的页面对象
|
|
|
const goods = reactive({
|
|
|
/**部件id */
|
|
|
id:"",
|
|
|
+ /**页面请求参数*/
|
|
|
+ data:{} as filterData,
|
|
|
/**显示加载效果 */
|
|
|
loadingBasic: false,
|
|
|
loadingProduct: false,
|
|
@@ -117,6 +253,7 @@ const goods = reactive({
|
|
|
imageUrl: "",
|
|
|
/**基础信息 */
|
|
|
basicInformation: {} as goodsInformationBasic,
|
|
|
+
|
|
|
/**生产日志 */
|
|
|
productionLog: {
|
|
|
/**表格数据 */
|
|
@@ -126,7 +263,7 @@ const goods = reactive({
|
|
|
/**页面分页 */
|
|
|
pageInput: {
|
|
|
currentPage: 1,
|
|
|
- pageSize: 20
|
|
|
+ pageSize: 5
|
|
|
} as pageInput,
|
|
|
/**总数 */
|
|
|
total: 0
|
|
@@ -140,7 +277,7 @@ const goods = reactive({
|
|
|
/**页面分页 */
|
|
|
pageInput: {
|
|
|
CurrentPage: 1,
|
|
|
- PageSize: 20
|
|
|
+ PageSize: 5
|
|
|
} as pageInput,
|
|
|
/**总数 */
|
|
|
total: 0
|
|
@@ -185,9 +322,11 @@ const onAlarmLogCurrentChange = (val) => {
|
|
|
*/
|
|
|
const initBasicInformation = async () => {
|
|
|
goods.loadingBasic = true
|
|
|
- goods.basicInformation = await new ComponentDetails().getBasicInfo(goods.id)
|
|
|
+ const res = await new ComponentDetails().getBasicInfo({filter:goods.data}).catch(() => {
|
|
|
+ goods.loadingBasic = false
|
|
|
+ })
|
|
|
+ goods.basicInformation = res?.data?.list[0]
|
|
|
goods.loadingBasic = false
|
|
|
- // console.log(goods.basicInformation)
|
|
|
}
|
|
|
|
|
|
const initProductionLog = async () => {
|
|
@@ -208,6 +347,7 @@ const initAlarmLog = async () => {
|
|
|
|
|
|
onMounted(() => {
|
|
|
goods.id = <string>router.currentRoute.value.params.id
|
|
|
+ goods.data = { ...router.currentRoute.value.query as filterData}
|
|
|
/**初始化 */
|
|
|
initBasicInformation()
|
|
|
initProductionLog()
|
|
@@ -217,7 +357,7 @@ onMounted(() => {
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
|
.goodInfo{
|
|
|
- font-weight: 600;
|
|
|
+ font-weight: 500;
|
|
|
.el-card{
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
@@ -234,14 +374,13 @@ onMounted(() => {
|
|
|
display: -webkit-flex; /* Safari */
|
|
|
justify-content: space-around;
|
|
|
flex-wrap: wrap;
|
|
|
- padding: 12px;
|
|
|
height: 100%;
|
|
|
max-width: 65%;
|
|
|
min-width: 300px;
|
|
|
.item{
|
|
|
cursor: pointer;
|
|
|
width: 240px;/*设置显示的最大宽度*/
|
|
|
- height: 50px;
|
|
|
+ height:40px;
|
|
|
overflow:hidden;/*超出部分隐藏*/
|
|
|
white-space:nowrap;/*强制单行显示*/
|
|
|
text-overflow: ellipsis;
|
|
@@ -251,9 +390,9 @@ onMounted(() => {
|
|
|
.basicInformation-right{
|
|
|
width: 50%;
|
|
|
height: 100%;
|
|
|
- max-width: 400px;
|
|
|
- min-width: 300px;
|
|
|
- margin: 20px 10px;
|
|
|
+ max-width: 300px;
|
|
|
+ min-width: 200px;
|
|
|
+ padding: 0 10px;
|
|
|
.img {
|
|
|
cursor: pointer;
|
|
|
box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 8px;
|
|
@@ -261,13 +400,14 @@ onMounted(() => {
|
|
|
.img:hover {
|
|
|
box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
|
|
|
}
|
|
|
- .text {
|
|
|
- height: 50px;
|
|
|
- display: flex;
|
|
|
- display: -webkit-flex; /* Safari */
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- font-size: 1.4rem;
|
|
|
+ div{
|
|
|
+ width: 300px;
|
|
|
+ height: 200px;
|
|
|
+ cursor: pointer;
|
|
|
+ box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 8px;
|
|
|
+ }
|
|
|
+ div:hover{
|
|
|
+ ox-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
|
|
|
}
|
|
|
}
|
|
|
}
|