zhanghua
3 天以前 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<template>
    <div class="user-list">
        <header>
            <div class="header-title">运营管理 >> 巡查执法</div>
        </header>
        <nav>
            <el-tabs v-model="tabActiveName" @tab-click="tabChange">
                <el-tab-pane label="统计报表" name="first"></el-tab-pane>
                <el-tab-pane label="数据反查" name="second"></el-tab-pane>
            </el-tabs>
        </nav>
        <main>
            <div>
                <el-radio v-model="searchModel" label="document">归档查询</el-radio>
                <el-radio v-model="searchModel" label="timely">实时查询</el-radio>
                <label for="searchInput">
                    <span slot="prepend">统计类型:</span>
                    <el-input style="width: 200px" v-model="statisticalType" id="searchInput" placeholder="巡查队员统计"></el-input>
                </label>
            </div>
            <div class="search">
                <label for="inputDate">
                    <span slot="prepend">按年月查询:</span>
                    <el-input style="width: 200px" v-model="year" id="inputDate" placeholder="巡查队员统计"></el-input>
                    <span slot="append"> 年</span>
                </label>
                <span class="month-tag" :class="{ 'month-selected': item.selected }" v-for="item in monthList" :key="item.value" @click="selecteMonth(item)" >
                    {{ item.text }}
                    <span v-if="item.selected" style="font-size: 12px">√</span>
                </span>
                <el-button type="primary" @click="search()">搜索</el-button>
                <el-button type="primary" @click="reset()">重置</el-button>
            </div>
            <el-table :data="tableData"
            style="width: 100%"
            :header-cell-style="{background:'#06122c','font-weight':'650','line-height':'45px'}">
                <el-table-column 
                v-for="{prop, label} in tableColumnData" 
                :key="prop" 
                :prop="prop" 
                :label="label"
            ></el-table-column>
            </el-table>
        </main>
    </div>
</template>
<script>
import MyView from './components/dataView';
 
export default {
    components: {
        MyView
    },
    data() {
        return {
            searchModel: '',
            statisticalType: '',
            year: '',
            activeName: '',
            tabActiveName: '',
            monthList: [
                {
                    text: '1月',
                    value: 1,
                    selected: false
                },
                {
                    text: '2月',
                    value: 2,
                    selected: false
                },
                {
                    text: '3月',
                    value: 3,
                    selected: false
                },
                {
                    text: '4月',
                    value: 4,
                    selected: false
                },
                {
                    text: '5月',
                    value: 5,
                    selected: false
                },
                {
                    text: '6月',
                    value: 6,
                    selected: false
                },
                {
                    text: '7月',
                    value: 7,
                    selected: false
                },
                {
                    text: '8月',
                    value: 8,
                    selected: false
                },
                {
                    text: '9月',
                    value: 9,
                    selected: false
                },
                {
                    text: '10月',
                    value: 10,
                    selected: false
                },
                {
                    text: '11月',
                    value: 11,
                    selected: false
                },
                {
                    text: '12月',
                    value: 12,
                    selected: false
                }
            ],
            tableData: [],
            tableColumnData: [
                {
                    prop: 'name',
                    label: '巡查人员',
                },
                {
                    prop: 'count',
                    label: '巡查次数',
                },
                {
                    prop: 'warnCount',
                    label: '警告数',
                },
                {
                    prop: 'punishCount',
                    label: '处罚数',
                },
                {
                    prop: 'finishCount',
                    label: '交办完成数',
                },
                {
                    prop: 'unfinishedCount',
                    label: '交办未完成数',
                }
            ]
        }
    },
    created() {
    },
    methods: {
        search() {
        },
 
        reset() {
            this.year = '';
            this.searchModel = '';
            this.statisticalType = '';
            this.monthList.forEach(item => item.selected = false);
        },
 
        selecteMonth(item) {
            item.selected = !item.selected;
        },
 
        tabChange() {
 
        }
    }
}
</script>
<style lang="scss" scoped>
.user-list {
    text-align: left;
    margin: 10px 20px;
    color: #4b9bb7; 
    
    .header-title {
        line-height: 40px;
    }
 
    .month-tag {
        margin: 5px;
        padding: 5px;
        border: 1px solid gray;
        border-radius: 10%;
        text-align: center;
    }
 
    .month-selected {
        border: 1px solid #409EFF;
    }
}
</style>