From 3c15e684416e06a7351eeb2d756e5be778a893fd Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期三, 17 七月 2024 10:37:23 +0800
Subject: [PATCH] 修改

---
 web/src/views/modules/basicInfo/ProductModelTree.vue                                                                |    6 ++
 web/src/views/modules/basicInfo/XhProductModel.vue                                                                  |   10 -----
 modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml                                          |    2 
 web/src/views/modules/baseReliability/ParamDataBasic.vue                                                            |    3 -
 web/src/views/modules/basicInfo/ParamData.vue                                                                       |    2 
 modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml                                 |    1 
 web/src/views/modules/taskReliability/OperatConditModel.vue                                                         |    1 
 web/src/views/modules/taskReliability/RBD-edit-img.vue                                                              |   33 ++++++++--------
 web/src/views/modules/taskReliability/ModelRbd.vue                                                                  |    2 
 web/src/views/modules/taskReliability/TaskBinoParam.vue                                                             |   10 ++--
 modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java      |   12 +++---
 modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/TaskBinoParamController.java |    6 +--
 web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue                                                      |    5 ++
 13 files changed, 45 insertions(+), 48 deletions(-)

diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
index f2df87c..1d709b7 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
@@ -63,8 +63,8 @@
     }
 
     @GetMapping("tree")
-    public Result<List<XhProductModel>> getTreeList(Boolean showXdy,Integer ztShow) {
-        List<XhProductModel> list = xhProductModelService.getAllTree(showXdy,ztShow);
+    public Result<List<XhProductModel>> getTreeList(Boolean showXdy, Integer ztShow) {
+        List<XhProductModel> list = xhProductModelService.getAllTree(showXdy, ztShow);
 
         return Result.ok(list);
     }
@@ -100,10 +100,10 @@
     @PostMapping("importProductExcel")
     @ApiOperation("瀵煎叆浜у搧妯″瀷")
     @LogOperation("瀵煎叆浜у搧妯″瀷")
-    public Result importProductExcel(MultipartFile file, String progressId,Long pid) {
+    public Result importProductExcel(MultipartFile file, String progressId, Long pid) {
         Result<List<ImportErrDto>> result = Result.ok();
         try {
-            List<Map<String, Object>> importResults = xhProductModelService.importProductExcel(file,progressId,pid);
+            List<Map<String, Object>> importResults = xhProductModelService.importProductExcel(file, progressId, pid);
             StringBuilder str = new StringBuilder();
             ImportUtil.importResult(result, importResults, str);
             ImportUtil.ImportErrResult(result, importResults, str);
@@ -122,8 +122,8 @@
         //鏁堥獙鏁版嵁
         ValidatorUtils.validateEntity(xhProductModel, AddGroup.class, DefaultGroup.class);
 
-        Integer no = xhProductModelService.getNo(xhProductModel.getPid(),xhProductModel.getProductType());
-        if (xhProductModel.getSort() < no) {
+        Integer no = xhProductModelService.getNo(xhProductModel.getPid(), xhProductModel.getProductType());
+        if (xhProductModel.getSort() == null || xhProductModel.getSort() < no) {
             xhProductModel.setSort(no + 1);
         }
         xhProductModelService.insert(xhProductModel);
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/TaskBinoParamController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/TaskBinoParamController.java
index 57cec2c..d3b1ee2 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/TaskBinoParamController.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/TaskBinoParamController.java
@@ -43,15 +43,13 @@
     @GetMapping("page")
     @ApiOperation("鍒嗛〉")
     @ApiImplicitParams({
-        @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
-        @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
         @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
         @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
         @ApiImplicitParam(name = "taskId", value = "浠诲姟Id", dataType = Constant.QT.STRING),
     })
-    public PageResult<TaskBinoParam> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
+    public Result<List<TaskBinoParam>> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
 
-        return PageResult.ok(taskBinoParamService.page(queryFilter));
+        return Result.ok(taskBinoParamService.page(queryFilter));
     }
 
     @GetMapping("{id}")
diff --git a/modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml b/modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml
index 828ae0b..a8ab5de 100644
--- a/modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml
@@ -20,7 +20,7 @@
                           AND is_delete = 0
                     )
             )
-        and ((node_type = 1) or (node_type &lt;&gt; 1 and id not in (select src_id from product_model where pid =
+        and ((node_type &gt; ${nodeType}) or ( id not in (select src_id from product_model where pid =
         ${pid} and is_delete=0)))
         ORDER BY
             node_type,sort
diff --git a/modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml b/modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml
index e2c4543..900b8cb 100644
--- a/modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml
@@ -39,6 +39,7 @@
         )
           and a.product_type in (4, 3, 2, 10)
           AND a.is_delete = 0
+        ORDER BY a.product_type, a.sort
     </select>
     <select id="getModelList" resultType="com.zt.life.modules.mainPart.taskReliability.model.ModelRbd">
         select *
diff --git a/web/src/views/modules/baseReliability/ParamDataBasic.vue b/web/src/views/modules/baseReliability/ParamDataBasic.vue
index 36aa965..d95e480 100644
--- a/web/src/views/modules/baseReliability/ParamDataBasic.vue
+++ b/web/src/views/modules/baseReliability/ParamDataBasic.vue
@@ -4,7 +4,7 @@
       <el-col :span="5">
         <div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)">
           <product-model-tree ref="modelTree" @on-selected="onProductSelected" @on-default="onDefault" showXdy="false"
-                              basic="3"/>
+                              basic="3" :isShow="false"/>
         </div>
       </el-col>
       <el-col :span="19">
@@ -99,7 +99,6 @@
         })
       },
       setDefultKey() {
-        console.log(this.$refs.tableObj.dataList[0].id,'this.$refs.tableObj.dataList[0].id')
         this.defultKey.push(this.dataForm.shipId + "")
       },
       onDefault(defaultId) {
diff --git a/web/src/views/modules/basicInfo/ParamData.vue b/web/src/views/modules/basicInfo/ParamData.vue
index 78efdca..786a7ba 100644
--- a/web/src/views/modules/basicInfo/ParamData.vue
+++ b/web/src/views/modules/basicInfo/ParamData.vue
@@ -3,7 +3,7 @@
     <el-row :gutter="5">
       <el-col :span="5">
         <div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)">
