'修改路由点击BUG,字段显示,按钮盒,基础样式'

This commit is contained in:
Fanzink
2023-01-06 15:44:05 +08:00
parent a08af6774e
commit 3265b4a580
36 changed files with 736 additions and 143 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
<el-select v-model="dataForm.lineId" :placeholder="'产线'" clearable>
<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
@@ -12,7 +12,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</el-form-item>
</el-form>
@@ -256,3 +256,20 @@ export default {
}
}
</script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<!-- 设备效率分析 -->
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<!-- 工厂 -->
<el-form-item>
<!-- <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-button @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</el-form-item>
</el-form>
@@ -372,4 +372,18 @@ export default {
.slide-to-left-enter-to {
transform: translateX(0);
}
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<!-- 设备效率分析 -->
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<!-- 月份 -->
<el-form-item>
<el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="$t('prompt.month')" format="yyyy-MM" />
@@ -15,7 +15,7 @@
<!-- 按钮 -->
<el-form-item>
<el-button @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</el-form-item>
</el-form>
@@ -49,7 +49,7 @@ const tableConfigs = [
name: i18n.t('index')
},
// { prop: 'time', name: '时间', filter: timeFilter },
{ prop: 'pdName', name: i18n.t('pl.name') },
{ prop: 'pdlName', name: i18n.t('pl.name') },
{ prop: 'wsName', name: i18n.t('ws.title') },
{ prop: 'eqName', name: i18n.t('eq.title') },
{ prop: 'mtbf', name: i18n.t('eq.mtbf'), width: 220 },
@@ -202,3 +202,20 @@ export default {
}
}
</script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -19,7 +19,7 @@
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
@clickTopBtn="clickTopBtn" />
@clickTopBtn="clickTopBtn"
/>
<el-pagination
@size-change="sizeChangeHandle"

View File

