You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
2.5 KiB

1 year ago
<template>
<view class="page-wraper">
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list">
1 year ago
<view class="">
<comIssueRequestDetailCard :dataContent="requestContent">
</comIssueRequestDetailCard>
1 year ago
</view>
</view>
</scroll-view>
<!-- <div class="btn_bottom" >
12 months ago
<view class="" style="display: flex;flex-direction: row;">
<view class="">
<button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
</view>
</div> -->
1 year ago
</view>
<com-message ref="comMessage"></com-message>
</view>
</template>
<script>
import {
getIssueRequestDetail,
} from '@/api/request2.js';
import {
goHome,
updateTitle
} from '@/common/basic.js';
import {
getDataSource,
} from '@/common/detail.js';
import comIssueRequestDetailCard from "@/pages/issue/coms/comIssueRequestDetailCard.vue"
1 year ago
import comMessage from '@/mycomponents/common/comMessage.vue'
12 months ago
1 year ago
export default {
components: {
comIssueRequestDetailCard,
1 year ago
comMessage,
},
data() {
return {
id: '',
requestContent: {}, //任务内容
1 year ago
subList: [], //接口返回的任务
12 months ago
type: 'query' //来源新增add, query查询
1 year ago
};
},
onLoad(option) {
12 months ago
this.id = option.id;
this.getDetail();
1 year ago
},
12 months ago
1 year ago
//返回首页
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
onPullDownRefresh() {
this.getDetail();
uni.stopPullDownRefresh();
},
mounted() {
},
methods: {
getDetail() {
var that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getIssueRequestDetail(that.id).then(res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
} else {
if (res.data.subList.length > 0) {
that.requestContent = res.data;
12 months ago
that.requestContent.subList = res.data.subList;
that.subList = res.data.subList;
// that.subList.forEach(res => {
// res.fromLocationCode = res.toLocationCode
// })
// that.detailSource = getDataSource(that.subList);
// updateTitle(this.requestContent.number);
} else {
that.showMessage('列表数据为0');
}
1 year ago
}
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
},
1 year ago
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
1 year ago
});
},
}
}
</script>
<style scoped lang="scss">
</style>