|
@@ -1,41 +1,41 @@
|
|
|
<template>
|
|
|
- <div class="goodInfo layout-pd" v-loading="goods.loading">
|
|
|
+ <div class="goodInfo layout-pd" >
|
|
|
<el-row>
|
|
|
<!-- 基础信息 -->
|
|
|
<el-col :xs="24" >
|
|
|
<el-card shadow="hover" header="基础信息">
|
|
|
- <div class="basicInformation" >
|
|
|
+ <div class="basicInformation" v-loading="goods.loading">
|
|
|
<div class="basicInformation-left">
|
|
|
- <div v-for="(item, index) in goods.basicInformation" :key="index" class="item">
|
|
|
+ <div v-for="(item, index) in goods.basicInformation.basicInfo" :key="index" class="item">
|
|
|
<el-popover
|
|
|
placement="top-start"
|
|
|
- :title="item.title"
|
|
|
+ :title="item.goodsTitle"
|
|
|
:width="200"
|
|
|
trigger="hover"
|
|
|
- :content="item.value"
|
|
|
+ :content="item.goodsValue"
|
|
|
>
|
|
|
<template #reference>
|
|
|
- <span class="m-2">{{item.title}} : {{item.value}}</span>
|
|
|
+ <span class="m-2">{{item.goodsTitle}} : {{item.goodsValue}}</span>
|
|
|
</template>
|
|
|
</el-popover>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="basicInformation-right">
|
|
|
- <div @click="showBigPic(goods.imageurl)">
|
|
|
+ <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.imageurl" />
|
|
|
+ :src="goods.basicInformation.goodsImg.imgUrl" />
|
|
|
</div>
|
|
|
- <div class="text">312312</div>
|
|
|
+ <div class="text">{{goods.basicInformation.goodsImg.title}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
|
|
|
<!-- 生产日志 -->
|
|
|
- <el-col :xs="24">
|
|
|
+ <el-col :xs="24" >
|
|
|
<el-card shadow="hover" header="生产日志">
|
|
|
<div class="productionLog">
|
|
|
<el-table v-loading="goods.loading" :data="goods.productionLog" row-key="id" style="width: 100%">
|
|
@@ -45,7 +45,7 @@
|
|
|
<el-table-column prop="state" label="状态" />
|
|
|
<el-table-column prop="productionPictures" label="生产图片">
|
|
|
<template #default="{ row }">
|
|
|
- <el-link @click="showPic(row.productionPictures)" :underline="false">点击查看</el-link>
|
|
|
+ <el-link @click="showBigPic(row.productionPictures)" :underline="false">点击查看</el-link>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="remarks" label="备注" />
|
|
@@ -55,7 +55,7 @@
|
|
|
</el-col>
|
|
|
|
|
|
<!-- 报警日志 -->
|
|
|
- <el-col :span="24">
|
|
|
+ <el-col :span="24" >
|
|
|
<el-card shadow="hover" header="报警日志">
|
|
|
<div class="alarmLog">
|
|
|
<el-table v-loading="goods.loading" :data="goods.alarmLog" row-key="id" style="width: 100%">
|
|
@@ -81,16 +81,17 @@
|
|
|
|
|
|
<script setup lang="ts" name="goodInfo">
|
|
|
import {onMounted, reactive} from "vue";
|
|
|
-import {adminProductGoodsInfoDto} from "/@/api/admin/data-contracts";
|
|
|
+import {adminProductGoodsInfoDto} from "/@/api/admin/productionManagement/ComponentDetailsDto";
|
|
|
+import {ComponentDetails} from "/@/api/admin/productionManagement/ComponentDetails";
|
|
|
|
|
|
//组件的页面对象
|
|
|
const goods:adminProductGoodsInfoDto = reactive({
|
|
|
/**显示加载效果 */
|
|
|
loading: false,
|
|
|
/**图片是否方法显示 */
|
|
|
- showBig:false,
|
|
|
+ showBig: false,
|
|
|
/**放大图片的url */
|
|
|
- imageUrl:"https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg",
|
|
|
+ imageUrl:"",
|
|
|
/**基础信息 */
|
|
|
basicInformation: {},
|
|
|
/**生产日志 */
|
|
@@ -99,20 +100,34 @@ const goods:adminProductGoodsInfoDto = reactive({
|
|
|
alarmLog: [],
|
|
|
})
|
|
|
|
|
|
-
|
|
|
-//点击查看详细
|
|
|
-const showPic = (val: string) => {
|
|
|
- showBigPic(val)
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
//查看大图
|
|
|
-const showBigPic = (val : string) => {
|
|
|
+const showBigPic = (val : string | null) => {
|
|
|
// eslint-disable-next-line no-console
|
|
|
console.log(val)
|
|
|
+ goods.imageUrl = val
|
|
|
+ goods.showBig = true
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 初始化数据
|
|
|
+ */
|
|
|
+const init = async () =>{
|
|
|
+ goods.loading = true
|
|
|
+ const basicInformation = await new ComponentDetails().getBasicInfo("1")
|
|
|
+ const productionLog = await new ComponentDetails().getProductionLog("1")
|
|
|
+ const alarmLog = await new ComponentDetails().getAlarmLog("1")
|
|
|
+ goods.basicInformation = basicInformation
|
|
|
+ goods.productionLog = productionLog
|
|
|
+ goods.alarmLog = alarmLog
|
|
|
+ goods.loading = false
|
|
|
+ console.log(goods.basicInformation)
|
|
|
+ console.log(goods.productionLog)
|
|
|
+ console.log(goods.alarmLog)
|
|
|
+ goods.loading = false
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
+ init()
|
|
|
})
|
|
|
|
|
|
</script>
|