123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <template>
- <view>
- <scroll-list ref="list" :option="option" @load="load" @refresh="refresh" @loadSuccess="loadSuccess"
- @scrolltolower="scrolltolower">
- <view v-for="(item, index) in list" :key="index" @click="handleTest(item)">
- <view class="infoBody">
- <view>
- <view style="border-bottom: 1px #b8b8b8 solid;">
- <uni-row class="demo-uni-row">
- <uni-col :span="20">
- <view class="demo-uni-col dark"
- style="font-size: 36rpx;margin: -20rpx 0 0 0;font-weight: bold;letter-spacing:5rpx;">
- {{item.formData.title}}
- </view>
- </uni-col>
- </uni-row>
- </view>
- <uni-row class="demo-uni-row">
- <uni-col>
- <view class="demo-uni-col light" style="padding: 26rpx;color: #b1b1b1;">
- {{item.formData.reason ? item.formData.reason : ''}}
- </view>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row">
- <uni-col :span="5">
- <view class="demo-uni-col light" style="color: #727272;">
- 申请人:
- </view>
- </uni-col>
- <uni-col :span="6">
- <view class="demo-uni-col light" style="color: #727272;">
- {{item.formData.apply_user_name}}
- </view>
- </uni-col>
- <uni-col :span="13">
- <view class="demo-uni-col light" style="color: #727272;">
- {{item.createTime}}
- </view>
- </uni-col>
- </uni-row>
- </view>
- <view></view>
- </view>
- </view>
- </scroll-list>
- </view>
- </template>
- <style lang="scss" scoped>
- // page {
- // background-color: #f3f3f3;
- // }
- .page-wrap {}
- .infoBody {
- background-color: #ffffff;
- padding: 40rpx;
- border-radius: 20rpx;
- margin: 20rpx;
- box-shadow: 0px 2px 10px #cccccc;
- }
- </style>
- <script>
- export default {
- data() {
- return {
- option: {
- page: 1,
- size: 5,
- auto: true
- },
- page: 1,
- list: [],
- scrollList: [],
- total: 0,
- file_approval_flow_run_key: '',
- biz_leave_flow_run_key: '',
- reserve_consuming_flow_run_key: '',
- reserve_return_flow_run_key: '',
- reserve_register_flow_run_key: '',
- personnel_hire_approval_flow_run_key: ''
- }
- },
- onLoad() {
- this.file_approval_flow_run_key = uni.getStorageSync('file_approval_flow_run_key')
- this.biz_leave_flow_run_key = uni.getStorageSync('biz_leave_flow_run_key')
- this.reserve_consuming_flow_run_key = uni.getStorageSync('reserve_consuming_flow_run_key')
- this.reserve_return_flow_run_key = uni.getStorageSync('reserve_return_flow_run_key')
- this.reserve_register_flow_run_key = uni.getStorageSync('reserve_register_flow_run_key')
- this.personnel_hire_approval_flow_run_key = uni.getStorageSync('personnel_hire_approval_flow_run_key')
- this.personnel_dimission_approval_flow_run_key = uni.getStorageSync(
- 'personnel_dimission_approval_flow_run_key')
- },
- onShow() {
- this.$refs.list.refresh()
- },
- methods: {
- handleTest(item) {
- item.pageType = 2
- uni.setStorageSync("approval", item)
- if (item.examplesId === this.file_approval_flow_run_key) {
- this.$goto('../ge/geNewsApproval')
- } else if (item.examplesId === this.biz_leave_flow_run_key) {
- this.$goto('../ge/geApproval')
- } else if (item.examplesId === this.reserve_register_flow_run_key) {
- this.$goto('../ge/geReserveApproval')
- } else if (item.examplesId === this.reserve_consuming_flow_run_key) {
- this.$goto('../ge/geReserveApproval')
- } else if (item.examplesId === this.reserve_return_flow_run_key) {
- this.$goto('../ge/geReserveApproval')
- } else if (item.examplesId === this.personnel_hire_approval_flow_run_key) {
- this.$goto('../ge/geEntry')
- } else if (item.examplesId === this.personnel_dimission_approval_flow_run_key) {
- this.$goto('../ge/geDimission')
- } else if (item.examplesId === uni.getStorageSync('interview_record_approval_flow_run_key')) {
- this.$goto('../ge/geInterview')
- } else if (item.examplesId === uni.getStorageSync('instant_notice_approval_flow_run_key')) {
- this.$goto('../ge/geNotice')
- } else if (item.examplesId === uni.getStorageSync('shift_official_approval_flow_run_key')) {
- this.$goto('../ge/geShiftOfficial')
- } else if (item.examplesId === uni.getStorageSync('use_seal_approval_flow_run_key')) {
- this.$goto('../ge/geUseSeal')
- } else if (item.examplesId === uni.getStorageSync('device_repairs_approval_flow_run_key')) {
- this.$goto('../ge/geDeviceRepairs')
- } else if (item.examplesId === uni.getStorageSync('device_scrap_approval_flow_run_key')) {
- this.$goto('../ge/geDeviceScrap')
- } else if (item.examplesId === uni.getStorageSync('purchase_approval_flow_run_key')) {
- this.$goto('../ge/gePurchase')
- } else if (item.examplesId === uni.getStorageSync('contract_approval_flow_run_key')) {
- this.$goto('../ge/geContract')
- } else if (item.examplesId === uni.getStorageSync('phone_card_apply_flow_run_key')) {
- this.$goto('../ge/gePhoneApply')
- } else if (item.examplesId === uni.getStorageSync('letter_dispose_flow_run_key')) {
- this.$goto('../ge/geLetterDispose')
- }
- this.list = []
- },
- async taskList(paging) {
- // 发送请求
- const {
- data: res
- } = await this.$httpRequest({
- url: '/app/gd?pageNum=' + paging.page + '&pageSize=' + paging.size,
- method: 'get',
- urlType: this.$getUrlType()
- });
- if (res.code === 200) {
- if (paging.page === 1) {
- this.scrollList = res.rows
- this.total = res.total
- this.$refs.list.loadSuccess({
- list: res.rows,
- total: this.total
- });
- } else if (paging.page > 1) {
- for (var i = 0; i < res.rows.length; i++) {
- this.scrollList.push(res.rows[i])
- }
- this.$refs.list.loadSuccess({
- list: this.scrollList,
- total: this.total
- });
- }
- }
- },
- // 刷新刷剧
- refresh(paging) {
- this.taskList(paging)
- },
- scrolltolower(e) {
- console.log(e)
- },
- load(paging) {
- this.taskList(paging)
- },
- loadSuccess(list) {
- this.list = list
- }
- }
- }
- </script>
|