zhouwenxuan
2023-12-15 277d6652893fcc10fb6827b62ef16fe2910a525c
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
<template>
    <view>
        <u-popup :show="show" @open="open" mode="center" customStyle="border-radius: 16rpx">
            <view class="dialog">
                <view class="head">
                    <text><b>回执</b></text>
                    <u-icon name="close" color="#black" size="18" @click="close" ></u-icon>
                </view>
                <text class="content">确认已经安排部署?</text>
                <view class="bottom">
                    <u-button @click="close" style="width: 70px; margin-left: 40px;">取消</u-button>
                    <u-button style="width: 130px" type="primary" @click="$noMoreClicks(confirm)">确认已安全部署</u-button>
                </view>
            </view>
        </u-popup>
    </view>    
</template>
 
<script>
    import { confirm } from '../../../api/notice';
    export default {
        data() {
            return {
                show:false,
                id: '',
                noClick:true,
            }
        },
 
        methods: {
            open() {
                this.show = true; 
                console.log("id",this.id);
            },
            close(){
                this.$emit('close');
                this.show = false; 
            },
            confirm() {
                //确认调接口
                confirm({id: this.id}).then(res => {
                    if(res.code == 100) {
                        uni.showToast({
                            icon: "none",
                            title: '部署成功'
                        });
                        this.$emit('close');
                        this.show = false;
                    }
                });
            }
        }
    }
</script>
 
<style>
.dialog{
    display: flex;
    flex-direction: column;
    width: 250px;
    height: 170px;
}
.head{
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px;
}
.content{
    padding: 20px 10px;
}
.bottom{
    margin-top: 10px;
    display: flex;
}
</style>