|
@@ -268,7 +268,6 @@ import demand from '@/assets/innovation.png'
|
|
|
const router = useRouter()
|
|
|
// 加载中
|
|
|
const loading = ref(false)
|
|
|
-const searchForm = ref({})
|
|
|
// 列表
|
|
|
const list = ref([])
|
|
|
let skip = 0
|
|
@@ -326,11 +325,36 @@ const search = async (query = { skip: 0, limit }) => {
|
|
|
const info = {
|
|
|
skip: query.skip,
|
|
|
limit: query.limit,
|
|
|
- ...searchForm.value,
|
|
|
is_show: '0',
|
|
|
status: '1'
|
|
|
}
|
|
|
- const res = await store.query(info)
|
|
|
+ if (oneList.value.length > 0) {
|
|
|
+ const one = oneList.value.map((i) => {
|
|
|
+ return i.value
|
|
|
+ })
|
|
|
+ info.one = one
|
|
|
+ }
|
|
|
+ if (twoList.value.length > 0) {
|
|
|
+ info.two = twoList.value.map((i) => {
|
|
|
+ return i.value
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (thrList.value.length > 0) {
|
|
|
+ info.thr = thrList.value.map((i) => {
|
|
|
+ return i.label
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (fourList.value.length > 0) {
|
|
|
+ info.four = fourList.value.map((i) => {
|
|
|
+ return i.value
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (fiveList.value.length > 0) {
|
|
|
+ info.five = fiveList.value.map((i) => {
|
|
|
+ return i.value
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const res = await store.list(info)
|
|
|
if (res.errcode == '0') {
|
|
|
list.value = res.data
|
|
|
total.value = res.total
|
|
@@ -346,7 +370,7 @@ const getDict = (data, model) => {
|
|
|
return get(res, 'label')
|
|
|
}
|
|
|
// 选择查询
|
|
|
-const toSelect = (item, num) => {
|
|
|
+const toSelect = async (item, num) => {
|
|
|
if (item.is_active) return
|
|
|
if (num == 'one') {
|
|
|
for (const val of scaleList.value) {
|
|
@@ -388,9 +412,12 @@ const toSelect = (item, num) => {
|
|
|
if (!five) fiveList.value.push(item)
|
|
|
else fiveList.value = fiveList.value.filter((f) => f.value == item.value)
|
|
|
}
|
|
|
+ loading.value = true
|
|
|
+ await search({ skip, limit })
|
|
|
+ loading.value = false
|
|
|
}
|
|
|
// 删除标签
|
|
|
-const toDel = (item, type) => {
|
|
|
+const toDel = async (item, type) => {
|
|
|
if (type == 'one') {
|
|
|
const one = oneList.value.filter((f) => f.value != item.value)
|
|
|
oneList.value = one
|
|
@@ -426,6 +453,9 @@ const toDel = (item, type) => {
|
|
|
if (i.value == item.value) i.is_active = !i.is_active
|
|
|
}
|
|
|
}
|
|
|
+ loading.value = true
|
|
|
+ await search({ skip, limit })
|
|
|
+ loading.value = false
|
|
|
}
|
|
|
const currentPage = ref(1)
|
|
|
// 分页
|