Browse Source

fix(部件详情页面): 修改部件详情页传参格式

重新修改部件详情页的传参方式,传递GUID进行查询,成功对接后端接口,该页面中生产日志列表和报警日志列表还未对接
wyoujia 1 year ago
parent
commit
6ee1180e01

+ 4 - 3
admin.ui.plus-master/src/api/admin/productionManagement/ComponentDetails.ts

@@ -1,4 +1,4 @@
-import {ContentType, HttpClient} from "/@/api/admin/http-client";
+import {ContentType, HttpClient, RequestParams} from "/@/api/admin/http-client";
 import {pageInput} from "/@/api/admin/shareDto/shareDto";
 import {filterData} from "/@/api/admin/productionManagement/ComponentDetailsDto";
 import {AxiosResponse} from "axios";
@@ -15,14 +15,15 @@ export class ComponentDetails<SecurityDataType = unknown> extends HttpClient<Sec
   */
 
   timer = 500
-  getBasicInfo = (data:filterData) : any  =>
+  getBasicInfo = (query:any ,params: RequestParams = {}) : any  =>
     this.request<AxiosResponse,any>({
       path:'/api/app/compoent/get-part-details',
       method: 'POST',
-      body: data,
       secure: true,
       type: ContentType.Json,
       format: 'json',
+      query:query,
+      ...params
     })
   /**
   * No description

+ 1 - 1
admin.ui.plus-master/src/api/admin/productionManagement/ComponentDetailsDto.ts

@@ -142,7 +142,7 @@ export interface alarmLog {
  */
 export interface adminProductGoodsInfoDto {
   /**部件id */
-  id:string | null,
+  id:string | null | any,
   data: filterData | null,
   /**显示加载效果 */
   loadingBasic: boolean,

+ 15 - 9
admin.ui.plus-master/src/views/admin/product/goodInfo.vue

@@ -150,6 +150,8 @@
                   </template>
                 </el-popover>
               </div>
+              <div class="item">
+              </div>
             </div>
             <div class="basicInformation-right" >
                 <div @click="showBigPic(goods.basicInformation.img)" v-if="goods.basicInformation.img">
@@ -180,7 +182,7 @@
               v-model:currentPage="goods.productionLog.pageInput.CurrentPage"
               v-model:page-size="goods.productionLog.pageInput.PageSize"
               :total="goods.productionLog.total"
-              :page-sizes="[5, 10, 20, 50, 100]"
+              :page-sizes="[ 10, 20, 50, 100]"
               small
               background
               @size-change="onProductionLogSizeChange"
@@ -202,7 +204,7 @@
               v-model:currentPage="goods.alarmLog.pageInput.CurrentPage"
               v-model:page-size="goods.alarmLog.pageInput.PageSize"
               :total="goods.alarmLog.total"
-              :page-sizes="[5, 10, 20, 50, 100]"
+              :page-sizes="[ 10, 20, 50, 100]"
               small
               background
               @size-change="onAlarmLogSizeChange"
@@ -263,7 +265,7 @@ const goods = reactive({
     /**页面分页 */
     pageInput: {
       currentPage: 1,
-      pageSize: 5
+      pageSize: 10
     } as pageInput,
     /**总数 */
     total: 0
@@ -277,7 +279,7 @@ const goods = reactive({
     /**页面分页 */
     pageInput: {
       CurrentPage: 1,
-      PageSize: 5
+      PageSize: 10
     } as pageInput,
     /**总数 */
     total: 0
@@ -322,10 +324,10 @@ const onAlarmLogCurrentChange = (val) => {
  */
 const initBasicInformation =  async () => {
   goods.loadingBasic = true
-  const res = await new ComponentDetails().getBasicInfo({filter:goods.data}).catch(() => {
+  const res = await new ComponentDetails().getBasicInfo({GUID:goods.id} ).catch(() => {
     goods.loadingBasic = false
   })
-  goods.basicInformation = res?.data?.list[0]
+  goods.basicInformation = res?.data
   goods.loadingBasic = false
 }
 
@@ -346,7 +348,7 @@ const initAlarmLog = async () => {
 
 
 onMounted(() => {
-  goods.data = { ...router.currentRoute.value.params as filterData}
+  goods.id = router.currentRoute.value.params.guid
   /**初始化 */
   initBasicInformation()
   initProductionLog()
@@ -383,6 +385,8 @@ onMounted(() => {
         overflow:hidden;/*超出部分隐藏*/
         white-space:nowrap;/*强制单行显示*/
         text-overflow: ellipsis;
+        display: flex;
+        align-items: center;
       }
 
     }
@@ -393,6 +397,8 @@ onMounted(() => {
       min-width: 200px;
       padding: 0 10px;
       .img {
+        width: 220px;
+        height: 140px;
         cursor: pointer;
         box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 8px;
       }
@@ -400,8 +406,8 @@ onMounted(() => {
         box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
       }
       div{
-        width: 300px;
-        height: 200px;
+        width: 220px;
+        height: 140px;
         cursor: pointer;
         box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 8px;
       }

+ 1 - 1
admin.ui.plus-master/src/views/admin/product/index.vue

@@ -288,7 +288,7 @@ const onUpload = () => {
 }
 
 const toPage = (row) => {
-  router.push({path:`/product/${row.bomProNo}/${row.bomNo}`})
+  router.push({path:`/product/${row.guid}`})
 }
 
 //const onDelete = (row: FileGetPageOutput) => {