| | |
| | | @ApiModelProperty(value = "å¾çåç§°") |
| | | private String operatImgName; |
| | | |
| | | private String equipType; |
| | | |
| | | @ApiModelProperty(value = "æåº") |
| | | private Integer sort; |
| | | |
| | |
| | | } |
| | | |
| | | String sb = com.zt.core.shiro.ImportUtil.getCellValue(row, 3, pattern); //è®¾å¤ |
| | | String reliabDistribType = com.zt.core.shiro.ImportUtil.getCellValue(row, 4, pattern); //å¯é æ§åå¸ç±»å |
| | | String basicJoinCompute = com.zt.core.shiro.ImportUtil.getCellValue(row, 5, pattern); //åå è®¡ç® |
| | | String basicMtbfRegulate = com.zt.core.shiro.ImportUtil.getCellValue(row, 6, pattern); //mtbf |
| | | String basicMtbfRegulSuccRate = com.zt.core.shiro.ImportUtil.getCellValue(row, 7, pattern); //æåç |
| | | String basicMtbfOperatingRatio = com.zt.core.shiro.ImportUtil.getCellValue(row, 8, pattern); //è¿è¡æ¯ |
| | | String taskMtbcfRegulate = com.zt.core.shiro.ImportUtil.getCellValue(row, 9, pattern); //mtbcf |
| | | String taskMtbcfOtherParams2 = com.zt.core.shiro.ImportUtil.getCellValue(row, 10, pattern); //mtbcfå
¶ä»åæ°2 |
| | | String taskMtbcfOtherParams3 = com.zt.core.shiro.ImportUtil.getCellValue(row, 11, pattern); //mtbcfå
¶ä»åæ°3 |
| | | String taskMtbcfRegulSuccRate = com.zt.core.shiro.ImportUtil.getCellValue(row, 12, pattern); //mtbcfæåç |
| | | String taskMtbcfOperatingRatio = com.zt.core.shiro.ImportUtil.getCellValue(row, 13, pattern); //mtbcfè¿è¡æ¯ |
| | | String repairable = com.zt.core.shiro.ImportUtil.getCellValue(row, 14, pattern); //æ¯å¦å¯ç»´ä¿® |
| | | String repairDistribType = com.zt.core.shiro.ImportUtil.getCellValue(row, 15, pattern); //ç»´ä¿®åå¸ç±»å |
| | | String repairMttcr = com.zt.core.shiro.ImportUtil.getCellValue(row, 16, pattern); //mttcr |
| | | String repairMttcrOtherParams2 = com.zt.core.shiro.ImportUtil.getCellValue(row, 17, pattern); //mttcrå
¶ä»åæ°2 |
| | | String repairMttcrOtherParams3 = com.zt.core.shiro.ImportUtil.getCellValue(row, 18, pattern); //mttcrå
¶ä»åæ°3 |
| | | String equipType = com.zt.core.shiro.ImportUtil.getCellValue(row, 4, pattern); //设å¤ç±»å |
| | | String reliabDistribType = com.zt.core.shiro.ImportUtil.getCellValue(row, 5, pattern); //å¯é æ§åå¸ç±»å |
| | | String basicJoinCompute = com.zt.core.shiro.ImportUtil.getCellValue(row, 6, pattern); //åå è®¡ç® |
| | | String basicMtbfRegulate = com.zt.core.shiro.ImportUtil.getCellValue(row, 7, pattern); //mtbf |
| | | String basicMtbfRegulSuccRate = com.zt.core.shiro.ImportUtil.getCellValue(row, 8, pattern); //æåç |
| | | String basicMtbfOperatingRatio = com.zt.core.shiro.ImportUtil.getCellValue(row, 9, pattern); //è¿è¡æ¯ |
| | | String taskMtbcfRegulate = com.zt.core.shiro.ImportUtil.getCellValue(row, 10, pattern); //mtbcf |
| | | String taskMtbcfOtherParams2 = com.zt.core.shiro.ImportUtil.getCellValue(row, 11, pattern); //mtbcfå
¶ä»åæ°2 |
| | | String taskMtbcfOtherParams3 = com.zt.core.shiro.ImportUtil.getCellValue(row, 12, pattern); //mtbcfå
¶ä»åæ°3 |
| | | String taskMtbcfRegulSuccRate = com.zt.core.shiro.ImportUtil.getCellValue(row, 13, pattern); //mtbcfæåç |
| | | String taskMtbcfOperatingRatio = com.zt.core.shiro.ImportUtil.getCellValue(row, 14, pattern); //mtbcfè¿è¡æ¯ |
| | | String repairable = com.zt.core.shiro.ImportUtil.getCellValue(row, 15, pattern); //æ¯å¦å¯ç»´ä¿® |
| | | String repairDistribType = com.zt.core.shiro.ImportUtil.getCellValue(row, 16, pattern); //ç»´ä¿®åå¸ç±»å |
| | | String repairMttcr = com.zt.core.shiro.ImportUtil.getCellValue(row, 17, pattern); //mttcr |
| | | String repairMttcrOtherParams2 = com.zt.core.shiro.ImportUtil.getCellValue(row, 18, pattern); //mttcrå
¶ä»åæ°2 |
| | | String repairMttcrOtherParams3 = com.zt.core.shiro.ImportUtil.getCellValue(row, 19, pattern); //mttcrå
¶ä»åæ°3 |
| | | |
| | | if (StringUtils.isEmpty(sb)) { |
| | | com.zt.life.util.ImportUtil.updateErrMap(errMap, "没æå¡«å设å¤åç§°", sheetName, row1); |
| | |
| | | } |
| | | //导å
¥åå·äº§åç»æåº |
| | | XhProductModel xhProductModel = new XhProductModel(); |
| | | |
| | | |
| | | Long defultImg = null; |
| | | xhProductModel.setShipId(shipId); |
| | |
| | | } |
| | | xhProductModel.setId(sbId); |
| | | xhProductModel.setName(sb); |
| | | xhProductModel.setEquipType(equipType); |
| | | xhProductModel.setProductType("5"); |
| | | xhProductModel.setSort(Integer.valueOf(sort)); |
| | | defultImg = sysPictureBaseService.getDefaultImg(5).getId(); |
| | |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @GetMapping("getSimulatParams") |
| | | @ApiOperation("ä¿¡æ¯") |
| | | public Result<List<SimulatAssess>> getSimulatParams(Long id,Long taskModelId) { |
| | | List<SimulatAssess> data = simulatAssessService.getParams(id,taskModelId); |
| | | |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @PostMapping("analyze") |
| | | public Result<Long> analyze(@RequestBody SimulatAssess simulatAssess) { |
| | | //æéªæ°æ® |
New file |
| | |
| | | package com.zt.life.modules.mainPart.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.mainPart.taskReliability.model.TaskBinoParam; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.TaskRepairParam; |
| | | import com.zt.life.modules.mainPart.taskReliability.service.TaskRepairParamService; |
| | | 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; |
| | | |
| | | |
| | | /** |
| | | * task_repair_param |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-07-26 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/taskReliability/TaskRepairParam/") |
| | | @Api(tags="task_repair_param") |
| | | public class TaskRepairParamController { |
| | | @Autowired |
| | | private TaskRepairParamService taskRepairParamService; |
| | | |
| | | @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 = "taskId", value = "ä»»å¡Id", dataType = Constant.QT.STRING), |
| | | }) |
| | | public Result<List<TaskRepairParam>> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | | |
| | | return Result.ok(taskRepairParamService.page(queryFilter)); |
| | | } |
| | | |
| | | @GetMapping("{id}") |
| | | @ApiOperation("ä¿¡æ¯") |
| | | public Result<TaskRepairParam> get(@PathVariable("id") Long id){ |
| | | TaskRepairParam data = taskRepairParamService.get(id); |
| | | |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @PostMapping("save") |
| | | public Result save(@RequestBody TaskRepairParam taskRepairParam) { |
| | | //æéªæ°æ® |
| | | for (TaskRepairParam param : taskRepairParam.getDataThreeList()) { |
| | | if (param.getId()!=null){ |
| | | taskRepairParamService.update(param); |
| | | }else{ |
| | | taskRepairParamService.insert(param); |
| | | } |
| | | } |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("æ°å¢") |
| | | @LogOperation("æ°å¢") |
| | | public Result insert(@RequestBody TaskRepairParam taskRepairParam){ |
| | | //æéªæ°æ® |
| | | ValidatorUtils.validateEntity(taskRepairParam, AddGroup.class, DefaultGroup.class); |
| | | taskRepairParamService.insert(taskRepairParam); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation("ä¿®æ¹") |
| | | @LogOperation("ä¿®æ¹") |
| | | public Result update(@RequestBody TaskRepairParam taskRepairParam){ |
| | | //æéªæ°æ® |
| | | ValidatorUtils.validateEntity(taskRepairParam, UpdateGroup.class, DefaultGroup.class); |
| | | taskRepairParamService.update(taskRepairParam); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @ApiOperation("å é¤") |
| | | @LogOperation("å é¤") |
| | | public Result delete(@RequestBody Long[] ids){ |
| | | //æéªæ°æ® |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | taskRepairParamService.delete(ids); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | Integer getNumById(Long productId, Long taskModelId); |
| | | |
| | | List<SimulatAssess> getParams(Long id, Long taskModelId); |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.mainPart.taskReliability.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.TaskRepairParam; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * task_repair_param |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-07-26 |
| | | */ |
| | | @Mapper |
| | | public interface TaskRepairParamDao extends BaseDao<TaskRepairParam> { |
| | | |
| | | List<TaskRepairParam> getList(Map<String, Object> params); |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.mainPart.taskReliability.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; |
| | | |
| | | /** |
| | | * task_repair_param |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-07-26 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | @TableName("task_repair_param") |
| | | public class TaskRepairParam extends BusiEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "ä»»å¡ID") |
| | | private Long taskId; |
| | | |
| | | @ApiModelProperty(value = "é¶æ®µid") |
| | | private Long phaseId; |
| | | |
| | | @ApiModelProperty(value = "设å¤ç±»å") |
| | | private String equipType; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ") |
| | | private Boolean status; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | private List<TaskRepairParam> dataThreeList; |
| | | |
| | | @TableField(exist = false) |
| | | private String phaseName; |
| | | |
| | | @TableField(exist = false) |
| | | private Integer phaseSort; |
| | | |
| | | } |
| | |
| | | public List<SimulatAssess> getList(Long productId, Long taskModelId) { |
| | | return baseDao.getList(productId,taskModelId); |
| | | } |
| | | |
| | | public List<SimulatAssess> getParams(Long id, Long taskModelId) { |
| | | return baseDao.getParams(id,taskModelId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.mainPart.taskReliability.service; |
| | | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.life.modules.mainPart.taskReliability.dao.TaskRepairParamDao; |
| | | import com.zt.life.modules.mainPart.taskReliability.model.TaskRepairParam; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * task_repair_param |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-07-26 |
| | | */ |
| | | @Service |
| | | public class TaskRepairParamService extends BaseService<TaskRepairParamDao, TaskRepairParam> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param queryFilter |
| | | * @return |
| | | */ |
| | | public List<TaskRepairParam> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ids |
| | | */ |
| | | public void delete(Long[] ids) { |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | } |
| | |
| | | and task_model_id = ${taskModelId} |
| | | and IS_DELETE = 0 |
| | | </select> |
| | | <select id="getParams" resultType="com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess"> |
| | | select a.sampl_period,b.task_duration |
| | | from simulat_assess a |
| | | left join task b on a.task_model_id = b.id and b.IS_DELETE= 0 |
| | | where a.id = ${id} |
| | | and a.task_model_id = ${taskModelId} |
| | | and a.IS_DELETE = 0 |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.taskReliability.dao.TaskRepairParamDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.TaskRepairParam"> |
| | | select d.*, |
| | | case |
| | | when e.status is null then 0 |
| | | else e.status end as status, |
| | | e.id |
| | | from ( |
| | | select task_id, phase_id, phase_name, phase_sort, equip_type |
| | | from ( |
| | | SELECT a.task_id |
| | | , a.id as phase_id |
| | | , a.phase_name |
| | | , a.phase_sort |
| | | , f.equip_type |
| | | FROM `task_phase` a |
| | | , task_phase_model b |
| | | , operat_condit c |
| | | , operat_condit_model d |
| | | , model_rbd_node e |
| | | , product_model f |
| | | , param_data g |
| | | where a.task_id = ${taskId} |
| | | and a.is_delete = 0 |
| | | and b.phase_id = a.id |
| | | 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.is_delete = 0 |
| | | and f.equip_type is not null and f.equip_type <> '' |
| | | and g.product_id = f.id |
| | | and g.is_delete = 0 |
| | | and g.reliab_distrib_type = 2 |
| | | and g.repairable = 1 |
| | | ) c |
| | | group by task_id, phase_id, phase_name, phase_sort, equip_type |
| | | ) d |
| | | left join task_repair_param e |
| | | on e.task_id = d.task_id and e.phase_id = d.phase_id and e.equip_type = d.equip_type |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <zt-form-item label="åç§°" prop="name" rules="required"> |
| | | <el-input v-model="dataForm.name"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item v-if="dataForm.productType==='5'" prop="equipType" label="设å¤ç±»å" rules="required"> |
| | | <el-input v-model="dataForm.equipType"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="èç¹ç±»å" prop="productType" rules="required"> |
| | | <zt-dict v-model="dataForm.productType" dict="product" @input="getDefaultImg" |
| | | :disabled="disabled"></zt-dict> |
| | |
| | | operatImg: '', |
| | | operatImgName: '', |
| | | sort: '', |
| | | equipType:'', |
| | | status: '' |
| | | } |
| | | } |
| | |
| | | @selection-change="table.selectionChangeHandle" |
| | | :header-cell-style="{'text-align':'center'}"> |
| | | <el-table-column prop="name" label="åç§°"/> |
| | | <el-table-column v-if="productType==='3'|| productType==='4'" prop="equipType" label="设å¤ç±»å"/> |
| | | <zt-table-column-dict prop="productType" label="èç¹ç±»å" dict="product"/> |
| | | <el-table-column prop="operatImg" label="è¿è¡å¾ç" align="center"> |
| | | <template v-slot="{ row }"> |
| | |
| | | </zt-table-column-handle> |
| | | </el-table> |
| | | <!-- å¼¹çª, æ°å¢ / ä¿®æ¹ --> |
| | | <add-or-update @refreshDataList="refreshData" ref="AddOrUpdate"/> |
| | | <select-ty-model @refreshDataList="refreshData" ref="SelectTyModel"/> |
| | | <product-import @refreshDataList="refreshData" ref="ProductImport"/> |
| | | <add-or-update @refreshDataList="refreshData('product')" ref="AddOrUpdate"/> |
| | | <select-ty-model @refreshDataList="refreshData('tree')" ref="SelectTyModel"/> |
| | | <product-import @refreshDataList="refreshData('import')" ref="ProductImport"/> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </el-col> |
| | |
| | | return 'text-align: left !important;' |
| | | } |
| | | }, |
| | | refreshData() { |
| | | this.$refs.tableObj.query() |
| | | this.$refs.ProductModelTree.getProductList() |
| | | refreshData(param) { |
| | | if (param==='import'){ |
| | | this.$refs.tableObj.query() |
| | | this.$refs.ProductModelTree.getProductList() |
| | | }else if(param==='tree'){ |
| | | this.$refs.ProductModelTree.getProductList() |
| | | } else{ |
| | | this.$refs.tableObj.query() |
| | | } |
| | | }, |
| | | onProductSelected(data) { |
| | | console.log(data, 'onProductSelected') |
| | |
| | | }, |
| | | xAxis: { |
| | | data: this.xDataList, |
| | | name: 'ä»¿çæ¬¡æ°' |
| | | name: 'ä»¿çæ»æ¶é¿' |
| | | }, |
| | | yAxis: { |
| | | |
| | |
| | | <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"> |
| | | <el-input v-model="dataForm.samplPeriod" > |
| | | </el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="ä»¿çæ»æ¶é¿" prop="taskDuration"> |
| | | <el-input v-model="dataForm.taskDuration" > |
| | | </el-input> |
| | | </zt-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-col :span="4"> |
| | |
| | | MTTR: '', |
| | | dataForm: { |
| | | id: '', |
| | | taskDuration:'', |
| | | pid: '', |
| | | productId: '', |
| | | showProductId: '', |
| | |
| | | onSimulatSelected(data) { |
| | | this.dataForm.id = data.id |
| | | this.dataForm.samplPeriod = data.samplPeriod |
| | | this.$refs.SimulatCurve.initEcharts(this.dataForm); |
| | | this.getSimulatParams() |
| | | this.$refs.SimulatCurve.initEcharts(this.dataForm) |
| | | }, |
| | | async getSimulatParams() { |
| | | let params = { |
| | | id: this.dataForm.id, |
| | | taskModelId: this.dataForm.taskModelId |
| | | } |
| | | let res = await this.$http.get('/taskReliability/SimulatAssess/getSimulatParams', {params: params}) |
| | | this.dataForm.taskDuration = res.data.taskDuration |
| | | this.dataForm.samplPeriod = res.data.samplPeriod |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <zt-button v-if="dataForm.productId" type="add" @click="add()"/> |
| | | <zt-button v-if="dataForm.productId" type="delete" @click="table.deleteHandle()"/> |
| | | <el-button v-if="dataForm.productId" type="primary" @click="openDialog()">äºé¡¹åå¸åæ°</el-button> |
| | | <el-button v-if="dataForm.productId" type="primary" @click="openDialog2()">ä¸å¯ä¿®è®¾å¤ç±»å</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}" |
| | |
| | | <!-- å¼¹çª, æ°å¢ / ä¿®æ¹ --> |
| | | <add-or-update @refreshDataList="table.query" ref="AddOrUpdate"/> |
| | | <task-bino-param ref="taskBinoParam"></task-bino-param> |
| | | <task-repair-param ref="taskRepairParam"></task-repair-param> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </template> |
| | |
| | | <script> |
| | | import AddOrUpdate from './Task-AddOrUpdate' |
| | | import TaskBinoParam from "./TaskBinoParam"; |
| | | import TaskRepairParam from "./TaskRepairParam"; |
| | | |
| | | export default { |
| | | name: 'Task', |
| | |
| | | } |
| | | }, |
| | | components: { |
| | | TaskRepairParam, |
| | | TaskBinoParam, |
| | | AddOrUpdate |
| | | }, |
| | |
| | | this.$alert("è¯·éæ©å
·ä½ä»»å¡") |
| | | } |
| | | }, |
| | | openDialog2() { |
| | | if (this.dataForm.id) { |
| | | this.$refs.taskRepairParam.$refs.dialog.init(null, {taskId: this.dataForm.id}) |
| | | } else { |
| | | this.$alert("è¯·éæ©å
·ä½ä»»å¡") |
| | | } |
| | | }, |
| | | selectTask(row) { |
| | | this.dataForm.id = row.id |
| | | this.$emit('onTaskSelected', row) |
| | |
| | | <template> |
| | | <zt-dialog ref="dialog" column="3" title="äºé¡¹åæ°" append-to-body :editAble="false" :hasConfirm="false"> |
| | | <zt-dialog ref="dialog" column="3" title="äºé¡¹åæ°" append-to-body @confirm="handleSaveRows" :editAble="false"> |
| | | <zt-table-wraper :paging='false' ref="tableObj" query-url="/taskReliability/TaskBinoParam/page" delete-url="/taskReliability/TaskBinoParam" |
| | | v-slot="{ table }" > |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | <!-- <zt-button type="query" @click="table.query()"/> |
| | | <zt-button type="add" perm="taskReliability:add" @click="table.editHandle()"/> |
| | | <zt-button type="delete" perm="taskReliability:delete" @click="table.deleteHandle()"/>--> |
| | | <zt-button type="primary" @click="handleSaveRows">ä¿å</zt-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" |
| | | height="600px" |
New file |
| | |
| | | <template> |
| | | <zt-dialog ref="dialog" column="3" title="强å¶ä¸å¯ä¿®è®¾å¤ç±»å" @confirm="handleSaveRows" append-to-body :editAble="true" :hasConfirm="false"> |
| | | <zt-table-wraper :paging='false' ref="tableObj" query-url="/taskReliability/TaskRepairParam/page" |
| | | delete-url="/taskReliability/TaskRepairParam/" |
| | | v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" |
| | | height="600px" |
| | | border @selection-change="table.selectionChangeHandle" |
| | | :header-cell-style="{'text-align':'center'}"> |
| | | <!-- <el-table-column type="selection" width="40"/>--> |
| | | <el-table-column prop="phaseName" label="é¶æ®µ" align="left"/> |
| | | <el-table-column prop="equipType" label="设å¤ç±»å" align="center"/> |
| | | <el-table-column prop="status" label="强å¶ä¸å¯ä¿®" width="160" align="center"> |
| | | <template v-slot="{ row }"> |
| | | <el-checkbox v-model="row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </zt-table-wraper> |
| | | </zt-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'taskRepairParam', |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | phaseName: '', |
| | | equipType: '', |
| | | status: '', |
| | | dataThreeList: '', |
| | | }, |
| | | dataList: [], |
| | | originalTableData: [], |
| | | originalData: null, |
| | | } |
| | | }, |
| | | components: {}, |
| | | methods: { |
| | | init(id, row) { |
| | | this.dataForm.taskId = row.taskId |
| | | }, |
| | | async handleSaveRows() { |
| | | this.dataForm.dataThreeList = this.$refs.tableObj.dataList |
| | | console.log(this.dataForm, 'this.dataForm this.dataForm') |
| | | let res = await this.$http.post('/taskReliability/TaskRepairParam/save', this.dataForm) |
| | | if (res.success) { |
| | | console.log(res.data) |
| | | await this.$tip.success() |
| | | this.originalData = null |
| | | this.dataForm.dataThreeList = null |
| | | this.$refs.tableObj.query() |
| | | this.originalTableData = JSON.parse(JSON.stringify(this.dataList)); // æ´æ°åå§æ°æ®ä¸ºå½åæ°æ® |
| | | console.log(this.originalTableData, 'this.originalTableData å½åè¡¨æ ¼jsonæ°æ®') |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |