projects/mesxc-lb #242

Merged
juzi merged 5 commits from projects/mesxc-lb into projects/mesxc-test 2024-03-14 09:03:50 +08:00
15 changed files with 270 additions and 177 deletions
Showing only changes of commit 26d2e2b7e5 - Show all commits

View File

@ -51,7 +51,8 @@
<addOrUpdata <addOrUpdata
v-if="addOrUpdateVisible" v-if="addOrUpdateVisible"
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="getList" /> @refreshDataList="getList"
@destroy="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -60,10 +61,11 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
import addOrUpdata from './add-or-updata.vue'; import addOrUpdata from './add-or-updata.vue';
import add from './add.vue'; import add from './add.vue';
import { parseTime } from '../../core/mixins/code-filter'; import { parseTime } from '../../core/mixins/code-filter';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
export default { export default {
name: 'SpecialEquipmentCheckConfig', name: 'SpecialEquipmentCheckConfig',
components: { addOrUpdata, add }, components: { addOrUpdata, add, BaseDialog: BaseDialogWrapperVue },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
@ -188,6 +190,7 @@ export default {
pageSize: 10, pageSize: 10,
name: null, name: null,
status: 0, status: 0,
special: true,
}, },
// //
form: {}, form: {},

View File

@ -9,7 +9,9 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="false" :wrapperClosable="true"
:close-on-click-modal="true"
:before-close="handleConfirmClose"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -171,7 +173,7 @@
</div> </div>
<div class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button style="" @click="handleCancel"> <el-button v-if="!disableEdit" @click="handleCancel">
{{ disableEdit ? '返回' : '取消' }} {{ disableEdit ? '返回' : '取消' }}
</el-button> </el-button>
<el-button <el-button
@ -206,35 +208,11 @@
<script> <script>
import DialogForm from '../../../components/DialogForm/index.vue'; import DialogForm from '../../../components/DialogForm/index.vue';
import { groupConnectWorkshop } from '@/utils/equipment-module'; import { groupConnectWorkshop } from '@/utils/equipment-module';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
const SmallTitle = { import SmallTitle from '../components/SmallTitle.js';
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
components: { SmallTitle, DialogForm }, components: { SmallTitle, DialogForm, BaseDialog: BaseDialogWrapperVue },
props: ['dataId'], // dataId id props: ['dataId'], // dataId id
data() { data() {
return { return {
@ -411,6 +389,35 @@ export default {
this.getList('inspector'); this.getList('inspector');
}, },
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
if (this.disableEdit) return this.handleCancel();
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.handleCancel();
}
} catch (err) {
return false;
}
},
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
switch (btn.btnName) { switch (btn.btnName) {
case 'search': case 'search':

View File

@ -64,10 +64,18 @@ import { parseTime } from '../../core/mixins/code-filter';
import CheckOrderListTable from './CheckOrderListTable.vue'; import CheckOrderListTable from './CheckOrderListTable.vue';
import edit from './Content-edit.vue'; import edit from './Content-edit.vue';
import AddCheckDet from './Content-add_detail.vue'; import AddCheckDet from './Content-add_detail.vue';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
export default { export default {
name: 'SpecialEquipmentCheckConfig', name: 'SpecialEquipmentCheckConfig',
components: { addOrUpdata, add, edit, AddCheckDet, CheckOrderListTable }, components: {
addOrUpdata,
add,
edit,
AddCheckDet,
BaseDialog: BaseDialogWrapperVue,
CheckOrderListTable,
},
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
@ -86,7 +94,7 @@ export default {
? { ? {
type: 'edit', type: 'edit',
btnName: '修改', btnName: '修改',
} }
: undefined, : undefined,
{ {
type: 'detail', type: 'detail',
@ -96,7 +104,7 @@ export default {
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
} }
: undefined, : undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
@ -334,9 +342,8 @@ export default {
} }
return this.$axios({ return this.$axios({
url: url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`, // + checkPersonParam,
// + checkPersonParam,
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''), // '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
method: 'put', method: 'put',
data: [id], data: [id],

View File

@ -7,9 +7,10 @@
<template> <template>
<el-drawer <el-drawer
:visible="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:wrapper-closable="false" :wrapper-closable="true"
:close-on-click-modal="true"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -30,13 +31,13 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="巡检单名称" prop="name"> <el-form-item label="巡检单名称" prop="name">
<div style="">{{ form.name }}</div> <div style="">{{ form.name || '---' }}</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="部门" prop="department"> <el-form-item label="部门" prop="department">
<div style="">{{ form.department }}</div> <div style="">{{ form.department || '---' }}</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -111,7 +112,7 @@
</div> </div>
<div class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button style="" @click="handleCancel"> <el-button v-if="!disableEdit" @click="handleCancel">
{{ disableEdit ? '返回' : '取消' }} {{ disableEdit ? '返回' : '取消' }}
</el-button> </el-button>
<el-button <el-button
@ -146,35 +147,11 @@
<script> <script>
import { parseTime } from '../../core/mixins/code-filter'; import { parseTime } from '../../core/mixins/code-filter';
import DialogForm from '../../../components/DialogForm/index.vue'; import DialogForm from '../../../components/DialogForm/index.vue';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
const SmallTitle = { import SmallTitle from '../components/SmallTitle.js';
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
components: { SmallTitle, DialogForm }, components: { SmallTitle, DialogForm, BaseDialog: BaseDialogWrapperVue },
props: ['dataId'], // dataId id props: ['dataId'], // dataId id
filters: { parseTime }, filters: { parseTime },
data() { data() {

View File

@ -9,7 +9,9 @@
<el-drawer <el-drawer
:visible.sync="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:wrapper-closable="true" :wrapperClosable="true"
:close-on-click-modal="true"
@closed="$emit('destroy')"
class="drawer" class="drawer"
size="50%"> size="50%">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
@ -37,12 +39,12 @@
</el-col> --> </el-col> -->
<el-col :span="8"> <el-col :span="8">
<el-form-item label="巡检单名称" prop="name"> <el-form-item label="巡检单名称" prop="name">
{{ dataForm.name }} {{ dataForm.name || '---' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="部门" prop="department"> <el-form-item label="部门" prop="department">
{{ dataForm.department }} {{ dataForm.department || '---' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -94,7 +96,7 @@
@pagination="getList" /> @pagination="getList" />
<!-- <div class="drawer-body__footer"> <!-- <div class="drawer-body__footer">
<el-button type="primary" @click="goback()">关闭</el-button> <el-button type="primary" @click="goback()">返回</el-button>
</div> --> </div> -->
</div> </div>
</div> </div>
@ -111,7 +113,7 @@
<script> <script>
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import attrAdd from './attr-add'; import attrAdd from './attr-add';
import { DICT_TYPE, getDictDatas } from '@/utils/dict'; // import { DICT_TYPE, getDictDatas } from '@/utils/dict';
import { parseTime } from '../../core/mixins/code-filter'; import { parseTime } from '../../core/mixins/code-filter';
const tableBtn = [ const tableBtn = [
@ -183,6 +185,33 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.visible = false;
}
} catch (err) {
return false;
}
},
initData() { initData() {
this.checkDetList.splice(0); this.checkDetList.splice(0);
this.checkDetList.total = 0; this.checkDetList.total = 0;
@ -245,7 +274,7 @@ export default {
}); });
}, },
goback() { goback() {
this.$emit('refreshDataList'); // this.$emit('refreshDataList');
this.visible = false; this.visible = false;
// this.initData(); // this.initData();
}, },

View File

@ -51,7 +51,7 @@
<el-row style="text-align: right"> <el-row style="text-align: right">
<el-button @click="visible = false">取消</el-button> <el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button> <el-button type="primary" @click="dataFormSubmit()">保存</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>

View File

@ -9,7 +9,9 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="false" :wrapperClosable="true"
:close-on-click-modal="true"
:before-close="handleConfirmClose"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -115,7 +117,7 @@
</div> </div>
<div class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button style="" @click="cancel">返回</el-button> <!-- <el-button style="" @click="cancel">返回</el-button> -->
<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit"> <!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑 编辑
</el-button> </el-button>
@ -143,32 +145,7 @@
<script> <script>
import DialogForm from '@/components/DialogForm'; import DialogForm from '@/components/DialogForm';
import SmallTitle from '../components/SmallTitle.js';
const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
name: 'PlanConfig--addContent', name: 'PlanConfig--addContent',
@ -263,6 +240,35 @@ export default {
this.loadEquipments(); this.loadEquipments();
}, },
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
if (this.mode.includes('detail')) return this.cancel();
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.cancel();
}
} catch (err) {
return false;
}
},
show({ show({
departmentName, departmentName,
id, id,

View File

@ -61,7 +61,7 @@
</template> </template>
<script> <script>
import { publicFormatter } from '@/utils/dict'; // import { publicFormatter } from '@/utils/dict';
// import moment from 'moment'; // import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'; import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record';

View File

@ -243,6 +243,8 @@ export default {
methods: { methods: {
/** 确认是否关闭 */ /** 确认是否关闭 */
async handleConfirmClose() { async handleConfirmClose() {
if (this.mode.includes('detail')) return this.cancel();
if (document.querySelector('.small-title').innerText.includes('添加内容')) return this.cancel();
try { try {
if ( if (
await this.$confirm( await this.$confirm(

View File

@ -103,7 +103,7 @@ export default {
: undefined, : undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
{ prop: 'name', label: '计划名称' }, { prop: 'name', label: '保养计划名称' },
{ prop: 'departmentName', label: '部门' }, { prop: 'departmentName', label: '部门' },
{ width: 144, prop: 'lineName', label: '产线名' }, { width: 144, prop: 'lineName', label: '产线名' },
{ width: 132, prop: 'maintenancePeriod', label: '保养频率(天/次)' }, { width: 132, prop: 'maintenancePeriod', label: '保养频率(天/次)' },

View File

@ -9,7 +9,9 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="false" :wrapperClosable="true"
:close-on-click-modal="true"
:before-close="handleConfirmClose"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -84,7 +86,7 @@
</div> </div>
<div class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button style="" @click="cancel">返回</el-button> <!-- <el-button style="" @click="cancel">返回</el-button> -->
<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit"> <!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑 编辑
</el-button> </el-button>
@ -112,36 +114,12 @@
<script> <script>
import DialogForm from '@/components/DialogForm'; import DialogForm from '@/components/DialogForm';
import SmallTitle from '../components/SmallTitle.js';
const SmallTitle = { import BaseDialogWrapper from '../components/BaseDialogWrapper';
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default { export default {
name: 'PlanConfig--addContent', name: 'PlanConfig--addContent',
components: { SmallTitle, DialogForm }, components: { SmallTitle, DialogForm, BaseDialog: BaseDialogWrapper },
props: ['maintainData'], props: ['maintainData'],
data() { data() {
return { return {
@ -229,6 +207,35 @@ export default {
this.loadEquipments(); this.loadEquipments();
}, },
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
if (this.mode.includes('detail')) return this.cancel();
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.cancel();
}
} catch (err) {
return false;
}
},
show({ planMaintainWorker, id, maintainWorker }) { show({ planMaintainWorker, id, maintainWorker }) {
this.form = Object.assign( this.form = Object.assign(
{}, {},
@ -305,17 +312,14 @@ export default {
} }
try { try {
const res = await this.$axios( const res = await this.$axios('/base/equipment-maintain-log-det/page', {
'/base/equipment-maintain-log-det/page', params: {
{ pageNo: this.detailTableQuery.pageNo,
params: { pageSize: this.detailTableQuery.pageSize,
pageNo: this.detailTableQuery.pageNo, // planId: this.form.id,
pageSize: this.detailTableQuery.pageSize, logId: this.form.id,
// planId: this.form.id, },
logId: this.form.id, });
},
}
);
this.detailList = res.data?.list || []; this.detailList = res.data?.list || [];
this.detailTotal = res.data?.total || 0; this.detailTotal = res.data?.total || 0;
this.detailLoading = false; this.detailLoading = false;

View File

@ -70,10 +70,11 @@ import {
import { parseTime } from '@/utils/ruoyi'; import { parseTime } from '@/utils/ruoyi';
import htmls from './htmls.vue'; import htmls from './htmls.vue';
import DialogForm from './Repair--add.vue'; import DialogForm from './Repair--add.vue';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
export default { export default {
name: 'SpecialEquipmentRepair', name: 'SpecialEquipmentRepair',
components: { DetailDrawer, DialogForm }, components: { DetailDrawer, DialogForm, BaseDialog: BaseDialogWrapperVue },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
return { return {

View File

@ -97,42 +97,39 @@
</template> </template>
<script> <script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import DialogFormUnplanned from './WaitingList--add--unplanned.vue'; import DialogFormUnplanned from './WaitingList--add--unplanned.vue';
import UnplannedEditDrawer from './WaitingListUnplanned--edit.vue'; import UnplannedEditDrawer from './WaitingListUnplanned--edit.vue';
import PlannedEditDrawer from './WaitingListPlanned--edit.vue'; import PlannedEditDrawer from './WaitingListPlanned--edit.vue';
import UnplannedAddDet from './WaitingListUnplanned--add_detail.vue'; import UnplannedAddDet from './WaitingListUnplanned--add_detail.vue';
import { import { exportMaintainLogExcel } from '@/api/equipment/base/maintain/record';
exportMaintainLogExcel,
} from '@/api/equipment/base/maintain/record';
import WaitingListTable from './WaitingListTable.vue'; import WaitingListTable from './WaitingListTable.vue';
import RecordDetail from './Record--detail.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 timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
// const btn = {
const btn = { // name: 'tableBtn',
name: 'tableBtn', // props: ['injectData'],
props: ['injectData'], // data() {
data() { // return {};
return {}; // },
}, // methods: {
methods: { // handleClick() {
handleClick() { // this.$emit('emitData', {
this.$emit('emitData', { // action: this.injectData.label,
action: this.injectData.label, // value: this.injectData,
value: this.injectData, // });
}); // },
}, // },
}, // render: function (h) {
render: function (h) { // return (
return ( // <el-button type="text" onClick={this.handleClick}>
<el-button type="text" onClick={this.handleClick}> // {this.injectData.name}
{this.injectData.name} // </el-button>
</el-button> // );
); // },
}, // };
};
export default { export default {
name: 'SpecialEquipmentMaintainRecord', name: 'SpecialEquipmentMaintainRecord',
@ -143,6 +140,7 @@ export default {
UnplannedEditDrawer, UnplannedEditDrawer,
UnplannedAddDet, UnplannedAddDet,
PlannedEditDrawer, PlannedEditDrawer,
BaseDialog: BaseDialogWrapper,
}, },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {

View File

@ -9,7 +9,9 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="false" :wrapperClosable="true"
:close-on-click-modal="true"
:before-close="handleConfirmClose"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -482,6 +484,33 @@ export default {
this.getList('line'); this.getList('line');
}, },
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.handleCancel();
}
} catch (err) {
return false;
}
},
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
switch (btn.btnName) { switch (btn.btnName) {
case 'search': case 'search':

View File

@ -9,7 +9,9 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="false" :wrapperClosable="true"
:close-on-click-modal="true"
:before-close="handleConfirmClose"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
@ -419,6 +421,34 @@ export default {
this.getList('line'); this.getList('line');
}, },
methods: { methods: {
/** 确认是否关闭 */
async handleConfirmClose() {
try {
if (
await this.$confirm(
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
确认要关闭页面吗?
</h1>
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
确定关闭将不保留编辑内容
</p>
</div>,
{
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning',
}
)
) {
this.handleCancel();
}
} catch (err) {
return false;
}
},
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
console.log('btn', btn); console.log('btn', btn);
switch (btn.btnName) { switch (btn.btnName) {