parent
8f8ed67148
commit
9515d57ed7
@ -0,0 +1,173 @@
|
|||||||
|
<template>
|
||||||
|
<div class="todo-list-style">
|
||||||
|
<div class="type-style">
|
||||||
|
<div class="icon-container-style">
|
||||||
|
<my-icon :type="listType.icon" class="icon-style"/>
|
||||||
|
</div>
|
||||||
|
<span class="todo-name-style">{{listType.name}}</span>
|
||||||
|
</div>
|
||||||
|
<a-spin :spinning="isLoading" wrapperClassName="list-spin-style">
|
||||||
|
<vue-scroll :ops="ops">
|
||||||
|
<template v-if="isLoading === false">
|
||||||
|
<template v-if="dataList.length > 0">
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<a-empty v-else style="margin-top: 130px"></a-empty>
|
||||||
|
</template>
|
||||||
|
</vue-scroll>
|
||||||
|
</a-spin>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {Spin,Empty} from 'ant-design-vue';
|
||||||
|
import GlobalParams from '../../../global_params';
|
||||||
|
import InterfaceConfig from '../../../mainPlatform/interfaceConfig';
|
||||||
|
export default {
|
||||||
|
name: "BusinessList",
|
||||||
|
props:{
|
||||||
|
todoListType:{
|
||||||
|
type:Object,
|
||||||
|
default:function () {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
required:true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data:function () {
|
||||||
|
return {
|
||||||
|
isLoading:true,
|
||||||
|
listType:this.todoListType,
|
||||||
|
ops:this.StaticParams.scrollOption,
|
||||||
|
dataList:[],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
this.getModuleTodoList();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
getModuleTodoList:function () {
|
||||||
|
let params = {
|
||||||
|
bureau_id:this.BaseConfig.person_info_my.bureau_id,
|
||||||
|
dept_id:this.BaseConfig.person_info_my.dep_id,
|
||||||
|
person_id:this.BaseConfig.userInfo.person_id_cookie,
|
||||||
|
identity_id:this.BaseConfig.userInfo.identity_id_cookie,
|
||||||
|
page_size:this.listType.count,
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.listType.id === 'approval'){//待我审批
|
||||||
|
let codes = ""
|
||||||
|
if (this.listType.bureau_biz_codes.length > 0 || GlobalParams.biz_codes_bureau.length > 0){
|
||||||
|
codes = this.listType.bureau_biz_codes.concat(GlobalParams.biz_codes_bureau).join(",")
|
||||||
|
params.bureau_biz_codes = codes;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.listType.dept_biz_codes.length > 0 || GlobalParams.biz_codes_dept.length > 0){
|
||||||
|
codes = this.listType.dept_biz_codes.concat(GlobalParams.biz_codes_dept).join(",")
|
||||||
|
params.dept_biz_codes = codes;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.listType.person_biz_codes.length > 0 || GlobalParams.biz_codes_person.length > 0){
|
||||||
|
codes = this.listType.person_biz_codes.concat(GlobalParams.biz_codes_person).join(",")
|
||||||
|
params.person_biz_codes = codes;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (this.listType.bureau_biz_codes.length > 0){
|
||||||
|
params.bureau_biz_codes = this.listType.bureau_biz_codes.join(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.listType.dept_biz_codes.length > 0){
|
||||||
|
params.dept_biz_codes = this.listType.dept_biz_codes.join(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.listType.person_biz_codes.length > 0){
|
||||||
|
params.person_biz_codes = this.listType.person_biz_codes.join(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.InterfaceConfig.callInterface([{
|
||||||
|
url:InterfaceConfig.getModuleTodoList.url,
|
||||||
|
params:params,
|
||||||
|
method:InterfaceConfig.getModuleTodoList.method,
|
||||||
|
isTestLogin:InterfaceConfig.getModuleTodoList.isTestLogin
|
||||||
|
}],(result)=>{
|
||||||
|
if (result[0].data.code === 2000){
|
||||||
|
this.dataList = result[0].data.data.list;
|
||||||
|
this.calculateData();
|
||||||
|
this.isLoading = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
calculateData:function () {
|
||||||
|
if (this.dataList && Array.isArray(this.dataList)){
|
||||||
|
this.dataList.forEach((item)=>{
|
||||||
|
switch (this.listType,id) {
|
||||||
|
case 'approval':
|
||||||
|
switch (parseInt(item.system_id)) {
|
||||||
|
case 105://教师考勤
|
||||||
|
item.showData = [
|
||||||
|
{title:'申请人'}
|
||||||
|
];
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components:{
|
||||||
|
ASpin:Spin,
|
||||||
|
AEmpty:Empty,
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
todoListType:function (newData) {
|
||||||
|
this.isLoading = true;
|
||||||
|
this.listType = newData;
|
||||||
|
this.getModuleTodoList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.todo-list-style{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
.type-style{
|
||||||
|
height: 50px;
|
||||||
|
margin: 0 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
align-content: center;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
.icon-container-style{
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
border-radius: 15px;
|
||||||
|
display: flex;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background:linear-gradient(to bottom right,var(--todoTwoBtn),var(--todoOneBtn));
|
||||||
|
background:-moz-linear-gradient(to bottom right,var(--todoTwoBtn),var(--todoOneBtn));
|
||||||
|
background:-webkit-linear-gradient(bottom right,var(--todoTwoBtn),var(--todoOneBtn));
|
||||||
|
margin-right: 10px;
|
||||||
|
.icon-style{
|
||||||
|
font-size: 18px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.list-spin-style{
|
||||||
|
height: calc(100% - 50px);
|
||||||
|
width: 100%;
|
||||||
|
/deep/.ant-spin-container{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue