From aead81c14ebf1e592d66293213b61c945dacf7c1 Mon Sep 17 00:00:00 2001
From: wujian <14790700720@163.com>
Date: 星期一, 22 一月 2024 16:45:08 +0800
Subject: [PATCH] add 作业指导

---
 jcdm-ui/src/views/main/cfkb/Instructions/index.vue                                                 |   42 +++++++++++++++++++--
 jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java |   35 +++++++++++++++--
 jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js                                               |    9 ++++
 3 files changed, 77 insertions(+), 9 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
index 8ff0157..ec79b6f 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -51,20 +51,45 @@
             formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement());
             formulaChildInfo.setImg(formulaChildInfo.getPicture());
         }
+
+        return getDataTable(list);
+    }
+
+    /**
+     * 鏌ヨ宸ヨ壓娴佺▼
+     * @param bsFormulaChildInfo query
+     * @return list
+     */
+    @PostMapping("/getProductProcess")
+    public TableDataInfo getProductProcess(@RequestBody BsFormulaChildInfo bsFormulaChildInfo)
+    {
+        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.selectBsFormulaChildInfoList(bsFormulaChildInfo);
+        for (BsFormulaChildInfo formulaChildInfo : list) {
+            formulaChildInfo.setSort(formulaChildInfo.getStepSort());
+            formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement());
+            formulaChildInfo.setImg(formulaChildInfo.getPicture());
+        }
         list = list.stream()
                 .filter(x -> !ZERO.equals(x.getSort())).sorted(Comparator.comparing(BsFormulaChildInfo::getSort)).collect(Collectors.toList());
         return getDataTable(list);
     }
 
     /**
-     * 鏌ヨ宸ヨ壓娴佺▼
-     * @param productProcessQuery query
+     * 鏌ヨ宸ヨ壓鏂囦欢
+     * @param bsFormulaChildInfo query
      * @return list
      */
-    @PostMapping("/getProductProcess")
-    public TableDataInfo getProductProcess(@RequestBody ProductProcessQuery productProcessQuery)
+    @PostMapping("/getMainProductProcess")
+    public TableDataInfo getMainProductProcess(@RequestBody BsFormulaChildInfo bsFormulaChildInfo)
     {
-        List<BsFormulaChildInfo> list = productProcessService.getProductProcess(productProcessQuery);
+        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.selectBsFormulaChildInfoList(bsFormulaChildInfo);
+        for (BsFormulaChildInfo formulaChildInfo : list) {
+            formulaChildInfo.setSort(formulaChildInfo.getStepSort());
+            formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement());
+            formulaChildInfo.setImg(formulaChildInfo.getPicture());
+        }
+        list = list.stream()
+                .filter(x -> ZERO.equals(x.getSort())).sorted(Comparator.comparing(BsFormulaChildInfo::getSort)).collect(Collectors.toList());
         return getDataTable(list);
     }
 
diff --git a/jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js b/jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js
index fade52c..aef47eb 100644
--- a/jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js
+++ b/jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js
@@ -18,6 +18,15 @@
   })
 }
 
+// 鏌ヨ宸ヨ壓鏂囦欢
+export function getMainProductProcess(query) {
+  return request({
+    url: '/bs/formulaChild/getMainProductProcess',
+    method: 'post',
+    data: query
+  })
+}
+
 // 鏌ヨ閰嶆柟閰嶇疆瀛愪俊鎭缁�
 export function getFormulaChild(id) {
   return request({
diff --git a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue
index 835ee13..8e5781f 100644
--- a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue
+++ b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue
@@ -69,17 +69,36 @@
 
       </el-col>
     </el-row>
+    <div>
+      <el-dialog
+        title="宸ヨ壓鏂囦欢"
+        :visible.sync="dialogVisible"
+        width="70%"
+        lock-scroll="false"
+        @close="closeMethod"
+
+      >
+        <div><el-image style="height: 1090px;width: 960px;margin-left: 33px" :src="mainProcessSrc"></el-image></div>
+        <span slot="footer" class="dialog-footer">
+    <el-button type="primary" @click="dialogVisible = false">纭� 瀹�</el-button>
+  </span>
+      </el-dialog>
+    </div>
   </div>
+
 </template>
 
 <script>
-import {listFormulaChild, getProductProcess} from "@/api/main/bs/formulaChild/formulaChild";
+import {getMainProductProcess, getProductProcess} from "@/api/main/bs/formulaChild/formulaChild";
 import {listStationConf,getIp} from "@/api/main/sc/stationConf";
 
 export default {
   name: "index",
   data() {
     return {
+      dialogVisible: false,
+      mainProcessSrc: '',
+      mainProcess: [],
       isClickd: '', // 鍒濆鍖栦负鏈偣鍑荤姸鎬�
       locationCode: "鏈厤缃�",
       locationName: "鏈厤缃伐浣�",
@@ -173,6 +192,9 @@
       });
 
     },
+    closeMethod(){
+      this.mainProcessSrc = ''
+    },
     //鑾峰彇褰撳墠鏃堕棿
     getNowTime () {
       let speed = 1000
@@ -242,7 +264,13 @@
       this.getUpOrDown(1)
     },
     processDocuments(){
-
+      getMainProductProcess(this.queryParams).then(res => {
+        this.mainProcess = res.rows
+        if (res.rows!=null && res.rows.length>0){
+          this.mainProcessSrc = res.rows[0].img
+        }
+      })
+      this.dialogVisible = true
     },
     changeProducts(val){
 
@@ -257,7 +285,7 @@
       /** 鏌ヨ閰嶆柟閰嶇疆瀛愪俊鎭垪琛� */
       this.queryParams.productCode = val;
       this.queryParams.processesCode = this.locationCode
-      listFormulaChild(this.queryParams).then(response => {
+      getProductProcess(this.queryParams).then(response => {
         this.tableData = [];
         this.cleanImg()
         this.tableData = response.rows;
@@ -340,6 +368,12 @@
 .active {
   background-color: #31b431; /* 鐐瑰嚮鍚庣殑鑳屾櫙鑹� */
 }
-
+::v-deep .el-dialog {
+  height: 90%;
+  overflow-y: auto;
+}
+::v-deep .el-dialog__footer{
+  margin-top: 10px;
+}
 
 </style>

--
Gitblit v1.9.3