优化逻辑bug
This commit is contained in:
@ -96,7 +96,8 @@ const props = defineProps({
|
||||
// 大小限制(MB)
|
||||
fileSize: propTypes.number.def(5),
|
||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf', 'png', 'jpg', 'jpeg', 'zip']),
|
||||
// fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf', 'png', 'jpg', 'jpeg', 'zip']),
|
||||
fileType: propTypes.array.def(['pdf']),
|
||||
// 是否显示提示
|
||||
isShowTip: propTypes.bool.def(true),
|
||||
//是否为施工人员上传
|
||||
@ -310,11 +311,6 @@ const uploadedSuccessfully = (res: any) => {
|
||||
emit('update:modelValue', listToString(fileList.value));
|
||||
proxy?.$modal.closeLoading();
|
||||
}
|
||||
if (props.autoUpload && props.limit === fileList.value.length) {
|
||||
fileUploadRef.value?.clearFiles();
|
||||
fileList.value = [];
|
||||
emit('update:modelValue', ''); // 同步到外部 v-model
|
||||
}
|
||||
// if (props.autoUpload && props.limit === fileList.value.length) {
|
||||
// fileUploadRef.value?.clearFiles();
|
||||
// fileList.value = [];
|
||||
|
@ -31,6 +31,7 @@
|
||||
label="运行时长"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
:sort-method="sortTime"
|
||||
sortable
|
||||
align="center"
|
||||
></el-table-column>
|
||||
@ -114,6 +115,25 @@ const handleDownload = (ossId: string) => {
|
||||
proxy?.$download.oss(ossId);
|
||||
};
|
||||
|
||||
// 解析时间字符串,返回秒数
|
||||
function parseTimeStr(str: string): number {
|
||||
let total = 0;
|
||||
const minMatch = str.match(/(\d+)分钟/);
|
||||
const secMatch = str.match(/(\d+)秒/);
|
||||
|
||||
if (minMatch) total += parseInt(minMatch[1]) * 60;
|
||||
if (secMatch) total += parseInt(secMatch[1]);
|
||||
return total;
|
||||
}
|
||||
|
||||
// 排序函数,根据时间字符串解析后的秒数排序
|
||||
function sortTime(a: any, b: any) {
|
||||
console.log(a, b);
|
||||
return a.runDurationNum - b.runDurationNum;
|
||||
|
||||
// return parseTimeStr(a.runDuration) - parseTimeStr(b.runDuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对外暴露子组件方法
|
||||
*/
|
||||
|
@ -4,8 +4,8 @@
|
||||
<el-form-item label="消息提醒">
|
||||
<el-checkbox-group v-model="form.messageType">
|
||||
<el-checkbox value="1" name="type" disabled>站内信</el-checkbox>
|
||||
<el-checkbox value="2" name="type">邮件</el-checkbox>
|
||||
<el-checkbox value="3" name="type">短信</el-checkbox>
|
||||
<el-checkbox value="2" name="type" disabled>邮件</el-checkbox>
|
||||
<el-checkbox value="3" name="type" disabled>短信</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件">
|
||||
|
Reference in New Issue
Block a user