Merge pull request 'fzq' (#20) from fzq into develop
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #20
This commit is contained in:
commit
fa06c12ece
@ -1,3 +1,11 @@
|
|||||||
|
<!--
|
||||||
|
* @Descripttion:
|
||||||
|
* @version:
|
||||||
|
* @Author: fzq
|
||||||
|
* @Date: 2022-11-25 09:51:46
|
||||||
|
* @LastEditors: fzq
|
||||||
|
* @LastEditTime: 2023-02-07 16:19:50
|
||||||
|
-->
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@ -31,7 +39,7 @@
|
|||||||
<!-- 开发环境 -->
|
<!-- 开发环境 -->
|
||||||
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
|
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
|
||||||
<script>
|
<script>
|
||||||
window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
|
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.8';
|
||||||
</script>
|
</script>
|
||||||
<% } %>
|
<% } %>
|
||||||
<!-- 集成测试环境 -->
|
<!-- 集成测试环境 -->
|
||||||
|
@ -27,11 +27,13 @@
|
|||||||
:disabled="isDetail" />
|
:disabled="isDetail" />
|
||||||
<el-radio v-if="getType(n, c) === 'radio'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
<el-radio v-if="getType(n, c) === 'radio'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
||||||
<el-checkbox v-if="getType(n, c) === 'check'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
<el-checkbox v-if="getType(n, c) === 'check'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
||||||
|
<!-- 全部selcet下拉框可输入搜索 filterable-->
|
||||||
<el-select
|
<el-select
|
||||||
v-if="getType(n, c) === 'select'"
|
v-if="getType(n, c) === 'select'"
|
||||||
:placeholder="getPlaceholder(n, c)"
|
:placeholder="getPlaceholder(n, c)"
|
||||||
v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
|
v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
|
||||||
clearable
|
clearable
|
||||||
|
filterable
|
||||||
:disabled="isDetail || configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].isDisabled"
|
:disabled="isDetail || configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].isDisabled"
|
||||||
|
|
||||||
@change="emitSelectChange(configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name, $event)">
|
@change="emitSelectChange(configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name, $event)">
|
||||||
|
@ -4,20 +4,21 @@
|
|||||||
* @Author: fzq
|
* @Author: fzq
|
||||||
* @Date: 2022-11-25 09:51:46
|
* @Date: 2022-11-25 09:51:46
|
||||||
* @LastEditors: fzq
|
* @LastEditors: fzq
|
||||||
* @LastEditTime: 2023-02-03 14:30:23
|
* @LastEditTime: 2023-02-08 17:16:47
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<!-- 数字代表多级表头最小列宽 -->
|
<!-- 数字代表多级表头最小列宽 -->
|
||||||
<!-- :width="opt.width || null" -->
|
<!-- :width="opt.width || null" -->
|
||||||
|
<!-- :width="flexColumnWidth(opt.prop || null)" -->
|
||||||
|
<!-- header-align="center" align="center" -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="opt.label ? opt.label : opt.name"
|
:label="opt.label ? opt.label : opt.name"
|
||||||
:prop="opt.prop || null"
|
:prop="opt.prop || null"
|
||||||
:width="flexColumnWidth(opt.prop || null)"
|
|
||||||
:min-width="opt.minWidth || null"
|
:min-width="opt.minWidth || null"
|
||||||
:fixed="opt.fixed || null"
|
:fixed="opt.fixed || null"
|
||||||
:show-overflow-tooltip="opt.showOverflowTooltip || false"
|
:show-overflow-tooltip="opt.showOverflowTooltip || false"
|
||||||
filter-placement="top"
|
filter-placement="top"
|
||||||
:align="opt.align || null"
|
:align="opt.align || 'center'"
|
||||||
v-bind="opt.more"
|
v-bind="opt.more"
|
||||||
>
|
>
|
||||||
<template v-if="opt.prop" slot-scope="scope">
|
<template v-if="opt.prop" slot-scope="scope">
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
"
|
"
|
||||||
v-bind="head.more"></el-table-column>
|
v-bind="head.more"></el-table-column>
|
||||||
<!-- 普通的表头 -->
|
<!-- 普通的表头 -->
|
||||||
|
<!-- :align="head.align || null" 表头居中 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-else
|
v-else
|
||||||
:key="idx + 'else'"
|
:key="idx + 'else'"
|
||||||
@ -66,7 +67,7 @@
|
|||||||
:show-overflow-tooltip="head.showOverflowTooltip || true"
|
:show-overflow-tooltip="head.showOverflowTooltip || true"
|
||||||
:tooltip-effect="head.tooltipEffect || 'light'"
|
:tooltip-effect="head.tooltipEffect || 'light'"
|
||||||
filter-placement="top"
|
filter-placement="top"
|
||||||
:align="head.align || null"
|
:align="head.align || 'center'"
|
||||||
v-bind="head.more">
|
v-bind="head.more">
|
||||||
<!-- 子组件 编辑/删除 -->
|
<!-- 子组件 编辑/删除 -->
|
||||||
<template v-if="head.prop" slot-scope="scope">
|
<template v-if="head.prop" slot-scope="scope">
|
||||||
@ -77,7 +78,7 @@
|
|||||||
|
|
||||||
<!-- 多级表头 -->
|
<!-- 多级表头 -->
|
||||||
<template v-if="!head.prop && head.children">
|
<template v-if="!head.prop && head.children">
|
||||||
<TableHead v-for="(subhead, subindex) in head.children" :key="'subhead-' + idx + '-subindex-' + subindex" :opt="subhead" />
|
<TableHead v-for="(subhead, subindex) in head.children" :key="'subhead-' + idx + '-subindex-' + subindex" :opt="subhead" fixed/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
|
151
src/i18n/en.js
151
src/i18n/en.js
@ -25,16 +25,18 @@ t.routes['厂务'] = 'Factory Affair'
|
|||||||
t.routes['设备'] = 'Equipment'
|
t.routes['设备'] = 'Equipment'
|
||||||
t.routes['字典管理'] = 'Dict Management'
|
t.routes['字典管理'] = 'Dict Management'
|
||||||
t.routes['PLC信息'] = 'PLC'
|
t.routes['PLC信息'] = 'PLC'
|
||||||
t.routes['设备与PLC关联配置'] = 'Relations between plc & equipments'
|
// Relations between
|
||||||
t.routes['近24小时设备生产数据'] = 'Realtime Equipment Data(24h)'
|
t.routes['设备与PLC关联配置'] = 'PLC & Equipments'
|
||||||
t.routes['近24小时产线生产数据'] = 'Realtime Productline Data(24h)'
|
t.routes['近24小时设备生产数据'] = 'Equipment Data'
|
||||||
t.routes['近24小时质量检查数据'] = 'Realtime Quality Inspection Data(24h)'
|
t.routes['近24小时产线生产数据'] = 'Productline Data'
|
||||||
|
t.routes['近24小时质量检查数据'] = 'Quality Inspection Data'
|
||||||
t.routes['报表总览'] = 'Report Overview'
|
t.routes['报表总览'] = 'Report Overview'
|
||||||
t.routes['报表分类'] = 'Report Types'
|
t.routes['报表分类'] = 'Report Types'
|
||||||
t.routes['报表详情'] = 'Report Detail'
|
t.routes['报表详情'] = 'Report Detail'
|
||||||
t.routes['报表设计'] = 'Report Design'
|
t.routes['报表设计'] = 'Report Design'
|
||||||
t.routes['报表预览'] = 'Report Preview'
|
t.routes['报表预览'] = 'Report Preview'
|
||||||
t.routes['质量检测基础数据'] = 'Quality Inspection Basic Data'
|
// Quality
|
||||||
|
t.routes['质量检测基础数据'] = 'Inspection Basic Data'
|
||||||
t.routes['当前检测数据'] = 'Current Inspection Data'
|
t.routes['当前检测数据'] = 'Current Inspection Data'
|
||||||
t.routes['检测统计数据'] = 'Statistics Data'
|
t.routes['检测统计数据'] = 'Statistics Data'
|
||||||
t.routes['质量检查信息记录'] = 'Quality Inspection Records'
|
t.routes['质量检查信息记录'] = 'Quality Inspection Records'
|
||||||
@ -46,10 +48,10 @@ t.routes['参数管理'] = 'Params Management'
|
|||||||
t.routes['定时任务'] = 'Timed Tasks'
|
t.routes['定时任务'] = 'Timed Tasks'
|
||||||
t.routes['文件上传'] = 'File Upload'
|
t.routes['文件上传'] = 'File Upload'
|
||||||
t.routes['登录日志'] = 'Login Records'
|
t.routes['登录日志'] = 'Login Records'
|
||||||
t.routes['操作日志'] = 'Oprations Records'
|
t.routes['操作日志'] = 'Operations Records'
|
||||||
t.routes['设备效率分析'] = 'Equipment Efficiency Analysis'
|
t.routes['设备效率分析'] = 'EQU Efficiency Analysis'
|
||||||
t.routes['设备异常分析'] = 'Equipment Exceptions Analysis'
|
t.routes['设备异常分析'] = 'EQU Exceptions Analysis'
|
||||||
t.routes['设备状态时序图'] = 'Equipment Status Timesequence'
|
t.routes['设备状态时序图'] = 'EQU Status Timesequence'
|
||||||
|
|
||||||
// 三级
|
// 三级
|
||||||
t.routes['工厂'] = 'Factory'
|
t.routes['工厂'] = 'Factory'
|
||||||
@ -103,12 +105,12 @@ t.updatorName = 'Updator\'s name'
|
|||||||
t.updateTime = 'Update Time'
|
t.updateTime = 'Update Time'
|
||||||
t.version = 'Version'
|
t.version = 'Version'
|
||||||
t.search = 'Search'
|
t.search = 'Search'
|
||||||
t.countPerPage = '每页数' // ?
|
t.countPerPage = 'Per Page' // ?
|
||||||
t.currentPage = '当前页' // ?
|
t.currentPage = 'Current Page' // ?
|
||||||
t.fetchList = '获取数据列表' // ?
|
t.fetchList = 'Fetch Data List' // ?
|
||||||
t.multi = '多选' // ?
|
t.multi = 'Multiple Selection' // ?
|
||||||
t.do = '进行' // ?
|
t.do = 'Proceed' // ?
|
||||||
t.submit = '表单提交' // ?
|
t.submit = 'Submit' // ?
|
||||||
t.desc = 'Description'
|
t.desc = 'Description'
|
||||||
t.disable = 'Disable'
|
t.disable = 'Disable'
|
||||||
t.equipment = 'Equipment'
|
t.equipment = 'Equipment'
|
||||||
@ -117,7 +119,7 @@ t.cannotempty = 'can\'t be empty'
|
|||||||
t.parameter = 'Parameters'
|
t.parameter = 'Parameters'
|
||||||
t.enable = 'Enable'
|
t.enable = 'Enable'
|
||||||
t.index = 'Index'
|
t.index = 'Index'
|
||||||
t.relation = '关联'
|
t.relation = 'Relation'
|
||||||
t.fetchInfo = 'Fetch Info'
|
t.fetchInfo = 'Fetch Info'
|
||||||
t.name = 'Name'
|
t.name = 'Name'
|
||||||
t.code = 'Code'
|
t.code = 'Code'
|
||||||
@ -187,6 +189,10 @@ t.refdate = 'By date'
|
|||||||
t.hour = 'Hour(s)'
|
t.hour = 'Hour(s)'
|
||||||
t.yes = 'yes'
|
t.yes = 'yes'
|
||||||
t.no = 'no'
|
t.no = 'no'
|
||||||
|
t.LoginRecords = ' Login Records'
|
||||||
|
t.operationsRecords = ' Operations Records'
|
||||||
|
t.allIcons= 'All Icons'
|
||||||
|
t.err= 'Error'
|
||||||
|
|
||||||
t.errors = {}
|
t.errors = {}
|
||||||
t.errors.nosection = 'There is no sections on this product line.'
|
t.errors.nosection = 'There is no sections on this product line.'
|
||||||
@ -272,7 +278,7 @@ t.inspect.typeCount = 'Data of inspection types'
|
|||||||
|
|
||||||
t.realtime = {}
|
t.realtime = {}
|
||||||
t.realtime.eq = 'Realtime data of equipments(24h)'
|
t.realtime.eq = 'Realtime data of equipments(24h)'
|
||||||
t.realtime.pl = 'Realtime data of product lines(24h)'
|
t.realtime.pl = 'Realtime data of productlines(24h)'
|
||||||
t.realtime.inspect = 'Realtime data of quality inspections(24h)'
|
t.realtime.inspect = 'Realtime data of quality inspections(24h)'
|
||||||
t.realtime.in = 'in'
|
t.realtime.in = 'in'
|
||||||
t.realtime.out = 'out'
|
t.realtime.out = 'out'
|
||||||
@ -413,10 +419,11 @@ t.validate = {}
|
|||||||
t.validate.required = 'This is required.'
|
t.validate.required = 'This is required.'
|
||||||
t.validate.format = '{attr} has a wrong format.'
|
t.validate.format = '{attr} has a wrong format.'
|
||||||
t.validate.keyValueWarning = 'The value must be an integer between 0 and 100!'
|
t.validate.keyValueWarning = 'The value must be an integer between 0 and 100!'
|
||||||
|
t.validate.requiredRole = 'Choose at least one role'
|
||||||
|
|
||||||
t.upload = {}
|
t.upload = {}
|
||||||
t.upload.title = 'Upload Assets'
|
t.upload.title = 'Upload Assets'
|
||||||
t.upload.text = '将文件拖到此处,或<em>点击上传</em>'
|
t.upload.text = 'Drag the file here, or <em> click Upload </em>'
|
||||||
t.upload.tip = 'Only support files with format: {format}'
|
t.upload.tip = 'Only support files with format: {format}'
|
||||||
t.upload.button = 'upload'
|
t.upload.button = 'upload'
|
||||||
|
|
||||||
@ -484,60 +491,60 @@ t.schedule.times = 'Time Cost (ms)'
|
|||||||
t.schedule.createDate = 'Executed Tune' // ?
|
t.schedule.createDate = 'Executed Tune' // ?
|
||||||
|
|
||||||
t.oss = {}
|
t.oss = {}
|
||||||
t.oss.config = '云存储配置'
|
t.oss.config = 'Cloud storage configuration'
|
||||||
t.oss.upload = '上传文件'
|
t.oss.upload = 'upload'
|
||||||
t.oss.url = 'URL地址'
|
t.oss.url = 'url'
|
||||||
t.oss.createDate = 'Create Time'
|
t.oss.createDate = 'Create Time'
|
||||||
t.oss.type = '类型'
|
t.oss.type = 'type'
|
||||||
t.oss.type1 = '七牛'
|
t.oss.type1 = 'Qiniu'
|
||||||
t.oss.type2 = '阿里云'
|
t.oss.type2 = 'Aliyun'
|
||||||
t.oss.type3 = '腾讯云'
|
t.oss.type3 = 'Tencent Cloud'
|
||||||
t.oss.qiniuDomain = '域名'
|
t.oss.qiniuDomain = 'Domain name'
|
||||||
t.oss.qiniuDomainTips = '七牛绑定的域名'
|
t.oss.qiniuDomainTips = 'Bound domain name'
|
||||||
t.oss.qiniuPrefix = '路径前缀'
|
t.oss.qiniuPrefix = 'Prefix'
|
||||||
t.oss.qiniuPrefixTips = '不设置默认为空'
|
t.oss.qiniuPrefixTips = 'If no, the default value is null'
|
||||||
t.oss.qiniuAccessKey = 'AccessKey'
|
t.oss.qiniuAccessKey = 'AccessKey'
|
||||||
t.oss.qiniuAccessKeyTips = '七牛AccessKey'
|
t.oss.qiniuAccessKeyTips = 'Qiniu AccessKey'
|
||||||
t.oss.qiniuSecretKey = 'SecretKey'
|
t.oss.qiniuSecretKey = 'SecretKey'
|
||||||
t.oss.qiniuSecretKeyTips = '七牛SecretKey'
|
t.oss.qiniuSecretKeyTips = 'Qiniu SecretKey'
|
||||||
t.oss.qiniuBucketName = '空间名'
|
t.oss.qiniuBucketName = 'BucketName'
|
||||||
t.oss.qiniuBucketNameTips = '七牛存储空间名'
|
t.oss.qiniuBucketNameTips = 'Qiniu BucketName'
|
||||||
t.oss.aliyunDomain = '域名'
|
t.oss.aliyunDomain = 'Domain'
|
||||||
t.oss.aliyunDomainTips = '阿里云绑定的域名,如:http://cdn.renren.io'
|
t.oss.aliyunDomainTips = 'Domain name bound to Ali Cloud, such as:http://cdn.renren.io'
|
||||||
t.oss.aliyunPrefix = '路径前缀'
|
t.oss.aliyunPrefix = 'Prefix'
|
||||||
t.oss.aliyunPrefixTips = '不设置默认为空'
|
t.oss.aliyunPrefixTips = 'If no, the default value is null'
|
||||||
t.oss.aliyunEndPoint = 'EndPoint'
|
t.oss.aliyunEndPoint = 'EndPoint'
|
||||||
t.oss.aliyunEndPointTips = '阿里云EndPoint'
|
t.oss.aliyunEndPointTips = 'Aliyun EndPoint'
|
||||||
t.oss.aliyunAccessKeyId = 'AccessKeyId'
|
t.oss.aliyunAccessKeyId = 'AccessKeyId'
|
||||||
t.oss.aliyunAccessKeyIdTips = '阿里云AccessKeyId'
|
t.oss.aliyunAccessKeyIdTips = 'Aliyun AccessKeyId'
|
||||||
t.oss.aliyunAccessKeySecret = 'AccessKeySecret'
|
t.oss.aliyunAccessKeySecret = 'AccessKeySecret'
|
||||||
t.oss.aliyunAccessKeySecretTips = '阿里云AccessKeySecret'
|
t.oss.aliyunAccessKeySecretTips = 'Aliyun AccessKeySecret'
|
||||||
t.oss.aliyunBucketName = 'BucketName'
|
t.oss.aliyunBucketName = 'BucketName'
|
||||||
t.oss.aliyunBucketNameTips = '阿里云BucketName'
|
t.oss.aliyunBucketNameTips = 'Aliyun BucketName'
|
||||||
t.oss.qcloudDomain = '域名'
|
t.oss.qcloudDomain = 'Domain'
|
||||||
t.oss.qcloudDomainTips = '腾讯云绑定的域名'
|
t.oss.qcloudDomainTips = 'Tencent Cloud Domains'
|
||||||
t.oss.qcloudPrefix = '路径前缀'
|
t.oss.qcloudPrefix = 'Prefix'
|
||||||
t.oss.qcloudPrefixTips = '不设置默认为空'
|
t.oss.qcloudPrefixTips = 'If no, the default value is null'
|
||||||
t.oss.qcloudAppId = 'AppId'
|
t.oss.qcloudAppId = 'AppId'
|
||||||
t.oss.qcloudAppIdTips = '腾讯云AppId'
|
t.oss.qcloudAppIdTips = 'Tencent Cloud AppId'
|
||||||
t.oss.qcloudSecretId = 'SecretId'
|
t.oss.qcloudSecretId = 'SecretId'
|
||||||
t.oss.qcloudSecretIdTips = '腾讯云SecretId'
|
t.oss.qcloudSecretIdTips = 'Tencent Cloud SecretId'
|
||||||
t.oss.qcloudSecretKey = 'SecretKey'
|
t.oss.qcloudSecretKey = 'SecretKey'
|
||||||
t.oss.qcloudSecretKeyTips = '腾讯云SecretKey'
|
t.oss.qcloudSecretKeyTips = 'Tencent Cloud SecretKey'
|
||||||
t.oss.qcloudBucketName = 'BucketName'
|
t.oss.qcloudBucketName = 'BucketName'
|
||||||
t.oss.qcloudBucketNameTips = '腾讯云BucketName'
|
t.oss.qcloudBucketNameTips = 'Tencent Cloud BucketName'
|
||||||
t.oss.qcloudRegion = '所属地区'
|
t.oss.qcloudRegion = 'Region'
|
||||||
t.oss.qcloudRegionTips = '请选择'
|
t.oss.qcloudRegionTips = 'Select'
|
||||||
t.oss.qcloudRegionBeijing1 = '北京一区(华北)'
|
t.oss.qcloudRegionBeijing1 = 'Beijing District 1 (North China)'
|
||||||
t.oss.qcloudRegionBeijing = '北京'
|
t.oss.qcloudRegionBeijing = 'Beijing'
|
||||||
t.oss.qcloudRegionShanghai = '上海(华东)'
|
t.oss.qcloudRegionShanghai = 'Shanghai (East China)'
|
||||||
t.oss.qcloudRegionGuangzhou = '广州(华南)'
|
t.oss.qcloudRegionGuangzhou = 'Guangzhou (South China)'
|
||||||
t.oss.qcloudRegionChengdu = '成都(西南)'
|
t.oss.qcloudRegionChengdu = 'Chengdu (Southwest)'
|
||||||
t.oss.qcloudRegionChongqing = '重庆'
|
t.oss.qcloudRegionChongqing = 'Chongqing'
|
||||||
t.oss.qcloudRegionSingapore = '新加坡'
|
t.oss.qcloudRegionSingapore = 'Singapore'
|
||||||
t.oss.qcloudRegionHongkong = '香港'
|
t.oss.qcloudRegionHongkong = 'Hong Kong'
|
||||||
t.oss.qcloudRegionToronto = '多伦多'
|
t.oss.qcloudRegionToronto = 'Toronto'
|
||||||
t.oss.qcloudRegionFrankfurt = '法兰克福'
|
t.oss.qcloudRegionFrankfurt = 'Frankfurt'
|
||||||
|
|
||||||
t.dept = {}
|
t.dept = {}
|
||||||
t.dept.name = 'Department Name'
|
t.dept.name = 'Department Name'
|
||||||
@ -557,7 +564,7 @@ t.dict.remark = 'Remark'
|
|||||||
t.dict.createDate = 'Create Time'
|
t.dict.createDate = 'Create Time'
|
||||||
|
|
||||||
t.logError = {}
|
t.logError = {}
|
||||||
t.logError.requestUri = 'Request URI'
|
t.logError.requestUri = 'Request URL'
|
||||||
t.logError.requestMethod = 'Request Method'
|
t.logError.requestMethod = 'Request Method'
|
||||||
t.logError.requestParams = 'Request Parameters'
|
t.logError.requestParams = 'Request Parameters'
|
||||||
t.logError.ip = 'IP'
|
t.logError.ip = 'IP'
|
||||||
@ -584,7 +591,7 @@ t.logOperation.status0 = 'Failed'
|
|||||||
t.logOperation.status1 = 'Success'
|
t.logOperation.status1 = 'Success'
|
||||||
t.logOperation.creatorName = 'User Name'
|
t.logOperation.creatorName = 'User Name'
|
||||||
t.logOperation.operation = 'User Operations'
|
t.logOperation.operation = 'User Operations'
|
||||||
t.logOperation.requestUri = 'Request URI'
|
t.logOperation.requestUri = 'Request URL'
|
||||||
t.logOperation.requestMethod = 'Request Method'
|
t.logOperation.requestMethod = 'Request Method'
|
||||||
t.logOperation.requestParams = 'Request Parameters'
|
t.logOperation.requestParams = 'Request Parameters'
|
||||||
t.logOperation.requestTime = 'Request Duration'
|
t.logOperation.requestTime = 'Request Duration'
|
||||||
@ -593,21 +600,22 @@ t.logOperation.userAgent = 'User-Agent'
|
|||||||
t.logOperation.createDate = 'Create Time'
|
t.logOperation.createDate = 'Create Time'
|
||||||
|
|
||||||
t.menu = {}
|
t.menu = {}
|
||||||
t.menu.name = 'Name'
|
t.menu.name = 'Chinese Name'
|
||||||
|
t.menu.nameEn = 'Name'
|
||||||
t.menu.icon = 'Icons'
|
t.menu.icon = 'Icons'
|
||||||
t.menu.type = 'Type'
|
t.menu.type = 'Type'
|
||||||
t.menu.type0 = 'Menu'
|
t.menu.type0 = 'Menu'
|
||||||
t.menu.type1 = 'Button'
|
t.menu.type1 = 'Button'
|
||||||
t.menu.sort = 'Sort'
|
t.menu.sort = 'Sort'
|
||||||
t.menu.url = 'Route'
|
t.menu.url = 'Route'
|
||||||
t.menu.permissions = '授权标识'
|
t.menu.permissions = 'Authorization Identifier'
|
||||||
t.menu.permissionsTips = '多个用逗号分隔,如:sys:menu:save,sys:menu:update'
|
t.menu.permissionsTips = 'Multiple are separated by commas, such as:sys:menu:save,sys:menu:update'
|
||||||
t.menu.parentName = '上级菜单'
|
t.menu.parentName = 'Superior menu'
|
||||||
t.menu.parentNameDefault = 'First tier menu'
|
t.menu.parentNameDefault = 'First tier menu'
|
||||||
t.menu.resource = '授权资源'
|
t.menu.resource = 'Authorized Resource'
|
||||||
t.menu.resourceUrl = '资源URL'
|
t.menu.resourceUrl = 'Resource URL'
|
||||||
t.menu.resourceMethod = 'Request methods'
|
t.menu.resourceMethod = 'Request methods'
|
||||||
t.menu.resourceAddItem = '添加一项'
|
t.menu.resourceAddItem = 'Add Item'
|
||||||
|
|
||||||
t.params = {}
|
t.params = {}
|
||||||
t.params.name = 'Parameter Name'
|
t.params.name = 'Parameter Name'
|
||||||
@ -616,7 +624,7 @@ t.params.paramCode = 'Parameter Code'
|
|||||||
t.params.paramValue = 'Parameter Value'
|
t.params.paramValue = 'Parameter Value'
|
||||||
t.params.paramStdValue = 'Standard Parameter Code'
|
t.params.paramStdValue = 'Standard Parameter Code'
|
||||||
t.params.plctitle = 'PLC Collection Parameters'
|
t.params.plctitle = 'PLC Collection Parameters'
|
||||||
t.params.plcid = 'PLC连接表ID'
|
t.params.plcid = 'PLC ID'
|
||||||
t.params.remark = 'Remark'
|
t.params.remark = 'Remark'
|
||||||
|
|
||||||
t.role = {}
|
t.role = {}
|
||||||
@ -647,5 +655,6 @@ t.user.validate = {}
|
|||||||
t.user.validate.confirmPassword = 'The two passwords are different. Please check again.'
|
t.user.validate.confirmPassword = 'The two passwords are different. Please check again.'
|
||||||
t.user.select = 'Select an user'
|
t.user.select = 'Select an user'
|
||||||
t.user.selecterror = 'Pick up a record'
|
t.user.selecterror = 'Pick up a record'
|
||||||
|
t.user.userTable = ' User Table'
|
||||||
|
|
||||||
export default t
|
export default t
|
@ -187,6 +187,10 @@ t.refdate = '按日期'
|
|||||||
t.hour = '小时'
|
t.hour = '小时'
|
||||||
t.yes = '是'
|
t.yes = '是'
|
||||||
t.no = '否'
|
t.no = '否'
|
||||||
|
t.LoginRecords = ' 登录日志'
|
||||||
|
t.operationsRecords = ' 操作日志'
|
||||||
|
t.allIcons= '所有图标'
|
||||||
|
t.err= '错误'
|
||||||
|
|
||||||
|
|
||||||
t.errors = {}
|
t.errors = {}
|
||||||
@ -413,6 +417,8 @@ t.validate = {}
|
|||||||
t.validate.required = '必填项不能为空'
|
t.validate.required = '必填项不能为空'
|
||||||
t.validate.format = '{attr}格式错误'
|
t.validate.format = '{attr}格式错误'
|
||||||
t.validate.keyValueWarning = '该数值必须是100以内的正整数!'
|
t.validate.keyValueWarning = '该数值必须是100以内的正整数!'
|
||||||
|
t.validate.requiredRole = '至少选择一个角色'
|
||||||
|
|
||||||
|
|
||||||
t.upload = {}
|
t.upload = {}
|
||||||
t.upload.title = '上传资料'
|
t.upload.title = '上传资料'
|
||||||
@ -557,7 +563,7 @@ t.dict.remark = '备注'
|
|||||||
t.dict.createDate = '创建时间'
|
t.dict.createDate = '创建时间'
|
||||||
|
|
||||||
t.logError = {}
|
t.logError = {}
|
||||||
t.logError.requestUri = '请求URI'
|
t.logError.requestUri = '请求URL'
|
||||||
t.logError.requestMethod = '请求方式'
|
t.logError.requestMethod = '请求方式'
|
||||||
t.logError.requestParams = '请求参数'
|
t.logError.requestParams = '请求参数'
|
||||||
t.logError.ip = '操作IP'
|
t.logError.ip = '操作IP'
|
||||||
@ -584,7 +590,7 @@ t.logOperation.status0 = '失败'
|
|||||||
t.logOperation.status1 = '成功'
|
t.logOperation.status1 = '成功'
|
||||||
t.logOperation.creatorName = '用户名'
|
t.logOperation.creatorName = '用户名'
|
||||||
t.logOperation.operation = '用户操作'
|
t.logOperation.operation = '用户操作'
|
||||||
t.logOperation.requestUri = '请求URI'
|
t.logOperation.requestUri = '请求URL'
|
||||||
t.logOperation.requestMethod = '请求方式'
|
t.logOperation.requestMethod = '请求方式'
|
||||||
t.logOperation.requestParams = '请求参数'
|
t.logOperation.requestParams = '请求参数'
|
||||||
t.logOperation.requestTime = '请求时长'
|
t.logOperation.requestTime = '请求时长'
|
||||||
@ -593,7 +599,8 @@ t.logOperation.userAgent = 'User-Agent'
|
|||||||
t.logOperation.createDate = '创建时间'
|
t.logOperation.createDate = '创建时间'
|
||||||
|
|
||||||
t.menu = {}
|
t.menu = {}
|
||||||
t.menu.name = '名称'
|
t.menu.name = '中文名'
|
||||||
|
t.menu.nameEn = '英文名'
|
||||||
t.menu.icon = '图标'
|
t.menu.icon = '图标'
|
||||||
t.menu.type = '类型'
|
t.menu.type = '类型'
|
||||||
t.menu.type0 = '菜单'
|
t.menu.type0 = '菜单'
|
||||||
@ -647,6 +654,7 @@ t.user.validate = {}
|
|||||||
t.user.validate.confirmPassword = '确认密码与密码输入不一致'
|
t.user.validate.confirmPassword = '确认密码与密码输入不一致'
|
||||||
t.user.select = '选择用户'
|
t.user.select = '选择用户'
|
||||||
t.user.selecterror = '请选择一条记录'
|
t.user.selecterror = '请选择一条记录'
|
||||||
|
t.user.userTable = ' 用户表'
|
||||||
|
|
||||||
|
|
||||||
export default t
|
export default t
|
||||||
|
@ -1,78 +1,72 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card shadow="never" class="aui-card--fill">
|
<el-card shadow="never" class="aui-card--fill">
|
||||||
<div class="mod-job__schedule">
|
<div class="mod-job__schedule">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
|
<el-form :inline="true" :model="dataForm" ref="form" @keyup.enter.native="currentChangeHandle(dataForm.beanName)" class="blueTip" size="small">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
{{ $t('schedule.beanName') }}
|
{{ $t('schedule.beanName') }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanName')" clearable></el-input>
|
<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanName')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
<el-button class="buttonColor" @click="currentChangeHandle(dataForm.beanName)">{{ $t('query') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('sys:schedule:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
<el-button v-if="$hasPermission('sys:schedule:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:pause')" type="danger" @click="pauseHandle()">{{ $t('schedule.pauseBatch') }}</el-button>
|
<el-button v-if="$hasPermission('sys:schedule:pause')" type="danger" @click="pauseHandle()">{{ $t('schedule.pauseBatch') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:resume')" type="danger" @click="resumeHandle()">{{ $t('schedule.resumeBatch') }}</el-button>
|
<el-button v-if="$hasPermission('sys:schedule:resume')" type="danger" @click="resumeHandle()">{{ $t('schedule.resumeBatch') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:run')" type="danger" @click="runHandle()">{{ $t('schedule.runBatch') }}</el-button>
|
<el-button v-if="$hasPermission('sys:schedule:run')" type="danger" @click="runHandle()">{{ $t('schedule.runBatch') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:log')" type="success" @click="logHandle()">{{ $t('schedule.log') }}</el-button>
|
<el-button v-if="$hasPermission('sys:schedule:log')" type="success" @click="logHandle()">{{ $t('schedule.log') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%">
|
||||||
v-loading="dataListLoading"
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||||
:data="dataList"
|
<el-table-column prop="beanName" :label="$t('schedule.beanName')" header-align="center" align="center"></el-table-column>
|
||||||
border
|
<el-table-column prop="params" :label="$t('schedule.params')" header-align="center" align="center"></el-table-column>
|
||||||
@selection-change="dataListSelectionChangeHandle"
|
<el-table-column prop="cronExpression" :label="$t('schedule.cronExpression')" header-align="center" align="center"></el-table-column>
|
||||||
@sort-change="dataListSortChangeHandle"
|
<el-table-column prop="remark" :label="$t('schedule.remark')" header-align="center" align="center"></el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="status" :label="$t('schedule.status')" sortable="custom" header-align="center" align="center">
|
||||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
<template slot-scope="scope">
|
||||||
<el-table-column prop="beanName" :label="$t('schedule.beanName')" header-align="center" align="center"></el-table-column>
|
<el-tag v-if="scope.row.status === 1" size="small">{{ $t('schedule.status1') }}</el-tag>
|
||||||
<el-table-column prop="params" :label="$t('schedule.params')" header-align="center" align="center"></el-table-column>
|
<el-tag v-else size="small" type="danger">{{ $t('schedule.status0') }}</el-tag>
|
||||||
<el-table-column prop="cronExpression" :label="$t('schedule.cronExpression')" header-align="center" align="center"></el-table-column>
|
</template>
|
||||||
<el-table-column prop="remark" :label="$t('schedule.remark')" header-align="center" align="center"></el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="status" :label="$t('schedule.status')" sortable="custom" header-align="center" align="center">
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.status === 1" size="small">{{ $t('schedule.status1') }}</el-tag>
|
<el-button v-if="$hasPermission('sys:schedule:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
|
||||||
<el-tag v-else size="small" type="danger">{{ $t('schedule.status0') }}</el-tag>
|
<el-button v-if="$hasPermission('sys:schedule:pause')" type="text" size="small" @click="pauseHandle(scope.row.id)">{{ $t('schedule.pause') }}</el-button>
|
||||||
</template>
|
<el-button v-if="$hasPermission('sys:schedule:resume')" type="text" size="small" @click="resumeHandle(scope.row.id)">{{ $t('schedule.resume') }}</el-button>
|
||||||
</el-table-column>
|
<el-button v-if="$hasPermission('sys:schedule:run')" type="text" size="small" @click="runHandle(scope.row.id)">{{ $t('schedule.run') }}</el-button>
|
||||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
<el-button v-if="$hasPermission('sys:schedule:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
|
||||||
<template slot-scope="scope">
|
</template>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
|
</el-table-column>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:pause')" type="text" size="small" @click="pauseHandle(scope.row.id)">{{ $t('schedule.pause') }}</el-button>
|
</el-table>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:resume')" type="text" size="small" @click="resumeHandle(scope.row.id)">{{ $t('schedule.resume') }}</el-button>
|
<el-pagination
|
||||||
<el-button v-if="$hasPermission('sys:schedule:run')" type="text" size="small" @click="runHandle(scope.row.id)">{{ $t('schedule.run') }}</el-button>
|
:current-page="page"
|
||||||
<el-button v-if="$hasPermission('sys:schedule:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
</template>
|
:page-size="limit"
|
||||||
</el-table-column>
|
:total="total"
|
||||||
</el-table>
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
<el-pagination
|
@size-change="pageSizeChangeHandle"
|
||||||
:current-page="page"
|
@current-change="pageCurrentChangeHandle">
|
||||||
:page-sizes="[10, 20, 50, 100]"
|
</el-pagination>
|
||||||
:page-size="limit"
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
:total="total"
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
<!-- 弹窗, 日志列表 -->
|
||||||
@size-change="pageSizeChangeHandle"
|
<log v-if="logVisible" ref="log"></log>
|
||||||
@current-change="pageCurrentChangeHandle">
|
</div>
|
||||||
</el-pagination>
|
</el-card>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
|
||||||
<!-- 弹窗, 日志列表 -->
|
|
||||||
<log v-if="logVisible" ref="log"></log>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -80,127 +74,153 @@ import mixinViewModule from '@/mixins/view-module'
|
|||||||
import AddOrUpdate from './schedule-add-or-update'
|
import AddOrUpdate from './schedule-add-or-update'
|
||||||
import Log from './schedule-log'
|
import Log from './schedule-log'
|
||||||
export default {
|
export default {
|
||||||
mixins: [mixinViewModule],
|
mixins: [mixinViewModule],
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
mixinViewModuleOptions: {
|
mixinViewModuleOptions: {
|
||||||
getDataListURL: '/sys/schedule/page',
|
getDataListURL: '/sys/schedule/page',
|
||||||
getDataListIsPage: true,
|
getDataListIsPage: true,
|
||||||
deleteURL: '/sys/schedule',
|
deleteURL: '/sys/schedule',
|
||||||
deleteIsBatch: true
|
deleteIsBatch: true
|
||||||
},
|
},
|
||||||
dataForm: {
|
dataForm: {
|
||||||
beanName: ''
|
beanName: ''
|
||||||
},
|
},
|
||||||
logVisible: false
|
logVisible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
Log
|
Log
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// destroy dialog
|
// destroy dialog
|
||||||
handleDestroyDialog() {
|
handleDestroyDialog() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.addOrUpdateVisible= false
|
this.addOrUpdateVisible = false
|
||||||
}, /** after dialog animated */ 200);
|
}, /** after dialog animated */ 200)
|
||||||
},
|
},
|
||||||
// 暂停
|
// 暂停
|
||||||
pauseHandle (id) {
|
pauseHandle(id) {
|
||||||
if (!id && this.dataListSelections.length <= 0) {
|
if (!id && this.dataListSelections.length <= 0) {
|
||||||
return this.$message({
|
return this.$message({
|
||||||
message: this.$t('prompt.deleteBatch'),
|
message: this.$t('prompt.deleteBatch'),
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
duration: 500
|
duration: 500
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.pause') }), this.$t('prompt.title'), {
|
this.$confirm(this.$t('prompt.info', { handle: this.$t('schedule.pause') }), this.$t('prompt.title'), {
|
||||||
confirmButtonText: this.$t('confirm'),
|
confirmButtonText: this.$t('confirm'),
|
||||||
cancelButtonText: this.$t('cancel'),
|
cancelButtonText: this.$t('cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
})
|
||||||
this.$http.put(this.$http.adornUrl('/sys/schedule/pause'), id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
.then(() => {
|
||||||
if (res.code !== 0) {
|
this.$http
|
||||||
return this.$message.error(res.msg)
|
.put(this.$http.adornUrl('/sys/schedule/pause'), id ? [id] : this.dataListSelections.map((item) => item.id))
|
||||||
}
|
.then(({ data: res }) => {
|
||||||
this.$message({
|
if (res.code !== 0) {
|
||||||
message: this.$t('prompt.success'),
|
return this.$message.error(res.msg)
|
||||||
type: 'success',
|
}
|
||||||
duration: 500,
|
this.$message({
|
||||||
onClose: () => {
|
message: this.$t('prompt.success'),
|
||||||
this.getDataList()
|
type: 'success',
|
||||||
}
|
duration: 500,
|
||||||
})
|
onClose: () => {
|
||||||
}).catch(() => {})
|
this.getDataList()
|
||||||
}).catch(() => {})
|
}
|
||||||
},
|
})
|
||||||
// 恢复
|
})
|
||||||
resumeHandle (id) {
|
.catch(() => {})
|
||||||
if (!id && this.dataListSelections.length <= 0) {
|
})
|
||||||
return this.$message({
|
.catch(() => {})
|
||||||
message: this.$t('prompt.deleteBatch'),
|
},
|
||||||
type: 'warning',
|
// 恢复
|
||||||
duration: 500
|
resumeHandle(id) {
|
||||||
})
|
if (!id && this.dataListSelections.length <= 0) {
|
||||||
}
|
return this.$message({
|
||||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.resume') }), this.$t('prompt.title'), {
|
message: this.$t('prompt.deleteBatch'),
|
||||||
confirmButtonText: this.$t('confirm'),
|
type: 'warning',
|
||||||
cancelButtonText: this.$t('cancel'),
|
duration: 500
|
||||||
type: 'warning'
|
})
|
||||||
}).then(() => {
|
}
|
||||||
this.$http.put(this.$http.adornUrl('/sys/schedule/resume'), id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
this.$confirm(this.$t('prompt.info', { handle: this.$t('schedule.resume') }), this.$t('prompt.title'), {
|
||||||
if (res.code !== 0) {
|
confirmButtonText: this.$t('confirm'),
|
||||||
return this.$message.error(res.msg)
|
cancelButtonText: this.$t('cancel'),
|
||||||
}
|
type: 'warning'
|
||||||
this.$message({
|
})
|
||||||
message: this.$t('prompt.success'),
|
.then(() => {
|
||||||
type: 'success',
|
this.$http
|
||||||
duration: 500,
|
.put(this.$http.adornUrl('/sys/schedule/resume'), id ? [id] : this.dataListSelections.map((item) => item.id))
|
||||||
onClose: () => {
|
.then(({ data: res }) => {
|
||||||
this.getDataList()
|
if (res.code !== 0) {
|
||||||
}
|
return this.$message.error(res.msg)
|
||||||
})
|
}
|
||||||
}).catch(() => {})
|
this.$message({
|
||||||
}).catch(() => {})
|
message: this.$t('prompt.success'),
|
||||||
},
|
type: 'success',
|
||||||
// 执行
|
duration: 500,
|
||||||
runHandle (id) {
|
onClose: () => {
|
||||||
if (!id && this.dataListSelections.length <= 0) {
|
this.getDataList()
|
||||||
return this.$message({
|
}
|
||||||
message: this.$t('prompt.deleteBatch'),
|
})
|
||||||
type: 'warning',
|
})
|
||||||
duration: 500
|
.catch(() => {})
|
||||||
})
|
})
|
||||||
}
|
.catch(() => {})
|
||||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.run') }), this.$t('prompt.title'), {
|
},
|
||||||
confirmButtonText: this.$t('confirm'),
|
// 执行
|
||||||
cancelButtonText: this.$t('cancel'),
|
runHandle(id) {
|
||||||
type: 'warning'
|
if (!id && this.dataListSelections.length <= 0) {
|
||||||
}).then(() => {
|
return this.$message({
|
||||||
this.$http.put(this.$http.adornUrl('/sys/schedule/run'), id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
message: this.$t('prompt.deleteBatch'),
|
||||||
if (res.code !== 0) {
|
type: 'warning',
|
||||||
return this.$message.error(res.msg)
|
duration: 500
|
||||||
}
|
})
|
||||||
this.$message({
|
}
|
||||||
message: this.$t('prompt.success'),
|
this.$confirm(this.$t('prompt.info', { handle: this.$t('schedule.run') }), this.$t('prompt.title'), {
|
||||||
type: 'success',
|
confirmButtonText: this.$t('confirm'),
|
||||||
duration: 500,
|
cancelButtonText: this.$t('cancel'),
|
||||||
onClose: () => {
|
type: 'warning'
|
||||||
this.getDataList()
|
})
|
||||||
}
|
.then(() => {
|
||||||
})
|
this.$http
|
||||||
}).catch(() => {})
|
.put(this.$http.adornUrl('/sys/schedule/run'), id ? [id] : this.dataListSelections.map((item) => item.id))
|
||||||
}).catch(() => {})
|
.then(({ data: res }) => {
|
||||||
},
|
if (res.code !== 0) {
|
||||||
// 日志列表
|
return this.$message.error(res.msg)
|
||||||
logHandle () {
|
}
|
||||||
this.logVisible = true
|
this.$message({
|
||||||
this.$nextTick(() => {
|
message: this.$t('prompt.success'),
|
||||||
this.$refs.log.init()
|
type: 'success',
|
||||||
})
|
duration: 500,
|
||||||
}
|
onClose: () => {
|
||||||
}
|
this.getDataList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
// 日志列表
|
||||||
|
logHandle() {
|
||||||
|
this.logVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.log.init()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 当前页
|
||||||
|
currentChangeHandle(val) {
|
||||||
|
console.log('val', val)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.dataForm.beanName = val
|
||||||
|
})
|
||||||
|
this.getDataList()
|
||||||
|
// this.$refs['form'].resetFields()
|
||||||
|
this.dataForm.beanName = ''
|
||||||
|
console.log('this.dataForm', this.dataForm)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
{{ $t('pl.name') }}
|
{{ $t('pl.name') }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="dataForm.lineId" :placeholder="$t('pl.name')" clearable>
|
<el-select v-model="dataForm.lineId" :placeholder="$t('pl.name')" clearable filterable>
|
||||||
<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
|
<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
{{ $t('eq.name') }}
|
{{ $t('eq.name') }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="dataForm.equipmentId" :placeholder="$t('eq.name')" clearable>
|
<el-select v-model="dataForm.equipmentId" :placeholder="$t('eq.name')" clearable filterable>
|
||||||
<el-option v-for="eq in eqList" :key="eq.code" :value="eq.id" :label="eq.name" />
|
<el-option v-for="eq in eqList" :key="eq.code" :value="eq.id" :label="eq.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -58,6 +58,7 @@ import TableTextComponent from '@/components/base-table/components/detailCompone
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'equipmentName', name: i18n.t('realtime.eqName') },
|
{ prop: 'equipmentName', name: i18n.t('realtime.eqName') },
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
|
<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
|
||||||
<el-select v-model="dataForm.ftId" :placeholder="$t('factory.title')" @change="handleftIdChange" clearable>
|
<el-select v-model="dataForm.ftId" :placeholder="$t('factory.title')" @change="handleftIdChange" clearable filterable>
|
||||||
<el-option v-for="factory in factoryList" :key="factory.id" :value="factory.id" :label="factory.name" />
|
<el-option v-for="factory in factoryList" :key="factory.id" :value="factory.id" :label="factory.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
{{ $t('pl.title') }}
|
{{ $t('pl.title') }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable>
|
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable filterable>
|
||||||
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
|
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -89,6 +89,7 @@ import moment from 'moment'
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
{{ $t('pl.title') }}
|
{{ $t('pl.title') }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable>
|
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable filterable>
|
||||||
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
|
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -52,6 +52,7 @@ import moment from 'moment'
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
// { prop: 'time', name: '时间', filter: timeFilter },
|
// { prop: 'time', name: '时间', filter: timeFilter },
|
||||||
|
@ -57,6 +57,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
|
@ -76,6 +76,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
|
@ -21,7 +21,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!-- <base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" /> -->
|
<!-- <base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" /> -->
|
||||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
<base-table v-for="i in (0,dataLength)" :key="i.name" :data="dataList[i]" :table-head-configs="tableConfigs[i]" :max-height="calcMaxHeight(8)" />
|
||||||
|
<!-- <base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" /> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -41,6 +42,7 @@ export default {
|
|||||||
equipmentName: null,
|
equipmentName: null,
|
||||||
equipmentCode: null,
|
equipmentCode: null,
|
||||||
tableConfigs: [],
|
tableConfigs: [],
|
||||||
|
dataLength: null,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
dataListLoading: false,
|
dataListLoading: false,
|
||||||
dataListSelections: []
|
dataListSelections: []
|
||||||
@ -56,7 +58,7 @@ export default {
|
|||||||
mouted() {
|
mouted() {
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
created(){
|
created() {
|
||||||
// console.log('params',this.$route.params)
|
// console.log('params',this.$route.params)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -73,46 +75,53 @@ export default {
|
|||||||
url: this.$http.adornUrl(`/monitoring/equipmentValueMonitor/runLog/${this.$route.params.id}`),
|
url: this.$http.adornUrl(`/monitoring/equipmentValueMonitor/runLog/${this.$route.params.id}`),
|
||||||
method: 'get'
|
method: 'get'
|
||||||
}).then(({ data: res }) => {
|
}).then(({ data: res }) => {
|
||||||
console.log('res',res)
|
// console.log('res', res)
|
||||||
|
this.equipmentName = res.data[0].data[0].equName
|
||||||
|
this.equipmentCode = res.data[0].data[0].equCode
|
||||||
|
this.dataLength = res.data.length
|
||||||
|
for (let i = 0; i < this.dataLength; i++) {
|
||||||
if (
|
if (
|
||||||
res &&
|
res &&
|
||||||
res.code === 0 &&
|
res.code === 0 &&
|
||||||
res.data &&
|
res.data &&
|
||||||
res.data.length > 0 &&
|
res.data.length > 0 &&
|
||||||
res.data[0].nameData &&
|
res.data[i].nameData &&
|
||||||
res.data[0].nameData.length > 0 &&
|
res.data[i].nameData.length > 0 &&
|
||||||
res.data[0].data &&
|
res.data[i].data &&
|
||||||
res.data[0].data.length > 0
|
res.data[i].data.length > 0
|
||||||
) {
|
) {
|
||||||
this.equipmentName = res.data[0].data[0].equName
|
// console.log(this.equipmentName)
|
||||||
this.equipmentCode = res.data[0].data[0].equCode
|
this.setTableProps(res.data[i].nameData)
|
||||||
console.log(this.equipmentName)
|
this.setTableData(res.data[i].data)
|
||||||
this.setTableProps(res.data[0].nameData)
|
|
||||||
this.setTableData(res.data[0].data)
|
|
||||||
} else {
|
} else {
|
||||||
this.dataList = []
|
this.dataList[i] = []
|
||||||
}
|
}
|
||||||
this.dataListLoading = false
|
this.dataListLoading = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setTableProps(nameData) {
|
setTableProps(nameData) {
|
||||||
this.tableConfigs = [
|
for (let i = 0; i < this.dataLength; i++) {
|
||||||
{
|
this.tableConfigs[i] = [
|
||||||
type: 'index',
|
{
|
||||||
name: i18n.t('index')
|
type: 'index',
|
||||||
},
|
name: i18n.t('index')
|
||||||
{ prop: 'time', name: this.$t('ti'), filter: timeFilter },
|
},
|
||||||
{ prop: 'plcCode', name: this.$t('plcCode') },
|
{ prop: 'time', name: this.$t('ti'), filter: timeFilter },
|
||||||
// { prop: 'equName', name: this.$t('equName') },
|
{ prop: 'plcCode', name: this.$t('plcCode') },
|
||||||
// { prop: 'equCode', name: this.$t('equCode') },
|
// { prop: 'equName', name: this.$t('equName') },
|
||||||
// ...['数值1', '数值2', '数值3'].map(name => {
|
// { prop: 'equCode', name: this.$t('equCode') },
|
||||||
// return { prop: name, name }
|
// ...['数值1', '数值2', '数值3'].map(name => {
|
||||||
// })
|
// return { prop: name, name }
|
||||||
...Array.from(new Set(nameData.map((item) => item.name))).map((name) => ({ prop: name, name }))
|
// })
|
||||||
]
|
...Array.from(new Set(nameData.map((item) => item.name))).map((name) => ({ prop: name, name }))
|
||||||
|
]
|
||||||
|
console.log(this.tableConfigs[i]);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setTableData(data) {
|
setTableData(data) {
|
||||||
this.dataList = data.map((item) => {
|
for (let i = 0; i < this.dataLength; i++) {
|
||||||
|
this.dataList[i] = data.map((item) => {
|
||||||
const rowItem = pick(item, ['time', 'plcCode', 'equName', 'equCode'])
|
const rowItem = pick(item, ['time', 'plcCode', 'equName', 'equCode'])
|
||||||
if (item.data && item.data.length > 0) {
|
if (item.data && item.data.length > 0) {
|
||||||
item.data.forEach((param) => {
|
item.data.forEach((param) => {
|
||||||
@ -121,6 +130,7 @@ export default {
|
|||||||
}
|
}
|
||||||
return rowItem
|
return rowItem
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{{ $t('pl.title') }}
|
{{ $t('pl.title') }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" @change="handleProductLineChange" clearable>
|
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" @change="handleProductLineChange" clearable filterable>
|
||||||
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id"
|
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id"
|
||||||
:label="productLine.name" />
|
:label="productLine.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
|
<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
|
||||||
<el-select v-model="dataForm.wsId" :placeholder="$t('pl.process')" clearable>
|
<el-select v-model="dataForm.wsId" :placeholder="$t('pl.process')" clearable filterable>
|
||||||
<el-option v-for="ws in wsList" :key="ws.id" :value="ws.id" :label="ws.name" />
|
<el-option v-for="ws in wsList" :key="ws.id" :value="ws.id" :label="ws.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog :visible.sync="dialogVisible" :title="$t('pl.add')" width="30%">
|
<el-dialog :visible.sync="dialogVisible" :title="$t('pl.add')" width="30%">
|
||||||
<el-select v-model="eqId" style="width: 100%" :placeholder="$t('pl.choose')" clearable>
|
<el-select v-model="eqId" style="width: 100%" :placeholder="$t('pl.choose')" clearable filterable>
|
||||||
<el-option v-for="eq in dialogEqList" :key="eq.id" :label="eq.name" :value="eq.id" />
|
<el-option v-for="eq in dialogEqList" :key="eq.id" :label="eq.name" :value="eq.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
|
@ -57,6 +57,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
|
@ -38,6 +38,7 @@ import TableOperateComponent from '@/components/base-table/components/operationC
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
|
@ -56,6 +56,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
|
@ -54,6 +54,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
|
@ -65,6 +65,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -47,6 +47,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
|
@ -71,6 +71,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
@ -111,7 +112,7 @@ const addOrUpdateConfigs = {
|
|||||||
// placeholder: i18n.t('hints.checktime')
|
// placeholder: i18n.t('hints.checktime')
|
||||||
// },
|
// },
|
||||||
{ name: 'productionId', required: true, label: i18n.t('pl.title'), type: 'select', options: [] },
|
{ name: 'productionId', required: true, label: i18n.t('pl.title'), type: 'select', options: [] },
|
||||||
{ name: 'sectionId', required: true, label: i18n.t('ws.title'), type: 'select', options: [] , isDisabled: true },
|
{ name: 'sectionId', required: true, label: i18n.t('ws.title'), type: 'select', options: [], isDisabled: true },
|
||||||
{
|
{
|
||||||
name: 'source',
|
name: 'source',
|
||||||
label: i18n.t('source'),
|
label: i18n.t('source'),
|
||||||
@ -183,7 +184,6 @@ export default {
|
|||||||
this.$set(this.addOrUpdateConfigs.fields[2], 'isDisabled', true)
|
this.$set(this.addOrUpdateConfigs.fields[2], 'isDisabled', true)
|
||||||
}
|
}
|
||||||
await this.getWorkSections(id)
|
await this.getWorkSections(id)
|
||||||
|
|
||||||
}
|
}
|
||||||
if (name === 'sectionId') {
|
if (name === 'sectionId') {
|
||||||
// 如果选择了产线,就依据此更新工单的选项
|
// 如果选择了产线,就依据此更新工单的选项
|
||||||
@ -198,9 +198,11 @@ export default {
|
|||||||
url: this.$http.adornUrl('/monitoring/qualityInspectionDet/page'),
|
url: this.$http.adornUrl('/monitoring/qualityInspectionDet/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
page: this.pageIndex,
|
// page: this.pageIndex,
|
||||||
limit: this.pageSize,
|
// limit: this.pageSize,
|
||||||
key: this.dataForm.key
|
// key: this.dataForm.key
|
||||||
|
page: 1,
|
||||||
|
limit: 9999999
|
||||||
})
|
})
|
||||||
}).then(({ data: res }) => {
|
}).then(({ data: res }) => {
|
||||||
console.log('insdet:', res)
|
console.log('insdet:', res)
|
||||||
|
@ -57,6 +57,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
* @Author: lb
|
* @Author: lb
|
||||||
* @Date: 2022-06-22 14:00:17
|
* @Date: 2022-06-22 14:00:17
|
||||||
* @LastEditors: fzq
|
* @LastEditors: fzq
|
||||||
* @LastEditTime: 2023-02-02 17:19:10
|
* @LastEditTime: 2023-02-08 16:50:05
|
||||||
* @Description: 设备生产实时数据
|
* @Description: 设备生产实时数据
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<small-title :size="'md'">{{ $t('realtime.eq') }}</small-title>
|
<small-title :size="'md'">{{ $t('realtime.eq') }}</small-title>
|
||||||
<base-table v-if="loadTable" :table-head-configs="tableProps" :data="tableData.length ? tableData : []" :span-method="spanMethod" />
|
<base-table v-if="loadTable" :table-head-configs="tableProps" :data="tableData.length ? tableData : []" :span-method="spanMethod" align= "center"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: lb
|
* @Author: lb
|
||||||
* @Date: 2022-06-22 14:00:17
|
* @Date: 2022-06-22 14:00:17
|
||||||
* @LastEditors: fzq
|
* @LastEditors: fzq
|
||||||
* @LastEditTime: 2023-02-02 17:17:45
|
* @LastEditTime: 2023-02-07 16:23:23
|
||||||
* @Description: 产线生产实时数据
|
* @Description: 产线生产实时数据
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -38,12 +38,19 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
console.log('this.$route', this.$route)
|
||||||
this.clearData()
|
this.clearData()
|
||||||
this.fetchList().then(({ data: res }) => {
|
// this.fetchList().then(({ data: res }) => {
|
||||||
// console.log('fetchlist:', res)
|
// // console.log('fetchlist:', res)
|
||||||
this.testData = res
|
// this.testData = res
|
||||||
this.handleData()
|
// this.handleData()
|
||||||
})
|
// if (res.code === 200 || this.$route.fullPath !== '/monitoring-realtimeProductLine') {
|
||||||
|
// // 获取数据显示成功后,关闭loading
|
||||||
|
// loading.close()
|
||||||
|
// } else {
|
||||||
|
// this.$message.error(this.$t('err'))
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
this.intervalId = setInterval(() => {
|
this.intervalId = setInterval(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
@ -66,6 +73,12 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
fetchList() {
|
fetchList() {
|
||||||
|
// let loading = this.$loading({
|
||||||
|
// lock: true, //lock的修改符--默认是false
|
||||||
|
// text: this.$t('loading'), //显示在加载图标下方的加载文案
|
||||||
|
// background: 'rgba(0,0,0,0.8)', //遮罩层颜色
|
||||||
|
// spinner: 'el-icon-loading' //自定义加载图标类名
|
||||||
|
// })
|
||||||
return this.$http({
|
return this.$http({
|
||||||
url: this.$http.adornUrl('/monitoring/productionMonitoring/lineProductionRealTimeData'),
|
url: this.$http.adornUrl('/monitoring/productionMonitoring/lineProductionRealTimeData'),
|
||||||
method: 'post'
|
method: 'post'
|
||||||
@ -97,7 +110,7 @@ export default {
|
|||||||
expandDataStepOne() {
|
expandDataStepOne() {
|
||||||
// 扩展服务器返回的数据第一阶段
|
// 扩展服务器返回的数据第一阶段
|
||||||
// console.log('create new one')
|
// console.log('create new one')
|
||||||
this.tableData = this.testData.data.map(item => {
|
this.tableData = this.testData.data.map((item) => {
|
||||||
const newItem = {
|
const newItem = {
|
||||||
lineName: item.lineName,
|
lineName: item.lineName,
|
||||||
orderName: item.orderName,
|
orderName: item.orderName,
|
||||||
@ -105,14 +118,14 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (item.det) {
|
if (item.det) {
|
||||||
item.det.forEach(obj => {
|
item.det.forEach((obj) => {
|
||||||
// Step2: 设置动态props
|
// Step2: 设置动态props
|
||||||
if (!this.dynamicPropSet) {
|
if (!this.dynamicPropSet) {
|
||||||
this.tableProps.push({
|
this.tableProps.push({
|
||||||
label: moment(obj.recordTime).format('YYYY-MM-DD HH')+ moment(obj.recordTime).add(1,'hours').format('-HH')+i18n.t('hourTime'),
|
label: moment(obj.recordTime).format('YYYY-MM-DD HH') + moment(obj.recordTime).add(1, 'hours').format('-HH') + i18n.t('hourTime'),
|
||||||
children: [
|
children: [
|
||||||
{ prop: obj.recordTime + '-inputNum', label: i18n.t('realtime.in') },
|
{ prop: obj.recordTime + '-inputNum', label: i18n.t('realtime.in') },
|
||||||
{ prop: obj.recordTime + '-outputNum', label: i18n.t('realtime.out') },
|
{ prop: obj.recordTime + '-outputNum', label: i18n.t('realtime.out') }
|
||||||
// { prop: obj.recordTime + '-passArea', label: i18n.t('realtime.goodrate') },
|
// { prop: obj.recordTime + '-passArea', label: i18n.t('realtime.goodrate') },
|
||||||
// { prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.num') },
|
// { prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.num') },
|
||||||
// { prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate') }
|
// { prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate') }
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<small-title :size="'md'">{{ $t('realtime.inspect') }}</small-title>
|
<small-title :size="'md'">{{ $t('realtime.inspect') }}</small-title>
|
||||||
<base-table v-if="loadTable" :table-head-configs="tableProps" :data="tableData.length ? tableData : []" />
|
<!-- fixed -->
|
||||||
|
<base-table v-if="loadTable" :table-head-configs="tableProps" :data="tableData.length ? tableData : []"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -48,6 +48,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
|
@ -58,6 +58,7 @@ const topBtnConfig = [
|
|||||||
const tableConfigs = [
|
const tableConfigs = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12"
|
<el-col :span="12"
|
||||||
><el-form-item :label="$t('ws.belong')" prop="productionLineId">
|
><el-form-item :label="$t('ws.belong')" prop="productionLineId">
|
||||||
<el-select v-model="dataForm.productionLineId" :placeholder="$t('ws.belong')">
|
<el-select v-model="dataForm.productionLineId" :placeholder="$t('ws.belong')" filterable>
|
||||||
<el-option v-for="line in lineList" :key="line.id" :value="line.id" :label="line.name" />
|
<el-option v-for="line in lineList" :key="line.id" :value="line.id" :label="line.name" />
|
||||||
</el-select> </el-form-item
|
</el-select> </el-form-item
|
||||||
></el-col>
|
></el-col>
|
||||||
@ -83,6 +83,7 @@ import { calcMaxHeight } from '@/utils'
|
|||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
width: 100,
|
||||||
name: i18n.t('index')
|
name: i18n.t('index')
|
||||||
},
|
},
|
||||||
{ name: i18n.t('eq.name'), prop: 'equipmentName' },
|
{ name: i18n.t('eq.name'), prop: 'equipmentName' },
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="edit ? $t('ws.binded') : $t('ws.unbind')" prop="equipmentId">
|
<el-form-item :label="edit ? $t('ws.binded') : $t('ws.unbind')" prop="equipmentId">
|
||||||
<el-select v-if="!edit" clearable v-model="dataForm.equipmentId" :placeholder="$t('ws.eqbindplaceholder')">
|
<el-select v-if="!edit" clearable v-model="dataForm.equipmentId" :placeholder="$t('ws.eqbindplaceholder')" filterable>
|
||||||
<el-option v-for="eq in eqList" :key="eq.id" :label="eq.name" :value="eq.id" />
|
<el-option v-for="eq in eqList" :key="eq.id" :label="eq.name" :value="eq.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-else disabled v-model="bindedEquipmentName" /> </el-form-item
|
<el-input v-else disabled v-model="bindedEquipmentName" /> </el-form-item
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
|
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
|
||||||
<el-form-item prop="dictName" :label="$t('dict.dictName')">
|
<el-form-item prop="dictName" :label="$t('dict.dictName')">
|
||||||
<el-input v-model="dataForm.dictName" :placeholder="$t('dict.dictName')"></el-input>
|
<el-input v-model="dataForm.dictName" :placeholder="$t('dict.dictName')"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<el-button v-if="$hasPermission('sys:dict:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
<el-button v-if="$hasPermission('sys:dict:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="showIcons()">所有图标</el-button>
|
<el-button @click="showIcons()">{{ $t('allIcons') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- border
|
<!-- border
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* @Author: fzq
|
* @Author: fzq
|
||||||
* @Date: 2022-11-25 09:51:46
|
* @Date: 2022-11-25 09:51:46
|
||||||
* @LastEditors: fzq
|
* @LastEditors: fzq
|
||||||
* @LastEditTime: 2023-01-13 08:59:37
|
* @LastEditTime: 2023-02-08 16:18:20
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="never" class="aui-card--fill">
|
<el-card shadow="never" class="aui-card--fill">
|
||||||
@ -81,6 +81,35 @@ export default {
|
|||||||
status: ''
|
status: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
exportHandle() {
|
||||||
|
// 导出登录日志
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/sys/log/login/export${this.dataForm.creatorName,this.dataForm.status}`),
|
||||||
|
method: 'get',
|
||||||
|
responseType: "blob"
|
||||||
|
}).then((response) => {
|
||||||
|
let fileName = ''
|
||||||
|
const contentDisposition = response.headers['content-disposition']
|
||||||
|
if (contentDisposition) {
|
||||||
|
// fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9).replace('.xls',this.$t('LoginRecords')) +'.xls'
|
||||||
|
fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9)
|
||||||
|
}
|
||||||
|
fileName = decodeURIComponent(fileName)
|
||||||
|
const blob = new Blob([response.data])
|
||||||
|
const reader = new FileReader()
|
||||||
|
reader.readAsDataURL(blob)
|
||||||
|
reader.onload = (e) => {
|
||||||
|
const a = document.createElement('a')
|
||||||
|
a.download = fileName
|
||||||
|
a.href = e.target.result
|
||||||
|
document.body.appendChild(a)
|
||||||
|
a.click()
|
||||||
|
document.body.removeChild(a)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* @Author: fzq
|
* @Author: fzq
|
||||||
* @Date: 2022-11-25 09:51:46
|
* @Date: 2022-11-25 09:51:46
|
||||||
* @LastEditors: fzq
|
* @LastEditors: fzq
|
||||||
* @LastEditTime: 2023-01-13 09:01:16
|
* @LastEditTime: 2023-02-08 16:19:16
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="never" class="aui-card--fill">
|
<el-card shadow="never" class="aui-card--fill">
|
||||||
@ -81,6 +81,35 @@ export default {
|
|||||||
status: ''
|
status: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
exportHandle() {
|
||||||
|
// 导出操作日志
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/sys/log/operation/export`),
|
||||||
|
method: 'get',
|
||||||
|
responseType: "blob"
|
||||||
|
}).then((response) => {
|
||||||
|
let fileName = ''
|
||||||
|
const contentDisposition = response.headers['content-disposition']
|
||||||
|
if (contentDisposition) {
|
||||||
|
// fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9).replace('.xls',this.$t('operationsRecords')) +'.xls'
|
||||||
|
fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9)
|
||||||
|
}
|
||||||
|
fileName = decodeURIComponent(fileName)
|
||||||
|
const blob = new Blob([response.data])
|
||||||
|
const reader = new FileReader()
|
||||||
|
reader.readAsDataURL(blob)
|
||||||
|
reader.onload = (e) => {
|
||||||
|
const a = document.createElement('a')
|
||||||
|
a.download = fileName
|
||||||
|
a.href = e.target.result
|
||||||
|
document.body.appendChild(a)
|
||||||
|
a.click()
|
||||||
|
document.body.removeChild(a)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -7,12 +7,16 @@
|
|||||||
<el-radio :label="1">{{ $t('menu.type1') }}</el-radio>
|
<el-radio :label="1">{{ $t('menu.type1') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item prop="nameEn" :label="$t('menu.nameEn')">
|
||||||
|
<el-input v-model="dataForm.nameEn" :placeholder="$t('menu.nameEn')"></el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item prop="name" :label="$t('menu.name')">
|
<el-form-item prop="name" :label="$t('menu.name')">
|
||||||
<el-input v-model="dataForm.name" :placeholder="$t('menu.name')"></el-input>
|
<el-input v-model="dataForm.name" :placeholder="$t('menu.name')"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="parentName" :label="$t('menu.parentName')" class="menu-list">
|
<el-form-item prop="parentNameEn" :label="$t('menu.parentName')" class="menu-list">
|
||||||
<el-popover v-model="menuListVisible" ref="menuListPopover" placement="bottom-start" trigger="click">
|
<el-popover v-model="menuListVisible" ref="menuListPopover" placement="bottom-start" trigger="click">
|
||||||
<el-tree
|
<el-tree
|
||||||
|
v-if="$i18n.locale == 'zh-CN'"
|
||||||
:data="menuList"
|
:data="menuList"
|
||||||
:props="{ label: 'name', children: 'children' }"
|
:props="{ label: 'name', children: 'children' }"
|
||||||
node-key="id"
|
node-key="id"
|
||||||
@ -20,11 +24,24 @@
|
|||||||
:highlight-current="true"
|
:highlight-current="true"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
accordion
|
accordion
|
||||||
@current-change="menuListTreeCurrentChangeHandle"
|
@current-change="menuListTreeCurrentChangeHandle">
|
||||||
>
|
</el-tree>
|
||||||
|
<el-tree
|
||||||
|
v-if="$i18n.locale == 'en'"
|
||||||
|
:data="menuList"
|
||||||
|
:props="{ label: 'nameEn', children: 'children' }"
|
||||||
|
node-key="id"
|
||||||
|
ref="menuListTree"
|
||||||
|
:highlight-current="true"
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
accordion
|
||||||
|
@current-change="menuListTreeCurrentChangeHandle">
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<el-input v-model="dataForm.parentName" v-popover:menuListPopover :readonly="true" :placeholder="$t('menu.parentName')">
|
<el-input v-if="$i18n.locale == 'zh-CN'" v-model="dataForm.parentName" v-popover:menuListPopover :readonly="true" :placeholder="$t('menu.parentName')">
|
||||||
|
<i v-if="dataForm.pid !== '0'" slot="suffix" @click.stop="deptListTreeSetDefaultHandle()" class="el-icon-circle-close el-input__icon"></i>
|
||||||
|
</el-input>
|
||||||
|
<el-input v-if="$i18n.locale == 'en'" v-model="dataForm.parentNameEn" v-popover:menuListPopover :readonly="true" :placeholder="$t('menu.parentName')">
|
||||||
<i v-if="dataForm.pid !== '0'" slot="suffix" @click.stop="deptListTreeSetDefaultHandle()" class="el-icon-circle-close el-input__icon"></i>
|
<i v-if="dataForm.pid !== '0'" slot="suffix" @click.stop="deptListTreeSetDefaultHandle()" class="el-icon-circle-close el-input__icon"></i>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -72,8 +89,10 @@ export default {
|
|||||||
id: '',
|
id: '',
|
||||||
type: 0,
|
type: 0,
|
||||||
name: '',
|
name: '',
|
||||||
|
nameEn: '',
|
||||||
pid: '0',
|
pid: '0',
|
||||||
parentName: '',
|
parentName: '',
|
||||||
|
parentNameEn: '',
|
||||||
url: '',
|
url: '',
|
||||||
permissions: '',
|
permissions: '',
|
||||||
sort: 0,
|
sort: 0,
|
||||||
@ -85,6 +104,7 @@ export default {
|
|||||||
dataRule() {
|
dataRule() {
|
||||||
return {
|
return {
|
||||||
name: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
name: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||||
|
nameEn: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||||
parentName: [{ required: true, message: this.$t('validate.required'), trigger: 'change' }]
|
parentName: [{ required: true, message: this.$t('validate.required'), trigger: 'change' }]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,8 +118,8 @@ export default {
|
|||||||
// destroy dialog
|
// destroy dialog
|
||||||
handleDestroyDialog() {
|
handleDestroyDialog() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.addOrUpdateVisible= false
|
this.addOrUpdateVisible = false
|
||||||
}, /** after dialog animated */ 200);
|
}, /** after dialog animated */ 200)
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
@ -138,6 +158,7 @@ export default {
|
|||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
...res.data
|
...res.data
|
||||||
}
|
}
|
||||||
|
// console.log('/sys/menu/', this.dataForm)
|
||||||
if (this.dataForm.pid === '0') {
|
if (this.dataForm.pid === '0') {
|
||||||
return this.deptListTreeSetDefaultHandle()
|
return this.deptListTreeSetDefaultHandle()
|
||||||
}
|
}
|
||||||
@ -153,7 +174,12 @@ export default {
|
|||||||
// 上级菜单树, 选中
|
// 上级菜单树, 选中
|
||||||
menuListTreeCurrentChangeHandle(data) {
|
menuListTreeCurrentChangeHandle(data) {
|
||||||
this.dataForm.pid = data.id
|
this.dataForm.pid = data.id
|
||||||
this.dataForm.parentName = data.name
|
if (this.$i18n.locale == 'zh-CN') {
|
||||||
|
this.dataForm.parentName = data.name
|
||||||
|
}
|
||||||
|
if (this.$i18n.locale == 'en') {
|
||||||
|
this.dataForm.parentNameEn = data.nameEn
|
||||||
|
}
|
||||||
this.menuListVisible = false
|
this.menuListVisible = false
|
||||||
},
|
},
|
||||||
// 图标, 选中
|
// 图标, 选中
|
||||||
@ -163,11 +189,12 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmitHandle: debounce(
|
dataFormSubmitHandle: debounce(
|
||||||
function() {
|
function () {
|
||||||
this.$refs['dataForm'].validate(valid => {
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
console.log('this.dataForm', this.dataForm)
|
||||||
this.$http[!this.dataForm.id ? 'post' : 'put'](this.$http.adornUrl('/sys/menu'), this.dataForm)
|
this.$http[!this.dataForm.id ? 'post' : 'put'](this.$http.adornUrl('/sys/menu'), this.dataForm)
|
||||||
.then(({ data: res }) => {
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* @Author: fzq
|
* @Author: fzq
|
||||||
* @Date: 2022-11-25 09:51:46
|
* @Date: 2022-11-25 09:51:46
|
||||||
* @LastEditors: fzq
|
* @LastEditors: fzq
|
||||||
* @LastEditTime: 2023-01-13 09:06:03
|
* @LastEditTime: 2023-02-08 10:06:36
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="never" class="aui-card--fill">
|
<el-card shadow="never" class="aui-card--fill">
|
||||||
@ -15,7 +15,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table v-loading="dataListLoading" :data="dataList" row-key="id" border style="width: 100%;">
|
<el-table v-loading="dataListLoading" :data="dataList" row-key="id" border style="width: 100%;">
|
||||||
<el-table-column prop="name" :label="$t('menu.name')" header-align="center" min-width="150"></el-table-column>
|
<el-table-column v-if="$i18n.locale == 'zh-CN'" prop="name" :label="$t('menu.name')" header-align="center" min-width="150"></el-table-column>
|
||||||
|
<el-table-column v-if="$i18n.locale == 'en'" prop="nameEn" :label="$t('menu.name')" header-align="center" min-width="150"></el-table-column>
|
||||||
<el-table-column prop="icon" :label="$t('menu.icon')" header-align="center" align="center">
|
<el-table-column prop="icon" :label="$t('menu.icon')" header-align="center" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<svg class="icon-svg" aria-hidden="true"><use :xlink:href="`#${scope.row.icon}`"></use></svg>
|
<svg class="icon-svg" aria-hidden="true"><use :xlink:href="`#${scope.row.icon}`"></use></svg>
|
||||||
@ -58,6 +59,10 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate
|
AddOrUpdate
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
// console.log('mixinViewModuleOptions',this.mixinViewModuleOptions);
|
||||||
|
// console.log('this.$i18n.locale',this.$i18n.locale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item size="mini" :label="$t('role.menuList')">
|
<el-form-item size="mini" :label="$t('role.menuList')">
|
||||||
<el-tree :data="menuList" :props="{ label: 'name', children: 'children' }" node-key="id" ref="menuListTree" accordion show-checkbox> </el-tree>
|
<!-- 这里改了nameEn -->
|
||||||
|
<el-tree :data="menuList" :props="{ label: 'nameEn', children: 'children' }" node-key="id" ref="menuListTree" accordion show-checkbox> </el-tree>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -80,6 +81,7 @@ export default {
|
|||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
this.menuList = res.data
|
this.menuList = res.data
|
||||||
|
console.log('this.menuList',this.menuList);
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
|
@ -17,7 +17,12 @@
|
|||||||
<el-input v-model="dataForm.realName" :placeholder="$t('user.realName')"></el-input>
|
<el-input v-model="dataForm.realName" :placeholder="$t('user.realName')"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="gender" :label="$t('user.gender')">
|
<el-form-item prop="gender" :label="$t('user.gender')">
|
||||||
<ren-radio-group v-model="dataForm.gender" dict-type="gender"></ren-radio-group>
|
<!-- <ren-radio-group v-model="dataForm.gender" dict-type="gender"></ren-radio-group> -->
|
||||||
|
<el-radio-group v-model="dataForm.gender">
|
||||||
|
<el-radio :label="0">{{ $t('user.gender0') }}</el-radio>
|
||||||
|
<el-radio :label="1">{{ $t('user.gender1') }}</el-radio>
|
||||||
|
<el-radio :label="2">{{ $t('user.gender2') }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="email" :label="$t('user.email')">
|
<el-form-item prop="email" :label="$t('user.email')">
|
||||||
<el-input v-model="dataForm.email" :placeholder="$t('user.email')"></el-input>
|
<el-input v-model="dataForm.email" :placeholder="$t('user.email')"></el-input>
|
||||||
@ -26,7 +31,7 @@
|
|||||||
<el-input v-model="dataForm.mobile" :placeholder="$t('user.mobile')"></el-input>
|
<el-input v-model="dataForm.mobile" :placeholder="$t('user.mobile')"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="roleIdList" :label="$t('user.roleIdList')" class="role-list">
|
<el-form-item prop="roleIdList" :label="$t('user.roleIdList')" class="role-list">
|
||||||
<el-select v-model="dataForm.roleIdList" multiple :placeholder="$t('user.roleIdList')">
|
<el-select v-model="dataForm.roleIdList" multiple :placeholder="$t('user.roleIdList')" filterable>
|
||||||
<el-option v-for="role in roleList" :key="role.id" :label="role.name" :value="role.id"></el-option>
|
<el-option v-for="role in roleList" :key="role.id" :label="role.name" :value="role.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -66,7 +71,8 @@ export default {
|
|||||||
mobile: '',
|
mobile: '',
|
||||||
roleIdList: [],
|
roleIdList: [],
|
||||||
status: 1
|
status: 1
|
||||||
}
|
},
|
||||||
|
radio: '1'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -107,7 +113,7 @@ export default {
|
|||||||
email: [{ validator: validateEmail, trigger: 'blur' }],
|
email: [{ validator: validateEmail, trigger: 'blur' }],
|
||||||
// 解除手机号输入限制
|
// 解除手机号输入限制
|
||||||
// mobile: [{ validator: validateMobile, trigger: 'blur' }],
|
// mobile: [{ validator: validateMobile, trigger: 'blur' }],
|
||||||
roleIdList: [{ required: true, message: '至少选择一个角色', trigger: 'change' }]
|
roleIdList: [{ required: true, message: this.$t('validate.requiredRole'), trigger: 'change' }]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -115,8 +121,8 @@ export default {
|
|||||||
// destroy dialog
|
// destroy dialog
|
||||||
handleDestroyDialog() {
|
handleDestroyDialog() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.addOrUpdateVisible= false
|
this.addOrUpdateVisible = false
|
||||||
}, /** after dialog animated */ 200);
|
}, /** after dialog animated */ 200)
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
@ -158,7 +164,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 角色配置, 区分是否为默认角色
|
// 角色配置, 区分是否为默认角色
|
||||||
for (var i = 0; i < res.data.roleIdList.length; i++) {
|
for (var i = 0; i < res.data.roleIdList.length; i++) {
|
||||||
if (this.roleList.filter(item => item.id === res.data.roleIdList[i])[0]) {
|
if (this.roleList.filter((item) => item.id === res.data.roleIdList[i])[0]) {
|
||||||
this.dataForm.roleIdList.push(res.data.roleIdList[i])
|
this.dataForm.roleIdList.push(res.data.roleIdList[i])
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -169,8 +175,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmitHandle: debounce(
|
dataFormSubmitHandle: debounce(
|
||||||
function() {
|
function () {
|
||||||
this.$refs['dataForm'].validate(valid => {
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* @Author: fzq
|
* @Author: fzq
|
||||||
* @Date: 2022-11-25 09:51:46
|
* @Date: 2022-11-25 09:51:46
|
||||||
* @LastEditors: fzq
|
* @LastEditors: fzq
|
||||||
* @LastEditTime: 2023-02-02 15:36:55
|
* @LastEditTime: 2023-02-07 15:29:45
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="never" class="aui-card--fill">
|
<el-card shadow="never" class="aui-card--fill">
|
||||||
@ -20,13 +20,16 @@
|
|||||||
{{ $t('user.gender') }}
|
{{ $t('user.gender') }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<ren-select v-model="dataForm.gender" dict-type="gender" :placeholder="$t('user.gender')"></ren-select>
|
<!-- <ren-select v-model="dataForm.gender" dict-type="gender" :placeholder="$t('user.gender')"></ren-select> -->
|
||||||
|
<el-select v-model="dataForm.gender" :placeholder="$t('user.gender')" clearable>
|
||||||
|
<el-option v-for="item in genderOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
{{ $t('dept.title') }}
|
{{ $t('dept.title') }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<ren-dept-tree v-model="dataForm.deptId" :placeholder="$t('dept.title')" :query="true"></ren-dept-tree>
|
<ren-dept-tree v-model="dataForm.deptId" :placeholder="$t('dept.title')" :query="true" clearable></ren-dept-tree>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button class="buttonColor" @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button class="buttonColor" @click="getDataList()">{{ $t('query') }}</el-button>
|
||||||
@ -41,7 +44,7 @@
|
|||||||
<el-button v-if="$hasPermission('sys:user:export')" type="info" @click="exportHandle()">{{ $t('export') }}</el-button>
|
<el-button v-if="$hasPermission('sys:user:export')" type="info" @click="exportHandle()">{{ $t('export') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%">
|
||||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||||
<el-table-column prop="username" :label="$t('user.username')" sortable="custom" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="username" :label="$t('user.username')" sortable="custom" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="deptName" :label="$t('user.deptName')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="deptName" :label="$t('user.deptName')" header-align="center" align="center"></el-table-column>
|
||||||
@ -73,8 +76,7 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@size-change="pageSizeChangeHandle"
|
@size-change="pageSizeChangeHandle"
|
||||||
@current-change="pageCurrentChangeHandle"
|
@current-change="pageCurrentChangeHandle">
|
||||||
>
|
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -100,7 +102,52 @@ export default {
|
|||||||
username: '',
|
username: '',
|
||||||
deptId: '',
|
deptId: '',
|
||||||
gender: ''
|
gender: ''
|
||||||
}
|
},
|
||||||
|
genderOptions: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: this.$t('user.gender0')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: this.$t('user.gender1')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: this.$t('user.gender2')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
exportHandle() {
|
||||||
|
// 导出用户
|
||||||
|
// exportEquipments({
|
||||||
|
// ...this.listQuery,
|
||||||
|
// fileName: `user-${this.listQuery.current}-${this.listQuery.size}`
|
||||||
|
// }).then((response) => {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/sys/user/export${this.dataForm.username}`),
|
||||||
|
method: 'get',
|
||||||
|
responseType: 'arraybuffer'
|
||||||
|
}).then((response) => {
|
||||||
|
let fileName = ''
|
||||||
|
const contentDisposition = response.headers['content-disposition']
|
||||||
|
if (contentDisposition) {
|
||||||
|
fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9).replace('.xls', this.$t('user.userTable')) + '.xls'
|
||||||
|
}
|
||||||
|
const blob = new Blob([response.data])
|
||||||
|
const reader = new FileReader()
|
||||||
|
reader.readAsDataURL(blob)
|
||||||
|
reader.onload = (e) => {
|
||||||
|
const a = document.createElement('a')
|
||||||
|
a.download = fileName
|
||||||
|
a.href = e.target.result
|
||||||
|
document.body.appendChild(a)
|
||||||
|
a.click()
|
||||||
|
document.body.removeChild(a)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
Loading…
Reference in New Issue
Block a user