|
@@ -47,6 +47,7 @@ const form = ref({})
|
|
|
// 字典表
|
|
|
const fieldList = ref([])
|
|
|
const statusList = ref([])
|
|
|
+const matchList = ref([])
|
|
|
const typeList = ref([
|
|
|
{ value: '0', label: '供给' },
|
|
|
{ value: '1', label: '需求' }
|
|
@@ -73,7 +74,7 @@ const searchField = async () => {
|
|
|
{ label: '成果名称', model: 'name', type: 'name' },
|
|
|
{ label: '技术领域:', model: 'field', type: 'dict' },
|
|
|
{ label: '成果地区:', model: 'area', type: 'area' },
|
|
|
- { label: '状态:', model: 'status', type: 'dict' }
|
|
|
+ { label: '审核状态:', model: 'status', type: 'dict' }
|
|
|
]
|
|
|
} else if (routeType.value == 'demand') {
|
|
|
fields.value = [
|
|
@@ -81,21 +82,22 @@ const searchField = async () => {
|
|
|
{ label: '技术领域:', model: 'field', type: 'dict' },
|
|
|
{ label: '类型:', model: 'type', type: 'dict' },
|
|
|
{ label: '需求地区:', model: 'area', type: 'area' },
|
|
|
- { label: '状态:', model: 'status', type: 'dict' }
|
|
|
+ { label: '审核状态:', model: 'status', type: 'dict' }
|
|
|
]
|
|
|
} else if (routeType.value == 'project') {
|
|
|
fields.value = [
|
|
|
{ label: '项目名称', model: 'name', type: 'name' },
|
|
|
{ label: '技术领域:', model: 'field', type: 'dict' },
|
|
|
{ label: '发布时间:', model: 'time' },
|
|
|
- { label: '状态:', model: 'status', type: 'dict' }
|
|
|
+ { label: '审核状态:', model: 'status', type: 'dict' }
|
|
|
]
|
|
|
} else if (routeType.value == 'match') {
|
|
|
fields.value = [
|
|
|
{ label: '比赛名称', model: 'name', type: 'name' },
|
|
|
{ label: '比赛金额:', model: 'money' },
|
|
|
{ label: '比赛日期:', model: 'time', type: 'time' },
|
|
|
- { label: '状态:', model: 'status', type: 'dict' }
|
|
|
+ { label: '赛事状态:', model: 'match_status', type: 'dict' },
|
|
|
+ { label: '审核状态:', model: 'status', type: 'dict' }
|
|
|
]
|
|
|
}
|
|
|
await search({ skip, limit })
|
|
@@ -124,6 +126,9 @@ const searchOther = async () => {
|
|
|
// 状态
|
|
|
result = await dictDataStore.query({ code: 'examStatus', is_use: '0' })
|
|
|
if ($checkRes(result)) statusList.value = result.data
|
|
|
+ // 赛事状态
|
|
|
+ result = await dictDataStore.query({ code: 'matchStatus', is_use: '0' })
|
|
|
+ if ($checkRes(result)) matchList.value = result.data
|
|
|
}
|
|
|
// 字典数据转换
|
|
|
const getDict = (data, model) => {
|
|
@@ -131,6 +136,7 @@ const getDict = (data, model) => {
|
|
|
if (model == 'field') res = fieldList.value.find((f) => f.value == data)
|
|
|
if (model == 'status') res = statusList.value.find((f) => f.value == data)
|
|
|
if (model == 'type') res = typeList.value.find((f) => f.value == data)
|
|
|
+ if (model == 'match_status') res = matchList.value.find((f) => f.value == data)
|
|
|
return get(res, 'label')
|
|
|
}
|
|
|
// 地区显示
|
|
@@ -144,7 +150,7 @@ const getTime = (data) => {
|
|
|
else return '暂无'
|
|
|
}
|
|
|
const toCommon = (data) => {
|
|
|
- if (routeType.value == 'match') form.value = { rules: {} }
|
|
|
+ if (routeType.value == 'match') form.value = { file: [], rules: {} }
|
|
|
else form.value = {}
|
|
|
type.value = data
|
|
|
}
|
|
@@ -160,7 +166,6 @@ const toView = (item) => {
|
|
|
// 修改
|
|
|
const toEdit = (item) => {
|
|
|
form.value = item
|
|
|
- console.log(item)
|
|
|
type.value = '1'
|
|
|
}
|
|
|
// 保存
|