Ver Fonte

Merge remote-tracking branch 'origin/master' into master

laoyao há 3 anos atrás
pai
commit
ddf4db8635

+ 307 - 308
imcs-ui/src/lang/zh/resource.js

@@ -1,308 +1,307 @@
-/**************** 【生产資源中心】菜单  **************/
-export default {
-	resource: {
-		// 本模型下的共通
-		common: {
-			aduio: '审核产品',
-			selectAdd: '选择设备',
-			peizhi: '生产资源配置',
-			toolList: '刀具列表',
-			programList: '程序列表',
-			jiankong: '监控方式',
-			setJiankong: '设置监控',
-			jiankongRecord: '监控记录',
-			noJiank: '无监控',
-			jiankongTime: '监控使用寿命',
-			jiankongNums: '监控使用次数',
-			seconds: '分钟',
-			nums: '次',
-			mimm: 'm/s',
-			jichuang: '机床',
-			jxsbi: '机械手臂',
-			agv: 'AGV',
-			tuoban: '托板',
-			users: '使用',
-			history: '历史',
-			eqDelete: '从设备删除',
-			zhixingPg: '执行程序',
-			maxWorkHours: '小时',
-			displayStatus: '是否显示',
-			stopTaskHours: '小时(不派任务)',
-			eqCenter: {
-				allCount: '设备总数',
-				supervisionCount: '系统监管',
-				independentCount: '独立运行',
-				onlineCount: '在线',
-				offlineCount: '离线',
-				workCount: '生产中',
-				freeCount: '空闲',
-				waitCount: '等待配送资源',
-				exceptionCount: '异常',
-				anArea: '按产线',
-				anType: '按分类',
-				waitTask: '待完成任务',
-				detail: '详情',
-				geKuwei: '个库位'
-			}
-		},
-		// 列表搜索表单名称
-		searchForm: {
-			programName: '产品名称',
-			startEndTime: '时间',
-			guige: '规格',
-			xinghao: '型号',
-			jichuang: '所在机床',
-			resourceName: '资源名称',
-			linkStatus: '在线状态',
-			eqName: '设备名称',
-			name: '名称',
-			no: '编号',
-			isCNC: '包含CNC程序',
-			isDao: '包含刀具库',
-			idJindu: '具备进度条',
-			isStatus: '具备状态',
-			isProStaus: '产线控制状态',
-			maxTime: '每日最多加工',
-			baoyang: '临近保养',
-			isAutoCode: '是否工序设备'
-		},
-		// 按钮的名称
-	  	buttons: {
-	  		equipment: '设备管理',
-	  		position: '设备位置管理',
-	  		setBtn: '设置控制状态',
-	  		work: '工作位置管理',
-	  		setting: '配置',
-	  		hardware: '硬件配置',
-	  		linkLine: '关联边线库',
-	  		tongbu: '同步刀具',
-	  		tongbEq: '同步到设备',
-	  		tongbSk: '同步数控程序',
-        upload: '上传程序',
-			mode:  '模式',
-			autoCode: '设备业务自动化节点',
-			detailConf: '详情配置'
-	  	},
-	  	// 列表的cell名称
-		table: {
-			// 【生产单元管理】列表table字段名称
-			area: {
-				no: '编号',
-				name: '产线名称',
-				nums: '资源数量',
-				layoutMap: '布局图',
-				resources: '包含生产资源',
-				mode: '产线模式',
-				remark: '备注',
-				status: '启用状态',
-				createUser: '操作人',
-				updateTime: '修改时间'
-			},
-			// 【设备管理】列表table字段名称
-			equipment: {
-				no: '编号',
-				pic: '主图',
-				name: '设备名称',
-				brand: '品牌',
-				specification: '规格',
-				model: '型号',
-			},
-			// 【选择设备】列表table字段名称
-			selectQm: {
-				no: '编号',
-				pic: '主图',
-				name: '设备名称',
-				brand: '品牌',
-				specification: '规格',
-				model: '型号',
-				zoneName: '已被选的生产单元',
-			},
-			// 【生产资源管理】列表table字段名称
-			resours: {
-				no: '编号',
-				pic: '主图',
-				name: '设备名称',
-				brand: '品牌',
-				specification: '规格',
-				resourceBusinessId: '设备业务',
-				capitalNo: '资产编号',
-			    capitalName: '资产名称',
-				capitalType: '资产类别',
-			    modeSpecification: '型号规格',
-				capitalPrice: '资产原值',
-				productionDate: '出厂年月',
-				productionNo: '出厂编号',
-				manufacturer: '制造厂家',
-				zoneName: '所属产线',
-				model: '型号',
-				category: '设备分类',
-				zoneName: '所属产线',
-        		programSynTime: '同步时间',
-        		programNum: '程序数量',
-				nums: '工作位置数量',
-				isProgram: '是否需要程序',
-				linkStatus: "连接状态",
-				controlStatus: '控制状态',
-				productionStatus: '生产状态'
-			},
-      		//【维保计划管理】列表table字段名称
-	      	repair:{
-				select:'选择设备',
-				code: '设备编号',
-		        productionresourceName: '设备名称',
-		        lineDesc: '所在产线',
-		        countdown: '维修倒计时进度',
-		        repairStartTime: '维保开始时间',
-		        repairEndTime: '下次维保时间',
-		        repairStatus: '维修状态',
-		        status: '启用状态',
-		        createUserDesc: '操作人',
-		        weight:'排序',
-		        createTime: '创建时间',
-		        updateTime: '更新时间',
-		        remark: '备注',
-		        maintenanceTime: '维保日期',
-		        maintenanceContent: '维保内容',
-		        maintenanceStatus: '维保后设备状态',
-		        maintenanceUser: '维保人',
-		        maintenanceCreateTime: '提交日期',
-	
-	      	},
-			// 【设备位置管理】列表table字段名称
-			eqPosition: {
-				no: '位置编号',
-				name: '名称',
-				pointId: '点位ID',
-				status: '锁定状态'
-			},
-			// 【设备刀具管理-设备列表】列表table字段名称
-			eqList: {
-				name: '设备名称',
-				name2: '设备编号',
-				name3: '设备类似',
-				name4: '所属生产单元',
-				name5: '设备连接状态',
-				name6: '同步时间',
-				name7: '刀库刀具数量'
-			},
-			// 【设备刀具管理-刀具列表】列表table字段名称
-			toolList: {
-				specification: '刀具规格',
-				model: '型号',
-				brand: '品牌',
-				no: '刀库刀具编号',
-				stopBits: '停止位',
-				useStatus: '使用状态',
-				monitorWay: '监控方式',
-				rateUseLife: '额定使用寿命/次',
-				leftUseLife: '剩余使用次数/次',
-				warnLimit: '预警极限',
-				synTime: '同步时间'
-			},
-			// 【设备刀具管理-监控记录】列表table字段名称
-			jkRecord: {
-				rateUseLife: '额定使用寿命/次',
-				leftUseLife: '剩余使用寿命/次',
-				warnLimit: '预警极限',
-				synTime: '同步时间'
-			},
-			// 【程序中心-本地库】列表table字段名称
-			program: {
-				no: '程序编号',
-				name: '程序名称',
-				runTime: '运行时间',
-				size: '大小',
-				toolNums: '刀具数量',
-				version: '版本',
-				status: '状态',
-        		synTime: '同步时间'
-			},
-			// 【程序中心-新增-刀具】列表table字段名称
-			programTool: {
-				specification: '刀具规格',
-				toolName: '刀具名称',
-				useTime: '使用时间(分钟)',
-				count: '数量',
-				model: '型号',
-				brand: '品牌',
-				usageTime: '使用时间',
-				duration: '持续时间'
-			},
-			// 【程序管理】列表table字段名称
-			pgMgr: {
-				bomName: '产品',
-				version: '工艺版本号',
-				procedureNo: '工序号',
-				resourceName: '设备名称',
-				programName: '程序名称',
-				runTime: '运行时长',
-				createTime: '新增时间',
-				updateTime: '更新时间',
-				createUserDesc: '操作'
-			},
-			// 【程序执行任务】列表table字段名称
-			pgTask: {
-				programNo: '程序编号',
-				programName: '程序名称',
-				version: '版本号',
-				resourceName: '设备名称',
-				resourceCode: '设备编号',
-				runStatus: '状态',
-				actualRunTime: '额定运行时间',
-				startTime: '开始时间',
-				runTime: '运行时间',
-				endTime: '结束时间',
-				createUserDesc: '操作人'
-			}
-		},
-		// 表单数据名称
-		form: {
-			positionName: '位置名称',
-			relationStorage: '关联库位',
-			isLock: '是否锁定',
-			pointId: '点位ID',
-			selectLink: '选择线边库货架',
-			userTime: '额定使用寿命',
-			warninhTime: '报警寿命',
-			userNums: '额定使用次数',
-			warninhNums: '报警次数',
-			prority: '优先级',
-			workTime: '加工时间',
-			pg: '程序',
-			pgNo: '程序编号',
-			pgName: '程序名称',
-			pgVision: '版本号',
-			pgEq: '适合设备',
-			pgUpload: '上传程序',
-			pgTime: '运行时间',
-			pgSize: '程序大小',
-			pgContent: '程序内容',
-			pgTool: '刀具',
-			workbench_num: '工作台数量',
-			hand_num: '手臂数量',
-			cache_storge_num: '缓存库数量',
-			max_speed: '最大移动速度',
-			tray_num: '可放子盘数量',
-			tuoban: '关联托板分类',
-			arm: '手抓',
-			armName: '手抓名称',
-      target_resource: '目标设备',
-			rouJiagong: '产线类型'
-		},
-		// 表单验证规则提示信息
-		rules: {
-		},
-		// 提示或者显示信息
-		tips:{
-			tongbTips: '同步成功!',
-			zhixingTips: '执行程序成功!',
-			areaTips: '删除区域管理数据后,会将区域管理数据全部删除,确认删除?',
-			fileTips: '只能上传TEXT文件!',
-			deletePg: '是否【从设备删除】数据,确认删除?',
-			zxTips: '是否【执行程序】数据,确认执行?',
-			taskTips: '删除程序执行任务数据后,会将程序执行任务数据全部删除,确认删除?',
-			resourTips: '删除生产资源数据后,会将生产资源数据全部删除,确认删除?',
-			hardware: '该硬件不需要配置!'
-		}
-	}
-}
+/**************** 【生产資源中心】菜单  **************/
+export default {
+	resource: {
+		// 本模型下的共通
+		common: {
+			aduio: '审核产品',
+			selectAdd: '选择设备',
+			peizhi: '生产资源配置',
+			toolList: '刀具列表',
+			programList: '程序列表',
+			jiankong: '监控方式',
+			setJiankong: '设置监控',
+			jiankongRecord: '监控记录',
+			noJiank: '无监控',
+			jiankongTime: '监控使用寿命',
+			jiankongNums: '监控使用次数',
+			seconds: '分钟',
+			nums: '次',
+			mimm: 'm/s',
+			jichuang: '机床',
+			jxsbi: '机械手臂',
+			agv: 'AGV',
+			tuoban: '托板',
+			users: '使用',
+			history: '历史',
+			eqDelete: '从设备删除',
+			zhixingPg: '执行程序',
+			maxWorkHours: '小时',
+			displayStatus: '是否显示',
+			stopTaskHours: '小时(不派任务)',
+			eqCenter: {
+				allCount: '设备总数',
+				supervisionCount: '系统监管',
+				independentCount: '独立运行',
+				onlineCount: '在线',
+				offlineCount: '离线',
+				workCount: '生产中',
+				freeCount: '空闲',
+				waitCount: '等待配送资源',
+				exceptionCount: '异常',
+				anArea: '按产线',
+				anType: '按分类',
+				waitTask: '待完成任务',
+				detail: '详情',
+				geKuwei: '个库位'
+			}
+		},
+		// 列表搜索表单名称
+		searchForm: {
+			programName: '产品名称',
+			startEndTime: '时间',
+			guige: '规格',
+			xinghao: '型号',
+			jichuang: '所在机床',
+			resourceName: '资源名称',
+			linkStatus: '在线状态',
+			eqName: '设备名称',
+			name: '名称',
+			no: '编号',
+			isCNC: '包含CNC程序',
+			isDao: '包含刀具库',
+			idJindu: '具备进度条',
+			isStatus: '具备状态',
+			isProStaus: '产线控制状态',
+			maxTime: '每日最多加工',
+			baoyang: '临近保养',
+			isAutoCode: '是否工序设备'
+		},
+		// 按钮的名称
+	  	buttons: {
+	  		equipment: '设备管理',
+	  		position: '设备位置管理',
+	  		setBtn: '设置控制状态',
+	  		work: '工作位置管理',
+	  		setting: '配置',
+	  		hardware: '硬件配置',
+	  		linkLine: '关联边线库',
+	  		tongbu: '同步刀具',
+	  		tongbEq: '同步到设备',
+	  		tongbSk: '同步数控程序',
+        upload: '上传程序',
+			mode:  '模式',
+			autoCode: '设备业务自动化节点',
+			detailConf: '详情配置'
+	  	},
+	  	// 列表的cell名称
+		table: {
+			// 【生产单元管理】列表table字段名称
+			area: {
+				no: '编号',
+				name: '产线名称',
+				nums: '资源数量',
+				layoutMap: '布局图',
+				resources: '包含生产资源',
+				mode: '产线模式',
+				remark: '备注',
+				status: '启用状态',
+				createUser: '操作人',
+				updateTime: '修改时间'
+			},
+			// 【设备管理】列表table字段名称
+			equipment: {
+				no: '编号',
+				pic: '主图',
+				name: '设备名称',
+				brand: '品牌',
+				specification: '规格',
+				model: '型号',
+			},
+			// 【选择设备】列表table字段名称
+			selectQm: {
+				no: '编号',
+				pic: '主图',
+				name: '设备名称',
+				brand: '品牌',
+				specification: '规格',
+				model: '型号',
+				zoneName: '已被选的生产单元',
+			},
+			// 【生产资源管理】列表table字段名称
+			resours: {
+				no: '编号',
+				pic: '主图',
+				name: '设备名称',
+				brand: '品牌',
+				specification: '规格',
+				resourceBusinessId: '设备业务',
+				capitalNo: '资产编号',
+			    capitalName: '资产名称',
+				capitalType: '资产类别',
+			    modeSpecification: '型号规格',
+				capitalPrice: '资产原值',
+				productionDate: '出厂年月',
+				productionNo: '出厂编号',
+				manufacturer: '制造厂家',
+				zoneName: '所属产线',
+				model: '型号',
+				category: '设备分类',
+				zoneName: '所属产线',
+        		programSynTime: '同步时间',
+        		programNum: '程序数量',
+				nums: '工作位置数量',
+				isProgram: '是否需要程序',
+				linkStatus: "连接状态",
+				controlStatus: '控制状态',
+				productionStatus: '生产状态'
+			},
+      		//【维保计划管理】列表table字段名称
+      repair:{
+				select:'选择设备',
+				code: '设备编号',
+        productionresourceName: '设备名称',
+        lineDesc: '所在产线',
+        countdown: '维修倒计时进度',
+        repairStartTime: '维保开始时间',
+        repairEndTime: '下次维保时间',
+        repairStatus: '维修状态',
+        status: '启用状态',
+        createUserDesc: '操作人',
+        weight:'排序',
+        createTime: '创建时间',
+        updateTime: '更新时间',
+        remark: '备注',
+        maintenanceTime: '维保日期',
+        maintenanceContent: '维保内容',
+        maintenanceStatus: '维保后设备状态',
+        maintenanceUser: '维保人',
+        maintenanceCreateTime: '提交日期',
+      },
+			// 【设备位置管理】列表table字段名称
+			eqPosition: {
+				no: '位置编号',
+				name: '名称',
+				pointId: '点位ID',
+				status: '锁定状态'
+			},
+			// 【设备刀具管理-设备列表】列表table字段名称
+			eqList: {
+				name: '设备名称',
+				name2: '设备编号',
+				name3: '设备类似',
+				name4: '所属生产单元',
+				name5: '设备连接状态',
+				name6: '同步时间',
+				name7: '刀库刀具数量'
+			},
+			// 【设备刀具管理-刀具列表】列表table字段名称
+			toolList: {
+				specification: '刀具规格',
+				model: '型号',
+				brand: '品牌',
+				no: '刀库刀具编号',
+				stopBits: '停止位',
+				useStatus: '使用状态',
+				monitorWay: '监控方式',
+				rateUseLife: '额定使用寿命/次',
+				leftUseLife: '剩余使用次数/次',
+				warnLimit: '预警极限',
+				synTime: '同步时间'
+			},
+			// 【设备刀具管理-监控记录】列表table字段名称
+			jkRecord: {
+				rateUseLife: '额定使用寿命/次',
+				leftUseLife: '剩余使用寿命/次',
+				warnLimit: '预警极限',
+				synTime: '同步时间'
+			},
+			// 【程序中心-本地库】列表table字段名称
+			program: {
+				no: '程序编号',
+				name: '程序名称',
+				runTime: '运行时间',
+				size: '大小',
+				toolNums: '刀具数量',
+				version: '版本',
+				status: '状态',
+        		synTime: '同步时间'
+			},
+			// 【程序中心-新增-刀具】列表table字段名称
+			programTool: {
+				specification: '刀具规格',
+				toolName: '刀具名称',
+				useTime: '使用时间(分钟)',
+				count: '数量',
+				model: '型号',
+				brand: '品牌',
+				usageTime: '使用时间',
+				duration: '持续时间'
+			},
+			// 【程序管理】列表table字段名称
+			pgMgr: {
+				bomName: '产品',
+				version: '工艺版本号',
+				procedureNo: '工序号',
+				resourceName: '设备名称',
+				programName: '程序名称',
+				runTime: '运行时长',
+				createTime: '新增时间',
+				updateTime: '更新时间',
+				createUserDesc: '操作'
+			},
+			// 【程序执行任务】列表table字段名称
+			pgTask: {
+				programNo: '程序编号',
+				programName: '程序名称',
+				version: '版本号',
+				resourceName: '设备名称',
+				resourceCode: '设备编号',
+				runStatus: '状态',
+				actualRunTime: '额定运行时间',
+				startTime: '开始时间',
+				runTime: '运行时间',
+				endTime: '结束时间',
+				createUserDesc: '操作人'
+			}
+		},
+		// 表单数据名称
+		form: {
+			positionName: '位置名称',
+			relationStorage: '关联库位',
+			isLock: '是否锁定',
+			pointId: '点位ID',
+			selectLink: '选择线边库货架',
+			userTime: '额定使用寿命',
+			warninhTime: '报警寿命',
+			userNums: '额定使用次数',
+			warninhNums: '报警次数',
+			prority: '优先级',
+			workTime: '加工时间',
+			pg: '程序',
+			pgNo: '程序编号',
+			pgName: '程序名称',
+			pgVision: '版本号',
+			pgEq: '适合设备',
+			pgUpload: '上传程序',
+			pgTime: '运行时间',
+			pgSize: '程序大小',
+			pgContent: '程序内容',
+			pgTool: '刀具',
+			workbench_num: '工作台数量',
+			hand_num: '手臂数量',
+			cache_storge_num: '缓存库数量',
+			max_speed: '最大移动速度',
+			tray_num: '可放子盘数量',
+			tuoban: '关联托板分类',
+			arm: '手抓',
+			armName: '手抓名称',
+      target_resource: '目标设备',
+			rouJiagong: '产线类型'
+		},
+		// 表单验证规则提示信息
+		rules: {
+		},
+		// 提示或者显示信息
+		tips:{
+			tongbTips: '同步成功!',
+			zhixingTips: '执行程序成功!',
+			areaTips: '删除区域管理数据后,会将区域管理数据全部删除,确认删除?',
+			fileTips: '只能上传TEXT文件!',
+			deletePg: '是否【从设备删除】数据,确认删除?',
+			zxTips: '是否【执行程序】数据,确认执行?',
+			taskTips: '删除程序执行任务数据后,会将程序执行任务数据全部删除,确认删除?',
+			resourTips: '删除生产资源数据后,会将生产资源数据全部删除,确认删除?',
+			hardware: '该硬件不需要配置!'
+		}
+	}
+}

