diff --git a/src/assets/img/arrow-down.png b/src/assets/img/arrow-down.png new file mode 100644 index 0000000..dc9a3a9 Binary files /dev/null and b/src/assets/img/arrow-down.png differ diff --git a/src/assets/img/none.png b/src/assets/img/none.png new file mode 100644 index 0000000..2e23da1 Binary files /dev/null and b/src/assets/img/none.png differ diff --git a/src/libs/core.js b/src/libs/core.js new file mode 100644 index 0000000..acbff8b --- /dev/null +++ b/src/libs/core.js @@ -0,0 +1,202 @@ +const pad2 = str => ('0' + str).substr(-2) + +function fMoney (s, n) { + n = n > 0 && n <= 20 ? n : 2 + s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(n) + '' + let l = s.split('.')[0].split('').reverse() + let r = s.split('.')[1] + let t = '' + for(let i = 0; i < l.length; i ++ ) { + t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? ',' : '') + } + return t.split('').reverse().join('') + '.' + r +} + +function toDateTime (date, time) { + if (!date) return '' + date = date.toString() + time = time ? time.toString() : '' + let str = `${date.substr(0, 4)}-${date.substr(4, 2)}-${date.substr(6, 2)}` + if (date.length == 14) { + str += ` ${date.substr(8, 2)}:${date.substr(10, 2)}:${date.substr(12, 2)}` + } else if (date.length == 6) { + str = `${date.substr(0, 2)}:${date.substr(2, 2)}:${date.substr(4, 2)}` + } else if (time) { + str += ` ${time.substr(0, 2)}:${time.substr(2, 2)}:${time.substr(4, 2)}` + } + return str +} + +function fMoney2 (m) { + return parseFloat(m).toFixed(2) +} + +function orderreleaseType (sts) { + const status = { + '0': '手动发布', + '1': '定时发布', + } + return status[sts] || '未知状态' +} + +function orderflag (sts) { + const status = { + '0': true, + '1': false, + + } + return status[sts] || '未知状态' +} + +function orderassesmentState (sts) { + const status = { + '0': '待开始', + '1': '进行中', + '2': '已结束', + + } + return status[sts] || '未知状态' +} + +function orderfounder (sts) { + const status = { + '0': '系统', + '1': '老师' + } + return status[sts] || '未知状态' +} +function projectPermissions (sts) { + const status = { + '1': '考核', + '2': '竞赛', + '0': '练习' + + } + return status[sts] || '未知状态' +} + +function roleType (type) { + const types = { + '2': '管理员', + '3': '老师', + '4': '学生' + } + return types[type] || '未知类型' +} + +function educationDegreeList (id) { + const list = [ + { +     name: '专科', +     value: 1 + }, + { +   name: '本科', +   value: 2 + }, + { +   name: '硕士', +   value: 3 + }, + { +   name: '博士', +   value: 4 + }, + { +   name: '其他', +   value: 5 + } + ] + let educationdegree = list.find((n,k) => { + return n.value == id + }).name + return educationdegree +} + +//返回格式化时间,传参例如:"yyyy-MM-dd hh:mm:ss" +function formatDate(fmt,date) { + var date = date ? date : new Date() + var o = { + "M+" : date.getMonth()+1, //月份 + "d+" : date.getDate(), //日 + "h+" : date.getHours(), //小时 + "m+" : date.getMinutes(), //分 + "s+" : date.getSeconds(), //秒 + "q+" : Math.floor((date.getMonth()+3)/3), //季度 + "S" : date.getMilliseconds() //毫秒 + }; + if(/(y+)/.test(fmt)) { + fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length)); + } + for(var k in o) { + if(new RegExp("("+ k +")").test(fmt)){ + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); + } + } + return fmt; +} + +function removeByValue(arr, val) { + for(var i=0; i -1) return true + return false +} + +export default{ + orderfounder, + projectPermissions, + orderassesmentState, + fMoney, + fMoney2, + toDateTime, + orderreleaseType, + orderflag, + roleType, + educationDegreeList, + removeByValue, + formateTime, + getCaption, + formatDate, + isIE, + isFirefox, + isEdge, + dateCompatible +} \ No newline at end of file diff --git a/src/pages/appraisal/list/index.vue b/src/pages/appraisal/list/index.vue new file mode 100644 index 0000000..b3e9223 --- /dev/null +++ b/src/pages/appraisal/list/index.vue @@ -0,0 +1,441 @@ + + + + + \ No newline at end of file diff --git a/src/pages/course/details/index.vue b/src/pages/course/details/index.vue new file mode 100644 index 0000000..46a3342 --- /dev/null +++ b/src/pages/course/details/index.vue @@ -0,0 +1,462 @@ + + + + + \ No newline at end of file diff --git a/src/pages/info/details/index.vue b/src/pages/info/details/index.vue new file mode 100644 index 0000000..f301cc0 --- /dev/null +++ b/src/pages/info/details/index.vue @@ -0,0 +1,133 @@ + + + + + + diff --git a/src/pages/info/list/index.vue b/src/pages/info/list/index.vue new file mode 100644 index 0000000..a181a19 --- /dev/null +++ b/src/pages/info/list/index.vue @@ -0,0 +1,298 @@ + + + + + + diff --git a/src/pages/match/details/index.vue b/src/pages/match/details/index.vue new file mode 100644 index 0000000..1888bd0 --- /dev/null +++ b/src/pages/match/details/index.vue @@ -0,0 +1,378 @@ + + + + + \ No newline at end of file diff --git a/src/pages/record/details/index.vue b/src/pages/record/details/index.vue new file mode 100644 index 0000000..4aaf0ad --- /dev/null +++ b/src/pages/record/details/index.vue @@ -0,0 +1,94 @@ + + + + + \ No newline at end of file diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue new file mode 100644 index 0000000..de692c1 --- /dev/null +++ b/src/pages/station/preview/index.vue @@ -0,0 +1,466 @@ + + + + + \ No newline at end of file diff --git a/src/router/modules/appraisal.js b/src/router/modules/appraisal.js new file mode 100644 index 0000000..f536164 --- /dev/null +++ b/src/router/modules/appraisal.js @@ -0,0 +1,23 @@ +import BasicLayout from "@/layouts/home"; + +const meta = {}; + +const pre = "appraisal-"; + +export default { + path: "/appraisal", + name: "appraisal", + redirect: { + name: `${pre}list` + }, + meta, + component: BasicLayout, + children: [ + { + name: `${pre}list`, + path: `list`, + component: () => import("@/pages/appraisal/list"), + meta: { title: "能力测评" } + } + ] +}; \ No newline at end of file diff --git a/src/router/modules/course.js b/src/router/modules/course.js new file mode 100644 index 0000000..af9aa7e --- /dev/null +++ b/src/router/modules/course.js @@ -0,0 +1,29 @@ +import BasicLayout from "@/layouts/home"; + +const meta = {}; + +const pre = "course-"; + +export default { + path: "/course", + name: "course", + redirect: { + name: `${pre}list` + }, + meta, + component: BasicLayout, + children: [ + { + name: `${pre}list`, + path: `list`, + component: () => import("@/pages/course/list"), + meta: { title: "课程管理" } + }, + { + name: `${pre}details`, + path: `details`, + component: () => import("@/pages/course/details"), + meta: { title: "课程学习" } + } + ] +}; \ No newline at end of file diff --git a/src/router/modules/info.js b/src/router/modules/info.js new file mode 100644 index 0000000..72e3025 --- /dev/null +++ b/src/router/modules/info.js @@ -0,0 +1,29 @@ +import BasicLayout from "@/layouts/home"; + +const meta = {}; + +const pre = "info-"; + +export default { + path: "/info", + name: "info", + redirect: { + name: `${pre}list` + }, + meta, + component: BasicLayout, + children: [ + { + name: `${pre}list`, + path: `list`, + component: () => import("@/pages/info/list"), + meta: { title: "资讯" } + }, + { + name: `${pre}details`, + path: `details`, + component: () => import("@/pages/info/details"), + meta: { title: "资讯详情" } + } + ] +}; \ No newline at end of file diff --git a/src/router/modules/match.js b/src/router/modules/match.js new file mode 100644 index 0000000..8a0fa32 --- /dev/null +++ b/src/router/modules/match.js @@ -0,0 +1,29 @@ +import BasicLayout from "@/layouts/home"; + +const meta = {}; + +const pre = "match-"; + +export default { + path: "/match", + name: "match", + redirect: { + name: `${pre}list` + }, + meta, + component: BasicLayout, + children: [ + { + name: `${pre}list`, + path: `list`, + component: () => import("@/pages/match/list"), + meta: { title: "线上赛事" } + }, + { + name: `${pre}details`, + path: `details`, + component: () => import("@/pages/match/details"), + meta: { title: "竞赛信息" } + } + ] +}; \ No newline at end of file diff --git a/src/store/modules/appraisal.js b/src/store/modules/appraisal.js new file mode 100644 index 0000000..c13995a --- /dev/null +++ b/src/store/modules/appraisal.js @@ -0,0 +1,19 @@ +/** + * 测评相关 + * */ +export default { + namespaced: true, + state: { + answerHistory: [], + }, + mutations: { + SET_ANSWER_HISTORY: (state, data) => { + state.answerHistory = data; + }, + }, + actions: { + setAnswerHistory({ state, commit }, data) { + commit("SET_ANSWER_HISTORY", data); + } + } +}; \ No newline at end of file diff --git a/src/store/modules/info.js b/src/store/modules/info.js new file mode 100644 index 0000000..450c81c --- /dev/null +++ b/src/store/modules/info.js @@ -0,0 +1,26 @@ +/** + * 资讯相关 + * */ +export default { + namespaced: true, + state: { + tabsName: "2", + columnId: "" + }, + mutations: { + SET_TABS_NAME: (state, name) => { + state.tabsName = name; + }, + SET_COLUMN_ID: (state, id) => { + state.columnId = id; + } + }, + actions: { + setTabsName({ state, commit }, name) { + commit("SET_TABS_NAME", name); + }, + setColumnId({ state, commit }, id) { + commit("SET_COLUMN_ID", id); + } + } +}; \ No newline at end of file diff --git a/src/store/modules/match.js b/src/store/modules/match.js new file mode 100644 index 0000000..ae7f238 --- /dev/null +++ b/src/store/modules/match.js @@ -0,0 +1,26 @@ +/** + * 赛事相关 + * */ +export default { + namespaced: true, + state: { + matchId: "", + matchSignupStatus: false + }, + mutations: { + SET_MATCH_ID: (state, id) => { + state.matchId = id; + }, + SET_MATCH_SIGNUP_STATUS: (state, value) => { + state.matchSignupStatus = value; + } + }, + actions: { + setMatchId({ state, commit }, id) { + commit("SET_MATCH_ID", id); + }, + setMatchSignupStatus({ state, commit }, value) { + commit("SET_MATCH_SIGNUP_STATUS", value); + } + } +}; \ No newline at end of file