-          <product-model-tree @on-selected="onProductSelected" showXdy="false"/>
+          <product-model-tree @on-selected="onProductSelected" showXdy="false" :isShow="false"/>
         </div>
       </el-col>
       <el-col :span="19">
diff --git a/web/src/views/modules/basicInfo/ProductModelTree.vue b/web/src/views/modules/basicInfo/ProductModelTree.vue
index 5949b1d..0688faf 100644
--- a/web/src/views/modules/basicInfo/ProductModelTree.vue
+++ b/web/src/views/modules/basicInfo/ProductModelTree.vue
@@ -7,7 +7,7 @@
       size="small"
       clearable
     ></el-input>
-    <el-button type="primary" @click="add()" style="margin: 10px 0 0 10px;padding: 9px 18px !important;">鏂板鍨嬪彿</el-button>
+    <el-button v-if="isShow" type="primary" @click="add()" style="margin: 10px 0 0 10px;padding: 9px 18px !important;">鏂板鍨嬪彿</el-button>
     <el-divider></el-divider>
     <el-tree
       style="height: 90%;overflow: auto"
@@ -37,6 +37,10 @@
         type: Boolean,
         default: true
       },
+      isShow: {
+        type: Boolean,
+        default: true
+      },
       basic: {
         type: Number,
         default: 1
diff --git a/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
index cb0524c..e67cf17 100644
--- a/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
+++ b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
@@ -11,7 +11,7 @@
         <zt-dict v-model="dataForm.productType" dict="product" @input="getDefaultImg"
                  :disabled="disabled"></zt-dict>
       </zt-form-item>
-      <zt-form-item label="杩愯鐘舵�佸浘" prop="operatImg" v-if="isShow">
+      <zt-form-item label="杩愯鐘舵�佸浘" prop="operatImg">
         <el-input v-model="dataForm.operatImgName" @focus="selectPicture()"></el-input>
         <el-image v-if="dataForm.operatImg" :src="url+dataForm.operatImg" style="height: 50px;width: 50px"></el-image>
       </zt-form-item>
@@ -57,15 +57,18 @@
           this.isShow = false
           this.dataForm.pid = null
           this.dataForm.productType = 1
+          this.getDefaultImg(this.dataForm.productType)
         } else if (params.type === 'zt') {
           this.dataForm.pid = params.pid
           this.dataForm.productType = 2
           this.getProductList()
+          this.getDefaultImg(this.dataForm.productType)
         } else {
           this.dataForm.pid = params.pid
           this.dataForm.productType = params.type
         }
         if (this.dataForm.productType === 10 && id == null) {
+          this.isShow = false
           this.getDefaultImg(this.dataForm.productType)
         }
       },
