|
@@ -10,10 +10,34 @@ const linkTo = (obj) => {
|
|
};
|
|
};
|
|
let ykj_id = $ref('');
|
|
let ykj_id = $ref('');
|
|
let bh = $ref('');
|
|
let bh = $ref('');
|
|
|
|
+let detail = $ref({});
|
|
|
|
+let total_list = $ref([]);
|
|
|
|
+function getData() {
|
|
|
|
+ let data = {
|
|
|
|
+ ykj_id: ykj_id,
|
|
|
|
+ ysdt_pyyhbh:bh
|
|
|
|
+ };
|
|
|
|
+ request({
|
|
|
|
+ url: "/yzy/jspyjd/py_detail",
|
|
|
|
+ data: data,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code === '1') {
|
|
|
|
+ detail = res.data;
|
|
|
|
+ total_list = res.data.list.reduce((prev, cur) => {
|
|
|
|
+ const ysdt_pydf = cur.ysdt_pydf;
|
|
|
|
+ ysdt_pydf.forEach((item, index) => {
|
|
|
|
+ prev[index] = (prev[index] || 0) + Number(item);
|
|
|
|
+ });
|
|
|
|
+ return prev;
|
|
|
|
+ }, []);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ })
|
|
|
|
+}
|
|
if (route.params.id) {
|
|
if (route.params.id) {
|
|
ykj_id = route.params.id;
|
|
ykj_id = route.params.id;
|
|
bh = route.params.bh;
|
|
bh = route.params.bh;
|
|
|
|
+ getData();
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<route lang="json">
|
|
<route lang="json">
|
|
@@ -31,9 +55,98 @@ if (route.params.id) {
|
|
<div class="relative -mt-40px flex justify-end">
|
|
<div class="relative -mt-40px flex justify-end">
|
|
<button type="button" class="back-btn" @click="linkTo({name:'process-pyjd-ykj_id',params:{ykj_id:ykj_id}})">返回</button>
|
|
<button type="button" class="back-btn" @click="linkTo({name:'process-pyjd-ykj_id',params:{ykj_id:ykj_id}})">返回</button>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="mt-10px w-full bg-hex-fff py-20px min-h-700px px-15px">
|
|
|
|
+ <h3 class="mb-20px text-18px text-center">{{detail.jh_name}}</h3>
|
|
|
|
+ <h4 class="text-16px text-hex-0148E5">{{detail.tacher_name}}老师—批阅详情</h4>
|
|
|
|
+ <div class="mt-25px" v-if="detail.list && detail.list.length > 0">
|
|
|
|
+ <table class="data-table" cellpadding="0" cellspacing="0">
|
|
|
|
+ <tr>
|
|
|
|
+ <th v-for="(item,index) in detail.titles">
|
|
|
|
+ <div v-if="index === 0">
|
|
|
|
+ <h3 class="text-16px text-hex-ffffff">{{item.th}}/</h3>
|
|
|
|
+ <h3 class="mt-8px text-16px text-hex-ffffff">{{item.mf}}</h3>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>
|
|
|
|
+ <h3 class="text-16px text-hex-ffffff">{{item.th}}</h3>
|
|
|
|
+ <h3 class="mt-8px text-16px text-hex-ffffff">【满分{{item.mf}}】</h3>
|
|
|
|
+ </div>
|
|
|
|
+ </th>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr v-for="item in detail.list">
|
|
|
|
+ <td>{{item.username}}</td>
|
|
|
|
+ <td v-for="items in item.ysdt_pydf">{{items}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td>
|
|
|
|
+ <h3 class="text-16px text-hex-ff0000">合计平均分</h3>
|
|
|
|
+
|
|
|
|
+ </td>
|
|
|
|
+ <td v-for="item in total_list">
|
|
|
|
+ <h3 class="text-16px text-hex-ff0000">{{(item/detail.list.length).toFixed(1)}}</h3>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mt-25px no-data" v-else>
|
|
|
|
+ <div>
|
|
|
|
+ <h3 class="no-data-img"></h3>
|
|
|
|
+ <h4 class="mt-25px text-18px text-hex-0048e5 text-center">暂无数据</h4>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
+$color: #0048e5;
|
|
|
|
+.data-table {
|
|
|
|
+ width: 100%;
|
|
|
|
+ table-layout: fixed;
|
|
|
|
+
|
|
|
|
+ tr:nth-child(even) {
|
|
|
|
+ background: #F1F7FF;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ th {
|
|
|
|
+ padding: 15px 0;
|
|
|
|
+ background: $color;
|
|
|
|
+ font-weight: normal;
|
|
|
|
+ text-align: center;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ color: #fff;
|
|
|
|
+ &:first-child{
|
|
|
|
+ border-radius: 6px 0 0 0;
|
|
|
|
+ text-align: left;
|
|
|
|
+ padding-left: 30px;
|
|
|
|
+ }
|
|
|
|
+ &:last-child{
|
|
|
|
+ border-radius: 0 6px 0 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ td {
|
|
|
|
+ padding: 15px 0;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ color: #474747;
|
|
|
|
+ text-align: center;
|
|
|
|
+ &:first-child{
|
|
|
|
+ text-align: left;
|
|
|
|
+ padding-left: 30px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.no-data {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 450px;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ .no-data-img {
|
|
|
|
+ width: 233px;
|
|
|
|
+ height: 199px;
|
|
|
|
+ background: url("/images/no-data.png") center no-repeat;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|