update 更新效率分析

This commit is contained in:
lb 2023-09-06 11:28:10 +08:00
parent e42b7035fe
commit 052f54833c

View File

@ -15,17 +15,18 @@
<!-- 列表 --> <!-- 列表 -->
<base-table <base-table
class="base-table__margin"
:table-props="tableProps" :table-props="tableProps"
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun"> @emitFun="handleEmitFun">
<method-btn <!-- <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" /> -->
</base-table> </base-table>
<!-- 分页组件 --> <!-- 分页组件 -->
@ -44,7 +45,7 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> <!-- some thing ... -->
</base-dialog> </base-dialog>
</div> </div>
</template> </template>
@ -61,34 +62,99 @@ export default {
data() { data() {
return { return {
searchBarKeys: ['name', 'code'], searchBarKeys: ['name', 'code'],
tableBtn: [ // tableBtn: [
this.$auth.hasPermi('base:equipment-group:update') // this.$auth.hasPermi('base:equipment-group:update')
? { // ? {
type: 'edit', // type: 'edit',
btnName: '修改', // btnName: '',
} // }
: undefined, // : undefined,
this.$auth.hasPermi('base:equipment-group:delete') // this.$auth.hasPermi('base:equipment-group:delete')
? { // ? {
type: 'delete', // type: 'delete',
btnName: '删除', // btnName: '',
} // }
: undefined, // : undefined,
].filter((v) => v), // ].filter((v) => v),
tableProps: [ tableProps: [
{ prop: 'duration', label: '工厂', align: 'center' },
{ prop: 'duration', label: '产线', align: 'center' },
{ prop: 'duration', label: '工段', align: 'center' },
{ prop: 'duration', label: '设备', align: 'center' },
{ {
prop: 'createTime', label: '有效时间',
label: '添加时间', align: 'center',
fixed: true, children: [
width: 180, {
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), width: 128,
prop: 'duration',
label: '工作时长',
align: 'center',
},
{ width: 128, prop: 'duration1', label: '百分比', align: 'center' },
],
}, },
{ prop: 'name', label: '设备分组名称', align: 'center' },
{ prop: 'code', label: '检测分组编码', align: 'center' },
{ prop: 'remark', label: '备注', align: 'center' },
{ {
_action: 'equipment-group-show-alert', label: '关机时间',
label: '报警', align: 'center',
children: [
{
width: 128,
prop: 'duration',
label: '停机时长',
align: 'center',
},
{ width: 128, prop: 'duration1', label: '百分比', align: 'center' },
],
},
{
label: '中断损失',
align: 'center',
children: [
{
width: 128,
prop: 'duration',
label: '故障时长',
align: 'center',
},
{ width: 128, prop: 'duration1', label: '百分比', align: 'center' },
{
width: 128,
prop: 'duration1',
label: '时间开动率',
align: 'center',
},
],
},
{
label: '速度损失',
align: 'center',
children: [
{
width: 128,
prop: 'duration',
label: '实际加工速度',
align: 'center',
},
{
width: 128,
prop: 'duration1',
label: '理论加工速度',
align: 'center',
},
{
width: 128,
prop: 'duration1',
label: '速度开动率',
align: 'center',
},
],
},
{ prop: 'duration1', label: 'OEE', align: 'center' },
{ prop: 'duration1', label: 'TEEP', align: 'center' },
{
_action: 'view-trend',
label: '趋势',
align: 'center', align: 'center',
subcomponent: { subcomponent: {
props: ['injectData'], props: ['injectData'],
@ -109,7 +175,7 @@ export default {
}, },
}, },
}, },
'查看报警' '查看趋势'
); );
}, },
}, },
@ -117,16 +183,30 @@ export default {
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
type: 'input', type: 'select',
label: '分组名称', label: '工厂',
placeholder: '请输入设备分组名称', placeholder: '请选择工厂',
param: 'name', param: 'name',
selectOptions: [],
}, },
{ {
type: 'input', type: 'select',
label: '分组编码', label: '产线',
placeholder: '请输入设备分组编码', placeholder: '请选择产线',
param: 'codes', param: 'codes',
selectOptions: [],
},
//
{
type: 'datePicker',
label: '时间',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'createTime',
}, },
{ {
type: 'button', type: 'button',
@ -138,52 +218,19 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('base:equipment-group:create') type: 'button',
? 'button' btnName: 'OEE',
: '',
btnName: '新增',
name: 'add', name: 'add',
plain: true, plain: true,
color: 'success', color: 'success',
}, },
// { {
// type: this.$auth.hasPermi('base:equipment-group:export') ? 'button' : '', type: 'button',
// btnName: '', btnName: 'TEEP',
// name: 'export', name: 'add',
// color: 'warning', plain: true,
// }, color: 'warning',
], },
rows: [
[
{
input: true,
label: '分组名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
},
],
[
{
input: true,
label: '分组编码',
prop: 'code',
url: '/base/equipment-group/getCode',
},
],
[
{
input: true,
label: '备注',
prop: 'remark',
// rules: [{ required: true, message: '', trigger: 'blur' }],
bind: {
placeholder: '请输入备注',
},
},
],
], ],
// //
open: false, open: false,
@ -264,16 +311,6 @@ export default {
this.open = true; this.open = true;
this.title = '添加设备分组(用于同类型不同厂家的设备区分)'; this.title = '添加设备分组(用于同类型不同厂家的设备区分)';
}, },
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentGroup(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = '修改设备分组(用于同类型不同厂家的设备区分)';
});
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
@ -297,47 +334,6 @@ export default {
}); });
}); });
}, },
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal
.confirm(
'是否确认删除设备分组(用于同类型不同厂家的设备区分)编号为"' +
id +
'"的数据项?'
)
.then(function () {
return deleteEquipmentGroup(id);
})
.then(() => {
this.getList();
this.$modal.msgSuccess('删除成功');
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal
.confirm(
'是否确认导出所有设备分组(用于同类型不同厂家的设备区分)数据项?'
)
.then(() => {
this.exportLoading = true;
return exportEquipmentGroupExcel(params);
})
.then((response) => {
this.$download.excel(
response,
'设备分组(用于同类型不同厂家的设备区分).xls'
);
this.exportLoading = false;
})
.catch(() => {});
},
}, },
}; };
</script> </script>