299 lines
11 KiB
Vue
Raw Normal View History

2025-09-06 20:30:02 +08:00
<template>
<view class="w-full h-full main_bg flex-col">
<view class="p-15">
<view class="flex-row items-center justify-between">
<view class="flex-row items-center">
<view class="wi-120 he-120 r-50">
<image class="wh-full"
src="/static/base/logo.jpg"></image>
</view>
<view class="white-color ml-15">
<view class="font-18">你好{{ getUser.name }}</view>
</view>
</view>
<view @click="tuichu">
<svg t="1726666280409" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="4480" width="25" height="25">
<path
d="M512.2 953.1c-99.6 0-199.7-33.3-282.2-101.7C42 695.6 15.9 416 171.7 228s435.5-214.1 623.4-58.3c53.8 44.6 95.2 99.5 123 163.1 7.5 17.2-0.3 37.3-17.6 44.9-17.2 7.5-37.3-0.3-44.9-17.6-23.5-53.8-58.5-100.2-104.1-137.9C592.6 90.3 356 112.5 224.1 271.5 92.3 430.5 114.4 667.1 273.5 799c159 131.8 395.6 109.7 527.5-49.3 19.7-23.8 36.4-49.8 49.6-77.4 8.1-17 28.5-24.1 45.4-16 17 8.1 24.1 28.5 16 45.4-15.6 32.6-35.3 63.4-58.6 91.4-87.4 105.5-213.9 160-341.2 160z"
fill="#ffffff" p-id="4481"></path>
<path
d="M910.9 544.6H440.8c-18.8 0-34.1-15.3-34.1-34.1s15.3-34.1 34.1-34.1h470.1c18.8 0 34.1 15.3 34.1 34.1 0 18.9-15.3 34.1-34.1 34.1z"
fill="#ffffff" p-id="4482"></path>
</svg>
</view>
</view>
</view>
<view class="flex-1 back-F6F6F6 flex-col">
<view class="px-15 pt-15">
<BasicTitle title="我的应用" :isBorder="false" line/>
<view class="white-bg-color py-15 grid gridCols-4 mt-15 r-md">
<view class="flex-col-center" @click="tokhpj">
<image class="wi-88 he-88" src="/static/base/1.png"/>
<view class="font-12 mt-8">考核评价</view>
</view>
<view class="flex-col-center" @click="tossp">
<image class="wi-88 he-88" src="/static/base/2.png"/>
<view class="font-12 mt-8">随手拍</view>
</view>
<view class="flex-col-center" @click="navigateTo('/pages/view/quantitativeAssessment/distribute/distribute')">
<image class="wi-88 he-88" src="/static/base/3.png"/>
<view class="font-12 mt-8">分配</view>
</view>
<view class="flex-col-center" @click="navigateTo('/pages/view/quantitativeAssessment/quantitativeSummary/quantitativeSummary')">
<image class="wi-88 he-88" src="/static/base/4.png"/>
<view class="font-12 mt-8">量化汇总</view>
</view>
</view>
</view>
<view class="px-15 mt-15">
<BasicTabs ref="tabsRef" :list="tabs" bar-width="100rpx" :current="current" @change="tabsChange"/>
</view>
<view class="flex-1 ov-hidden">
<view v-if="current==0" class="wh-full">
<BasicListLayout @register="register">
<template v-slot="{data,index}">
<view @click="onlhkh(data)" class="white-bg-color r-md p-15 mb-15 flex-row ">
<view class="flex-1">
<view class="font-w-500 flex-row">
<view class="mr-5">{{ data.fullName }}</view>
<view class="mr-5">{{ data.score }}</view>
本周得分{{ data.score ? (100 + parseFloat(data.score)) : 100 }}
</view>
<view class="grid gridCols-4 mt-15 gapY-15">
<template v-for="(item,key) in inspectItems">
<view class="flex-col-center">
<view class="font-w-500">{{ item.name }}</view>
<view class="mt-5" v-if="data['item'+item.id]">{{ data['item' + item.id] }}</view>
<view class="wi-45 he-45 mt-5" v-else>
<image src="/static/base/tb.jpg" class="wh-full"></image>
</view>
</view>
</template>
</view>
<!-- <template v-for="(arr,key) in data.items">-->
<!-- <view class="font-14 font-w-500 mt-15">{{ key }}</view>-->
<!-- <view class="font-14 mt-6" v-for="(item,index) in arr">-->
<!-- {{ item.inspectStandard }},{{-->
<!-- item.scoreType == 2 ? '扣' : '加'-->
<!-- }}{{ Math.abs(item.score) }};-->
<!-- </view>-->
<!-- </template>-->
</view>
</view>
</template>
</BasicListLayout>
</view>
<view v-if="current==1" class="wh-full">
<BasicListLayout @register="sspregister">
<template v-slot="{data,index}">
<view @click="onssp(data)" class="white-bg-color r-md p-15 mb-15 flex-col">
<view class="mb-15">
<view class="font-w-500 flex-row">
<view class="mr-5">{{ data.fullName }}</view>
<view class="mr-5" v-if="data.studentName">{{ data.studentName }}</view>
{{ data.purpose }}
</view>
<view class="font-12 mt-15" v-html="data.content">
</view>
</view>
<view class="flex-row flex-wrap list_box">
<view class=" r-md mr-15 flex-row" v-for="(item,key) in data.pic.split(',')">
<image v-if="/\.(jpg|jpeg|png|gif|bmp|webp|tiff|svg)$/i.test(item)" :src="imagUrl(item)"
class="wi-160 he-160"></image>
<view @click.stop="videoplay(imagUrl(item))" class="wi-260 he-360 po-re"
v-if="/\.(mp4|avi|mov|wmv|flv|mkv|webm)$/i.test(item)">
<video class="wi-260 he-360"
:src="imagUrl(item)"></video>
<view class="uni-video-cover1">
<svg t="1729239497913" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="4290" width="40" height="40">
<path
d="M512 853.333333c-187.733333 0-341.333333-153.6-341.333333-341.333333s153.6-341.333333 341.333333-341.333333 341.333333 153.6 341.333333 341.333333-153.6 341.333333-341.333333 341.333333z m0-85.333333c140.8 0 256-115.2 256-256s-115.2-256-256-256-256 115.2-256 256 115.2 256 256 256z m128-256l-213.333333 128V384l213.333333 128z"
fill="#e6e6e6" p-id="4291"></path>
</svg>
</view>
</view>
</view>
</view>
<view style="text-align: right">{{ data.createdTime.split(" ")[0] }}</view>
</view>
</template>
</BasicListLayout>
</view>
<view v-if="current==2" class="wh-full po-re">
<!-- <view class="po-ab inset-0 ov-auto p-15">-->
<!-- <template v-for="(data,index) in totzggList">-->
<!-- </template>-->
<!-- </view>-->
<BasicListLayout @register="tzggregister">
<template v-slot="{data,index}">
<view class="white-bg-color r-md p-15 mb-15 flex-row items-center" @click="totzgg(data)">
<view class="wi-100 he-100 r-50 mr-10" v-if="data.thumbnails">
<image :src="imagUrl(data.thumbnails)"
class="wh-full"></image>
</view>
<view class="flex-1">
<view class="font-w-500">{{ data.title }}</view>
<view class="font-12 text-ellipsis-1 mt-5" v-html="data.description"></view>
</view>
</view>
</template>
</BasicListLayout>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import {navigateTo, reLaunch, showToast} from "@/utils/uniapp";
import {useLayout} from "@/components/BasicListLayout/hooks/useLayout";
import {
cmsArticleFindPageApi,
evaluationFindPageSummaryApi,
getSchedulingPlanByUserIdApi,
inspectItemFindAllsApi,
readyToGoFindPageApi
} from "@/api/base/assesment";
import {imagUrl} from "@/utils";
import {onShow} from "@dcloudio/uni-app";
import {useUserStore} from "@/store/modules/user";
import Template from "@/components/BasicQrcode/_template/template.vue";
import {useDataStore} from "@/store/modules/data";
import {getUserViewApi} from "@/api/system/login";
const tabs = ['量化考核', '随手拍', '通知公告']
const current = ref(0)
const tabsRef = ref(null)
const {setData} = useDataStore()
function onssp(data: any) {
setData({
_show: true,
...data
})
navigateTo('/pages/view/quantitativeAssessment/casualShot/casualShot')
}
function videoplay(url: string) {
navigateTo('/pages//view/quantitativeAssessment/index/playPage?url=' + encodeURIComponent(url))
}
function onlhkh(data: any) {
setData(data)
navigateTo('/pages/view/quantitativeAssessment/index/details?gradeClassId=' + data.gradeClassId)
}
function totzgg(data: any) {
setData(data)
navigateTo('/pages/view/quantitativeAssessment/index/noticeAnnouncement')
}
const {getUser, logout} = useUserStore();
const inspectItems: any = ref([]);
function tuichu() {
logout()
reLaunch('/pages/system/login/login')
}
const thirdId: any = ref('');
onShow(async () => {
let res = await inspectItemFindAllsApi();
inspectItems.value = res.result;
await lhkh.reload()
let userres = await getUserViewApi();
if (userres && userres.result) {
thirdId.value = userres.result.thirdId ? userres.result.thirdId : "";
} else {
thirdId.value = "";
}
})
const [register, lhkh] = useLayout({
api: evaluationFindPageSummaryApi,
param: {
showWeek: 1
},
componentProps: {
fixed: false,
loadingMoreEnabled: false,
auto: false
},
})
const [sspregister, ssp] = useLayout({
api: readyToGoFindPageApi,
param: {
showWeek: 1
},
componentProps: {
fixed: false,
loadingMoreEnabled: false,
auto: false
},
})
async function tokhpj() {
if (thirdId.value) {
let res = await getSchedulingPlanByUserIdApi();
if (res.result && res.result.length > 0) {
navigateTo('/pages/view/quantitativeAssessment/assessment/assessment')
} else {
showToast({title: "今日未分配!无法填报!"})
}
} else {
showToast({title: "未配置权限!"})
}
}
function tossp() {
setData({});
navigateTo('/pages/view/quantitativeAssessment/casualShot/casualShot')
}
const totzggList = ref<any>([])
cmsArticleFindPageApi({showWeek: 1}).then(res => {
totzggList.value = res.rows
})
const [tzggregister, tzgg] = useLayout({
api: cmsArticleFindPageApi,
param: {
showWeek: 1
},
componentProps: {
fixed: false,
loadingMoreEnabled: false,
auto: false
},
})
function tabsChange(index: any) {
current.value = index
if (index == 0) {
lhkh.reload()
}
if (index == 1) {
ssp.reload()
}
if (index == 2) {
tzgg.reload()
}
}
</script>
<style scoped lang="scss">
.main_bg {
//background: #4651fa;
background: url("@/static/base/top.png") no-repeat;
background-size: 100% 100%;
}
</style>