From abbf0b4821869a608e152f5909b73daa22026a8c Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期一, 11 三月 2024 10:59:55 +0800
Subject: [PATCH] 修改
---
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataController.java | 96 +++++++
modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/controller/ModelLineController.java | 1
modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/dao/ModelRbdDao.java | 7
web/src/views/modules/basicInfo/ParamData.vue | 20 -
modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/service/ModelLineService.java | 17 -
/dev/null | 34 --
modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/model/ModelRbd.java | 19 +
modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/service/ModelRbdService.java | 41 +++
web/src/views/modules/taskReliability/RBD-edit-img.vue | 142 +---------
modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/controller/ModelRbdController.java | 95 +++++++
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/ParamDataDao.java | 23 +
modules/mainPart/src/main/resources/mapper/taskReliability/ModelRbdDao.xml | 23 +
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamData.java | 10
web/packages/components/zt-table-wraper/src/zt-table-wraper.vue | 6
web/src/views/modules/taskReliability/ModelRbd-AddOrUpdate.vue | 56 ++++
web/src/views/modules/taskReliability/ModelRbd.vue | 90 ++++++
modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataDao.xml | 6
web/src/views/modules/basicInfo/SelectTyModel.vue | 40 +-
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/ParamDataService.java | 44 +++
19 files changed, 551 insertions(+), 219 deletions(-)
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataAssignController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataAssignController.java
deleted file mode 100644
index e8a2496..0000000
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataAssignController.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package com.zt.life.modules.mainPart.basicInfo.controller;
-
-
-import com.zt.common.annotation.LogOperation;
-import com.zt.common.constant.Constant;
-import com.zt.common.annotation.QueryParam;
-import com.zt.common.db.query.QueryFilter;
-import com.zt.common.servlet.Result;
-import com.zt.common.servlet.PageResult;
-import com.zt.common.validator.AssertUtils;
-import com.zt.common.validator.ValidatorUtils;
-import com.zt.common.validator.group.AddGroup;
-import com.zt.common.validator.group.DefaultGroup;
-import com.zt.common.validator.group.UpdateGroup;
-import com.zt.life.modules.mainPart.basicInfo.model.ParamDataAssign;
-import com.zt.life.modules.mainPart.basicInfo.model.ParamDataExpect;
-import com.zt.life.modules.mainPart.basicInfo.service.ParamDataAssignService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import springfox.documentation.annotations.ApiIgnore;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-
-/**
- * param_data_assign
- *
- * @author zt generator
- * @since 1.0.0 2024-03-05
- */
-@RestController
-@RequestMapping("/basicInfo/ParamDataAssign/")
-@Api(tags="param_data_assign")
-public class ParamDataAssignController {
- @Autowired
- private ParamDataAssignService paramDataAssignService;
-
- @GetMapping("page")
- @ApiOperation("鍒嗛〉")
- @ApiImplicitParams({
- @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 = "name", value = "鍚嶇О", dataType = Constant.QT.STRING, format = "NAME^LK"),
- @ApiImplicitParam(name = "nodeType", value = "绫诲瀷", dataType = Constant.QT.STRING),
- @ApiImplicitParam(name = "srcId", value = "ID", dataType = Constant.QT.STRING)
- })
- public Result<List<ParamDataAssign>> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
-
- return Result.ok(paramDataAssignService.page(queryFilter));
- }
-
- @PostMapping("get")
- public Result getSelect(@RequestBody List<ParamDataAssign> list){
- for(ParamDataAssign assign:list){
- assign.setProductId(assign.getId());
- assign.setId(null);
- paramDataAssignService.insert(assign);
- }
- return Result.ok();
- }
-
- @GetMapping("{id}")
- @ApiOperation("淇℃伅")
- public Result<ParamDataAssign> get(@PathVariable("id") Long id){
- ParamDataAssign data = paramDataAssignService.get(id);
-
- return Result.ok(data);
- }
-
- @PostMapping("save")
- public Result save(@RequestBody ParamDataAssign paramDataAssign) {
- //鏁堥獙鏁版嵁
- for (ParamDataAssign assign : paramDataAssign.getDataThreeList()) {
- if (assign.getId()!=null){
- ValidatorUtils.validateEntity(assign, UpdateGroup.class, DefaultGroup.class);
- paramDataAssignService.update(assign);
- }else{
- ValidatorUtils.validateEntity(assign, AddGroup.class, DefaultGroup.class);
- paramDataAssignService.insert(assign);
- }
- }
- return Result.ok();
- }
-
- @PutMapping
- @ApiOperation("淇敼")
- @LogOperation("淇敼")
- public Result update(@RequestBody ParamDataAssign paramDataAssign){
- //鏁堥獙鏁版嵁
- ValidatorUtils.validateEntity(paramDataAssign, UpdateGroup.class, DefaultGroup.class);
- paramDataAssignService.update(paramDataAssign);
-
- return Result.ok();
- }
-
- @DeleteMapping
- @ApiOperation("鍒犻櫎")
- @LogOperation("鍒犻櫎")
- public Result delete(@RequestBody Long[] ids){
- //鏁堥獙鏁版嵁
- AssertUtils.isArrayEmpty(ids, "id");
- paramDataAssignService.delete(ids);
-
- return Result.ok();
- }
-
-}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataController.java
new file mode 100644
index 0000000..81e35c6
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataController.java
@@ -0,0 +1,96 @@
+package com.zt.life.modules.mainPart.basicInfo.controller;
+
+
+import com.zt.common.annotation.LogOperation;
+import com.zt.common.constant.Constant;
+import com.zt.common.annotation.QueryParam;
+import com.zt.common.db.query.QueryFilter;
+import com.zt.common.servlet.Result;
+import com.zt.common.validator.AssertUtils;
+import com.zt.common.validator.ValidatorUtils;
+import com.zt.common.validator.group.AddGroup;
+import com.zt.common.validator.group.DefaultGroup;
+import com.zt.common.validator.group.UpdateGroup;
+import com.zt.life.modules.mainPart.basicInfo.model.ParamData;
+import com.zt.life.modules.mainPart.basicInfo.service.ParamDataService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.List;
+
+
+/**
+ * param_data_expect
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-03-04
+ */
+@RestController
+@RequestMapping("/basicInfo/ParamData/")
+public class ParamDataController {
+ @Autowired
+ private ParamDataService paramDataService;
+
+ @GetMapping("page")
+ @ApiOperation("鍒嗛〉")
+ @ApiImplicitParams({
+ @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 = "name", value = "鍚嶇О", dataType = Constant.QT.STRING, format = "NAME^LK"),
+ @ApiImplicitParam(name = "nodeType", value = "绫诲瀷", dataType = Constant.QT.STRING),
+ @ApiImplicitParam(name = "srcId", value = "涓婄骇ID", dataType = Constant.QT.STRING),
+ @ApiImplicitParam(name = "pageCode", value = "", dataType = Constant.QT.STRING)})
+ public Result<List<ParamData>> page(@ApiIgnore @QueryParam QueryFilter queryFilter) {
+
+ return Result.ok(paramDataService.page(queryFilter));
+ }
+
+ @PostMapping("get")
+ public Result getSelect(@RequestBody List<ParamData> list) {
+ for (ParamData ParamData : list) {
+ ParamData.setProductId(ParamData.getId());
+ ParamData.setId(null);
+ paramDataService.insert(ParamData);
+ }
+ return Result.ok();
+ }
+
+ @GetMapping("{id}")
+ @ApiOperation("淇℃伅")
+ public Result<ParamData> get(@PathVariable("id") Long id) {
+ ParamData data = paramDataService.get(id);
+
+ return Result.ok(data);
+ }
+
+ @PostMapping("save")
+ public Result save(@RequestBody ParamData paramData) {
+ //鏁堥獙鏁版嵁
+ for (ParamData expect : paramData.getDataThreeList()) {
+ if (expect.getId()!=null){
+ paramDataService.update(expect);
+ }else{
+ expect.setPageCode(paramData.getPageCode());
+ paramDataService.insert(expect);
+ }
+ }
+ return Result.ok();
+ }
+
+ @DeleteMapping
+ @ApiOperation("鍒犻櫎")
+ @LogOperation("鍒犻櫎")
+ public Result delete(@RequestBody Long[] ids) {
+ //鏁堥獙鏁版嵁
+ AssertUtils.isArrayEmpty(ids, "id");
+ paramDataService.delete(ids);
+
+ return Result.ok();
+ }
+
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataExpectController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataExpectController.java
deleted file mode 100644
index 4681765..0000000
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataExpectController.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.zt.life.modules.mainPart.basicInfo.controller;
-
-
-import com.zt.common.annotation.LogOperation;
-import com.zt.common.constant.Constant;
-import com.zt.common.annotation.QueryParam;
-import com.zt.common.db.query.QueryFilter;
-import com.zt.common.servlet.Result;
-import com.zt.common.servlet.PageResult;
-import com.zt.common.validator.AssertUtils;
-import com.zt.common.validator.ValidatorUtils;
-import com.zt.common.validator.group.AddGroup;
-import com.zt.common.validator.group.DefaultGroup;
-import com.zt.common.validator.group.UpdateGroup;
-import com.zt.life.modules.mainPart.basicInfo.model.ParamDataExpect;
-import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel;
-import com.zt.life.modules.mainPart.basicInfo.service.ParamDataExpectService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import springfox.documentation.annotations.ApiIgnore;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-
-/**
- * param_data_expect
- *
- * @author zt generator
- * @since 1.0.0 2024-03-04
- */
-@RestController
-@RequestMapping("/basicInfo/ParamDataExpect/")
-@Api(tags = "param_data_expect")
-public class ParamDataExpectController {
- @Autowired
- private ParamDataExpectService paramDataExpectService;
-
- @GetMapping("page")
- @ApiOperation("鍒嗛〉")
- @ApiImplicitParams({
- @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 = "name", value = "鍚嶇О", dataType = Constant.QT.STRING, format = "NAME^LK"),
- @ApiImplicitParam(name = "nodeType", value = "绫诲瀷", dataType = Constant.QT.STRING),
- @ApiImplicitParam(name = "srcId", value = "涓婄骇ID", dataType = Constant.QT.STRING)})
- public Result<List<ParamDataExpect>> page(@ApiIgnore @QueryParam QueryFilter queryFilter) {
-
- return Result.ok(paramDataExpectService.page(queryFilter));
- }
-
- @PostMapping("get")
- public Result getSelect(@RequestBody List<ParamDataExpect> list) {
- for (ParamDataExpect ParamDataExpect : list) {
- ParamDataExpect.setProductId(ParamDataExpect.getId());
- ParamDataExpect.setId(null);
- paramDataExpectService.insert(ParamDataExpect);
- }
- return Result.ok();
- }
-
- @GetMapping("{id}")
- @ApiOperation("淇℃伅")
- public Result<ParamDataExpect> get(@PathVariable("id") Long id) {
- ParamDataExpect data = paramDataExpectService.get(id);
-
- return Result.ok(data);
- }
-
- @PostMapping("save")
- public Result save(@RequestBody ParamDataExpect paramDataExpect) {
- //鏁堥獙鏁版嵁
- for (ParamDataExpect expect : paramDataExpect.getDataThreeList()) {
- if (expect.getId()!=null){
- ValidatorUtils.validateEntity(expect, UpdateGroup.class, DefaultGroup.class);
- paramDataExpectService.update(expect);
- }else{
- ValidatorUtils.validateEntity(expect, AddGroup.class, DefaultGroup.class);
- paramDataExpectService.insert(expect);
- }
- }
- return Result.ok();
- }
-
- @DeleteMapping
- @ApiOperation("鍒犻櫎")
- @LogOperation("鍒犻櫎")
- public Result delete(@RequestBody Long[] ids) {
- //鏁堥獙鏁版嵁
- AssertUtils.isArrayEmpty(ids, "id");
- paramDataExpectService.delete(ids);
-
- return Result.ok();
- }
-
-}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/ParamDataAssignDao.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/ParamDataAssignDao.java
deleted file mode 100644
index f208206..0000000
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/ParamDataAssignDao.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.zt.life.modules.mainPart.basicInfo.dao;
-
-import com.zt.common.dao.BaseDao;
-import com.zt.life.modules.mainPart.basicInfo.model.ParamDataAssign;
-import org.apache.ibatis.annotations.Mapper;
-
-
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * param_data_assign
- *
- * @author zt generator
- * @since 1.0.0 2024-03-05
- */
-@Mapper
-public interface ParamDataAssignDao extends BaseDao<ParamDataAssign> {
-
- List<ParamDataAssign> getList(Map<String, Object> params);
-
-}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/ParamDataDao.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/ParamDataDao.java
new file mode 100644
index 0000000..7c553cd
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/ParamDataDao.java
@@ -0,0 +1,23 @@
+package com.zt.life.modules.mainPart.basicInfo.dao;
+
+import com.zt.common.dao.BaseDao;
+import com.zt.life.modules.mainPart.basicInfo.model.ParamData;
+import org.apache.ibatis.annotations.Mapper;
+
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * param_data
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-03-04
+ */
+@Mapper
+public interface ParamDataDao extends BaseDao<ParamData> {
+
+ List<ParamData> getList(Map<String, Object> params);
+
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/ParamDataExpectDao.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/ParamDataExpectDao.java
deleted file mode 100644
index 0af236d..0000000
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/ParamDataExpectDao.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.zt.life.modules.mainPart.basicInfo.dao;
-
-import com.zt.common.dao.BaseDao;
-import com.zt.life.modules.mainPart.basicInfo.model.ParamDataExpect;
-import org.apache.ibatis.annotations.Mapper;
-
-
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * param_data_expect
- *
- * @author zt generator
- * @since 1.0.0 2024-03-04
- */
-@Mapper
-public interface ParamDataExpectDao extends BaseDao<ParamDataExpect> {
-
- List<ParamDataExpect> getList(Map<String, Object> params);
-
-}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataExpect.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamData.java
similarity index 92%
rename from modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataExpect.java
rename to modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamData.java
index df14fda..50221c1 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataExpect.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamData.java
@@ -3,12 +3,10 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.common.entity.BusiEntity;
-import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
-import java.util.Date;
import java.util.List;
/**
@@ -19,8 +17,8 @@
*/
@Data
@EqualsAndHashCode(callSuper = false)
-@TableName("param_data_expect")
-public class ParamDataExpect extends BusiEntity {
+@TableName("param_data")
+public class ParamData extends BusiEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "婧怚D")
@@ -101,7 +99,9 @@
@TableField(exist = false)
private Long productIdInit;
+ private String pageCode;
+
@TableField(exist = false)
- private List<ParamDataExpect> dataThreeList;
+ private List<ParamData> dataThreeList;
}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataAssign.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataAssign.java
deleted file mode 100644
index 82df497..0000000
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataAssign.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package com.zt.life.modules.mainPart.basicInfo.model;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.zt.common.entity.BusiEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * param_data_assign
- *
- * @author zt generator
- * @since 1.0.0 2024-03-05
- */
-@Data
-@EqualsAndHashCode(callSuper=false)
-@TableName("param_data_assign")
-public class ParamDataAssign extends BusiEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "婧怚D")
- private Long productId;
-
- @ApiModelProperty(value = "鍚嶇О")
- private String name;
-
- @ApiModelProperty(value = "鍩烘湰鍙潬鎬ц繍琛屾瘮")
- private String baseOperatRatio;
-
- @ApiModelProperty(value = "瀹為檯杩愯鏃堕棿")
- private String actualRunTime;
-
- @ApiModelProperty(value = "鍙傚姞璁$畻")
- private Integer joinCompute;
-
- @ApiModelProperty(value = "瑙勫畾MTBF")
- private String regulateMtbf;
-
- @ApiModelProperty(value = "鍙帴鍙楃殑MTBF")
- private String acceptMtbf;
-
- @ApiModelProperty(value = "MTBF瑙勫畾鎴愬姛鐜�")
- private String regulSuccRateMtbf;
-
- @ApiModelProperty(value = "MTBF鍙帴鍙楁垚鍔熺巼")
- private String acceptSuccRateMtbf;
-
- @ApiModelProperty(value = "鍗曞厓鏁伴噺")
- private Integer unitNum;
-
- @ApiModelProperty(value = "杩愯娆℃暟")
- private Integer runsNum;
-
- @ApiModelProperty(value = "MTBF杩愯姣�")
- private String operatingRatioMtbf;
-
- @ApiModelProperty(value = "鍗曟杩愯鏃堕棿")
- private String singleRunTime;
-
- @ApiModelProperty(value = "瑙勫畾MTBCF")
- private String regulateMtbcf;
-
- @ApiModelProperty(value = "鍙帴鍙楃殑MTBCF")
- private String acceptMtbcf;
-
- @ApiModelProperty(value = "MTBCF瑙勫畾鎴愬姛鐜�")
- private String regulSuccRateMtbcf;
-
- @ApiModelProperty(value = "MTBCF鍙帴鍙楁垚鍔熺巼")
- private String acceptSuccRateMtbcf;
-
- @ApiModelProperty(value = "MTBCF杩愯姣�")
- private String operatingRatioMtbcf;
-
- @ApiModelProperty(value = "MTBCF鍏朵粬鍙傛暟")
- private String otherParamsMtbcf;
-
- @ApiModelProperty(value = "鍙淮淇�")
- private Integer repairable;
-
- @ApiModelProperty(value = "缁翠慨鍒嗗竷绫诲瀷")
- private Integer repairDistribType;
-
- @ApiModelProperty(value = "MTTCR")
- private String mttcr;
-
- @ApiModelProperty(value = "MTTCR鍏朵粬鍙傛暟")
- private String otherParamsMttcr;
-
- @ApiModelProperty(value = "鍙潬鎬у垎甯冪被鍨�")
- private Integer reliabDistribType;
-
- @ApiModelProperty(value = "杩愯鏃堕棿")
- private String runTime;
-
- @TableField(exist = false)
- private Long productIdInit;
-
- @TableField(exist = false)
- private List<ParamDataAssign> dataThreeList;
-}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/ParamDataAssignService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/ParamDataAssignService.java
deleted file mode 100644
index 6288c98..0000000
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/ParamDataAssignService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.zt.life.modules.mainPart.basicInfo.service;
-
-import com.zt.common.service.BaseService;
-import com.zt.life.modules.mainPart.basicInfo.dao.ParamDataAssignDao;
-import com.zt.life.modules.mainPart.basicInfo.model.ParamDataAssign;
-import com.zt.life.modules.mainPart.basicInfo.model.ParamDataExpect;
-import org.springframework.stereotype.Service;
-import com.zt.common.db.query.QueryFilter;
-import javax.annotation.Resource;
-import java.util.List;
-
-
-/**
- * param_data_assign
- *
- * @author zt generator
- * @since 1.0.0 2024-03-05
- */
-@Service
-public class ParamDataAssignService extends BaseService<ParamDataAssignDao, ParamDataAssign> {
-
- /**
- * 鍒嗛〉鏌ヨ
- *
- * @param queryFilter
- * @return
- */
- public List<ParamDataAssign> page(QueryFilter queryFilter) {
- List<ParamDataAssign> list = baseDao.getList(queryFilter.getQueryParams());
- for (ParamDataAssign assign :list){
- assign.setProductId(assign.getProductIdInit());
- }
- return list;
- }
-
- /**
- * 鍒犻櫎
- *
- * @param ids
- */
- public void delete(Long[] ids) {
- super.deleteLogic(ids);
- }
-
-}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/ParamDataExpectService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/ParamDataExpectService.java
deleted file mode 100644
index b82f7d9..0000000
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/ParamDataExpectService.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.zt.life.modules.mainPart.basicInfo.service;
-
-import com.zt.common.service.BaseService;
-import com.zt.life.modules.mainPart.basicInfo.dao.ParamDataExpectDao;
-import com.zt.life.modules.mainPart.basicInfo.model.ParamDataExpect;
-import org.springframework.stereotype.Service;
-import com.zt.common.db.query.QueryFilter;
-import javax.annotation.Resource;
-import java.util.List;
-
-
-/**
- * param_data_expect
- *
- * @author zt generator
- * @since 1.0.0 2024-03-04
- */
-@Service
-public class ParamDataExpectService extends BaseService<ParamDataExpectDao, ParamDataExpect> {
-
- /**
- * 鍒嗛〉鏌ヨ
- *
- * @param queryFilter
- * @return
- */
- public List<ParamDataExpect> page(QueryFilter queryFilter) {
- List<ParamDataExpect> list = baseDao.getList(queryFilter.getQueryParams());
- for (ParamDataExpect expect :list){
- expect.setProductId(expect.getProductIdInit());
- }
- return list;
- }
-
- /**
- * 鍒犻櫎
- *
- * @param ids
- */
- public void delete(Long[] ids) {
- super.deleteLogic(ids);
- }
-
-}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/ParamDataService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/ParamDataService.java
new file mode 100644
index 0000000..577221b
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/ParamDataService.java
@@ -0,0 +1,44 @@
+package com.zt.life.modules.mainPart.basicInfo.service;
+
+import com.zt.common.service.BaseService;
+import com.zt.life.modules.mainPart.basicInfo.dao.ParamDataDao;
+import com.zt.life.modules.mainPart.basicInfo.model.ParamData;
+import org.springframework.stereotype.Service;
+import com.zt.common.db.query.QueryFilter;
+
+import java.util.List;
+
+
+/**
+ * param_data_expect
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-03-04
+ */
+@Service
+public class ParamDataService extends BaseService<ParamDataDao, ParamData> {
+
+ /**
+ * 鍒嗛〉鏌ヨ
+ *
+ * @param queryFilter
+ * @return
+ */
+ public List<ParamData> page(QueryFilter queryFilter) {
+ List<ParamData> list = baseDao.getList(queryFilter.getQueryParams());
+ for (ParamData expect :list){
+ expect.setProductId(expect.getProductIdInit());
+ }
+ return list;
+ }
+
+ /**
+ * 鍒犻櫎
+ *
+ * @param ids
+ */
+ public void delete(Long[] ids) {
+ super.deleteLogic(ids);
+ }
+
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/controller/ModelLineController.java b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/controller/ModelLineController.java
index dc54e4d..2704eca 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/controller/ModelLineController.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/controller/ModelLineController.java
@@ -106,6 +106,7 @@
@ApiOperation("瑙f瀽")
@LogOperation("瑙f瀽")
public Result analyze(@RequestBody ModelRbd modelRbd){
+ modelLineService.update(modelRbd);
boolean result = modelLineService.analyze(modelRbd);
return result ? Result.ok() : Result.error("瑙f瀽澶辫触");
}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/controller/ModelRbdController.java b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/controller/ModelRbdController.java
new file mode 100644
index 0000000..e5e1dcb
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/controller/ModelRbdController.java
@@ -0,0 +1,95 @@
+package com.zt.life.modules.taskReliability.controller;
+
+
+import com.zt.common.annotation.LogOperation;
+import com.zt.common.constant.Constant;
+import com.zt.common.annotation.QueryParam;
+import com.zt.common.db.query.QueryFilter;
+import com.zt.common.servlet.Result;
+import com.zt.common.servlet.PageResult;
+import com.zt.common.validator.AssertUtils;
+import com.zt.common.validator.ValidatorUtils;
+import com.zt.common.validator.group.AddGroup;
+import com.zt.common.validator.group.DefaultGroup;
+import com.zt.common.validator.group.UpdateGroup;
+import com.zt.life.modules.taskReliability.model.ModelRbd;
+import com.zt.life.modules.taskReliability.service.ModelRbdService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+
+/**
+ * model_rbd
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-03-10
+ */
+@RestController
+@RequestMapping("/taskReliability/ModelRbd/")
+@Api(tags="model_rbd")
+public class ModelRbdController {
+ @Autowired
+ private ModelRbdService modelRbdService;
+
+ @GetMapping("page")
+ @ApiOperation("鍒嗛〉")
+ @ApiImplicitParams({
+ @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 = "productId", value = "鑺傜偣ID", dataType = Constant.QT.STRING),
+ })
+ public Result<List<ModelRbd>> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
+
+ return Result.ok(modelRbdService.page(queryFilter));
+ }
+
+ @GetMapping("{id}")
+ @ApiOperation("淇℃伅")
+ public Result<ModelRbd> get(@PathVariable("id") Long id){
+ ModelRbd data = modelRbdService.get(id);
+
+ return Result.ok(data);
+ }
+
+ @PostMapping
+ @ApiOperation("鏂板")
+ @LogOperation("鏂板")
+ public Result insert(@RequestBody ModelRbd modelRbd){
+ //鏁堥獙鏁版嵁
+ ValidatorUtils.validateEntity(modelRbd, AddGroup.class, DefaultGroup.class);
+ modelRbdService.insert(modelRbd);
+
+ return Result.ok();
+ }
+
+ @PutMapping
+ @ApiOperation("淇敼")
+ @LogOperation("淇敼")
+ public Result update(@RequestBody ModelRbd modelRbd){
+ //鏁堥獙鏁版嵁
+ ValidatorUtils.validateEntity(modelRbd, UpdateGroup.class, DefaultGroup.class);
+ modelRbdService.update(modelRbd);
+
+ return Result.ok();
+ }
+
+ @DeleteMapping
+ @ApiOperation("鍒犻櫎")
+ @LogOperation("鍒犻櫎")
+ public Result delete(@RequestBody Long[] ids){
+ //鏁堥獙鏁版嵁
+ AssertUtils.isArrayEmpty(ids, "id");
+ modelRbdService.delete(ids);
+
+ return Result.ok();
+ }
+
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/dao/ModelRbdDao.java b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/dao/ModelRbdDao.java
index f9d2b57..50a7792 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/dao/ModelRbdDao.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/dao/ModelRbdDao.java
@@ -1,23 +1,24 @@
package com.zt.life.modules.taskReliability.dao;
import com.zt.common.dao.BaseDao;
-import com.zt.life.modules.taskReliability.model.ModelNode;
import com.zt.life.modules.taskReliability.model.ModelRbd;
import org.apache.ibatis.annotations.Mapper;
+
import java.util.List;
import java.util.Map;
/**
- * model_line
+ * model_rbd
*
* @author zt generator
- * @since 1.0.0 2024-02-28
+ * @since 1.0.0 2024-03-10
*/
@Mapper
public interface ModelRbdDao extends BaseDao<ModelRbd> {
+ List<ModelRbd> getList(Map<String, Object> params);
ModelRbd getDiagram(Long modelId);
void deleteByModelId(Long modelId);
}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/model/ModelRbd.java b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/model/ModelRbd.java
index 9e0f902..2d47bf8 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/model/ModelRbd.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/model/ModelRbd.java
@@ -2,15 +2,18 @@
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.common.entity.BusiEntity;
+import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
+import java.util.Date;
+
/**
- * model_line
+ * model_rbd
*
* @author zt generator
- * @since 1.0.0 2024-02-28
+ * @since 1.0.0 2024-03-10
*/
@Data
@EqualsAndHashCode(callSuper=false)
@@ -19,9 +22,21 @@
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "")
+ private Long pid;
+
+ @ApiModelProperty(value = "")
private Long modelId;
+
+ @ApiModelProperty(value = "妯″瀷鍚嶇О")
+ private String modelName;
+
+ @ApiModelProperty(value = "")
+ private Long productId;
@ApiModelProperty(value = "")
private String content;
+ @ApiModelProperty(value = "澶囨敞")
+ private String remark;
+
}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/service/ModelLineService.java b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/service/ModelLineService.java
index 68d9e01..2840548 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/service/ModelLineService.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/service/ModelLineService.java
@@ -88,8 +88,6 @@
// 鍒犻櫎鏃㈡湁鏁版嵁
modelRbdDao.deleteByModelId(modelId);
- // 鎻掑叆鏁版嵁
- modelRbd.setId(UUIDUtil.generateId());
modelRbdDao.insert(modelRbd);
}
@@ -97,22 +95,9 @@
public boolean analyze(ModelRbd modelRbd) {
boolean result = true;
if (modelRbd==null) return result;
- if (modelRbd.getModelId()==null) return result;
- Long modelId = modelRbd.getModelId();
-
-// 妫�鏌ュ浘鐨勫悎鐞嗘�у苟鍖栫畝
-// checkRbd(modelRbd);
-
-// analyzeRbdAndSave(modelId, modelRbd.getContent(), true);
+ Long modelId = modelRbd.getId();
result = analyzeRbd(modelId, modelRbd.getContent(), true);
-
return result;
- }
-
- public void checkRbd(ModelRbd modelRbd) {
- if (modelRbd==null) return;
- if (modelRbd.getModelId()==null) return;
- Long modelId = modelRbd.getModelId();
}
private boolean analyzeRbd(Long modelId, String content, boolean saveFlag) {
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/service/ModelRbdService.java b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/service/ModelRbdService.java
new file mode 100644
index 0000000..36aea45
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/taskReliability/service/ModelRbdService.java
@@ -0,0 +1,41 @@
+package com.zt.life.modules.taskReliability.service;
+
+import com.zt.common.service.BaseService;
+import com.zt.life.modules.taskReliability.dao.ModelRbdDao;
+import com.zt.life.modules.taskReliability.model.ModelRbd;
+import org.springframework.stereotype.Service;
+import com.zt.common.db.query.QueryFilter;
+import javax.annotation.Resource;
+import java.util.List;
+
+
+/**
+ * model_rbd
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-03-10
+ */
+@Service
+public class ModelRbdService extends BaseService<ModelRbdDao, ModelRbd> {
+
+ /**
+ * 鍒嗛〉鏌ヨ
+ *
+ * @param queryFilter
+ * @return
+ */
+ public List<ModelRbd> page(QueryFilter queryFilter) {
+
+ return baseDao.getList(queryFilter.getQueryParams());
+ }
+
+ /**
+ * 鍒犻櫎
+ *
+ * @param ids
+ */
+ public void delete(Long[] ids) {
+ super.deleteLogic(ids);
+ }
+
+}
diff --git a/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataAssignDao.xml b/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataDao.xml
similarity index 87%
rename from modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataAssignDao.xml
rename to modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataDao.xml
index 35e09c5..7c7b542 100644
--- a/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataAssignDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataDao.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.ParamDataAssignDao">
+<mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.ParamDataDao">
- <select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.ParamDataAssign">
+ <select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.ParamData">
SELECT
a.NAME,
b.*,
@@ -13,7 +13,7 @@
END AS productIdInit
FROM
product_model a
- LEFT JOIN param_data_assign b ON b.product_id = a.id
+ LEFT JOIN param_data b ON b.product_id = a.id and b.page_code = '${pageCode}'
<where>
a.is_delete = 0
<if test="srcId!=null">
diff --git a/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataExpectDao.xml b/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataExpectDao.xml
deleted file mode 100644
index 01184d0..0000000
--- a/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataExpectDao.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.ParamDataExpectDao">
-
- <select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.ParamDataExpect">
- SELECT
- a.NAME,
- b.*,
- CASE
- WHEN b.product_id IS NULL THEN a.id
- ELSE b.product_id
- END AS productIdInit
- FROM
- product_model a
- LEFT JOIN param_data_expect b ON b.product_id = a.id
- <where>
- a.is_delete = 0
- <if test="srcId!=null">
- and a.pid =${srcId}
- </if>
- <if test="srcId==null">
- and a.pid is null
- </if>
- <if test="whereSql!=null">
- and ${whereSql}
- </if>
- </where>
- <if test="orderBySql!=null">
- ORDER BY ${orderBySql}
- </if>
- </select>
-
-</mapper>
diff --git a/modules/mainPart/src/main/resources/mapper/taskReliability/ModelRbdDao.xml b/modules/mainPart/src/main/resources/mapper/taskReliability/ModelRbdDao.xml
index 8b2c7ab..f8b85f9 100644
--- a/modules/mainPart/src/main/resources/mapper/taskReliability/ModelRbdDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/taskReliability/ModelRbdDao.xml
@@ -3,18 +3,35 @@
<mapper namespace="com.zt.life.modules.taskReliability.dao.ModelRbdDao">
+ <select id="getList" resultType="com.zt.life.modules.taskReliability.model.ModelRbd">
+ select a.*
+ from model_rbd a
+ <where>
+ a.is_delete = 0
+ <if test="productId!=null and productId!=''">
+ and a.product_id =${productId}
+ </if>
+ <if test="whereSql!=null">
+ and ${whereSql}
+ </if>
+ </where>
+ <if test="orderBySql!=null">
+ ORDER BY ${orderBySql}
+ </if>
+ </select>
<select id="getDiagram" resultType="com.zt.life.modules.taskReliability.model.ModelRbd">
select a.*
from model_rbd a
<where>
a.is_delete = 0
- and a.model_id=#{modelId}
+ and a.id=#{modelId}
</where>
limit 1
</select>
<update id="deleteByModelId">
- delete from model_rbd where model_id=#{modelId}
+ delete
+ from model_rbd
+ where model_id = #{modelId}
</update>
-
</mapper>
diff --git a/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue b/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue
index 1420e67..c3c29e3 100644
--- a/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue
+++ b/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue
@@ -31,6 +31,10 @@
export default {
name: 'ZtTableWraper',
props: {
+ defaultNotQuery:{
+ type: Boolean,
+ default: false
+ },
queryUrl: String, // 鏁版嵁鍒楄〃鎺ュ彛锛孉PI鍦板潃
deleteUrl: String, // 鍒犻櫎鎺ュ彛锛孉PI鍦板潃,
exportUrl: String, // 瀵煎嚭鎺ュ彛锛孉PI鍦板潃
@@ -91,7 +95,7 @@
}
}
- if (!this.lazy) {
+ if (!this.lazy && !this.defaultNotQuery) {
this._query()
}
},
diff --git a/web/src/views/modules/basicInfo/ParamData.vue b/web/src/views/modules/basicInfo/ParamData.vue
index 0f5bdd5..5cd384f 100644
--- a/web/src/views/modules/basicInfo/ParamData.vue
+++ b/web/src/views/modules/basicInfo/ParamData.vue
@@ -7,7 +7,7 @@
</div>
</el-col>
<el-col :span="19">
- <div class="mod-basicInfo-paramDataExpect}">
+ <div class="mod-basicInfo-paramData}">
<zt-table-wraper ref="tableObj" :query-url=queryUrl
:delete-url=deleteUrl
@dataLoaded="dataLoaded"
@@ -252,8 +252,8 @@
export default {
data() {
return {
- queryUrl: '/basicInfo/ParamDataExpect/page',
- deleteUrl: '/basicInfo/ParamDataExpect',
+ queryUrl: '/basicInfo/ParamData/page',
+ deleteUrl: '/basicInfo/ParamData',
pageCode: '',
key: '',
typeS: '',
@@ -311,30 +311,22 @@
mounted() {
this.pageCode = this.$route.query.pageCode
this.dataForm.pageCode = this.$route.query.pageCode
- if (this.pageCode === 'assign') {
- this.queryUrl = '/basicInfo/ParamDataAssign/page'
- this.deleteUrl = '/basicInfo/ParamDataAssign'
- }
console.log(this.pageCode, 'this.pageCode this.pageCode')
},
methods: {
add() {
this.$refs.SelectTyModel.$refs.dialog.init(null, {
type: this.dataForm.nodeType - 1,
- id: this.dataForm.id,
+ id: this.dataForm.srcId,
pageCode: this.pageCode
})
+ console.log(this.dataForm.srcId, 'add')
},
//鎵归噺淇濆瓨
async handleSaveRows() {
this.dataForm.dataThreeList = this.$refs.tableObj.dataList
console.log(this.dataForm, 'this.dataForm this.dataForm')
- let res
- if (this.pageCode === 'Expect') {
- res = await this.$http.post('/basicInfo/ParamDataExpect/save', this.dataForm)
- } else {
- res = await this.$http.post('/basicInfo/ParamDataAssign/save', this.dataForm)
- }
+ let res = await this.$http.post('/basicInfo/ParamData/save', this.dataForm)
if (res.success) {
console.log(res.data)
await this.$tip.success()
diff --git a/web/src/views/modules/basicInfo/SelectTyModel.vue b/web/src/views/modules/basicInfo/SelectTyModel.vue
index adb7a5f..96f09b6 100644
--- a/web/src/views/modules/basicInfo/SelectTyModel.vue
+++ b/web/src/views/modules/basicInfo/SelectTyModel.vue
@@ -24,9 +24,10 @@
name: 'SelectTyModel',
data() {
return {
- url:'/basicInfo/TyProductModel/page',
+ url: '/basicInfo/XhProductModel/page',
selectList: [],
data: '',
+ pageCode:'',
dataForm: {
type: 'noTree',
nodeType: '',
@@ -42,14 +43,14 @@
},
components: {},
methods: {
- init(id,params) {
+ init(id, params) {
this.dataForm.nodeType = params.type
this.dataForm.pid = params.id
this.pageCode = params.pageCode
- if (this.pageCode ==='expect'||this.pageCode==='assign'){
- this.url='/basicInfo/XhProductModel/page'
+ if (!this.pageCode) {
+ this.url = '/basicInfo/TyProductModel/page'
}
- console.log(this.dataForm.pid, 'init()')
+ console.log(params, 'init()')
},
changeRow(selection) {
console.log(selection, ' changeRow(selection)')
@@ -59,24 +60,25 @@
item.pid = this.dataForm.pid
}
this.selectList = selection
+ this.selectList.forEach( item => {
+ item.pageCode = this.pageCode
+ })
},
async formSubmit() {
let res
- if (this.pageCode && this.pageCode === 'expect'){
- res = await this.$http.post('/basicInfo/ParamDataExpect/get', this.selectList)
- }else if(this.pageCode && this.pageCode === 'assign') {
- res = await this.$http.post('/basicInfo/ParamDataAssign/get', this.selectList)
- }else
- {
- res = await this.$http.post('/basicInfo/XhProductModel/get', this.selectList)
- }
-
- if (res.success) {
- await this.$tip.success()
- this.$refs.dialog.close()
- this.$emit('refreshDataList')
+ if (this.pageCode) {
+ if (this.pageCode === 'expect' || this.pageCode === 'assign') {
+ res = await this.$http.post('/basicInfo/ParamData/get', this.selectList)
+ }
+ } else {
+ res = await this.$http.post('/basicInfo/XhProductModel/get', this.selectList)
+ }
+ if (res.success) {
+ await this.$tip.success()
+ this.$refs.dialog.close()
+ this.$emit('refreshDataList')
+ }
}
}
}
- }
</script>
diff --git a/web/src/views/modules/taskReliability/ModelRbd-AddOrUpdate.vue b/web/src/views/modules/taskReliability/ModelRbd-AddOrUpdate.vue
new file mode 100644
index 0000000..3b0b4a1
--- /dev/null
+++ b/web/src/views/modules/taskReliability/ModelRbd-AddOrUpdate.vue
@@ -0,0 +1,56 @@
+<template>
+ <zt-dialog ref="dialog" @confirm="formSubmit">
+ <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
+ <zt-form-item label="妯″瀷鍚嶇О" prop="modelName" rules="required">
+ <el-input v-model="dataForm.modelName"></el-input>
+ </zt-form-item>
+ <zt-form-item label="妯″瀷鏍囪瘑" prop="modelName">
+ <el-input v-model="dataForm.modelSign"></el-input>
+ </zt-form-item>
+ <zt-form-item label="澶囨敞" prop="remark">
+ <el-input v-model="dataForm.remark"></el-input>
+ </zt-form-item>
+ </el-form>
+ </zt-dialog>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ dataForm: {
+ id: '',
+ pid: '',
+ modelId: '',
+ modelName: '',
+ productId: '',
+ modelSign:'',
+ content: '',
+ remark: ''
+ }
+ }
+ },
+ methods: {
+ init(id, productId) {
+ this.dataForm.productId = productId
+ },
+ // 鑾峰彇淇℃伅
+ async getInfo() {
+ let res = await this.$http.get(`/taskReliability/ModelRbd/${this.dataForm.id}`)
+ this.dataForm = {
+ ...this.dataForm,
+ ...res.data
+ }
+ },
+ // 琛ㄥ崟鎻愪氦
+ async formSubmit() {
+ let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/taskReliability/ModelRbd/', this.dataForm)
+ if (res.success) {
+ await this.$tip.success()
+ this.$refs.dialog.close()
+ this.$emit('refreshDataList')
+ }
+ }
+ }
+ }
+</script>
diff --git a/web/src/views/modules/taskReliability/ModelRbd.vue b/web/src/views/modules/taskReliability/ModelRbd.vue
new file mode 100644
index 0000000..c97c0e3
--- /dev/null
+++ b/web/src/views/modules/taskReliability/ModelRbd.vue
@@ -0,0 +1,90 @@
+<template>
+ <div>
+ <el-row :gutter="20">
+ <el-col :span="5">
+ <div class="fa-card-a">
+ <product-model-tree @on-selected="onProductSelected"/>
+ </div>
+ </el-col>
+ <el-col :span="19">
+ <div class="mod-taskReliability-modelRbd}">
+ <zt-table-wraper ref="tableObj" defaultNotQuery="true" query-url="/taskReliability/ModelRbd/page" delete-url="/taskReliability/ModelRbd"
+ :paging='false'
+ v-slot="{ table }">
+ <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
+ <el-form-item>
+ <zt-button type="query" @click="table.query()"/>
+ <zt-button type="add" @click="add()"/>
+ <zt-button type="delete" @click="table.deleteHandle()"/>
+ </el-form-item>
+ </el-form>
+ <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
+ border @selection-change="table.selectionChangeHandle">
+ <el-table-column type="selection" width="40" align="center"/>
+ <el-table-column prop="modelName" label="妯″瀷鍚嶇О"/>
+ <el-table-column prop="modelSign" label="妯″瀷鏍囪瘑"/>
+ <el-table-column prop="citedNum" label="琚紩鐢ㄦ暟"/>
+ <el-table-column prop="modelState" label="妯″瀷鐘舵��"/>
+ <el-table-column prop="modelDataState" label="妯″瀷鏁版嵁鐘舵��"/>
+ <el-table-column prop="remark" label="澶囨敞"/>
+ <zt-table-column-handle :table="table" edit-perm="taskReliability:update"
+ delete-perm="taskReliability::delete" :has-view="false">
+ <template v-slot="{ row }">
+ <el-button type="primary" @click="drawRBD(row)">妯″瀷璁捐</el-button>
+ </template>
+ </zt-table-column-handle>
+ </el-table>
+ <!-- 寮圭獥, 鏂板 / 淇敼 -->
+ <add-or-update @refreshDataList="table.query" ref="AddOrUpdate"/>
+ <el-dialog v-dialogDrag title="妯″瀷璁捐" top="1vh" width='95%' :visible.sync="dialogVisible2">
+ <RBDEditImg ref="rbdEditImg"></RBDEditImg>
+ </el-dialog>
+ </zt-table-wraper>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+</template>
+
+<script>
+ import AddOrUpdate from './ModelRbd-AddOrUpdate'
+ import ProductModelTree from "../basicInfo/ProductModelTree";
+ import RBDEditImg from './RBD-edit-img'
+
+ export default {
+ data() {
+ return {
+ dialogVisible2: false,
+ dataForm: {
+ modelName:'',
+ productId: '',
+ }
+ }
+ },
+ mounted() {
+
+ },
+ components: {
+ ProductModelTree,
+ AddOrUpdate,
+ RBDEditImg
+ },
+ methods: {
+ add(){
+ this.$refs.AddOrUpdate.$refs.dialog.init(null,this.dataForm.productId)
+ },
+ onProductSelected(data) {
+ this.dataForm.productId = data.id
+ console.log(data, 'onProductSelected(data)')
+ this.$refs.tableObj.query()
+ },
+ drawRBD(row) {
+ this.dialogVisible2 = true
+ this.$nextTick(()=>{
+ this.$refs.rbdEditImg.init(row)
+ })
+
+ }
+ }
+ }
+</script>
diff --git a/web/src/views/modules/taskReliability/RBD-edit-img.vue b/web/src/views/modules/taskReliability/RBD-edit-img.vue
index 284c33e..dcc05dc 100644
--- a/web/src/views/modules/taskReliability/RBD-edit-img.vue
+++ b/web/src/views/modules/taskReliability/RBD-edit-img.vue
@@ -12,17 +12,11 @@
<div class="fa-card-a">
<el-form :inline="true">
<el-form-item>
- 妯″瀷ID
+ 妯″瀷鍚嶇О锛歿{modelName}}
</el-form-item>
- <el-form-item>
- <el-input placeholder="鎼滅储妯″瀷ID" v-model="dataForm.modelId" clearable class="input-with-select">
- <el-button slot="append" icon="el-icon-search" @click="search()"></el-button>
- </el-input>
- </el-form-item>
-
<el-form-item>
- <el-button type="primary" @click="saveDiagram()">淇濆瓨</el-button>
- <el-button type="primary" @click="analyzeDiagram()">瑙f瀽</el-button>
+ <el-button type="primary" @click="saveDiagram()">鏆傚瓨</el-button>
+ <el-button type="primary" @click="analyzeDiagram()">淇濆瓨</el-button>
<el-button type="primary" @click="clearDiagram()">娓呯┖鍥惧舰</el-button>
</el-form-item>
<el-form-item>
@@ -116,6 +110,9 @@
},
data() {
return {
+ modelId: '',
+ modelName: '',
+ modelType:'',
timer: null,
imgsList:[
{imgPath:'start',imgName:'start',nodeType:'start',imgWidth:60,imgHeight:60,imgId:'1',data:{}},
@@ -140,20 +137,9 @@
diagramIdDisabled: false,
dataForm: {
id: null,
- projectId: null,
- diagramId: null,
content: null,
publishContent: null,
hasPublish: 0,
- modelId: '1',
- },
- flowInfo: {
- bizId: '',
- bizGroupId: '',
- flowCode: '',
- flowStepMark: '',
- status: 0,
- myStatus: 0
},
// emptyJson: {
// // 鑺傜偣
@@ -306,111 +292,22 @@
//this.diagramId = this.$route.params.diagramId
console.log(this.$route.params.projectId, 'this.$route.params.projectId')
console.log(this.$route.params.diagramId, 'this.$route.params.diagramId')
- this.projectChange2(this.$route.params.diagramId)
}
},
mounted() {
- this.getProject()
- this.init()
+ this.initDigram()
this.type = 'grid'
},
methods: {
- async finish() {
- if (await this.$tip.confirm('纭畾瑕佽繘琛屾彁浜ゆ搷绾靛悧?')) {
- let submitForm = {
- params: {
- wfIdCode: 'wltFlow',
- bizId: this.dataForm.projectId,
- stepIdMark: this.pageCode
- }
- }
- let res = await this.$http.get('/wf/approvePass', submitForm)
- if (res.success) {
- await this.$alert('鎻愪氦鎴愬姛', '鍙嬫儏鎻愮ず')
- removeCurrentTabHandle(this)
- this.$EventBus.$emit('taskRefeshEvent', '缃戠粶鍥�')
- }
- }
+ init(row){
+ this.modelName = row.modelName
+ let modelId = row.id
+ this.dataForm.id = modelId
+ this.getDiagram(modelId)
},
- async getProject() {
- //let res = await this.$http.get(`/maintain/projectNetworkDiagram/getProjectList`)
- let res = await this.$http.get(`/homeFunction/projectSelect`)
-
- this.projectList = res.data
- if (this.$store.state.user.isAdmin || this.$store.state.user.isAssistant) {
- this.projectList.push({id: '10000', name: '鏍峰紡妯℃澘'})
- }
- if (this.$route.params.projectId) {
- this.projectId = this.$route.params.projectId
- this.diagramId = this.$route.params.diagramId
- } else {
- if (this.projectList.length > 0) {
- this.projectId = this.projectList[0].id
- this.diagramId = this.projectId
- console.log(this.diagramId, '123456789')
- }
- }
- await this.projectChange2(this.diagramId)
- },
-
- /* projectChange() {
- // alert(555)
- this.projectChange2(this.projectId)
- },
-
- async projectChange2(diagramId) {
- // alert(1)
+ async getDiagram(modelId) {
let params = {
- wfIdCodes: 'wltFlow',
- bizId: this.projectId,
- stepIdMark: 'wlt_pz'
- }
- this.$http.get(`/wf/getFlowStepStatus`, {params: params}).then(res => {
- console.log(res, 'getFlowStepStatus res')
- if (res.data) {
- this.flowInfo = res.data
- }
- })
-
- this.diagramName = ''
- this.dataForm.projectId = this.projectId
- this.dataForm.diagramId = diagramId
- this.diagramId = diagramId
- if (!this.$store.state.user.isZcRole && !this.$store.state.user.isAdmin) {
- this.diagramIdDisabled = true
- console.log(this.$store.state.user.deptId, 'this.$store.state.user.deptId')
- this.diagramId = this.$store.state.user.deptId
- this.dataForm.diagramId = this.diagramId
- } else {
- this.diagramIdDisabled = false
- }
- //this.getDiagramIdList(this.projectId)
- let res = await this.$http.get(`/maintain/projectNetworkDiagram/getDiagramCjList?projectId=${this.projectId}`)
- this.diagramList = res.data
- console.log(this.diagramList, 'this.diagramId asdfgh')
- if (this.diagramList.length > 0) {
- this.diagramId = this.diagramList[0].diagramId
- console.log(this.dataForm.diagramId, 'this.dataForm.diagramId.........................')
- }
- await this.getDiagram()
- },*/
-
-/* diagramIdChanges() {
- this.dataForm.diagramId = this.diagramId
- // this.diagramIdChange(this.diagramId)
- this.getDiagram()
- },*/
- async clearDiagram() {
- this.dataForm.id = null
- // this.graph.fromJSON(this.emptyJson)
- this.graph.fromJSON('')
- this.graph.centerContent()
- this.graph.zoomToFit()
- // this.graph.freeze()
- },
- async getDiagram() {
- let params = {
- modelId : this.dataForm.modelId
+ modelId : modelId
}
let res = await this.$http.get(`/taskReliability/ModelLine/getDiagram`, {params: params})
if (res.data !== null && res.data.content != null) {
@@ -426,9 +323,16 @@
await this.clearDiagram()
}
},
- init() {
+ async clearDiagram() {
+ this.dataForm.id = null
+ // this.graph.fromJSON(this.emptyJson)
+ this.graph.fromJSON('')
+ this.graph.centerContent()
+ this.graph.zoomToFit()
+ // this.graph.freeze()
+ },
+ initDigram() {
this.timer = setHartBeat(10, 240);
-
console.log(document.documentElement.clientWidth, 'document.documentElement.clientWidth')
console.log(document.documentElement.clientHeight, 'document.documentElement.clientHeight')
this.graph = new Graph({
--
Gitblit v1.9.1