|
|
@@ -2,53 +2,26 @@
|
|
|
<ele-page flex-table>
|
|
|
<page-search @search="reload" />
|
|
|
|
|
|
- <common-table
|
|
|
- ref="pageRef"
|
|
|
- :pageConfig="pageConfig"
|
|
|
- :columns="columns"
|
|
|
- :tools="false"
|
|
|
- >
|
|
|
+ <common-table ref="pageRef" :pageConfig="pageConfig" :columns="columns" :tools="false">
|
|
|
<template #toolbar>
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- plain
|
|
|
- v-permission="'recycle:pending:oneDetection'"
|
|
|
- @click="handleOneDetection()"
|
|
|
- >
|
|
|
+ <el-button type="success" plain v-permission="'recycle:pending:oneDetection'"
|
|
|
+ @click="handleOneDetection()">
|
|
|
一键检测
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- plain
|
|
|
- v-permission="'recycle:pending:exprot'"
|
|
|
- @click="handleExportExcel()"
|
|
|
- >
|
|
|
+ <el-button type="success" plain v-permission="'recycle:pending:exprot'" @click="handleExportExcel()">
|
|
|
导出Excel
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- plain
|
|
|
- v-permission="'recycle:pending:clear'"
|
|
|
- @click="handleClear()"
|
|
|
- >
|
|
|
+ <el-button type="warning" plain v-permission="'recycle:pending:clear'" @click="handleClear()">
|
|
|
清空
|
|
|
</el-button>
|
|
|
</template>
|
|
|
|
|
|
<template #checkStatus="{ row }">
|
|
|
- <dict-data
|
|
|
- code="is_common_yes"
|
|
|
- type="tag"
|
|
|
- :model-value="row.checkStatus"
|
|
|
- />
|
|
|
+ <dict-data code="is_common_yes" type="tag" :model-value="row.checkStatus" />
|
|
|
</template>
|
|
|
|
|
|
<template #status="{ row }">
|
|
|
- <dict-data
|
|
|
- code="dispose_status"
|
|
|
- type="text"
|
|
|
- :model-value="row.status"
|
|
|
- />
|
|
|
+ <dict-data code="dispose_status" type="text" :model-value="row.status" />
|
|
|
</template>
|
|
|
|
|
|
<template #dealMark="{ row }">
|
|
|
@@ -62,36 +35,17 @@
|
|
|
</template>
|
|
|
|
|
|
<template #action="{ row }">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- link
|
|
|
- v-permission="'recycle:pending:delete'"
|
|
|
- @click="handleDelete(row)"
|
|
|
- >
|
|
|
+ <el-button type="primary" link v-permission="'recycle:pending:delete'" @click="handleDelete(row)">
|
|
|
[删除]
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- link
|
|
|
- v-permission="'recycle:pending:deal'"
|
|
|
- @click="handleDeal(row)"
|
|
|
- >
|
|
|
+ <el-button type="danger" link v-permission="'recycle:pending:deal'" @click="handleDeal(row)">
|
|
|
[去处理]
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- link
|
|
|
- v-permission="'recycle:pending:detection'"
|
|
|
- @click="handleDetectionById(row)"
|
|
|
- >
|
|
|
+ <el-button type="success" link v-permission="'recycle:pending:detection'"
|
|
|
+ @click="handleDetectionById(row)">
|
|
|
[检测]
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- link
|
|
|
- v-permission="'recycle:pending:dealLog'"
|
|
|
- @click="handleDealLog(row)"
|
|
|
- >
|
|
|
+ <el-button type="warning" link v-permission="'recycle:pending:dealLog'" @click="handleDealLog(row)">
|
|
|
[处理日志]
|
|
|
</el-button>
|
|
|
</template>
|
|
|
@@ -103,133 +57,133 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
- import { ref, reactive } from 'vue';
|
|
|
- import CommonTable from '@/components/CommonPage/CommonTable.vue';
|
|
|
- import pageSearch from './components/page-search.vue';
|
|
|
- import booksEdit from '@/views/data/books/components/books-edit.vue';
|
|
|
- import dealLog from './components/deal-log.vue';
|
|
|
- import request from '@/utils/request';
|
|
|
-
|
|
|
- defineOptions({ name: 'PendingDetection' });
|
|
|
-
|
|
|
- /** 表格列配置 */
|
|
|
- const columns = ref([
|
|
|
- {
|
|
|
- type: 'selection',
|
|
|
- columnKey: 'selection',
|
|
|
- width: 50,
|
|
|
- align: 'center',
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- { label: 'ID', prop: 'id', width: 120, align: 'center' },
|
|
|
- { label: 'ISBN', prop: 'isbn', align: 'center' },
|
|
|
- { label: '扫描次数', prop: 'scanTimes', align: 'center' },
|
|
|
- {
|
|
|
- label: '处理标记',
|
|
|
- prop: 'dealMark',
|
|
|
- slot: 'dealMark',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- { label: '创建时间', prop: 'createTime', align: 'center' },
|
|
|
- {
|
|
|
- label: '是否检测',
|
|
|
- prop: 'checkStatus',
|
|
|
- slot: 'checkStatus',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '处理人',
|
|
|
- prop: 'disposeName',
|
|
|
- align: 'center',
|
|
|
- formatter: (row) => row.disposeName || '-'
|
|
|
- },
|
|
|
- { label: '状态', prop: 'status', slot: 'status', align: 'center' },
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 200,
|
|
|
- slot: 'action',
|
|
|
- fixed: 'right'
|
|
|
- }
|
|
|
- ]);
|
|
|
-
|
|
|
- /** 页面组件实例 */
|
|
|
- const pageRef = ref(null);
|
|
|
-
|
|
|
- const pageConfig = reactive({
|
|
|
- pageUrl: '/book/bookNoData/unDispose/pagelist',
|
|
|
- exportUrl: '/book/bookNoData/unDispose/export',
|
|
|
- fileName: '待处理数据库',
|
|
|
- cacheKey: 'pendingTable'
|
|
|
- });
|
|
|
-
|
|
|
- //刷新表格
|
|
|
- function reload(where) {
|
|
|
- pageRef.value?.reload(where);
|
|
|
+import { ref, reactive } from 'vue';
|
|
|
+import CommonTable from '@/components/CommonPage/CommonTable.vue';
|
|
|
+import pageSearch from './components/page-search.vue';
|
|
|
+import booksEdit from '@/views/data/books/components/books-edit.vue';
|
|
|
+import dealLog from './components/deal-log.vue';
|
|
|
+import request from '@/utils/request';
|
|
|
+
|
|
|
+defineOptions({ name: 'PendingDetection' });
|
|
|
+
|
|
|
+/** 表格列配置 */
|
|
|
+const columns = ref([
|
|
|
+ {
|
|
|
+ type: 'selection',
|
|
|
+ columnKey: 'selection',
|
|
|
+ width: 50,
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ { label: 'ID', prop: 'id', width: 120, align: 'center' },
|
|
|
+ { label: 'ISBN', prop: 'isbn', align: 'center' },
|
|
|
+ { label: '扫描次数', prop: 'scanTimes', align: 'center' },
|
|
|
+ {
|
|
|
+ label: '处理标记',
|
|
|
+ prop: 'dealMark',
|
|
|
+ slot: 'dealMark',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ { label: '创建时间', prop: 'createTime', align: 'center', width: 160 },
|
|
|
+ {
|
|
|
+ label: '是否检测',
|
|
|
+ prop: 'checkStatus',
|
|
|
+ slot: 'checkStatus',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '处理人',
|
|
|
+ prop: 'disposeName',
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => row.disposeName || '-'
|
|
|
+ },
|
|
|
+ { label: '状态', prop: 'status', slot: 'status', align: 'center' },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 260,
|
|
|
+ slot: 'action',
|
|
|
+ fixed: 'right'
|
|
|
}
|
|
|
-
|
|
|
- //导出excel
|
|
|
- function handleExportExcel() {
|
|
|
- pageRef.value?.exportData('待处理数据库');
|
|
|
- }
|
|
|
-
|
|
|
- //一键检测
|
|
|
- function handleOneDetection() {
|
|
|
- //需要 ids 传参, 需要获取当前表格的选中项
|
|
|
- const selections = pageRef.value?.getSelections();
|
|
|
- if (selections.length === 0) {
|
|
|
- return ElMessage.warning('请先选中要检测的记录');
|
|
|
- }
|
|
|
- const ids = selections.map((item) => item.id);
|
|
|
-
|
|
|
- pageRef.value?.messageBoxConfirm({
|
|
|
- message: '确定要执行一键检测吗?',
|
|
|
- fetch: () =>
|
|
|
- request.post('/book/bookNoData/unDispose/check', { ids })
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- //去处理
|
|
|
- const editRef = ref(null);
|
|
|
- function handleDeal(row) {
|
|
|
- editRef.value?.handleOpen(row);
|
|
|
- }
|
|
|
-
|
|
|
- //删除
|
|
|
- function handleDelete(row) {
|
|
|
- pageRef.value?.messageBoxConfirm({
|
|
|
- message: '确定删除吗?',
|
|
|
- fetch: () =>
|
|
|
- request.post('/book/bookNoData/deleteById', { id: row.id })
|
|
|
- });
|
|
|
+]);
|
|
|
+
|
|
|
+/** 页面组件实例 */
|
|
|
+const pageRef = ref(null);
|
|
|
+
|
|
|
+const pageConfig = reactive({
|
|
|
+ pageUrl: '/book/bookNoData/unDispose/pagelist',
|
|
|
+ exportUrl: '/book/bookNoData/unDispose/export',
|
|
|
+ fileName: '待处理数据库',
|
|
|
+ cacheKey: 'pendingTable'
|
|
|
+});
|
|
|
+
|
|
|
+//刷新表格
|
|
|
+function reload(where) {
|
|
|
+ pageRef.value?.reload(where);
|
|
|
+}
|
|
|
+
|
|
|
+//导出excel
|
|
|
+function handleExportExcel() {
|
|
|
+ pageRef.value?.exportData('待处理数据库');
|
|
|
+}
|
|
|
+
|
|
|
+//一键检测
|
|
|
+function handleOneDetection() {
|
|
|
+ //需要 ids 传参, 需要获取当前表格的选中项
|
|
|
+ const selections = pageRef.value?.getSelections();
|
|
|
+ if (selections.length === 0) {
|
|
|
+ return ElMessage.warning('请先选中要检测的记录');
|
|
|
}
|
|
|
+ const ids = selections.map((item) => item.id);
|
|
|
|
|
|
- //修改类型
|
|
|
- function handleModifyType(row) {}
|
|
|
-
|
|
|
- //清空
|
|
|
- function handleClear() {
|
|
|
- let selections = pageRef.value?.getSelections();
|
|
|
- pageRef.value?.operatBatch({
|
|
|
- title: '确定要执行清空吗?',
|
|
|
- method: 'post',
|
|
|
- url: '/book/bookNoData/unDispose/clear',
|
|
|
- data: { ids: selections.map((item) => item.id) }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- //根据ID检测
|
|
|
- function handleDetectionById(row) {
|
|
|
- pageRef.value?.messageBoxConfirm({
|
|
|
- message: '确定要检测该条记录吗?',
|
|
|
- fetch: () =>
|
|
|
- request.post(`/book/bookNoData/unDispose/checkId/${row.id}`)
|
|
|
- });
|
|
|
- }
|
|
|
+ pageRef.value?.messageBoxConfirm({
|
|
|
+ message: '确定要执行一键检测吗?',
|
|
|
+ fetch: () =>
|
|
|
+ request.post('/book/bookNoData/unDispose/check', { ids })
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+//去处理
|
|
|
+const editRef = ref(null);
|
|
|
+function handleDeal(row) {
|
|
|
+ editRef.value?.handleOpen({ isbn: row.isbn });
|
|
|
+}
|
|
|
+
|
|
|
+//删除
|
|
|
+function handleDelete(row) {
|
|
|
+ pageRef.value?.messageBoxConfirm({
|
|
|
+ message: '确定删除吗?',
|
|
|
+ fetch: () =>
|
|
|
+ request.post('/book/bookNoData/deleteById', { id: row.id })
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+//修改类型
|
|
|
+function handleModifyType(row) { }
|
|
|
+
|
|
|
+//清空
|
|
|
+function handleClear() {
|
|
|
+ let selections = pageRef.value?.getSelections();
|
|
|
+ pageRef.value?.operatBatch({
|
|
|
+ title: '确定要执行清空吗?',
|
|
|
+ method: 'post',
|
|
|
+ url: '/book/bookNoData/unDispose/clear',
|
|
|
+ data: { ids: selections.map((item) => item.id) }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+//根据ID检测
|
|
|
+function handleDetectionById(row) {
|
|
|
+ pageRef.value?.messageBoxConfirm({
|
|
|
+ message: '确定要检测该条记录吗?',
|
|
|
+ fetch: () =>
|
|
|
+ request.post(`/book/bookNoData/unDispose/checkId/${row.id}`)
|
|
|
+ });
|
|
|
+}
|
|
|
|
|
|
- //处理日志
|
|
|
- const dealLogRef = ref(null);
|
|
|
- function handleDealLog(row) {
|
|
|
- dealLogRef.value?.handleOpen(row.id);
|
|
|
- }
|
|
|
+//处理日志
|
|
|
+const dealLogRef = ref(null);
|
|
|
+function handleDealLog(row) {
|
|
|
+ dealLogRef.value?.handleOpen(row.id);
|
|
|
+}
|
|
|
</script>
|