|
@@ -64,19 +64,16 @@
|
|
label="学生数"
|
|
label="学生数"
|
|
min-width="100"
|
|
min-width="100"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="studentCount"
|
|
|
|
- label="实扫/已上传(采集)"
|
|
|
|
- min-width="100"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="实扫/已上传(采集)" width="100" align="center">
|
|
<span slot-scope="scope">
|
|
<span slot-scope="scope">
|
|
- {{ scope.row.scanCount }} / {{ scope.row.uploadCount }}
|
|
|
|
|
|
+ {{ scope.row.clientScanCount }} / {{ scope.row.clientUploadCount }}
|
|
</span>
|
|
</span>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="scanCount"
|
|
prop="scanCount"
|
|
label="已上传(后台)"
|
|
label="已上传(后台)"
|
|
- min-width="100"
|
|
|
|
|
|
+ width="80"
|
|
|
|
+ align="center"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
v-if="curTab === 'my'"
|
|
v-if="curTab === 'my'"
|
|
@@ -99,7 +96,7 @@
|
|
<el-table-column
|
|
<el-table-column
|
|
class-name="action-column"
|
|
class-name="action-column"
|
|
label="操作"
|
|
label="操作"
|
|
- width="80"
|
|
|
|
|
|
+ width="100"
|
|
fixed="right"
|
|
fixed="right"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -111,6 +108,14 @@
|
|
>
|
|
>
|
|
扫描
|
|
扫描
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="scope.row.scanCount && scope.row.clientScanCount"
|
|
|
|
+ class="btn-danger"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="toClean(scope.row)"
|
|
|
|
+ >
|
|
|
|
+ 清除
|
|
|
|
+ </el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -148,6 +153,7 @@ import db from "../../../plugins/db";
|
|
import { taskListPage, enableScanTask } from "../api";
|
|
import { taskListPage, enableScanTask } from "../api";
|
|
import ScanTaskProcessDialog from "../components/ScanTaskProcessDialog.vue";
|
|
import ScanTaskProcessDialog from "../components/ScanTaskProcessDialog.vue";
|
|
import OcrAreaSetDialog from "../components/OcrAreaSetDialog.vue";
|
|
import OcrAreaSetDialog from "../components/OcrAreaSetDialog.vue";
|
|
|
|
+import { clearTaskOriginDir } from "../../../plugins/imageOcr";
|
|
// import ScanTaskProcessDialog from "../components/ScanTaskDialog.vue";
|
|
// import ScanTaskProcessDialog from "../components/ScanTaskDialog.vue";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -234,12 +240,12 @@ export default {
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
const task = this.dataList[i];
|
|
const task = this.dataList[i];
|
|
const scanCount = await db.countScanList({ taskId: task.id });
|
|
const scanCount = await db.countScanList({ taskId: task.id });
|
|
- this.$set(task, "scanCount", scanCount);
|
|
|
|
|
|
+ this.$set(task, "clientScanCount", scanCount);
|
|
const uploadCount = await db.countScanList({
|
|
const uploadCount = await db.countScanList({
|
|
taskId: task.id,
|
|
taskId: task.id,
|
|
isUpload: 1
|
|
isUpload: 1
|
|
});
|
|
});
|
|
- this.$set(task, "uploadCount", uploadCount);
|
|
|
|
|
|
+ this.$set(task, "clientUploadCount", uploadCount);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
selectMenu(curTab) {
|
|
selectMenu(curTab) {
|
|
@@ -278,6 +284,30 @@ export default {
|
|
enable: !row.enable
|
|
enable: !row.enable
|
|
});
|
|
});
|
|
row.enable = !row.enable;
|
|
row.enable = !row.enable;
|
|
|
|
+ },
|
|
|
|
+ async toClean(row) {
|
|
|
|
+ if (!row.clientScanCount || !row.scanCount) return;
|
|
|
|
+
|
|
|
|
+ this.$parent.$parent.stopUpload();
|
|
|
|
+
|
|
|
|
+ const res = await db.deleteScanByTaskId(row.id).catch(err => {
|
|
|
|
+ console.error(err);
|
|
|
|
+ });
|
|
|
|
+ if (!res) {
|
|
|
|
+ this.$message.error("本地数据删除错误!");
|
|
|
|
+ this.$parent.$parent.initUploadTask();
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ try {
|
|
|
|
+ clearTaskOriginDir(row.id);
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.error(error);
|
|
|
|
+ this.$message.error("本地文件删除错误!");
|
|
|
|
+ }
|
|
|
|
+ this.$parent.$parent.initUploadTask();
|
|
|
|
+
|
|
|
|
+ this.getList();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|