Commit 16f7059d by 莫晓莉

2020.9.18

parent 00c2b641
......@@ -29,3 +29,13 @@ export const getProjectTypeList = (data) => {
export const applyProject = (data) => {
return request('applyProject', data)
}
//意见反馈
export const satisfactionEvaluation = (data) => {
return request('satisfactionEvaluation', data)
}
//获取已审批的项目
export const getApplyProject = (data) => {
return request('getApplyProject', data)
}
......@@ -31,7 +31,7 @@
,{
"path" : "pages/evaluate/evaluate",
"style" : {
"navigationBarTitleText": "满意度评价"
"navigationBarTitleText": "意见反馈"
}
}
,{
......
......@@ -55,6 +55,9 @@
</template>
<script>
import {
getApplyProject
} from "@/api/login"
export default {
data() {
return {
......@@ -62,8 +65,22 @@
}
},
methods: {
getApplyProject(){
getApplyProject({
phone: this.addForm.phone
}).then(res => {
if (res.code == 200) {
uni.showToast({
icon: 'success',
title: '获取成功',
success: () => {
}
})
}
})
}
}
}
</script>
......
......@@ -26,13 +26,13 @@
</view> -->
<view class="category-title">
评价内容<text style="color:red;">*</text>
反馈内容<text style="color:red;">*</text>
</view>
<textarea class="suggest-area" placeholder="请输入60字以内问题或建议" name="content" maxlength="60"></textarea>
<textarea v-model="evaluationForm.remark" class="suggest-area" placeholder="请详细描述您的问题或建议" name="content" ></textarea>
<view class="category-title">
上传图片
<text class="title-intro" style="">(如无图片,可以忽略,最多6张图)</text>
<!-- <text class="title-intro" style="">(如无图片,可以忽略,最多6张图)</text> -->
</view>
<view class="imgs-area">
......@@ -49,7 +49,7 @@
<view>
<view class="btns-area">
<button class="send-btn flex-ac-jc">确 定</button>
<button class="send-btn flex-ac-jc">提交反馈</button>
<button class="cancel-btn flex-ac-jc">取 消</button>
</view>
</view>
......@@ -177,40 +177,40 @@
for (var i in list) {
list[i].selected = i < idx ? true : false;
}
// for (var i in starLevel) {
// starLevel[i].level = idx?this.star_level=idx:this.star_level=1;
// }
this.starsList = list;
this.cur_starLevel=idx-1;
},
chooseImg() {
uni.chooseImage({
count: 6, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function(res) {
// 预览图片
// uni.previewImage({
// urls: res.tempFilePaths,
// longPressActions: {
// itemList: ['发送给朋友', '保存图片', '收藏'],
// success: function(data) {
// console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
// },
// fail: function(err) {
// console.log(err.errMsg);
// }
// }
// });
// console.log(JSON.stringify(res.tempFilePaths));
// this.imageList = res.tempFilePaths
this.imageList = res.tempFilePaths;
// 提交反馈
//申请服务
satisfactionEvaluation() {
if (this.evaluationForm.remark==undefined) {
uni.showToast({
icon: 'none',
title: '请输入反馈内容'
});
return;
}
if (this.disableLevelIndex==-1) {
uni.showToast({
icon: 'none',
title: '请上传照片'
});
return;
}
satisfactionEvaluation(this.evaluationForm).then(res => {
if (res.code == 200) {
uni.showToast({
icon: 'success',
title: '反馈成功 !',
success: () => {
uni.switchTab({
url: '../user/user',
})
}
})
}
})
},
}
......
......@@ -8,7 +8,7 @@
<view class="tybe-tab">待审批</view> -->
</view>
<block v-if="statusIndex==0">
<view class="list-area">
<!-- <view class="list-area">
<view class="m-his-list" style="">
<view class="his-item">申请人:张三</view>
<view class="his-item mt10">伤残等级:一级</view>
......@@ -26,6 +26,16 @@
<view class="his-item-result mt10">审批结果:拒绝</view>
<view class="his-item-result mt10">拒绝理由:个叽里呱啦</view>
</view>
</view> -->
<view class="list-area">
<view v-for="item in applyProjectList" :key="item.id" class="m-his-list" style="">
<view class="his-item">申请人:{{item.name}}</view>
<view class="his-item mt10">伤残等级:一级</view>
<view class="his-item mt10">伤残类别{{}}</view>
<view class="his-item mt10">项目类型:{{item.disableUserProjectTypeName}}</view>
<view class="his-item mt10">申请时间:{{item.createTime}}</view>
<view class="his-item-result mt10">审批结果:{{item.applyResult}}</view>
</view>
</view>
</block>
......@@ -33,6 +43,9 @@
</template>
<script>
import {
getApplyProject
} from "@/api/login"
export default {
data() {
return {
......@@ -42,25 +55,108 @@
name:'全部'
},
{
name:'已审批'
name:'已通过'
},
{
name:'待审批'
name:'已拒绝'
}
]
],
applyProjectList:[],
disableLevel: [
{
id:1,
name: '一级'
}, {
id:2,
name: '二级'
}, {
id:3,
name: '三级'
}, {
id:4,
name: '四级'
},, {
id:5,
name: '五级'
},, {
id:6,
name: '六级'
},{
id:7,
name: '七级'
}
],//伤残等级
disableCategory: [
{
id:1,
name: '视力障碍'
}, {
id:2,
name: '听力障碍'
}, {
id:3,
name: '言语障碍'
}, {
id:4,
name: '肢体障碍'
},, {
id:5,
name: '智力障碍'
},, {
id:6,
name: '精神障碍'
},, {
id:7,
name: '多种障碍'
}
],// 伤残类别
}
},
onShow() {
this.getApplyProject();
},
methods: {
ontabtap(e){
let index = e.target.dataset.current || e.currentTarget.dataset.current;
var curIndex=this.statusIndex
if(curIndex==index){
if(this.statusIndex==index){
return
}else{
this.statusIndex=index
this.statusIndex=index;
}
if(this.statusIndex==0){
this.getApplyProject();
}else{
this.getApplyProject(this.statusIndex);
}
},
getApplyProject(status){
getApplyProject({status:status}).then(res => {
if (res.code == 200) {
// uni.showToast({
// icon: 'success',
// title: '获取成功',
// success: () => {
// }
// })
// this.applyProjectList=res.data.data.rows;
var list=res.data.data.rows;
list.forEach(item=>{
if(item.status==0){
item.applyResult='待审批'
}else if(item.status==1){
item.applyResult='已通过';
}else{
item.applyResult='已拒绝';
}
})
this.applyProjectList=list;
}
})
}
}
......
......@@ -21,7 +21,7 @@
<view class="center-list">
<view class="center-list-item border-bottom" @click="comment">
<text class="list-icon">&#xe60f;</text>
<text class="list-text">满意度评价</text>
<text class="list-text">意见反馈</text>
<text class="navigat-arrow">&#xe65e;</text>
</view>
<view class="center-list-item" @click="apply">
......
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