|
@@ -145,7 +145,6 @@
|
|
|
<a-input class="input" size="large" v-model:value="searchForm.name" placeholder="成果名称" />
|
|
|
<a-input class="input" size="large" v-model:value="searchForm.tags" placeholder="标签名称" />
|
|
|
<a-input class="input" size="large" v-model:value="searchForm.source" placeholder="项目来源" />
|
|
|
- <a-input class="input" size="large" v-model:value="searchForm.industry" placeholder="所属产业" />
|
|
|
<a-button class="button" size="large" type="primary" @click="toSearchInfo">检索</a-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -253,7 +252,7 @@ const search = async (query = { skip, limit }) => {
|
|
|
limit: query.limit,
|
|
|
...searchForm.value
|
|
|
}
|
|
|
- const res = await store.query(info)
|
|
|
+ const res = await store.list(info)
|
|
|
if (res.errcode == '0') {
|
|
|
list.value = res.data
|
|
|
total.value = res.total
|
|
@@ -309,7 +308,36 @@ const sizeChange = (limits) => {
|
|
|
currentPage.value = 1
|
|
|
search({ skip: 0, limit: limit })
|
|
|
}
|
|
|
-const toSelect = (data, type) => {
|
|
|
+// 筛选条件
|
|
|
+const toSearchFind = async () => {
|
|
|
+ if (industry.value && industry.value.length > 0) {
|
|
|
+ searchForm.value.industryList = industry.value.map((i) => {
|
|
|
+ return i.title
|
|
|
+ })
|
|
|
+ } else if (field.value && field.value.length > 0) {
|
|
|
+ searchForm.value.fieldList = field.value.map((i) => {
|
|
|
+ return i.label
|
|
|
+ })
|
|
|
+ } else if (mature.value && mature.value.length > 0) {
|
|
|
+ searchForm.value.matureList = mature.value.map((i) => {
|
|
|
+ return i.value
|
|
|
+ })
|
|
|
+ } else if (sell.value && sell.value.length > 0) {
|
|
|
+ searchForm.value.sellList = sell.value.map((i) => {
|
|
|
+ return i.value
|
|
|
+ })
|
|
|
+ } else if (money.value && money.value.length > 0) {
|
|
|
+ searchForm.value.moneyList = money.value.map((i) => {
|
|
|
+ return i.value
|
|
|
+ })
|
|
|
+ } else if (city.value && city.value.length > 0) {
|
|
|
+ searchForm.value.cityList = city.value.map((i) => {
|
|
|
+ return i.name
|
|
|
+ })
|
|
|
+ } else searchForm.value = {}
|
|
|
+ await search({ skip, limit })
|
|
|
+}
|
|
|
+const toSelect = async (data, type) => {
|
|
|
if (data.is_active) {
|
|
|
toDel(data, type)
|
|
|
} else {
|
|
@@ -405,8 +433,9 @@ const toSelect = (data, type) => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ await toSearchFind()
|
|
|
}
|
|
|
-const toDel = (data, type) => {
|
|
|
+const toDel = async (data, type) => {
|
|
|
if (type == '1') {
|
|
|
for (const val of plateList.value) {
|
|
|
if (data.id == val.id) val.is_active = false
|
|
@@ -468,6 +497,7 @@ const toDel = (data, type) => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ await toSearchFind()
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|