n20-common-lib 2.2.32 → 2.2.34
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 +1 -1
- package/src/components/ApprovalCard/index.vue +9 -5
- package/src/components/DateSelect/index.vue +16 -2
- package/src/components/DateSelect/quarterDatePicker.vue +61 -4
- package/src/components/Layout/SubContent/index.vue +1 -1
- package/src/components/Layout/index.vue +1 -1
- package/src/components/Layout/indexN.vue +1 -1
- package/src/components/SelectDatePickerPro/index.vue +4 -0
- package/style/index.css +3 -3
- package/theme/blue.css +2 -2
- package/theme/cctcRed.css +2 -2
- package/theme/green.css +2 -2
- package/theme/lightBlue.css +2 -2
- package/theme/orange.css +2 -2
- package/theme/purple.css +2 -2
- package/theme/red.css +2 -2
- package/theme/yellow.css +2 -2
package/package.json
CHANGED
|
@@ -18,20 +18,24 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
<div v-else class="flex-box">
|
|
20
20
|
<div class="result-left-name" :class="item | typeF(status, 'color-')">{{ $lc(item.resultName) }}</div>
|
|
21
|
-
<div
|
|
21
|
+
<div
|
|
22
|
+
v-title="item.assignee"
|
|
23
|
+
class="flex-box flex-item n20-worker m-r-s text-ellipsis"
|
|
24
|
+
:show-overflow-tooltip="true"
|
|
25
|
+
>
|
|
22
26
|
<div
|
|
23
27
|
v-title="item.memberName"
|
|
24
28
|
:show-overflow-tooltip="true"
|
|
25
|
-
class="n20-worker m-r-s text-ellipsis"
|
|
26
|
-
style="
|
|
29
|
+
class="flex-item n20-worker m-r-s text-ellipsis"
|
|
30
|
+
style="width: 250px"
|
|
27
31
|
>
|
|
28
32
|
{{ item.memberName }}
|
|
29
33
|
</div>
|
|
30
34
|
<div
|
|
31
35
|
v-title="item.roleName"
|
|
32
|
-
class="n20-worker text-ellipsis"
|
|
36
|
+
class="flex-item n20-worker text-ellipsis"
|
|
33
37
|
:show-overflow-tooltip="true"
|
|
34
|
-
style="
|
|
38
|
+
style="width: 250px"
|
|
35
39
|
>
|
|
36
40
|
{{ item.roleName }}
|
|
37
41
|
</div>
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
value-format="yyyy-MM-dd"
|
|
14
14
|
type="daterange"
|
|
15
15
|
clearable
|
|
16
|
+
v-bind="$attrs"
|
|
16
17
|
:placeholder="'选择日' | $lc"
|
|
18
|
+
v-on="$listeners"
|
|
17
19
|
@change="dayChange"
|
|
18
20
|
/>
|
|
19
21
|
<date-picker
|
|
@@ -22,9 +24,10 @@
|
|
|
22
24
|
v-model="week"
|
|
23
25
|
format="yyyy 第 WW 周"
|
|
24
26
|
type="week"
|
|
25
|
-
:picker-options="
|
|
27
|
+
:picker-options="attrs"
|
|
26
28
|
:default-time="['00:00:00', '23:59:59']"
|
|
27
29
|
:placeholder="'选择周' | $lc"
|
|
30
|
+
v-on="$listeners"
|
|
28
31
|
@change="weekChange"
|
|
29
32
|
/>
|
|
30
33
|
|
|
@@ -32,23 +35,33 @@
|
|
|
32
35
|
v-if="type === '月'"
|
|
33
36
|
key="month"
|
|
34
37
|
v-model="month"
|
|
38
|
+
v-bind="$attrs"
|
|
35
39
|
type="month"
|
|
36
40
|
format="yyyy-MM"
|
|
37
41
|
value-format="yyyy-MM"
|
|
38
42
|
:editable="false"
|
|
39
43
|
:placeholder="'选择月' | $lc"
|
|
44
|
+
v-on="$listeners"
|
|
40
45
|
@change="monthChange"
|
|
41
46
|
/>
|
|
42
|
-
<quarter-date-picker
|
|
47
|
+
<quarter-date-picker
|
|
48
|
+
v-if="type === '季'"
|
|
49
|
+
key="quarter"
|
|
50
|
+
v-model="quarter"
|
|
51
|
+
:disabled-date="this.attrs.disabledDate"
|
|
52
|
+
@change="handleChange"
|
|
53
|
+
/>
|
|
43
54
|
<date-picker
|
|
44
55
|
v-if="type === '年'"
|
|
45
56
|
key="year"
|
|
46
57
|
v-model="year"
|
|
58
|
+
v-bind="$attrs"
|
|
47
59
|
type="year"
|
|
48
60
|
format="yyyy"
|
|
49
61
|
value-format="yyyy"
|
|
50
62
|
:editable="false"
|
|
51
63
|
:placeholder="'选择年' | $lc"
|
|
64
|
+
v-on="$listeners"
|
|
52
65
|
@change="yearChange"
|
|
53
66
|
/>
|
|
54
67
|
</div>
|
|
@@ -81,6 +94,7 @@ export default {
|
|
|
81
94
|
}
|
|
82
95
|
},
|
|
83
96
|
data() {
|
|
97
|
+
this.attrs = Object.assign({ firstDayOfWeek: 1 }, this.$attrs['picker-options'])
|
|
84
98
|
return {
|
|
85
99
|
day: '',
|
|
86
100
|
week: '',
|
|
@@ -27,16 +27,40 @@
|
|
|
27
27
|
|
|
28
28
|
<div class="el-picker-panel__content">
|
|
29
29
|
<div v-if="isQuarter" class="n20-quarter-date-picker__grid">
|
|
30
|
-
<el-button
|
|
30
|
+
<el-button
|
|
31
|
+
type="text"
|
|
32
|
+
:disabled="isDisabled(year, '1')"
|
|
33
|
+
size="medium"
|
|
34
|
+
:class="this.season == 1 ? 'isactive' : ''"
|
|
35
|
+
class="n20-quarter-date-picker__btn"
|
|
36
|
+
@click="selectSeason(0)"
|
|
31
37
|
>{{ year }}年 第一季度</el-button
|
|
32
38
|
>
|
|
33
|
-
<el-button
|
|
39
|
+
<el-button
|
|
40
|
+
type="text"
|
|
41
|
+
:disabled="isDisabled(year, '2')"
|
|
42
|
+
:class="this.season == 2 ? 'isactive' : ''"
|
|
43
|
+
size="medium"
|
|
44
|
+
class="n20-quarter-date-picker__btn"
|
|
45
|
+
@click="selectSeason(1)"
|
|
34
46
|
>{{ year }}年 第二季度</el-button
|
|
35
47
|
>
|
|
36
|
-
<el-button
|
|
48
|
+
<el-button
|
|
49
|
+
type="text"
|
|
50
|
+
:class="this.season == 3 ? 'isactive' : ''"
|
|
51
|
+
:disabled="isDisabled(year, '3')"
|
|
52
|
+
size="medium"
|
|
53
|
+
class="n20-quarter-date-picker__btn"
|
|
54
|
+
@click="selectSeason(2)"
|
|
37
55
|
>{{ year }}年 第三季度</el-button
|
|
38
56
|
>
|
|
39
|
-
<el-button
|
|
57
|
+
<el-button
|
|
58
|
+
type="text"
|
|
59
|
+
:class="this.season == 4 ? 'isactive' : ''"
|
|
60
|
+
:disabled="isDisabled(year, '4')"
|
|
61
|
+
size="medium"
|
|
62
|
+
class="n20-quarter-date-picker__btn"
|
|
63
|
+
@click="selectSeason(3)"
|
|
40
64
|
>{{ year }}年 第四季度</el-button
|
|
41
65
|
>
|
|
42
66
|
</div>
|
|
@@ -81,6 +105,10 @@ export default {
|
|
|
81
105
|
return {}
|
|
82
106
|
}
|
|
83
107
|
},
|
|
108
|
+
disabledDate: {
|
|
109
|
+
type: Function,
|
|
110
|
+
default: () => false
|
|
111
|
+
},
|
|
84
112
|
valueArr: {
|
|
85
113
|
default: () => {
|
|
86
114
|
return ['01-01 - 03-31', '04-01 - 06-30', '07-01 - 09-30', '10-01 - 12-31']
|
|
@@ -163,6 +191,35 @@ export default {
|
|
|
163
191
|
this.showValue = `${this.year} 年 ${this.season} 季度`
|
|
164
192
|
that.$emit('input', { startDate: this.year + '-' + arr[0], endDate: this.year + '-' + arr[1] })
|
|
165
193
|
that.$emit('change', { startDate: this.year + '-' + arr[0], endDate: this.year + '-' + arr[1] }) // 每次选择时间都将当前选择时间发送到父组件
|
|
194
|
+
},
|
|
195
|
+
isDisabled(year, type) {
|
|
196
|
+
let quarterDate
|
|
197
|
+
switch (type) {
|
|
198
|
+
case '1':
|
|
199
|
+
quarterDate = dayjs(year + '03')
|
|
200
|
+
.endOf('month')
|
|
201
|
+
.toDate()
|
|
202
|
+
break
|
|
203
|
+
case '2':
|
|
204
|
+
quarterDate = dayjs(year + '06')
|
|
205
|
+
.endOf('month')
|
|
206
|
+
.toDate()
|
|
207
|
+
break
|
|
208
|
+
case '3':
|
|
209
|
+
quarterDate = dayjs(year + '09')
|
|
210
|
+
.endOf('month')
|
|
211
|
+
.toDate()
|
|
212
|
+
break
|
|
213
|
+
case '4':
|
|
214
|
+
quarterDate = dayjs(year + '12')
|
|
215
|
+
.endOf('month')
|
|
216
|
+
.toDate()
|
|
217
|
+
break
|
|
218
|
+
}
|
|
219
|
+
if (this.disabledDate) {
|
|
220
|
+
return this.disabledDate(quarterDate)
|
|
221
|
+
}
|
|
222
|
+
return false
|
|
166
223
|
}
|
|
167
224
|
}
|
|
168
225
|
}
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
filters: {
|
|
17
17
|
keyF({ path, query = {} }) {
|
|
18
18
|
path = path.replace(/^\//, routerBase)
|
|
19
|
-
return path + '^' + JSON.stringify({ ...query, _fromNo: undefined }) + '^' + window._tab_route_key[path]
|
|
19
|
+
return path + '^' + JSON.stringify({ ...query, _fromNo: undefined }) + '^' + (window._tab_route_key[path] || 0)
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
props: {
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
51
51
|
},
|
|
52
52
|
filters: {
|
|
53
53
|
keyF({ path, query = {} }) {
|
|
54
|
-
return path + '^' + JSON.stringify({ ...query, _fromNo: undefined }) + '^' + window._tab_route_key[path]
|
|
54
|
+
return path + '^' + JSON.stringify({ ...query, _fromNo: undefined }) + '^' + (window._tab_route_key[path] || 0)
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
props: {
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
51
51
|
},
|
|
52
52
|
filters: {
|
|
53
53
|
keyF({ path, query = {} }) {
|
|
54
|
-
return path + '^' + JSON.stringify({ ...query, _fromNo: undefined }) + '^' + window._tab_route_key[path]
|
|
54
|
+
return path + '^' + JSON.stringify({ ...query, _fromNo: undefined }) + '^' + (window._tab_route_key[path] || 0)
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
props: {
|
|
@@ -23,9 +23,11 @@
|
|
|
23
23
|
v-model="week"
|
|
24
24
|
format="yyyy 第 WW 周"
|
|
25
25
|
type="week"
|
|
26
|
+
v-bind="$attrs"
|
|
26
27
|
:picker-options="attrs"
|
|
27
28
|
:default-time="['00:00:00', '23:59:59']"
|
|
28
29
|
:placeholder="'选择周' | $lc"
|
|
30
|
+
v-on="$listeners"
|
|
29
31
|
/>
|
|
30
32
|
|
|
31
33
|
<date-picker
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
:editable="false"
|
|
39
41
|
v-bind="$attrs"
|
|
40
42
|
:placeholder="'选择月' | $lc"
|
|
43
|
+
v-on="$listeners"
|
|
41
44
|
/>
|
|
42
45
|
<quarter-date-picker
|
|
43
46
|
v-if="type === '季'"
|
|
@@ -55,6 +58,7 @@
|
|
|
55
58
|
value-format="yyyy"
|
|
56
59
|
:editable="false"
|
|
57
60
|
:placeholder="'选择年' | $lc"
|
|
61
|
+
v-on="$listeners"
|
|
58
62
|
/>
|
|
59
63
|
</div>
|
|
60
64
|
</template>
|