Compare commits

..

No commits in common. "ab09a2b08c7f7d73e8ef286cebaa8083fbdb9290" and "33188481bf840735ec83be22d17eb1021ffbc837" have entirely different histories.

6 changed files with 93 additions and 169 deletions

View File

@ -347,8 +347,6 @@ export default {
console.log('setting code: ', response.data); console.log('setting code: ', response.data);
// //
this.form[opt.prop] = response.data; this.form[opt.prop] = response.data;
// dataFormcodebug
this.$emit('update', this.form)
} }
}); });
} }

View File

@ -61,7 +61,7 @@
rows: drawerBaseInfoRows, rows: drawerBaseInfoRows,
}, },
{ {
name: '采集参数', name: '属性列表',
key: 'attrs', key: 'attrs',
props: drawerListProps, props: drawerListProps,
url: '/base/equipment-plc-param/page', url: '/base/equipment-plc-param/page',
@ -75,26 +75,18 @@
pageSize: 10, pageSize: 10,
}, },
tableBtn: [ tableBtn: [
{ this.$auth.hasPermi('equipment:collection-config-param:update')
? {
type: 'edit', type: 'edit',
btnName: '修改', btnName: '修改',
}, }
{ : undefined,
this.$auth.hasPermi('equipment:collection-config-param:delete')
? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
}, }
// this.$auth.hasPermi('equipment:collection-config-param:update') : undefined,
// ? {
// type: 'edit',
// btnName: '',
// }
// : undefined,
// this.$auth.hasPermi('equipment:collection-config-param:delete')
// ? {
// type: 'delete',
// btnName: '',
// }
// : undefined,
].filter((v) => v), ].filter((v) => v),
allowAdd: true, allowAdd: true,
}, },
@ -114,6 +106,7 @@ import {
getEquipmentPlcConnectPage, getEquipmentPlcConnectPage,
exportEquipmentPlcConnectExcel, exportEquipmentPlcConnectExcel,
} from '@/api/base/equipmentPlcConnect'; } from '@/api/base/equipmentPlcConnect';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
// import './http'; // import './http';
import BasicDrawer from './components/BasicDrawer.vue'; import BasicDrawer from './components/BasicDrawer.vue';
@ -189,15 +182,13 @@ export default {
placeholder: '请选择设备', placeholder: '请选择设备',
param: 'equipmentId', param: 'equipmentId',
selectOptions: [], selectOptions: [],
filterable: true
}, },
{ {
type: 'select', type: 'select',
label: '关联表编码', label: '编码',
placeholder: '请选择关联表编码', placeholder: '请选择编码',
param: 'plcId', param: 'plcId',
selectOptions: [], selectOptions: [],
filterable: true
}, },
{ {
type: 'button', type: 'button',
@ -233,9 +224,7 @@ export default {
prop: 'plcId', prop: 'plcId',
labelKey: `plcTableName`, labelKey: `plcTableName`,
url: '/base/equipment-plc/listAll', url: '/base/equipment-plc/listAll',
rules: [ rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }],
{ required: true, message: '关联表名不能为空', trigger: 'blur' },
],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -247,9 +236,7 @@ export default {
label: '设备', label: '设备',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/page?pageNo=1&pageSize=99', url: '/base/core-equipment/page?pageNo=1&pageSize=99',
rules: [ rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }],
{ required: true, message: '设备不能为空', trigger: 'blur' },
],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -275,9 +262,7 @@ export default {
input: true, input: true,
label: '设备名', label: '设备名',
prop: 'equipmentName', prop: 'equipmentName',
rules: [ rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
{ required: true, message: '设备名不能为空', trigger: 'blur' },
],
// bind: { // bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode... // disabled: this.editMode == 'detail', // some condition, like detail mode...
// } // }
@ -311,8 +296,7 @@ export default {
label: '生产参数类型', label: '生产参数类型',
filter: (val) => filter: (val) =>
val != null val != null
// ? ['', '', '', '', '', ''][val] ? ['', '进片数量', '出片数量', '破损数量', '无类型', ''][val]
? ['', '进口计数', '出口计数', '损耗计数', '无类型', ''][val]
: '-', : '-',
}, },
{ {

View File

@ -59,6 +59,7 @@ import {
getEquipmentPlcPage, getEquipmentPlcPage,
exportEquipmentPlcExcel, exportEquipmentPlcExcel,
} from '@/api/base/equipmentPlc'; } from '@/api/base/equipmentPlc';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
const switchBtn = { const switchBtn = {
@ -351,7 +352,7 @@ export default {
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal this.$modal
.confirm('是否确认删除该配置?') .confirm('是否确认删除实时数据采集配置编号为"' + id + '"的数据项?')
.then(function () { .then(function () {
return deleteEquipmentPlc(id); return deleteEquipmentPlc(id);
}) })

View File

@ -194,17 +194,13 @@ export default {
input: true, input: true,
label: '参数列名', label: '参数列名',
prop: 'plcParamName', prop: 'plcParamName',
rules: [ rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
{ required: true, message: '参数列名不能为空', trigger: 'blur' },
],
}, },
{ {
input: true, input: true,
label: '参数名称', label: '参数名称',
prop: 'name', prop: 'name',
rules: [ rules: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }],
{ required: true, message: '参数名称不能为空', trigger: 'blur' },
],
}, },
], ],
[ [
@ -234,35 +230,19 @@ export default {
{ label: '工艺参数', value: 2 }, { label: '工艺参数', value: 2 },
{ label: '报警参数', value: 3 }, { label: '报警参数', value: 3 },
], ],
rules: [ rules: [{ required: true, message: '设备参数类型不能为空', trigger: 'blur' }],
{
required: true,
message: '设备参数类型不能为空',
trigger: 'blur',
},
],
}, },
{ {
select: true, select: true,
label: '生产参数类型', label: '生产参数类型',
prop: 'production_param_type', prop: 'production_param_type',
options: [ options: [
// { label: '', value: 1 }, { label: '进片数量', value: 1 },
// { label: '', value: 2 }, { label: '出片数量', value: 2 },
// { label: '', value: 3 }, { label: '破损数量', value: 3 },
// { label: '', value: 4 },
{ label: '进口计数', value: 1 },
{ label: '出口计数', value: 2 },
{ label: '损耗计数', value: 3 },
{ label: '无类型', value: 4 }, { label: '无类型', value: 4 },
], ],
rules: [ rules: [{ required: true, message: '生产参数类型不能为空', trigger: 'blur' }],
{
required: true,
message: '生产参数类型不能为空',
trigger: 'blur',
},
],
}, },
], ],
[ [
@ -325,7 +305,6 @@ export default {
infoQuery: null, // infoQuery: null, //
attrFormSubmitting: false, attrFormSubmitting: false,
attrListLoading: false, attrListLoading: false,
shouldRefreshPageView: false,
}; };
}, },
computed: { computed: {
@ -344,12 +323,10 @@ export default {
}); });
}, },
tableBtn() { tableBtn() {
return this.sections[1].tableBtn; return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
// return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
}, },
}, },
mounted() { mounted() {
this.shouldRefreshPageView = false;
this.mode = this.defaultMode || 'detail'; this.mode = this.defaultMode || 'detail';
for (const section of this.sections) { for (const section of this.sections) {
// //
@ -426,9 +403,6 @@ export default {
}, },
handleCancel() { handleCancel() {
if (this.shouldRefreshPageView) {
this.$emit('refreshDataList');
}
this.visible = false; this.visible = false;
}, },
@ -452,7 +426,7 @@ export default {
remark: '', remark: '',
alarmContent: '', alarmContent: '',
}; };
this.attrTitle = '添加参数绑定信息'; this.attrTitle = '添加设备绑定信息';
this.attrFormVisible = true; this.attrFormVisible = true;
}, },
@ -465,14 +439,14 @@ export default {
}); });
if (res.code == 0) { if (res.code == 0) {
this.attrForm = res.data; this.attrForm = res.data;
this.attrTitle = '编辑参数绑定信息'; this.attrTitle = '编辑设备绑定信息';
this.attrFormVisible = true; this.attrFormVisible = true;
} }
}, },
// //
handleDeleteAttr(attrId) { handleDeleteAttr(attrId) {
this.$confirm('确定删除该参数?', '提示', { this.$confirm('确定删除该分组报警?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@ -484,7 +458,6 @@ export default {
params: { id: attrId }, params: { id: attrId },
}); });
if (res.code == 0) { if (res.code == 0) {
this.shouldRefreshPageView = true;
this.$message({ this.$message({
message: '删除成功', message: '删除成功',
type: 'success', type: 'success',
@ -499,12 +472,12 @@ export default {
}, },
// //
submitAttrForm() { async submitAttrForm() {
this.$refs['attrForm'].validate(async (valid) => { this.$refs['attrForm'].validate((valid) => {
if (!valid) { if (!valid) {
return; return;
} }
});
const isEdit = this.attrForm.id != null; const isEdit = this.attrForm.id != null;
this.attrFormSubmitting = true; this.attrFormSubmitting = true;
const res = await this.$axios({ const res = await this.$axios({
@ -524,12 +497,10 @@ export default {
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.getAttrList(); this.getAttrList();
this.shouldRefreshPageView = true;
}, },
}); });
} }
this.attrFormSubmitting = false; this.attrFormSubmitting = false;
});
}, },
closeAttrForm() { closeAttrForm() {
@ -538,7 +509,7 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm(`确定删除该参数?`, '提示', { this.$confirm(`确定删除该报警?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

View File

@ -482,7 +482,7 @@ export default {
async submitForm() { async submitForm() {
const { code, data } = await this.$axios({ const { code, data } = await this.$axios({
url: '/monitoring/equipment-monitor/quantity-series', url: '/analysis/equipment-analysis/quantity',
method: 'get', method: 'get',
params: this.queryParams, params: this.queryParams,
}); });

View File

@ -6,29 +6,19 @@
--> -->
<template> <template>
<div <div class="status-timegraph-container" style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
class="status-timegraph-container" <el-row class="" style="
style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
<el-row
class=""
style="
margin-bottom: 12px; margin-bottom: 12px;
background: #fff; background: #fff;
padding: 16px 16px 0; padding: 16px 16px 0;
border-radius: 8px; border-radius: 8px;
"> ">
<div class="blue-title">生产节拍时序图</div> <div class="blue-title">生产节拍时序图</div>
<SearchBar <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" :remove-blue="true"
:formConfigs="searchBarFormConfig" @select-changed="handleSearchBarSelectChange" @headBtnClick="handleSearchBarBtnClick" />
ref="search-bar"
:remove-blue="true"
@select-changed="handleSearchBarSelectChange"
@headBtnClick="handleSearchBarBtnClick" />
</el-row> </el-row>
<el-row <el-row class="" style="
class=""
style="
height: 1px; height: 1px;
flex: 1; flex: 1;
margin-bottom: 12px; margin-bottom: 12px;
@ -57,36 +47,17 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div <div class="main-area" style="flex: 1; display: flex; flex-direction: column">
class="main-area" <div class="graphs" v-show="graphList.length" id="status-chart" style="height: 1px; flex: 1"></div>
style="flex: 1; display: flex; flex-direction: column">
<div
class="graphs"
v-show="graphList.length"
id="status-chart"
style="height: 1px; flex: 1"></div>
<h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2> <h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2>
</div> </div>
</el-row> </el-row>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<base-dialog <base-dialog dialogTitle="添加设备" :dialogVisible="open" width="500px" @close="open = false" @cancel="open = false"
dialogTitle="添加设备"
:dialogVisible="open"
width="500px"
@close="open = false"
@cancel="open = false"
@confirm="submitForm"> @confirm="submitForm">
<el-select <el-select v-if="open" style="width: 100%" v-model="queryParams.equipmentId" placeholder="请选择一个设备">
v-if="open" <el-option v-for="eq in eqList" :key="eq.id" :value="eq.id" :label="eq.name"></el-option>
style="width: 100%"
v-model="queryParams.equipmentId"
placeholder="请选择一个设备">
<el-option
v-for="eq in eqList"
:key="eq.id"
:value="eq.id"
:label="eq.name"></el-option>
</el-select> </el-select>
</base-dialog> </base-dialog>
</div> </div>
@ -158,7 +129,7 @@ export default {
open: false, open: false,
eqList: [], eqList: [],
startTime: null, startTime: null,
gantt: null, gantt: null
// demo: [ // demo: [
// [ // [
// { // {
@ -188,7 +159,7 @@ export default {
this.initEquipment(); this.initEquipment();
// this.getList(); // this.getList();
}, },
mounted() {}, mounted() { },
watch: { watch: {
graphList: { graphList: {
handler(val) { handler(val) {
@ -200,6 +171,7 @@ export default {
return; return;
} }
this.gantt.update(val); this.gantt.update(val);
}); });
} }
return; return;
@ -243,9 +215,7 @@ export default {
params: this.queryParams, params: this.queryParams,
}); });
if (code == 0) { if (code == 0) {
this.existingEquipments = Object.values(data).map( this.existingEquipments = Object.values(data).map((eq) => eq[0].equipmentId);
(eq) => eq[0].equipmentId
);
this.graphList = this.objectToArray(data); this.graphList = this.objectToArray(data);
} }
}, },
@ -332,7 +302,7 @@ export default {
return; return;
} }
this.startTime = new Date(payload.recordTime); this.startTime = new Date(payload.recordTime)
this.queryParams.lineId = payload.lineId || null; this.queryParams.lineId = payload.lineId || null;
this.queryParams.sectionId = payload.sectionId || null; this.queryParams.sectionId = payload.sectionId || null;
this.queryParams.equipmentId = payload.equipmentId || null; this.queryParams.equipmentId = payload.equipmentId || null;
@ -367,7 +337,7 @@ export default {
return; return;
} }
const { code, data } = await this.$axios({ const { code, data } = await this.$axios({
url: '/monitoring/equipment-monitor/status-series', url: '/analysis/equipment-analysis/status',
method: 'get', method: 'get',
params: this.queryParams, params: this.queryParams,
}); });
@ -474,7 +444,7 @@ export default {
} }
.running { .running {
background-color: #288aff; background-color: #288AFF;
// background-color: #84f04e; // background-color: #84f04e;
} }
@ -485,7 +455,7 @@ export default {
.fault { .fault {
// background-color: #ea5b5b; // background-color: #ea5b5b;
background-color: #fc9c91; background-color: #FC9C91;
} }
.full { .full {
@ -499,7 +469,7 @@ export default {
} }
.stop { .stop {
background-color: #ffdc94; background-color: #FFDC94;
} }
.legend-row { .legend-row {
@ -508,7 +478,7 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
> .legend:not(:last-child) { >.legend:not(:last-child) {
margin-right: 12px; margin-right: 12px;
} }
@ -551,7 +521,7 @@ export default {
background: #ccc; background: #ccc;
} }
.echarts__status-chart > div { .echarts__status-chart>div {
height: 100% !important; height: 100% !important;
width: 100% !important; width: 100% !important;
} }