|
@@ -4,9 +4,12 @@
|
|
|
<template #industry>
|
|
|
<el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
|
|
|
</template>
|
|
|
+ <template #field>
|
|
|
+ <el-option v-for="i in fieldList" :key="i.id" :label="i.label" :value="i.label"></el-option>
|
|
|
+ </template>
|
|
|
</custom-search-bar>
|
|
|
<custom-button-bar :fields="buttonFields" @add="toAdd" @select="toMoreDelect"></custom-button-bar>
|
|
|
- <custom-table :data="data" :fields="fields" @query="search" :total="total" :opera="opera" @exam="toExam" @edit="toEdit" @delete="toDelete" @toSelect="toSelect" :select="true">
|
|
|
+ <custom-table :data="data" :fields="fields" @query="search" :total="total" :opera="opera" @exam="toExam" @edit="toEdit" @delete="toDelete" @toSelect="toSelect" :select="false">
|
|
|
<template #is_use="{ row }">
|
|
|
<el-tag v-if="row.is_use == '0'" type="success" @click="toUse(row, '1')">启用</el-tag>
|
|
|
<el-tag v-else type="info" @click="toUse(row, '0')">禁用</el-tag>
|
|
@@ -23,6 +26,9 @@
|
|
|
<template #is_use>
|
|
|
<el-radio v-for="i in isUseList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
|
|
|
</template>
|
|
|
+ <template #field>
|
|
|
+ <el-option v-for="i in fieldList" :key="i.id" :label="i.label" :value="i.label"></el-option>
|
|
|
+ </template>
|
|
|
<template #industry>
|
|
|
<el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
|
|
|
</template>
|
|
@@ -68,8 +74,8 @@ const fields = [
|
|
|
{ label: t('pages.support.name'), model: 'name', isSearch: true },
|
|
|
{ label: t('pages.support.industry'), model: 'industry', isSearch: true, type: 'select' },
|
|
|
{ label: t('pages.support.tags'), model: 'tags', isSearch: true, format: (i) => getDict(i, 'tags') },
|
|
|
- { label: t('pages.support.field'), model: 'field', isSearch: true },
|
|
|
- { label: t('pages.support.time'), model: 'time', isSearch: true },
|
|
|
+ { label: t('pages.support.field'), model: 'field', isSearch: true, type: 'select' },
|
|
|
+ { label: t('pages.support.time'), model: 'time' },
|
|
|
{ label: t('pages.support.is_use'), model: 'is_use', custom: true, format: (i) => getDict(i, 'is_use') },
|
|
|
{ label: t('pages.support.status'), model: 'status', format: (i) => getDict(i, 'status') }
|
|
|
]
|
|
@@ -79,8 +85,8 @@ const opera = [
|
|
|
{ label: t('common.delete'), method: 'delete', confirm: true, type: 'danger', display: (i) => i.is_use === '1' }
|
|
|
]
|
|
|
const buttonFields = [
|
|
|
- { label: t('common.create'), method: 'add' },
|
|
|
- { label: t('common.select'), method: 'select', type: 'danger' }
|
|
|
+ { label: t('common.create'), method: 'add' }
|
|
|
+ // { label: t('common.select'), method: 'select', type: 'danger' }
|
|
|
]
|
|
|
let skip = 0
|
|
|
let limit = inject('limit')
|
|
@@ -91,6 +97,7 @@ const statusList = ref([])
|
|
|
const cityList = ref([])
|
|
|
const tagsList = ref([])
|
|
|
const sectorList = ref([])
|
|
|
+const fieldList = ref([])
|
|
|
// 多选列表
|
|
|
const selectList = ref([])
|
|
|
// 加载中
|
|
@@ -100,7 +107,7 @@ const formFields = ref([
|
|
|
{ label: t('pages.support.name'), model: 'name' },
|
|
|
{ label: t('pages.support.tags'), model: 'tags', custom: true },
|
|
|
{ label: t('pages.support.industry'), model: 'industry', type: 'select' },
|
|
|
- { label: t('pages.support.field'), model: 'field' },
|
|
|
+ { label: t('pages.support.field'), model: 'field', type: 'select' },
|
|
|
{ label: t('pages.support.time'), model: 'time', type: 'datetime' },
|
|
|
{ label: t('pages.support.area'), model: 'area', custom: true },
|
|
|
{ label: t('pages.support.address'), model: 'address', type: 'textarea' },
|
|
@@ -141,6 +148,9 @@ const searchOther = async () => {
|
|
|
// 城市
|
|
|
result = await regionStore.area({ level: 'province', code: 22 })
|
|
|
if ($checkRes(result)) cityList.value = result.data
|
|
|
+ // 领域
|
|
|
+ result = await dictDataStore.query({ code: 'field', is_use: '0' })
|
|
|
+ if ($checkRes(result)) fieldList.value = result.data
|
|
|
}
|
|
|
const search = async (query = { skip, limit }) => {
|
|
|
skip = query.skip
|