17 Commits

76 changed files with 1641 additions and 636 deletions

View File

@@ -3,7 +3,8 @@
"version": "5.0.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"serve": "vue-cli-service serve --mode production",
"serve:dev": "vue-cli-service serve --mode development",
"build": "vue-cli-service build",
"build:prod": "vue-cli-service build --mode production",
"build:sit": "vue-cli-service build --mode production.sit",

25
public/i18n.js Normal file
View File

@@ -0,0 +1,25 @@
/**
* Created by Jacky.Gao on 2017-10-01.
*/
import defaultI18nJsonData from './designer.json';
import en18nJsonData from './designer_en.json';
export default function buildLocal () {
let language = getCookie('language') || 'zh-CN';
window.i18n = defaultI18nJsonData;
if (language !== 'zh-CN') {
window.i18n = en18nJsonData;
}
}
function getCookie (name) {
var strcookie = document.cookie;//获取cookie字符串
var arrcookie = strcookie.split("; ");//分割
//遍历匹配
for (var i = 0; i < arrcookie.length; i++) {
var arr = arrcookie[i].split("=");
if (arr[0] == name){
return arr[1];
}
}
return "";
}

View File

@@ -10,7 +10,7 @@
window.SITE_CONFIG['version'] = 'v5.0.0';
window.SITE_CONFIG['nodeEnv'] = '<%= process.env.VUE_APP_NODE_ENV %>';
window.SITE_CONFIG['apiURL'] = ''; // api请求地址
window.SITE_CONFIG['projURL'] = '/yd-monitor'; // api请求地址
window.SITE_CONFIG['projURL'] = ''; // api请求地址
window.SITE_CONFIG['storeState'] = {}; // vuex本地储存初始化状态用于不刷新页面的情况下也能重置初始化项目中所有状态
window.SITE_CONFIG['contentTabDefault'] = { // 内容标签页默认属性对象
'name': '', // 名称, 由 this.$route.name 自动赋值(默认,名称 === 路由名称 === 路由路径)
@@ -31,25 +31,25 @@
<!-- 开发环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<script>
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.28:8080';
window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
</script>
<% } %>
<!-- 集成测试环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'prod:sit') { %>
<script>
window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
</script>
<% } %>
<!-- 验收测试环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'prod:uat') { %>
<script>
window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
</script>
<% } %>
<!-- 生产环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'prod') { %>
<script>
window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
</script>
<% } %>
</head>

View File

@@ -5,7 +5,7 @@ $base--line-height: 1.15;
$navbar--height: 50px;
// Sidebar
$sidebar--width: 230px;
$sidebar--width: 300px;
$sidebar--width-fold: 64px;
$sidebar--background-color-dark: #263238;
$sidebar--text-color-dark: #8a979e;

View File