+ 386 - 349
imcs-ui/src/views/zuihou/repairManger/maintenanceLog/Index.vue

@@ -1,349 +1,386 @@
-<template>
-  <div class="app-container">
-    <!-- 功能按钮 -->
-    <el-row class="filter-container">
-      <el-col>
-        <!--添加按钮,调用add方法-->
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          size="medium"
-          v-has-permission="['maintenanceLog:add']"
-          @click="add"
-        >
-          {{ $t("common.add") }}
-        </el-button>
-        <!--修改按钮,调用edit-->
-        <el-button
-          type="success"
-          icon="el-icon-edit"
-          size="medium"
-          v-has-permission="['maintenanceLog:update']"
-          @click="editOne"
-        >
-          {{ $t("common.edit") }}
-        </el-button>
-        <el-button
-          type="danger"
-          icon="el-icon-delete"
-          size="medium"
-          v-has-permission="['maintenanceLog:delete']"
-          @click="batchDelete"
-        >
-          {{ $t("table.delete") }}
-        </el-button>
-      </el-col>
-    </el-row>
-
-    <!-- 列表数据 -->
-    <el-table
-      :key="tableKey"
-      ref="table"
-      v-loading="loading"
-      :data="tableData.records"
-      border
-      fit
-      row-key="id"
-      style="width: 100%;"
-      @selection-change="onSelectChange"
-      @cell-click="cellClick"
-    >
-      <el-table-column
-        :label="$t(&quot;common.serialNo&quot;)"
-        width="55px"
-        align="center"
-      >
-        <template slot-scope="scope">
-          <div>
-            {{ scope.$index+(queryParams.current - 1) * queryParams.size + 1 }}
-          </div>
-        </template>
-      </el-table-column>
-      <el-table-column
-        align="center"
-        type="selection"
-        width="50"
-        :reserve-selection="true"
-      />
-      <!--维保日期-->
-      <el-table-column
-        prop="maintenanceTime"
-        :label="$t(&quot;resource.table.repair.maintenanceTime&quot;)"
-        :show-overflow-tooltip="true"
-      />
-      <!--维保内容-->
-      <el-table-column
-        prop="remark"
-        :label="$t(&quot;resource.table.repair.maintenanceContent&quot;)"
-        :show-overflow-tooltip="true"
-      />
-
-      <!--维保后设备状态-->
-      <el-table-column
-        prop="status"
-        :label="$t(&quot;resource.table.repair.maintenanceStatus&quot;)"
-        align="center"
-        width="90px"
-      >
-        <template slot-scope="{ row }">
-          <el-tag :type="row.status=='1' ? 'success' : 'danger'">
-            {{ row.status=='1' ? '正常' : '暂停使用' }}
-          </el-tag>
-        </template>
-      </el-table-column>
-
-      <!--维保人-->
-      <el-table-column
-        prop="maintenanceName"
-        :label="$t(&quot;resource.table.repair.maintenanceUser&quot;)"
-        :show-overflow-tooltip="true"
-        width="120"
-      />
-
-      <!--提交日期-->
-      <el-table-column
-        prop="createTime"
-        :label="$t(&quot;resource.table.repair.maintenanceCreateTime&quot;)"
-        width="180px"
-      />
-    </el-table>
-    <pagination
-      v-show="tableData.total > 0"
-      :limit.sync="queryParams.size"
-      :page.sync="queryParams.current"
-      :total="Number(tableData.total)"
-      @pagination="fetch"
-    />
-    <maintenance-edit
-      ref="edit"
-      :dialog-visible="dialog.isVisible"
-      :title="dialog.title"
-      @close="editClose"
-      @success="editSuccess"
-    />
-  </div>
-</template>
-
-<script>
-  // 【分页】组件
-  import Pagination from "@/components/Pagination"
-  // 【新增/修改】组件
-  import maintenanceEdit from "./components/Edit"
-  // 【维保详情管理】-API
-  import repairDetailApi from "@/api/resourceProductMgr/repairDetail"
-
-  // 【弹出框】elementui组件
-  import elDragDialog from '@/directive/el-drag-dialog'
-  // 共通函数
-  import {initQueryParams} from '@/utils/commons'
-
-  export default {
-    name: "ManintenanceLog",
-    directives: {elDragDialog},
-    components: {Pagination,maintenanceEdit},
-    props: {
-      maintenanceId: {
-        type:String,
-        default:''
-      }
-    },
-    data() {
-      return {
-        audioStatus: [],
-        equipmentVisible: false, // 设备维保记录管理
-        rowData: {}, // row数据
-        dialog: {
-          isVisible: false,
-          title: ""
-        },
-        tenantEvent:{
-          isVisible: false,
-          title: ""
-        },
-        preview: {
-          isVisible: false,
-          context: ''
-        },
-        tenantViewVisible: false,
-        tableKey: 0,
-        queryParams: initQueryParams({}),
-        selection: [],
-        loading: false,
-        tableData: {
-          total: 0
-        }
-      }
-    },
-    computed: {
-      currentUser() {
-        return this.$store.state.account.user
-      }
-    },
-    // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-    created() {
-      // 调用常量-设备维保后状态
-      this.maintenanceStatus = this.$constWKS.MAINTENANCESTATUSLIST
-      // 加载列表数据
-      this.fetch()
-    },
-    mounted() {
-
-    },
-    methods: {
-      editClose() {
-        this.dialog.isVisible = false
-        this.search()
-      },
-      editSuccess() {
-        this.search()
-      },
-      onSelectChange(selection) {
-        this.selection = selection
-      },
-      search() {
-        this.fetch({
-          ...this.queryParams
-        })
-      },
-      reset() {
-        this.queryParams = initQueryParams({})
-        this.$refs.table.clearSort()
-        this.$refs.table.clearFilter()
-        this.search()
-      },
-      add() {
-        this.$refs.edit.type = "add"
-        this.$refs.edit.setMaintenanceInfo(this.maintenanceId,"add")
-        this.dialog.title = this.$t("common.add")
-        this.dialog.isVisible = true
-      },
-      singleDelete(row) {
-        this.$refs.table.clearSelection()
-        this.$refs.table.toggleRowSelection(row, true)
-        this.batchDelete()
-      },
-      batchDelete() {
-        if (!this.selection.length) {
-          this.$message({
-            message: this.$t("tips.noDataSelected"),
-            type: "warning"
-          })
-          return
-        }
-
-        this.$confirm(this.$t("wms.tips.delete"), this.$t("common.tips"), {
-          distinguishCancelAndClose: true,
-          confirmButtonText: this.$t("common.confirm"),
-          cancelButtonText: this.$t("common.cancel"),
-          type: "warning"
-        }).then(() => {
-          const ids = []
-          this.selection.forEach(item => {
-            ids.push(item.id)
-          })
-          this.delete(ids)
-        }).catch(() => {
-        })
-      },
-      clearSelections() {
-        this.$refs.table.clearSelection()
-      },
-      delete(ids) {
-        repairDetailApi.remove({ids: ids}).then(response => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.$message({
-              message: this.$t("tips.deleteSuccess"),
-              type: "success"
-            })
-            this.search()
-            // 清理已经删除的数据
-            this.$refs.table.clearSelection()
-          }
-        })
-      },
-      view(row) {
-        this.$refs.view.setTenant(row)
-        this.tenantViewVisible = true
-      },
-      // 【修改】表头上Btn-事件
-      editOne() {
-        if (!this.selection.length) {
-          this.$message({
-            message: this.$t("tips.noDataSelected"),
-            type: "warning"
-          })
-          return
-        }
-        if (this.selection.length > 1) {
-          this.$message({
-            message: this.$t("tips.mustOne"),
-            type: "warning"
-          })
-          return
-        }
-        this.edit(this.selection[0]);
-      },
-      edit(row) {
-        this.$refs.edit.setMaintenanceInfo(row,"edit")
-        this.$refs.edit.type = "edit"
-        this.dialog.title = this.$t("common.edit")
-        this.dialog.isVisible = true
-      },
-      eventRow(row){
-        this.$refs.event.setTenant(row, this.dicts)
-        this.$refs.event.type = "event"
-        this.tenantEvent.title = "更新计划"
-        this.tenantEvent.isVisible = true
-      },
-      fetch(params = {}) {
-        // 刷新页面checkbox更新
-        this.tableKey = !this.tableKey
-        this.selection = []
-        this.loading = true
-        if (this.queryParams.timeRange) {
-          this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-          this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-        }
-
-        this.queryParams.current = params.current ? params.current : this.queryParams.current
-        this.queryParams.size = params.size ? params.size : this.queryParams.size
-        this.queryParams.model.repairId = this.maintenanceId
-        repairDetailApi.page(this.queryParams).then(response => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.tableData = res.data
-          }
-          // eslint-disable-next-line no-return-assign
-        }).finally(() => this.loading = false)
-
-      },
-      cellClick(row, column) {
-        if (column['columnKey'] === "operation") {
-          return
-        }
-        let flag = false
-        this.selection.forEach((item) => {
-          if (item.id === row.id) {
-            flag = true
-            this.$refs.table.toggleRowSelection(row)
-          }
-        })
-
-        if (!flag) {
-          this.$refs.table.toggleRowSelection(row, true)
-        }
-      }
-    }
-  }
-</script>
-<style lang="scss" scoped>
-  .rowBtn {
-    margin: 0 5px;
-    color: #1890ff;
-  }
-
-  .rowBtn:hover {
-    opacity: 0.7;
-  }
-</style>
+<template>
+  <div class="app-container">
+
+    <!-- 功能按钮 -->
+    <el-row class="filter-container">
+      <el-col>
+        <!--添加按钮,调用add方法-->
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="medium"
+          v-has-permission="['maintenanceLog:add']"
+          @click="add"
+        >
+          {{ $t("common.add") }}
+        </el-button>
+        <!--修改按钮,调用edit-->
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="medium"
+          v-has-permission="['maintenanceLog:update']"
+          @click="editOne"
+        >
+          {{ $t("common.edit") }}
+        </el-button>
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="medium"
+          v-has-permission="['maintenanceLog:delete']"
+          @click="batchDelete"
+        >
+          {{ $t("table.delete") }}
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <!-- 列表数据 -->
+    <el-table
+      :key="tableKey"
+      ref="table"
+      v-loading="loading"
+      :data="tableData.records"
+      border
+      fit
+      row-key="id"
+      style="width: 100%;"
+      @selection-change="onSelectChange"
+      @cell-click="cellClick"
+    >
+      <el-table-column
+        :label="$t(&quot;common.serialNo&quot;)"
+        width="55px"
+        align="center"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{ scope.$index+(queryParams.current - 1) * queryParams.size + 1 }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        type="selection"
+        width="50"
+        :reserve-selection="true"
+      />
+      <!--设备编号-->
+      <el-table-column
+        prop="code"
+        :label="$t(&quot;resource.table.repair.code&quot;)"
+        :show-overflow-tooltip="true"
+      />
+      <!--维保日期-->
+      <el-table-column
+        prop="resresourceName"
+        :label="$t(&quot;resource.table.repair.productionresourceName&quot;)"
+        :show-overflow-tooltip="true"
+      />
+      <!--产线名称 -->
+      <el-table-column
+        prop="productlineName"
+        :label="$t(&quot;resource.table.repair.lineDesc&quot;)"
+        :show-overflow-tooltip="true"
+      />
+      <!--维保日期-->
+      <el-table-column
+        prop="maintenanceTime"
+        :label="$t(&quot;resource.table.repair.maintenanceTime&quot;)"
+        :show-overflow-tooltip="true"
+      />
+      <!--维保内容-->
+      <el-table-column
+        prop="remark"
+        :label="$t(&quot;resource.table.repair.maintenanceContent&quot;)"
+        :show-overflow-tooltip="true"
+      />
+
+      <!--维保后设备状态-->
+      <el-table-column
+        prop="status"
+        :label="$t(&quot;resource.table.repair.maintenanceStatus&quot;)"
+        align="center"
+        width="90px"
+      >
+        <template slot-scope="{ row }">
+          <el-tag :type="row.status=='1' ? 'success' : 'danger'">
+            {{ row.status=='1' ? '正常' : '暂停使用' }}
+          </el-tag>
+        </template>
+      </el-table-column>
+
+      <!--维保人-->
+      <el-table-column
+        prop="maintenanceName"
+        :label="$t(&quot;resource.table.repair.maintenanceUser&quot;)"
+        :show-overflow-tooltip="true"
+        width="120"
+      />
+
+      <!--提交日期-->
+      <el-table-column
+        prop="createTime"
+        :label="$t(&quot;resource.table.repair.maintenanceCreateTime&quot;)"
+        width="180px"
+      />
+      <!--操作-->
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        width="260px"
+      >
+        <template slot-scope="{ row }">
+          <a
+            class="rowBtn"
+            @click="edit(row)"
+          >修改</a>
+          <a
+            class="rowBtn"
+            @click="singleDelete(row)"
+          >删除</a>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="tableData.total > 0"
+      :limit.sync="queryParams.size"
+      :page.sync="queryParams.current"
+      :total="Number(tableData.total)"
+      @pagination="fetch"
+    />
+    <maintenance-edit
+      ref="edit"
+      :dialog-visible="dialog.isVisible"
+      :title="dialog.title"
+      @close="editClose"
+      @success="editSuccess"
+    />
+  </div>
+</template>
+
+<script>
+  // 【分页】组件
+  import Pagination from "@/components/Pagination"
+  // 【新增/修改】组件
+  import maintenanceEdit from "./components/Edit"
+  // 【维保详情管理】-API
+  import repairDetailApi from "@/api/resourceProductMgr/repairDetail"
+  // 【弹出框】elementui组件
+  import elDragDialog from '@/directive/el-drag-dialog'
+  // 共通函数
+  import {initQueryParams} from '@/utils/commons'
+
+  export default {
+    name: "ManintenanceLog",
+    directives: {elDragDialog},
+    components: {Pagination,maintenanceEdit},
+    props: {
+      maintenanceId: {
+        type:String,
+        default:''
+      }
+    },
+    data() {
+      return {
+        audioStatus: [],
+        equipmentVisible: false, // 设备维保记录管理
+        rowData: {}, // row数据
+        dialog: {
+          isVisible: false,
+          title: ""
+        },
+        tenantEvent:{
+          isVisible: false,
+          title: ""
+        },
+        preview: {
+          isVisible: false,
+          context: ''
+        },
+        tenantViewVisible: false,
+        tableKey: 0,
+        queryParams: initQueryParams({}),
+        selection: [],
+        loading: false,
+        tableData: {
+          total: 0
+        }
+      }
+    },
+    computed: {
+      currentUser() {
+        return this.$store.state.account.user
+      }
+    },
+    // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+    created() {
+      // 调用常量-设备维保后状态
+      this.maintenanceStatus = this.$constWKS.MAINTENANCESTATUSLIST
+      // 加载列表数据
+      this.fetch()
+    },
+    mounted() {
+
+    },
+    methods: {
+      editClose() {
+        this.dialog.isVisible = false
+        this.search()
+      },
+      editSuccess() {
+        this.search()
+      },
+      onSelectChange(selection) {
+        this.selection = selection
+      },
+      search() {
+        this.fetch({
+          ...this.queryParams
+        })
+      },
+      reset() {
+        this.queryParams = initQueryParams({})
+        this.$refs.table.clearSort()
+        this.$refs.table.clearFilter()
+        this.search()
+      },
+      add() {
+        this.$refs.edit.type = "add"
+        this.$refs.edit.setMaintenanceInfo(this.maintenanceId,"add")
+        this.dialog.title = this.$t("common.add")
+        this.dialog.isVisible = true
+      },
+      singleDelete(row) {
+        this.$refs.table.clearSelection()
+        this.$refs.table.toggleRowSelection(row, true)
+        this.batchDelete()
+      },
+      batchDelete() {
+        if (!this.selection.length) {
+          this.$message({
+            message: this.$t("tips.noDataSelected"),
+            type: "warning"
+          })
+          return
+        }
+
+        this.$confirm(this.$t("wms.tips.delete"), this.$t("common.tips"), {
+          distinguishCancelAndClose: true,
+          confirmButtonText: this.$t("common.confirm"),
+          cancelButtonText: this.$t("common.cancel"),
+          type: "warning"
+        }).then(() => {
+          const ids = []
+          this.selection.forEach(item => {
+            ids.push(item.id)
+          })
+          this.delete(ids)
+        }).catch(() => {
+        })
+      },
+      clearSelections() {
+        this.$refs.table.clearSelection()
+      },
+      delete(ids) {
+        repairDetailApi.remove({ids: ids}).then(response => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.$message({
+              message: this.$t("tips.deleteSuccess"),
+              type: "success"
+            })
+            this.search()
+            // 清理已经删除的数据
+            this.$refs.table.clearSelection()
+          }
+        })
+      },
+      view(row) {
+        this.$refs.view.setTenant(row)
+        this.tenantViewVisible = true
+      },
+      // 【修改】表头上Btn-事件
+      editOne() {
+        if (!this.selection.length) {
+          this.$message({
+            message: this.$t("tips.noDataSelected"),
+            type: "warning"
+          })
+          return
+        }
+        if (this.selection.length > 1) {
+          this.$message({
+            message: this.$t("tips.mustOne"),
+            type: "warning"
+          })
+          return
+        }
+        this.edit(this.selection[0]);
+      },
+      edit(row) {
+        this.$refs.edit.setMaintenanceInfo(row,"edit")
+        this.$refs.edit.type = "edit"
+        this.dialog.title = this.$t("common.edit")
+        this.dialog.isVisible = true
+      },
+      eventRow(row){
+        this.$refs.event.setTenant(row, this.dicts)
+        this.$refs.event.type = "event"
+        this.tenantEvent.title = "更新计划"
+        this.tenantEvent.isVisible = true
+      },
+      fetch(params = {}) {
+        // 刷新页面checkbox更新
+        this.tableKey = !this.tableKey
+        this.selection = []
+        this.loading = true
+        if (this.queryParams.timeRange) {
+          this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+          this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
+        }
+
+        this.queryParams.current = params.current ? params.current : this.queryParams.current
+        this.queryParams.size = params.size ? params.size : this.queryParams.size
+        this.queryParams.model.repairId = this.maintenanceId
+        repairDetailApi.page(this.queryParams).then(response => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.tableData = res.data
+          }
+          // eslint-disable-next-line no-return-assign
+        }).finally(() => this.loading = false)
+
+      },
+      cellClick(row, column) {
+        if (column['columnKey'] === "operation") {
+          return
+        }
+        let flag = false
+        this.selection.forEach((item) => {
+          if (item.id === row.id) {
+            flag = true
+            this.$refs.table.toggleRowSelection(row)
+          }
+        })
+
+        if (!flag) {
+          this.$refs.table.toggleRowSelection(row, true)
+        }
+      },
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .rowBtn {
+    margin: 0 5px;
+    color: #1890ff;
+  }
+
+  .rowBtn:hover {
+    opacity: 0.7;
+  }
+</style>

