projects/mesxc-lb #289
@@ -91,13 +91,13 @@
 | 
			
		||||
						pageSize: 10,
 | 
			
		||||
					},
 | 
			
		||||
					tableBtn: [
 | 
			
		||||
						this.$auth.hasPermi('base:core-equipment-attr:update')
 | 
			
		||||
						this.$auth.hasPermi('base:core-equipment-attr:update') // ('se:firefight-attr:update') // TODO 此处需用firefight-attr权限还是core-equipment-attr 权限?
 | 
			
		||||
							? {
 | 
			
		||||
									type: 'edit',
 | 
			
		||||
									btnName: '修改',
 | 
			
		||||
							  }
 | 
			
		||||
							: undefined,
 | 
			
		||||
						this.$auth.hasPermi('base:core-equipment-attr:delete')
 | 
			
		||||
						this.$auth.hasPermi('base:core-equipment-attr:delete') // ('se:firefight-attr:delete')
 | 
			
		||||
							? {
 | 
			
		||||
									type: 'delete',
 | 
			
		||||
									btnName: '删除',
 | 
			
		||||
@@ -142,19 +142,19 @@ export default {
 | 
			
		||||
		return {
 | 
			
		||||
			searchBarKeys: ['name', 'code'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi(`base:core-equipment:update`)
 | 
			
		||||
				this.$auth.hasPermi(`se:firefight:update`)
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'detail',
 | 
			
		||||
							btnName: '详情',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment:update')
 | 
			
		||||
				this.$auth.hasPermi('se:firefight:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '修改',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment:delete')
 | 
			
		||||
				this.$auth.hasPermi('se:firefight:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
@@ -208,18 +208,14 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-equipment:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					type: this.$auth.hasPermi('se:firefight:export') ? 'button' : '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-equipment:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					type: this.$auth.hasPermi('se:firefight:create') ? 'button' : '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					plain: true,
 | 
			
		||||
 
 | 
			
		||||
@@ -142,19 +142,19 @@ export default {
 | 
			
		||||
		return {
 | 
			
		||||
			searchBarKeys: ['name', 'code'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi(`base:core-equipment:update`)
 | 
			
		||||
				this.$auth.hasPermi(`se:manage:update`)
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'detail',
 | 
			
		||||
							btnName: '详情',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment:update')
 | 
			
		||||
				this.$auth.hasPermi('se:manage:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '修改',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment:delete')
 | 
			
		||||
				this.$auth.hasPermi('se:manage:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
@@ -207,7 +207,7 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-equipment:export')
 | 
			
		||||
					type: this.$auth.hasPermi('se:manage:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
@@ -216,7 +216,7 @@ export default {
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-equipment:create')
 | 
			
		||||
					type: this.$auth.hasPermi('se:manage:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
 
 | 
			
		||||
@@ -91,13 +91,13 @@
 | 
			
		||||
						pageSize: 10,
 | 
			
		||||
					},
 | 
			
		||||
					tableBtn: [
 | 
			
		||||
						this.$auth.hasPermi('base:core-equipment-attr:update')
 | 
			
		||||
						this.$auth.hasPermi('se:safety-attr:update')
 | 
			
		||||
							? {
 | 
			
		||||
									type: 'edit',
 | 
			
		||||
									btnName: '修改',
 | 
			
		||||
							  }
 | 
			
		||||
							: undefined,
 | 
			
		||||
						this.$auth.hasPermi('base:core-equipment-attr:delete')
 | 
			
		||||
						this.$auth.hasPermi('se:safety-attr:delete')
 | 
			
		||||
							? {
 | 
			
		||||
									type: 'delete',
 | 
			
		||||
									btnName: '删除',
 | 
			
		||||
@@ -130,7 +130,7 @@ import AssetsUpload from '../components/AssetsUpload.vue';
 | 
			
		||||
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'SpecialEquipmentForSafety',
 | 
			
		||||
	name: 'specialEquipmentForSafety',
 | 
			
		||||
	components: {
 | 
			
		||||
		Editor,
 | 
			
		||||
		EquipmentDrawer,
 | 
			
		||||
@@ -141,19 +141,19 @@ export default {
 | 
			
		||||
		return {
 | 
			
		||||
			searchBarKeys: ['name', 'code'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi(`base:core-equipment:update`)
 | 
			
		||||
				this.$auth.hasPermi(`se:safety:update`)
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'detail',
 | 
			
		||||
							btnName: '详情',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment:update')
 | 
			
		||||
				this.$auth.hasPermi('se:safety:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '修改',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment:delete')
 | 
			
		||||
				this.$auth.hasPermi('se:safety:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
@@ -206,7 +206,7 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-equipment:export')
 | 
			
		||||
					type: this.$auth.hasPermi('se:safety:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
@@ -215,7 +215,7 @@ export default {
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-equipment:create')
 | 
			
		||||
					type: this.$auth.hasPermi('se:safety:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,10 @@
 | 
			
		||||
			@close="cancel"
 | 
			
		||||
			@cancel="cancel"
 | 
			
		||||
			@confirm="handleConfirm">
 | 
			
		||||
			<add ref="add" v-if="open" @refreshDataList="successSubmit" />
 | 
			
		||||
			<add
 | 
			
		||||
				ref="add"
 | 
			
		||||
				v-if="open"
 | 
			
		||||
				@refreshDataList="successSubmit" />
 | 
			
		||||
		</base-dialog>
 | 
			
		||||
		<!-- 添加巡检,查看详情 -->
 | 
			
		||||
		<addOrUpdata
 | 
			
		||||
@@ -75,26 +78,20 @@ export default {
 | 
			
		||||
			addOrEditTitle: '',
 | 
			
		||||
			searchBarKeys: ['name'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi('equipment:check-setting:addInsp')
 | 
			
		||||
				this.$auth.hasPermi('se:check:add-item')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'add',
 | 
			
		||||
							btnName: '添加',
 | 
			
		||||
							showTip: '添加巡检',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('equipment:check-setting:update')
 | 
			
		||||
				this.$auth.hasPermi('se:check:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '修改',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				// this.$auth.hasPermi('equipment:check-setting:update')
 | 
			
		||||
				// 	? {
 | 
			
		||||
				// 			type: 'detail',
 | 
			
		||||
				// 			btnName: '查看详情',
 | 
			
		||||
				// 	  }
 | 
			
		||||
				// 	: undefined,
 | 
			
		||||
				this.$auth.hasPermi('equipment:check-setting:delete')
 | 
			
		||||
				this.$auth.hasPermi('se:check:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
@@ -170,16 +167,14 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:check-setting:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					type: this.$auth.hasPermi('se:check:create') ? 'button' : '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'success',
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: this.$auth.hasPermi('equipment:check-setting:export')
 | 
			
		||||
				// 	type: this.$auth.hasPermi('se:check:export')
 | 
			
		||||
				// 		? 'button'
 | 
			
		||||
				// 		: '',
 | 
			
		||||
				// 	btnName: '导出',
 | 
			
		||||
 
 | 
			
		||||
@@ -69,7 +69,7 @@ import AddCheckDet from './Content-add_detail.vue';
 | 
			
		||||
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'SpecialEquipmentCheckConfig',
 | 
			
		||||
	name: 'SpecialEquipmentCheckContent',
 | 
			
		||||
	components: {
 | 
			
		||||
		addOrUpdata,
 | 
			
		||||
		add,
 | 
			
		||||
@@ -92,7 +92,7 @@ export default {
 | 
			
		||||
					btnName: '确认',
 | 
			
		||||
					showTip: '确认',
 | 
			
		||||
				},
 | 
			
		||||
				this.$auth.hasPermi('equipment:check-setting:update')
 | 
			
		||||
				this.$auth.hasPermi('se:check-unconfirm:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '修改',
 | 
			
		||||
@@ -102,7 +102,7 @@ export default {
 | 
			
		||||
					type: 'detail',
 | 
			
		||||
					btnName: '巡检内容详情',
 | 
			
		||||
				},
 | 
			
		||||
				this.$auth.hasPermi('equipment:check-setting:delete')
 | 
			
		||||
				this.$auth.hasPermi('se:check-unconfirm:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
@@ -158,7 +158,7 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:check-setting:create')
 | 
			
		||||
					type: this.$auth.hasPermi('se:check-unconfirm:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
@@ -167,14 +167,18 @@ export default {
 | 
			
		||||
					color: 'success',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					type: this.$auth.hasPermi('se:check-unconfirm:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'warning',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					type: this.$auth.hasPermi('se:check-unconfirm:confirm-all')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '批量确认',
 | 
			
		||||
					name: 'batch-confirm',
 | 
			
		||||
					plain: true,
 | 
			
		||||
 
 | 
			
		||||
@@ -71,19 +71,19 @@ export default {
 | 
			
		||||
			addOrUpdateVisible: false,
 | 
			
		||||
			searchBarKeys: ['name', 'actualCheckTime'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi('equipment:check-record:detail')
 | 
			
		||||
				this.$auth.hasPermi('se:check-record:detail')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'detail',
 | 
			
		||||
							btnName: '详情',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				// this.$auth.hasPermi('equipment:check-record:update')
 | 
			
		||||
				// this.$auth.hasPermi('se:check-record:update')
 | 
			
		||||
				// 	? {
 | 
			
		||||
				// 			type: 'edit',
 | 
			
		||||
				// 			btnName: '修改',
 | 
			
		||||
				// 	  }
 | 
			
		||||
				// 	: undefined,
 | 
			
		||||
				// this.$auth.hasPermi('equipment:check-record:delete')
 | 
			
		||||
				// this.$auth.hasPermi('se:check-record:delete')
 | 
			
		||||
				// 	? {
 | 
			
		||||
				// 			type: 'delete',
 | 
			
		||||
				// 			btnName: '删除',
 | 
			
		||||
@@ -161,7 +161,7 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:check-record:export')
 | 
			
		||||
					type: this.$auth.hasPermi('se:check-record:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
@@ -170,7 +170,7 @@ export default {
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: this.$auth.hasPermi('equipment:check-record:create')
 | 
			
		||||
				// 	type: this.$auth.hasPermi('se:check-record:create')
 | 
			
		||||
				// 		? 'button'
 | 
			
		||||
				// 		: '',
 | 
			
		||||
				// 	btnName: '新增',
 | 
			
		||||
 
 | 
			
		||||
@@ -63,7 +63,7 @@ import MonitorDetail from './Monitor--detail.vue';
 | 
			
		||||
import { RemainBox, TableBtn } from '@/components/tableInnerComponents';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'SpecialEquipmentMaintainMonitor',
 | 
			
		||||
	name: 'SpecialEquipmentMonitoring',
 | 
			
		||||
	components: { MonitorDetail },
 | 
			
		||||
	mixins: [basicPageMixin, tableHeightMixin],
 | 
			
		||||
	data() {
 | 
			
		||||
@@ -135,62 +135,6 @@ export default {
 | 
			
		||||
					subcomponent: RemainBox,
 | 
			
		||||
					minWidth: 210,
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'createTime',
 | 
			
		||||
				// 	label: '添加时间',
 | 
			
		||||
				// 	fixed: true,
 | 
			
		||||
				// 	width: 180,
 | 
			
		||||
				// 	filter: parseTime(createTime),
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'equipmentCategory',
 | 
			
		||||
				// 	label: '设备大类',
 | 
			
		||||
				// 	minWidth: 100,
 | 
			
		||||
				// 	showOverflowtooltip: true,
 | 
			
		||||
				// 	filter: (val) =>
 | 
			
		||||
				// 		val != null ? ['-', '安全设备', '消防设备', '特种设备'][val] : '-',
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'equipmentName',
 | 
			
		||||
				// 	label: '设备名称',
 | 
			
		||||
				// 	minWidth: 100,
 | 
			
		||||
				// 	showOverflowtooltip: true,
 | 
			
		||||
				// },
 | 
			
		||||
				// { prop: 'maintenancePeriod', label: '保养频率' },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'maintainType',
 | 
			
		||||
				// 	label: '保养类型',
 | 
			
		||||
				// 	showOverflowtooltip: true,
 | 
			
		||||
				// 	filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'lastMaintainTime',
 | 
			
		||||
				// 	label: '上次保养时间',
 | 
			
		||||
				// 	filter: parseTime,
 | 
			
		||||
				// 	minWidth: 150,
 | 
			
		||||
				// 	showOverflowtooltip: true,
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'remainDays',
 | 
			
		||||
				// 	label: '距离保养时间(天)',
 | 
			
		||||
				// 	subcomponent: remainBox,
 | 
			
		||||
				// 	minWidth: 150,
 | 
			
		||||
				// 	// showOverflowtooltip: true
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'opt1',
 | 
			
		||||
				// 	label: '设备保养',
 | 
			
		||||
				// 	name: '操作',
 | 
			
		||||
				// 	subcomponent: btn,
 | 
			
		||||
				// 	width: 100,
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'opt2',
 | 
			
		||||
				// 	label: '保养记录',
 | 
			
		||||
				// 	name: '查看详情',
 | 
			
		||||
				// 	subcomponent: btn,
 | 
			
		||||
				// 	width: 100,
 | 
			
		||||
				// },
 | 
			
		||||
			],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
				{
 | 
			
		||||
@@ -200,26 +144,6 @@ export default {
 | 
			
		||||
					param: 'planId',
 | 
			
		||||
					filterable: true,
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'select',
 | 
			
		||||
				// 	label: '设备大类',
 | 
			
		||||
				// 	placeholder: '请选择设备大类',
 | 
			
		||||
				// 	param: 'specialType',
 | 
			
		||||
				// 	onchange: true,
 | 
			
		||||
				// 	selectOptions: [
 | 
			
		||||
				// 		{ id: 1, name: '安全设备' },
 | 
			
		||||
				// 		{ id: 2, name: '消防设备' },
 | 
			
		||||
				// 		{ id: 3, name: '特种设备' },
 | 
			
		||||
				// 	],
 | 
			
		||||
				// 	filterable: true,
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'select',
 | 
			
		||||
				// 	label: '设备名',
 | 
			
		||||
				// 	placeholder: '请选择设备',
 | 
			
		||||
				// 	param: 'equipmentId',
 | 
			
		||||
				// 	filterable: true,
 | 
			
		||||
				// },
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '查询',
 | 
			
		||||
@@ -230,7 +154,7 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:quality-inspection-type:export')
 | 
			
		||||
					type: this.$auth.hasPermi('se:maintain-plan:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
 
 | 
			
		||||
@@ -70,7 +70,7 @@ import PlanConfigAddContent from './PlanConfig--addContent.vue';
 | 
			
		||||
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'SpecialEquipmentPlanConfig',
 | 
			
		||||
	name: 'SpecialEquipmentMaintainPlanConfig',
 | 
			
		||||
	components: {
 | 
			
		||||
		BaseDialog: BaseDialogWrapper,
 | 
			
		||||
		DialogForm: PlanConfigAdd,
 | 
			
		||||
@@ -81,23 +81,21 @@ export default {
 | 
			
		||||
		const t = new Date();
 | 
			
		||||
		const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()];
 | 
			
		||||
		return {
 | 
			
		||||
			searchBarKeys: ['planName'], // 'specialType', 'equipmentName', 'createTime'],
 | 
			
		||||
			searchBarKeys: ['planName'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'detail',
 | 
			
		||||
				// 	btnName: '保养记录',
 | 
			
		||||
				// },
 | 
			
		||||
				{
 | 
			
		||||
				this.$auth.hasPermi('se:maintain:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'addContent',
 | 
			
		||||
							btnName: '添加内容',
 | 
			
		||||
				},
 | 
			
		||||
				this.$auth.hasPermi('equipment:plan-config:update')
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('se:maintain:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '修改',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('equipment:plan-config:delete')
 | 
			
		||||
				this.$auth.hasPermi('se:maintain:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
@@ -171,9 +169,7 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:plan-config:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					type: this.$auth.hasPermi('se:maintain:create') ? 'button' : '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					plain: true,
 | 
			
		||||
 
 | 
			
		||||
@@ -30,8 +30,12 @@
 | 
			
		||||
			<div class="drawer-body__content">
 | 
			
		||||
				<section>
 | 
			
		||||
					<!-- <SmallTitle>保养信息</SmallTitle> -->
 | 
			
		||||
					<div class="form-part" style="margin-bottom: 32px">
 | 
			
		||||
						<el-skeleton v-if="!showForm" animated />
 | 
			
		||||
					<div
 | 
			
		||||
						class="form-part"
 | 
			
		||||
						style="margin-bottom: 32px">
 | 
			
		||||
						<el-skeleton
 | 
			
		||||
							v-if="!showForm"
 | 
			
		||||
							animated />
 | 
			
		||||
						<el-form
 | 
			
		||||
							v-else
 | 
			
		||||
							ref="form"
 | 
			
		||||
@@ -40,14 +44,18 @@
 | 
			
		||||
							v-loading="formLoading">
 | 
			
		||||
							<el-row :gutter="20">
 | 
			
		||||
								<el-col :span="12">
 | 
			
		||||
									<el-form-item label="计划保养人员" prop="planMaintainWorker">
 | 
			
		||||
										<span>{{ form.planMaintainWorker }}</span>
 | 
			
		||||
									<el-form-item
 | 
			
		||||
										label="计划保养人员"
 | 
			
		||||
										prop="planMaintainWorker">
 | 
			
		||||
										<span>{{ form.planMaintainWorker || '---' }}</span>
 | 
			
		||||
									</el-form-item>
 | 
			
		||||
								</el-col>
 | 
			
		||||
 | 
			
		||||
								<el-col :span="12">
 | 
			
		||||
									<el-form-item label="实际保养人员" prop="maintainWorker">
 | 
			
		||||
										<span>{{ form.maintainWorker }}</span>
 | 
			
		||||
									<el-form-item
 | 
			
		||||
										label="实际保养人员"
 | 
			
		||||
										prop="maintainWorker">
 | 
			
		||||
										<span>{{ form.maintainWorker || '---' }}</span>
 | 
			
		||||
									</el-form-item>
 | 
			
		||||
								</el-col>
 | 
			
		||||
							</el-row>
 | 
			
		||||
 
 | 
			
		||||
@@ -21,15 +21,7 @@
 | 
			
		||||
			:limit="queryParams.pageSize"
 | 
			
		||||
			:max-height="tableH"
 | 
			
		||||
			:table-data="list"
 | 
			
		||||
			@emitFun="handleEmitFun">
 | 
			
		||||
			<!-- <method-btn
 | 
			
		||||
				v-if="tableBtn.length"
 | 
			
		||||
				slot="handleBtn"
 | 
			
		||||
				label="操作"
 | 
			
		||||
				:width="120"
 | 
			
		||||
				:method-list="tableBtn"
 | 
			
		||||
				@clickBtn="handleTableBtnClick" /> -->
 | 
			
		||||
		</base-table>
 | 
			
		||||
			@emitFun="handleEmitFun"></base-table>
 | 
			
		||||
 | 
			
		||||
		<!-- 分页组件 -->
 | 
			
		||||
		<pagination
 | 
			
		||||
@@ -106,28 +98,21 @@ export default {
 | 
			
		||||
 | 
			
		||||
		return {
 | 
			
		||||
			recordDetailVisible: false,
 | 
			
		||||
			searchBarKeys: [
 | 
			
		||||
				'maintainPlanId',
 | 
			
		||||
				'startTime',
 | 
			
		||||
				'special',
 | 
			
		||||
				// 'relatePlan',
 | 
			
		||||
				// 'equipmentId',
 | 
			
		||||
				// 'specialType',
 | 
			
		||||
			],
 | 
			
		||||
			searchBarKeys: ['maintainPlanId', 'startTime', 'special'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi('equipment:maintain-record:update')
 | 
			
		||||
				this.$auth.hasPermi('se:maintain-record:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'detail',
 | 
			
		||||
							btnName: '详情',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('equipment:maintain-record:update')
 | 
			
		||||
				this.$auth.hasPermi('se:maintain-record:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '修改',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('equipment:maintain-record:delete')
 | 
			
		||||
				this.$auth.hasPermi('se:maintain-record:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
@@ -135,13 +120,6 @@ export default {
 | 
			
		||||
					: undefined,
 | 
			
		||||
			].filter((v) => v),
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'createTime',
 | 
			
		||||
				// 	label: '添加时间',
 | 
			
		||||
				// 	fixed: true,
 | 
			
		||||
				// 	width: 150,
 | 
			
		||||
				// 	filter: timeFilter,
 | 
			
		||||
				// },
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'maintainOrderNumber',
 | 
			
		||||
					label: '设备保养单号',
 | 
			
		||||
@@ -246,7 +224,7 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:maintain-record:export')
 | 
			
		||||
					type: this.$auth.hasPermi('se:maintain-record:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
@@ -254,15 +232,6 @@ export default {
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: this.$auth.hasPermi('equipment:maintain-record:create')
 | 
			
		||||
				// 		? 'button'
 | 
			
		||||
				// 		: '',
 | 
			
		||||
				// 	btnName: '新增',
 | 
			
		||||
				// 	name: 'add',
 | 
			
		||||
				// 	plain: true,
 | 
			
		||||
				// 	color: 'success',
 | 
			
		||||
				// },
 | 
			
		||||
			],
 | 
			
		||||
			rows: [
 | 
			
		||||
				[
 | 
			
		||||
 
 | 
			
		||||
@@ -88,25 +88,19 @@ export default {
 | 
			
		||||
				'specialType',
 | 
			
		||||
			],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi('equipment:repair:finish')
 | 
			
		||||
				this.$auth.hasPermi('se:repair:finish')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'finish',
 | 
			
		||||
							btnName: '完成',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('equipment:repair:update')
 | 
			
		||||
				this.$auth.hasPermi('se:repair:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'detail',
 | 
			
		||||
							btnName: '详情',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				// this.$auth.hasPermi('equipment:repair:update')
 | 
			
		||||
				// 	? {
 | 
			
		||||
				// 			type: 'edit',
 | 
			
		||||
				// 			btnName: '修改',
 | 
			
		||||
				// 	  }
 | 
			
		||||
				// 	: undefined,
 | 
			
		||||
				this.$auth.hasPermi('equipment:repair:delete')
 | 
			
		||||
				this.$auth.hasPermi('se:repair:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
@@ -114,13 +108,6 @@ export default {
 | 
			
		||||
					: undefined,
 | 
			
		||||
			].filter((v) => v),
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'createTime',
 | 
			
		||||
				// 	label: '添加时间',
 | 
			
		||||
				// 	fixed: true,
 | 
			
		||||
				// 	width: 150,
 | 
			
		||||
				// 	filter: parseTime,
 | 
			
		||||
				// },
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'repairOrderNumber',
 | 
			
		||||
					label: '设备维修单号',
 | 
			
		||||
@@ -186,52 +173,8 @@ export default {
 | 
			
		||||
					minWidth: 120,
 | 
			
		||||
					showOverflowtooltip: true,
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'maintenanceStatus',
 | 
			
		||||
				// 	label: '维修状态',
 | 
			
		||||
				// 	filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''),
 | 
			
		||||
				// },
 | 
			
		||||
				// { prop: 'maintenanceDuration', label: '维修时长(h)', width: 110 },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'equipmentName',
 | 
			
		||||
				// 	label: '设备名称',
 | 
			
		||||
				// 	minWidth: 100,
 | 
			
		||||
				// 	showOverflowtooltip: true,
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'maintenanceDetail',
 | 
			
		||||
				// 	label: '维修明细',
 | 
			
		||||
				// 	subcomponent: htmls,
 | 
			
		||||
				// 	minWidth: 100,
 | 
			
		||||
				// 	showOverflowtooltip: true,
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'repairman',
 | 
			
		||||
				// 	label: '维修工',
 | 
			
		||||
				// 	minWidth: 100,
 | 
			
		||||
				// 	showOverflowtooltip: true,
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'repairmanPhone',
 | 
			
		||||
				// 	label: '联系方式',
 | 
			
		||||
				// 	minWidth: 100,
 | 
			
		||||
				// 	showOverflowtooltip: true,
 | 
			
		||||
				// },
 | 
			
		||||
			],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'select',
 | 
			
		||||
				// 	label: '设备大类',
 | 
			
		||||
				// 	placeholder: '请选择设备大类',
 | 
			
		||||
				// 	param: 'specialType',
 | 
			
		||||
				// 	onchange: true,
 | 
			
		||||
				// 	selectOptions: [
 | 
			
		||||
				// 		{ id: 1, name: '安全设备' },
 | 
			
		||||
				// 		{ id: 2, name: '消防设备' },
 | 
			
		||||
				// 		{ id: 3, name: '特种设备' },
 | 
			
		||||
				// 	],
 | 
			
		||||
				// 	filterable: true,
 | 
			
		||||
				// },
 | 
			
		||||
				{
 | 
			
		||||
					type: 'select',
 | 
			
		||||
					label: '设备',
 | 
			
		||||
@@ -256,7 +199,6 @@ export default {
 | 
			
		||||
					dateType: 'daterange', // datetimerange
 | 
			
		||||
					format: 'yyyy-MM-dd',
 | 
			
		||||
					valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
					// valueFormat: 'timestamp',
 | 
			
		||||
					rangeSeparator: '-',
 | 
			
		||||
					startPlaceholder: '开始日期',
 | 
			
		||||
					endPlaceholder: '结束日期',
 | 
			
		||||
@@ -273,14 +215,14 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
 | 
			
		||||
					type: this.$auth.hasPermi('se:repair:export') ? 'button' : '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:repair:create') ? 'button' : '',
 | 
			
		||||
					type: this.$auth.hasPermi('se:repair:create') ? 'button' : '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					plain: true,
 | 
			
		||||
 
 | 
			
		||||
@@ -14,22 +14,6 @@
 | 
			
		||||
			@select-changed="handleSearchBarChange"
 | 
			
		||||
			@headBtnClick="handleSearchBarBtnClick" />
 | 
			
		||||
 | 
			
		||||
		<!-- 列表 -->
 | 
			
		||||
		<!-- <base-table
 | 
			
		||||
			:table-props="tableProps"
 | 
			
		||||
			:page="queryParams.pageNo"
 | 
			
		||||
			:limit="queryParams.pageSize"
 | 
			
		||||
			:table-data="list"
 | 
			
		||||
			@selection-change="handleSelectionChange"
 | 
			
		||||
			@emitFun="handleEmitFun">
 | 
			
		||||
			<method-btn
 | 
			
		||||
				v-if="tableBtn.length"
 | 
			
		||||
				slot="handleBtn"
 | 
			
		||||
				label="操作"
 | 
			
		||||
				:width="120"
 | 
			
		||||
				:method-list="tableBtn"
 | 
			
		||||
				@clickBtn="handleTableBtnClick" />
 | 
			
		||||
		</base-table> -->
 | 
			
		||||
		<WaitingListTable
 | 
			
		||||
			ref="waiting-list-table"
 | 
			
		||||
			:table-data="list"
 | 
			
		||||
@@ -61,9 +45,16 @@
 | 
			
		||||
				ref="form"
 | 
			
		||||
				v-model="form"
 | 
			
		||||
				:disabled="mode == 'detail'" />
 | 
			
		||||
			<el-row v-if="mode === 'detail'" slot="footer" type="flex" justify="end">
 | 
			
		||||
			<el-row
 | 
			
		||||
				v-if="mode === 'detail'"
 | 
			
		||||
				slot="footer"
 | 
			
		||||
				type="flex"
 | 
			
		||||
				justify="end">
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
					<el-button size="small" class="btnTextStyle" @click="cancel">
 | 
			
		||||
					<el-button
 | 
			
		||||
						size="small"
 | 
			
		||||
						class="btnTextStyle"
 | 
			
		||||
						@click="cancel">
 | 
			
		||||
						关闭
 | 
			
		||||
					</el-button>
 | 
			
		||||
				</el-col>
 | 
			
		||||
@@ -107,32 +98,8 @@ import WaitingListTable from './WaitingListTable.vue';
 | 
			
		||||
import RecordDetail from './Record--detail.vue';
 | 
			
		||||
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
 | 
			
		||||
 | 
			
		||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
// const btn = {
 | 
			
		||||
// 	name: 'tableBtn',
 | 
			
		||||
// 	props: ['injectData'],
 | 
			
		||||
// 	data() {
 | 
			
		||||
// 		return {};
 | 
			
		||||
// 	},
 | 
			
		||||
// 	methods: {
 | 
			
		||||
// 		handleClick() {
 | 
			
		||||
// 			this.$emit('emitData', {
 | 
			
		||||
// 				action: this.injectData.label,
 | 
			
		||||
// 				value: this.injectData,
 | 
			
		||||
// 			});
 | 
			
		||||
// 		},
 | 
			
		||||
// 	},
 | 
			
		||||
// 	render: function (h) {
 | 
			
		||||
// 		return (
 | 
			
		||||
// 			<el-button type="text" onClick={this.handleClick}>
 | 
			
		||||
// 				{this.injectData.name}
 | 
			
		||||
// 			</el-button>
 | 
			
		||||
// 		);
 | 
			
		||||
// 	},
 | 
			
		||||
// };
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'SpecialEquipmentMaintainRecord',
 | 
			
		||||
	name: 'SpecialEquipmentMaintainRecordUnconfirmed',
 | 
			
		||||
	components: {
 | 
			
		||||
		DialogFormUnplanned,
 | 
			
		||||
		WaitingListTable,
 | 
			
		||||
@@ -146,235 +113,9 @@ export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			recordDetailVisible: false,
 | 
			
		||||
			searchBarKeys: [
 | 
			
		||||
				'maintainPlanId',
 | 
			
		||||
				'startTime',
 | 
			
		||||
				'special',
 | 
			
		||||
				// 'relatePlan',
 | 
			
		||||
				// 'equipmentId',
 | 
			
		||||
				// 'specialType',
 | 
			
		||||
			],
 | 
			
		||||
			searchBarKeys: ['maintainPlanId', 'startTime', 'special'],
 | 
			
		||||
			tobeConfirmedIdList: [],
 | 
			
		||||
			// tableBtn: [
 | 
			
		||||
			// 	// this.$auth.hasPermi('equipment:maintain-record:update')
 | 
			
		||||
			// 	// 	? {
 | 
			
		||||
			// 	// 			type: 'detail',
 | 
			
		||||
			// 	// 			btnName: '详情',
 | 
			
		||||
			// 	// 	  }
 | 
			
		||||
			// 	// 	: undefined,
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		type: 'confirm',
 | 
			
		||||
			// 		btnName: '确认',
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		type: 'edit',
 | 
			
		||||
			// 		btnName: '编辑',
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		type: 'delete',
 | 
			
		||||
			// 		btnName: '删除',
 | 
			
		||||
			// 	},
 | 
			
		||||
			// ],
 | 
			
		||||
			// tableProps: [
 | 
			
		||||
			// 	// {
 | 
			
		||||
			// 	// 	prop: 'createTime',
 | 
			
		||||
			// 	// 	label: '添加时间',
 | 
			
		||||
			// 	// 	fixed: true,
 | 
			
		||||
			// 	// 	width: 150,
 | 
			
		||||
			// 	// 	filter: timeFilter,
 | 
			
		||||
			// 	// },
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		type: 'selection',
 | 
			
		||||
			// 		// prop: '_selection',
 | 
			
		||||
			// 		// label: '批量选择',
 | 
			
		||||
			// 		width: 48,
 | 
			
		||||
			// 		subcomponent: {
 | 
			
		||||
			// 			props: ['injectData'],
 | 
			
		||||
			// 			data() {
 | 
			
		||||
			// 				return {
 | 
			
		||||
			// 					outside: false,
 | 
			
		||||
			// 					selected: false,
 | 
			
		||||
			// 				};
 | 
			
		||||
			// 			},
 | 
			
		||||
			// 			watch: {
 | 
			
		||||
			// 				selected(val) {
 | 
			
		||||
			// 					if (!this.outside) {
 | 
			
		||||
			// 						console.log('emit row-selected...');
 | 
			
		||||
			// 						this.$emit('emitData', {
 | 
			
		||||
			// 							action: 'row-selected',
 | 
			
		||||
			// 							value: {
 | 
			
		||||
			// 								row: this.injectData,
 | 
			
		||||
			// 								selected: val,
 | 
			
		||||
			// 							},
 | 
			
		||||
			// 						});
 | 
			
		||||
			// 					}
 | 
			
		||||
			// 				},
 | 
			
		||||
			// 				injectData: {
 | 
			
		||||
			// 					deep: true,
 | 
			
		||||
			// 					immediate: true,
 | 
			
		||||
			// 					handler: function (val) {
 | 
			
		||||
			// 						this.outside = true;
 | 
			
		||||
			// 						this.selected = !!((val._selection & 0b01) != 0);
 | 
			
		||||
			// 						this.$nextTick(() => {
 | 
			
		||||
			// 							this.outside = false;
 | 
			
		||||
			// 						});
 | 
			
		||||
			// 					},
 | 
			
		||||
			// 				},
 | 
			
		||||
			// 			},
 | 
			
		||||
			// 			render(h) {
 | 
			
		||||
			// 				const enabled = 0b10 & this.injectData._selection;
 | 
			
		||||
			// 				// return this.injectData?._selection ? h('h1', null, 'hello') : h('h1', null, '1');
 | 
			
		||||
			// 				return (
 | 
			
		||||
			// 					<div>
 | 
			
		||||
			// 						<span>{this.selected}</span>
 | 
			
		||||
			// 						<el-checkbox disabled={!enabled} v-model={this.selected} />
 | 
			
		||||
			// 					</div>
 | 
			
		||||
			// 				);
 | 
			
		||||
			// 			},
 | 
			
		||||
			// 		},
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		prop: 'maintainOrderNumber',
 | 
			
		||||
			// 		label: '设备保养单号',
 | 
			
		||||
			// 		width: 110,
 | 
			
		||||
			// 		showOverflowtooltip: true,
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		prop: 'planName',
 | 
			
		||||
			// 		label: '保养计划名称',
 | 
			
		||||
			// 		width: 110,
 | 
			
		||||
			// 		showOverflowtooltip: true,
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		prop: 'departmentName',
 | 
			
		||||
			// 		label: '部门',
 | 
			
		||||
			// 		width: 110,
 | 
			
		||||
			// 		showOverflowtooltip: true,
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		prop: 'lineName',
 | 
			
		||||
			// 		label: '产线名',
 | 
			
		||||
			// 		width: 110,
 | 
			
		||||
			// 		showOverflowtooltip: true,
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		prop: 'planStartTime',
 | 
			
		||||
			// 		label: '计划开始时间',
 | 
			
		||||
			// 		filter: timeFilter,
 | 
			
		||||
			// 		minWidth: 150,
 | 
			
		||||
			// 		showOverflowtooltip: true,
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		prop: 'planEndTime',
 | 
			
		||||
			// 		label: '计划结束时间',
 | 
			
		||||
			// 		filter: timeFilter,
 | 
			
		||||
			// 		minWidth: 150,
 | 
			
		||||
			// 		showOverflowtooltip: true,
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		prop: 'startTime',
 | 
			
		||||
			// 		label: '实际开始时间',
 | 
			
		||||
			// 		filter: timeFilter,
 | 
			
		||||
			// 		minWidth: 150,
 | 
			
		||||
			// 		showOverflowtooltip: true,
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		prop: 'endTime',
 | 
			
		||||
			// 		label: '实际结束时间',
 | 
			
		||||
			// 		filter: timeFilter,
 | 
			
		||||
			// 		minWidth: 150,
 | 
			
		||||
			// 		showOverflowtooltip: true,
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		prop: 'confirmDueTime',
 | 
			
		||||
			// 		label: '确认截止时间',
 | 
			
		||||
			// 		filter: timeFilter,
 | 
			
		||||
			// 		minWidth: 150,
 | 
			
		||||
			// 		showOverflowtooltip: true,
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		prop: 'relatePlan',
 | 
			
		||||
			// 		label: '保养计划类型',
 | 
			
		||||
			// 		minWidth: 150,
 | 
			
		||||
			// 		showOverflowtooltip: true,
 | 
			
		||||
			// 		filter: (val) =>
 | 
			
		||||
			// 			val != null ? ['-', '计划型', '非计划型'][val] : '-',
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	{
 | 
			
		||||
			// 		prop: '_detail',
 | 
			
		||||
			// 		label: '详情',
 | 
			
		||||
			// 		name: '详情',
 | 
			
		||||
			// 		minWidth: 60,
 | 
			
		||||
			// 		subcomponent: btn,
 | 
			
		||||
			// 	},
 | 
			
		||||
			// 	// {
 | 
			
		||||
			// 	// 	prop: 'equipmentCategory',
 | 
			
		||||
			// 	// 	label: '设备大类',
 | 
			
		||||
			// 	// 	minWidth: 100,
 | 
			
		||||
			// 	// 	showOverflowtooltip: true,
 | 
			
		||||
			// 	// 	filter: (val) =>
 | 
			
		||||
			// 	// 		val != null ? ['-', '安全设备', '消防设备', '特种设备'][val] : '-',
 | 
			
		||||
			// 	// },
 | 
			
		||||
			// 	// {
 | 
			
		||||
			// 	// 	prop: 'equipmentName',
 | 
			
		||||
			// 	// 	label: '设备名称',
 | 
			
		||||
			// 	// 	minWidth: 100,
 | 
			
		||||
			// 	// 	showOverflowtooltip: true,
 | 
			
		||||
			// 	// },
 | 
			
		||||
			// 	// {
 | 
			
		||||
			// 	// 	prop: 'maintainWorker',
 | 
			
		||||
			// 	// 	label: '保养人员',
 | 
			
		||||
			// 	// 	minWidth: 100,
 | 
			
		||||
			// 	// 	showOverflowtooltip: true,
 | 
			
		||||
			// 	// },
 | 
			
		||||
			// 	// {
 | 
			
		||||
			// 	// 	prop: 'relatePlan',
 | 
			
		||||
			// 	// 	label: '是否计划保养',
 | 
			
		||||
			// 	// 	width: 120,
 | 
			
		||||
			// 	// 	filter: (v) => (v != null ? ['', '是', '否'][v] : ''),
 | 
			
		||||
			// 	// },
 | 
			
		||||
			// 	// {
 | 
			
		||||
			// 	// 	prop: 'planName',
 | 
			
		||||
			// 	// 	label: '保养计划名称',
 | 
			
		||||
			// 	// 	minWidth: 120,
 | 
			
		||||
			// 	// 	showOverflowtooltip: true,
 | 
			
		||||
			// 	// },
 | 
			
		||||
			// 	// {
 | 
			
		||||
			// 	// 	prop: 'maintainDuration',
 | 
			
		||||
			// 	// 	label: '计划保养用时(h)',
 | 
			
		||||
			// 	// 	minWidth: 130,
 | 
			
		||||
			// 	// 	showOverflowtooltip: true,
 | 
			
		||||
			// 	// },
 | 
			
		||||
			// 	// { prop: 'timeUsed', label: '实际保养用时(h)', minWidth: 130 },
 | 
			
		||||
			// 	// {
 | 
			
		||||
			// 	// 	prop: 'remark',
 | 
			
		||||
			// 	// 	label: '备注',
 | 
			
		||||
			// 	// 	minWidth: 100,
 | 
			
		||||
			// 	// 	showOverflowtooltip: true,
 | 
			
		||||
			// 	// },
 | 
			
		||||
			// ],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'select',
 | 
			
		||||
				// 	label: '设备大类',
 | 
			
		||||
				// 	placeholder: '请选择设备大类',
 | 
			
		||||
				// 	param: 'specialType',
 | 
			
		||||
				// 	onchange: true,
 | 
			
		||||
				// 	selectOptions: [
 | 
			
		||||
				// 		{ id: 1, name: '安全设备' },
 | 
			
		||||
				// 		{ id: 2, name: '消防设备' },
 | 
			
		||||
				// 		{ id: 3, name: '特种设备' },
 | 
			
		||||
				// 	],
 | 
			
		||||
				// 	filterable: true,
 | 
			
		||||
				// 	defaultSelect: null
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'select',
 | 
			
		||||
				// 	label: '设备',
 | 
			
		||||
				// 	placeholder: '请选择设备',
 | 
			
		||||
				// 	param: 'equipmentId',
 | 
			
		||||
				// 	defaultSelect: null
 | 
			
		||||
				// },
 | 
			
		||||
				{
 | 
			
		||||
					type: 'select',
 | 
			
		||||
					label: '保养计划名称',
 | 
			
		||||
@@ -399,16 +140,6 @@ export default {
 | 
			
		||||
					defaultSelect: null,
 | 
			
		||||
					// width: 350,
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'select',
 | 
			
		||||
				// 	label: '是否计划保养',
 | 
			
		||||
				// 	selectOptions: [
 | 
			
		||||
				// 		{ name: '是', id: 1 },
 | 
			
		||||
				// 		{ name: '否', id: 2 },
 | 
			
		||||
				// 	],
 | 
			
		||||
				// 	defaultSelect: null,
 | 
			
		||||
				// 	param: 'relatePlan',
 | 
			
		||||
				// },
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '查询',
 | 
			
		||||
@@ -419,21 +150,25 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					type: this.$auth.hasPermi('se:maintain-record-pre:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'success',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					type: this.$auth.hasPermi('se:maintain-record-pre:confirm-all')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '批量确认',
 | 
			
		||||
					name: 'batchConfirm',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
					plain: true,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:maintain-record:export')
 | 
			
		||||
					type: this.$auth.hasPermi('se:maintain-record-pre:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
@@ -441,15 +176,6 @@ export default {
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: this.$auth.hasPermi('equipment:maintain-record:create')
 | 
			
		||||
				// 		? 'button'
 | 
			
		||||
				// 		: '',
 | 
			
		||||
				// 	btnName: '新增',
 | 
			
		||||
				// 	name: 'add',
 | 
			
		||||
				// 	plain: true,
 | 
			
		||||
				// 	color: 'success',
 | 
			
		||||
				// },
 | 
			
		||||
			],
 | 
			
		||||
			// 是否显示弹出层
 | 
			
		||||
			open: false,
 | 
			
		||||
@@ -483,30 +209,7 @@ export default {
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
		this.initSearchBar();
 | 
			
		||||
		// if (this.$route.query) {
 | 
			
		||||
		// 	this.queryParams.specialType =
 | 
			
		||||
		// 		this.$route.query?.specialType ?? undefined;
 | 
			
		||||
		// 	this.queryParams.equipmentId =
 | 
			
		||||
		// 		this.$route.query?.equipmentId ?? undefined;
 | 
			
		||||
		// 	this.queryParams.maintainPlanId =
 | 
			
		||||
		// 		this.$route.query?.maintainPlanId ?? undefined;
 | 
			
		||||
		// 	this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
 | 
			
		||||
		// 	this.queryParams.startTime = this.$route.query?.createTime ?? undefined;
 | 
			
		||||
		// 	this.searchBarFormConfig[0].defaultSelect =
 | 
			
		||||
		// 		this.$route.query.specialType ?? undefined;
 | 
			
		||||
		// 	this.searchBarFormConfig[1].defaultSelect =
 | 
			
		||||
		// 		this.$route.query.equipmentId ?? undefined;
 | 
			
		||||
		// 	this.searchBarFormConfig[2].defaultSelect =
 | 
			
		||||
		// 		this.$route.query.maintainPlanId ?? undefined;
 | 
			
		||||
		// 	this.searchBarFormConfig[3].defaultSelect =
 | 
			
		||||
		// 		this.$route.query?.createTime ?? undefined;
 | 
			
		||||
		// 	this.searchBarFormConfig[4].defaultSelect =
 | 
			
		||||
		// 		Number(this.$route.query.relatePlan) ?? undefined;
 | 
			
		||||
		// }
 | 
			
		||||
		this.getList();
 | 
			
		||||
		// if (this.$route.query.addRecord) {
 | 
			
		||||
		// 	this.handleAdd();
 | 
			
		||||
		// }
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		/** 批量确认 */
 | 
			
		||||
@@ -531,60 +234,6 @@ export default {
 | 
			
		||||
					break;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		handleSelectionChange(list) {
 | 
			
		||||
			if (this.tobeConfirmedIdList.length) {
 | 
			
		||||
				this.tobeConfirmedIdList = [];
 | 
			
		||||
				this.list.forEach((item) => {
 | 
			
		||||
					this.handleEmitFun({
 | 
			
		||||
						action: 'row-selected',
 | 
			
		||||
						value: { row: item, selected: false },
 | 
			
		||||
					});
 | 
			
		||||
				});
 | 
			
		||||
				console.log(
 | 
			
		||||
					'清空选择列表',
 | 
			
		||||
					this.list.map((item) => item._selection)
 | 
			
		||||
				);
 | 
			
		||||
			} else {
 | 
			
		||||
				this.tobeConfirmedIdList = list.map((item) => item.id);
 | 
			
		||||
				this.list.forEach((item) => {
 | 
			
		||||
					this.handleEmitFun({
 | 
			
		||||
						action: 'row-selected',
 | 
			
		||||
						value: { row: item, selected: true },
 | 
			
		||||
					});
 | 
			
		||||
				});
 | 
			
		||||
				console.log(
 | 
			
		||||
					'全选',
 | 
			
		||||
					this.list.map((item) => item._selection)
 | 
			
		||||
				);
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		handleEmitFun({ action, value }) {
 | 
			
		||||
			switch (action) {
 | 
			
		||||
				case '详情':
 | 
			
		||||
					this.recordDetailVisible = true;
 | 
			
		||||
					this.$nextTick(() => {
 | 
			
		||||
						this.$refs.recordDetailDrawer.show({
 | 
			
		||||
							id: value.id,
 | 
			
		||||
							planMaintainWorker: value.planMaintainWorker,
 | 
			
		||||
							maintainWorker: value.maintainWorker,
 | 
			
		||||
						});
 | 
			
		||||
					});
 | 
			
		||||
					break;
 | 
			
		||||
				case 'row-selected':
 | 
			
		||||
					if (value.selected) {
 | 
			
		||||
						this.tobeConfirmedIdList.push(value.row.id);
 | 
			
		||||
						value.row._selection = 0b11;
 | 
			
		||||
					} else {
 | 
			
		||||
						const index = this.tobeConfirmedIdList.indexOf(value.row.id);
 | 
			
		||||
						if (index != -1) {
 | 
			
		||||
							this.tobeConfirmedIdList.splice(index, 1);
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
					console.log('tobeConfirmedIdList', this.tobeConfirmedIdList);
 | 
			
		||||
					break;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		handleSearchBarChange({ param, value }) {
 | 
			
		||||
			if ('specialType' === param) {
 | 
			
		||||
@@ -598,10 +247,6 @@ export default {
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		initSearchBar() {
 | 
			
		||||
			// this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
 | 
			
		||||
			// 	this.allSpecialEquipments = data.filter((item) => item.special);
 | 
			
		||||
			// 	this.setSearchBarEquipmentList(data.filter((item) => item.special));
 | 
			
		||||
			// });
 | 
			
		||||
			this.http('/base/equipment-maintain-plan/page', 'get', {
 | 
			
		||||
				pageNo: 1,
 | 
			
		||||
				pageSize: 100,
 | 
			
		||||
@@ -609,7 +254,6 @@ export default {
 | 
			
		||||
			}).then(({ data }) => {
 | 
			
		||||
				this.$set(
 | 
			
		||||
					this.searchBarFormConfig[0],
 | 
			
		||||
					// this.searchBarFormConfig[2],
 | 
			
		||||
					'selectOptions',
 | 
			
		||||
					(data?.list || []).map((item) => ({
 | 
			
		||||
						name: item.name,
 | 
			
		||||
@@ -625,7 +269,6 @@ export default {
 | 
			
		||||
			this.recv({
 | 
			
		||||
				...this.queryParams,
 | 
			
		||||
				special: true,
 | 
			
		||||
				// relatePlan: 2,
 | 
			
		||||
				confirmed: false,
 | 
			
		||||
			}).then((response) => {
 | 
			
		||||
				this.list = response.data.list;
 | 
			
		||||
@@ -730,35 +373,6 @@ export default {
 | 
			
		||||
						}, 450);
 | 
			
		||||
					});
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				// 添加的提交
 | 
			
		||||
				// this.getConfirmed()
 | 
			
		||||
				// 	.then((confirmed) => {
 | 
			
		||||
				// 		this.post({
 | 
			
		||||
				// 			...this.form,
 | 
			
		||||
				// 			maintainWorker: this.form.maintainWorker.join(','),
 | 
			
		||||
				// 			special: true,
 | 
			
		||||
				// 			relatePlan: 2,
 | 
			
		||||
				// 			confirmed: true,
 | 
			
		||||
				// 		}).then((response) => {
 | 
			
		||||
				// 			this.$modal.msgSuccess('新增成功');
 | 
			
		||||
				// 			this.open = false;
 | 
			
		||||
				// 			this.getList();
 | 
			
		||||
				// 		});
 | 
			
		||||
				// 	})
 | 
			
		||||
				// 	.catch((err) => {
 | 
			
		||||
				// 		this.post({
 | 
			
		||||
				// 			...this.form,
 | 
			
		||||
				// 			maintainWorker: this.form.maintainWorker.join(','),
 | 
			
		||||
				// 			special: true,
 | 
			
		||||
				// 			relatePlan: 2,
 | 
			
		||||
				// 			confirmed: false,
 | 
			
		||||
				// 		}).then((response) => {
 | 
			
		||||
				// 			this.$modal.msgSuccess('新增成功');
 | 
			
		||||
				// 			this.open = false;
 | 
			
		||||
				// 			this.getList();
 | 
			
		||||
				// 		});
 | 
			
		||||
				// 	});
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		/** 确认 */
 | 
			
		||||
 
 | 
			
		||||
@@ -144,6 +144,7 @@
 | 
			
		||||
			label="操作">
 | 
			
		||||
			<template slot-scope="scope">
 | 
			
		||||
				<el-tooltip
 | 
			
		||||
					v-if="$auth.hasPermi('se:maintain-record-pre:confirm')"
 | 
			
		||||
					content="确认"
 | 
			
		||||
					placement="top">
 | 
			
		||||
					<el-button
 | 
			
		||||
@@ -155,8 +156,13 @@
 | 
			
		||||
					</el-button>
 | 
			
		||||
				</el-tooltip>
 | 
			
		||||
				<!-- line  -->
 | 
			
		||||
				<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
 | 
			
		||||
				<span
 | 
			
		||||
					style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
 | 
			
		||||
					v-if="$auth.hasPermi('se:maintain-record-pre:update')">
 | 
			
		||||
					|
 | 
			
		||||
				</span>
 | 
			
		||||
				<el-tooltip
 | 
			
		||||
					v-if="$auth.hasPermi('se:maintain-record-pre:update')"
 | 
			
		||||
					content="查看详情"
 | 
			
		||||
					placement="top">
 | 
			
		||||
					<el-button
 | 
			
		||||
@@ -167,8 +173,13 @@
 | 
			
		||||
					</el-button>
 | 
			
		||||
				</el-tooltip>
 | 
			
		||||
				<!-- line  -->
 | 
			
		||||
				<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
 | 
			
		||||
				<span
 | 
			
		||||
					style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
 | 
			
		||||
					v-if="$auth.hasPermi('se:maintain-record-pre:update')">
 | 
			
		||||
					|
 | 
			
		||||
				</span>
 | 
			
		||||
				<el-tooltip
 | 
			
		||||
					v-if="$auth.hasPermi('se:maintain-record-pre:update')"
 | 
			
		||||
					content="编辑"
 | 
			
		||||
					placement="top">
 | 
			
		||||
					<el-button
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user