fix some bugs

This commit is contained in:
lb 2023-12-20 10:26:38 +08:00
förälder c91be221dc
incheckning 9561dc27e3
6 ändrade filer med 45 tillägg och 9 borttagningar

Visa fil

@ -101,7 +101,9 @@
}
"
v-bind="col.bind">
<el-button size="mini" :disabled="disabled || col.bind?.disabled || false">
<el-button
size="mini"
:disabled="disabled || col.bind?.disabled || false">
<svg-icon
icon-class="icon-upload"
style="color: inherit"></svg-icon>
@ -410,8 +412,26 @@ export default {
}
if (!promiseList.length) this.formLoading = false;
},
//
beforeUpload() {},
beforeUpload(file) {
const checkFileSize = () => {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$modal.msgError('上传文件大小不能超过 2MB!');
}
return isLt2M;
};
const checkFileType = () => {
const isJPG =
file.type === 'image/jpeg' ||
file.type === 'image/png' ||
file.type === 'image/jpg';
return isJPG;
};
return checkFileSize() && checkFileType();
},
// bind
handleUploadSuccess(response, file, prop) {
console.log('[handleUploadSuccess]', response, file, prop);

Visa fil

@ -170,19 +170,19 @@ export default {
{ width: 256, prop: 'code', label: '设备编码' },
{ prop: 'location', label: '位置' },
{ prop: 'responsiblePeopleName', label: '负责人' },
{ prop: 'dueDate', label: '有效期至' },
{ prop: 'dueTime', label: '有效期至' },
{ prop: 'remark', label: '备注' },
],
searchBarFormConfig: [
{
type: 'input',
label: '名称',
label: '设备名称',
placeholder: '请输入设备名称',
param: 'name',
},
{
type: 'input',
label: '编码',
label: '设备编码',
placeholder: '请输入设备编码',
param: 'code',
},
@ -251,7 +251,7 @@ export default {
{
datetime: true,
label: '有效期至',
prop: 'dueDate',
prop: 'dueTime',
bind: { clearable: true },
},
{},

Visa fil

@ -175,13 +175,13 @@ export default {
searchBarFormConfig: [
{
type: 'input',
label: '名称',
label: '设备名称',
placeholder: '请输入设备名称',
param: 'name',
},
{
type: 'input',
label: '编码',
label: '设备编码',
placeholder: '请输入设备编码',
param: 'code',
},

Visa fil

@ -54,6 +54,7 @@
<el-select
v-model="dataForm.equipmentId"
filterable
clearable
:disabled="isdetail"
style="width: 100%"
placeholder="请选择设备名称"
@ -74,6 +75,7 @@
<el-select
v-model="dataForm.configId"
filterable
clearable
:disabled="isdetail"
style="width: 100%"
placeholder="请选择巡检配置"
@ -121,6 +123,7 @@
<el-select
v-model="dataForm.origin"
filterable
clearable
:disabled="isdetail"
style="width: 100%"
placeholder="请选择数据来源">

Visa fil

@ -353,7 +353,7 @@ export default {
queryData.createTime = this.queryParams.createTime;
}
this.$router.push({
path: '/equipment/base/maintain/record',
path: '/safety-environmental/special-equipment/equipment-maintain/maintain-record',
query: queryData,
});
// this.$router.push({ path: '/equipment/base/maintain/record', query: { orderNo: row.orderNo }})

Visa fil

@ -556,6 +556,19 @@ export default {
this.form.relatePlan = tempRow.nextMaintainTime ? 1 : 2;
this.form.startTime = tempRow.nextMaintainTime;
this.form.maintainPlanId = tempRow.id;
// await (() => {
// return new Promise((acpt, rejt) => {
// this.form.relatePlan =
// this.$route.query.relatePlan ||
// (tempRow.nextMaintainTime ? 1 : 2);
// this.form.startTime = tempRow.nextMaintainTime;
// acpt();
// });
// })();
// this.$nextTick(() => {
// this.form.maintainPlanId = tempRow.id;
// this.form.equipmentId = tempRow.equipmentId;
// });
}
if (this.$route.query.isAdd) {
//