parent
8c50fa0e1b
commit
40890d93b5
@ -0,0 +1,227 @@
|
|||||||
|
<template>
|
||||||
|
<div class="school-calendar-search-div">
|
||||||
|
<div class="search-div">
|
||||||
|
<span style="margin-right: 1rem">学期</span>
|
||||||
|
<a-select :value="calendarId" style="width: 200px" @change="termChange">
|
||||||
|
<a-select-option v-for="item in termList" :key="item.calendar_id">
|
||||||
|
{{item.cycle_name}}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</div>
|
||||||
|
<div class="data-list-content-div">
|
||||||
|
<vue-scroll v-if="!isLoading && dataList.length > 0" :ops="listScroll" style="height:25rem">
|
||||||
|
<div class="calendar-row-div" v-for="item in dataList" :key="item.detail_id">
|
||||||
|
<div class="step-line-div">
|
||||||
|
<div class="step-icon-out-div">
|
||||||
|
<div class="step-icon-in-div"></div>
|
||||||
|
</div>
|
||||||
|
<div class="step-line-div"></div>
|
||||||
|
</div>
|
||||||
|
<div class="row-content-div">
|
||||||
|
<div class="content-div">
|
||||||
|
<div class="item-row" :title="item.detail_time">{{item.detail_time}}</div>
|
||||||
|
<div class="item-row" :title="item.detail_content">{{item.detail_content}}</div>
|
||||||
|
<div class="item-row" :title="item.detail_target">{{'对象:' + item.detail_target}}</div>
|
||||||
|
<div class="item-row" :title="item.leader_name">{{'负责人:' + item.leader_name}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="show-more-div">
|
||||||
|
<span v-if="!showMoreLoading && pageNumber < totalPage" v-on:click="showMore" style="color: #31a8fa;cursor: pointer">查看更多>></span>
|
||||||
|
<span v-if="showMoreLoading"><a-spin/></span>
|
||||||
|
<span v-if="pageNumber == totalPage" style="color: rgba(0, 0, 0, 0.45)">无更多数据~</span>
|
||||||
|
</div>
|
||||||
|
</vue-scroll>
|
||||||
|
<div v-if="isLoading" class="show-loading-div">
|
||||||
|
<a-spin/>
|
||||||
|
</div>
|
||||||
|
<div v-if="!isLoading && dataList.length == 0" class="show-loading-div">
|
||||||
|
<a-empty/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import InterConfig from './interConfig';
|
||||||
|
import {Select, Spin, Empty} from 'ant-design-vue';
|
||||||
|
export default{
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
listScroll: this.StaticParams.scrollOption,
|
||||||
|
isLoading: true,
|
||||||
|
showMoreLoading:false,
|
||||||
|
calendarId: "",//校历ID
|
||||||
|
termList: [],//学期列表
|
||||||
|
dataList: [],//数据列表
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 5,
|
||||||
|
totalPage: 0,
|
||||||
|
totalRow: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
this.getSchoolCalendarList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//获取校历数据
|
||||||
|
getSchoolCalendarList: function () {
|
||||||
|
let dataList = this.dataList;
|
||||||
|
let params = {
|
||||||
|
org_id: this.BaseConfig.person_info_my.bureau_id,
|
||||||
|
calendar_type: 1,
|
||||||
|
calendar_id: this.calendarId,
|
||||||
|
page_number: this.pageNumber,
|
||||||
|
page_size: this.pageSize
|
||||||
|
}
|
||||||
|
//this.isLoading = true;
|
||||||
|
this.showMoreLoading = true;
|
||||||
|
this.InterfaceConfig.callInterface([{
|
||||||
|
url: InterConfig.viewSchoolCalendar.url,
|
||||||
|
params: params,
|
||||||
|
method: InterConfig.viewSchoolCalendar.method,
|
||||||
|
isTestLogin: InterConfig.viewSchoolCalendar.isTestLogin,
|
||||||
|
}], (result) => {
|
||||||
|
this.isLoading = false;
|
||||||
|
this.showMoreLoading = false;
|
||||||
|
if (result[0].data.code === 2000) {
|
||||||
|
let resObj = result[0].data.data;
|
||||||
|
this.calendarId = resObj.now_calendar_id ? parseInt(resObj.now_calendar_id) : "";
|
||||||
|
this.termList = resObj.calendar_list;
|
||||||
|
this.dataList = dataList.concat(resObj.list);
|
||||||
|
this.totalPage = resObj.total_page;
|
||||||
|
this.totalRow = resObj.total_row;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
termChange: function (value) {
|
||||||
|
if (this.calendarId != value) {
|
||||||
|
this.calendarId = value;
|
||||||
|
this.dataList = [];
|
||||||
|
this.isLoading = true;
|
||||||
|
this.pageNumber = 1;
|
||||||
|
this.getSchoolCalendarList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showMore: function () {
|
||||||
|
this.pageNumber += 1;
|
||||||
|
this.getSchoolCalendarList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
ASelect: Select,
|
||||||
|
ASelectOption: Select.Option,
|
||||||
|
ASpin: Spin,
|
||||||
|
AEmpty: Empty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.school-calendar-search-div {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 15rem;
|
||||||
|
padding: 0.5rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.search-div {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 3rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.show-loading-div {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 10rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.data-list-content-div {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 15rem;
|
||||||
|
.calendar-row-div {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 5.5rem;
|
||||||
|
display: flex;
|
||||||
|
.step-line-div {
|
||||||
|
width: 25px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
.step-icon-out-div {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background-color: #b3e5fc;
|
||||||
|
display: flex;
|
||||||
|
.step-icon-in-div {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
border-radius: 16px;
|
||||||
|
background-color: #31a8fa;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.step-line-div{
|
||||||
|
height: calc(100% - 20px);
|
||||||
|
width: 1px;
|
||||||
|
border-right: 1px solid #31a8fa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.row-content-div {
|
||||||
|
width: calc(100% - 25px);
|
||||||
|
min-height: 5.5rem;
|
||||||
|
padding: 0.25rem 0;
|
||||||
|
position: relative;
|
||||||
|
.content-div {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 2.5rem;
|
||||||
|
transition: height 0.2s; //过度时间
|
||||||
|
border: 1px solid #f2f2f2;
|
||||||
|
border-right: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
color: rgba(0, 0, 0, 0.45);
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
padding-left: 0.5rem;
|
||||||
|
.item-row {
|
||||||
|
width: 100%;
|
||||||
|
height: 1rem;
|
||||||
|
margin-top: 0.1rem;
|
||||||
|
line-height: 1rem;
|
||||||
|
font-size: 14px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.row-content-div:hover .content-div {
|
||||||
|
height: 4.6rem;
|
||||||
|
background-color: #31a8fa;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.show-more-div{
|
||||||
|
height: 2rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.show-loading-div {
|
||||||
|
min-height: 120px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default{
|
||||||
|
data(){
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
@ -0,0 +1,227 @@
|
|||||||
|
<template>
|
||||||
|
<div class="week-calendar-search-div">
|
||||||
|
<div class="search-div">
|
||||||
|
<span style="margin-right: 1rem">周次</span>
|
||||||
|
<a-select :value="calendarId" style="width: 200px" @change="termChange">
|
||||||
|
<a-select-option v-for="item in termList" :key="item.calendar_id">
|
||||||
|
{{item.cycle_name}}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</div>
|
||||||
|
<div class="data-list-content-div">
|
||||||
|
<vue-scroll v-if="!isLoading && dataList.length > 0" :ops="listScroll" style="height:25rem">
|
||||||
|
<div class="calendar-row-div" v-for="item in dataList" :key="item.detail_id">
|
||||||
|
<div class="step-line-div">
|
||||||
|
<div class="step-icon-out-div">
|
||||||
|
<div class="step-icon-in-div"></div>
|
||||||
|
</div>
|
||||||
|
<div class="step-line-div"></div>
|
||||||
|
</div>
|
||||||
|
<div class="row-content-div">
|
||||||
|
<div class="content-div">
|
||||||
|
<div class="item-row" :title="item.detail_time">{{item.detail_time}}</div>
|
||||||
|
<div class="item-row" :title="item.detail_content">{{item.detail_content}}</div>
|
||||||
|
<div class="item-row" :title="item.detail_target">{{'对象:' + item.detail_target}}</div>
|
||||||
|
<div class="item-row" :title="item.leader_name">{{'负责人:' + item.leader_name}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="show-more-div">
|
||||||
|
<span v-if="!showMoreLoading && pageNumber < totalPage" v-on:click="showMore" style="color: #31a8fa;cursor: pointer">查看更多>></span>
|
||||||
|
<span v-if="showMoreLoading"><a-spin/></span>
|
||||||
|
<span v-if="pageNumber == totalPage" style="color: rgba(0, 0, 0, 0.45)">无更多数据~</span>
|
||||||
|
</div>
|
||||||
|
</vue-scroll>
|
||||||
|
<div v-if="isLoading" class="show-loading-div">
|
||||||
|
<a-spin/>
|
||||||
|
</div>
|
||||||
|
<div v-if="!isLoading && dataList.length == 0" class="show-loading-div">
|
||||||
|
<a-empty/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import InterConfig from './interConfig';
|
||||||
|
import {Select, Spin, Empty} from 'ant-design-vue';
|
||||||
|
export default{
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
listScroll: this.StaticParams.scrollOption,
|
||||||
|
isLoading: true,
|
||||||
|
showMoreLoading:false,
|
||||||
|
calendarId: "",//校历ID
|
||||||
|
termList: [],//学期列表
|
||||||
|
dataList: [],//数据列表
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 5,
|
||||||
|
totalPage: 0,
|
||||||
|
totalRow: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
this.getWeekCalendarList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//获取校历数据
|
||||||
|
getWeekCalendarList: function () {
|
||||||
|
let dataList = this.dataList;
|
||||||
|
let params = {
|
||||||
|
org_id: this.BaseConfig.person_info_my.bureau_id,
|
||||||
|
calendar_type: 2,
|
||||||
|
calendar_id: this.calendarId,
|
||||||
|
page_number: this.pageNumber,
|
||||||
|
page_size: this.pageSize
|
||||||
|
}
|
||||||
|
//this.isLoading = true;
|
||||||
|
this.showMoreLoading = true;
|
||||||
|
this.InterfaceConfig.callInterface([{
|
||||||
|
url: InterConfig.viewSchoolCalendar.url,
|
||||||
|
params: params,
|
||||||
|
method: InterConfig.viewSchoolCalendar.method,
|
||||||
|
isTestLogin: InterConfig.viewSchoolCalendar.isTestLogin,
|
||||||
|
}], (result) => {
|
||||||
|
this.isLoading = false;
|
||||||
|
this.showMoreLoading = false;
|
||||||
|
if (result[0].data.code === 2000) {
|
||||||
|
let resObj = result[0].data.data;
|
||||||
|
this.calendarId = resObj.now_calendar_id ? parseInt(resObj.now_calendar_id) : "";
|
||||||
|
this.termList = resObj.calendar_list;
|
||||||
|
this.dataList = dataList.concat(resObj.list);
|
||||||
|
this.totalPage = resObj.total_page;
|
||||||
|
this.totalRow = resObj.total_row;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
termChange: function (value) {
|
||||||
|
if (this.calendarId != value) {
|
||||||
|
this.calendarId = value;
|
||||||
|
this.dataList = [];
|
||||||
|
this.isLoading = true;
|
||||||
|
this.pageNumber = 1;
|
||||||
|
this.getWeekCalendarList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showMore: function () {
|
||||||
|
this.pageNumber += 1;
|
||||||
|
this.getWeekCalendarList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
ASelect: Select,
|
||||||
|
ASelectOption: Select.Option,
|
||||||
|
ASpin: Spin,
|
||||||
|
AEmpty: Empty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.week-calendar-search-div {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 15rem;
|
||||||
|
padding: 0.5rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.search-div {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 3rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.show-loading-div {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 10rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.data-list-content-div {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 15rem;
|
||||||
|
.calendar-row-div {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 5.5rem;
|
||||||
|
display: flex;
|
||||||
|
.step-line-div {
|
||||||
|
width: 25px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
.step-icon-out-div {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background-color: #b3e5fc;
|
||||||
|
display: flex;
|
||||||
|
.step-icon-in-div {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
border-radius: 16px;
|
||||||
|
background-color: #31a8fa;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.step-line-div{
|
||||||
|
height: calc(100% - 20px);
|
||||||
|
width: 1px;
|
||||||
|
border-right: 1px solid #31a8fa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.row-content-div {
|
||||||
|
width: calc(100% - 25px);
|
||||||
|
min-height: 5.5rem;
|
||||||
|
padding: 0.25rem 0;
|
||||||
|
position: relative;
|
||||||
|
.content-div {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 2.5rem;
|
||||||
|
transition: height 0.2s; //过度时间
|
||||||
|
border: 1px solid #f2f2f2;
|
||||||
|
border-right: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
color: rgba(0, 0, 0, 0.45);
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
padding-left: 0.5rem;
|
||||||
|
.item-row {
|
||||||
|
width: 100%;
|
||||||
|
height: 1rem;
|
||||||
|
margin-top: 0.1rem;
|
||||||
|
line-height: 1rem;
|
||||||
|
font-size: 14px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.row-content-div:hover .content-div {
|
||||||
|
height: 4.6rem;
|
||||||
|
background-color: #31a8fa;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.show-more-div{
|
||||||
|
height: 2rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.show-loading-div {
|
||||||
|
min-height: 120px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default{
|
||||||
|
data(){
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
Loading…
Reference in new issue