bug 3
This commit is contained in:
		@@ -26,7 +26,8 @@
 | 
			
		||||
							:page="queryParams.pageNo"
 | 
			
		||||
							:limit="queryParams.pageSize"
 | 
			
		||||
							:table-data="list"
 | 
			
		||||
							@emitFun="handleEmitFun"></base-table>
 | 
			
		||||
							@emitFun="handleEmitFun"
 | 
			
		||||
							:max-height="tableH"></base-table>
 | 
			
		||||
					</el-tab-pane>
 | 
			
		||||
					<el-tab-pane :label="'\u3000柱状图\u3000'" name="graph">
 | 
			
		||||
						<div
 | 
			
		||||
@@ -57,6 +58,7 @@ export default {
 | 
			
		||||
		const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
 | 
			
		||||
		return {
 | 
			
		||||
			dialogVisible: false,
 | 
			
		||||
			tableH: this.tableHeight(260),
 | 
			
		||||
			urls: {
 | 
			
		||||
				page: '/analysis/equipment-analysis/quality',
 | 
			
		||||
			},
 | 
			
		||||
@@ -155,12 +157,12 @@ export default {
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					// width: 160,
 | 
			
		||||
					prop: 'inQuantity',
 | 
			
		||||
					prop: 'totalQuantity',
 | 
			
		||||
					label: '加工数量',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					// width: 160,
 | 
			
		||||
					prop: 'outQuantity',
 | 
			
		||||
					prop: 'okQuantity',
 | 
			
		||||
					label: '合格数量',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
@@ -252,6 +254,9 @@ export default {
 | 
			
		||||
		this.fillProductOptions();
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		window.addEventListener('resize', () => {
 | 
			
		||||
      this.tableH = this.tableHeight(260)
 | 
			
		||||
    })
 | 
			
		||||
		this.$refs['search-bar'].headBtnClick('search');
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2024-03-18 15:47:20
 | 
			
		||||
 * @LastEditTime: 2024-03-20 17:58:29
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -36,7 +36,8 @@
 | 
			
		||||
								<el-select
 | 
			
		||||
									v-model="dataForm.departmentId"
 | 
			
		||||
									:disabled="isdetail"
 | 
			
		||||
									:placeholder="`请选择部门`">
 | 
			
		||||
									:placeholder="`请选择部门`"
 | 
			
		||||
									style="width: 100%">
 | 
			
		||||
									<el-option
 | 
			
		||||
										v-for="opt in departmentOptions"
 | 
			
		||||
										:key="opt.id"
 | 
			
		||||
@@ -90,33 +91,32 @@
 | 
			
		||||
									type="datetime"
 | 
			
		||||
									:disabled="isdetail"
 | 
			
		||||
									placeholder="请选择巡检时间"
 | 
			
		||||
									value-format="timestamp"></el-date-picker>
 | 
			
		||||
									value-format="timestamp"
 | 
			
		||||
									style="width: 100%" />
 | 
			
		||||
							</el-form-item>
 | 
			
		||||
						</el-col>
 | 
			
		||||
					</el-row>
 | 
			
		||||
				</el-form>
 | 
			
		||||
			</div>
 | 
			
		||||
 | 
			
		||||
			<div class="attr-list" v-if="idAttrShow">
 | 
			
		||||
				<small-title
 | 
			
		||||
					style="margin: 16px 0; padding-left: 8px"
 | 
			
		||||
					:no-padding="true">
 | 
			
		||||
			<div v-if="idAttrShow">
 | 
			
		||||
				<small-title>
 | 
			
		||||
					巡检内容
 | 
			
		||||
				</small-title>
 | 
			
		||||
 | 
			
		||||
				<div v-if="!isdetail">
 | 
			
		||||
					<div>
 | 
			
		||||
						<SearchBar
 | 
			
		||||
							:formConfigs="searchBarFormConfig"
 | 
			
		||||
							ref="attr-search-bar"
 | 
			
		||||
							@headBtnClick="handleSearchBarBtnClick" />
 | 
			
		||||
					</div>
 | 
			
		||||
					<!-- <template>
 | 
			
		||||
						<span style="display: inline-block;" @click="addNew()">
 | 
			
		||||
				<div v-if="!isdetail" style="display: flex">
 | 
			
		||||
					<SearchBar
 | 
			
		||||
						:formConfigs="searchBarFormConfig"
 | 
			
		||||
						ref="attr-search-bar"
 | 
			
		||||
						@headBtnClick="handleSearchBarBtnClick" />
 | 
			
		||||
					<!-- <div class="action_btn"> -->
 | 
			
		||||
					<el-button type="text" class="action_btn" @click="addNew()">
 | 
			
		||||
						<span style="display: inline-block;">
 | 
			
		||||
							<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
 | 
			
		||||
							<span class="add">添加</span>
 | 
			
		||||
							<span class="add">添加内容</span>
 | 
			
		||||
						</span>
 | 
			
		||||
					</template> -->
 | 
			
		||||
					</el-button>
 | 
			
		||||
					<!-- </div> -->
 | 
			
		||||
				</div>
 | 
			
		||||
				<base-table
 | 
			
		||||
					:table-props="tableProps"
 | 
			
		||||
@@ -229,14 +229,14 @@ export default {
 | 
			
		||||
					btnName: '查询',
 | 
			
		||||
					name: 'search',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					color: 'success',
 | 
			
		||||
					plain: true
 | 
			
		||||
				}
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'button',
 | 
			
		||||
				// 	btnName: '新增',
 | 
			
		||||
				// 	name: 'add',
 | 
			
		||||
				// 	color: 'success',
 | 
			
		||||
				// 	plain: true
 | 
			
		||||
				// }
 | 
			
		||||
			],
 | 
			
		||||
			listQuery: {
 | 
			
		||||
				pageSize: 10,
 | 
			
		||||
@@ -519,10 +519,6 @@ export default {
 | 
			
		||||
	flex-direction: column;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.drawer >>> .el-form-item__label {
 | 
			
		||||
	padding: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.drawer >>> .el-drawer__header {
 | 
			
		||||
	margin: 0;
 | 
			
		||||
	padding: 32px 32px 24px;
 | 
			
		||||
@@ -551,11 +547,6 @@ export default {
 | 
			
		||||
	padding-right: 10px; /* 调整滚动条样式 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.drawer >>> .el-form,
 | 
			
		||||
.drawer >>> .attr-list {
 | 
			
		||||
	padding: 0 16px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.drawer-body__footer {
 | 
			
		||||
	display: flex;
 | 
			
		||||
	justify-content: flex-end;
 | 
			
		||||
@@ -563,7 +554,7 @@ export default {
 | 
			
		||||
}
 | 
			
		||||
.action_btn {
 | 
			
		||||
  float: right;
 | 
			
		||||
  margin: -32px 15px 0;
 | 
			
		||||
  /* margin: 0 15px 0; */
 | 
			
		||||
  font-size: 14px;
 | 
			
		||||
}
 | 
			
		||||
.add {
 | 
			
		||||
 
 | 
			
		||||
@@ -120,7 +120,7 @@ export default {
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				{ prop: 'name', label: '巡检单名称' },
 | 
			
		||||
				{ prop: 'department', label: '部门' },
 | 
			
		||||
				{ prop: 'actualCheckTime', label: '巡检时间', filter: parseTime },
 | 
			
		||||
				{ prop: 'planCheckTime', label: '巡检时间', filter: parseTime },
 | 
			
		||||
				{ prop: 'groupClass', label: '班次' },
 | 
			
		||||
				// { prop: 'opt', label: '巡检内容', name: '详情', subcomponent: btn },
 | 
			
		||||
				{ prop: 'remark', label: '备注' }
 | 
			
		||||
 
 | 
			
		||||
@@ -66,7 +66,7 @@ import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/bas
 | 
			
		||||
import AddContent from './addContent.vue';
 | 
			
		||||
import { parseTime } from '../../../../core/mixins/code-filter';
 | 
			
		||||
 | 
			
		||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
 | 
			
		||||
const btn = {
 | 
			
		||||
	name: 'tableBtn',
 | 
			
		||||
@@ -129,20 +129,22 @@ export default {
 | 
			
		||||
				// 	width: 180,
 | 
			
		||||
				// 	filter: timeFilter,
 | 
			
		||||
				// },
 | 
			
		||||
				{ prop: 'maintainOrderNumber', label: '设备保养单号' },
 | 
			
		||||
				{ prop: 'planName', label: '保养计划名称' },
 | 
			
		||||
				{ prop: 'departmentName', label: '部门' },
 | 
			
		||||
				{ prop: 'lineName', label: '产线名' },
 | 
			
		||||
				{ prop: 'planStartTime', label: '计划开始时间', filter: timeFilter },
 | 
			
		||||
				{ prop: 'planEndTime', label: '计划结束时间', filter: timeFilter },
 | 
			
		||||
				{ prop: 'startTime', label: '实际开始时间', filter: timeFilter },
 | 
			
		||||
				{ prop: 'endTime', label: '实际结束时间', filter: timeFilter },
 | 
			
		||||
				{ prop: 'maintainOrderNumber', label: '设备保养单号', width: 170, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'planName', label: '保养计划名称', width: 150, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'departmentName', label: '部门', width: 120, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'lineName', label: '产线名', width: 120, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'planStartTime', label: '计划开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'planEndTime', label: '计划结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'startTime', label: '实际开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'endTime', label: '实际结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
 | 
			
		||||
				// { prop: 'equipmentName', label: '设备名称' },
 | 
			
		||||
				// { prop: 'maintainWorker', label: '保养人员' },
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'relatePlan',
 | 
			
		||||
					label: '保养计划类型',
 | 
			
		||||
					filter: (v) => (v != null ? ['', '计划型', '非计划型'][v] : ''),
 | 
			
		||||
					width: 170,
 | 
			
		||||
					showOverflowtooltip: true
 | 
			
		||||
				},
 | 
			
		||||
				{ prop: 'opt', label: '详情', name: '详情', subcomponent: btn }
 | 
			
		||||
				// { prop: 'maintainDuration', label: '计划保养用时(h)' },
 | 
			
		||||
 
 | 
			
		||||
@@ -393,7 +393,7 @@
 | 
			
		||||
							:file="file"
 | 
			
		||||
							:key="file.fileUrl"
 | 
			
		||||
							:disabled="disabled"
 | 
			
		||||
							@delete="!disabled && handleDeleteFile(file, col.prop)" />
 | 
			
		||||
							@delete="!disabled && handleDeleteFile(file)" />
 | 
			
		||||
					</div>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
@@ -678,10 +678,12 @@ export default {
 | 
			
		||||
					file.type === 'image/jpeg' ||
 | 
			
		||||
					file.type === 'image/png' ||
 | 
			
		||||
					file.type === 'image/jpg';
 | 
			
		||||
				if (!isJPG) {
 | 
			
		||||
					this.$modal.msgError('只能上传jpg/png文件!');
 | 
			
		||||
				}
 | 
			
		||||
				return isJPG;
 | 
			
		||||
			};
 | 
			
		||||
			return checkFileSize();
 | 
			
		||||
			// return checkFileSize() && checkFileType();
 | 
			
		||||
			return checkFileSize() && checkFileType();
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// handlers
 | 
			
		||||
@@ -737,7 +739,6 @@ export default {
 | 
			
		||||
				fileType: prop == 'files' ? 2 : 1,
 | 
			
		||||
			});
 | 
			
		||||
			this.$modal.msgSuccess('上传成功');
 | 
			
		||||
			console.log('为我', this.form.files)
 | 
			
		||||
			this.$emit('update', this.form);
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -92,23 +92,34 @@ export default {
 | 
			
		||||
			});
 | 
			
		||||
			if (code == 0) {
 | 
			
		||||
				this.listLine = data;
 | 
			
		||||
				return;
 | 
			
		||||
			} else {
 | 
			
		||||
				this.listLine.splice(0);
 | 
			
		||||
			}
 | 
			
		||||
			this.listLine.splice(0);
 | 
			
		||||
		},
 | 
			
		||||
		async getEquipmentByLineId(id) {
 | 
			
		||||
			const { data, code } = await this.$axios({
 | 
			
		||||
				url: '/base/core-equipment/listByLine',
 | 
			
		||||
				params: {
 | 
			
		||||
					id,
 | 
			
		||||
				},
 | 
			
		||||
			// 获得全部设备
 | 
			
		||||
			const res = await this.$axios({
 | 
			
		||||
				url: '/base/core-equipment/listAll',
 | 
			
		||||
			});
 | 
			
		||||
			if (code == 0) {
 | 
			
		||||
				this.listEq = data;
 | 
			
		||||
			if (res.code == 0) {
 | 
			
		||||
				this.listEq = res.data;
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			this.listEq.splice(0);
 | 
			
		||||
		},
 | 
			
		||||
		async getEquipmentByLineId(id) {
 | 
			
		||||
			if (id) {
 | 
			
		||||
				const { data, code } = await this.$axios({
 | 
			
		||||
					url: '/base/core-equipment/listByLine',
 | 
			
		||||
					params: {
 | 
			
		||||
						id,
 | 
			
		||||
					},
 | 
			
		||||
				});
 | 
			
		||||
				if (code == 0) {
 | 
			
		||||
					this.listEq = data;
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				this.listEq.splice(0);
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		handleSearch() {
 | 
			
		||||
			this.$emit('action', {
 | 
			
		||||
				action: 'search',
 | 
			
		||||
 
 | 
			
		||||
@@ -112,7 +112,7 @@ export default class GanttGraph {
 | 
			
		||||
            // top: 12 + 128 * this.gridIndex,
 | 
			
		||||
            top: 12 + 104 * this.gridIndex,
 | 
			
		||||
            right: 48,
 | 
			
		||||
            left: 88,
 | 
			
		||||
            left: 150,
 | 
			
		||||
            height: 56
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user