bug ui
This commit is contained in:
parent
904350a4d8
commit
fa5a303c08
@ -142,6 +142,9 @@ function findMaxLabelWidth(rows) {
|
|||||||
if (!opt.label) return 0;
|
if (!opt.label) return 0;
|
||||||
if (opt.label.length > max) {
|
if (opt.label.length > max) {
|
||||||
max = opt.label.length;
|
max = opt.label.length;
|
||||||
|
if (opt.label.includes('(')) {
|
||||||
|
max = max - 3
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -239,7 +242,7 @@ export default {
|
|||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -83,7 +83,7 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
placeholder: '请输入内容',
|
placeholder: '请输入内容',
|
||||||
readOnly: true,
|
// readOnly: false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -123,11 +123,13 @@ export default {
|
|||||||
const editor = this.$refs.editor;
|
const editor = this.$refs.editor;
|
||||||
this.Quill = new Quill(editor, this.options);
|
this.Quill = new Quill(editor, this.options);
|
||||||
// 取消自动聚焦 start
|
// 取消自动聚焦 start
|
||||||
|
this.Quill?.enable(false);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
this.Quill?.enable(true);
|
||||||
this.Quill?.blur();
|
this.Quill?.blur();
|
||||||
if (!this.readOnly) {
|
// if (!this.readOnly) {
|
||||||
this.Quill?.enable();
|
// this.Quill?.enable();
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
// 如果设置了上传地址则自定义图片上传事件
|
// 如果设置了上传地址则自定义图片上传事件
|
||||||
if (this.type === 'url') {
|
if (this.type === 'url') {
|
||||||
@ -196,7 +198,7 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss" scoped>
|
||||||
.editor-wrapper {
|
.editor-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
<el-drawer
|
<el-drawer
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="mode.includes('detail') ? true : false"
|
||||||
|
:before-close="handleCancel"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
custom-class="mes-drawer"
|
custom-class="mes-drawer"
|
||||||
:size="size || '50%'"
|
:size="size || '50%'"
|
||||||
@ -129,13 +130,12 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">返回</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="!mode.includes('detail')"
|
|
||||||
@click="handleSave">
|
@click="handleSave">
|
||||||
保存
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
<el-drawer
|
<el-drawer
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="mode.includes('detail') ? true : false"
|
||||||
|
:before-close="handleCancel"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
custom-class="mes-drawer"
|
custom-class="mes-drawer"
|
||||||
:size="size || '50%'"
|
:size="size || '50%'"
|
||||||
@ -128,11 +129,10 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="!mode.includes('detail')"
|
|
||||||
@click="handleCancel">
|
@click="handleCancel">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="title"
|
:dialogTitle="title"
|
||||||
:dialogVisible="open"
|
:dialogVisible="open"
|
||||||
width="700px"
|
width="30%"
|
||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
label="操作"
|
label="操作"
|
||||||
|
:width="90"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleTableBtnClick" />
|
@clickBtn="handleTableBtnClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
@ -41,7 +42,7 @@
|
|||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="title"
|
:dialogTitle="title"
|
||||||
:dialogVisible="open"
|
:dialogVisible="open"
|
||||||
width="700px"
|
width="45%"
|
||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
@ -127,7 +128,7 @@ export default {
|
|||||||
// width: 180,
|
// width: 180,
|
||||||
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||||
// },
|
// },
|
||||||
{ prop: 'code', label: '编码' },
|
{ prop: 'code', label: '编码', showOverflowtooltip: true },
|
||||||
{ prop: 'plcTableName', label: '关联表名' },
|
{ prop: 'plcTableName', label: '关联表名' },
|
||||||
{ prop: 'name', label: '标识名称' },
|
{ prop: 'name', label: '标识名称' },
|
||||||
{ prop: 'enName', label: '英文名称' },
|
{ prop: 'enName', label: '英文名称' },
|
||||||
@ -136,7 +137,7 @@ export default {
|
|||||||
label: '是否采集',
|
label: '是否采集',
|
||||||
subcomponent: switchBtn,
|
subcomponent: switchBtn,
|
||||||
},
|
},
|
||||||
{ prop: 'description', label: '描述' },
|
{ prop: 'description', label: '描述', showOverflowtooltip: true },
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@ -213,16 +214,28 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
// {
|
||||||
|
// switch: true,
|
||||||
|
// label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集
|
||||||
|
// prop: 'collection',
|
||||||
|
// bind: {
|
||||||
|
// 'active-value': 1,
|
||||||
|
// 'inactive-value': 0,
|
||||||
|
// value: 1,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
switch: true,
|
select: true,
|
||||||
label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集
|
options: [
|
||||||
|
{ label: '否', value: 0 },
|
||||||
|
{ label: '是', value: 1 }
|
||||||
|
],
|
||||||
|
label: '是否采集',
|
||||||
prop: 'collection',
|
prop: 'collection',
|
||||||
bind: {
|
bind: {
|
||||||
'active-value': 1,
|
clearable: true, filterable: true
|
||||||
'inactive-value': 0,
|
}
|
||||||
value: 1,
|
}
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
<el-drawer
|
<el-drawer
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="mode.includes('detail') ? true : false"
|
||||||
|
:before-close="handleCancel"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
custom-class="mes-drawer"
|
custom-class="mes-drawer"
|
||||||
:size="size || '50%'"
|
:size="size || '50%'"
|
||||||
@ -147,13 +148,12 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="!mode.includes('detail')"
|
|
||||||
@click="handleSave">
|
@click="handleSave">
|
||||||
保存
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="isdetail"
|
:wrapper-closable="isdetail"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="60%">
|
size="60%"
|
||||||
|
@closed="$emit('destroy')">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ isdetail ? '查看详情' : !dataForm.id ? '新增' : '编辑' }}
|
{{ isdetail ? '查看详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
@ -265,6 +266,7 @@ export default {
|
|||||||
this.fileName = this.dataForm.files[0].fileName
|
this.fileName = this.dataForm.files[0].fileName
|
||||||
}
|
}
|
||||||
this.setConfig()
|
this.setConfig()
|
||||||
|
this.setInspectionContet()
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// if (this.urlOptions.isGetCode) {
|
// if (this.urlOptions.isGetCode) {
|
||||||
|
@ -49,7 +49,8 @@
|
|||||||
<addRecord
|
<addRecord
|
||||||
v-if="addOrUpdateVisible"
|
v-if="addOrUpdateVisible"
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="getList" />
|
@refreshDataList="getList"
|
||||||
|
@destroy="addOrUpdateVisible = false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
<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'
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
@ -67,7 +67,7 @@ const remainBox = {
|
|||||||
color() {
|
color() {
|
||||||
if (this.value) {
|
if (this.value) {
|
||||||
const v = +this.value;
|
const v = +this.value;
|
||||||
return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
|
return v < 0 ? '#FF5454' : v >= 0 && v < 2 ? '#FFD767' : '#37D97F';
|
||||||
}
|
}
|
||||||
return 'unset';
|
return 'unset';
|
||||||
},
|
},
|
||||||
@ -78,9 +78,10 @@ const remainBox = {
|
|||||||
style={`background: ${
|
style={`background: ${
|
||||||
this.color
|
this.color
|
||||||
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
|
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
|
||||||
this.color == 'red' ? '#fff' : 'unset'
|
// this.color == 'red' ? '#fff' : 'unset'
|
||||||
|
'#fff'
|
||||||
}`}>
|
}`}>
|
||||||
{this.injectData[this.injectData.prop] || ''}
|
{ this.injectData[this.injectData.prop]?.toFixed(0) || '' }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -121,30 +122,35 @@ export default {
|
|||||||
// width: 180,
|
// width: 180,
|
||||||
// filter: parseTime(createTime),
|
// filter: parseTime(createTime),
|
||||||
// },
|
// },
|
||||||
{ prop: 'name', label: '保养计划' },
|
{ prop: 'name', label: '保养计划', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'lineName', label: '产线名' },
|
{ prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'sectionName', label: '工段名' },
|
{ prop: 'sectionName', label: '工段名', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'equipmentCode', label: '设备编码' },
|
{ prop: 'equipmentCode', label: '设备编码', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'maintenancePeriod', label: '保养频率' },
|
{ prop: 'maintenancePeriod', label: '保养频率' },
|
||||||
{
|
{
|
||||||
prop: 'maintainType',
|
prop: 'maintainType',
|
||||||
label: '保养类型',
|
label: '保养类型',
|
||||||
|
showOverflowtooltip: true,
|
||||||
filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
|
filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'lastMaintainTime',
|
prop: 'lastMaintainTime',
|
||||||
label: '上次保养时间',
|
label: '上次保养时间',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{ prop: 'nextMaintainTime', label: '计划下次保养时间', filter: parseTime },
|
{ prop: 'nextMaintainTime', label: '计划下次保养时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
|
||||||
{
|
{
|
||||||
prop: 'remainDays',
|
prop: 'remainDays',
|
||||||
label: '距离保养时间(天)',
|
label: '距离保养时间(天)',
|
||||||
subcomponent: remainBox,
|
subcomponent: remainBox,
|
||||||
|
minWidth: 150,
|
||||||
|
// showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{ prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
|
{ prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn, width: 100 },
|
||||||
{ prop: 'opt2', label: '保养记录', name: '查看详情', subcomponent: btn },
|
{ prop: 'opt2', label: '保养记录', name: '查看详情', subcomponent: btn, width: 100 },
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@ -176,6 +182,7 @@ export default {
|
|||||||
: '',
|
: '',
|
||||||
btnName: '导出',
|
btnName: '导出',
|
||||||
name: 'export',
|
name: 'export',
|
||||||
|
plain: true,
|
||||||
color: 'warning',
|
color: 'warning',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -99,23 +99,24 @@ export default {
|
|||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
label: '添加时间',
|
label: '添加时间',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
width: 180,
|
width: 150,
|
||||||
filter: timeFilter,
|
filter: timeFilter,
|
||||||
},
|
},
|
||||||
{ prop: 'maintainOrderNumber', label: '设备保养单号' },
|
{ prop: 'maintainOrderNumber', label: '设备保养单号', width: 110, showOverflowtooltip: true },
|
||||||
{ prop: 'startTime', label: '开始时间', filter: timeFilter },
|
{ prop: 'startTime', label: '开始时间', filter: timeFilter, minWidth: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'endTime', label: '结束时间', filter: timeFilter },
|
{ prop: 'endTime', label: '结束时间', filter: timeFilter, minWidth: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'maintainWorker', label: '保养人员' },
|
{ prop: 'maintainWorker', label: '保养人员', minWidth: 100, showOverflowtooltip: true },
|
||||||
{
|
{
|
||||||
prop: 'relatePlan',
|
prop: 'relatePlan',
|
||||||
label: '是否计划保养',
|
label: '是否计划保养',
|
||||||
|
width: 120,
|
||||||
filter: (v) => (v != null ? ['', '是', '否'][v] : ''),
|
filter: (v) => (v != null ? ['', '是', '否'][v] : ''),
|
||||||
},
|
},
|
||||||
{ prop: 'planName', label: '保养计划名称' },
|
{ prop: 'planName', label: '保养计划名称', minWidth: 120, showOverflowtooltip: true },
|
||||||
{ prop: 'maintainDuration', label: '计划保养用时(h)' },
|
{ prop: 'maintainDuration', label: '计划保养用时(h)', minWidth: 130, showOverflowtooltip: true },
|
||||||
{ prop: 'timeUsed', label: '实际保养用时(h)' },
|
{ prop: 'timeUsed', label: '实际保养用时(h)', minWidth: 130 },
|
||||||
{ prop: 'remark', label: '备注' },
|
{ prop: 'remark', label: '备注', minWidth: 100, showOverflowtooltip: true },
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@ -162,6 +163,15 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'separate',
|
type: 'separate',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi('equipment:maintain-record:export')
|
||||||
|
? 'button'
|
||||||
|
: '',
|
||||||
|
btnName: '导出',
|
||||||
|
name: 'export',
|
||||||
|
plain: true,
|
||||||
|
color: 'warning',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('equipment:maintain-record:create')
|
type: this.$auth.hasPermi('equipment:maintain-record:create')
|
||||||
? 'button'
|
? 'button'
|
||||||
@ -171,14 +181,6 @@ export default {
|
|||||||
plain: true,
|
plain: true,
|
||||||
color: 'success',
|
color: 'success',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi('equipment:maintain-record:export')
|
|
||||||
? 'button'
|
|
||||||
: '',
|
|
||||||
btnName: '导出',
|
|
||||||
name: 'export',
|
|
||||||
color: 'warning',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
rows: [
|
rows: [
|
||||||
[
|
[
|
||||||
@ -213,17 +215,29 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
// {
|
||||||
|
// switch: true,
|
||||||
|
// label: '是否计划保养',
|
||||||
|
// prop: 'relatePlan',
|
||||||
|
// bind: {
|
||||||
|
// 'active-value': 1,
|
||||||
|
// 'inactive-value': 2,
|
||||||
|
// },
|
||||||
|
// rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }],
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
switch: true,
|
select: true,
|
||||||
|
options: [
|
||||||
|
{ label: '是', value: 1 },
|
||||||
|
{ label: '否', value: 2 }
|
||||||
|
],
|
||||||
label: '是否计划保养',
|
label: '是否计划保养',
|
||||||
prop: 'relatePlan',
|
prop: 'relatePlan',
|
||||||
bind: {
|
bind: {
|
||||||
'active-value': 1,
|
clearable: true, filterable: true
|
||||||
'inactive-value': 2,
|
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }],
|
rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
{},
|
|
||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '所属计划',
|
label: '所属计划',
|
||||||
@ -234,6 +248,11 @@ export default {
|
|||||||
clearable: true,
|
clearable: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
input: true,
|
||||||
|
label: '保养用时',
|
||||||
|
prop: 'timeUsed',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -260,11 +279,7 @@ export default {
|
|||||||
clearable: true,
|
clearable: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{}
|
||||||
input: true,
|
|
||||||
label: '保养用时',
|
|
||||||
prop: 'timeUsed',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
|
@ -9,12 +9,16 @@
|
|||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="disabled"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="60%">
|
custom-class="mes-drawer"
|
||||||
|
size="65%"
|
||||||
|
@closed="$emit('destroy')">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ disabled ? '查看详情' : !dataForm.maintenanceStatus ? '修改' : '完成' }}
|
{{ disabled ? '查看详情' : !dataForm.maintenanceStatus ? '修改' : '完成' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
|
<div class="drawer-body flex">
|
||||||
|
<div class="drawer-body__content">
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
:model="dataForm"
|
:model="dataForm"
|
||||||
@ -55,11 +59,14 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-divider style="margin-top: -10px" />
|
||||||
|
|
||||||
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||||
{{ '可编辑信息' }}
|
{{ '设备维修信息' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="维修开始时间"
|
label="维修开始时间"
|
||||||
prop="maintenanceStartTime"
|
prop="maintenanceStartTime"
|
||||||
@ -72,8 +79,7 @@
|
|||||||
value-format="timestamp" />
|
value-format="timestamp" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="维修结束时间"
|
label="维修结束时间"
|
||||||
prop="maintenanceFinishTime"
|
prop="maintenanceFinishTime"
|
||||||
@ -86,8 +92,7 @@
|
|||||||
value-format="timestamp" />
|
value-format="timestamp" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="维修方式"
|
label="维修方式"
|
||||||
prop="repairMode"
|
prop="repairMode"
|
||||||
@ -104,9 +109,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="6">
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="故障类型" prop="faultType">
|
<el-form-item label="故障类型" prop="faultType">
|
||||||
<el-select
|
<el-select
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@ -129,7 +132,7 @@
|
|||||||
prop="faultDetail"
|
prop="faultDetail"
|
||||||
:rules="[{ required: true, message: '故障明细不能为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '故障明细不能为空', trigger: 'blur' }]">
|
||||||
<!-- // 富文本 -->
|
<!-- // 富文本 -->
|
||||||
<editor v-model="dataForm.faultDetail" :read-only="disabled" :min-height="380"/>
|
<editor v-model="dataForm.faultDetail" :read-only="disabled" :min-height="150"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -138,7 +141,7 @@
|
|||||||
<el-col>
|
<el-col>
|
||||||
<el-form-item label="维修记录" prop="maintenanceDetail">
|
<el-form-item label="维修记录" prop="maintenanceDetail">
|
||||||
<!-- // 富文本 -->
|
<!-- // 富文本 -->
|
||||||
<editor v-model="dataForm.maintenanceDetail" :read-only="disabled" :min-height="380"/>
|
<editor v-model="dataForm.maintenanceDetail" :read-only="disabled" :min-height="150"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -163,12 +166,11 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!disabled" class="drawer-body__footer">
|
||||||
<el-button style="" @click="goback()">{{ disabled ? '返回' : '取消' }}</el-button>
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
<!-- <el-button v-if="disabled" type="primary" @click="goEdit()">
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
编辑
|
</div>
|
||||||
</el-button> -->
|
</div>
|
||||||
<el-button v-if="!disabled" type="primary" @click="dataFormSubmit()">确定</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
@ -300,56 +302,39 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-date-editor,
|
|
||||||
.el-select {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.drawer-body__footer {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding: 18px;
|
|
||||||
}
|
|
||||||
.drawer >>> .el-drawer {
|
.drawer >>> .el-drawer {
|
||||||
border-radius: 8px 0 0 8px;
|
border-radius: 8px 0 0 8px;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .el-form-item__label {
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer >>> .el-drawer__header {
|
.drawer >>> .el-drawer__header {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 32px 32px 24px;
|
padding: 32px 32px 24px;
|
||||||
border-bottom: 1px solid #dcdfe6;
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
.drawer >>> .el-drawer__body {
|
|
||||||
flex: 1;
|
.small-title::before {
|
||||||
height: 1px;
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 4px;
|
||||||
|
height: 22px;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
background-color: #0b58ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer >>> .content {
|
.drawer-body__content {
|
||||||
padding: 30px 24px;
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
/* background: #eee; */
|
||||||
flex-direction: column;
|
padding: 20px 30px;
|
||||||
/* height: 100%; */
|
overflow-y: auto;
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .visual-part {
|
|
||||||
flex: 1 auto;
|
|
||||||
max-height: 76vh;
|
|
||||||
overflow: hidden;
|
|
||||||
overflow-y: scroll;
|
|
||||||
padding-right: 10px; /* 调整滚动条样式 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .el-form,
|
|
||||||
.drawer >>> .attr-list {
|
|
||||||
padding: 0 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer-body__footer {
|
.drawer-body__footer {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
label="操作"
|
label="操作"
|
||||||
:width="180"
|
:width="120"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleTableBtnClick" />
|
@clickBtn="handleTableBtnClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
@ -48,7 +48,8 @@
|
|||||||
<CustomDialogForm
|
<CustomDialogForm
|
||||||
v-if="addOrUpdateVisible"
|
v-if="addOrUpdateVisible"
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="getList" />
|
@refreshDataList="getList"
|
||||||
|
@destroy="addOrUpdateVisible = false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -69,12 +70,6 @@ export default {
|
|||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
searchBarKeys: ['maintenanceStatus', 'createTime', 'equipmentId'],
|
searchBarKeys: ['maintenanceStatus', 'createTime', 'equipmentId'],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('equipment:repair:update')
|
|
||||||
? {
|
|
||||||
type: 'detail',
|
|
||||||
btnName: '详情',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('equipment:repair:finish')
|
this.$auth.hasPermi('equipment:repair:finish')
|
||||||
? {
|
? {
|
||||||
type: 'finish',
|
type: 'finish',
|
||||||
@ -83,10 +78,16 @@ export default {
|
|||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('equipment:repair:update')
|
this.$auth.hasPermi('equipment:repair:update')
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'detail',
|
||||||
btnName: '修改',
|
btnName: '详情',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
|
// this.$auth.hasPermi('equipment:repair:update')
|
||||||
|
// ? {
|
||||||
|
// type: 'edit',
|
||||||
|
// btnName: '修改',
|
||||||
|
// }
|
||||||
|
// : undefined,
|
||||||
this.$auth.hasPermi('equipment:repair:delete')
|
this.$auth.hasPermi('equipment:repair:delete')
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
@ -99,29 +100,31 @@ export default {
|
|||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
label: '添加时间',
|
label: '添加时间',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
width: 180,
|
width: 150,
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
},
|
},
|
||||||
{ prop: 'repairOrderNumber', label: '设备维修单号' },
|
{ prop: 'repairOrderNumber', label: '设备维修单号', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'maintenanceStartTime', label: '开始时间', filter: parseTime },
|
{ prop: 'maintenanceStartTime', label: '开始时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
|
||||||
{
|
{
|
||||||
prop: 'maintenanceFinishTime',
|
prop: 'maintenanceFinishTime',
|
||||||
label: '结束时间',
|
label: '结束时间',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'maintenanceStatus',
|
prop: 'maintenanceStatus',
|
||||||
label: '维修状态',
|
label: '维修状态',
|
||||||
filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''),
|
filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''),
|
||||||
},
|
},
|
||||||
{ prop: 'maintenanceDuration', label: '维修时长(h)' },
|
{ prop: 'maintenanceDuration', label: '维修时长(h)', width: 110 },
|
||||||
{ prop: 'lineName', label: '产线' },
|
{ prop: 'lineName', label: '产线' },
|
||||||
{ prop: 'sectionName', label: '工段' },
|
{ prop: 'sectionName', label: '工段' },
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'maintenanceDetail', label: '维修明细' },
|
{ prop: 'maintenanceDetail', label: '维修明细' },
|
||||||
{ prop: 'repairman', label: '维修工' },
|
{ prop: 'repairman', label: '维修工', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'repairmanPhone', label: '联系方式' },
|
{ prop: 'repairmanPhone', label: '联系方式', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'remark', label: '备注' },
|
{ prop: 'remark', label: '备注', minWidth: 120, showOverflowtooltip: true },
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@ -176,6 +179,7 @@ export default {
|
|||||||
type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
|
type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
|
||||||
btnName: '导出',
|
btnName: '导出',
|
||||||
name: 'export',
|
name: 'export',
|
||||||
|
plain: true,
|
||||||
color: 'warning',
|
color: 'warning',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user