|
@@ -41,6 +41,24 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</a-dropdown>
|
|
</a-dropdown>
|
|
|
|
|
+ <!-- <a-select :default-value="'Beijing'" placeholder="Please select ..." multiple>
|
|
|
|
|
+ <a-option>Beijing</a-option>
|
|
|
|
|
+ <a-option>Shanghai</a-option>
|
|
|
|
|
+ <a-option>Guangzhou</a-option>
|
|
|
|
|
+ <a-option disabled>Disabled</a-option>
|
|
|
|
|
+ <a-option>Shenzhen</a-option>
|
|
|
|
|
+ <a-option>Wuhan</a-option>
|
|
|
|
|
+ <template #header>
|
|
|
|
|
+ <div style="padding: 6px 12px">
|
|
|
|
|
+ <a-checkbox value="1">全选</a-checkbox>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div style="padding: 6px 0; text-align: center">
|
|
|
|
|
+ <a-button>Click Me</a-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-select> -->
|
|
|
</template>
|
|
</template>
|
|
|
<template #bottom>
|
|
<template #bottom>
|
|
|
<div class="bottom">
|
|
<div class="bottom">
|
|
@@ -72,8 +90,13 @@ import CardItem from '../../views/manage/CardItem.vue';
|
|
|
import ManageTags from './ManageTags.vue';
|
|
import ManageTags from './ManageTags.vue';
|
|
|
import { getIconIntelligent, getImageIntelligent } from '../common/icon-map.js';
|
|
import { getIconIntelligent, getImageIntelligent } from '../common/icon-map.js';
|
|
|
import LabelSelected from './LabelSelected.vue';
|
|
import LabelSelected from './LabelSelected.vue';
|
|
|
-import { getDialogList } from '../../apis/intelligent';
|
|
|
|
|
-import { bus_intelligentSearch, bus_intelligentEdit, bus_intelligentIconEdit } from '../../base/event-bus';
|
|
|
|
|
|
|
+import { getDialogListForFilter } from '../../apis/intelligent';
|
|
|
|
|
+import {
|
|
|
|
|
+ bus_intelligentSearch,
|
|
|
|
|
+ bus_intelligentEdit,
|
|
|
|
|
+ bus_intelligentIconEdit,
|
|
|
|
|
+ bus_intelligentLabelSync
|
|
|
|
|
+} from '../../base/event-bus';
|
|
|
import { dialogType } from '../../views/manage/common';
|
|
import { dialogType } from '../../views/manage/common';
|
|
|
import { funcThrottle } from '../../utils/utils';
|
|
import { funcThrottle } from '../../utils/utils';
|
|
|
import { getLabelList, addLabelToDialog, changeDialogStatus, deleteDialog } from '../../apis/intelligent';
|
|
import { getLabelList, addLabelToDialog, changeDialogStatus, deleteDialog } from '../../apis/intelligent';
|
|
@@ -98,7 +121,9 @@ const total_pages = ref(5);
|
|
|
const body_container = ref(null);
|
|
const body_container = ref(null);
|
|
|
const scroll_bottom = ref(false);
|
|
const scroll_bottom = ref(false);
|
|
|
const search_text = ref('');
|
|
const search_text = ref('');
|
|
|
-const search_label = ref('');
|
|
|
|
|
|
|
+const search_label = ref(''); //单个card的搜索标签
|
|
|
|
|
+const search_labelId_list = ref([]); //头部的搜索标签
|
|
|
|
|
+const search_mode = ref(''); //要过滤的应用类型
|
|
|
const label_list = ref([]);
|
|
const label_list = ref([]);
|
|
|
const dropdown = ref(null);
|
|
const dropdown = ref(null);
|
|
|
const visible = ref(false);
|
|
const visible = ref(false);
|
|
@@ -109,7 +134,14 @@ const getDialog = async () => {
|
|
|
loading_data.value = true;
|
|
loading_data.value = true;
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
- const res = await getDialogList(pages.current, pages.pageSize, search_text.value);
|
|
|
|
|
|
|
+ const filter_data = {
|
|
|
|
|
+ current: pages.current,
|
|
|
|
|
+ pageSize: pages.pageSize,
|
|
|
|
|
+ keyword: search_text.value,
|
|
|
|
|
+ label: search_labelId_list.value,
|
|
|
|
|
+ mode: search_mode.value
|
|
|
|
|
+ };
|
|
|
|
|
+ const res = await getDialogListForFilter(filter_data);
|
|
|
const data = res.data.rows.map((item) => {
|
|
const data = res.data.rows.map((item) => {
|
|
|
return {
|
|
return {
|
|
|
...item,
|
|
...item,
|
|
@@ -188,6 +220,8 @@ const getLabels = async () => {
|
|
|
const res = await getLabelList(search_label.value, 1);
|
|
const res = await getLabelList(search_label.value, 1);
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
label_list.value = [...res.data.rows];
|
|
label_list.value = [...res.data.rows];
|
|
|
|
|
+ // 将label_list数据给到top中
|
|
|
|
|
+ bus_intelligentLabelSync.emit(label_list.value);
|
|
|
}
|
|
}
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
console.log(err);
|
|
console.log(err);
|
|
@@ -224,7 +258,6 @@ const changeDropdownVisible = async (visible, id) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const changeStatus = async (item) => {
|
|
const changeStatus = async (item) => {
|
|
|
- console.log(item);
|
|
|
|
|
try {
|
|
try {
|
|
|
const res = await changeDialogStatus(item.id, item.status == '1' ? '0' : '1');
|
|
const res = await changeDialogStatus(item.id, item.status == '1' ? '0' : '1');
|
|
|
if (res.code != 200) {
|
|
if (res.code != 200) {
|
|
@@ -247,8 +280,10 @@ const editIconHandle = (item) => {
|
|
|
bus_intelligentIconEdit.emit(item);
|
|
bus_intelligentIconEdit.emit(item);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-bus_intelligentSearch.on((text) => {
|
|
|
|
|
- search_text.value = text;
|
|
|
|
|
|
|
+bus_intelligentSearch.on((search_data) => {
|
|
|
|
|
+ search_text.value = search_data.searchText;
|
|
|
|
|
+ search_labelId_list.value = search_data.target_label_list;
|
|
|
|
|
+ search_mode.value = search_data.target_app;
|
|
|
moke_data.value = [];
|
|
moke_data.value = [];
|
|
|
pages.current = 1;
|
|
pages.current = 1;
|
|
|
getDialog();
|
|
getDialog();
|