diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device/service/StorageCellService.java b/acs/nladmin-system/src/main/java/org/nl/acs/device/service/StorageCellService.java index f9afea6..448c591 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device/service/StorageCellService.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device/service/StorageCellService.java @@ -49,6 +49,14 @@ public interface StorageCellService { */ StorageCellDto findByCode(String code); + /** + * 根据编码查询 + * + * @param parent_storage_code parent_storage_code + * @return StorageCell + */ + StorageCellDto findByParentCode(String parent_storage_code); + /** * 根据地址查询 * diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java index cb0244e..b54a9b4 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java @@ -83,7 +83,18 @@ public class StorageCellServiceImpl implements StorageCellService { @Override public StorageCellDto findByCode(String code) { WQLObject wo = WQLObject.getWQLObject("acs_storage_cell"); - JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0); + JSONObject json = wo.query("storage_code ='" + code + "'").uniqueResult(0); + if (ObjectUtil.isNotEmpty(json)){ + final StorageCellDto obj = json.toJavaObject(StorageCellDto.class); + return obj; + } + return null; + } + + @Override + public StorageCellDto findByParentCode(String parent_storage_code) { + WQLObject wo = WQLObject.getWQLObject("acs_storage_cell"); + JSONObject json = wo.query("parent_storage_code ='" + parent_storage_code + "'").uniqueResult(0); if (ObjectUtil.isNotEmpty(json)){ final StorageCellDto obj = json.toJavaObject(StorageCellDto.class); return obj; diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index 1f54c07..6eb9276 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j; import org.nl.acs.agv.server.NDCAgvService; import org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun; import org.nl.acs.device.service.DeviceService; +import org.nl.acs.device.service.StorageCellService; +import org.nl.acs.device.service.impl.StorageCellServiceImpl; import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.basedriver.siemens_conveyor.SiemensConveyorDeviceDriver; import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; @@ -28,7 +30,9 @@ import org.nl.acs.opc.Device; import org.nl.acs.opc.DeviceAppService; import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.impl.TaskServiceImpl; +import org.nl.modules.system.service.DictDetailService; import org.nl.modules.system.service.ParamService; +import org.nl.modules.system.service.impl.DictDetailServiceImpl; import org.nl.modules.system.service.impl.ParamServiceImpl; import org.nl.modules.wql.util.SpringContextHolder; @@ -46,6 +50,7 @@ import java.util.Map; public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements DeviceDriver { ParamService paramService = SpringContextHolder.getBean(ParamServiceImpl.class); + DictDetailService dictDetailService = SpringContextHolder.getBean(DictDetailServiceImpl.class); InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class); AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class); @@ -53,6 +58,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class); DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class); DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class); + StorageCellService storageCellService = SpringContextHolder.getBean(StorageCellServiceImpl.class); int agvaddr = 0; int agvaddr_copy = 0; int weight = 0; @@ -175,7 +181,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic JSONObject map = new JSONObject(); map.put("Vehiclecode", inst.getVehicle_code()); map.put("Status", "1"); - map.put("Devicecode", inst.getStart_point_code()); + map.put("Devicecode", storageCellService.findByCode(inst.getStart_point_code()).getParent_storage_code()); map.put("Taskcode", inst.getTask_code()); req.add(map); HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); @@ -233,7 +239,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic JSONObject map = new JSONObject(); map.put("Vehiclecode", inst.getVehicle_code()); map.put("Status", "2"); - map.put("Devicecode", inst.getStart_point_code()); + map.put("Devicecode", storageCellService.findByCode(inst.getStart_point_code()).getParent_storage_code()); map.put("Taskcode", inst.getTask_code()); req.add(map); HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); @@ -287,7 +293,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic JSONObject map = new JSONObject(); map.put("Vehiclecode", inst.getVehicle_code()); map.put("Status", "3"); - map.put("Devicecode", inst.getNext_point_code()); + map.put("Devicecode", storageCellService.findByCode(inst.getNext_point_code()).getParent_storage_code()); map.put("Taskcode", inst.getTask_code()); req.add(map); HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); @@ -341,7 +347,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic JSONObject map = new JSONObject(); map.put("Vehiclecode", inst.getVehicle_code()); map.put("Status", "4"); - map.put("Devicecode", inst.getNext_point_code()); + map.put("Devicecode", storageCellService.findByCode(inst.getNext_point_code()).getParent_storage_code()); map.put("Taskcode", inst.getTask_code()); req.add(map); HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index 2a8bd09..e7d6d5e 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -12,6 +12,8 @@ import lombok.extern.slf4j.Slf4j; import org.nl.acs.AcsConfig; import org.nl.acs.common.IDriverService; import org.nl.acs.device.service.DeviceService; +import org.nl.acs.device.service.StorageCellService; +import org.nl.acs.device.service.dto.StorageCellDto; import org.nl.acs.device_driver.basedriver.cargo_lift_conveyor.CargoLiftConveyorDeviceDriver; import org.nl.acs.device_driver.basedriver.empty_vehicle_stacking_position.EmptyVehicleStackingPositionDeviceDriver; import org.nl.acs.device_driver.basedriver.hongxiang_conveyor.HongXiangStationDeviceDriver; @@ -31,6 +33,8 @@ import org.nl.acs.route.service.RouteLineService; import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.dto.TaskDto; import org.nl.modules.common.exception.BadRequestException; +import org.nl.modules.system.domain.DictDetail; +import org.nl.modules.system.service.DictDetailService; import org.nl.modules.system.service.ParamService; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.exception.WDKException; @@ -58,7 +62,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { private final DeviceAppService deviceAppService; private final RouteLineService routeLineService; private final AcsToLiKuService acsToLiKuService; - + private final DictDetailService dictDetailService; + private final StorageCellService storageCellService; private String log_file_type = "log_file_type"; private String log_type = "LMS请求ACS"; @@ -493,6 +498,25 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { errArr.add(json); continue; } + StorageCellDto startParentCode = storageCellService.findByParentCode(start_device_code); + StorageCellDto nextParentCode = storageCellService.findByParentCode(next_device_code); + + if (ObjectUtil.isEmpty(startParentCode)){ + JSONObject json = new JSONObject(); + json.put("task_code", task_code); + json.put("message", "ACS未查询到该设备!设备号:" + start_device_code); + errArr.add(json); + continue; + } + if (ObjectUtil.isEmpty(nextParentCode)){ + JSONObject json = new JSONObject(); + json.put("task_code", task_code); + json.put("message", "ACS未查询到该设备!设备号:" + next_device_code); + errArr.add(json); + continue; + } + //start_device_code = startParentCode.getStorage_code(); + //next_device_code = nextParentCode.getStorage_code(); JSONObject start_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + start_device_code + "'").uniqueResult(0); if (!ObjectUtil.isEmpty(start_device_json)) { start_point_code = (String) start_device_json.get("parent_storage_code") == null ? start_device_code : (String) start_device_json.get("storage_code"); diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/system/repository/DictDetailRepository.java b/acs/nladmin-system/src/main/java/org/nl/modules/system/repository/DictDetailRepository.java index a16ac27..833b9e9 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/system/repository/DictDetailRepository.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/system/repository/DictDetailRepository.java @@ -33,4 +33,8 @@ public interface DictDetailRepository extends JpaRepository, J * @return / */ List findByDictName(String name); + + DictDetail findDictDetailByLabelAndName(String label,String name); + + DictDetail findDictDetailByValueAndName(String value,String name); } \ No newline at end of file diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/system/rest/DictController.java b/acs/nladmin-system/src/main/java/org/nl/modules/system/rest/DictController.java index e605eaa..803513e 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/system/rest/DictController.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/system/rest/DictController.java @@ -29,7 +29,9 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Set; @@ -97,4 +99,12 @@ public class DictController { dictService.delete(ids); return new ResponseEntity<>(HttpStatus.OK); } + + @PostMapping("/excelImport") + @Log("excel导入") + @ApiOperation("excel导入") + public ResponseEntity excelImport(@RequestParam("file") MultipartFile file, HttpServletRequest request) { + dictService.excelImport(file, request); + return new ResponseEntity<>(HttpStatus.OK); + } } diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/system/service/DictDetailService.java b/acs/nladmin-system/src/main/java/org/nl/modules/system/service/DictDetailService.java index 1bc51e8..d57fc86 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/system/service/DictDetailService.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/system/service/DictDetailService.java @@ -61,4 +61,8 @@ public interface DictDetailService { * @return / */ List getDictByName(String name); + + DictDetail findDictDetailByLabelAndName(String label,String name); + + DictDetail findDictDetailByValueAndName(String value,String name); } \ No newline at end of file diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/system/service/DictService.java b/acs/nladmin-system/src/main/java/org/nl/modules/system/service/DictService.java index 76a0011..a2c84bc 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/system/service/DictService.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/system/service/DictService.java @@ -19,7 +19,9 @@ import org.nl.modules.system.domain.Dict; import org.nl.modules.system.service.dto.DictDto; import org.nl.modules.system.service.dto.DictQueryCriteria; import org.springframework.data.domain.Pageable; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; @@ -73,4 +75,11 @@ public interface DictService { * @throws IOException / */ void download(List queryAll, HttpServletResponse response) throws IOException; + + /** + * excel导入 + * @param file + * @param request + */ + void excelImport(MultipartFile file, HttpServletRequest request); } \ No newline at end of file diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DictDetailServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DictDetailServiceImpl.java index e60fa8e..27d58a8 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DictDetailServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DictDetailServiceImpl.java @@ -39,9 +39,9 @@ import java.util.List; import java.util.Map; /** -* @author Zheng Jie -* @date 2019-04-10 -*/ + * @author Zheng Jie + * @date 2019-04-10 + */ @Service @RequiredArgsConstructor @CacheConfig(cacheNames = "dict") @@ -53,8 +53,8 @@ public class DictDetailServiceImpl implements DictDetailService { private final RedisUtils redisUtils; @Override - public Map queryAll(DictDetailQueryCriteria criteria, Pageable pageable) { - Page page = dictDetailRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); + public Map queryAll(DictDetailQueryCriteria criteria, Pageable pageable) { + Page page = dictDetailRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder), pageable); return PageUtil.toPage(page.map(dictDetailMapper::toDto)); } @@ -70,7 +70,7 @@ public class DictDetailServiceImpl implements DictDetailService { @Transactional(rollbackFor = Exception.class) public void update(DictDetail resources) { DictDetail dictDetail = dictDetailRepository.findById(resources.getId()).orElseGet(DictDetail::new); - ValidationUtil.isNull( dictDetail.getId(),"DictDetail","id",resources.getId()); + ValidationUtil.isNull(dictDetail.getId(), "DictDetail", "id", resources.getId()); resources.setId(dictDetail.getId()); dictDetailRepository.save(resources); // 清理缓存 @@ -83,6 +83,16 @@ public class DictDetailServiceImpl implements DictDetailService { return dictDetailMapper.toDto(dictDetailRepository.findByDictName(name)); } + @Override + public DictDetail findDictDetailByLabelAndName(String label, String name) { + return dictDetailRepository.findDictDetailByLabelAndName(label, name); + } + + @Override + public DictDetail findDictDetailByValueAndName(String value, String name) { + return dictDetailRepository.findDictDetailByValueAndName(value, name); + } + @Override @Transactional(rollbackFor = Exception.class) public void delete(Long id) { @@ -92,7 +102,7 @@ public class DictDetailServiceImpl implements DictDetailService { dictDetailRepository.deleteById(id); } - public void delCaches(DictDetail dictDetail){ + public void delCaches(DictDetail dictDetail) { Dict dict = dictRepository.findById(dictDetail.getDict().getId()).orElseGet(Dict::new); redisUtils.del("dict::name:" + dict.getName()); } diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DictServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DictServiceImpl.java index 4b938b4..786951d 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DictServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DictServiceImpl.java @@ -16,23 +16,38 @@ package org.nl.modules.system.service.impl; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.poi.excel.ExcelReader; +import cn.hutool.poi.excel.ExcelUtil; +import com.alibaba.fastjson.JSONObject; import lombok.RequiredArgsConstructor; +import org.nl.acs.device.service.dto.DeviceDto; +import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.common.utils.*; import org.nl.modules.system.domain.Dict; +import org.nl.modules.system.domain.DictDetail; import org.nl.modules.system.repository.DictRepository; +import org.nl.modules.system.service.DictDetailService; import org.nl.modules.system.service.DictService; import org.nl.modules.system.service.dto.DictDetailDto; import org.nl.modules.system.service.dto.DictDto; import org.nl.modules.system.service.dto.DictQueryCriteria; import org.nl.modules.system.service.mapstruct.DictMapper; +import org.nl.modules.wql.core.bean.WQLObject; import org.springframework.cache.annotation.CacheConfig; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.io.InputStream; import java.util.*; /** @@ -47,6 +62,7 @@ public class DictServiceImpl implements DictService { private final DictRepository dictRepository; private final DictMapper dictMapper; private final RedisUtils redisUtils; + private final DictDetailService dictDetailService; @Override public Map queryAll(DictQueryCriteria dict, Pageable pageable){ @@ -116,6 +132,64 @@ public class DictServiceImpl implements DictService { FileUtil.downloadExcel(list, response); } + public List queryAll(DictQueryCriteria dict,String a) { + List list = dictRepository.findAll((root, query, cb) -> QueryHelp.getPredicate(root, dict, cb)); + return list; + } + + @Override + @Transactional + public void excelImport(MultipartFile file, HttpServletRequest request) { + if (file.isEmpty()) { + throw new BadRequestException("文件为空,请添加数据后重新导入"); + } + Long currentUserId = SecurityUtils.getCurrentUserId(); + String nickName = SecurityUtils.getCurrentNickName(); + String now = DateUtil.now(); + // 1.获取上传文件输入流 + InputStream inputStream = null; + try { + inputStream = file.getInputStream(); + } catch (Exception e) { + e.printStackTrace(); + } + + // 调用用 hutool 方法读取数据 默认调用第一个sheet + ExcelReader excelReader = ExcelUtil.getReader(inputStream); + // 从第二行开始获取数据 excelReader.read的结果是一个2纬的list,外层是行,内层是行对应的所有列 + List> read = excelReader.read(1, excelReader.getRowCount()); + // 循环获取的数据 + for (int i = 0; i < read.size(); i++) { + List list = read.get(i); + JSONObject param = new JSONObject(); + String label = list.get(0).toString(); + String value = list.get(1).toString(); + if (StrUtil.isEmpty(label)) { + throw new BadRequestException("wms编号不能为空!"); + } + if (StrUtil.isEmpty(value)) { + throw new BadRequestException("acs编号不能为空!"); + } + DictDetail detail = dictDetailService.findDictDetailByLabelAndName(label, "location_comparison"); + if (ObjectUtil.isNotEmpty(detail)){ + continue; + } + DictQueryCriteria dict = new DictQueryCriteria(); + dict.setBlurry("location_comparison"); + List dictDtos = queryAll(dict,""); + Dict dictDto = dictDtos.get(0); + DictDetail dictDetail = new DictDetail(); + dictDetail.setId(IdUtil.getSnowflake().nextId()); + dictDetail.setDictSort(i + 1); + dictDetail.setLabel(label); + dictDetail.setValue(value); + dictDetail.setDict(dictDto); + dictDetail.setCreateBy(SecurityUtils.getCurrentUsername()); + dictDetail.setName("location_comparison"); + dictDetailService.create(dictDetail); + } + } + public void delCaches(Dict dict){ redisUtils.del("dict::name:" + dict.getName()); } diff --git a/acs/nladmin-ui/src/api/system/dict.js b/acs/nladmin-ui/src/api/system/dict.js index 99170f7..5f1e395 100644 --- a/acs/nladmin-ui/src/api/system/dict.js +++ b/acs/nladmin-ui/src/api/system/dict.js @@ -30,5 +30,12 @@ export function edit(data) { data }) } +export function excelImport(data) { + return request({ + url: 'api/dict/excelImport', + method: 'post', + data + }) +} -export default { add, edit, del } +export default { add, edit, del, excelImport } diff --git a/acs/nladmin-ui/src/views/system/dict/UploadDialog.vue b/acs/nladmin-ui/src/views/system/dict/UploadDialog.vue new file mode 100644 index 0000000..d3d2159 --- /dev/null +++ b/acs/nladmin-ui/src/views/system/dict/UploadDialog.vue @@ -0,0 +1,116 @@ + + + + diff --git a/acs/nladmin-ui/src/views/system/dict/index.vue b/acs/nladmin-ui/src/views/system/dict/index.vue index c205c56..f6375aa 100644 --- a/acs/nladmin-ui/src/views/system/dict/index.vue +++ b/acs/nladmin-ui/src/views/system/dict/index.vue @@ -60,11 +60,24 @@ icon="el-icon-plus" @click="$refs.dictDetail && $refs.dictDetail.crud.toAdd()" >新增 + + 导入 + + @@ -78,12 +91,12 @@ import crudOperation from '@crud/CRUD.operation' import pagination from '@crud/Pagination' import rrOperation from '@crud/RR.operation' import udOperation from '@crud/UD.operation' - +import UploadDialog from '@/views/system/dict/UploadDialog' const defaultForm = { id: null, name: null, description: null, dictDetails: [] } export default { name: 'Dict', - components: { crudOperation, pagination, rrOperation, udOperation, dictDetail }, + components: { crudOperation, pagination, rrOperation, udOperation, dictDetail, UploadDialog }, cruds() { return [ CRUD({ title: '字典', url: 'api/dict', crudMethod: { ...crudDict }}) @@ -105,7 +118,9 @@ export default { add: ['admin', 'dict:add'], edit: ['admin', 'dict:edit'], del: ['admin', 'dict:del'] - } + }, + uploadShow: false, + dictNames: '' } }, methods: { @@ -117,9 +132,14 @@ export default { } return true }, + tableChanged3() { + this.$refs.dictDetail.crud.toQuery() + }, // 选中字典后,设置字典详情数据 handleCurrentChange(val) { if (val) { + console.log(val) + this.dictNames = val.name this.$refs.dictDetail.query.dictName = val.name this.$refs.dictDetail.dictId = val.id this.$refs.dictDetail.crud.toQuery()