diff --git a/dangan-ui/src/views/dangan/task/index.vue b/dangan-ui/src/views/dangan/task/index.vue index 660ec3b..f21869f 100644 --- a/dangan-ui/src/views/dangan/task/index.vue +++ b/dangan-ui/src/views/dangan/task/index.vue @@ -32,7 +32,7 @@ - + - - - + + + + + + + + - - + + + + + @@ -114,9 +126,22 @@ @pagination="getList" /> - + - + +
+
总数量: {{ form.num }}
+
已识别: 10
+
成功: {{ form.successNum }}
+
失败: {{ form.failNum }}
+
+ +
+ 成功图片 + 失败图片 +
+ +
@@ -146,16 +167,11 @@ export default { name: "Task", + dicts: ['task_status', 'yw_type'], data() { return { // 遮罩层 loading: true, - // 选中数组 - ids: [], - // 非单个禁用 - single: true, - // 非多个禁用 - multiple: true, // 显示搜索条件 showSearch: true, // 总条数 @@ -176,11 +192,7 @@ failNum: null, picIds: null, }, - // 表单参数 - form: {}, - // 表单校验 - rules: { - } + form: {} }; }, created() { @@ -196,28 +208,6 @@ this.loading = false; }); }, - // 取消按钮 - cancel() { - this.open = false; - this.reset(); - }, - // 表单重置 - reset() { - this.form = { - id: null, - num: null, - status: null, - successNum: null, - failNum: null, - picIds: null, - remark: null, - createBy: null, - createTime: null, - updateBy: null, - updateTime: null - }; - this.resetForm("form"); - }, /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; @@ -228,64 +218,28 @@ this.resetForm("queryForm"); this.handleQuery(); }, - // 多选框选中数据 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - this.single = selection.length!==1 - this.multiple = !selection.length - }, - /** 新增按钮操作 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "添加识别任务记录"; - }, /** 修改按钮操作 */ handleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getTask(id).then(response => { - this.form = response.data; - this.open = true; - this.title = "修改识别任务记录"; - }); - }, - /** 提交按钮 */ - submitForm() { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.id != null) { - updateTask(this.form).then(response => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); - }); - } else { - addTask(this.form).then(response => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); - }); - } - } - }); + this.form = row; + this.open = true; + this.title = "任务进度"; }, - /** 删除按钮操作 */ - handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm('是否确认删除识别任务记录编号为"' + ids + '"的数据项?').then(function() { - return delTask(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("删除成功"); - }).catch(() => {}); + handleUpdate1(row) { + this.form = row; + this.open = true; + this.title = "任务详情"; }, - /** 导出按钮操作 */ - handleExport() { - this.download('dangan/task/export', { - ...this.queryParams - }, `task_${new Date().getTime()}.xlsx`) - } } }; + +