Commit 2fba9702 by 李乾广

上传数据,修改bug

1 parent 8c0569a6
......@@ -160,6 +160,7 @@
<span class="expandWord" @click='expandChange(person)'>{{person.expand?'收起':'展开'}}</span>
<!--修正组类型数据-->
<!-- <span class="expandWord" @click='updatePersonInfoByGroup(person)'>类型修正</span> -->
<span class="expandWord" @click='uploadGroupData(person)'>上传数据</span>
<span class="expandWord" @click='searchPersonInfoByGroup(person)'>搜索</span>
<el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox>
......@@ -220,6 +221,7 @@
<singleImgComparisonDialog ref="singleImgComparisonRef"></singleImgComparisonDialog>
<PersonGroupEditor ref='personGroupEditorRef' @refresh="handleEditorRefresh" />
<UploadGroupDataEditor ref='uploadGroupDataEditorRef' @refresh="handleEditorRefresh" />
<PersonGroupMover ref='personGroupMoverRef' :data-params="currentSearchCondition" :data-list="dataList" @refresh="handleRefresh" />
<PersonGroupDialog ref='personGroupDialogRef' :query-form="queryForm" @refresh="handleRefresh" />
</template>
......@@ -237,12 +239,14 @@ import PersonnelDialog from "../../ComparisonCapturedPictures/PersonnelDialog.vu
import DetailDialogComparison from "../../ComparisonCapturedPictures/DetailDialogComparisonNew.vue";
import singleImgComparisonDialog from "../singleImgComparisonDialog.vue";
import PersonGroupEditor from "./PersonGroupEditor.vue";
import UploadGroupDataEditor from "./UploadGroupDataEditor.vue";
import PersonGroupDialog from "./PersonGroupDialog.vue";
import PersonGroupMover from "./PersonGroupMover.vue";
export default {
components:{
PersonGroupEditor,
UploadGroupDataEditor,
PersonGroupDialog,
PersonGroupMover,
// imgDialog
......@@ -637,6 +641,15 @@ export default {
}
}
// 上传数据
const uploadGroupDataEditorRef = ref();
const uploadGroupData = function(data) {
let par = {
personUnid:data.person_unid,
countdate: moment(this.queryForm.date).format('YYYY-MM-DD'),
}
uploadGroupDataEditorRef.value.initDialog(par);
}
// 批量操作
const isMultipleOperation = ref(false)
const handleMutipleOperation = () => {
......@@ -982,6 +995,7 @@ export default {
checkChange,
expandChange,
updatePersonInfoByGroup,
uploadGroupData,
deletePersonRecord,
movePersonRecord,
searchPersonInfoByGroup,
......@@ -1002,6 +1016,7 @@ export default {
personnelDialogRef,
personGroupDialogRef,
personGroupEditorRef,
uploadGroupDataEditorRef,
DetailDialogComparisonRef,
singleImgComparisonRef,
personGroupMoverRef,
......
......@@ -80,7 +80,16 @@ class ClusterResultApi {
}
)
}
// 聚类结果--上传数据
uploadGroupData(data) {
return axiosInstance.request(
{
method: 'POST',
url: `/faceRecognitions/sendDataToLabel`,
data: data
}
)
}
// 人员类型修正
updatePerson(data) {
return axiosInstance.request(
......
......@@ -17,19 +17,19 @@
/>
</a-form-item>
<a-form-item label="年龄段">
<a-select v-model:value="formData.ageGroup">
<a-select v-model:value="formData.ageGroup" :allowClear="true">
<a-select-option :value="0">儿童</a-select-option>
<a-select-option :value="1">成人</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="性别">
<a-select v-model:value="formData.gender">
<a-select v-model:value="formData.gender" :allowClear="true">
<a-select-option :value="0"></a-select-option>
<a-select-option :value="1"></a-select-option>
</a-select>
</a-form-item>
<a-form-item label="类型">
<a-select v-model:value="formData.type">
<a-select v-model:value="formData.type" :allowClear="true">
<a-select-option :value="0">顾客</a-select-option>
<a-select-option :value="1">员工</a-select-option>
</a-select>
......@@ -84,6 +84,10 @@ export default {
isVisible.value = false;
};
const onSave = () => {
formData.value.age = (formData.value.age!==null&&formData.value.age!==undefined)?formData.value.age:null;
formData.value.gender = (formData.value.gender!==null&&formData.value.gender!==undefined)?formData.value.gender:null;
formData.value.type = (formData.value.type!==null&&formData.value.type!==undefined)?formData.value.type:null;
formData.value.ageGroup = (formData.value.ageGroup!==null&&formData.value.ageGroup!==undefined)?formData.value.ageGroup:null;
clusterResultApi.updatePerson(formData.value).then(
(r) => {
if(r.msg_code==200){
......
<template>
<a-modal
title="上传数据"
v-if='isVisible'
v-model:visible="isVisible"
width="400px"
height='50%'
class="detail-modal"
>
<a-form :model="formData">
<a-form-item label="数据包ID">
<a-input v-model:value="formData.packId" style="width: 100%;" />
</a-form-item>
<a-form-item label="任务ID">
<a-input v-model:value="formData.taskId" style="width: 100%;" />
</a-form-item>
</a-form>
<template #footer>
<a-button :disabled="formData.packId==''||formData.taskId==''||isNaN(formData.packId)||isNaN(formData.taskId)" type="primary" @click="onSave">保存</a-button>
<a-button @click="onCancel">关闭</a-button>
</template>
</a-modal>
</template>
<script>
import { ref } from "vue";
import clusterResultApi from '@/views/SnapshotCluster/ClusterResult/ClusterResultApi'
import { ElMessage } from "element-plus";
export default {
name: 'PersonGroupEditor',
setup(props, { emit }) {
const isVisible = ref(false);
// 表单
function getInitialFormData() {
return {
personUnid: '',
packId: '',
taskId: '',
countdate: '',
}
}
const formData = ref(getInitialFormData())
const initDialog = (data) => {
console.log('initDialog', data)
formData.value = getInitialFormData()
formData.value.personUnid = [data.personUnid]
formData.value.countdate = data.countdate
formData.value.packId = ''
formData.value.taskId = ''
isVisible.value = true;
};
const onCancel = () => {
isVisible.value = false;
};
const onSave = () => {
formData.value.packId = formData.value.packId*1;
formData.value.taskId = formData.value.taskId*1;
clusterResultApi.uploadGroupData(formData.value).then(
(r) => {
if(r.code==200){
ElMessage({
message: r.msg,
type: 'success'
})
// 刷新列表
emit('refresh')
onCancel()
} else {
ElMessage({
message: `保存失败`,
type: 'error'
})
}
}
)
};
return {
isVisible,
formData,
onSave,
onCancel,
initDialog,
};
},
};
</script>
<style lang="less" scoped>
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!