修改一些体验性问题

This commit is contained in:
liub
2025-10-08 14:19:47 +08:00
parent 8f28eb920f
commit 72699abdec

View File

@ -47,7 +47,7 @@
v-model="advanceSearch.Date"
type="daterange"
format="YYYY-MM-DD"
style="width: 240px;"
style="width: 240px"
value-format="YYYY-MM-DD"
range-separator="-"
start-placeholder="开始日期"
@ -102,7 +102,6 @@
>
<div class="form">
<el-form :model="cEdit" ref="formRef" style="max-width: 750px" :rules="rules">
<el-form-item label="设备名称" label-position="right" prop="deviceId">
<!-- <el-input v-model="selectedRow['deviceName']" :readonly="true" @click.stop="ShowDevice('Edit', true)" placeholder="请选择设备" /> -->
<el-select v-model="cEdit.deviceId" placeholder="选择设备" clearable :disabled="!cEdit.isEdit" filterable>
@ -143,6 +142,7 @@
accept=".jpg,.jpeg,.png,.gif.webp"
:limit="9"
list-type="picture-card"
:class="{ 'hide-add-btn': !cEdit.isEdit }"
>
<el-icon>
<Plus />
@ -154,7 +154,7 @@
<img :src="file.url" class="el-upload-list__item-thumbnail" />
<!-- 操作按钮组 -->
<div class="el-upload-list__item-actions">
<div class="el-upload-list__item-actions" v-show="cEdit.isEdit">
<!-- 自定义删除按钮 -->
<span class="el-upload-list__item-delete" @click.stop="dropImg('before', file, index)">
<el-icon>
@ -179,6 +179,7 @@
accept=".jpg,.jpeg,.png,.gif.webp"
:limit="9"
list-type="picture-card"
:class="{ 'hide-add-btn': !cEdit.isEdit }"
>
<el-icon>
<Plus />
@ -189,7 +190,7 @@
<!-- 图片缩略图 -->
<img :src="file.url" class="el-upload-list__item-thumbnail" />
<!-- 操作按钮组 -->
<div class="el-upload-list__item-actions">
<div class="el-upload-list__item-actions" v-show="cEdit.isEdit">
<!-- 自定义删除按钮 -->
<span class="el-upload-list__item-delete" @click.stop="dropImg('after', file, index)">
<el-icon>
@ -338,7 +339,6 @@
import api from '@/api/equipmentManagement/repairRecords/index';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
var grid = ref(null);
var deviceGrid = ref(null);
@ -490,15 +490,12 @@ function DropRecord(arr = undefined) {
() => {
showloading('fullLoading');
arr = arr.map((item) => item.recordId);
api.dropRepir(arr).then(res=>{
api.dropRepir(arr).then((res) => {
if (res && res.code == 200) {
Search();
}
alert(res.msg);
});
},
hideConfirm,
'提示'
@ -590,7 +587,7 @@ function ShowEdit(item = undefined, isEdit = true,formEl=undefined) {
return { name: v.imageId, url: v.imageUrl, id: v.imageId };
});
if (!formEl) return
if (!formEl) return;
formEl.validate();
}
@ -671,10 +668,11 @@ var dropImg = (type, file, index) => {
//保存表单数据
function SaveFormData(formEl: FormInstance | undefined) {
if (!cEdit.isEdit) {
CloseEdit();
return;
}
if (!formEl) return
if (!formEl) return;
let submit = () => {
showloading('fullLoading');
@ -737,14 +735,12 @@ function SaveFormData(formEl: FormInstance | undefined) {
hideloading();
});
}, 0);
}
};
formEl.validate((valid) => {
if (valid) {
submit();
}
})
});
}
//导出
@ -1087,4 +1083,8 @@ input:focus {
// margin-right: 8px !important;
// }
:deep .hide-add-btn .el-upload.is-disabled,
.hide-add-btn .el-upload.is-disabled {
display: none !important;
}
</style>