From ec6b3c551dca10d92ec0d751db14bebf59bd4772 Mon Sep 17 00:00:00 2001 From: lixg Date: Sat, 4 Feb 2023 22:00:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index1.js | 11 +- src/assets/images/project/tishi.png | Bin 0 -> 418 bytes src/assets/images/project/triangle.png | Bin 0 -> 256 bytes .../drawers/project/AddCertificate.vue | 340 +++++++++++++-- .../student/TableCertificateStudent.vue | 312 ++++++++++++++ src/views/projectcenter/TaskPage.vue | 391 +++++++++++++----- 6 files changed, 911 insertions(+), 143 deletions(-) create mode 100644 src/assets/images/project/tishi.png create mode 100644 src/assets/images/project/triangle.png create mode 100644 src/components/student/TableCertificateStudent.vue diff --git a/src/api/index1.js b/src/api/index1.js index bc903e8e..9d1ab747 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-04 22:45:31 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2023-02-03 18:39:27 + * @LastEditTime: 2023-02-04 19:59:55 * @FilePath: /fe-manage/src/api/index1.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -201,4 +201,11 @@ export const saveupdatecertificate = (obj) => http.post('/admin/certificate/save //删除证书 export const certificatedel = (obj) => http.get('/admin/certificate/del', { params: obj }) //证书详情 -export const certificatedetail = (obj) => http.post('/admin/certificate/get', obj) \ No newline at end of file +export const certificatedetail = (obj) => http.get('/admin/certificate/get', { params: obj }) +//获取阶段列表 +export const getStageList = (obj) => http.get('/admin/project/getStageList', { params: obj }) +//获取任务列表 +export const getTaskList = (obj) => http.get('/admin/project/getTaskList', { params: obj }) +//查看证书学员列表 +export const stuCertList = (obj) => http.get('/admin/certificate/stuCertList', { params: obj }) + diff --git a/src/assets/images/project/tishi.png b/src/assets/images/project/tishi.png new file mode 100644 index 0000000000000000000000000000000000000000..5200ff56728e068a8e1849e5b9d6a3b08820ef0b GIT binary patch literal 418 zcmV;T0bTxyP)Px$TuDShR5(v#WS|f*qU$$oyDiGb%AU)>@ZXn_fk7E0|DS>3E&~JO=3l>mPCj3y z`WjgeiUH}Fe6m!o4r;)|^Nb7(2FR-9g;*F2WH=aJ zeEP$1^1%-*1~6PWSt@S`Ho&6$;U@+L23}-U#d@GxbcPn62@ z;WPlGsyk2=teBty=G~ZHAY{OQ1|%l~@uIw$z9P?WO#lD@ literal 0 HcmV?d00001 diff --git a/src/assets/images/project/triangle.png b/src/assets/images/project/triangle.png new file mode 100644 index 0000000000000000000000000000000000000000..cd42fe7ca36a14b215ef7be5a63d7568e427f25c GIT binary patch literal 256 zcmV+b0ssDqP)Px#x=BPqR47w@&piu40TjmZ|M9wz(Z<>N!9FpRKqNR0|-cKwv zY*YGojH(nZWaf4Bium^I%%g~%fS0000 avatar
@@ -110,8 +111,14 @@
-
+
+
+ +
-
+
完成项目 + + + + +
- + 全部任务 完成必修任务 @@ -169,14 +204,18 @@ ref="select" size="small" placeholder="请选择阶段" - v-model:value="value1" + v-model:value="selectStageName" style="width: 120px" @focus="focus" @change="selectStage" + :options="stageList" + :fieldNames="{ + key: 'id', + title: 'name', + value: 'name', + }" + :disabled="condition !== 2" > - 第一阶段 - 第二阶段 - 第三阶段
@@ -195,14 +234,18 @@ ref="select" size="small" placeholder="请选择任务" - v-model:value="value1" + v-model:value="selectTaskName" style="width: 120px" @focus="focus" @change="selectTask" + :options="taskList" + :fieldNames="{ + key: 'id', + title: 'name', + value: 'name', + }" + :disabled="condition !== 3" > - 任务一 - 任务二 - 任务三
@@ -221,14 +264,18 @@ ref="select" size="small" placeholder="请选择考试" - v-model:value="value1" + v-model:value="selectExamName" style="width: 120px" @focus="focus" @change="selectExam" + :options="examList" + :fieldNames="{ + key: 'id', + title: 'name', + value: 'name', + }" + :disabled="condition !== 4" > - 考试一 - 考试二 - 考试三
@@ -243,19 +290,36 @@ align-items: center; " > - 高于 + 高于 +
- 分可获得,当前项目积分为 10 分 + 分可获得,当前项目积分为 10 分 +
-
-
- -
无证书
-
请点击新建证书
-
-
- -
+
+
-
+添加证书
-
- -
- -
-
- 培训认证证书 +
+ +
+ 无证书
-
- 完成项目 -
-
- ... -
-
查看
-
编辑
-
删除
-
+
+ 请点击新建证书
+ +
+
+
+添加证书
+
+
+
+ +
+
获取规则
+
+ {{ + item.finishType === 1 + ? "完成项目" + : item.finishType === 2 + ? "完成阶段" + : item.finishType === 3 + ? "完成任务" + : item.finishType === 4 + ? "考试合格" + : item.finishType === 5 + ? "获得积分" + : "-" + }} +
+ + +
+ 更多 + +
+
+ +
+
+
{{ item.name }}
+
+
+ + +
@@ -1446,6 +1450,9 @@ @@ -2121,6 +2128,8 @@ import ProjectLevel from "@/components/project/ProjectLevel"; import TrainClass from "@/components/project/TrainClass"; import ProjectManager from "@/components/project/ProjectManagerNew"; import TableStudent from "@/components/student/TableStudent"; +import TableCertificateStudent from "@/components/student/TableCertificateStudent"; + import { getStuPage } from "@/api/index1"; import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue"; import { checkPer } from "@/utils/utils"; @@ -2153,6 +2162,7 @@ export default { TwoDimensionalCode, ProjectManager, TableStudent, + TableCertificateStudent, AddCertificate, CreateCertificate, ProjectVoteManage, @@ -2310,7 +2320,11 @@ export default { TMvisible: false, //考试管理 Evalvisible: false, //测评管理 ACertificate: false, //证书添加 + ACertificateEdit: false, //是否是编辑证书 + ACertificateEditId: null, //编辑证书的id CCertificate: false, //证书创建 + ischeckCertificate: false, //是否显示查看证书 + ACertificateCheckId: null, //查看证书学员的id Stuvisible: false, //添加学员 Importvisible: false, //导入学员 Seevisible: false, //查看学员 @@ -2334,7 +2348,7 @@ export default { checkedBOEU: false, //是否BOEU实施 radioV1: "", radioV2: "", - activeKey: "1", //1:概览 2.任务... + activeKey: "7", //1:概览 2.任务... activeKey1: "8", //8:学员管理 9:小组管理 activeKey2: "3", activeKeyNotice: "11", @@ -2857,6 +2871,9 @@ export default { modal1Visible: false, // 证书预览 changegroupV: false, //换组弹窗 + + certificatelist: [], + fileUrl: process.env.VUE_APP_FILE_PATH, }); const levelList = reactive({ @@ -4558,11 +4575,62 @@ export default { { /* 证书 */ } - function addCertificate() { + //获取证书列表 + const getCertificate = () => { + let obj = { + pid: state.projectId, + }; + api + .certificate(obj) + .then((res) => { + console.log("获取证书列表", res); + if (res.data.code === 200) { + state.certificatelist = res.data.data.records; + } + }) + .catch((err) => { + console.log("获取证书列表失败", err); + }); + }; + getCertificate(); + + //查看证书 + const checkCertificate = (item) => { + console.log("点击查看证书"); + state.ischeckCertificate = true; + state.ACertificateCheckId = item.id; + }; + const addCertificate = () => { console.log("点击添加证书"); state.ACertificate = true; - } - + state.ACertificateEdit = false; + state.ACertificateEditId = null; + }; + const editCertificate = (item) => { + console.log("点击编辑证书", item); + state.ACertificate = true; + state.ACertificateEdit = true; + state.ACertificateEditId = item.id; + }; + //点击删除证书 + const deleteCertificate = (item) => { + console.log("要删除的证书", item); + let obj = { + id: item.id, + }; + api + .certificatedel(obj) + .then((res) => { + console.log("删除证书结果", res); + if (res.data.code === 200) { + message.success("删除成功"); + getCertificate(); + } + }) + .catch((err) => { + console.log("删除证书失败", err); + }); + }; function previewPic() { state.modal1Visible = true; } @@ -4679,7 +4747,11 @@ export default { downloadFile, checkPer, addCertificate, + editCertificate, + deleteCertificate, previewPic, + getCertificate, + checkCertificate, }; }, }; @@ -7546,6 +7618,115 @@ export default { background-image: url(../../assets/images/taskpage/nocertificate.png); background-size: 100% 100%; } + .certificate1 { + padding: 36px; + display: flex; + min-height: 400px; + flex-wrap: wrap; + .addcertificate1 { + width: 210px; + height: 256px; + border: 1px solid rgba(64, 158, 255, 1); + display: flex; + justify-content: center; + align-items: center; + color: #4ea6ff; + cursor: pointer; + margin-left: 16px; + margin-right: 16px; + background-color: rgba(64, 158, 255, 0.06); + margin-bottom: 20px; + .addcertext { + font-size: 16px; + font-weight: 500; + color: #388be1; + line-height: 22px; + } + } + .certificatelist { + display: flex; + align-items: center; + flex-direction: column; + margin-left: 16px; + margin-right: 16px; + margin-bottom: 20px; + .certificatelistMain { + width: 210px; + height: 256px; + border: 1px solid rgba(64, 158, 255, 1); + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + .cergetrules { + width: 210px; + display: flex; + height: 26px; + align-items: center; + margin-top: 8px; + .cergetrulesText { + font-size: 12px; + font-weight: 400; + color: #000000; + line-height: 22px; + margin-left: 12px; + font-size: 12px; + } + .cergetrulesMain { + font-size: 12px; + color: #999; + width: 62px; + margin-left: 6px; + // overflow: hidden; + // white-space: nowrap; + // text-overflow: ellipsis; + background: rgba(64, 158, 255, 0.1); + border-radius: 11px; + opacity: 0.49; + border: 1px solid #409eff; + text-align: center; + } + .certificateMorebox { + font-size: 12px; + font-weight: 600; + color: #409eff; + line-height: 22px; + cursor: pointer; + position: relative; + margin-left: 31px; + } + .certificateMore { + position: absolute; + width: 45px; + height: 60px; + background: #fff; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + border: 1px solid #b1b3b8; + + // .certificateMore1:hover { + // color: ; + // } + } + } + } + .certificateName { + width: 210px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 16px; + font-weight: 500; + color: rgba(0, 0, 0, 0.85); + line-height: 22px; + margin-top: 8px; + display: flex; + justify-content: center; + } + } + } } .DelModal {