Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -2,6 +2,7 @@ package org.nl.acs.custompolicy.server.impl;
|
|||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@@ -44,11 +45,24 @@ public class CustomPolicyServiceImpl extends CommonServiceImpl<CustomPolicyMappe
|
|||||||
List<DeviceStrategy> instructionStrategys;
|
List<DeviceStrategy> instructionStrategys;
|
||||||
|
|
||||||
private final CustomPolicyMapper customPolicyMapper;
|
private final CustomPolicyMapper customPolicyMapper;
|
||||||
|
private final HashMap<String,List<CustomPolicyPlantDTO>> customPolicyPlantDTOMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化策略
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void autoInitial() throws Exception {
|
public void autoInitial() throws Exception {
|
||||||
|
LambdaQueryWrapper<CustomPolicy> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(CustomPolicy::getIs_delete,0) ;
|
||||||
|
List<CustomPolicy> customPolicyList = customPolicyMapper.selectList(wrapper);
|
||||||
|
if (CollectionUtil.isNotEmpty(customPolicyList)){
|
||||||
|
List<CustomPolicy> customPolicies = customPolicyList.stream().filter(item -> item.getKey_value() != null).collect(Collectors.toList());
|
||||||
|
customPolicies.forEach(item -> {
|
||||||
|
CustomPolicyPlantVO customPolicyPlantVO = JSON.parseObject(item.getKey_value(), CustomPolicyPlantVO.class);
|
||||||
|
customPolicyPlantDTOMap.put(item.getUnit_code(),customPolicyPlantVO.getPlans());
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -100,7 +114,14 @@ public class CustomPolicyServiceImpl extends CommonServiceImpl<CustomPolicyMappe
|
|||||||
customPolicy.setId(customPolicyPlantVO.getId());
|
customPolicy.setId(customPolicyPlantVO.getId());
|
||||||
customPolicy.setUpdate_user(currentUsername);
|
customPolicy.setUpdate_user(currentUsername);
|
||||||
customPolicy.setUpdate_time(now);
|
customPolicy.setUpdate_time(now);
|
||||||
customPolicy.setKey_value(JSON.toJSONString(customPolicyPlantVO));
|
if (CollectionUtil.isNotEmpty(customPolicyPlantVO.getPlans())) {
|
||||||
|
for (int i = 0; i < customPolicyPlantVO.getPlans().size(); i++) {
|
||||||
|
customPolicyPlantVO.getPlans().get(i).setSort(i);
|
||||||
|
}
|
||||||
|
customPolicy.setKey_value(JSON.toJSONString(customPolicyPlantVO));
|
||||||
|
}else {
|
||||||
|
customPolicy.setKey_value(null);
|
||||||
|
}
|
||||||
customPolicyMapper.updateById(customPolicy);
|
customPolicyMapper.updateById(customPolicy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,21 @@ public class Device implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String device_type_name;
|
private String device_type_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排
|
||||||
|
*/
|
||||||
|
private String x;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列
|
||||||
|
*/
|
||||||
|
private String y;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 层
|
||||||
|
*/
|
||||||
|
private String z;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String region_name;
|
private String region_name;
|
||||||
|
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
//申请任务
|
//申请任务
|
||||||
if (task == 0 && !requireSucess) {
|
if (move == 1 && !requireSucess) {
|
||||||
instruction_require();
|
instruction_require();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import lombok.Data;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.acs.device.domain.Device;
|
import org.nl.acs.device.domain.Device;
|
||||||
|
import org.nl.acs.device.enums.DeviceType;
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.belt_conveyor.BeltConveyorDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.belt_conveyor.BeltConveyorDeviceDriver;
|
||||||
@@ -386,9 +387,30 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
|
|
||||||
} else if (error != 0) {
|
} else if (error != 0) {
|
||||||
message = "有报警";
|
message = "有报警";
|
||||||
|
//指定库位满入
|
||||||
|
if(error == 5){
|
||||||
|
|
||||||
|
}
|
||||||
|
//空出
|
||||||
|
if(error == 6){
|
||||||
|
|
||||||
|
}
|
||||||
|
//浅货位有货
|
||||||
|
if(error == 16){
|
||||||
|
//放货
|
||||||
|
if(cargoMove==1){
|
||||||
|
|
||||||
|
}else if(cargoMove==0){
|
||||||
|
//取货
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
HashMap map = new HashMap();
|
HashMap map = new HashMap();
|
||||||
|
Instruction instruction = checkInst();
|
||||||
|
String next_device_code = instruction.getNext_device_code();
|
||||||
|
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 0:
|
case 0:
|
||||||
if (task == 0) {
|
if (task == 0) {
|
||||||
@@ -400,6 +422,21 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
message = "取货完成";
|
message = "取货完成";
|
||||||
|
if (StrUtil.equals(nextDevice.getDevice_type(), DeviceType.conveyor.name())) {
|
||||||
|
map.put("to_z", nextDevice.getZ());
|
||||||
|
map.put("to_x", nextDevice.getX());
|
||||||
|
map.put("to_y", nextDevice.getY());
|
||||||
|
}
|
||||||
|
if (StrUtil.equals(nextDevice.getDevice_type(), DeviceType.storage.name())) {
|
||||||
|
map.put("to_z", inst.getTo_z());
|
||||||
|
if (inst.getTo_x().length() > 1) {
|
||||||
|
String substring = inst.getTo_x().substring(1);
|
||||||
|
map.put("to_x", substring);
|
||||||
|
} else {
|
||||||
|
map.put("to_x", inst.getTo_x());
|
||||||
|
}
|
||||||
|
map.put("to_y", inst.getTo_y());
|
||||||
|
}
|
||||||
map.put("to_command", 2);
|
map.put("to_command", 2);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
@@ -407,14 +444,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
message = "请求卸货(申请卸货)";
|
message = "请求卸货(申请卸货)";
|
||||||
Instruction instruction = checkInst();
|
|
||||||
if (ObjectUtil.isNotNull(instruction)) {
|
if (ObjectUtil.isNotNull(instruction)) {
|
||||||
//指令为执行
|
//指令为执行
|
||||||
String next_device_code = instruction.getNext_device_code();
|
|
||||||
Device startDevice = deviceAppService.findDeviceByCode(next_device_code);
|
|
||||||
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
||||||
if (startDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
if (nextDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
||||||
siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) startDevice.getDeviceDriver();
|
siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||||
if (siemensConveyorDeviceDriver.getMode() != 2 || siemensConveyorDeviceDriver.getMove() == 1) {
|
if (siemensConveyorDeviceDriver.getMode() != 2 || siemensConveyorDeviceDriver.getMove() == 1) {
|
||||||
notCreateInstMessage = "未下发电气信号原因->输送线-货架对接位:" + siemensConveyorDeviceDriver.getDevice_code() +
|
notCreateInstMessage = "未下发电气信号原因->输送线-货架对接位:" + siemensConveyorDeviceDriver.getDevice_code() +
|
||||||
"有货或未联机,无法下发指令!指令号:" + inst.getInstruction_code();
|
"有货或未联机,无法下发指令!指令号:" + inst.getInstruction_code();
|
||||||
@@ -560,14 +594,23 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
map.put("to_command", 1);
|
map.put("to_command", 1);
|
||||||
// map.put("to_type", inst.getMaterial());
|
// map.put("to_type", inst.getMaterial());
|
||||||
map.put("to_task", inst.getInstruction_code());
|
map.put("to_task", inst.getInstruction_code());
|
||||||
map.put("to_z", inst.getTo_z());
|
|
||||||
if(inst.getTo_x().length()>1){
|
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) {
|
||||||
String substring = inst.getTo_x().substring(1);
|
map.put("to_z", startDevice.getZ());
|
||||||
map.put("to_x", substring);
|
map.put("to_x", startDevice.getX());
|
||||||
}else {
|
map.put("to_y", startDevice.getY());
|
||||||
map.put("to_x", inst.getTo_x());
|
|
||||||
}
|
}
|
||||||
map.put("to_y", inst.getTo_y());
|
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.storage.name())) {
|
||||||
|
map.put("to_z", inst.getFrom_z());
|
||||||
|
if (inst.getFrom_x().length() > 1) {
|
||||||
|
String substring = inst.getFrom_x().substring(1);
|
||||||
|
map.put("to_x", substring);
|
||||||
|
} else {
|
||||||
|
map.put("to_x", inst.getFrom_x());
|
||||||
|
}
|
||||||
|
map.put("to_y", inst.getFrom_y());
|
||||||
|
}
|
||||||
|
|
||||||
this.writing(map);
|
this.writing(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,9 +37,6 @@ public class InstructionController {
|
|||||||
@ApiOperation("查询指令")
|
@ApiOperation("查询指令")
|
||||||
//@PreAuthorize("@el.check('instruction:list')")
|
//@PreAuthorize("@el.check('instruction:list')")
|
||||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||||
if(ObjectUtil.isEmpty(whereJson.get("status"))) {
|
|
||||||
whereJson.put("status", "1");
|
|
||||||
}
|
|
||||||
return new ResponseEntity<>(instructionService.queryAll(whereJson, page), HttpStatus.OK);
|
return new ResponseEntity<>(instructionService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import org.nl.acs.agv.server.NDCAgvService;
|
|||||||
import org.nl.acs.agv.server.XianGongAgvService;
|
import org.nl.acs.agv.server.XianGongAgvService;
|
||||||
import org.nl.acs.auto.initial.ApplicationAutoInitial;
|
import org.nl.acs.auto.initial.ApplicationAutoInitial;
|
||||||
import org.nl.acs.device.domain.Device;
|
import org.nl.acs.device.domain.Device;
|
||||||
|
import org.nl.acs.device.enums.DeviceType;
|
||||||
import org.nl.acs.device.service.DeviceService;
|
import org.nl.acs.device.service.DeviceService;
|
||||||
import org.nl.acs.device.service.impl.DeviceServiceImpl;
|
import org.nl.acs.device.service.impl.DeviceServiceImpl;
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
@@ -914,6 +915,9 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
|||||||
for (int m = 0; m < pathlist.size(); m++) {
|
for (int m = 0; m < pathlist.size(); m++) {
|
||||||
if (pathlist.get(m).equals(dto.getNext_device_code())) {
|
if (pathlist.get(m).equals(dto.getNext_device_code())) {
|
||||||
index = m + 1;
|
index = m + 1;
|
||||||
|
if(StrUtil.equals(deviceAppService.findDeviceTypeByCode(pathlist.get(index)), DeviceType.stacker.name())) {
|
||||||
|
index += 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ public class DeviceAppServiceImpl implements DeviceAppService, ApplicationAutoIn
|
|||||||
|
|
||||||
while (var3.hasNext()) {
|
while (var3.hasNext()) {
|
||||||
Device device = (Device) var3.next();
|
Device device = (Device) var3.next();
|
||||||
if (ObjectUtil.equal(device.getDevice_code(), deviceCode)&&BeanUtil.isNotEmpty(device.getDeviceDriverDefination())) {
|
if (ObjectUtil.equal(device.getDevice_code(), deviceCode)&&ObjectUtil.isNotEmpty(device.getDeviceDriverDefination())) {
|
||||||
return device.getDeviceDriverDefination().getFitDeviceTypes().get(0).name();
|
return device.getDeviceDriverDefination().getFitDeviceTypes().get(0).name();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ public class TaskController {
|
|||||||
//@PreAuthorize("@el.check('task:list')")
|
//@PreAuthorize("@el.check('task:list')")
|
||||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||||
// return new ResponseEntity<>(taskService.queryAllByCache(whereJson, page), HttpStatus.OK);
|
// return new ResponseEntity<>(taskService.queryAllByCache(whereJson, page), HttpStatus.OK);
|
||||||
if(ObjectUtil.isEmpty(whereJson.get("status"))) {
|
/*if(ObjectUtil.isEmpty(whereJson.get("status"))) {
|
||||||
whereJson.put("status", "1");
|
whereJson.put("status", "1");
|
||||||
}
|
}*/
|
||||||
return new ResponseEntity<>(taskService.queryAll(whereJson, page), HttpStatus.OK);
|
return new ResponseEntity<>(taskService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueI18n from 'vue-i18n'
|
import VueI18n from 'vue-i18n'
|
||||||
import locale from 'element-ui/lib/locale'
|
import locale from 'element-ui/lib/locale'
|
||||||
import zh from './langs/zh-CN'
|
import zh from './langs/chinese'
|
||||||
import en from './langs/en'
|
import en from './langs/english'
|
||||||
import id from './langs/id'
|
import indonesian from './langs/indonesian'
|
||||||
import indonesian from './langs/in'
|
|
||||||
Vue.use(VueI18n)
|
Vue.use(VueI18n)
|
||||||
const messages = {
|
const messages = {
|
||||||
en: {
|
en: {
|
||||||
@@ -13,9 +12,6 @@ const messages = {
|
|||||||
zh: {
|
zh: {
|
||||||
...zh
|
...zh
|
||||||
},
|
},
|
||||||
id: {
|
|
||||||
...id
|
|
||||||
},
|
|
||||||
in: {
|
in: {
|
||||||
...indonesian
|
...indonesian
|
||||||
}
|
}
|
||||||
@@ -25,7 +21,7 @@ const i18n = new VueI18n({
|
|||||||
messages,
|
messages,
|
||||||
silentTranslationWarn: true, // 解决vue-i18n黄色警告"value of key 'xxx' is not a string"和"cannot translate the value of keypath 'xxx'.use the value of keypath as default",可忽略
|
silentTranslationWarn: true, // 解决vue-i18n黄色警告"value of key 'xxx' is not a string"和"cannot translate the value of keypath 'xxx'.use the value of keypath as default",可忽略
|
||||||
globalInjection: true, // 全局注入
|
globalInjection: true, // 全局注入
|
||||||
fallbackLocale: 'en'
|
fallbackLocale: 'zh'
|
||||||
})
|
})
|
||||||
locale.i18n((key, value) => i18n.t(key, value))
|
locale.i18n((key, value) => i18n.t(key, value))
|
||||||
export default i18n
|
export default i18n
|
||||||
|
|||||||
9
lms/nladmin-ui/src/i18n/langs/chinese.js
Normal file
9
lms/nladmin-ui/src/i18n/langs/chinese.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
|
||||||
|
import zh from './zh-CN'
|
||||||
|
import menu from './menu/zh'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
...zhLocale,
|
||||||
|
...zh,
|
||||||
|
...menu
|
||||||
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import enLocale from 'element-ui/lib/locale/lang/en'
|
|
||||||
export default {
|
export default {
|
||||||
'lang': 'English',
|
'lang': 'English',
|
||||||
'common': {
|
'common': {
|
||||||
@@ -77,6 +76,8 @@ export default {
|
|||||||
'Tip10': 'Please enter your old password',
|
'Tip10': 'Please enter your old password',
|
||||||
'Tip11': 'Please enter your new password',
|
'Tip11': 'Please enter your new password',
|
||||||
'Tip12': '6 to 20 characters in length',
|
'Tip12': '6 to 20 characters in length',
|
||||||
|
'Tip13': 'Are you sure to log out and exit the system?',
|
||||||
|
'Tip14': 'WebSocket connection error',
|
||||||
'loading': 'loading...'
|
'loading': 'loading...'
|
||||||
},
|
},
|
||||||
// 菜单
|
// 菜单
|
||||||
@@ -116,6 +117,5 @@ export default {
|
|||||||
'disk': 'Disk Utilization',
|
'disk': 'Disk Utilization',
|
||||||
'cpu_monitoring': 'Cpu Utilization Monitoring',
|
'cpu_monitoring': 'Cpu Utilization Monitoring',
|
||||||
'memory_monitoring': 'Memory Utilization Monitoring'
|
'memory_monitoring': 'Memory Utilization Monitoring'
|
||||||
},
|
}
|
||||||
...enLocale
|
|
||||||
}
|
}
|
||||||
|
|||||||
9
lms/nladmin-ui/src/i18n/langs/english.js
Normal file
9
lms/nladmin-ui/src/i18n/langs/english.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import enLocale from 'element-ui/lib/locale/lang/en'
|
||||||
|
import en from './en'
|
||||||
|
import menu from './menu/en'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
...enLocale,
|
||||||
|
...en,
|
||||||
|
...menu
|
||||||
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import idLocale from 'element-ui/lib/locale/lang/id'
|
|
||||||
export default {
|
export default {
|
||||||
'lang': 'in',
|
'lang': 'in',
|
||||||
'common': {
|
'common': {
|
||||||
@@ -77,6 +76,8 @@ export default {
|
|||||||
'Tip10': 'Silakan masukkan kata sandi lama Anda',
|
'Tip10': 'Silakan masukkan kata sandi lama Anda',
|
||||||
'Tip11': 'Silakan masukkan sandi baru',
|
'Tip11': 'Silakan masukkan sandi baru',
|
||||||
'Tip12': 'Antara 6 dan 20 karakter dalam panjang',
|
'Tip12': 'Antara 6 dan 20 karakter dalam panjang',
|
||||||
|
'Tip13': 'Apakah Anda yakin untuk log keluar dan keluar dari sistem?',
|
||||||
|
'Tip14': 'Koneksi WebSocket error',
|
||||||
'loading': 'Memuatkan Data...'
|
'loading': 'Memuatkan Data...'
|
||||||
},
|
},
|
||||||
// 菜单
|
// 菜单
|
||||||
@@ -116,6 +117,5 @@ export default {
|
|||||||
'disk': 'Kadar penggunaan disk',
|
'disk': 'Kadar penggunaan disk',
|
||||||
'cpu_monitoring': 'Monitor penggunaan CPU',
|
'cpu_monitoring': 'Monitor penggunaan CPU',
|
||||||
'memory_monitoring': 'Monitor penggunaan memori'
|
'memory_monitoring': 'Monitor penggunaan memori'
|
||||||
},
|
}
|
||||||
...idLocale
|
|
||||||
}
|
}
|
||||||
|
|||||||
9
lms/nladmin-ui/src/i18n/langs/indonesian.js
Normal file
9
lms/nladmin-ui/src/i18n/langs/indonesian.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import idLocale from 'element-ui/lib/locale/lang/id'
|
||||||
|
import id from './in'
|
||||||
|
import menu from './menu/in'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
...idLocale,
|
||||||
|
...id,
|
||||||
|
...menu
|
||||||
|
}
|
||||||
6
lms/nladmin-ui/src/i18n/langs/menu/en.js
Normal file
6
lms/nladmin-ui/src/i18n/langs/menu/en.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
export default {
|
||||||
|
'placeholder': {
|
||||||
|
'fuzzy_search': 'fuzzy search',
|
||||||
|
'owning_system': 'system'
|
||||||
|
}
|
||||||
|
}
|
||||||
6
lms/nladmin-ui/src/i18n/langs/menu/in.js
Normal file
6
lms/nladmin-ui/src/i18n/langs/menu/in.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
export default {
|
||||||
|
'placeholder': {
|
||||||
|
'fuzzy_search': 'pencarian kabur',
|
||||||
|
'owning_system': 'sistem terkait'
|
||||||
|
}
|
||||||
|
}
|
||||||
6
lms/nladmin-ui/src/i18n/langs/menu/zh.js
Normal file
6
lms/nladmin-ui/src/i18n/langs/menu/zh.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
export default {
|
||||||
|
'placeholder': {
|
||||||
|
'fuzzy_search': '模糊搜索',
|
||||||
|
'owning_system': '所属系统'
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
|
|
||||||
export default {
|
export default {
|
||||||
'lang': 'zh',
|
'lang': 'zh',
|
||||||
'common': {
|
'common': {
|
||||||
@@ -77,6 +76,8 @@ export default {
|
|||||||
'Tip10': '请输入旧密码',
|
'Tip10': '请输入旧密码',
|
||||||
'Tip11': '请输入新密码',
|
'Tip11': '请输入新密码',
|
||||||
'Tip12': '长度在 6 到 20 个字符',
|
'Tip12': '长度在 6 到 20 个字符',
|
||||||
|
'Tip13': '确定注销并退出系统吗?',
|
||||||
|
'Tip14': 'WebSocket连接发生错误',
|
||||||
'loading': '数据加载中...'
|
'loading': '数据加载中...'
|
||||||
},
|
},
|
||||||
// 菜单
|
// 菜单
|
||||||
@@ -123,6 +124,5 @@ export default {
|
|||||||
'disk': '磁盘使用率',
|
'disk': '磁盘使用率',
|
||||||
'cpu_monitoring': 'CPU使用率监控',
|
'cpu_monitoring': 'CPU使用率监控',
|
||||||
'memory_monitoring': '内存使用率监控'
|
'memory_monitoring': '内存使用率监控'
|
||||||
},
|
}
|
||||||
...zhLocale
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,9 +142,9 @@ export default {
|
|||||||
this.$store.dispatch('app/toggleSideBar')
|
this.$store.dispatch('app/toggleSideBar')
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
this.$confirm('确定注销并退出系统吗?', '提示', {
|
this.$confirm(this.$t('common.Tip13'), this.$t('common.Tips'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$t('common.Confirm'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$t('common.Cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.logout()
|
this.logout()
|
||||||
@@ -164,7 +164,7 @@ export default {
|
|||||||
},
|
},
|
||||||
webSocketOnError(e) {
|
webSocketOnError(e) {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: 'WebSocket连接发生错误',
|
title: this.$t('common.Tip14'),
|
||||||
type: 'error',
|
type: 'error',
|
||||||
duration: 0
|
duration: 0
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ Vue.use(Element, {
|
|||||||
|
|
||||||
Vue.prototype.$langPre = {
|
Vue.prototype.$langPre = {
|
||||||
computedProp(suffix) {
|
computedProp(suffix) {
|
||||||
console.log(suffix)
|
|
||||||
return localStorage.getItem('lang') + '_' + suffix
|
return localStorage.getItem('lang') + '_' + suffix
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
v-model="query.blurry"
|
v-model="query.blurry"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="模糊搜索"
|
:placeholder="$t('placeholder.fuzzy_search')"
|
||||||
style="width: 200px;margin-bottom: 10px"
|
style="width: 200px;margin-bottom: 10px"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@keyup.enter.native="queryBlurry"
|
@keyup.enter.native="queryBlurry"
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="query.system_type"
|
v-model="query.system_type"
|
||||||
style="width: 100px; height: 35px;top: -5px;"
|
style="width: 100px; height: 35px;top: -5px;"
|
||||||
placeholder="所属系统"
|
:placeholder="$t('placeholder.owning_system')"
|
||||||
@change="changetype"
|
@change="changetype"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -85,11 +85,32 @@
|
|||||||
<el-radio-button label="true">否</el-radio-button>
|
<el-radio-button label="true">否</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.type.toString() !== '2'" label="菜单标题" prop="title">
|
<el-form-item v-if="form.type.toString() !== '2'" label="默认标题" prop="title">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.title"
|
v-model="form.title"
|
||||||
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
|
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
|
||||||
placeholder="菜单标题"
|
placeholder="默认标题"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.type.toString() !== '2'" label="中文标题" prop="zh_title">
|
||||||
|
<el-input
|
||||||
|
v-model="form.zh_title"
|
||||||
|
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
|
||||||
|
placeholder="中文标题"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.type.toString() !== '2'" label="英文标题" prop="en_title">
|
||||||
|
<el-input
|
||||||
|
v-model="form.en_title"
|
||||||
|
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
|
||||||
|
placeholder="英文标题"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.type.toString() !== '2'" label="印尼标题" prop="in_title">
|
||||||
|
<el-input
|
||||||
|
v-model="form.in_title"
|
||||||
|
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
|
||||||
|
placeholder="印尼标题"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.type.toString() === '2'" label="按钮名称" prop="title">
|
<el-form-item v-if="form.type.toString() === '2'" label="按钮名称" prop="title">
|
||||||
@@ -222,6 +243,9 @@ import Dict from '../../../components/Dict/Dict'
|
|||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
menu_id: null,
|
menu_id: null,
|
||||||
title: null,
|
title: null,
|
||||||
|
en_title: null,
|
||||||
|
in_title: null,
|
||||||
|
zh_title: null,
|
||||||
menu_sort: 999,
|
menu_sort: 999,
|
||||||
path: null,
|
path: null,
|
||||||
system_type: null,
|
system_type: null,
|
||||||
@@ -234,7 +258,7 @@ const defaultForm = {
|
|||||||
icon: null,
|
icon: null,
|
||||||
cache: false,
|
cache: false,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
type: 0,
|
type: 2,
|
||||||
permission: null
|
permission: null
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
@@ -259,6 +283,15 @@ export default {
|
|||||||
title: [
|
title: [
|
||||||
{ required: true, message: '请输入标题', trigger: 'blur' }
|
{ required: true, message: '请输入标题', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
|
zh_title: [
|
||||||
|
{ required: true, message: '请输入标题', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
en_title: [
|
||||||
|
{ required: true, message: '请输入标题', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
in_title: [
|
||||||
|
{ required: true, message: '请输入标题', trigger: 'blur' }
|
||||||
|
],
|
||||||
path: [
|
path: [
|
||||||
{ required: true, message: '请输入地址', trigger: 'blur' }
|
{ required: true, message: '请输入地址', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user