Merge pull request 'projects/mesxc-lb' (#289) from projects/mesxc-lb into projects/mesxc-test

Reviewed-on: #289
This commit is contained in:
朱菊兰 2024-03-28 16:00:18 +08:00
commit 58aaabb6d1
13 changed files with 113 additions and 663 deletions

View File

@ -91,13 +91,13 @@
pageSize: 10, pageSize: 10,
}, },
tableBtn: [ 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', type: 'edit',
btnName: '修改', btnName: '修改',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:core-equipment-attr:delete') this.$auth.hasPermi('base:core-equipment-attr:delete') // ('se:firefight-attr:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -142,19 +142,19 @@ export default {
return { return {
searchBarKeys: ['name', 'code'], searchBarKeys: ['name', 'code'],
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:core-equipment:update`) this.$auth.hasPermi(`se:firefight:update`)
? { ? {
type: 'detail', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:core-equipment:update') this.$auth.hasPermi('se:firefight:update')
? { ? {
type: 'edit', type: 'edit',
btnName: '修改', btnName: '修改',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:core-equipment:delete') this.$auth.hasPermi('se:firefight:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -208,18 +208,14 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('base:core-equipment:export') type: this.$auth.hasPermi('se:firefight:export') ? 'button' : '',
? 'button'
: '',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
plain: true, plain: true,
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:core-equipment:create') type: this.$auth.hasPermi('se:firefight:create') ? 'button' : '',
? 'button'
: '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
plain: true, plain: true,
@ -350,9 +346,6 @@ export default {
mounted() { mounted() {
this.getList(); this.getList();
}, },
activated() {
this.getList();
},
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {

View File

@ -142,19 +142,19 @@ export default {
return { return {
searchBarKeys: ['name', 'code'], searchBarKeys: ['name', 'code'],
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:core-equipment:update`) this.$auth.hasPermi(`se:manage:update`)
? { ? {
type: 'detail', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:core-equipment:update') this.$auth.hasPermi('se:manage:update')
? { ? {
type: 'edit', type: 'edit',
btnName: '修改', btnName: '修改',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:core-equipment:delete') this.$auth.hasPermi('se:manage:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -207,7 +207,7 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('base:core-equipment:export') type: this.$auth.hasPermi('se:manage:export')
? 'button' ? 'button'
: '', : '',
btnName: '导出', btnName: '导出',
@ -216,7 +216,7 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:core-equipment:create') type: this.$auth.hasPermi('se:manage:create')
? 'button' ? 'button'
: '', : '',
btnName: '新增', btnName: '新增',
@ -340,9 +340,6 @@ export default {
mounted() { mounted() {
this.getList(); this.getList();
}, },
activated() {
this.getList();
},
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {

View File

@ -91,13 +91,13 @@
pageSize: 10, pageSize: 10,
}, },
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:core-equipment-attr:update') this.$auth.hasPermi('se:safety-attr:update')
? { ? {
type: 'edit', type: 'edit',
btnName: '修改', btnName: '修改',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:core-equipment-attr:delete') this.$auth.hasPermi('se:safety-attr:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -130,7 +130,7 @@ import AssetsUpload from '../components/AssetsUpload.vue';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue'; import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
export default { export default {
name: 'SpecialEquipmentForSafety', name: 'specialEquipmentForSafety',
components: { components: {
Editor, Editor,
EquipmentDrawer, EquipmentDrawer,
@ -141,19 +141,19 @@ export default {
return { return {
searchBarKeys: ['name', 'code'], searchBarKeys: ['name', 'code'],
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:core-equipment:update`) this.$auth.hasPermi(`se:safety:update`)
? { ? {
type: 'detail', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:core-equipment:update') this.$auth.hasPermi('se:safety:update')
? { ? {
type: 'edit', type: 'edit',
btnName: '修改', btnName: '修改',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:core-equipment:delete') this.$auth.hasPermi('se:safety:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -206,7 +206,7 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('base:core-equipment:export') type: this.$auth.hasPermi('se:safety:export')
? 'button' ? 'button'
: '', : '',
btnName: '导出', btnName: '导出',
@ -215,7 +215,7 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:core-equipment:create') type: this.$auth.hasPermi('se:safety:create')
? 'button' ? 'button'
: '', : '',
btnName: '新增', btnName: '新增',
@ -338,9 +338,6 @@ export default {
mounted() { mounted() {
this.getList(); this.getList();
}, },
activated() {
this.getList();
},
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {

View File

@ -46,7 +46,10 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="handleConfirm"> @confirm="handleConfirm">
<add ref="add" v-if="open" @refreshDataList="successSubmit" /> <add
ref="add"
v-if="open"
@refreshDataList="successSubmit" />
</base-dialog> </base-dialog>
<!-- 添加巡检查看详情 --> <!-- 添加巡检查看详情 -->
<addOrUpdata <addOrUpdata
@ -75,26 +78,20 @@ export default {
addOrEditTitle: '', addOrEditTitle: '',
searchBarKeys: ['name'], searchBarKeys: ['name'],
tableBtn: [ tableBtn: [
this.$auth.hasPermi('equipment:check-setting:addInsp') this.$auth.hasPermi('se:check:add-item')
? { ? {
type: 'add', type: 'add',
btnName: '添加', btnName: '添加',
showTip: '添加巡检', showTip: '添加巡检',
} }
: undefined, : undefined,
this.$auth.hasPermi('equipment:check-setting:update') this.$auth.hasPermi('se:check:update')
? { ? {
type: 'edit', type: 'edit',
btnName: '修改', btnName: '修改',
} }
: undefined, : undefined,
// this.$auth.hasPermi('equipment:check-setting:update') this.$auth.hasPermi('se:check:delete')
// ? {
// type: 'detail',
// btnName: '',
// }
// : undefined,
this.$auth.hasPermi('equipment:check-setting:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -170,16 +167,14 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('equipment:check-setting:create') type: this.$auth.hasPermi('se:check:create') ? 'button' : '',
? 'button'
: '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
plain: true, plain: true,
color: 'success', color: 'success',
}, },
// { // {
// type: this.$auth.hasPermi('equipment:check-setting:export') // type: this.$auth.hasPermi('se:check:export')
// ? 'button' // ? 'button'
// : '', // : '',
// btnName: '', // btnName: '',

View File

@ -69,7 +69,7 @@ import AddCheckDet from './Content-add_detail.vue';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue'; import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
export default { export default {
name: 'SpecialEquipmentCheckConfig', name: 'SpecialEquipmentCheckContent',
components: { components: {
addOrUpdata, addOrUpdata,
add, add,
@ -92,7 +92,7 @@ export default {
btnName: '确认', btnName: '确认',
showTip: '确认', showTip: '确认',
}, },
this.$auth.hasPermi('equipment:check-setting:update') this.$auth.hasPermi('se:check-unconfirm:update')
? { ? {
type: 'edit', type: 'edit',
btnName: '修改', btnName: '修改',
@ -102,7 +102,7 @@ export default {
type: 'detail', type: 'detail',
btnName: '巡检内容详情', btnName: '巡检内容详情',
}, },
this.$auth.hasPermi('equipment:check-setting:delete') this.$auth.hasPermi('se:check-unconfirm:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -158,7 +158,7 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('equipment:check-setting:create') type: this.$auth.hasPermi('se:check-unconfirm:create')
? 'button' ? 'button'
: '', : '',
btnName: '新增', btnName: '新增',
@ -167,14 +167,18 @@ export default {
color: 'success', color: 'success',
}, },
{ {
type: 'button', type: this.$auth.hasPermi('se:check-unconfirm:export')
? 'button'
: '',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
plain: true, plain: true,
color: 'warning', color: 'warning',
}, },
{ {
type: 'button', type: this.$auth.hasPermi('se:check-unconfirm:confirm-all')
? 'button'
: '',
btnName: '批量确认', btnName: '批量确认',
name: 'batch-confirm', name: 'batch-confirm',
plain: true, plain: true,

View File

@ -71,19 +71,19 @@ export default {
addOrUpdateVisible: false, addOrUpdateVisible: false,
searchBarKeys: ['name', 'actualCheckTime'], searchBarKeys: ['name', 'actualCheckTime'],
tableBtn: [ tableBtn: [
this.$auth.hasPermi('equipment:check-record:detail') this.$auth.hasPermi('se:check-record:detail')
? { ? {
type: 'detail', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
// this.$auth.hasPermi('equipment:check-record:update') // this.$auth.hasPermi('se:check-record:update')
// ? { // ? {
// type: 'edit', // type: 'edit',
// btnName: '', // btnName: '',
// } // }
// : undefined, // : undefined,
// this.$auth.hasPermi('equipment:check-record:delete') // this.$auth.hasPermi('se:check-record:delete')
// ? { // ? {
// type: 'delete', // type: 'delete',
// btnName: '', // btnName: '',
@ -161,7 +161,7 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('equipment:check-record:export') type: this.$auth.hasPermi('se:check-record:export')
? 'button' ? 'button'
: '', : '',
btnName: '导出', btnName: '导出',
@ -170,7 +170,7 @@ export default {
color: 'primary', color: 'primary',
}, },
// { // {
// type: this.$auth.hasPermi('equipment:check-record:create') // type: this.$auth.hasPermi('se:check-record:create')
// ? 'button' // ? 'button'
// : '', // : '',
// btnName: '', // btnName: '',

View File

@ -63,7 +63,7 @@ import MonitorDetail from './Monitor--detail.vue';
import { RemainBox, TableBtn } from '@/components/tableInnerComponents'; import { RemainBox, TableBtn } from '@/components/tableInnerComponents';
export default { export default {
name: 'SpecialEquipmentMaintainMonitor', name: 'SpecialEquipmentMonitoring',
components: { MonitorDetail }, components: { MonitorDetail },
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin, tableHeightMixin],
data() { data() {
@ -135,62 +135,6 @@ export default {
subcomponent: RemainBox, subcomponent: RemainBox,
minWidth: 210, 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: [ searchBarFormConfig: [
{ {
@ -200,26 +144,6 @@ export default {
param: 'planId', param: 'planId',
filterable: true, 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', type: 'button',
btnName: '查询', btnName: '查询',
@ -230,7 +154,7 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('base:quality-inspection-type:export') type: this.$auth.hasPermi('se:maintain-plan:export')
? 'button' ? 'button'
: '', : '',
btnName: '导出', btnName: '导出',

View File

@ -70,7 +70,7 @@ import PlanConfigAddContent from './PlanConfig--addContent.vue';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue'; import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
export default { export default {
name: 'SpecialEquipmentPlanConfig', name: 'SpecialEquipmentMaintainPlanConfig',
components: { components: {
BaseDialog: BaseDialogWrapper, BaseDialog: BaseDialogWrapper,
DialogForm: PlanConfigAdd, DialogForm: PlanConfigAdd,
@ -81,23 +81,21 @@ export default {
const t = new Date(); const t = new Date();
const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()]; const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()];
return { return {
searchBarKeys: ['planName'], // 'specialType', 'equipmentName', 'createTime'], searchBarKeys: ['planName'],
tableBtn: [ tableBtn: [
// { this.$auth.hasPermi('se:maintain:update')
// type: 'detail', ? {
// btnName: '', type: 'addContent',
// }, btnName: '添加内容',
{ }
type: 'addContent', : undefined,
btnName: '添加内容', this.$auth.hasPermi('se:maintain:update')
},
this.$auth.hasPermi('equipment:plan-config:update')
? { ? {
type: 'edit', type: 'edit',
btnName: '修改', btnName: '修改',
} }
: undefined, : undefined,
this.$auth.hasPermi('equipment:plan-config:delete') this.$auth.hasPermi('se:maintain:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -171,9 +169,7 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('equipment:plan-config:create') type: this.$auth.hasPermi('se:maintain:create') ? 'button' : '',
? 'button'
: '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
plain: true, plain: true,

View File

@ -30,8 +30,12 @@
<div class="drawer-body__content"> <div class="drawer-body__content">
<section> <section>
<!-- <SmallTitle>保养信息</SmallTitle> --> <!-- <SmallTitle>保养信息</SmallTitle> -->
<div class="form-part" style="margin-bottom: 32px"> <div
<el-skeleton v-if="!showForm" animated /> class="form-part"
style="margin-bottom: 32px">
<el-skeleton
v-if="!showForm"
animated />
<el-form <el-form
v-else v-else
ref="form" ref="form"
@ -40,14 +44,18 @@
v-loading="formLoading"> v-loading="formLoading">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="计划保养人员" prop="planMaintainWorker"> <el-form-item
<span>{{ form.planMaintainWorker }}</span> label="计划保养人员"
prop="planMaintainWorker">
<span>{{ form.planMaintainWorker || '---' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="实际保养人员" prop="maintainWorker"> <el-form-item
<span>{{ form.maintainWorker }}</span> label="实际保养人员"
prop="maintainWorker">
<span>{{ form.maintainWorker || '---' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>

View File

@ -21,15 +21,7 @@
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:max-height="tableH" :max-height="tableH"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun"> @emitFun="handleEmitFun"></base-table>
<!-- <method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> -->
</base-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination
@ -106,28 +98,21 @@ export default {
return { return {
recordDetailVisible: false, recordDetailVisible: false,
searchBarKeys: [ searchBarKeys: ['maintainPlanId', 'startTime', 'special'],
'maintainPlanId',
'startTime',
'special',
// 'relatePlan',
// 'equipmentId',
// 'specialType',
],
tableBtn: [ tableBtn: [
this.$auth.hasPermi('equipment:maintain-record:update') this.$auth.hasPermi('se:maintain-record:update')
? { ? {
type: 'detail', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
this.$auth.hasPermi('equipment:maintain-record:update') this.$auth.hasPermi('se:maintain-record:update')
? { ? {
type: 'edit', type: 'edit',
btnName: '修改', btnName: '修改',
} }
: undefined, : undefined,
this.$auth.hasPermi('equipment:maintain-record:delete') this.$auth.hasPermi('se:maintain-record:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -135,13 +120,6 @@ export default {
: undefined, : undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
// {
// prop: 'createTime',
// label: '',
// fixed: true,
// width: 150,
// filter: timeFilter,
// },
{ {
prop: 'maintainOrderNumber', prop: 'maintainOrderNumber',
label: '设备保养单号', label: '设备保养单号',
@ -246,7 +224,7 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('equipment:maintain-record:export') type: this.$auth.hasPermi('se:maintain-record:export')
? 'button' ? 'button'
: '', : '',
btnName: '导出', btnName: '导出',
@ -254,15 +232,6 @@ export default {
plain: true, plain: true,
color: 'primary', color: 'primary',
}, },
// {
// type: this.$auth.hasPermi('equipment:maintain-record:create')
// ? 'button'
// : '',
// btnName: '',
// name: 'add',
// plain: true,
// color: 'success',
// },
], ],
rows: [ rows: [
[ [

View File

@ -88,25 +88,19 @@ export default {
'specialType', 'specialType',
], ],
tableBtn: [ tableBtn: [
this.$auth.hasPermi('equipment:repair:finish') this.$auth.hasPermi('se:repair:finish')
? { ? {
type: 'finish', type: 'finish',
btnName: '完成', btnName: '完成',
} }
: undefined, : undefined,
this.$auth.hasPermi('equipment:repair:update') this.$auth.hasPermi('se:repair:update')
? { ? {
type: 'detail', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
// this.$auth.hasPermi('equipment:repair:update') this.$auth.hasPermi('se:repair:delete')
// ? {
// type: 'edit',
// btnName: '',
// }
// : undefined,
this.$auth.hasPermi('equipment:repair:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -114,13 +108,6 @@ export default {
: undefined, : undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
// {
// prop: 'createTime',
// label: '',
// fixed: true,
// width: 150,
// filter: parseTime,
// },
{ {
prop: 'repairOrderNumber', prop: 'repairOrderNumber',
label: '设备维修单号', label: '设备维修单号',
@ -186,52 +173,8 @@ export default {
minWidth: 120, minWidth: 120,
showOverflowtooltip: true, 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: [ searchBarFormConfig: [
// {
// type: 'select',
// label: '',
// placeholder: '',
// param: 'specialType',
// onchange: true,
// selectOptions: [
// { id: 1, name: '' },
// { id: 2, name: '' },
// { id: 3, name: '' },
// ],
// filterable: true,
// },
{ {
type: 'select', type: 'select',
label: '设备', label: '设备',
@ -256,7 +199,6 @@ export default {
dateType: 'daterange', // datetimerange dateType: 'daterange', // datetimerange
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss', valueFormat: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'timestamp',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始日期', startPlaceholder: '开始日期',
endPlaceholder: '结束日期', endPlaceholder: '结束日期',
@ -273,14 +215,14 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '', type: this.$auth.hasPermi('se:repair:export') ? 'button' : '',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
plain: true, plain: true,
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('equipment:repair:create') ? 'button' : '', type: this.$auth.hasPermi('se:repair:create') ? 'button' : '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
plain: true, plain: true,

View File

@ -14,22 +14,6 @@
@select-changed="handleSearchBarChange" @select-changed="handleSearchBarChange"
@headBtnClick="handleSearchBarBtnClick" /> @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 <WaitingListTable
ref="waiting-list-table" ref="waiting-list-table"
:table-data="list" :table-data="list"
@ -61,9 +45,16 @@
ref="form" ref="form"
v-model="form" v-model="form"
:disabled="mode == 'detail'" /> :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-col :span="12">
<el-button size="small" class="btnTextStyle" @click="cancel"> <el-button
size="small"
class="btnTextStyle"
@click="cancel">
关闭 关闭
</el-button> </el-button>
</el-col> </el-col>
@ -107,32 +98,8 @@ import WaitingListTable from './WaitingListTable.vue';
import RecordDetail from './Record--detail.vue'; import RecordDetail from './Record--detail.vue';
import BaseDialogWrapper from '../components/BaseDialogWrapper.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 { export default {
name: 'SpecialEquipmentMaintainRecord', name: 'SpecialEquipmentMaintainRecordUnconfirmed',
components: { components: {
DialogFormUnplanned, DialogFormUnplanned,
WaitingListTable, WaitingListTable,
@ -146,235 +113,9 @@ export default {
data() { data() {
return { return {
recordDetailVisible: false, recordDetailVisible: false,
searchBarKeys: [ searchBarKeys: ['maintainPlanId', 'startTime', 'special'],
'maintainPlanId',
'startTime',
'special',
// 'relatePlan',
// 'equipmentId',
// 'specialType',
],
tobeConfirmedIdList: [], 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: [ 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', type: 'select',
label: '保养计划名称', label: '保养计划名称',
@ -399,16 +140,6 @@ export default {
defaultSelect: null, defaultSelect: null,
// width: 350, // width: 350,
}, },
// {
// type: 'select',
// label: '',
// selectOptions: [
// { name: '', id: 1 },
// { name: '', id: 2 },
// ],
// defaultSelect: null,
// param: 'relatePlan',
// },
{ {
type: 'button', type: 'button',
btnName: '查询', btnName: '查询',
@ -419,21 +150,25 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: 'button', type: this.$auth.hasPermi('se:maintain-record-pre:create')
? 'button'
: '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
plain: true, plain: true,
color: 'success', color: 'success',
}, },
{ {
type: 'button', type: this.$auth.hasPermi('se:maintain-record-pre:confirm-all')
? 'button'
: '',
btnName: '批量确认', btnName: '批量确认',
name: 'batchConfirm', name: 'batchConfirm',
color: 'primary', color: 'primary',
plain: true, plain: true,
}, },
{ {
type: this.$auth.hasPermi('equipment:maintain-record:export') type: this.$auth.hasPermi('se:maintain-record-pre:export')
? 'button' ? 'button'
: '', : '',
btnName: '导出', btnName: '导出',
@ -441,15 +176,6 @@ export default {
plain: true, plain: true,
color: 'primary', color: 'primary',
}, },
// {
// type: this.$auth.hasPermi('equipment:maintain-record:create')
// ? 'button'
// : '',
// btnName: '',
// name: 'add',
// plain: true,
// color: 'success',
// },
], ],
// //
open: false, open: false,
@ -483,30 +209,7 @@ export default {
}, },
created() { created() {
this.initSearchBar(); 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(); this.getList();
// if (this.$route.query.addRecord) {
// this.handleAdd();
// }
}, },
methods: { methods: {
/** 批量确认 */ /** 批量确认 */
@ -531,60 +234,6 @@ export default {
break; 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 }) { handleSearchBarChange({ param, value }) {
if ('specialType' === param) { if ('specialType' === param) {
@ -598,10 +247,6 @@ export default {
} }
}, },
initSearchBar() { 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', { this.http('/base/equipment-maintain-plan/page', 'get', {
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
@ -609,7 +254,6 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
this.$set( this.$set(
this.searchBarFormConfig[0], this.searchBarFormConfig[0],
// this.searchBarFormConfig[2],
'selectOptions', 'selectOptions',
(data?.list || []).map((item) => ({ (data?.list || []).map((item) => ({
name: item.name, name: item.name,
@ -625,7 +269,6 @@ export default {
this.recv({ this.recv({
...this.queryParams, ...this.queryParams,
special: true, special: true,
// relatePlan: 2,
confirmed: false, confirmed: false,
}).then((response) => { }).then((response) => {
this.list = response.data.list; this.list = response.data.list;
@ -730,35 +373,6 @@ export default {
}, 450); }, 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();
// });
// });
}); });
}, },
/** 确认 */ /** 确认 */

View File

@ -144,6 +144,7 @@
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip <el-tooltip
v-if="$auth.hasPermi('se:maintain-record-pre:confirm')"
content="确认" content="确认"
placement="top"> placement="top">
<el-button <el-button
@ -155,8 +156,13 @@
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<!-- line --> <!-- 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 <el-tooltip
v-if="$auth.hasPermi('se:maintain-record-pre:update')"
content="查看详情" content="查看详情"
placement="top"> placement="top">
<el-button <el-button
@ -167,8 +173,13 @@
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<!-- line --> <!-- 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 <el-tooltip
v-if="$auth.hasPermi('se:maintain-record-pre:update')"
content="编辑" content="编辑"
placement="top"> placement="top">
<el-button <el-button