|
@@ -12,9 +12,7 @@
|
|
|
<div class="table-list">
|
|
<div class="table-list">
|
|
|
<div v-if="showActionBar" class="action-bar">
|
|
<div v-if="showActionBar" class="action-bar">
|
|
|
<span class="num-text">已选{{ chooseNum }}项</span>
|
|
<span class="num-text">已选{{ chooseNum }}项</span>
|
|
|
- <el-button :class="isActiveDelete ? 'btn-active' : 'btn-normal'" @click="handleDeleteAll"
|
|
|
|
|
- >删除</el-button
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button :class="isActiveDelete ? 'btn-active' : 'btn-normal'" @click="handleDeleteAll">删除</el-button>
|
|
|
<span class="close-btn" @click="handleSelectNone"></span>
|
|
<span class="close-btn" @click="handleSelectNone"></span>
|
|
|
</div>
|
|
</div>
|
|
|
<AlertTableSimple
|
|
<AlertTableSimple
|
|
@@ -38,12 +36,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
<DetailDialog
|
|
<DetailDialog
|
|
|
v-if="isDetailDialogShow"
|
|
v-if="isDetailDialogShow"
|
|
|
- :has-been-chosen="detailRowChosen"
|
|
|
|
|
- :description="detailDescription"
|
|
|
|
|
- :image-paths="detailPictures"
|
|
|
|
|
- :video-paths="detailVideos"
|
|
|
|
|
- :has-previous="hasPreviousRow"
|
|
|
|
|
- :has-next="hasNextRow"
|
|
|
|
|
@close="closeDetailDialog"
|
|
@close="closeDetailDialog"
|
|
|
@update:previous="handleChangePrevious"
|
|
@update:previous="handleChangePrevious"
|
|
|
@update:next="handleChangeNext"
|
|
@update:next="handleChangeNext"
|
|
@@ -53,24 +45,36 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
|
|
+ import { storeToRefs } from 'pinia';
|
|
|
import { ref, onMounted, onBeforeMount } from 'vue';
|
|
import { ref, onMounted, onBeforeMount } from 'vue';
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
|
|
+ import { TableQueryForm, getDefaultTableData, deleteDefaultTableData } from '@/api/datamanagement/alert-default';
|
|
|
|
|
+ import { useWorkLocation } from '../../hooks/useWorkLocation';
|
|
|
|
|
+ import { useIssueMainType } from '../../hooks/useIssueMainType';
|
|
|
|
|
+ import { useCurImgVideoUrlStore } from '../../store/useCurImgVideoUrl';
|
|
|
|
|
+ import Prequalification from '../common/Prequalification.vue';
|
|
|
import QueryFormSimple from '../common/QueryFormSimple.vue';
|
|
import QueryFormSimple from '../common/QueryFormSimple.vue';
|
|
|
import AlertTableSimple, { DataSourceItem } from '../common/AlertTableSimple.vue';
|
|
import AlertTableSimple, { DataSourceItem } from '../common/AlertTableSimple.vue';
|
|
|
import DetailDialog from '../common/DetailDialog.vue';
|
|
import DetailDialog from '../common/DetailDialog.vue';
|
|
|
import Pagination from '../common/Pagination.vue';
|
|
import Pagination from '../common/Pagination.vue';
|
|
|
- import { useWorkLocation } from '../../hooks/useWorkLocation';
|
|
|
|
|
- import { useIssueMainType } from '../../hooks/useIssueMainType';
|
|
|
|
|
- import Prequalification from '../common/Prequalification.vue';
|
|
|
|
|
- import {
|
|
|
|
|
- TableQueryForm,
|
|
|
|
|
- getDefaultTableData,
|
|
|
|
|
- deleteDefaultTableData,
|
|
|
|
|
- } from '@/api/datamanagement/alert-default';
|
|
|
|
|
|
|
|
|
|
const { locationOptions, getLocationOptions } = useWorkLocation();
|
|
const { locationOptions, getLocationOptions } = useWorkLocation();
|
|
|
const { aiMainOptions, getAIMainOptions } = useIssueMainType();
|
|
const { aiMainOptions, getAIMainOptions } = useIssueMainType();
|
|
|
|
|
|
|
|
|
|
+ const curImgVideoUrl = useCurImgVideoUrlStore();
|
|
|
|
|
+ const {
|
|
|
|
|
+ detailRowChosen,
|
|
|
|
|
+ detailRow,
|
|
|
|
|
+ detailCurRowIndex,
|
|
|
|
|
+ detailPreviousRow,
|
|
|
|
|
+ detailNextRow,
|
|
|
|
|
+ hasPreviousRow,
|
|
|
|
|
+ hasNextRow,
|
|
|
|
|
+ detailDescription,
|
|
|
|
|
+ detailPictures,
|
|
|
|
|
+ detailVideos,
|
|
|
|
|
+ } = storeToRefs(curImgVideoUrl);
|
|
|
|
|
+
|
|
|
const alertTableRef = ref<typeof AlertTableSimple>();
|
|
const alertTableRef = ref<typeof AlertTableSimple>();
|
|
|
const tableData = ref<DataSourceItem[]>([]);
|
|
const tableData = ref<DataSourceItem[]>([]);
|
|
|
const showActionBar = ref(false);
|
|
const showActionBar = ref(false);
|
|
@@ -80,16 +84,6 @@
|
|
|
const isActiveDelete = ref(false);
|
|
const isActiveDelete = ref(false);
|
|
|
// 详情
|
|
// 详情
|
|
|
const isDetailDialogShow = ref(false);
|
|
const isDetailDialogShow = ref(false);
|
|
|
- const detailRowChosen = ref(false); // 当前行是否被选中
|
|
|
|
|
- const detailRow = ref(); // 当前行
|
|
|
|
|
- const detailCurRowIndex = ref(0); // 当前行index
|
|
|
|
|
- const detailPreviousRow = ref(); // 上一行
|
|
|
|
|
- const detailNextRow = ref(); // 下一行
|
|
|
|
|
- const hasPreviousRow = ref(false); // 是否有上一行
|
|
|
|
|
- const hasNextRow = ref(false); // 是否有下一行
|
|
|
|
|
- const detailDescription = ref('');
|
|
|
|
|
- const detailPictures = ref<string[]>([]);
|
|
|
|
|
- const detailVideos = ref<string[]>([]);
|
|
|
|
|
// 分页
|
|
// 分页
|
|
|
const total = ref(0);
|
|
const total = ref(0);
|
|
|
|
|
|
|
@@ -184,8 +178,7 @@
|
|
|
else hasPreviousRow.value = false;
|
|
else hasPreviousRow.value = false;
|
|
|
if (detailNextRow.value) hasNextRow.value = true;
|
|
if (detailNextRow.value) hasNextRow.value = true;
|
|
|
else hasNextRow.value = false;
|
|
else hasNextRow.value = false;
|
|
|
- if (chooseRow.value.findIndex((item) => item.id === curRow.id) !== -1)
|
|
|
|
|
- detailRowChosen.value = true;
|
|
|
|
|
|
|
+ if (chooseRow.value.findIndex((item) => item.id === curRow.id) !== -1) detailRowChosen.value = true;
|
|
|
else detailRowChosen.value = false;
|
|
else detailRowChosen.value = false;
|
|
|
};
|
|
};
|
|
|
const handleDetail = (row) => {
|
|
const handleDetail = (row) => {
|