diff --git a/web/src/views/modules/basicInfo/XhProductModel.vue b/web/src/views/modules/basicInfo/XhProductModel.vue
index 9d1c645..50d38ae 100644
--- a/web/src/views/modules/basicInfo/XhProductModel.vue
+++ b/web/src/views/modules/basicInfo/XhProductModel.vue
@@ -84,18 +84,8 @@
     },
     methods: {
       add() {
-        console.log(this.dataForm.type,'this.dataForm.type')
         this.dataForm.type = this.productType
         if (this.dataForm.type !== '1') {
-          if (this.dataForm.type !== '3') {
-            this.dataForm.type = this.dataForm.type + 1
-          } else if (this.dataForm.type === '3') {
-            this.dataForm.type = this.dataForm.type + 2
-          } else if (this.dataForm.type === '0') {
-            this.$alert("褰撳墠鑺傜偣涓嶅彲鏂板瀛愯妭鐐癸紝璇烽噸鏂拌缃�")
-            return
-          }
-          console.log(this.dataForm.type,'this.dataForm.type')
           this.$refs.SelectTyModel.$refs.dialog.init(null, {type: this.dataForm.type, id: this.dataForm.pid})
         } else {
           this.$refs.AddOrUpdate.$refs.dialog.init(null, {id: null, type: 'zt', pid: this.dataForm.pid})
diff --git a/web/src/views/modules/taskReliability/ModelRbd.vue b/web/src/views/modules/taskReliability/ModelRbd.vue
index 3b7d39b..5b849a0 100644
--- a/web/src/views/modules/taskReliability/ModelRbd.vue
+++ b/web/src/views/modules/taskReliability/ModelRbd.vue
@@ -3,7 +3,7 @@
     <el-row :gutter="5">
       <el-col :span="5">
         <div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)">
-          <product-model-tree @on-selected="onProductSelected" showXdy="true"/>
+          <product-model-tree @on-selected="onProductSelected" showXdy="true" :isShow="false"/>
         </div>
       </el-col>
       <el-col :span="19">
diff --git a/web/src/views/modules/taskReliability/OperatConditModel.vue b/web/src/views/modules/taskReliability/OperatConditModel.vue
index e49e22e..f0558f9 100644
--- a/web/src/views/modules/taskReliability/OperatConditModel.vue
+++ b/web/src/views/modules/taskReliability/OperatConditModel.vue
@@ -84,6 +84,7 @@
       async save() {
         let res = await this.$http.post('/taskReliability/OperatConditModel/', this.$refs.tableObj.dataList[0])
         if (res.success) {
+          this.$tip.success()
           this.isChange = false
           this.$refs.tableObj.query()
         }
diff --git a/web/src/views/modules/taskReliability/RBD-edit-img.vue b/web/src/views/modules/taskReliability/RBD-edit-img.vue
index db1bed4..4b5be03 100644
--- a/web/src/views/modules/taskReliability/RBD-edit-img.vue
+++ b/web/src/views/modules/taskReliability/RBD-edit-img.vue
@@ -1446,16 +1446,8 @@
       },
       async saveDiagram() {
         console.log(JSON.stringify(this.graph.toJSON()), 'graph.toJSON()')
-        const nodes = this.graph.getNodes()
-        let nodeArr2 = []
-        // 妫�鏌ラ櫎褰撳墠鑺傜偣涔嬪鐨勬墍鏈夎妭鐐圭殑鍖呭洿妗嗘槸鍚︾浉浜�
-        for (const node of nodes) {
-          console.log(node, 'saveDiagram node')
-          if (node.getData().nodeType == 'node'  && node.getData().dataId) {
-            nodeArr2.push(node.getData().dataId)
-          }
-        }
-        this.dataForm.nodeArr = nodeArr2
+        //   鑾峰彇鎵�鏈夊瓙鑺傜偣
+        this.getNodeArr()
         this.dataForm.content = JSON.stringify(this.graph.toJSON())
         this.dataForm.urlPref = window.SITE_CONFIG['apiURL']
         console.log(this.dataForm, 'dataFrom')
@@ -1468,11 +1460,24 @@
           }
         })
       },
