projects/mesxc-lb #289

Merged
juzi merged 3 commits from projects/mesxc-lb into projects/mesxc-test 2024-03-28 16:00:19 +08:00
13 changed files with 113 additions and 663 deletions

View File

@ -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,
@ -350,9 +346,6 @@ export default {
mounted() {
this.getList();
},
activated() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {

View File

@ -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: '新增',
@ -340,9 +340,6 @@ export default {
mounted() {
this.getList();
},
activated() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {

View File

@ -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: '新增',
@ -338,9 +338,6 @@ export default {
mounted() {
this.getList();
},
activated() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {

View File

@ -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: '',

View File

@ -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,

View File

@ -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: '',

View File

@ -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: '导出',

View File

@ -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: '',
// },
{
type: 'addContent',
btnName: '添加内容',
},
this.$auth.hasPermi('equipment:plan-config:update')
this.$auth.hasPermi('se:maintain:update')
? {
type: 'addContent',
btnName: '添加内容',
}
: 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,

View File

@ -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>

View File

@ -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: [
[

View File

@ -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,

View File

@ -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();
// });
// });
});
},
/** 确认 */

View File

@ -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