勾选只能勾未处理

This commit is contained in:
joylink_zhaoerwei 2023-10-31 13:33:48 +08:00
parent 9d56dfd106
commit 1f6955e4a2
2 changed files with 15 additions and 1 deletions

View File

@ -59,6 +59,7 @@ export interface Item {
locationType: string;
drivingInfo: string;
submissionInfo: string;
alarmStatus: number;
}
/**

View File

@ -202,7 +202,7 @@
</template>
<script setup lang="ts">
import { ref, reactive, onMounted, computed, onUnmounted } from 'vue';
import { ref, reactive, onMounted, computed, onUnmounted, watch } from 'vue';
import { date, useQuasar, type QTableColumn } from 'quasar';
import {
alarmInfoListQuery,
@ -349,6 +349,19 @@ onMounted(() => {
});
const selected = ref<Item[]>([]);
watch(
selected,
() => {
for (let i = 0; i < selected.value.length; i++) {
if (selected.value[i].alarmStatus !== undefined) {
selected.value.splice(i, 1);
i--;
}
}
},
{ deep: true }
);
function batchHandle() {
const params = selected.value.map((item) => item.id);
$q.dialog({