Commit b9a1f14f by Tianqing Liu

feat: 移动图片功能,根据接口获取数据源

1 parent 8b6df218
......@@ -207,7 +207,7 @@
<singleImgComparisonDialog ref="singleImgComparisonRef"></singleImgComparisonDialog>
<PersonGroupEditor ref='personGroupEditorRef' @refresh="handleRefresh" />
<PersonGroupMover ref='personGroupMoverRef' :data-list="dataList" @refresh="handleRefresh" />
<PersonGroupMover ref='personGroupMoverRef' :data-params="currentSearchCondition" :data-list="dataList" @refresh="handleRefresh" />
<PersonGroupDialog ref='personGroupDialogRef' :query-form="queryForm" @refresh="handleRefresh" />
</template>
......@@ -460,6 +460,7 @@ export default {
selectedPersonList.value = []
confirmSearch()
}
const currentSearchCondition = ref()
const confirmSearch = function() {
isLoading.value = true
const rawData = toRaw(queryForm)
......@@ -528,6 +529,7 @@ export default {
dataList.value = r.data.persons
total.value = r.data.pageNum
document.getElementsByClassName('resultContent')[0].scrollTop = 0
currentSearchCondition.value = data
}
)
}
......@@ -853,6 +855,7 @@ export default {
downloadTrajectoryFile,
clickSearch,
handleRefresh,
currentSearchCondition,
// ref
// imgModelRef,
DetailDialogRef,
......
......@@ -11,10 +11,10 @@
<a-form-item label="分组">
<a-select v-model:value="formData.personUnid" showSearch placeholder="请选择分组id">
<a-select-option
v-for="item in dataList"
:key="item.person_unid"
:value="item.person_unid"
>人id:{{item.person_unid}}</a-select-option>
v-for="item in showDataList"
:key="item"
:value="item"
>人id:{{item}}</a-select-option>
</a-select>
</a-form-item>
</a-form>
......@@ -28,8 +28,8 @@
<script>
import { ref } from "vue";
import clusterResultApi from '@/views/SnapshotCluster/ClusterResult/ClusterResultApi'
import { ElMessage } from "element-plus";
import clusterResultApi from './ClusterResultApi'
export default {
name: 'PersonGroupEditor',
......@@ -38,6 +38,10 @@ export default {
type: Array,
default: () => [],
},
dataParams: {
type: Object,
default: null,
},
},
setup(props, { emit }) {
const isVisible = ref(false);
......@@ -59,15 +63,16 @@ export default {
getDataList()
};
const showDataList = ref([])
const getDataList = () => {
const searchCondition = JSON.parse(window.localStorage.getItem('searchCondition'));
console.log('searchCondition', searchCondition)
if (searchCondition) {
clusterResultApi.getClusterResultList(searchCondition).then(r => {
if (props.dataParams) {
clusterResultApi.getClusterResultUidList(props.dataParams).then(r => {
console.log('getClusterResultUidList', r)
showDataList.value = r.data
})
} else {
// 使用props
// 使用props.dataList
showDataList.value = props.dataList.map(item => item.person_unid)
}
}
......@@ -105,6 +110,7 @@ export default {
onSave,
onCancel,
initDialog,
showDataList,
};
},
};
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!