-      async analyzeDiagram() {
-        console.log(JSON.stringify(this.graph.toJSON()), 'graph.toJSON()')
+      getNodeArr(){
         const nodes = this.graph.getNodes()
         let nodeArr2 = []
         // 妫�鏌ラ櫎褰撳墠鑺傜偣涔嬪鐨勬墍鏈夎妭鐐圭殑鍖呭洿妗嗘槸鍚︾浉浜�
+        for (const node of nodes) {
+          console.log(node, 'saveDiagram node')
+          if (node.getData().nodeType == 'node'  && node.getData().dataId) {
+            nodeArr2.push(node.getData().dataId)
+          }
+        }
+        this.dataForm.nodeArr = nodeArr2
+      },
+      async analyzeDiagram() {
+        console.log(JSON.stringify(this.graph.toJSON()), 'graph.toJSON()')
+        // 妫�鏌ラ櫎褰撳墠鑺傜偣涔嬪鐨勬墍鏈夎妭鐐圭殑鍖呭洿妗嗘槸鍚︾浉浜�
+        //   鑾峰彇鎵�鏈夊瓙鑺傜偣
+        this.getNodeArr()
+        const nodes = this.graph.getNodes()
         for (const node of nodes) {
           if(node.getData().nodeType === 'dashedBox'){
             this.$message({message: '璇ユā鍨嬩腑瀛樺湪铏氭锛屾棤娉曚繚瀛�', type: 'warning'})
@@ -1485,11 +1490,7 @@
               return false; // 鍙栨秷娣诲姞鑺傜偣鎿嶄綔
             }
           }
-          if (node.getData().nodeType === 'node' && node.getData().dataId) {
-            nodeArr2.push(node.getData().dataId)
-          }
         }
-        this.dataForm.nodeArr = nodeArr2
         this.dataForm.content = JSON.stringify(this.graph.toJSON())
         this.dataForm.urlPref = window.SITE_CONFIG['apiURL']
         await this.$http['post'](`/taskReliability/ModelLine/analyze`, this.dataForm).then(async res => {
diff --git a/web/src/views/modules/taskReliability/TaskBinoParam.vue b/web/src/views/modules/taskReliability/TaskBinoParam.vue
index 8501078..72db6a0 100644
--- a/web/src/views/modules/taskReliability/TaskBinoParam.vue
+++ b/web/src/views/modules/taskReliability/TaskBinoParam.vue
@@ -1,6 +1,6 @@
 <template>
   <zt-dialog ref="dialog" column="3" title="浜岄」鍙傛暟" append-to-body :editAble="false" :hasConfirm="false">
-    <zt-table-wraper ref="tableObj" query-url="/taskReliability/TaskBinoParam/page" delete-url="/taskReliability/TaskBinoParam"
+    <zt-table-wraper :paging='false' ref="tableObj" query-url="/taskReliability/TaskBinoParam/page" delete-url="/taskReliability/TaskBinoParam"
                      v-slot="{ table }" >
       <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
         <el-form-item>
@@ -14,10 +14,10 @@
                 height="600px"
                 border @selection-change="table.selectionChangeHandle" @cell-click="handleCellClick">
         <!--        <el-table-column type="selection" width="40"/>-->
-        <el-table-column prop="phaseName" label="闃舵" align="center" width="100"/>
+        <el-table-column prop="phaseName" label="闃舵" align="center" />
         <el-table-column prop="operatConditName" label="宸ュ喌" align="center"/>
         <el-table-column prop="productName" label="浜岄」鍒嗗竷璁惧" align="center"/>
-        <el-table-column prop="successRate" label="鎴愬姛鐜�" align="right">
+        <el-table-column prop="successRate" label="鎴愬姛鐜�" align="right" width="100">
           <template slot-scope="scope">
                     <span
                       v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property">
@@ -28,7 +28,7 @@
             <span v-else>{{scope.row.successRate}}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="simulatTimes" label="浠跨湡娆℃暟" align="center">
+        <el-table-column prop="simulatTimes" label="浠跨湡娆℃暟" align="center" width="100">
           <template slot-scope="scope">
                     <span
                       v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property">
@@ -39,7 +39,7 @@
             <span v-else>{{scope.row.simulatTimes}}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="successTimes" label="鎴愬姛娆℃暟" align="center">
+        <el-table-column prop="successTimes" label="鎴愬姛娆℃暟" align="center" width="100">
           <template slot-scope="scope">
                     <span
                       v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property">

--
Gitblit v1.9.1