index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. <template>
  2. <div class="matching-system-container">
  3. <!-- 页面头部 -->
  4. <div class="page-header">
  5. <div class="header-content">
  6. <div class="header-left">
  7. <el-breadcrumb separator="/">
  8. <el-breadcrumb-item :to="{ path: '/edu-industry' }">产教融合</el-breadcrumb-item>
  9. <el-breadcrumb-item>智能校企资源匹配系统</el-breadcrumb-item>
  10. </el-breadcrumb>
  11. <h1 class="page-title">
  12. <el-icon class="title-icon"><Connection /></el-icon>
  13. 智能校企资源匹配系统
  14. </h1>
  15. </div>
  16. <div class="header-right">
  17. <el-button type="primary" @click="handleNewMatching">
  18. <el-icon><Plus /></el-icon>
  19. 新建匹配
  20. </el-button>
  21. </div>
  22. </div>
  23. </div>
  24. <!-- 功能导航标签 -->
  25. <div class="function-tabs">
  26. <el-tabs v-model="activeTab" @tab-change="handleTabChange">
  27. <el-tab-pane label="动态标签库管理" name="tags">
  28. <div class="tab-content">
  29. <!-- 标签库管理 -->
  30. <div class="tags-management">
  31. <el-row :gutter="24">
  32. <!-- 企业标签管理 -->
  33. <el-col :span="12">
  34. <div class="tag-section">
  35. <div class="section-header">
  36. <h3>企业标签管理</h3>
  37. <el-button type="primary" size="small" @click="handleAddEnterpriseTag">
  38. <el-icon><Plus /></el-icon>
  39. 添加标签
  40. </el-button>
  41. </div>
  42. <div class="tag-categories">
  43. <div class="category-item">
  44. <h4>技术领域</h4>
  45. <div class="tag-list">
  46. <el-tag
  47. v-for="tag in enterpriseTags.technology"
  48. :key="tag.id"
  49. :type="tag.type"
  50. closable
  51. @close="handleRemoveTag('enterprise', 'technology', tag.id)"
  52. >
  53. {{ tag.name }}
  54. </el-tag>
  55. </div>
  56. </div>
  57. <div class="category-item">
  58. <h4>设备类型</h4>
  59. <div class="tag-list">
  60. <el-tag
  61. v-for="tag in enterpriseTags.equipment"
  62. :key="tag.id"
  63. type="success"
  64. closable
  65. @close="handleRemoveTag('enterprise', 'equipment', tag.id)"
  66. >
  67. {{ tag.name }}
  68. </el-tag>
  69. </div>
  70. </div>
  71. <div class="category-item">
  72. <h4>合作历史</h4>
  73. <div class="tag-list">
  74. <el-tag
  75. v-for="tag in enterpriseTags.cooperation"
  76. :key="tag.id"
  77. type="warning"
  78. closable
  79. @close="handleRemoveTag('enterprise', 'cooperation', tag.id)"
  80. >
  81. {{ tag.name }}
  82. </el-tag>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </el-col>
  88. <!-- 院系标签管理 -->
  89. <el-col :span="12">
  90. <div class="tag-section">
  91. <div class="section-header">
  92. <h3>院系标签管理</h3>
  93. <el-button type="primary" size="small" @click="handleAddDepartmentTag">
  94. <el-icon><Plus /></el-icon>
  95. 添加标签
  96. </el-button>
  97. </div>
  98. <div class="tag-categories">
  99. <div class="category-item">
  100. <h4>专业方向</h4>
  101. <div class="tag-list">
  102. <el-tag
  103. v-for="tag in departmentTags.major"
  104. :key="tag.id"
  105. type="info"
  106. closable
  107. @close="handleRemoveTag('department', 'major', tag.id)"
  108. >
  109. {{ tag.name }}
  110. </el-tag>
  111. </div>
  112. </div>
  113. <div class="category-item">
  114. <h4>研究领域</h4>
  115. <div class="tag-list">
  116. <el-tag
  117. v-for="tag in departmentTags.research"
  118. :key="tag.id"
  119. type="success"
  120. closable
  121. @close="handleRemoveTag('department', 'research', tag.id)"
  122. >
  123. {{ tag.name }}
  124. </el-tag>
  125. </div>
  126. </div>
  127. <div class="category-item">
  128. <h4>师资力量</h4>
  129. <div class="tag-list">
  130. <el-tag
  131. v-for="tag in departmentTags.faculty"
  132. :key="tag.id"
  133. type="danger"
  134. closable
  135. @close="handleRemoveTag('department', 'faculty', tag.id)"
  136. >
  137. {{ tag.name }}
  138. </el-tag>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. </el-col>
  144. </el-row>
  145. </div>
  146. </div>
  147. </el-tab-pane>
  148. <el-tab-pane label="AI算法推荐引擎" name="ai">
  149. <div class="tab-content">
  150. <!-- AI推荐引擎 -->
  151. <div class="ai-recommendation">
  152. <el-row :gutter="24">
  153. <!-- 推荐配置 -->
  154. <el-col :span="8">
  155. <div class="recommendation-config">
  156. <h3>推荐配置</h3>
  157. <el-form :model="aiConfig" label-width="100px">
  158. <el-form-item label="匹配算法">
  159. <el-select v-model="aiConfig.algorithm" placeholder="选择算法">
  160. <el-option label="余弦相似度" value="cosine" />
  161. <el-option label="欧几里得距离" value="euclidean" />
  162. <el-option label="皮尔逊相关" value="pearson" />
  163. </el-select>
  164. </el-form-item>
  165. <el-form-item label="相似度阈值">
  166. <el-slider v-model="aiConfig.threshold" :min="0" :max="1" :step="0.1" />
  167. </el-form-item>
  168. <el-form-item label="推荐数量">
  169. <el-input-number v-model="aiConfig.count" :min="1" :max="20" />
  170. </el-form-item>
  171. <el-form-item>
  172. <el-button type="primary" @click="handleRunRecommendation">
  173. <el-icon><MagicStick /></el-icon>
  174. 运行推荐
  175. </el-button>
  176. </el-form-item>
  177. </el-form>
  178. </div>
  179. </el-col>
  180. <!-- 推荐结果 -->
  181. <el-col :span="16">
  182. <div class="recommendation-results">
  183. <h3>推荐结果</h3>
  184. <div class="result-list">
  185. <div
  186. v-for="result in recommendationResults"
  187. :key="result.id"
  188. class="result-item"
  189. >
  190. <div class="result-header">
  191. <div class="result-info">
  192. <h4>{{ result.name }}</h4>
  193. <p>{{ result.description }}</p>
  194. </div>
  195. <div class="result-score">
  196. <el-progress
  197. type="circle"
  198. :percentage="Math.round(result.similarity * 100)"
  199. :width="60"
  200. />
  201. </div>
  202. </div>
  203. <div class="result-tags">
  204. <el-tag
  205. v-for="tag in result.matchedTags"
  206. :key="tag"
  207. size="small"
  208. type="success"
  209. >
  210. {{ tag }}
  211. </el-tag>
  212. </div>
  213. <div class="result-actions">
  214. <el-button size="small" @click="handleViewDetail(result)">查看详情</el-button>
  215. <el-button size="small" type="primary" @click="handleInitiateCooperation(result)">
  216. 发起合作
  217. </el-button>
  218. </div>
  219. </div>
  220. </div>
  221. </div>
  222. </el-col>
  223. </el-row>
  224. </div>
  225. </div>
  226. </el-tab-pane>
  227. <el-tab-pane label="热力图看板" name="heatmap">
  228. <div class="tab-content">
  229. <!-- 热力图看板 -->
  230. <div class="heatmap-dashboard">
  231. <div class="dashboard-controls">
  232. <el-row :gutter="16">
  233. <el-col :span="6">
  234. <el-select v-model="heatmapConfig.dimension" placeholder="选择维度">
  235. <el-option label="技术领域" value="technology" />
  236. <el-option label="地理位置" value="location" />
  237. <el-option label="合作规模" value="scale" />
  238. </el-select>
  239. </el-col>
  240. <el-col :span="6">
  241. <el-date-picker
  242. v-model="heatmapConfig.dateRange"
  243. type="daterange"
  244. placeholder="选择时间范围"
  245. />
  246. </el-col>
  247. <el-col :span="4">
  248. <el-button type="primary" @click="handleUpdateHeatmap">更新热力图</el-button>
  249. </el-col>
  250. </el-row>
  251. </div>
  252. <div class="heatmap-container">
  253. <div class="heatmap-chart" ref="heatmapChart">
  254. <!-- 这里将集成热力图组件 -->
  255. <div class="chart-placeholder">
  256. <el-icon class="chart-icon"><DataAnalysis /></el-icon>
  257. <p>热力图数据可视化</p>
  258. <p class="chart-desc">实时显示供需匹配度分布</p>
  259. </div>
  260. </div>
  261. </div>
  262. <div class="heatmap-stats">
  263. <el-row :gutter="16">
  264. <el-col :span="6">
  265. <div class="stat-card">
  266. <div class="stat-number">{{ heatmapStats.hotSpots }}</div>
  267. <div class="stat-label">热点区域</div>
  268. </div>
  269. </el-col>
  270. <el-col :span="6">
  271. <div class="stat-card">
  272. <div class="stat-number">{{ heatmapStats.avgMatching }}%</div>
  273. <div class="stat-label">平均匹配度</div>
  274. </div>
  275. </el-col>
  276. <el-col :span="6">
  277. <div class="stat-card">
  278. <div class="stat-number">{{ heatmapStats.activeEntities }}</div>
  279. <div class="stat-label">活跃实体</div>
  280. </div>
  281. </el-col>
  282. <el-col :span="6">
  283. <div class="stat-card">
  284. <div class="stat-number">{{ heatmapStats.newConnections }}</div>
  285. <div class="stat-label">新增连接</div>
  286. </div>
  287. </el-col>
  288. </el-row>
  289. </div>
  290. </div>
  291. </div>
  292. </el-tab-pane>
  293. </el-tabs>
  294. </div>
  295. </div>
  296. </template>
  297. <script setup lang="ts">
  298. import { ref, onMounted } from 'vue'
  299. import {
  300. Connection,
  301. Plus,
  302. MagicStick,
  303. DataAnalysis
  304. } from '@element-plus/icons-vue'
  305. // 活动标签
  306. const activeTab = ref('tags')
  307. // 企业标签数据
  308. const enterpriseTags = ref({
  309. technology: [
  310. { id: 1, name: '人工智能', type: 'primary' },
  311. { id: 2, name: '大数据', type: 'primary' },
  312. { id: 3, name: '云计算', type: 'primary' },
  313. { id: 4, name: '物联网', type: 'primary' }
  314. ],
  315. equipment: [
  316. { id: 1, name: '服务器集群', type: 'success' },
  317. { id: 2, name: '实验设备', type: 'success' },
  318. { id: 3, name: '测试平台', type: 'success' }
  319. ],
  320. cooperation: [
  321. { id: 1, name: '长期合作', type: 'warning' },
  322. { id: 2, name: '项目合作', type: 'warning' },
  323. { id: 3, name: '技术转让', type: 'warning' }
  324. ]
  325. })
  326. // 院系标签数据
  327. const departmentTags = ref({
  328. major: [
  329. { id: 1, name: '计算机科学', type: 'info' },
  330. { id: 2, name: '软件工程', type: 'info' },
  331. { id: 3, name: '数据科学', type: 'info' }
  332. ],
  333. research: [
  334. { id: 1, name: '机器学习', type: 'success' },
  335. { id: 2, name: '数据挖掘', type: 'success' },
  336. { id: 3, name: '网络安全', type: 'success' }
  337. ],
  338. faculty: [
  339. { id: 1, name: '教授级', type: 'danger' },
  340. { id: 2, name: '副教授级', type: 'danger' },
  341. { id: 3, name: '博士导师', type: 'danger' }
  342. ]
  343. })
  344. // AI推荐配置
  345. const aiConfig = ref({
  346. algorithm: 'cosine',
  347. threshold: 0.7,
  348. count: 10
  349. })
  350. // 推荐结果
  351. const recommendationResults = ref([
  352. {
  353. id: 1,
  354. name: '华为技术有限公司',
  355. description: '全球领先的ICT基础设施和智能终端提供商',
  356. similarity: 0.92,
  357. matchedTags: ['人工智能', '云计算', '5G技术']
  358. },
  359. {
  360. id: 2,
  361. name: '阿里巴巴集团',
  362. description: '以电子商务为核心的数字经济体',
  363. similarity: 0.87,
  364. matchedTags: ['大数据', '云计算', '电子商务']
  365. },
  366. {
  367. id: 3,
  368. name: '腾讯科技',
  369. description: '中国领先的互联网增值服务提供商',
  370. similarity: 0.83,
  371. matchedTags: ['人工智能', '社交网络', '游戏技术']
  372. }
  373. ])
  374. // 热力图配置
  375. const heatmapConfig = ref({
  376. dimension: 'technology',
  377. dateRange: []
  378. })
  379. // 热力图统计数据
  380. const heatmapStats = ref({
  381. hotSpots: 15,
  382. avgMatching: 78,
  383. activeEntities: 234,
  384. newConnections: 42
  385. })
  386. // 方法
  387. const handleTabChange = (tabName: string) => {
  388. console.log('切换标签:', tabName)
  389. }
  390. const handleNewMatching = () => {
  391. console.log('新建匹配')
  392. }
  393. const handleAddEnterpriseTag = () => {
  394. console.log('添加企业标签')
  395. }
  396. const handleAddDepartmentTag = () => {
  397. console.log('添加院系标签')
  398. }
  399. const handleRemoveTag = (type: string, category: string, id: number) => {
  400. console.log('删除标签:', type, category, id)
  401. }
  402. const handleRunRecommendation = () => {
  403. console.log('运行AI推荐')
  404. }
  405. const handleViewDetail = (result: any) => {
  406. console.log('查看详情:', result)
  407. }
  408. const handleInitiateCooperation = (result: any) => {
  409. console.log('发起合作:', result)
  410. }
  411. const handleUpdateHeatmap = () => {
  412. console.log('更新热力图')
  413. }
  414. onMounted(() => {
  415. console.log('智能校企资源匹配系统已加载')
  416. })
  417. </script>
  418. <style scoped>
  419. .matching-system-container {
  420. padding: 20px;
  421. background: #f5f7fa;
  422. min-height: 100vh;
  423. }
  424. /* 页面头部 */
  425. .page-header {
  426. background: white;
  427. border-radius: 12px;
  428. padding: 20px;
  429. margin-bottom: 20px;
  430. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  431. }
  432. .header-content {
  433. display: flex;
  434. justify-content: space-between;
  435. align-items: center;
  436. }
  437. .page-title {
  438. display: flex;
  439. align-items: center;
  440. font-size: 24px;
  441. font-weight: 600;
  442. color: #2c3e50;
  443. margin: 8px 0 0 0;
  444. }
  445. .title-icon {
  446. margin-right: 8px;
  447. color: #667eea;
  448. }
  449. /* 功能标签 */
  450. .function-tabs {
  451. background: white;
  452. border-radius: 12px;
  453. padding: 20px;
  454. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  455. }
  456. .tab-content {
  457. padding-top: 20px;
  458. }
  459. /* 标签管理 */
  460. .tag-section {
  461. background: #f8f9fa;
  462. border-radius: 8px;
  463. padding: 20px;
  464. height: 100%;
  465. }
  466. .section-header {
  467. display: flex;
  468. justify-content: space-between;
  469. align-items: center;
  470. margin-bottom: 20px;
  471. }
  472. .section-header h3 {
  473. margin: 0;
  474. color: #2c3e50;
  475. }
  476. .category-item {
  477. margin-bottom: 20px;
  478. }
  479. .category-item h4 {
  480. margin: 0 0 12px 0;
  481. color: #5a6c7d;
  482. font-size: 14px;
  483. }
  484. .tag-list {
  485. display: flex;
  486. flex-wrap: wrap;
  487. gap: 8px;
  488. }
  489. /* AI推荐 */
  490. .recommendation-config {
  491. background: #f8f9fa;
  492. border-radius: 8px;
  493. padding: 20px;
  494. }
  495. .recommendation-config h3 {
  496. margin: 0 0 20px 0;
  497. color: #2c3e50;
  498. }
  499. .recommendation-results {
  500. background: #f8f9fa;
  501. border-radius: 8px;
  502. padding: 20px;
  503. }
  504. .recommendation-results h3 {
  505. margin: 0 0 20px 0;
  506. color: #2c3e50;
  507. }
  508. .result-item {
  509. background: white;
  510. border-radius: 8px;
  511. padding: 16px;
  512. margin-bottom: 16px;
  513. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  514. }
  515. .result-header {
  516. display: flex;
  517. justify-content: space-between;
  518. align-items: flex-start;
  519. margin-bottom: 12px;
  520. }
  521. .result-info h4 {
  522. margin: 0 0 4px 0;
  523. color: #2c3e50;
  524. }
  525. .result-info p {
  526. margin: 0;
  527. color: #7f8c8d;
  528. font-size: 14px;
  529. }
  530. .result-tags {
  531. margin-bottom: 12px;
  532. }
  533. .result-tags .el-tag {
  534. margin-right: 8px;
  535. }
  536. .result-actions {
  537. text-align: right;
  538. }
  539. /* 热力图 */
  540. .heatmap-dashboard {
  541. background: #f8f9fa;
  542. border-radius: 8px;
  543. padding: 20px;
  544. }
  545. .dashboard-controls {
  546. margin-bottom: 20px;
  547. }
  548. .heatmap-container {
  549. background: white;
  550. border-radius: 8px;
  551. padding: 20px;
  552. margin-bottom: 20px;
  553. min-height: 400px;
  554. }
  555. .chart-placeholder {
  556. display: flex;
  557. flex-direction: column;
  558. align-items: center;
  559. justify-content: center;
  560. height: 360px;
  561. color: #7f8c8d;
  562. }
  563. .chart-icon {
  564. font-size: 64px;
  565. margin-bottom: 16px;
  566. color: #667eea;
  567. }
  568. .chart-desc {
  569. font-size: 14px;
  570. margin: 8px 0 0 0;
  571. }
  572. .heatmap-stats {
  573. display: flex;
  574. gap: 16px;
  575. }
  576. .stat-card {
  577. background: white;
  578. border-radius: 8px;
  579. padding: 20px;
  580. text-align: center;
  581. flex: 1;
  582. }
  583. .stat-number {
  584. font-size: 24px;
  585. font-weight: 600;
  586. color: #2c3e50;
  587. margin-bottom: 8px;
  588. }
  589. .stat-label {
  590. font-size: 14px;
  591. color: #7f8c8d;
  592. }
  593. </style>