@@ -1,6 +1,6 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm">
<el-form :inline="true" :model="dataForm" class="blueTip" size="small">
<el-form-item :label="$t('eq.groupname')">
<strong>{{ $route.params.groupName || '--' }}</strong></el-form-item
>
@@ -17,8 +17,8 @@
<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 class="buttonColor" @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> -->
@@ -26,6 +26,7 @@
</el-form>
<base-table
:top-btn-config="topBtnConfig"
:page="pageIndex"
:size="pageSize"
:data="dataList"
@@ -33,6 +34,7 @@
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
@clickTopBtn="clickTopBtn"
/>
<el-pagination
@size-change="sizeChangeHandle"
@@ -65,7 +67,12 @@ const dictEntries = {
alarmType: { value: '1557925215454814210', field: 'typeDictValue' }, // field 和下面 addOrUpdateConfigs 里对应
alarmLevel: { value: '1557925289517834242', field: 'gradeDictValue' }
}
const topBtnConfig = [
{
type: 'add',
btnName: i18n.t('add')
}
]
const tableConfigs = [
{
type: 'index',
@@ -76,7 +83,7 @@ const tableConfigs = [
{ prop: 'typeDictValue', name: i18n.t('alarm.type'), filter: dictFilter(dictEntries.alarmType.value) },
{ prop: 'gradeDictValue', name: i18n.t('alarm.level'), filter: dictFilter(dictEntries.alarmLevel.value) },
{ prop: 'alarmContent', name: i18n.t('alarm.content') },
// { prop: 'externalCode', name: i18n.t('alarm.externalCode') },
{ prop: 'externalCode', name: i18n.t('alarm.externalCode') },
{ prop: 'description', name: i18n.t('alarm.description') },
{ prop: 'remark', name: i18n.t('alarm.remark') },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
@@ -90,6 +97,7 @@ const addOrUpdateConfigs = {
{ name: 'typeDictValue', label: i18n.t('alarm.type'), type: 'select', options: [] },
{ name: 'gradeDictValue', label: i18n.t('alarm.level'), type: 'select', options: [] },
{ name: 'alarmContent', label: i18n.t('alarm.content'), required: true },
{ name: 'externalCode', label: i18n.t('alarm.externalCode') },
{ name: 'description', label: i18n.t('alarm.description') },
{ name: 'remark', label: i18n.t('alarm.remark') }
// { name: 'externalCode', label: i18n.t('alarm.externalCode') }
@@ -105,6 +113,7 @@ export default {
mixins: [dictListMixin],
data() {
return {
topBtnConfig,
addOrUpdateConfigs,
calcMaxHeight,
tableConfigs,
@@ -212,6 +221,17 @@ export default {
this.$refs.addOrUpdate.init(id)
})
},
clickTopBtn() {
this.addOrUpdateConfigs.operations.forEach(item => {
if (item.extraFields) {
item.extraFields.equipmentGroupId = this.$route.params.id || null
}
})
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init()
})
},
// 删除
deleteHandle(id) {
var ids = id
@@ -247,3 +267,20 @@ export default {
}
}
</script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -1,16 +1,16 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('name') + ' / ' + $t('code')" clearable></el-input>
</el-form-item>
<el-form-item>
<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 class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:equipmentplc:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</el-form-item>
</el-form>
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
<base-table :top-btn-config="topBtnConfig" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" @clickTopBtn="clickTopBtn"/>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
@@ -35,7 +35,12 @@ import i18n from '@/i18n'
import BaseTable from '@/components/base-table'
import TableOperateComponent from '@/components/base-table/components/operationComponent'
// import TableTextComponent from '@/components/base-table/components/detailComponent'
const topBtnConfig = [
{
type: 'add',
btnName: i18n.t('add')
}
]
const tableConfigs = [
{ type: 'index', width: 100, name: i18n.t('index') },
{ prop: 'code', name: i18n.t('code') },
@@ -83,6 +88,7 @@ const addOrUpdateConfigs = {
export default {
data() {
return {
topBtnConfig,
tableConfigs,
calcMaxHeight,
addOrUpdateConfigs,
@@ -165,6 +171,12 @@ export default {
this.$refs.addOrUpdate.init(id)
})
},
clickTopBtn() {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init()
})
},
// 删除
deleteHandle(id) {
var ids = id
@@ -200,3 +212,20 @@ export default {
}
}
</script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -1,16 +1,16 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
</el-form-item>
<el-form-item>
<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 class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:equipmentplcconnect:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</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 :top-btn-config="topBtnConfig" :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" @clickTopBtn="clickTopBtn"/>
<el-pagination
@size-change="sizeChangeHandle"
@@ -38,7 +38,12 @@ import TableOperateComponent from '@/components/base-table/components/operationC
// import TableTextComponent from '@/components/base-table/components/detailComponent'
import { dictFilter } from '@/utils/filters'
// import axios from '@/utils/request.js'
const topBtnConfig = [
{
type: 'add',
btnName: i18n.t('add')
}
]
const tableConfigs = [
{ type: 'index', width: 100, name: i18n.t('index') },
{ prop: 'lineName', name: i18n.t('pl.title') },
@@ -116,6 +121,7 @@ const addOrUpdateConfigs = {
export default {
data() {
return {
topBtnConfig,
addOrUpdateConfigs,
calcMaxHeight,
tableConfigs,
@@ -229,6 +235,12 @@ export default {
this.$refs.addOrUpdate.init(id)
})
},
clickTopBtn() {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init()
})
},
// 删除
deleteHandle(id) {
var ids = id
@@ -264,3 +276,20 @@ export default {
}
}
</script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<!-- 设备效率分析 -->
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<!-- 产线 -->
<el-form-item>
<el-select v-model="dataForm.productlines" :placeholder="'产线'" @change="handleProductLineChange" clearable>
@@ -22,7 +22,7 @@
</el-form-item>
<!-- 按钮 -->
<el-form-item>
<el-button @click="getDataList()">{{ $t('search') }}</el-button>
<el-button class="buttonColor" @click="getDataList()">{{ $t('search') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</el-form-item>
<el-form-item>
@@ -544,4 +544,18 @@ export default {
/* .time-chart__inner {
transition: all 300ms ease-out;
} */
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -1,17 +1,19 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<!-- <el-form-item> -->
<!-- <el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
</el-form-item> -->
<el-form :inline="true" :model="dataForm" :rules="dataFormRules" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
<el-button @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
<el-button v-if="$hasPermission('monitoring:qualityInspectionBoxBtn:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
<!-- <el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input> -->
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:qualityInspectionBoxBtn:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
<!-- <el-button v-if="$hasPermission('monitoring:equipment:export')" @click="exportHandle()">{{ $t('export') }}</el-button> -->
</el-form-item>
</el-form>
<base-table
:top-btn-config="topBtnConfig"
:page="pageIndex"
:size="pageSize"
:data="dataList"
@@ -19,7 +21,7 @@
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
/>
@clickTopBtn="clickTopBtn" />
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
@@ -27,8 +29,7 @@
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
v-if="addOrUpdateVisible"
@@ -36,8 +37,7 @@
:configs="addOrUpdateConfigs"
@refreshDataList="getDataList"
@select-change="handleDialogSelectChange"
@destory-dialog="handleDestroyDialog"
/>
@destory-dialog="handleDestroyDialog" />
</div>
</template>
@@ -51,8 +51,14 @@ import TableOperateComponent from '@/components/base-table/components/operationC
// import CKEditor from 'ckeditor4-vue'
import { calcMaxHeight } from '@/utils'
import { timeFilter } from '@/utils/filters'
import { iteratee } from 'lodash'
// import Cookies from 'js-cookie'
const topBtnConfig = [
{
type: 'add',
btnName: i18n.t('add')
}
]
const tableConfigs = [
{
type: 'index',
@@ -86,14 +92,55 @@ const addOrUpdateConfigs = {
{ name: 'sectionId', label: i18n.t('ws.title'), required: true, type: 'select', options: [] },
{ name: 'model', label: i18n.t('andeng.btnBoxModel') },
{
// name: 'keyValue',
// label: i18n.t('andeng.btnVal'),
// required: true,
// rules: [{ type: 'integer', trigger: 'blur', message: i18n.t('hints.integer'), transform: (val) => Number(val) }]
// keyValue: [
// {
// type: 'number',
// message: i18n.t('validate.keyValueWarning'),
// trigger: 'blur',
// transform(value) {
// if (value) {
// // 将输入的转为数字
// var val = Number(value)
// // 正则校验输入的数字是否在0-128之内并且属于整数
// if (/^(?:[1-9]?\d|128)$/.test(val)) return val
// // 返回false即为校验失败
// return false
// }
// }
// }
// ]
name: 'keyValue',
label: i18n.t('andeng.btnVal'),
required: true,
rules: [{ type: 'integer', trigger: 'blur', message: i18n.t('hints.integer'), transform: val => Number(val) }]
rules: [
{
type: 'integer',
trigger: 'blur',
message: i18n.t('validate.keyValueWarning'),
transform(value) {
if (value) {
// 将输入的转为数字
var val = Number(value)
// 正则校验输入的数字是否在[0-100]之内并且属于整数
if (/^(?:[1-9]?\d|100)$/.test(val)) return val
// 返回false即为校验失败
return false
}
}
}
]
},
{
name: 'inspectionDetContent',
label: i18n.t('andeng.inspectContent')
label: i18n.t('andeng.inspectContent'),
required: true,
type: 'select',
options: []
}
],
operations: [
@@ -116,11 +163,13 @@ const addOrUpdateConfigs = {
export default {
data() {
return {
topBtnConfig,
calcMaxHeight,
tableConfigs,
addOrUpdateConfigs,
dataForm: {
key: ''
key: '',
inspectionDetId: ''
},
dataList: [],
pageIndex: 1,
@@ -128,7 +177,26 @@ export default {
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false
addOrUpdateVisible: false,
dataFormRules: {
keyValue: [
{
type: 'number',
message: i18n.t('validate.keyValueWarning'),
trigger: 'blur',
transform(value) {
if (value) {
// 将输入的转为数字
var val = Number(value)
// 正则校验输入的数字是否在0-128之内并且属于整数
if (/^(?:[1-9]?\d|128)$/.test(val)) return val
// 返回false即为校验失败
return false
}
}
}
]
}
}
},
components: {
@@ -136,6 +204,7 @@ export default {
BaseTable
},
activated() {
this.getInspectionContentList()
this.getDataList()
this.getPlList()
this.getWsList()
@@ -153,9 +222,9 @@ export default {
url: this.$http.adornUrl('/monitoring/productionLine/list'),
method: 'get'
}).then(({ data: res }) => {
const plConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'productionId')
const plConfig = this.addOrUpdateConfigs.fields.find((item) => item.name === 'productionId')
plConfig.options =
res.data?.map(item => ({
res.data?.map((item) => ({
value: item.id,
label: item.name
})) || []
@@ -175,9 +244,9 @@ export default {
method: 'get',
params: this.$http.adornParams(params)
}).then(({ data: res }) => {
const wsConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'sectionId')
const wsConfig = this.addOrUpdateConfigs.fields.find((item) => item.name === 'sectionId')
wsConfig.options =
res.data?.list?.map(item => ({
res.data?.list?.map((item) => ({
value: item.id,
label: item.name
})) || []
@@ -194,9 +263,9 @@ export default {
// key: this.dataForm.key
})
}).then(({ data }) => {
const eqTypeConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'equipmentTypeId')
const eqTypeConfig = this.addOrUpdateConfigs.fields.find((item) => item.name === 'equipmentTypeId')
eqTypeConfig.options =
data.data?.list?.map(item => ({
data.data?.list?.map((item) => ({
value: item.id,
label: item.name
})) || []
@@ -213,9 +282,9 @@ export default {
// key: this.dataForm.key
})
}).then(({ data }) => {
const groupConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'groupId')
const groupConfig = this.addOrUpdateConfigs.fields.find((item) => item.name === 'groupId')
groupConfig.options =
data.data?.list?.map(item => ({
data.data?.list?.map((item) => ({
value: item.id,
label: item.name
})) || []
@@ -227,10 +296,11 @@ export default {
this.$http({
url: this.$http.adornUrl('/monitoring/qualityInspectionBoxBtn/page'),
method: 'get',
// key 查询
params: this.$http.adornParams({
page: this.pageIndex,
limit: this.pageSize
// key: this.dataForm.key
limit: this.pageSize,
key: this.dataForm.key
})
}).then(({ data }) => {
if (data && data.code === 0) {
@@ -245,6 +315,31 @@ export default {
this.dataListLoading = false
})
},
// 获取产检测内容列表
getInspectionContentList() {
this.$http({
url: this.$http.adornUrl('/monitoring/qualityInspectionDet/page'),
method: 'get',
params: this.$http.adornParams({
limit: 999,
page: 1
})
}).then(({ data: res }) => {
if (res && res.code === 0) {
this.addOrUpdateConfigs.fields.forEach((item) => {
console.log('item',item)
console.log('res',res)
if (item.name === 'inspectionDetContent')
item.options = res.data.list.map((item) => ({ label: item.content, value: item.content, inspectionDetId: item.code }))
// console.log('item',item)
})
} else {
this.addOrUpdateConfigs.fields.forEach((item) => {
if (item.name === 'inspectionDetContent') item.options.splice(0)
})
}
})
},
// 每页数
sizeChangeHandle(val) {
this.pageSize = val
@@ -265,6 +360,18 @@ export default {
switch (name) {
case 'productionId':
this.getWsList(id)
case 'inspectionDetContent':
// this.dataForm.inspectionDetId = id
// console.log(id)
// console.log(this.addOrUpdateConfigs.fields[4].options)
for (var i = 0; i < this.addOrUpdateConfigs.fields[4].options.length; i++) {
if (this.addOrUpdateConfigs.fields[4].options[i].label == id) {
this.dataForm.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
this.addOrUpdateConfigs.fields.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
}
}
console.log('dataForm', this.dataForm)
console.log('addOrUpdateConfigs', this.addOrUpdateConfigs.fields)
}
},
handleOperations({ type, data: id }) {
@@ -292,7 +399,7 @@ export default {
url: this.$http.adornUrl('/monitoring/equipment/export'),
method: 'get',
responseType: 'blob'
}).then(res => {
}).then((res) => {
let fileName = 'equipment-list.xls'
if (res.headers['content-disposition']) {
const contentDisposition = res.headers['content-disposition']
@@ -331,11 +438,17 @@ export default {
// }
// })
},
clickTopBtn() {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init()
})
},
// 删除
deleteHandle(id) {
var ids = id
? [id]
: this.dataListSelections.map(item => {
: this.dataListSelections.map((item) => {
return item.id
})
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
@@ -366,3 +479,20 @@ export default {
}
}
</script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<div class="mod-config">
<el-form :inline="true" @keyup.enter.native="getDataList()">
<el-form :inline="true" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<el-form-item>
<!-- type="datetimerange" -->
<el-date-picker
@@ -16,7 +16,7 @@
/>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button class="buttonColor" @click="getDataList()">{{ $t('query') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</el-form-item>
</el-form>

View File

@@ -1,16 +1,16 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
</el-form-item>
<el-form-item>
<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 class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:qualityinspectiondet:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</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 :top-btn-config="topBtnConfig" :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" @clickTopBtn="clickTopBtn"/>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
@@ -35,7 +35,12 @@ import i18n from '@/i18n'
import BaseTable from '@/components/base-table'
import TableOperateComponent from '@/components/base-table/components/operationComponent'
// import TableTextComponent from '@/components/base-table/components/detailComponent'
const topBtnConfig = [
{
type: 'add',
btnName: i18n.t('add')
}
]
const tableConfigs = [
{
type: 'index',
@@ -68,6 +73,7 @@ const addOrUpdateConfigs = {
export default {
data() {
return {
topBtnConfig,
calcMaxHeight,
addOrUpdateConfigs,
tableConfigs,
@@ -172,6 +178,12 @@ export default {
this.$refs.addOrUpdate.init(id)
})
},
clickTopBtn() {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init()
})
},
// 删除
deleteHandle(id) {
var ids = id
@@ -207,3 +219,20 @@ export default {
}
}
</script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
<el-select v-model="dataForm.lineId" :placeholder="$t('pl.title')" clearable filterable>
<el-option v-for="pl in plList" :key="pl.value" :value="pl.value" :label="pl.label" />
@@ -10,12 +10,13 @@
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
</el-form-item>
<el-form-item>
<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 class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</el-form-item>
</el-form>
<base-table
:top-btn-config="topBtnConfig"
:page="pageIndex"
:size="pageSize"
:data="dataList"
@@ -23,6 +24,7 @@
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
@clickTopBtn="clickTopBtn"
/>
<el-pagination
@@ -57,7 +59,12 @@ import i18n from '@/i18n'
import BaseTable from '@/components/base-table'
import TableOperateComponent from '@/components/base-table/components/operationComponent'
// import TableTextComponent from '@/components/base-table/components/detailComponent'
const topBtnConfig = [
{
type: 'add',
btnName: i18n.t('add')
}
]
const tableConfigs = [
{
type: 'index',
@@ -111,6 +118,7 @@ const addOrUpdateConfigs = {
export default {
data() {
return {
topBtnConfig,
calcMaxHeight,
addOrUpdateConfigs,
tableConfigs,
@@ -271,6 +279,12 @@ export default {
this.$refs.addOrUpdate.init(id)
})
},
clickTopBtn() {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init()
})
},
// 删除
deleteHandle(id) {
var ids = id
@@ -306,3 +320,20 @@ export default {
}
}
</script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -1,16 +1,17 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('inspect.typename')" clearable></el-input>
</el-form-item>
<el-form-item>
<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 class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:qualityinspectiontype:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</el-form-item>
</el-form>
<base-table
:top-btn-config="topBtnConfig"
:page="pageIndex"
:size="pageSize"
:data="dataList"
@@ -18,6 +19,7 @@
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
@clickTopBtn="clickTopBtn"
/>
<el-pagination
@size-change="sizeChangeHandle"
@@ -43,6 +45,12 @@ import TableOperateComponent from '@/components/base-table/components/operationC
// import TableTextComponent from '@/components/base-table/components/detailComponent'
import { calcMaxHeight } from '@/utils'
import { timeFilter } from '@/utils/filters'
const topBtnConfig = [
{
type: 'add',
btnName: i18n.t('add')
}
]
const tableConfigs = [
{
type: 'index',
@@ -73,6 +81,7 @@ const addOrUpdateConfigs = {
export default {
data() {
return {
topBtnConfig,
calcMaxHeight,
addOrUpdateConfigs,
tableConfigs,
@@ -155,6 +164,13 @@ export default {
this.$refs.addOrUpdate.init(id)
})
},
// 新增按钮
clickTopBtn() {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init()
})
},
// 删除
deleteHandle(id) {
var ids = id
@@ -190,3 +206,20 @@ export default {
}
}
</script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -1,8 +1,8 @@
<!--
* @Author: lb
* @Date: 2022-06-22 14:00:17
* @LastEditors: lb
* @LastEditTime: 2022-06-22 14:00:17
* @LastEditors: fzq
* @LastEditTime: 2023-01-03 10:18:14
* @Description: 设备生产实时数据
-->
<template>
@@ -59,6 +59,7 @@ export default {
}
})
}, 1000 * 60 * 5)
console.log(this.tableProps)
},
// beforeDestroy() {
// console.log('before destroyed...')

View File

@@ -1,16 +1,16 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
<el-input v-model="dataForm.name" :placeholder="$t('categoryName')" clearable></el-input>
</el-form-item>
<el-form-item>
<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 class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
<!-- <el-button v-if="$hasPermission('monitoring:reportsheetcategory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</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 :top-btn-config="topBtnConfig" :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" @clickTopBtn="clickTopBtn"/>
<el-pagination
@size-change="sizeChangeHandle"
@@ -36,6 +36,12 @@ import TableOperateComponent from '@/components/base-table/components/operationC
// import TableTextComponent from '@/components/base-table/components/detailComponent'
import { calcMaxHeight } from '@/utils'
import { timeFilter } from '@/utils/filters'
const topBtnConfig = [
{
type: 'add',
btnName: i18n.t('add')
}
]
const tableConfigs = [
{
type: 'index',
@@ -60,6 +66,7 @@ const addOrUpdateConfigs = {
export default {
data() {
return {
topBtnConfig,
calcMaxHeight,
tableConfigs,
addOrUpdateConfigs,
@@ -141,6 +148,12 @@ export default {
this.$refs.addOrUpdate.init(id)
})
},
clickTopBtn() {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init()
})
},
// 删除
deleteHandle(id) {
var ids = id
@@ -176,3 +189,20 @@ export default {
}
}
</script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@@ -1,17 +1,17 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
<el-input v-model="dataForm.name" :placeholder="$t('report.name')" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</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>
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
<base-table :top-btn-config="topBtnConfig" :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" @clickTopBtn="clickTopBtn"/>
<el-pagination
@size-change="sizeChangeHandle"
@@ -37,7 +37,12 @@ import i18n from '@/i18n'
import BaseTable from '@/components/base-table'
import TableOperateComponent from '@/components/base-table/components/operationComponent'
import axios from '@/utils/request'
const topBtnConfig = [
{
type: 'add',
btnName: i18n.t('add')
}
]
const CategoryList = {
name: 'CategoryList',
props: {
@@ -93,6 +98,7 @@ const addOrUpdateConfigs = {
export default {
data() {
return {
topBtnConfig,
addOrUpdateConfigs,
tableConfigs: [],
dataForm: {
@@ -233,6 +239,11 @@ export default {
name: 'monitoring-reportDesign'
})
},
clickTopBtn() {
this.$router.push({
name: 'monitoring-reportDesign'
})
},
addOrUpdateHandle(id) {
console.log('edit:', id)
this.addOrUpdateVisible = true
@@ -275,3 +286,20 @@ export default {
}
}
</script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>