|
@@ -47,6 +47,7 @@ import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
|
|
import { Delete, EditPen, Download, Upload, View, CirclePlus } from '@element-plus/icons-vue'
|
|
|
// import { fabric } from 'fabric'
|
|
|
import { useDrawArea } from '@/utils/fabric'
|
|
|
+import { getDictsApi } from '@/api/modules/system/dictData'
|
|
|
import ImgDetect from '../components/img-detect.vue'
|
|
|
import {
|
|
|
listDataApi,
|
|
@@ -123,6 +124,17 @@ const handleImgSuccess = data => {
|
|
|
getList()
|
|
|
}
|
|
|
|
|
|
+const labeledTypeData = [
|
|
|
+ {
|
|
|
+ label: '是',
|
|
|
+ value: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '否',
|
|
|
+ value: false
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
// 批量删除数据管理信息
|
|
|
const batchDelete = async (ids: string[]) => {
|
|
|
await useHandleData(delDataApi, ids, '删除所选数据信息')
|
|
@@ -175,24 +187,24 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
|
{ type: 'selection', fixed: 'left', width: 70 },
|
|
|
{ prop: 'yuan', label: '原图', width: 200 },
|
|
|
{
|
|
|
- prop: 'name',
|
|
|
- label: '名称',
|
|
|
+ prop: 'batchNum',
|
|
|
+ label: '批次号',
|
|
|
search: {
|
|
|
el: 'input'
|
|
|
},
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
- prop: 'dataType',
|
|
|
- label: '数据类型',
|
|
|
+ prop: 'formName',
|
|
|
+ label: '源文件名称',
|
|
|
search: {
|
|
|
el: 'input'
|
|
|
},
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
- prop: 'fileType',
|
|
|
- label: '文件类型',
|
|
|
+ prop: 'name',
|
|
|
+ label: '名称',
|
|
|
search: {
|
|
|
el: 'input'
|
|
|
},
|
|
@@ -215,24 +227,24 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
- prop: 'batchNum',
|
|
|
- label: '批次号',
|
|
|
+ prop: 'scene',
|
|
|
+ label: '场景',
|
|
|
search: {
|
|
|
el: 'input'
|
|
|
},
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
- prop: 'scene',
|
|
|
- label: '场景',
|
|
|
+ prop: 'dataSource',
|
|
|
+ label: '数据源',
|
|
|
search: {
|
|
|
el: 'input'
|
|
|
},
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
- prop: 'dataSource',
|
|
|
- label: '数据源',
|
|
|
+ prop: 'gatherSpot',
|
|
|
+ label: '采集地点',
|
|
|
search: {
|
|
|
el: 'input'
|
|
|
},
|
|
@@ -248,21 +260,31 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
- prop: 'gatherSpot',
|
|
|
- label: '采集地点',
|
|
|
- search: {
|
|
|
- el: 'input'
|
|
|
- },
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'increment',
|
|
|
- label: '扩增方式',
|
|
|
+ prop: 'dataType',
|
|
|
+ label: '数据类型',
|
|
|
+ enum: () => getDictsApi('data_type'),
|
|
|
search: {
|
|
|
- el: 'input'
|
|
|
+ el: 'tree-select'
|
|
|
},
|
|
|
+ fieldNames: { label: 'dictLabel', value: 'dictValue' },
|
|
|
width: 120
|
|
|
},
|
|
|
+ // {
|
|
|
+ // prop: 'fileType',
|
|
|
+ // label: '文件类型',
|
|
|
+ // search: {
|
|
|
+ // el: 'input'
|
|
|
+ // },
|
|
|
+ // width: 120
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'increment',
|
|
|
+ // label: '扩增方式',
|
|
|
+ // search: {
|
|
|
+ // el: 'input'
|
|
|
+ // },
|
|
|
+ // width: 120
|
|
|
+ // },
|
|
|
{
|
|
|
prop: 'labeled',
|
|
|
label: '是否标注',
|
|
@@ -278,35 +300,27 @@ let formItems: ProForm.ItemsOptions[] = []
|
|
|
const setFormItems = () => {
|
|
|
formItems = [
|
|
|
{
|
|
|
- label: '图片',
|
|
|
+ label: '原图',
|
|
|
prop: 'url',
|
|
|
compOptions: {
|
|
|
elTagName: 'img-upload',
|
|
|
- placeholder: '请选择上传图片'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '名称',
|
|
|
- prop: 'name',
|
|
|
- rules: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
|
|
- compOptions: {
|
|
|
- placeholder: '请输入名称'
|
|
|
+ placeholder: '请选择上传原图'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- label: '数据类型',
|
|
|
- prop: 'dataType',
|
|
|
- rules: [{ required: true, message: '数据类型不能为空', trigger: 'blur' }],
|
|
|
+ label: '批次号',
|
|
|
+ prop: 'batchNum',
|
|
|
+ rules: [{ required: true, message: '批次号不能为空', trigger: 'blur' }],
|
|
|
compOptions: {
|
|
|
- placeholder: '请输入数据类型'
|
|
|
+ placeholder: '请输入批次号'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- label: '文件类型',
|
|
|
- prop: 'fileType',
|
|
|
- rules: [{ required: true, message: '文件类型不能为空', trigger: 'blur' }],
|
|
|
+ label: '名称',
|
|
|
+ prop: 'name',
|
|
|
+ rules: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
|
|
compOptions: {
|
|
|
- placeholder: '请输入文件类型'
|
|
|
+ placeholder: '请输入名称'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -342,6 +356,14 @@ const setFormItems = () => {
|
|
|
placeholder: '请输入数据源'
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '采集地点',
|
|
|
+ prop: 'gatherSpot',
|
|
|
+ rules: [{ required: true, message: '采集地点不能为空', trigger: 'blur' }],
|
|
|
+ compOptions: {
|
|
|
+ placeholder: '请输入采集地点'
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
label: '采集时间',
|
|
|
prop: 'gatherTime',
|
|
@@ -354,19 +376,24 @@ const setFormItems = () => {
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- label: '采集地点',
|
|
|
- prop: 'gatherSpot',
|
|
|
- rules: [{ required: true, message: '采集地点不能为空', trigger: 'blur' }],
|
|
|
+ label: '数据类型',
|
|
|
+ prop: 'dataType',
|
|
|
+ rules: [{ required: true, message: '数据类型不能为空', trigger: 'change' }],
|
|
|
compOptions: {
|
|
|
- placeholder: '请输入采集地点'
|
|
|
+ elTagName: 'select',
|
|
|
+ labelKey: 'dictLabel',
|
|
|
+ valueKey: 'dictValue',
|
|
|
+ enum: () => getDictsApi('data_type'),
|
|
|
+ placeholder: '请选择数据类型'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- label: '扩增方式',
|
|
|
- prop: 'increment',
|
|
|
- rules: [{ required: true, message: '扩增方式不能为空', trigger: 'blur' }],
|
|
|
+ label: '是否标注',
|
|
|
+ prop: 'labeled',
|
|
|
+ rules: [{ required: true, message: '请选择是否标注' }],
|
|
|
compOptions: {
|
|
|
- placeholder: '请输入扩增方式'
|
|
|
+ elTagName: 'radio-group',
|
|
|
+ enum: labeledTypeData
|
|
|
}
|
|
|
}
|
|
|
]
|