Merge remote-tracking branch 'origin/master'
# Conflicts:
# modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java
| | |
| | | import com.zt.common.validator.group.DefaultGroup; |
| | | import com.zt.common.validator.group.UpdateGroup; |
| | | import com.zt.life.modules.mainPart.async.PythonLib; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.SimulaDataDto; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.ProductStatusDto; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.StatusDto; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.*; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.CurveParam; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.Task; |
| | |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Value("${data.reliaSimLib.resultHome}") |
| | | private String path; |
| | | |
| | | |
| | | @Autowired |
| | | private SimulatAssessService simulatAssessService; |
| | | |
| | | private JSONObject xmlJSONObj; |
| | | |
| | | |
| | | /* @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), |
| | | }) |
| | | public PageResult<SimulatAssess> page(@ApiIgnore @QueryParam QueryFilter queryFilter) { |
| | | |
| | | return PageResult.ok(simulatAssessService.page(queryFilter)); |
| | | }*/ |
| | | |
| | | @GetMapping("{id}") |
| | | @ApiOperation("ä¿¡æ¯") |
| | |
| | | |
| | | @GetMapping("getSimulatList") |
| | | @ApiOperation("ä¿¡æ¯") |
| | | public Result<List<SimulatAssess>> getSimulatList(Long productId, Long taskModelId) { |
| | | List<SimulatAssess> data = simulatAssessService.getList(productId, taskModelId); |
| | | public Result<List<SimulatAssess>> getSimulatList(Long taskModelId) { |
| | | List<SimulatAssess> data = simulatAssessService.getList(taskModelId); |
| | | |
| | | return Result.ok(data); |
| | | } |
| | |
| | | @ApiOperation("ä¿¡æ¯") |
| | | public Result<SimulatAssess> getSimulatParams(Long id, Long taskModelId) { |
| | | SimulatAssess data = simulatAssessService.getParams(id, taskModelId); |
| | | |
| | | return Result.ok(data); |
| | | } |
| | | |
| | |
| | | |
| | | @PostMapping("getResultXML") |
| | | public Result<SimulaDataDto> getResultXML(@RequestBody SimulatAssess simulatAssess) { |
| | | if (simulatAssess.getDataType().equals("fz")) { |
| | | Integer num = simulatAssessService.getNumById(simulatAssess.getProductId(), simulatAssess.getTaskModelId()); |
| | | simulatAssess.setName("仿çè®°å½" + (num + 1)); |
| | | simulatAssessService.insert(simulatAssess); |
| | | } |
| | | String filePath = path + "/" + simulatAssess.getId() + "/" + "result.xml"; |
| | | String xml = null; |
| | | InputStream in =null; |
| | | try { |
| | | in = new FileInputStream(filePath); |
| | | xml = IOUtils.toString(in); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | }finally { |
| | | try { |
| | | in.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | xmlJSONObj = XML.toJSONObject(xml); |
| | | simulatAssess.setShowProductId(simulatAssess.getProductId()); |
| | | SimulaDataDto data = this.getResultData(simulatAssess); |
| | | SimulaDataDto data = simulatAssessService.getResultXML(simulatAssess); |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @PostMapping("getResultData") |
| | | public Result<SimulaDataDto> getData(@RequestBody SimulatAssess simulatAssess) { |
| | | SimulaDataDto data = this.getResultData(simulatAssess); |
| | | SimulaDataDto data = simulatAssessService.getResultData(simulatAssess); |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | public SimulaDataDto getResultData(SimulatAssess simulatAssess) { |
| | | SimulaDataDto data = new SimulaDataDto(); |
| | | CurveParam param = new CurveParam(); |
| | | Double samplPeriod = Double.valueOf(simulatAssess.getSamplPeriod()); |
| | | Task task = taskService.get(simulatAssess.getTaskModelId()); |
| | | samplPeriod = samplPeriod / 60; |
| | | List<Double> xList = new ArrayList<>(); |
| | | for (Double i = 0.0; i + samplPeriod <= task.getTaskDuration(); i += samplPeriod) { |
| | | xList.add(i); |
| | | } |
| | | param.setXData(xList); |
| | | JSONArray jsonArray = xmlJSONObj.getJSONObject("ResultNodes").getJSONArray("ResultNode"); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | Long productId = null; |
| | | Object nameValue = jsonArray.getJSONObject(i).get("name"); |
| | | if (nameValue instanceof Long) { |
| | | productId = (Long) nameValue; |
| | | if (productId.equals(simulatAssess.getShowProductId())) { |
| | | Object object = jsonArray.getJSONObject(i).get("phase"); |
| | | List<Double> doubleArray = new ArrayList<>(); |
| | | String availability = null; |
| | | if (object instanceof JSONArray) { |
| | | JSONArray jsonArray2 = jsonArray.getJSONObject(i).getJSONArray("phase"); |
| | | for (int j = 0; j < jsonArray2.size(); j++) { |
| | | if (availability != null) { |
| | | availability = availability + " " + jsonArray2.getJSONObject(j).get("availability"); |
| | | } else { |
| | | availability = (String) jsonArray2.getJSONObject(j).get("availability"); |
| | | } |
| | | } |
| | | } else { |
| | | JSONObject jsonObject2 = jsonArray.getJSONObject(i).getJSONObject("phase"); |
| | | availability = (String) jsonObject2.get("availability"); |
| | | } |
| | | |
| | | String[] arr = availability.split(" "); |
| | | // éååå符串æ°ç»ï¼å°æ¯ä¸ªå
ç´ è½¬æ¢ä¸ºdoubleå¹¶åå¨å°doubleæ°ç»ä¸ |
| | | for (int a = 0; a < arr.length; a++) { |
| | | doubleArray.add(Double.parseDouble(arr[a])); |
| | | } |
| | | param.setYData(doubleArray); |
| | | Double mtbf = (Double) jsonArray.getJSONObject(i).get("mttf"); |
| | | Double mttr = (Double) jsonArray.getJSONObject(i).get("mttr"); |
| | | Double msr = (Double) jsonArray.getJSONObject(i).get("msr"); |
| | | data.setMtbf(mtbf); |
| | | data.setMttr(mttr); |
| | | data.setMsr(msr); |
| | | } |
| | | data.setCurveParam(param); |
| | | } |
| | | } |
| | | |
| | | return data; |
| | | } |
| | | |
| | | @GetMapping("getStatus") |
| | |
| | | return Result.ok(progress); |
| | | } |
| | | |
| | | @GetMapping("ReliabilityWeakness") |
| | | public Result<List<WeakDto>> getReliabilityWeakness(Long fzId, Long taskId, Long productId) { |
| | | List<WeakDto> data = simulatAssessService.getReliabilityWeakness(fzId, taskId, productId); |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @GetMapping("SchemeCompar") |
| | | public Result<SchemeComparDto> SchemeCompar(@RequestParam("taskList[]") String[] taskList,Long showProductId) { |
| | | SchemeComparDto data = simulatAssessService.SchemeCompar(taskList,showProductId); |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | |
| | | @PutMapping |
| | | @ApiOperation("ä¿®æ¹") |
| | | @LogOperation("ä¿®æ¹") |
| | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.ModelDto; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.ProductStatusDto; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.WeakDto; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.ModelRbd; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.SimulatAssessTaskPhaseModel; |
| | |
| | | @Mapper |
| | | public interface SimulatAssessDao extends BaseDao<SimulatAssess> { |
| | | |
| | | List<SimulatAssess> getList(Long productId, Long taskModelId); |
| | | List<SimulatAssess> getList(Long taskModelId); |
| | | |
| | | |
| | | Integer getNumById(Long productId, Long taskModelId); |
| | |
| | | List<SimulatAssessTaskPhaseModel> getModelList(Long productId, Long fzId); |
| | | |
| | | ModelRbd getModelByProductGk(Long gkId, Long productId); |
| | | |
| | | List<WeakDto> getProductList(Long taskId, Long productId); |
| | | |
| | | SimulatAssess getByTaskId(Long taskModelId); |
| | | } |
| | |
| | | private Double Msr; |
| | | private Long productId; |
| | | private CurveParam curveParam; |
| | | private String name; |
| | | } |
| | |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.XML; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.spire.pdf.tables.table.convert.Convert; |
| | | import com.zt.common.exception.RenException; |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.common.servlet.Result; |
| | | import com.zt.common.utils.TreeUtils; |
| | | import com.zt.common.utils.UUIDUtil; |
| | | import com.zt.life.modules.mainPart.basicInfo.dao.ParamDataDao; |
| | | import com.zt.life.modules.mainPart.basicInfo.dao.XhProductModelDao; |
| | | import com.zt.life.modules.mainPart.basicInfo.model.ParamData; |
| | | import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel; |
| | | import com.zt.life.modules.mainPart.basicInfo.service.XhProductModelService; |
| | | import com.zt.life.modules.mainPart.taskReliability.dao.*; |
| | | import com.zt.common.utils.JsonUtils2; |
| | | import com.zt.life.modules.mainPart.taskReliability.dao.SimulatAssessDao; |
| | | import com.zt.life.modules.mainPart.taskReliability.dao.TimeDiagramDao; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.*; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.ProductStatusDto; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.TaskModelCheckResultDto; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.TaskPhaseConstraintDto; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.*; |
| | | import com.zt.life.modules.mainPart.utils.GetStringSpace; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.dom4j.Document; |
| | | import org.dom4j.DocumentHelper; |
| | | import org.dom4j.Element; |
| | |
| | | import org.dom4j.io.XMLWriter; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.zt.life.modules.mainPart.taskReliability.dto.StatusDto; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.ModelRbd; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.SimulatAssessTaskPhaseModel; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.InputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.io.StringWriter; |
| | | import java.io.*; |
| | | import java.util.*; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private TaskPhaseService taskPhaseService; |
| | | private XhProductModelService xhProductModelService; |
| | | @Autowired |
| | | private SimulatAssessTaskPhaseModelService simulatAssessTaskPhaseModelService; |
| | | @Autowired |
| | |
| | | Map<String, JSONObject> templetsMap = new HashMap<>(); |
| | | Map<String, String> templetsStrMap = new HashMap<>(); |
| | | |
| | | private JSONObject xmlJSONObj; |
| | | |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | |
| | | return baseDao.getNumById(productId, taskModelId); |
| | | } |
| | | |
| | | public List<SimulatAssess> getList(Long productId, Long taskModelId) { |
| | | return baseDao.getList(productId, taskModelId); |
| | | public List<SimulatAssess> getList(Long taskModelId) { |
| | | return baseDao.getList(taskModelId); |
| | | } |
| | | |
| | | public SimulatAssess getByTaskId(Long taskModelId) { |
| | | return baseDao.getByTaskId(taskModelId); |
| | | } |
| | | |
| | | public SimulatAssess getParams(Long id, Long taskModelId) { |
| | |
| | | |
| | | return repairModel; |
| | | } |
| | | |
| | | public List<WeakDto> getReliabilityWeakness(Long fzId, Long taskId, Long productId) { |
| | | String filePath = path + "/" + fzId + "/" + "result.xml"; |
| | | List<WeakDto> list = new ArrayList<>(); |
| | | Map<Long, WeakDto> map = new HashMap<>(); |
| | | String xml = null; |
| | | InputStream in = null; |
| | | try { |
| | | in = new FileInputStream(filePath); |
| | | xml = IOUtils.toString(in); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | try { |
| | | in.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | List<WeakDto> productList = baseDao.getProductList(taskId, productId); |
| | | for (WeakDto dto : productList) { |
| | | map.put(dto.getId(), dto); |
| | | } |
| | | JSONObject xmlJSONObj = XML.toJSONObject(xml); |
| | | JSONArray jsonArray = xmlJSONObj.getJSONObject("ResultNodes").getJSONArray("ResultNode"); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | WeakDto data = new WeakDto(); |
| | | Long productId1 = null; |
| | | Object nameValue = jsonArray.getJSONObject(i).get("name"); |
| | | if (nameValue instanceof Long) { |
| | | productId1 = (Long) nameValue; |
| | | WeakDto weakDto = map.get(productId1); |
| | | Double mtbfTime = null; |
| | | |
| | | Double mtbf = (Double) jsonArray.getJSONObject(i).get("mttf"); |
| | | Double mttr = (Double) jsonArray.getJSONObject(i).get("mttr"); |
| | | Double msr = (Double) jsonArray.getJSONObject(i).get("msr"); |
| | | |
| | | data.setMtbf(mtbf); |
| | | data.setMttr(mttr); |
| | | data.setMsr(msr); |
| | | |
| | | if (weakDto != null) { |
| | | data.setId(weakDto.getId()); |
| | | data.setSort(weakDto.getSort()); |
| | | data.setPid(weakDto.getPid()); |
| | | data.setName(weakDto.getName()); |
| | | data.setProductType(weakDto.getProductType()); |
| | | data.setTimeRate(weakDto.getTimeRate()); |
| | | mtbfTime = mtbf / weakDto.getTimeRate(); |
| | | } |
| | | |
| | | data.setMtbfTime(mtbfTime); |
| | | data.setIsWeak(0); |
| | | |
| | | list.add(data); |
| | | } |
| | | } |
| | | List<WeakDto> treeList = TreeUtils.build(list); |
| | | this.getIsweak(treeList.get(0).getChildren()); |
| | | return treeList; |
| | | } |
| | | |
| | | private void getIsweak(List<WeakDto> treeList) { |
| | | WeakDto minDto = null; |
| | | for (WeakDto dto : treeList) { |
| | | if (dto.getProductType() == 10) |
| | | continue; |
| | | if (minDto == null) { |
| | | minDto = dto; |
| | | } |
| | | if (dto.getMtbfTime() < minDto.getMtbfTime()) { |
| | | minDto = dto; |
| | | } |
| | | } |
| | | minDto.setIsWeak(1); |
| | | if (minDto.getChildren().size() > 0) { |
| | | this.getIsweak(minDto.getChildren()); |
| | | } |
| | | } |
| | | |
| | | public SchemeComparDto SchemeCompar(String[] taskList, Long showProductId) { |
| | | SchemeComparDto dto = new SchemeComparDto(); |
| | | List<SimulaDataDto> dataDtoList = new ArrayList<>(); |
| | | List<SchemeComparCurve> curveList = new ArrayList<>(); |
| | | List<Double> xData = new ArrayList<>(); |
| | | SimulatAssess simulatAssess; |
| | | SimulaDataDto data; |
| | | |
| | | Task task; |
| | | for (String taskId : taskList) { |
| | | Long taskModelId = Long.parseLong(taskId); |
| | | task = taskService.get(taskModelId); |
| | | simulatAssess = this.getByTaskId(taskModelId); |
| | | SimulaDataDto resultData; |
| | | if (showProductId!=null){ |
| | | simulatAssess.setShowProductId(showProductId); |
| | | resultData =this.getResultData(simulatAssess); |
| | | }else{ |
| | | resultData = this.getResultXML(simulatAssess); |
| | | } |
| | | |
| | | data = resultData; |
| | | data.setName(task.getTaskName()); |
| | | dataDtoList.add(data); |
| | | xData = resultData.getCurveParam().getXData(); |
| | | |
| | | SchemeComparCurve curve = new SchemeComparCurve(); |
| | | curve.setName(task.getTaskName()); |
| | | curve.setSmooth(true); |
| | | curve.setType("line"); |
| | | curve.setData(resultData.getCurveParam().getYData()); |
| | | curveList.add(curve); |
| | | } |
| | | dto.setXDataList(xData); |
| | | dto.setDataList(dataDtoList); |
| | | dto.setCurveList(curveList); |
| | | return dto; |
| | | } |
| | | |
| | | public SimulaDataDto getResultXML(SimulatAssess simulatAssess) { |
| | | if (simulatAssess.getDataType() != null && simulatAssess.getDataType().equals("fz")) { |
| | | Integer num = this.getNumById(simulatAssess.getProductId(), simulatAssess.getTaskModelId()); |
| | | simulatAssess.setName("仿çè®°å½" + (num + 1)); |
| | | this.insert(simulatAssess); |
| | | } |
| | | String filePath = path + "/" + simulatAssess.getId() + "/" + "result.xml"; |
| | | String xml = null; |
| | | InputStream in = null; |
| | | try { |
| | | in = new FileInputStream(filePath); |
| | | xml = IOUtils.toString(in); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | try { |
| | | in.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | xmlJSONObj = XML.toJSONObject(xml); |
| | | simulatAssess.setShowProductId(simulatAssess.getProductId()); |
| | | SimulaDataDto data = this.getResultData(simulatAssess); |
| | | return data; |
| | | } |
| | | |
| | | public SimulaDataDto getResultData(SimulatAssess simulatAssess) { |
| | | SimulaDataDto data = new SimulaDataDto(); |
| | | CurveParam param = new CurveParam(); |
| | | Double samplPeriod = Double.valueOf(simulatAssess.getSamplPeriod()); |
| | | samplPeriod = samplPeriod / 60; |
| | | JSONArray jsonArray = xmlJSONObj.getJSONObject("ResultNodes").getJSONArray("ResultNode"); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | Long productId = null; |
| | | Object nameValue = jsonArray.getJSONObject(i).get("name"); |
| | | if (nameValue instanceof Long) { |
| | | productId = (Long) nameValue; |
| | | if (productId.equals(simulatAssess.getShowProductId())) { |
| | | Object object = jsonArray.getJSONObject(i).get("phase"); |
| | | List<Double> doubleArray = new ArrayList<>(); |
| | | List<Double> xList = new ArrayList<>(); |
| | | String availability = null; |
| | | if (object instanceof JSONArray) { |
| | | JSONArray jsonArray2 = jsonArray.getJSONObject(i).getJSONArray("phase"); |
| | | for (int j = 0; j < jsonArray2.size(); j++) { |
| | | if (availability != null) { |
| | | availability = availability + " " + jsonArray2.getJSONObject(j).get("availability"); |
| | | } else { |
| | | availability = (String) jsonArray2.getJSONObject(j).get("availability"); |
| | | } |
| | | } |
| | | } else { |
| | | JSONObject jsonObject2 = jsonArray.getJSONObject(i).getJSONObject("phase"); |
| | | availability = (String) jsonObject2.get("availability"); |
| | | } |
| | | |
| | | String[] arr = availability.split(" "); |
| | | // éååå符串æ°ç»ï¼å°æ¯ä¸ªå
ç´ è½¬æ¢ä¸ºdoubleå¹¶åå¨å°doubleæ°ç»ä¸ |
| | | Double j = 0.0; |
| | | for (int a = 0; a < arr.length; a++) { |
| | | j = samplPeriod + j; |
| | | doubleArray.add(Double.parseDouble(arr[a])); |
| | | xList.add(j); |
| | | } |
| | | |
| | | param.setXData(xList); |
| | | param.setYData(doubleArray); |
| | | Double mtbf = (Double) jsonArray.getJSONObject(i).get("mttf"); |
| | | Double mttr = (Double) jsonArray.getJSONObject(i).get("mttr"); |
| | | Double msr = (Double) jsonArray.getJSONObject(i).get("msr"); |
| | | data.setMtbf(mtbf); |
| | | data.setMttr(mttr); |
| | | data.setMsr(msr); |
| | | } |
| | | data.setCurveParam(param); |
| | | } |
| | | } |
| | | return data; |
| | | } |
| | | } |
| | |
| | | <select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess"> |
| | | select id, CONCAT_WS(' ', name, CREATE_DATE) AS name |
| | | from simulat_assess |
| | | where product_id = ${productId} |
| | | and task_model_id = ${taskModelId} |
| | | where task_model_id = ${taskModelId} |
| | | and IS_DELETE = 0 |
| | | order by CREATE_DATE desc |
| | | </select> |
| | |
| | | and b.is_delete = 0 |
| | | limit 1 |
| | | </select> |
| | | <select id="getProductList" resultType="com.zt.life.modules.mainPart.taskReliability.dto.WeakDto"> |
| | | SELECT id, |
| | | pid, |
| | | NAME, |
| | | product_type, |
| | | sum(timeRate) AS timeRate, |
| | | sort |
| | | FROM ( |
| | | SELECT f.id, |
| | | null as pid, |
| | | f.NAME, |
| | | f.product_type, |
| | | 1 AS timeRate, |
| | | 0 AS sort |
| | | FROM product_model f |
| | | WHERE f.id = ${productId} |
| | | AND f.is_delete = 0 |
| | | UNION |
| | | SELECT f.id, |
| | | f.pid, |
| | | f.NAME, |
| | | f.product_type, |
| | | CASE |
| | | |
| | | WHEN f.product_type = 5 |
| | | AND g.reliab_distrib_type = 1 THEN |
| | | a.phase_duration_rate * b.operat_condit_duration_rate * g.task_mtbcf_operating_ratio |
| | | ELSE a.phase_duration_rate * b.operat_condit_duration_rate |
| | | END AS timeRate, |
| | | f.sort |
| | | FROM `task_phase` a, |
| | | task_phase_model b, |
| | | operat_condit c, |
| | | operat_condit_model d, |
| | | model_rbd_node e, |
| | | product_model f |
| | | left join param_data g on g.product_id = f.id |
| | | AND g.IS_DELETE = 0 |
| | | WHERE a.task_id = ${taskId} |
| | | AND b.phase_id = a.id |
| | | AND b.is_delete = 0 |
| | | AND a.is_delete = 0 |
| | | AND b.is_delete = 0 |
| | | AND c.id = b.operat_condit_id |
| | | AND c.is_delete = 0 |
| | | AND d.operat_condit_id = c.id |
| | | AND d.is_delete = 0 |
| | | AND e.model_id = d.model_id |
| | | AND e.is_delete = 0 |
| | | AND f.id = e.node_id |
| | | AND f.ship_id = ${productId} |
| | | AND f.is_delete = 0 |
| | | ) b |
| | | GROUP BY id |
| | | order by sort |
| | | </select> |
| | | <select id="getByTaskId" resultType="com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess"> |
| | | select * |
| | | from simulat_assess |
| | | where task_model_id = ${taskModelId} |
| | | and IS_DELETE = 0 |
| | | order by CREATE_DATE desc |
| | | limit 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | <span v-else v-text="scope.row.basicMtbfAccept"></span> |
| | | </template> |
| | | </el-table-column>--> |
| | | <el-table-column prop="basicMtbfRegulSuccRate" :key="9" label="MTBFæåç" align="right"> |
| | | <el-table-column prop="basicMtbfRegulSuccRate" :key="9" label="æåç" align="right"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfRegulSuccRate"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfRegulSuccRate"></span> |
| | |
| | | <span v-else v-text="scope.row.basicRunsNum"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="basicMtbfOperatingRatio" :key="13" label="MTBFè¿è¡æ¯" align="right"> |
| | | <el-table-column prop="basicMtbfOperatingRatio" :key="13" label="è¿è¡æ¯" align="right"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfOperatingRatio"></el-input> |
| | | <span v-else v-text="scope.row.basicMtbfOperatingRatio"></span> |
| | |
| | | <span v-else v-text="scope.row.taskMtbcfAccept"></span> |
| | | </template> |
| | | </el-table-column>--> |
| | | <el-table-column prop="taskMtbcfRegulSuccRate" :key="18" label="MTBCFæåç" align="right"> |
| | | <el-table-column prop="taskMtbcfRegulSuccRate" :key="18" label="æåç" align="right"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfRegulSuccRate"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfRegulSuccRate"></span> |
| | |
| | | <span v-else v-text="scope.row.taskMtbcfAcceptSuccRate"></span> |
| | | </template> |
| | | </el-table-column>--> |
| | | <el-table-column prop="taskMtbcfOperatingRatio" :key="20" label="MTBCFè¿è¡æ¯" align="right"> |
| | | <el-table-column prop="taskMtbcfOperatingRatio" :key="20" label="è¿è¡æ¯" align="right"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOperatingRatio"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfOperatingRatio"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfOtherParams2" :key="21" label="MTBCFå
¶ä»åæ°2" align="right"> |
| | | <el-table-column prop="taskMtbcfOtherParams2" :key="21" label="å
¶ä»åæ°2" align="right"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOtherParams2"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfOtherParams2"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskMtbcfOtherParams3" :key="30" label="MTBCFå
¶ä»åæ°3" align="right"> |
| | | <el-table-column prop="taskMtbcfOtherParams3" :key="30" label="å
¶ä»åæ°3" align="right"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOtherParams3"></el-input> |
| | | <span v-else v-text="scope.row.taskMtbcfOtherParams3"></span> |
| | |
| | | <span v-else>{{scope.row.repairMttcr | keepNumber}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="repairMttcrOtherParams2" :key="26" label="MTTCRå
¶ä»åæ°2" align="right"> |
| | | <el-table-column prop="repairMttcrOtherParams2" :key="26" label="å
¶ä»åæ°2" align="right"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcrOtherParams2"></el-input> |
| | | <span v-else v-text="scope.row.repairMttcrOtherParams2"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="repairMttcrOtherParams3" :key="27" label="MTTCRå
¶ä»åæ°3" align="right"> |
| | | <el-table-column prop="repairMttcrOtherParams3" :key="27" label="å
¶ä»åæ°3" align="right"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcrOtherParams3"></el-input> |
| | | <span v-else v-text="scope.row.repairMttcrOtherParams3"></span> |
| | |
| | | reliabDistribType: '' |
| | | }, |
| | | isOrNot: [{ |
| | | value: 0, |
| | | label: 'å¦' |
| | | },{ |
| | | value: 1, |
| | | label: 'æ¯' |
| | | }], |
| | |
| | | <el-form-item> |
| | | <zt-button v-if="productType && productType!=='10'" type="query" @click="table.query()"/> |
| | | <zt-button v-if="productType && productType!=='10'" type="add" @click="add()"/> |
| | | <zt-button v-if="productType==='1'" size="small" type="primary" @click="exportProduct()">å¯¼åºæ¨¡æ¿ |
| | | <zt-button v-if="productType==='1'" size="small" type="primary" @click="exportProduct()">ä¸è½½æ¨¡æ¿ |
| | | </zt-button> |
| | | <zt-button v-if="productType==='3'" type="primary" @click="addCell()">æ°å¢èåå
</zt-button> |
| | | <zt-button v-if="productType && productType!=='10'" type="delete" @click="table.deleteHandle()"/> |
New file |
| | |
| | | <template> |
| | | <div> |
| | | <div class="mod-baseReliability-paramDataBasic fa-card-a" style="margin-left: 5px;"> |
| | | <zt-table-wraper :defaultNotQuery='true' ref="tableObj" v-slot="{ table }" :paging='false'> |
| | | <el-form :inline="true" :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="80px"> |
| | | <zt-form-item label="产åèç¹" prop="productId"> |
| | | <zt-select v-model="dataForm.productId" :datas="productList" @change="onProductSelected"/> |
| | | </zt-form-item> |
| | | <zt-form-item label="è¯éªæ¹æ¡" prop="taskModelId"> |
| | | <zt-select v-model="dataForm.taskModelId" :datas="taskList" @change="onTaskSelected"/> |
| | | </zt-form-item> |
| | | <zt-form-item label="仿çè®°å½" prop="simulatHis"> |
| | | <zt-select v-model="dataForm.fzId" :datas="simulatList" @change="onSimulatSelected"/> |
| | | </zt-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="dataList" height="100px" v-adaptive="{bottomOffset:70}" |
| | | row-key="id" |
| | | :expand-row-keys="defultKey" |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
| | | :header-cell-style="{'text-align':'center'}" |
| | | :row-style="rowStyle" |
| | | border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column prop="name" label="åç§°"/> |
| | | <el-table-column prop="mtbf" label="MTBF" align="right"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ keepNumber(scope.row.mtbf) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="mttr" label="MTTR" align="right"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ keepNumber(scope.row.mttr) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="msr" label="任塿å度" align="right"> |
| | | <template slot-scope="scope"> |
| | | <span>{{keepNumber(scope.row.msr) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="timeRate" label="任塿¶é´æ¯" align="right"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ keepNumber(scope.row.timeRate) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | productList: [], |
| | | simulatList: [], |
| | | dataList: [], |
| | | taskList: [], |
| | | dataForm: { |
| | | name: '', |
| | | fzId: '', |
| | | shipId: '', |
| | | mtbf: '', |
| | | mttr: '', |
| | | msr: '', |
| | | timeRate: '' |
| | | }, |
| | | defultKey: [] |
| | | } |
| | | }, |
| | | computed: { |
| | | keepNumber() { //è¿æ»¤å¨ä¿ç4ä¸ºå°æ° |
| | | return function (val) { // 对计ç®å±æ§è¿è¡ä¼ å |
| | | const numM = Number(val).toFixed(5); |
| | | return numM.substring(0, numM.length - 1); |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getProductList() |
| | | }, |
| | | methods: { |
| | | async getProductList() { |
| | | let res = await this.$http.get('/basicInfo/XhProductModel/getTaskProductList') |
| | | this.productList = res.data |
| | | this.onProductSelected(this.productList[0]) |
| | | }, |
| | | async getTaskList() { |
| | | let params = { |
| | | productId: this.dataForm.productId |
| | | } |
| | | let res = await this.$http.get('/taskReliability/Task/getTaskList', {params: params}) |
| | | console.log(res.data) |
| | | this.taskList = res.data |
| | | this.onTaskSelected(this.taskList[0]) |
| | | }, |
| | | async getSimulatList() { |
| | | let params = { |
| | | productId: this.dataForm.productId, |
| | | taskModelId: this.dataForm.taskModelId |
| | | } |
| | | let res = await this.$http.get('/taskReliability/SimulatAssess/getSimulatList', {params: params}) |
| | | console.log(res.data) |
| | | this.simulatList = res.data |
| | | this.$nextTick(() => { |
| | | this.onSimulatSelected(this.simulatList[0]) |
| | | }) |
| | | }, |
| | | // è·åä¿¡æ¯ |
| | | onProductSelected(data) { |
| | | this.isSelect = true |
| | | console.log(data, ' onProductSelected(data)') |
| | | this.dataForm.productId = data.id |
| | | this.getTaskList() |
| | | this.dataForm.taskModelId = '' |
| | | }, |
| | | onTaskSelected(data) { |
| | | console.log(data, ' onProductSelected(data)') |
| | | this.dataForm.taskModelId = data.id |
| | | this.getSimulatList() |
| | | this.dataForm.fzId = '' |
| | | }, |
| | | setDefultKey() { |
| | | this.defultKey.push(this.dataForm.productId + "") |
| | | }, |
| | | async onSimulatSelected(data) { |
| | | this.dataForm.fzId = data.id |
| | | this.dataForm.samplPeriod = data.samplPeriod |
| | | let params = { |
| | | fzId: this.dataForm.fzId, |
| | | taskId:this.dataForm.taskModelId, |
| | | productId:this.dataForm.productId |
| | | } |
| | | let res = await this.$http.get('/taskReliability/SimulatAssess/ReliabilityWeakness', {params: params}) |
| | | this.dataList = res.data |
| | | this.setDefultKey() |
| | | console.log(this.dataList) |
| | | }, |
| | | rowStyle({row,rowIndex}) { |
| | | console.log(row) |
| | | if (row.isWeak===1){ |
| | | console.log(row.isWeak,"console.log(row)") |
| | | return {color: 'red'} |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <zt-select v-model="dataForm.productId" :datas="productList" @change="onProductSelected"/> |
| | | </zt-form-item> |
| | | <zt-form-item label="å¯é æ§æ¹æ¡" prop="taskModelId" width="500px"> |
| | | <zt-select style="width: 400px" v-model="dataForm.name" :datas="schemeList" |
| | | @change="onSchemeSelected" :multiple="true"/> |
| | | <zt-select style="width: 400px" v-model="dataForm.taskModelId" :datas="schemeList" |
| | | @change="onTaskSelected" :multiple="true"/> |
| | | </zt-form-item> |
| | | <zt-form-item> |
| | | <zt-button @click="compair()">æ¹æ¡å¯¹æ¯</zt-button> |
| | |
| | | <el-button v-if="!isZk" type="info" size="small" icon="el-icon-caret-right" |
| | | style="position: absolute;right: 10%;top: 10%;z-index: 1" @click="zk()"></el-button> |
| | | <div v-if="isZk" style="position: absolute;right: 10%;top: 15%"> |
| | | <el-table :data="tableData" border style="width: 400px"> |
| | | <el-table :data="tableData" border style="width: 500px"> |
| | | <el-table-column |
| | | prop="name" |
| | | label="æ¹æ¡åç§°" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="MTBF" |
| | | prop="mtbf" |
| | | label="MTBF" |
| | | width="80px" |
| | | width="100px" |
| | | align="right"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ keepNumber(scope.row.mtbf) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="MTTR" |
| | | prop="mttr" |
| | | label="MTTR" |
| | | width="80px" |
| | | width="100px" |
| | | align="right"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ keepNumber(scope.row.mttr) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="MSR" |
| | | prop="msr" |
| | | label="MSR" |
| | | width="80px" |
| | | width="100px" |
| | | align="right"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ keepNumber(scope.row.mttr) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | isShow: false, |
| | | isZk: true, |
| | | productList: [], |
| | | schemeList: [ |
| | | { |
| | | id: 1, |
| | | name: 'æ¹æ¡ä¸' |
| | | }, { |
| | | id: 2, |
| | | name: 'æ¹æ¡äº' |
| | | }, { |
| | | id: 3, |
| | | name: 'æ¹æ¡ä¸' |
| | | } |
| | | ], |
| | | schemeList: [], |
| | | dataForm: { |
| | | id: '', |
| | | name: [], |
| | | taskModelId: [], |
| | | productId: '', |
| | | showProductId: '', |
| | | taskModelId: '', |
| | | dataType: 'fz', |
| | | }, |
| | | tableData: [ |
| | | { |
| | | name: 'æ¹æ¡ä¸', |
| | | MTBF: '68.74', |
| | | MTTR: '0.43', |
| | | MSR: '0.85' |
| | | }, { |
| | | name: 'æ¹æ¡äº', |
| | | MTBF: '78.74', |
| | | MTTR: '0.52', |
| | | MSR: '0.86' |
| | | }, { |
| | | name: 'æ¹æ¡ä¸', |
| | | MTBF: '69.84', |
| | | MTTR: '0.62', |
| | | MSR: '0.88' |
| | | } |
| | | ], |
| | | xDataList: [], |
| | | seriesList: [], |
| | | tableData: [], |
| | | taskList: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getProductList() |
| | | }, |
| | | computed: { |
| | | keepNumber() { //è¿æ»¤å¨ä¿ç4ä¸ºå°æ° |
| | | return function (val) { // 对计ç®å±æ§è¿è¡ä¼ å |
| | | const numM = Number(val).toFixed(5); |
| | | return numM.substring(0, numM.length - 1); |
| | | } |
| | | }, |
| | | }, |
| | | components: { |
| | | ProductModelTree, |
| | | }, |
| | | |
| | | methods: { |
| | | onTreeSelected(data) { |
| | | if (this.dataForm.id) { |
| | | async onTreeSelected(data) { |
| | | if (this.dataForm.taskModelId) { |
| | | console.log(data, 'onProductSelected') |
| | | this.dataForm.showProductId = data.id |
| | | this.$refs.SimulatCurve.getProductEcharts(this.dataForm); |
| | | let params = { |
| | | taskList: this.dataForm.taskModelId, |
| | | showProductId: this.dataForm.showProductId |
| | | } |
| | | console.log(this.dataForm.taskModelId, 'this.dataForm.taskModelId') |
| | | let res = await this.$http.get('/taskReliability/SimulatAssess/SchemeCompar', {params: params}) |
| | | console.log(res.data, "res") |
| | | this.xDataList = res.data.xdataList |
| | | this.seriesList = res.data.curveList |
| | | this.tableData = res.data.dataList |
| | | |
| | | } |
| | | }, |
| | | // è·åä¿¡æ¯ |
| | |
| | | this.isSelect = true |
| | | console.log(data, ' onProductSelected(data)') |
| | | this.dataForm.productId = data.id |
| | | this.getTaskList() |
| | | this.$nextTick(() => { |
| | | this.$refs.ProductModelTree.getProductList() |
| | | }) |
| | | }, |
| | | onSchemeSelected() { |
| | | console.log(this.dataForm.name) |
| | | onTaskSelected(data) { |
| | | console.log(data, 'onTaskSelected(data)') |
| | | for (let item of data) { |
| | | this.taskList.push(item.name) |
| | | } |
| | | }, |
| | | zk() { |
| | | this.isZk = !this.isZk; |
| | |
| | | this.productList = res.data |
| | | this.onProductSelected(this.productList[0]) |
| | | }, |
| | | compair() { |
| | | async getTaskList() { |
| | | let params = { |
| | | productId: this.dataForm.productId |
| | | } |
| | | let res = await this.$http.get('/taskReliability/Task/getTaskList', {params: params}) |
| | | console.log(res.data) |
| | | this.schemeList = res.data |
| | | }, |
| | | async compair() { |
| | | let params = { |
| | | taskList: this.dataForm.taskModelId, |
| | | showProductId: null |
| | | } |
| | | console.log(this.dataForm.taskModelId, 'this.dataForm.taskModelId') |
| | | let res = await this.$http.get('/taskReliability/SimulatAssess/SchemeCompar', {params: params}) |
| | | console.log(res.data, "res") |
| | | this.xDataList = res.data.xdataList |
| | | this.seriesList = res.data.curveList |
| | | this.tableData = res.data.dataList |
| | | |
| | | |
| | | this.isShow = true |
| | | this.option = { |
| | | xAxis: { |
| | | data: [0.0, 50.0, 100.0, 150.0, 200.0, 250.0, 300.0, 350.0, 400.0, 450.0, 500.0, 550.0], |
| | | data: this.xDataList, |
| | | name: 'ä»¿çæ»æ¶é¿' |
| | | }, |
| | | yAxis: { |
| | |
| | | name: 'å¯é 度', |
| | | }, |
| | | legend: { |
| | | data: ['æ¹æ¡ä¸', 'æ¹æ¡äº', 'æ¹æ¡ä¸'] |
| | | data: this.taskList |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'æ¹æ¡ä¸', |
| | | type: 'line', |
| | | smooth: true, |
| | | data: [1.0, 0.6, 0.39, 0.39, 0.24, 0.14, 0.08, 0.06, 0.06, 0.04, 0.02, 0.01, 0.01, 0.0, 0.0] |
| | | }, |
| | | { |
| | | name: 'æ¹æ¡äº', |
| | | type: 'line', |
| | | smooth: true, |
| | | data: [1.0, 0.8, 0.59, 0.58, 0.34, 0.35, 0.18, 0.16, 0.16, 0.04, 0.04, 0.02, 0.01, 0.1, 0.0] |
| | | }, |
| | | { |
| | | name: 'æ¹æ¡ä¸', |
| | | type: 'line', |
| | | smooth: true, |
| | | data: [1.0, 0.7, 0.45, 0.44, 0.38, 0.38, 0.15, 0.08, 0.08, 0.02, 0.02, 0.01, 0.01, 0.1, 0.0] |
| | | } |
| | | ] |
| | | series: this.seriesList |
| | | }; |
| | | this.myChart = echart.init(document.getElementById("myChart")); |
| | | console.log(this.option, ' this.option ') |
| | |
| | | <zt-form-item label="æ»ä½ä»»å¡" prop="taskModelId"> |
| | | <zt-select v-model="dataForm.taskModelId" :datas="taskList" @change="onTaskSelected"/> |
| | | </zt-form-item> |
| | | <zt-form-item label="éæ ·å¨æ" prop="samplPeriod"> |
| | | <zt-form-item label="æ¶é´åç" prop="samplPeriod"> |
| | | <el-input type="number" :min="1" v-model="dataForm.samplPeriod"> |
| | | <template slot="append">åé</template> |
| | | </el-input> |
| | |
| | | } |
| | | this.option = { |
| | | title: { |
| | | text: "mttr:" + this.mttr + " mtbf:" + this.mtbf+ " msr:" + this.msr, |
| | | text: "mtbf:" + this.mtbf + " mttr:" + this.mttr + " msr:" + this.msr, |
| | | textStyle: { // 主æ é¢ææ¬æ ·å¼{"fontSize": 18,"fontWeight": "bolder","color": "#333"} |
| | | fontFamily: 'Arial', |
| | | fontSize: 30, |
| | |
| | | } |
| | | this.option = { |
| | | title: { |
| | | text: "mttr:" + this.mttr + " mtbf:" + this.mtbf+ " msr:" + this.msr, |
| | | text: "mtbf:" + this.mtbf + " mttr:" + this.mttr + " msr:" + this.msr, |
| | | textStyle: { // 主æ é¢ææ¬æ ·å¼{"fontSize": 18,"fontWeight": "bolder","color": "#333"} |
| | | fontFamily: 'Arial', |
| | | fontSize: 30, |
| | |
| | | <zt-form-item label="仿çè®°å½" prop="simulatHis"> |
| | | <zt-select v-model="dataForm.id" :datas="simulatList" @change="onSimulatSelected"/> |
| | | </zt-form-item> |
| | | <zt-form-item label="éæ ·å¨æ" prop="samplPeriod"> |
| | | <zt-form-item label="æ¶é´åç" prop="samplPeriod"> |
| | | <el-input v-model="dataForm.samplPeriod" readonly="false"> |
| | | <template slot="append">åé</template> |
| | | </el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="ä»¿çæ¬¡æ°" prop="simulatFrequency"> |
| | |
| | | <el-col :span="4"> |
| | | <div style="margin-right: 5px;height: calc(88vh - 100px)" v-if="isSelect"> |
| | | <product-model-tree @on-selected="onTreeSelected" showXdy="false" |
| | | ref="ProductModelTree" :isShow="false" basic="4" :productId="dataForm.productId"/> |
| | | ref="ProductModelTree" :isShow="false" basic="5" :productId="dataForm.productId"/> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | |
| | | }, |
| | | async getSimulatList() { |
| | | let params = { |
| | | productId: this.dataForm.productId, |
| | | taskModelId: this.dataForm.taskModelId |
| | | } |
| | | let res = await this.$http.get('/taskReliability/SimulatAssess/getSimulatList', {params: params}) |
| | |
| | | <div class="fa-card-a"> |
| | | <el-row :gutter="5"> |
| | | <div class="mod-taskReliability-simulatAssess"> |
| | | <el-form :inline="true" :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="80px"> |
| | | <el-form :inline="true" :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" > |
| | | <zt-form-item label="产åèç¹" prop="productId"> |
| | | <zt-select v-model="dataForm.productId" :datas="productList" @change="onProductSelected"/> |
| | | </zt-form-item> |
| | |
| | | <zt-form-item label="仿çè®°å½" prop="simulatHis"> |
| | | <zt-select v-model="dataForm.id" :datas="simulatList" @change="onSimulatSelected"/> |
| | | </zt-form-item> |
| | | <zt-form-item label="éæ ·å¨æ" prop="samplPeriod"> |
| | | <zt-form-item label="æ¶é´åç" prop="samplPeriod"> |
| | | <el-input v-model="dataForm.samplPeriod" readonly="false"> |
| | | <template slot="append">åé</template> |
| | | </el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="ä»¿çæ¬¡æ°" prop="simulatFrequency"> |
| | |
| | | }, |
| | | async getSimulatList() { |
| | | let params = { |
| | | productId: this.dataForm.productId, |
| | | taskModelId: this.dataForm.taskModelId |
| | | } |
| | | let res = await this.$http.get('/taskReliability/SimulatAssess/getSimulatList', {params: params}) |