|
@@ -72,6 +72,29 @@
|
|
</template>
|
|
</template>
|
|
</custom-form>
|
|
</custom-form>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="24" v-if="dialog.type == '2'" class="dialog">
|
|
|
|
+ <div class="list" v-for="(item, index) in demandList" :key="index" @click="toView(item)">
|
|
|
|
+ <h2 class="name textMore">
|
|
|
|
+ <span>{{ item.name || '暂无' }}</span>
|
|
|
|
+ </h2>
|
|
|
|
+ <div class="other">
|
|
|
|
+ <span class="other_1">{{ getDict(item.urgent, 'urgent') || '暂无' }}</span>
|
|
|
|
+ <div class="other_2">
|
|
|
|
+ <span>应用行业:</span>
|
|
|
|
+ {{ item.field || '暂无' }}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="other_2">
|
|
|
|
+ <span>资金预算:</span>
|
|
|
|
+ {{ item.money || '面议' }}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="other_2 textOne">
|
|
|
|
+ <el-icon color="#0085f5"><Location /></el-icon>
|
|
|
|
+ {{ getArea(item.area) }}
|
|
|
|
+ <span class="state">{{ getDict(item.status, 'status') || '未解决' }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
@@ -86,6 +109,7 @@ const userStore = UserStore()
|
|
const user = computed(() => userStore.user)
|
|
const user = computed(() => userStore.user)
|
|
// 接口
|
|
// 接口
|
|
import { ProjectStore } from '@/store/api/platform/project'
|
|
import { ProjectStore } from '@/store/api/platform/project'
|
|
|
|
+import { DemandStore } from '@/store/api/platform/demand'
|
|
import { DictDataStore } from '@/store/api/system/dictData'
|
|
import { DictDataStore } from '@/store/api/system/dictData'
|
|
import { TagsStore } from '@/store/api/system/tags'
|
|
import { TagsStore } from '@/store/api/system/tags'
|
|
import { SectorStore } from '@/store/api/platform/sector'
|
|
import { SectorStore } from '@/store/api/platform/sector'
|
|
@@ -95,9 +119,10 @@ const store = ProjectStore()
|
|
const dictDataStore = DictDataStore()
|
|
const dictDataStore = DictDataStore()
|
|
const tagsStore = TagsStore()
|
|
const tagsStore = TagsStore()
|
|
const sectorStore = SectorStore()
|
|
const sectorStore = SectorStore()
|
|
|
|
+const demandStore = DemandStore()
|
|
// 加载中
|
|
// 加载中
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
-
|
|
|
|
|
|
+const router = useRouter()
|
|
const searchForm = ref({})
|
|
const searchForm = ref({})
|
|
// 列表
|
|
// 列表
|
|
const list = ref([])
|
|
const list = ref([])
|
|
@@ -117,6 +142,10 @@ const cooperateList = ref([])
|
|
const tagsList = ref([])
|
|
const tagsList = ref([])
|
|
const sectorList = ref([])
|
|
const sectorList = ref([])
|
|
|
|
|
|
|
|
+// 推荐需求列表
|
|
|
|
+const demandList = ref([])
|
|
|
|
+const width = ref('50%')
|
|
|
|
+
|
|
const form = ref({ file: [] })
|
|
const form = ref({ file: [] })
|
|
const dialog = ref({ type: '1', show: false, title: '发布项目' })
|
|
const dialog = ref({ type: '1', show: false, title: '发布项目' })
|
|
const formFields = ref([
|
|
const formFields = ref([
|
|
@@ -234,8 +263,11 @@ const toSave = async () => {
|
|
if (get(data, 'id')) res = await store.update({ ...data, ...other })
|
|
if (get(data, 'id')) res = await store.update({ ...data, ...other })
|
|
else res = await store.create({ ...data, ...other })
|
|
else res = await store.create({ ...data, ...other })
|
|
if ($checkRes(res, true)) {
|
|
if ($checkRes(res, true)) {
|
|
- search({ skip, limit })
|
|
|
|
- toClose()
|
|
|
|
|
|
+ await search({ skip, limit })
|
|
|
|
+ await toClose()
|
|
|
|
+ await searchDemand()
|
|
|
|
+ width.value = '90%'
|
|
|
|
+ dialog.value = { type: '2', show: true, title: '相关需求推荐' }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const toDraftSave = async () => {
|
|
const toDraftSave = async () => {
|
|
@@ -245,8 +277,11 @@ const toDraftSave = async () => {
|
|
if (get(data, 'id')) res = await store.update({ ...data, ...other })
|
|
if (get(data, 'id')) res = await store.update({ ...data, ...other })
|
|
else res = await store.create({ ...data, ...other })
|
|
else res = await store.create({ ...data, ...other })
|
|
if ($checkRes(res, true)) {
|
|
if ($checkRes(res, true)) {
|
|
- search({ skip, limit })
|
|
|
|
- toClose()
|
|
|
|
|
|
+ await search({ skip, limit })
|
|
|
|
+ await toClose()
|
|
|
|
+ await searchDemand()
|
|
|
|
+ width.value = '90%'
|
|
|
|
+ dialog.value = { type: '2', show: true, title: '相关需求推荐' }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 审核保存
|
|
// 审核保存
|
|
@@ -256,12 +291,30 @@ const toExam = async (row) => {
|
|
const data = cloneDeep(row)
|
|
const data = cloneDeep(row)
|
|
let res = await store.update({ id: data.id, status: '0', user: user.value.id })
|
|
let res = await store.update({ id: data.id, status: '0', user: user.value.id })
|
|
if ($checkRes(res, true)) {
|
|
if ($checkRes(res, true)) {
|
|
- search({ skip, limit })
|
|
|
|
- toClose()
|
|
|
|
|
|
+ await search({ skip, limit })
|
|
|
|
+ await toClose()
|
|
|
|
+ await searchDemand()
|
|
|
|
+ width.value = '90%'
|
|
|
|
+ dialog.value = { type: '2', show: true, title: '相关需求推荐' }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch(() => {})
|
|
.catch(() => {})
|
|
}
|
|
}
|
|
|
|
+// 需求列表查询
|
|
|
|
+const searchDemand = async () => {
|
|
|
|
+ const info = { skip: 0, limit: 5, is_use: '0', status: '1' }
|
|
|
|
+ const res = await demandStore.query(info)
|
|
|
|
+ if (res.errcode == '0') demandList.value = res.data
|
|
|
|
+}
|
|
|
|
+// 查看详情
|
|
|
|
+const toView = (item) => {
|
|
|
|
+ router.push({ path: '/demand/detail', query: { id: item.id || item._id } })
|
|
|
|
+}
|
|
|
|
+// 地区
|
|
|
|
+const getArea = (data) => {
|
|
|
|
+ if (data) return data.join('-')
|
|
|
|
+ else return '暂无地区'
|
|
|
|
+}
|
|
const toClose = () => {
|
|
const toClose = () => {
|
|
form.value = { file: [] }
|
|
form.value = { file: [] }
|
|
dialog.value = { show: false }
|
|
dialog.value = { show: false }
|
|
@@ -303,7 +356,6 @@ const sizeChange = (limits) => {
|
|
}
|
|
}
|
|
.dialog {
|
|
.dialog {
|
|
display: flex;
|
|
display: flex;
|
|
- justify-content: center;
|
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
.list {
|
|
.list {
|