国际化

master
zhouhy 6 months ago
parent e15e11e512
commit a81819a0b6

@ -0,0 +1,40 @@
package com.hw.auth.controller;
import com.hw.common.core.utils.MessageUtils;
import com.hw.common.security.config.i18nConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.support.ResourceBundleMessageSource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @ClassName : SysLoginController
* @Description :
* @Author :
* @Date: 2024-05-21 15:30
*/
@RestController
public class SysLoginController {
@Autowired
private ApplicationContext application;
@Bean(name = "messageSource")
public ResourceBundleMessageSource getMessageSource() throws Exception {
ResourceBundleMessageSource resourceBundleMessageSource = new ResourceBundleMessageSource();
resourceBundleMessageSource.setDefaultEncoding("UTF-8");
resourceBundleMessageSource.setBasenames("i18n/messages");
return resourceBundleMessageSource;
}
//国际化
@GetMapping("/changeLanguage")
public String changeLanguage(String lang)
{
// System.out.println(MessageUtils.message("user.login.success"));
// System.out.println(MessageUtils.message("user.jcaptcha.error"));
return MessageUtils.message("test", lang);
}
}

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -0,0 +1,40 @@
#错误消息
not.null=* musthave
user.jcaptcha.error=验证码错误error
user.jcaptcha.expire=验证码已失效
user.not.exists=用户不存在/密码错误
user.password.not.match=用户不存在/密码错误
user.password.retry.limit.count=密码输入错误{0}次
user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
user.password.delete=对不起,您的账号已被删除
user.blocked=用户已封禁,请联系管理员
role.blocked=角色已封禁,请联系管理员
login.blocked=很遗憾访问IP已被列入系统黑名单
user.logout.success=退出成功
length.not.valid=长度必须在{min}到{max}个字符之间
user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成且必须以非数字开头
user.password.not.valid=* 5-50个字符
user.email.not.valid=邮箱格式错误
user.mobile.phone.number.not.valid=手机号格式错误
user.login.success=登录成功12312321123
user.register.success=注册成功
user.notfound=请重新登录
user.forcelogout=管理员强制退出,请重新登录
user.unknown.error=未知错误,请重新登录
##文件上传消息
upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB
upload.filename.exceed.length=上传的文件名最长{0}个字符
##权限
no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
test = test

@ -0,0 +1,8 @@
user.login.username=User name
user.login.password=Password
user.login.code=Security code
user.login.remember=Remember me12312312
user.login.submit=Sign In
user.jcaptcha.error=验证码error
test = englishtest

@ -0,0 +1,9 @@
user.login.username=用户名错误
user.login.password=密码错误
user.login.code=code错误
user.login.remember=记住密码
user.login.submit=提交
user.login.success = 111
user.jcaptcha.error=验证码作物
test = 中文测试

@ -0,0 +1,33 @@
package com.hw.common.core.utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;
/**
* i18n
*
* @author ruoyi
*/
public class MessageUtils
{
/**
* spring messageSource
*
* @param code
* @param args
* @return
*/
public static String message(String code, Object... args)
{
MessageSource messageSource = SpringUtils.getBean(MessageSource.class);
return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());
}
}

@ -1,5 +1,7 @@
package com.hw.common.security.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.support.ResourceBundleMessageSource;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.hw.common.security.interceptor.HeaderInterceptor;

@ -0,0 +1,76 @@
package com.hw.common.security.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ResourceBundleMessageSource;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import java.util.Locale;
/**
* @ClassName : i18nConfig
* @Description :
* @Author :
* @Date: 2024-05-21 09:01
*/
@Configuration
@Component
public class i18nConfig implements WebMvcConfigurer {
@Bean
public LocaleChangeInterceptor localeChangeInterceptor()
{
LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
// 参数名
lci.setParamName("lang");
return lci;
}
/**
*
* @param registry
*/
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 注册Locale拦截器(国际化)
registry.addInterceptor(getLocaleChangeInterceptor());
}
/**
* Locale()
* @return
*/
public LocaleChangeInterceptor getLocaleChangeInterceptor(){
// 定义一个拦截器
LocaleChangeInterceptor interceptor = new LocaleChangeInterceptor();
// 拦截请求中 key 为 lang 的参数
interceptor.setParamName("lang");
return interceptor;
}
/**
* locale
*/
@Bean
LocaleResolver localeResolver() {
//替换掉默认的 AcceptHeaderLocaleResolver
SessionLocaleResolver localeResolver = new SessionLocaleResolver();
//设置默认语言为简体中文
localeResolver.setDefaultLocale(Locale.SIMPLIFIED_CHINESE);
return localeResolver;
}
// @Bean(name = "messageSource")
// public ResourceBundleMessageSource getMessageSource() throws Exception {
// ResourceBundleMessageSource resourceBundleMessageSource = new ResourceBundleMessageSource();
// resourceBundleMessageSource.setDefaultEncoding("UTF-8");
// resourceBundleMessageSource.setBasenames("i18n/messages");
// return resourceBundleMessageSource;
// }
}

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -77,6 +77,10 @@
<groupId>com.hw</groupId>
<artifactId>hw-common-swagger</artifactId>
</dependency>
<dependency>
<groupId>com.hw</groupId>
<artifactId>hw-api-job</artifactId>
</dependency>
</dependencies>
<build>

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb-test
group: xins
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb-test
group: xins
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -0,0 +1,40 @@
#错误消息
not.null=* musthave
user.jcaptcha.error=验证码错误error
user.jcaptcha.expire=验证码已失效
user.not.exists=用户不存在/密码错误
user.password.not.match=用户不存在/密码错误
user.password.retry.limit.count=密码输入错误{0}次
user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
user.password.delete=对不起,您的账号已被删除
user.blocked=用户已封禁,请联系管理员
role.blocked=角色已封禁,请联系管理员
login.blocked=很遗憾访问IP已被列入系统黑名单
user.logout.success=退出成功
length.not.valid=长度必须在{min}到{max}个字符之间
user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成且必须以非数字开头
user.password.not.valid=* 5-50个字符
user.email.not.valid=邮箱格式错误
user.mobile.phone.number.not.valid=手机号格式错误
user.login.success=登录成功12312321123
user.register.success=注册成功
user.notfound=请重新登录
user.forcelogout=管理员强制退出,请重新登录
user.unknown.error=未知错误,请重新登录
##文件上传消息
upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB
upload.filename.exceed.length=上传的文件名最长{0}个字符
##权限
no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
test = test

@ -0,0 +1,8 @@
user.login.username=User name
user.login.password=Password
user.login.code=Security code
user.login.remember=Remember me12312312
user.login.submit=Sign In
user.jcaptcha.error=验证码error
test = englishtest

@ -0,0 +1,9 @@
user.login.username=用户名错误
user.login.password=密码错误
user.login.code=code错误
user.login.remember=记住密码
user.login.submit=提交
user.login.success = 111
user.jcaptcha.error=验证码作物
test = 中文测试

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -15,13 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb-test
group: xins
namespace: jyI18n
group: zhy
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb-test
group: xins
namespace: jyI18n
group: zhy
# 配置文件格式
file-extension: yml
# 共享配置

@ -36,6 +36,7 @@
"url": "https://gitee.com/y_project/RuoYi-Cloud.git"
},
"dependencies": {
"vue-i18n": "7.3.2",
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.24.0",
"clipboard": "2.0.8",

@ -71,3 +71,16 @@ export function getStations() {
method: 'get',
})
}
// 修改语言
export function changeLanguage(lang){
return request({
url: '/auth/changeLanguage',
method: 'get',
headers: {
isToken: false,
},
params: {
lang: lang
}
})
}

@ -0,0 +1,41 @@
<template>
<el-dropdown trigger="click" class="international" @command="handleSetLanguage">
<div>
<svg-icon class-name="international-icon" icon-class="language" />
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :disabled="language==='zh_CN'" command="zh_CN">
中文
</el-dropdown-item>
<el-dropdown-item :disabled="language==='en_US'" command="en_US">
English
</el-dropdown-item>
<el-dropdown-item :disabled="language==='vi_VN'" command="vi_VN">
Nhập
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
<script>
import { changeLanguage } from "@/api/login";
export default {
computed: {
language() {
return this.$store.getters.language
}
},
methods: {
handleSetLanguage(value) {
this.$i18n.locale = value
this.$store.dispatch('app/setLanguage', value)
this.$message({ message: this.$t('pop.test'), type: 'success' })
changeLanguage(value).then(response => {
window.location.reload();
});
}
}
}
</script>

