更新
This commit is contained in:
parent
c83a7afadb
commit
8e9b2f6444
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2024-10-29 09:47:40
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-02-26 16:27:48
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建实时数据采集配置
|
||||
@ -52,3 +59,11 @@ export function exportEquipmentPlcExcel(query) {
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得code
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/base/equipment-group/getCode',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -42,3 +42,13 @@ export function schedulingPage(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导出Excel
|
||||
export function exportSchedulingExcel(query) {
|
||||
return request({
|
||||
url: '/base/group-team-scheduling/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
@ -42,11 +42,11 @@ export function getProductAuto(data) {
|
||||
}
|
||||
|
||||
// 班组自动报表分页
|
||||
export function getTeamReportPage(query) {
|
||||
export function getTeamReportPage(data) {
|
||||
return request({
|
||||
url: '/monitoring/team-auto-report/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -92,13 +92,13 @@
|
||||
{{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }}
|
||||
</div>
|
||||
</el-upload>
|
||||
|
||||
<uploadedFile
|
||||
class="file"
|
||||
v-for="file in form[col.prop] || []"
|
||||
:file="file"
|
||||
:key="file.fileUrl"
|
||||
@delete="handleDeleteFile(file)" />
|
||||
@delete="handleDeleteFile(file)"
|
||||
@Preview="handlePreview(file)" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -138,6 +138,9 @@ const uploadedFile = {
|
||||
handleDelete() {
|
||||
this.$emit('delete', this.file);
|
||||
},
|
||||
handlePreview() {
|
||||
this.$emit('Preview', this.file);
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
render: function (h) {
|
||||
@ -156,7 +159,7 @@ const uploadedFile = {
|
||||
cursor: 'pointer',
|
||||
display: 'inline-block',
|
||||
}}>
|
||||
{this.file.fileName}
|
||||
<el-button onClick={this.handlePreview}>{this.file.fileName}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-close"
|
||||
@ -256,6 +259,20 @@ export default {
|
||||
resetFields(args) {
|
||||
return this.$refs.form.resetFields(args);
|
||||
},
|
||||
async handlePreview(file) {
|
||||
const data = await this.$axios({
|
||||
url: file.fileUrl,
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
});
|
||||
const link = document.createElement('a');
|
||||
link.href = window.URL.createObjectURL(new Blob([data]));
|
||||
link.download = file.fileName;
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
window.URL.revokeObjectURL(link.href);
|
||||
},
|
||||
// getCode
|
||||
async getCode(url) {
|
||||
const response = await this.$axios(url);
|
||||
@ -355,7 +372,9 @@ export default {
|
||||
if (!promiseList.length) this.formLoading = false;
|
||||
},
|
||||
// 上传成功的特殊处理
|
||||
beforeUpload() {},
|
||||
beforeUpload(file) {
|
||||
console.log(file)
|
||||
},
|
||||
// 上传前的验证规则可通过 bind 属性传入
|
||||
handleUploadSuccess(response, file, fileList) {
|
||||
this.form.files.push({
|
||||
|
@ -253,6 +253,7 @@ export default {
|
||||
pageSize: 10,
|
||||
workshopSectionId: null,
|
||||
equipmentId: null,
|
||||
equipmentName: null,
|
||||
factoryId: null,
|
||||
productionLineId: [],
|
||||
},
|
||||
@ -307,7 +308,7 @@ export default {
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.name = val.name;
|
||||
this.queryParams.workshopSectionId = val.workshopSectionId || undefined;
|
||||
this.queryParams.equipmentId = val.equipmentId || undefined;
|
||||
this.queryParams.equipmentName = val.equipmentName || undefined;
|
||||
this.queryParams.factoryId = val.factoryId || undefined;
|
||||
this.queryParams.productionLineId = val.productionLineId || [];
|
||||
this.handleQuery();
|
||||
|
109
src/views/base/equipmentPlc/add-or-updata.vue
Normal file
109
src/views/base/equipmentPlc/add-or-updata.vue
Normal file
@ -0,0 +1,109 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-02-26 16:37:29
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-row :gutter="20">
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="80px">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="关联表名" prop="plcTableName">
|
||||
<el-input
|
||||
v-model="dataForm.plcTableName"
|
||||
clearable
|
||||
placeholder="请输入关联表名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="编码" prop="code">
|
||||
<el-input
|
||||
v-model="dataForm.code"
|
||||
clearable
|
||||
placeholder="请输入编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标识" prop="name">
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
clearable
|
||||
placeholder="请输入标识" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="英文名" prop="enName">
|
||||
<el-input
|
||||
v-model="dataForm.enName"
|
||||
clearable
|
||||
placeholder="请输入英文名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否采集" prop="collection">
|
||||
<el-switch
|
||||
v-model="dataForm.collection"
|
||||
:active-value="1"
|
||||
:inactive-value="0"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input
|
||||
v-model="dataForm.description"
|
||||
clearable
|
||||
placeholder="请输入描述" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '@/mixins/basic-add';
|
||||
|
||||
import {
|
||||
createEquipmentPlc,
|
||||
updateEquipmentPlc,
|
||||
getEquipmentPlc,
|
||||
getCode,
|
||||
} from '@/api/base/equipmentPlc';
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
isGetCode: true,
|
||||
codeURL: getCode,
|
||||
createURL: createEquipmentPlc,
|
||||
updateURL: updateEquipmentPlc,
|
||||
infoURL: getEquipmentPlc,
|
||||
},
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
plcTableName: undefined,
|
||||
code: undefined,
|
||||
name: undefined,
|
||||
enName: undefined,
|
||||
collection: 1,
|
||||
description: undefined,
|
||||
},
|
||||
dataRule: {
|
||||
plcTableName: [
|
||||
{ required: true, message: '关联表名不能为空', trigger: 'blur' },
|
||||
],
|
||||
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '标识不能为空', trigger: 'blur' }],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
@ -1,59 +1,53 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<SearchBar
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="search-bar"
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
|
||||
<!-- 列表 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-data="list"
|
||||
ref="pageTable"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData"
|
||||
@emitFun="handleEmitFun">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="title"
|
||||
:dialogVisible="open"
|
||||
width="700px"
|
||||
@close="cancel"
|
||||
@cancel="cancel"
|
||||
@confirm="submitForm">
|
||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width="50%">
|
||||
<add-or-update
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="successSubmit"></add-or-update>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import basicPage from '@/mixins/basic-page';
|
||||
import { parseTime } from '@/filter/code-filter';
|
||||
import {
|
||||
createEquipmentPlc,
|
||||
updateEquipmentPlc,
|
||||
deleteEquipmentPlc,
|
||||
getEquipmentPlc,
|
||||
getEquipmentPlcPage,
|
||||
exportEquipmentPlcExcel,
|
||||
updateEquipmentPlc,
|
||||
} from '@/api/base/equipmentPlc';
|
||||
import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
|
||||
const switchBtn = {
|
||||
name: 'SwitchBtn',
|
||||
@ -90,49 +84,45 @@ const switchBtn = {
|
||||
);
|
||||
},
|
||||
};
|
||||
const tableProps = [
|
||||
{ prop: 'code', label: '编码', width: 220 },
|
||||
{ prop: 'plcTableName', label: '关联表名' },
|
||||
{ prop: 'name', label: '标识名称' },
|
||||
{ prop: 'enName', label: '英文名称' },
|
||||
{
|
||||
prop: 'collection',
|
||||
label: '是否采集',
|
||||
subcomponent: switchBtn,
|
||||
},
|
||||
{ prop: 'description', label: '描述' },
|
||||
];
|
||||
|
||||
export default {
|
||||
name: 'EquipmentPlc',
|
||||
mixins: [basicPageMixin],
|
||||
components: {},
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
tableKey: Math.random(),
|
||||
searchBarKeys: ['name', 'plcTableName'],
|
||||
urlOptions: {
|
||||
getDataListURL: getEquipmentPlcPage,
|
||||
deleteURL: deleteEquipmentPlc,
|
||||
exportURL: exportEquipmentPlcExcel,
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:equipment-plc:update')
|
||||
this.$auth.hasPermi(`base:equipment-plc:update`)
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:equipment-plc:delete')
|
||||
this.$auth.hasPermi(`base:equipment-plc:delete`)
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
// {
|
||||
// prop: 'createTime',
|
||||
// label: '添加时间',
|
||||
// fixed: true,
|
||||
// width: 180,
|
||||
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||
// },
|
||||
{ prop: 'code', label: '编码' },
|
||||
{ prop: 'plcTableName', label: '关联表名' },
|
||||
{ prop: 'name', label: '标识名称' },
|
||||
{ prop: 'enName', label: '英文名称' },
|
||||
{
|
||||
prop: 'collection',
|
||||
label: '是否采集',
|
||||
subcomponent: switchBtn,
|
||||
},
|
||||
{ prop: 'description', label: '描述' },
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '表名',
|
||||
@ -147,231 +137,86 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
// {
|
||||
// type: 'separate',
|
||||
// },
|
||||
// {
|
||||
// type: 'button',
|
||||
// btnName: '重置',
|
||||
// name: 'reset',
|
||||
// },
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
// type: this.$auth.hasPermi('base:equipment-plc:create')
|
||||
// ? 'button'
|
||||
// : '',
|
||||
type: 'button',
|
||||
type: this.$auth.hasPermi('base:factory:create') ? 'button' : '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
plain: true,
|
||||
color: 'success',
|
||||
plain: true,
|
||||
},
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:equipment-plc:export') ? 'button' : '',
|
||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
],
|
||||
rows: [
|
||||
[
|
||||
{
|
||||
input: true,
|
||||
label: '关联表名',
|
||||
prop: 'plcTableName',
|
||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||
// bind: {
|
||||
// disabled: true, // some condition, like detail mode...
|
||||
// }
|
||||
},
|
||||
{
|
||||
input: true,
|
||||
label: '编码',
|
||||
prop: 'code',
|
||||
url: '/base/equipment-group/getCode',
|
||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
input: true,
|
||||
label: '标识',
|
||||
prop: 'name',
|
||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||
// bind: {
|
||||
// disabled: true, // some condition, like detail mode...
|
||||
// }
|
||||
},
|
||||
{
|
||||
input: true,
|
||||
label: '英文名',
|
||||
prop: 'enName',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
switch: true,
|
||||
label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集
|
||||
prop: 'collection',
|
||||
value: 1,
|
||||
bind: {
|
||||
'active-value': 1,
|
||||
'inactive-value': 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
textarea: true,
|
||||
label: '描述',
|
||||
prop: 'description',
|
||||
bind: {
|
||||
placeholder: '请输入备注',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
// 是否显示弹出
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
plcTableName: null,
|
||||
name: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
/** 覆盖 handleEmitFun 的默认实现 */
|
||||
handleEmitFun({ action, payload }) {
|
||||
console.log(payload)
|
||||
switch (action) {
|
||||
case 'update-collect':
|
||||
this.reset();
|
||||
const tempForm = {};
|
||||
Object.keys(this.form).forEach((key) => {
|
||||
tempForm[key] = payload[key];
|
||||
});
|
||||
updateEquipmentPlc(tempForm).then((response) => {
|
||||
updateEquipmentPlc(payload).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.getDataList();
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
getEquipmentPlcPage(this.queryParams).then((response) => {
|
||||
this.list = response.data.list;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
// this.tableKey = Math.random(); // method 1
|
||||
});
|
||||
},
|
||||
/** 取消按钮 */
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
plcTableName: undefined,
|
||||
code: undefined,
|
||||
name: undefined,
|
||||
enName: undefined,
|
||||
description: undefined,
|
||||
collection: undefined,
|
||||
};
|
||||
this.resetForm('form');
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm');
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = '添加实时数据采集配置';
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id;
|
||||
getEquipmentPlc(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = '修改实时数据采集配置';
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.form.id != null) {
|
||||
updateEquipmentPlc(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
createEquipmentPlc(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const id = row.id;
|
||||
this.$modal
|
||||
.confirm('是否确认删除实时数据采集配置编号为"' + id + '"的数据项?')
|
||||
.then(function () {
|
||||
return deleteEquipmentPlc(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 exportEquipmentPlcExcel(params);
|
||||
})
|
||||
.then((response) => {
|
||||
this.$download.excel(response, '实时数据采集配置.xls');
|
||||
this.exportLoading = false;
|
||||
})
|
||||
.catch(() => {});
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.name = val.name;
|
||||
this.listQuery.plcTableName = val.plcTableName;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-04-30 10:01:41
|
||||
* @LastEditTime: 2025-02-25 16:11:14
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
|
@ -134,11 +134,10 @@ export default {
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '节拍',
|
||||
name: '节拍 pcs/min',
|
||||
min: 0,
|
||||
interval: 20,
|
||||
axisLabel: {
|
||||
formatter: '{value} pcs/min',
|
||||
formatter: '{value}',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -59,24 +59,36 @@
|
||||
<i class="el-icon-delete"></i>
|
||||
</div> -->
|
||||
<div
|
||||
class="file-list__item"
|
||||
v-for="(file, index) in files"
|
||||
:key="file.fileName"
|
||||
:style="{
|
||||
background: isPicMode
|
||||
? `url(${file.fileUrl}) no-repeat`
|
||||
: `url(${defaultBg}) no-repeat`,
|
||||
backgroundSize: isPicMode ? '100% 100%' : '64px',
|
||||
backgroundPosition: isPicMode ? '0% 0%' : 'center',
|
||||
}"
|
||||
:data-name="file.fileName">
|
||||
<el-button
|
||||
v-if="!disabled"
|
||||
type="text"
|
||||
class="el-icon-delete"
|
||||
style="padding: 0"
|
||||
@click="(e) => handleDelete(file)" />
|
||||
</div>
|
||||
style="width: 100%">
|
||||
<div
|
||||
class="file-list__item"
|
||||
v-if="!isPicMode"
|
||||
:style="{
|
||||
background: isPicMode
|
||||
? `url(${file.fileUrl}) no-repeat`
|
||||
: `url(${defaultBg}) no-repeat`,
|
||||
backgroundSize: isPicMode ? '100% 100%' : '64px',
|
||||
backgroundPosition: isPicMode ? '0% 0%' : 'center',
|
||||
}"
|
||||
@click="handleDownload(file)"
|
||||
:data-name="file.fileName">
|
||||
<el-button
|
||||
v-if="!disabled"
|
||||
type="text"
|
||||
class="el-icon-delete"
|
||||
style="padding: 0"
|
||||
@click="(e) => handleDelete(file)" />
|
||||
</div>
|
||||
|
||||
<el-image
|
||||
v-else
|
||||
class="file-list__item"
|
||||
style="width: 100%"
|
||||
:src="file.fileUrl"
|
||||
:preview-src-list="files.map((item) => item.fileUrl)"></el-image>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
@ -277,6 +289,32 @@ export default {
|
||||
// Array
|
||||
this.$emit('update-filelist', this.appendFilelist);
|
||||
},
|
||||
|
||||
async handleDownload(file) {
|
||||
if (this.isPicMode) {
|
||||
// this.$emit('preview', file);
|
||||
const link = document.createElement('a');
|
||||
link.href = file.fileUrl;
|
||||
link.target = '_blank';
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
} else {
|
||||
// this.$emit('download', file);
|
||||
const data = await this.$axios({
|
||||
url: file.fileUrl,
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
});
|
||||
const link = document.createElement('a');
|
||||
link.href = window.URL.createObjectURL(new Blob([data]));
|
||||
link.download = file.fileName;
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
window.URL.revokeObjectURL(link.href);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -44,7 +44,7 @@
|
||||
<el-date-picker
|
||||
v-if="col.datetime"
|
||||
v-model="form[col.prop]"
|
||||
type="datetime"
|
||||
type="date"
|
||||
:placeholder="`请选择${col.label}`"
|
||||
value-format="timestamp"
|
||||
v-bind="col.bind"></el-date-picker>
|
||||
|
@ -82,7 +82,7 @@
|
||||
<el-date-picker
|
||||
v-model="form.productionTime"
|
||||
:disabled="disabled"
|
||||
type="datetime"
|
||||
type="date"
|
||||
placeholder="请选择生产日期"
|
||||
value-format="timestamp"></el-date-picker>
|
||||
</el-form-item>
|
||||
@ -92,7 +92,7 @@
|
||||
<el-date-picker
|
||||
v-model="form.enterTime"
|
||||
:disabled="disabled"
|
||||
type="datetime"
|
||||
type="date"
|
||||
placeholder="请选择进场日期"
|
||||
value-format="timestamp"></el-date-picker>
|
||||
</el-form-item>
|
||||
@ -317,7 +317,7 @@ export default {
|
||||
this.form
|
||||
);
|
||||
// 保存原始文件名
|
||||
if ('fileNames' in this.form) this.form.fileNames.push(file.name);
|
||||
if ('fileNames' in this.form) this.form.fileNames.push(file.name+Date.now());
|
||||
// 保存完整地址
|
||||
if ('fileUrls' in this.form) this.form.fileUrls.push(response.data);
|
||||
this.$modal.msgSuccess('上传成功');
|
||||
|
@ -38,7 +38,7 @@
|
||||
@cancel="cancel"
|
||||
width="60%"
|
||||
@confirm="submitForm">
|
||||
<DialogForm
|
||||
<DialogForm1
|
||||
v-if="open"
|
||||
key="index-dialog-form"
|
||||
ref="form"
|
||||
@ -78,7 +78,7 @@
|
||||
queryParams: {
|
||||
equipmentId: form.id,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
},
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:equipment-attr:update')
|
||||
@ -107,6 +107,7 @@
|
||||
import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import EquipmentDrawer from './components/EquipmentDrawer';
|
||||
import DialogForm1 from './components/DialogForm';
|
||||
|
||||
import {
|
||||
createEquipment,
|
||||
@ -124,6 +125,7 @@ export default {
|
||||
components: {
|
||||
Editor,
|
||||
EquipmentDrawer,
|
||||
DialogForm1,
|
||||
},
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
@ -157,7 +159,12 @@ export default {
|
||||
width: 180,
|
||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||
},
|
||||
{ width: 200,showOverflowtooltip :true, prop: 'name', label: '设备名称' },
|
||||
{
|
||||
width: 200,
|
||||
showOverflowtooltip: true,
|
||||
prop: 'name',
|
||||
label: '设备名称',
|
||||
},
|
||||
{ width: 256, prop: 'code', label: '设备编码' },
|
||||
{ prop: 'equipmentType', label: '设备类型' },
|
||||
{ prop: 'enName', label: '英文名称' },
|
||||
@ -436,7 +443,7 @@ export default {
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
code: '',
|
||||
name: '',
|
||||
},
|
||||
@ -562,6 +569,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.form.files = [];
|
||||
createEquipment(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.open = false;
|
||||
|
@ -240,25 +240,6 @@ export default {
|
||||
const id = row.id;
|
||||
getEquipmentType(id).then((response) => {
|
||||
this.form = response.data;
|
||||
// this.form = {
|
||||
// code: 'SBLX20230925184444000041',
|
||||
// name: '测试131',
|
||||
// remark: '测试可删除',
|
||||
// id: '1706258479729336322',
|
||||
// files: [
|
||||
// { fileName: '1.png', fileUrl: '', fileType: 2 },
|
||||
// { fileName: '1.asdfaslkjfkasdf.png', fileUrl: '', fileType: 2 },
|
||||
// { fileName: '2.txt', fileUrl: '', fileType: 2 },
|
||||
// { fileName: '1.rar', fileUrl: '', fileType: 2 },
|
||||
// { fileName: '1.kkk', fileUrl: '', fileType: 2 },
|
||||
// { fileName: 'test.file', fileUrl: '', fileType: 2 },
|
||||
// { fileName: '222', fileUrl: '', fileType: 2 },
|
||||
// { fileName: 'g', fileUrl: '', fileType: 2 },
|
||||
// ],
|
||||
// createTime: 1695638697000,
|
||||
// parentId: '1701869972319584257',
|
||||
// };
|
||||
// debugger;
|
||||
this.open = true;
|
||||
this.title = '修改设备类型';
|
||||
});
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-03 14:09:18
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-11-29 13:29:28
|
||||
* @LastEditTime: 2025-02-24 15:21:07
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -17,7 +17,7 @@
|
||||
v-for="opt in getDictDatas(DICT_TYPE.PROCESS_TYPE)"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value + '+' + opt.label"></el-option>
|
||||
:value="opt.value"></el-option>
|
||||
</el-select>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="visible = false">
|
||||
@ -53,18 +53,21 @@ export default {
|
||||
visible: false,
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
changeInput() {
|
||||
const processDictName = this.getDictDatas(this.DICT_TYPE.PROCESS_TYPE).find(item=>
|
||||
item.value == this.list.processDict
|
||||
)
|
||||
const data = {
|
||||
id: this.list.id,
|
||||
processDict: this.list.processDict.split('+')[0],
|
||||
processDictName: this.list.processDict.split('+')[1],
|
||||
processDict: this.list.processDict,
|
||||
processDictName: processDictName.label,
|
||||
};
|
||||
switchLineBindProcess(data).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false;
|
||||
this.list.processDictName = this.list.processDict.split('+')[1];
|
||||
this.$emit('emitData');
|
||||
});
|
||||
},
|
||||
|
@ -72,19 +72,37 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规格" prop="specifications">
|
||||
<el-form-item label="原片规格" prop="originalSpecifications">
|
||||
<el-input
|
||||
:disabled="isdetail"
|
||||
v-model="dataForm.specifications"
|
||||
placeholder="请输入规格" />
|
||||
v-model="dataForm.originalSpecifications"
|
||||
placeholder="请输入原片规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位平方数" prop="area">
|
||||
<el-form-item label="原片单位平方数" prop="originalArea">
|
||||
<el-input
|
||||
:disabled="isdetail"
|
||||
v-model="dataForm.originalArea"
|
||||
placeholder="请输入原片单位平方数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="深加工规格" prop="specifications">
|
||||
<el-input
|
||||
:disabled="isdetail"
|
||||
v-model="dataForm.specifications"
|
||||
placeholder="请输入深加工规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="深加工单位平方数" prop="area">
|
||||
<el-input
|
||||
:disabled="isdetail"
|
||||
v-model="dataForm.area"
|
||||
placeholder="请输入单位平方数" />
|
||||
placeholder="请输入深加工单位平方数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -222,11 +240,13 @@ export default {
|
||||
id: null,
|
||||
name: '', // 产品名称
|
||||
code: '', // 产品编码
|
||||
area: 0, // 单位平方数(float only)
|
||||
area: 0, // 深加工单位平方数(float only)
|
||||
typeDictValue: null, // 产品类型id
|
||||
processTime: null, // 单位产品用时 (s)
|
||||
specifications: '', // 规格
|
||||
specifications: '', // 深加工规格
|
||||
unitDictValue: '', // 单位id
|
||||
originalSpecifications: '', // 原片规格
|
||||
originalArea: 0, // 原片单位平方数
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 14:55:51
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-10-13 10:27:00
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-02-24 16:06:59
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -49,27 +49,31 @@ import {
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'code',
|
||||
label: '产品编码'
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '产品名称'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '产品编码'
|
||||
},
|
||||
{
|
||||
prop: 'originalSpecifications',
|
||||
label: '原片规格'
|
||||
},
|
||||
{
|
||||
prop: 'specifications',
|
||||
label: '规格'
|
||||
label: '深加工规格'
|
||||
},
|
||||
{
|
||||
prop: 'unitDictValue',
|
||||
label: '单位',
|
||||
subcomponent: unitDict,
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 13:52:10
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-11-22 14:02:59
|
||||
* @LastEditTime: 2025-02-24 15:32:45
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -81,6 +81,17 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input
|
||||
v-model="dataForm.description"
|
||||
type="textarea"
|
||||
placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
@ -90,17 +101,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input
|
||||
v-model="dataForm.description"
|
||||
type="textarea"
|
||||
placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
@ -160,6 +160,7 @@ export default {
|
||||
],
|
||||
tvalue: [
|
||||
{
|
||||
required: true,
|
||||
type: 'number',
|
||||
message: '请输入正确的数字',
|
||||
trigger: 'change',
|
||||
|
@ -102,11 +102,10 @@ export default {
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '投入/产出',
|
||||
name: '投入/产出 片',
|
||||
min: 0,
|
||||
interval: 100,
|
||||
axisLabel: {
|
||||
formatter: '{value} 片',
|
||||
formatter: '{value}',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -69,26 +69,32 @@ import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
import ButtonNav from '@/components/ButtonNav';
|
||||
import baseTableS from './baseTable.vue';
|
||||
import barChart from './BarChart.vue';
|
||||
import * as XLSX from 'xlsx';
|
||||
import FileSaver from 'file-saver';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'factoryName',
|
||||
label: '工厂',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '产线',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'sizes',
|
||||
label: '规格',
|
||||
width: 105,
|
||||
showOverflowtooltip: true,
|
||||
fixed: true
|
||||
},
|
||||
|
||||
{
|
||||
prop: 'inputN',
|
||||
label: '投入',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'inputNum',
|
||||
@ -103,6 +109,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'outputN',
|
||||
label: '产出',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'outputNum',
|
||||
@ -118,6 +125,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'lossN',
|
||||
label: '不良',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'lossNum',
|
||||
@ -148,10 +156,12 @@ const tableProps = [
|
||||
{
|
||||
prop: 'lossD',
|
||||
label: '不良详情',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'original',
|
||||
label: '原片',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'originalLossNum',
|
||||
@ -167,6 +177,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'edge',
|
||||
label: '磨边',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'edgeLossNum',
|
||||
@ -182,6 +193,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'drill',
|
||||
label: '打孔',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'drillLossNum',
|
||||
@ -197,6 +209,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'coating',
|
||||
label: '镀膜',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'coatingLossNum',
|
||||
@ -212,6 +225,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'silk',
|
||||
label: '丝印',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'silkLossNum',
|
||||
@ -227,6 +241,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'tempering',
|
||||
label: '钢化',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'temperingLossNum',
|
||||
@ -242,6 +257,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'packing',
|
||||
label: '包装',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'packingLossNum',
|
||||
@ -480,6 +496,7 @@ export default {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed-right'));
|
||||
}
|
||||
let exportTable = XLSX.utils.table_to_book(tables);
|
||||
exportTable.Sheets.Sheet1.A1.v = '序号' //导出表格第一列表头为序号
|
||||
|
||||
var exportTableOut = XLSX.write(exportTable, {
|
||||
bookType: 'xlsx',
|
||||
@ -492,7 +509,7 @@ export default {
|
||||
new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream',
|
||||
}),
|
||||
this.fileName + '产线统计数据查询-当前.xlsx'
|
||||
'产线统计数据.xlsx'
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2025-01-14 09:53:23
|
||||
* @LastEditTime: 2025-02-24 14:51:47
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
@ -42,34 +42,41 @@ const tableProps = [
|
||||
{
|
||||
prop: 'reportType',
|
||||
label: '报表类型',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'reportDate',
|
||||
label: '日期',
|
||||
width: 130,
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'factoryName',
|
||||
label: '工厂',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '产线',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'sizes',
|
||||
label: '规格',
|
||||
width: 105,
|
||||
showOverflowtooltip: true,
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'process',
|
||||
label: '产品工艺',
|
||||
fixed: true
|
||||
},
|
||||
|
||||
{
|
||||
prop: 'inputN',
|
||||
label: '投入',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'inputNum',
|
||||
@ -78,12 +85,14 @@ const tableProps = [
|
||||
{
|
||||
prop: 'inputArea',
|
||||
label: '投入面积/m²',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
prop: 'outputN',
|
||||
label: '产出',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'outputNum',
|
||||
@ -99,6 +108,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'lossN',
|
||||
label: '不良',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'lossNum',
|
||||
@ -129,10 +139,12 @@ const tableProps = [
|
||||
{
|
||||
prop: 'lossD',
|
||||
label: '不良详情',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'original',
|
||||
label: '原片',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'originalLossNum',
|
||||
@ -148,6 +160,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'edge',
|
||||
label: '磨边',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'edgeLossNum',
|
||||
@ -163,6 +176,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'drill',
|
||||
label: '打孔',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'drillLossNum',
|
||||
@ -178,6 +192,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'coating',
|
||||
label: '镀膜',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'coatingLossNum',
|
||||
@ -193,6 +208,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'silk',
|
||||
label: '丝印',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'silkLossNum',
|
||||
@ -208,6 +224,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'tempering',
|
||||
label: '钢化',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'temperingLossNum',
|
||||
@ -223,6 +240,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'packing',
|
||||
label: '包装',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'packingLossNum',
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2025-01-09 10:45:41
|
||||
* @LastEditTime: 2025-02-26 16:42:12
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
@ -42,28 +42,34 @@ const tableProps1 = [
|
||||
prop: 'processType',
|
||||
label: '工艺类型',
|
||||
filter: (val) => (val === 1 ? '面板' : '背板'),
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'reportType',
|
||||
label: '报表类型',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'reportDate',
|
||||
label: '日期',
|
||||
width: 130,
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'factoryName',
|
||||
label: '工厂',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'process',
|
||||
label: '产品工艺',
|
||||
fixed: true
|
||||
},
|
||||
|
||||
{
|
||||
prop: 'all',
|
||||
label: '合计',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'inputArea',
|
||||
@ -228,6 +234,7 @@ export default {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed-right'));
|
||||
}
|
||||
let exportTable = XLSX.utils.table_to_book(tables);
|
||||
exportTable.Sheets.Sheet1.A1.v = '序号' //导出表格第一列表头为序号
|
||||
|
||||
var exportTableOut = XLSX.write(exportTable, {
|
||||
bookType: 'xlsx',
|
||||
@ -295,6 +302,7 @@ export default {
|
||||
item['processingRatio' + index] = prop.processingRatio;
|
||||
const subprop = {
|
||||
label: prop.lineName,
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'inputArea' + index,
|
||||
|
@ -10,7 +10,7 @@
|
||||
<div
|
||||
class="pie-chart"
|
||||
ref="pieChart"
|
||||
style="overflow: inherit;"
|
||||
style="overflow: inherit"
|
||||
:data-eqname="value.equipmentName || 'Default'"></div>
|
||||
<div class="data-view">
|
||||
<div class="data-view__item">
|
||||
@ -64,7 +64,7 @@ export default {
|
||||
},
|
||||
subtext: '设备', //<=========
|
||||
subtextStyle: {
|
||||
fontSize: 14,
|
||||
fontSize: 13,
|
||||
},
|
||||
},
|
||||
color: ['#3da8fd', '#8ef0ab', '#6b5cfd', '#FFC72A', 'transparent'],
|
||||
@ -194,22 +194,31 @@ export default {
|
||||
mttr,
|
||||
} = item;
|
||||
this.config.title.text = lineName;
|
||||
this.config.title.subtext = equipmentName;
|
||||
// 找到第一个 '-' 的位置
|
||||
let firstDashIndex = equipmentName.indexOf('-');
|
||||
// 找到第二个 '-' 的位置
|
||||
let secondDashIndex = equipmentName.indexOf('-', firstDashIndex + 1);
|
||||
// 截取第二个 '-' 后面的字符串
|
||||
let result = equipmentName.substring(secondDashIndex + 1);
|
||||
this.config.title.subtext = result ? result : '-';
|
||||
|
||||
this.config.series[0].data = [
|
||||
{ name: '工作时长', value: workTime },
|
||||
{ name: '停机时长', value: stopTime },
|
||||
{ name: '故障时长', value: downTime },
|
||||
{ name: '工作时长', value: workTime ? workTime.toFixed(2) : '0.00' },
|
||||
{ name: '停机时长', value: stopTime ? stopTime.toFixed(2) : '0.00' },
|
||||
{ name: '故障时长', value: downTime ? downTime.toFixed(2) : '0.00' },
|
||||
];
|
||||
this.config.series[1].data = [
|
||||
{ name: '速度开动率', value: peEfficiency },
|
||||
{
|
||||
name: '速度开动率',
|
||||
value: peEfficiency ? peEfficiency.toFixed(2) : '0.00',
|
||||
},
|
||||
{ name: '', value: Math.ceil(peEfficiency) - peEfficiency },
|
||||
];
|
||||
//
|
||||
this.textData = {
|
||||
workTime: +workTime.toFixed(2),
|
||||
stopTime: +stopTime.toFixed(2),
|
||||
downTime: +downTime.toFixed(2),
|
||||
peEfficiency: +peEfficiency.toFixed(2),
|
||||
workTime: workTime ? workTime.toFixed(2) : '0.00',
|
||||
stopTime: stopTime ? stopTime.toFixed(2) : '0.00',
|
||||
downTime: downTime ? downTime.toFixed(2) : '0.00',
|
||||
peEfficiency: peEfficiency ? peEfficiency.toFixed(2) : '0.00',
|
||||
};
|
||||
},
|
||||
},
|
||||
|
@ -91,10 +91,11 @@
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
import PieChart from './components/pieChart.vue';
|
||||
import { parseTime } from '@/filter/code-filter';
|
||||
|
||||
export default {
|
||||
name: 'EfficiencyAnalysis',
|
||||
mixins: [basicPageMixin,tableHeightMixin],
|
||||
mixins: [basicPageMixin, tableHeightMixin],
|
||||
components: { PieChart },
|
||||
props: {},
|
||||
data() {
|
||||
@ -120,8 +121,18 @@ export default {
|
||||
tableProps: [
|
||||
{ prop: 'factoryName', label: '工厂' },
|
||||
{ prop: 'lineName', label: '产线' },
|
||||
{ prop: 'sectionName', width:120,showOverflowtooltip :true,label: '工段' },
|
||||
{ prop: 'equipmentName',width:150,showOverflowtooltip :true, label: '设备' },
|
||||
{
|
||||
prop: 'sectionName',
|
||||
width: 120,
|
||||
showOverflowtooltip: true,
|
||||
label: '工段',
|
||||
},
|
||||
{
|
||||
prop: 'equipmentName',
|
||||
width: 150,
|
||||
showOverflowtooltip: true,
|
||||
label: '设备',
|
||||
},
|
||||
{
|
||||
label: '有效时间',
|
||||
children: [
|
||||
@ -148,9 +159,12 @@ export default {
|
||||
label: '停机时长[h]',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
},
|
||||
{ width: 128, prop: 'stopRate', label: '百分比[%]',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
width: 128,
|
||||
prop: 'stopRate',
|
||||
label: '百分比[%]',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -162,9 +176,12 @@ export default {
|
||||
label: '故障时长[h]',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
},
|
||||
{ width: 128, prop: 'downRate', label: '百分比[%]' ,
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
width: 128,
|
||||
prop: 'downRate',
|
||||
label: '百分比[%]',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
width: 128,
|
||||
prop: 'timeEfficiency',
|
||||
@ -180,13 +197,13 @@ export default {
|
||||
width: 128,
|
||||
prop: 'realProcSpeed',
|
||||
label: '实际加工速度',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
width: 128,
|
||||
prop: 'designProcSpeed',
|
||||
label: '理论加工速度',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
width: 128,
|
||||
@ -334,6 +351,20 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
|
||||
this.queryParams.recordTime[0] =
|
||||
parseTime(start).substr(0, 10) + ' 00:00:00';
|
||||
this.queryParams.recordTime[1] = parseTime(end).substr(0, 10) + ' 00:00:00';
|
||||
this.$nextTick(() => {
|
||||
this.searchBarFormConfig[2].extraOptions[0].startPlaceholder = parseTime(
|
||||
start
|
||||
).substr(0, 10);
|
||||
this.searchBarFormConfig[2].extraOptions[0].endPlaceholder = parseTime(
|
||||
end
|
||||
).substr(0, 10);
|
||||
});
|
||||
this.getFactory();
|
||||
this.getLine();
|
||||
this.getList();
|
||||
@ -384,6 +415,7 @@ export default {
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
this.loading = true;
|
||||
this.list = [];
|
||||
const { code, data } = await this.$axios({
|
||||
url: '/analysis/equipment-analysis/efficiency',
|
||||
method: 'get',
|
||||
@ -395,7 +427,6 @@ export default {
|
||||
},
|
||||
|
||||
handleSearchBarBtnClick({ btnName, ...payload }) {
|
||||
console.log('handleSearchBarBtnClick', btnName, payload);
|
||||
if (btnName == 'visualization') {
|
||||
// 可视化
|
||||
this.visualizationOpen = true;
|
||||
@ -405,12 +436,26 @@ export default {
|
||||
this.queryParams.factoryId = payload.factoryId || null;
|
||||
this.queryParams.lineId = payload.lineId || null;
|
||||
if (0 == payload.dateFilterType) {
|
||||
this.queryParams.recordTime = payload.timerange;
|
||||
if (payload.timerange) {
|
||||
this.searchBarFormConfig[2].extraOptions[0].startPlaceholder =
|
||||
'开始时间';
|
||||
this.searchBarFormConfig[2].extraOptions[0].endPlaceholder =
|
||||
'结束时间';
|
||||
this.queryParams.recordTime = payload.timerange;
|
||||
}
|
||||
} else if (1 == payload.dateFilterType) {
|
||||
this.queryParams.recordTime = [
|
||||
`${payload.timeday} 00:00:00`,
|
||||
`${payload.timeday} 23:59:59`,
|
||||
];
|
||||
this.searchBarFormConfig[2].extraOptions[0].startPlaceholder =
|
||||
'开始时间';
|
||||
this.searchBarFormConfig[2].extraOptions[0].endPlaceholder =
|
||||
'结束时间';
|
||||
if (payload.timeday) {
|
||||
this.queryParams.recordTime = [
|
||||
`${payload.timeday} 00:00:00`,
|
||||
`${payload.timeday} 23:59:59`,
|
||||
];
|
||||
} else {
|
||||
this.queryParams.recordTime = null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.queryParams.recordTime = null;
|
||||
|
@ -27,11 +27,6 @@
|
||||
<el-input v-model="form.code" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班次开始时间" prop="startTime">
|
||||
<el-time-picker
|
||||
@ -64,6 +59,11 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
@ -98,7 +98,7 @@ export default {
|
||||
name: [{ required: true, message: '请输入班组名称', trigger: 'blur' }],
|
||||
code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
|
||||
startTime: [
|
||||
{ required: true, message: '请输入生效时间', trigger: 'change' },
|
||||
{ required: true, message: '请选择班次开始时间', trigger: 'change' },
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: '请选择班次结束时间', trigger: 'change' },
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2024-07-01 14:53:55
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-01-15 13:15:05
|
||||
* @LastEditTime: 2025-02-24 16:02:39
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -257,8 +257,12 @@ export default {
|
||||
type: 'warning',
|
||||
}
|
||||
).then(function () {
|
||||
return _this.$modal
|
||||
.delConfirm(row.name)
|
||||
return _this
|
||||
.$confirm(`是否确认删除 ${row.name} 的数据项?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(function () {
|
||||
return deleteGroupClasses(row.id);
|
||||
})
|
||||
|
@ -236,6 +236,11 @@ export default {
|
||||
.baseTable .el-icon-refresh {
|
||||
cursor: pointer;
|
||||
}
|
||||
.baseTable >>> .el-table .el-table__cell {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
border: 1px solid rgb(220, 220, 220);
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.baseTable .el-table__body tr.current-row > td.el-table__cell {
|
||||
|
@ -2,30 +2,36 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-24 14:47:58
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-01-15 10:20:20
|
||||
* @LastEditTime: 2025-02-25 14:03:40
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<el-table
|
||||
id="detail"
|
||||
:data="tableData"
|
||||
:header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266',
|
||||
}"
|
||||
border
|
||||
:span-method="arraySpanMethod"
|
||||
:span-method="arraySpanMethod"
|
||||
v-loading="dataListLoading"
|
||||
style="width: 100%"
|
||||
ref="dataList">
|
||||
<el-table-column prop="lineName" label="产线" />
|
||||
<el-table-column prop="lineName" label="产线" align="center" />
|
||||
<el-table-column
|
||||
prop="sizes"
|
||||
width="105"
|
||||
showOverflowtooltip
|
||||
align="center"
|
||||
label="规格" />
|
||||
<el-table-column prop="process" label="产品工艺" />
|
||||
<el-table-column prop="inputN" label="投入">
|
||||
<el-table-column prop="process" label="产品工艺" align="center" />
|
||||
<el-table-column prop="inputN" label="投入" align="center">
|
||||
<el-table-column prop="inputNum" label="投入数量/片" />
|
||||
<el-table-column prop="inputArea" label="投入面积/m²">
|
||||
<template v-slot="scope">
|
||||
@ -39,7 +45,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="outputN" label="产出">
|
||||
<el-table-column prop="outputN" label="产出" align="center">
|
||||
<el-table-column prop="outputNum" label="产出数量/片" />
|
||||
<el-table-column prop="outputArea" label="产出面积/m²">
|
||||
<template v-slot="scope">
|
||||
@ -53,151 +59,147 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lossN" label="不良">
|
||||
<el-table-column prop="lossN" label="不良" align="center">
|
||||
<el-table-column prop="lossNum" label="不良数量/片" />
|
||||
<el-table-column prop="lossArea" label="不良面积/m²">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.lossArea != null
|
||||
? scope.row.lossArea.toFixed(2)
|
||||
: '-'
|
||||
scope.row.lossArea != null ? scope.row.lossArea.toFixed(2) : '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lossRatio" label="不良率/%">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.lossRatio != null
|
||||
? scope.row.lossRatio.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.lossRatio != null ? scope.row.lossRatio.toFixed(2) : '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="outputRatio" label="投入产出率/%">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.outputRatio != null
|
||||
? scope.row.outputRatio.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.outputRatio != null
|
||||
? scope.row.outputRatio.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="processingRatio" label="加工成品率/%">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.processingRatio != null
|
||||
? scope.row.processingRatio.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lossD" label="不良详情">
|
||||
<el-table-column prop="original" label="原片">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.processingRatio != null
|
||||
? scope.row.processingRatio.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lossD" label="不良详情" align="center">
|
||||
<el-table-column prop="original" label="原片" align="center">
|
||||
<el-table-column prop="originalLossNum" label="原片不良/片" />
|
||||
<el-table-column prop="originalLossArea" label="原片不良/m²">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.originalLossArea != null
|
||||
? scope.row.originalLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.originalLossArea != null
|
||||
? scope.row.originalLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="edge" label="磨边">
|
||||
<el-table-column prop="edge" label="磨边" align="center">
|
||||
<el-table-column prop="edgeLossNum" label="磨边不良/片" />
|
||||
<el-table-column prop="edgeLossArea" label="磨边不良/m²">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.edgeLossArea != null
|
||||
? scope.row.edgeLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.edgeLossArea != null
|
||||
? scope.row.edgeLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="drill" label="打孔">
|
||||
<el-table-column prop="drill" label="打孔" align="center">
|
||||
<el-table-column prop="drillLossNum" label="打孔不良/片" />
|
||||
<el-table-column prop="drillLossArea" label="打孔不良/m²">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.drillLossArea != null
|
||||
? scope.row.drillLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.drillLossArea != null
|
||||
? scope.row.drillLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="coating" label="镀膜">
|
||||
<el-table-column prop="coating" label="镀膜" align="center">
|
||||
<el-table-column prop="coatingLossNum" label="镀膜不良/片" />
|
||||
<el-table-column prop="coatingLossArea" label="镀膜不良/m²">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.coatingLossArea != null
|
||||
? scope.row.coatingLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.coatingLossArea != null
|
||||
? scope.row.coatingLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="silk" label="丝印">
|
||||
<el-table-column prop="silk" label="丝印" align="center">
|
||||
<el-table-column prop="silkLossNum" label="丝印不良/片" />
|
||||
<el-table-column prop="silkLossArea" label="丝印不良/m²">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.silkLossArea != null
|
||||
? scope.row.silkLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.silkLossArea != null
|
||||
? scope.row.silkLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="tempering" label="钢化">
|
||||
<el-table-column prop="tempering" label="钢化" align="center">
|
||||
<el-table-column prop="temperingLossNum" label="钢化不良/片" />
|
||||
<el-table-column prop="temperingLossArea" label="钢化不良/m²">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.temperingLossArea != null
|
||||
? scope.row.temperingLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.temperingLossArea != null
|
||||
? scope.row.temperingLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="packing" label="包装">
|
||||
<el-table-column prop="packing" label="包装" align="center">
|
||||
<el-table-column prop="packingLossNum" label="包装不良/片" />
|
||||
<el-table-column prop="packingLossArea" label="包装不良/m²">
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.packingLossArea != null
|
||||
? scope.row.packingLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template v-slot="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.packingLossArea != null
|
||||
? scope.row.packingLossArea.toFixed(2)
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -206,6 +208,8 @@
|
||||
|
||||
<script>
|
||||
import { getTeamReportPageDet } from '@/api/core/monitoring/auto';
|
||||
import * as XLSX from 'xlsx';
|
||||
import FileSaver from 'file-saver';
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
@ -213,6 +217,15 @@ export default {
|
||||
return {
|
||||
tableData: [],
|
||||
dataListLoading: false,
|
||||
formConfig: [
|
||||
{
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'warning',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
@ -238,25 +251,57 @@ export default {
|
||||
item.temperingLossArea = item.tempering?.lossArea;
|
||||
item.packingLossNum = item.packing?.lossNum;
|
||||
item.packingLossArea = item.packing?.lossArea;
|
||||
if(item.isSummaryReport){
|
||||
item.lineName = '合计'
|
||||
}
|
||||
if (item.isSummaryReport) {
|
||||
item.lineName = '合计';
|
||||
}
|
||||
return item;
|
||||
});
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (row.isSummaryReport) {
|
||||
if (columnIndex === 0) {
|
||||
return [1, 3];
|
||||
} else if (columnIndex === 1) {
|
||||
return [0, 0];
|
||||
}else if (columnIndex === 2) {
|
||||
return [0, 0];
|
||||
}
|
||||
}
|
||||
},
|
||||
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (row.isSummaryReport) {
|
||||
if (columnIndex === 0) {
|
||||
return [1, 3];
|
||||
} else if (columnIndex === 1) {
|
||||
return [0, 0];
|
||||
} else if (columnIndex === 2) {
|
||||
return [0, 0];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
handleExport() {
|
||||
let tables = document.querySelector('#detail').cloneNode(true);
|
||||
let exportTable = XLSX.utils.table_to_book(tables);
|
||||
|
||||
var exportTableOut = XLSX.write(exportTable, {
|
||||
bookType: 'xlsx',
|
||||
bookSST: true,
|
||||
type: 'array',
|
||||
});
|
||||
// sheetjs.xlsx为导出表格的标题名称
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream',
|
||||
}),
|
||||
'班组生产报表-详情.xlsx'
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut);
|
||||
}
|
||||
return exportTableOut;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2025-01-15 10:24:05
|
||||
* @LastEditTime: 2025-02-25 14:26:04
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
@ -65,69 +65,81 @@ import { getGroupTeamPage } from '@/api/base/groupTeam';
|
||||
import * as XLSX from 'xlsx';
|
||||
import FileSaver from 'file-saver';
|
||||
import baseTableS from './baseTable.vue';
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
import { parseTime } from '@/filter/code-filter';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'reportType',
|
||||
label: '报表类型',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'reportStartTime',
|
||||
prop: 'reportName',
|
||||
label: '日期',
|
||||
filter: (val) => (val ? parseTime(val, '{y}-{m}-{d}') : '-'),
|
||||
width: 130,
|
||||
width: 180,
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'factoryName',
|
||||
label: '工厂',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
prop: 'teamName',
|
||||
label: '班组',
|
||||
fixed: true
|
||||
},
|
||||
|
||||
{
|
||||
prop: 'inputN',
|
||||
label: '投入',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'inputNum',
|
||||
label: '投入数量/片',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'inputArea',
|
||||
label: '投入面积/m²',
|
||||
width:100
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
prop: 'outputN',
|
||||
label: '产出',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'outputNum',
|
||||
label: '产出数量/片',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'outputArea',
|
||||
label: '产出面积/㎡',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:100
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
prop: 'lossN',
|
||||
label: '不良',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'lossNum',
|
||||
label: '不良数量/片',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'lossArea',
|
||||
label: '不良面积/㎡',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:100
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -135,123 +147,148 @@ const tableProps = [
|
||||
prop: 'lossRatio',
|
||||
label: '不良率/%',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'outputRatio',
|
||||
label: '投入产出率/%',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:110
|
||||
},
|
||||
{
|
||||
prop: 'processingRatio',
|
||||
label: '加工成品率/%',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:110
|
||||
},
|
||||
{
|
||||
prop: 'lossD',
|
||||
label: '不良详情',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'original',
|
||||
label: '原片',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'originalLossNum',
|
||||
label: '原片不良/片',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'originalLossArea',
|
||||
label: '原片不良/㎡',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:100
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
prop: 'edge',
|
||||
label: '磨边',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'edgeLossNum',
|
||||
label: '磨边不良/片',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'edgeLossArea',
|
||||
label: '磨边不良/㎡',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:100
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
prop: 'drill',
|
||||
label: '打孔',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'drillLossNum',
|
||||
label: '打孔不良/片',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'drillLossArea',
|
||||
label: '打孔不良/㎡',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:100
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
prop: 'coating',
|
||||
label: '镀膜',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'coatingLossNum',
|
||||
label: '镀膜不良/片',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'coatingLossArea',
|
||||
label: '镀膜不良/㎡',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:100
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
prop: 'silk',
|
||||
label: '丝印',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'silkLossNum',
|
||||
label: '丝印不良/片',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'silkLossArea',
|
||||
label: '丝印不良/㎡',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:100
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
prop: 'tempering',
|
||||
label: '钢化',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'temperingLossNum',
|
||||
label: '钢化不良/片',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'temperingLossArea',
|
||||
label: '钢化不良/㎡',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:100
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
prop: 'packing',
|
||||
label: '包装',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'packingLossNum',
|
||||
label: '包装不良/片',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'packingLossArea',
|
||||
label: '包装不良/㎡',
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
width:100
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -270,6 +307,7 @@ export default {
|
||||
getDataListURL: getTeamReportPage,
|
||||
},
|
||||
listQuery: {
|
||||
reportType: 1,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
@ -291,7 +329,12 @@ export default {
|
||||
label: '工厂',
|
||||
selectOptions: [],
|
||||
param: 'factoryId',
|
||||
onchange: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '班组',
|
||||
selectOptions: [],
|
||||
param: 'teamId',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
@ -314,20 +357,15 @@ export default {
|
||||
name: '年',
|
||||
},
|
||||
],
|
||||
defaultSelect: 1,
|
||||
param: 'reportType',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '班组',
|
||||
selectOptions: [],
|
||||
param: 'teamId',
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '报表开始时间',
|
||||
label: '时间范围',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'timestamp',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
@ -364,15 +402,9 @@ export default {
|
||||
// 设置为23:59:59
|
||||
const end = new Date(yesterday.getTime());
|
||||
end.setHours(23, 59, 59, 59);
|
||||
this.listQuery.reportStartTime = [
|
||||
parseTime(yesterday, '{y}-{m}-{d} {h}:{i}:{s}'),
|
||||
parseTime(end, '{y}-{m}-{d} {h}:{i}:{s}'),
|
||||
];
|
||||
this.listQuery.reportStartTime = [yesterday.getTime(),end.getTime()];
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchBarForm.formInline.timeVal = [
|
||||
parseTime(yesterday, '{y}-{m}-{d} {h}:{i}:{s}'),
|
||||
parseTime(end, '{y}-{m}-{d} {h}:{i}:{s}'),
|
||||
];
|
||||
this.$refs.searchBarForm.formInline.timeVal = [yesterday.getTime(),end.getTime()];
|
||||
});
|
||||
this.getDataList();
|
||||
this.getPdLineList();
|
||||
@ -389,6 +421,7 @@ export default {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed-right'));
|
||||
}
|
||||
let exportTable = XLSX.utils.table_to_book(tables);
|
||||
exportTable.Sheets.Sheet1.A1.v = '序号' //导出表格第一列表头为序号
|
||||
|
||||
var exportTableOut = XLSX.write(exportTable, {
|
||||
bookType: 'xlsx',
|
||||
@ -414,7 +447,7 @@ export default {
|
||||
pageNo: 1,
|
||||
};
|
||||
getGroupTeamPage(params).then((res) => {
|
||||
this.formConfig[2].selectOptions = res.data.list || [];
|
||||
this.formConfig[1].selectOptions = res.data.list || [];
|
||||
});
|
||||
getFactoryPage(params).then((res) => {
|
||||
this.formConfig[0].selectOptions = res.data.list || [];
|
||||
@ -445,11 +478,11 @@ export default {
|
||||
this.dataListLoading = true;
|
||||
const arr = ['日', '周', '月', '年'];
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
if(!response.data.list){
|
||||
this.showData = []
|
||||
this.dataListLoading = false;
|
||||
return
|
||||
}
|
||||
if (!response.data.list) {
|
||||
this.showData = [];
|
||||
this.dataListLoading = false;
|
||||
return;
|
||||
}
|
||||
this.tableData = response.data?.list.map((item, index) => {
|
||||
item.reportType = arr[item.reportType - 1];
|
||||
item.originalLossNum = item.original?.lossNum;
|
||||
@ -475,13 +508,16 @@ export default {
|
||||
},
|
||||
handleClick(val) {
|
||||
this.addOrUpdateVisible = true;
|
||||
const time = val.data.reportName?val.data.reportName:'- '
|
||||
const teamName = val.data.teamName?val.data.teamName:'- '
|
||||
const teamLeader = val.data.teamLeader?val.data.teamLeader:'- '
|
||||
this.addOrEditTitle =
|
||||
'时间:' +
|
||||
val.data?.reportName +
|
||||
'时间:' +
|
||||
time +
|
||||
' 班组:' +
|
||||
val.data?.teamName +
|
||||
teamName +
|
||||
' 组长:' +
|
||||
val.data?.teamLeader +
|
||||
teamLeader +
|
||||
' 详情';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.grDetail.init(val.data.id);
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2024-07-01 14:54:06
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-01-15 13:23:17
|
||||
* @LastEditTime: 2025-02-26 15:12:16
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -438,7 +438,8 @@ export default {
|
||||
}
|
||||
.class1,
|
||||
.class2,
|
||||
.class3 {
|
||||
.class3,
|
||||
.class4 {
|
||||
padding: 0;
|
||||
font-weight: 600;
|
||||
margin-bottom: 2px;
|
||||
@ -528,6 +529,22 @@ export default {
|
||||
background-color: #e0ffee;
|
||||
}
|
||||
}
|
||||
.class4 {
|
||||
.selectDiv {
|
||||
.toggle-icon,
|
||||
.toggle-icon-hide {
|
||||
background-color: #5c2fb1;
|
||||
}
|
||||
.el-input--small .el-input__inner {
|
||||
color: #381689;
|
||||
background-color: #e2a6eb;
|
||||
}
|
||||
}
|
||||
.labelClass {
|
||||
color: #381689;
|
||||
background-color: #e2a6eb;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,3 +1,10 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2025-01-15 11:20:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-02-25 09:37:50
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
@ -24,7 +31,7 @@
|
||||
<script>
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||
import { schedulingPage } from '@/api/base/groupTeamScheduling';
|
||||
import { schedulingPage,exportSchedulingExcel } from '@/api/base/groupTeamScheduling';
|
||||
import { getFactoryPage } from '@/api/core/base/factory';
|
||||
import {
|
||||
getGroupClassesPage,
|
||||
@ -139,36 +146,20 @@ export default {
|
||||
this.getPdLineList();
|
||||
},
|
||||
methods: {
|
||||
handleExport() {
|
||||
let tables = document.querySelector('.el-table').cloneNode(true);
|
||||
const fix = tables.querySelector('.el-table__fixed');
|
||||
const fixRight = tables.querySelector('.el-table__fixed-right');
|
||||
if (fix) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed'));
|
||||
}
|
||||
if (fixRight) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed-right'));
|
||||
}
|
||||
let exportTable = XLSX.utils.table_to_book(tables);
|
||||
|
||||
var exportTableOut = XLSX.write(exportTable, {
|
||||
bookType: 'xlsx',
|
||||
bookSST: true,
|
||||
type: 'array',
|
||||
});
|
||||
// sheetjs.xlsx为导出表格的标题名称
|
||||
try {
|
||||
FileSaver.saveAs(
|
||||
new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream',
|
||||
}),
|
||||
this.fileName + '班组上班记录.xlsx'
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut);
|
||||
}
|
||||
return exportTableOut;
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.queryParams };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportSchedulingExcel(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '上班记录报表.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
},
|
||||
getPdLineList() {
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
@ -197,6 +188,13 @@ export default {
|
||||
this.getList();
|
||||
break;
|
||||
case 'export':
|
||||
this.queryParams.pageNo = 1;
|
||||
this.queryParams.factoryId = val.factoryId || undefined;
|
||||
this.queryParams.classesId = val.classesId || undefined;
|
||||
this.queryParams.teamName = val.teamId || undefined;
|
||||
this.queryParams.startDay = val.timeVal
|
||||
? val.timeVal
|
||||
: undefined;
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
|
@ -44,7 +44,7 @@
|
||||
border-radius: 100%;
|
||||
background: #26b9de;
|
||||
"></span>
|
||||
成本管理系统
|
||||
智能监控分析系统
|
||||
</p>
|
||||
</div>
|
||||
<video
|
||||
@ -103,37 +103,18 @@
|
||||
line-height: 54px;
|
||||
letter-spacing: 2px;
|
||||
">
|
||||
成本管理系统
|
||||
智能监控分析系统
|
||||
</h3>
|
||||
</h2>
|
||||
|
||||
<!-- 表单 -->
|
||||
<div class="form-cont">
|
||||
<el-tabs
|
||||
class="form"
|
||||
v-model="loginForm.loginType"
|
||||
style="float: none">
|
||||
<el-tab-pane label="账号密码登录" name="uname"></el-tab-pane>
|
||||
<el-tab-pane label="短信验证码登录" name="sms"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="form-cont" style="margin-top: 60px;">
|
||||
<div style="">
|
||||
<el-form
|
||||
ref="loginForm"
|
||||
:model="loginForm"
|
||||
:rules="LoginRules"
|
||||
class="login-form">
|
||||
<el-form-item prop="tenantName" v-if="tenantEnable">
|
||||
<el-input
|
||||
v-model="loginForm.tenantName"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="租户">
|
||||
<!-- <svg-icon
|
||||
slot="prefix"
|
||||
icon-class="tree"
|
||||
class="el-input__icon input-icon" /> -->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- 账号密码登录 -->
|
||||
<div v-if="loginForm.loginType === 'uname'">
|
||||
<el-form-item prop="username">
|
||||
|
@ -91,19 +91,19 @@ export default {
|
||||
{ prop: 'productionLine', label: '产线' },
|
||||
{ prop: 'workshopSection', label: '工段' },
|
||||
{ prop: 'equipment', label: '设备名称' },
|
||||
{
|
||||
width: 90,
|
||||
prop: 'alarmGrade',
|
||||
label: '报警级别',
|
||||
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
|
||||
},
|
||||
// {
|
||||
// width: 90,
|
||||
// prop: 'alarmGrade',
|
||||
// label: '报警级别',
|
||||
// filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
|
||||
// },
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '报警时间',
|
||||
width: 180,
|
||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||
},
|
||||
{ prop: 'alarmContent', label: '报警内容' },
|
||||
// { prop: 'alarmContent', label: '报警内容' },
|
||||
// {
|
||||
// _action: 'equipment-group-show-alert',
|
||||
// label: '报警',
|
||||
@ -167,7 +167,7 @@ export default {
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
factoryId: undefined,
|
||||
createTime: [],
|
||||
},
|
||||
|
@ -126,10 +126,10 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
if (this.id) this.$set(this.queryParams, 'equipmentId', this.id);
|
||||
if (this.code)
|
||||
this.$set(this.searchBarFormConfig[0], 'defaultSelect', this.code);
|
||||
if (this.name)
|
||||
this.$set(this.searchBarFormConfig[1], 'defaultSelect', this.name);
|
||||
this.$set(this.searchBarFormConfig[0], 'defaultSelect', this.name);
|
||||
if (this.code)
|
||||
this.$set(this.searchBarFormConfig[1], 'defaultSelect', this.code);
|
||||
const end = new Date();
|
||||
const start = new Date() - 1800 * 1000;
|
||||
this.queryParams.recordTime = [parseTime(start), parseTime(end)];
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2025-02-10 09:15:55
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-02-19 09:41:10
|
||||
* @LastEditTime: 2025-02-25 15:48:59
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -63,6 +63,7 @@ export default {
|
||||
selectOptions: [],
|
||||
param: 'lineId',
|
||||
multiple: true,
|
||||
width: 410
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
|
21
yarn.lock
21
yarn.lock
@ -3958,6 +3958,11 @@ dashdash@^1.12.0:
|
||||
dependencies:
|
||||
assert-plus "^1.0.0"
|
||||
|
||||
dayjs@^1.8.25:
|
||||
version "1.11.13"
|
||||
resolved "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz"
|
||||
integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==
|
||||
|
||||
debug@^2.2.0:
|
||||
version "2.6.9"
|
||||
resolved "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz"
|
||||
@ -4418,6 +4423,14 @@ ejs@^2.6.1:
|
||||
resolved "https://registry.npmmirror.com/ejs/-/ejs-2.7.4.tgz"
|
||||
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
|
||||
|
||||
el-tree-transfer@^2.4.7:
|
||||
version "2.4.7"
|
||||
resolved "https://registry.npmmirror.com/el-tree-transfer/-/el-tree-transfer-2.4.7.tgz"
|
||||
integrity sha512-wcjQyqzmiJMDhF3qHR1NcqXp27Q65Td1EsMOVkqqOo9Z2mkVC+cGJEu3V4L90x8c1XgEciQL7tMuSjCP7/8G4g==
|
||||
dependencies:
|
||||
lodash "^4.17.20"
|
||||
wl-core "^1.1.4"
|
||||
|
||||
electron-to-chromium@^1.4.431:
|
||||
version "1.4.473"
|
||||
resolved "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.473.tgz"
|
||||
@ -11568,6 +11581,14 @@ which@^2.0.1:
|
||||
dependencies:
|
||||
isexe "^2.0.0"
|
||||
|
||||
wl-core@^1.1.4:
|
||||
version "1.1.9"
|
||||
resolved "https://registry.npmmirror.com/wl-core/-/wl-core-1.1.9.tgz"
|
||||
integrity sha512-7L83qEnrVW3YmPVqSwnlagoWJyVq/uSXkCFzND64nwtSdDm7o1RZQWiVgQcEilZxE0qLrRQKmjuAihNT6fWCjA==
|
||||
dependencies:
|
||||
big.js "^5.2.2"
|
||||
dayjs "^1.8.25"
|
||||
|
||||
wmf@~1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz"
|
||||
|
Loading…
Reference in New Issue
Block a user