wjt
2024-06-20 f391ea2e402579ab8fc351232b83d21376386738
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<template>
    <view class="page-box">
        <view class="list">
            <view class="select-box" v-for="(item,index) in list" :key="index" :class="{start: isJudege}">
                <view class="select-image" v-if="isJudege" @click="setIsSelect(index)">
                    <image src="/static/policy/checkbox.png" mode="widthFix" v-show="item.isSelect"></image>
                    <image src="/static/policy/none-checkbox.png" mode="widthFix" v-show="!item.isSelect"></image>
                </view>
                <view class="list-item">
                    <view class="top-title">
                        <text>24年5月突击检查消防安全</text>
                        <text class="status">待审批</text>
                    </view>
                    <view class="user-info">
                        <text>王思雨</text>
                        <view class="driver"></view>
                        <text>执法一大队</text>
                    </view>
                    <view class="set-line">
                        <text>执法对象:</text>河南觉醒科技有限公司
                    </view>
                    <view class="line"></view>
                    <view class="set-flex set-start set-flex-content-between">
                        <view>
                            <view class="set-line1">
                                <text>执法时间:</text>2024-05-12 12:00
                            </view>
                            <view class="set-line1">
                                <text>申请时间:</text>2024-05-12 12:00:12
                            </view>
                        </view>
                        <view class="button" v-if="!isJudege" @click="goStartJudeg">
                            审批
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <view class="down" v-if="!isJudege">
            <view class="button" @click="goRecord">审批记录</view>
            <view class="button more-options" @click="moreJudeg">批量审批</view>
        </view>
        <view class="down judge" v-else>
            <view class="select-image"  @click="allSelect()">
                <image src="/static/policy/checkbox.png" mode="widthFix" v-show="isAllSelect"></image>
                <image src="/static/policy/none-checkbox.png" mode="widthFix" v-show="!isAllSelect"></image>
                <view class="show-check">全选</view>
            </view>
            <view class="button more-options start-option" @click="moreStart">立即审批</view>
        </view>
        <popupCom ref="popup" @entery="entery" @cancel="cancelSelect"></popupCom>
    </view>
</template>
 
<script>
    import popupCom from '@/policy/components/popup.vue'
    export default {
        components: {
            popupCom
        },
        data() {
            return {
                list1: [{
                    name: '待上报',
                }, {
                    name: '已上报',
                }],
                isJudege: false,
                list: [
                    {
                        isSelect: false
                    }
                ],
            }
        },
        computed: {
            isAllSelect(){
                const value = this.list.every(item => item.isSelect)
                return value
            }
        },
        methods: {
            goRecord() {
                uni.navigateTo({
                    url: `/policy/translateRecord/translateRecord`
                })
            },
            click() {
 
            },
            goStartJudeg() {
                this.$refs.popup.open()
            },
            // 批量审批
            moreJudeg() {
                if(!this.list.length){
                    return
                }
                this.isJudege = true
            },
            setIsSelect(index){
                this.list[index].isSelect = !this.list[index].isSelect
            },
            allSelect() {
                this.list.map(item => item.isSelect = !this.isAllSelect)
            },
            moreStart() {
                const value = this.list.some(item => item.isSelect)
                if(value) {
                    this.goStartJudeg()
                } else {
                    uni.showToast({
                        title: '请选择审批',
                        icon: 'none'
                    })
                }
            },
            entery() {
                this.isJudege = false
            },
            cancelSelect() {
                this.isJudege = false
                this.list.map(item => item.isSelect = false)
            }
        }
    }
</script>
<style>
    page {
        background-color: #F4F4F4;
    }
</style>
<style lang="scss" scoped>
    @import "./translate.scss";
 
    /deep/ .u-radio {
        margin-right: 84rpx !important;
    }
 
    /deep/ .u-textarea {
        background-color: #F4F4F4 !important;
        border: none;
    }
</style>