Merge pull request 'lb' (#6) from lb 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: #6
This commit is contained in:
commit
37c0c445a3
@ -9,6 +9,8 @@
|
|||||||
:is="require('../../base-table/index.vue').default"
|
:is="require('../../base-table/index.vue').default"
|
||||||
:table-head-configs="filterTableConfigs()"
|
:table-head-configs="filterTableConfigs()"
|
||||||
:data="dataList"
|
:data="dataList"
|
||||||
|
:page="pageIndex"
|
||||||
|
:size="pageSize"
|
||||||
:max-height="calcMaxHeight(8)"
|
:max-height="calcMaxHeight(8)"
|
||||||
@operate-event="handleOperations"
|
@operate-event="handleOperations"
|
||||||
/>
|
/>
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="super-flexible-dialog" :title="isDetail ? title.detail : !dataForm.id ? title.add : title.edit" :visible.sync="visible" @close="handleClose">
|
<el-dialog
|
||||||
|
class="super-flexible-dialog"
|
||||||
|
:title="isDetail ? title.detail : !dataForm.id ? title.add : title.edit"
|
||||||
|
:visible.sync="visible"
|
||||||
|
@close="handleClose"
|
||||||
|
:distory-on-close="true"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="max-height: 60vh; overflow-y: scroll; overflow-x: hidden;">
|
<div style="max-height: 60vh; overflow-y: scroll; overflow-x: hidden;">
|
||||||
<el-form ref="dataForm" :model="dataForm" :rules="dataFormRules">
|
<el-form ref="dataForm" :model="dataForm" :rules="dataFormRules">
|
||||||
<!-- 如果需要更精细一点的布局,可以根据配置项实现地再复杂一点,但此处暂时全部采用一行两列布局 -->
|
<!-- 如果需要更精细一点的布局,可以根据配置项实现地再复杂一点,但此处暂时全部采用一行两列布局 -->
|
||||||
@ -31,7 +38,7 @@
|
|||||||
:disabled="isDetail"
|
:disabled="isDetail"
|
||||||
@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)"
|
||||||
>
|
>
|
||||||
<el-option v-for="opt in configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options" :key="opt.label" :label="opt.label" :value="opt.value" />
|
<el-option v-for="opt in configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options" :key="opt.label+Math.random()" :label="opt.label" :value="opt.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-switch v-if="getType(n, c) === 'switch'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
<el-switch v-if="getType(n, c) === 'switch'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
||||||
<el-cascader
|
<el-cascader
|
||||||
@ -376,14 +383,14 @@ export default {
|
|||||||
}).then(({ data: res }) => {
|
}).then(({ data: res }) => {
|
||||||
if (res && res.code === 0) {
|
if (res && res.code === 0) {
|
||||||
const dataFormKeys = Object.keys(this.dataForm)
|
const dataFormKeys = Object.keys(this.dataForm)
|
||||||
console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
|
// console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
|
||||||
this.dataForm = pick(res.data, dataFormKeys)
|
this.dataForm = pick(res.data, dataFormKeys)
|
||||||
|
|
||||||
// LABEL: FILE_RELATED
|
// LABEL: FILE_RELATED
|
||||||
/** 对文件下载进行分流 */
|
/** 对文件下载进行分流 */
|
||||||
this.fileList = {}
|
this.fileList = {}
|
||||||
if (this.dataForm.files) {
|
if (this.dataForm.files) {
|
||||||
console.log('files: ', this.dataForm.files)
|
// console.log('files: ', this.dataForm.files)
|
||||||
this.dataForm.files.forEach(file => {
|
this.dataForm.files.forEach(file => {
|
||||||
// const fileName = file.fileUrl.split('/').pop()
|
// const fileName = file.fileUrl.split('/').pop()
|
||||||
/** [1] 处理 fileList */
|
/** [1] 处理 fileList */
|
||||||
@ -458,7 +465,7 @@ export default {
|
|||||||
this.$set(this.dataForm, 'fileIds', fileIds)
|
this.$set(this.dataForm, 'fileIds', fileIds)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('before send: ', this.dataForm)
|
// console.log('before send: ', this.dataForm)
|
||||||
|
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(urls[btn.name].url),
|
url: this.$http.adornUrl(urls[btn.name].url),
|
||||||
|
@ -20,6 +20,9 @@
|
|||||||
:header-align="head.align || 'center'"
|
:header-align="head.align || 'center'"
|
||||||
:align="head.align || 'center'"
|
:align="head.align || 'center'"
|
||||||
:width="head.width || 50"
|
:width="head.width || 50"
|
||||||
|
:index="head.type === 'index' ? val => {
|
||||||
|
return val + 1 + (page - 1) * size
|
||||||
|
} : null"
|
||||||
v-bind="head.more"
|
v-bind="head.more"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<!-- 普通的表头 -->
|
<!-- 普通的表头 -->
|
||||||
@ -74,9 +77,17 @@ export default {
|
|||||||
spanMethod: {
|
spanMethod: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => {
|
default: () => {
|
||||||
() => [0, 0]
|
;() => [0, 0]
|
||||||
},
|
},
|
||||||
required: false
|
required: false
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
type: Number,
|
||||||
|
default: 10
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
|
@ -58,6 +58,7 @@ t.routes['设备分组'] = 'Equipment Groups'
|
|||||||
t.routes['设备信息'] = 'Equipment Details'
|
t.routes['设备信息'] = 'Equipment Details'
|
||||||
t.routes['设备参数状态监控'] = 'Current Equipment State'
|
t.routes['设备参数状态监控'] = 'Current Equipment State'
|
||||||
t.routes['设备分组报警信息'] = 'Equipment Group Alarm'
|
t.routes['设备分组报警信息'] = 'Equipment Group Alarm'
|
||||||
|
t.routes['设备历史参数'] = 'Equipment Historical Parameters'
|
||||||
t.routes['质量检测类型'] = 'Quality Inpection Types'
|
t.routes['质量检测类型'] = 'Quality Inpection Types'
|
||||||
t.routes['质量检测信息'] = 'Quality Inpection Details'
|
t.routes['质量检测信息'] = 'Quality Inpection Details'
|
||||||
|
|
||||||
@ -184,14 +185,15 @@ t.prod.code = 'Product Code'
|
|||||||
t.prod.type = 'Product Type'
|
t.prod.type = 'Product Type'
|
||||||
t.prod.area = 'Area'
|
t.prod.area = 'Area'
|
||||||
t.prod.spec = 'Product Specification'
|
t.prod.spec = 'Product Specification'
|
||||||
t.prod.attr = 'Dynamic Attributes'
|
t.prod.attr = 'Attributes'
|
||||||
t.prod.attrcode = 'Attribute Code'
|
t.prod.attrcode = 'Attribute Code'
|
||||||
t.prod.attrcodeHints = 'Please input attribute code'
|
t.prod.attrcodeHints = 'Please input attribute code'
|
||||||
t.prod.attrname = 'Attribute Node'
|
t.prod.attrname = 'Attribute Node'
|
||||||
t.prod.attrnameHints = 'Please input attribute name'
|
t.prod.attrnameHints = 'Please input attribute name'
|
||||||
t.prod.attrvalueHints = 'Please input attribute value'
|
t.prod.attrvalueHints = 'Please input attribute value'
|
||||||
t.prod.descHints = 'Please input description'
|
t.prod.descHints = 'Please input description'
|
||||||
t.prod.processTime = 'Processing Time (Hours)'
|
// t.prod.processTime = 'Processing Time (Hours)'
|
||||||
|
t.prod.processTime = 'Processing Time (s)'
|
||||||
t.prod.processTimeHints = 'Please input processing time'
|
t.prod.processTimeHints = 'Please input processing time'
|
||||||
t.prod.relatedPid = 'Related Product'
|
t.prod.relatedPid = 'Related Product'
|
||||||
|
|
||||||
@ -206,6 +208,7 @@ t.alarm.level = 'Alarm Level'
|
|||||||
t.alarm.content = 'Alarm Content'
|
t.alarm.content = 'Alarm Content'
|
||||||
t.alarm.source = 'Alarm Source'
|
t.alarm.source = 'Alarm Source'
|
||||||
t.alarm.det = 'Alarm Details'
|
t.alarm.det = 'Alarm Details'
|
||||||
|
t.alarm.externalCode = 'External Code'
|
||||||
|
|
||||||
t.report = {}
|
t.report = {}
|
||||||
t.report.name = 'Report Name'
|
t.report.name = 'Report Name'
|
||||||
@ -255,6 +258,7 @@ t.realtime.eqName = '设备名称'
|
|||||||
t.realtime.eqCode = '设备编码'
|
t.realtime.eqCode = '设备编码'
|
||||||
t.realtime.productionSnapshotTime = '生产量记录时间'
|
t.realtime.productionSnapshotTime = '生产量记录时间'
|
||||||
t.realtime.statusSnapshotTime = '状态记录时间'
|
t.realtime.statusSnapshotTime = '状态记录时间'
|
||||||
|
t.realtime.refresh = 'Refresh data...'
|
||||||
|
|
||||||
|
|
||||||
t.ws = {}
|
t.ws = {}
|
||||||
@ -263,7 +267,8 @@ t.ws.id = 'Work Section ID'
|
|||||||
t.ws.name = 'Work Section Name'
|
t.ws.name = 'Work Section Name'
|
||||||
t.ws.code = 'Work Section Code'
|
t.ws.code = 'Work Section Code'
|
||||||
t.ws.binded = 'Binded Equipments'
|
t.ws.binded = 'Binded Equipments'
|
||||||
t.ws.unbind = 'Please select an equipment to bind.'
|
t.ws.unbind = 'Equipment Name'
|
||||||
|
t.ws.eqbindplaceholder = 'Select an equipment'
|
||||||
t.ws.sort = 'sort'
|
t.ws.sort = 'sort'
|
||||||
t.ws.setorder = 'Please input order of equipments in the work section.'
|
t.ws.setorder = 'Please input order of equipments in the work section.'
|
||||||
t.ws.bind = 'bind'
|
t.ws.bind = 'bind'
|
||||||
|
@ -59,6 +59,7 @@ t.routes['设备分组'] = '设备分组'
|
|||||||
t.routes['设备信息'] = '设备信息'
|
t.routes['设备信息'] = '设备信息'
|
||||||
t.routes['设备参数状态监控'] = '设备参数状态监控'
|
t.routes['设备参数状态监控'] = '设备参数状态监控'
|
||||||
t.routes['设备分组报警信息'] = '设备分组报警信息'
|
t.routes['设备分组报警信息'] = '设备分组报警信息'
|
||||||
|
t.routes['设备历史参数'] = '设备历史参数'
|
||||||
t.routes['质量检测类型'] = '质量检测类型'
|
t.routes['质量检测类型'] = '质量检测类型'
|
||||||
t.routes['质量检测信息'] = '质量检测信息'
|
t.routes['质量检测信息'] = '质量检测信息'
|
||||||
|
|
||||||
@ -189,15 +190,17 @@ t.prod.code = '产品编码'
|
|||||||
t.prod.type = '产品类型'
|
t.prod.type = '产品类型'
|
||||||
t.prod.area = '单位平方数'
|
t.prod.area = '单位平方数'
|
||||||
t.prod.spec = '规格'
|
t.prod.spec = '规格'
|
||||||
t.prod.attr = '动态属性'
|
t.prod.attr = '属性'
|
||||||
t.prod.attrcode = '属性编码'
|
t.prod.attrcode = '属性编码'
|
||||||
t.prod.attrcodeHints = '请输入属性编码'
|
t.prod.attrcodeHints = '请输入属性编码'
|
||||||
t.prod.attrname = '属性名称'
|
t.prod.attrname = '属性名称'
|
||||||
t.prod.attrnameHints = '请输入属性名称'
|
t.prod.attrnameHints = '请输入属性名称'
|
||||||
t.prod.attrvalueHints = '请输入属性值'
|
t.prod.attrvalueHints = '请输入属性值'
|
||||||
t.prod.descHints = '请输入描述'
|
t.prod.descHints = '请输入描述'
|
||||||
t.prod.processTime = '加工时间 (h)'
|
// t.prod.processTime = '加工时间 (h)'
|
||||||
t.prod.processTimeHints = '请输入加工时间'
|
t.prod.processTime = '产线完成单位产品用时 (s)'
|
||||||
|
t.prod.processTimeHints = '请输入完成单位产品用时'
|
||||||
|
// t.prod.processTimeHints = '请输入加工时间'
|
||||||
t.prod.relatedPid = '关联产品'
|
t.prod.relatedPid = '关联产品'
|
||||||
|
|
||||||
t.alarm = {}
|
t.alarm = {}
|
||||||
@ -211,6 +214,7 @@ t.alarm.level = '报警级别'
|
|||||||
t.alarm.content = '报警内容'
|
t.alarm.content = '报警内容'
|
||||||
t.alarm.source = '报警来源'
|
t.alarm.source = '报警来源'
|
||||||
t.alarm.det = '报警详细内容'
|
t.alarm.det = '报警详细内容'
|
||||||
|
t.alarm.externalCode = '外部编码'
|
||||||
|
|
||||||
t.report = {}
|
t.report = {}
|
||||||
t.report.name = '报表名称'
|
t.report.name = '报表名称'
|
||||||
@ -260,6 +264,7 @@ t.realtime.eqName = '设备名称'
|
|||||||
t.realtime.eqCode = '设备编码'
|
t.realtime.eqCode = '设备编码'
|
||||||
t.realtime.productionSnapshotTime = '生产量记录时间'
|
t.realtime.productionSnapshotTime = '生产量记录时间'
|
||||||
t.realtime.statusSnapshotTime = '状态记录时间'
|
t.realtime.statusSnapshotTime = '状态记录时间'
|
||||||
|
t.realtime.refresh = '刷新数据'
|
||||||
|
|
||||||
|
|
||||||
t.ws = {}
|
t.ws = {}
|
||||||
@ -268,7 +273,8 @@ t.ws.id = '工段ID'
|
|||||||
t.ws.name = '工段名称'
|
t.ws.name = '工段名称'
|
||||||
t.ws.code = '工段编码'
|
t.ws.code = '工段编码'
|
||||||
t.ws.binded = '已绑定的设备'
|
t.ws.binded = '已绑定的设备'
|
||||||
t.ws.unbind = '选择一个设备进行绑定'
|
t.ws.unbind = '设备名称'
|
||||||
|
t.ws.eqbindplaceholder = '选择一个设备进行绑定'
|
||||||
t.ws.sort = '排序'
|
t.ws.sort = '排序'
|
||||||
t.ws.setorder = '请输入工段中设备的顺序'
|
t.ws.setorder = '请输入工段中设备的顺序'
|
||||||
t.ws.bind = '绑定'
|
t.ws.bind = '绑定'
|
||||||
|
@ -168,7 +168,7 @@ function fnAddDynamicMenuRoutes(menuList = [], routes = []) {
|
|||||||
// 菜单的国际化
|
// 菜单的国际化
|
||||||
menuList[i].name = i18n.t(`routes["${menuList[i].name}"]`)
|
menuList[i].name = i18n.t(`routes["${menuList[i].name}"]`)
|
||||||
|
|
||||||
console.log('route ===', route.meta.title)
|
// console.log('route ===', route.meta.title)
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
let URL = (menuList[i].url || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量
|
let URL = (menuList[i].url || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量
|
||||||
if (isURL(URL)) {
|
if (isURL(URL)) {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="visible" :title="$t('schedule.log')" :close-on-click-modal="false" :close-on-press-escape="false" width="75%">
|
<el-dialog :visible.sync="visible" :title="$t('schedule.log')" :close-on-click-modal="false" :close-on-press-escape="false" width="75%">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.jobId" :placeholder="$t('schedule.jobId')" clearable></el-input>
|
<el-input v-model="dataForm.jobId" :placeholder="$t('schedule.jobId')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<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="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<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 @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $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>
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('search') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipment:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipment:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipment:export')" @click="exportHandle()">{{ $t('export') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipment:export')" @click="exportHandle()">{{ $t('export') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
@ -75,7 +75,7 @@ const addOrUpdateConfigs = {
|
|||||||
infoUrl: '/monitoring/equipment',
|
infoUrl: '/monitoring/equipment',
|
||||||
fields: [
|
fields: [
|
||||||
{ name: 'name', label: i18n.t('eq.name'), required: true },
|
{ name: 'name', label: i18n.t('eq.name'), required: true },
|
||||||
{ name: 'code', label: i18n.t('eq.code') },
|
{ name: 'code', label: i18n.t('eq.code'), api: '/monitoring/equipment/getCode' },
|
||||||
{ name: 'enName', label: i18n.t('enname') },
|
{ name: 'enName', label: i18n.t('enname') },
|
||||||
{ name: 'abbr', label: i18n.t('abbr') },
|
{ name: 'abbr', label: i18n.t('abbr') },
|
||||||
{
|
{
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmenalarmlog:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenalarmlog:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="dataForm.lineId" :placeholder="'产线'" clearable>
|
<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-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
|
||||||
@ -12,12 +12,12 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
@ -75,7 +75,14 @@ const tableConfigs = [
|
|||||||
},
|
},
|
||||||
{ prop: 'quantityTime', name: i18n.t('realtime.productionSnapshotTime'), filter: timeFilter },
|
{ prop: 'quantityTime', name: i18n.t('realtime.productionSnapshotTime'), filter: timeFilter },
|
||||||
{ prop: 'statusTime', name: i18n.t('realtime.statusSnapshotTime'), 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: 'alarm',
|
||||||
|
name: i18n.t('realtime.recentParamValue'),
|
||||||
|
buttonContent: i18n.t('realtime.view'),
|
||||||
|
subcomponent: TableTextComponent,
|
||||||
|
emitFullData: true,
|
||||||
|
actionName: 'view-alarm'
|
||||||
|
}
|
||||||
// { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
// { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -186,23 +193,19 @@ export default {
|
|||||||
selectionChangeHandle(val) {
|
selectionChangeHandle(val) {
|
||||||
this.dataListSelections = val
|
this.dataListSelections = val
|
||||||
},
|
},
|
||||||
handleOperations({ type, data: id }) {
|
handleOperations({ type, data }) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'view-alarm':
|
case 'view-alarm':
|
||||||
const { name, code } = this.dataList.find(item => item.id === id)
|
const { equipmentId: id } = data
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'monitoring-equipmentGroupAlarm',
|
name: 'monitoring-equipmentHistoricalParameters',
|
||||||
params: {
|
params: { id }
|
||||||
groupName: name,
|
|
||||||
groupCode: code,
|
|
||||||
id
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 'edit':
|
// case 'edit':
|
||||||
return this.addOrUpdateHandle(id)
|
// return this.addOrUpdateHandle(id)
|
||||||
case 'delete':
|
// case 'delete':
|
||||||
return this.deleteHandle(id)
|
// return this.deleteHandle(id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 新增 / 修改
|
// 新增 / 修改
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 设备效率分析 -->
|
<!-- 设备效率分析 -->
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<!-- 工厂 -->
|
<!-- 工厂 -->
|
||||||
<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> -->
|
||||||
@ -41,7 +41,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('search') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
|
||||||
<!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
<!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 设备效率分析 -->
|
<!-- 设备效率分析 -->
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<!-- 月份 -->
|
<!-- 月份 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="'请选择月份'" format="yyyy-MM" />
|
<el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="'请选择月份'" format="yyyy-MM" />
|
||||||
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('search') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
|
||||||
<!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
<!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmenfile:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenfile:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<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-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -1,27 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm">
|
||||||
<el-form-item :label="$t('eq.groupname')">
|
<el-form-item :label="$t('eq.groupname')">
|
||||||
<strong>{{ $route.params.groupName }}</strong></el-form-item
|
<strong>{{ $route.params.groupName || '--' }}</strong></el-form-item
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form-item :label="$t('eq.groupcode')">
|
<el-form-item :label="$t('eq.groupcode')">
|
||||||
<strong>{{ $route.params.groupCode }}</strong>
|
<strong>{{ $route.params.groupCode || '--' }}</strong>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item>
|
<!-- <el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<br />
|
<br />
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- <el-button @click="getDataList()">{{ $t('query') }}</el-button> -->
|
<!-- 报警编码/内容检索 -->
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmentgroupalarm:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-input :placeholder="$t('alarm.code') + '/' + $t('alarm.content')" v-model="dataForm.key" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
|
<el-button v-if="$route.params.id && $hasPermission('monitoring:equipmentgroupalarm:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroupalarm:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">
|
<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroupalarm:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">
|
||||||
批量删除
|
批量删除
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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"
|
||||||
|
/>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
@ -38,7 +50,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { calcMaxHeight } from '@/utils'
|
import { calcMaxHeight } from '@/utils'
|
||||||
import { timeFilter } from '@/utils/filters'
|
import { timeFilter, dictFilter } from '@/utils/filters'
|
||||||
// import AddOrUpdate from './equipmentGroupAlarm-add-or-update'
|
// import AddOrUpdate from './equipmentGroupAlarm-add-or-update'
|
||||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||||
import i18n from '@/i18n'
|
import i18n from '@/i18n'
|
||||||
@ -61,9 +73,10 @@ const tableConfigs = [
|
|||||||
},
|
},
|
||||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||||
{ prop: 'code', name: i18n.t('alarm.code') },
|
{ prop: 'code', name: i18n.t('alarm.code') },
|
||||||
{ prop: 'typeDictValue', name: i18n.t('alarm.type') },
|
{ prop: 'typeDictValue', name: i18n.t('alarm.type'), filter: dictFilter(dictEntries.alarmType.value) },
|
||||||
{ prop: 'gradeDictValue', name: i18n.t('alarm.level') },
|
{ prop: 'gradeDictValue', name: i18n.t('alarm.level'), filter: dictFilter(dictEntries.alarmLevel.value) },
|
||||||
{ prop: 'alarmContent', name: i18n.t('alarm.content') },
|
{ prop: 'alarmContent', name: i18n.t('alarm.content') },
|
||||||
|
{ prop: 'externalCode', name: i18n.t('alarm.externalCode') },
|
||||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -71,10 +84,11 @@ const addOrUpdateConfigs = {
|
|||||||
type: 'dialog',
|
type: 'dialog',
|
||||||
infoUrl: '/monitoring/equipmentGroupAlarm',
|
infoUrl: '/monitoring/equipmentGroupAlarm',
|
||||||
fields: [
|
fields: [
|
||||||
{ name: 'code', label: i18n.t('alarm.code'), required: true },
|
{ name: 'code', label: i18n.t('alarm.code'), api: '/monitoring/equipmentGroupAlarm/getCode', required: true },
|
||||||
{ name: 'typeDictValue', label: i18n.t('alarm.type'), type: 'select', options: [] },
|
{ name: 'typeDictValue', label: i18n.t('alarm.type'), type: 'select', options: [] },
|
||||||
{ name: 'gradeDictValue', label: i18n.t('alarm.level'), type: 'select', options: [] },
|
{ name: 'gradeDictValue', label: i18n.t('alarm.level'), type: 'select', options: [] },
|
||||||
{ name: 'alarmContent', label: i18n.t('alarm.content'), required: true }
|
{ name: 'alarmContent', label: i18n.t('alarm.content'), required: true },
|
||||||
|
{ name: 'externalCode', label: i18n.t('alarm.externalCode') }
|
||||||
],
|
],
|
||||||
operations: [
|
operations: [
|
||||||
{ name: 'cancel', showAlways: true },
|
{ name: 'cancel', showAlways: true },
|
||||||
@ -129,14 +143,19 @@ export default {
|
|||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
getDataList() {
|
getDataList() {
|
||||||
this.dataListLoading = true
|
this.dataListLoading = true
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl('/monitoring/equipmentGroupAlarm/page'),
|
const queryParams = {
|
||||||
method: 'get',
|
|
||||||
params: this.$http.adornParams({
|
|
||||||
page: this.pageIndex,
|
page: this.pageIndex,
|
||||||
limit: this.pageSize,
|
limit: this.pageSize,
|
||||||
groupId: this.$route.params.id
|
groupId: this.$route.params.id
|
||||||
})
|
}
|
||||||
|
|
||||||
|
if (this.dataForm.key && this.dataForm.key.trim() !== '') queryParams.key = this.dataForm.key
|
||||||
|
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('/monitoring/equipmentGroupAlarm/page'),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams(queryParams)
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.dataList = data.data.list
|
this.dataList = data.data.list
|
||||||
|
@ -0,0 +1,97 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mod-config">
|
||||||
|
<el-form :inline="true">
|
||||||
|
<el-form-item :label="'当前设备id'">
|
||||||
|
<strong>{{ $route.params.id }}</strong></el-form-item
|
||||||
|
>
|
||||||
|
</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 :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { calcMaxHeight } from '@/utils'
|
||||||
|
import { timeFilter } from '@/utils/filters'
|
||||||
|
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||||
|
import i18n from '@/i18n'
|
||||||
|
import BaseTable from '@/components/base-table'
|
||||||
|
import { pick } from 'lodash/object'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
calcMaxHeight,
|
||||||
|
tableConfigs: [],
|
||||||
|
dataList: [],
|
||||||
|
dataListLoading: false,
|
||||||
|
dataListSelections: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate,
|
||||||
|
BaseTable
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
mouted() {
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList() {
|
||||||
|
this.dataListLoading = true
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/monitoring/equipmentValueMonitor/runLog/${this.$route.params.id}`),
|
||||||
|
method: 'get'
|
||||||
|
}).then(({ data: res }) => {
|
||||||
|
if (
|
||||||
|
res &&
|
||||||
|
res.code === 0 &&
|
||||||
|
res.data &&
|
||||||
|
res.data.length > 0 &&
|
||||||
|
res.data[0].nameData &&
|
||||||
|
res.data[0].nameData.length > 0 &&
|
||||||
|
res.data[0].data &&
|
||||||
|
res.data[0].data.length > 0
|
||||||
|
) {
|
||||||
|
this.setTableProps(res.data[0].nameData)
|
||||||
|
this.setTableData(res.data[0].data)
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
}
|
||||||
|
this.dataListLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setTableProps(nameData) {
|
||||||
|
this.tableConfigs = [
|
||||||
|
{
|
||||||
|
type: 'index',
|
||||||
|
name: i18n.t('index')
|
||||||
|
},
|
||||||
|
{ prop: 'time', name: '时间', filter: timeFilter },
|
||||||
|
{ prop: 'plcCode', name: 'PLC 编码' },
|
||||||
|
{ prop: 'equName', name: '设备名称' },
|
||||||
|
{ prop: 'equCode', name: '设备编码' },
|
||||||
|
// ...['数值1', '数值2', '数值3'].map(name => {
|
||||||
|
// return { prop: name, name }
|
||||||
|
// })
|
||||||
|
...Array.from(new Set(nameData.map(item => item.name))).map(name => ({ prop: name, name }))
|
||||||
|
]
|
||||||
|
},
|
||||||
|
setTableData(data) {
|
||||||
|
this.dataList = data.map(item => {
|
||||||
|
const rowItem = pick(item, ['time', 'plcCode', 'equName', 'equCode'])
|
||||||
|
if (item.data && item.data.length > 0) {
|
||||||
|
item.data.forEach(param => {
|
||||||
|
rowItem[param.dynamicName] = param.dynamicValue
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return rowItem
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('name') + ' / ' + $t('code')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('name') + ' / ' + $t('code')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmentplc:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmentplc:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmentplcconnect:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmentplcconnect:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
|
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmenplcparam:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenplcparam:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmenquantity:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenquantity:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmenstatuslog:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenstatuslog:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('eq.type')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('eq.type')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmenttype:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenttype:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmentypefile:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmentypefile:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmenattr:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenattr:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('factory.name') + ' / ' + $t('factory.code')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('factory.name') + ' / ' + $t('factory.code')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:factory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:factory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
@ -114,7 +114,8 @@ export default {
|
|||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.dataList = data.data.list
|
this.dataList = data.data.list
|
||||||
this.totalPage = data.data.totalCount
|
this.totalPage = data.data.total
|
||||||
|
console.log('total page: ', this.totalPage)
|
||||||
} else {
|
} else {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.totalPage = 0
|
this.totalPage = 0
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('prod.name') + ' / ' + $t('prod.code')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('prod.name') + ' / ' + $t('prod.code')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<!-- <el-button @click="addOrEdit()">测试</el-button> -->
|
<!-- <el-button @click="addOrEdit()">测试</el-button> -->
|
||||||
<!-- <el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
<!-- <el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||||
<el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrEdit()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrEdit()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
|
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@ -25,8 +25,7 @@
|
|||||||
></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> -->
|
||||||
|
<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" />
|
||||||
<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="showbasedialog = false" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -52,16 +51,22 @@ const tableConfigs = [
|
|||||||
{ prop: 'code', name: i18n.t('prod.code') },
|
{ prop: 'code', name: i18n.t('prod.code') },
|
||||||
{ prop: 'specifications', name: i18n.t('prod.spec') },
|
{ prop: 'specifications', name: i18n.t('prod.spec') },
|
||||||
{ prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId) },
|
{ prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId) },
|
||||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['viewAttr', 'delete'] }
|
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||||
|
// { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'viewAttr', 'delete'] }
|
||||||
]
|
]
|
||||||
|
|
||||||
const addOrUpdateConfigs = {
|
const addOrUpdateConfigs = {
|
||||||
type: 'dialog', // dialog | drawer | page
|
type: 'dialog', // dialog | drawer | page
|
||||||
infoUrl: '/monitoring/product',
|
infoUrl: '/monitoring/product',
|
||||||
fields: [
|
fields: [
|
||||||
'name',
|
// 'name',
|
||||||
|
{
|
||||||
|
name: 'name'
|
||||||
|
// label: i18n.t('pl.name')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'code',
|
name: 'code',
|
||||||
|
// label: i18n.t('pl.code'),
|
||||||
api: '/monitoring/product/getCode'
|
api: '/monitoring/product/getCode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -222,6 +227,8 @@ export default {
|
|||||||
// 表格操作事件管理
|
// 表格操作事件管理
|
||||||
handleOperations({ type, data }) {
|
handleOperations({ type, data }) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case 'edit': // <== 对照 tableConfig
|
||||||
|
return this.addOrEdit(data)
|
||||||
case 'viewAttr': // <== 对照 tableConfig
|
case 'viewAttr': // <== 对照 tableConfig
|
||||||
return this.addOrEdit(data)
|
return this.addOrEdit(data)
|
||||||
case 'delete':
|
case 'delete':
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:productarrt:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:productarrt:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('pl.name')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('pl.name')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:productionline:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:productionline:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
@ -54,10 +54,12 @@ const addOrUpdateConfigs = {
|
|||||||
type: 'dialog',
|
type: 'dialog',
|
||||||
infoUrl: '/monitoring/productionLine',
|
infoUrl: '/monitoring/productionLine',
|
||||||
fields: [
|
fields: [
|
||||||
'name',
|
// 'name',
|
||||||
{ name: 'code', api: '/monitoring/productionLine/getCode' },
|
{ name: 'name', label: i18n.t('pl.name') },
|
||||||
|
{ name: 'code', label: i18n.t('pl.code'), api: '/monitoring/productionLine/getCode' },
|
||||||
{
|
{
|
||||||
name: 'factoryId',
|
name: 'factoryId',
|
||||||
|
required: true,
|
||||||
label: i18n.t('factory.title'),
|
label: i18n.t('factory.title'),
|
||||||
type: 'select',
|
type: 'select',
|
||||||
placeholder: i18n.t('pl.factoryHints'),
|
placeholder: i18n.t('pl.factoryHints'),
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:productionlinerecsch:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:productionlinerecsch:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiondet:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:qualityinspectiondet:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<!-- <el-form-item>
|
<!-- <el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
|
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('inspect.typename')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('inspect.typename')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiontype:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:qualityinspectiontype:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -47,6 +47,7 @@ export default {
|
|||||||
})
|
})
|
||||||
this.intervalId = setInterval(() => {
|
this.intervalId = setInterval(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
message: this.$t('realtime.refresh'),
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
@ -59,7 +60,11 @@ export default {
|
|||||||
})
|
})
|
||||||
}, 1000 * 60 * 5)
|
}, 1000 * 60 * 5)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
// beforeDestroy() {
|
||||||
|
// console.log('before destroyed...')
|
||||||
|
// if (this.intervalId) clearInterval(this.intervalId)
|
||||||
|
// },
|
||||||
|
deactivated() {
|
||||||
if (this.intervalId) clearInterval(this.intervalId)
|
if (this.intervalId) clearInterval(this.intervalId)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -129,7 +134,7 @@ export default {
|
|||||||
{ 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 + '-scrapNum', label: i18n.t('realtime.data') },
|
{ prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.data') },
|
||||||
{ prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate'), filter: val => val !== '-' ? `${val.toFixed(2)}%` : '-' }
|
{ prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate'), filter: val => (val !== '-' ? `${val.toFixed(2)}%` : '-') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -47,11 +47,11 @@ export default {
|
|||||||
|
|
||||||
this.intervalId = setInterval(() => {
|
this.intervalId = setInterval(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('module.factory.realtime.productLine.refresh'),
|
message: this.$t('realtime.refresh'),
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.clearData()
|
this.clearData()
|
||||||
this.fetchList().then(res => {
|
this.fetchList().then(({ data: res }) => {
|
||||||
this.testData = res
|
this.testData = res
|
||||||
this.handleData()
|
this.handleData()
|
||||||
})
|
})
|
||||||
@ -60,7 +60,7 @@ export default {
|
|||||||
}, 1000 * 60 * 5)
|
}, 1000 * 60 * 5)
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
deactivated() {
|
||||||
if (this.intervalId) clearInterval(this.intervalId)
|
if (this.intervalId) clearInterval(this.intervalId)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -43,15 +43,21 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
this.intervalId = setInterval(() => {
|
this.intervalId = setInterval(() => {
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('realtime.refresh'),
|
||||||
|
type: 'warning',
|
||||||
|
onClose: () => {
|
||||||
this.clearData()
|
this.clearData()
|
||||||
this.fetchList().then(res => {
|
this.fetchList().then(({ data: res }) => {
|
||||||
this.testData = res
|
this.testData = res
|
||||||
this.handleData()
|
this.handleData()
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}, 1000 * 60 * 5)
|
}, 1000 * 60 * 5)
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
deactivated() {
|
||||||
if (this.intervalId) clearInterval(this.intervalId)
|
if (this.intervalId) clearInterval(this.intervalId)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.name" :placeholder="$t('categoryName')" clearable></el-input>
|
<el-input v-model="dataForm.name" :placeholder="$t('categoryName')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:reportsheetcategory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:reportsheetcategory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
|
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.name" :placeholder="$t('report.name')" clearable></el-input>
|
<el-input v-model="dataForm.name" :placeholder="$t('report.name')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<!-- <el-button v-if="$hasPermission('')" type="primary" @click="addOrUpdateHandle()">新增(跳到设计)</el-button> -->
|
<!-- <el-button v-if="$hasPermission('')" type="primary" @click="addOrUpdateHandle()">新增(跳到设计)</el-button> -->
|
||||||
<el-button v-if="$hasPermission('monitoring:reportsheet:save')" type="primary" @click="handleAdd()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:reportsheet:save')" type="primary" @click="handleAdd()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||||
|
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:reporsheet:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:reporsheet:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:reporsheecategory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:reporsheecategory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('ws.name')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('ws.name')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:workshopsection:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:workshopsection:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :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" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
@ -45,6 +45,7 @@ const tableConfigs = [
|
|||||||
{ prop: 'name', name: i18n.t('ws.name') },
|
{ prop: 'name', name: i18n.t('ws.name') },
|
||||||
{ prop: 'code', name: i18n.t('ws.code') },
|
{ prop: 'code', name: i18n.t('ws.code') },
|
||||||
{ prop: 'productionLineName', name: i18n.t('pl.title') },
|
{ prop: 'productionLineName', name: i18n.t('pl.title') },
|
||||||
|
{ prop: 'description', name: i18n.t('desc') },
|
||||||
{ prop: 'remark', name: i18n.t('remark') },
|
{ prop: 'remark', name: i18n.t('remark') },
|
||||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||||
]
|
]
|
||||||
@ -123,12 +124,13 @@ export default {
|
|||||||
key: this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0 && data.data?.list?.length > 0) {
|
||||||
this.dataList = data.data.list
|
this.dataList = data.data.list
|
||||||
this.totalPage = data.data.total
|
this.totalPage = data.data.total
|
||||||
} else {
|
} else {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.totalPage = 0
|
this.totalPage = 0
|
||||||
|
this.pageIndex = 1
|
||||||
}
|
}
|
||||||
this.dataListLoading = false
|
this.dataListLoading = false
|
||||||
})
|
})
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:workshopsectionequipment:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<el-button v-if="$hasPermission('monitoring:workshopsectionequipment:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="super-flexible-dialog" :title="isDetail ? $t('ws.detail') : !dataForm.id ? $t('add') : $t('ws.edit')" :visible.sync="visible">
|
<el-dialog
|
||||||
|
class="super-flexible-dialog"
|
||||||
|
:title="isDetail ? $t('ws.detail') : !dataForm.id ? $t('add') : $t('edit')"
|
||||||
|
:visible.sync="visible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:destroy-on-close="true"
|
||||||
|
>
|
||||||
<div style="max-height: 60vh; overflow-y: scroll; overflow-x: hidden;">
|
<div style="max-height: 60vh; overflow-y: scroll; overflow-x: hidden;">
|
||||||
<el-form ref="dataForm" :model="dataForm" :rules="dataFormRules">
|
<el-form ref="dataForm" :model="dataForm" :rules="dataFormRules">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
@ -36,7 +42,7 @@
|
|||||||
<el-button type="text" v-if="!showAttrForm" @click="addEq">{{ $t('add') }}</el-button>
|
<el-button type="text" v-if="!showAttrForm" @click="addEq">{{ $t('add') }}</el-button>
|
||||||
</h3>
|
</h3>
|
||||||
<div class="table" v-if="!showAttrForm">
|
<div class="table" v-if="!showAttrForm">
|
||||||
<base-table :data="eqList" :table-head-configs="tableProps" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
<base-table :page="page" :size="limit" :data="eqList" :table-head-configs="tableProps" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="sizeChangeHandle"
|
@size-change="sizeChangeHandle"
|
||||||
@current-change="currentChangeHandle"
|
@current-change="currentChangeHandle"
|
||||||
|
@ -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">
|
<el-select v-if="!edit" clearable v-model="dataForm.equipmentId" :placeholder="$t('ws.eqbindplaceholder')">
|
||||||
<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
|
||||||
|
Loading…
Reference in New Issue
Block a user