Compare commits
No commits in common. "e2a16332bec1749dd08de8472b3ec74ff88fe720" and "50a75dcb74f0afe9f0885e2f42c0d689e65832f2" have entirely different histories.
e2a16332be
...
50a75dcb74
@ -142,9 +142,6 @@ function findMaxLabelWidth(rows) {
|
||||
if (!opt.label) return 0;
|
||||
if (opt.label.length > max) {
|
||||
max = opt.label.length;
|
||||
if (opt.label.includes('(')) {
|
||||
max = max - 3
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -242,7 +239,7 @@ export default {
|
||||
size: {
|
||||
type: String,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -83,7 +83,7 @@ export default {
|
||||
],
|
||||
},
|
||||
placeholder: '请输入内容',
|
||||
// readOnly: false,
|
||||
readOnly: true,
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -123,13 +123,11 @@ export default {
|
||||
const editor = this.$refs.editor;
|
||||
this.Quill = new Quill(editor, this.options);
|
||||
// 取消自动聚焦 start
|
||||
this.Quill?.enable(false);
|
||||
this.$nextTick(() => {
|
||||
this.Quill?.enable(true);
|
||||
this.Quill?.blur();
|
||||
// if (!this.readOnly) {
|
||||
// this.Quill?.enable();
|
||||
// }
|
||||
if (!this.readOnly) {
|
||||
this.Quill?.enable();
|
||||
}
|
||||
});
|
||||
// 如果设置了上传地址则自定义图片上传事件
|
||||
if (this.type === 'url') {
|
||||
@ -198,7 +196,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style>
|
||||
.editor-wrapper {
|
||||
position: relative;
|
||||
cursor: not-allowed;
|
||||
|
@ -78,6 +78,7 @@ export default {
|
||||
return this.http(this.infoUrl == '' ? this.infoPath : this.infoUrl, 'get', payload);
|
||||
},
|
||||
del(payload) {
|
||||
debugger;
|
||||
return this.http(this.deleteUrl == '' ? this.deletePath : this.deleteUrl, 'delete', payload);
|
||||
},
|
||||
|
||||
|
@ -63,7 +63,7 @@ const tableProps = [
|
||||
}
|
||||
]
|
||||
export default {
|
||||
name: "EnergyQuantityRealtime",
|
||||
name: "EnergyPlc",
|
||||
data() {
|
||||
return {
|
||||
formConfig: [
|
||||
@ -125,34 +125,10 @@ export default {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260)
|
||||
})
|
||||
if (location.href.indexOf('?') > 0) {
|
||||
let arr = location.href.split('?')[1].split('&')
|
||||
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||
} else {
|
||||
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
||||
}
|
||||
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
||||
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
||||
this.getList();
|
||||
this.getTypeList()
|
||||
},
|
||||
watch: {
|
||||
$route: 'initData'
|
||||
},
|
||||
methods: {
|
||||
initData(to) {
|
||||
if (to.name === 'EnergyQuantityRealtime') {
|
||||
if (location.href.indexOf('?') > 0) {
|
||||
let arr = location.href.split('?')[1].split('&')
|
||||
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||
} else {
|
||||
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
||||
}
|
||||
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
||||
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.queryParams.energyTypeId = val.energyTypeId
|
||||
|
@ -80,7 +80,8 @@ export default {
|
||||
param: 'timeVal',
|
||||
defaultSelect: [],
|
||||
width: 350,
|
||||
clearable: false
|
||||
clearable: false,
|
||||
required:true
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@ -121,11 +122,35 @@ export default {
|
||||
this.tableH = this.tableHeight(260)
|
||||
this.isFold = this.searchBarWidth('energyReportSearchBox', 1180)
|
||||
})
|
||||
if (location.href.indexOf('?') > 0) {
|
||||
let arr = location.href.split('?')[1].split('&')
|
||||
this.formConfig[2].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||
} else {
|
||||
this.formConfig[2].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
||||
}
|
||||
this.queryParams.startTime = this.formConfig[2].defaultSelect[0]
|
||||
this.queryParams.endTime = this.formConfig[2].defaultSelect[1]
|
||||
this.getList()
|
||||
this.getTypeList()
|
||||
this.isFold = this.searchBarWidth('energyReportSearchBox', 1180)
|
||||
},
|
||||
watch: {
|
||||
$route: 'initData'
|
||||
},
|
||||
methods: {
|
||||
initData(to) {
|
||||
if (to.name === 'EnergyReportSearch') {
|
||||
if (location.href.indexOf('?') > 0) {
|
||||
let arr = location.href.split('?')[1].split('&')
|
||||
this.formConfig[2].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||
} else {
|
||||
this.formConfig[2].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
||||
}
|
||||
this.queryParams.startTime = this.formConfig[2].defaultSelect[0]
|
||||
this.queryParams.endTime = this.formConfig[2].defaultSelect[1]
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
getTypeList() {
|
||||
getEnergyTypeListAll().then((res) => {
|
||||
this.formConfig[1].selectOptions = res.data || []
|
||||
|
@ -94,7 +94,7 @@ export default {
|
||||
return {
|
||||
readOnly: false,
|
||||
chosedLogId: false,
|
||||
searchBarKeys: ['equipmentName', 'createTime'],
|
||||
searchBarKeys: ['equipmentName', 'recordTime'],
|
||||
tableBtn: [
|
||||
// this.$auth.hasPermi('equipment:spare-parts-config:update')
|
||||
// ? {
|
||||
@ -124,11 +124,11 @@ export default {
|
||||
label: '报警级别',
|
||||
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
|
||||
},
|
||||
{ prop: 'createTime', label: '报警时间', filter: timeFilter },
|
||||
{ prop: 'alarmCode', label: '设备报警码' },
|
||||
{ prop: 'createTime', label: '报警时间', filter: timeFilter }, // 接口缺
|
||||
{ prop: 'alarmCode', label: '设备报警码' }, // 接口缺
|
||||
{ prop: 'alarmContent', label: '报警内容' },
|
||||
{ prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn },
|
||||
{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn },
|
||||
{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn }, // TODO: 是否换成按钮, 群里问
|
||||
// { prop: 'remark', label: '备注' },
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
@ -145,8 +145,8 @@ export default {
|
||||
dateType: 'daterange', // datetimerange
|
||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||
format: 'yyyy-MM-dd',
|
||||
// valueFormat: 'timestamp',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'timestamp',
|
||||
// valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始日期',
|
||||
endPlaceholder: '结束日期',
|
||||
|
@ -9,8 +9,7 @@
|
||||
<el-drawer
|
||||
:visible="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="mode.includes('detail') ? true : false"
|
||||
:before-close="handleCancel"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
:size="size || '50%'"
|
||||
@ -130,12 +129,13 @@
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
|
||||
<el-button style="" @click="handleCancel">取消</el-button>
|
||||
<div class="drawer-body__footer">
|
||||
<el-button style="" @click="handleCancel">返回</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="!mode.includes('detail')"
|
||||
@click="handleSave">
|
||||
确定
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -9,8 +9,7 @@
|
||||
<el-drawer
|
||||
:visible="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="mode.includes('detail') ? true : false"
|
||||
:before-close="handleCancel"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
:size="size || '50%'"
|
||||
@ -129,10 +128,11 @@
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
|
||||
<div class="drawer-body__footer">
|
||||
<el-button style="" @click="handleCancel">取消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="!mode.includes('detail')"
|
||||
@click="handleCancel">
|
||||
确定
|
||||
</el-button>
|
||||
|
@ -34,7 +34,7 @@
|
||||
<base-dialog
|
||||
:dialogTitle="title"
|
||||
:dialogVisible="open"
|
||||
width="30%"
|
||||
width="700px"
|
||||
@close="cancel"
|
||||
@cancel="cancel"
|
||||
@confirm="submitForm">
|
||||
|
@ -25,7 +25,6 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="90"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
@ -42,7 +41,7 @@
|
||||
<base-dialog
|
||||
:dialogTitle="title"
|
||||
:dialogVisible="open"
|
||||
width="45%"
|
||||
width="700px"
|
||||
@close="cancel"
|
||||
@cancel="cancel"
|
||||
@confirm="submitForm">
|
||||
@ -128,7 +127,7 @@ export default {
|
||||
// width: 180,
|
||||
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||
// },
|
||||
{ prop: 'code', label: '编码', showOverflowtooltip: true },
|
||||
{ prop: 'code', label: '编码' },
|
||||
{ prop: 'plcTableName', label: '关联表名' },
|
||||
{ prop: 'name', label: '标识名称' },
|
||||
{ prop: 'enName', label: '英文名称' },
|
||||
@ -137,7 +136,7 @@ export default {
|
||||
label: '是否采集',
|
||||
subcomponent: switchBtn,
|
||||
},
|
||||
{ prop: 'description', label: '描述', showOverflowtooltip: true },
|
||||
{ prop: 'description', label: '描述' },
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
@ -214,28 +213,16 @@ export default {
|
||||
},
|
||||
],
|
||||
[
|
||||
// {
|
||||
// switch: true,
|
||||
// label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集
|
||||
// prop: 'collection',
|
||||
// bind: {
|
||||
// 'active-value': 1,
|
||||
// 'inactive-value': 0,
|
||||
// value: 1,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
select: true,
|
||||
options: [
|
||||
{ label: '否', value: 0 },
|
||||
{ label: '是', value: 1 }
|
||||
],
|
||||
label: '是否采集',
|
||||
switch: true,
|
||||
label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集
|
||||
prop: 'collection',
|
||||
bind: {
|
||||
clearable: true, filterable: true
|
||||
}
|
||||
}
|
||||
'active-value': 1,
|
||||
'inactive-value': 0,
|
||||
value: 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
|
@ -9,8 +9,7 @@
|
||||
<el-drawer
|
||||
:visible="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="mode.includes('detail') ? true : false"
|
||||
:before-close="handleCancel"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
:size="size || '50%'"
|
||||
@ -148,12 +147,13 @@
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
|
||||
<div class="drawer-body__footer">
|
||||
<el-button style="" @click="handleCancel">取消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="!mode.includes('detail')"
|
||||
@click="handleSave">
|
||||
确定
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -12,8 +12,7 @@
|
||||
:show-close="false"
|
||||
:wrapper-closable="isdetail"
|
||||
class="drawer"
|
||||
size="60%"
|
||||
@closed="$emit('destroy')">
|
||||
size="60%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ isdetail ? '查看详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
@ -266,7 +265,6 @@ export default {
|
||||
this.fileName = this.dataForm.files[0].fileName
|
||||
}
|
||||
this.setConfig()
|
||||
this.setInspectionContet()
|
||||
});
|
||||
} else {
|
||||
// if (this.urlOptions.isGetCode) {
|
||||
|
@ -49,8 +49,7 @@
|
||||
<addRecord
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getList"
|
||||
@destroy="addOrUpdateVisible = false" />
|
||||
@refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
<script>
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
// import moment from 'moment';
|
||||
import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
@ -67,7 +67,7 @@ const remainBox = {
|
||||
color() {
|
||||
if (this.value) {
|
||||
const v = +this.value;
|
||||
return v < 0 ? '#FF5454' : v >= 0 && v < 2 ? '#FFD767' : '#37D97F';
|
||||
return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
|
||||
}
|
||||
return 'unset';
|
||||
},
|
||||
@ -78,10 +78,9 @@ const remainBox = {
|
||||
style={`background: ${
|
||||
this.color
|
||||
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
|
||||
// this.color == 'red' ? '#fff' : 'unset'
|
||||
'#fff'
|
||||
this.color == 'red' ? '#fff' : 'unset'
|
||||
}`}>
|
||||
{ this.injectData[this.injectData.prop]?.toFixed(0) || '' }
|
||||
{this.injectData[this.injectData.prop] || ''}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@ -122,35 +121,30 @@ export default {
|
||||
// width: 180,
|
||||
// filter: parseTime(createTime),
|
||||
// },
|
||||
{ prop: 'name', label: '保养计划', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'sectionName', label: '工段名', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'equipmentCode', label: '设备编码', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'name', label: '保养计划' },
|
||||
{ prop: 'lineName', label: '产线名' },
|
||||
{ prop: 'sectionName', label: '工段名' },
|
||||
{ prop: 'equipmentName', label: '设备名称' },
|
||||
{ prop: 'equipmentCode', label: '设备编码' },
|
||||
{ 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: 'nextMaintainTime', label: '计划下次保养时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
|
||||
{ prop: 'nextMaintainTime', label: '计划下次保养时间', filter: parseTime },
|
||||
{
|
||||
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 },
|
||||
{ prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
|
||||
{ prop: 'opt2', label: '保养记录', name: '查看详情', subcomponent: btn },
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
@ -182,7 +176,6 @@ export default {
|
||||
: '',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
plain: true,
|
||||
color: 'warning',
|
||||
},
|
||||
],
|
||||
|
@ -99,24 +99,23 @@ export default {
|
||||
prop: 'createTime',
|
||||
label: '添加时间',
|
||||
fixed: true,
|
||||
width: 150,
|
||||
width: 180,
|
||||
filter: timeFilter,
|
||||
},
|
||||
{ prop: 'maintainOrderNumber', label: '设备保养单号', width: 110, showOverflowtooltip: true },
|
||||
{ prop: 'startTime', label: '开始时间', filter: timeFilter, minWidth: 150, showOverflowtooltip: true },
|
||||
{ prop: 'endTime', label: '结束时间', filter: timeFilter, minWidth: 150, showOverflowtooltip: true },
|
||||
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'maintainWorker', label: '保养人员', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'maintainOrderNumber', label: '设备保养单号' },
|
||||
{ prop: 'startTime', label: '开始时间', filter: timeFilter },
|
||||
{ prop: 'endTime', label: '结束时间', filter: timeFilter },
|
||||
{ prop: 'equipmentName', label: '设备名称' },
|
||||
{ prop: 'maintainWorker', label: '保养人员' },
|
||||
{
|
||||
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 },
|
||||
{ prop: 'planName', label: '保养计划名称' },
|
||||
{ prop: 'maintainDuration', label: '计划保养用时(h)' },
|
||||
{ prop: 'timeUsed', label: '实际保养用时(h)' },
|
||||
{ prop: 'remark', label: '备注' },
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
@ -163,15 +162,6 @@ export default {
|
||||
{
|
||||
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')
|
||||
? 'button'
|
||||
@ -181,6 +171,14 @@ export default {
|
||||
plain: true,
|
||||
color: 'success',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('equipment:maintain-record:export')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'warning',
|
||||
},
|
||||
],
|
||||
rows: [
|
||||
[
|
||||
@ -215,29 +213,17 @@ export default {
|
||||
},
|
||||
],
|
||||
[
|
||||
// {
|
||||
// switch: true,
|
||||
// label: '是否计划保养',
|
||||
// prop: 'relatePlan',
|
||||
// bind: {
|
||||
// 'active-value': 1,
|
||||
// 'inactive-value': 2,
|
||||
// },
|
||||
// rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }],
|
||||
// },
|
||||
{
|
||||
select: true,
|
||||
options: [
|
||||
{ label: '是', value: 1 },
|
||||
{ label: '否', value: 2 }
|
||||
],
|
||||
switch: true,
|
||||
label: '是否计划保养',
|
||||
prop: 'relatePlan',
|
||||
bind: {
|
||||
clearable: true, filterable: true
|
||||
'active-value': 1,
|
||||
'inactive-value': 2,
|
||||
},
|
||||
rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }],
|
||||
},
|
||||
{},
|
||||
{
|
||||
select: true,
|
||||
label: '所属计划',
|
||||
@ -248,11 +234,6 @@ export default {
|
||||
clearable: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
input: true,
|
||||
label: '保养用时',
|
||||
prop: 'timeUsed',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
@ -279,7 +260,11 @@ export default {
|
||||
clearable: true,
|
||||
},
|
||||
},
|
||||
{}
|
||||
{
|
||||
input: true,
|
||||
label: '保养用时',
|
||||
prop: 'timeUsed',
|
||||
},
|
||||
],
|
||||
|
||||
[
|
||||
|
@ -9,16 +9,12 @@
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="disabled"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
size="65%"
|
||||
@closed="$emit('destroy')">
|
||||
size="60%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ disabled ? '查看详情' : !dataForm.maintenanceStatus ? '修改' : '完成' }}
|
||||
</small-title>
|
||||
<div class="drawer-body flex">
|
||||
<div class="drawer-body__content">
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="dataForm"
|
||||
@ -59,14 +55,11 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider style="margin-top: -10px" />
|
||||
|
||||
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||
{{ '设备维修信息' }}
|
||||
{{ '可编辑信息' }}
|
||||
</small-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="维修开始时间"
|
||||
prop="maintenanceStartTime"
|
||||
@ -79,7 +72,8 @@
|
||||
value-format="timestamp" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="维修结束时间"
|
||||
prop="maintenanceFinishTime"
|
||||
@ -92,7 +86,8 @@
|
||||
value-format="timestamp" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="维修方式"
|
||||
prop="repairMode"
|
||||
@ -109,7 +104,9 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="故障类型" prop="faultType">
|
||||
<el-select
|
||||
:disabled="disabled"
|
||||
@ -132,7 +129,7 @@
|
||||
prop="faultDetail"
|
||||
:rules="[{ required: true, message: '故障明细不能为空', trigger: 'blur' }]">
|
||||
<!-- // 富文本 -->
|
||||
<editor v-model="dataForm.faultDetail" :read-only="disabled" :min-height="150"/>
|
||||
<editor v-model="dataForm.faultDetail" :read-only="disabled" :min-height="380"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -141,7 +138,7 @@
|
||||
<el-col>
|
||||
<el-form-item label="维修记录" prop="maintenanceDetail">
|
||||
<!-- // 富文本 -->
|
||||
<editor v-model="dataForm.maintenanceDetail" :read-only="disabled" :min-height="150"/>
|
||||
<editor v-model="dataForm.maintenanceDetail" :read-only="disabled" :min-height="380"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -166,11 +163,12 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div v-if="!disabled" class="drawer-body__footer">
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="drawer-body__footer">
|
||||
<el-button style="" @click="goback()">{{ disabled ? '返回' : '取消' }}</el-button>
|
||||
<!-- <el-button v-if="disabled" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
</el-button> -->
|
||||
<el-button v-if="!disabled" type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
@ -302,39 +300,56 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-date-editor,
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 18px;
|
||||
}
|
||||
.drawer >>> .el-drawer {
|
||||
border-radius: 8px 0 0 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer >>> .el-form-item__label {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.drawer >>> .el-drawer__header {
|
||||
margin: 0;
|
||||
padding: 32px 32px 24px;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.small-title::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 4px;
|
||||
height: 22px;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
background-color: #0b58ff;
|
||||
}
|
||||
|
||||
.drawer-body {
|
||||
.drawer >>> .el-drawer__body {
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.drawer-body__content {
|
||||
.drawer >>> .content {
|
||||
padding: 30px 24px;
|
||||
flex: 1;
|
||||
/* background: #eee; */
|
||||
padding: 20px 30px;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* height: 100%; */
|
||||
}
|
||||
|
||||
.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 {
|
||||
|
@ -17,7 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="120"
|
||||
:width="180"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
@ -48,8 +48,7 @@
|
||||
<CustomDialogForm
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getList"
|
||||
@destroy="addOrUpdateVisible = false" />
|
||||
@refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -70,6 +69,12 @@ export default {
|
||||
addOrUpdateVisible: false,
|
||||
searchBarKeys: ['maintenanceStatus', 'createTime', 'equipmentId'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('equipment:repair:update')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:repair:finish')
|
||||
? {
|
||||
type: 'finish',
|
||||
@ -78,16 +83,10 @@ export default {
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:repair:update')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
// this.$auth.hasPermi('equipment:repair:update')
|
||||
// ? {
|
||||
// type: 'edit',
|
||||
// btnName: '修改',
|
||||
// }
|
||||
// : undefined,
|
||||
this.$auth.hasPermi('equipment:repair:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
@ -100,31 +99,29 @@ export default {
|
||||
prop: 'createTime',
|
||||
label: '添加时间',
|
||||
fixed: true,
|
||||
width: 150,
|
||||
width: 180,
|
||||
filter: parseTime,
|
||||
},
|
||||
{ prop: 'repairOrderNumber', label: '设备维修单号', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'maintenanceStartTime', label: '开始时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
|
||||
{ prop: 'repairOrderNumber', label: '设备维修单号' },
|
||||
{ prop: 'maintenanceStartTime', label: '开始时间', filter: parseTime },
|
||||
{
|
||||
prop: 'maintenanceFinishTime',
|
||||
label: '结束时间',
|
||||
filter: parseTime,
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'maintenanceStatus',
|
||||
label: '维修状态',
|
||||
filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''),
|
||||
},
|
||||
{ prop: 'maintenanceDuration', label: '维修时长(h)', width: 110 },
|
||||
{ prop: 'maintenanceDuration', label: '维修时长(h)' },
|
||||
{ prop: 'lineName', label: '产线' },
|
||||
{ prop: 'sectionName', label: '工段' },
|
||||
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'equipmentName', label: '设备名称' },
|
||||
{ prop: 'maintenanceDetail', label: '维修明细' },
|
||||
{ prop: 'repairman', label: '维修工', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'repairmanPhone', label: '联系方式', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'remark', label: '备注', minWidth: 120, showOverflowtooltip: true },
|
||||
{ prop: 'repairman', label: '维修工' },
|
||||
{ prop: 'repairmanPhone', label: '联系方式' },
|
||||
{ prop: 'remark', label: '备注' },
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
@ -179,7 +176,6 @@ export default {
|
||||
type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
plain: true,
|
||||
color: 'warning',
|
||||
},
|
||||
],
|
||||
|
@ -290,8 +290,7 @@ export default {
|
||||
break;
|
||||
case '2': // 能源
|
||||
this.$router.push({
|
||||
// path: '/energy/monitoring/energy-report-search?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime
|
||||
path: '/energy/base/energy-quantity-realtime?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime
|
||||
path: '/energy/monitoring/energy-report-search?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime
|
||||
})
|
||||
break;
|
||||
default:
|
||||
|
@ -11,7 +11,7 @@
|
||||
<base-table class="base-table__margin" :table-props="productProps" :page="1" :limit="10" :table-data="list">
|
||||
</base-table>
|
||||
<div v-for="(item,index) in downProps" :key="index">
|
||||
<div class="blue-title">工单名称:{{ list[index].workOrderName }}</div>
|
||||
<div class="blue-title">工单:{{ list[index].workOrderName }}</div>
|
||||
<base-table class="base-table__margin" :table-props="item" :page="1" :limit="10"
|
||||
:table-data="downList[index]">
|
||||
</base-table>
|
||||
@ -214,7 +214,7 @@ export default {
|
||||
{
|
||||
// width: 160,
|
||||
prop: 'workOrderName',
|
||||
label: '工单名称',
|
||||
label: '工单名',
|
||||
},
|
||||
...this.dynamicProps,
|
||||
{
|
||||
|
@ -9,8 +9,8 @@
|
||||
<el-form ref="form" :model="innerDataForm" label-width="100px" v-loading="formLoading">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工单名称" prop="workOrderId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||
<el-select v-model="innerDataForm.workOrderId" placeholder="请选择工单名称" filterable clearable>
|
||||
<el-form-item label="工单号" prop="workOrderId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||
<el-select v-model="innerDataForm.workOrderId" placeholder="请选择工单号" filterable clearable>
|
||||
<el-option v-for="opt in workOrderList" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -141,8 +141,8 @@ export default {
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '工单名称',
|
||||
placeholder: '请选择工单名称',
|
||||
label: '工单号',
|
||||
placeholder: '请选择工单号',
|
||||
param: 'workOrderId',
|
||||
selectOptions: [],
|
||||
filterable:true
|
||||
@ -215,7 +215,7 @@ export default {
|
||||
{
|
||||
// width: 128,
|
||||
prop: 'workOrderName',
|
||||
label: '工单名称',
|
||||
label: '工单Id',
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
|
@ -67,8 +67,8 @@ export default {
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '工单名称',
|
||||
placeholder: '请选择工单名称',
|
||||
label: '工单号',
|
||||
placeholder: '请选择工单号',
|
||||
param: 'workOrderIdList',
|
||||
selectOptions: [],
|
||||
multiple: true,
|
||||
@ -205,8 +205,8 @@ export default {
|
||||
return [
|
||||
{
|
||||
// width: 128,
|
||||
prop: 'workOrderName',
|
||||
label: '工单名称',
|
||||
prop: 'workOrderId',
|
||||
label: '工单号',
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
|
Loading…
Reference in New Issue
Block a user