|
|
@@ -54,12 +54,11 @@
|
|
|
</div>
|
|
|
<a-modal v-model:open="openAdd" title="添加资产详情" width="75%" :footer="null" @cancel="openAdd = false">
|
|
|
<InfoWindow
|
|
|
- v-if="openAdd" :info-window-no="infoWindowNo" :multiple="true" :is-search-widget="true"
|
|
|
- :is-custom-button="true" :where-clause-source="whereClauseSource"
|
|
|
- @get-select-model-data="getSelectModelData"
|
|
|
+ v-if="openAdd" ref="infoRef" :info-window-no="infoWindowNo" :multiple="true" :is-search-widget="true"
|
|
|
+ :where-clause-source="whereClauseSource"
|
|
|
>
|
|
|
- <template #customButtonText>
|
|
|
- 确认添加
|
|
|
+ <template #customButton>
|
|
|
+ <a-button :icon="h(PlusCircleTwoTone)" @click="getSelectModelData">确认添加</a-button>
|
|
|
</template>
|
|
|
</InfoWindow>
|
|
|
</a-modal>
|
|
|
@@ -89,7 +88,7 @@ const props = defineProps({
|
|
|
const whereClauseSource = {
|
|
|
customWhere: 'ad.assetDisposalStatus = \'UNDER_REVIEW_CLIENT\' OR (ad.assetDisposalStatus = \'TO_BE_SUMMIT\' AND ad.roleTemplateWay = \'CLIENT\')',
|
|
|
};
|
|
|
-
|
|
|
+const infoRef = ref(null);
|
|
|
const openAdd = ref(false);
|
|
|
const infoWindowNo = ref('20241103_160417');
|
|
|
|
|
|
@@ -138,7 +137,12 @@ const getSelectColumn = selected => {
|
|
|
};
|
|
|
|
|
|
// 获取添加的资产详情
|
|
|
-const getSelectModelData = selectedData => {
|
|
|
+const getSelectModelData = () => {
|
|
|
+ const selectedData = infoRef.value.getSelectedModelDatas();
|
|
|
+ if (!selectedData || !selectedData.length) {
|
|
|
+ message.warning('未选择资产,请至少选择一条资产。');
|
|
|
+ return;
|
|
|
+ }
|
|
|
const modelDataIds = selectedData.map(item => {
|
|
|
return item.id;
|
|
|
});
|