n20-common-lib 1.3.8 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -4,30 +4,30 @@
|
|
|
4
4
|
<div class="flex">
|
|
5
5
|
<div class="from">
|
|
6
6
|
<el-input
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
ref="input_left"
|
|
8
|
+
v-model="value1"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
placeholder="子票区间起"
|
|
11
|
+
@blur="handleBlurleft"
|
|
12
|
+
@focus="handleFocusLeft"
|
|
13
|
+
@input="handleInputleft"
|
|
14
|
+
@change="handleInputChangeLeft"
|
|
15
|
+
/>
|
|
16
16
|
</div>
|
|
17
17
|
<div class="center">
|
|
18
18
|
<span> - </span>
|
|
19
19
|
</div>
|
|
20
20
|
<div class="to">
|
|
21
21
|
<el-input
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
ref="input_right"
|
|
23
|
+
v-model="value2"
|
|
24
|
+
:disabled="disabled"
|
|
25
|
+
placeholder="子票区间止"
|
|
26
|
+
@blur="handleBlurRight"
|
|
27
|
+
@focus="handleFocusRight"
|
|
28
|
+
@input="handleInputRight"
|
|
29
|
+
@change="handleInputChangeRight"
|
|
30
|
+
/>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
<script>
|
|
38
38
|
export default {
|
|
39
|
-
name:
|
|
39
|
+
name: 'ChildRange',
|
|
40
40
|
props: {
|
|
41
41
|
// 初始化范围
|
|
42
42
|
value: { required: true },
|
|
@@ -79,7 +79,7 @@ export default {
|
|
|
79
79
|
toPrecision(num, precision) {
|
|
80
80
|
if (precision === undefined) precision = 0
|
|
81
81
|
return parseFloat(
|
|
82
|
-
|
|
82
|
+
Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision)
|
|
83
83
|
)
|
|
84
84
|
},
|
|
85
85
|
|
|
@@ -122,9 +122,9 @@ export default {
|
|
|
122
122
|
// 如果from > to 将from值替换成to
|
|
123
123
|
if (typeof this.value2 === 'number') {
|
|
124
124
|
this.value1 =
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
parseFloat(this.value1) <= parseFloat(this.value2)
|
|
126
|
+
? this.value1
|
|
127
|
+
: this.value2
|
|
128
128
|
}
|
|
129
129
|
this.$emit('input', [this.value1, this.value2])
|
|
130
130
|
this.$emit('changefrom', this.value1)
|
|
@@ -145,9 +145,9 @@ export default {
|
|
|
145
145
|
// 如果to < tfrom 将to值替换成from
|
|
146
146
|
if (typeof this.value1 === 'number') {
|
|
147
147
|
this.value2 =
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
parseFloat(this.value2) >= parseFloat(this.value1)
|
|
149
|
+
? this.value2
|
|
150
|
+
: this.value1
|
|
151
151
|
}
|
|
152
152
|
this.$emit('input', [this.value1, this.value2])
|
|
153
153
|
this.$emit('changeright', this.value2)
|
|
@@ -165,8 +165,7 @@ export default {
|
|
|
165
165
|
}
|
|
166
166
|
</script>
|
|
167
167
|
|
|
168
|
-
<style lang="
|
|
169
|
-
|
|
168
|
+
<style lang="less" scoped>
|
|
170
169
|
.input-child-range {
|
|
171
170
|
background-color: #fff;
|
|
172
171
|
border: 1px solid #dcdfe6;
|
|
@@ -199,4 +198,4 @@ export default {
|
|
|
199
198
|
color: #c0c4cc;
|
|
200
199
|
cursor: not-allowed;
|
|
201
200
|
}
|
|
202
|
-
</style>
|
|
201
|
+
</style>
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
},
|
|
25
25
|
content: String,
|
|
26
26
|
disable: {
|
|
27
|
-
type:Boolean,
|
|
27
|
+
type: Boolean,
|
|
28
28
|
default: false
|
|
29
29
|
},
|
|
30
30
|
icon: {
|
|
@@ -32,23 +32,21 @@ export default {
|
|
|
32
32
|
default: 'n20-icon-yuefenqiehuan-zuoce'
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
}
|
|
35
|
+
}
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
<style lang="scss" scoped>
|
|
38
|
+
<style lang="less" scoped>
|
|
40
39
|
.page-header {
|
|
41
40
|
display: flex;
|
|
42
41
|
line-height: 20px;
|
|
43
42
|
padding-bottom: 2px;
|
|
44
|
-
border-bottom: 1px solid rgba(0,0,0,0.
|
|
43
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
45
44
|
.page-header__left {
|
|
46
45
|
display: flex;
|
|
47
46
|
align-items: center;
|
|
48
47
|
cursor: pointer;
|
|
49
48
|
margin-right: 16px;
|
|
50
49
|
position: relative;
|
|
51
|
-
|
|
52
50
|
}
|
|
53
51
|
.page-header__left:hover {
|
|
54
52
|
color: var(--color-primary);
|
|
@@ -57,7 +55,7 @@ export default {
|
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
57
|
.page-header__left:after {
|
|
60
|
-
content:
|
|
58
|
+
content: '';
|
|
61
59
|
position: absolute;
|
|
62
60
|
width: 1px;
|
|
63
61
|
height: 16px;
|
|
@@ -69,12 +67,12 @@ export default {
|
|
|
69
67
|
.page-header__title {
|
|
70
68
|
font-size: 14px;
|
|
71
69
|
line-height: 20px;
|
|
72
|
-
color: #
|
|
70
|
+
color: #3d4a57;
|
|
73
71
|
}
|
|
74
72
|
.page-header__content {
|
|
75
73
|
font-size: 14px;
|
|
76
74
|
line-height: 20px;
|
|
77
|
-
color: #
|
|
75
|
+
color: #3d4a57;
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
|
-
</style>
|
|
78
|
+
</style>
|
|
@@ -11,33 +11,38 @@
|
|
|
11
11
|
class="input-w"
|
|
12
12
|
@keyup.enter.native="handleSearch"
|
|
13
13
|
>
|
|
14
|
-
<i
|
|
14
|
+
<i
|
|
15
|
+
slot="suffix"
|
|
16
|
+
class="el-input__icon el-icon-search"
|
|
17
|
+
@click="handleSearch"
|
|
18
|
+
></i>
|
|
15
19
|
</el-input>
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
<div class="flex-column m-t-14">
|
|
22
|
+
<el-checkbox
|
|
19
23
|
v-model="checkbox"
|
|
20
24
|
:indeterminate="isIndeterminate"
|
|
21
25
|
@change="checkboxChange"
|
|
22
26
|
>{{ '全部' + '(' + this.thIndex.length + ')' }}</el-checkbox
|
|
23
27
|
>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
<el-checkbox-group
|
|
29
|
+
v-model="checkLists"
|
|
30
|
+
class="flex-column"
|
|
31
|
+
@change="handleCheckedCitiesChange"
|
|
32
|
+
>
|
|
33
|
+
<el-checkbox
|
|
34
|
+
v-for="item in checkList[property]"
|
|
35
|
+
:key="item"
|
|
36
|
+
class="m-t-s"
|
|
37
|
+
:label="item"
|
|
38
|
+
>{{ item + '(' + countNum(item) + ')' }}</el-checkbox
|
|
39
|
+
>
|
|
40
|
+
</el-checkbox-group>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="flex-box flex-c m-t-m">
|
|
43
|
+
<el-button type="primary" @click="confirm">确认</el-button>
|
|
44
|
+
<el-button plain @click="reset">清空</el-button>
|
|
45
|
+
</div>
|
|
41
46
|
<i slot="reference" class="el-icon-arrow-down"></i>
|
|
42
47
|
</el-popover>
|
|
43
48
|
</template>
|
|
@@ -69,7 +74,7 @@ export default {
|
|
|
69
74
|
return {
|
|
70
75
|
value: '',
|
|
71
76
|
checkLists: [],
|
|
72
|
-
list:[],
|
|
77
|
+
list: [],
|
|
73
78
|
checkbox: false,
|
|
74
79
|
isIndeterminate: true
|
|
75
80
|
}
|
|
@@ -88,12 +93,11 @@ export default {
|
|
|
88
93
|
if (!this.value) {
|
|
89
94
|
this.checkList[this.property] = this.list
|
|
90
95
|
} else {
|
|
91
|
-
this.checkList[this.property] = this.list.filter(v => {
|
|
96
|
+
this.checkList[this.property] = this.list.filter((v) => {
|
|
92
97
|
return v.indexOf(this.value) !== -1
|
|
93
98
|
})
|
|
94
99
|
}
|
|
95
100
|
this.$forceUpdate()
|
|
96
|
-
|
|
97
101
|
},
|
|
98
102
|
reset() {
|
|
99
103
|
this.value = ''
|
|
@@ -123,7 +127,7 @@ export default {
|
|
|
123
127
|
}
|
|
124
128
|
</script>
|
|
125
129
|
|
|
126
|
-
<style lang="
|
|
130
|
+
<style lang="less">
|
|
127
131
|
.table-header-popover.el-popover {
|
|
128
132
|
padding: 16px;
|
|
129
133
|
}
|