@@ -75,33 +79,20 @@ const form = reactive({
group_id: null,
});
-const accountGroupList = ref([]); // [{id, name, group_id: null}]
+const accountGroupList = ref([]);
const isAllEdit = computed(() => editType.value === 'all');
const open = (accountList = []) => {
editType.value = 'all';
groupOptions.value = [];
form.group_id = null;
- accountGroupList.value = accountList.map((acc) => ({
- ...acc,
- group_id: null,
- }));
+ accountGroupList.value = accountList;
visible.value = true;
getTags();
};
const getTags = async () => {
- groupOptions.value = [
- {
- label: '测试',
- value: '1',
- },
- {
- label: 'ceshi2',
- value: 2,
- },
- ];
const { code, data } = await fetchAccountGroups();
if (code === 200) {
groupOptions.value = data.map((item) => ({
diff --git a/src/views/property-marketing/media-account/account-manage/components/batch-tag-modal/index.vue b/src/views/property-marketing/media-account/account-manage/components/batch-tag-modal/index.vue
index 7946ecd..fdf8c94 100644
--- a/src/views/property-marketing/media-account/account-manage/components/batch-tag-modal/index.vue
+++ b/src/views/property-marketing/media-account/account-manage/components/batch-tag-modal/index.vue
@@ -49,7 +49,11 @@
-
+
+
+ {{ record.name || '-' }}
+
+
@@ -103,7 +107,7 @@ const open = (accountList = []) => {
form.tags = [];
accountTagList.value = accountList.map((acc) => ({
...acc,
- tags: [],
+ tags: acc.tags.map((tag) => tag.name),
}));
visible.value = true;
@@ -111,16 +115,6 @@ const open = (accountList = []) => {
};
const getTags = async () => {
- tagOptions.value = [
- {
- label: '测试1',
- value: '测试1',
- },
- {
- label: '测试2',
- value: '测试2',
- },
- ];
const { code, data } = await fetchAccountTags();
if (code === 200) {
tagOptions.value = data.map((item) => ({
diff --git a/src/views/property-marketing/media-account/account-manage/index.vue b/src/views/property-marketing/media-account/account-manage/index.vue
index 9bac505..59d1592 100644
--- a/src/views/property-marketing/media-account/account-manage/index.vue
+++ b/src/views/property-marketing/media-account/account-manage/index.vue
@@ -221,12 +221,12 @@ const handleChangeAll = (val) => {
};
const handleBatchDelete = () => {
const ids = selectedItems.value.map((item) => item.id);
- const names = selectedItems.value.map((item) => `"${item.name}"`).join(',');
+ const names = selectedItems.value.map((item) => `“${item.name || '-'}”`).join(',');
deleteAccountRef.value?.open({ id: ids, name: names });
};
const handleDelete = (item) => {
const { id, name } = item;
- deleteAccountRef.value?.open({ id, name: `"${name}"` });
+ deleteAccountRef.value?.open({ id, name: `“${name || '-'}”` });
};
const handleCloseTip = () => {
selectedItems.value = [];