123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- <template>
- <div class="studyInfo">
- <header>
- <div class="left"><i></i><span>学员信息</span></div>
- <div class="goods_info">
- <span v-for="(item, i) in headList" :key="i">
- <strong>「{{ i + 1 }}」</strong>
- <span style="padding-left: 0px">{{ item.lebel }}</span>
- <!-- <span v-if="item.key != 'num' && item.key != 'time'">{{
- userData[item.key]
- }}</span> -->
- <span v-if="item.key == 'goodsName'">{{ userData[item.key] }}</span>
- <span v-else-if="item.key == 'className'">{{
- userData[item.key]
- }}</span>
- <span
- v-else-if="item.key == 'classHours'"
- style="color: red; font-weight: bold; font-size: 18px"
- >{{ parseInt(userData["finishSectionDuration"] / 60 / 45) }}</span
- ><span
- v-else-if="item.key == 'secTotalTime'"
- style="color: red; font-weight: bold; font-size: 18px"
- >{{ parseInt(secTotalTime / 60 / 45) }}</span
- >
- <span v-else-if="item.key == 'num'"
- >完成{{ userData.stuAllNum + userData.recordNum }}节的内容学习</span
- >
- <span v-else-if="item.key == 'classTimes'" style="padding-right: 50px"
- >{{ $methodsTools.onlyForma(userData.classStartTime, false) }} -
- {{ $methodsTools.onlyForma(userData.classEndTime, false) }}</span
- >
- <span v-else-if="item.key == 'time'"
- >{{ $methodsTools.onlyForma(totalTimes[0]) }} -
- {{ $methodsTools.onlyForma(totalTimes[1]) }}</span
- >
- </span>
- </div>
- <el-button class="btn" type="primary" size="mini" @click="packUp">{{
- showBox ? "收起" : "展开"
- }}</el-button>
- </header>
- <div class="info_img" v-show="showBox">
- <ul>
- <li>学员编码:{{ userData.studentCode }}</li>
- <li>学员姓名:{{ userData.realName }}</li>
- <li>学员身份证号码:{{ userData.idCard }}</li>
- <li>绑定手机号码:{{ userData.telPhone }}</li>
- </ul>
- <div class="img_by">
- <div class="photoSty1">
- <img
- v-if="!userData.oneInchPhotos"
- src="@/assets/images/peopleImg.png"
- alt=""
- />
- <el-image
- v-else
- style="width: 100%; height: 100%"
- :src="$methodsTools.splitImgHost(userData.oneInchPhotos)"
- :preview-src-list="[
- $methodsTools.splitImgHost(userData.oneInchPhotos),
- ]"
- >
- </el-image>
- <div class="pos_bottom">一寸头像图</div>
- </div>
- <div class="photoSty2">
- <img
- v-if="!userData.idCardImg1"
- src="@/assets/images/idcardF.png"
- alt=""
- />
- <el-image
- v-else
- style="width: 100%; height: 100%"
- :src="$methodsTools.splitImgHost(userData.idCardImg1)"
- :preview-src-list="[
- $methodsTools.splitImgHost(userData.idCardImg1),
- ]"
- >
- </el-image>
- <div class="pos_bottom">身份证头像照</div>
- </div>
- <div class="photoSty2" style="margin-right: 0px">
- <img
- v-if="!userData.idCardImg2"
- src="@/assets/images/idcardZ.png"
- alt=""
- />
- <el-image
- v-else
- style="width: 100%; height: 100%"
- :src="$methodsTools.splitImgHost(userData.idCardImg2)"
- :preview-src-list="[
- $methodsTools.splitImgHost(userData.idCardImg2),
- ]"
- >
- </el-image>
- <div class="pos_bottom">身份证国徽照</div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { get } from "http";
- export default {
- props: {
- userData: {
- type: Object,
- default: () => {
- return {};
- },
- },
- totalTime: {
- type: Array,
- default: () => {
- return [];
- },
- },
- numTotal: {
- type: Number,
- default: 0,
- },
- all: {
- type: Boolean,
- default: true,
- },
- },
- data() {
- return {
- showBox: true,
- };
- },
- methods: {
- packUp() {
- this.showBox = !this.showBox;
- this.$emit("change");
- },
- },
- computed: {
- headList() {
- const list = [
- { lebel: "所在班级:", key: "className" },
- { lebel: "课程总学时:", key: "secTotalTime" },
- { lebel: "完成学时:", key: "classHours" },
- // { lebel: "", key: "num" },
- { lebel: "学习时间:", key: "time" },
- { lebel: "班级有效期:", key: "classTimes" },
- ];
- if (this.all) {
- list.unshift({ lebel: "所购商品:", key: "goodsName" });
- }
- return list;
- },
- totalTimes: {
- get() {
- return this.totalTime;
- },
- },
- secTotalTime: {
- get() {
- return this.numTotal;
- },
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .studyInfo {
- background: #ffffff;
- box-shadow: 0px 0px 8px 0px rgba(217, 217, 217, 0.8);
- border-radius: 8px;
- padding: 8px 16px;
- overflow: hidden;
- & > header {
- display: flex;
- position: relative;
- flex-wrap: wrap;
- // height: 48px;
- line-height: 48px;
- & > .left {
- display: flex;
- align-items: center;
- white-space: nowrap;
- margin-right: 40px;
- i {
- display: inline-block;
- width: 2px;
- height: 18px;
- background: #0c5dfb;
- margin-right: 8px;
- }
- span {
- color: #666;
- font-weight: bold;
- }
- }
- & > .goods_info {
- display: flex;
- flex-wrap: wrap;
- span {
- font-size: 16px;
- padding-left: 10px;
- white-space: nowrap;
- }
- }
- .btn {
- position: absolute;
- right: 0;
- top: 10px;
- }
- }
- & > .info_img {
- display: flex;
- height: 210px;
- ul {
- width: 320px;
- li {
- margin-bottom: 12px;
- font-size: 14px;
- }
- }
- .img_by {
- flex: 1;
- display: flex;
- align-items: center;
- .pos_bottom {
- position: absolute;
- z-index: 1;
- bottom: 0px;
- width: 100%;
- height: 32px;
- background-color: rgba(53, 53, 53, 0.6);
- text-align: center;
- color: #fff;
- font-size: 16px;
- line-height: 32px;
- }
- & > .photoSty1 {
- width: 152px;
- height: 208px;
- position: relative;
- overflow: hidden;
- border-radius: 8px;
- background-color: #f5f5f5;
- margin-right: 75px;
- & > img {
- width: 106px;
- height: 150px;
- margin: 29px auto 0px;
- display: block;
- }
- }
- & > .photoSty2 {
- width: 328px;
- height: 208px;
- position: relative;
- overflow: hidden;
- border-radius: 8px;
- background-color: #f5f5f5;
- margin-right: 75px;
- & > img {
- width: 243px;
- height: 154px;
- margin: 27px auto 0px;
- display: block;
- }
- &:last-of-type {
- margin-right: 0px;
- }
- }
- }
- }
- }
- </style>
- >
|