|
@@ -1,6 +1,264 @@
|
|
<script setup>
|
|
<script setup>
|
|
|
|
+import { showFailToast, showSuccessToast, showToast } from 'vant';
|
|
|
|
+import { userInfo } from '~/store/user'
|
|
|
|
|
|
|
|
+const { uo_type, uo_name, token } = userInfo
|
|
|
|
+
|
|
|
|
+const isBureau = ref(false)// 当前用户是否局端
|
|
|
|
+isBureau.value = uo_type === '1'
|
|
|
|
+const list = ref([])
|
|
|
|
+const loading = ref(false)
|
|
|
|
+const finished = ref(false)
|
|
|
|
+let page = 1
|
|
|
|
+const param = $ref({
|
|
|
|
+ xdx_xsxh: '',
|
|
|
|
+ keyword: '',
|
|
|
|
+})
|
|
|
|
+let teamList = $ref([]);
|
|
|
|
+let team_id = $ref('')
|
|
|
|
+function onLoad() {
|
|
|
|
+ loading.value = true
|
|
|
|
+ request({
|
|
|
|
+ url: '/jcxx/team/index',
|
|
|
|
+ data: {
|
|
|
|
+ limit: 999,
|
|
|
|
+ }
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code == 1) {
|
|
|
|
+ teamList = res.data.page_data;
|
|
|
|
+ teamList.map((item) => {
|
|
|
|
+ if (item.team_current_option_k == "1") {
|
|
|
|
+ team_id = item.team_id;
|
|
|
|
+ request({
|
|
|
|
+ url: '/xddy/dygl_xsxjk/index',
|
|
|
|
+ data: {
|
|
|
|
+ page,
|
|
|
|
+ limit: 20,
|
|
|
|
+ ...param,
|
|
|
|
+ team_id,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ const data = res.data
|
|
|
|
+ list.value = [...list.value, ...data.page_data]
|
|
|
|
+ finished.value = data.total_page === page
|
|
|
|
+ page++
|
|
|
|
+ loading.value = false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+const searchValue = $ref('')
|
|
|
|
+function onClickSearch() {
|
|
|
|
+ reGetList()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const itemRef = ref(null)
|
|
|
|
+function onConfirm() {
|
|
|
|
+ itemRef.value.toggle()
|
|
|
|
+ reGetList()
|
|
|
|
+}
|
|
|
|
+const itemXhRef = ref(null);
|
|
|
|
+function onXhConfirm() {
|
|
|
|
+ itemXhRef.value.toggle()
|
|
|
|
+ reGetList()
|
|
|
|
+}
|
|
|
|
+function reGetList() {
|
|
|
|
+ page = 1
|
|
|
|
+ list.value = []
|
|
|
|
+ finished.value = false
|
|
|
|
+ onLoad()
|
|
|
|
+}
|
|
|
|
+function handleLinkPf(item) {
|
|
|
|
+ let link = "http://60.188.226.44:8000/app/mobile/#/scanCode?xsxm=" +
|
|
|
|
+ item.xdx_xsxm +
|
|
|
|
+ "&xsxh=" +
|
|
|
|
+ item.xdx_xsxh +
|
|
|
|
+ "&sm_id=" +
|
|
|
|
+ item.sm_id +
|
|
|
|
+ "&token=" +
|
|
|
|
+ token +
|
|
|
|
+ "&xdx_id=" +
|
|
|
|
+ item.xdx_id;
|
|
|
|
+ window.open(link, '_self')
|
|
|
|
+}
|
|
|
|
+let showBottom = $ref(false);
|
|
|
|
+
|
|
|
|
+let pfList = $ref([]);
|
|
|
|
+let stuData = $ref({});
|
|
|
|
+let pfpage = 1;
|
|
|
|
+let pfLoading = $ref(false);
|
|
|
|
+let pffinished = $ref(false)
|
|
|
|
+function onPfLoad() {
|
|
|
|
+ pfLoading = true
|
|
|
|
+ return request({
|
|
|
|
+ url: "/xddy/dygl_wypj_pjjl/index",
|
|
|
|
+ data: {
|
|
|
|
+ wdwp_xs_xjh: stuData?.xdx_xsxh,
|
|
|
|
+ pfpage,
|
|
|
|
+ limit: 10,
|
|
|
|
+ },
|
|
|
|
+ }).then(res => {
|
|
|
|
+ const data = res.data
|
|
|
|
+ pfList = [...pfList, ...data.page_data]
|
|
|
|
+ pffinished = data.total_page === pfpage
|
|
|
|
+ pfpage++
|
|
|
|
+ pfLoading = false
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+// 查看评分
|
|
|
|
+function handleLookPf(item) {
|
|
|
|
+ showBottom = true;
|
|
|
|
+ stuData = item;
|
|
|
|
+ pfpage = 1
|
|
|
|
+ pfList = []
|
|
|
|
+ pffinished = false
|
|
|
|
+ onPfLoad();
|
|
|
|
+}
|
|
|
|
+function reGetPf() {
|
|
|
|
+ pfpage = 1
|
|
|
|
+ pfList = []
|
|
|
|
+ pffinished = false
|
|
|
|
+ onPfLoad();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 编辑分数
|
|
|
|
+let wdwp_xs_df = $ref('');
|
|
|
|
+let editShow = $ref(false);
|
|
|
|
+let scoreData = $ref({});
|
|
|
|
+function handleEditPf(item) {
|
|
|
|
+ editShow = true;
|
|
|
|
+ scoreData = item;
|
|
|
|
+ wdwp_xs_df = item.wdwp_xs_df;
|
|
|
|
+}
|
|
|
|
+function editScoreSubmit() {
|
|
|
|
+ if (!wdwp_xs_df) {
|
|
|
|
+ return showFailToast('请输入分数')
|
|
|
|
+ }
|
|
|
|
+ let data = {
|
|
|
|
+ wdwp_id: scoreData.wdwp_id,
|
|
|
|
+ xddy_dygl_wypj_pjjl: {
|
|
|
|
+ wdwp_xs_df,
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ request({
|
|
|
|
+ url: "/xddy/dygl_wypj_pjjl/edit",
|
|
|
|
+ data,
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.code == '1') {
|
|
|
|
+ showSuccessToast('编辑成功');
|
|
|
|
+ editShow = false;
|
|
|
|
+ reGetPf();
|
|
|
|
+ reGetList();
|
|
|
|
+ } else {
|
|
|
|
+ showFailToast(res.msg)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
+
|
|
<template>
|
|
<template>
|
|
- 123
|
|
|
|
|
|
+ <div class="index">
|
|
|
|
+ <!-- <van-search v-model="param.keyword" :clearable="false" show-action placeholder="请输入搜索关键词" @search="onClickSearch">
|
|
|
|
+ <template #action>
|
|
|
|
+ <div @click="onClickSearch">
|
|
|
|
+ 搜索
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </van-search> -->
|
|
|
|
+ <van-dropdown-menu>
|
|
|
|
+ <van-dropdown-item ref="itemRef" title="学生姓名">
|
|
|
|
+ <van-cell-group inset>
|
|
|
|
+ <van-field clearable @clear="onConfirm" v-model="param.keyword" placeholder="请输入学生姓名" />
|
|
|
|
+ </van-cell-group>
|
|
|
|
+ <div style="padding: 5px 16px;">
|
|
|
|
+ <van-button type="primary" block round @click="onConfirm">
|
|
|
|
+ 确认
|
|
|
|
+ </van-button>
|
|
|
|
+ </div>
|
|
|
|
+ </van-dropdown-item>
|
|
|
|
+ <van-dropdown-item ref="itemXhRef" title="学生学籍号">
|
|
|
|
+ <van-cell-group inset>
|
|
|
|
+ <van-field clearable @clear="onXhConfirm" v-model="param.xdx_xsxh" placeholder="请输入学生学籍号" />
|
|
|
|
+ </van-cell-group>
|
|
|
|
+ <div style="padding: 5px 16px;">
|
|
|
|
+ <van-button type="primary" block round @click="onXhConfirm">
|
|
|
|
+ 确认
|
|
|
|
+ </van-button>
|
|
|
|
+ </div>
|
|
|
|
+ </van-dropdown-item>
|
|
|
|
+ </van-dropdown-menu>
|
|
|
|
+ <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
|
|
|
+ <van-cell v-for="item in list" :key="item">
|
|
|
|
+ <template #title>
|
|
|
|
+ <span>{{ `${item.xdx_xsxm}\u00A0\u00A0\u00A0 ${item.xdx_xsxh}` }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- <template #value>
|
|
|
|
+ <span style="color:black">班级:{{ item.grade_name }}{{ item.class_name }}</span>
|
|
|
|
+ </template> -->
|
|
|
|
+ <template #label>
|
|
|
|
+ <div style="display: flex;justify-content: space-between;color: #666;">
|
|
|
|
+ <div><span>性别:{{ item.xdx_xb }}</span></div>
|
|
|
|
+ <div><span>积分:{{ item.xdx_jf }}</span></div>
|
|
|
|
+ <div> <span>班级:{{ item.grade_name }}{{ item.class_name }}</span></div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template #right-icon>
|
|
|
|
+ <span @click="handleLinkPf(item)" class="text-blue-500 mr-10px cursor-pointer">评分</span>
|
|
|
|
+ <span @click="handleLookPf(item)" class="text-blue-500 cursor-pointer">查看评分</span>
|
|
|
|
+ </template>
|
|
|
|
+ </van-cell>
|
|
|
|
+ </van-list>
|
|
|
|
+ <van-popup v-model:show="showBottom" position="bottom" :style="{ height: '80%' }" closeable round>
|
|
|
|
+ <van-list v-model:loading="pfLoading" :finished="pffinished" finished-text="没有更多了" @load="onPfLoad" class="mt-40px">
|
|
|
|
+ <van-cell v-for="item in pfList" :key="item">
|
|
|
|
+ <template #title>
|
|
|
|
+ <span>{{ `${item.wdwp_xs_xm}\u00A0\u00A0\u00A0 ${item.wdwp_xs_xjh}` }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ <template #label>
|
|
|
|
+ <div style="display: flex;justify-content: space-between;color: #666;">
|
|
|
|
+ <div class="flex">
|
|
|
|
+ <span class="min-w-70px block">{{ item.xdww_name }}</span>
|
|
|
|
+ <span class="min-w-70px block">{{ item.xdwwp_name }} </span>
|
|
|
|
+ <span>得分: {{ item.wdwp_xs_df }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="flex justify-between"><span>评分用户类型: {{ item.wdwp_pfyhlx }}</span> <span>评分用户姓名: {{
|
|
|
|
+ item.wdwp_pfyh_xm }}</span></div>
|
|
|
|
+ </template>
|
|
|
|
+ <template #right-icon>
|
|
|
|
+ <span @click="handleEditPf(item)" class="text-blue-500 mr-10px cursor-pointer">编辑分数</span>
|
|
|
|
+ </template>
|
|
|
|
+ </van-cell>
|
|
|
|
+ </van-list>
|
|
|
|
+ </van-popup>
|
|
|
|
+ <van-dialog v-model:show="editShow" title="编辑分数" show-cancel-button @confirm="editScoreSubmit">
|
|
|
|
+ <van-cell-group inset>
|
|
|
|
+ <van-field class="edit" v-model="wdwp_xs_df" type="number" label="得分" />
|
|
|
|
+ </van-cell-group>
|
|
|
|
+ </van-dialog>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
+
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+:deep(.van-cell__title) {
|
|
|
|
+ width: 70% !important;
|
|
|
|
+ flex: auto
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+:deep(.van-cell__value) {
|
|
|
|
+ width: 30% !important;
|
|
|
|
+ flex: auto
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+:deep(.edit) {
|
|
|
|
+ --van-dialog-background: #f2f2f2;
|
|
|
|
+
|
|
|
|
+ .van-cell__title {
|
|
|
|
+ width: unset !important;
|
|
|
|
+ justify-content: center !important;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|