|
|
|
|
@ -32,7 +32,7 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<!-- <el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
plain
|
|
|
|
|
@ -73,35 +73,47 @@
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
v-hasPermi="['dangan:task:export']"
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-col>-->
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="taskList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="任务id" align="center" prop="id" />
|
|
|
|
|
<el-table v-loading="loading" :data="taskList">
|
|
|
|
|
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
|
|
|
|
<el-table-column label="创建人" align="center" prop="createBy" />
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" />
|
|
|
|
|
<el-table-column label="业务类型" align="center" prop="ywType" min-width="100" show-overflow-tooltip>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.yw_type" :value="scope.row.ywType"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="档案目录路径" align="center" prop="muPath" />
|
|
|
|
|
<el-table-column label="总数量" align="center" prop="num" />
|
|
|
|
|
<el-table-column label="任务状态(字典)" align="center" prop="status" />
|
|
|
|
|
<el-table-column label="成功" align="center" prop="successNum" />
|
|
|
|
|
|
|
|
|
|
<el-table-column label="任务状态" align="center" prop="status">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.task_status" :value="scope.row.status"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column label="成功" align="center" prop="successNum" />
|
|
|
|
|
<el-table-column label="失败" align="center" prop="failNum" />
|
|
|
|
|
<el-table-column label="相关图片ids" align="center" prop="picIds" />
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" />-->
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="scope.row.status==='2'"
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
@click="handleUpdate1(scope.row)"
|
|
|
|
|
v-hasPermi="['dangan:task:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
>查看任务详情</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="scope.row.status==='1'"
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
v-hasPermi="['dangan:task:remove']"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['dangan:task:edit']"
|
|
|
|
|
>查看任务进度</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
@ -114,9 +126,22 @@
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改识别任务记录对话框 -->
|
|
|
|
|
<!-- 任务进度/任务详情 -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
|
|
|
|
|
<div class="rw_con">
|
|
|
|
|
<div class="num">总数量: {{ form.num }}</div>
|
|
|
|
|
<div class="num" v-if="form.status==='1'">已识别: 10</div>
|
|
|
|
|
<div class="num" v-if="form.status==='2'">成功: {{ form.successNum }}</div>
|
|
|
|
|
<div class="num" v-if="form.status==='2'">失败: {{ form.failNum }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style="display:flex; justify-content: space-evenly;" v-if="form.status==='2'">
|
|
|
|
|
<el-link :underline="false" type="primary" style="font-size: 20px">成功图片</el-link>
|
|
|
|
|
<el-link :underline="false" type="primary" style="font-size: 20px">失败图片</el-link>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
<el-form-item label="总数量" prop="num">
|
|
|
|
|
<el-input v-model="form.num" placeholder="请输入总数量" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -132,11 +157,7 @@
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form>-->
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -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.form = row;
|
|
|
|
|
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.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`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.rw_con{
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
|
|
|
|
.num{
|
|
|
|
|
height: 40px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|