提交 20973e97 编写于 作者: 刘英杰's avatar 刘英杰

V20240417 应急添加成绩申报和师生奖励

上级 3cbc9941
无法预览此类型文件
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="shortcut icon" href=favicon.ico><title>竞赛管理</title><link href=css/chunk-vendors.064c214c.css rel=stylesheet><link href=css/app.8be0473e.css rel=stylesheet></head><body><script src=/a/manager/identify/identify.js></script><noscript><strong>请开启 JavaScript 功能来使用 竞赛管理。</strong></noscript><div id=app></div><script src=js/chunk-vendors.85f930d9.js></script><script src=js/app.a48f11ef.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="shortcut icon" href=favicon.ico><title>竞赛管理</title><link href=css/chunk-vendors.064c214c.css rel=stylesheet><link href=css/app.8be0473e.css rel=stylesheet></head><body><script src=/a/manager/identify/identify.js></script><noscript><strong>请开启 JavaScript 功能来使用 竞赛管理。</strong></noscript><div id=app></div><script src=js/chunk-vendors.4efdd74b.js></script><script src=js/app.a329a78f.js></script></body></html>
\ No newline at end of file
文件已删除
......@@ -69,17 +69,23 @@ export function storageAddEventListener(fun) {
export async function myEncapsulationFunction(fun) {
// Spin.show()
Message.loading({
duration: 0,
content: '正在提交中...',
})
let res = await fun()
Message.destroy()
try {
switch (res.code) {
case 1 :
Message['success']({
background: true,
content: res.msg
content: res.msg,
duration: 2,
});
break;
default :
Message['error']({
background: true,
content: res.msg_detail,
......
......@@ -49,6 +49,18 @@ export default {
// auth: ['admin'],
//
// },
{
path: '/reportWorkloadAndSubsidy',
title: '成绩申报(测试)',
header: 'home',
icon: ''
},
{
path: '/rewardForTeachersAndStudents',
title: '师生奖励(测试)',
header: 'home',
icon: ''
},
]
}
......@@ -171,65 +171,69 @@
<div class="tableList">
<h1 style="display: flex;justify-content: center">成绩申报上传</h1>
<table border="1" class="container1">
<tr class="row" v-for="(item,index) in drawerKeyValueArray" :key="index">
<th v-if="item[0]==='level'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='level'" class="colContent">{{ ['国家级', '省一级', '省二级'][item[1]] }}</td>
<!-- <th v-if="item[0]==='team_id'" class="colTitle">{{ item[2] }}</th>-->
<!-- <td v-if="item[0]==='team_id'" class="colContent">-->
<!-- <template>-->
<!-- <a @click="teamInfo(item[1])">详细</a>-->
<!-- </template>-->
<tr v-for="(item,index) in drawerKeyValueArray" :key="index">
<th class="colTitle">{{ item.title }}</th>
<td class="colContent">{{ item.value }}</td>
</tr>
<!-- <tr class="row" v-for="(item,index) in drawerKeyValueArray" :key="index">-->
<!-- <th v-if="item[0]==='level'" class="colTitle">{{ item[2] }}</th>-->
<!-- <td v-if="item[0]==='level'" class="colContent">{{ ['国家级', '省一级', '省二级'][item[1]] }}</td>-->
<!-- &lt;!&ndash; <th v-if="item[0]==='team_id'" class="colTitle">{{ item[2] }}</th>&ndash;&gt;-->
<!-- &lt;!&ndash; <td v-if="item[0]==='team_id'" class="colContent">&ndash;&gt;-->
<!-- &lt;!&ndash; <template>&ndash;&gt;-->
<!-- &lt;!&ndash; <a @click="teamInfo(item[1])">详细</a>&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; </td>&ndash;&gt;-->
<!-- <th v-if="item[0]==='competition_level_id'" class="colTitle">{{ item[2] }}</th>-->
<!-- <td v-if="item[0]==='competition_level_id'" class="colContent">-->
<!-- {{ ['', '国家级', '省一级', '省二级', '国际级'][item[1]] }}-->
<!-- </td>-->
<th v-if="item[0]==='competition_level_id'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='competition_level_id'" class="colContent">
{{ ['', '国家级', '省一级', '省二级', '国际级'][item[1]] }}
</td>
<th v-if="item[0]==='approval_state'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='approval_state'" class="colContent">
{{ ['未审批', '审批中', '审批通过', '审批不通过'][item[1]] }}
</td>
<!-- <th v-if="item[0]==='approval_state'" class="colTitle">{{ item[2] }}</th>-->
<!-- <td v-if="item[0]==='approval_state'" class="colContent">-->
<!-- {{ ['未审批', '审批中', '审批通过', '审批不通过'][item[1]] }}-->
<!-- </td>-->
<th v-if="item[0]==='competition_type_id'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='competition_type_id'" class="colContent">
{{ ['', 'A类', 'B类'][item[1]] }}
</td>
<!-- <th v-if="item[0]==='competition_type_id'" class="colTitle">{{ item[2] }}</th>-->
<!-- <td v-if="item[0]==='competition_type_id'" class="colContent">-->
<!-- {{ ['', 'A类', 'B类'][item[1]] }}-->
<!-- </td>-->
<th v-if="item[0]==='way'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='way'" class="colContent">
{{ ['团队', '个人'][item[1]] }}
</td>
<!-- <th v-if="item[0]==='way'" class="colTitle">{{ item[2] }}</th>-->
<!-- <td v-if="item[0]==='way'" class="colContent">-->
<!-- {{ ['团队', '个人'][item[1]] }}-->
<!-- </td>-->
<th v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level' &&item[0]!=='competition_level_id'&& item[0]!=='way'&& item[0]!=='approval_state'"
class="colTitle">{{
item[2]
}}
</th>
<td v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level'&&item[0]!=='competition_level_id' && item[0]!=='way'&& item[0]!=='approval_state'"
class="colContent">{{
item[1]
}}
</td>
<!-- <th v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level' &&item[0]!=='competition_level_id'&& item[0]!=='way'&& item[0]!=='approval_state'"-->
<!-- class="colTitle">{{-->
<!-- item[2]-->
<!-- }}-->
<!-- </th>-->
<!-- <td v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level'&&item[0]!=='competition_level_id' && item[0]!=='way'&& item[0]!=='approval_state'"-->
<!-- class="colContent">{{-->
<!-- item[1]-->
<!-- }}-->
<!-- </td>-->
<th v-if="item[0]==='teacherExcellenceFileList'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='teacherExcellenceFileList'" class="colContent">
<a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"
v-for="(ite,inde) in item[1]"
:key="inde">
{{ ite.file_name }}
</a>
</td>
<th v-if="item[0]==='studentExcellenceFileList'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='studentExcellenceFileList'" class="colContent">
<a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"
v-for="(ite,inde) in item[1]"
:key="inde">
{{ ite.file_name }}
</a>
</td>
</tr>
<!-- <th v-if="item[0]==='teacherExcellenceFileList'" class="colTitle">{{ item[2] }}</th>-->
<!-- <td v-if="item[0]==='teacherExcellenceFileList'" class="colContent">-->
<!-- <a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"-->
<!-- v-for="(ite,inde) in item[1]"-->
<!-- :key="inde">-->
<!-- {{ ite.file_name }}-->
<!-- </a>-->
<!-- </td>-->
<!-- <th v-if="item[0]==='studentExcellenceFileList'" class="colTitle">{{ item[2] }}</th>-->
<!-- <td v-if="item[0]==='studentExcellenceFileList'" class="colContent">-->
<!-- <a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"-->
<!-- v-for="(ite,inde) in item[1]"-->
<!-- :key="inde">-->
<!-- {{ ite.file_name }}-->
<!-- </a>-->
<!-- </td>-->
<!-- </tr>-->
<tr>
<th>附件</th>
<td class="colContent">
......@@ -1117,21 +1121,27 @@ export default {
'竞赛形式',
'竞赛类别',
'赛事级别',
// '证书名称',
// '获奖奖金',
// '证书描述',
'赛事编号',
// '教师证书',
// '学生证书',
// '审批意见'
];
cur.push(data[index])
})
this.drawerKeyValueArray = [
{title: '赛事名称', value: res.response.competitionname},
{title: '赛事编号', value: res.response.report_code},
{title: '赛项名称', value: res.response.competitionsubitem_name},
// {title: '赛事类型', value: ['学生赛', '教师赛'][res.response.bonus.competition_method]},
{title: '主办单位', value: res.response.sponsor},
{title: '赛事级别', value: res.response.competition_level_name},
{title: '赛事类别', value: res.response.competition_type_name},
{title: '竞赛形式', value: ['团队', '个人', '不限'][res.response.way]},
{title: '比赛开始时间', value: res.response.begin_time},
{title: '比赛结束时间', value: res.response.end_time},
{title: '审批状态', value: publicState.flowApprovalState[res.response.approval_state]},
// {title: '批次', value: res.response.bonus.competitionbatch_name},
]
},
// 删除
......
......@@ -582,7 +582,6 @@ export default {
],
loading: false,
tableData: [
{},
],
......
<!--教学分-->
<!--奖金-->
<template>
<div>
<card>
<!-- 搜索框-->
<cs-search-cond-form
:searchCondList="init.searchCondList"
:labelWidth="120"
@onSubmit="search"
@onReset="reset"
></cs-search-cond-form>
<!-- <div style="display: flex;">-->
<!-- <Button type="primary" class="ivu-ml-8" @click="add">-->
<!-- <Icon type="md-add"/>-->
<!-- 新增-->
<!-- </Button>-->
<!-- </div>-->
<!-- 列表-->
<cs-c-table
:key="kt"
:buttonAuzhorization="true"
:tableColumns="init.tableColumns.filter(a => a.show)"
:tableData="init.tableData"
:tableLoading="init.tableLoading"
:tableSize="init.tableSize"
:dataCount="init.dataCount"
:pageIndex="init.page_index"
:pageSize="init.page_size"
@switchChange="switchChange"
@onPageChange="onPageChange"
@onPageSizeChange="onPageSizeChange"
@rowDetails="rowDetails"
@rowEdit="rowEdit"
@rowDelete="rowDelete"
>
<template #approval_state="{row}">
<Tag :color="publicState.flowApprovalState.color[row.approval_state]">{{
publicState.flowApprovalState[row.approval_state]
}}
</Tag>
</template>
<template #way="{row}">
<Tag :color="publicState.tag[row.way]">{{ ['团队', '个人', '不限'][row.way] }}</Tag>
</template>
<template #certificate_file="{row}">
{{ row.certificate_file }}
</template>
<template #approval_state="{row}">
<Tag :color="publicState.flowApprovalState.color[row.approval_state]">{{
publicState.flowApprovalState[row.approval_state]
}}
</Tag>
</template>
<template #way="{row}">
<Tag :color="publicState.tag[row.way]">{{ ['团队', '个人', '不限'][row.way] }}</Tag>
</template>
<template #certificate_file="{row}">
{{ row.certificate_file }}
</template>
</cs-c-table>
</card>
<Modal
v-model="CertificateModal1"
title="修改"
width="50"
:styles="{top:'10px'}"
>
<div style=" display: flex;justify-content: space-around;">
<updateCertificateModal1 @getData="getData" ref="updateCertificateModal" v-if="CertificateModal1"
:winningMaterialId="Id"
></updateCertificateModal1>
</div>
<template #footer>
<div style="display: flex;justify-content: center">
<Button disabled type="primary" @click="handleSubmit" style="width: 12vw">提交流程</Button>
<Button type="primary" @click="save" style="width: 12vw">保存</Button>
<Button @click="handleReset" style="margin-left: 8px;width: 12vw;">重置</Button>
</div>
<!-- <Button type="text" @click="CertificateModal =false">关闭</Button>-->
<!-- <Button type="primary" @click="importOk">确定</Button>-->
</template>
</Modal>
<Modal
v-model="CertificateModal"
title="修改"
width="50"
:styles="{top:'10px'}"
>
<!-- <Spin fix v-if="importLoading"></Spin>-->
<div style=" display: flex;justify-content: space-around;">
<updateCertificateModal @getData="getData" ref="updateCertificateModal" v-if="CertificateModal"
:winningMaterialId="Id"
></updateCertificateModal>
</div>
<template #footer>
<div style="display: flex;justify-content: center">
<cs-button :disabled="true" ref="load" type="primary" cs-style="width: 12vw;margin-right:10px;"
cs-text="提交流程"
:cs-click="handleSubmit"
></cs-button>
<Button type="primary" @click="save" style="width: 12vw">保存</Button>
<Button @click="handleReset" style="margin-left: 8px;width: 12vw;">重置</Button>
</div>
<!-- <Button type="text" @click="CertificateModal =false">关闭</Button>-->
<!-- <Button type="primary" @click="importOk">确定</Button>-->
</template>
</Modal>
<Drawer :width="800" title="详细" :closable="true" v-model="drawer">
<div class="tableList">
<h1 style="display: flex;justify-content: center">教师工作量</h1>
<table border="1" class="container1">
<tr class="row" v-for="(item,index) in drawerKeyValueArray" :key="index">
<th v-if="item[0]==='level'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='level'" class="colContent">{{ ['国家级', '省一级', '省二级'][item[1]] }}</td>
<th v-if="item[0]==='competition_level_id'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='competition_level_id'" class="colContent">
{{ ['', '国家级', '省一级', '省二级', '国际级'][item[1]] }}
</td>
<th v-if="item[0]==='approval_state'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='approval_state'" class="colContent">
{{ ['未审批', '审批中', '审批通过', '审批不通过'][item[1]] }}
</td>
<th v-if="item[0]==='competition_type_id'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='competition_type_id'" class="colContent">
{{ ['', 'A类', 'B类'][item[1]] }}
</td>
<th v-if="item[0]==='way'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='way'" class="colContent">
{{ ['团队', '个人'][item[1]] }}
</td>
<th v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level' &&item[0]!=='competition_level_id'&& item[0]!=='way'&& item[0]!=='approval_state'"
class="colTitle">{{
item[2]
}}
</th>
<td v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level'&&item[0]!=='competition_level_id' && item[0]!=='way'&& item[0]!=='approval_state'"
class="colContent">{{
item[1]
}}
</td>
<th v-if="item[0]==='teacherExcellenceFileList'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='teacherExcellenceFileList'" class="colContent">
<a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"
v-for="(ite,inde) in item[1]"
:key="inde">
{{ ite.file_name }}
</a>
</td>
<th v-if="item[0]==='studentExcellenceFileList'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='studentExcellenceFileList'" class="colContent">
<a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"
v-for="(ite,inde) in item[1]"
:key="inde">
{{ ite.file_name }}
</a>
</td>
</tr>
<tr>
<th>附件</th>
<td class="colContent">
<!-- :href="ite.path"-->
<a class="aText" style="display: flex;flex-wrap: wrap;justify-content: center" @click="viewFile(ite)"
v-for="(ite,inde) in flagObject.files_list"
:key="inde">
{{ ite.file_name }}
</a>
</td>
</tr>
</table>
<div :style="` max-height:${unfold.height}px;overflow-y: hidden;`">
<div style=" width: 100%;height: 5vh;display: flex;align-items: center;">
<h3>(团队信息)工作量信息:</h3>
<!-- <Button type="primary" style="width: 15%; margin-left: 3vw"-->
<!-- @click="addAwardsModal">添加团队奖项-->
<!-- </Button>-->
<div style="margin-left: auto;display: flex;align-items: center;">
</div>
</div>
<!-- 团队卡片-->
<Card style="margin:0.5vw " v-for="(item,index) in teamObjectData" :key="index">
<template #title>
<h3>{{
item.teanname
}}(
参赛教师
<span style="color: #1e93ff">{{ item.student_list.length }}</span>
位);
</h3>
</template>
<!-- <template #extra>-->
<!-- <div class="teamCardExtraText">{{ item.hierarchy_name }}</div>-->
<!-- -->
<!-- </template>-->
<Table v-if="!!item.student_list.length" :columns="columnsStudent" :data="item.student_list">
<template #instructionalscore="{row,index}">
<div style="width: 100%;height: 100%;display: flex;align-items: center;">
<span
style="font-family: 楷体;color: #1e93ff;font-weight: 600;">{{
(row.instructionalscore || 0)
}}分</span>
</div>
</template>
</Table>
</Card>
</div>
<!-- 展开卡片-->
<div class="Atext ivu-text-center">
<!-- 1收起 0展开-->
<a v-if="!!teamObjectData.length" @click="unfoldTeamCard">
<Icon v-if="unfold.State === 0" type="ios-arrow-dropdown-circle"></Icon>
<Icon v-else type="ios-arrow-dropup-circle"/>
{{ unfold.flag[unfold.State] }}
</a>
</div>
</div>
</Drawer>
<!-- 在线预览附件 -->
<drawerOnlineViewFiel ref="drawerOnlineViewFiel" :file_list="flagObject.files_list"></drawerOnlineViewFiel>
<Drawer :width="800" title="详细" :closable="true" v-model="drawer1">
<div class="tableList">
<h1 style="display: flex;justify-content: center">学生补助申请</h1>
<table border="1" class="container1">
<tr class="row" v-for="(item,index) in drawerKeyValueArray" :key="index">
<th v-if="item[0]==='level'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='level'" class="colContent">{{ ['国家级', '省一级', '省二级'][item[1]] }}</td>
<th v-if="item[0]==='competition_level_id'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='competition_level_id'" class="colContent">
{{ ['', '国家级', '省一级', '省二级', '国际级'][item[1]] }}
</td>
<th v-if="item[0]==='approval_state'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='approval_state'" class="colContent">
{{ ['未审批', '审批中', '审批通过', '审批不通过'][item[1]] }}
</td>
<th v-if="item[0]==='competition_type_id'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='competition_type_id'" class="colContent">
{{ ['', 'A类', 'B类'][item[1]] }}
</td>
<th v-if="item[0]==='way'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='way'" class="colContent">
{{ ['团队', '个人'][item[1]] }}
</td>
<th v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level' &&item[0]!=='competition_level_id'&& item[0]!=='way'&& item[0]!=='approval_state'"
class="colTitle">{{
item[2]
}}
</th>
<td v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level'&&item[0]!=='competition_level_id' && item[0]!=='way'&& item[0]!=='approval_state'"
class="colContent">{{
item[1]
}}
</td>
<th v-if="item[0]==='teacherExcellenceFileList'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='teacherExcellenceFileList'" class="colContent">
<a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"
v-for="(ite,inde) in item[1]"
:key="inde">
{{ ite.file_name }}
</a>
</td>
<th v-if="item[0]==='studentExcellenceFileList'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='studentExcellenceFileList'" class="colContent">
<a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"
v-for="(ite,inde) in item[1]"
:key="inde">
{{ ite.file_name }}
</a>
</td>
</tr>
<tr>
<th>附件</th>
<td class="colContent">
<!-- :href="ite.path"-->
<a class="aText" style="display: flex;flex-wrap: wrap;justify-content: center" @click="viewFile(ite)"
v-for="(ite,inde) in flagObject.files_list"
:key="inde">
{{ ite.file_name }}
</a>
</td>
</tr>
</table>
<div :style="` max-height:${unfold.height}px;overflow-y: hidden;`">
<div v-if="!!teamObjectData.length" style=" width: 100%;height: 5vh;display: flex;align-items: center;">
<h3>(团队信息)补贴信息:</h3>
<h3 style="margin-left: auto; color: #1e93ff;font-family: 楷体;font-size: 20px;">补贴总金额:
<span>{{
flagObject.subsidy_total
}}</span></h3>
</div>
<!-- 团队卡片-->
<Card style="margin:0.5vw " v-for="(item,index) in teamObjectData" :key="index">
<template #title>
<h3>{{
item.teanname
}}(
参赛学生
<span style="color: #1e93ff">{{ item.student_list.length }}</span>
位);
<!-- <span>可分配奖金<span style="color: #1e93ff;">{{-->
<!-- (item.allot_money || 0)-->
<!-- }}元</span></span>-->
</h3>
</template>
<template #extra>
<div class="teamCardExtraText">{{ item.hierarchy_name }}</div>
</template>
<Table v-if="!!item.student_list.length" :columns="columnsStudent" :data="item.student_list">
<template #bonus="{row,index}">
<div style="width: 100%;height: 100%;display: flex;align-items: center;">
<span
style="font-family: 楷体;color: #1e93ff;font-weight: 600;">{{ (row.bonus || 0) }}元</span>
</div>
</template>
<template #subsidytype_name="{row,index}">
<div style="width: 100%;height: 100%;display: flex;align-items: center;">
<span
style="font-family: 楷体;color: #1e93ff;font-weight: 600;">{{
(row.subsidytype_name)
}}</span>
</div>
</template>
<template #subsidy_day="{row,index}">
<div style="width: 100%;height: 100%;display: flex;align-items: center;">
<span
style="font-family: 楷体;color: #1e93ff;font-weight: 600;">{{ (row.subsidy_day || 0) }}天</span>
</div>
</template>
<template #subsidy_num="{row,index}">
<div style="width: 100%;height: 100%;display: flex;align-items: center;">
<span style="font-family: 楷体;color: #1e93ff;font-weight: 600;"
id="subsidy_num">{{ (row.subsidy_num || 0) }}元</span>
</div>
</template>
</Table>
</Card>
</div>
<!-- 展开卡片-->
<div class="Atext ivu-text-center">
<!-- 1收起 0展开-->
<a v-if="!!teamObjectData.length" @click="unfoldTeamCard">
<Icon v-if="unfold.State === 0" type="ios-arrow-dropdown-circle"></Icon>
<Icon v-else type="ios-arrow-dropup-circle"/>
{{ unfold.flag[unfold.State] }}
</a>
</div>
</div>
</Drawer>
</div>
</template>
<script>
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》';
import {publicState} from "@/configState";
import updateCertificateModal from './components/updateCertificateModalTeacherWorkLoad.vue'
import updateCertificateModal1 from './components/updateCertificateModalStudentGrands.vue'
import * as api from "@api/requestUtils";
import _ from "lodash";
export default {
//import引入的组件需要注入到对象中才能使用",
components: {updateCertificateModal, updateCertificateModal1},
data() {
//这里存放数据",
return {
flagObject: {},
columnsStudent: [
{
title: '教师',
minWidth: 100,
key: 'name'
},
{
title: '工号',
minWidth: 120,
key: 'card_name'
},
{
title: '身份证号',
minWidth: 180,
key: 'sfzh'
},
{
title: '教学院系',
minWidth: 150,
key: 'dept'
},
{
title: '性别',
minWidth: 80,
key: 'gender'
},
{
title: '联系电话',
minWidth: 150,
key: 'phone'
},
{
title: '教学分',
minWidth: 150,
slot: 'instructionalscore',
fixed: 'right',
},
// {
// title: '操作',
// minWidth: 80,
// slot: 'action',
// fixed: 'right'
// },
],
unfold: {
State: 0,
height: '400',
flag: ['展开', '收起'],
},
drawer: false,
drawer1: false,
drawerKeyValueArray: [],
teamObjectData: {},
Id: '',
importModal: false,
importLoading: false,
CertificateModal: false,
CertificateModal1: false,
kt: 1,
init: {
modal: {
formData: {
"workloaddeclareid": "",
"competitionsign_id": "",
"certificateid": "",
"competitionreportid": "",
"competitionname": "",
"sponsor": "",
"report_code": "",
"competitionsubitem_name": "",
"competition_level_id": "",
"competition_type_id": "",
"way": 0,
"approval_state": 0,
"approval_remark": "",
"begin_time": "",
"end_time": "",
"createtime": "",
"createby": "",
"create_name": "",
"certificate_file": "",
"is_tea": 1,
"class_hour": "",
"actual_class_hour": "",
"competitionbatchid": "",
"competitionbatch_name": "",
"is_del": 0,
"files_list": []
},
cmdDetailsModalShow: false,
cmdDetailsFormRule: {
hierarchy_id: [{type: 'string', required: true, message: '该项不能为空', trigger: 'change'}],
competitionlevel_id: [{type: 'string', required: true, message: '该项不能为空', trigger: 'change'}],
competitiontype_id: [{type: 'string', required: true, message: '该项不能为空', trigger: 'change'}],
way: [{type: 'string', required: true, message: '该项不能为空', trigger: 'change'}],
instructionalscore: [{type: 'string', required: true, message: '该项不能为空', trigger: 'blur'}],
},
cmdDetailsFormItem: [
{
id: 'competitionname',
name: '赛事名称',
type: 'input',
disabled: true,
require: false,
optList: [],
},
{
id: 'sponsor',
name: '主办单位',
type: 'input',
disabled: true,
require: false,
optList: [],
},
{
id: 'report_code',
name: '赛事编码',
type: 'input',
disabled: true,
require: false,
optList: [],
},
{
id: 'competition_level_id',
name: '赛事级别',
type: 'select',
disabled: false,
require: true,
optList: []
},
{id: 'competition_type_id', name: '类型名称', type: 'select', show: true, optList: []},
{id: 'competitionbatchid', name: '赛事批次', type: 'select', show: true, optList: []},
{
id: 'way',
name: '比赛形式',
type: 'select',
disabled: false,
require: true,
optList: [{label: '个人', value: '1'}, {label: '团队', value: '0'}, {label: '不限', value: '2'}]
},
{id: 'begin_time', name: '比赛开始时间', type: 'datetime', show: true, optList: []},
{id: 'end_time', name: '比赛结束时间', type: 'datetime', show: true, optList: []},
{
id: 'bonus_total',
name: '总奖金',
type: 'input',
disabled: true,
require: false,
optList: [],
},
{
id: 'files_list',
name: '附件',
type: 'file',
disabled: true,
require: false,
optList: [],
},
],
cmdDetailsModalLoading: false,
},
// 搜索项
searchCondList: [
{
id: 'aaa',
name: '申报类型',
type: 'select',
show: true,
optList: [
{label: '学生补助', value: 0},
{label: '教师工作量', value: 1},
]
},
{
id: 'batch',
name: '赛事批次',
type: 'select',
show: true,
optList: []
},
{
id: 'name',
name: '赛事名称',
type: 'input',
show: true,
optList: []
},
{
id: 'level',
name: '赛事级别',
type: 'select',
show: true,
optList: []
},
{
id: 'type',
name: '竞赛类别',
type: 'select',
show: true,
optList: []
},
{
id: 'way',
name: '比赛形式',
type: 'select',
show: true,
optList: [{label: '个人', value: 1}, {label: '团队', value: 0}, {label: '不限', value: 2}]
},
{
id: 'h_id',
name: '赛事奖项',
type: 'select',
show: true,
optList: []
},
{
id: 'approval_state',
name: '审批状态',
type: 'select',
show: true,
optList: [{label: '未审批', value: 0}, {label: '审批中', value: 1}, {label: '审批通过', value: 2}, {
label: '审批不通过',
value: 3
}]
},
],
search: {
"aaa": 0,
"name": "",
"level": "",
"type": "",
"batch": "",
"way": "0",
"is_tea": 0,
"approval_state": "",//0-未审批,1-审批中,2-审批通过,3-审批不通过
"h_id": "",
},
tableColumns: [
{type: 'index', title: '序号', minWidth: 80, show: true},
// {key: 'competitionbatch_name', title: '批次', minWidth: 150, show: true},
{key: 'competitionname', title: '赛事名称', minWidth: 160, show: true},
{key: 'sponsor', title: '主办单位', minWidth: 120, show: true},
{key: 'report_code', title: '赛事编码', minWidth: 120, show: true},
{key: 'competitionsubitem_name', title: '赛项名称', minWidth: 160, show: true},
{key: 'competition_level_name', title: '赛事级别', minWidth: 120, show: true},
{key: 'competition_type_name', title: '竞赛类别', minWidth: 120, show: true},
{slot: 'way', title: '比赛形式', minWidth: 120, show: true},
// {key: 'bonus_total', title: '奖金总金额', minWidth: 120, show: true},
{slot: 'approval_state', title: '审批状态', minWidth: 120, show: true},
{key: 'begin_time', title: '比赛开始时间', minWidth: 160, show: true},
{key: 'end_time', title: '比赛结束时间', minWidth: 160, show: true},
{slot: 'certificate_file', title: '附件上传', minWidth: 120, show: true},
{slot: 'actionAndDetails', title: '操作', minWidth: 180, fixed: 'right', show: true},
],
tableData: [],
tableLoading: false,
tableSize: 'default',
dataCount: 0,
page_index: 1,
page_size: 10,
},
timer: '',
};
},
//监听属性 类似于data概念",
computed: {
publicState() {
return publicState
}
},
//监控data中的数据变化",
watch: {},
//方法集合",
methods: {
viewFile(item) {
this.$refs.drawerOnlineViewFiel.viewFile(item)
},
unfoldTeamCard() {
let obj = {
'1': () => {
this.unfold.height = '400'
this.unfold.State = 0
},
'0': () => {
this.unfold.height = '3000'
this.unfold.State = 1
}
}
obj[this.unfold.State]()
},
handleSubmit() {
//提交流程
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.$refs.updateCertificateModal.handleSubmit()
}, 500)
},
save() {
//保存
this.$refs.updateCertificateModal.save()
},
handleReset() {
//重置
this.$refs.updateCertificateModal.handleReset()
},
onSubmit(obj) {
//保存教学分配置
this.hooks.myEncapsulationFunction(async () => {
this.init.modal.cmdDetailsModalLoading = true
return this.asc.postApiCommonInstructionalScoreSave(obj).then(res => {
this.getData()
this.init.modal.cmdDetailsModalShow = false
return res
}).finally(() => {
this.init.modal.cmdDetailsModalLoading = false
})
})
},
BonusConfigSave() {
//保存奖金配置
this.hooks.myEncapsulationFunction(() => {
this.asc.postApiCommonBonusConfigSave()
})
},
add() {
this.init.modal.cmdDetailsModalShow = true
this.$refs.addModal.modalInit('add', {
...this.init.modal.formData,
way: String(this.init.modal.formData.way),
money: String(this.init.modal.formData.money),
}, '新增奖金')
},
search(val) {
// 搜索
this.init.search = {...this.init.search, ...val}
this.onPageChange(1)
},
reset() {
// 重置
this.init.search = {
"aaa": 0,
"name": "",
"level": "",
"type": "",
"batch": "",
"way": "0",
"is_tea": 0,
"approval_state": "",//0-未审批,1-审批中,2-审批通过,3-审批不通过
"h_id": "",
"page_index": 1,
"page_size": 10
}
this.onPageChange(1)
},
switchChange(val, row, index) {
//是否启用
this.hooks.myEncapsulationFunction(() => {
return this.asc.getApiCommonInstructionalScoreEnable({
id: row.instructionalscoreid,
is_enable: val
}).then(res => {
if (res.code === 1) this.getData()
return res
})
})
},
TeamAndMemberSel() {
//团队信息
this.asc.getApiTeamApiTeamTeamAndMemberSelCondition({
signid: this.flagObject.competitionsign_id,
is_tea: this.init.search.aaa
}).then(res => {
this.teamObjectData = res.response.map((cur, index) => {
//遍历团队成员奖项
cur.student_list.forEach((cu, inde) => {
cu.hierarchy_id = cur.hierarchy_id
cu.hierarchy_name = cur.hierarchy_name
cu.teamFlag = true
})
return cur
})
})
// this.api.TeamAndMemberSel({signid: this.flagObject.competitionsign_id, is_tea: 0}).then(res => {
// this.teamObjectData = res.response
// })
},
async rowDetails(row) {
//详情
if (this.init.search.aaa == 1) {
this.drawer = true
let res = await this.asc.getApiWorkloadDeclareGetWorkloadDeclareInfo({id: row.workloaddeclareid})
let array = _.cloneDeep(res.response)
this.flagObject = _.cloneDeep(res.response)
this.TeamAndMemberSel()
let keyArray = [
"competitionname",
"sponsor",
"approval_state",
"begin_time",
"end_time",
"competitionsubitem_name",
"way",
"competition_type_name",
"competition_level_name",
"report_code",
'bonus_total'
]
Object.keys(array).forEach((cur, index) => {
if (!keyArray.includes(cur)) delete array[cur]
})
this.drawerKeyValueArray = Object.entries(array)
this.drawerKeyValueArray.map((cur, index) => {
let data = [
'赛事名称',
'主办单位',
'赛事编号',
'赛项名称',
'赛事级别',
'竞赛类别',
'竞赛形式',
'审批状态',
'比赛开始时间',
'比赛结束时间',
"奖金总额",
];
cur.push(data[index])
})
} else {
this.drawer1 = true
let res = await this.asc.getApiSubsidyDeclareGetSubsidyDeclareInfo({id: row.subsidydeclareid})
let array = _.cloneDeep(res.response)
this.flagObject = _.cloneDeep(res.response)
this.TeamAndMemberSel()
let keyArray = [
"competitionname",
"sponsor",
"approval_state",
"begin_time",
"end_time",
"competitionsubitem_name",
"way",
"competition_type_name",
"competition_level_name",
"report_code",
// 'subsidy_total'
]
Object.keys(array).forEach((cur, index) => {
if (!keyArray.includes(cur)) delete array[cur]
})
this.drawerKeyValueArray = Object.entries(array)
this.drawerKeyValueArray.map((cur, index) => {
let data = [
'赛事名称',
'主办单位',
'赛事编号',
'赛项名称',
'赛事级别',
'竞赛类别',
'竞赛形式',
'审批状态',
'比赛开始时间',
'比赛结束时间',
"补贴总金额",
// '证书名称',
// '获奖奖金',
// '证书描述',
// '教师证书',
// '学生证书',
// '审批意见'
];
cur.push(data[index])
})
}
},
rowEdit(row) {
//修改
// this.init.modal.cmdDetailsModalShow = true
// this.init.modal.cmdDetailsModalLoading = true
// this.asc.getApiBonusDeclareGetBonusDeclareInfo({id: row.bonusdeclareid}).then(res => {
// this.$refs.addModal.modalInit('edit', {
// ...res.response,
// way: String(res.response.way),
// }, '修改')
// }).finally(() => {
// this.init.modal.cmdDetailsModalLoading = false
// })
// if (row.approval_state === 2 || row.approval_state === 1) {
// this.$Message.warning('此项流程审批中或已审批通过,不能进行编辑!')
// } else {
// this.Id = row.workloaddeclareid
// this.CertificateModal = true
// }
if (this.init.search.aaa == 1) {
this.Id = row.workloaddeclareid
this.CertificateModal = true
} else {
this.Id = row.subsidydeclareid
this.CertificateModal1 = true
}
},
rowDelete(row) {
//删除
if (row.approval_state === 2 || row.approval_state === 1) {
this.$Message.warning('此项流程审批中或已审批通过,不能进行删除!')
} else this.hooks.myEncapsulationFunction(async () => {
return this.asc.getApiWorkloadDeclareWorkloadDeclareDel({id: row.workloaddeclareid}).then(res => {
this.getData()
return res
})
})
},
getData() {
//初始化
this.hooks.getInitListRequest(async () => {
this.init.tableLoading = true
if (this.init.search.aaa == 1) {
this.init.tableColumns = [
{type: 'index', title: '序号', minWidth: 80, show: true},
// {key: 'competitionbatch_name', title: '批次', minWidth: 150, show: true},
{key: 'competitionname', title: '赛事名称', minWidth: 160, show: true},
{key: 'sponsor', title: '主办单位', minWidth: 120, show: true},
{key: 'report_code', title: '赛事编码', minWidth: 120, show: true},
{key: 'competitionsubitem_name', title: '赛项名称', minWidth: 160, show: true},
{key: 'competition_level_name', title: '赛事级别', minWidth: 120, show: true},
{key: 'competition_type_name', title: '竞赛类别', minWidth: 120, show: true},
{slot: 'way', title: '比赛形式', minWidth: 120, show: true},
// {key: 'bonus_total', title: '奖金总金额', minWidth: 120, show: true},
{slot: 'approval_state', title: '审批状态', minWidth: 120, show: true},
{key: 'begin_time', title: '比赛开始时间', minWidth: 160, show: true},
{key: 'end_time', title: '比赛结束时间', minWidth: 160, show: true},
{slot: 'certificate_file', title: '附件上传', minWidth: 120, show: true},
{slot: 'actionAndDetails', title: '操作', minWidth: 180, fixed: 'right', show: true},
]
this.kt++
const res = await this.asc.postApiWorkloadDeclareGetWorkloadDeclareList(this.init.search)
this.init.tableData = res.response.data
this.init.dataCount = res.response.data_count
this.init.tableLoading = false
return res
} else {
this.init.tableColumns = [
{type: 'index', title: '序号', minWidth: 80, show: true},
// {key: 'competitionbatch_name', title: '批次', minWidth: 150, show: true},
{key: 'competitionname', title: '赛事名称', minWidth: 160, show: true},
{key: 'sponsor', title: '主办单位', minWidth: 120, show: true},
{key: 'report_code', title: '赛事编码', minWidth: 120, show: true},
{key: 'competitionsubitem_name', title: '赛项名称', minWidth: 160, show: true},
{key: 'competition_level_name', title: '赛事级别', minWidth: 120, show: true},
{slot: 'way', title: '比赛形式', minWidth: 120, show: true},
{key: 'subsidy_total', title: '补贴总金额', minWidth: 130, show: true},
{slot: 'approval_state', title: '审批状态', minWidth: 120, show: true},
{key: 'begin_time', title: '比赛开始时间', minWidth: 160, show: true},
{key: 'end_time', title: '比赛结束时间', minWidth: 160, show: true},
{slot: 'certificate_file', title: '附件上传', minWidth: 120, show: true},
{slot: 'actionAndDetails', title: '操作', minWidth: 180, fixed: 'right', show: true},
]
this.kt++
const res = await this.asc.postApiSubsidyDeclareGetSubsidyDeclareList(this.init.search)
this.init.tableData = res.response.data
this.init.dataCount = res.response.data_count
this.init.tableLoading = false
return res
}
})
},
// 更改页码
onPageChange(val) {
this.init.search.page_index = val
this.getData()
},
// 更改每页条数
onPageSizeChange(val) {
this.init.search.page_size = val
if (this.init.search.page_index === 1) {
this.onPageChange(1)
}
},
GetBatchBySelect() {
//获取批次
this.asc.getApiCommonGetBatchBySelect({competition_method: 1}).then(res => {
//搜索框
this.init.searchCondList.forEach(cur => {
if (cur.id === 'batch') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
this.init.modal.cmdDetailsFormItem.forEach(cur => {
//新增|编辑
if (cur.id === 'competitionbatchid') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
})
},
GetLevelBySelect() {
//获取级别下拉框
this.asc.getApiCommonGetLevelBySelect().then(res => {
this.init.searchCondList.forEach(cur => {
if (cur.id === 'level') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
this.init.modal.cmdDetailsFormItem.forEach(cur => {
if (cur.id === 'competition_level_id') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
})
},
GetTypeBySelect() {
//获取类型下拉框
this.asc.getApiCommonGetTypeBySelect().then(res => {
this.init.searchCondList.forEach(cur => {
if (cur.id === 'type') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
this.init.modal.cmdDetailsFormItem.forEach(cur => {
if (cur.id === 'competition_type_id') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
})
},
GetHierarchySelect() {
//获取赛项等级下拉框
this.asc.getApiCommonGetHierarchySelect().then(res => {
this.init.searchCondList.forEach(cur => {
if (cur.id === 'h_id') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
this.init.modal.cmdDetailsFormItem.forEach(cur => {
if (cur.id === 'hierarchy_id') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
})
},
},
//生命周期 - 创建之前",数据模型未加载,方法未加载,html模板未加载
beforeCreate() {
},
//生命周期 - 创建完成(可以访问当前this实例)",数据模型已加载,方法已加载,html模板已加载,html模板未渲染
created() {
},
//生命周期 - 挂载之前",html模板未渲染
beforeMount() {
},
//生命周期 - 挂载完成(可以访问DOM元素)",html模板已渲染
mounted() {
this.getData()
this.GetLevelBySelect()
this.GetTypeBySelect()
this.GetHierarchySelect()
this.GetBatchBySelect()
},
//生命周期 - 更新之前",数据模型已更新,html模板未更新
beforeUpdate() {
},
//生命周期 - 更新之后",数据模型已更新,html模板已更新
updated() {
},
//生命周期 - 销毁之前",
beforeDestroy() {
},
destroyed() {
},
//生命周期 - 销毁完成",
//如果页面有keep-alive缓存功能,这个函数会触发",
activated() {
},
}
</script>
<style lang="less" scoped>
.tableList {
display: flex;
justify-content: center;
flex-wrap: wrap;
.container1 {
border-collapse: collapse;
.row {
width: 100%;
height: 100%;
}
.colTitle {
text-align: center;
width: 200px;
height: 50px;
}
.colContent {
width: 500px;
height: 50px;
text-align: center;
}
}
}
.Atext {
margin-bottom: 0.7vw;
margin-top: 0.7vw;
font-size: 16px
}
.teamCardExtraText {
font-size: 18px;
font-weight: 600;
font-family: 宋体;
color: #1e93ff;
}
</style>
<!--教学分-->
<!--奖金-->
<template>
<div>
<card>
<!-- 搜索框-->
<cs-search-cond-form
:searchCondList="init.searchCondList"
:labelWidth="120"
@onSubmit="search"
@onReset="reset"
></cs-search-cond-form>
<cs-c-table
:buttonAuzhorization="true"
:tableColumns="init.tableColumns.filter(a => a.show)"
:tableData="init.tableData"
:tableLoading="init.tableLoading"
:tableSize="init.tableSize"
:dataCount="init.dataCount"
:pageIndex="init.page_index"
:pageSize="init.page_size"
@switchChange="switchChange"
@onPageChange="onPageChange"
@onPageSizeChange="onPageSizeChange"
@rowDetails="rowDetails"
@rowEdit="rowEdit"
@rowDelete="rowDelete"
>
<template #approval_state="{row}">
<Tag :color="publicState.flowApprovalState.color[row.approval_state]">{{
publicState.flowApprovalState[row.approval_state]
}}
</Tag>
</template>
<template #way="{row}">
<Tag :color="publicState.tag[row.way]">{{ ['团队', '个人', '不限'][row.way] }}</Tag>
</template>
<template #certificate_file="{row}">
{{ row.certificate_file }}
</template>
</cs-c-table>
</card>
<Modal
v-model="CertificateModal"
title="修改"
width="50"
:styles="{top:'10px'}"
>
<div style=" display: flex;justify-content: space-around;">
<updateCertificateModal @getData="getData" ref="updateCertificateModal" v-if="CertificateModal"
:winningMaterialId="Id"
></updateCertificateModal>
</div>
<template #footer>
<div style="display: flex;justify-content: center">
<cs-button :disabled="true" ref="load" type="primary" cs-style="width: 12vw;margin-right:10px;"
cs-text="提交流程"
:cs-click="handleSubmit"
></cs-button>
<Button type="primary" @click="save" style="width: 12vw">保存</Button>
<Button @click="handleReset" style="margin-left: 8px;width: 12vw;">重置</Button>
</div>
<!-- <Button type="text" @click="CertificateModal =false">关闭</Button>-->
<!-- <Button type="primary" @click="importOk">确定</Button>-->
</template>
</Modal>
<Modal
v-model="CertificateModal1"
title="修改"
width="50"
:styles="{top:'10px'}"
>
<div style=" display: flex;justify-content: space-around;">
<updateCertificateModal1 @getData="getData" ref="updateCertificateModal1" v-if="CertificateModal1"
:winningMaterialId="Id"
></updateCertificateModal1>
</div>
<template #footer>
<div style="display: flex;justify-content: center">
<cs-button :disabled="true" ref="load" type="primary" cs-style="width: 12vw;margin-right:10px;"
cs-text="提交流程"
:cs-click="handleSubmit"
></cs-button>
<Button type="primary" @click="save" style="width: 12vw">保存</Button>
<Button @click="handleReset" style="margin-left: 8px;width: 12vw;">重置</Button>
</div>
<!-- <Button type="text" @click="CertificateModal =false">关闭</Button>-->
<!-- <Button type="primary" @click="importOk">确定</Button>-->
</template>
</Modal>
<Drawer :width="800" title="详细" :closable="true" v-model="drawer">
<div class="tableList">
<h1 style="display: flex;justify-content: center">教师奖励</h1>
<table border="1" class="container1">
<tr class="row" v-for="(item,index) in drawerKeyValueArray" :key="index">
<th v-if="item[0]==='level'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='level'" class="colContent">{{ ['国家级', '省一级', '省二级'][item[1]] }}</td>
<th v-if="item[0]==='competition_level_id'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='competition_level_id'" class="colContent">
{{ ['', '国家级', '省一级', '省二级', '国际级'][item[1]] }}
</td>
<th v-if="item[0]==='approval_state'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='approval_state'" class="colContent">
{{ ['未审批', '审批中', '审批通过', '审批不通过'][item[1]] }}
</td>
<th v-if="item[0]==='competition_type_id'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='competition_type_id'" class="colContent">
{{ ['', 'A类', 'B类'][item[1]] }}
</td>
<th v-if="item[0]==='way'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='way'" class="colContent">
{{ ['团队', '个人'][item[1]] }}
</td>
<th v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level' &&item[0]!=='competition_level_id'&& item[0]!=='way'&& item[0]!=='approval_state'"
class="colTitle">{{
item[2]
}}
</th>
<td v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level'&&item[0]!=='competition_level_id' && item[0]!=='way'&& item[0]!=='approval_state'"
class="colContent">{{
item[1]
}}
</td>
<th v-if="item[0]==='teacherExcellenceFileList'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='teacherExcellenceFileList'" class="colContent">
<a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"
v-for="(ite,inde) in item[1]"
:key="inde">
{{ ite.file_name }}
</a>
</td>
<th v-if="item[0]==='studentExcellenceFileList'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='studentExcellenceFileList'" class="colContent">
<a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"
v-for="(ite,inde) in item[1]"
:key="inde">
{{ ite.file_name }}
</a>
</td>
</tr>
<tr>
<th>附件</th>
<td class="colContent">
<!-- :href="ite.path"-->
<a class="aText" style="display: flex;flex-wrap: wrap;justify-content: center" @click="viewFile(ite)"
v-for="(ite,inde) in flagObject.files_list"
:key="inde">
{{ ite.file_name }}
</a>
</td>
</tr>
</table>
<div :style="` max-height:${unfold.height}px;overflow-y: hidden;`">
<div v-if="!!teamObjectData.length" style=" width: 100%;height: 5vh;display: flex;align-items: center;">
<h3>(团队信息)获奖信息:</h3>
<h3 style="margin-left: auto; color: #1e93ff;font-family: 楷体;font-size: 20px;">奖金总金额:
<span>{{
flagObject.bonus_total
}}</span></h3>
</div>
<!-- 团队卡片-->
<Card style="margin:0.5vw " v-for="(item,index) in teamObjectData" :key="index">
<template #title>
<h3>{{
item.teanname
}}(
参赛教师
<span style="color: #1e93ff">{{ item.student_list.length }}</span>
位);
<span>可分配奖金<span style="color: #1e93ff;">{{
(item.allot_money_teacher || 0)
}}元</span></span>
</h3>
</template>
<template #extra>
<div class="teamCardExtraText">{{ item.hierarchy_name }}</div>
</template>
<Table v-if="!!item.student_list.length" :columns="columnsStudent" :data="item.student_list">
<template #bonus="{row,index}">
<div style="width: 100%;height: 100%;display: flex;align-items: center;">
<span
style="font-family: 楷体;color: #1e93ff;font-weight: 600;">{{ (row.bonus || 0) }}元</span>
</div>
</template>
</Table>
</Card>
</div>
<!-- 展开卡片-->
<div class="Atext ivu-text-center">
<!-- 1收起 0展开-->
<a v-if="!!teamObjectData.length" @click="unfoldTeamCard">
<Icon v-if="unfold.State === 0" type="ios-arrow-dropdown-circle"></Icon>
<Icon v-else type="ios-arrow-dropup-circle"/>
{{ unfold.flag[unfold.State] }}
</a>
</div>
</div>
</Drawer>
<!-- 在线预览附件 -->
<drawerOnlineViewFiel ref="drawerOnlineViewFiel" :file_list="flagObject.files_list"></drawerOnlineViewFiel>
<Drawer :width="800" title="详细" :closable="true" v-model="drawer1">
<div class="tableList">
<h1 style="display: flex;justify-content: center">学生奖励</h1>
<table border="1" class="container1">
<tr class="row" v-for="(item,index) in drawerKeyValueArray" :key="index">
<th v-if="item[0]==='level'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='level'" class="colContent">{{ ['国家级', '省一级', '省二级'][item[1]] }}</td>
<th v-if="item[0]==='competition_level_id'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='competition_level_id'" class="colContent">
{{ ['', '国家级', '省一级', '省二级', '国际级'][item[1]] }}
</td>
<th v-if="item[0]==='approval_state'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='approval_state'" class="colContent">
{{ ['未审批', '审批中', '审批通过', '审批不通过'][item[1]] }}
</td>
<th v-if="item[0]==='competition_type_id'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='competition_type_id'" class="colContent">
{{ ['', 'A类', 'B类'][item[1]] }}
</td>
<th v-if="item[0]==='way'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='way'" class="colContent">
{{ ['团队', '个人'][item[1]] }}
</td>
<th v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level' &&item[0]!=='competition_level_id'&& item[0]!=='way'&& item[0]!=='approval_state'"
class="colTitle">{{
item[2]
}}
</th>
<td v-if="item[0]!=='studentExcellenceFileList'&&item[0]!=='StudentExcellence'&&item[0]!=='teacherExcellenceFileList'&&item[0]!=='competition_type_id'&&item[0]!=='team_id'&&item[0]!=='level'&&item[0]!=='competition_level_id' && item[0]!=='way'&& item[0]!=='approval_state'"
class="colContent">{{
item[1]
}}
</td>
<th v-if="item[0]==='teacherExcellenceFileList'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='teacherExcellenceFileList'" class="colContent">
<a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"
v-for="(ite,inde) in item[1]"
:key="inde">
{{ ite.file_name }}
</a>
</td>
<th v-if="item[0]==='studentExcellenceFileList'" class="colTitle">{{ item[2] }}</th>
<td v-if="item[0]==='studentExcellenceFileList'" class="colContent">
<a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"
v-for="(ite,inde) in item[1]"
:key="inde">
{{ ite.file_name }}
</a>
</td>
</tr>
<tr>
<th>附件</th>
<td class="colContent">
<!-- :href="ite.path"-->
<a class="aText" style="display: flex;flex-wrap: wrap;justify-content: center" @click="viewFile(ite)"
v-for="(ite,inde) in flagObject.files_list"
:key="inde">
{{ ite.file_name }}
</a>
</td>
</tr>
</table>
<div :style="` max-height:${unfold.height}px;overflow-y: hidden;`">
<div v-if="!!teamObjectData.length" style=" width: 100%;height: 5vh;display: flex;align-items: center;">
<h3>(团队信息)获奖信息:</h3>
<h3 style="margin-left: auto; color: #1e93ff;font-family: 楷体;font-size: 20px;">奖金总金额:
<span>{{
flagObject.bonus_total
}}</span></h3>
</div>
<!-- 团队卡片-->
<Card style="margin:0.5vw " v-for="(item,index) in teamObjectData" :key="index">
<template #title>
<h3>{{
item.teanname
}}(
参赛学生
<span style="color: #1e93ff">{{ item.student_list.length }}</span>
位);
<span>可分配奖金<span style="color: #1e93ff;">{{
(item.allot_money || 0)
}}元</span></span>
</h3>
</template>
<template #extra>
<div class="teamCardExtraText">{{ item.hierarchy_name }}</div>
</template>
<Table v-if="!!item.student_list.length" :columns="columnsStudent" :data="item.student_list">
<template #bonus="{row,index}">
<div style="width: 100%;height: 100%;display: flex;align-items: center;">
<span
style="font-family: 楷体;color: #1e93ff;font-weight: 600;">{{ (row.bonus || 0) }}元</span>
</div>
</template>
</Table>
</Card>
</div>
<!-- 展开卡片-->
<div class="Atext ivu-text-center">
<!-- 1收起 0展开-->
<a v-if="!!teamObjectData.length" @click="unfoldTeamCard">
<Icon v-if="unfold.State === 0" type="ios-arrow-dropdown-circle"></Icon>
<Icon v-else type="ios-arrow-dropup-circle"/>
{{ unfold.flag[unfold.State] }}
</a>
</div>
</div>
</Drawer>
</div>
</template>
<script>
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》';
import {publicState} from "@/configState";
import updateCertificateModal from './components/updateCertificateModalTeacherAward.vue'
import updateCertificateModal1 from './components/updateCertificateModalStudentAward.vue'
import * as api from "@api/requestUtils";
import _ from "lodash";
export default {
//import引入的组件需要注入到对象中才能使用",
components: {updateCertificateModal, updateCertificateModal1},
data() {
//这里存放数据",
return {
flagObject: {},
columnsStudent: [
{
title: '教师',
minWidth: 100,
key: 'name'
},
{
title: '工号',
minWidth: 120,
key: 'card_name'
},
{
title: '身份证号',
minWidth: 180,
key: 'sfzh'
},
{
title: '教学院系',
minWidth: 150,
key: 'dept'
},
{
title: '性别',
minWidth: 80,
key: 'gender'
},
{
title: '联系电话',
minWidth: 150,
key: 'phone'
},
{
title: '赛事奖项',
minWidth: 80,
key: 'hierarchy_name',
fixed: 'right'
},
{
title: '奖励金额',
minWidth: 150,
slot: 'bonus',
fixed: 'right',
},
// {
// title: '操作',
// minWidth: 80,
// slot: 'action',
// fixed: 'right'
// },
],
unfold: {
State: 0,
height: '400',
flag: ['展开', '收起'],
},
drawer: false,
drawer1: false,
drawerKeyValueArray: [],
teamObjectData: {},
Id: '',
importModal: false,
importLoading: false,
CertificateModal: false,
CertificateModal1: false,
init: {
modal: {
formData: {
"bonusdeclareid": "",
"competitionsign_id": "",
"certificateid": "",
"competitionreportid": "",
"competitionname": "",
"sponsor": "",
"report_code": "",
"competitionsubitem_name": "",
"competition_level_id": "",
"competition_type_id": "",
"way": 0,
"approval_state": 0,
"approval_remark": "",
"begin_time": "",
"end_time": "",
"createtime": "",
"createby": "",
"create_name": "",
"certificate_file": "",
"is_tea": 1,
"bonus_total": 0,
"competitionbatchid": "",
"competitionbatch_name": "",
"is_del": 0,
"files_list": []
},
cmdDetailsModalShow: false,
cmdDetailsFormRule: {
hierarchy_id: [{type: 'string', required: true, message: '该项不能为空', trigger: 'change'}],
competitionlevel_id: [{type: 'string', required: true, message: '该项不能为空', trigger: 'change'}],
competitiontype_id: [{type: 'string', required: true, message: '该项不能为空', trigger: 'change'}],
way: [{type: 'string', required: true, message: '该项不能为空', trigger: 'change'}],
instructionalscore: [{type: 'string', required: true, message: '该项不能为空', trigger: 'blur'}],
},
cmdDetailsFormItem: [
{
id: 'competitionname',
name: '赛事名称',
type: 'input',
disabled: true,
require: false,
optList: [],
},
{
id: 'sponsor',
name: '主办单位',
type: 'input',
disabled: true,
require: false,
optList: [],
},
{
id: 'report_code',
name: '赛事编码',
type: 'input',
disabled: true,
require: false,
optList: [],
},
{
id: 'competition_level_id',
name: '赛事级别',
type: 'select',
disabled: false,
require: true,
optList: []
},
{id: 'competition_type_id', name: '类型名称', type: 'select', show: true, optList: []},
{id: 'competitionbatchid', name: '赛事批次', type: 'select', show: true, optList: []},
{
id: 'way',
name: '比赛形式',
type: 'select',
disabled: false,
require: true,
optList: [{label: '个人', value: '1'}, {label: '团队', value: '0'}, {label: '不限', value: '2'}]
},
{id: 'begin_time', name: '比赛开始时间', type: 'datetime', show: true, optList: []},
{id: 'end_time', name: '比赛结束时间', type: 'datetime', show: true, optList: []},
{
id: 'bonus_total',
name: '总奖金',
type: 'input',
disabled: true,
require: false,
optList: [],
},
{
id: 'files_list',
name: '附件',
type: 'file',
disabled: true,
require: false,
optList: [],
},
],
cmdDetailsModalLoading: false,
},
// 搜索项
searchCondList: [
{
id: 'aaa',
name: '奖励类型',
type: 'select',
show: true,
optList: [
{label: '教师奖励', value: 1},
{label: '学生奖励', value: 0},
]
},
{
id: 'batch',
name: '赛事批次',
type: 'select',
show: true,
optList: []
},
{
id: 'name',
name: '赛事名称',
type: 'input',
show: true,
optList: []
},
{
id: 'level',
name: '赛事级别',
type: 'select',
show: true,
optList: []
},
{
id: 'type',
name: '竞赛类别',
type: 'select',
show: true,
optList: []
},
{
id: 'way',
name: '比赛形式',
type: 'select',
show: true,
optList: [{label: '个人', value: 1}, {label: '团队', value: 0}, {label: '不限', value: 2}]
},
{
id: 'h_id',
name: '赛事奖项',
type: 'select',
show: true,
optList: []
},
{
id: 'approval_state',
name: '审批状态',
type: 'select',
show: true,
optList: [{label: '未审批', value: 0}, {label: '审批中', value: 1}, {label: '审批通过', value: 2}, {
label: '审批不通过',
value: 3
}]
},
],
search: {
"aaa": 1,
"name": "",
"level": "",
"type": "",
"batch": "",
"way": "0",
"is_tea": 1,
"approval_state": "",//0-未审批,1-审批中,2-审批通过,3-审批不通过
"h_id": "",
},
tableColumns: [
{type: 'index', title: '序号', minWidth: 80, show: true},
// {key: 'competitionbatch_name', title: '批次', minWidth: 150, show: true},
{key: 'competitionname', title: '赛事名称', minWidth: 160, show: true},
{key: 'sponsor', title: '主办单位', minWidth: 120, show: true},
{key: 'report_code', title: '赛事编码', minWidth: 120, show: true},
{key: 'competitionsubitem_name', title: '赛项名称', minWidth: 160, show: true},
{key: 'competition_level_name', title: '赛事级别', minWidth: 120, show: true},
{key: 'competition_type_name', title: '竞赛类别', minWidth: 120, show: true},
{slot: 'way', title: '比赛形式', minWidth: 120, show: true},
{key: 'bonus_total', title: '奖金总金额', minWidth: 120, show: true},
{slot: 'approval_state', title: '审批状态', minWidth: 120, show: true},
{key: 'begin_time', title: '比赛开始时间', minWidth: 160, show: true},
{key: 'end_time', title: '比赛结束时间', minWidth: 160, show: true},
{slot: 'certificate_file', title: '附件上传', minWidth: 120, show: true},
{slot: 'actionAndDetails', title: '操作', minWidth: 180, fixed: 'right', show: true},
],
tableData: [],
tableLoading: false,
tableSize: 'default',
dataCount: 0,
page_index: 1,
page_size: 10,
},
timer: '',
};
},
//监听属性 类似于data概念",
computed: {
publicState() {
return publicState
}
},
//监控data中的数据变化",
watch: {},
//方法集合",
methods: {
viewFile(item) {
this.$refs.drawerOnlineViewFiel.viewFile(item)
},
unfoldTeamCard() {
let obj = {
'1': () => {
this.unfold.height = '400'
this.unfold.State = 0
},
'0': () => {
this.unfold.height = '3000'
this.unfold.State = 1
}
}
obj[this.unfold.State]()
},
handleSubmit() {
//提交流程
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.$refs.updateCertificateModal.handleSubmit()
}, 500)
},
save() {
//保存
this.$refs.updateCertificateModal.save()
},
handleReset() {
//重置
this.$refs.updateCertificateModal.handleReset()
},
onSubmit(obj) {
//保存教学分配置
this.hooks.myEncapsulationFunction(async () => {
this.init.modal.cmdDetailsModalLoading = true
return this.asc.postApiCommonInstructionalScoreSave(obj).then(res => {
this.getData()
this.init.modal.cmdDetailsModalShow = false
return res
}).finally(() => {
this.init.modal.cmdDetailsModalLoading = false
})
})
},
BonusConfigSave() {
//保存奖金配置
this.hooks.myEncapsulationFunction(() => {
this.asc.postApiCommonBonusConfigSave()
})
},
add() {
this.init.modal.cmdDetailsModalShow = true
this.$refs.addModal.modalInit('add', {
...this.init.modal.formData,
way: String(this.init.modal.formData.way),
money: String(this.init.modal.formData.money),
}, '新增奖金')
},
search(val) {
// 搜索
this.init.search = {...this.init.search, ...val, is_tea: val.aaa}
this.onPageChange(1)
},
reset() {
// 重置
this.init.search = {
"aaa": 1,
"name": "",
"level": "",
"type": "",
"batch": "",
"way": "0",
"is_tea": 1,
"approval_state": "",//0-未审批,1-审批中,2-审批通过,3-审批不通过
"h_id": "",
"page_index": 1,
"page_size": 10
}
this.onPageChange(1)
},
switchChange(val, row, index) {
//是否启用
this.hooks.myEncapsulationFunction(() => {
return this.asc.getApiCommonInstructionalScoreEnable({
id: row.instructionalscoreid,
is_enable: val
}).then(res => {
if (res.code === 1) this.getData()
return res
})
})
},
TeamAndMemberSel() {
//团队信息
this.asc.getApiTeamApiTeamTeamAndMemberSelCondition({
signid: this.flagObject.competitionsign_id,
is_tea: 1
}).then(res => {
this.teamObjectData = res.response.map((cur, index) => {
//遍历团队成员奖项
cur.student_list.forEach((cu, inde) => {
cu.hierarchy_id = cur.hierarchy_id
cu.hierarchy_name = cur.hierarchy_name
cu.teamFlag = true
})
return cur
})
})
// this.api.TeamAndMemberSel({signid: this.flagObject.competitionsign_id, is_tea: 0}).then(res => {
// this.teamObjectData = res.response
// })
},
async rowDetails(row) {
if (this.init.search.aaa == 1) {
//详情
this.drawer = true
// TeamAndMemberSelCondition
let res = await this.asc.getApiBonusDeclareGetBonusDeclareInfo({id: row.bonusdeclareid})
// let res = await api.GetCertificateInfo({id: row.certificateid})
let array = _.cloneDeep(res.response)
this.flagObject = _.cloneDeep(res.response)
this.TeamAndMemberSel()
let keyArray = [
"competitionname",
"sponsor",
"approval_state",
"begin_time",
"end_time",
"competitionsubitem_name",
"way",
"competition_type_name",
"competition_level_name",
"report_code",
'bonus_total'
]
Object.keys(array).forEach((cur, index) => {
if (!keyArray.includes(cur)) delete array[cur]
})
this.drawerKeyValueArray = Object.entries(array)
this.drawerKeyValueArray.map((cur, index) => {
let data = [
'赛事名称',
'主办单位',
'赛事编号',
'赛项名称',
'赛事级别',
'竞赛类别',
'竞赛形式',
'审批状态',
'比赛开始时间',
'比赛结束时间',
"奖金总额",
// '证书名称',
// '获奖奖金',
// '证书描述',
// '教师证书',
// '学生证书',
// '审批意见'
];
cur.push(data[index])
})
} else {
//详情
this.drawer1 = true
// TeamAndMemberSelCondition
let res = await this.asc.getApiBonusDeclareGetBonusDeclareInfo({id: row.bonusdeclareid})
// let res = await api.GetCertificateInfo({id: row.certificateid})
let array = _.cloneDeep(res.response)
this.flagObject = _.cloneDeep(res.response)
this.TeamAndMemberSel()
let keyArray = [
"competitionname",
"sponsor",
"approval_state",
"begin_time",
"end_time",
"competitionsubitem_name",
"way",
"competition_type_name",
"competition_level_name",
"report_code",
'bonus_total'
]
Object.keys(array).forEach((cur, index) => {
if (!keyArray.includes(cur)) delete array[cur]
})
this.drawerKeyValueArray = Object.entries(array)
this.drawerKeyValueArray.map((cur, index) => {
let data = [
'赛事名称',
'主办单位',
'赛事编号',
'赛项名称',
'赛事级别',
'竞赛类别',
'竞赛形式',
'审批状态',
'比赛开始时间',
'比赛结束时间',
"奖金总额",
// '证书名称',
// '获奖奖金',
// '证书描述',
// '教师证书',
// '学生证书',
// '审批意见'
];
cur.push(data[index])
})
}
},
rowEdit(row) {
//修改
// this.init.modal.cmdDetailsModalShow = true
// this.init.modal.cmdDetailsModalLoading = true
// this.asc.getApiBonusDeclareGetBonusDeclareInfo({id: row.bonusdeclareid}).then(res => {
// this.$refs.addModal.modalInit('edit', {
// ...res.response,
// way: String(res.response.way),
// }, '修改')
// }).finally(() => {
// this.init.modal.cmdDetailsModalLoading = false
// })
// if (row.approval_state === 2 || row.approval_state === 0) {
// this.Id = row.bonusdeclareid
// this.CertificateModal = true
// } else {
// this.$Message.warning('此项流程未审批通过,不能进行编辑!')
// }
this.Id = row.bonusdeclareid
if (this.init.search.aaa == 1) this.CertificateModal = true
else this.CertificateModal1 = true
},
rowDelete(row) {
//删除
if (row.approval_state === 2 || row.approval_state === 1) {
this.$Message.warning('此项流程审批中或已审批通过,不能进行删除!')
} else this.hooks.myEncapsulationFunction(async () => {
return this.asc.getApiBonusDeclareBonusDeclareDel({id: row.bonusdeclareid, is_del: 1}).then(res => {
this.getData()
return res
})
})
},
getData() {
//初始化
this.hooks.getInitListRequest(async () => {
this.init.tableLoading = true
const res = await this.asc.postApiBonusDeclareGetBonusDeclareList(this.init.search)
this.init.tableData = res.response.data
this.init.dataCount = res.response.data_count
this.init.tableLoading = false
return res
})
},
// 更改页码
onPageChange(val) {
this.init.search.page_index = val
this.getData()
},
// 更改每页条数
onPageSizeChange(val) {
this.init.search.page_size = val
if (this.init.search.page_index === 1) {
this.onPageChange(1)
}
},
GetBatchBySelect() {
//获取批次
this.asc.getApiCommonGetBatchBySelect({competition_method: 1}).then(res => {
//搜索框
this.init.searchCondList.forEach(cur => {
if (cur.id === 'batch') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
this.init.modal.cmdDetailsFormItem.forEach(cur => {
//新增|编辑
if (cur.id === 'competitionbatchid') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
})
},
GetLevelBySelect() {
//获取级别下拉框
this.asc.getApiCommonGetLevelBySelect().then(res => {
this.init.searchCondList.forEach(cur => {
if (cur.id === 'level') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
this.init.modal.cmdDetailsFormItem.forEach(cur => {
if (cur.id === 'competition_level_id') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
})
},
GetTypeBySelect() {
//获取类型下拉框
this.asc.getApiCommonGetTypeBySelect().then(res => {
this.init.searchCondList.forEach(cur => {
if (cur.id === 'type') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
this.init.modal.cmdDetailsFormItem.forEach(cur => {
if (cur.id === 'competition_type_id') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
})
},
GetHierarchySelect() {
//获取赛项等级下拉框
this.asc.getApiCommonGetHierarchySelect().then(res => {
this.init.searchCondList.forEach(cur => {
if (cur.id === 'h_id') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
this.init.modal.cmdDetailsFormItem.forEach(cur => {
if (cur.id === 'hierarchy_id') cur.optList = res.response.map((cur, index) => {
return {
value: cur.id,
label: cur.name,
}
})
})
})
},
},
//生命周期 - 创建之前",数据模型未加载,方法未加载,html模板未加载
beforeCreate() {
},
//生命周期 - 创建完成(可以访问当前this实例)",数据模型已加载,方法已加载,html模板已加载,html模板未渲染
created() {
},
//生命周期 - 挂载之前",html模板未渲染
beforeMount() {
},
//生命周期 - 挂载完成(可以访问DOM元素)",html模板已渲染
mounted() {
this.getData()
this.GetLevelBySelect()
this.GetTypeBySelect()
this.GetHierarchySelect()
this.GetBatchBySelect()
},
//生命周期 - 更新之前",数据模型已更新,html模板未更新
beforeUpdate() {
},
//生命周期 - 更新之后",数据模型已更新,html模板已更新
updated() {
},
//生命周期 - 销毁之前",
beforeDestroy() {
},
destroyed() {
},
//生命周期 - 销毁完成",
//如果页面有keep-alive缓存功能,这个函数会触发",
activated() {
},
}
</script>
<style lang="less" scoped>
.tableList {
display: flex;
justify-content: center;
flex-wrap: wrap;
.container1 {
border-collapse: collapse;
.row {
width: 100%;
height: 100%;
}
.colTitle {
text-align: center;
width: 200px;
height: 50px;
}
.colContent {
width: 500px;
height: 50px;
text-align: center;
}
}
}
.Atext {
margin-bottom: 0.7vw;
margin-top: 0.7vw;
font-size: 16px
}
.teamCardExtraText {
font-size: 18px;
font-weight: 600;
font-family: 宋体;
color: #1e93ff;
}
</style>
......@@ -67,7 +67,6 @@
<template #is_succeed="{row}">
<tag :color="['','error','success'][row.is_succeed]"> {{ ['', '失败', '成功'][row.is_succeed] }}</tag>
</template>
<template #messageinfo="{row}">
<Ellipsis :text="row.messageinfo" :height="60" tooltip transfer/>
</template>
......@@ -77,7 +76,6 @@
<template #remark="{row}">
<Ellipsis :text="row.remark" :height="60" tooltip transfer/>
</template>
</Table>
<div style="height: 60px;display: flex;align-items: center;">
<Page
......@@ -225,14 +223,12 @@ export default {
{
title: '链接',
slot: 'meg_link',
show: true,
minWidth: 250,
},
{
title: '失败原因',
slot: 'remark',
show: true,
minWidth: 250,
},
......
......@@ -117,6 +117,7 @@ service.interceptors.response.use(
// errorCreate(`[ code: xxx ] ${dataAxios.msg}: ${response.config.url}`);
// break;
default:
Message.destroy()
// 不是正确的 code
// errorCreate(`${dataAxios.msg_detail}: ${response.config.url}`);
errorCreate(`${dataAxios.msg_detail}`);
......
......@@ -63,6 +63,26 @@ export default {
},
component: () => import('@/pages/competitionCount/listOfCollegeGrants.vue')
},
{
path: `reportWorkloadAndSubsidy`,
name: `reportWorkloadAndSubsidy`,
meta: {
...meta,
title: '成绩申报(测试)',
closable: false
},
component: () => import('@/pages/competitionCount/reportWorkloadAndSubsidy.vue')
},
{
path: `rewardForTeachersAndStudents`,
name: `rewardForTeachersAndStudents`,
meta: {
...meta,
title: '师生奖励(测试)',
closable: false
},
component: () => import('@/pages/competitionCount/rewardForTeachersAndStudents.vue')
},
]
};
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或