From 02409bfbe15f22fc3b5dccadabfd860a660a49d9 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 11 Oct 2025 10:37:14 +0800
Subject: [PATCH] feat: 名称修改
---
src/views/odm/task.vue | 102 ++++++++++++++++++++++++++++----------------------
1 files changed, 57 insertions(+), 45 deletions(-)
diff --git a/src/views/odm/task.vue b/src/views/odm/task.vue
index a6d1744..eb76d57 100644
--- a/src/views/odm/task.vue
+++ b/src/views/odm/task.vue
@@ -12,6 +12,7 @@
@row-update="rowUpdate"
@row-save="rowSave"
:before-open="beforeOpen"
+ :before-close="beforeClose"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@@ -76,8 +77,6 @@
},
selectionList: [],
option: {
- height: 'auto',
- calcHeight: 32,
dialogWidth: 950,
tip: false,
searchShow: true,
@@ -92,14 +91,20 @@
dialogClickModal: false,
grid: false,
menuWidth: 260,
+
+ height: 'auto',
+ calcHeight: 20,
+
column: [
{
label: '任务名称',
prop: 'taskName',
search: true,
- searchSpan:4,
labelWidth: 130,
- searchPlaceholder:"任务名称",
+ searchSpan: 4,
+ searchLabelWidth: 100,
+ //labelWidth: 130,
+ searchPlaceholder: '任务名称',
rules: [
{
required: true,
@@ -139,7 +144,7 @@
prop: 'waylineJobId',
addDisplay: false,
editDisplay: false,
- hide:true,
+ hide: true,
labelWidth: 130,
width: 160,
},
@@ -148,10 +153,11 @@
prop: 'waylineType',
type: 'select',
search: true,
- searchSpan: 3,
- width: 100,
+ searchSpan: 4,
+ searchLabelWidth: 100,
+ //width: 100,
labelWidth: 130,
- searchPlaceholder:"任务类型",
+ searchPlaceholder: '任务类型',
dicData: [
{
label: '航测',
@@ -162,13 +168,17 @@
value: 4,
},
],
+ change: value => {
+ this.searchChange({ ...this.query, waylineType: value.value }, () => {});
+ },
},
{
label: '机场名称',
prop: 'airportName',
- labelWidth: 130,
- search: true,
searchSpan: 4,
+ searchLabelWidth: 100,
+ labelWidth: 130,
+ //search: true,
},
{
label: '图片数量',
@@ -193,36 +203,22 @@
prop: 'status',
type: 'select',
search: true,
- searchSpan: 3,
+ searchSpan: 4,
+ searchLabelWidth: 100,
+ searchPlaceholder: '任务状态',
labelWidth: 130,
- searchPlaceholder:"任务状态",
width: 90,
dicData: [
- {
- label: '待启动',
- value: 0,
- },
- {
- label: '待处理',
- value: 10,
- },
- {
- label: '处理中',
- value: 20,
- },
- {
- label: '失败',
- value: 30,
- },
- {
- label: '已完成',
- value: 40,
- },
- {
- label: '已取消',
- value: 50,
- },
+ { label: '待启动', value: 0 },
+ { label: '待处理', value: 10 },
+ { label: '处理中', value: 20 },
+ { label: '失败', value: 30 },
+ { label: '已完成', value: 40 },
+ { label: '已取消', value: 50 },
],
+ change: value => {
+ this.searchChange({ ...this.query, status: value.value }, () => {});
+ },
},
{
@@ -237,22 +233,26 @@
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
{
- label: '飞行任务完成时间',
+ label: '完成时间',
prop: 'completedTime',
- type:"date",
+ type: 'date',
addDisplay: false,
editDisplay: false,
- searchPlaceholder:"任务完成时间",
+ searchPlaceholder: '任务完成时间',
labelWidth: 130,
- search:true,
- searchSpan:4,
- searchLabelWidth:130,
- valueFormat: 'YYYY-MM-DD',
+ search: true,
+ searchSpan: 4,
+ searchLabelWidth: 100,
+ //valueFormat: 'YYYY-MM-DD',
width: 160,
+ change: value => {
+ this.searchChange({ ...this.query, completedTime: value.value }, () => {});
+ },
},
],
},
data: [],
+ isClickSearch: true,
};
},
computed: {
@@ -275,7 +275,7 @@
methods: {
// 立即处理
atHandle(row) {
- createOdmTask(row.waylineJobId,row.gsd).then(
+ createOdmTask(row.waylineJobId, row.gsd).then(
() => {
this.onLoad(this.page);
this.$message({
@@ -395,6 +395,8 @@
this.onLoad(this.page);
},
searchChange(params, done) {
+ if (!this.isClickSearch) return;
+
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
@@ -435,8 +437,17 @@
// this.form = res.data.data;
// });
// }
+ this.isClickSearch = false;
+
done();
},
+
+ beforeClose(done, type) {
+ this.isClickSearch = true;
+
+ done();
+ },
+
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
@@ -448,6 +459,7 @@
},
onLoad(page, params = {}) {
const { releaseTimeRange } = this.query;
+
let values = {
...params,
...this.query,
@@ -473,4 +485,4 @@
};
</script>
-<style></style>
+<style scoped lang="scss"></style>
--
Gitblit v1.9.3