|
@@ -46,6 +46,9 @@
|
|
<template #cooperate>
|
|
<template #cooperate>
|
|
<el-option v-for="i in cooperateList" :key="i._id" :label="i.label" :value="i.value"></el-option>
|
|
<el-option v-for="i in cooperateList" :key="i._id" :label="i.label" :value="i.value"></el-option>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template #area>
|
|
|
|
+ <el-cascader v-model="form.area" :props="{ value: 'label', label: 'label' }" :options="cityList" style="width: 100%" />
|
|
|
|
+ </template>
|
|
</custom-form>
|
|
</custom-form>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" v-if="dialog.type == '2'">
|
|
<el-col :span="24" v-if="dialog.type == '2'">
|
|
@@ -62,6 +65,7 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
// API 引用
|
|
// API 引用
|
|
|
|
+import { getCity } from '@/utils/city'
|
|
import { cloneDeep, get } from 'lodash-es'
|
|
import { cloneDeep, get } from 'lodash-es'
|
|
const $checkRes = inject('$checkRes')
|
|
const $checkRes = inject('$checkRes')
|
|
const { t } = useI18n()
|
|
const { t } = useI18n()
|
|
@@ -84,7 +88,7 @@ const fields = [
|
|
{ label: t('pages.project.status'), model: 'status', format: (i) => getDict(i, 'status') }
|
|
{ label: t('pages.project.status'), model: 'status', format: (i) => getDict(i, 'status') }
|
|
]
|
|
]
|
|
const opera = [
|
|
const opera = [
|
|
- { label: t('common.update'), method: 'edit', display: (i) => i.is_use === '1' },
|
|
|
|
|
|
+ { label: t('common.update'), method: 'edit' },
|
|
{ label: t('common.exam'), method: 'exam', type: 'warning', display: (i) => i.status === '0' },
|
|
{ label: t('common.exam'), method: 'exam', type: 'warning', display: (i) => i.status === '0' },
|
|
{ label: t('common.delete'), method: 'delete', confirm: true, type: 'danger', display: (i) => i.is_use === '1' }
|
|
{ label: t('common.delete'), method: 'delete', confirm: true, type: 'danger', display: (i) => i.is_use === '1' }
|
|
]
|
|
]
|
|
@@ -99,6 +103,7 @@ const fieldList = ref([])
|
|
const typeList = ref([])
|
|
const typeList = ref([])
|
|
const maturityList = ref([])
|
|
const maturityList = ref([])
|
|
const skillList = ref([])
|
|
const skillList = ref([])
|
|
|
|
+const cityList = ref([])
|
|
const cooperateList = ref([])
|
|
const cooperateList = ref([])
|
|
// 加载中
|
|
// 加载中
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
@@ -109,6 +114,7 @@ const formFields = ref([
|
|
{ label: t('pages.project.skill'), model: 'skill', type: 'select' },
|
|
{ label: t('pages.project.skill'), model: 'skill', type: 'select' },
|
|
{ label: t('pages.project.field'), model: 'field', type: 'select' },
|
|
{ label: t('pages.project.field'), model: 'field', type: 'select' },
|
|
{ label: t('pages.project.cooperate'), model: 'cooperate', type: 'select' },
|
|
{ label: t('pages.project.cooperate'), model: 'cooperate', type: 'select' },
|
|
|
|
+ { label: t('pages.demand.area'), model: 'area', custom: true },
|
|
{ label: t('pages.project.time'), model: 'time', type: 'date' },
|
|
{ label: t('pages.project.time'), model: 'time', type: 'date' },
|
|
{ label: t('pages.project.is_use'), model: 'is_use', type: 'radio' },
|
|
{ label: t('pages.project.is_use'), model: 'is_use', type: 'radio' },
|
|
{ label: t('pages.project.brief'), model: 'brief', type: 'textarea' }
|
|
{ label: t('pages.project.brief'), model: 'brief', type: 'textarea' }
|
|
@@ -123,6 +129,9 @@ const examForm = ref({})
|
|
// 请求
|
|
// 请求
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
loading.value = true
|
|
loading.value = true
|
|
|
|
+ getCity().then((response) => {
|
|
|
|
+ cityList.value = response.address
|
|
|
|
+ })
|
|
await searchOther()
|
|
await searchOther()
|
|
await search({ skip, limit })
|
|
await search({ skip, limit })
|
|
loading.value = false
|
|
loading.value = false
|