| | |
| | | @Autowired |
| | | private SimulatAssessService simulatAssessService; |
| | | |
| | | |
| | | /* @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("信息") |
| | | public Result<SimulatAssess> get(@PathVariable("id") Long id) { |
| | |
| | | } |
| | | |
| | | @GetMapping("SchemeCompar") |
| | | public Result<SchemeComparDto> SchemeCompar(@RequestParam("taskList[]") String[] taskList) { |
| | | SchemeComparDto data = simulatAssessService.SchemeCompar(taskList); |
| | | public Result<SchemeComparDto> SchemeCompar(@RequestParam("taskList[]") String[] taskList,Long showProductId) { |
| | | SchemeComparDto data = simulatAssessService.SchemeCompar(taskList,showProductId); |
| | | return Result.ok(data); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public SchemeComparDto SchemeCompar(String[] taskList) { |
| | | public SchemeComparDto SchemeCompar(String[] taskList, Long showProductId) { |
| | | SchemeComparDto dto = new SchemeComparDto(); |
| | | List<SimulaDataDto> dataDtoList = new ArrayList<>(); |
| | | List<SchemeComparCurve> curveList = new ArrayList<>(); |
| | |
| | | Long taskModelId = Long.parseLong(taskId); |
| | | task = taskService.get(taskModelId); |
| | | simulatAssess = this.getByTaskId(taskModelId); |
| | | SimulaDataDto resultData = this.getResultXML(simulatAssess); |
| | | 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); |
| | |
| | | </el-table> |
| | | </zt-table-wraper> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | <el-table-column |
| | | prop="mtbf" |
| | | label="MTBF" |
| | | width="90px" |
| | | width="100px" |
| | | align="right"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ keepNumber(scope.row.mtbf) }}</span> |
| | |
| | | <el-table-column |
| | | prop="mttr" |
| | | label="MTTR" |
| | | width="90px" |
| | | width="100px" |
| | | align="right"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ keepNumber(scope.row.mttr) }}</span> |
| | |
| | | <el-table-column |
| | | prop="msr" |
| | | label="MSR" |
| | | width="90px" |
| | | width="100px" |
| | | align="right"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ keepNumber(scope.row.mttr) }}</span> |
| | |
| | | }, |
| | | |
| | | 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 |
| | | |
| | | } |
| | | }, |
| | | // 获取信息 |
| | |
| | | }, |
| | | async compair() { |
| | | let params = { |
| | | taskList: this.dataForm.taskModelId |
| | | 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}) |
| | |
| | | </zt-form-item> |
| | | <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"> |
| | |
| | | <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> |
| | | <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"> |