tsv2-library 1.0.61-beta.78 → 1.0.61-beta.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tsv2-library.es.js
CHANGED
|
@@ -72523,12 +72523,10 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
72523
72523
|
const filter4 = reactive({});
|
|
72524
72524
|
const filterQueryParams = ref({});
|
|
72525
72525
|
const selectedData = ref([]);
|
|
72526
|
-
const hasInitialValueLoaded = ref(false);
|
|
72527
72526
|
const resetState = () => {
|
|
72528
72527
|
searchModel.value = "";
|
|
72529
72528
|
showFilter.value = false;
|
|
72530
72529
|
showValidator.value = false;
|
|
72531
|
-
hasInitialValueLoaded.value = false;
|
|
72532
72530
|
selectedData.value = [];
|
|
72533
72531
|
};
|
|
72534
72532
|
const parseFilter = () => {
|
|
@@ -72554,10 +72552,12 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
72554
72552
|
visible4.value = false;
|
|
72555
72553
|
};
|
|
72556
72554
|
const loadAssetName = async (params) => {
|
|
72555
|
+
var _a, _b;
|
|
72557
72556
|
try {
|
|
72558
72557
|
const { data: data30 } = await AssetNameServices.postAssetNameList({
|
|
72559
72558
|
...filterQueryParams.value,
|
|
72560
|
-
...params
|
|
72559
|
+
...params,
|
|
72560
|
+
excludeIds: ((_a = props.selectedAssetNames) == null ? void 0 : _a.length) ? (_b = props.selectedAssetNames) == null ? void 0 : _b.map((item3) => item3 == null ? void 0 : item3._id) : void 0
|
|
72561
72561
|
});
|
|
72562
72562
|
return data30 == null ? void 0 : data30.data;
|
|
72563
72563
|
} catch (error) {
|
|
@@ -72566,11 +72566,10 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
72566
72566
|
error,
|
|
72567
72567
|
message: "Error, Failed to load asset names."
|
|
72568
72568
|
});
|
|
72569
|
-
} finally {
|
|
72570
|
-
setInitialSelectedData();
|
|
72571
72569
|
}
|
|
72572
72570
|
};
|
|
72573
72571
|
const loadAvailableAssetName = async (params) => {
|
|
72572
|
+
var _a, _b;
|
|
72574
72573
|
try {
|
|
72575
72574
|
if (!props.customFieldType)
|
|
72576
72575
|
return;
|
|
@@ -72584,7 +72583,11 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
72584
72583
|
const apiType = typeMapping[props.customFieldType] || "general";
|
|
72585
72584
|
const { data: data30 } = await SettingsAttributeServices.getAvailableAssetNameList(
|
|
72586
72585
|
apiType,
|
|
72587
|
-
{
|
|
72586
|
+
{
|
|
72587
|
+
...filterQueryParams.value,
|
|
72588
|
+
...params,
|
|
72589
|
+
excludeIds: ((_a = props.selectedAssetNames) == null ? void 0 : _a.length) ? JSON.stringify((_b = props.selectedAssetNames) == null ? void 0 : _b.map((item3) => item3 == null ? void 0 : item3._id)) : void 0
|
|
72590
|
+
}
|
|
72588
72591
|
);
|
|
72589
72592
|
return data30 == null ? void 0 : data30.data;
|
|
72590
72593
|
} catch (error) {
|
|
@@ -72593,15 +72596,6 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
72593
72596
|
error,
|
|
72594
72597
|
message: "Error, Failed to load asset names."
|
|
72595
72598
|
});
|
|
72596
|
-
} finally {
|
|
72597
|
-
setInitialSelectedData();
|
|
72598
|
-
}
|
|
72599
|
-
};
|
|
72600
|
-
const setInitialSelectedData = () => {
|
|
72601
|
-
var _a, _b;
|
|
72602
|
-
if (((_a = props.selectedAssetNames) == null ? void 0 : _a.length) && !((_b = selectedData.value) == null ? void 0 : _b.length) && !hasInitialValueLoaded.value) {
|
|
72603
|
-
selectedData.value = [...props.selectedAssetNames];
|
|
72604
|
-
hasInitialValueLoaded.value = true;
|
|
72605
72599
|
}
|
|
72606
72600
|
};
|
|
72607
72601
|
watchEffect(() => {
|