wwf
22 小时以前 737179a0ce34147269cccf288fecd0e7bb4c309b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<template>
  <div>
    <div class="content-bg">
      <div class="main-content">
        <ReturnBtn></ReturnBtn>
 
        <el-row class="mt-6">
          <el-text class="text-title">成绩查询</el-text>
        </el-row>
      </div>
    </div>
    <div class="main-content py-4" style="margin-top: -130px;">
      <el-card shadow="never" class="p-4" style="min-height: 500px;">
        <el-form-item>
          <el-input v-model="keyword" placeholder="搜索关键字">
            <template #prefix>
              <el-icon class="el-input__icon"><search /></el-icon>
            </template>
          </el-input>
        </el-form-item>
        <div v-for="(score,index) in scoreList" 
          class="mt-3" 
          :key="`scoreCard${index}`"
          style="border-radius: 5px;"
          :style="{ border: `1px solid ${score.foldFlag?'#dcdcdc':'#007aff'}` }"
        >
          <el-card shadow="never" class="p-3  cursor-p" style="background: #F7F7F7;border: none;" @click="score.foldFlag=!score.foldFlag">
            <el-row justify="space-between" align="middle">
              <div>
                <el-row><el-text class="text-lg text-black font-medium">{{ score.occupationJob }}</el-text></el-row>
                <el-row class="mt-1">
                  <el-text>{{ score.batch }}</el-text>
                </el-row>
              </div>
              <Icon v-if="score.foldFlag" icon="mingcute:down-line" width="22" height="22"  style="color: #333333" />
              <Icon v-else icon="mingcute:up-line" width="22" height="22"  style="color: #007AFF" />
            </el-row>
          </el-card>
          <div v-if="!score.foldFlag" class="px-4">
            <el-row v-for="(field,index) in fieldList"
              style="border-bottom: 1px solid #DCDCDC;" 
              class="py-4"
              :key="`field${index}`"
            >
              <el-text style="width: 170px;color: #666666;" class="font-medium">{{ field.label }}</el-text>
              <el-text v-if="field.value == 'statusText'" class="font-medium">
                <div style="display: flex;flex-direction: column;">
                  <el-text :style="getStyle(score.status)" style="align-self: start;">{{ score.statusText }}</el-text>
                  <el-text v-if="score.status=='cancellation'">作废原因:{{ score.failReason }}</el-text>
                </div>
              </el-text>
              <el-text v-else class=" text-black font-medium">{{score[field.value]}}</el-text>
            </el-row>
          </div>
        </div>
        <el-row justify="center" v-if="scoreList.length==0">
          <el-text>暂无数据~</el-text>
        </el-row>
      </el-card>
    </div>
  </div>
</template>
 
<script>
import { useLoginStore } from '@/stores/login.js'
import { useSessionStore } from '@/stores/session.js'
import { storeToRefs } from 'pinia';
export default {
  components: {
 
  },
  setup() {
    const { userInfo } = storeToRefs(useSessionStore())
    const { loginDialogVisible } = storeToRefs(useLoginStore())
    return { userInfo, loginDialogVisible }
  },
  data() {
    return {
      scoreList: [],
      keyword: '',
      fieldList: [
        { label: '姓名', value: 'name' },
        { label: '身份证号', value: 'idCard' },
        { label: '准考证号', value: 'examCard' },
        { label: '理论知识成绩', value: 'theoryScore' },
        { label: '操作技能成绩', value: 'operationScore' },
        { label: '成绩状态', value: 'statusText' },
      ]
    }
  },
  computed: {
    
  },
  watch: {
  },
  created() {
    this.getScoreList()
  },
  methods: {
    getScoreList() {
      this.scoreList = [
        { 
          id: 1,
          occupationJob: '电工(维修电工)-四级', 
          batch: '2025年12月公共营养师第1批',
          name: '黄婷婷',
          idCard: '440203198906302518',
          examCard: '250610110746092',
          theoryScore: '--',
          operationScore: '--',
          status: 'auditing',
          statusText: '成绩审核中',
          foldFlag: false
        },
        { 
          id: 2,
          occupationJob: '电工(维修电工)-四级', 
          batch: '2025年12月公共营养师第1批',
          name: '黄婷婷',
          idCard: '440203198906302518',
          examCard: '250610110746092',
          theoryScore: '78分(合格)',
          operationScore: '85分(合格)',
          status: 'public',
          statusText: '成绩公示中',
          foldFlag: true
        },
        { 
          id: 3,
          occupationJob: '电工(维修电工)-四级', 
          batch: '2025年12月公共营养师第1批',
          name: '黄婷婷',
          idCard: '440203198906302518',
          examCard: '250610110746092',
          theoryScore: '78分(合格)',
          operationScore: '85分(合格)',
          status: 'effectiveness',
          statusText: '成绩已生效',
          foldFlag: true
        },
        { 
          id: 4,
          occupationJob: '电工(维修电工)-四级', 
          batch: '2025年12月公共营养师第1批',
          name: '黄婷婷',
          idCard: '440203198906302518',
          examCard: '250610110746092',
          theoryScore: '85分(合格)',
          operationScore: '78分(合格)',
          status: 'cancellation',
          statusText: '成绩已作废',
          failReason: '违规作弊',
          foldFlag: true
        },
      ]
    },
    getStyle(status) {
      let obj = {
        auditing: '#007AFF',
        public: '#FF9009',
        effectiveness: '#1BA53A',
        cancellation: '#FF4040',
      }
      return { color: obj[status] }
    }
  }
}
 
</script>
<style scoped>
.content-bg {
  height: 240px;
  background-image: url('@/assets/images/contentBg.png');
  background-repeat: no-repeat, no-repeat, repeat; /* 分别设置 */
  background-size: cover;
}
.active-tab {
  background-color: #EEF5FF;
  border: 1px solid #0069FF !important; 
  color: #0069FF !important;
}
</style>