@@ -93,7 +93,7 @@ import { pick } from 'lodash/object'
// 标题 for i18n
const title = {
detail: '详情',
detail: i18n.t('detail'),
add: i18n.t('add'),
edit: '编辑'
}
@@ -144,7 +144,7 @@ export default {
code: i18n.t('code'),
remark: i18n.t('remark'),
description: i18n.t('desc'),
specifications: '规格'
specifications: i18n.t('prod.spec')
// add more...
}
@@ -168,7 +168,7 @@ export default {
code: i18n.t('code'),
remark: i18n.t('remark'),
description: i18n.t('desc'),
specifications: '规格'
specifications: i18n.t('prod.spec')
// add more...
},
defaultPlaceholders: {}, // 自动根据 defaultNames 计算得来
@@ -455,7 +455,7 @@ export default {
.then(({ data: res }) => {
if (res && res.code === 0) {
this.$message({
message: btn.name === 'save' ? '添加成功!' : '更新成功!',
message: btn.name === 'save' ? i18n.t('prompt.success') : '更新成功!',
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -1,6 +1,8 @@
<template>
<div class="attr-form">
<h3>{{ title }} <el-button style="margin-left: 8px;" type="text" v-if="!isDetail && !showAddAttr" @click="showAddAttr = true">添加</el-button></h3>
<h3>
{{ title }} <el-button style="margin-left: 8px;" type="text" v-if="!isDetail && !showAddAttr" @click="showAddAttr = true">{{ $t('add') }}</el-button>
</h3>
<div v-if="!showAddAttr">
<component
key="sub-table"
@@ -28,7 +30,7 @@
<el-row :gutter="20" style="padding: 0 24px;">
<el-col :span="attrFormFields.length > 6 ? 6 : 12" v-for="field in attrFormFields" :key="field.prop + 'col'">
<el-form-item :key="field.prop" :prop="field.prop" :label="field.name" style="width: 100%">
<el-input v-if="field.formType === 'input' || !field.formType" v-model="AttrForm[field.prop]" placeholder="请填写" clearable />
<el-input v-if="field.formType === 'input' || !field.formType" v-model="AttrForm[field.prop]" :placeholder="$t('hints.input')" clearable />
<el-select v-if="field.formType === 'select'" v-model="AttrForm[field.prop]" clearable>
<el-option v-for="opt in field.formOptions" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select>
@@ -40,8 +42,8 @@
</el-col>
</el-row>
<el-row style="text-align: right;">
<el-button size="small" @click="handleCloseAttrForm">取消</el-button>
<el-button type="success" size="small" @click="handleSaveAttrForm">保存</el-button>
<el-button size="small" @click="handleCloseAttrForm">{{ $t('cancel') }}</el-button>
<el-button type="success" size="small" @click="handleSaveAttrForm">{{ $t('save') }}</el-button>
</el-row>
</div>
</div>
@@ -51,7 +53,7 @@
import i18n from '@/i18n'
import BaseTable from '@/components/base-table'
import { pick } from 'lodash/object'
import { calcMaxHeight } from '@/utils'
export default {
name: 'AttrForm',
components: { BaseTable },
@@ -91,6 +93,7 @@ export default {
},
data() {
return {
calcMaxHeight,
showAddAttr: false,
dataList: [],
pageIndex: 1,
@@ -201,7 +204,7 @@ export default {
deleteHandle(id) {
var ids = id ? [id] : []
this.$confirm(`确定对id=${ids.join(',')}进行${id ? i18n.t('delete') : i18n.t('deleteBatch')}操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -213,7 +216,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {
@@ -246,7 +249,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -97,20 +97,21 @@
>{{ btnName[operate.name] }}</el-button
>
</template>
<el-button v-if="isDetail" @click="handleClick({ name: 'cancel' })">返回</el-button>
<el-button v-if="isDetail" @click="handleClick({ name: 'cancel' })">{{ $t('cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import CKEditor from 'ckeditor4-vue'
import AttrForm from '../AttrForm'
import { pick } from 'lodash/object'
import i18n from '@/i18n'
// 标题 for i18n
const title = {
detail: '详情',
detail: i18n.t('detail'),
add: i18n.t('add'),
edit: '编辑'
edit: i18n.t('edit')
}
// 或者也可以改造成自定义颜色:
@@ -124,9 +125,9 @@ const btnType = {
const btnName = {
// for i18n
save: '保存',
update: '更新',
reset: '重置',
save: i18n.t('save'),
update: i18n.t('update'),
reset: i18n.t('reset'),
cancel: i18n.t('cancel')
// add more...
}
@@ -159,7 +160,7 @@ export default {
code: i18n.t('code'),
remark: i18n.t('remark'),
description: i18n.t('desc'),
specifications: '规格'
specifications: i18n.t('prod.spec')
// add more...
}
@@ -183,7 +184,7 @@ export default {
code: i18n.t('code'),
remark: i18n.t('remark'),
description: i18n.t('desc'),
specifications: '规格'
specifications: i18n.t('prod.spec')
// add more...
},
defaultPlaceholders: {}, // 自动根据 defaultNames 计算得来
@@ -205,9 +206,14 @@ export default {
return Math.ceil(this.configs.fields.length / COLUMN_PER_ROW)
}
},
created() {
/** load lang */
// CKEditor.load()
// console.log('lang', CKEditor.component.props.config.defaultLanguage = 'en' )
},
mounted() {
/** 计算 defaultPlaceholders */
const prefix = '请输入'
const prefix = i18n.t('hints.input')
Object.entries(this.defaultNames).map(([key, value]) => {
this.defaultPlaceholders[key] = prefix + value
})
@@ -251,7 +257,7 @@ export default {
if (item.required) {
const requiredRule = {
required: true,
message: '请输入必填项',
message: i18n.t('validate.required'),
trigger: 'change'
}
/** 检查是否已经存在该字段的规则 */
@@ -296,19 +302,14 @@ export default {
this.configs.extraComponents &&
this.configs.extraComponents.forEach(item => {
if (Object.hasOwn(this.dataForm, [item.name])) {
console.log('有了!')
return
} else {
console.log('新建!')
this.$set(this.dataForm, [item.name], calDefault(item.fieldType))
}
console.log('component: ', item.component)
})
/** 单独设置 id */
this.$set(this.dataForm, 'id', null)
console.log('mounted: this.dataForm', JSON.stringify(this.dataForm))
})
},
@@ -335,7 +336,7 @@ export default {
: this.defaultPlaceholders[opt.name]
? this.defaultPlaceholders[opt.name]
: opt.label
? (opt.type === 'select' ? i18n.t('choose') : '请输入') + opt.label
? (opt.type === 'select' ? i18n.t('choose') : i18n.t('hints.input')) + opt.label
: null
// : opt.type === 'select'
@@ -402,7 +403,6 @@ export default {
this.fileForm[file.typeCode] = [file.id]
}
})
console.log('after分流', this.fileList)
}
}
})
@@ -411,12 +411,12 @@ export default {
if (this.shouldWait)
this.shouldWait.then(() => {
if (this.tempForm.length) {
console.log('create new, tempform', JSON.stringify(this.tempForm.length))
// console.log('create new, tempform', JSON.stringify(this.tempForm.length))
this.tempForm.forEach(item => {
console.log('item data', item.data)
// console.log('item data', item.data)
this.dataForm[item.name] = item.data
})
console.log('create new, dataform', JSON.stringify(this.dataForm))
// console.log('create new, dataform', JSON.stringify(this.dataForm))
}
})
}
@@ -427,9 +427,7 @@ export default {
this.$emit('select-change', { name, id })
},
handleEditorReady(val) {
console.log('editor rready..', val)
},
handleEditorReady(val) {},
handleClick(btn) {
/** 提取url */
@@ -448,7 +446,6 @@ export default {
if (valid) {
/** 对于文件上传的单独处理(合并处理) */
if (Object.keys(this.fileForm).length) {
console.log('fileform 有值')
// LABEL: FILE_RELATED
let fileIds = []
for (const [key, item] of Object.entries(this.fileForm)) {
@@ -471,7 +468,8 @@ export default {
.then(({ data: res }) => {
if (res && res.code === 0) {
this.$message({
message: btn.name === 'save' ? '添加成功!' : '更新成功!',
message: i18n.t('prompt.success'),
// message: btn.name === 'save' ? i18n.t('prompt.success') : '更新成功!',
type: 'success',
duration: 1500,
onClose: () => {
@@ -512,7 +510,7 @@ export default {
// LABEL: FILE_RELATED
handleUploadListUpdate(filelist, typeCode = 'DefaultTypeCode') {
console.log('before handleUploadListUpdate(): ', JSON.parse(JSON.stringify(this.fileForm)))
// console.log('before handleUploadListUpdate(): ', JSON.parse(JSON.stringify(this.fileForm)))
// 设备类型 typeCode: EquipmentTypeFile
// 设备信息 typeCode: EquipmentInfoFile | EquipmentInfoImage
@@ -529,7 +527,7 @@ export default {
typeCode,
filelist.map(item => item.id)
)
console.log('after handleUploadListUpdate(): ', this.fileForm)
// console.log('after handleUploadListUpdate(): ', this.fileForm)
},
handleClose() {

View File

@@ -0,0 +1,11 @@
<template>
<div class="cell-container">
</div>
</template>
<script>
export default {}
</script>
<style></style>

View File

@@ -1,11 +1,5 @@
/**
* @Author: lb
* @CreateDate: 2022.8.8
* @Modifier:
* @ModifiedDate:
* 表格里的文本组件
* 一般用途:展示查看详情入口
*/
import i18n from '@/i18n'
export default {
name: 'TableTextComponent',
props: {
@@ -17,12 +11,12 @@ export default {
data() {
return {
// for i18n inject:
defaultText: '查看详情'
defaultText: i18n.t('viewdetail')
}
},
methods: {
emitClick() {
console.log('inject data:' ,this.injectData)
// console.log('inject data:' ,this.injectData)
this.$emit('emit-data', {
type: this.injectData.head?.actionName || 'view-detail-action',
data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id
@@ -30,7 +24,7 @@ export default {
}
},
render: function (h) {
// console.log(this)
return h('span', null, [h('el-button', { props: { type: 'text' }, style: { paddingLeft: 0 }, on: { click: this.emitClick } }, this.injectData.buttonContent || this.defaultText)])
// console.log('button content:', this.injectData)
return h('span', null, [h('el-button', { props: { type: 'text' }, style: { paddingLeft: 0 }, on: { click: this.emitClick } }, this.injectData.head?.buttonContent || this.defaultText)])
}
}

View File

@@ -1,11 +1,5 @@
/**
* @Author: lb
* @CreateDate: 2022.8.8
* @Modifier:
* @ModifiedDate:
* 表格里的操作组件
* 一般用途:展示添加删除按钮
*/
import i18n from '@/i18n'
export default {
name: 'TableOperations',
props: {
@@ -30,12 +24,12 @@ export default {
},
text: {
// TODO: i18n
edit: '编辑',
detail: '详情',
delete: '删除',
viewAttr: '查看属性',
preview: '预览',
design: '设计'
edit: i18n.t('edit'),
detail: i18n.t('detail'),
delete: i18n.t('delete'),
viewAttr: i18n.t('viewattr'),
preview: i18n.t('preview'),
design: i18n.t('design'),
// add more...
}
}

View File

@@ -31,7 +31,8 @@
:width="head.width || null"
:min-width="head.minWidth || null"
:fixed="head.fixed || null"
:show-overflow-tooltip="head.showOverflowTooltip || false"
:show-overflow-tooltip="head.showOverflowTooltip || true"
:tooltip-effect="head.tooltipEffect || 'light'"
filter-placement="top"
:align="head.align || null"
v-bind="head.more"

View File

@@ -1,5 +1,5 @@
<template>
<div class="base-upload" style="border-radius: 8px; margin-top: 38px; padding: 0; max-height: 500px;">
<div class="base-upload" style="border-radius: 8px; margin-top: 48px; padding: 0; max-height: 500px;">
<el-upload
class="yd-upload"
action="#"
@@ -13,7 +13,7 @@
<!-- :before-remove="beforeRemove" -->
<!-- accept="image/*" -->
<!-- <el-upload class="yd-upload" :action="$http.adornUrl(url)" multiple name="files" :data="extraParams" :file-list="fileList" :on-remove="handleRemove" :before-remove="beforeRemove"> -->
<el-button :disabled="readOnly" size="small" type="primary">{{ buttonContent }}</el-button>
<el-button :disabled="readOnly" type="primary">{{ buttonContent }}</el-button>
<div v-if="tip" slot="tip" class="el-upload__tip">{{ tip }}</div>
</el-upload>
</div>
@@ -101,8 +101,6 @@ export default {
/** 大小验证,由配置文件开启 */
validateFile(file) {
console.log('[*] 验证文件大小')
const isRightSize = file.size / 1024 / 1024 < 2
if (!isRightSize) {
// this.$message.error(this.$t('upload.picSizeAlarm'))
@@ -156,7 +154,6 @@ export default {
alink.style.display = 'none'
alink.target = '_blank'
alink.href = URL.createObjectURL(blob)
console.log('下载地址:', alink.href)
document.body.appendChild(alink)
alink.click()
URL.revokeObjectURL(alink.href)
@@ -184,14 +181,33 @@ export default {
margin-bottom: 20px;
}
.base-upload >>> .el-upload--text {
/* .base-upload >>> .el-button {
display: block;
width: 200px;
position: relative;
left: -50px;
} */
/* .base-upload >>> .el-upload--text {
width: 100px;
position: relative;
left: -72px;
}
left: -100px;
} */
.base-upload >>> .el-upload__tip {
margin-top: 0;
margin-left: 5px;
}
.base-upload {
display: flex;
}
.yd-upload {
/* background-color: #efefef; */
flex-grow: 1;
display: flex;
flex-direction: column;
align-items: flex-start;
}
</style>

View File

@@ -7,6 +7,56 @@ t.brand = {}
t.brand.lg = 'Monitoring System'
t.brand.mini = 'PMS'
t.routes = {}
t.routes['产品池'] = 'Products Pool'
t.routes['基本资料'] = 'Basic Data'
t.routes['设备数采'] = 'Equipment PLC'
t.routes['厂务管理'] = 'Factory Management'
t.routes['报表管理'] = 'Report Management'
t.routes['质量管理'] = 'Quality Management'
t.routes['权限管理'] = 'Permission Management'
t.routes['系统设置'] = 'System Settings'
t.routes['日志管理'] = 'Log Management'
// 二级
t.routes['厂务'] = 'Factory Affair'
t.routes['设备'] = 'Equipment'
t.routes['字典管理'] = 'Dict Management'
t.routes['PLC信息'] = 'PLC'
t.routes['设备与PLC关联配置'] = 'Relations between plc & equipments'
t.routes['设备生产实时数据'] = 'Realtime Equipment Data'
t.routes['产线生产实时数据'] = 'Realtime Productline Data'
t.routes['质量检查实时数据'] = 'Realtime Quality Inspection Data'
t.routes['报表总览'] = 'Report Overview'
t.routes['报表分类'] = 'Report Types'
t.routes['报表详情'] = 'Report Detail'
t.routes['质量检测基础数据'] = 'Quality Inspection Basic Data'
t.routes['当前检测数据'] = 'Current Inspection Data'
t.routes['质量检查信息记录'] = 'Quality Inspection Records'
t.routes['用户管理'] = 'User Management'
t.routes['部门管理'] = 'Department Management'
t.routes['角色管理'] = 'Role Management'
t.routes['菜单管理'] = 'Menu Management'
t.routes['参数管理'] = 'Params Management'
t.routes['定时任务'] = 'Timed Tasks'
t.routes['文件上传'] = 'File Upload'
t.routes['登录日志'] = 'Login Records'
t.routes['操作日志'] = 'Oprations Records'
// 三级
t.routes['工厂'] = 'Factory'
t.routes['产线'] = 'Product Lines'
t.routes['工段'] = 'Work Sections'
t.routes['设备类型'] = 'Equipment Types'
t.routes['设备分组'] = 'Equipment Groups'
t.routes['设备信息'] = 'Equipment Details'
t.routes['设备参数状态监控'] = 'Current Equipment State'
t.routes['设备分组报警信息'] = 'Equipment Group Alarm'
t.routes['质量检测类型'] = 'Quality Inpection Types'
t.routes['质量检测信息'] = 'Quality Inpection Details'
t.save = 'Save'
t.add = 'Add'
t.delete = 'Delete'
t.deleteBatch = 'Delete Batch'
@@ -68,7 +118,7 @@ t.enname = 'English Name'
t.collectOrNot = 'Collect or not'
t.min = 'Min Value'
t.max = 'Max Value'
t.status = 'Status',
t.status = 'Status'
t.normal = 'Normal'
t.addr = 'Address'
t.planStop = 'Plan to stop'
@@ -76,16 +126,432 @@ t.startTime = 'Start Time'
t.endTime = 'End Time'
t.today = 'Today'
t.graph = 'Graph'
t.category = 'Category'
t.categoryName = 'Category Name'
t.categoryCode = 'Category Code'
t.rate = 'Rate'
t.link = 'Link Url'
t.refresh = 'Refresh'
t.abbr = 'Abbreviation'
t.detail = 'Details'
t.viewdetail = 'Details'
t.viewattr = 'View Attributions'
t.edit = 'Edit'
t.source = 'Source'
t.auto = 'Auto'
t.manual = 'Manually'
t.loaddone = 'Loaded'
t.produceTime = 'Date of manufacture'
t.enterTime = 'Enter Time'
t.manufacturer = 'Manufacturer'
t.success = 'success!'
t.all = 'All'
t.reset = 'Reset'
t.preview = 'Preview'
t.design = 'Design'
t.errors = {}
t.errors.nosection = 'There is no sections on this product line.'
t.errors.numsection = 'There are {num} sections on this product line.'
t.errors.nodata = 'Error, no data available!'
t.hints = {}
t.hints.input = 'Please input '
t.hints.select = 'Please select '
t.hints.date = 'Please select date'
t.hints.checktime = 'Please select inspection time'
t.hints.number = 'Please input correct number'
t.hints.addr = 'Please input address'
t.hints.upload2m = 'File size cannot be larger than 2mb (2048kb)'
t.hints.upload2mPic = 'Image files only. File size cannot be larger than 2mb (2048kb)'
t.factory = {}
t.factory.title = 'Factory'
t.factory.name = 'Factory Name'
t.factory.code = 'Factory Code'
t.prod = {}
t.prod.id = 'Product ID'
t.prod.name = 'Product Name'
t.prod.code = 'Product Code'
t.prod.type = 'Product Type'
t.prod.area = 'Area'
t.prod.spec = 'Product Specification'
t.prod.attr = 'Dynamic Attributes'
t.prod.attrcode = 'Attribute Code'
t.prod.attrcodeHints = 'Please input attribute code'
t.prod.attrname = 'Attribute Node'
t.prod.attrnameHints = 'Please input attribute name'
t.prod.attrvalueHints = 'Please input attribute value'
t.prod.descHints = 'Please input description'
t.prod.processTime = 'Processing Time (Hours)'
t.prod.processTimeHints = 'Please input processing time'
t.prod.relatedPid = 'Related Product'
t.alarm = {}
t.alarm.name = 'Alarm'
t.alarm.info = 'Alarm Informations'
t.alarm.view = 'View Alarm'
t.alarm.eq = 'Alarm Equipment'
t.alarm.type = 'Alarm Type'
t.alarm.code = 'Alarm Code'
t.alarm.level = 'Alarm Level'
t.alarm.content = 'Alarm Content'
t.alarm.source = 'Alarm Source'
t.alarm.det = 'Alarm Details'
t.report = {}
t.report.name = 'Report Name'
t.report.det = 'Report Content'
t.report.type = 'Report Type'
t.report.code = 'Report Code'
t.report.lnk = 'Report Url'
t.inspect = {}
t.inspect.type = 'Inspection Type'
t.inspect.code = 'Inspection Code'
t.inspect.det = 'Inspection Details'
t.inspect.detcode = 'Inspection Content Code'
t.inspect.people = 'Inspector'
t.inspect.time = 'Inspection Time'
t.inspect.typetotal = 'Total Inspection Types'
t.inspect.typename = 'Inspection Type'
t.inspect.typecode = 'Inspection Code'
t.inspect.ioTotal = 'Data of input/output and total inspections'
t.inspect.plTotal = 'Inspection types per line'
t.inspect.inTotal = 'Up Sum'
t.inspect.outTotal = 'Down Sum'
t.inspect.checkTotal = 'Total Inspections'
t.inspect.rate = 'Rate'
t.inspect.typeCount = 'Data of inspection types'
t.realtime = {}
t.realtime.eq = 'Realtime data of equipments'
t.realtime.pl = 'Realtime data of product lines'
t.realtime.inspect = 'Realtime data of quality inspections'
t.realtime.in = 'in'
t.realtime.out = 'out'
t.realtime.data = 'scrap'
t.realtime.num = 'scrap quantity'
t.realtime.rate = 'scrap rate'
t.realtime.total = 'total production'
t.realtime.goodrate = 'Passed Rate'
t.realtime.runState = '是否运行'
t.realtime.state = '状态'
t.realtime.hasFault = '是否故障'
t.realtime.recentParamValue = '参数近期值'
t.realtime.view = '查看'
t.realtime.input = '投入数'
t.realtime.output = '产出数'
t.realtime.eqName = '设备名称'
t.realtime.eqCode = '设备编码'
t.realtime.productionSnapshotTime = '生产量记录时间'
t.realtime.statusSnapshotTime = '状态记录时间'
t.ws = {}
t.ws.title = 'Work Section'
t.ws.id = 'Work Section ID'
t.ws.name = 'Work Section Name'
t.ws.code = 'Work Section Code'
t.ws.binded = 'Binded Equipments'
t.ws.unbind = 'Please select an equipment to bind.'
t.ws.sort = 'sort'
t.ws.setorder = 'Please input order of equipments in the work section.'
t.ws.bind = 'bind'
t.ws.eqbind = 'Binded Equipment(s)'
t.ws.belong = 'Product Line'
t.file = {}
t.file.title = 'File'
t.file.name = 'File Name'
t.file.code = 'File Code'
t.file.typeName = 'File Type'
t.file.typeCode = 'File Type Code'
t.eq = {}
t.eq.title = 'Equipment'
t.eq.id = 'Equipment ID'
t.eq.name = 'Equipment Name'
t.eq.code = 'Equipment Code'
t.eq.type = 'Equipment Type'
t.eq.grade = 'Specification of equipment'
t.eq.group = 'Equipment Group'
t.eq.groupname = 'Group Name'
t.eq.groupcode = 'Group Code'
t.eq.excode = 'External Code'
t.eq.input = 'Input Device'
t.eq.output = 'Output Device'
t.eq.tvalue = 'Device\'s TT Value'
t.eq.processingTime = 'Processing Time (s)'
t.eq.dtype = 'Data source'
t.eq.dtypenone = 'none'
t.eq.dtypeinput = 'Input Data Device'
t.eq.dtypeoutput = 'Output Data Device'
t.eq.upload = 'Upload'
t.eq.image = 'Equipment Pictures'
t.eq.viewattr = 'Equipment Attributions'
t.eq.plcbarcode = 'PLC Bar Code'
t.eq.plccode = 'PLC Code'
t.eq.plcname = 'PLC Name'
t.eq.port = 'Port'
t.eq.type = 'Type'
t.eq.typecode = 'Type Code'
t.eq.parent = 'Parent'
t.pl = {}
t.pl.title = 'Product Line'
t.pl.id = 'Product Line ID'
t.pl.name = 'Product Line Name'
t.pl.code = 'Product Line Code'
t.pl.status = 'Product Line Status'
t.pl.belong = 'Product Line'
t.pl.tvalue = 'TT Value'
t.pl.factoryHints = 'Please select a factory'
t.prompt = {}
t.prompt.title = 'Prompt'
t.prompt.info = 'Are you sure to {handle}?'
t.prompt.sure = 'Are you sure to delete this record?'
t.prompt.success = 'success'
t.prompt.failed = 'failed'
t.prompt.deleteBatch = 'Please choose items to delete.'
t.validate = {}
t.validate.required = 'This is required.'
t.validate.format = '{attr} has a wrong format.'
t.upload = {}
t.upload.title = 'Upload Assets'
t.upload.text = '将文件拖到此处,或<em>点击上传</em>'
t.upload.tip = 'Only support files with format: {format}'
t.upload.button = 'upload'
t.datePicker = {}
t.datePicker.range = 'to'
t.datePicker.start = 'Start Time'
t.datePicker.end = 'End Time'
t.fullscreen = {}
t.fullscreen.prompt = 'This operation is not supported by your browser.'
t.updatePassword = {}
t.updatePassword.title = 'Update Password'
t.updatePassword.username = 'Username'
t.updatePassword.password = 'Current Password'
t.updatePassword.newPassword = 'New Password'
t.updatePassword.confirmPassword = 'Confirm Password'
t.updatePassword.validate = {}
t.updatePassword.validate.confirmPassword = 'The two passwords are different. Please check again.'
t.contentTabs = {}
t.contentTabs.closeCurrent = 'Close current tab'
t.contentTabs.closeOther = 'Close other tabs'
t.contentTabs.closeAll = 'Close all tabs'
/* 页面 */
t.notFound = {}
t.notFound.desc = 'Sorry! The page you\'re looking is missing.'
t.notFound.back = 'Back'
t.notFound.home = 'Home Page'
t.login = {}
t.login.title = 'Login'
t.login.username = 'Username'
t.login.password = 'Password'
t.login.captcha = 'Validation Code'
t.login.captcha = 'Captcha'
t.login.demo = 'Demo'
t.login.copyright = 'CNBM'
t.login.copyright = 'Copyright @Intelligent Automation Research Institute Co., Ltd Version: 1.0'
t.schedule = {}
t.schedule.beanName = 'Bean Name'
t.schedule.beanNameTips = 'spring bean name, eg: testTask'
t.schedule.pauseBatch = 'Pause'
t.schedule.resumeBatch = 'Resume'
t.schedule.runBatch = 'Run'
t.schedule.log = 'Log List'
t.schedule.params = 'Parameters'
t.schedule.cronExpression = 'cron expression'
t.schedule.cronExpressionTips = 'ex: 0 0 12 * * ?'
t.schedule.remark = 'Remark'
t.schedule.status = 'Status'
t.schedule.status0 = 'Pause'
t.schedule.status1 = 'Normal'
t.schedule.statusLog0 = 'Failed'
t.schedule.statusLog1 = 'Success'
t.schedule.pause = 'Pause'
t.schedule.resume = 'Resume'
t.schedule.run = 'Excute'
t.schedule.jobId = 'Job ID'
t.schedule.times = 'Time Cost (ms)'
t.schedule.createDate = 'Executed Tune' // ?
t.oss = {}
t.oss.config = '云存储配置'
t.oss.upload = '上传文件'
t.oss.url = 'URL地址'
t.oss.createDate = 'Create Time'
t.oss.type = '类型'
t.oss.type1 = '七牛'
t.oss.type2 = '阿里云'
t.oss.type3 = '腾讯云'
t.oss.qiniuDomain = '域名'
t.oss.qiniuDomainTips = '七牛绑定的域名'
t.oss.qiniuPrefix = '路径前缀'
t.oss.qiniuPrefixTips = '不设置默认为空'
t.oss.qiniuAccessKey = 'AccessKey'
t.oss.qiniuAccessKeyTips = '七牛AccessKey'
t.oss.qiniuSecretKey = 'SecretKey'
t.oss.qiniuSecretKeyTips = '七牛SecretKey'
t.oss.qiniuBucketName = '空间名'
t.oss.qiniuBucketNameTips = '七牛存储空间名'
t.oss.aliyunDomain = '域名'
t.oss.aliyunDomainTips = '阿里云绑定的域名http://cdn.renren.io'
t.oss.aliyunPrefix = '路径前缀'
t.oss.aliyunPrefixTips = '不设置默认为空'
t.oss.aliyunEndPoint = 'EndPoint'
t.oss.aliyunEndPointTips = '阿里云EndPoint'
t.oss.aliyunAccessKeyId = 'AccessKeyId'
t.oss.aliyunAccessKeyIdTips = '阿里云AccessKeyId'
t.oss.aliyunAccessKeySecret = 'AccessKeySecret'
t.oss.aliyunAccessKeySecretTips = '阿里云AccessKeySecret'
t.oss.aliyunBucketName = 'BucketName'
t.oss.aliyunBucketNameTips = '阿里云BucketName'
t.oss.qcloudDomain = '域名'
t.oss.qcloudDomainTips = '腾讯云绑定的域名'
t.oss.qcloudPrefix = '路径前缀'
t.oss.qcloudPrefixTips = '不设置默认为空'
t.oss.qcloudAppId = 'AppId'
t.oss.qcloudAppIdTips = '腾讯云AppId'
t.oss.qcloudSecretId = 'SecretId'
t.oss.qcloudSecretIdTips = '腾讯云SecretId'
t.oss.qcloudSecretKey = 'SecretKey'
t.oss.qcloudSecretKeyTips = '腾讯云SecretKey'
t.oss.qcloudBucketName = 'BucketName'
t.oss.qcloudBucketNameTips = '腾讯云BucketName'
t.oss.qcloudRegion = '所属地区'
t.oss.qcloudRegionTips = '请选择'
t.oss.qcloudRegionBeijing1 = '北京一区(华北)'
t.oss.qcloudRegionBeijing = '北京'
t.oss.qcloudRegionShanghai = '上海(华东)'
t.oss.qcloudRegionGuangzhou = '广州(华南)'
t.oss.qcloudRegionChengdu = '成都(西南)'
t.oss.qcloudRegionChongqing = '重庆'
t.oss.qcloudRegionSingapore = '新加坡'
t.oss.qcloudRegionHongkong = '香港'
t.oss.qcloudRegionToronto = '多伦多'
t.oss.qcloudRegionFrankfurt = '法兰克福'
t.dept = {}
t.dept.name = 'Department Name'
t.dept.parentName = 'Superior Department'
t.dept.sort = 'Sort'
t.dept.parentNameDefault = 'First tier department'
t.dept.chooseerror = 'Please select a department'
t.dept.title = 'Department Selection'
t.dict = {}
t.dict.dictName = 'Dictionary Name'
t.dict.dictType = 'Dictionary Type'
t.dict.dictLabel = 'Dictionary Label'
t.dict.dictValue = 'Dictionary Value'
t.dict.sort = 'Sort'
t.dict.remark = 'Remark'
t.dict.createDate = 'Create Time'
t.logError = {}
t.logError.requestUri = 'Request URI'
t.logError.requestMethod = 'Request Method'
t.logError.requestParams = 'Request Parameters'
t.logError.ip = 'IP'
t.logError.userAgent = 'User Agent'
t.logError.createDate = 'Create Time'
t.logError.errorInfo = 'Exceptions'
t.logLogin = {}
t.logLogin.creatorName = 'User Name'
t.logLogin.status = 'Status'
t.logLogin.status0 = 'Failed'
t.logLogin.status1 = 'Success'
t.logLogin.status2 = 'Account has been locked'
t.logLogin.operation = 'Operation Type'
t.logLogin.operation0 = 'Login'
t.logLogin.operation1 = 'Logout'
t.logLogin.ip = 'IP'
t.logLogin.userAgent = 'User-Agent'
t.logLogin.createDate = 'Create Time'
t.logOperation = {}
t.logOperation.status = 'Status'
t.logOperation.status0 = 'Failed'
t.logOperation.status1 = 'Success'
t.logOperation.creatorName = 'User Name'
t.logOperation.operation = 'User Operations'
t.logOperation.requestUri = 'Request URI'
t.logOperation.requestMethod = 'Request Method'
t.logOperation.requestParams = 'Request Parameters'
t.logOperation.requestTime = 'Request Duration'
t.logOperation.ip = 'IP'
t.logOperation.userAgent = 'User-Agent'
t.logOperation.createDate = 'Create Time'
t.menu = {}
t.menu.name = 'Name'
t.menu.icon = 'Icons'
t.menu.type = 'Type'
t.menu.type0 = 'Menu'
t.menu.type1 = 'Button'
t.menu.sort = 'Sort'
t.menu.url = 'Route'
t.menu.permissions = '授权标识'
t.menu.permissionsTips = '多个用逗号分隔sys:menu:save,sys:menu:update'
t.menu.parentName = '上级菜单'
t.menu.parentNameDefault = 'First tier menu'
t.menu.resource = '授权资源'
t.menu.resourceUrl = '资源URL'
t.menu.resourceMethod = 'Request methods'
t.menu.resourceAddItem = '添加一项'
t.params = {}
t.params.name = 'Parameter Name'
t.params.code = 'Parameter Code'
t.params.paramCode = 'Parameter Code'
t.params.paramValue = 'Parameter Value'
t.params.paramStdValue = 'Standard Parameter Code'
t.params.plctitle = 'PLC Collection Parameters'
t.params.plcid = 'PLC连接表ID'
t.params.remark = 'Remark'
t.role = {}
t.role.name = 'Role Name'
t.role.remark = 'Remark'
t.role.createDate = 'Create Time'
t.role.menuList = 'Menu authorization' // ?
t.role.deptList = 'Data authorization' // ?
t.user = {}
t.user.username = 'User Name'
t.user.deptName = 'Department'
t.user.email = 'Email'
t.user.mobile = 'Phone'
t.user.status = 'Status'
t.user.status0 = 'Pause' // ?
t.user.status1 = 'Normal'
t.user.createDate = 'Create Time'
t.user.password = 'Password'
t.user.confirmPassword = 'Confirm Password'
t.user.realName = 'Actual Name'
t.user.gender = 'Gender'
t.user.gender0 = 'male'
t.user.gender1 = 'female'
t.user.gender2 = 'secret'
t.user.roleIdList = 'Role Configurations'
t.user.validate = {}
t.user.validate.confirmPassword = 'The two passwords are different. Please check again.'
t.user.select = 'Select an user'
t.user.selecterror = 'Pick up a record'
export default t

View File

@@ -21,11 +21,13 @@ export const messages = {
}
export function getLanguage() {
const chooseLanguage = Cookies.get('language')
if (chooseLanguage) return chooseLanguage
if (Cookies.get('language')) {
return Cookies.get('language')
}
// if has not choose language
const language = (navigator.language || navigator.browserLanguage).toLowerCase()
const language = (navigator.language || navigator.browserLanguage)
const locales = Object.keys(messages)
for (const locale of locales) {
if (language.indexOf(locale) > -1) {
@@ -33,8 +35,9 @@ export function getLanguage() {
return locale
}
}
Cookies.set('language', 'zh-CN')
return 'zh-CN'
Cookies.set('language', 'en')
return 'en'
}
export default new VueI18n({

View File

@@ -7,15 +7,60 @@ t.brand = {}
t.brand.lg = '生产监控系统'
t.brand.mini = '监控'
// 1 代表 '' 号的替换完成
// 2 代表 "" 号的替换完成
// 3 代表不带引号,或 {{ }} 的替换,这三种替换需按顺序执行
// ? 代表需要单独review
// 基本上完成了template模板里的替换工作
t.routes = {}
// 一级
t.routes['产品池'] = '产品池'
t.routes['基本资料'] = '基本资料'
t.routes['设备数采'] = '设备数采'
t.routes['厂务管理'] = '厂务管理'
t.routes['报表管理'] = '报表管理'
t.routes['质量管理'] = '质量管理'
t.routes['权限管理'] = '权限管理'
t.routes['系统设置'] = '系统设置'
t.routes['日志管理'] = '日志管理'
// 对比 v2, v3 的结果,补充此文件和 en.js 文件
// 然后替换vue文件的内容
// 二级
t.routes['厂务'] = '厂务'
t.routes['设备'] = '设备'
t.routes['字典管理'] = '字典管理'
t.routes['PLC信息'] = 'PLC信息'
t.routes['设备与PLC关联配置'] = '设备与PLC关联配置' // ?
t.routes['设备生产实时数据'] = '设备生产实时数据'
t.routes['产线生产实时数据'] = '产线生产实时数据'
t.routes['质量检查实时数据'] = '质量检查实时数据'
t.routes['报表总览'] = '报表总览'
t.routes['报表分类'] = '报表分类'
t.routes['报表详情'] = '报表详情'
t.routes['质量检测基础数据'] = '质量检测基础数据'
t.routes['当前检测数据'] = '当前检测数据'
t.routes['质量检查信息记录'] = '质量检查信息记录'
t.routes['用户管理'] = '用户管理'
t.routes['部门管理'] = '部门管理'
t.routes['角色管理'] = '角色管理'
t.routes['菜单管理'] = '菜单管理'
t.routes['参数管理'] = '参数管理'
t.routes['定时任务'] = '定时任务'
t.routes['文件上传'] = '文件上传'
t.routes['登录日志'] = '登录日志'
t.routes['操作日志'] = '操作日志'
// 三级
t.routes['工厂'] = '工厂'
t.routes['产线'] = '产线'
t.routes['工段'] = '工段'
t.routes['设备类型'] = '设备类型'
t.routes['设备分组'] = '设备分组'
t.routes['设备信息'] = '设备信息'
t.routes['设备参数状态监控'] = '设备参数状态监控'
t.routes['设备分组报警信息'] = '设备分组报警信息'
t.routes['质量检测类型'] = '质量检测类型'
t.routes['质量检测信息'] = '质量检测信息'
t.save = '保存'
t.add = '新增' // 1
t.delete = '删除' // 1
t.deleteBatch = '批量删除' // 1
@@ -95,6 +140,8 @@ t.link = '链接地址'
t.refresh = '刷新'
t.abbr = '缩写'
t.detail = '详情'
t.viewdetail = '查看详情'
t.viewattr = '查看属性'
t.edit = '编辑'
t.source = '来源'
t.auto = '自动'
@@ -103,6 +150,26 @@ t.loaddone = '加载完成'
t.produceTime = '生产日期'
t.enterTime = '进厂日期'
t.manufacturer = '制造商'
t.success = '修改成功!'
t.all = '全部'
t.reset = '重置'
t.preview = '预览'
t.design = '设计'
t.errors = {}
t.errors.nosection = '该产线没有工段'
t.errors.numsection = '该产线有{num}条工段'
t.errors.nodata = '没有查询到相关数据!'
t.hints = {}
t.hints.input = '请输入'
t.hints.select = '请选择'
t.hints.date = '请选择日期'
t.hints.checktime = '请选择检测时间'
t.hints.number = '请输入正确的数值'
t.hints.addr = '请输入地址'
t.hints.upload2m = '上传文件大小不要超过 2mb (2048kb)'
t.hints.upload2mPic = '上传图片文件,且大小不要超过 2mb (2048kb)'
t.factory = {}
t.factory.title = '工厂'
@@ -110,11 +177,27 @@ t.factory.name = '工厂名称'
t.factory.code = '工厂编码'
t.prod = {}
t.prod.id = '产品ID'
t.prod.name = '产品名称'
t.prod.code = '产品编码'
t.prod.type = '产品类型'
t.prod.area = '单位平方数'
t.prod.spec = '规格'
t.prod.attr = '动态属性'
t.prod.attrcode = '属性编码'
t.prod.attrcodeHints = '请输入属性编码'
t.prod.attrname = '属性名称'
t.prod.attrnameHints = '请输入属性名称'
t.prod.attrvalueHints = '请输入属性值'
t.prod.descHints = '请输入描述'
t.prod.processTime = '加工时间 (h)'
t.prod.processTimeHints = '请输入加工时间'
t.prod.relatedPid = '关联产品'
t.alarm = {}
t.alarm.name = '报警'
t.alarm.info = '报警信息'
t.alarm.view = '查看报警'
t.alarm.eq = '报警设备'
t.alarm.type = '报警类型'
t.alarm.code = '报警编码'
@@ -126,10 +209,15 @@ t.alarm.det = '报警详细内容'
t.report = {}
t.report.name = '报表名称'
t.report.det = '报表内容'
t.report.type = '报表分类'
t.report.code = '报表编码'
t.report.lnk = '链接地址'
t.inspect = {}
t.inspect.type = '检测类型'
t.inspect.code = '检测编码'
t.inspect.det = '检测内容'
t.inspect.detcode = '内容编码'
t.inspect.people = '检测人员'
t.inspect.time = '检测时间'
t.inspect.typetotal = '检测类型总数'
@@ -137,6 +225,11 @@ t.inspect.typename = '检测类型名称'
t.inspect.typecode = '检测类型编码'
t.inspect.ioTotal = '上下片及检测总数统计'
t.inspect.plTotal = '各产线检测类型统计'
t.inspect.inTotal = '上片总数'
t.inspect.outTotal = '下片总数'
t.inspect.checkTotal = '检测总数'
t.inspect.rate = '比例'
t.inspect.typeCount = '检测类型统计数据'
t.realtime = {}
@@ -145,11 +238,27 @@ t.realtime.pl = '产线生产实时数据'
t.realtime.inspect = '质量检查实时数据'
t.realtime.in = '进数据'
t.realtime.out = '出数据'
t.realtime.data = '报废数据'
t.realtime.num = '报废数量'
t.realtime.rate = '报废比例'
t.realtime.total = '总产量'
t.realtime.goodrate = '良品率'
t.realtime.runState = '是否运行'
t.realtime.state = '状态'
t.realtime.hasFault = '是否故障'
t.realtime.recentParamValue = '参数近期值'
t.realtime.view = '查看'
t.realtime.input = '投入数'
t.realtime.output = '产出数'
t.realtime.eqName = '设备名称'
t.realtime.eqCode = '设备编码'
t.realtime.productionSnapshotTime = '生产量记录时间'
t.realtime.statusSnapshotTime = '状态记录时间'
t.ws = {}
t.ws.title = '工段'
t.ws.id = '工段ID'
t.ws.name = '工段名称'
t.ws.code = '工段编码'
t.ws.binded = '已绑定的设备'
@@ -157,6 +266,8 @@ t.ws.unbind = '选择一个设备进行绑定'
t.ws.sort = '排序'
t.ws.setorder = '请输入工段中设备的顺序'
t.ws.bind = '绑定'
t.ws.eqbind = '设备绑定'
t.ws.belong = '所属产线'
t.file = {}
t.file.title = '文件'
@@ -167,6 +278,7 @@ t.file.typeCode = '文件类型编号'
t.eq = {}
t.eq.title = '设备'
t.eq.id = '设备ID'
t.eq.name = '设备名称'
t.eq.code = '设备编码'
t.eq.type = '设备类型'
@@ -177,15 +289,38 @@ t.eq.groupcode = '分组编码'
t.eq.excode = '设备外部代码'
t.eq.input = '上片数据设备'
t.eq.output = '下片数据设备'
t.eq.tvalue = '设备TT值'
t.eq.processingTime = '单件产品加工时间(秒)'
t.eq.dtype = '数据类别'
t.eq.dtypenone = '无类别'
t.eq.dtypeinput = '上片数据设备'
t.eq.dtypeoutput = '下片数据设备'
t.eq.upload = '上传资料'
t.eq.image = '设备图片'
t.eq.viewattr = '查看设备属性'
t.eq.plcbarcode = 'plc条码'
t.eq.plccode = 'PLC编码'
t.eq.plcname = 'PLC名称'
t.eq.port = '端口'
t.eq.type = '类型名称'
t.eq.typecode = '类型编码'
t.eq.parent = '父类'
t.pl = {}
t.pl.title = '产线'
t.pl.id = '产线ID'
t.pl.name = '产线名称'
t.pl.code = '产线编码'
t.pl.status = '产线状态'
t.pl.belong = '所属产线'
t.pl.tvalue = '产线TT值(每小时下片数量)'
t.pl.factoryHints = '请选择所属工厂'
t.prompt = {}
t.prompt.title = '提示'
t.prompt.info = '确定进行[{handle}]操作?'
t.prompt.sure = '确定删除这条记录吗?'
t.prompt.success = '操作成功'
t.prompt.failed = '操作失败'
t.prompt.deleteBatch = '请选择删除项'
@@ -195,6 +330,7 @@ t.validate.required = '必填项不能为空'
t.validate.format = '{attr}格式错误'
t.upload = {}
t.upload.title = '上传资料'
t.upload.text = '将文件拖到此处,或<em>点击上传</em>'
t.upload.tip = '只支持{format}格式文件!'
t.upload.button = '点击上传'
@@ -233,7 +369,7 @@ t.login.username = '用户名'
t.login.password = '密码'
t.login.captcha = '验证码'
t.login.demo = '在线演示'
t.login.copyright = '人人开源'
t.login.copyright = '版权所有:中建材智能自动化研究院有限公司 版本: 1.0'
t.schedule = {}
t.schedule.beanName = 'bean名称'
@@ -389,6 +525,9 @@ t.params.name = '参数名称'
t.params.code = '参数编码'
t.params.paramCode = '编码'
t.params.paramValue = '值'
t.params.paramStdValue = '参数设定标准值'
t.params.plctitle = 'PLC采集参数'
t.params.plcid = 'PLC连接表ID'
t.params.remark = '备注'
t.role = {}

View File

@@ -3,6 +3,7 @@ import Router from 'vue-router'
import http from '@/utils/request'
import { isURL } from '@/utils/validate'
import Cookies from 'js-cookie'
import i18n from '@/i18n'
Vue.use(Router)
@@ -104,6 +105,13 @@ router.beforeEach((to, from, next) => {
http.get(http.adornUrl('/sys/menu/nav')).then(({ data: res }) => {
/** axios 的拦截器已经拦截出错情况,此处只考虑正确情况即可 */
window.SITE_CONFIG['menuList'] = res.data
// .map(item => {
// if (item.name === '产品池') {
// console.log('Got you')
// item.name =
// }
// return item
// })
fnAddDynamicMenuRoutes(window.SITE_CONFIG['menuList'])
next({ ...to, replace: true })
}).catch((err) => {
@@ -139,6 +147,8 @@ function fnAddDynamicMenuRoutes(menuList = [], routes = []) {
for (var i = 0; i < menuList.length; i++) {
if (menuList[i].children && menuList[i].children.length >= 1) {
// 菜单的国际化
menuList[i].name = i18n.t(`routes["${menuList[i].name}"]`)
temp = temp.concat(menuList[i].children)
continue
}
@@ -150,9 +160,15 @@ function fnAddDynamicMenuRoutes(menuList = [], routes = []) {
meta: {
...window.SITE_CONFIG['contentTabDefault'],
menuId: menuList[i].id,
title: menuList[i].name
// 菜单的国际化
title: i18n.t(`routes["${menuList[i].name}"]`)
}
}
// 菜单的国际化
menuList[i].name = i18n.t(`routes["${menuList[i].name}"]`)
console.log('route ===', route.meta.title)
// eslint-disable-next-line
let URL = (menuList[i].url || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量
if (isURL(URL)) {

View File

@@ -7,7 +7,9 @@ import isPlainObject from 'lodash/isPlainObject'
import merge from 'lodash/merge'
const http = axios.create({
baseURL: window.SITE_CONFIG['apiURL'],
// baseURL: window.SITE_CONFIG['apiURL'],
// baseURL: '/api',
baseURL: process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor',
timeout: 1000 * 180,
withCredentials: true
})
@@ -71,7 +73,9 @@ http.interceptors.response.use(response => {
*/
http.adornUrl = (actionName) => {
// 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.projURL) + actionName
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? window.SITE_CONFIG.projURL : '') + actionName
// return (process.env.NODE_ENV !== 'production' ? '/yd-monitor' : '/api') + actionName
return actionName
}
/**

View File

@@ -126,11 +126,13 @@ export default {
switch (command) {
case 'toCN':
this.$root.$i18n.locale = 'zh-CN'
window.navigator.language = 'zh-cn'
break
case 'toEN':
console.log('root', this.$root.$i18n.locale)
this.$root.$i18n.locale = 'en'
location.reload()
case 'toEN':
console.log('root', this.$root.$i18n.locale)
this.$root.$i18n.locale = 'en'
location.reload()
window.navigator.language = 'en-US'
break
}
},

View File

@@ -28,6 +28,7 @@ export default {
mounted() {
// this.$store.state.sidebarMenuList = window.SITE_CONFIG['menuList']
this.$nextTick(() => {
console.log(`window.SITE_CONFIG['menuList']`, window.SITE_CONFIG['menuList'])
this.unhiddenMenuList = this.getUnhiddenRoutesListFrom(window.SITE_CONFIG['menuList'])
/** 本地保存一份store保存一份感觉 store 都不需要保存... */
this.$store.state.sidebarMenuList = this.unhiddenMenuList

View File

@@ -20,7 +20,6 @@
<h3>官方微信群</h3>
<ul>
<li>扫码下面的二维码关注人人开源公众号回复加群即可根据提示加入微信群</li>
<li><img src="https://cdn.renren.io/f5cef202207132229319338.jpg" alt="微信群" /></li>
</ul>
</div>
</el-card>

View File

@@ -36,31 +36,27 @@ import TableTextComponent from '@/components/base-table/components/detailCompone
import CKEditor from 'ckeditor4-vue'
import { calcMaxHeight } from '@/utils'
import { timeFilter } from '@/utils/filters'
import Cookies from 'js-cookie'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
// more: {
// index: function(index) {
// return (index + 1) * 2
// }
// }
},
{
prop: 'createTime',
name: i18n.t('createTime'),
filter: timeFilter
},
{ prop: 'name', name: '设备名称' },
{ prop: 'code', name: '设备编码' },
{ prop: 'equipmentTypeName', name: '设备类型' },
{ prop: 'groupName', name: '设备分组' },
{ prop: 'name', name: i18n.t('eq.name') },
{ prop: 'code', name: i18n.t('eq.code') },
{ prop: 'equipmentTypeName', name: i18n.t('eq.type') },
{ prop: 'groupName', name: i18n.t('eq.group') },
{ prop: 'enName', name: i18n.t('enname') },
{ prop: 'abbr', name: '缩写' },
{ prop: 'abbr', name: i18n.t('abbr') },
{
prop: 'details',
name: '详情',
name: i18n.t('detail'),
subcomponent: TableTextComponent,
actionName: 'view-detail'
},
@@ -78,31 +74,31 @@ const addOrUpdateConfigs = {
type: 'dialog',
infoUrl: '/monitoring/equipment',
fields: [
{ name: 'name', label: '设备名称', required: true },
{ name: 'code', label: '设备编码' },
{ name: 'name', label: i18n.t('eq.name'), required: true },
{ name: 'code', label: i18n.t('eq.code') },
{ name: 'enName', label: i18n.t('enname') },
{ name: 'abbr', label: '缩写' },
{ name: 'abbr', label: i18n.t('abbr') },
{
name: 'equipmentTypeId',
label: '设备类型',
label: i18n.t('eq.type'),
required: true,
type: 'select',
options: []
},
{
name: 'groupId',
label: '设备分组',
label: i18n.t('eq.group'),
required: true,
type: 'select',
options: []
},
{
name: 'productionTime',
label: '生产日期',
label: i18n.t('produceTime'),
type: 'date',
props: {
'type': 'date', // element-ui 的配置
'placeholder': '请选择日期',
'placeholder': i18n.t('hints.date'),
'value-format': 'yyyy-MM-ddTHH:mm:ss',
'style': {
width: '100%'
@@ -111,11 +107,11 @@ const addOrUpdateConfigs = {
},
{
name: 'enterTime',
label: '进厂日期',
label: i18n.t('enterTime'),
type: 'date',
props: {
'type': 'date', // element-ui 的配置
'placeholder': '请选择日期',
'placeholder': i18n.t('hints.date'),
'value-format': 'yyyy-MM-ddTHH:mm:ss',
'style': {
width: '100%'
@@ -124,12 +120,12 @@ const addOrUpdateConfigs = {
},
{
name: 'tvalue',
label: '设备TT值',
label: i18n.t('eq.tvalue'),
required: true,
rules: [
{
type: 'number',
message: '请输入正确的浮点值',
message: i18n.t('hints.number'),
trigger: 'blur',
transform: val => Number(val)
}
@@ -137,75 +133,76 @@ const addOrUpdateConfigs = {
},
{
name: 'processingTime',
label: '单件产品加工时间(秒)',
label: i18n.t('eq.processingTime'),
rules: [
{
type: 'number',
message: '请输入正确的数值',
message: i18n.t('hints.number'),
trigger: 'blur',
transform: val => Number(val)
}
]
},
{ name: 'manufacturer', label: '制造商' },
{ name: 'spec', label: '设备规格' },
{ name: 'manufacturer', label: i18n.t('manufacturer') },
{ name: 'spec', label: i18n.t('eq.grade') },
{
name: 'dataType',
label: '数据类别',
label: i18n.t('eq.dtype'),
required: true,
type: 'select',
options: [
{ value: 0, label: '无类别' },
{ value: 1, label: '上片数据设备' },
{ value: 2, label: '下片数据设备' }
{ value: 0, label: i18n.t('eq.dtypenone') },
{ value: 1, label: i18n.t('eq.dtypeinput') },
{ value: 2, label: i18n.t('eq.dtypeoutput') }
]
},
{ name: 'remark', label: '备注 ' }
{ name: 'remark', label: i18n.t('remark') }
],
extraComponents: [
{
name: 'description',
hasModel: true,
label: '功能描述',
label: i18n.t('desc'),
fieldType: 'string',
component: CKEditor.component,
props: {
value: 'tests',
// value: 'tests',
config: {
// ckeditor 的配置: https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html
// toolbar: [['Bold']]
language: Cookies.get('language') || 'en'
}
}
},
{
name: 'files',
label: '上传资料',
label: i18n.t('upload.title'),
fieldType: 'array',
component: () => import('@/components/base-upload'),
props: {
// 上传组件需要的 props
url: '/monitoring/attachment/uploadFileFormData',
extraParams: { typeCode: 'EquipmentInfoFile' },
buttonContent: '点击上传',
tip: '上传文件大小不要超过 2mb (2048kb)'
buttonContent: i18n.t('upload.button'),
tip: i18n.t('hints.upload2m')
}
},
{
name: 'files',
label: '设备图片',
label: i18n.t('eq.image'),
fieldType: 'array',
component: () => import('@/components/base-upload'),
props: {
// 上传组件需要的 props
url: '/monitoring/attachment/uploadFileFormData',
extraParams: { typeCode: 'EquipmentInfoImage' },
buttonContent: '点击上传',
tip: '上传图片文件,且大小不要超过 2mb (2048kb)'
buttonContent: i18n.t('upload.button'),
tip: i18n.t('hints.upload2mPic')
}
}
],
subtable: {
title: '查看设备属性',
title: i18n.t('eq.viewattr'),
url: '/monitoring/equipmentAttr',
relatedField: 'equipmentId',
tableConfigs: [
@@ -417,7 +414,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -429,7 +426,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -19,31 +19,31 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -143,7 +143,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -41,14 +41,14 @@ const tableConfigs = [
{ prop: 'alarmContent', name: '报警详细内容' },
{ prop: 'alarmEquipmentId', name: '报警设备id 关联equipment表' },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
{ prop: 'creatorId', name: '创建人' },
{ prop: 'creatorName', name: '创建人姓名' },
{ prop: 'valid', name: i18n.t('delMark') },
{ prop: 'creatorId', name: i18n.t('creator') },
{ prop: 'creatorName', name: i18n.t('creatorName') },
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'updaterId', name: '更新人' },
{ prop: 'updaterName', name: '更新人姓名' },
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
{ prop: 'version', name: '版本号' },
{ prop: 'updaterId', name: i18n.t('updator') },
{ prop: 'updaterName', name: i18n.t('updatorName') },
{ prop: 'updateTime', name: i18n.t('updateTime'), filter: timeFilter },
{ prop: 'version', name: i18n.t('version') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -128,7 +128,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -140,7 +140,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -16,31 +16,31 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -136,7 +136,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -0,0 +1,249 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-select v-model="dataForm.lineId" :placeholder="'产线'" clearable>
<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="dataForm.equipmentId" :placeholder="'设备名称'" clearable>
<el-option v-for="eq in eqList" :key="eq.code" :value="eq.id" :label="eq.name" />
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</el-form-item>
</el-form>
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div>
</template>
<script>
import { calcMaxHeight } from '@/utils'
import { timeFilter } from '@/utils/filters'
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
// import AddOrUpdate from './equipmentGroup-add-or-update'
import i18n from '@/i18n'
import BaseTable from '@/components/base-table'
// import TableOperateComponent from '@/components/base-table/components/operationComponent'
import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'equipmentName', name: i18n.t('realtime.eqName') },
{ prop: 'equipmentCode', name: i18n.t('realtime.eqCode') },
{ prop: 'inputNum', name: i18n.t('realtime.input') },
{ prop: 'outputNum', name: i18n.t('realtime.output') },
{
prop: 'run',
name: i18n.t('realtime.runState'),
filter: val => {
if (val !== null && val !== undefined) return val ? '是' : '否'
}
},
{
prop: 'status',
name: i18n.t('realtime.state'),
filter: val => {
if (val !== null && val !== undefined) return ['正常', '计划停机', '故障'][+val]
}
},
{
prop: 'error',
name: i18n.t('realtime.hasFault'),
filter: val => {
if (val !== null && val !== undefined) return val ? '是' : '否'
}
},
{ prop: 'quantityTime', name: i18n.t('realtime.productionSnapshotTime'), filter: timeFilter },
{ prop: 'statusTime', name: i18n.t('realtime.statusSnapshotTime'), filter: timeFilter },
{ prop: 'alarm', name: i18n.t('realtime.recentParamValue'), buttonContent: i18n.t('realtime.view'), subcomponent: TableTextComponent, actionName: 'view-alarm' }
// { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
const addOrUpdateConfigs = {
type: 'dialog',
infoUrl: '/monitoring/equipmentGroup',
fields: [{ name: 'name', label: i18n.t('eq.groupname') }, { name: 'code', label: i18n.t('eq.groupcode') }, 'remark'],
operations: [
{ name: 'cancel', showAlways: true },
{ name: 'save', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:save', showOnEdit: false },
{ name: 'update', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:update', showOnEdit: true }
]
}
export default {
data() {
return {
addOrUpdateConfigs,
calcMaxHeight,
tableConfigs,
dataForm: {
equipmentId: '',
lineId: ''
},
dataList: [],
eqList: [],
lineList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false
}
},
components: {
AddOrUpdate,
BaseTable
},
activated() {
this.getEqList()
this.getLineList()
this.getDataList()
},
methods: {
// 设备
getEqList() {
this.$http({
url: this.$http.adornUrl('/monitoring/equipment/page'),
method: 'get'
}).then(({ data }) => {
if (data && data.code === 0) {
this.eqList = data.data.list
} else {
this.eqList = []
}
})
},
// 产线
getLineList() {
this.$http({
url: this.$http.adornUrl('/monitoring/productionLine/list'),
method: 'get'
}).then(({ data }) => {
if (data && data.code === 0) {
this.lineList = data.data
} else {
this.lineList = []
}
})
},
// 获取数据列表
getDataList() {
this.addOrUpdateVisible = false
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/monitoring/equipmentValueMonitor/realTimePage'),
method: 'get',
params: this.$http.adornParams({
page: this.pageIndex,
limit: this.pageSize,
equipmentId: this.dataForm.equipmentId,
lineId: this.dataForm.lineId
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.data.list
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
// 每页数
sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle(val) {
this.pageIndex = val
this.getDataList()
},
// 多选
selectionChangeHandle(val) {
this.dataListSelections = val
},
handleOperations({ type, data: id }) {
switch (type) {
case 'view-alarm':
const { name, code } = this.dataList.find(item => item.id === id)
this.$router.push({
name: 'monitoring-equipmentGroupAlarm',
params: {
groupName: name,
groupCode: code,
id
}
})
break
case 'edit':
return this.addOrUpdateHandle(id)
case 'delete':
return this.deleteHandle(id)
}
},
// 新增 / 修改
addOrUpdateHandle(id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
},
// 删除
deleteHandle(id) {
var ids = id
? [id]
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/monitoring/equipmentGroup'),
method: 'delete',
data: this.$http.adornData(ids, false, 'raw')
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
})
}
}
}
</script>

View File

@@ -7,8 +7,8 @@
<el-form-item label="文件ID" prop="fileId">
<el-input v-model="dataForm.fileId" placeholder="文件ID"></el-input>
</el-form-item>
<el-form-item label=$t('desc') prop="description">
<el-input v-model="dataForm.description" placeholder=$t('desc')></el-input>
<el-form-item :label="$t('desc')" prop="description">
<el-input v-model="dataForm.description" :placeholder="$t('desc')"></el-input>
</el-form-item>
<el-form-item label="启用状态:0 、停用1、启用" prop="enabled">
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用1、启用"></el-input>
@@ -19,26 +19,26 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
<el-form-item label="文件类型编号" prop="typeCode">
<el-input v-model="dataForm.typeCode" placeholder="文件类型编号"></el-input>
@@ -51,8 +51,8 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -164,7 +164,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -39,16 +39,16 @@ const tableConfigs = [
{ prop: 'equipmentId', name: '设备ID' },
{ prop: 'fileId', name: '文件ID' },
{ prop: 'description', name: i18n.t('desc') },
{ prop: 'enabled', name: '启用状态:0 、停用1、启用' },
{ prop: 'enabled', name: i18n.t('enabled') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
{ prop: 'creatorId', name: '创建人' },
{ prop: 'creatorName', name: '创建人姓名' },
{ prop: 'valid', name: i18n.t('delMark') },
{ prop: 'creatorId', name: i18n.t('creator') },
{ prop: 'creatorName', name: i18n.t('creatorName') },
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'updaterId', name: '更新人' },
{ prop: 'updaterName', name: '更新人姓名' },
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
{ prop: 'version', name: '版本号' },
{ prop: 'updaterId', name: i18n.t('updator') },
{ prop: 'updaterName', name: i18n.t('updatorName') },
{ prop: 'updateTime', name: i18n.t('updateTime'), filter: timeFilter },
{ prop: 'version', name: i18n.t('version') },
{ prop: 'typeCode', name: '文件类型编号' },
{ prop: 'fileName', name: '文件名字' },
{ prop: 'fileUrl', name: i18n.t('downloadurl') },
@@ -131,7 +131,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -143,7 +143,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -2,7 +2,7 @@
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('eq.groupname')+' / '+$t('eq.groupcode')" clearable></el-input>
<el-input v-model="dataForm.key" :placeholder="$t('eq.groupname') + ' / ' + $t('eq.groupcode')" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
@@ -37,18 +37,22 @@ import TableOperateComponent from '@/components/base-table/components/operationC
import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'name', name: '分组名称' },
{ prop: 'code', name: '分组编码' },
{ prop: 'name', name: i18n.t('eq.groupname') },
{ prop: 'code', name: i18n.t('eq.groupcode') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'alarm', name: '报警', buttonContent: '查看报警', subcomponent: TableTextComponent, actionName: 'view-alarm' },
{ prop: 'alarm', name: i18n.t('alarm.name'), buttonContent: i18n.t('alarm.view'), subcomponent: TableTextComponent, actionName: 'view-alarm' },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
const addOrUpdateConfigs = {
type: 'dialog',
infoUrl: '/monitoring/equipmentGroup',
fields: [{ name: 'name', label: '分组名称' }, { name: 'code', label: '分组编码' }, 'remark'],
fields: [{ name: 'name', label: i18n.t('eq.groupname') }, { name: 'code', label: i18n.t('eq.groupcode') }, 'remark'],
operations: [
{ name: 'cancel', showAlways: true },
{ name: 'save', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:save', showOnEdit: false },
@@ -153,7 +157,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -165,7 +169,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -55,11 +55,15 @@ const dictEntries = {
}
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'code', name: '报警编码' },
{ prop: 'typeDictValue', name: '报警类型' },
{ prop: 'gradeDictValue', name: '报警级别' },
{ prop: 'alarmContent', name: '报警内容' },
{ prop: 'code', name: i18n.t('alarm.code') },
{ prop: 'typeDictValue', name: i18n.t('alarm.type') },
{ prop: 'gradeDictValue', name: i18n.t('alarm.level') },
{ prop: 'alarmContent', name: i18n.t('alarm.content') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -67,10 +71,10 @@ const addOrUpdateConfigs = {
type: 'dialog',
infoUrl: '/monitoring/equipmentGroupAlarm',
fields: [
{ name: 'code', label: '报警编码', required: true },
{ name: 'typeDictValue', label: '报警类型', type: 'select', options: [] },
{ name: 'gradeDictValue', label: '报警级别', type: 'select', options: [] },
{ name: 'alarmContent', label: '报警内容', required: true }
{ name: 'code', label: i18n.t('alarm.code'), required: true },
{ name: 'typeDictValue', label: i18n.t('alarm.type'), type: 'select', options: [] },
{ name: 'gradeDictValue', label: i18n.t('alarm.level'), type: 'select', options: [] },
{ name: 'alarmContent', label: i18n.t('alarm.content'), required: true }
],
operations: [
{ name: 'cancel', showAlways: true },
@@ -186,7 +190,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -198,7 +202,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -34,7 +34,7 @@ import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
import i18n from '@/i18n'
import BaseTable from '@/components/base-table'
import TableOperateComponent from '@/components/base-table/components/operationComponent'
import TableTextComponent from '@/components/base-table/components/detailComponent'
// import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [
{ type: 'index', width: 100, name: i18n.t('index') },
@@ -42,10 +42,10 @@ const tableConfigs = [
{ prop: 'name', name: i18n.t('name') },
{ prop: 'enName', name: i18n.t('enname') },
{ prop: 'description', name: i18n.t('desc') },
{ prop: 'barcode', name: 'plc条码' },
{ prop: 'barcode', name: i18n.t('eq.plcbarcode') },
{ prop: 'collection', name: i18n.t('collectOrNot'), filter: val => ({ 0: i18n.t('notCollect'), 1: i18n.t('collect') }[val]) },
{ prop: 'ip', name: 'IP' },
{ prop: 'port', name: '端口号' },
{ prop: 'port', name: i18n.t('eq.port') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -68,10 +68,10 @@ const addOrUpdateConfigs = {
]
},
{ name: 'ip', label: 'IP', required: true, placeholder: '0.0.0.0' },
{ name: 'port', label: '端口', placeholder: '443' },
{ name: 'port', label: i18n.t('eq.port'), placeholder: '443' },
'description',
'remark',
{ name: 'barcode', label: 'plc条码', span: 24 }
{ name: 'barcode', label: i18n.t('eq.plcbarcode'), span: 24 }
],
operations: [
{ name: 'cancel', url: true, showAlways: true },
@@ -166,7 +166,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -178,7 +178,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -29,7 +29,7 @@
<script>
import { calcMaxHeight } from '@/utils'
import { timeFilter } from '@/utils/filters'
// import { timeFilter } from '@/utils/filters'
// import AddOrUpdate from './equipmentPlcConnect-add-or-update'
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
import i18n from '@/i18n'
@@ -41,12 +41,12 @@ import { dictFilter } from '@/utils/filters'
const tableConfigs = [
{ type: 'index', width: 100, name: i18n.t('index') },
{ prop: 'lineName', name: '产线' },
{ prop: 'sectionName', name: '工段' },
{ prop: 'lineName', name: i18n.t('pl.title') },
{ prop: 'sectionName', name: i18n.t('ws.title') },
{ prop: 'equName', name: i18n.t('equipment') },
{ prop: 'equCode', name: '设备编码' },
{ prop: 'plcCode', name: 'PLC编码' },
{ prop: 'plcName', name: 'PLC名称' },
{ prop: 'equCode', name: i18n.t('eq.code') },
{ prop: 'plcCode', name: i18n.t('eq.plccode') },
{ prop: 'plcName', name: i18n.t('eq.plcname') },
{ prop: 'plcIp', name: 'PLC IP' },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -61,7 +61,7 @@ const addOrUpdateConfigs = {
infoUrl: '/monitoring/equipmentPlcConnect',
fields: [
{ name: 'equipmentId', label: i18n.t('equipment'), required: true, type: 'select', options: [] },
{ name: 'plcId', label: 'PLC名称', required: true, type: 'select', options: [] }
{ name: 'plcId', label: i18n.t('eq.plcname'), required: true, type: 'select', options: [] }
],
operations: [
{ name: 'cancel', url: true, showAlways: true },
@@ -69,19 +69,18 @@ const addOrUpdateConfigs = {
{ name: 'update', url: '/monitoring/equipmentPlcConnect', permission: 'monitoring:equipmentplcconnect:update', showOnEdit: true }
],
subtable: {
title: 'PLC采集参数',
title: i18n.t('params.plctitle'),
url: '/monitoring/equipmentPlcParam',
relatedField: 'plcConId',
tableConfigs: [
{ type: 'index', width: 100, name: i18n.t('index') },
// { prop: 'plcConId', name: 'plc连接表ID' },
{ prop: 'paramCode', name: '参数编码', formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] },
{ prop: 'paramName', name: '参数名称', formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] },
{ prop: 'paramCode', name: i18n.t('params.code'), formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] },
{ prop: 'paramName', name: i18n.t('params.name'), formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] },
{ prop: 'paramAddress', name: i18n.t('paramUrl'), formField: true },
{ prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId), formField: true, formType: 'select', formOptions: getUnitList() },
{ prop: 'minValue', name: i18n.t('min'), formField: true },
{ prop: 'maxValue', name: i18n.t('max'), formField: true },
{ prop: 'defaultValue', name: '参数设定标准值', formField: true },
{ prop: 'defaultValue', name: i18n.t('params.paramStdValue'), formField: true },
{ prop: 'description', name: i18n.t('desc'), formField: true },
{
prop: 'enabled',
@@ -97,7 +96,6 @@ const addOrUpdateConfigs = {
]
},
{ prop: 'remark', name: i18n.t('remark'), formField: true },
// { prop: 'createTime', name: i18n.t('createTime') },
{
prop: 'collection',
name: i18n.t('collectOrNot'),
@@ -232,7 +230,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -244,7 +242,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -31,8 +31,8 @@
<el-form-item label="参数设定标准值" prop="defaultValue">
<el-input v-model="dataForm.defaultValue" placeholder="参数设定标准值"></el-input>
</el-form-item>
<el-form-item label=$t('desc') prop="description">
<el-input v-model="dataForm.description" placeholder=$t('desc')></el-input>
<el-form-item :label="$t('desc')" prop="description">
<el-input v-model="dataForm.description" :placeholder="$t('desc')"></el-input>
</el-form-item>
<el-form-item label="启用状态:0 、停用1、启用" prop="enabled">
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用1、启用"></el-input>
@@ -43,26 +43,26 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
<el-form-item label="0 代表不采集, 1 代表采集" prop="collection">
<el-input v-model="dataForm.collection" placeholder="0 代表不采集, 1 代表采集"></el-input>
@@ -81,8 +81,8 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -234,7 +234,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -28,7 +28,7 @@
<script>
import { calcMaxHeight } from '@/utils'
import { timeFilter } from '@/utils/filters'
// import { timeFilter } from '@/utils/filters'
import AddOrUpdate from './equipmentPlcParam-add-or-update'
import i18n from '@/i18n'
import BaseTable from '@/components/base-table'
@@ -40,14 +40,14 @@ const UnitDictTypeId = '1557173812109242370'
const tableConfigs = [
{ type: 'index', width: 100, name: i18n.t('index') },
{ prop: 'plcConId', name: 'plc连接表ID' },
{ prop: 'paramCode', name: '参数编码' },
{ prop: 'paramName', name: '参数名称' },
{ prop: 'plcConId', name: i18n.t('params.plcid') },
{ prop: 'paramCode', name: i18n.t('params.code') },
{ prop: 'paramName', name: i18n.t('params.name') },
{ prop: 'paramAddress', name: i18n.t('paramUrl') },
{ prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId) },
{ prop: 'minValue', name: i18n.t('min') },
{ prop: 'maxValue', name: i18n.t('max') },
{ prop: 'defaultValue', name: '参数设定标准值' },
{ prop: 'defaultValue', name: i18n.t('params.paramStdValue') },
{ prop: 'description', name: i18n.t('desc') },
{ prop: 'enabled', name: i18n.t('enabled'), filter: val => [i18n.t('disable'), i18n.t('enable')][+val] },
{ prop: 'remark', name: i18n.t('remark') },
@@ -130,7 +130,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -142,7 +142,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -28,34 +28,34 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
<el-form-item label="生产数量的记录时间" prop="recordTime">
<el-input v-model="dataForm.recordTime" placeholder="生产数量的记录时间"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -171,7 +171,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -38,7 +38,7 @@ import TableTextComponent from '@/components/base-table/components/detailCompone
const tableConfigs = [
{ prop: 'id', name: 'id' },
{ prop: 'externalCode', name: '设备外部编码' },
{ prop: 'equipmentName', name: '设备名称' },
{ prop: 'equipmentName', name: i18n.t('eq.name') },
{ prop: 'inQuantity', name: '进入设备的数量' },
{
prop: 'outQuantity',
@@ -48,14 +48,14 @@ const tableConfigs = [
{ prop: 'nokQuantity', name: '设备上报的报废数量' },
{ prop: 'description', name: '' },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
{ prop: 'creatorId', name: '创建人' },
{ prop: 'creatorName', name: '创建人姓名' },
{ prop: 'valid', name: i18n.t('delMark') },
{ prop: 'creatorId', name: i18n.t('creator') },
{ prop: 'creatorName', name: i18n.t('creatorName') },
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'updaterId', name: '更新人' },
{ prop: 'updaterName', name: '更新人姓名' },
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
{ prop: 'version', name: '版本号' },
{ prop: 'updaterId', name: i18n.t('updator') },
{ prop: 'updaterName', name: i18n.t('updatorName') },
{ prop: 'updateTime', name: i18n.t('updateTime'), filter: timeFilter },
{ prop: 'version', name: i18n.t('version') },
{ prop: 'recordTime', name: '生产数量的记录时间' },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -136,7 +136,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -148,7 +148,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -28,31 +28,31 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -164,7 +164,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -41,18 +41,18 @@ const tableConfigs = [
{ prop: 'plcId', name: 'plc id' },
{ prop: 'plc', name: 'plc' },
{ prop: 'equipmentId', name: '设备id' },
{ prop: 'equipmentName', name: '设备名称' },
{ prop: 'equipmentName', name: i18n.t('eq.name') },
{ prop: 'status', name: '状态0正常 1计划停机 2故障' },
{ prop: 'logTime', name: i18n.t('recordTime') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
{ prop: 'creatorId', name: '创建人' },
{ prop: 'creatorName', name: '创建人姓名' },
{ prop: 'valid', name: i18n.t('delMark') },
{ prop: 'creatorId', name: i18n.t('creator') },
{ prop: 'creatorName', name: i18n.t('creatorName') },
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'updaterId', name: '更新人' },
{ prop: 'updaterName', name: '更新人姓名' },
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
{ prop: 'version', name: '版本号' },
{ prop: 'updaterId', name: i18n.t('updator') },
{ prop: 'updaterName', name: i18n.t('updatorName') },
{ prop: 'updateTime', name: i18n.t('updateTime'), filter: timeFilter },
{ prop: 'version', name: i18n.t('version') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -132,7 +132,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -144,7 +144,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -37,9 +37,13 @@ import TableOperateComponent from '@/components/base-table/components/operationC
// import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'name', name: '类型名称' },
{ prop: 'code', name: '类型编码' },
{ prop: 'name', name: i18n.t('eq.type') },
{ prop: 'code', name: i18n.t('eq.typecode') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -48,9 +52,9 @@ const addOrUpdateConfigs = {
type: 'dialog',
infoUrl: '/monitoring/equipmentType',
fields: [
{ name: 'name', label: '设备类型名称' },
{ name: 'code', label: '设备类型编码', api: '/monitoring/equipmentType/getCode' },
{ name: 'parentId', label: '父类', type: 'cascader', props: { label: 'name', value: 'id', checkStrictly: true, emitPath: false }, options: [] },
{ name: 'name', label: i18n.t('eq.type') },
{ name: 'code', label: i18n.t('eq.typecode'), api: '/monitoring/equipmentType/getCode' },
{ name: 'parentId', label: i18n.t('eq.parent'), type: 'cascader', props: { label: 'name', value: 'id', checkStrictly: true, emitPath: false }, options: [] },
'remark'
],
operations: [
@@ -62,14 +66,14 @@ const addOrUpdateConfigs = {
{
name: 'files',
fieldType: 'array',
label: '上传资料',
label: i18n.t('upload.title'),
component: () => import('@/components/base-upload'),
props: {
// 上传组件需要的 props
url: '/monitoring/attachment/uploadFileFormData',
extraParams: { typeCode: 'EquipmentTypeFile' },
buttonContent: '点击上传',
tip: '上传文件大小不要超过 2mb (2048kb)'
buttonContent: i18n.t('upload.button'),
tip: i18n.t('hints.upload2m')
}
}
]
@@ -177,7 +181,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -189,7 +193,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -16,8 +16,8 @@
<el-form-item label="下载地址" prop="fileUrl">
<el-input v-model="dataForm.fileUrl" placeholder="下载地址"></el-input>
</el-form-item>
<el-form-item label=$t('desc') prop="description">
<el-input v-model="dataForm.description" placeholder=$t('desc')></el-input>
<el-form-item :label="$t('desc')" prop="description">
<el-input v-model="dataForm.description" :placeholder="$t('desc')"></el-input>
</el-form-item>
<el-form-item label="启用状态:0 、停用1、启用" prop="enabled">
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用1、启用"></el-input>
@@ -28,31 +28,31 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -164,7 +164,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -39,20 +39,20 @@ const tableConfigs = [
{ prop: 'id', name: 'ID' },
{ prop: 'equipmentTypeId', name: '设备类型ID' },
{ prop: 'fileId', name: '文件ID' },
{ prop: 'typeCode', name: '文件类型编码' },
{ prop: 'fileName', name: '文件名称' },
{ prop: 'typeCode', name: i18n.t('file.typeCode') },
{ prop: 'fileName', name: i18n.t('file.name') },
{ prop: 'fileUrl', name: i18n.t('downloadurl') },
{ prop: 'description', name: i18n.t('desc') },
{ prop: 'enabled', name: '启用状态:0 、停用1、启用' },
{ prop: 'enabled', name: i18n.t('enabled') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
{ prop: 'creatorId', name: '创建人' },
{ prop: 'creatorName', name: '创建人姓名' },
{ prop: 'valid', name: i18n.t('delMark') },
{ prop: 'creatorId', name: i18n.t('creator') },
{ prop: 'creatorName', name: i18n.t('creatorName') },
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'updaterId', name: '更新人' },
{ prop: 'updaterName', name: '更新人姓名' },
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
{ prop: 'version', name: '版本号' },
{ prop: 'updaterId', name: i18n.t('updator') },
{ prop: 'updaterName', name: i18n.t('updatorName') },
{ prop: 'updateTime', name: i18n.t('updateTime'), filter: timeFilter },
{ prop: 'version', name: i18n.t('version') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -132,7 +132,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -144,7 +144,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -33,12 +33,16 @@ import AddOrUpdate from './equipmentAttr-add-or-update'
import i18n from '@/i18n'
import BaseTable from '@/components/base-table'
import TableOperateComponent from '@/components/base-table/components/operationComponent'
import TableTextComponent from '@/components/base-table/components/detailComponent'
// import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'equipmentId', name: '设备ID' },
{ prop: 'attrName', name: '属性名称' },
{ prop: 'equipmentId', name: i18n.t('eq.id') },
{ prop: 'attrName', name: i18n.t('attrName') },
{ prop: 'attrValue', name: i18n.t('attrValue') },
{
prop: 'operations',
@@ -126,7 +130,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -138,7 +142,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -34,12 +34,16 @@ import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
import i18n from '@/i18n'
import BaseTable from '@/components/base-table'
import TableOperateComponent from '@/components/base-table/components/operationComponent'
import TableTextComponent from '@/components/base-table/components/detailComponent'
// import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'name', name: '工厂名称' },
{ prop: 'code', name: '工厂编码' },
{ prop: 'name', name: i18n.t('factory.name') },
{ prop: 'code', name: i18n.t('factory.code') },
{ prop: 'address', name: i18n.t('addr') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
@@ -57,7 +61,7 @@ const addOrUpdateConfigs = {
{
name: 'address',
label: i18n.t('addr'),
placeholder: '请输入地址'
placeholder: i18n.t('hints.addr')
},
'remark'
],
@@ -155,7 +159,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -167,7 +171,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -48,9 +48,9 @@ const ProductTypeDictTypeId = '1557179530308616193'
const tableConfigs = [
{ type: 'index', width: 100, name: i18n.t('index') },
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'name', name: '产品名称' },
{ prop: 'code', name: '产品编码' },
{ prop: 'specifications', name: '规格' },
{ prop: 'name', name: i18n.t('prod.name') },
{ prop: 'code', name: i18n.t('prod.code') },
{ prop: 'specifications', name: i18n.t('prod.spec') },
{ prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId) },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['viewAttr', 'delete'] }
]
@@ -66,8 +66,8 @@ const addOrUpdateConfigs = {
},
{
name: 'processTime',
label: '加工时间',
placeholder: '请输入加工时间',
label: i18n.t('prod.processTime'),
placeholder: i18n.t('prod.processTimeHints'),
type: 'number',
required: true,
rules: [
@@ -75,13 +75,13 @@ const addOrUpdateConfigs = {
type: 'number',
trigger: 'blur',
transform: val => Number(val),
message: '必须输入数字'
message: i18n.t('hints.number')
}
]
},
{
name: 'typeDictValue',
label: '产品类型', // 对于非常见属性最好自己指定label
label: i18n.t('prod.type'), // 对于非常见属性最好自己指定label
type: 'select',
options: [
// 动态获取
@@ -98,9 +98,9 @@ const addOrUpdateConfigs = {
},
{
name: 'area',
label: '单位平方数',
label: i18n.t('prod.area'),
type: 'number',
rules: [{ type: 'number', transform: val => Number(val), message: '请输入数字', trigger: 'blur' }]
rules: [{ type: 'number', transform: val => Number(val), message: i18n.t('hints.number'), trigger: 'blur' }]
},
'specifications',
'remark'
@@ -112,13 +112,13 @@ const addOrUpdateConfigs = {
],
subtable: {
// for i18n
title: '动态属性',
title: i18n.t('prod.attr'),
url: '/monitoring/productArrt',
relatedField: 'productId',
tableConfigs: [
{ type: 'index', width: 100, name: i18n.t('index') },
{ prop: 'createTime', name: i18n.t('createTime'), filter: val => (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') },
{ prop: 'name', name: '属性名称', formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] },
{ prop: 'name', name: i18n.t('attrName'), formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] },
{ prop: 'code', name: i18n.t('attrValue'), formField: true },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -237,7 +237,7 @@ export default {
this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -252,7 +252,7 @@ export default {
.then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -39,8 +39,8 @@ import TableOperateComponent from '@/components/base-table/components/operationC
const tableConfigs = [
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'name', name: i18n.t('attrName') },
{ prop: 'code', name: '属性编码' },
{ prop: 'productId', name: '产品id' },
{ prop: 'code', name: i18n.t('prod.attrcode') },
{ prop: 'productId', name: i18n.t('prod.id') },
{ prop: 'value', name: i18n.t('attrValue') },
{ prop: 'description', name: i18n.t('desc') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
@@ -53,28 +53,28 @@ const addOrUpdateConfigs = {
{
name: 'name',
label: i18n.t('attrName'),
placeholder: '请输入属性名称'
placeholder: i18n.t('prod.attrnameHints')
},
{
name: 'code',
label: '属性编码',
placeholder: '请输入属性编码'
label: i18n.t('prod.attrcode'),
placeholder: i18n.t('prod.attrcodeHints')
},
{
name: 'productId',
label: '关联产品',
label: i18n.t('prod.relatedPid'),
type: 'select',
options: []
},
{
name: 'value',
label: i18n.t('attrValue'),
placeholder: '请输入属性值'
placeholder: i18n.t('prod.attrvalueHints')
},
{
name: 'description',
label: i18n.t('desc'),
placeholder: '请输入描述'
placeholder: i18n.t('prod.descHints')
}
],
operations: [
@@ -192,7 +192,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -204,7 +204,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -36,11 +36,15 @@ import TableOperateComponent from '@/components/base-table/components/operationC
// import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'factoryName', name: '工厂' },
{ prop: 'name', name: '产线名称' },
{ prop: 'code', name: '产线编码' },
{ prop: 'status', name: '产线状态' },
{ prop: 'factoryName', name: i18n.t('factory.title') },
{ prop: 'name', name: i18n.t('pl.name') },
{ prop: 'code', name: i18n.t('pl.code') },
{ prop: 'status', name: i18n.t('pl.status') },
{ prop: 'description', name: i18n.t('desc') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
@@ -54,18 +58,18 @@ const addOrUpdateConfigs = {
{ name: 'code', api: '/monitoring/productionLine/getCode' },
{
name: 'factoryId',
label: '工厂',
label: i18n.t('factory.title'),
type: 'select',
placeholder: '请选择所属工厂',
placeholder: i18n.t('pl.factoryHints'),
options: []
},
{
name: 'tvalue',
label: '产线TT值(每小时下片数量)',
placeholder: '请输入合理数值',
label: i18n.t('pl.tvalue'),
placeholder: i18n.t('hints.number'),
type: 'number', // TODO: 可改进为自动应用 number 验证,此时还必须添加下述规则:
required: true,
rules: [{ type: 'number', transform: val => Number(val), trigger: 'blur', message: '请输入数字类型' }]
rules: [{ type: 'number', transform: val => Number(val), trigger: 'blur', message: i18n.t('hints.number') }]
},
'description',
'remark'
@@ -181,7 +185,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -193,7 +197,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -24,8 +24,8 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -101,7 +101,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -37,11 +37,11 @@ import TableTextComponent from '@/components/base-table/components/detailCompone
const tableConfigs = [
{ prop: 'id', name: 'ID' },
{ prop: 'productionLineId', name: '产线id' },
{ prop: 'productionLineId', name: i18n.t('pl.id') },
{ prop: 'inputNum', name: '上一次记录时间至该条记录时间端内上片数量' },
{ prop: 'outputNum', name: '上一次记录时间至该条记录时间端内下片数量' },
{ prop: 'recordTime', name: i18n.t('recordTime') },
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
{ prop: 'valid', name: i18n.t('delMark') },
{ prop: 'sumInputNum', name: '该记录时间点的累计上片数量' },
{ prop: 'sumOutputNum', name: '该记录时间点的累计下片数量' },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
@@ -123,7 +123,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -135,7 +135,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -70,17 +70,17 @@ import * as echarts from 'echarts'
const tableConfigStatic = [
{ type: 'index', width: 100, name: i18n.t('index') },
{ name: '上片总数', prop: 'sumUp' },
{ name: '下片总数', prop: 'sumDown' },
{ name: '检测总数', prop: 'sumCheck' },
{ name: '比例', prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') }
{ name: i18n.t('inspect.inTotal'), prop: 'sumUp' },
{ name: i18n.t('inspect.outTotal'), prop: 'sumDown' },
{ name: i18n.t('inspect.checkTotal'), prop: 'sumCheck' },
{ name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') }
]
const tableConfigDynamic = [
{ type: 'index', width: 100, name: i18n.t('index') },
{ name: '检测类型', prop: 'inspectionContent' },
{ name: i18n.t('inspect.type'), prop: 'inspectionContent' },
/** dynamic */
{ name: '检测类型总数', prop: '' },
{ name: '比例', prop: '' }
{ name: i18n.t('inspect.typetotal'), prop: '' },
{ name: i18n.t('inspect.rate'), prop: '' }
]
const FakeChart = {
@@ -105,7 +105,7 @@ const FakeChart = {
chart: null,
defaultOpts: {
title: {
text: '检测类型统计数据'
text: i18n.t('inspect.typeCount')
},
tooltip: {},
legend: {
@@ -281,10 +281,10 @@ export default {
this.tableConfigDynamic = [
{ type: 'index', width: 100, name: i18n.t('index') },
{ name: '检测类型', prop: 'inspectionContent' },
{ name: i18n.t('inspect.type'), prop: 'inspectionContent' },
...subProps,
{ name: '检测类型总数', prop: 'sumInput' },
{ name: '比例', prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') }
{ name: i18n.t('inspect.typetotal'), prop: 'sumInput' },
{ name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') }
]
/** echarts related */

View File

@@ -37,10 +37,14 @@ import TableOperateComponent from '@/components/base-table/components/operationC
// import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'typeName', name: '检测类型' },
{ prop: 'content', name: '检测内容' },
{ prop: 'code', name: '检测编码' },
{ prop: 'typeName', name: i18n.t('inspect.type') },
{ prop: 'content', name: i18n.t('inspect.det') },
{ prop: 'code', name: i18n.t('inspect.code') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -49,9 +53,9 @@ const addOrUpdateConfigs = {
type: 'dialog',
infoUrl: '/monitoring/qualityInspectionDet',
fields: [
{ name: 'typeId', label: '检测类型', type: 'select', options: [] },
{ name: 'content', label: '检测内容' },
{ name: 'code', label: '内容编码', api: '/monitoring/qualityInspectionDet/getCode' },
{ name: 'typeId', label: i18n.t('inspect.type'), type: 'select', options: [] },
{ name: 'content', label: i18n.t('inspect.det') },
{ name: 'code', label: i18n.t('inspect.detcode'), api: '/monitoring/qualityInspectionDet/getCode' },
'remark'
],
operations: [
@@ -169,7 +173,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -181,7 +185,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -46,16 +46,20 @@ import TableOperateComponent from '@/components/base-table/components/operationC
// import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{
prop: 'inspectionDetContent',
name: '检测内容'
name: i18n.t('inspect.det')
},
{ prop: 'checkTime', name: '检测时间', filter: timeFilter },
{ prop: 'productionId', name: '产线id' },
{ prop: 'sectionId', name: '工段id' },
{ prop: 'checkPerson', name: '检测人员' },
{ prop: 'source', name: '来源', filter: val => ({ 1: '手动', 2: '自动' }[val]) },
{ prop: 'checkTime', name: i18n.t('inspect.time'), filter: timeFilter },
{ prop: 'productionId', name: i18n.t('pl.id') },
{ prop: 'sectionId', name: i18n.t('ws.id') },
{ prop: 'checkPerson', name: i18n.t('inspect.people') },
{ prop: 'source', name: i18n.t('source'), filter: val => ({ 1: i18n.t('manual'), 2: i18n.t('auto') }[val]) },
{ prop: 'explainText', name: i18n.t('desc') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
@@ -65,20 +69,20 @@ const addOrUpdateConfigs = {
type: 'dialog',
infoUrl: '/monitoring/qualityInspectionRecord',
fields: [
{ name: 'checkTime', label: '检测时间', type: 'date', props: { style: 'width: 100%', type: 'datetime' }, placeholder: '请选择检测时间' },
{ name: 'productionId', label: '产线', type: 'select', options: [] },
{ name: 'sectionId', label: '工段', type: 'select', options: [] },
{ name: 'checkTime', label: i18n.t('inspect.time'), type: 'date', props: { style: 'width: 100%', type: 'datetime' }, placeholder: i18n.t('hints.checktime') },
{ name: 'productionId', label: i18n.t('pl.title'), type: 'select', options: [] },
{ name: 'sectionId', label: i18n.t('ws.title'), type: 'select', options: [] },
{
name: 'source',
label: '来源',
label: i18n.t('source'),
type: 'select',
options: [
{ value: 1, label: '手动', default: true },
{ value: 2, label: '自动' }
{ value: 1, label: i18n.t('manual'), default: true },
{ value: 2, label: i18n.t('auto') }
]
},
{ name: 'inspectionDetId', label: '检测内容', type: 'select', options: [] },
{ name: 'checkPerson', label: '检测人员' },
{ name: 'inspectionDetId', label: i18n.t('inspect.det'), type: 'select', options: [] },
{ name: 'checkPerson', label: i18n.t('inspect.people') },
{ name: 'explainText', label: i18n.t('desc') },
'remark'
],
@@ -176,9 +180,9 @@ export default {
}).then(({ data: res }) => {
if (this.addOrUpdateVisible) {
if (res.data.total === 0) {
this.$message.error('该产线没有工段')
this.$message.error(i18n.t('errors.nosection'))
} else {
this.$message.success(`该产线有 ${res.data.total} 条工段`)
this.$message.success(i18n.t('errors.numsection', { num: res.data.total }))
}
}
const wsOpt = this.addOrUpdateConfigs.fields.find(item => item.name === 'sectionId')
@@ -247,7 +251,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -259,7 +263,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -36,9 +36,13 @@ import TableOperateComponent from '@/components/base-table/components/operationC
import { calcMaxHeight } from '@/utils'
import { timeFilter } from '@/utils/filters'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'name', name: '检测类型名称' },
{ prop: 'code', name: '检测类型编码' },
{ prop: 'name', name: i18n.t('inspect.typename') },
{ prop: 'code', name: i18n.t('inspect.typename') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -46,7 +50,7 @@ const tableConfigs = [
const addOrUpdateConfigs = {
type: 'dialog',
infoUrl: '/monitoring/qualityInspectionType',
fields: [{ name: 'name', label: '检测类型' }, { name: 'code', label: '检测类型编码', api: '/monitoring/qualityInspectionType/getCode' }, 'remark'],
fields: [{ name: 'name', label: i18n.t('inspect.type') }, { name: 'code', label: i18n.t('inspect.typename'), api: '/monitoring/qualityInspectionType/getCode' }, 'remark'],
operations: [
{ name: 'cancel', showAlways: true },
{ name: 'save', url: '/monitoring/qualityInspectionType', permission: 'monitoring:qualityinspectiontype:save', showOnEdit: false },
@@ -140,7 +144,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -152,7 +156,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -126,10 +126,10 @@ export default {
this.tableProps.push({
label: moment(obj.recordTime).format('YYYY-MM-DD HH:mm:ss'),
children: [
{ prop: obj.recordTime + '-inputNum', label: '进数据' },
{ prop: obj.recordTime + '-outputNum', label: '出数据' },
{ prop: obj.recordTime + '-scrapNum', label: '报废数据' },
{ prop: obj.recordTime + '-scrapRate', label: '报废比例' }
{ prop: obj.recordTime + '-inputNum', label: i18n.t('realtime.in') },
{ prop: obj.recordTime + '-outputNum', label: i18n.t('realtime.out') },
{ prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.data') },
{ prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate') }
]
})
}
@@ -174,9 +174,9 @@ export default {
setStaticTableProps() {
// Step1: 设置静态的 table props
const staticTableProps = [
{ prop: 'lineName', label: '产线', fixed: true },
{ prop: 'lineName', label: i18n.t('pl.title'), fixed: true },
{ prop: 'equName', label: i18n.t('equipment'), fixed: true },
{ prop: 'totalProduction', label: '总产量', fixed: true }
{ prop: 'totalProduction', label: i18n.t('realtime.total'), fixed: true }
]
this.tableProps = staticTableProps
},

View File

@@ -87,8 +87,8 @@ export default {
if (this.tableData.length > 0) this.loadTable = true
else {
this.$message({
message: '没有查询到相关数据!',
type: 'error',
message: i18n.t('errors.nodata'),
type: 'info',
duration: 2000
})
}
@@ -111,11 +111,11 @@ export default {
this.tableProps.push({
label: moment(obj.recordTime).format('YYYY-MM-DD HH:mm:ss'),
children: [
{ prop: obj.recordTime + '-inputNum', label: '进数据' },
{ prop: obj.recordTime + '-outputNum', label: '出数据' },
{ prop: obj.recordTime + '-passArea', label: '良品率' },
{ prop: obj.recordTime + '-scrapNum', label: '报废数量' },
{ prop: obj.recordTime + '-scrapRate', label: '报废比例' }
{ prop: obj.recordTime + '-inputNum', label: i18n.t('realtime.in') },
{ prop: obj.recordTime + '-outputNum', label: i18n.t('realtime.out') },
{ prop: obj.recordTime + '-passArea', label: i18n.t('realtime.goodrate') },
{ prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.num') },
{ prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate') }
]
})
}
@@ -157,7 +157,7 @@ export default {
setStaticTableProps() {
// Step1: 设置静态的 table props
const staticTableProps = [{ prop: 'lineName', label: '产线', fixed: true }]
const staticTableProps = [{ prop: 'lineName', label: i18n.t('pl.title'), fixed: true }]
this.tableProps = staticTableProps
}
}

View File

@@ -138,7 +138,7 @@ export default {
dynamicPropNames.push(prop)
}
return [{ prop: 'checkType', label: '检查类型', isFixed: true }, ...dynamicPropNames]
return [{ prop: 'checkType', label: i18n.t('inspect.type'), isFixed: true }, ...dynamicPropNames]
}
}
}

View File

@@ -37,15 +37,19 @@ import TableOperateComponent from '@/components/base-table/components/operationC
import { calcMaxHeight } from '@/utils'
import { timeFilter } from '@/utils/filters'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'name', name: '分类名称' },
{ prop: 'name', name: i18n.t('categoryName') },
{ prop: 'operations', name: i18n.t('handle'), width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
const addOrUpdateConfigs = {
type: 'dialog',
infoUrl: '/monitoring/reportSheetCategory',
fields: [{ name: 'name', label: '分类名称', required: true, span: 24 }],
fields: [{ name: 'name', label: i18n.t('categoryName'), required: true, span: 24 }],
operations: [
{ name: 'cancel', url: true, showAlways: true },
{ name: 'save', url: '/monitoring/reportSheetCategory', permission: 'monitoring:reportsheetcategory:save', showOnEdit: false },
@@ -138,7 +142,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -150,7 +154,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -11,8 +11,9 @@ export default {
return {
loading: true,
// url: process.env.VUE_APP_REPORT_DESIGN_URL
url: window.SITE_CONFIG['apiURL'] + '/yd-monitor/ureport/designer'
// url: window.SITE_CONFIG['apiURL'] + this.$http.adornUrl('/ureport/designer')
// url: this.$http.adornUrl('/ureport/designer')
url: (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + '/ureport/designer'
}
},
mounted() {

View File

@@ -76,7 +76,7 @@ const CategoryList = {
const addOrUpdateConfigs = {
type: 'dialog',
infoUrl: '/monitoring/reportSheet',
fields: [{ name: 'fileName', label: '报表名称', required: true, span: 24 }],
fields: [{ name: 'fileName', label: i18n.t('report.name'), required: true, span: 24 }],
operations: [
{ name: 'cancel', url: true, showAlways: true },
{ name: 'save', url: '/monitoring/reportSheet', permission: 'monitoring:reportsheet:save', showOnEdit: false },
@@ -119,8 +119,8 @@ export default {
this.tableConfigs = [
{ type: 'index', width: 100, name: i18n.t('index') },
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter, width: 200 },
{ prop: 'fileName', name: '报表名称' },
{ prop: 'category', name: '报表分类', subcomponent: CategoryList, options: categories },
{ prop: 'fileName', name: i18n.t('report.name') },
{ prop: 'category', name: i18n.t('report.type'), subcomponent: CategoryList, options: categories },
{
prop: 'operations',
name: i18n.t('handle'),
@@ -170,7 +170,7 @@ export default {
category: categoryId
}
}).then(({ data: res }) => {
this.$message.success('修改成功!')
this.$message.success(i18n.t('success'))
})
},
// 获取数据列表
@@ -235,7 +235,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -247,7 +247,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -5,7 +5,7 @@
<div class="sort-item-box">
<div class="sort-item-box-top">
<!-- <p>{{ $t('module.report.reportSort.all') }}</p> -->
<p>全部</p>
<p>{{ $t('all') }}</p>
</div>
<div class="sort-item-box-bottom">{{ allNum }} {{ allNum > 1 ? 'Reports' : 'Report' }}</div>
</div>

View File

@@ -22,7 +22,8 @@ export default {
return {
loading: true,
// url: process.env.VUE_APP_REPORT_VIEW_URL
url: window.SITE_CONFIG['apiURL'] + '/yd-monitor/ureport/preview'
// url: window.SITE_CONFIG['apiURL'] + this.$http.adornUrl('/ureport/preview')
url: (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + '/ureport/preview'
}
},
mounted() {
@@ -52,7 +53,6 @@ export default {
}
const ifream = document.getElementById('reportView')
ifream.onload = function() {
console.log('加载完成')
vm.loading = false
}
},

View File

@@ -16,8 +16,8 @@
<el-form-item label="链接地址" prop="url">
<el-input v-model="dataForm.url" placeholder="链接地址"></el-input>
</el-form-item>
<el-form-item label=$t('desc') prop="description">
<el-input v-model="dataForm.description" placeholder=$t('desc')></el-input>
<el-form-item :label="$t('desc')" prop="description">
<el-input v-model="dataForm.description" :placeholder="$t('desc')"></el-input>
</el-form-item>
<el-form-item label="启用状态:0 、停用1、启用" prop="enabled">
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用1、启用"></el-input>
@@ -28,34 +28,34 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
<el-form-item label="报表内容" prop="content">
<el-input v-model="dataForm.content" placeholder="报表内容"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -171,7 +171,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -37,14 +37,14 @@ import TableTextComponent from '@/components/base-table/components/detailCompone
const tableConfigs = [
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'name', name: '报表名称' },
{ prop: 'code', name: '报表编码' },
{ prop: 'category', name: '报表分类' },
{ prop: 'fileName', name: '文件名称' },
{ prop: 'url', name: '链接地址' },
{ prop: 'name', name: i18n.t('report.name') },
{ prop: 'code', name: i18n.t('report.code') },
{ prop: 'category', name: i18n.t('report.type') },
{ prop: 'fileName', name: i18n.t('file.name') },
{ prop: 'url', name: i18n.t('report.lnk') },
{ prop: 'description', name: i18n.t('desc') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'content', name: '报表内容' },
{ prop: 'content', name: i18n.t('report.det') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -124,7 +124,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -136,7 +136,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -7,8 +7,8 @@
<el-form-item label="名称" prop="name">
<el-input v-model="dataForm.name" placeholder="名称"></el-input>
</el-form-item>
<el-form-item label=$t('desc') prop="description">
<el-input v-model="dataForm.description" placeholder=$t('desc')></el-input>
<el-form-item :label="$t('desc')" prop="description">
<el-input v-model="dataForm.description" :placeholder="$t('desc')"></el-input>
</el-form-item>
<el-form-item label="外部编码,用于对照外部系统的编码" prop="externalCode">
<el-input v-model="dataForm.externalCode" placeholder="外部编码,用于对照外部系统的编码"></el-input>
@@ -22,31 +22,31 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -150,7 +150,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -118,7 +118,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -130,7 +130,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -19,31 +19,31 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -143,7 +143,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -13,31 +13,31 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -129,7 +129,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -39,17 +39,17 @@ const tableConfigs = [
{ prop: 'id', name: '主键,自增' },
{ prop: 'typeCode', name: '文件类型编号' },
{ prop: 'fileCode', name: '文件编号' },
{ prop: 'fileName', name: '文件名称' },
{ prop: 'fileName', name: i18n.t('file.name') },
{ prop: 'fileUrl', name: '文件路径URL' },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
{ prop: 'creatorId', name: '创建人' },
{ prop: 'creatorName', name: '创建人姓名' },
{ prop: 'valid', name: i18n.t('delMark') },
{ prop: 'creatorId', name: i18n.t('creator') },
{ prop: 'creatorName', name: i18n.t('creatorName') },
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'updaterId', name: '更新人' },
{ prop: 'updaterName', name: '更新人姓名' },
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
{ prop: 'version', name: '版本号' },
{ prop: 'updaterId', name: i18n.t('updator') },
{ prop: 'updaterName', name: i18n.t('updatorName') },
{ prop: 'updateTime', name: i18n.t('updateTime'), filter: timeFilter },
{ prop: 'version', name: i18n.t('version') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -129,7 +129,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -141,7 +141,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -39,14 +39,14 @@ const tableConfigs = [
{ prop: 'typeCode', name: '文件类型编号' },
{ prop: 'typeName', name: '文件类型名称' },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
{ prop: 'creatorId', name: '创建人' },
{ prop: 'creatorName', name: '创建人姓名' },
{ prop: 'valid', name: i18n.t('delMark') },
{ prop: 'creatorId', name: i18n.t('creator') },
{ prop: 'creatorName', name: i18n.t('creatorName') },
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'updaterId', name: '更新人' },
{ prop: 'updaterName', name: '更新人姓名' },
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
{ prop: 'version', name: '版本号' },
{ prop: 'updaterId', name: i18n.t('updator') },
{ prop: 'updaterName', name: i18n.t('updatorName') },
{ prop: 'updateTime', name: i18n.t('updateTime'), filter: timeFilter },
{ prop: 'version', name: i18n.t('version') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -126,7 +126,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -138,7 +138,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -14,7 +14,7 @@ export default {
data() {
return {
configs: [
{ prop: 'createTime', name: '创建日期' },
{ prop: 'createTime', name: i18n.t('createDate') },
{ prop: 'name', name: i18n.t('name') },
{
label: i18n.t('addr'),

View File

@@ -37,10 +37,14 @@ import TableOperateComponent from '@/components/base-table/components/operationC
import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [
{
type: 'index',
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'name', name: '工段名称' },
{ prop: 'code', name: '工段编码' },
{ prop: 'productionLineName', name: '产线' },
{ prop: 'name', name: i18n.t('ws.name') },
{ prop: 'code', name: i18n.t('ws.code') },
{ prop: 'productionLineName', name: i18n.t('pl.title') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -49,9 +53,9 @@ const addOrUpdateConfigs = {
type: 'dialog',
infoUrl: '/monitoring/workshopSection',
fields: [
{ name: 'name', label: '工段名称' },
{ name: 'code', label: '工段编码', api: '/monitoring/workshopSection/getCode' },
{ name: 'productionLineId', label: '所属产线', type: 'select', options: [] },
{ name: 'name', label: i18n.t('ws.name') },
{ name: 'code', label: i18n.t('ws.code'), api: '/monitoring/workshopSection/getCode' },
{ name: 'productionLineId', label: i18n.t('ws.belong'), type: 'select', options: [] },
'description',
'remark'
],
@@ -166,7 +170,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -178,7 +182,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -36,9 +36,9 @@ import { calcMaxHeight } from '@/utils'
import { timeFilter } from '@/utils/filters'
const tableConfigs = [
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'workshopSectionId', name: '工段ID' },
{ prop: 'workshopSectionId', name: i18n.t('ws.id') },
{ prop: 'equipmentId', name: '设备ID' },
{ prop: 'sort', name: '排序' },
{ prop: 'sort', name: i18n.t('dept.sort') },
{ prop: 'remark', name: i18n.t('remark') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
]
@@ -119,7 +119,7 @@ export default {
: this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
this.$confirm(`${ i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() }) }`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
@@ -131,7 +131,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -13,26 +13,26 @@
<el-row :gutter="20">
<el-col :span="12"
><el-form-item label="所属产线" prop="productionLineId">
<el-select v-model="dataForm.productionLineId" placeholder="请输入所属产线">
><el-form-item :label="$t('ws.belong')" prop="productionLineId">
<el-select v-model="dataForm.productionLineId" :placeholder="$t('ws.belong')">
<el-option v-for="line in lineList" :key="line.id" :value="line.id" :label="line.name" />
</el-select> </el-form-item
></el-col>
<el-col :span="12"
><el-form-item :label="$t('desc')" prop="description"> <el-input v-model="dataForm.description" placeholder="请输入描述" /> </el-form-item
><el-form-item :label="$t('desc')" prop="description"> <el-input v-model="dataForm.description" :placeholder="$t('desc')" /> </el-form-item
></el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12"
><el-form-item label="备注" prop="remark"> <el-input v-model="dataForm.remark" placeholder="请输入备注" /> </el-form-item
><el-form-item :label="$t('remark')" prop="remark"> <el-input v-model="dataForm.remark" :placeholder="$t('remark')" /> </el-form-item
></el-col>
</el-row>
</el-form>
<section class="attr-form-section" v-if="dataForm.id">
<h3>
设备绑定
{{ $t('ws.eqbind') }}
<el-button type="text" v-if="!showAttrForm" @click="addEq">{{ $t('add') }}</el-button>
</h3>
<div class="table" v-if="!showAttrForm">
@@ -51,9 +51,9 @@
</section>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClick({ name: 'cancel' })">返回</el-button>
<el-button type="primary" v-if="dataForm.id" @click="handleClick({ name: 'update' })">更新</el-button>
<el-button type="success" v-else @click="handleClick({ name: 'save' })">保存</el-button>
<el-button @click="handleClick({ name: 'cancel' })">{{ $t('cancel') }}</el-button>
<el-button type="primary" v-if="dataForm.id" @click="handleClick({ name: 'update' })">{{ $t('update') }}</el-button>
<el-button type="success" v-else @click="handleClick({ name: 'save' })">{{ $t('save') }}</el-button>
</span>
</el-dialog>
</template>
@@ -65,10 +65,14 @@ import SmallTitle from '@/components/small-title'
import { pick } from 'lodash/object'
import TableOperateComponent from '@/components/base-table/components/operationComponent'
import AttrForm from './workshopSectionDialogAttrForm.vue'
import { calcMaxHeight } from '@/utils'
const tableProps = [
{ name: '设备名', prop: 'equipmentName' },
{ name: '排序', prop: 'sort' },
{
type: 'index',
name: i18n.t('index')
},
{ name: i18n.t('eq.name'), prop: 'equipmentName' },
{ name: i18n.t('dept.sort'), prop: 'sort' },
{
name: i18n.t('handle'),
prop: 'operations',
@@ -84,6 +88,7 @@ export default {
components: { BaseTable, SmallTitle, AttrForm },
data() {
return {
calcMaxHeight,
visible: false,
isDetail: false,
tableProps,
@@ -218,20 +223,20 @@ export default {
}
},
handleDeleteEq(id) {
this.$confirm(`确定删除这条记录吗?`, '提示', {
// this.$confirm(`确定删除 ${id} 吗?`, '提示', {
this.$confirm(i18n.t('prompt.sure'), i18n.t('prompt.title'), {
// this.$confirm(`确定删除 ${id} 吗?`, i18n.t('prompt.title'), {
confirmButtonText: i18n.t('confirm'),
cancelButtonText: i18n.t('cancel'),
type: 'warning'
}).then(() => {
this.$http({
url: '/yd-monitor/monitoring/workshopSectionEquipment',
url: this.$http.adornUrl('/monitoring/workshopSectionEquipment'),
method: 'delete',
data: [id]
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {
@@ -269,14 +274,14 @@ export default {
},
handleCreateOrUpdate() {
this.$http({
url: '/yd-monitor/monitoring/workshopSection',
url: this.$http.adornUrl('/monitoring/workshopSection'),
method: this.dataForm.id ? 'put' : 'post',
data: {
...this.dataForm
}
}).then(({ data: res }) => {
this.$message.success({
message: '操作成功',
message: i18n.t('prompt.success'),
onClose: () => {
this.$emit('refreshDataList')
this.visible = false

View File

@@ -24,6 +24,8 @@
</template>
<script>
import i18n from '../../../i18n'
export default {
name: 'AttrForm',
props: {
@@ -45,7 +47,7 @@ export default {
sort: [
{
type: 'integer',
message: '请输入整数',
message: i18n.t('hints.number'),
transform: val => Number(val),
trigger: 'blur'
}
@@ -64,7 +66,7 @@ export default {
this.edit = true
// 获取信息,让用户修改排序
this.$http({
url: '/yd-monitor/monitoring/workshopSectionEquipment/' + id,
url: this.$http.adornUrl('/monitoring/workshopSectionEquipment/') + id,
method: 'get'
}).then(({ data: res }) => {
if (res.data) {
@@ -100,7 +102,7 @@ export default {
},
handleSave() {
this.$http({
url: '/yd-monitor/monitoring/workshopSectionEquipment',
url: this.$http.adornUrl('/monitoring/workshopSectionEquipment'),
method: this.edit ? 'put' : 'post',
data: {
...this.dataForm,
@@ -109,7 +111,7 @@ export default {
}).then(({ data: res }) => {
if (res.data) {
this.$message.success({
message: '操作成功',
message: i18n.t('prompt.success'),
duration: 1500,
onClose: () => {
this.$emit('refresh-list')

View File

@@ -16,31 +16,31 @@
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
</el-form-item>
<el-form-item label=$t('creator') prop="creatorId">
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
<el-form-item :label="$t('creator')" prop="creatorId">
<el-input v-model="dataForm.creatorId" :placeholder="$t('creator')"></el-input>
</el-form-item>
<el-form-item label=$t('creatorName') prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
<el-form-item :label="$t('creatorName')" prop="creatorName">
<el-input v-model="dataForm.creatorName" :placeholder="$t('creatorName')"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label=$t('updator') prop="updaterId">
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
<el-form-item :label="$t('updator')" prop="updaterId">
<el-input v-model="dataForm.updaterId" :placeholder="$t('updator')"></el-input>
</el-form-item>
<el-form-item label=$t('updatorName') prop="updaterName">
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
<el-form-item :label="$t('updatorName')" prop="updaterName">
<el-input v-model="dataForm.updaterName" :placeholder="$t('updatorName')"></el-input>
</el-form-item>
<el-form-item label=$t('updateTime') prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
<el-form-item :label="$t('updateTime')" prop="updateTime">
<el-input v-model="dataForm.updateTime" :placeholder="$t('updateTime')"></el-input>
</el-form-item>
<el-form-item label=$t('version') prop="version">
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
<el-form-item :label="$t('version')" prop="version">
<el-input v-model="dataForm.version" :placeholder="$t('version')"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
</el-dialog>
</template>
@@ -136,7 +136,7 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
message: i18n.t('prompt.success'),
type: 'success',
duration: 1500,
onClose: () => {

View File

@@ -22,7 +22,8 @@ export default {
methods: {
init() {
this.visible = true
this.url = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}`
// this.url = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}`
this.url = (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + `/sys/oss/upload?token=${Cookies.get('token')}`
this.num = 0
this.fileList = []
},

View File

@@ -42,12 +42,13 @@
</el-form>
</div>
<div class="login-footer">
<p>
<a href="http://demo.open.renren.io/renren-security" target="_blank">{{ $t('login.demo') }}</a>
<p style="background: #ececec99; border-radius: 8px;">
<el-button style="background: none; color: #fff; border: unset; outline: unset; cursor: pointer;" @click="chLang('zh')">中文</el-button> |
<el-button style="background: none; color: #fff; border: unset; outline: unset; cursor: pointer;" @click="chLang('en')">English</el-button>
</p>
<p>
<a href="https://www.renren.io/" target="_blank">{{ $t('login.copyright') }}</a>
2022 © renren.io
{{ $t('login.copyright') }}
</p>
</div>
</main>
@@ -86,10 +87,23 @@ export default {
// this.getCaptcha()
},
methods: {
chLang(lang) {
switch (lang) {
case 'zh':
this.$root.$i18n.locale = 'zh-CN'
// location.reload()
break
case 'en':
this.$root.$i18n.locale = 'en'
location.reload()
break
}
},
// 获取验证码
getCaptcha() {
this.dataForm.uuid = getUUID()
this.captchaPath = `${window.SITE_CONFIG['apiURL']}/captcha?uuid=${this.dataForm.uuid}`
// this.captchaPath = `${window.SITE_CONFIG['apiURL']}/captcha?uuid=${this.dataForm.uuid}`
this.captchaPath = (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + `/captcha?uuid=${this.dataForm.uuid}`
},
// 表单提交
dataFormSubmitHandle: debounce(
@@ -101,7 +115,9 @@ export default {
this.$http
.post(this.$http.adornUrl('/login'), this.dataForm)
.then(({ data: res }) => {
console.log('res', res)
if (res.code !== 0) {
console.log('res', res)
// this.getCaptcha()
return this.$message.error(res.msg)
}

View File

@@ -12,12 +12,31 @@ module.exports = {
.loader('svg-sprite-loader')
},
productionSourceMap: false,
configureWebpack: config => {
if (process.env.NODE_ENV === 'production') {
config.performance = {
maxEntrypointSize: 2097152, // 大小改为2mb
maxAssetSize: 1572864
}
}
},
devServer: {
open: true,
port: 8001,
overlay: {
errors: true,
warnings: true
},
proxy: {
'/api': {
target: 'http://india.mes.picaiba.com/'
},
'/yd-monitor': {
target: 'http://192.168.1.20:8080/' // 开发地址
},
'/ureport': {
target: 'http://india.mes.picaiba.com/' // ureporter
}
}
}
}