projects/mesxc-zhp #161

Closed
zhp wants to merge 119 commits from projects/mesxc-zhp into projects/mes-test
12 changed files with 9447 additions and 8942 deletions
Showing only changes of commit 8e7e31f918 - Show all commits

View File

@ -48,7 +48,7 @@
"benz-amr-recorder": "^1.1.5",
"bpmn-js-token-simulation": "0.10.0",
"clipboard": "2.0.8",
"code-brick-zj": "^1.0.2",
"code-brick-zj": "^1.0.5",
"core-js": "^3.26.0",
"crypto-js": "^4.0.0",
"diagram-js": "^12.3.0",

View File

@ -125,11 +125,8 @@ export default {
// start
this.Quill?.enable(false);
this.$nextTick(() => {
this.Quill?.enable(true);
this.Quill?.blur();
// if (!this.readOnly) {
// this.Quill?.enable();
// }
this.Quill?.enable(true);
});
//
if (this.type === 'url') {

View File

@ -78,7 +78,6 @@ 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);
},

View File

@ -94,7 +94,7 @@ export default {
return {
readOnly: false,
chosedLogId: false,
searchBarKeys: ['equipmentName', 'recordTime'],
searchBarKeys: ['equipmentName', 'createTime'],
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 }, // TODO:
{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn },
// { 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: '结束日期',

View File

@ -84,10 +84,10 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
{ prop: 'program', label: '巡检项目' },
{ prop: 'content', label: '巡检内容' },
{ prop: 'code', label: '巡检内容编码' },
{ prop: 'remark', label: '备注' },
{ prop: 'program', label: '巡检项目', showOverflowtooltip: true },
{ prop: 'content', label: '巡检内容', minWidth: 150, showOverflowtooltip: true },
{ prop: 'code', label: '巡检内容编码', showOverflowtooltip: true },
{ prop: 'remark', label: '备注', showOverflowtooltip: true },
],
searchBarFormConfig: [
{

View File

@ -60,8 +60,9 @@
</el-col>
</el-row>
<el-divider style="margin-top: -10px" />
<el-divider />
<div v-if=" disabled && dataForm.maintenanceStatus === 1 ? true : !disabled ? true : false">
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
{{ '设备维修信息' }}
</small-title>
@ -164,6 +165,7 @@
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<div v-if="!disabled" class="drawer-body__footer">
@ -249,7 +251,7 @@ export default {
getEqRepair(this.dataForm.id).then(response => {
this.formLoading = false
this.dataForm = response.data;
this.dataForm.maintenanceStatus = row.maintenanceStatus || 0
this.dataForm.maintenanceStatus = this.dataForm.maintenanceStatus || 0
if (this.dataForm.files.length > 0) {
this.file = this.dataForm.files[0].fileUrl
this.fileName = this.dataForm.files[0].fileName

View File

@ -121,7 +121,7 @@ export default {
{ prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
{ prop: 'maintenanceDetail', label: '维修明细' },
{ prop: 'maintenanceDetail', label: '维修明细', minWidth: 100, showOverflowtooltip: true },
{ prop: 'repairman', label: '维修工', minWidth: 100, showOverflowtooltip: true },
{ prop: 'repairmanPhone', label: '联系方式', minWidth: 100, showOverflowtooltip: true },
{ prop: 'remark', label: '备注', minWidth: 120, showOverflowtooltip: true },

View File

@ -9,41 +9,47 @@
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="false"
:wrapper-closable="disabled"
class="drawer"
size="60%">
size="60%"
@closed="$emit('destroy')">
<small-title slot="title" :no-padding="true">
{{ disabled ? '查看备件' : '添加备件' }}
</small-title>
<div class="content">
<el-form
ref="form"
:model="dataForm"
label-width="100px"
label-position="top"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="12">
<el-col :span="6">
<el-form-item label="配置名" prop="name">
<span>{{ dataForm.name }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="6">
<el-form-item label="设备名称" prop="equipmentName">
<span>{{ dataForm.equipmentName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-col :span="6">
<el-form-item label="负责人" prop="responsible">
<span>{{ dataForm.responsible }}</span>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="描述" prop="faultTime">
<editor v-model="dataForm.description" read-only :min-height="200"/>
<el-form-item label="描述" prop="description">
<div v-html="dataForm.description" style="padding: 5px; margin: 0; border: 1px solid #dfdfdf" />
<!-- <editor v-model="dataForm.description" read-only :min-height="200"/> -->
</el-form-item>
</el-form>
<div>
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
{{ '备品备件' }}
</small-title>
<div v-if="!disabled" class="action_btn">
<template>
<span style="display: inline-block;" @click="addNew()">
@ -72,10 +78,12 @@
:limit.sync="listQuery.pageSize"
:page-sizes="[5, 10, 15]"
@pagination="getList" />
</div>
<div class="drawer-body__footer">
<div v-if="!disabled" class="drawer-body__footer">
<el-button type="primary" @click="goback()">关闭</el-button>
</div>
</div>
<attr-add
v-if="addOrUpdateVisible"
@ -255,10 +263,10 @@ export default {
padding: 18px;
}
.action_btn {
/* float: right; */
float: right;
display: flex;
justify-content: right;
margin: 5px 15px;
margin: -35px 15px;
font-size: 14px;
}
.add {
@ -312,4 +320,7 @@ export default {
justify-content: flex-end;
padding: 18px;
}
.content {
padding: 0 20px;
}
</style>

View File

@ -17,7 +17,7 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="250"
:width="180"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -34,7 +34,7 @@
<base-dialog
:dialogTitle="title"
:dialogVisible="open"
width="35%"
width="50%"
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
@ -44,12 +44,14 @@
v-model="form"
:disabled="mode == 'detail'"
:has-files="false"
:rows="rows" />
:rows="rows"
style="margin: 0 30px" />
</base-dialog>
<addSparts
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getList" />
@refreshDataList="getList"
@destroy="addOrUpdateVisible = false" />
</div>
</template>
@ -79,22 +81,24 @@ export default {
// btnName: '',
// }
// : undefined,
this.$auth.hasPermi('equipment:spare-parts-config:update')
this.$auth.hasPermi('equipment:spare-parts-config:addParts')
? {
type: 'edit',
btnName: '修改',
type: 'addParts',
btnName: '添加',
showTip: '添加备件'
}
: undefined,
this.$auth.hasPermi('equipment:spare-parts-config:queryParts')
? {
type: 'queryParts',
btnName: '查看备件',
btnName: '查看',
showTip: '查看备件'
}
: undefined,
this.$auth.hasPermi('equipment:spare-parts-config:addParts')
this.$auth.hasPermi('equipment:spare-parts-config:update')
? {
type: 'addParts',
btnName: '添加备件',
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('equipment:spare-parts-config:delete')
@ -105,15 +109,15 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
{ prop: 'name', label: '配置名' },
{ prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备名' },
{ prop: 'equipmentCode', label: '设备编码' },
{ prop: 'responsible', label: '负责人' },
{ 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: 120, showOverflowtooltip: true },
{ prop: 'equipmentCode', label: '设备编码', minWidth: 100, showOverflowtooltip: true },
{ prop: 'responsible', label: '负责人', minWidth: 150, showOverflowtooltip: true },
// { prop: 'unit', label: '', filter: publicFormatter('unit_dict') },
{ prop: 'description', label: '描述', subcomponent: htmls },
{ prop: 'sparePartNumber', label: '备品备件数量' },
{ prop: 'description', label: '描述', subcomponent: htmls, minWidth: 120, showOverflowtooltip: true },
{ prop: 'sparePartNumber', label: '备品备件数量', width: 130 },
// { prop: 'remark', label: '' },
],
searchBarFormConfig: [
@ -198,7 +202,7 @@ export default {
prop: 'description', // TODO:
subcomponent: Editor,
bind: {
'min-height': 192
'min-height': 150
}
},
],

View File

@ -9,34 +9,36 @@
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="false"
:wrapper-closable="!isLog"
class="drawer"
size="60%">
<small-title slot="title" :no-padding="true">
{{ !isLog ? '操作页面' : '更换记录' }}
</small-title>
<div class="content">
<el-form
ref="form"
:model="dataForm"
label-width="100px"
label-width="90px"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item v-if="!isLog" label="配置名" prop="name">
<span>{{ dataForm.name }}</span>
<span style="margin-left: 5px">{{ dataForm.name }}</span>
</el-form-item>
<el-form-item v-else label="产线名称" prop="lineName">
<span>{{ dataForm.lineName }}</span>
<span style="margin-left: 5px">{{ dataForm.lineName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备名称" prop="equipmentName">
<span>{{ dataForm.equipmentName }}</span>
<span style="margin-left: 5px">{{ dataForm.equipmentName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="描述" prop="faultTime">
<editor v-model="dataForm.description" read-only :min-height="200"/>
<el-form-item label="描述" prop="description">
<div v-html="dataForm.description" style="padding: 5px; margin-left: 5px; border: 1px solid #dfdfdf" />
<!-- <editor v-model="dataForm.description" :read-only="true" :min-height="200"/> -->
</el-form-item>
</el-form>
@ -82,8 +84,9 @@
:page-sizes="[5, 10, 15]"
@pagination="getList1" />
</div>
</div>
<div class="drawer-body__footer">
<div v-if="isLog" class="drawer-body__footer">
<el-button type="primary" @click="goback()">关闭</el-button>
</div>
@ -429,4 +432,7 @@ export default {
justify-content: flex-end;
padding: 18px;
}
.content {
padding: 0 20px;
}
</style>

View File

@ -74,8 +74,7 @@ const remainBox = {
value() {
const temp = this.injectData[this.injectData.prop] || null;
if (temp) {
console.log('12', temp);
return temp === 'Green' ? 'green' : 'red';
return temp === 'Green' ? '未超期' : temp === 'Red' ? '已超期' : '即将超期';
}
return this.injectData[this.injectData.prop] || null;
},
@ -83,7 +82,7 @@ const remainBox = {
if (this.value) {
// const v = +this.value;
// return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
return this.value;
return this.value === '未超期' ? '#37D97F' : this.value === '已超期' ? '#FF5454' : '#FFD767';
}
return 'unset';
},
@ -95,9 +94,9 @@ const remainBox = {
this.color
// this.color == 'Green' ? 'green' : this.color == 'Red' ? 'red' : 'yellow'
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
this.color == 'red' || this.color == 'green' ? '#fff' : 'unset'
'#fff'
}`}>
{this.injectData[this.injectData.prop] || ''}
{this.value}
</div>
);
},
@ -155,18 +154,19 @@ export default {
// : undefined,
].filter((v) => v),
tableProps: [
{ prop: 'name', label: '配置名' },
{ prop: 'lineName', label: '产线名称' },
{ prop: 'sectionName', label: '工段名' },
{ prop: 'equipmentName', label: '设备名称' },
{ prop: 'responsible', label: '负责人' },
{ prop: 'name', label: '配置名', showOverflowtooltip: true },
{ prop: 'lineName', label: '产线名称', showOverflowtooltip: true },
{ prop: 'sectionName', label: '工段名', showOverflowtooltip: true },
{ prop: 'equipmentName', label: '设备名称', showOverflowtooltip: true },
{ prop: 'responsible', label: '负责人', minWidth: 130, showOverflowtooltip: true },
{ prop: 'color', label: '是否超期', subcomponent: remainBox },
{ prop: 'opt1', label: '备件更换', name: '操作', subcomponent: btn },
{ prop: 'opt1', label: '备件更换', name: '操作', subcomponent: btn, width: 110 },
{
prop: 'opt2',
label: '更换记录',
name: '更新记录',
subcomponent: btn,
width: 110
}, // TODO:
// { prop: 'remark', label: '' },
],

17814
yarn.lock

File diff suppressed because it is too large Load Diff