Commit 061adb71 by 莫晓莉

mxl

parent ede4f7fb
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
<!-- <block v-if="statusIndex==0"> --> <!-- <block v-if="statusIndex==0"> -->
<view class="list-area"> <view class="list-area">
<view v-for="(item,index) in applyProjectList" :key="index" class="m-his-list" style=""> <view v-for="(item,index) in applyProjectList" :key="index" class="m-his-list" style="">
<view class="his-item">申请人:{{item.name}}</view> <view class="his-item">申请人:<text style="color:#ccc;"> {{item.name}}</text></view>
<view class="his-item mt10">伤残等级:一级</view> <view class="his-item mt10">伤残等级: <text style="color:#ccc;">{{item.disableLevel | disableLevelFun }}</text></view>
<view class="his-item mt10">伤残类别{{}}</view> <view class="his-item mt10">伤残类别: <text style="color:#ccc;">{{item.disableCategory | disableCategoryFun}}</text></view>
<view class="his-item mt10">项目类型:{{item.disableUserProjectTypeName}}</view> <view class="his-item mt10">项目类型: <text style="color:#ccc;">{{item.disableUserProjectTypeName}}</text></view>
<view class="his-item mt10">申请时间:{{item.createTime}}</view> <view class="his-item mt10">申请时间: <text style="color:#ccc;">{{item.createTime}}</text></view>
<view class="his-item-result mt10">审批结果:{{item.applyResult}}</view> <view class="his-item-result mt10">审批结果:{{item.applyResult}}</view>
</view> </view>
</view> </view>
...@@ -29,73 +29,69 @@ ...@@ -29,73 +29,69 @@
import { import {
getApplyProject getApplyProject
} from "@/api/login" } from "@/api/login"
var that;
export default { export default {
data() { data() {
return { return {
page:1, page: 1,
size:5, size: 5,
hasMore:false, hasMore: false,
statusIndex:0, statusIndex: 0,
StatusList:[ StatusList: [{
{ name: '全部'
name:'全部'
}, },
{ {
name:'已通过' name: '已通过'
}, },
{ {
name:'已拒绝' name: '已拒绝'
} }
], ],
applyProjectList:[], applyProjectList: [],
disableLevel: [ disableLevel: [{
{ id: 1,
id:1,
name: '一级' name: '一级'
}, { }, {
id:2, id: 2,
name: '二级' name: '二级'
}, { }, {
id:3, id: 3,
name: '三级' name: '三级'
}, { }, {
id:4, id: 4,
name: '四级' name: '四级'
},, { }, , {
id:5, id: 5,
name: '五级' name: '五级'
},, { }, , {
id:6, id: 6,
name: '六级' name: '六级'
},{ }, {
id:7, id: 7,
name: '七级' name: '七级'
} }], //伤残等级
],//伤残等级 disableCategory: [{
disableCategory: [ id: 1,
{
id:1,
name: '视力障碍' name: '视力障碍'
}, { }, {
id:2, id: 2,
name: '听力障碍' name: '听力障碍'
}, { }, {
id:3, id: 3,
name: '言语障碍' name: '言语障碍'
}, { }, {
id:4, id: 4,
name: '肢体障碍' name: '肢体障碍'
},, { }, , {
id:5, id: 5,
name: '智力障碍' name: '智力障碍'
},, { }, , {
id:6, id: 6,
name: '精神障碍' name: '精神障碍'
},, { }, , {
id:7, id: 7,
name: '多种障碍' name: '多种障碍'
} }], // 伤残类别
],// 伤残类别
} }
}, },
...@@ -103,21 +99,25 @@ ...@@ -103,21 +99,25 @@
this.getApplyProject(); this.getApplyProject();
}, },
methods: { methods: {
ontabtap(e){ ontabtap(e) {
let index = e.target.dataset.current || e.currentTarget.dataset.current; let index = e.target.dataset.current || e.currentTarget.dataset.current;
var noneArray=[]; var noneArray = [];
if(this.statusIndex==index){ if (this.statusIndex == index) {
return return
} }
this.statusIndex=index; this.statusIndex = index;
this.applyProjectList=noneArray; this.applyProjectList = noneArray;
this.page=1; this.page = 1;
this.getApplyProject(); this.getApplyProject();
}, },
// 分页获取列表 // 分页获取列表
getApplyProject(){ getApplyProject() {
getApplyProject({status:this.statusIndex,page:this.page,size:this.size}).then(res => { getApplyProject({
status: this.statusIndex,
page: this.page,
size: this.size
}).then(res => {
if (res.code != 200) { if (res.code != 200) {
uni.showToast({ uni.showToast({
title: '系统繁忙,加载失败!', title: '系统繁忙,加载失败!',
...@@ -128,15 +128,27 @@ ...@@ -128,15 +128,27 @@
if (res.code == 200) { if (res.code == 200) {
let _list = res.data.data.rows, let _list = res.data.data.rows,
hasMore = (_list.length == this.size) ? true : false; // 数据是否加载完的标识 hasMore = (_list.length == this.size) ? true : false; // 数据是否加载完的标识
_list.forEach(item=>{ _list.forEach(item => {
if(item.status==0){ if (item.status == 0) {
item.applyResult='待审批' item.applyResult = '待审批'
}else if(item.status==1){ } else if (item.status == 1) {
item.applyResult='已通过'; item.applyResult = '已通过';
}else{ } else {
item.applyResult='已拒绝'; item.applyResult = '已拒绝';
} };
var disableCategory = this.disableCategory;
// for(var i=0;i<disableCategory.length;i++){
// if(disableCategory[i].id==item.disableCategory){
// item.disableCategoryName=disableCategory[i].name
// }
// }
// for(var j=0;j<this.disableLevel.length;j++){
// if(this.disableLevel[j].id==item.disableLevel){
// item.disableLevelName=this.disableLevel[j].name
// }
// }
}); });
if (this.page > 1) { if (this.page > 1) {
_list = this.applyProjectList.concat(_list); _list = this.applyProjectList.concat(_list);
} }
...@@ -162,6 +174,25 @@ ...@@ -162,6 +174,25 @@
this.getApplyProject(); //申请记录 this.getApplyProject(); //申请记录
}, },
},
mounted() {
that = this;
},
filters: {
disableLevelFun(level) {
let obj = that.disableLevel.find(e => {
return e.id == level
})
console.log(obj,15151515)
return obj.name
},
disableCategoryFun(level) {
let obj = that.disableCategory.find(e => {
return e.id == level
})
console.log(obj,15151515)
return obj.name
}
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment