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
| <template>
| <div class="createUser">
| <div class="chooseArea" v-if="flag">
| <el-button type="primary" @click="toShow(0,'违规')">违规登记</el-button>
| <el-button type="primary" @click="toShow(1,'违建')">违建登记</el-button>
| </div>
| <div class="inputArea" v-else>
| <MyIll v-if="index===0" />
| <MyVio v-else />
| </div>
| </div>
| </template>
| <script>
| import MyVio from './vio';
| import MyIll from './ill';
| export default {
| components: {
| MyIll, MyVio
| },
| data() {
| return {
| flag: true,
| index: 0,//0:违规,1:违建
| }
| },
| created() {
|
| },
| methods: {
| toShow(idx, lab) {
| this.$confirm('您确定要去上报' + lab + '事件')
| .then(_ => {
| console.log(1);
| this.index = idx;
| this.flag = false;
| })
| .catch(_ => { console.log('err') });
| }
| },
| }
| </script>
| <style lang="scss" scoped>
| .chooseArea {
| display: flex;
| flex-direction: column;
| align-items: center;
| padding-top: 50px;
| padding-bottom: 80px;
|
| .el-button {
| width: 120px;
| line-height: 40px;
| padding: 0;
| margin-top: 20px;
| }
|
| .el-button+.el-button {
| margin-left: 0;
| }
| }
| </style>
|
|