Merge branch 'language'
This commit is contained in:
10
nladmin-ui/src/api/i18n.js
Normal file
10
nladmin-ui/src/api/i18n.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
// 国际化开发:3。增加文件获取接口
|
||||
export function fetchMessages(locale) {
|
||||
return request({
|
||||
url: '/api/language/js/' + locale,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export default { fetchMessages }
|
||||
@@ -1,27 +1,19 @@
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import locale from 'element-ui/lib/locale'
|
||||
import zh from './langs/chinese'
|
||||
import en from './langs/english'
|
||||
import indonesian from './langs/indonesian'
|
||||
// 国际化开发:5。i18n index文件修改
|
||||
Vue.use(VueI18n)
|
||||
const messages = {
|
||||
en: {
|
||||
...en
|
||||
},
|
||||
zh: {
|
||||
...zh
|
||||
},
|
||||
in: {
|
||||
...indonesian
|
||||
}
|
||||
}
|
||||
|
||||
// 准备默认的语言环境消息(可以是空对象,也可以是一些基本消息)
|
||||
const defaultLocale = 'zh'
|
||||
const fallbackLocale = 'zh'
|
||||
|
||||
// 创建i18n实例
|
||||
const i18n = new VueI18n({
|
||||
locale: localStorage.lang || 'zh',
|
||||
messages,
|
||||
locale: defaultLocale, // 设置当前语言
|
||||
fallbackLocale, // 设置回退语言
|
||||
silentTranslationWarn: true, // 解决vue-i18n黄色警告"value of key 'xxx' is not a string"和"cannot translate the value of keypath 'xxx'.use the value of keypath as default",可忽略
|
||||
globalInjection: true, // 全局注入
|
||||
fallbackLocale: 'zh'
|
||||
globalInjection: true,
|
||||
messages: {} // 初始化为空,稍后从接口获取
|
||||
})
|
||||
locale.i18n((key, value) => i18n.t(key, value))
|
||||
export default i18n
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
|
||||
import zh from './zh-CN'
|
||||
import menu from '../../views/system/menu/locale/zh'
|
||||
import param from '../../views/system/param/locale/zh'
|
||||
import user from '../../views/system/user/locale/zh'
|
||||
import scheduler from '../../views/system/timing/locale/zh'
|
||||
import dept from '../../views/system/dept/locale/zh'
|
||||
import dict from '../../views/system/dict/locale/zh'
|
||||
import redis from '../../views/system/redis/locale/zh'
|
||||
import log from '../../views/monitor/log/locale/zh'
|
||||
import notice from '../../views/system/notice/locale/zh'
|
||||
import errorLog from '../../views/monitor/log/locale/error/zh'
|
||||
import online from '../../views/monitor/online/locale/zh'
|
||||
import role from '../../views/system/role/locale/zh'
|
||||
import corn from '../../views/system/timing/locale/corn/zh'
|
||||
import codegen from '../../views/tools/codeGen/locale/zh'
|
||||
import storage from '../../views/tools/storage/locale/zh'
|
||||
|
||||
export default {
|
||||
...zhLocale,
|
||||
...zh,
|
||||
...menu,
|
||||
...param,
|
||||
...user,
|
||||
...scheduler,
|
||||
...dept,
|
||||
...dict,
|
||||
...redis,
|
||||
...log,
|
||||
...notice,
|
||||
...errorLog,
|
||||
...online,
|
||||
...role,
|
||||
...corn,
|
||||
...codegen,
|
||||
...storage
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
export default {
|
||||
'lang': 'English',
|
||||
// 平台
|
||||
'platform': {
|
||||
'title': 'NOBLELIFT Platform',
|
||||
'tip1': 'The user name cannot be empty',
|
||||
'tip2': 'The password cannot be empty',
|
||||
'tip3': 'The verification code cannot be empty'
|
||||
},
|
||||
'common': {
|
||||
'home': 'Dashboard',
|
||||
'Layout_setting': 'Layout Setting',
|
||||
'Personal_center': 'Personal Center',
|
||||
'Log_out': 'Log Out',
|
||||
'Personal_information': 'Personal Information',
|
||||
'username': 'UserName',
|
||||
'name': 'Name',
|
||||
'phone': 'Phone Number',
|
||||
'phone2': 'Phone',
|
||||
'sex': 'Sex',
|
||||
'sex_male': 'Male',
|
||||
'sex_female': 'Female',
|
||||
'email': 'E-mail',
|
||||
'Security_settings': 'Security Settings',
|
||||
'Save_settings': 'Save Settings',
|
||||
'Reset_settings': 'Reset Settings',
|
||||
'Change_password': 'Change Password',
|
||||
'New_password': 'New Password',
|
||||
'Old_password': 'Old Password',
|
||||
'Verify_password': 'Verify Password',
|
||||
'User_information': 'User Information',
|
||||
'Operation_log': 'Operation Log',
|
||||
'action': 'Action',
|
||||
'IP_source': 'IP Source',
|
||||
'Browser': 'Browser',
|
||||
'Request_time': 'Request Time',
|
||||
'Creation_date': 'Creation Date',
|
||||
'account': 'Account',
|
||||
'password': 'Password',
|
||||
'verification_code': 'Code',
|
||||
'login_rm': 'Remember Me',
|
||||
'login': 'Login',
|
||||
'login_ing': 'Logging in...',
|
||||
'Create': 'Create',
|
||||
'Update': 'Update',
|
||||
'Delete': 'Delete',
|
||||
'More': 'More',
|
||||
'Export': 'Export',
|
||||
'Editors': 'Editor',
|
||||
'SelectAll': 'SelectAll',
|
||||
'Query': 'Query',
|
||||
'Reset': 'Reset',
|
||||
'Confirm': 'Confirm',
|
||||
'Cancel': 'Cancel',
|
||||
'Yes': 'YES',
|
||||
'No': 'NO',
|
||||
'Success': 'success',
|
||||
'Fail': 'fail',
|
||||
'Please_select': 'Please Select',
|
||||
'Operation_success': 'Successful operation',
|
||||
'Upload_success': 'Upload Success',
|
||||
'Operate': 'Operate',
|
||||
'Refresh': 'Refresh',
|
||||
'Closes': 'Close',
|
||||
'Closes_l': 'Close Left',
|
||||
'Closes_r': 'Close Right',
|
||||
'Closes_o': 'Close Other',
|
||||
'Closes_a': 'Close All',
|
||||
'Theme_style_setting': 'Theme Style Setting',
|
||||
'Theme_color': 'Theme Color',
|
||||
'System_layout_configuration': 'System Layout Configuration',
|
||||
'Open': 'Open',
|
||||
'Fixation': 'Fixation',
|
||||
'Display': 'Display',
|
||||
'Dynamic_titles': 'Dynamic Titles',
|
||||
'crudTip': 'Are you sure to delete this data?',
|
||||
'startDate': 'StartDate',
|
||||
'endDate': 'EndDate',
|
||||
'moreMenu': 'MoreMenu',
|
||||
'browses': 'browse',
|
||||
'fz': 'Full screen zoom',
|
||||
'submit': 'Submit Success',
|
||||
'add': 'Add Success',
|
||||
'edit': 'Edit Success',
|
||||
'del': 'Delete Success',
|
||||
'close': 'Confirm Close',
|
||||
'save': 'Save Success',
|
||||
'datas': 'Data',
|
||||
'Tips': 'Tips',
|
||||
'Tip1': 'Confirm to delete the selected {count} pieces of data?',
|
||||
'Tip3': 'User name not used as login',
|
||||
'Tip4': 'Mobile phone number cannot be duplicate',
|
||||
'Tip5': 'Please enter a phone number',
|
||||
'Tip6': 'Please enter the correct 11 digit phone number',
|
||||
'Tip7': 'Drag and drop the excel file here or',
|
||||
'Tip8': 'The two passwords are different',
|
||||
'Tip9': 'Please enter your password again',
|
||||
'Tip10': 'Please enter your old password',
|
||||
'Tip11': 'Please enter your new password',
|
||||
'Tip12': '{min} to {max} characters in length',
|
||||
'Tip13': 'Are you sure to log out and exit the system?',
|
||||
'Tip14': 'WebSocket connection error',
|
||||
'Tip15': 'Please enter an icon name',
|
||||
'Tip16': 'NOT NULL',
|
||||
'Tip17': 'Please enter what you are searching for',
|
||||
'loading': 'loading...',
|
||||
'Tip18': 'select date time',
|
||||
'Tip19': 'Are you sure to delete the selected data?',
|
||||
'Tip20': 'The login has expired,please log in again!'
|
||||
},
|
||||
'WorkOrder': {
|
||||
'form': {
|
||||
'WorkOrderCode': 'WorkOrderCode'
|
||||
},
|
||||
'placeholder': {
|
||||
'WorkOrderCode': 'Please enter the code'
|
||||
}
|
||||
},
|
||||
'monitor': {
|
||||
'sys': 'System',
|
||||
'day': 'Running Day',
|
||||
'status': 'Status',
|
||||
'core': 'Core',
|
||||
'cpu': 'CPU Utilization',
|
||||
'memory': 'Memory Utilization',
|
||||
'tality': 'Tality',
|
||||
'used': 'Used',
|
||||
'leisure': 'Leisure',
|
||||
'exchange': 'Exchange Utilization',
|
||||
'disk': 'Disk Utilization',
|
||||
'cpu_monitoring': 'Cpu Utilization Monitoring',
|
||||
'memory_monitoring': 'Memory Utilization Monitoring'
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
import enLocale from 'element-ui/lib/locale/lang/en'
|
||||
import en from './en'
|
||||
import menu from '../../views/system/menu/locale/en'
|
||||
import param from '../../views/system/param/locale/en'
|
||||
import user from '../../views/system/user/locale/en'
|
||||
import scheduler from '../../views/system/timing/locale/en'
|
||||
import dept from '../../views/system/dept/locale/en'
|
||||
import dict from '../../views/system/dict/locale/en'
|
||||
import redis from '../../views/system/redis/locale/en'
|
||||
import log from '../../views/monitor/log/locale/en'
|
||||
import notice from '../../views/system/notice/locale/en'
|
||||
import errorLog from '../../views/monitor/log/locale/error/en'
|
||||
import online from '../../views/monitor/online/locale/en'
|
||||
import role from '../../views/system/role/locale/en'
|
||||
import corn from '../../views/system/timing/locale/corn/en'
|
||||
import codegen from '../../views/tools/codeGen/locale/en'
|
||||
import storage from '../../views/tools/storage/locale/en'
|
||||
|
||||
export default {
|
||||
...enLocale,
|
||||
...en,
|
||||
...menu,
|
||||
...param,
|
||||
...user,
|
||||
...scheduler,
|
||||
...dept,
|
||||
...dict,
|
||||
...redis,
|
||||
...log,
|
||||
...notice,
|
||||
...errorLog,
|
||||
...online,
|
||||
...role,
|
||||
...corn,
|
||||
...codegen,
|
||||
...storage
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
export default {
|
||||
'lang': 'in',
|
||||
// 平台
|
||||
'platform': {
|
||||
'title': 'NOBLELIFT Platform',
|
||||
'tip1': 'Nama pengguna tidak dapat kosong',
|
||||
'tip2': 'Kata sandi tidak dapat kosong',
|
||||
'tip3': 'Kode verifikasi tidak dapat kosong'
|
||||
},
|
||||
'common': {
|
||||
'home': 'rumah', // 首页
|
||||
'Layout_setting': 'Pengaturan Bentangan',
|
||||
'Personal_center': 'Pusat Pribadi',
|
||||
'Log_out': 'Log Out',
|
||||
'Personal_information': 'Informasi Pribadi',
|
||||
'username': 'Nama Pengguna',
|
||||
'name': 'Nama',
|
||||
'phone': 'Nomor Ponsel',
|
||||
'phone2': 'Ponsel',
|
||||
'sex': 'Gender',
|
||||
'sex_male': 'laki-laki',
|
||||
'sex_female': 'wanita',
|
||||
'email': 'E-mail',
|
||||
'Security_settings': 'Pengaturan Keamanan',
|
||||
'Save_settings': 'Simpan Pengaturan',
|
||||
'Reset_settings': 'Reset pengaturan',
|
||||
'Change_password': 'Ubah kata sandi',
|
||||
'New_password': 'Kata sandi baru',
|
||||
'Old_password': 'Kata sandi lama',
|
||||
'Verify_password': 'Konfirmasi Sandi',
|
||||
'User_information': 'Informasi Pengguna',
|
||||
'Operation_log': 'Log Operasi',
|
||||
'action': 'Perilaku',
|
||||
'Browser': 'Pelayar',
|
||||
'IP_source': 'IP Sumber',
|
||||
'Request_time': 'Meminta Konsumsi Waktu',
|
||||
'Creation_date': 'Dicipta Pada',
|
||||
'account': 'Akaun',
|
||||
'password': 'Sandi',
|
||||
'verification_code': 'Kode',
|
||||
'login_rm': 'Ingat aku',
|
||||
'login': 'Login',
|
||||
'login_ing': 'Daftar masuk',
|
||||
'Create': 'Buat',
|
||||
'Update': 'Kemaskini',
|
||||
'Delete': 'Hapus',
|
||||
'More': 'Lebih',
|
||||
'Export': 'Ekspor',
|
||||
'Editors': 'Editor',
|
||||
'SelectAll': 'Pilih Semua',
|
||||
'Query': 'Pertanyaan',
|
||||
'Reset': 'Reset',
|
||||
'Confirm': 'konfirmasi',
|
||||
'Cancel': 'Batalkan',
|
||||
'Yes': 'Ya',
|
||||
'No': 'Tidak',
|
||||
'Success': 'sukses',
|
||||
'Fail': 'gagal',
|
||||
'Please_select': 'Silakan pilih',
|
||||
'Operation_success': 'Operasi berhasil',
|
||||
'Upload_success': 'Unggah Berhasil',
|
||||
'Operate': 'Operasi',
|
||||
'Refresh': 'Segar',
|
||||
'Closes': 'Tutup',
|
||||
'Closes_l': 'Tutup Sisi Kiri',
|
||||
'Closes_r': 'Tutup Sisi Kanan',
|
||||
'Closes_o': 'Tutup Lain',
|
||||
'Closes_a': 'Tutup Semua',
|
||||
'Theme_style_setting': 'Pengaturan Gaya Tema',
|
||||
'Theme_color': 'Warna Tema',
|
||||
'System_layout_configuration': 'Konfigurasi layout sistem',
|
||||
'Open': 'Buka',
|
||||
'Fixation': 'Tetap',
|
||||
'Display': 'Tampilan',
|
||||
'Dynamic_titles': 'Tajuk Dinamik',
|
||||
'crudTip': 'Apakah Anda yakin untuk menghapus data ini?',
|
||||
'startDate': 'TarikhAwal',
|
||||
'endDate': 'TarikhAkhir',
|
||||
'moreMenu': 'LebihBanyakMenu',
|
||||
'browses': 'melayar',
|
||||
'fz': 'Zum layar penuh',
|
||||
'submit': 'Mengirim Sukses',
|
||||
'add': 'Tambah Sukses',
|
||||
'edit': 'Sunting Sukses',
|
||||
'del': 'Hapus Sukses',
|
||||
'close': 'Konfirmasi Tutup',
|
||||
'save': 'Simpan Sukses',
|
||||
'datas': 'Data',
|
||||
'Tips': 'Prompt',
|
||||
'Tip1': 'Konfirmasikan untuk menghapus {count} data yang dipilih?',
|
||||
'Tip3': 'Nama pengguna tidak digunakan sebagai daftar masuk',
|
||||
'Tip4': 'Nomor telepon ponsel tidak dapat duplikasi',
|
||||
'Tip5': 'Silakan masukkan nomor telepon',
|
||||
'Tip6': 'Silakan masukkan nomor telepon 11 digit yang benar',
|
||||
'Tip7': 'Seret dan jatuhkan berkas Excel di sini atau',
|
||||
'Tip8': 'Kata sandi yang dimasukkan dua kali tidak cocok',
|
||||
'Tip9': 'Silakan masukkan sandi lagi',
|
||||
'Tip10': 'Silakan masukkan kata sandi lama Anda',
|
||||
'Tip11': 'Silakan masukkan sandi baru',
|
||||
'Tip12': 'Antara {min} dan {max} karakter dalam panjang',
|
||||
'Tip13': 'Apakah Anda yakin untuk log keluar dan keluar dari sistem?',
|
||||
'Tip14': 'Koneksi WebSocket error',
|
||||
'Tip15': 'Silakan masukkan nama ikon',
|
||||
'Tip16': 'TIDAK NULL',
|
||||
'Tip17': 'Silakan masukkan apa yang Anda cari',
|
||||
'loading': 'Memuatkan Data...',
|
||||
'Tip18': 'pilih tanggal waktu',
|
||||
'Tip19': 'Apakah Anda yakin untuk menghapus data yang dipilih?',
|
||||
'Tip20': 'Log masuk telah habis,silakan log masuk lagi!'
|
||||
},
|
||||
'WorkOrder': {
|
||||
'form': {
|
||||
'WorkOrderCode': 'Kode Perintah Kerja'
|
||||
},
|
||||
'placeholder': {
|
||||
'WorkOrderCode': 'Silakan masukkan kode perintah kerja'
|
||||
}
|
||||
},
|
||||
'monitor': {
|
||||
'sys': 'Sistem',
|
||||
'day': 'Proyek ini telah berjalan terus menerus',
|
||||
'status': 'Keadaan',
|
||||
'core': 'Inti',
|
||||
'cpu': 'Kadar penggunaan CPU',
|
||||
'memory': 'Kadar penggunaan ingatan',
|
||||
'tality': 'Total',
|
||||
'used': 'Digunakan',
|
||||
'leisure': 'Bebas',
|
||||
'exchange': 'Kadar penggunaan area pertukaran',
|
||||
'disk': 'Kadar penggunaan disk',
|
||||
'cpu_monitoring': 'Monitor penggunaan CPU',
|
||||
'memory_monitoring': 'Monitor penggunaan memori'
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
import idLocale from 'element-ui/lib/locale/lang/id'
|
||||
import id from './in'
|
||||
import menu from '../../views/system/menu/locale/in'
|
||||
import param from '../../views/system/param/locale/in'
|
||||
import user from '../../views/system/user/locale/in'
|
||||
import scheduler from '../../views/system/timing/locale/in'
|
||||
import dept from '../../views/system/dept/locale/in'
|
||||
import dict from '../../views/system/dict/locale/in'
|
||||
import redis from '../../views/system/redis/locale/in'
|
||||
import log from '../../views/monitor/log/locale/in'
|
||||
import notice from '../../views/system/notice/locale/in'
|
||||
import errorLog from '../../views/monitor/log/locale/error/in'
|
||||
import online from '../../views/monitor/online/locale/in'
|
||||
import role from '../../views/system/role/locale/in'
|
||||
import corn from '../../views/system/timing/locale/corn/in'
|
||||
import codegen from '../../views/tools/codeGen/locale/in'
|
||||
import storage from '../../views/tools/storage/locale/in'
|
||||
|
||||
export default {
|
||||
...idLocale,
|
||||
...id,
|
||||
...menu,
|
||||
...param,
|
||||
...user,
|
||||
...scheduler,
|
||||
...dept,
|
||||
...dict,
|
||||
...redis,
|
||||
...log,
|
||||
...notice,
|
||||
...errorLog,
|
||||
...online,
|
||||
...role,
|
||||
...corn,
|
||||
...codegen,
|
||||
...storage
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
export default {
|
||||
'lang': 'zh',
|
||||
// 平台
|
||||
'platform': {
|
||||
'title': '富佳WMS',
|
||||
'tip1': '用户名不能为空',
|
||||
'tip2': '密码不能为空',
|
||||
'tip3': '验证码不能为空'
|
||||
},
|
||||
'common': {
|
||||
'home': '首页', // 首页
|
||||
'Layout_setting': '布局设置',
|
||||
'Personal_center': '个人中心',
|
||||
'Log_out': '退出登录',
|
||||
'Personal_information': '个人信息',
|
||||
'username': '用户姓名',
|
||||
'name': '姓名',
|
||||
'phone': '手机号码',
|
||||
'phone2': '手机号',
|
||||
'sex': '性别',
|
||||
'sex_male': '男',
|
||||
'sex_female': '女',
|
||||
'email': '用户邮箱',
|
||||
'Security_settings': '安全设置',
|
||||
'Save_settings': '保存配置',
|
||||
'Reset_settings': '重置配置',
|
||||
'Change_password': '修改密码',
|
||||
'New_password': '新密码',
|
||||
'Old_password': '旧密码',
|
||||
'Verify_password': '确认密码',
|
||||
'User_information': '用户资料',
|
||||
'Operation_log': '操作日志',
|
||||
'action': '行为',
|
||||
'IP_source': 'IP来源',
|
||||
'Browser': '浏览器',
|
||||
'Request_time': '请求耗时',
|
||||
'Creation_date': '创建日期',
|
||||
'account': '账号',
|
||||
'password': '密码',
|
||||
'verification_code': '验证码',
|
||||
'login_rm': '记住我',
|
||||
'login': '登 录',
|
||||
'login_ing': '登 录 中...',
|
||||
'Create': '新增',
|
||||
'Update': '修改',
|
||||
'Delete': '删除',
|
||||
'More': '更多',
|
||||
'Export': '导出',
|
||||
'Editors': '编辑',
|
||||
'SelectAll': '全选',
|
||||
'Query': '查询',
|
||||
'Reset': '重置',
|
||||
'Confirm': '确认',
|
||||
'Cancel': '取消',
|
||||
'Yes': '是',
|
||||
'No': '否',
|
||||
'Success': '成功',
|
||||
'Fail': '失败',
|
||||
'Please_select': '请选择',
|
||||
'Operation_success': '操作成功',
|
||||
'Upload_success': '上传成功',
|
||||
'Operate': '操作',
|
||||
'Refresh': '刷新',
|
||||
'Closes': '关闭',
|
||||
'Closes_l': '关闭左侧',
|
||||
'Closes_r': '关闭右侧',
|
||||
'Closes_o': '关闭其他',
|
||||
'Closes_a': '关闭全部',
|
||||
'Theme_style_setting': '主题风格设置',
|
||||
'Theme_color': '主题颜色',
|
||||
'System_layout_configuration': '系统布局配置',
|
||||
'Open': '开启',
|
||||
'Fixation': '固定',
|
||||
'Display': '显示',
|
||||
'Dynamic_titles': '动态标题',
|
||||
'crudTip': '确定删除本条数据吗?',
|
||||
'startDate': '开始日期',
|
||||
'endDate': '结束日期',
|
||||
'moreMenu': '更多菜单',
|
||||
'browses': '浏览',
|
||||
'fz': '全屏缩放',
|
||||
'submit': '提交成功',
|
||||
'add': '新增成功',
|
||||
'edit': '编辑成功',
|
||||
'del': '删除成功',
|
||||
'close': '确认关闭',
|
||||
'save': '保存成功',
|
||||
'datas': '数据',
|
||||
'Tips': '提示',
|
||||
'Tip1': '确认删除选中的{count}条数据?',
|
||||
'Tip3': '用户姓名不作为登录使用',
|
||||
'Tip4': '手机号码不能重复',
|
||||
'Tip5': '请输入电话号码',
|
||||
'Tip6': '请输入正确的11位手机号码',
|
||||
'Tip7': '拖拽excel文件到此处 或者',
|
||||
'Tip8': '两次输入的密码不一致',
|
||||
'Tip9': '请再次输入密码',
|
||||
'Tip10': '请输入旧密码',
|
||||
'Tip11': '请输入新密码',
|
||||
'Tip12': '长度在 {min} 到 {max} 个字符',
|
||||
'Tip13': '确定注销并退出系统吗?',
|
||||
'Tip14': 'WebSocket连接发生错误',
|
||||
'Tip15': '请输入图标名称',
|
||||
'Tip16': '不能为空',
|
||||
'Tip17': '请输入你要搜索的内容',
|
||||
'loading': '数据加载中...',
|
||||
'Tip18': '选择日期时间',
|
||||
'Tip19': '你确定删除选中的数据吗?',
|
||||
'Tip20': '当前登录状态已过期,请重新登录!'
|
||||
},
|
||||
'WorkOrder': {
|
||||
'form': {
|
||||
'WorkOrderCode': '工单编码'
|
||||
},
|
||||
'placeholder': {
|
||||
'WorkOrderCode': '请输入工单编码'
|
||||
}
|
||||
},
|
||||
'monitor': {
|
||||
'sys': '系统',
|
||||
'day': '项目已不间断运行',
|
||||
'status': '状态',
|
||||
'cpu': 'CPU使用率',
|
||||
'core': '核心',
|
||||
'memory': '内存使用率',
|
||||
'tality': '总量',
|
||||
'used': '已使用',
|
||||
'leisure': '空闲',
|
||||
'exchange': '交换区使用率',
|
||||
'disk': '磁盘使用率',
|
||||
'cpu_monitoring': 'CPU使用率监控',
|
||||
'memory_monitoring': '内存使用率监控'
|
||||
}
|
||||
}
|
||||
@@ -50,10 +50,11 @@
|
||||
<span class="el-dropdown-link" style="font-size: 18px">
|
||||
{{ language }} <i class="el-icon-caret-bottom" />
|
||||
</span>
|
||||
<!-- 国际化开发:1.修改语言列表-->
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item divided command="zh">简体中文</el-dropdown-item>
|
||||
<el-dropdown-item divided command="en">English</el-dropdown-item>
|
||||
<el-dropdown-item divided command="in">Indonesian</el-dropdown-item>
|
||||
<el-dropdown-item divided command="vi">Vietnamese</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
@@ -137,13 +138,14 @@ export default {
|
||||
this.setLang(command)
|
||||
location.reload()
|
||||
},
|
||||
// 国际化开发:2.设置
|
||||
setLang(command) {
|
||||
if (command === 'en') {
|
||||
this.language = 'English'
|
||||
} else if (command === 'zh') {
|
||||
this.language = '简体中文'
|
||||
} else if (command === 'in') {
|
||||
this.language = 'Indonesian'
|
||||
} else if (command === 'vi') {
|
||||
this.language = 'Vietnamese'
|
||||
}
|
||||
},
|
||||
toggleSideBar() {
|
||||
|
||||
@@ -33,7 +33,11 @@ import './router/index' // permission control
|
||||
import 'echarts-gl'
|
||||
|
||||
import 'jquery'
|
||||
|
||||
// add-xy start
|
||||
import { fetchMessages } from '@/api/i18n' // 有一个API模块来获取语言文件
|
||||
// 当前语言,可以从本地存储、用户设置或URL参数中获取
|
||||
const currentLocale = localStorage.getItem('lang')
|
||||
// add-xy end
|
||||
// 全局引入LogicFlow
|
||||
import LogicFlow from '@logicflow/core'
|
||||
import { Menu } from '@logicflow/extension'
|
||||
@@ -100,3 +104,12 @@ new Vue({
|
||||
i18n,
|
||||
render: h => h(App)
|
||||
})
|
||||
|
||||
// add-xy start
|
||||
// 国际化开发:3.调用接口异步获取语言文件,增加api文件
|
||||
fetchMessages(currentLocale).then(messages => {
|
||||
// 将获取到的消息设置到i18n实例
|
||||
i18n.setLocaleMessage(currentLocale, messages.content)
|
||||
// 设置当前语言
|
||||
i18n.locale = currentLocale
|
||||
})
|
||||
|
||||
@@ -42,7 +42,7 @@ export const constantRouterMap = [
|
||||
path: 'dashboard',
|
||||
component: (resolve) => require(['@/views/system/redis/index'], resolve),
|
||||
name: 'Dashboard',
|
||||
meta: { title: i18n.t('menu.home'), icon: 'index', affix: true, noCache: true }
|
||||
meta: { title: i18n.t('common.home'), icon: 'index', affix: true, noCache: true }
|
||||
// meta: { title: '首页', icon: 'index', affix: true, noCache: true }
|
||||
}
|
||||
]
|
||||
|
||||
@@ -28,14 +28,15 @@
|
||||
</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-dropdown style="display: flex; justify-content: right; color: #409EFF;" trigger="click" @command="langChange">
|
||||
<el-dropdown style="display: flex; justify-content: right; color: #409EFF;" trigger="click" @command="changeLanguage">
|
||||
<span class="el-dropdown-link">
|
||||
{{ language }}
|
||||
</span>
|
||||
<!-- 国际化开发:1.修改语言列表-->
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item divided command="zh">简体中文</el-dropdown-item>
|
||||
<el-dropdown-item divided command="en">English</el-dropdown-item>
|
||||
<el-dropdown-item divided command="in">Indonesian</el-dropdown-item>
|
||||
<el-dropdown-item divided command="vi">Vietnamese</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-col>
|
||||
@@ -63,6 +64,7 @@ import { getCodeImg } from '@/api/login'
|
||||
import Cookies from 'js-cookie'
|
||||
import Background from '@/assets/images/background.jpg'
|
||||
import i18n from '@/i18n'
|
||||
import { fetchMessages } from '@/api/i18n'
|
||||
export default {
|
||||
name: 'Login',
|
||||
data() {
|
||||
@@ -108,19 +110,33 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 中英文切换
|
||||
// 语言切换-x
|
||||
async changeLanguage(locale) {
|
||||
// 如果已经加载过该语言,可以直接设置,避免重复请求
|
||||
if (!this.$i18n.getLocaleMessage(locale)) {
|
||||
const messages = await fetchMessages(locale)
|
||||
this.$i18n.setLocaleMessage(locale, messages.content)
|
||||
}
|
||||
this.$i18n.locale = locale
|
||||
// 可以将当前语言保存到本地存储,以便下次使用
|
||||
localStorage.setItem('lang', locale)
|
||||
this.setLang(locale)
|
||||
location.reload()
|
||||
},
|
||||
langChange(command) {
|
||||
this.$i18n.locale = command
|
||||
localStorage.setItem('lang', command)
|
||||
this.setLang(command)
|
||||
location.reload()
|
||||
},
|
||||
// 国际化开发:2.设置
|
||||
setLang(command) {
|
||||
if (command === 'en') {
|
||||
this.language = 'English'
|
||||
} else if (command === 'zh') {
|
||||
this.language = '简体中文'
|
||||
} else if (command === 'in') {
|
||||
this.language = 'Indonesian'
|
||||
} else if (command === 'vi') {
|
||||
this.language = 'Vietnamese'
|
||||
}
|
||||
},
|
||||
getCode() {
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
src="/screen/index.html"
|
||||
width="100%"
|
||||
height="100%"
|
||||
frameborder="0"
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
frameBorder="0"
|
||||
allowFullScreen
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
import ECharts from 'vue-echarts'
|
||||
import 'echarts/lib/chart/line'
|
||||
import 'echarts/lib/component/polar'
|
||||
|
||||
export default {
|
||||
name: 'ServerMonitor',
|
||||
components: {
|
||||
@@ -94,12 +95,12 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
/* this.init()
|
||||
this.init()
|
||||
this.monitor = window.setInterval(() => {
|
||||
setTimeout(() => {
|
||||
this.init()
|
||||
}, 2)
|
||||
}, 3500)*/
|
||||
}, 3500)
|
||||
},
|
||||
destroyed() {
|
||||
clearInterval(this.monitor)
|
||||
@@ -126,41 +127,47 @@ export default {
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .box-card {
|
||||
margin-bottom: 5px;
|
||||
span {
|
||||
margin-right: 28px;
|
||||
}
|
||||
.el-icon-refresh {
|
||||
margin-right: 10px;
|
||||
float: right;
|
||||
cursor:pointer;
|
||||
}
|
||||
::v-deep .box-card {
|
||||
margin-bottom: 5px;
|
||||
|
||||
span {
|
||||
margin-right: 28px;
|
||||
}
|
||||
.cpu, .memory, .swap, .disk {
|
||||
width: 20%;
|
||||
float: left;
|
||||
padding-bottom: 20px;
|
||||
margin-right: 5%;
|
||||
}
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.footer {
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
margin-top: -5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.content {
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
|
||||
.el-icon-refresh {
|
||||
margin-right: 10px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.cpu, .memory, .swap, .disk {
|
||||
width: 20%;
|
||||
float: left;
|
||||
padding-bottom: 20px;
|
||||
margin-right: 5%;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
margin-top: -5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,267 +1,173 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="24" class="card-box">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span>{{ $t('Redis.title1') }}</span>
|
||||
</div>
|
||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
||||
<table cellspacing="0" style="width: 100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><div class="cell">{{ $t('Redis.redis_version') }}:</div></td>
|
||||
<td><div v-if="cache.info" class="cell">{{ cache.info.redis_version }}</div></td>
|
||||
<td><div class="cell">{{ $t('Redis.redis_mode') }}:</div></td>
|
||||
<td><div v-if="cache.info" class="cell">{{ cache.info.redis_mode == "standalone" ? $t('Redis.standalone') : $t('Redis.cluster') }}</div></td>
|
||||
<td><div class="cell">{{ $t('Redis.tcp_port') }}:</div></td>
|
||||
<td><div v-if="cache.info" class="cell">{{ cache.info.tcp_port }}</div></td>
|
||||
<td><div class="cell">{{ $t('Redis.connected_clients') }}:</div></td>
|
||||
<td><div v-if="cache.info" class="cell">{{ cache.info.connected_clients }}</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div class="cell">{{ $t('Redis.running') }}:</div></td>
|
||||
<td><div v-if="cache.info" class="cell">{{ cache.info.uptime_in_days }}</div></td>
|
||||
<td><div class="cell">{{ $t('Redis.memory_use') }}:</div></td>
|
||||
<td><div v-if="cache.info" class="cell">{{ cache.info.used_memory_human }}</div></td>
|
||||
<td><div class="cell">{{ $t('Redis.cpu') }}:</div></td>
|
||||
<td><div v-if="cache.info" class="cell">{{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }}</div></td>
|
||||
<td><div class="cell">{{ $t('Redis.memory') }}:</div></td>
|
||||
<td><div v-if="cache.info" class="cell">{{ cache.info.maxmemory_human }}</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div class="cell">{{ $t('Redis.AOF') }}:</div></td>
|
||||
<td><div v-if="cache.info" class="cell">{{ cache.info.aof_enabled === "0" ? $t('common.No') : $t('common.Yes') }}</div></td>
|
||||
<td><div class="cell">{{ $t('Redis.RDB') }}:</div></td>
|
||||
<td><div v-if="cache.info" class="cell">{{ cache.info.rdb_last_bgsave_status }}</div></td>
|
||||
<td><div class="cell">{{ $t('Redis.keys') }}:</div></td>
|
||||
<td><div v-if="cache.dbSize" class="cell">{{ cache.dbSize }} </div></td>
|
||||
<td><div class="cell">{{ $t('Redis.io') }}:</div></td>
|
||||
<td><div v-if="cache.info" class="cell">{{ cache.info.instantaneous_input_kbps }}kps/{{ cache.info.instantaneous_output_kbps }}kps</div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="card-box">
|
||||
<el-card>
|
||||
<div slot="header"><span>{{ $t('Redis.left_title') }}</span></div>
|
||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
||||
<div ref="commandstats" style="height: 420px" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="card-box">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span>{{ $t('Redis.right_title') }}</span>
|
||||
</div>
|
||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
||||
<div ref="usedmemory" style="height: 420px" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="card-box">
|
||||
<el-card>
|
||||
<el-button size="mini" :disabled="delBtlStatu" type="danger" style="margin-bottom: 10px" @click="batchDel">
|
||||
{{ $t('Redis.batch_del') }}</el-button>
|
||||
<el-table
|
||||
:data="keyAndValues"
|
||||
row-key="id"
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column prop="key" label="Key" width="200" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="dataType" :label="$t('Redis.key_type')" width="100" />
|
||||
<el-table-column prop="value" :label="$t('Redis.value2')" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="expire" :label="$t('Redis.expiration')" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-tag>
|
||||
<span v-if="scope.row.expire === -1">
|
||||
{{ $t('Redis.no_expired') }}
|
||||
</span>
|
||||
<span v-else-if="scope.row.expire === -2">
|
||||
{{ $t('Redis.expired') }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ scope.row.expire }}{{ $t('Redis.unit') }}
|
||||
</span>
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('common.Operate')" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" @click="clearRedisData(scope.row)">{{ $t('Redis.clear') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="height:1000px">
|
||||
<iframe
|
||||
src="/screen/index.html"
|
||||
width="100%"
|
||||
height="100%"
|
||||
frameBorder="0"
|
||||
allowFullScreen
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCache, getKeyDefineList, getKeyValueList, batch } from '@/views/system/redis/redis'
|
||||
import echarts from 'echarts'
|
||||
import i18n from '@/i18n'
|
||||
import ECharts from 'vue-echarts'
|
||||
import 'echarts/lib/chart/line'
|
||||
import 'echarts/lib/component/polar'
|
||||
|
||||
export default {
|
||||
name: 'Redis',
|
||||
name: 'ServerMonitor',
|
||||
components: {
|
||||
'v-chart': ECharts
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 统计命令信息
|
||||
commandstats: null,
|
||||
// 使用内存
|
||||
usedmemory: null,
|
||||
// cache 信息
|
||||
cache: [],
|
||||
// key 列表
|
||||
keyDefineListLoad: true,
|
||||
keyDefineList: [],
|
||||
// 模块弹出框
|
||||
open: false,
|
||||
keyTemplate: '',
|
||||
cacheKeys: [],
|
||||
cacheForm: {},
|
||||
keyAndValues: [],
|
||||
multipleSelection: [], // 多选数据
|
||||
delBtlStatu: true
|
||||
show: false,
|
||||
monitor: null,
|
||||
url: 'api/monitor',
|
||||
data: {},
|
||||
cpuInfo: {
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: []
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
min: 0,
|
||||
max: 100,
|
||||
interval: 20
|
||||
},
|
||||
series: [{
|
||||
data: [],
|
||||
type: 'line',
|
||||
areaStyle: {
|
||||
normal: {
|
||||
color: 'rgb(32, 160, 255)' // 改变区域颜色
|
||||
}
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#6fbae1',
|
||||
lineStyle: {
|
||||
color: '#6fbae1' // 改变折线颜色
|
||||
}
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
memoryInfo: {
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: []
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
min: 0,
|
||||
max: 100,
|
||||
interval: 20
|
||||
},
|
||||
series: [{
|
||||
data: [],
|
||||
type: 'line',
|
||||
areaStyle: {
|
||||
normal: {
|
||||
color: 'rgb(32, 160, 255)' // 改变区域颜色
|
||||
}
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#6fbae1',
|
||||
lineStyle: {
|
||||
color: '#6fbae1' // 改变折线颜色
|
||||
}
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.init()
|
||||
this.monitor = window.setInterval(() => {
|
||||
setTimeout(() => {
|
||||
this.init()
|
||||
}, 2)
|
||||
}, 3500)
|
||||
},
|
||||
destroyed() {
|
||||
clearInterval(this.monitor)
|
||||
},
|
||||
methods: {
|
||||
// 获取redis的信息
|
||||
getList() {
|
||||
getCache().then(res => {
|
||||
// console.log(res)
|
||||
this.cache = res.info
|
||||
// this.$model.closeLoading()
|
||||
this.commandstats = echarts.init(this.$refs.commandstats, 'macarons')
|
||||
const commandStats = [] // 指令状态数据
|
||||
res.info.commandStats.forEach(row => {
|
||||
commandStats.push({
|
||||
name: row.command,
|
||||
value: row.calls
|
||||
})
|
||||
})
|
||||
this.commandstats.setOption({
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: i18n.t('Redis.command'),
|
||||
type: 'pie',
|
||||
roseType: 'radius',
|
||||
radius: [15, 95],
|
||||
center: ['50%', '38%'],
|
||||
data: commandStats,
|
||||
animationEasing: 'cubicInOut',
|
||||
animationDuration: 1000
|
||||
}
|
||||
]
|
||||
})
|
||||
// 使用内存信息
|
||||
this.usedmemory = echarts.init(this.$refs.usedmemory, 'macarons')
|
||||
this.usedmemory.setOption({
|
||||
tooltip: {
|
||||
formatter: '{b} <br/>{a} : ' + this.cache.info.used_memory_human
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: i18n.t('Redis.pake'),
|
||||
type: 'gauge',
|
||||
min: 0,
|
||||
max: 1000,
|
||||
detail: {
|
||||
formatter: this.cache.info.used_memory_human
|
||||
},
|
||||
data: [
|
||||
{
|
||||
value: parseFloat(this.cache.info.used_memory_human),
|
||||
name: i18n.t('Redis.memory_consumption')
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
})
|
||||
// 查询 Redis Key 模板列表
|
||||
getKeyDefineList().then(res => {
|
||||
this.keyDefineList = res.info
|
||||
this.keyDefineListLoad = false
|
||||
})
|
||||
getKeyValueList().then(res => {
|
||||
console.log('keyAndValue', res)
|
||||
this.keyAndValues = res
|
||||
})
|
||||
},
|
||||
clearRedisData(row) {
|
||||
this.$confirm(i18n.t('Redis.msg1'), i18n.t('common.Tips'), {
|
||||
confirmButtonText: i18n.t('common.Confirm'),
|
||||
cancelButtonText: i18n.t('common.Cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const ids = []
|
||||
ids.push(row.key)
|
||||
batch(ids).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: i18n.t('common.Operation_success')
|
||||
})
|
||||
location.reload()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: i18n.t('Redis.msg2')
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
this.delBtlStatu = val.length == 0
|
||||
},
|
||||
batchDel() {
|
||||
this.$confirm(i18n.t('common.Tip1', { count: this.multipleSelection.length }), i18n.t('common.Tips'), {
|
||||
confirmButtonText: i18n.t('common.Confirm'),
|
||||
cancelButtonText: i18n.t('common.Cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const ids = []
|
||||
for (const i in this.multipleSelection) {
|
||||
ids.push(this.multipleSelection[i].key)
|
||||
}
|
||||
batch(ids).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: i18n.t('common.Operation_success')
|
||||
})
|
||||
location.reload()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: i18n.t('Redis.msg2')
|
||||
})
|
||||
})
|
||||
}
|
||||
// init() {
|
||||
// initData(this.url, {}).then(data => {
|
||||
// this.data = data
|
||||
// this.show = true
|
||||
// if (this.cpuInfo.xAxis.data.length >= 8) {
|
||||
// this.cpuInfo.xAxis.data.shift()
|
||||
// this.memoryInfo.xAxis.data.shift()
|
||||
// this.cpuInfo.series[0].data.shift()
|
||||
// this.memoryInfo.series[0].data.shift()
|
||||
// }
|
||||
// this.cpuInfo.xAxis.data.push(data.time)
|
||||
// this.memoryInfo.xAxis.data.push(data.time)
|
||||
// this.cpuInfo.series[0].data.push(parseFloat(data.cpu.used))
|
||||
// this.memoryInfo.series[0].data.push(parseFloat(data.memory.usageRate))
|
||||
// })
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.card-box {
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .box-card {
|
||||
margin-bottom: 5px;
|
||||
|
||||
span {
|
||||
margin-right: 28px;
|
||||
}
|
||||
|
||||
.el-icon-refresh {
|
||||
margin-right: 10px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.cpu, .memory, .swap, .disk {
|
||||
width: 20%;
|
||||
float: left;
|
||||
padding-bottom: 20px;
|
||||
margin-right: 5%;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
margin-top: -5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="物料选择"
|
||||
:title="$t('common.Please_select')"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
@@ -15,12 +15,12 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="物料名称">
|
||||
<el-form-item :label="$t('md_me_materialbase.material_name')">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料名称"
|
||||
:placeholder="$t('md_me_materialbase.material_name')"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -42,25 +42,25 @@
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||
<el-table-column v-if="isSingle" :label="$t('common.Please_select')" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_code" label="物料编码" width="140" />
|
||||
<el-table-column prop="material_name" label="物料名称" width="170" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="170" show-overflow-tooltip/>
|
||||
<el-table-column prop="class_name" label="物料分类" width="140" />
|
||||
<el-table-column prop="unit_name" label="计量单位" />
|
||||
<el-table-column prop="product_series_name" label="系列" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="135" />
|
||||
<el-table-column prop="material_code" :label="$t('md_me_materialbase.material_code')" width="140" />
|
||||
<el-table-column prop="material_name" :label="$t('md_me_materialbase.material_name')" width="170" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" :label="$t('md_me_materialbase.material_spec')" width="170" show-overflow-tooltip />
|
||||
<el-table-column prop="class_name" :label="$t('md_pb_classstandard.class_name')" width="140" />
|
||||
<el-table-column prop="unit_name" :label="$t('md_pb_measureunit.unit_name')" />
|
||||
<el-table-column prop="product_series_name" :label="$t('md_me_materialbase.product_series_name')" />
|
||||
<el-table-column prop="update_optname" :label="$t('common.update_optname')" />
|
||||
<el-table-column prop="update_time" :label="$t('common.update_time')" width="135" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">{{ $t('common.Cancel') }}</el-button>
|
||||
<el-button type="primary" @click="submit">{{ $t('common.Confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -71,13 +71,14 @@ import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
export default {
|
||||
name: 'MaterialDialog',
|
||||
components: { rrOperation, pagination },
|
||||
dicts: ['is_used'],
|
||||
cruds() {
|
||||
return CRUD({ title: '物料选择', url: 'api/Materia', optShow: {}})
|
||||
return CRUD({ title: i18n.t('common.Please_select'), url: 'api/Materia', optShow: {}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
@@ -135,7 +136,7 @@ export default {
|
||||
}
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选物料')
|
||||
this.$message(i18n.t('common.Please_select'))
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="导入Excel文件"
|
||||
:title="$t('common.import')"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
@@ -25,14 +25,14 @@
|
||||
>
|
||||
<i class="el-icon-upload" />
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
{{ $t('upload.load_text1') }}
|
||||
<em>{{ $t('upload.load_text2') }}</em>
|
||||
</div>
|
||||
<div slot="tip" class="el-upload__tip">只能上传Excel文件,且不超过10MB</div>
|
||||
<div slot="tip" class="el-upload__tip">{{ $t('upload.load_text3') }}</div>
|
||||
</el-upload>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">{{ $t('common.Cancel') }}</el-button>
|
||||
<el-button type="primary" @click="submit">{{ $t('common.Confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -42,6 +42,7 @@ import crudMaterial from './material'
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import { download2 } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
export default {
|
||||
name: 'UploadDialog',
|
||||
@@ -82,7 +83,7 @@ export default {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
is_one() {
|
||||
this.crud.notify('只能上传一个excel文件!', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
this.crud.notify(i18n.t('upload.load_text5'), CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
},
|
||||
// 文件校验方法
|
||||
beforeAvatarUpload(file) {
|
||||
@@ -104,19 +105,18 @@ export default {
|
||||
formdata.append('file', this.file1.raw)
|
||||
// excelImport:请求接口 formdata:传递参数
|
||||
crudMaterial.excelImport(formdata).then((res) => {
|
||||
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.notify(i18n.t('common.Success'), CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
downloadFile(result, i18n.t('gateway.check_error_log'), 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.crud.notify('文件过大,请上传小于10MB的文件〜', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
this.crud.notify(i18n.t('upload.load_text4'), CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
<div class="head-container">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
模糊查询:
|
||||
{{ $t('common.Query') }}:
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
size="mini"
|
||||
placeholder="输入物料编码或名称"
|
||||
:placeholder="$t('common.inputCodeOrName')"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
@@ -29,7 +29,7 @@
|
||||
size="mini"
|
||||
@click="uploadShow = true"
|
||||
>
|
||||
导入
|
||||
{{ $t('common.import') }}
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
@@ -43,65 +43,63 @@
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料编码" prop="material_code" >
|
||||
<el-form-item :label="$t('md_me_materialbase.material_code')" prop="material_code">
|
||||
<el-input v-model="form.material_code" style="width: 200px;" :disabled="crud.status.edit > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<el-form-item :label="$t('md_me_materialbase.material_name')" prop="material_name">
|
||||
<el-input v-model="form.material_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<label slot="label">物料规格</label>
|
||||
<el-form-item :label="$t('md_me_materialbase.material_spec')" prop="material_spec">
|
||||
<el-input v-model="form.material_spec" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料型号" prop="material_model">
|
||||
<label slot="label">物料型号</label>
|
||||
<el-form-item :label="$t('md_me_materialbase.material_model')" prop="material_model">
|
||||
<el-input v-model="form.material_model" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item label="物料分类" prop="material_type_id">
|
||||
<el-form-item :label="$t('md_me_materialbase.material_model')" prop="material_type_id">
|
||||
<treeselect
|
||||
v-model="form.material_type_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
:placeholder="$t('common.Please_select')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="外部标识" prop="ext_id">
|
||||
<el-form-item :label="$t('common.ext_id')" prop="ext_id">
|
||||
<el-input v-model="form.ext_id" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否启用" prop="is_used">
|
||||
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
||||
<el-radio v-model="form.is_used" label="1" >是</el-radio>
|
||||
<el-form-item :label="$t('common.is_used')" prop="is_used">
|
||||
<el-radio v-model="form.is_used" label="0">{{ $t('common.No') }}</el-radio>
|
||||
<el-radio v-model="form.is_used" label="1">{{ $t('common.Yes') }}</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" />
|
||||
<el-form-item :label="$t('common.remark')" prop="remark">
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
@@ -113,12 +111,12 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="material_code" label="物料编码" width="160" />
|
||||
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="140" />
|
||||
<el-table-column prop="material_model" label="物料型号" />
|
||||
<el-table-column prop="class_name" label="物料分类" width="140" :formatter="bill_typeFormat" />
|
||||
<el-table-column label="启用" align="center" prop="is_used">
|
||||
<el-table-column prop="material_code" :label="$t('md_me_materialbase.material_code')" width="160" />
|
||||
<el-table-column prop="material_name" :label="$t('md_me_materialbase.material_name')" width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" :label="$t('md_me_materialbase.material_spec')" width="140" />
|
||||
<el-table-column prop="material_model" :label="$t('md_me_materialbase.material_model')" />
|
||||
<el-table-column prop="class_name" :label="$t('md_pb_classstandard.class_name')" width="140" :formatter="bill_typeFormat" />
|
||||
<el-table-column :label="$t('common.is_used')" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.is_used"
|
||||
@@ -130,9 +128,9 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" width="140" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="135" />
|
||||
<el-table-column prop="remark" :label="$t('common.remark')" width="140" />
|
||||
<el-table-column prop="update_optname" :label="$t('common.update_optname')" />
|
||||
<el-table-column prop="update_time" :label="$t('common.update_time')" width="135" />
|
||||
<el-table-column
|
||||
v-permission="['admin','Materialbase:edit','Materialbase:del']"
|
||||
fixed="right"
|
||||
@@ -151,7 +149,7 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<UploadDialog :dialog-show.sync="uploadShow"/>
|
||||
<UploadDialog :dialog-show.sync="uploadShow" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -167,6 +165,7 @@ import crudClassstandard from '@/views/wms/basedata/class/classstandard'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudMaterialbase from '@/views/wms/basedata/material/material'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
const defaultForm = {
|
||||
material_id: null,
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="载具类型">
|
||||
<el-form-item :label="$t('md_pb_storagevehicleinfo.storagevehicle_type')">
|
||||
<el-select
|
||||
v-model="query.vehicle_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
:placeholder="$t('common.Please_select')"
|
||||
class="filter-item"
|
||||
style="width: 180px;"
|
||||
@change="hand"
|
||||
@@ -29,18 +29,17 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="载具号">
|
||||
<el-form-item :label="$t('md_pb_storagevehicleinfo.storagevehicle_code')">
|
||||
<el-input
|
||||
v-model="query.vehicle_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="载具号"
|
||||
style="width: 110px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation/>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
@@ -67,30 +66,34 @@
|
||||
>
|
||||
<el-form ref="form" :model="materialForm" :rules="rules" size="mini" label-width="110px">
|
||||
<el-form-item label="载具编码" prop="vehicle_code">
|
||||
<el-input v-model="materialForm.vehicle_code" disabled style="width: 370px;"/>
|
||||
<el-input v-model="materialForm.vehicle_code" disabled style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="materialForm.material_code" clearable style="width: 370px"
|
||||
@clear="materialForm.material_id='',materialForm.material_code='',materialForm.material_name='',materialForm.material_spec=''">
|
||||
<el-button slot="append" icon="el-icon-plus" @click="queryMater"/>
|
||||
<el-input
|
||||
v-model="materialForm.material_code"
|
||||
clearable
|
||||
style="width: 370px"
|
||||
@clear="materialForm.material_id='',materialForm.material_code='',materialForm.material_name='',materialForm.material_spec=''"
|
||||
>
|
||||
<el-button slot="append" icon="el-icon-plus" @click="queryMater" />
|
||||
</el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;"/>
|
||||
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批 次" prop="pcsn">
|
||||
<el-input v-model="materialForm.pcsn" clearable style="width: 370px;"/>
|
||||
<el-input v-model="materialForm.pcsn" clearable style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料数量" prop="qty">
|
||||
<el-input v-model="materialForm.qty" clearable style="width: 370px;"/>
|
||||
<el-input v-model="materialForm.qty" clearable style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="冻结数量" prop="frozen_qty">
|
||||
<el-input v-model="materialForm.frozen_qty" clearable style="width: 370px;"/>
|
||||
<el-input v-model="materialForm.frozen_qty" clearable style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="流程实例" prop="proc_inst_id">
|
||||
<el-input v-model="materialForm.proc_inst_id" clearable style="width: 370px;"/>
|
||||
<el-input v-model="materialForm.proc_inst_id" clearable style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -108,11 +111,11 @@
|
||||
<el-form ref="form" :model="updateForm" :rules="rules" size="mini" label-width="110px">
|
||||
<el-form-item label="载具编号" prop="vehicle_code">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="updateForm.vehicle_code" clearable/>
|
||||
<el-input v-model="updateForm.vehicle_code" clearable />
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具重量(g)" prop="vehicle_weight">
|
||||
<el-input-number v-model="updateForm.vehicle_weight" clearable style="width: 370px;"/>
|
||||
<el-input-number v-model="updateForm.vehicle_weight" clearable style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -129,22 +132,22 @@
|
||||
>
|
||||
<el-form ref="form" :model="printForm" size="mini" label-width="150px">
|
||||
<el-form-item label="纸张高度(mm)" prop="pageh">
|
||||
<el-input v-model="printForm.pageh" :precision="0" style="width: 150px;"/>
|
||||
<el-input v-model="printForm.pageh" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="纸张宽度(mm)" prop="pagew">
|
||||
<el-input v-model="printForm.pagew" :precision="0" style="width: 150px;"/>
|
||||
<el-input v-model="printForm.pagew" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="页边距top(mm)" prop="pagetop">
|
||||
<el-input v-model="printForm.pagetop" :precision="0" style="width: 150px;"/>
|
||||
<el-input v-model="printForm.pagetop" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="页边距right(mm)" prop="pageright">
|
||||
<el-input v-model="printForm.pageright" :precision="0" style="width: 150px;"/>
|
||||
<el-input v-model="printForm.pageright" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="页边距down(mm)" prop="pagedown">
|
||||
<el-input v-model="printForm.pagedown" :precision="0" style="width: 150px;"/>
|
||||
<el-input v-model="printForm.pagedown" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="页边距left(mm)" prop="pageleft">
|
||||
<el-input v-model="printForm.pageleft" :precision="0" style="width: 150px;"/>
|
||||
<el-input v-model="printForm.pageleft" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<br>
|
||||
</el-form>
|
||||
@@ -180,22 +183,22 @@
|
||||
</el-form-item>
|
||||
<br>
|
||||
<el-form-item label="起始载具号" prop="vehicle_code">
|
||||
<el-input v-model="form.vehicle_code" :disabled="true" style="width: 250px;"/>
|
||||
<el-input v-model="form.vehicle_code" :disabled="true" style="width: 250px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="载具数量" prop="num">
|
||||
<el-input-number v-model="form.num" :precision="0" style="width: 150px;"/>
|
||||
<el-input-number v-model="form.num" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="高度(mm)" prop="h">
|
||||
<el-input-number v-model="form.h" :precision="0" style="width: 150px;"/>
|
||||
<el-input-number v-model="form.h" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="宽度(mm)" prop="w">
|
||||
<el-input-number v-model="form.w" :precision="0" style="width: 150px;"/>
|
||||
<el-input-number v-model="form.w" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="深度(mm)" prop="l">
|
||||
<el-input-number v-model="form.l" :precision="0" style="width: 150px;"/>
|
||||
<el-input-number v-model="form.l" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="重量(g)" prop="weight">
|
||||
<el-input-number v-model="form.weight" :precision="0" style="width: 150px;"/>
|
||||
<el-input-number v-model="form.weight" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用">
|
||||
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
||||
@@ -236,8 +239,8 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_name" label="创建人"/>
|
||||
<el-table-column prop="create_time" label="创建时间" width="150px"/>
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" width="150px" />
|
||||
<el-table-column
|
||||
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
|
||||
label="操作"
|
||||
@@ -254,7 +257,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件-->
|
||||
<pagination/>
|
||||
<pagination />
|
||||
</div>
|
||||
<MaterDtl
|
||||
:dialog-show.sync="materialShow"
|
||||
@@ -275,7 +278,6 @@ import pagination from '@crud/Pagination'
|
||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||
import MaterDtl from '@/views/wms/basedata/material/MaterialDialog'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
vehicle_code: null,
|
||||
vehicle_name: null,
|
||||
@@ -298,7 +300,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Storagevehicleinfo',
|
||||
dicts: ['storagevehicle_type', "VEHICLE_OVER_TYPE"],
|
||||
dicts: ['storagevehicle_type', 'VEHICLE_OVER_TYPE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -347,23 +349,23 @@ export default {
|
||||
permission: {},
|
||||
rules: {
|
||||
vehicle_code: [
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_delete: [
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_used: [
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
vehicle_type: [
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
overstruct_type: [
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
num: [
|
||||
{required: true, message: '不能为空', trigger: 'blur'},
|
||||
{validator: numberOne}
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user