Commit b9a1f14f by Tianqing Liu

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

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