@ -0,0 +1,135 @@ |
|||
<template> |
|||
<view class="card mb-20 flex justify-between items-center pos-r" |
|||
@click="jump(item, index)"> |
|||
<view class="dot" v-if="!item.hasRead"></view> |
|||
<view class="flex justify-start items-start flex-col"> |
|||
<template v-if="item.title"> |
|||
<text class="text-26 font-bold">{{ item.title }}</text> |
|||
</template> |
|||
<text v-else class="text-26 font-bold">{{ TYPE_LIST.find(t => t.type === item.type).title }}</text> |
|||
<text class="text-gray text-25 mt-20">{{ |
|||
dayjs(item.createTime).format('YYYY-MM-DD HH:mm') |
|||
}} |
|||
</text> |
|||
</view> |
|||
<uv-icon name="arrow-right"/> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import {ref} from 'vue' |
|||
import dayjs from "dayjs"; |
|||
import {messageReadReq} from "@/api/shop"; |
|||
|
|||
const props = defineProps({ |
|||
item: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
index: { |
|||
type: Number, |
|||
default: 0 |
|||
} |
|||
}) |
|||
|
|||
const jump = (item, index) => { |
|||
let url |
|||
switch (item.type) { |
|||
case 'exam' : { |
|||
uni.switchTab({url: '/pages/promote/promote'}) |
|||
} |
|||
break; |
|||
case 'matchEnd' : |
|||
case 'matchStart' : { |
|||
url = `/pages/match/ing` |
|||
} |
|||
break; |
|||
case 'trainEnd' : |
|||
case 'trainStart' : { |
|||
url = `/pages/promote/learn?courseId=${item.train.courseId}&trainId=${item.pk}` |
|||
} |
|||
break; |
|||
case 'express' : { |
|||
url = `/pages/user/order/detail?orderId=${item.pk}` |
|||
} |
|||
break; |
|||
case 'activity' : { |
|||
url = `/pages/activity/info?id=${item.pk}` |
|||
} |
|||
break; |
|||
case 'signUp' : |
|||
case 'signUpSelf' : |
|||
case 'activityNotice': |
|||
case 'trainEndNotice' : { |
|||
url = `/pages/user/trainEndNotice?id=${item.id}` |
|||
} |
|||
break; |
|||
} |
|||
if (url) uni.redirectTo({url}) |
|||
read(item.id, index) |
|||
} |
|||
|
|||
const read = async (id, index) => { |
|||
await messageReadReq({id, hasRead: 1}) |
|||
list.value[index].hasRead = true |
|||
} |
|||
|
|||
const TYPE_LIST = [ |
|||
{ |
|||
type: 'exam', |
|||
title: '考试即将开始' |
|||
}, |
|||
{ |
|||
type: 'matchEnd', |
|||
title: '竞赛即将结束' |
|||
}, |
|||
{ |
|||
type: 'matchStart', |
|||
title: '竞赛即将开始' |
|||
}, |
|||
{ |
|||
type: 'trainEnd', |
|||
title: '培训即将结束' |
|||
}, |
|||
{ |
|||
type: 'trainStart', |
|||
title: '培训即将开始' |
|||
}, |
|||
{ |
|||
type: 'express', |
|||
title: '订单已发货' |
|||
}, |
|||
{ |
|||
type: 'activity', |
|||
title: '新活动提醒' |
|||
}, |
|||
{ |
|||
type: 'signUp', |
|||
title: '报名资料待修改' |
|||
}, |
|||
{ |
|||
type: 'signUpSelf', |
|||
title: '自主报名资料待修改' |
|||
}, |
|||
{ |
|||
type: 'review', |
|||
title: '复习通知' |
|||
}, |
|||
|
|||
] |
|||
|
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
.dot { |
|||
position: absolute; |
|||
left: 10rpx; |
|||
top: 10rpx; |
|||
width: 5rpx; |
|||
height: 5rpx; |
|||
border-radius: 5rpx; |
|||
background-color: red; |
|||
} |
|||
</style> |
@ -0,0 +1,201 @@ |
|||
<template> |
|||
<view class="p-20 min-height bg-gray-light"> |
|||
<view class="card text-25 m-20"> |
|||
<view class="flex justify-between items-center"> |
|||
<text>考生姓名: {{ realnameVal }}</text> |
|||
<text>考生身份证: {{ idCardVal }}</text> |
|||
</view> |
|||
<view class="flex justify-between items-center my-10"> |
|||
<text>打分人: {{ scoreUserNameVal }}</text> |
|||
</view> |
|||
<view class="text-main my-15">总分: {{ totalScore }}</view> |
|||
<view class="text-main my-15">分数: {{ totalGetScore }}</view> |
|||
<view class="flex justify-center items-center"> |
|||
<view class="flex-1 mx-15"> |
|||
<uv-button type="primary" shape="circle" @click="submit" :disabled="disabled">确认</uv-button> |
|||
</view> |
|||
<view class="flex-1 mx-15"> |
|||
<uv-button type="error" shape="circle" @click="refuse" :disabled="disabled">退回</uv-button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view style="height: calc(100vh - 360rpx)" class="overflow-y"> |
|||
<view class="card m-20 text-25 flex flex-col justify-start items-start" |
|||
v-for="(item, index) in list" :key="index"> |
|||
<view class="flex justify-start items-center mb-10" @click="item.showAll = !item.showAll"> |
|||
<text class="text-main mr-10" style="flex: 0 0 100rpx "> |
|||
{{ item.showAll ? '折叠' : '展开详情' }} |
|||
</text> |
|||
<text class="font-bold text-28">{{ item.title }}</text> |
|||
</view> |
|||
<view class="flex flex-col justify-start items-start py-15" v-if="item.showAll"> |
|||
<text class="pb-15 font-bold">考试内容</text> |
|||
<text class="text-25 mt-15 pb-15 border-bottom" v-html="item.content"></text> |
|||
<text class="pb-15 font-bold">评分表</text> |
|||
<view v-for="(content, contentIndex) in item.examContent" :key="contentIndex" |
|||
class="p-15 text-25 bg-main-light rounded mb-10 w-90p"> |
|||
<text class="font-bold pb-15 border-bottom w-100p">{{ content.title }}(分数: {{ |
|||
content.score |
|||
}}/{{ content.totalScore }}) |
|||
</text> |
|||
<view class="py-10 flex flex-col justify-start items-start" |
|||
v-for="(contentItem, contentItemIndex) in content.list" :key="contentItemIndex"> |
|||
<text class="mb-10">{{ contentItem.content }}</text> |
|||
<view class="p-10 my-10 w-90p bg-white flex justify-start items-center"> |
|||
<text>分数: {{ list[index].examContent[contentIndex].list[contentItemIndex].rating }}</text> |
|||
</view> |
|||
<text class="mb-10 text-gray">配分:{{ contentItem.score }}</text> |
|||
<text class="mb-10 text-gray">最大扣分:{{ contentItem.maxReduce }}</text> |
|||
<text class="mb-10 text-gray">扣分步长:{{ contentItem.step }}</text> |
|||
<text class="mb-10 text-gray">评分标准:{{ contentItem.standard }}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import {ref} from 'vue' |
|||
import { |
|||
operatePaperDetailReq, |
|||
operateScoreActionReq, |
|||
operateScoreCheckReq, |
|||
operateScoreListReq, |
|||
operateScoreRefuseReq |
|||
} from "@/api/exam"; |
|||
import {onLoad} from "@dcloudio/uni-app"; |
|||
import {$toast} from "@/utils"; |
|||
|
|||
const list = ref([]) |
|||
const getPaperDetailList = async (paperId) => { |
|||
const {data} = await operatePaperDetailReq({ |
|||
paperId |
|||
}) |
|||
list.value = data.map(item => { |
|||
item.showAll = true |
|||
item.score = '' |
|||
item.examContent = JSON.parse(item.examContent).map(content => { |
|||
content.score = 0 |
|||
content.totalScore = 0 |
|||
content.list.map(contentItem => { |
|||
contentItem.rating = parseInt(contentItem.score) |
|||
contentItem.score = parseInt(contentItem.score) |
|||
contentItem.maxReduce = parseInt(contentItem.maxReduce) |
|||
content.score += contentItem.rating |
|||
content.totalScore += contentItem.rating |
|||
totalScore.value += contentItem.rating |
|||
return contentItem |
|||
}) |
|||
return content |
|||
}) |
|||
return item |
|||
}) |
|||
} |
|||
|
|||
const getScoreList = async (paperId, userId) => { |
|||
const {data} = await operateScoreListReq({ |
|||
paperId, userId |
|||
}) |
|||
data.forEach(score => { |
|||
list.value.forEach(item => { |
|||
item.examContent.forEach(content => { |
|||
content.list.map(contentItem => { |
|||
if (contentItem.content === score.title && item.id === score.detailId) { |
|||
contentItem.rating = score.score |
|||
} |
|||
return contentItem |
|||
}) |
|||
}) |
|||
}) |
|||
}) |
|||
calTotalScore() |
|||
} |
|||
|
|||
const totalScore = ref(0) |
|||
const totalGetScore = ref(0) |
|||
|
|||
const calTotalScore = () => { |
|||
totalGetScore.value = 0 |
|||
list.value.forEach(item => { |
|||
item.examContent.forEach(content => { |
|||
content.list.forEach(contentItem => { |
|||
totalGetScore.value += contentItem.rating |
|||
}) |
|||
}) |
|||
}) |
|||
} |
|||
|
|||
const disabled = ref(false) |
|||
const submit = async () => { |
|||
uni.showModal({ |
|||
title: '提示', |
|||
content: `确认核分吗?`, |
|||
success: async ({confirm}) => { |
|||
if (confirm) { |
|||
disabled.value = true |
|||
uni.showLoading({title: '提交中'}) |
|||
await operateScoreCheckReq({ |
|||
examId: examVal, |
|||
paperId: paperIdVal, |
|||
userId: userIdVal, |
|||
scoreUserId: scoreUserIdVal, |
|||
}).catch(() => { |
|||
disabled.value = false |
|||
}) |
|||
disabled.value = false |
|||
uni.hideLoading() |
|||
$toast('操作成功') |
|||
setTimeout(async () => { |
|||
await uni.navigateBack() |
|||
}, 1500) |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
const refuse = async () => { |
|||
uni.showModal({ |
|||
title: '提示', |
|||
content: `确认退回吗?`, |
|||
success: async ({confirm}) => { |
|||
if (confirm) { |
|||
disabled.value = true |
|||
uni.showLoading({title: '提交中'}) |
|||
await operateScoreRefuseReq({ |
|||
examId: examVal, |
|||
paperId: paperIdVal, |
|||
userId: userIdVal, |
|||
scoreUserId: scoreUserIdVal, |
|||
}).catch(() => { |
|||
disabled.value = false |
|||
}) |
|||
disabled.value = false |
|||
uni.hideLoading() |
|||
$toast('操作成功') |
|||
setTimeout(async () => { |
|||
await uni.navigateBack() |
|||
}, 1500) |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
|
|||
const idCardVal = ref('') |
|||
const realnameVal = ref('') |
|||
const scoreUserNameVal = ref('') |
|||
let examVal = null, paperIdVal = null, userIdVal = null, scoreUserIdVal = null |
|||
onLoad(async ({paperId, idCard, realname, examId, userId, scoreUserId, scoreUserName}) => { |
|||
await getPaperDetailList(paperId) |
|||
await getScoreList(paperId, userId) |
|||
idCardVal.value = idCard |
|||
realnameVal.value = realname |
|||
examVal = examId |
|||
paperIdVal = paperId |
|||
userIdVal = userId |
|||
scoreUserIdVal = scoreUserId |
|||
scoreUserNameVal.value = scoreUserName |
|||
}) |
|||
</script> |
@ -0,0 +1,154 @@ |
|||
<template> |
|||
<view class="p-20 min-height bg-gray-light"> |
|||
<view class="card text-25 m-20"> |
|||
<view class="flex justify-between items-center"> |
|||
<text>考生姓名: {{ realnameVal }}</text> |
|||
<text>考生身份证: {{ idCardVal }}</text> |
|||
</view> |
|||
<view class="text-main my-15">总分: {{ totalScore }}</view> |
|||
<view class="text-main my-15">分数: {{ totalGetScore }}</view> |
|||
<uv-button type="primary" shape="circle" @click="submit" :disabled="disabled">提交</uv-button> |
|||
</view> |
|||
<view style="height: calc(100vh - 360rpx)" class="overflow-y"> |
|||
<view class="card m-20 text-25 flex flex-col justify-start items-start" |
|||
v-for="(item, index) in list" :key="index"> |
|||
<view class="flex justify-start items-center mb-10" @click="item.showAll = !item.showAll"> |
|||
<text class="text-main mr-10" style="flex: 0 0 100rpx "> |
|||
{{ item.showAll ? '折叠' : '展开详情' }} |
|||
</text> |
|||
<text class="font-bold text-28">{{ item.title }}</text> |
|||
</view> |
|||
<view class="flex flex-col justify-start items-start py-15" v-if="item.showAll"> |
|||
<text class="pb-15 font-bold">考试内容</text> |
|||
<text class="text-25 mt-15 pb-15 border-bottom" v-html="item.content"></text> |
|||
<text class="pb-15 font-bold">评分表</text> |
|||
<view v-for="(content, contentIndex) in item.examContent" :key="contentIndex" |
|||
class="p-15 text-25 bg-main-light rounded mb-10 w-90p"> |
|||
<text class="font-bold pb-15 border-bottom w-100p">{{ content.title }}(分数: {{ |
|||
content.score |
|||
}}/{{ content.totalScore }}) |
|||
</text> |
|||
<view class="py-10 flex flex-col justify-start items-start" |
|||
v-for="(contentItem, contentItemIndex) in content.list" :key="contentItemIndex"> |
|||
<text class="mb-10">{{ contentItem.content }}</text> |
|||
<view class="p-10 my-10 w-90p bg-white flex justify-start items-center"> |
|||
<text>分数:</text> |
|||
<uv-number-box :min="0" :step="contentItem.step" integer inputWidth="60" :max="contentItem.score" |
|||
disabled-input |
|||
@change="changeScore($event, index, contentIndex, contentItemIndex)" |
|||
v-model="list[index].examContent[contentIndex].list[contentItemIndex].rating"></uv-number-box> |
|||
</view> |
|||
<text class="mb-10 text-gray">配分:{{ contentItem.score }}</text> |
|||
<text class="mb-10 text-gray">最大扣分:{{ contentItem.maxReduce }}</text> |
|||
<text class="mb-10 text-gray">扣分步长:{{ contentItem.step }}</text> |
|||
<text class="mb-10 text-gray">评分标准:{{ contentItem.standard }}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import {ref} from 'vue' |
|||
import {operatePaperDetailReq, operateScoreActionReq} from "@/api/exam"; |
|||
import {onLoad} from "@dcloudio/uni-app"; |
|||
import {$toast} from "@/utils"; |
|||
|
|||
const list = ref([]) |
|||
const getPaperDetailList = async (paperId) => { |
|||
const {data} = await operatePaperDetailReq({ |
|||
paperId |
|||
}) |
|||
list.value = data.map(item => { |
|||
item.showAll = true |
|||
item.score = '' |
|||
item.examContent = JSON.parse(item.examContent).map(content => { |
|||
content.score = 0 |
|||
content.totalScore = 0 |
|||
content.list.map(contentItem => { |
|||
contentItem.rating = parseInt(contentItem.score) |
|||
contentItem.score = parseInt(contentItem.score) |
|||
contentItem.maxReduce = parseInt(contentItem.maxReduce) |
|||
content.score += contentItem.rating |
|||
content.totalScore += contentItem.rating |
|||
totalScore.value += contentItem.rating |
|||
totalGetScore.value += contentItem.rating |
|||
return contentItem |
|||
}) |
|||
return content |
|||
}) |
|||
console.log(item) |
|||
return item |
|||
}) |
|||
calTotalScore() |
|||
} |
|||
|
|||
const totalScore = ref(0) |
|||
const totalGetScore = ref(0) |
|||
const changeScore = ({value}, index, contentIndex, contentItemIndex) => { |
|||
list.value[index].examContent[contentIndex].list[contentItemIndex].rating = parseInt(value) |
|||
const detailList = list.value[index].examContent[contentIndex].list |
|||
list.value[index].examContent[contentIndex].score = detailList.reduce((pre, cur) => { |
|||
return parseInt(pre) + parseInt(cur.rating) |
|||
}, 0) |
|||
calTotalScore() |
|||
} |
|||
|
|||
const calTotalScore = () => { |
|||
totalGetScore.value = 0 |
|||
for (let i = 0; i < list.value.length; i++) { |
|||
const item = list.value[i] |
|||
for (let j = 0; j < item.examContent.length; j++) { |
|||
const content = item.examContent[j] |
|||
totalGetScore.value += content.score |
|||
} |
|||
} |
|||
} |
|||
|
|||
const disabled = ref(false) |
|||
const submit = async () => { |
|||
const dataList = [] |
|||
for (let i = 0; i < list.value.length; i++) { |
|||
const item = list.value[i] |
|||
for (let j = 0; j < item.examContent.length; j++) { |
|||
const content = item.examContent[j] |
|||
for (let k = 0; k < content.list.length; k++) { |
|||
const contentItem = content.list[k] |
|||
dataList.push({ |
|||
examId: examVal, |
|||
detailId: item.id, |
|||
paperId: paperIdVal, |
|||
title: contentItem.content, |
|||
score: contentItem.rating, |
|||
userId: userIdVal, |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
disabled.value = true |
|||
uni.showLoading({title: '提交中'}) |
|||
await operateScoreActionReq(dataList).catch(() => { |
|||
disabled.value = false |
|||
}) |
|||
disabled.value = false |
|||
uni.hideLoading() |
|||
$toast('打分成功') |
|||
setTimeout(async () => { |
|||
await uni.navigateBack() |
|||
}, 1500) |
|||
} |
|||
|
|||
const idCardVal = ref('') |
|||
const realnameVal = ref('') |
|||
let examVal = null, paperIdVal = null, userIdVal = null |
|||
onLoad(({paperId, idCard, realname, examId, userId}) => { |
|||
getPaperDetailList(paperId) |
|||
idCardVal.value = idCard |
|||
realnameVal.value = realname |
|||
examVal = examId |
|||
paperIdVal = paperId |
|||
userIdVal = userId |
|||
}) |
|||
</script> |
@ -0,0 +1,77 @@ |
|||
<template> |
|||
<view class="p-20 min-height"> |
|||
<uv-empty v-if="!list.length" text="暂无打分任务"></uv-empty> |
|||
<view v-for="(item, index) in list" :key="index" class="border p-20 m-20 text-25 rounded"> |
|||
<view>{{ item.title }}</view> |
|||
<view class="mt-15 text-gray">考试时长: {{ item.examTime }}分钟</view> |
|||
<view class="mt-15 text-gray">考试企业: {{ item.orgName }}</view> |
|||
<view class="mt-15 text-gray">{{ item.level }}</view> |
|||
<view class="mt-15 text-gray flex justify-start items-start"> |
|||
<text>试卷:</text> |
|||
<view class="ml-10 flex flex-col justify-start items-start"> |
|||
<text class="mb-10" v-if="item.paperList[0].operatePaper">{{ item.paperList[0].operatePaper.title }}</text> |
|||
</view> |
|||
</view> |
|||
<view class="mt-15 text-main pb-15" @click="item.showPeople = !item.showPeople"> |
|||
{{ item.showPeople ? '收起' : '查看考试人员' }} |
|||
</view> |
|||
<template v-if="item.showPeople"> |
|||
<view class="flex flex-col justify-start items-start py-15 border-top text-main text-25" |
|||
v-for="(people, peopleIndex) in item.peopleList" :key="peopleIndex"> |
|||
<view class="flex justify-between items-center w-100p"> |
|||
<text>{{ people.userDetail.realname }}</text> |
|||
<uv-button v-if="!people.staffHasScore && item.staffTypeList.includes('考评人员')" shape="circle" |
|||
type="primary" |
|||
@click="jump('/pages/exam/makeScore', item, people)" |
|||
size="mini">去打分 |
|||
</uv-button> |
|||
<text v-if="people.staffHasScore">总分: {{ people.operateScore }}分</text> |
|||
</view> |
|||
<template v-if="people.staffHasScore && item.staffTypeList.includes('督导人员')"> |
|||
<view class="flex justify-between items-center w-100p py-15 border-bottom text-gray" |
|||
v-for="(score, scoreIndex) in people.scoreList" :key="scoreIndex"> |
|||
<view class="flex justify-start items-center"> |
|||
<text>打分人:{{ score.scoreUserName }}</text> |
|||
<text class="ml-10">评分:{{ score.totalScore }}</text> |
|||
</view> |
|||
<uv-button v-if="!score.checkUserName" shape="circle" |
|||
type="primary" |
|||
@click="jump('/pages/exam/checkScore', item, people, score)" |
|||
size="mini">核分 |
|||
</uv-button> |
|||
<text v-else>核分人:{{ score.checkUserName }}</text> |
|||
</view> |
|||
</template> |
|||
</view> |
|||
</template> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import {ref} from 'vue' |
|||
import {trainExamStaffListReq} from "@/api/exam"; |
|||
import {onShow} from "@dcloudio/uni-app"; |
|||
|
|||
const list = ref([]) |
|||
const getList = async () => { |
|||
const {data} = await trainExamStaffListReq() |
|||
list.value = data.map(item => { |
|||
item.showPeople = false |
|||
return item |
|||
}) |
|||
} |
|||
|
|||
onShow(() => { |
|||
getList() |
|||
}) |
|||
|
|||
const jump = (url, item, people, score = null) => { |
|||
url += `?examId=${item.id}&paperId=${item.paperList[0].operatePaperId}&userId=${people.userId}` |
|||
url += `&idCard=${people.userDetail.idCard}&realname=${people.userDetail.realname}` |
|||
if (score) { |
|||
url += `&scoreUserId=${score.scoreUserId}&scoreUserName=${score.scoreUserName}` |
|||
} |
|||
uni.navigateTo({url}) |
|||
} |
|||
</script> |
@ -1,246 +1,259 @@ |
|||
<template> |
|||
<view class="wrap"> |
|||
<view class="layout-share"> |
|||
<view class="video-box"> |
|||
<!-- <view class="video-image">--> |
|||
<!-- <view class="img">--> |
|||
<!-- <uv-image src="/static/image/cover.png" width="220rpx" height="240rpx"></uv-image>--> |
|||
<!-- </view>--> |
|||
<!-- <view class="choice">选择封面</view>--> |
|||
<!-- </view>--> |
|||
<view class="video-text"> |
|||
<uv-textarea |
|||
v-model="textareaValue" |
|||
placeholder="取个标题吧~" |
|||
height="250rpx" |
|||
:count="true" |
|||
maxlength="50" |
|||
:customStyle="customStyle" |
|||
:countStyl="countStyle" |
|||
border="none" |
|||
></uv-textarea> |
|||
</view> |
|||
</view> |
|||
<view class="flex justify-start items-start flex-wrap"> |
|||
<view class="pos-r album-item" v-for="(item, index) in imgList" :key="index"> |
|||
<uv-image :src="item" mode="aspectFill" width="220rpx" height="220rpx"/> |
|||
<view class="del"> |
|||
<uv-icon name="close" color="white" @click="delImg(index)"/> |
|||
</view> |
|||
</view> |
|||
<view class="flex justify-center items-center album-item" @click="upload"> |
|||
<uv-icon name="camera" size="70rpx"/> |
|||
</view> |
|||
</view> |
|||
<!-- <uv-cell-group> |
|||
<uv-cell |
|||
icon="grid" |
|||
title="分类" |
|||
value="项目一号" |
|||
:isLink="true" |
|||
:clickable="false" |
|||
></uv-cell> |
|||
</uv-cell-group> --> |
|||
<view class="cell-box"> |
|||
<!-- <view class="cell-item islink">--> |
|||
<!-- <view class="icon">--> |
|||
<!-- <uv-image src="/static/image/pu-1.png" width="32rpx" height="32rpx"></uv-image>--> |
|||
<!-- </view>--> |
|||
<!-- <view class="text">分类</view>--> |
|||
<!-- <view class="value">项目一号</view>--> |
|||
<!-- </view>--> |
|||
<view class="cell-item"> |
|||
<view class="icon"> |
|||
<uv-image src="/static/image/pu-2.png" width="32rpx" height="32rpx" mode="aspectFit"></uv-image> |
|||
</view> |
|||
<view class="text">所有人可见</view> |
|||
<uv-switch v-model="isPublic" activeColor="#fbd153" style="transform:scale(0.7)"/> |
|||
</view> |
|||
</view> |
|||
<view class="wrap"> |
|||
<view class="layout-share"> |
|||
<view class="video-box"> |
|||
<!-- <view class="video-image">--> |
|||
<!-- <view class="img">--> |
|||
<!-- <uv-image src="/static/image/cover.png" width="220rpx" height="240rpx"></uv-image>--> |
|||
<!-- </view>--> |
|||
<!-- <view class="choice">选择封面</view>--> |
|||
<!-- </view>--> |
|||
<view class="video-text"> |
|||
<uv-textarea |
|||
v-model="textareaValue" |
|||
placeholder="取个标题吧~" |
|||
height="250rpx" |
|||
:count="true" |
|||
maxlength="50" |
|||
:customStyle="customStyle" |
|||
:countStyl="countStyle" |
|||
border="none" |
|||
></uv-textarea> |
|||
</view> |
|||
<view class="layout-fixed"> |
|||
<view class="share-btn" @click="submit">分享</view> |
|||
</view> |
|||
<view class="flex justify-start items-start flex-wrap"> |
|||
<view class="pos-r album-item" v-for="(item, index) in imgList" :key="index"> |
|||
<uv-image :src="item" mode="aspectFill" width="220rpx" height="220rpx"/> |
|||
<view class="del"> |
|||
<uv-icon name="close" color="white" @click="delImg(index)"/> |
|||
</view> |
|||
</view> |
|||
<view class="flex justify-center items-center album-item" @click="upload"> |
|||
<uv-icon name="camera" size="70rpx"/> |
|||
</view> |
|||
</view> |
|||
<!-- <uv-cell-group> |
|||
<uv-cell |
|||
icon="grid" |
|||
title="分类" |
|||
value="项目一号" |
|||
:isLink="true" |
|||
:clickable="false" |
|||
></uv-cell> |
|||
</uv-cell-group> --> |
|||
<view class="cell-box"> |
|||
<!-- <view class="cell-item islink">--> |
|||
<!-- <view class="icon">--> |
|||
<!-- <uv-image src="/static/image/pu-1.png" width="32rpx" height="32rpx"></uv-image>--> |
|||
<!-- </view>--> |
|||
<!-- <view class="text">分类</view>--> |
|||
<!-- <view class="value">项目一号</view>--> |
|||
<!-- </view>--> |
|||
<view class="cell-item"> |
|||
<view class="icon"> |
|||
<uv-image src="/static/image/pu-2.png" width="32rpx" height="32rpx" mode="aspectFit"></uv-image> |
|||
</view> |
|||
<view class="text">所有人可见</view> |
|||
<uv-switch v-model="isPublic" activeColor="#fbd153" style="transform:scale(0.7)"/> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="layout-fixed"> |
|||
<view class="share-btn" @click="submit">分享</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import {$toast, chooseImg, getLocationAction} from "@/utils"; |
|||
import {matchArticleActionReq} from "@/api/article"; |
|||
import {matchArticleActionReq, matchArticleInfoReq} from "@/api/article"; |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
textareaValue: '', |
|||
customStyle: { |
|||
background: '#f7f7f7', |
|||
}, |
|||
countStyle: { |
|||
backgroundColor: '#f7f7f7', |
|||
}, |
|||
imgList: [], |
|||
isPublic: true, |
|||
trainId: null |
|||
}; |
|||
data() { |
|||
return { |
|||
textareaValue: '', |
|||
customStyle: { |
|||
background: '#f7f7f7', |
|||
}, |
|||
countStyle: { |
|||
backgroundColor: '#f7f7f7', |
|||
}, |
|||
imgList: [], |
|||
isPublic: true, |
|||
trainId: null, |
|||
id: null, |
|||
}; |
|||
}, |
|||
methods: { |
|||
async upload() { |
|||
const res = await chooseImg(9 - this.imgList.length) |
|||
res.forEach(item => { |
|||
this.imgList.push(item) |
|||
}) |
|||
}, |
|||
methods: { |
|||
async upload() { |
|||
const res = await chooseImg(9 - this.imgList.length) |
|||
res.forEach(item => { |
|||
this.imgList.push(item) |
|||
}) |
|||
}, |
|||
delImg(index) { |
|||
this.imgList.splice(index, 1) |
|||
}, |
|||
async submit() { |
|||
if (this.imgList.length === 0) { |
|||
return $toast('请选择图片') |
|||
} |
|||
if (!this.textareaValue) { |
|||
return $toast('请填写标题') |
|||
} |
|||
const data = { |
|||
city: 450100, |
|||
province: 450000, |
|||
} |
|||
data.album = JSON.stringify(this.imgList) |
|||
data.title = this.textareaValue |
|||
data.isPublic = this.isPublic ? 1 : 0 |
|||
this.trainId ? data.trainId = this.trainId : null |
|||
const res = await matchArticleActionReq(data) |
|||
if (res) { |
|||
$toast('发布成功') |
|||
setTimeout(() => { |
|||
uni.navigateBack() |
|||
}, 1500) |
|||
} |
|||
} |
|||
delImg(index) { |
|||
this.imgList.splice(index, 1) |
|||
}, |
|||
async onLoad(option) { |
|||
if (option.trainId) this.trainId = option.trainId |
|||
// const res = await getLocationAction() |
|||
// console.log(res) |
|||
async submit() { |
|||
if (this.imgList.length === 0) { |
|||
return $toast('请选择图片') |
|||
} |
|||
if (!this.textareaValue) { |
|||
return $toast('请填写标题') |
|||
} |
|||
const data = { |
|||
city: 450100, |
|||
province: 450000, |
|||
} |
|||
data.album = JSON.stringify(this.imgList) |
|||
data.title = this.textareaValue |
|||
data.isPublic = this.isPublic ? 1 : 0 |
|||
this.trainId ? data.trainId = this.trainId : null |
|||
if (this.id) data.id = this.id |
|||
const res = await matchArticleActionReq(data) |
|||
if (res) { |
|||
$toast('发布成功') |
|||
setTimeout(() => { |
|||
uni.navigateBack() |
|||
}, 1500) |
|||
} |
|||
}, |
|||
async getInfo() { |
|||
const {data} = await matchArticleInfoReq(this.id) |
|||
this.textareaValue = data.title |
|||
this.imgList = JSON.parse(data.album) |
|||
this.isPublic = data.isPublic |
|||
this.trainId = data.trainId |
|||
} |
|||
}, |
|||
async onLoad(option) { |
|||
if (option.trainId) this.trainId = option.trainId |
|||
if (option.id) { |
|||
this.id = option.id |
|||
await this.getInfo() |
|||
} |
|||
// const res = await getLocationAction() |
|||
// console.log(res) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
page { |
|||
background: #fff; |
|||
background: #fff; |
|||
} |
|||
|
|||
.video-box { |
|||
display: flex; |
|||
padding: 50rpx 30rpx; |
|||
background: #f7f7f7; |
|||
|
|||
.video-image { |
|||
width: 220rpx; |
|||
// height: 280rpx; |
|||
border: 1px solid #999; |
|||
border-radius: 10rpx; |
|||
background: #e5e5e5; |
|||
overflow: hidden; |
|||
|
|||
.img { |
|||
width: 100%; |
|||
height: 240rpx; |
|||
} |
|||
|
|||
.choice { |
|||
height: 48rpx; |
|||
font-size: 26rpx; |
|||
line-height: 48rpx; |
|||
color: #fff; |
|||
text-align: center; |
|||
background: #000; |
|||
} |
|||
display: flex; |
|||
padding: 50rpx 30rpx; |
|||
background: #f7f7f7; |
|||
|
|||
.video-image { |
|||
width: 220rpx; |
|||
// height: 280rpx; |
|||
border: 1px solid #999; |
|||
border-radius: 10rpx; |
|||
background: #e5e5e5; |
|||
overflow: hidden; |
|||
|
|||
.img { |
|||
width: 100%; |
|||
height: 240rpx; |
|||
} |
|||
|
|||
.video-text { |
|||
flex: 1; |
|||
margin-left: 20rpx; |
|||
.choice { |
|||
height: 48rpx; |
|||
font-size: 26rpx; |
|||
line-height: 48rpx; |
|||
color: #fff; |
|||
text-align: center; |
|||
background: #000; |
|||
} |
|||
} |
|||
|
|||
.video-text { |
|||
flex: 1; |
|||
margin-left: 20rpx; |
|||
} |
|||
} |
|||
|
|||
.cell-item { |
|||
position: relative; |
|||
display: flex; |
|||
align-items: center; |
|||
padding: 24rpx 30rpx 24rpx 30rpx; |
|||
border-bottom: 1px solid #f2f2f2; |
|||
|
|||
.text { |
|||
flex: 1; |
|||
padding: 0 20rpx; |
|||
font-size: 28rpx; |
|||
line-height: 32rpx; |
|||
color: $minor-color; |
|||
} |
|||
position: relative; |
|||
display: flex; |
|||
align-items: center; |
|||
padding: 24rpx 30rpx 24rpx 30rpx; |
|||
border-bottom: 1px solid #f2f2f2; |
|||
|
|||
.value { |
|||
font-size: 28rpx; |
|||
line-height: 32rpx; |
|||
color: $grey-color; |
|||
} |
|||
.text { |
|||
flex: 1; |
|||
padding: 0 20rpx; |
|||
font-size: 28rpx; |
|||
line-height: 32rpx; |
|||
color: $minor-color; |
|||
} |
|||
|
|||
.value { |
|||
font-size: 28rpx; |
|||
line-height: 32rpx; |
|||
color: $grey-color; |
|||
} |
|||
} |
|||
|
|||
.islink { |
|||
padding-right: 60rpx !important; |
|||
|
|||
&::after { |
|||
position: absolute; |
|||
right: 30rpx; |
|||
top: 50%; |
|||
z-index: 90; |
|||
display: block; |
|||
margin-top: -6rpx; |
|||
transform: rotate(45deg); |
|||
content: ''; |
|||
width: 12rpx; |
|||
height: 12rpx; |
|||
border-top: 1px solid $dark-color; |
|||
border-right: 1px solid $dark-color; |
|||
} |
|||
padding-right: 60rpx !important; |
|||
|
|||
&::after { |
|||
position: absolute; |
|||
right: 30rpx; |
|||
top: 50%; |
|||
z-index: 90; |
|||
display: block; |
|||
margin-top: -6rpx; |
|||
transform: rotate(45deg); |
|||
content: ''; |
|||
width: 12rpx; |
|||
height: 12rpx; |
|||
border-top: 1px solid $dark-color; |
|||
border-right: 1px solid $dark-color; |
|||
} |
|||
} |
|||
|
|||
.layout-fixed { |
|||
position: fixed; |
|||
left: 0; |
|||
bottom: 0; |
|||
z-index: 99; |
|||
width: 100%; |
|||
height: auto; |
|||
padding: 50rpx 0rpx; |
|||
|
|||
.share-btn { |
|||
margin: 0 30rpx; |
|||
height: 80rpx; |
|||
font-size: 32rpx; |
|||
line-height: 80rpx; |
|||
text-align: center; |
|||
color: #fff; |
|||
border-radius: 40rpx; |
|||
background: #00abf4; |
|||
} |
|||
position: fixed; |
|||
left: 0; |
|||
bottom: 0; |
|||
z-index: 99; |
|||
width: 100%; |
|||
height: auto; |
|||
padding: 50rpx 0rpx; |
|||
|
|||
.share-btn { |
|||
margin: 0 30rpx; |
|||
height: 80rpx; |
|||
font-size: 32rpx; |
|||
line-height: 80rpx; |
|||
text-align: center; |
|||
color: #fff; |
|||
border-radius: 40rpx; |
|||
background: #00abf4; |
|||
} |
|||
} |
|||
|
|||
.album-item { |
|||
width: 220rpx; |
|||
height: 220rpx; |
|||
border: 1px solid #E1E1E1; |
|||
|
|||
.del { |
|||
position: absolute; |
|||
right: 0; |
|||
top: 0; |
|||
background-color: red; |
|||
width: 40rpx; |
|||
height: 40rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
width: 220rpx; |
|||
height: 220rpx; |
|||
border: 1px solid #E1E1E1; |
|||
|
|||
.del { |
|||
position: absolute; |
|||
right: 0; |
|||
top: 0; |
|||
background-color: red; |
|||
width: 40rpx; |
|||
height: 40rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,190 @@ |
|||
<template> |
|||
<view class="layout layout-plan"> |
|||
<view class="title-box"> |
|||
<view class="title">复习任务({{ examList.length }})</view> |
|||
<view class="text-main text-25 text-center" v-if="examList.length > 5" @click="showAllExam = !showAllExam">{{ |
|||
showAllExam ? '折叠' : '展开' |
|||
}} |
|||
</view> |
|||
</view> |
|||
<view class="exam-box"> |
|||
<block v-for="(item,index) in examList" |
|||
:key="index"> |
|||
<view class="exam-item" @click="resultLink(item)" v-if="showAllExam || (!showAllExam && index < 5)"> |
|||
<view class="info info-1"> |
|||
<view class="name"> |
|||
<uv-text :text="item.title" size="24rpx" lineHeight="40rpx" :lines="1" bold></uv-text> |
|||
</view> |
|||
<template v-if="item.type === 0"> |
|||
<view class="fen" v-if="item.examDateMode === 0">复习截止日期: {{ item.examDate }}</view> |
|||
<view class="fen flex justify-start flex-col items-start" v-else> |
|||
<text>复习时间段:</text> |
|||
<text v-for="(item, index) in JSON.parse(item.examDateList)" :key="index"> |
|||
{{ item.date.join('~') }} |
|||
</text> |
|||
</view> |
|||
</template> |
|||
<view class="fen" |
|||
v-if="item.workTypeLists && item.workTypeLists.length > 0 && item.workTypeLists[0].course">复习科目: |
|||
{{ |
|||
item.workTypeLists[0].course.title |
|||
}}({{ |
|||
['初级', '中级', '高级', '技师', '高级技师'][item.workTypeLists[0].course.level] |
|||
}}) |
|||
</view> |
|||
<view class="fen flex flex-col justify-start items-start" v-if="item.trainExamPeopleInfo"> |
|||
<text>复习次数: {{ item.trainExamPeopleInfo.learnTime }}</text> |
|||
<text class="mt-10">复习时长: {{ Math.floor(item.trainExamPeopleInfo.learnUseTime / 3600) }}小时 |
|||
{{ Math.floor(item.trainExamPeopleInfo.learnUseTime % 3600 / 60) }}分 |
|||
{{ item.trainExamPeopleInfo.learnUseTime % 60 }}秒 |
|||
</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</block> |
|||
<uv-empty v-if="!examList.length" text="暂无复习任务"/> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
<script setup> |
|||
import {ref} from 'vue' |
|||
import {$toast} from "@/utils"; |
|||
|
|||
const props = defineProps({ |
|||
examList: { |
|||
type: Array, |
|||
default: () => [] |
|||
} |
|||
}) |
|||
|
|||
const showAllExam = ref(false) |
|||
|
|||
const resultLink = ({ |
|||
id, |
|||
type, |
|||
examId, |
|||
paper, |
|||
needFinishAdventure, |
|||
hasFinishAdventure, |
|||
needFinishNormal, |
|||
hasFinishNormal |
|||
}) => { |
|||
if (type === 1) return |
|||
let url |
|||
if (needFinishAdventure === 1 && !hasFinishAdventure) return $toast('请先完成游戏学') |
|||
if (needFinishNormal === 1 && !hasFinishNormal) return $toast('请先完成常规学') |
|||
url = `/pages/promote/exam?paperId=${examId}&title=${paper.title}&examType=0&examId=${id}` |
|||
uni.navigateTo({url}) |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
.title-box { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
padding: 10rpx 0; |
|||
|
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: 600; |
|||
line-height: 40rpx; |
|||
color: $black-color; |
|||
} |
|||
|
|||
.link { |
|||
position: relative; |
|||
padding-right: 30rpx; |
|||
font-size: 24rpx; |
|||
line-height: 32rpx; |
|||
color: $grey-color; |
|||
|
|||
&::after { |
|||
position: absolute; |
|||
right: 10rpx; |
|||
top: 50%; |
|||
z-index: 90; |
|||
display: block; |
|||
margin-top: -6rpx; |
|||
transform: rotate(45deg); |
|||
content: ''; |
|||
width: 12rpx; |
|||
height: 12rpx; |
|||
border-top: 1px solid $grey-color; |
|||
border-right: 1px solid $grey-color; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.exam-box { |
|||
padding: 10rpx 0 20rpx; |
|||
|
|||
.exam-item { |
|||
display: flex; |
|||
align-items: center; |
|||
margin-top: 24rpx; |
|||
padding: 24rpx 24rpx; |
|||
border-radius: 16rpx; |
|||
border: 1px solid #6c6c6c; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.info { |
|||
position: relative; |
|||
flex: 1; |
|||
margin-right: 20rpx; |
|||
|
|||
.fen { |
|||
margin-top: 8rpx; |
|||
font-size: 24rpx; |
|||
line-height: 32rpx; |
|||
color: #bababa; |
|||
} |
|||
} |
|||
|
|||
.info-1 { |
|||
min-height: 80rpx; |
|||
|
|||
&::after { |
|||
position: absolute; |
|||
right: 0%; |
|||
top: 50%; |
|||
z-index: 9; |
|||
margin-top: -25rpx; |
|||
content: ''; |
|||
width: 1px; |
|||
height: 50rpx; |
|||
background: #f3f3f3; |
|||
} |
|||
} |
|||
|
|||
.look { |
|||
display: inline-block; |
|||
width: 110rpx; |
|||
height: 44rpx; |
|||
font-size: 24rpx; |
|||
line-height: 44rpx; |
|||
color: #fff; |
|||
text-align: center; |
|||
border-radius: 22rpx; |
|||
background: #00abf4; |
|||
} |
|||
|
|||
.between { |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
.ren { |
|||
width: 100rpx; |
|||
font-size: 24rpx; |
|||
line-height: 40rpx; |
|||
color: $grey-color; |
|||
} |
|||
|
|||
.progress { |
|||
flex: 1; |
|||
margin-right: 20rpx; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,53 @@ |
|||
<template> |
|||
<view class="min-height bg-white"> |
|||
<view class="share-box p-30" v-if="list.length"> |
|||
<ArticleListComponent :article-list="list" :show-follow="false" show-edit/> |
|||
</view> |
|||
<uv-empty v-else></uv-empty> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import {ref} from "vue"; |
|||
import {pageMatchArticleForUserReq} from '@/api/article' |
|||
import ArticleListComponent from "@/pages/index/components/articleListComponent.vue"; |
|||
import 'dayjs/locale/zh-cn' |
|||
|
|||
import dayjs from 'dayjs' |
|||
import relativeTime from 'dayjs/plugin/relativeTime' |
|||
import updateLocale from 'dayjs/plugin/updateLocale' |
|||
dayjs.extend(relativeTime) |
|||
dayjs.extend(updateLocale) |
|||
dayjs.locale('zh-cn') |
|||
dayjs.updateLocale('zh-cn', { |
|||
relativeTime: { |
|||
future: "in %s", |
|||
past: "%s 之前", |
|||
s: '几秒', |
|||
m: "一分钟", |
|||
mm: "%d分钟", |
|||
h: "一小时", |
|||
hh: "%d小时", |
|||
d: "一天", |
|||
dd: "%d天", |
|||
M: "一个月", |
|||
MM: "%d个月", |
|||
y: "一年", |
|||
yy: "%d年" |
|||
} |
|||
}) |
|||
|
|||
const list = ref([]) |
|||
const getList = async () => { |
|||
const {data} = await pageMatchArticleForUserReq({ |
|||
page: 1, |
|||
limit: 9999 |
|||
}) |
|||
list.value = data.list.map(item => { |
|||
if (dayjs(item.createTime).diff(dayjs(), 'day') < -3) item.friendlyTime = dayjs(item.createTime).format('YYYY-MM-DD') |
|||
else item.friendlyTime = dayjs(item.createTime).fromNow() |
|||
return item |
|||
}) |
|||
} |
|||
getList() |
|||
</script> |
@ -1,89 +1,120 @@ |
|||
<template> |
|||
<view class="min-height bg-gray p-20"> |
|||
<view class="city-item card" @click="$jump(`/pages/signUp/info?id=${item.signUpId}`)" |
|||
v-for="(item, index) in list" :key="index"> |
|||
<view class="img"> |
|||
<uv-image :src="item.signUp.cover" radius="20rpx" width="100%" |
|||
height="100%"></uv-image> |
|||
</view> |
|||
<view class="flex justify-between flex-col items-end w-100p ml-20"> |
|||
<uv-text :text="item.signUp.title" size="28rpx" lineHeight="48rpx" :lines="1" |
|||
color="#333"></uv-text> |
|||
<view class="flex justify-end items-center mt-40"> |
|||
<uv-button size="mini" type="primary" shape="circle">{{ |
|||
item.status === 0 ? '待审核' : '已通过' |
|||
}}</uv-button> |
|||
<view class="ml-20"> |
|||
<uv-button size="mini" :type="item.hasPay === 0 ? 'error' : 'primary'" shape="circle" v-if="item.status === 1">{{ |
|||
item.hasPay === 0 ? '未支付' : '已支付' |
|||
}}</uv-button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="min-height bg-gray p-20"> |
|||
<uv-tabs :list="[{name: '认定预约报名'}, {name: '自主预约报名'}]" |
|||
:current="tabIndex" |
|||
@change="changeTab" :scrollable="false"></uv-tabs> |
|||
<view class="city-item card" @click="jump(item)" |
|||
v-for="(item, index) in list" :key="index"> |
|||
<view class="img"> |
|||
<uv-image :src="item.signUp.cover" radius="20rpx" width="100%" |
|||
height="100%"></uv-image> |
|||
</view> |
|||
<view class="flex justify-between flex-col items-end w-100p ml-20"> |
|||
<uv-text :text="item.signUp.title" size="28rpx" lineHeight="48rpx" :lines="1" |
|||
color="#333"></uv-text> |
|||
<view class="flex justify-end items-center mt-40"> |
|||
<uv-button size="mini" type="primary" shape="circle" v-if="item.status === 0">待审核</uv-button> |
|||
<uv-button size="mini" type="success" shape="circle" v-if="item.status === 1">已通过</uv-button> |
|||
<uv-button size="mini" type="error" shape="circle" v-if="item.status === 2">已拒绝,去编辑</uv-button> |
|||
<view class="ml-20"> |
|||
<uv-button size="mini" :type="item.hasPay === 0 ? 'error' : 'primary'" shape="circle" |
|||
v-if="item.status === 1">{{ |
|||
item.hasPay === 0 ? '未支付' : '已支付' |
|||
}} |
|||
</uv-button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import {ref} from 'vue' |
|||
import {signUpUserListReq} from "@/api/signUp"; |
|||
import {signUpUserListReq, signUpUserSelfListReq} from "@/api/signUp"; |
|||
import {onShow} from "@dcloudio/uni-app"; |
|||
|
|||
|
|||
const tabIndex = ref(0) |
|||
const changeTab = ({index}) => { |
|||
tabIndex.value = index |
|||
if (index === 0) getList() |
|||
else getSelfList() |
|||
} |
|||
|
|||
const list = ref([]) |
|||
const getList = async () => { |
|||
const {data} =await signUpUserListReq() |
|||
list.value = data |
|||
const {data} = await signUpUserListReq() |
|||
list.value = data.filter(item => { |
|||
return !!item.signUp |
|||
}) |
|||
} |
|||
const getSelfList = async () => { |
|||
const {data} = await signUpUserSelfListReq() |
|||
list.value = data.filter(item => { |
|||
return !!item.signUp |
|||
}) |
|||
} |
|||
|
|||
const jump = (item) => { |
|||
let url = '' |
|||
if (tabIndex.value === 0) { |
|||
url = `/pages/signUp/info?id=${item.signUpId}` |
|||
} else { |
|||
url = `/pages/signUp/self?id=${item.signUpId}` |
|||
} |
|||
uni.navigateTo({url}) |
|||
} |
|||
|
|||
onShow(() => { |
|||
getList() |
|||
getList() |
|||
}) |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.city-item { |
|||
display: flex; |
|||
align-items: center; |
|||
margin-top: 30rpx; |
|||
|
|||
.img { |
|||
width: 230rpx; |
|||
height: 170rpx; |
|||
} |
|||
display: flex; |
|||
align-items: center; |
|||
margin-top: 30rpx; |
|||
|
|||
.info { |
|||
flex: 1; |
|||
height: 170rpx; |
|||
padding-left: 20rpx; |
|||
.img { |
|||
width: 230rpx; |
|||
height: 170rpx; |
|||
} |
|||
|
|||
.name { |
|||
height: 48rpx; |
|||
} |
|||
.info { |
|||
flex: 1; |
|||
height: 170rpx; |
|||
padding-left: 20rpx; |
|||
|
|||
.text { |
|||
margin-top: 6rpx; |
|||
height: 40rpx; |
|||
font-size: 24rpx; |
|||
line-height: 48rpx; |
|||
color: #b4b4b4; |
|||
overflow: hidden; |
|||
} |
|||
.name { |
|||
height: 48rpx; |
|||
} |
|||
|
|||
.bao { |
|||
display: inline-block; |
|||
height: 60rpx; |
|||
padding: 0 20rpx; |
|||
font-size: 26rpx; |
|||
font-weight: 600; |
|||
line-height: 60rpx; |
|||
color: #fff; |
|||
border-radius: 30rpx; |
|||
background: $orange-color; |
|||
.text { |
|||
margin-top: 6rpx; |
|||
height: 40rpx; |
|||
font-size: 24rpx; |
|||
line-height: 48rpx; |
|||
color: #b4b4b4; |
|||
overflow: hidden; |
|||
} |
|||
} |
|||
|
|||
.bao { |
|||
display: inline-block; |
|||
height: 60rpx; |
|||
padding: 0 20rpx; |
|||
font-size: 26rpx; |
|||
font-weight: 600; |
|||
line-height: 60rpx; |
|||
color: #fff; |
|||
border-radius: 30rpx; |
|||
background: $orange-color; |
|||
} |
|||
} |
|||
|
|||
.city-item:nth-child(1) { |
|||
margin-top: 0 !important; |
|||
margin-top: 0 !important; |
|||
} |
|||
</style> |
After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.1 KiB |