xg-project-library/html/details.html
2024-11-06 19:05:28 +08:00

595 lines
34 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="/css/common.css" />
<link rel="stylesheet" href="/css/details.css" />
<script src="/js/axios.min.js"></script>
<script src="/js/vue.global.js"></script>
<script src="/js/common.js"></script>
<script src="/js/base.js"></script>
<script src="/js/crypto-js.js"></script>
</head>
<body>
<div class="main" id="app">
<img class="index-icon" src="/img/index-icon.png" />
<div class="box">
<div class="tab flexacenter">
首页
<img class="img" src="/img/arrows.svg" />
按学科查看
<img class="img" src="/img/arrows.svg" />
{{ disciplineObj[info.disciplineid]?.label || '' }}
<img class="img" src="/img/arrows.svg" />
<div class="current">{{ info.name_zh }}</div>
</div>
<div class="details flexflex">
<img class="logo" src="/img/details-icon.png" />
<div class="right">
<div class="name">{{ info.name_zh }}</div>
<div class="name-en">{{ info.name_en }}</div>
<div class="school flexacenter">
<div class="flexacenter">
<img class="icon" :src="info.schoollogo" />
{{ info.schoolname || '' }}
</div>
<template v-if="info.au0">
<div class="line">|</div>
{{ info.au0 }}
</template>
<template v-if="info.au1">
<div class="line">|</div>
{{ info.au1 }}
</template>
</div>
<div class="word flexacenter">
<img class="img" src="/img/quotation-mark.png" />
111111111111111111111111111
</div>
<div class="tag flexflex">
<div class="tag-item admissions" v-if="info.admissionsproject">招生官项目</div>
<div class="tag-item gray" :class="{'semester': info.semesterState}">{{ info?.semester?.text }}</div>
<div class="tag-item" v-for="item in info.tags">{{ item }}</div>
</div>
</div>
</div>
</div>
<div class="body flexflex">
<div class="content flex1 flexflex">
<div class="side flexflex">
<div class="item flexcenter" :class="{'pitch': sideKey == key}" v-for="(item,key) in side">{{ item }}</div>
</div>
<div class="details-box flex1">
<div class="side-item">
<div class="item-header flexacenter">
<div>专业排名</div>
<div class="list-btn flexacenter">
榜单
<image class="icon" mode="widthFix" src="/img/arrows-circle-black.svg"> </image>
</div>
</div>
<div class="ranking">
<div class="item flexflex" v-for="item in info.rankings">
<div class="rank flexacenter">
<img class="logo" :src="'/img/' + rankingsObj[item.system].alias + '.png'" />
<div class="number flexcenter">
{{ item.total_score }}
<img class="triangle" src="https://app.gter.net/image/miniApp/offer/triangle-qs.svg" />
</div>
</div>
<div class="rank-box flexflex flex1">
<div class="itemm flexacenter">
<div class="key">年份:</div>
<div class="value flex1">{{ item.year }}</div>
</div>
<div class="itemm flexacenter">
<div class="key">学科:</div>
<div class="value flex1">{{ item.subject }}</div>
</div>
</div>
</div>
</div>
<div class="item-header flexacenter">项目简介</div>
<text-module :text="info.intro || ' - '" class="mb40"></text-module>
<div class="item-header flexacenter">专业资格认证</div>
<text-module :text="info.accreditation || '无'" class="mb40"></text-module>
<div class="item-header flexacenter">还没 申请日程</div>
<div class="application-schedule block">
<div class="list">
<div class="time flexflex">
<div class="item flex1">
<div class="name">2024-01-05</div>
<div class="value">开始申请日期</div>
</div>
<div class="item flex1">
<div class="name">2024-01-05</div>
<div class="value">截止申请日期</div>
</div>
</div>
</div>
<div class="application-else">
<div class="item flexacenter">
<div class="name">面试时间:</div>
<div class="value flex1">2024-01-05</div>
</div>
<div class="item flexacenter">
<div class="name">结果通知时间:</div>
<div class="value flex1">2024-01-05</div>
</div>
</div>
</div>
<div class="item-header flexacenter">最低入学要求</div>
<div class="demand block">
<div class="text">{{ info.entrance_requirements || '-' }}</div>
<template v-if="info.english_proficiency">
<div class="title">英语能力要求</div>
<div class="hint">满足以下其中一项即可</div>
<div class="list">
<div class="item flexflex" v-for="item in info.english_proficiency">
<img class="triangle" src="https://app.gter.net/image/miniApp/offer/triangle-red.svg" />
<div class="name">{{ item.name_zh }}</div>
<div class="value">总分 {{ item.total }} 分以上</div>
</div>
</div>
</template>
</div>
<template v-if="info.documents_required">
<div class="item-header flexacenter">必须文件</div>
<text-module :text="info.documents_required || '无'" class="mb40"></text-module>
</template>
<div class="tuition-scholarships flexflex">
<div class="left">
<div class="item-header flexacenter">
费用
</div>
<div class="tuition block flexacenter">
<div class="tuition-left flex1 flexjcenter">
<div class="unit">{{ info.tuition_currency || 'HK$' }}</div>
<div class="number">{{ info.tuition_fee_text || '待确认' }}</div>
<div class="text">总学费</div>
</div>
<div class="tuition-right">
<div class="item flexacenter">
<div class="key">每学分学费</div>
<div class="value">{{ info.tuition_fee_per_credit_text || '-' }}</div>
</div>
<div class="item flexacenter">
<div class="key">申请费</div>
<div class="value">{{ info.application_fee_text || '-' }}</div>
</div>
<div class="item flexacenter">
<div class="key">入学保证金</div>
<div class="value">{{ info.admission_deposit_text || '-' }}</div>
</div>
</div>
</div>
</div>
<div class="right">
<div class="item-header flexacenter">奖学金</div>
<div class="scholarships block flexcenter">{{ info.scholarships || '-' }}</div>
</div>
</div>
<template v-if="info.selection_criteria">
<div class="item-header flexacenter">录取选择标准</div>
<text-module :text="info.selection_criteria || '- 暂无 -'" class="mb40"></text-module>
</template>
<template v-if="info.recent_admission">
<div class="item-header flexacenter">近期录取信息</div>
<text-module :text="info.recent_admission || '- 暂无 -'" class="mb40"></text-module>
</template>
<div class="item-header flexacenter">学习模式</div>
<div class="pattern block mb40">
<div class="tab flexacenter">
<div class="item flex1 flexcenter" :class="{'pitch': studyMode == 'ft'}" @click="cutStudyMode('ft')">全日制</div>
<div class="item flex1 flexcenter" :class="{'pitch': studyMode == 'pt'}" @click="cutStudyMode('pt')">兼读制</div>
</div>
<div class="introduce flexflex" v-if="studyMode == 'ft'">
<div class="item flex1">
<div class="value">{{ info.language_of_instruction_text || '-' }}</div>
<div class="name">教学语言</div>
</div>
<div class="item flex1">
<div class="value">{{ info.ft_normal_period || '-' }}</div>
<div class="name">正常学习时长</div>
</div>
<div class="item flex1">
<div class="value">{{ info.ft_maximum_period || '待确认' }}</div>
<div class="name">最长学习时长</div>
</div>
</div>
<div class="introduce flexflex" v-else>
<div class="item flex1">
<div class="value">{{ info.language_of_instruction_text || '-' }}</div>
<div class="name">教学语言</div>
</div>
<div class="item flex1">
<div class="value">{{ info.pt_normal_period || '-' }}</div>
<div class="name">正常学习时长</div>
</div>
<div class="item flex1">
<div class="value">{{ info.pt_maximum_period || '待确认' }}</div>
<div class="name">最长学习时长</div>
</div>
</div>
</div>
<template v-if="info.time_of_class">
<div class="item-header flexacenter">上课时间</div>
<text-module :text="info.time_of_class || '- 暂无 -'" class="mb40"></text-module>
</template>
<div v-if="course.required.length != 0 || course.required.length != 0" class="item-header flexacenter">课程设置</div>
<div class="course block">
<img class="icon" src="https://app.gter.net/image/miniApp/offer/triangle-red.svg" />
<div class="title">必修课程</div>
<div class="hint">(共 24 学分)</div>
<div class="table-head flexacenter">
<div class="item number">课程编号</div>
<div class="item name flex1">课程名称</div>
<div class="item credit">学分</div>
</div>
<div class="table-body">
<div class="list flexflex">
<div class="item number flexcenter">EF5042</div>
<div class="item name flex1">
<div class="text">公司金融</div>
<div class="english">Corporate Finance</div>
</div>
<div class="item credit flexcenter">3</div>
</div>
<div class="list flexflex">
<div class="item number flexcenter">EF5042</div>
<div class="item name flex1">
<div class="text">公司金融</div>
<div class="english">Corporate Finance</div>
</div>
<div class="item credit flexcenter">3</div>
</div>
<div class="list flexflex">
<div class="item number flexcenter">EF5042</div>
<div class="item name flex1">
<div class="text">公司金融</div>
<div class="english">Corporate Finance</div>
</div>
<div class="item credit flexcenter">3</div>
</div>
<div class="list flexflex">
<div class="item number flexcenter">EF5042</div>
<div class="item name flex1">
<div class="text">公司金融</div>
<div class="english">Corporate Finance</div>
</div>
<div class="item credit flexcenter">3</div>
</div>
</div>
</div>
<div class="link block">
<div class="title">项目目录项目详情</div>
<div class="text">https://www.cityu.edu.hk/catalogue/pg/202324/programme/MSF.html</div>
<div class="flexflex" style="justify-content: flex-end;">
<div class="btn flexcenter">
<img class="icon" src="https://app.gter.net/image/miniApp/offer/copy-icon.png" mode="widthFix" />
复制链接
</div>
<div class="btn open flexcenter">打开链接</div>
</div>
</div>
<div class="item-header flexacenter">学位</div>
<div class="degree block">
<div class="title flexcenter">
<img class="icon" src="https://app.gter.net/image/miniApp/offer/name-bj.svg" mode="widthFix" />
学位名称
</div>
<div class="name">理学硕士(金融学)</div>
<div class="english">Master of Science in Finance</div>
</div>
<div class="issue-bj">
<div class="issue block">
<div class="index flexcenter">1</div>
<img class="index-bj" src="https://app.gter.net/image/miniApp/offer/index-bj.svg" />
<div class="title">我需要拥有“与商业相关”的学位吗?</div>
<div class="text">申请人如果在非金融或非商业专业拥有优秀的学术记录,也会被考虑。</div>
</div>
</div>
<div class="item-header flexacenter">宣传册</div>
<div class="link brochure block">
<div class="top flexacenter">
<img class="img" src="/img/pdf-icon.svg" />
<div class="right">
<div class="title">宣传册</div>
<div class="name">MSF-MSFE_A4_poster_chi_2024.pdf</div>
</div>
</div>
<div class="flexflex" style="justify-content: flex-end;">
<div class="btn flexcenter">
<img class="icon" src="/img/download-icon.png" />
下载文件
</div>
<div class="btn open flexcenter">打开文件</div>
</div>
</div>
</div>
</div>
</div>
<div class="else">
<div class="school flexacenter">
<div class="logo flexcenter">
<img class="img" src="http://127.0.0.1:5500/images/%E9%A6%96%E9%A1%B5/u74.png" />
</div>
<div class="info">
<div class="name">香港大学</div>
<div class="name-en">The University of Hong Kong</div>
</div>
</div>
<div class="case">
<div class="head flexacenter">
<div class="dot"></div>
<div class="text flex1">Offer</div>
<img class="img" src="/img/arrows-icon.png" />
</div>
<div class="list offer">
<div class="item">
<div class="name">Asian Studies</div>
<div class="brief flexacenter">MPhil <span>|</span> 24Fall <span>|</span> offer</div>
</div>
<div class="item">
<div class="name">Asian Studies</div>
<div class="brief flexacenter">MPhil <span>|</span> 24Fall <span>|</span> offer</div>
</div>
<div class="item">
<div class="name">Asian Studies</div>
<div class="brief flexacenter">MPhil <span>|</span> 24Fall <span>|</span> offer</div>
</div>
</div>
</div>
<div class="case mj">
<div class="head flexacenter">
<div class="dot"></div>
<div class="text flex1">面经</div>
<img class="img" src="/img/arrows-icon.png" />
</div>
<div class="list offer">
<div class="item">
<div class="name">environmental science</div>
<div class="brief-box">
<div class="brief flexacenter">
<img class="avatar" src="http://127.0.0.1:5500/images/%E9%A1%B9%E7%9B%AE%E8%AF%A6%E6%83%85/u1144.svg" />
第二轮申请的第二轮申请的第二轮申请的第二轮申请的第二轮申请的第二轮申请的第二轮申请的因为第一轮的时候我还没注意到这个项目错过了DDL...
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 底部 -->
<div class="base flexcenter">
<div style="display: none;" class="type1 flexacenter">
<div class="btn flexacenter"><img class="img" src="/img/contrast-icon.png" />项目对比</div>
<div class="line"></div>
<div class="btn flexacenter"><img class="img" src="/img/manage-icon.png" />项目管理</div>
<div class="add flex1"><img class="img" src="" />加入对比单</div>
</div>
<div style="display: none;" class="type2 flexacenter">
<div class="btn flexacenter">我的项目 <img class="img" src="/img/arrows-circle-green.svg" /></div>
<div class="input-box flexacenter">
<img class="img" src="/img/edit-icon.png" />
<input class="input flex1" placeholder="添加备注" />
</div>
<div class="state-box">
<div class="state-btn flexcenter">待定<img class="img" src="/img/arrows-triangle-white.svg" /></div>
</div>
</div>
<div class="type3 flexacenter">
<div class="btn flexacenter">我的项目 <img class="img" src="/img/arrows-circle-green.svg" /></div>
<div class="add-btn flexcenter already" style="margin-right: 10px;">
<img class="img" src="/img/tick-circle-gray.svg" />
已加入对比单
</div>
<div class="add-btn flexcenter">
<img class="img" src="/img/add-circle-white.svg" />
加入对比单
</div>
</div>
</div>
</div>
<script>
const { createApp, ref, onMounted, nextTick, onUnmounted, computed, defineProps } = Vue
const subject = createApp({
setup() {
let side = ref({
// pivotal: "关键信息",
basic: "基本信息",
apply: "申请信息",
attend: "就读信息",
graduate: "毕业&就业",
issue: "常见问题",
links: "相关链接",
})
let rankingsObj = ref({})
let disciplineObj = ref({})
const uniqid = "fOzLnH48yS5C"
onMounted(() => {
// window.addEventListener("scroll", handleScroll)
getBaseData().then(data => {
rankingsObj.value = data.rankings
disciplineObj.value = data.discipline
getData()
})
})
let info = ref({})
let remark = ref("")
let sideKey = ref("pivotal")
let contras = ref({})
let course = ref({})
const getData = () => {
$ajaxget("/api/project.detail", {
uniqid,
}).then(res => {
const data = res.data
decodeKey(data.info).then(res => {
data.info = res
let courseObj = {
required: [],
requiredCount: 0,
elective: [],
electiveCount: 0,
}
const infoObj = data.info || {}
const fields = ["tuition_fee", "tuition_fee_per_credit", "application_fee", "admission_deposit"]
fields.forEach(field => {
const textKey = `${field}_text`
infoObj[textKey] = formatNumberWithSpaces(info[field] || "")
})
const curriculum = infoObj.curriculum || []
if (infoObj.language_of_instruction) {
let strOutput = infoObj.language_of_instruction.join(",")
infoObj["language_of_instruction_text"] = strOutput
}
curriculum.forEach(element => {
if (element.credit == "N/A") element.credit = 0
element.type === "必修课" ? (courseObj.required.push(element), (courseObj.requiredCount += element.credit)) : (courseObj.elective.push(element), (courseObj.electiveCount += element.credit))
})
let contrasObj = data.contras
if (Array.isArray(contrasObj)) contrasObj = {}
remark.value = contrasObj.remarks || ""
// 算出最后申请时间
infoObj["application_end"] = calculateApplicaDeadline(infoObj.nonlocal_application_end || {})
// 算出面试轮时间
infoObj["interviewRounds"] = calculateInterviewRound(infoObj.nonlocal_application_end || {})
if (typeof infoObj.mode_of_study == "string") infoObj.mode_of_study = JSON.parse(info.mode_of_study)
let sideObj = side.value
// 判断是否常见问题 ,没有则删除左侧
if (!infoObj.faq || infoObj.faq.length == 0) delete sideObj.issue
// 判断 毕业就业 没有则删除左侧
if (!info.award_zh && !infoObj.graduation_requirements && !infoObj.domains && !infoObj.employers && !infoObj.positions) delete sideObj.graduate
// 判断奖学金文案
if (infoObj.scholarship) infoObj["scholarshipText"] = JudgmentScholarshipText(infoObj.scholarship)
if (infoObj.leaflet_url) {
const leaflet_url = decodeURIComponent(infoObj.leaflet_url)
const urlWithoutParams = leaflet_url.split("?")[0]
const urlParts = urlWithoutParams.split("/")
const fileName = urlParts[urlParts.length - 1]
infoObj["leaflet_name"] = fileName
}
// const isadmission = info.admissionsproject || 0
// if (isadmission == 1) this.getAdmissionList()
const date = new Date()
const month = date.getMonth() + 1
const year = date.getFullYear()
const semester = infoObj.semester || {}
if (month > semester.month && year + 1 <= semester.year) infoObj["semesterState"] = true
console.log("infoObj", infoObj.rankings)
info.value = infoObj
side.value = sideObj
sideKey.value = "basic"
course.value = courseObj
contras.value = contrasObj
})
})
}
// 判断奖学金文案
const JudgmentScholarshipText = obj => {
let text = ""
if (obj.local && obj.nonlocal) text = "均有"
else if (!obj.local && !obj.nonlocal) text = "均无"
else if (obj.local && !obj.nonlocal) text = "非本地学生无"
else if (!obj.local && obj.nonlocal) text = "非本地学生有"
return text
}
// 计算出外地申请截止时间
const calculateApplicaDeadline = obj => {
// 初始化变量来存储最大时间点的属性和日期
let maxDate = null
// 遍历对象的属性
for (const item in obj) {
// 如果当前日期是最大日期或是第一个日期,则更新最大日期和属性
if (maxDate === null || obj[item] > maxDate) maxDate = obj[item]
}
return maxDate
}
// 计算出面试轮的数组
const calculateInterviewRound = obj => {
let rounds = []
const chineseNumbers = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十"]
const formatTime = (time, index) => {
return {
text: `${chineseNumbers[index]}`,
time,
}
}
Object.keys(obj).forEach((key, index) => {
rounds.push(formatTime(obj[key], index))
})
if (rounds.length == 0) rounds = [{}]
return rounds || [{}]
}
let studyMode = ref("ft") // 'ft', // 学习模式显示状态 ft 全日制 pt 兼读制
const cutStudyMode = type => {
studyMode.value = type
}
return { side, sideKey, info, disciplineObj, rankingsObj, cutStudyMode, studyMode }
},
})
subject.component("text-module", textModule)
subject.mount("#app")
</script>
</body>
</html>