+ 1 - 1
imcs-ui/src/views/zuihou/repairManger/maintenanceLog/components/Edit.vue

@@ -23,7 +23,7 @@
         <el-date-picker
           v-model="maintenance.maintenanceTime"
           type="datetime"
-          value-format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd HH:mm:ss"
           :placeholder="$t(&quot;common.pleaseSelect&quot;)"
           style="width: 50%;"
           :picker-options="pickerOptions"

+ 583 - 555
imcs-ui/src/views/zuihou/repairManger/repair/Index.vue

@@ -1,555 +1,583 @@
-<template>
-  <div class="app-container">
-    <!-- 搜索模块 -->
-    <div class="filter-container">
-      <!--设备名称-->
-      <span>
-        <span>{{ $t("resource.table.repair.productionresourceName") }}:</span>
-        <el-input
-          v-model="queryParams.model.productionresourceName"
-          :placeholder="$t(&quot;common.pleaseEnter&quot;)"
-          style="width: 150px;"
-          size="medium"
-        />
-      </span>
-      <!--设备编号-->
-      <span>
-        <span>{{ $t("resource.table.repair.code") }}:</span>
-        <el-input
-          v-model="queryParams.model.code"
-          :placeholder="$t(&quot;common.pleaseEnter&quot;)"
-          style="width: 150px;"
-          size="medium"
-        />
-      </span>
-      <span style="margin-left: 15px;">
-        <el-button
-          plain
-          type="primary"
-          icon="el-icon-search"
-          size="medium"
-          @click="search"
-        >
-          {{ $t("table.search") }}
-        </el-button>
-        <el-button
-          plain
-          type="warning"
-          icon="el-icon-refresh"
-          size="medium"
-          @click="reset"
-        >
-          {{ $t("table.reset") }}
-        </el-button>
-      </span>
-    </div>
-
-    <!-- 功能按钮 -->
-    <el-row class="filter-container">
-      <el-col>
-        <!--添加按钮,调用add方法-->
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          size="medium"
-          v-has-permission="['repair:add']"
-          @click="add"
-        >
-          {{ $t("common.add") }}
-        </el-button>
-        <!--修改按钮,调用edit-->
-        <el-button
-          type="success"
-          icon="el-icon-edit"
-          size="medium"
-          v-has-permission="['repair:update']"
-          @click="editOne"
-        >
-          {{ $t("common.edit") }}
-        </el-button>
-        <el-button
-          type="danger"
-          icon="el-icon-delete"
-          size="medium"
-          v-has-permission="['repair:delete']"
-          @click="batchDelete"
-        >
-          {{ $t("table.delete") }}
-        </el-button>
-      </el-col>
-    </el-row>
-
-    <!-- 列表数据 -->
-    <el-table
-      :key="tableKey"
-      ref="table"
-      v-loading="loading"
-      :data="tableData.records"
-      border
-      fit
-      row-key="id"
-      style="width: 100%;"
-      @selection-change="onSelectChange"
-      @cell-click="cellClick"
-    >
-      <el-table-column
-        :label="$t(&quot;common.serialNo&quot;)"
-        width="55px"
-        align="center"
-      >
-        <template slot-scope="scope">
-          <div>
-            {{ scope.$index+(queryParams.current - 1) * queryParams.size + 1 }}
-          </div>
-        </template>
-      </el-table-column>
-      <el-table-column
-        align="center"
-        type="selection"
-        width="50"
-        :reserve-selection="true"
-      />
-      <!--设备编号-->
-      <el-table-column
-        prop="code"
-        :label="$t(&quot;resource.table.repair.code&quot;)"
-        :show-overflow-tooltip="true"
-      />
-      <!--设备名称-->
-      <el-table-column
-        prop="productionresourceName"
-        :label="$t(&quot;resource.table.repair.productionresourceName&quot;)"
-        :show-overflow-tooltip="true"
-      />
-      <!--所在产线-->
-      <el-table-column
-        prop="lineDesc"
-        :label="$t(&quot;resource.table.repair.lineDesc&quot;)"
-        :show-overflow-tooltip="true"
-        width="120"
-      />
-      <!--维修倒计时进度-->
-      <el-table-column
-        prop="downTime"
-        :label="$t(&quot;resource.table.repair.countdown&quot;)"
-        :show-overflow-tooltip="true"
-        width="200"
-        align="center"
-      >
-        <template slot-scope="{ row }" id="">
-          <el-progress
-            :text-inside="true"
-            :stroke-width="24"
-            :percentage="row.process"
-            show-text="true"
-            :format="setItemText(row)"
-            :color="setItemColor(row)"
-          />
-        </template>
-      </el-table-column>
-      <!--维保结束时间-->
-      <el-table-column
-        prop="repairEndTime"
-        :label="$t(&quot;resource.table.repair.repairEndTime&quot;)"
-        :show-overflow-tooltip="true"
-        width="120"
-      />
-      <!--维修状态-->
-      <el-table-column
-        prop="repairStatus"
-        :label="$t(&quot;resource.table.repair.repairStatus&quot;)"
-        align="center"
-        width="90px"
-      >
-        <template slot-scope="{ row }">
-          <el-tag :type="row.repairStatus=='1' ? 'success' : 'danger'">
-            {{ row.repairStatus=='1' ? '正常' : '待维修' }}
-          </el-tag>
-        </template>
-      </el-table-column>
-      <!--状态-->
-      <el-table-column
-        prop="status"
-        :label="$t(&quot;resource.table.repair.status&quot;)"
-        align="center"
-        width="90px"
-      >
-        <template slot-scope="{ row }">
-          <el-tag :type="row.status=='1' ? 'success' : 'danger'">
-            {{ row.status=='1' ? '启用' : '冻结' }}
-          </el-tag>
-        </template>
-      </el-table-column>
-      <!--创建时间-->
-      <el-table-column
-        prop="createTime"
-        :label="$t(&quot;resource.table.repair.createTime&quot;)"
-        width="180px"
-      />
-      <!--最新修改时间-->
-      <el-table-column
-        prop="updateTime"
-        :label="$t(&quot;resource.table.repair.updateTime&quot;)"
-        width="180px"
-      />
-      <!--操作人-->
-      <el-table-column
-        prop="operationName"
-        :label="$t(&quot;resource.table.repair.createUserDesc&quot;)"
-        width="180px"
-      />
-      <!--操作-->
-      <el-table-column
-        :label="$t('table.operation')"
-        fixed="right"
-        align="center"
-        column-key="operation"
-        width="260px"
-      >
-        <template slot-scope="{ row }">
-          <a
-            class="rowBtn"
-            @click="equipment(row)"
-          >登记维保</a>
-          <a
-            class="rowBtn"
-            @click="eventRow(row)"
-          >更新计划</a>
-          <a
-            class="rowBtn"
-            @click="edit(row)"
-          >修改</a>
-          <a
-            class="rowBtn"
-            @click="singleDelete(row)"
-          >删除</a>
-        </template>
-      </el-table-column>
-    </el-table>
-    <pagination
-      v-show="tableData.total > 0"
-      :limit.sync="queryParams.size"
-      :page.sync="queryParams.current"
-      :total="Number(tableData.total)"
-      @pagination="fetch"
-    />
-    <tenant-edit
-      ref="edit"
-      :dialog-visible="dialog.isVisible"
-      :title="dialog.title"
-      @close="editClose"
-      @success="editSuccess"
-    />
-    <tenant-event
-      ref="event"
-      :dialog-visible="tenantEvent.isVisible"
-      :title="tenantEvent.title"
-      @close="eventClose"
-      @success="eventSuccess"
-    />
-    <tenant-view
-      ref="view"
-      :dialog-visible="tenantViewVisible"
-      @close="viewClose"
-    />
-    <el-dialog
-      v-el-drag-dialog
-      :close-on-click-modal="false"
-      :close-on-press-escape="true"
-      title="预览"
-      width="80%"
-      top="50px"
-      :visible.sync="preview.isVisible"
-    >
-      <el-scrollbar>
-        <div v-html="preview.context" />
-      </el-scrollbar>
-    </el-dialog>
-    <el-dialog
-      :visible.sync="equipmentVisible"
-      width="80%"
-      custom-class="dialogNoTop"
-      @close="editEquipmentClose"
-    >
-      <!--【	维保】 -->
-      <maintenanceLog
-        :row-data="rowData"
-        :maintenance-id="maintenanceId"
-        @close="editEquipmentClose"
-        @success="editEquipmentSuccess"
-      />
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-  // 【分页】组件
-  import Pagination from "@/components/Pagination"
-  // 【新增/修改】组件
-  import TenantEdit from "./components/Edit"
-  //【更新/计划】组件
-  import TenantEvent from "./components/Event"
-  // 【查看】组件
-  import TenantView from "./components/View"
-  // 【维保计划管理】-API
-  import repairApi from "@/api/resourceProductMgr/repair"
-  // 【工作位置管理】组件
-  import maintenanceLog from "@/views/zuihou/repairManger/maintenanceLog/Index"
-
-  // 【弹出框】elementui组件
-  import elDragDialog from '@/directive/el-drag-dialog'
-
-  import VueProgressBar from 'vue-progressbar'
-  // 共通函数
-  import {downloadFile, initEnums, initDicts, initQueryParams} from '@/utils/commons'
-
-  export default {
-    name: "Repair",
-    directives: {elDragDialog},
-    components: {Pagination, TenantEdit, TenantView,TenantEvent,maintenanceLog},
-    props: {},
-    data() {
-      return {
-        maintenanceId:'',
-        audioStatus: [],
-        equipmentVisible: false, // 设备维保记录管理
-        rowData: {}, // row数据
-        dialog: {
-          isVisible: false,
-          title: ""
-        },
-        tenantEvent:{
-          isVisible: false,
-          title: ""
-        },
-        preview: {
-          isVisible: false,
-          context: ''
-        },
-        tenantViewVisible: false,
-        tableKey: 0,
-        queryParams: initQueryParams({}),
-        selection: [],
-        loading: false,
-        tableData: {
-          total: 0
-        },
-        dicts: {
-          NATION: {}
-        },
-        enums: {
-          TenantTypeEnum: {},
-          TenantStatusEnum: {}
-        }
-      }
-    },
-    computed: {
-      currentUser() {
-        return this.$store.state.account.user
-      },
-      nationList() {
-        return convertEnum(this.dicts.NATION)
-      }
-    },
-    // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-    created() {
-      // 调用常量-审核状态
-      this.audioStatus = this.$constWKS.SHOWHIDE
-      // 加载【字典】
-      initDicts(['NATION'], this.dicts);
-      // 加载列表数据
-      this.fetch()
-    },
-    mounted() {
-
-    },
-    methods: {
-      //【设备维保记录】按钮-事件
-      equipment(row){
-        this.maintenanceId = row.id
-        this.equipmentVisible = true
-      },
-      editEquipmentClose(){
-        this.equipmentVisible = false
-        this.search()
-      },
-      editEquipmentSuccess(){
-        this.search()
-      },
-      setItemText(row) {
-        return () => {
-          return row.downTime
-        }
-      },
-      setItemColor(row) {
-        return () => {
-            if(row.expireFlag == 1){
-              return '#FF0000'
-            }
-        }
-      },
-      viewClose() {
-        this.tenantViewVisible = false
-      },
-      editClose() {
-        this.dialog.isVisible = false
-        this.fetch()
-      },
-      eventClose() {
-        this.tenantEvent.isVisible = false
-        this.fetch()
-      },
-      editSuccess() {
-        this.search()
-      },
-      eventSuccess(){
-        this.search()
-      },
-      onSelectChange(selection) {
-        this.selection = selection
-      },
-      search() {
-        this.fetch({
-          ...this.queryParams
-        })
-      },
-      reset() {
-        this.queryParams = initQueryParams({})
-        this.$refs.table.clearSort()
-        this.$refs.table.clearFilter()
-        this.search()
-      },
-      add() {
-        this.$refs.edit.type = "add"
-        this.$refs.edit.setTenant(false, this.dicts)
-        this.dialog.title = this.$t("common.add")
-        this.dialog.isVisible = true
-      },
-      singleDelete(row) {
-        this.$refs.table.clearSelection()
-        this.$refs.table.toggleRowSelection(row, true)
-        this.batchDelete()
-      },
-      batchDelete() {
-        if (!this.selection.length) {
-          this.$message({
-            message: this.$t("tips.noDataSelected"),
-            type: "warning"
-          })
-          return
-        }
-
-        this.$confirm(this.$t("wms.tips.delete"), this.$t("common.tips"), {
-          distinguishCancelAndClose: true,
-          confirmButtonText: this.$t("common.confirm"),
-          cancelButtonText: this.$t("common.cancel"),
-          type: "warning"
-        }).then(() => {
-          const ids = []
-          this.selection.forEach(item => {
-            ids.push(item.id)
-          })
-          this.delete(ids)
-        }).catch(() => {
-        })
-      },
-      clearSelections() {
-        this.$refs.table.clearSelection()
-      },
-      delete(ids) {
-        repairApi.remove({ids: ids}).then(response => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.$message({
-              message: this.$t("tips.deleteSuccess"),
-              type: "success"
-            })
-            this.search()
-            // 清理已经删除的数据
-            this.$refs.table.clearSelection()
-          }
-        })
-      },
-      view(row) {
-        this.$refs.view.setTenant(row)
-        this.tenantViewVisible = true
-      },
-      // 【修改】表头上Btn-事件
-      editOne() {
-        if (!this.selection.length) {
-          this.$message({
-            message: this.$t("tips.noDataSelected"),
-            type: "warning"
-          })
-          return
-        }
-        if (this.selection.length > 1) {
-          this.$message({
-            message: this.$t("tips.mustOne"),
-            type: "warning"
-          })
-          return
-        }
-        this.edit(this.selection[0]);
-      },
-      edit(row) {
-        this.$refs.edit.setTenant(row, this.dicts)
-        this.$refs.edit.type = "edit"
-        this.dialog.title = this.$t("common.edit")
-        this.dialog.isVisible = true
-      },
-      eventRow(row){
-        this.$refs.event.setTenant(row, this.dicts)
-        this.$refs.event.type = "event"
-        this.tenantEvent.title = "更新计划"
-        this.tenantEvent.isVisible = true
-      },
-      fetch(params = {}) {
-        this.tableKey = !this.tableKey
-        this.selection = []
-        this.loading = true
-        if (this.queryParams.timeRange) {
-          this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-          this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-        }
-
-        this.queryParams.current = params.current ? params.current : this.queryParams.current
-        this.queryParams.size = params.size ? params.size : this.queryParams.size
-        repairApi.page(this.queryParams).then(response => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.tableData = res.data
-          }
-          // eslint-disable-next-line no-return-assign
-        }).finally(() => this.loading = false)
-
-      },
-      cellClick(row, column) {
-        if (column['columnKey'] === "operation") {
-          return
-        }
-        let flag = false
-        this.selection.forEach((item) => {
-          if (item.id === row.id) {
-            flag = true
-            this.$refs.table.toggleRowSelection(row)
-          }
-        })
-
-        if (!flag) {
-          this.$refs.table.toggleRowSelection(row, true)
-        }
-      }
-    }
-  }
-</script>
-<style lang="scss" scoped>
-  .rowBtn {
-    margin: 0 5px;
-    color: #1890ff;
-  }
-
-  .rowBtn:hover {
-    opacity: 0.7;
-  }
-</style>
+<template>
+  <div class="app-container">
+    <!-- 搜索模块 -->
+    <div class="filter-container">
+      <!--设备名称-->
+      <span>
+        <span>{{ $t("resource.table.repair.productionresourceName") }}:</span>
+        <el-input
+          v-model="queryParams.model.productionresourceName"
+          :placeholder="$t(&quot;common.pleaseEnter&quot;)"
+          style="width: 150px;"
+          size="medium"
+        />
+      </span>
+      <!--设备编号-->
+      <span>
+        <span>{{ $t("resource.table.repair.code") }}:</span>
+        <el-input
+          v-model="queryParams.model.code"
+          :placeholder="$t(&quot;common.pleaseEnter&quot;)"
+          style="width: 150px;"
+          size="medium"
+        />
+      </span>
+      <span style="margin-left: 15px;">
+          <span>{{$t("resource.table.repair.lineDesc")}}:</span>
+          <el-select v-model="productionLineId" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
+            <el-option
+              v-for="item in productionLines"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </span>
+      <span style="margin-left: 15px;">
+        <el-button
+          plain
+          type="primary"
+          icon="el-icon-search"
+          size="medium"
+          @click="search"
+        >
+          {{ $t("table.search") }}
+        </el-button>
+        <el-button
+          plain
+          type="warning"
+          icon="el-icon-refresh"
+          size="medium"
+          @click="reset"
+        >
+          {{ $t("table.reset") }}
+        </el-button>
+      </span>
+    </div>
+
+    <!-- 功能按钮 -->
+    <el-row class="filter-container">
+      <el-col>
+        <!--添加按钮,调用add方法-->
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="medium"
+          v-has-permission="['repair:add']"
+          @click="add"
+        >
+          {{ $t("common.add") }}
+        </el-button>
+        <!--修改按钮,调用edit-->
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="medium"
+          v-has-permission="['repair:update']"
+          @click="editOne"
+        >
+          {{ $t("common.edit") }}
+        </el-button>
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="medium"
+          v-has-permission="['repair:delete']"
+          @click="batchDelete"
+        >
+          {{ $t("table.delete") }}
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <!-- 列表数据 -->
+    <el-table
+      :key="tableKey"
+      ref="table"
+      v-loading="loading"
+      :data="tableData.records"
+      border
+      fit
+      row-key="id"
+      style="width: 100%;"
+      @selection-change="onSelectChange"
+      @cell-click="cellClick"
+    >
+      <el-table-column
+        :label="$t(&quot;common.serialNo&quot;)"
+        width="55px"
+        align="center"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{ scope.$index+(queryParams.current - 1) * queryParams.size + 1 }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        type="selection"
+        width="50"
+        :reserve-selection="true"
+      />
+      <!--设备编号-->
+      <el-table-column
+        prop="code"
+        :label="$t(&quot;resource.table.repair.code&quot;)"
+        :show-overflow-tooltip="true"
+      />
+      <!--设备名称-->
+      <el-table-column
+        prop="productionresourceName"
+        :label="$t(&quot;resource.table.repair.productionresourceName&quot;)"
+        :show-overflow-tooltip="true"
+      />
+      <!--所在产线-->
+      <el-table-column
+        prop="lineDesc"
+        :label="$t(&quot;resource.table.repair.lineDesc&quot;)"
+        :show-overflow-tooltip="true"
+        width="120"
+      />
+      <!--维修倒计时进度-->
+      <el-table-column
+        prop="downTime"
+        :label="$t(&quot;resource.table.repair.countdown&quot;)"
+        :show-overflow-tooltip="true"
+        width="200"
+        align="center"
+      >
+        <template slot-scope="{ row }" id="">
+          <el-progress
+            :text-inside="true"
+            :stroke-width="24"
+            :percentage="row.process"
+            show-text="true"
+            :format="setItemText(row)"
+            :color="setItemColor(row)"
+          />
+        </template>
+      </el-table-column>
+      <!--维保结束时间-->
+      <el-table-column
+        prop="repairEndTime"
+        :label="$t(&quot;resource.table.repair.repairEndTime&quot;)"
+        :show-overflow-tooltip="true"
+        width="120"
+      />
+      <!--维修状态-->
+      <el-table-column
+        prop="repairStatus"
+        :label="$t(&quot;resource.table.repair.repairStatus&quot;)"
+        align="center"
+        width="90px"
+      >
+        <template slot-scope="{ row }">
+          <el-tag :type="row.repairStatus=='1' ? 'success' : 'danger'">
+            {{ row.repairStatus=='1' ? '正常' : '待维修' }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <!--状态-->
+      <el-table-column
+        prop="status"
+        :label="$t(&quot;resource.table.repair.status&quot;)"
+        align="center"
+        width="90px"
+      >
+        <template slot-scope="{ row }">
+          <el-tag :type="row.status=='1' ? 'success' : 'danger'">
+            {{ row.status=='1' ? '启用' : '冻结' }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <!--创建时间-->
+      <el-table-column
+        prop="createTime"
+        :label="$t(&quot;resource.table.repair.createTime&quot;)"
+        width="180px"
+      />
+      <!--最新修改时间-->
+      <el-table-column
+        prop="updateTime"
+        :label="$t(&quot;resource.table.repair.updateTime&quot;)"
+        width="180px"
+      />
+      <!--操作人-->
+      <el-table-column
+        prop="operationName"
+        :label="$t(&quot;resource.table.repair.createUserDesc&quot;)"
+        width="180px"
+      />
+      <!--操作-->
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        width="260px"
+      >
+        <template slot-scope="{ row }">
+          <a
+            class="rowBtn"
+            @click="equipment(row)"
+          >登记维保</a>
+          <a
+            class="rowBtn"
+            @click="eventRow(row)"
+          >更新计划</a>
+          <a
+            class="rowBtn"
+            @click="edit(row)"
+          >修改</a>
+          <a
+            class="rowBtn"
+            @click="singleDelete(row)"
+          >删除</a>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="tableData.total > 0"
+      :limit.sync="queryParams.size"
+      :page.sync="queryParams.current"
+      :total="Number(tableData.total)"
+      @pagination="fetch"
+    />
+    <tenant-edit
+      ref="edit"
+      :dialog-visible="dialog.isVisible"
+      :title="dialog.title"
+      @close="editClose"
+      @success="editSuccess"
+    />
+    <tenant-event
+      ref="event"
+      :dialog-visible="tenantEvent.isVisible"
+      :title="tenantEvent.title"
+      @close="eventClose"
+      @success="eventSuccess"
+    />
+    <tenant-view
+      ref="view"
+      :dialog-visible="tenantViewVisible"
+      @close="viewClose"
+    />
+    <el-dialog
+      v-el-drag-dialog
+      :close-on-click-modal="false"
+      :close-on-press-escape="true"
+      title="预览"
+      width="80%"
+      top="50px"
+      :visible.sync="preview.isVisible"
+    >
+      <el-scrollbar>
+        <div v-html="preview.context" />
+      </el-scrollbar>
+    </el-dialog>
+    <el-dialog
+      :visible.sync="equipmentVisible"
+      width="80%"
+      custom-class="dialogNoTop"
+      @close="editEquipmentClose"
+    >
+      <!--【	维保】 -->
+      <maintenanceLog
+        :row-data="rowData"
+        :maintenance-id="maintenanceId"
+        @close="editEquipmentClose"
+        @success="editEquipmentSuccess"
+      />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  // 【分页】组件
+  import Pagination from "@/components/Pagination"
+  // 【新增/修改】组件
+  import TenantEdit from "./components/Edit"
+  //【更新/计划】组件
+  import TenantEvent from "./components/Event"
+  // 【查看】组件
+  import TenantView from "./components/View"
+  // 【维保计划管理】-API
+  import repairApi from "@/api/resourceProductMgr/repair"
+  // 【工作位置管理】组件
+  import maintenanceLog from "@/views/zuihou/repairManger/maintenanceLog/Index"
+  import productionLineMgrApi from "@/api/resourceProductMgr/areaMgr"
+  // 【弹出框】elementui组件
+  import elDragDialog from '@/directive/el-drag-dialog'
+
+  // 共通函数
+  import {initDicts, initQueryParams} from '@/utils/commons'
+
+  export default {
+    name: "Repair",
+    directives: {elDragDialog},
+    components: {Pagination, TenantEdit, TenantView,TenantEvent,maintenanceLog},
+    props: {},
+    data() {
+      return {
+        maintenanceId:'',
+        productionLines: [],
+        productionLineId:"",
+        audioStatus: [],
+        equipmentVisible: false, // 设备维保记录管理
+        rowData: {}, // row数据
+        dialog: {
+          isVisible: false,
+          title: ""
+        },
+        tenantEvent:{
+          isVisible: false,
+          title: ""
+        },
+        preview: {
+          isVisible: false,
+          context: ''
+        },
+        tenantViewVisible: false,
+        tableKey: 0,
+        queryParams: initQueryParams({}),
+        selection: [],
+        loading: false,
+        tableData: {
+          total: 0
+        },
+        dicts: {
+          NATION: {}
+        },
+        enums: {
+          TenantTypeEnum: {},
+          TenantStatusEnum: {}
+        }
+      }
+    },
+    computed: {
+      currentUser() {
+        return this.$store.state.account.user
+      },
+      nationList() {
+        return convertEnum(this.dicts.NATION)
+      }
+    },
+    // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+    created() {
+      // 调用常量-审核状态
+      this.audioStatus = this.$constWKS.SHOWHIDE
+      // 加载【字典】
+      initDicts(['NATION'], this.dicts);
+      // 加载产线下拉框数据
+      this.queryProductionLines()
+      // 加载列表数据
+      this.fetch()
+    },
+    mounted() {
+
+    },
+    methods: {
+      //【设备维保记录】按钮-事件
+      equipment(row){
+        this.maintenanceId = row.id
+        this.equipmentVisible = true
+      },
+      editEquipmentClose(){
+        this.equipmentVisible = false
+        this.search()
+      },
+      editEquipmentSuccess(){
+        this.search()
+      },
+      setItemText(row) {
+        return () => {
+          return row.downTime
+        }
+      },
+      setItemColor(row) {
+        return () => {
+            if(row.expireFlag == 1){
+              return '#FF0000'
+            }
+        }
+      },
+      viewClose() {
+        this.tenantViewVisible = false
+      },
+      editClose() {
+        this.dialog.isVisible = false
+        this.fetch()
+      },
+      eventClose() {
+        this.tenantEvent.isVisible = false
+        this.fetch()
+      },
+      editSuccess() {
+        this.search()
+      },
+      eventSuccess(){
+        this.search()
+      },
+      onSelectChange(selection) {
+        this.selection = selection
+      },
+      search() {
+        this.fetch({
+          ...this.queryParams
+        })
+      },
+      reset() {
+        this.queryParams = initQueryParams({})
+        this.$refs.table.clearSort()
+        this.$refs.table.clearFilter()
+        this.search()
+      },
+      add() {
+        this.$refs.edit.type = "add"
+        this.$refs.edit.setTenant(false, this.dicts)
+        this.dialog.title = this.$t("common.add")
+        this.dialog.isVisible = true
+      },
+      singleDelete(row) {
+        this.$refs.table.clearSelection()
+        this.$refs.table.toggleRowSelection(row, true)
+        this.batchDelete()
+      },
+      batchDelete() {
+        if (!this.selection.length) {
+          this.$message({
+            message: this.$t("tips.noDataSelected"),
+            type: "warning"
+          })
+          return
+        }
+
+        this.$confirm(this.$t("wms.tips.delete"), this.$t("common.tips"), {
+          distinguishCancelAndClose: true,
+          confirmButtonText: this.$t("common.confirm"),
+          cancelButtonText: this.$t("common.cancel"),
+          type: "warning"
+        }).then(() => {
+          const ids = []
+          this.selection.forEach(item => {
+            ids.push(item.id)
+          })
+          this.delete(ids)
+        }).catch(() => {
+        })
+      },
+      clearSelections() {
+        this.$refs.table.clearSelection()
+      },
+      delete(ids) {
+        repairApi.remove({ids: ids}).then(response => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.$message({
+              message: this.$t("tips.deleteSuccess"),
+              type: "success"
+            })
+            this.search()
+            // 清理已经删除的数据
+            this.$refs.table.clearSelection()
+          }
+        })
+      },
+      view(row) {
+        this.$refs.view.setTenant(row)
+        this.tenantViewVisible = true
+      },
+      // 【修改】表头上Btn-事件
+      editOne() {
+        if (!this.selection.length) {
+          this.$message({
+            message: this.$t("tips.noDataSelected"),
+            type: "warning"
+          })
+          return
+        }
+        if (this.selection.length > 1) {
+          this.$message({
+            message: this.$t("tips.mustOne"),
+            type: "warning"
+          })
+          return
+        }
+        this.edit(this.selection[0]);
+      },
+      edit(row) {
+        this.$refs.edit.setTenant(row, this.dicts)
+        this.$refs.edit.type = "edit"
+        this.dialog.title = this.$t("common.edit")
+        this.dialog.isVisible = true
+      },
+      eventRow(row){
+        this.$refs.event.setTenant(row, this.dicts)
+        this.$refs.event.type = "event"
+        this.tenantEvent.title = "更新计划"
+        this.tenantEvent.isVisible = true
+      },
+      fetch(params = {}) {
+        this.tableKey = !this.tableKey
+        this.selection = []
+        this.loading = true
+        if (this.queryParams.timeRange) {
+          this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+          this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
+        }
+
+        this.queryParams.current = params.current ? params.current : this.queryParams.current
+        this.queryParams.size = params.size ? params.size : this.queryParams.size
+        this.queryParams.model.productionLineId= this.productionLineId
+        repairApi.page(this.queryParams).then(response => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.tableData = res.data
+          }
+          // eslint-disable-next-line no-return-assign
+        }).finally(() => this.loading = false)
+
+      },
+      cellClick(row, column) {
+        if (column['columnKey'] === "operation") {
+          return
+        }
+        let flag = false
+        this.selection.forEach((item) => {
+          if (item.id === row.id) {
+            flag = true
+            this.$refs.table.toggleRowSelection(row)
+          }
+        })
+
+        if (!flag) {
+          this.$refs.table.toggleRowSelection(row, true)
+        }
+      },
+      // 产线查找
+      queryProductionLines(){
+          this.productionLines = []
+          productionLineMgrApi.getList({}).then(response => {
+              const res = response.data
+              if (res.isSuccess) {
+                  this.productionLines = res.data
+                  if(this.productionLines.length > 0){
+                      this.productionLineId = this.productionLines[0].id
+                  }
+              }
+          })
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .rowBtn {
+    margin: 0 5px;
+    color: #1890ff;
+  }
+
+  .rowBtn:hover {
+    opacity: 0.7;
+  }
+</style>