@ -9,13 +9,13 @@
<svg-icon
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
:icon-class="item.meta.icon"/>
{{ item.meta.title }}
{{ menusTitle(item.meta.title) }}
</el-menu-item>
</template>
<!-- 顶部菜单超出数量折叠 -->
<el-submenu :style="{'--theme': theme}" index="more" v-if="topMenus.length > visibleNumber">
<template slot="title">更多菜单</template>
<template slot="title">{{ $t('menus.more') }}</template>
<template v-for="(item, index) in topMenus">
<el-menu-item
:index="item.path"
@ -117,6 +117,28 @@ export default {
this.setVisibleNumber();
},
methods: {
menusTitle(item){
// console.log("======================================")
// console.log(item)
const a = [...item].map(char=>char.charCodeAt(0))
let b =0
for (let i = 0; i < a.length;i++){
b = b+a[i];
}
if (item=='系统管理'){
console.log(this.$te('menus.125825'))
console.log(this.$t('menus.125825'))
}
// console.log(b)
// console.log(this.$te('menus.'+b))
// console.log(this.$t('menus.'+b))
// console.log("======================================")
if (this.$te('menus.'+b)){
return this.$t('menus.'+b)
}
return item
},
//
setVisibleNumber() {
const width = document.body.getBoundingClientRect().width / 2;

@ -0,0 +1,289 @@
// en.js
export default {
menus:{
more:'moreMenus',
//系统管理
125825:'system Management',
98442:'basic Information',
111971:'log Management',
111469:'production Management',
94070:'basic Information',
56970:'bulletin Board',
118106:'plan Management',
102178:'warehouse Management',
135215:'rawMaterial Management',
107543:'information Inquiry',
134814:'quality Control',
122572:'record Query',
119916:'device Management',
91257:'operation Information',
99869:'equipment Maintenance',
115004:'equipment Lubrication',
108349:'Shutdown management',
108629:'Maintenance management',
141057:'Point inspection management',
90686:'knowledge base',
122676:'energy management',
116631:'engineering management',
121348:'management of power use',
105706:'Abnormal alarm',
120402:'System monitoring',
109366:'System Tools',
78347:'home page',
116486:'user management ',
130027:'Role management',
116440:'Menu management',
136823:'Department Management',
105355:'Job management',
105590:'Dictionary management',
115806:'Parameter settings',
110005:'Notification Announcement',
105356:'Login log',
168058:'Prompt routing information',
120563:'Process management',
118093:'printer information',
90551:'Factory information',
97718:'Production line information',
96741:'Operation log',
93380:'Process information',
89474:'Station information',
126221:'Process route',
100434:'Material information',
166855:'Material supplier information',
154712:'Material type information',
95476:'Production BOM information',
100736:'Pallet information',
149123:'Finished product barcode information',
176186:'Raw material barcode information',
103818:'Attachment information',
46972:'First floor',
114615:'Project Information',
175675:'Purchase order information',
162165:'Sales order information',
95488:'Production work order',
102121:'Production dispatch',
89526:'Warehouse information',
89648:'Warehouse location information',
97292:'Warehouse category',
95334:'Outbound audit',
111212:'Return Review',
101161:'Moving and merging warehouses',
121459:'Raw material inventory',
179077:'Raw material storage records',
94396:'Finished product inventory',
179226:'Raw material outbound record',
195104:'Raw material return records',
135859:'Inspection items',
122665:'Inspection rules',
121943:'Quality inspection results',
108322:'Quality inspection work order',
112843:'Equipment type',
170122:'Equipment supplier information',
161323:'Equipment ledger information',
103923:'Equipment BOM information',
177161:'Equipment procurement information',
151111:'Equipment parameter information',
211597:'Special equipment parameter information',
157120:'Equipment file information',
89269:'Outsourcing information',
155028:'Equipment depreciation information',
162147:'Equipment installation information',
171644:'Device transfer information',
175341:'Equipment debugging information',
143837:'Maintenance location information',
134005:'Maintenance standard information',
143195:'Maintenance plan information',
86674:'Maintenance work order',
113194:'Lubrication plan',
116604:'Lubrication records',
149140:'Lubrication standard information',
158972:'Lubrication part information',
101809:'Lubrication work order',
135781:'Reason information for shutdown',
146412:'Shutdown type information',
107163:'Shutdown records',
91085:'Repair work order',
139871:'Point inspection records',
193624:'Point inspection route information',
181597:'Point inspection plan information',
194321:'Point inspection project information',
172407:'Point inspection standard information',
125076:'Point Inspection Work Order',
147125:'Lubrication knowledge base',
131990:'Maintenance knowledge base',
143648:'Maintenance knowledge base',
},
login: {
基础信息:'111',
title: 'RuoYi Login Form',
logIn: 'Login in',
username: 'Username',
password: 'Password',
code: 'Code',
rememberMe: 'Remember Me',
loading: 'Login Loading',
inputCode:'please input code',
inputUsername:'please input username',
inputPassword:'please input password',
},
tagsView: {
refresh: 'Refresh',
close: 'Close',
closeOthers: 'Close Others',
closeAll: 'Close All'
},
settings: {
title: 'Page style setting',
theme: 'Theme Color',
tagsView: 'Open Tags-View',
fixedHeader: 'Fixed Header',
sidebarLogo: 'Sidebar Logo'
},
pop:{
test:'success in set language',
},
button:{
select:'select',
insert:'new',
update:'update',
delete:'delete',
export:'export',
remake:'Reset',
swtich:'Expand/collapse',
operate:'operate',
updateSuccess:'updateSuccess',
insertSuccess:'insertSuccess',
deleteSuccess:'deleteSuccess',
deleteConfirmDeviceType:'Do you want to delete DeviceType where typeCode is ',
deleteConfirmSuplier:'Do you want to delete Suplier where suplierCode is ',
deleteConfirmBom:'Do you want to delete Bom where bomCode is ',
deleteConfirmWorkOrder:'Do you want to delete WorkOrder where workOrderCode is ',
deleteConfirmDeviceParam:'Do you want to delete DeviceParam where paramId is',
deleteConfirmSpecialDeviceParam:'Do you want to delete SpecialDeviceParam where paramId is',
deleteConfirmFiels:'Do you wangt to delete Device Files where deviceParamId is',
deleteConfirmOutsrc:'Do you wangt to delete Device Outsrc where Id is',
submit:'submit',
cancel:'cancel'
},
dms:{
topNodes: 'top nodes',
//设备类型
typeCode:'typeCode',
inputTypeCode:'please input type code',
typeName:'typeName',
inputTypeName:'please input type name',
remark:'remark',
parentId:'parentId',
inputParentId:'please input parent id',
inputRemark:'please input remark',
insertDeviceType:'insert device type',
updateDeviceType:'update device type',
inputDeviceType:'please input device type',
//设备供应商
supplier:'supplier',
inputSupplier:'please select supplier',
suplierCode:'suplierCode',
suplierName:'suplierName',
suplierPerson:'suplier Person',
suplierTel:'suplier phone number',
suplierAddress:'suplier Address',
inputSuplierCode:'please input suplier Code',
inputSuplierName:'please input suplier Name',
inputSuplierPerson:'please input suplier Person',
inputSuplierTel:'please input suplier phone number',
inputsuplierAddress:'please input suplier Address',
insertSuplier:'insert suplier',
updateSuplier:'update suplier',
//设备
deviceId:'deviceid',
deviceCode:'deviceCode',
inputDeviceId:'please input device id',
inputDeviceName:'please input device name',
deviceLocation:'deviceLocation',
inputDeviceLocation:'please input device location',
deviceStatus:'deviceStatus',
inputDeviceStatus:'please select device status',
assetNumber:'assetNumber',
//bom
bomNumber:'bom number',
inputBomNumber:'please input bom number',
insertBom:'insert bom',
updateBom:'update bom',
//采购信息
purchaseTime:'purchaseTime',
purchasePerson:'purchasePerson',
purchasePosition:'purchasePosition',
inputPurchaseTime:'inputPurchaseTime',
//计划
workOrder:'workOrder',
inputWorkOrder:'please input work order',
insertWorkOrder:'insert work order',
updateWorkOrder:'update work order',
//设备参数
paramCode:'paramCode',
paramName:'paramName',
paramIp:'paramIp',
paramAddress:'paramAddress',
paramType:'paramType',
readFrequency:'readFrequency',
inputParamCode:'please input param code',
inputParamName:'please input param name',
inputParamIp:'please input param IP',
inputParamAddress:'please input param Address',
inputParamType:'please input type',
inputReadFrequency:'please input Read frequency',
insertDeviceParam:'insert device parameter',
updateDeviceParam:'update device parameter',
//特种设备
paramValue:'paramValue',
paramUnit:'paramUnit',
inputParamValue:'please input param value',
inputParamUnit:'please input param unit',
insertSpecialParma:'insert special device parameter',
updateSpecialParma:'update special device parameter',
//设备档案
filesCode:'filesCode',
filesName:'filesName',
filesPath:'filesPath',
filesUpdate:'filesUpdate',
selectFile:'selectFile',
sizeMax:'sizeMax',
formatIs:'formatIs',
formatError:'file format is error ,please upload again',
fileLoading:'file loading,please waiting...',
fileUpdateError:'file upload error please upload again',
fileNumberMax:' max file number is ',
inputFilesCode:'please input filesCode',
insertFiles:'insert files information',
updateFiles:'update files information',
// 外协信息
outsrcName:'单位名称',
outsrcStatus:'外协状态',
outsrcCode:'外协编号',
outsrcPerson:'外协联系人',
outsrcTel:'外协电话',
outsrcAddress:'外协地址',
inputOutsrcName:'请输入单位名称',
inputOutsrcStatus:'请选择外协状态',
inputOutsrcCode:'请输入外协编号',
inputOutsrcPerson:'请输入外协联系人',
inputOutsrcTel:'请输入外协电话',
inputOutsrcAddress:'请输入外协地址',
insertOutsrc:'新增外协信息',
updateOutsrc:'修改外协信息',
}
}

@ -0,0 +1,37 @@
// index.js
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import Cookies from 'js-cookie'
import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang
import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'// element-ui lang
import elementViLocale from 'element-ui/lib/locale/lang/vi'// element-ui lang
import enLocale from './en'
import zhLocale from './zh'
import viLocale from './vi'
Vue.use(VueI18n)
const messages = {
en_US: {
...enLocale,
...elementEnLocale
},
zh_CN: {
...zhLocale,
...elementZhLocale
},
vi_VN: {
...viLocale,
...elementViLocale
},
}
const i18n = new VueI18n({
// 设置语言 选项 en | zh
locale: Cookies.get('language') || 'zh_CN',
// 设置文本内容
messages
})
export default i18n

@ -0,0 +1,289 @@
export default {
menus:{
more:'',
//系统管理
125825:'Quản trị hệ thống',
98442:'Thông tin cơ bản',
111971:'Quản lý nhật ký',
111469:'Quản lý sản xuất',
94070:'Thông tin cơ bản',
56970:'Kanban',
118106:'Quản lý chương trình',
102178:'Quản lý kho',
135215:'Quản lý nguyên liệu',
107543:'Truy vấn thông tin',
134814:'Kiểm soát chất lượng',
122572:'Truy vấn nhật ký',
119916:'Quản lý thiết bị',
91257 :'Thông tin hoạt động',
99869 :'Bảo trì thiết bị',
115004:'Bôi trơn thiết bị',
108349:'Quản lý thời gian chết',
108629:'Quản lý bảo trì',
141057:'Quản lý kiểm tra điểm',
90686:'Cơ sở tri thức',
122676:'Quản lý năng lượng',
116631:'Quản lý dự án',
121348:'Quản lý điện',
105706:'Báo động bất thường',
120402:'Giám sát hệ thống',
109366:'Công cụ hệ thống',
78347:'Nhà',
116486:'Quản lý người dùng',
130027:'Quản lý vai trò',
116440:'Quản lý menu',
136823:'Quản lý bộ phận',
105355:'Quản lý bài viết',
105590:'Quản lý từ điển',
115806:'Cài đặt thông số',
110005:'Thông báo thông báo',
105356:'Nhật ký đăng nhập',
168058:'Cho biết thông tin định tuyến',
120563:'Quản lý quy trình',
118093:'Thông tin máy in',
90551: 'Thông tin nhà máy',
97718: 'Thông tin dây chuyền sản xuất',
96741: 'Nhật ký hoạt động',
93380: 'Thông tin hoạt động',
89474: 'Thông tin bàn làm việc',
126221:'Routing',
100434:'Thông tin mặt hàng',
166855:'Thông tin nhà cung cấp mặt hàng',
154712:'Thông tin loại mặt hàng',
95476: 'Thông tin BOM sản xuất',
100736:'Thông tin pallet',
149123:'Thông tin mã vạch thành phẩm',
176186:'Thông tin mã vạch nguyên liệu',
103818:'Thông tin đính kèm',
46972:'Tầng trệt',
114615:'Thông tin dự án',
175675:'Thông tin đơn đặt hàng',
162165:'Thông tin đơn đặt hàng',
95488: 'Đơn đặt hàng sản xuất',
102121:'Công văn sản xuất',
89526: 'Thông tin kho hàng',
89648: 'Thông tin vị trí',
97292: 'Danh mục kho',
95334: 'Phê duyệt gửi đi',
111212:'Đánh giá trở lại',
101161:'Di chuyển và phối thư viện',
121459:'Tồn kho nguyên liệu',
179077:'Hồ sơ nhập kho nguyên liệu',
94396: 'Hàng tồn kho thành phẩm',
179226:'Hồ sơ xuất nguyên liệu thô',
195104:'Hồ sơ trả lại nguyên liệu thô',
135859:'Các hạng mục kiểm tra',
122665:'Quy tắc kiểm tra',
121943:'Kết quả kiểm tra chất lượng',
108322:'Lệnh kiểm tra chất lượng công việc',
112843:'Loại thiết bị',
170122:'Thông tin nhà cung cấp thiết bị',
161323:'Thông tin sổ cái thiết bị',
103923:'Thông tin BOM thiết bị',
177161:'Thông tin mua thiết bị',
151111:'Thông tin thông số thiết bị',
211597:'Thông tin thông số thiết bị đặc biệt',
157120:'Thông tin hồ sơ thiết bị',
89269:'Thông tin gia công phần mềm',
155028:'Thông tin khấu hao thiết bị',
162147:'Thông tin cài đặt thiết bị',
171644:'Thông tin chuyển thiết bị',
175341:'Thông tin gỡ lỗi thiết bị',
143837:'Thông tin về các khu vực bảo trì',
134005:'Thông tin về tiêu chuẩn bảo trì',
143195:'Thông tin tiến độ bảo trì',
86674:' Lệnh sản xuất bảo trì',
113194:'Kế hoạch bôi trơn',
116604:'Hồ sơ bôi trơn',
149140:'Thông tin tiêu chuẩn bôi trơn',
158972:'Thông tin trang web bôi trơn',
101809:'Lệnh sản xuất bôi trơn',
135781:'Thông tin lý do thời gian chết',
146412:'Thông tin loại thời gian chết',
107163:'Ghi nhật ký thời gian chết',
91085: 'Sửa chữa lệnh sản xuất',
139871:'Hồ sơ kiểm tra điểm',
193624:'Thông tin dây chuyền kiểm tra điểm',
181597:'Thông tin kế hoạch kiểm tra điểm',
194321:'Thông tin dự án kiểm tra điểm',
172407:'Thông tin tiêu chuẩn kiểm tra điểm',
125076:'Trình tự công việc kiểm tra điểm',
147125:'Cơ sở kiến thức bôi trơn',
131990:'Cơ sở kiến thức bảo trì',
143648:'Sửa chữa cơ sở kiến thức',
},
login: {
title: 'Hệ thống quản lý back-end',
logIn: 'Đăng nhập',
username: 'Tài khoản',
password: 'mật khẩu',
code: 'Captcha',
rememberMe: 'Nhớ mật khẩu của bạn',
loading: 'Tải đăng nhập',
inputCode:'Vui lòng nhập mã xác minh',
inputUsername:'Vui lòng nhập số tài khoản',
inputPassword:'Vui lòng nhập mật khẩu',
},
tagsView: {
refresh: 'đỏ bừng',
close: 'Dừng lại',
closeOthers: 'Tắt Khác',
closeAll: 'Đóng tất cả'
},
settings: {
title: 'Cấu hình bố cục hệ thống',
theme: 'Màu nhấn',
tagsView: 'Mở Thẻ-Xem',
fixedHeader: 'Cố định Tiêu đề',
sidebarLogo: 'Bên Logo'
},
pop:{
test:'Ngôn ngữ đã được thiết lập thành công'
},
button:{
select:'Tìm kiếm',
insert:'Mới',
update:'hiệu đính',
delete:'Xóa',
export:'Xuất khẩu',
remake:'Reset',
swtich:'Mở rộng/thu gọn',
operate:'hành quân',
updateSuccess:'Việc sửa đổi đã thành công',
insertSuccess:'Cái mới là thành công',
deleteSuccess:'Xóa thành công',
deleteConfirmDeviceType:'Có xóa số thông tin loại thiết bị hay không',
deleteConfirmSuplier:'Có xác nhận rằng số thông tin nhà cung cấp thiết bị xóa là hay không',
deleteConfirmBom:'Kiểm tra xem có xác nhận rằng số thông tin BOM của thiết bị đã xóa được đặt thành không',
deleteConfirmWorkOrder:'Kiểm tra xem có xác nhận rằng số thông tin mua hàng của thiết bị đã xóa được đặt thành không',
deleteConfirmDeviceParam:'Kiểm tra xem có xác nhận rằng ID thông số của thiết bị đã xóa được đặt thành không',
deleteConfirmSpecialDeviceParam:'Có cần xác nhận rằng số thông tin tham số của thiết bị đặc biệt có bị xóa hay không',
deleteConfirmFiels:'Kiểm tra xem có xác nhận rằng số thông tin hồ sơ thiết bị bị xóa là không',
deleteConfirmOutsrc:'Kiểm tra xem có xóa số thông tin thuê ngoài hay không',
submit:'Bạn có chắc không',
cancel:'Hủy'
},
dms:{
topNodes: 'Các nút cấp cao nhất',
//设备类型
typeCode:'Loại số',
inputTypeCode:'Vui lòng nhập mã loại',
typeName:'Tên loại',
inputTypeName:'Vui lòng nhập tên cho loại',
remark:'bình luận',
parentId:'Số cha mẹ',
inputParentId:'Vui lòng nhập số phụ huynh',
inputRemark:'Vui lòng nhập nội dung của bạn',
insertDeviceType:'Thêm thông tin loại thiết bị',
updateDeviceType:'Sửa đổi thông tin loại thiết bị',
inputDeviceType:'Hãy nhập tên kiểu thiết bị',
//设备供应商
supplier:'Nhà cung cấp',
inputSupplier:'Hãy chọn nhà cung cấp',
suplierCode:'Số nhà cung cấp',
suplierName:'Tên nhà cung cấp',
suplierPerson:'Liên hệ nhà cung cấp',
suplierTel:'Số điện thoại nhà cung cấp',
suplierAddress:'Địa chỉ nhà cung cấp',
inputSuplierCode:'Vui lòng nhập số nhà cung cấp',
inputSuplierName:'Vui lòng nhập tên nhà cung cấp',
inputSuplierPerson:'Vui lòng nhập liên hệ nhà cung cấp',
inputSuplierTel:'Vui lòng nhập số điện thoại của nhà cung cấp',
inputsuplierAddress:'Vui lòng nhập địa chỉ của nhà cung cấp',
insertSuplier:'Thêm thông tin nhà cung cấp',
updateSuplier:'Sửa đổi thông tin nhà cung cấp',
//设备
deviceId:'ID thiết bị',
deviceCode:'Mã hóa thiết bị',
deviceName:'Tên của thiết bị',
inputDeviceId:'Vui lòng nhập ID thiết bị',
inputDeviceName:'Vui lòng nhập tên thiết bị',
inputDeviceLocation:'Vui lòng nhập vị trí thiết bị',
deviceStatus:'Tình trạng thiết bị',
inputDeviceStatus:'Hãy chọn trạng thái thiết bị',
assetNumber:'Số tài sản',
//bom
bomNumber:'Số lượng BOM',
inputBomNumber:'Vui lòng nhập số lượng BOM',
insertBom:'Thêm thông tin BOM',
updateBom:'Sửa đổi thông tin BOM',
//采购信息
purchaseTime:'Thời gian mua sắm',
purchasePerson:'Mua',
purchasePosition:'Nơi mua hàng',
inputPurchaseTime:'Chọn thời gian mua hàng',
//计划
workOrder:'Số kế hoạch',
inputWorkOrder:'Vui lòng nhập số kế hoạch',
insertWorkOrder:'Đã thêm thông tin mua thiết bị',
updateWorkOrder:'Sửa đổi thông tin mua thiết bị',
//设备参数
paramCode:'Số tham số',
paramName:'Tên của tham số',
paramIp:'thông số IP',
paramAddress:'Địa chỉ thông số',
paramType:'Loại thông số',
readFrequency:'Tần suất đọc',
inputParamCode:'Vui lòng nhập số tham số',
inputParamName:'Vui lòng nhập tên cho tham số',
inputParamIp:'Vui lòng nhập các thông sốIP',
inputParamAddress:'Vui lòng nhập địa chỉ tham số',
inputParamType:'Vui lòng nhập loại thông số',
inputReadFrequency:'Vui lòng nhập tần suất đọc',
insertDeviceParam:'Đã thêm thông tin thông số thiết bị',
updateDeviceParam:'Sửa đổi thông số thiết bị',
//特种设备
paramValue:'Giá trị tham số',
paramUnit:'Đơn vị tham số',
inputParamValue:'Vui lòng nhập giá trị cho tham số',
inputParamUnit:'Vui lòng nhập đơn vị tham số',
insertSpecialParma:'Đã thêm thông tin thông số cho thiết bị đặc biệt',
updateSpecialParma:'Sửa đổi thông tin thông số của thiết bị đặc biệt',
//设备档案
filesCode:'Số tập tin',
filesName:'Tên của tệp',
filesPath:'Đường dẫn lưu trữ',
filesUpdate:'Tải tệp lên',
selectFile:'Chọn một tệp',
sizeMax:'Kích thước không vượt quá',
formatIs:'Định dạng là',
formatError:'Định dạng tệp không chính xác, vui lòng tải lên lại',
fileLoading:'Tải lên tệp, vui lòng đợi...',
fileUpdateError:'Tải lên tệp không thành công, vui lòng thử lại',
fileNumberMax:'Không thể vượt quá số lượng tệp đã tải lên',
inputFilesCode:'Vui lòng nhập số tệp của bạn',
insertFiles:'Đã thêm thông tin hồ sơ thiết bị',
updateFiles:'Sửa đổi thông tin cấu hình thiết bị',
// 外协信息
outsrcName:'Tên của tổ chức',
outsrcStatus:'Tình trạng thuê ngoài',
outsrcCode:'Số gia công phần mềm',
outsrcPerson:'Liên hệ gia công phần mềm',
outsrcTel:'Gia công phần mềm cuộc gọi',
outsrcAddress:'Địa chỉ thuê ngoài',
inputOutsrcName:'Vui lòng nhập tên của tổ chức',
inputOutsrcStatus:'Vui lòng chọn trạng thái thuê ngoài',
inputOutsrcCode:'Vui lòng nhập số gia công phần mềm',
inputOutsrcPerson:'Vui lòng nhập người liên hệ thuê ngoài',
inputOutsrcTel:'Vui lòng nhập số điện thoại thuê ngoài',
inputOutsrcAddress:'Vui lòng nhập địa chỉ thuê ngoài',
insertOutsrc:'Đã thêm thông tin gia công phần mềm',
updateOutsrc:'Sửa đổi thông tin thuê ngoài',
}
}

@ -0,0 +1,333 @@
export default {
menus:{
more:'更多菜单',
//系统管理
125825:'系统管理',
98442:'基础信息',
111971:'日志管理',
111469:'生产管理',
94070:'基本信息',
56970:'看板',
118106:'计划管理',
102178:'仓储管理',
135215:'原材料管理',
107543:'信息查询',
134814:'质量管理',
122572:'记录查询',
119916:'设备管理',
91257:'操作信息',
99869:'设备保养',
115004:'设备润滑',
108349:'停机管理',
108629:'检修管理',
141057:'点巡检管理',
90686:'知识库',
122676:'能源管理',
116631:'工程管理',
121348:'用电管理',
105706:'异常告警',
120402:'系统监控',
109366:'系统工具',
78347:'首页',
116486:'用户管理',
130027:'角色管理',
116440:'菜单管理',
136823:'部门管理',
105355:'岗位管理',
105590:'字典管理',
115806:'参数设置',
110005:'通知公告',
105356:'登录日志',
168058:'提示路由信息',
120563:'流程管理',
118093:'打印机信息',
90551:'工厂信息',
97718:'产线信息',
96741:'操作日志',
93380:'工序信息',
89474:'工位信息',
126221:'工艺路线',
100434:'物料信息',
166855:'物料供应商信息',
154712:'物料类型信息',
95476:'生产BOM信息',
100736:'托盘信息',
149123:'成品条码信息',
176186:'原材料条码信息',
103818:'附件信息',
46972:'一楼',
114615:'项目信息',
175675:'采购订单信息',
162165:'销售订单信息',
95488:'生产工单',
102121:'生产派工',
89526:'仓库信息',
89648:'库位信息',
97292:'仓库类别',
95334:'出库审核',
111212:'退库审核',
101161:'移库合库',
121459:'原材料库存',
179077:'原材料入库记录',
94396:'成品库存',
179226:'原材料出库记录',
195104:'原材料退库记录',
135859:'检验项目',
122665:'检验规则',
121943:'质检结果',
108322:'质检工单',
112843:'设备类型',
170122:'设备供应商信息',
161323:'设备台账信息',
103923:'设备BOM信息',
177161:'设备采购信息',
151111:'设备参数信息',
211597:'特种设备参数信息',
157120:'设备档案信息',
89269:'外协信息',
155028:'设备折旧信息',
162147:'设备安装信息',
171644:'设备转移信息',
175341:'设备调试信息',
143837:'保养部位信息',
134005:'保养标准信息',
143195:'保养计划信息',
86674:'保养工单',
113194:'润滑计划',
116604:'润滑记录',
149140:'润滑标准信息',
158972:'润滑部位信息',
101809:'润滑工单',
135781:'停机原因信息',
146412:'停机类型信息',
107163:'停机记录',
91085:'报修工单',
139871:'点巡检记录',
193624:'点巡检线路信息',
181597:'点巡检计划信息',
194321:'点巡检项目信息',
172407:'点巡检标准信息',
125076:'点巡检工单',
147125:'润滑知识库',
131990:'保养知识库',
143648:'维修知识库',
},
login: {
title: '若依后台管理系统',
logIn: '登录',
username: '账号',
password: '密码',
code: '验证码',
rememberMe: '记住密码',
loading: '登录中',
inputCode:'请输入验证码',
inputUsername:'请输入账号',
inputPassword:'请输入密码',
},
tagsView: {
refresh: '刷新',
close: '关闭',
closeOthers: '关闭其它',
closeAll: '关闭所有'
},
settings: {
title: '系统布局配置',
theme: '主题色',
tagsView: '开启 Tags-View',
fixedHeader: '固定 Header',
sidebarLogo: '侧边栏 Logo'
},
pop:{
test:'设置语言成功'
},
button:{
select:'搜索',
insert:'新增',
update:'修改',
delete:'删除',
remake:'重置',
export:'导出',
swtich:'展开/折叠',
operate:'操作',
updateSuccess:'修改成功',
insertSuccess:'新增成功',
deleteSuccess:'删除成功',
deleteConfirmDeviceType:'是否确认删除设备类型信息编号为',
deleteConfirmSuplier:'是否确认删除设备供应商信息编号为',
deleteConfirmBom:'是否确认删除设备BOM信息编号为',
deleteConfirmWorkOrder:'是否确认删除设备采购信息编号为',
deleteConfirmDeviceParam:'是否确认删除设备参数信息编号为',
deleteConfirmSpecialDeviceParam:'是否确认删除特种设备参数信息编号为',
deleteConfirmFiels:'是否确认删除设备档案信息编号为',
deleteConfirmOutsrc:'是否确认删除外协信息编号为',
submit:'确 定',
cancel:'取 消'
},
dms:{
topNodes: '顶级节点',
//设备类型
typeCode:'类型编号',
deviceType:'设备类型',
deviceSpec:'设备规格',
inputTypeCode:'请输入类型编号',
typeName:'类型名称',
inputTypeName:'请输入类型名称',
remark:'备注',
parentId:'父级编号',
inputParentId:'请输入父级编号',
inputRemark:'请输入内容',
insertDeviceType:'添加设备类型信息',
updateDeviceType:'修改设备类型信息',
inputDeviceType:'请输入设备类型名称',
//设备供应商
supplier:'供应商',
inputSupplier:'请选择供应商',
suplierCode:'供应商编号',
suplierName:'供应商名称',
suplierPerson:'供应商联系人',
suplierTel:'供应商电话',
suplierAddress:'供应商地址',
inputSuplierCode:'请输入供应商编号',
inputSuplierName:'请输入供应商名称',
inputSuplierPerson:'请输入供应商联系人',
inputSuplierTel:'请输入供应商电话',
inputsuplierAddress:'请输入供应商地址',
insertSuplier:'添加供应商信息',
updateSuplier:'修改供应商信息',
suplierStatus:'供应商状态',
//设备
deviceId:'设备ID',
deviceCode:'设备编码',
deviceName:'设备名称',
inputDeviceId:'请输入设备ID',
inputDeviceName:'请输入设备名称',
deviceLocation:'设备位置',
inputDeviceLocation:'请输入设备位置',
deviceStatus:'设备状态',
inputDeviceStatus:'请选择设备状态',
assetNumber:'资产编号',
deviceDepreciations:'设备折旧',
deviceInstalls:'设备安装',
deviceInfos:'设备转移',
deviceDebuggings:'设备调试',
//bom
bomNumber:'bom数量',
inputBomNumber:'请输入bom数量',
insertBom:'添加bom信息',
updateBom:'修改bom信息',
//采购信息
purchaseTime:'采购时间',
purchasePerson:'采购人',
purchasePosition:'采购地点',
inputPurchaseTime:'选择采购时间',
//采购计划
workOrder:'计划编号',
inputWorkOrder:'请输入计划编号',
insertWorkOrder:'新增设备采购信息',
updateWorkOrder:'修改设备采购信息',
//设备参数
paramCode:'参数编号',
paramName:'参数名称',
paramIp:'参数IP',
paramAddress:'参数地址',
paramType:'参数类型',
readFrequency:'读取频率',
inputParamCode:'请输入参数编号',
inputParamName:'请输入参数名称',
inputParamIp:'请输入参数IP',
inputParamAddress:'请输入参数地址',
inputParamType:'请输入参数类型',
inputReadFrequency:'请输入读取频率',
insertDeviceParam:'新增设备参数信息',
updateDeviceParam:'修改设备参数信息',
//特种设备
paramValue:'参数值',
paramUnit:'参数单位',
inputParamValue:'请输入参数值',
inputParamUnit:'请输入参数单位',
insertSpecialParma:'新增特种设备参数信息',
updateSpecialParma:'修改特种设备参数信息',
//设备档案
filesCode:'档案编号',
filesName:'档案名称',
filesPath:'档案路径',
filesUpdate:'档案上传',
selectFile:'选取文件',
sizeMax:'大小不超过',
formatIs:'格式为',
formatError:'文件格式不正确, 请重新上传',
fileLoading:'正在上传文件,请稍候...',
fileUpdateError:'上传文件失败,请重试',
fileNumberMax:'上传文件数量不能超过',
inputFilesCode:'请输入档案编号',
insertFiles:'新增设备档案信息',
updateFiles:'修改设备档案信息',
// 外协信息
outsrcName:'单位名称',
outsrcStatus:'外协状态',
outsrcCode:'外协编号',
outsrcPerson:'外协联系人',
outsrcTel:'外协电话',
outsrcAddress:'外协地址',
inputOutsrcName:'请输入单位名称',
inputOutsrcStatus:'请选择外协状态',
inputOutsrcCode:'请输入外协编号',
inputOutsrcPerson:'请输入外协联系人',
inputOutsrcTel:'请输入外协电话',
inputOutsrcAddress:'请输入外协地址',
insertOutsrc:'新增外协信息',
updateOutsrc:'修改外协信息',
repairFrequency:'维修次数',
repairCosts:'维修费用',
depreciationCost:'折旧费用',
putintoTime:'投入时间',
useLife:'使用年限',
flowCheckplanId:'盘点计划ID',
checkCode:'盘点单号',
planCheckTime:'计划盘点时间',
checkBy:'盘点人员',
deviceTypeId:'设备类型',
checkAmount:'盘点数量',
surplusCheckAmount:'剩余数量',
checkState:'盘点状态',
installPosition:'安装地点',
installTime:'安装时间',
installPersion:'安装人员',
devicePosition:'设备原位置',
devicePositionNew:'设备转移位置',
devicePositionOperator:'设备转移人员',
devicePositionReason:'设备转移原因',
deviceTransferTime:'设备转移时间',
debugStatus:'调试状态',
debugTime:'调试时间',
debugPerson:'调试人员',
inputSuplier:'请输入供应商',
inoutDeviceSpec:'请输入设备规格',
inputAssetNumber:'请输入资产编号',
inputDeviceCode:'请输入设备编号',
insertLedget:'添加设备台账信息',
updateLedget:'修改设备台账信息',
}
}

@ -2,11 +2,13 @@
<div class="navbar">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<!-- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>-->
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<div class="right-menu">
<template v-if="device!=='mobile'">
<lang-select class="set-language" />
<search id="header-search" class="right-menu-item" />
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
@ -109,6 +111,7 @@
</template>
<script>
import LangSelect from '@/components/LangSelect'
import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav'
@ -122,6 +125,7 @@ import {listPointRouter, updatePointRouter} from "@//api/system/common/pointRout
import router from "@//router";
export default {
dicts: ['point_type', 'router_flag', 'module_code'],
data() {
return {
poolNameList: [],
@ -154,6 +158,7 @@ export default {
// setInterval(() => this.getAlarmData(), 1000 * 60);
},
components: {
LangSelect,
Breadcrumb,
TopNav,
Hamburger,

@ -3,14 +3,16 @@
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="menusTitle(onlyOneChild.meta.title)" />
<!-- <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="menusTitle(onlyOneChild.meta.title)" />-->
</el-menu-item>
</app-link>
</template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
<template slot="title">
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="menusTitle(item.meta.title)" />
<!-- <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />-->
</template>
<sidebar-item
v-for="(child, index) in item.children"
@ -55,6 +57,29 @@ export default {
return {}
},
methods: {
menusTitle(item){
// console.log("======================================")
// console.log(item)
const a = [...item].map(char=>char.charCodeAt(0))
let b =0
for (let i = 0; i < a.length;i++){
b = b+a[i];
}
if (item=='系统管理'){
console.log(this.$te('menus.125825'))
console.log(this.$t('menus.125825'))
}
// console.log(b)
// console.log(this.$te('menus.'+b))
// console.log(this.$t('menus.'+b))
// console.log("======================================")
if (this.$te('menus.'+b)){
return this.$t('menus.'+b)
}
return item
},
hasOneShowingChild(children = [], parent) {
if (!children) {
children = [];

@ -13,7 +13,7 @@
@click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''"
@contextmenu.prevent.native="openMenu(tag,$event)"
>
{{ tag.title }}
{{ menusTitle(tag.title) }}
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
</router-link>
</scroll-pane>
@ -72,6 +72,24 @@ export default {
this.addTags()
},
methods: {
menusTitle(item){
// console.log("======================================")
// console.log(item)
const a = [...item].map(char=>char.charCodeAt(0))
let b =0
for (let i = 0; i < a.length;i++){
b = b+a[i];
}
// console.log(b)
// console.log(this.$te('menus.'+b))
// console.log(this.$t('menus.'+b))
// console.log("======================================")
if (this.$te('menus.'+b)){
return this.$t('menus.'+b)
}
return item
},
isActive(route) {
return route.path === this.$route.path
},

@ -46,7 +46,8 @@ import DictTag from '@/components/DictTag'
import VueMeta from 'vue-meta'
// 字典数据组件
import DictData from '@/components/DictData'
//国际化
import i18n from './lang'
// 全局方法挂载
Vue.prototype.getDicts = getDicts
@ -85,7 +86,8 @@ DictData.install()
*/
Vue.use(Element, {
size: Cookies.get('size') || 'medium' // set element-ui default size
size: Cookies.get('size') || 'medium',// set element-ui default size
i18n: (key, value) => i18n.t(key, value),
})
Vue.config.productionTip = false
@ -93,6 +95,7 @@ Vue.config.productionTip = false
new Vue({
el: '#app',
router,
i18n,
store,
render: h => h(App)
})

@ -16,5 +16,6 @@ const getters = {
topbarRouters:state => state.permission.topbarRouters,
defaultRoutes:state => state.permission.defaultRoutes,
sidebarRouters:state => state.permission.sidebarRouters,
language: state => state.app.language,
}
export default getters

@ -3,6 +3,7 @@ import Cookies from 'js-cookie'
const state = {
sidebar: {
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
language: Cookies.get('language') || 'en',
withoutAnimation: false,
hide: false
},
@ -11,6 +12,10 @@ const state = {
}
const mutations = {
SET_LANGUAGE: (state, language) => {
state.language = language
Cookies.set('language', language)
},
TOGGLE_SIDEBAR: state => {
if (state.sidebar.hide) {
return false;
@ -41,6 +46,9 @@ const mutations = {
}
const actions = {
setLanguage({ commit }, language) {
commit('SET_LANGUAGE', language)
},
toggleSideBar({ commit }) {
commit('TOGGLE_SIDEBAR')
},

@ -9,18 +9,18 @@
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="类型编号" prop="typeCode">
<el-form-item :label="$t('dms.typeCode')" prop="typeCode">
<el-input
v-model="queryParams.typeCode"
placeholder="请输入类型编号"
:placeholder="$t('dms.inputTypeCode')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="类型名称" prop="typeName">
<el-form-item :label="$t('dms.typeName')" prop="typeName">
<el-input
v-model="queryParams.typeName"
placeholder="请输入类型名称"
:placeholder="$t('dms.inputTypeName')"
clearable
@keyup.enter.native="handleQuery"
/>
@ -42,8 +42,8 @@
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('button.select')}}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{$t('button.remake')}}</el-button>
</el-form-item>
</el-form>
@ -56,7 +56,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['dms:devicetype:add']"
>新增</el-button>
>{{ $t('button.insert') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -65,7 +65,7 @@
icon="el-icon-sort"
size="mini"
@click="toggleExpandAll"
>展开/折叠</el-button>
>{{$t('button.swtich')}}}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -79,12 +79,12 @@
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<!-- <el-table-column label="父级标识" prop="parentId" />-->
<el-table-column label="类型编号" align="center" prop="typeCode" />
<el-table-column label="类型名称" align="center" prop="typeName" />
<el-table-column :label="$t('dms.typeCode')" align="center" prop="typeCode" />
<el-table-column :label="$t('dms.typeName')" align="center" prop="typeName" />
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<!-- <el-table-column label="祖级列表" align="center" prop="ancestors" />-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" />
<el-table-column :label="$t('button.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -92,21 +92,21 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dms:devicetype:edit']"
>修改</el-button>
>{{$t('button.update')}}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['dms:devicetype:add']"
>新增</el-button>
>{{ $t('button.insert') }}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:devicetype:remove']"
>删除</el-button>
>{{$t('button.delete')}}</el-button>
</template>
</el-table-column>
</el-table>
@ -114,25 +114,25 @@
<!-- 添加或修改设备类型信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="父级标识" prop="parentId">
<treeselect v-model="form.parentId" :options="devicetypeOptions" :normalizer="normalizer" placeholder="请选择父级标识" />
<el-form-item :label="$t('dms.parentId')" prop="parentId">
<treeselect v-model="form.parentId" :options="devicetypeOptions" :normalizer="normalizer" :placeholder="$t('inputParentId')" />
</el-form-item>
<el-form-item label="类型编号" prop="typeCode">
<el-input v-model="form.typeCode" placeholder="请输入类型编号" />
<el-form-item :label="$t('dms.typeCode')" prop="typeCode">
<el-input v-model="form.typeCode" :placeholder="$t('dms.inputTypeCode')" />
</el-form-item>
<el-form-item label="类型名称" prop="typeName">
<el-input v-model="form.typeName" placeholder="请输入类型名称" />
<el-form-item :label="$t('dms.typeName')" prop="typeName">
<el-input v-model="form.typeName" :placeholder="$t('dms.inputTypeName')" />
</el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<el-form-item :label="$t('dms.remark')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('dms.inputRemark')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm">{{$t('button.submit')}}</el-button>
<el-button @click="cancel">{{$t('button.cancel')}}</el-button>
</div>
</el-dialog>
</div>
@ -217,7 +217,7 @@ export default {
getTreeselect() {
listDevicetype().then(response => {
this.devicetypeOptions = [];
const data = { deviceTypeId: 0, typeName: '顶级节点', children: [] };
const data = { deviceTypeId: 0, typeName: this.$t('dms.topNodes'), children: [] };
data.children = this.handleTree(response.data, "deviceTypeId", "parentId");
this.devicetypeOptions.push(data);
});
@ -263,7 +263,7 @@ export default {
this.form.parentId = 0;
}
this.open = true;
this.title = "添加设备类型信息";
this.title = this.$t('dms.insertDeviceType');
},
/** 展开/折叠操作 */
toggleExpandAll() {
@ -283,7 +283,7 @@ export default {
getDevicetype(row.deviceTypeId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备类型信息";
this.title = this.$t('dms.updateDeviceType');
});
},
/** 提交按钮 */
@ -292,13 +292,13 @@ export default {
if (valid) {
if (this.form.deviceTypeId != null) {
updateDevicetype(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess(this.$t('button.updateSuccess'));
this.open = false;
this.getList();
});
} else {
addDevicetype(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess(this.$t('button.insertSuccess'));
this.open = false;
this.getList();
});
@ -308,11 +308,11 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除设备类型信息编号为"' + row.deviceTypeId + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('button.deleteConfirmDeviceType') + row.deviceTypeId ).then(function() {
return delDevicetype(row.deviceTypeId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess(this.$t('button.deleteSuccess'));
}).catch(() => {});
}
}

@ -5,7 +5,7 @@
<div class="head-container">
<el-input
v-model="deptName"
placeholder="请输入设备类型名称"
:placeholder="$t('dms.inputTypeName')"
clearable
size="small"
prefix-icon="el-icon-search"
@ -36,18 +36,18 @@
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="设备ID" prop="deviceId">
<el-form-item :label="$t('dms.deviceId')" prop="deviceId">
<el-input
v-model="queryParams.deviceId"
placeholder="请输入设备ID"
:placeholder="$t('dms.inputDeviceId')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="deviceId">
<el-form-item :label="$t('dms.deviceName')" prop="deviceId">
<el-input
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
:placeholder="$t('dms.inputDeviceName')"
clearable
@keyup.enter.native="handleQuery"
/>
@ -77,8 +77,8 @@
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('button.select') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{$t('button.remake')}}</el-button>
</el-form-item>
</el-form>
@ -91,7 +91,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['dms:bom:add']"
>新增</el-button>
>{{ $t('button.insert') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -100,7 +100,7 @@
icon="el-icon-sort"
size="mini"
@click="toggleExpandAll"
>展开/折叠</el-button>
>{{$t('button.swtich')}}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -114,8 +114,8 @@
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<!-- <el-table-column label="父级标识" prop="parentId" />-->
<el-table-column label="设备ID" align="center" prop="deviceId" />
<el-table-column label="设备名称" align="center" prop="deviceId" >
<el-table-column :label="$t('dms.deviceId')" align="center" prop="deviceId" />
<el-table-column :label="$t('dms.deviceName')" align="center" prop="deviceId" >
<template slot-scope="scope">
<span
v-for="(item, index) in ledgerList"
@ -127,7 +127,7 @@
</span>
</template>
</el-table-column>
<el-table-column label="bom数量" align="center" prop="bomAmount" />
<el-table-column :label="$t('dms.bomNumber')" align="center" prop="bomAmount" />
<!-- <el-table-column label="祖级列表" align="center" prop="ancestors" />-->
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<!-- <el-table-column label="标识" align="center" prop="isFlag">-->
@ -135,8 +135,8 @@
<!-- <dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" />
<el-table-column :label="$t('button.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -144,21 +144,21 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dms:bom:edit']"
>修改</el-button>
>{{ $t('button.update') }}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['dms:bom:add']"
>新增</el-button>
>{{ $t('button.insert') }}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:bom:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</template>
</el-table-column>
@ -168,15 +168,15 @@
<!-- 添加或修改设备BOM信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="父级标识" prop="parentId">
<el-form-item :label="$t('dms.parentId')" prop="parentId">
<treeselect @input="change" v-model="form.parentId" :options="bomOptions" :normalizer="normalizer"
placeholder="请选择父级标识" />
:placeholder="$t('dms.inputParentId')" />
</el-form-item>
<!-- <el-form-item label="设备ID">-->
<!-- <el-input v-model="form.deviceId" placeholder="请输入设备ID关联dms_base_device_ledger的device_id" />-->
<!-- </el-form-item>-->
<el-form-item label="设备名称" prop="deviceId" >
<el-select v-model="form.deviceId" placeholder="请选择设备">
<el-form-item :label="$t('dms.deviceName')" prop="deviceId" >
<el-select v-model="form.deviceId" :placeholder="$t('dms.inputDeviceName')">
<el-option
v-for="item in ledgerList"
:key="item.deviceId"
@ -185,8 +185,8 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="bom数量" prop="bomAmount" v-if="isShowBom">
<el-input v-model="form.bomAmount" placeholder="请输入bom数量" />
<el-form-item :label="$t('dms.bomNumber')" prop="bomAmount" v-if="isShowBom">
<el-input v-model="form.bomAmount" :placeholder="$t('dms.inputBomNumber')" />
</el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />-->
@ -200,13 +200,13 @@
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<el-form-item :label="$t('dms.remark')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('dms.inputRemark')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm">{{$t('button.submit')}}</el-button>
<el-button @click="cancel">{{$t('button.cancel')}}</el-button>
</div>
</el-dialog>
</div>
@ -329,7 +329,7 @@ export default {
getTreeselect() {
listBom().then(response => {
this.bomOptions = [];
const data = { deviceBomId: 0, deviceId: '顶级节点', children: [] };
const data = { deviceBomId: 0, deviceId: this.$t('dms.topNodes'), children: [] };
data.children = this.handleTree(response.data, "deviceBomId", "parentId");
this.bomOptions.push(data);
});
@ -337,8 +337,9 @@ export default {
/** 查询设备类型信息下拉树结构 */
getTreeselectDeviceType() {
listDevicetype().then(response => {
console.log(response.data)
this.devicetypeOptions = [];
const data = { deviceTypeId: 0, typeName: '顶级节点', children: [] };
const data = { deviceTypeId: 0, typeName: this.$t('dms.topNodes'), children: [] };
data.children = this.handleTree(response.data, "deviceTypeId", "parentId");
this.devicetypeOptions.push(data);
// console.log(data)
@ -413,9 +414,10 @@ export default {
this.form.parentId = row.deviceBomId;
} else {
this.form.parentId = 0;
this.form.bomAmount = 1;
}
this.open = true;
this.title = "添加设备BOM信息";
this.title = this.$t('dms.insertBom');
},
/** 展开/折叠操作 */
toggleExpandAll() {
@ -435,7 +437,7 @@ export default {
getBom(row.deviceBomId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备BOM信息";
this.title = this.$t('bom.updateBom');
});
},
/** 提交按钮 */
@ -444,14 +446,14 @@ export default {
if (valid) {
if (this.form.deviceBomId != null) {
updateBom(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess(this.$t('button.updateSuccess'));
this.open = false;
this.getList();
});
} else {
addBom(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess(this.$t('button.insertSuccess'));
this.open = false;
this.getList();
});
@ -461,11 +463,11 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除设备BOM信息编号为"' + row.deviceBomId + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('button.deleteConfirmBom') + row.deviceBomId ).then(function() {
return delBom(row.deviceBomId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess(this.$t('button.deleteSuccess'));
}).catch(() => {});
}
}

@ -1,57 +1,58 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备ID" prop="deviceId">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true"
v-show="showSearch" label-width="100px">
<el-form-item :label="$t('dms.deviceId')" prop="deviceId">
<el-input
v-model="queryParams.deviceId"
placeholder="请输入设备ID"
:placeholder="$t('dms.inputDeviceId')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="deviceName">
<el-form-item :label="$t('dms.deviceName')" prop="deviceName">
<el-input
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
:placeholder="$t('dms.inputDeviceName')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="档案编号" prop="filesCode">
<el-form-item :label="$t('dms.filesCode')" prop="filesCode">
<el-input
v-model="queryParams.filesCode"
placeholder="请输入档案编号"
:placeholder="$t('dms.inputFilesCode')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="档案名称" prop="filesName">-->
<!-- <el-form-item :label="档案名称" prop="filesName">-->
<!-- <el-input-->
<!-- v-model="queryParams.filesName"-->
<!-- placeholder="请输入档案名称"-->
<!-- :placeholder="请输入档案名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="档案路径" prop="filesPath">-->
<!-- <el-form-item :label="档案路径" prop="filesPath">-->
<!-- <el-input-->
<!-- v-model="queryParams.filesPath"-->
<!-- placeholder="请输入档案路径"-->
<!-- :placeholder="请输入档案路径"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-form-item :label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input-->
<!-- v-model="queryParams.isFlag"-->
<!-- placeholder="请输入是否标识1-是2-否"-->
<!-- :placeholder="请输入是否标识1-是2-否"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('button.select')}}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('button.remake') }}</el-button>
</el-form-item>
</el-form>
@ -64,7 +65,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['dms:dmsFiles:add']"
>新增</el-button>
>{{$t('button.insert')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -75,7 +76,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['dms:dmsFiles:edit']"
>修改</el-button>
>{{ $t('button.update') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -86,7 +87,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['dms:dmsFiles:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -96,16 +97,16 @@
size="mini"
@click="handleExport"
v-hasPermi="['dms:dmsFiles:export']"
>导出</el-button>
>{{ $t('button.export') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dmsFilesList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键标识" align="center" prop="deviceFilesId" />-->
<el-table-column label="设备ID" align="center" prop="deviceId" />
<el-table-column label="设备名称" align="center" prop="deviceId" >
<!-- <el-table-column :label="主键标识" align="center" prop="deviceFilesId" />-->
<el-table-column :label="$t('dms.deviceId')" align="center" prop="deviceId" />
<el-table-column :label="$t('dms.deviceName')" align="center" prop="deviceId" >
<template slot-scope="scope">
<span
v-for="(item, index) in ledgerList"
@ -117,18 +118,18 @@
</span>
</template>
</el-table-column>
<el-table-column label="档案编号" align="center" prop="filesCode" />
<el-table-column label="档案名称" align="center" prop="filesName" />
<el-table-column label="档案路径" align="center" prop="filesPath" >
<el-table-column :label="$t('dms.filesCode')" align="center" prop="filesCode" />
<el-table-column :label="$t('dms.filesName')" align="center" prop="filesName" />
<el-table-column :label="$t('dms.filesPath')" align="center" prop="filesPath" >
<template slot-scope="scope">
<router-link to="" @click.native="jumpTo(scope.row.filesPath)" class="link-type">
<span>{{ scope.row.filesPath }}</span>
</router-link>
</template>
</el-table-column>
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<!-- <el-table-column :label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" />
<el-table-column :label="$t('button.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -136,14 +137,14 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dms:dmsFiles:edit']"
>修改</el-button>
>{{$t('button.update')}}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:dmsFiles:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -158,12 +159,12 @@
<!-- 添加或修改设备档案信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!-- <el-form-item label="设备ID,关联dms_base_device_ledger的device_id" prop="deviceId">-->
<!-- <el-input v-model="form.deviceId" placeholder="请输入设备ID,关联dms_base_device_ledger的device_id" />-->
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<!-- <el-form-item :label="设备ID,关联dms_base_device_ledger的device_id" prop="deviceId">-->
<!-- <el-input v-model="form.deviceId" :placeholder="请输入设备ID,关联dms_base_device_ledger的device_id" />-->
<!-- </el-form-item>-->
<el-form-item label="设备名称" prop="deviceId" >
<el-select v-model="form.deviceId" placeholder="请选择设备">
<el-form-item :label="$t('dms.deviceName')" prop="deviceId" >
<el-select v-model="form.deviceId" :placeholder="$t('dms.inputDeviceName')">
<el-option
v-for="item in ledgerList"
:key="item.deviceId"
@ -172,22 +173,22 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="档案编号" prop="filesCode">
<el-input v-model="form.filesCode" placeholder="请输入档案编号" />
<el-form-item :label="$t('dms.filesCode')" prop="filesCode">
<el-input v-model="form.filesCode" :placeholder="$t('dms.inputFilesCode')" />
</el-form-item>
<!-- <el-form-item label="档案名称" prop="filesName">-->
<!-- <el-input v-model="form.filesName" placeholder="请输入档案名称" />-->
<!-- <el-form-item :label="档案名称" prop="filesName">-->
<!-- <el-input v-model="form.filesName" :placeholder="请输入档案名称" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="档案路径" prop="filesPath">-->
<!-- <el-input v-model="form.filesPath" placeholder="请输入档案路径" />-->
<!-- <el-form-item :label="档案路径" prop="filesPath">-->
<!-- <el-input v-model="form.filesPath" :placeholder="请输入档案路径" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />-->
<!-- <el-form-item :label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" :placeholder="请输入是否标识1-是2-否" />-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<el-form-item :label="$t('dms.remark')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('dms.inputRemark')" />
</el-form-item>
<el-form-item label="档案上传" prop="file">
<el-form-item :label="$t('dms.filesUpdate')" prop="file">
<template>
<div class="upload-file">
<el-upload
@ -205,13 +206,13 @@
ref="fileUpload"
>
<!-- 上传按钮 -->
<el-button size="mini" type="primary">选取文件</el-button>
<el-button size="mini" type="primary">{{ $t('dms.filesUpdate') }}</el-button>
<!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip">
请上传
<template v-if="fileSize"> <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
<template v-if="fileType"> <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
的文件
<template v-if="fileSize"> {{ $t('dms.sizeMax') }} <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
<template v-if="fileType"> {{ $t('dms.formatIs') }} <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
</div>
</el-upload>
@ -222,7 +223,7 @@
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
</el-link>
<div class="ele-upload-list__item-content-action">
<el-link :underline="false" @click="handleDeleteFile(index)" type="danger">删除</el-link>
<el-link :underline="false" @click="handleDeleteFile(index)" type="danger">{{ $t('button.delete') }}</el-link>
</div>
</li>
</transition-group>
@ -232,8 +233,8 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm">{{ $t('button.submit') }}</el-button>
<el-button @click="cancel">{{ $t('button.cancel') }}</el-button>
</div>
</el-dialog>
@ -388,7 +389,7 @@ export default {
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
this.$modal.msgError(this.$t('dms.formatError')+`${this.fileType.join("/")}`);
return false;
}
}
@ -396,21 +397,21 @@ export default {
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`);
this.$modal.msgError(this.$t('sizeMax')+` ${this.fileSize} MB!`);
return false;
}
}
this.$modal.loading("正在上传文件,请稍候...");
this.$modal.loading(this.$t('dms.fileLoading'));
this.number++;
return true;
},
//
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} !`);
this.$modal.msgError(this.$t('dms.fileNumberMax')` ${this.limit} !`);
},
//
handleUploadError(err) {
this.$modal.msgError("上传文件失败,请重试");
this.$modal.msgError(this.$t('dms.fileUpdateError'));
this.$modal.closeLoading()
},
//
@ -528,7 +529,7 @@ export default {
this.fileList = [];
// this.uploadLists = [];
this.open = true;
this.title = "添加设备档案信息";
this.title = this.$t('dms.insertFiles');
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -547,7 +548,7 @@ export default {
this.form = response.data;
console.log(this.form)
this.open = true;
this.title = "修改设备档案信息";
this.title = this.$t('dms.updateFiles');
});
},
/** 提交按钮 */
@ -561,7 +562,7 @@ export default {
this.form.filesPath = this.fileList[0].url;
this.form.filesName = this.fileList[0].name;
updateDmsFiles(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess(this.$t('button.updateSuccess'));
this.open = false;
this.getList();
});
@ -572,7 +573,7 @@ export default {
this.form.filesPath = this.fileList[0].url;
this.form.filesName = this.fileList[0].name;
addDmsFiles(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess(this.$t('button.insertSuccess'));
this.open = false;
this.getList();
});
@ -583,11 +584,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const deviceFilesIds = row.deviceFilesId || this.ids;
this.$modal.confirm('是否确认删除设备档案信息编号为"' + deviceFilesIds + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('button.deleteConfirmFiels') + deviceFilesIds ).then(function() {
return delDmsFiles(deviceFilesIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess(this.$t('button.deleteSuccess'));
}).catch(() => {});
},
/** 导出按钮操作 */

@ -1,50 +1,50 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<!-- <el-form-item label="外协编号" prop="outsrcCode">-->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<!-- <el-form-item :label="外协编号" prop="outsrcCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.outsrcCode"-->
<!-- placeholder="请输入外协编号"-->
<!-- :placeholder="请输入外协编号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="单位名称" prop="outsrcName">
<el-form-item :label="$t('dms.outsrcName')" prop="outsrcName">
<el-input
v-model="queryParams.outsrcName"
placeholder="请输入单位名称"
:placeholder="$t('dms.inputOutsrcName')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="外协联系人" prop="outsrcPerson">-->
<!-- <el-form-item :label="外协联系人" prop="outsrcPerson">-->
<!-- <el-input-->
<!-- v-model="queryParams.outsrcPerson"-->
<!-- placeholder="请输入外协联系人"-->
<!-- :placeholder="请输入外协联系人"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="外协电话" prop="outsrcTel">-->
<!-- <el-form-item :label="外协电话" prop="outsrcTel">-->
<!-- <el-input-->
<!-- v-model="queryParams.outsrcTel"-->
<!-- placeholder="请输入外协电话"-->
<!-- :placeholder="请输入外协电话"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="外协地址" prop="outsrcAddress">-->
<!-- <el-form-item :label="外协地址" prop="outsrcAddress">-->
<!-- <el-input-->
<!-- v-model="queryParams.outsrcAddress"-->
<!-- placeholder="请输入外协地址"-->
<!-- :placeholder="请输入外协地址"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="外协状态" prop="outsrcStatus">
<el-form-item :label="$t('dms.outsrcStatus')" prop="outsrcStatus">
<el-select
v-model="queryParams.outsrcStatus"
placeholder="外协状态"
:placeholder="$t('dms.inputOutsrcStatus')"
clearable
style="width: 240px"
>
@ -56,17 +56,17 @@
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-form-item :label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input-->
<!-- v-model="queryParams.isFlag"-->
<!-- placeholder="请输入是否标识1-是2-否"-->
<!-- :placeholder="请输入是否标识1-是2-否"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('button.select')}}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('button.remake') }}</el-button>
</el-form-item>
</el-form>
@ -79,7 +79,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['dms:dmsInfo:add']"
>新增</el-button>
>{{$t('button.insert')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -90,7 +90,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['dms:dmsInfo:edit']"
>修改</el-button>
>{{ $t('button.update') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -101,7 +101,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['dms:dmsInfo:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -111,28 +111,28 @@
size="mini"
@click="handleExport"
v-hasPermi="['dms:dmsInfo:export']"
>导出</el-button>
>{{ $t('button.export') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dmsInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键标识" align="center" prop="outsrcId" />-->
<el-table-column label="外协编号" align="center" prop="outsrcCode" />
<el-table-column label="单位名称" align="center" prop="outsrcName" />
<el-table-column label="外协联系人" align="center" prop="outsrcPerson" />
<el-table-column label="外协电话" align="center" prop="outsrcTel" />
<el-table-column label="外协地址" align="center" prop="outsrcAddress" />
<!-- <el-table-column label="外协状态1-启用2-停用" align="center" prop="outsrcStatus" />-->
<el-table-column label="外协状态" align="center" prop="outsrcStatus">
<!-- <el-table-column :label="主键标识" align="center" prop="outsrcId" />-->
<el-table-column :label="$t('dms.outsrcCode')" align="center" prop="outsrcCode" />
<el-table-column :label="$t('dms.outsrcName')" align="center" prop="outsrcName" />
<el-table-column :label="$t('dms.outsrcPerson')" align="center" prop="outsrcPerson" />
<el-table-column :label="$t('dms.outsrcTel')" align="center" prop="outsrcTel" />
<el-table-column :label="$t('dms.outsrcAddress')" align="center" prop="outsrcAddress" />
<!-- <el-table-column :label="外协状态1-启用2-停用" align="center" prop="outsrcStatus" />-->
<el-table-column :label="$t('dms.outsrcStatus')" align="center" prop="outsrcStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_outsrc_status" :value="scope.row.outsrcStatus"/>
</template>
</el-table-column>
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<!-- <el-table-column :label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" />
<el-table-column :label="$t('button.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -140,14 +140,14 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dms:dmsInfo:edit']"
>修改</el-button>
>{{$t('button.update')}}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:dmsInfo:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -163,22 +163,22 @@
<!-- 添加或修改外协信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="外协编号" prop="outsrcCode">
<el-input v-model="form.outsrcCode" placeholder="请输入外协编号" />
<el-form-item :label="$t('dms.outsrcCode')" prop="outsrcCode">
<el-input v-model="form.outsrcCode" :placeholder="$t('dms.inputOutsrcCode')" />
</el-form-item>
<el-form-item label="单位名称" prop="outsrcName">
<el-input v-model="form.outsrcName" placeholder="请输入单位名称" />
<el-form-item :label="$t('dms.outsrcName')" prop="outsrcName">
<el-input v-model="form.outsrcName" :placeholder="$t('dms.inputOutsrcName')" />
</el-form-item>
<el-form-item label="外协联系人" prop="outsrcPerson">
<el-input v-model="form.outsrcPerson" placeholder="请输入外协联系人" />
<el-form-item :label="$t('dms.outsrcPerson')" prop="outsrcPerson">
<el-input v-model="form.outsrcPerson" :placeholder="$t('dms.inputOutsrcPerson')" />
</el-form-item>
<el-form-item label="外协电话" prop="outsrcTel">
<el-input v-model="form.outsrcTel" placeholder="请输入外协电话" />
<el-form-item :label="$t('dms.outsrcTel')" prop="outsrcTel">
<el-input v-model="form.outsrcTel" :placeholder="$t('dms.inputOutsrcTel')" />
</el-form-item>
<el-form-item label="外协地址" prop="outsrcAddress">
<el-input v-model="form.outsrcAddress" placeholder="请输入外协地址" />
<el-form-item :label="$t('dms.outsrcAddress')" prop="outsrcAddress">
<el-input v-model="form.outsrcAddress" :placeholder="$t('dms.inputOutsrcAddress')" />
</el-form-item>
<el-form-item label="外协状态" prop="outsrcStatus">
<el-form-item :label="$t('dms.outsrcStatus')" prop="outsrcStatus">
<el-radio-group v-model="form.outsrcStatus">
<el-radio
v-for="dict in dict.type.dms_outsrc_status"
@ -187,16 +187,16 @@
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />-->
<!-- <el-form-item :label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" :placeholder="请输入是否标识1-是2-否" />-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<el-form-item :label="$t('dms.remark')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('dms.inputRemark')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm">{{ $t('button.submit') }}</el-button>
<el-button @click="cancel">{{ $t('button.cancel') }}</el-button>
</div>
</el-dialog>
</div>
@ -310,7 +310,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加外协信息";
this.title = this.$t('dms.insertOutsrc');
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -319,7 +319,7 @@ export default {
getDmsInfo(outsrcId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改外协信息";
this.title = this.$t('dms.updateOutsrc');
});
},
/** 提交按钮 */
@ -328,13 +328,13 @@ export default {
if (valid) {
if (this.form.outsrcId != null) {
updateDmsInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess((this.$t('button.updateSuccess')));
this.open = false;
this.getList();
});
} else {
addDmsInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess(this.$t('button.insertSuccess'));
this.open = false;
this.getList();
});
@ -345,11 +345,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const outsrcIds = row.outsrcId || this.ids;
this.$modal.confirm('是否确认删除外协信息编号为"' + outsrcIds + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('button.deleteConfirmOutsrc')+ outsrcIds ).then(function() {
return delDmsInfo(outsrcIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess(this.$t('button.deleteSuccess'));
}).catch(() => {});
},
/** 导出按钮操作 */

@ -5,7 +5,7 @@
<div class="head-container">
<el-input
v-model="deptName"
placeholder="请输入设备类型名称"
:placeholder="$t('dms.inputDeviceType')"
clearable
size="small"
prefix-icon="el-icon-search"
@ -38,10 +38,10 @@
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="设备名称" prop="deviceName">
<el-form-item :label="$t('dms.deviceName')" prop="deviceName">
<el-input
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
:placeholder="$t('dms.inputDeviceName')"
clearable
@keyup.enter.native="handleQuery"
/>
@ -62,10 +62,10 @@
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="设备位置" prop="deviceLocation">
<el-form-item :label="$t('dms.deviceLocation')" prop="deviceLocation">
<el-input
v-model="queryParams.deviceLocation"
placeholder="请输入设备位置"
:placeholder="$t('dms.inputDeviceLocation')"
clearable
@keyup.enter.native="handleQuery"
/>
@ -86,18 +86,18 @@
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="供应商" prop="supplierId">
<el-form-item :label="$t('dms.supplier')" prop="supplierId">
<el-input
v-model="queryParams.suplierName"
placeholder="请输入供应商"
:placeholder="$t('dms.inputSupplier')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备状态" prop="deviceStatus">
<el-form-item :label="$t('dms.deviceStatus')" prop="deviceStatus">
<el-select
v-model="queryParams.deviceStatus"
placeholder="设备状态"
:placeholder="$t('dms.inputDeviceStatus')"
clearable
style="width: 240px"
>
@ -118,8 +118,8 @@
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('button.select')}}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('button.remake') }}</el-button>
</el-form-item>
</el-form>
@ -132,7 +132,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['dms:ledger:add']"
>新增</el-button>
>{{$t('button.insert')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -143,7 +143,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['dms:ledger:edit']"
>修改</el-button>
>{{ $t('button.update') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -154,7 +154,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['dms:ledger:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -164,7 +164,7 @@
size="mini"
@click="handleExport"
v-hasPermi="['dms:ledger:export']"
>导出</el-button>
>{{ $t('button.export') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -176,13 +176,13 @@
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键标识" align="center" prop="deviceId" />-->
<el-table-column label="设备编号" align="center" prop="deviceCode" key="device1"/>
<el-table-column label="设备名称" align="center" prop="deviceName" key="device2"/>
<el-table-column :label="$t('dms.deviceCode')" align="center" prop="deviceCode" key="device1"/>
<el-table-column :label="$t('dms.deviceName')" align="center" prop="deviceName" key="device2"/>
<!-- <el-table-column label="所属工位" align="center" prop="stationId" key="device3"/>-->
<el-table-column label="资产编号" align="center" prop="assetNumber" key="device4"/>
<el-table-column label="设备位置" align="center" prop="deviceLocation" key="device5"/>
<el-table-column :label="$t('dms.assetNumber')" align="center" prop="assetNumber" key="device4"/>
<el-table-column :label="$t('dms.deviceLocation')" align="center" prop="deviceLocation" key="device5"/>
<!-- <el-table-column label="设备类型" align="center" prop="deviceTypeId" />-->
<el-table-column label="设备类型" align="center" prop="deviceTypeId" key="device6" >
<el-table-column :label="$t('dms.deviceType')" align="center" prop="deviceTypeId" key="device6" >
<template slot-scope="scope">
<span
v-for="(item, index) in devicetypeList"
@ -194,9 +194,9 @@
</span>
</template>
</el-table-column>
<el-table-column label="设备规格" align="center" prop="deviceSpec" key="device7"/>
<el-table-column :label="$t('dms.deviceSpec')" align="center" prop="deviceSpec" key="device7"/>
<!-- <el-table-column label="供应商" align="center" prop="suplierName" />-->
<el-table-column label="供应商" align="center" prop="suplierName" key="device8" >
<el-table-column :label="$t('dms.suplierName')" align="center" prop="suplierName" key="device8" >
<template slot-scope="scope">
<span
v-for="(item, index) in supplierList"
@ -209,7 +209,7 @@
</template>
</el-table-column>
<!-- <el-table-column label="设备状态" align="center" prop="deviceStatus" />-->
<el-table-column label="设备状态" align="center" prop="deviceStatus" key="device9">
<el-table-column :label="$t('dms.deviceStatus')" align="center" prop="deviceStatus" key="device9">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_status" :value="scope.row.deviceStatus"/>
</template>
@ -220,8 +220,8 @@
<!-- <dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="备注" align="center" prop="remark" key="device10" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" key="device10" />
<el-table-column :label="$t('button.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -229,14 +229,14 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dms:ledger:edit']"
>修改</el-button>
>{{$t('button.update')}}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:ledger:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -264,7 +264,7 @@
v-bind:style="[isStyle?{color:'white', backgroundColor:'#1890ff'}:{}] "
@click="getDeviceTypes"
v-hasPermi="['dms:ledger:add']"
>设备类型</el-button>
>{{ $t('dms.deviceType') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -273,7 +273,7 @@
size="mini"
@click="getDeviceSupliers"
v-hasPermi="['dms:ledger:add']"
>设备供应商</el-button>
>{{ $t('dms.supplier') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -282,7 +282,7 @@
size="mini"
@click="getDeviceDepreciations"
v-hasPermi="['dms:ledger:add']"
>设备折旧</el-button>
>{{$t('dms.deviceDepreciations')}}</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
@ -301,7 +301,7 @@
size="mini"
@click="getDeviceInstalls"
v-hasPermi="['dms:ledger:add']"
>设备安装</el-button>
>{{ $t('dms.deviceInstalls') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -310,7 +310,7 @@
size="mini"
@click="getDeviceInfos"
v-hasPermi="['dms:ledger:add']"
>设备转移</el-button>
>{{ $t('dms.deviceInfos') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -319,7 +319,7 @@
size="mini"
@click="getDeviceDebuggings"
v-hasPermi="['dms:ledger:add']"
>设备调试</el-button>
>{{ $t('dms.deviceDebuggings') }}</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
@ -343,8 +343,8 @@
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column label="类型编号" align="center" prop="typeCode" key="type1" />
<el-table-column label="类型名称" align="center" prop="typeName"key="type2" />
<el-table-column :label="$t('dms.typeCode')" align="center" prop="typeCode" key="type1" />
<el-table-column :label="$t('dms.typeName')" align="center" prop="typeName"key="type2" />
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<!-- <el-table-column label="标识" align="center" prop="isFlag" key="type3">-->
<!-- <template slot-scope="scope">-->
@ -352,7 +352,7 @@
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="祖级列表" align="center" prop="ancestors" key="type4"/>-->
<el-table-column label="备注" align="center" prop="remark" key="type5"/>
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" key="type5"/>
</el-table>
<!-- 删掉这个eltable会导致上面eltable的树级无法显示-->
<el-table
@ -368,13 +368,13 @@
<!-- <el-table v-loading="loading" :data="supplierLists">-->
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键标识" align="center" prop="supplierId" key="sup5"/>-->
<el-table-column label="供应商编号" align="center" prop="suplierCode" key="sup1"/>
<el-table-column label="供应商名称" align="center" prop="suplierName" key="sup2"/>
<el-table-column label="供应商联系人" align="center" prop="suplierPerson" key="sup3"/>
<el-table-column label="供应商电话" align="center" prop="suplierTel" key="sup4" />
<el-table-column label="供应商地址" align="center" prop="suplierAddress" key="sup6"/>
<el-table-column :label="$t('dms.suplierCode')" align="center" prop="suplierCode" key="sup1"/>
<el-table-column :label="$t('dms.suplierName')" align="center" prop="suplierName" key="sup2"/>
<el-table-column :label="$t('dms.suplierPerson')" align="center" prop="suplierPerson" key="sup3"/>
<el-table-column :label="$t('dms.suplierTel')" align="center" prop="suplierTel" key="sup4" />
<el-table-column :label="$t('dms.suplierAddress')" align="center" prop="suplierAddress" key="sup6"/>
<!-- <el-table-column label="供应商状态" align="center" prop="suplierStatus" />-->
<el-table-column label="供应商状态" align="center" prop="suplierStatus" key="sup7">
<el-table-column :label="$t('dms.suplierStatus')" align="center" prop="suplierStatus" key="sup7">
<template slot-scope="scope">
<dict-tag :options="dict.type.suplier_status" :value="scope.row.suplierStatus"/>
</template>
@ -385,13 +385,13 @@
<!-- <dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="备注" align="center" prop="remark" key="sup9"/>
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" key="sup9"/>
</el-table>
<el-table v-loading="loading" :data="devicedepreciationList" v-if=deviceDepreciationIf >
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键标识" align="center" prop="deviceDepreciationId" />-->
<el-table-column label="设备ID" align="center" prop="deviceId" key="deper2"/>
<el-table-column label="设备名称" align="center" prop="deviceId"key="deper20" >
<el-table-column :label="$t('dms.deviceId')" align="center" prop="deviceId" key="deper2"/>
<el-table-column :label="$t('dms.deviceName')" align="center" prop="deviceId"key="deper20" >
<template slot-scope="scope">
<span
v-for="(item, index) in ledgerList"
@ -403,42 +403,42 @@
</span>
</template>
</el-table-column>
<el-table-column label="维修次数" align="center" prop="repairFrequency"key="deper3" />
<el-table-column label="维修费用" align="center" prop="repairCosts" key="deper4"/>
<el-table-column label="折旧费用" align="center" prop="depreciationCost" key="depre1" />
<el-table-column label="投入时间" align="center" prop="putintoTime" width="180" key="deper5">
<el-table-column :label="$t('dms.repairFrequency')" align="center" prop="repairFrequency"key="deper3" />
<el-table-column :label="$t('dms.repairCosts')" align="center" prop="repairCosts" key="deper4"/>
<el-table-column :label="$t('dms.depreciationCost')" align="center" prop="depreciationCost" key="depre1" />
<el-table-column :label="$t('dms.putintoTime')" align="center" prop="putintoTime" width="180" key="deper5">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.putintoTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="使用年限" align="center" prop="useLife" key="deper6"/>
<el-table-column :label="$t('dms.useLife')" align="center" prop="useLife" key="deper6"/>
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<!-- <el-table-column label="标识" align="center" prop="isFlag">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="备注" align="center" prop="remark" key="deper7" />
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" key="deper7" />
</el-table>
<el-table v-loading="loading" :data="checkplanList" v-if=deviceCheckplanIf>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="盘点计划ID" align="center" prop="flowCheckplanId" key="flow1" />-->
<el-table-column label="盘点计划ID" align="center" prop="flowCheckplanId" key="flow1">
<el-table-column :label="$t('dms.flowCheckplanId')" align="center" prop="flowCheckplanId" key="flow1">
<template slot-scope="scope">
<router-link :to="'/dms/detail/index/' + scope.row.flowCheckplanId" class="link-type">
<span>{{ scope.row.flowCheckplanId }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column label="盘点单号" align="center" prop="checkCode" key="flow2"/>
<el-table-column label="计划盘点时间" align="center" prop="planTime" width="180" key="flow3">
<el-table-column :label="$t('dms.checkCode')" align="center" prop="checkCode" key="flow2"/>
<el-table-column :label="$t('dms.planCheckTime')" align="center" prop="planTime" width="180" key="flow3">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="盘点人员" align="center" prop="checkBy" key="flow4"/>
<el-table-column :label="$t('dms.checkBy')" align="center" prop="checkBy" key="flow4"/>
<!-- <el-table-column label="设备类型ID关联dms_base_device_type的device_type_id" align="center" prop="deviceTypeId" />-->
<el-table-column label="设备类型" align="center" prop="deviceTypeId" key="flow5" >
<el-table-column :label="$t('dms.deviceTypeId')" align="center" prop="deviceTypeId" key="flow5" >
<template slot-scope="scope">
<span
v-for="(item, index) in devicetypeList"
@ -450,21 +450,21 @@
</span>
</template>
</el-table-column>
<el-table-column label="盘点数量" align="center" prop="checkAmount" key="flow6" />
<el-table-column label="剩余数量" align="center" prop="surplusCheckAmount" key="flow7"/>
<el-table-column :label="$t('dms.checkAmount')" align="center" prop="checkAmount" key="flow6" />
<el-table-column :label="$t('dms.surplusCheckAmount')" align="center" prop="surplusCheckAmount" key="flow7"/>
<!-- <el-table-column label="盘点状态(0未盘点1已盘点2盘点中)" align="center" prop="checkState" />-->
<el-table-column label="盘点状态" align="center" prop="checkState">
<el-table-column :label="$t('dms.checkState')" align="center" prop="checkState">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_check_state" :value="scope.row.checkState"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" />
</el-table>
<el-table v-loading="loading" :data="installList" v-if="deviceInstallIf">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键ID" align="center" prop="deviceInstallId" />-->
<el-table-column label="设备ID" align="center" prop="deviceId" key="install1" />
<el-table-column label="设备名称" align="center" prop="deviceId" key="install2" >
<el-table-column :label="$t('dms.deviceId')" align="center" prop="deviceId" key="install1" />
<el-table-column :label="$t('dms.deviceName')" align="center" prop="deviceId" key="install2" >
<template slot-scope="scope">
<span
v-for="(item, index) in ledgerList"
@ -476,21 +476,21 @@
</span>
</template>
</el-table-column>
<el-table-column label="安装地点" align="center" prop="installPosition" key="install3" />
<el-table-column label="安装时间" align="center" prop="installTime" width="180" key="install4">
<el-table-column :label="$t('dms.installPosition')" align="center" prop="installPosition" key="install3" />
<el-table-column :label="$t('dms.installTime')" align="center" prop="installTime" width="180" key="install4">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.installTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="安装人员" align="center" prop="installPersion" key="install5" />
<el-table-column :label="$t('dms.installPersion')" align="center" prop="installPersion" key="install5" />
<!-- <el-table-column label="${comment}" align="center" prop="workOrder" />-->
<el-table-column label="备注" align="center" prop="remark" key="install6"/>
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" key="install6"/>
</el-table>
<el-table v-loading="loading" :data="infoList" v-if="deviceInfoIf" >
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键ID" align="center" prop="transferInfoId" key="info1" />
<el-table-column label="设备ID" align="center" prop="deviceId" key="info2"/>
<el-table-column label="设备名称" align="center" prop="deviceId" key="info3">
<!-- <el-table-column label="主键ID" align="center" prop="transferInfoId" key="info1" />-->
<el-table-column :label="$t('dms.deviceId')" align="center" prop="deviceId" key="info2"/>
<el-table-column :label="$t('dms.deviceName')" align="center" prop="deviceId" key="info3">
<template slot-scope="scope">
<span
v-for="(item, index) in ledgerList"
@ -502,23 +502,23 @@
</span>
</template>
</el-table-column>
<el-table-column label="设备原位置" align="center" prop="devicePosition" key="info4"/>
<el-table-column label="设备转移位置" align="center" prop="devicePositionNew" key="info5"/>
<el-table-column label="设备转移人员" align="center" prop="devicePositionOperator"key="info6" />
<el-table-column label="设备转移原因" align="center" prop="devicePositionReason" key="info7"/>
<el-table-column label="设备转移时间" align="center" prop="deviceTransferTime" width="180" key="info8">
<el-table-column :label="$t('dms.devicePosition')" align="center" prop="devicePosition" key="info4"/>
<el-table-column :label="$t('dms.devicePositionNew')" align="center" prop="devicePositionNew" key="info5"/>
<el-table-column :label="$t('dms.devicePositionOperator')" align="center" prop="devicePositionOperator"key="info6" />
<el-table-column :label="$t('dms.devicePositionReason')" align="center" prop="devicePositionReason" key="info7"/>
<el-table-column :label="$t('dms.deviceTransferTime')" align="center" prop="deviceTransferTime" width="180" key="info8">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.deviceTransferTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" key="info9"/>
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" key="info9"/>
</el-table>
<el-table v-loading="loading" :data="debuggingList" v-if="deviceDebuggingIf">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键ID" align="center" prop="deviceDebuggingId" />-->
<el-table-column label="调试单号" align="center" prop="workOrder" key="work1"/>
<el-table-column :label="$t('dms.workOrder')" align="center" prop="workOrder" key="work1"/>
<!-- <el-table-column label="设备ID,关联dms_base_device_ledger的device_id" align="center" prop="deviceId" />-->
<el-table-column label="设备名称" align="center" prop="deviceId" key="work2">
<el-table-column :label="$t('dms.deviceName')" align="center" prop="deviceId" key="work2">
<template slot-scope="scope">
<span
v-for="(item, index) in ledgerList"
@ -531,44 +531,44 @@
</template>
</el-table-column>
<!-- <el-table-column label="调试状态(0未调试1调试中2已完成)" align="center" prop="status" />-->
<el-table-column label="调试状态" align="center" prop="status" key="work3">
<el-table-column :label="$t('dms.debugStatus')" align="center" prop="status" key="work3">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="调试时间" align="center" prop="debugTime" width="180" key="work4">
<el-table-column :label="$t('dms.debugTime')" align="center" prop="debugTime" width="180" key="work4">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.debugTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="调试人员" align="center" prop="debugPerson"key="work5" />
<el-table-column label="备注" align="center" prop="remark"key="work6" />
<el-table-column :label="$t('dms.debugPerson')" align="center" prop="debugPerson"key="work5" />
<el-table-column :label="$t('dms.remark')" align="center" prop="remark"key="work6" />
</el-table>
</el-col>
</el-row>
<!-- 添加或修改设备台账信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="设备编号" prop="deviceCode">
<el-input v-model="form.deviceCode" placeholder="请输入设备编号" />
<el-form-item :label="$t('dms.deviceCode')" prop="deviceCode">
<el-input v-model="form.deviceCode" :placeholder="$t('dms.inputDeviceCode')" />
</el-form-item>
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
<el-form-item :label="$t('dms.deviceName')" prop="deviceName">
<el-input v-model="form.deviceName" :placeholder="$t('dms.inputDeviceName')" />
</el-form-item>
<!-- <el-form-item label="所属工位" prop="stationId">-->
<!-- <el-input v-model="form.stationId" placeholder="请输入所属工位,关联pd_base_station_info的station_id" />-->
<!-- </el-form-item>-->
<el-form-item label="资产编号" prop="assetNumber">
<el-input v-model="form.assetNumber" placeholder="请输入资产编号" />
<el-form-item :label="$t('dms.assetNumber')" prop="inputAssetNumber">
<el-input v-model="form.assetNumber" placeholder="" />
</el-form-item>
<el-form-item label="设备位置" prop="deviceLocation">
<el-input v-model="form.deviceLocation" placeholder="请输入设备位置" />
<el-form-item :label="$t('dms.deviceLocation')" prop="deviceLocation">
<el-input v-model="form.deviceLocation" :placeholder="$t('dms.inputDeviceLocation')" />
</el-form-item>
<!-- <el-form-item label="设备类型" prop="deviceTypeId">-->
<!-- <el-input v-model="form.deviceTypeId" placeholder="请输入设备类型,关联dm_base_device_type的device_type_id" />-->
<!-- </el-form-item>-->
<el-form-item label="设备类型" prop="deviceTypeId" >
<el-select v-model="form.deviceTypeId" placeholder="请输入设备类型">
<el-form-item :label="$t('dms.deviceTypeId')" prop="deviceTypeId" >
<el-select v-model="form.deviceTypeId" :placeholder="$t('dms.inputDeviceType')">
<el-option
v-for="item in devicetypeList"
:key="item.deviceTypeId"
@ -577,14 +577,14 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="设备规格" prop="deviceSpec">
<el-input v-model="form.deviceSpec" placeholder="请输入设备规格" />
<el-form-item :label="$t('dms.deviceSpec')" prop="deviceSpec">
<el-input v-model="form.deviceSpec" :placeholder="$t('dms.inoutDeviceSpec')" />
</el-form-item>
<!-- <el-form-item label="供应商" prop="supplierId">-->
<!-- <el-input v-model="form.supplierId" placeholder="请输入供应商,关联dm_base_device_supplier的supplier_id" />-->
<!-- </el-form-item>-->
<el-form-item label="供应商" prop="supplierId" >
<el-select v-model="form.supplierId" placeholder="请输入供应商">
<el-form-item :label="$t('dms.supplier')" prop="supplierId" >
<el-select v-model="form.supplierId" :placeholder="$t('dms.inputSuplier')">
<el-option
v-for="item in supplierList"
:key="item.supplierId"
@ -593,7 +593,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="设备状态" prop="deviceStatus">
<el-form-item :label="$t('dms.deviceStatus')" prop="deviceStatus">
<el-radio-group v-model="form.deviceStatus">
<el-radio
v-for="dict in dict.type.device_status"
@ -611,13 +611,13 @@
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<el-form-item :label="$t('remark')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('dms.inputRemark')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm">{{ $t('button.submit') }}</el-button>
<el-button @click="cancel">{{ $t('button.cancel') }}</el-button>
</div>
</el-dialog>
</div>
@ -1115,7 +1115,7 @@ export default {
getTreeselect() {
listDevicetype().then(response => {
this.devicetypeOptions = [];
const data = { deviceTypeId: 0, typeName: '顶级节点', children: [] };
const data = { deviceTypeId: 0, typeName: this.$t('dms.topNodes'), children: [] };
data.children = this.handleTree(response.data, "deviceTypeId", "parentId");
this.devicetypeOptions.push(data);
// console.log(data)

@ -1,73 +1,74 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备ID" prop="deviceId">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true"
v-show="showSearch" label-width="100px">
<el-form-item :label="$t('dms.deviceId')" prop="deviceId">
<el-input
v-model="queryParams.deviceId"
placeholder="请输入设备ID"
:placeholder="$t('dms.inputDeviceId')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="deviceName">
<el-form-item :label="$t('dms.deviceName')" prop="deviceName">
<el-input
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
:placeholder="$t('dms.inputDeviceName')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="参数编号" prop="paramCode">-->
<!-- <el-form-item :label="参数编号" prop="paramCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.paramCode"-->
<!-- placeholder="请输入参数编号"-->
<!-- :placeholder="请输入参数编号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="参数名称" prop="paramName">-->
<!-- <el-form-item :label="参数名称" prop="paramName">-->
<!-- <el-input-->
<!-- v-model="queryParams.paramName"-->
<!-- placeholder="请输入参数名称"-->
<!-- :placeholder="请输入参数名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="参数IP" prop="paramIp">-->
<!-- <el-form-item :label="参数IP" prop="paramIp">-->
<!-- <el-input-->
<!-- v-model="queryParams.paramIp"-->
<!-- placeholder="请输入参数IP"-->
<!-- :placeholder="请输入参数IP"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="参数地址" prop="paramAddress">-->
<!-- <el-form-item :label="参数地址" prop="paramAddress">-->
<!-- <el-input-->
<!-- v-model="queryParams.paramAddress"-->
<!-- placeholder="请输入参数地址"-->
<!-- :placeholder="请输入参数地址"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="读取频率" prop="readFrequency">-->
<!-- <el-form-item :label="读取频率" prop="readFrequency">-->
<!-- <el-input-->
<!-- v-model="queryParams.readFrequency"-->
<!-- placeholder="请输入读取频率"-->
<!-- :placeholder="请输入读取频率"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-form-item :label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input-->
<!-- v-model="queryParams.isFlag"-->
<!-- placeholder="请输入是否标识1-是2-否"-->
<!-- :placeholder="请输入是否标识1-是2-否"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('button.select')}}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('button.remake') }}</el-button>
</el-form-item>
</el-form>
@ -80,7 +81,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['dms:param:add']"
>新增</el-button>
>{{$t('button.insert')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -91,7 +92,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['dms:param:edit']"
>修改</el-button>
>{{ $t('button.update') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -102,7 +103,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['dms:param:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -112,16 +113,16 @@
size="mini"
@click="handleExport"
v-hasPermi="['dms:param:export']"
>导出</el-button>
>{{ $t('button.export') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="paramList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键标识" align="center" prop="deviceParamId" />-->
<el-table-column label="设备ID" align="center" prop="deviceId" />
<el-table-column label="设备名称" align="center" prop="deviceId" >
<!-- <el-table-column :label="主键标识" align="center" prop="deviceParamId" />-->
<el-table-column :label="$t('dms.deviceId')" align="center" prop="deviceId" />
<el-table-column :label="$t('dms.deviceName')" align="center" prop="deviceId" >
<template slot-scope="scope">
<span
v-for="(item, index) in ledgerList"
@ -133,15 +134,15 @@
</span>
</template>
</el-table-column>
<el-table-column label="参数编号" align="center" prop="paramCode" />
<el-table-column label="参数名称" align="center" prop="paramName" />
<el-table-column label="参数IP" align="center" prop="paramIp" />
<el-table-column label="参数地址" align="center" prop="paramAddress" />
<el-table-column label="参数类型" align="center" prop="paramType" />
<el-table-column label="读取频率" align="center" prop="readFrequency" />
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column :label="$t('dms.paramCode')" align="center" prop="paramCode" />
<el-table-column :label="$t('dms.paramName')" align="center" prop="paramName" />
<el-table-column :label="$t('dms.paramIp') " align="center" prop="paramIp" />
<el-table-column :label="$t('dms.paramAddress')" align="center" prop="paramAddress" />
<el-table-column :label="$t('dms.paramType')" align="center" prop="paramType" />
<el-table-column :label="$t('dms.readFrequency')" align="center" prop="readFrequency" />
<!-- <el-table-column :label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" />
<el-table-column :label="$t('button.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -149,14 +150,14 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dms:param:edit']"
>修改</el-button>
>{{$t('button.update')}}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:param:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -172,11 +173,11 @@
<!-- 添加或修改设备参数信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!-- <el-form-item label="设备ID" prop="deviceId">-->
<!-- <el-input v-model="form.deviceId" placeholder="请输入设备ID" />-->
<!-- <el-form-item :label="设备ID" prop="deviceId">-->
<!-- <el-input v-model="form.deviceId" :placeholder="请输入设备ID" />-->
<!-- </el-form-item>-->
<el-form-item label="设备名称" prop="deviceId" >
<el-select v-model="form.deviceId" placeholder="请选择设备">
<el-form-item :label="$t('dms.deviceName')" prop="deviceId" >
<el-select v-model="form.deviceId" :placeholder="$t('dms.inputDeviceName')">
<el-option
v-for="item in ledgerList"
:key="item.deviceId"
@ -185,34 +186,34 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="参数编号" prop="paramCode">
<el-input v-model="form.paramCode" placeholder="请输入参数编号" />
<el-form-item :label="$t('dms.paramCode')" prop="paramCode">
<el-input v-model="form.paramCode" :placeholder="$t('dms.inputParamCode')" />
</el-form-item>
<el-form-item label="参数名称" prop="paramName">
<el-input v-model="form.paramName" placeholder="请输入参数名称" />
<el-form-item :label="$t('dms.paramName')" prop="paramName">
<el-input v-model="form.paramName" :placeholder="$t('dms.inputParamName')" />
</el-form-item>
<el-form-item label="参数类型" prop="paramType">
<el-input v-model="form.paramType" placeholder="请输入参数类型" />
<el-form-item :label="$t('dms.paramType')" prop="paramType">
<el-input v-model="form.paramType" :placeholder="$t('dms.inputParamType')" />
</el-form-item>
<el-form-item label="参数IP" prop="paramIp">
<el-input v-model="form.paramIp" placeholder="请输入参数IP" />
<el-form-item :label="$t('dms.paramIp')" prop="paramIp">
<el-input v-model="form.paramIp" :placeholder="$t('dms.inputParamIp')" />
</el-form-item>
<el-form-item label="参数地址" prop="paramAddress">
<el-input v-model="form.paramAddress" placeholder="请输入参数地址" />
<el-form-item :label="$t('dms.paramAddress')" prop="paramAddress">
<el-input v-model="form.paramAddress" :placeholder="$t('dms.inputParamAddress')" />
</el-form-item>
<el-form-item label="读取频率" prop="readFrequency">
<el-input v-model="form.readFrequency" placeholder="请输入读取频率" />
<el-form-item :label="$t('dms.readFrequency')" prop="readFrequency">
<el-input v-model="form.readFrequency" :placeholder="$t('dms.inputReadFrequency')" />
</el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />-->
<!-- <el-form-item :label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" :placeholder="请输入是否标识1-是2-否" />-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<el-form-item :label="$t('dms.remark')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('dms.inputRemark')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm">{{ $t('button.submit') }}</el-button>
<el-button @click="cancel">{{ $t('button.cancel') }}</el-button>
</div>
</el-dialog>
</div>
@ -340,7 +341,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备参数信息";
this.title = this.$t('dms.insertDeviceParam');
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -349,7 +350,7 @@ export default {
getParam(deviceParamId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备参数信息";
this.title = this.$t('dms.updateDeviceParam');
});
},
/** 提交按钮 */
@ -358,13 +359,13 @@ export default {
if (valid) {
if (this.form.deviceParamId != null) {
updateParam(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess(this.$t('button.updateSuccess'));
this.open = false;
this.getList();
});
} else {
addParam(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess(this.$t('button.insertSuccess'));
this.open = false;
this.getList();
});
@ -375,11 +376,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const deviceParamIds = row.deviceParamId || this.ids;
this.$modal.confirm('是否确认删除设备参数信息编号为"' + deviceParamIds + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('button.deleteConfirmDeviceParam') + deviceParamIds).then(function() {
return delParam(deviceParamIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess(this.$t('button.deleteSuccess'));
}).catch(() => {});
},
/** 导出按钮操作 */

@ -1,26 +1,27 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="计划编号" prop="workOrder">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true"
v-show="showSearch" label-width="100px">
<el-form-item :label="$t('dms.workOrder')" prop="workOrder">
<el-input
v-model="queryParams.workOrder"
placeholder="请输入计划编号"
:placeholder="$t('dms.inputWorkOrder')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备ID" prop="deviceId">
<el-form-item :label="$t('dms.deviceId')" prop="deviceId">
<el-input
v-model="queryParams.deviceId"
placeholder="请输入设备ID"
:placeholder="$t('dms.inputDeviceId')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="deviceName">
<el-form-item :label="$t('dms.deviceName')" prop="deviceName">
<el-input
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
:placeholder="$t('dms.inputDeviceName')"
clearable
@keyup.enter.native="handleQuery"
/>
@ -49,12 +50,12 @@
<!-- placeholder="请选择采购时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<el-form-item label="采购时间">
<el-form-item :label="$t('dms.purchaseTime')">
<el-date-picker
v-model="queryParams.params.beginTime"
style="width: 240px"
type="date"
placeholder="选择采购时间"
:placeholder="$t('dms.inputPurchaseTime')"
value-format="yyyy-MM-dd "
></el-date-picker>
</el-form-item>
@ -65,12 +66,12 @@
value-format="yyyy-MM-dd "
style="width: 240px"
type="date"
placeholder="选择采购时间"
:placeholder="$t('dms.inputPurchaseTime')"
></el-date-picker
></el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('button.select')}}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('button.remake') }}</el-button>
</el-form-item>
</el-form>
@ -83,7 +84,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['dms:purchase:add']"
>新增</el-button>
>{{$t('button.insert')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -94,7 +95,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['dms:purchase:edit']"
>修改</el-button>
>{{ $t('button.update') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -105,7 +106,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['dms:purchase:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -115,7 +116,7 @@
size="mini"
@click="handleExport"
v-hasPermi="['dms:purchase:export']"
>导出</el-button>
>{{ $t('button.export') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -123,9 +124,9 @@
<el-table v-loading="loading" :data="purchaseList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键ID" align="center" prop="devicePurchaseId" />-->
<el-table-column label="计划编号" align="center" prop="workOrder" />
<el-table-column label="设备ID" align="center" prop="deviceId" />
<el-table-column label="设备名称" align="center" prop="deviceId" >
<el-table-column :label="$t('dms.workOrder')" align="center" prop="workOrder" />
<el-table-column :label="$t('dms.deviceId')" align="center" prop="deviceId" />
<el-table-column :label="$t('dms.deviceName')" align="center" prop="deviceId" >
<template slot-scope="scope">
<span
v-for="(item, index) in ledgerList"
@ -137,15 +138,15 @@
</span>
</template>
</el-table-column>
<el-table-column label="采购人" align="center" prop="purchasePerson" />
<el-table-column label="采购地点" align="center" prop="purchasePosition" />
<el-table-column label="采购时间" align="center" prop="purchaseTime" width="180">
<el-table-column :label="$t('dms.purchasePerson')" align="center" prop="purchasePerson" />
<el-table-column :label="$t('dms.purchasePosition')" align="center" prop="purchasePosition" />
<el-table-column :label="$t('dms.purchaseTime')" align="center" prop="purchaseTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.purchaseTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" />
<el-table-column :label="$t('button.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -153,14 +154,14 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dms:purchase:edit']"
>修改</el-button>
>{{$t('button.update')}}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:purchase:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -176,13 +177,13 @@
<!-- 添加或修改设备采购信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="计划编号" prop="workOrder">
<el-form-item :label="$t('dms.workOrder')" prop="workOrder">
<el-input v-model="form.workOrder" placeholder="请输入计划编号" />
</el-form-item>
<!-- <el-form-item label="设备ID,关联dms_base_device_ledger的device_id" prop="deviceId">-->
<!-- <el-input v-model="form.deviceId" placeholder="请输入设备ID,关联dms_base_device_ledger的device_id" />-->
<!-- </el-form-item>-->
<el-form-item label="设备名称" prop="deviceId" >
<el-form-item :label="$t('dms.deviceName')" prop="deviceId" >
<el-select v-model="form.deviceId" placeholder="请选择设备">
<el-option
v-for="item in ledgerList"
@ -192,27 +193,27 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="采购人" prop="purchasePerson">
<el-input v-model="form.purchasePerson" placeholder="请输入采购人" />
<el-form-item :label="$t('dms.purchasePerson')" prop="purchasePerson">
<el-input v-model="form.purchasePerson" :placeholder="$t('dms.inputPurchasePerson')" />
</el-form-item>
<el-form-item label="采购地点" prop="purchasePosition">
<el-input v-model="form.purchasePosition" placeholder="请输入采购地点" />
<el-form-item :label="$t('dms.purchasePosition')" prop="purchasePosition">
<el-input v-model="form.purchasePosition" :placeholder="$t('dms.inputPurchasePerson')" />
</el-form-item>
<el-form-item label="采购时间" prop="purchaseTime">
<el-form-item :label="$t('dms.purchaseTime')" prop="purchaseTime">
<el-date-picker clearable
v-model="form.purchaseTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择采购时间">
:placeholder="$t('dms.inputPurchaseTime')">
</el-date-picker>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<el-form-item :label="$t('dms.remark')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('dms.inputRemark')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm">{{ $t('button.submit') }}</el-button>
<el-button @click="cancel">{{ $t('button.cancel') }}</el-button>
</div>
</el-dialog>
</div>
@ -339,7 +340,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备采购信息";
this.title =this.$t('dms.insertWorkOrder');
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -348,7 +349,7 @@ export default {
getPurchase(devicePurchaseId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备采购信息";
this.title = this.$t('dms.updateWorkOrder');
});
},
/** 提交按钮 */
@ -357,13 +358,13 @@ export default {
if (valid) {
if (this.form.devicePurchaseId != null) {
updatePurchase(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess(this.$t('button.updateSuccess'));
this.open = false;
this.getList();
});
} else {
addPurchase(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess(this.$t('button.insertSuccess'));
this.open = false;
this.getList();
});
@ -374,11 +375,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const devicePurchaseIds = row.devicePurchaseId || this.ids;
this.$modal.confirm('是否确认删除设备采购信息编号为"' + devicePurchaseIds + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('button.deleteConfirmWorkOrder') + devicePurchaseIds ).then(function() {
return delPurchase(devicePurchaseIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess(this.$t('button.deleteSuccess'));
}).catch(() => {});
},
/** 导出按钮操作 */

@ -1,65 +1,66 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备ID" prop="deviceId">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true"
v-show="showSearch" label-width="100px">
<el-form-item :label="$t('dms.deviceId')" prop="deviceId">
<el-input
v-model="queryParams.deviceId"
placeholder="请输入设备ID"
:placeholder="$t('dms.inputDeviceId')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="deviceName">
<el-form-item :label="$t('dms.deviceName')" prop="deviceName">
<el-input
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
:placeholder="$t('dms.inputDeviceName')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="参数编号" prop="paramCode">-->
<!-- <el-form-item :label="参数编号" prop="paramCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.paramCode"-->
<!-- placeholder="请输入参数编号"-->
<!-- :placeholder="请输入参数编号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="参数名称" prop="paramName">-->
<!-- <el-form-item :label="参数名称" prop="paramName">-->
<!-- <el-input-->
<!-- v-model="queryParams.paramName"-->
<!-- placeholder="请输入参数名称"-->
<!-- :placeholder="请输入参数名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="参数值" prop="paramValue">-->
<!-- <el-form-item :label="参数值" prop="paramValue">-->
<!-- <el-input-->
<!-- v-model="queryParams.paramValue"-->
<!-- placeholder="请输入参数值"-->
<!-- :placeholder="请输入参数值"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="参数单位" prop="paramUnit">-->
<!-- <el-form-item :label="参数单位" prop="paramUnit">-->
<!-- <el-input-->
<!-- v-model="queryParams.paramUnit"-->
<!-- placeholder="请输入参数单位"-->
<!-- :placeholder="请输入参数单位"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-form-item :label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input-->
<!-- v-model="queryParams.isFlag"-->
<!-- placeholder="请输入是否标识1-是2-否"-->
<!-- :placeholder="请输入是否标识1-是2-否"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('button.select')}}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('button.remake') }}</el-button>
</el-form-item>
</el-form>
@ -72,7 +73,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['dms:specialDeviceParam:add']"
>新增</el-button>
>{{$t('button.insert')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -83,7 +84,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['dms:specialDeviceParam:edit']"
>修改</el-button>
>{{ $t('button.update') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -94,7 +95,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['dms:specialDeviceParam:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -104,16 +105,16 @@
size="mini"
@click="handleExport"
v-hasPermi="['dms:specialDeviceParam:export']"
>导出</el-button>
>{{ $t('button.export') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="specialDeviceParamList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键标识" align="center" prop="specialdeviceParamId" />-->
<el-table-column label="设备ID" align="center" prop="deviceId" />
<el-table-column label="设备名称" align="center" prop="deviceId" >
<!-- <el-table-column :label="主键标识" align="center" prop="specialdeviceParamId" />-->
<el-table-column :label="$t('dms.deviceId')" align="center" prop="deviceId" />
<el-table-column :label="$t('dms.deviceName')" align="center" prop="deviceId" >
<template slot-scope="scope">
<span
v-for="(item, index) in ledgerList"
@ -125,13 +126,13 @@
</span>
</template>
</el-table-column>
<el-table-column label="参数编号" align="center" prop="paramCode" />
<el-table-column label="参数名称" align="center" prop="paramName" />
<el-table-column label="参数值" align="center" prop="paramValue" />
<el-table-column label="参数单位" align="center" prop="paramUnit" />
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column :label="$t('dms.paramCode')" align="center" prop="paramCode" />
<el-table-column :label="$t('dms.paramName')" align="center" prop="paramName" />
<el-table-column :label="$t('dms.paramValue')" align="center" prop="paramValue" />
<el-table-column :label="$t('dms.paramUnit')" align="center" prop="paramUnit" />
<!-- <el-table-column :label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" />
<el-table-column :label="$t('button.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -139,14 +140,14 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dms:specialDeviceParam:edit']"
>修改</el-button>
>{{$t('button.update')}}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:specialDeviceParam:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -162,11 +163,11 @@
<!-- 添加或修改特种设备参数信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!-- <el-form-item label="设备ID关联dms_base_device_ledger的device_id" prop="deviceId">-->
<!-- <el-input v-model="form.deviceId" placeholder="请输入设备ID关联dms_base_device_ledger的device_id" />-->
<!-- <el-form-item :label="设备ID关联dms_base_device_ledger的device_id" prop="deviceId">-->
<!-- <el-input v-model="form.deviceId" :placeholder="请输入设备ID关联dms_base_device_ledger的device_id" />-->
<!-- </el-form-item>-->
<el-form-item label="设备名称" prop="deviceId" >
<el-select v-model="form.deviceId" placeholder="请选择设备">
<el-form-item :label="$t('dms.deviceName')" prop="deviceId" >
<el-select v-model="form.deviceId" :placeholder="$t('dms.inputDeviceName')">
<el-option
v-for="item in ledgerList"
:key="item.deviceId"
@ -175,28 +176,28 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="参数编号" prop="paramCode">
<el-input v-model="form.paramCode" placeholder="请输入参数编号" />
<el-form-item :label="$t('dms.paramCode')" prop="paramCode">
<el-input v-model="form.paramCode" :placeholder="$t('dms.inputParamCode')" />
</el-form-item>
<el-form-item label="参数名称" prop="paramName">
<el-input v-model="form.paramName" placeholder="请输入参数名称" />
<el-form-item :label="$t('dms.paramName')" prop="paramName">
<el-input v-model="form.paramName" :placeholder="$t('dms.inputParamName')" />
</el-form-item>
<el-form-item label="参数值" prop="paramValue">
<el-input v-model="form.paramValue" placeholder="请输入参数值" />
<el-form-item :label="$t('dms.paramValue')" prop="paramValue">
<el-input v-model="form.paramValue" :placeholder="$t('dms.inputParamValue')" />
</el-form-item>
<el-form-item label="参数单位" prop="paramUnit">
<el-input v-model="form.paramUnit" placeholder="请输入参数单位" />
<el-form-item :label="$t('dms.paramUnit')" prop="paramUnit">
<el-input v-model="form.paramUnit" :placeholder="$t('dms.inputParamUnit')" />
</el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />-->
<!-- <el-form-item :label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" :placeholder="请输入是否标识1-是2-否" />-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<el-form-item :label="$t('dms.remark')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('dms.inputRemark')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm">{{ $t('button.submit') }}</el-button>
<el-button @click="cancel">{{ $t('button.cancel') }}</el-button>
</div>
</el-dialog>
</div>
@ -320,7 +321,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加特种设备参数信息";
this.title = this.$t('dms.insertSpecialParma');
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -329,7 +330,7 @@ export default {
getSpecialDeviceParam(specialdeviceParamId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改特种设备参数信息";
this.title = this.$t('dms.updateSpecialParma');
});
},
/** 提交按钮 */
@ -338,13 +339,13 @@ export default {
if (valid) {
if (this.form.specialdeviceParamId != null) {
updateSpecialDeviceParam(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess(this.$t('button.updateSuccess'));
this.open = false;
this.getList();
});
} else {
addSpecialDeviceParam(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess(this.$t('button.insertSuccess'));
this.open = false;
this.getList();
});
@ -355,11 +356,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const specialdeviceParamIds = row.specialdeviceParamId || this.ids;
this.$modal.confirm('是否确认删除特种设备参数信息编号为"' + specialdeviceParamIds + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('button.deleteConfirmSpecialDeviceParam') + specialdeviceParamIds ).then(function() {
return delSpecialDeviceParam(specialdeviceParamIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess(this.$t('button.deleteSuccess'));
}).catch(() => {});
},
/** 导出按钮操作 */

@ -2,18 +2,18 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small"
:inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="供应商编号" prop="suplierCode">
<el-form-item :label="$t('suplierCode')" prop="suplierCode">
<el-input
v-model="queryParams.suplierCode"
placeholder="请输入供应商编号"
:placeholder="$t('inputSuplierCode')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="供应商名称" prop="suplierName">
<el-form-item :label="$t('suplierName')" prop="suplierName">
<el-input
v-model="queryParams.suplierName"
placeholder="请输入供应商名称"
:placeholder="$t('inputSuplierName')"
clearable
@keyup.enter.native="handleQuery"
/>
@ -51,8 +51,8 @@
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('button.select') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{$t('button.remake')}}</el-button>
</el-form-item>
</el-form>
@ -65,7 +65,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['dms:suplier:add']"
>新增</el-button>
>{{ $t('button.insert') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -76,7 +76,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['dms:suplier:edit']"
>修改</el-button>
>{{ $t('button.update')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -87,7 +87,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['dms:suplier:remove']"
>删除</el-button>
>{{ $t('button.delete') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -97,7 +97,7 @@
size="mini"
@click="handleExport"
v-hasPermi="['dms:suplier:export']"
>导出</el-button>
>{{ $t('button.export') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -105,11 +105,11 @@
<el-table v-loading="loading" :data="suplierList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键标识" align="center" prop="supplierId" />-->
<el-table-column label="供应商编号" align="center" prop="suplierCode" />
<el-table-column label="供应商名称" align="center" prop="suplierName" />
<el-table-column label="供应商联系人" align="center" prop="suplierPerson" />
<el-table-column label="供应商电话" align="center" prop="suplierTel" />
<el-table-column label="供应商地址" align="center" prop="suplierAddress" />
<el-table-column :label="$t('dms.suplierCode')" align="center" prop="suplierCode" />
<el-table-column :label="$t('dms.suplierName')" align="center" prop="suplierName" />
<el-table-column :label="$t('dms.suplierPerson')" align="center" prop="suplierPerson" />
<el-table-column :label="$t('dms.suplierTel')" align="center" prop="suplierTel" />
<el-table-column :label="$t('dms.suplierAddress')" align="center" prop="suplierAddress" />
<!-- <el-table-column label="供应商状态" align="center" prop="suplierStatus" />-->
<!-- <el-table-column label="供应商状态" align="center" prop="suplierStatus">-->
<!-- <template slot-scope="scope">-->
@ -122,8 +122,8 @@
<!-- <dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column :label="$t('dms.remark')" align="center" prop="remark" />
<el-table-column :label="$t('button.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -131,14 +131,14 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dms:suplier:edit']"
>修改</el-button>
>{{$t('button.update')}}</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:suplier:remove']"
>删除</el-button>
>{{$t('button.delete')}}</el-button>
</template>
</el-table-column>
</el-table>
@ -154,20 +154,20 @@
<!-- 添加或修改设备供应商信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="供应商编号" prop="suplierCode">
<el-input v-model="form.suplierCode" placeholder="请输入供应商编号" />
<el-form-item :label="$t('dms.suplierCode')" prop="suplierCode">
<el-input v-model="form.suplierCode" :placeholder="$t('dms.inputSuplierCode')" />
</el-form-item>
<el-form-item label="供应商名称" prop="suplierName">
<el-input v-model="form.suplierName" placeholder="请输入供应商名称" />
<el-form-item :label="$t('dms.suplierName')" prop="suplierName">
<el-input v-model="form.suplierName" :placeholder="$t('dms.inputSuplierName')" />
</el-form-item>
<el-form-item label="供应商联系人" prop="suplierPerson">
<el-input v-model="form.suplierPerson" placeholder="请输入供应商联系人" />
<el-form-item :label="$t('dms.suplierPerson')" prop="suplierPerson">
<el-input v-model="form.suplierPerson" :placeholder="$t('dms.inputSuplierPerson')" />
</el-form-item>
<el-form-item label="供应商电话" prop="suplierTel">
<el-input v-model="form.suplierTel" placeholder="请输入供应商电话" />
<el-form-item :label="$t('dms.suplierTel')" prop="suplierTel">
<el-input v-model="form.suplierTel" :placeholder="$t('dms.inputSuplierTel')" />
</el-form-item>
<el-form-item label="供应商地址" prop="suplierAddress">
<el-input v-model="form.suplierAddress" placeholder="请输入供应商地址" />
<el-form-item :label="$t('dms.suplierAddress')" prop="suplierAddress">
<el-input v-model="form.suplierAddress" :placeholder="$t('dms.inputSuplierAddress')" />
</el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />-->
@ -190,13 +190,13 @@
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<el-form-item :label="$t('dms.remark')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('dms.inputRemark')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm">{{$t('button.submit')}}</el-button>
<el-button @click="cancel">{{$t('button.cancel')}}</el-button>
</div>
</el-dialog>
</div>
@ -314,7 +314,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备供应商信息";
this.title = this.$t('dms.insertSuplier');
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -323,7 +323,7 @@ export default {
getSuplier(supplierId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备供应商信息";
this.title = this.$t('dms.updateSuplier');
});
},
/** 提交按钮 */
@ -332,13 +332,13 @@ export default {
if (valid) {
if (this.form.supplierId != null) {
updateSuplier(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess(this.$t('dms.updateSuccess'));
this.open = false;
this.getList();
});
} else {
addSuplier(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess(this.$t('dms.insertSuccess'));
this.open = false;
this.getList();
});
@ -349,11 +349,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const supplierIds = row.supplierId || this.ids;
this.$modal.confirm('是否确认删除设备供应商信息编号为"' + supplierIds + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('button.deleteConfirmSuplier') + supplierIds ).then(function() {
return delSuplier(supplierIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess(this.$t('button.deleteSuccess'));
}).catch(() => {});
},
/** 导出按钮操作 */

@ -1,82 +1,76 @@
<template>
<div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">京源环保MES系统</h3>
<h3 class="title">{{ $t('login.title') }}</h3>
<lang-select class="set-language" />
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
auto-complete="off"
placeholder="账号"
type="text"
auto-complete="off"
:placeholder="$t('login.username')"
>
<svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="user"/>
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
v-model="loginForm.password"
auto-complete="off"
placeholder="密码"
type="password"
auto-complete="off"
:placeholder="$t('login.password')"
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="password"/>
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item v-if="isStationId" prop="stationId">
<el-select v-model="loginForm.stationId" placeholder="请选择工位" style="width: 100%" @change="changeStation">
<el-option v-for="item in options" :key="item.stationId" :label="item.stationName"
:value="item.stationId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="工位编号" prop="stationCode" v-if="false">
<el-input v-model="loginForm.stationCode"/>
</el-form-item>
<el-form-item v-if="captchaEnabled" prop="code">
<el-form-item prop="code" v-if="captchaEnabled">
<el-input
v-model="loginForm.code"
auto-complete="off"
placeholder="验证码"
:placeholder="$t('login.code')"
style="width: 63%"
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="validCode"/>
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input>
<div class="login-code">
<img :src="codeUrl" class="login-code-img" @click="getCode"/>
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
</div>
</el-form-item>
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;"></el-checkbox>
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">{{ $t('login.rememberMe') }}</el-checkbox>
<el-form-item style="width:100%;">
<el-button
:loading="loading"
size="medium"
style="width:100%;"
type="primary"
style="width:100%;"
@click.native.prevent="handleLogin"
>
<span v-if="!loading"> </span>
<span v-else> ...</span>
<span v-if="!loading">{{ $t('login.logIn') }}</span>
<span v-else>{{$t('login.loading')}}</span>
</el-button>
<div v-if="register" style="float: right;">
<router-link :to="'/register'" class="link-type">立即注册</router-link>
<div style="float: right;" v-if="register">
<router-link class="link-type" :to="'/register'">立即注册</router-link>
</div>
</el-form-item>
</el-form>
<!-- 底部 -->
<!-- <div class="el-login-footer">-->
<!-- <span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span>-->
<!-- </div>-->
<div class="el-login-footer">
<span>Copyright © 2018-2024 ruoyi.vip All Rights Reserved.</span>
</div>
</div>
</template>
<script>
import {getCodeImg, getStations} from "@/api/login";
import LangSelect from '@/components/LangSelect'
import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie";
import { encrypt, decrypt } from '@/utils/jsencrypt'
export default {
name: "Login",
components: { LangSelect },
data() {
return {
codeUrl: "",
@ -84,68 +78,26 @@ export default {
username: "admin",
password: "admin123",
rememberMe: false,
stationId: '',
stationCode:'',
code: "",
uuid: ""
},
loginRules: {
username: [
{required: true, trigger: "blur", message: "请输入您的账号"}
{ required: true, trigger: "blur", message: this.$t('login.inputUsername') }
],
password: [
{required: true, trigger: "blur", message: "请输入您的密码"}
{ required: true, trigger: "blur", message: this.$t('login.inputPassword') }
],
code: [{required: true, trigger: "change", message: "请输入验证码"}]
code: [{ required: true, trigger: "change", message: this.$t('login.inputCode') }]
},
loading: false,
//
captchaEnabled: true,
//
register: false,
redirect: undefined,
isStationId: false,
options: [],
floorData: [
{
floor: 1,
processId: 1,
route: '/board/firstFloor'
},
{
floor: 4,
processId: 41,
route: '/board/laserLight'
},
{
floor: 4,
processId: 42,
route: '/board/weld'//
},
{
floor: 4,
processId: 43,
route: '/board/weld'//
},
{
floor: 4,
processId: 44,
route: '/board/assemble'//
},
{
floor: 5,
processId: 51,
route: '/board/fifthFloor'
},
{
floor: 5,
processId: 52,
route: '/board/fifthFloor?id=2'
}
]
redirect: undefined
};
},
watch: {
$route: {
handler: function(route) {
@ -157,13 +109,6 @@ export default {
created() {
this.getCode();
this.getCookie();
// this.loginForm.stationId = this.$route?.query?.station || '';
if (this.$route?.query?.isStationId === 'true') {
this.isStationId = true
getStations().then(e => {
this.options = e.data
})
}
},
methods: {
getCode() {
@ -199,15 +144,7 @@ export default {
Cookies.remove('rememberMe');
}
this.$store.dispatch("Login", this.loginForm).then(() => {
let data = this.options.find(v=>v.stationId === this.loginForm.stationId) || {}
let routeData = this.floorData.find(v=>v.floor === data.floor && v.processId === data.processId) || {}
if(routeData.route){
sessionStorage.setItem("FLOORDATA", JSON.stringify(routeData))
}
// this.$router.push({path: this.redirect || "/"}).catch(() => {
// });
this.$router.push({path: routeData.route || this.redirect || "/"}).catch(() => {
});
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
}).catch(() => {
this.loading = false;
if (this.captchaEnabled) {
@ -216,18 +153,12 @@ export default {
});
}
});
},
changeStation(stationId){
let station = this.options.find(v=>v.stationId === stationId)
this.loginForm.stationCode = station.stationCode;
}
}
};
</script>
<style lang="scss" rel="stylesheet/scss">
<style rel="stylesheet/scss" lang="scss">
.login {
display: flex;
justify-content: center;
@ -236,7 +167,6 @@ export default {
background-image: url("../assets/images/login-background.jpg");
background-size: cover;
}
.title {
margin: 0px auto 30px auto;
text-align: center;
@ -248,39 +178,32 @@ export default {
background: #ffffff;
width: 400px;
padding: 25px 25px 5px 25px;
.el-input {
height: 38px;
input {
height: 38px;
}
}
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
.login-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
.login-code {
width: 33%;
height: 38px;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}
}
.el-login-footer {
height: 40px;
line-height: 40px;
@ -293,7 +216,6 @@ export default {
font-size: 12px;
letter-spacing: 1px;
}
.login-code-img {
height: 38px;
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save