no message
This commit is contained in:
parent
cc516cfe44
commit
54db481fd8
@ -91,19 +91,54 @@
|
||||
height: 5px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
.body .item .head.options .options-list {
|
||||
position: absolute;
|
||||
.body .item .head.options .options-list-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 5;
|
||||
}
|
||||
.body .item .head.options .options-list {
|
||||
position: absolute;
|
||||
top: 26px;
|
||||
left: 0;
|
||||
width: 200px;
|
||||
height: 161px;
|
||||
background-color: #e4e8fd;
|
||||
border-radius: 10px;
|
||||
padding-left: 38px;
|
||||
padding: 6px 0 6px 38px;
|
||||
z-index: 6;
|
||||
}
|
||||
.body .item .head.options .options-list .options-item {
|
||||
color: #555555;
|
||||
font-size: 13px;
|
||||
line-height: 22px;
|
||||
padding: 8px 0;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
.body .item .head.options .options-list .options-item:not(:last-of-type) {
|
||||
border-bottom: 1px dotted #c1c5d4;
|
||||
}
|
||||
.body .item .head.options .options-list .options-item.pitch {
|
||||
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
|
||||
font-weight: 650;
|
||||
font-style: normal;
|
||||
color: #000000;
|
||||
}
|
||||
.body .item .head.options .options-list .options-item.pitch .icon {
|
||||
display: block;
|
||||
}
|
||||
.body .item .head.options .options-list .options-item .icon {
|
||||
display: none;
|
||||
height: 6px;
|
||||
width: 12px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%) rotate(270deg);
|
||||
left: -21px;
|
||||
}
|
||||
.body .item .thead {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
|
@ -111,20 +111,56 @@
|
||||
}
|
||||
}
|
||||
|
||||
.options-list {
|
||||
position: absolute;
|
||||
.options-list-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.options-list {
|
||||
position: absolute;
|
||||
top: 26px;
|
||||
left: 0;
|
||||
width: 200px;
|
||||
height: 161px;
|
||||
background-color: rgba(228, 232, 253, 1);
|
||||
border-radius: 10px;
|
||||
padding-left: 38px;
|
||||
padding: 6px 0 6px 38px;
|
||||
z-index: 6;
|
||||
|
||||
.options-item {
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 1px dotted #c1c5d4;
|
||||
}
|
||||
color: #555555;
|
||||
font-size: 13px;
|
||||
line-height: 22px;
|
||||
padding: 8px 0;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
|
||||
&.pitch {
|
||||
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
|
||||
font-weight: 650;
|
||||
font-style: normal;
|
||||
color: #000000;
|
||||
.icon {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: none;
|
||||
height: 6px;
|
||||
width: 12px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%) rotate(270deg);
|
||||
left: -21px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
<script src="/js/base.js"></script>
|
||||
<script src="/js/encrypt.js"></script>
|
||||
<script src="/js/masonry.pkgd.min.js"></script>
|
||||
<style>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
@ -49,7 +49,23 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="item flexflex" v-for="(item,key) in listObj">
|
||||
<div class="head flexacenter">{{ item }}</div>
|
||||
<div class="head options" v-if="key == 'rank'">
|
||||
{{ item }}
|
||||
<div class="" style="position: relative">
|
||||
<div class="options-box flexacenter">
|
||||
<div class="text">QS世界专…</div>
|
||||
<img class="icon" src="{~}/img/triangle-black.svg" />
|
||||
</div>
|
||||
<div class="options-list-mask"></div>
|
||||
<div class="options-list">
|
||||
<div class="options-item flexacenter" :class="{'pitch': item == 1}" v-for="(item,index) in 3" :key="index" @click="selectRank(item)">
|
||||
<img class="icon" src="/img/triangle-red.svg" />
|
||||
TIMES世界专业排名
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="head flexacenter" v-else>{{ item }}</div>
|
||||
<div class="thead flex1" v-for="(it,index) in list">
|
||||
<!-- <div v-if="key == 'semester'" class="mode1 flexcenter">{{ it.rank || '-' }}</div> -->
|
||||
<div v-if="key == 'semester'" class="tag flexcenter">
|
||||
@ -171,7 +187,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const { createApp, ref, onMounted, nextTick, onUnmounted, computed } = Vue
|
||||
const { createApp, ref, onMounted, nextTick, onUnmounted, computed } = Vue;
|
||||
const projectIndex = createApp({
|
||||
setup() {
|
||||
const listObj = ref({
|
||||
@ -193,146 +209,146 @@
|
||||
has_project_course: "是否含项目课程",
|
||||
has_placement_course: "是否含实习课程",
|
||||
result_date: "录取通知时间",
|
||||
})
|
||||
let disciplineObj = { 1: "建筑学类", 2: "设计与艺术学类", 3: "商学与管理学类", 4: "计算机类", 5: "教育学类", 6: "工学类", 7: "文学类", 8: "语言学类", 9: "法学类", 10: "新闻传播学类", 11: "医学类", 12: "理学类", 13: "服务类", 14: "社会科学类" }
|
||||
});
|
||||
let disciplineObj = { 1: "建筑学类", 2: "设计与艺术学类", 3: "商学与管理学类", 4: "计算机类", 5: "教育学类", 6: "工学类", 7: "文学类", 8: "语言学类", 9: "法学类", 10: "新闻传播学类", 11: "医学类", 12: "理学类", 13: "服务类", 14: "社会科学类" };
|
||||
|
||||
let list = ref([])
|
||||
let isquick = ref(false)
|
||||
let list = ref([]);
|
||||
let isquick = ref(false);
|
||||
|
||||
let ids = []
|
||||
let ids = [];
|
||||
onMounted(() => {
|
||||
ids = "484,41".split(",") || []
|
||||
getBaseData().then(data => {
|
||||
console.log("data", data)
|
||||
ids = "484,41".split(",") || [];
|
||||
getBaseData().then((data) => {
|
||||
console.log("data", data);
|
||||
|
||||
initData()
|
||||
})
|
||||
})
|
||||
initData();
|
||||
});
|
||||
});
|
||||
|
||||
const initData = () => {
|
||||
$ajax("/api/project.contrast", {
|
||||
$ajax("/api/contrast", {
|
||||
projectid: ids,
|
||||
}).then(res => {
|
||||
if (res.code != 200) return
|
||||
const data = res.data
|
||||
const dataList = data.data || []
|
||||
}).then((res) => {
|
||||
if (res.code != 200) return;
|
||||
const data = res.data;
|
||||
const dataList = data.data || [];
|
||||
|
||||
let allArr = []
|
||||
dataList.forEach(element => allArr.push(decodeKey(element)))
|
||||
let allArr = [];
|
||||
dataList.forEach((element) => allArr.push(decodeKey(element)));
|
||||
|
||||
const date = new Date()
|
||||
const month = date.getMonth() + 1
|
||||
const year = date.getFullYear()
|
||||
const date = new Date();
|
||||
const month = date.getMonth() + 1;
|
||||
const year = date.getFullYear();
|
||||
|
||||
const obj = disciplineObj
|
||||
Promise.allSettled(allArr).then(res => {
|
||||
console.log("res", res)
|
||||
let targetList = []
|
||||
res.forEach(element => targetList.push(element.status === "fulfilled" ? element.value : {}))
|
||||
targetList.forEach(element => {
|
||||
element["tuition_fee_text"] = formatNumberWithSpaces(element["tuition_fee"] || "")
|
||||
const obj = disciplineObj;
|
||||
Promise.allSettled(allArr).then((res) => {
|
||||
console.log("res", res);
|
||||
let targetList = [];
|
||||
res.forEach((element) => targetList.push(element.status === "fulfilled" ? element.value : {}));
|
||||
targetList.forEach((element) => {
|
||||
element["tuition_fee_text"] = formatNumberWithSpaces(element["tuition_fee"] || "");
|
||||
|
||||
element["admission_deposit_text"] = formatNumberWithSpaces(element["admission_deposit"] || "")
|
||||
element["admission_deposit_text"] = formatNumberWithSpaces(element["admission_deposit"] || "");
|
||||
|
||||
if (element.language_of_instruction) {
|
||||
let strOutput = element.language_of_instruction.join(",")
|
||||
element["language_of_instruction_text"] = strOutput
|
||||
let strOutput = element.language_of_instruction.join(",");
|
||||
element["language_of_instruction_text"] = strOutput;
|
||||
}
|
||||
|
||||
if (Array.isArray(element.english_proficiency)) {
|
||||
const english = element.english_proficiency
|
||||
let text = ""
|
||||
english.forEach(element => {
|
||||
text += `・${element.name_zh}(${element.name_en}) ${element.total}分以上 \n`
|
||||
})
|
||||
element["english_proficiency_text"] = text
|
||||
const english = element.english_proficiency;
|
||||
let text = "";
|
||||
english.forEach((element) => {
|
||||
text += `・${element.name_zh}(${element.name_en}) ${element.total}分以上 \n`;
|
||||
});
|
||||
element["english_proficiency_text"] = text;
|
||||
}
|
||||
|
||||
if (element.scholarship) element["scholarshipText"] = JudgmentScholarshipText(element.scholarship)
|
||||
element["disciplinename"] = obj[element.disciplineid] || ""
|
||||
if (element.scholarship) element["scholarshipText"] = JudgmentScholarshipText(element.scholarship);
|
||||
element["disciplinename"] = obj[element.disciplineid] || "";
|
||||
|
||||
const semester = element.semester || {}
|
||||
if (month > semester.month && year + 1 <= semester.year) element["semesterState"] = true
|
||||
})
|
||||
console.log("targetList", targetList)
|
||||
list.value = targetList
|
||||
isquick.value = data.isquick
|
||||
})
|
||||
})
|
||||
}
|
||||
const semester = element.semester || {};
|
||||
if (month > semester.month && year + 1 <= semester.year) element["semesterState"] = true;
|
||||
});
|
||||
console.log("targetList", targetList);
|
||||
list.value = targetList;
|
||||
isquick.value = data.isquick;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 判断奖学金文案
|
||||
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 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 stateObj = ref({
|
||||
0: "待定",
|
||||
1: "主申",
|
||||
2: "冲刺",
|
||||
3: "保底",
|
||||
})
|
||||
});
|
||||
|
||||
let projectList = ref([])
|
||||
let projectList = ref([]);
|
||||
const getListData = () => {
|
||||
$ajax("/api/project.user", {
|
||||
limit: 2000,
|
||||
}).then(res => {
|
||||
if (res.code != 200) return
|
||||
const data = res.data
|
||||
let list = data.data || []
|
||||
}).then((res) => {
|
||||
if (res.code != 200) return;
|
||||
const data = res.data;
|
||||
let list = data.data || [];
|
||||
|
||||
list = list.filter(obj => obj.status === 1 && !ids.includes(`${obj.projectid}`))
|
||||
list = list.filter((obj) => obj.status === 1 && !ids.includes(`${obj.projectid}`));
|
||||
|
||||
projectList.value = list
|
||||
})
|
||||
}
|
||||
projectList.value = list;
|
||||
});
|
||||
};
|
||||
|
||||
let selectIndex = null // 选中要替换或增加的 下标
|
||||
let projectState = ref("") // 项目弹窗的状态 '' replace add
|
||||
let selectIndex = null; // 选中要替换或增加的 下标
|
||||
let projectState = ref(""); // 项目弹窗的状态 '' replace add
|
||||
// 点击 顶部的 增加 或者 替换 项目
|
||||
const handleProject = (index, type) => {
|
||||
selectIndex = index
|
||||
projectList.value = []
|
||||
projectState.value = type
|
||||
selectIndex = index;
|
||||
projectList.value = [];
|
||||
projectState.value = type;
|
||||
|
||||
getListData()
|
||||
}
|
||||
getListData();
|
||||
};
|
||||
|
||||
const cross = () => {
|
||||
projectState.value = ""
|
||||
}
|
||||
projectState.value = "";
|
||||
};
|
||||
|
||||
const selectProject = index => {
|
||||
const target = projectList.value[index]
|
||||
const selectProject = (index) => {
|
||||
const target = projectList.value[index];
|
||||
|
||||
// 替换
|
||||
if (projectState.value == "replace") ids[selectIndex] = `${target.projectid}`
|
||||
else ids.push(`${target.projectid}`) // 增加
|
||||
if (projectState.value == "replace") ids[selectIndex] = `${target.projectid}`;
|
||||
else ids.push(`${target.projectid}`); // 增加
|
||||
|
||||
initData()
|
||||
initData();
|
||||
|
||||
projectState.value = ""
|
||||
}
|
||||
projectState.value = "";
|
||||
};
|
||||
|
||||
const deleteProject = index => {
|
||||
ids.splice(index, 1) // 从指定下标删除一个元素
|
||||
list.value.splice(index, 1) // 从指定下标删除一个元素
|
||||
}
|
||||
const deleteProject = (index) => {
|
||||
ids.splice(index, 1); // 从指定下标删除一个元素
|
||||
list.value.splice(index, 1); // 从指定下标删除一个元素
|
||||
};
|
||||
|
||||
// 点击保存
|
||||
const save = () => {
|
||||
$ajax("/api/project.contrast/addQuick", {
|
||||
projectid: ids,
|
||||
}).then(res => {
|
||||
isquick.value = true
|
||||
})
|
||||
}
|
||||
}).then((res) => {
|
||||
isquick.value = true;
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
listObj,
|
||||
@ -346,11 +362,11 @@
|
||||
selectProject,
|
||||
deleteProject,
|
||||
save,
|
||||
}
|
||||
};
|
||||
},
|
||||
})
|
||||
});
|
||||
|
||||
projectIndex.mount("#app")
|
||||
projectIndex.mount("#app");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -2,7 +2,7 @@ const projectBaseURL = "https://program.gter.net";
|
||||
|
||||
if (["localhost", "127.0.0.1"].includes(location.hostname)) {
|
||||
axios.defaults.headers = {
|
||||
Authorization: "97d1c7b2fe6dec05aaf52c0f3b9130e8",
|
||||
Authorization: "3338bf6a2e53dda872da3664a2560b25",
|
||||
};
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ function $ajax(url) {
|
||||
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
url = url.indexOf("https://") > -1 ? url : projectBaseURL + url;
|
||||
|
||||
if (["localhost", "127.0.0.1"].includes(location.hostname)) data["authorization"] = "97d1c7b2fe6dec05aaf52c0f3b9130e8";
|
||||
if (["localhost", "127.0.0.1"].includes(location.hostname)) data["authorization"] = "3338bf6a2e53dda872da3664a2560b25";
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
axios
|
||||
@ -37,7 +37,7 @@ function $ajaxget(url, data) {
|
||||
if (!data) data = {};
|
||||
|
||||
// data["authorization"] = "97d1c7b2fe6dec05aaf52c0f3b9130e8"
|
||||
if (["localhost", "127.0.0.1"].includes(location.hostname)) data["authorization"] = "97d1c7b2fe6dec05aaf52c0f3b9130e8";
|
||||
if (["localhost", "127.0.0.1"].includes(location.hostname)) data["authorization"] = "3338bf6a2e53dda872da3664a2560b25";
|
||||
|
||||
url = url.indexOf("https://") > -1 ? url : projectBaseURL + url;
|
||||
url += objectToQueryString(data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user