n20-common-lib 2.9.32 → 2.9.33
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
|
@@ -126,11 +126,19 @@ export default {
|
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
128
|
watch: {
|
|
129
|
-
'uploadParams.bussValue'
|
|
130
|
-
|
|
129
|
+
'uploadParams.bussValue': {
|
|
130
|
+
handler(val) {
|
|
131
|
+
this.getSelectList()
|
|
132
|
+
},
|
|
133
|
+
immediate: true,
|
|
134
|
+
deep: true
|
|
131
135
|
},
|
|
132
|
-
'uploadParams.bussId'
|
|
133
|
-
|
|
136
|
+
'uploadParams.bussId': {
|
|
137
|
+
handler() {
|
|
138
|
+
this.getTabelList()
|
|
139
|
+
},
|
|
140
|
+
immediate: true,
|
|
141
|
+
deep: true
|
|
134
142
|
}
|
|
135
143
|
},
|
|
136
144
|
methods: {
|
|
@@ -139,7 +147,10 @@ export default {
|
|
|
139
147
|
},
|
|
140
148
|
// 附件类型获取
|
|
141
149
|
async getSelectList() {
|
|
142
|
-
const { code, data } = await axios.post(
|
|
150
|
+
const { code, data } = await axios.post(
|
|
151
|
+
`/neams/eamsattachfile/getByBussValues`,
|
|
152
|
+
Array.isArray(this.uploadParams.bussValue) ? this.uploadParams.bussValue : [this.uploadParams.bussValue]
|
|
153
|
+
)
|
|
143
154
|
if (code === 200) {
|
|
144
155
|
this.uploadFlag = true
|
|
145
156
|
this.dataPorp.typeOptions = data.map((item) => ({ ...item, type: item.attno, label: item.attname }))
|
|
@@ -151,7 +162,7 @@ export default {
|
|
|
151
162
|
return this.$message.warning('请勾选附件')
|
|
152
163
|
}
|
|
153
164
|
const res = await axios.post(
|
|
154
|
-
`/
|
|
165
|
+
`/neams/eamsbaserecord/batchDownloadFiles`,
|
|
155
166
|
filesId.map((beid) => ({ beid })),
|
|
156
167
|
{
|
|
157
168
|
responseType: 'blob'
|
|
@@ -164,7 +175,7 @@ export default {
|
|
|
164
175
|
async getTabelList() {
|
|
165
176
|
const { bussValues, bussId } = this.uploadParams
|
|
166
177
|
const params = Array.isArray(bussValues) ? { bussValues, bussId } : { bussValue: bussValues, bussId }
|
|
167
|
-
const { code, data } = await axios.post(`/
|
|
178
|
+
const { code, data } = await axios.post(`/neams/eamsbaserecord/queryList?t=${Date.now()}`, params)
|
|
168
179
|
if (code === 200) {
|
|
169
180
|
this.tableData = data || []
|
|
170
181
|
}
|
|
@@ -203,7 +214,7 @@ export default {
|
|
|
203
214
|
const filesId = rows.filter((item) => item.beid).map((item) => item.beid)
|
|
204
215
|
|
|
205
216
|
if (filesId.length > 0) {
|
|
206
|
-
const res = await axios.post(`/
|
|
217
|
+
const res = await axios.post(`/neams/eamsbaserecord/delete`, filesId)
|
|
207
218
|
|
|
208
219
|
if (res.code === 200) {
|
|
209
220
|
this.tableData = this.tableData.filter((item) => !filesId.includes(item.beid))
|
|
@@ -238,7 +249,7 @@ export default {
|
|
|
238
249
|
)
|
|
239
250
|
data.append('date', dayjs().format('YYYY-MM-DD HH:mm:ss') + ',2099-12-31 23:59:59')
|
|
240
251
|
|
|
241
|
-
return axios.post(`/
|
|
252
|
+
return axios.post(`/neams/eamsbaserecord/save?r=${Math.random()}`, data, {
|
|
242
253
|
headers: {
|
|
243
254
|
'Content-Type': 'multipart/form-data'
|
|
244
255
|
},
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-popover
|
|
3
|
+
ref="popover"
|
|
4
|
+
v-model="showHalfYear"
|
|
5
|
+
popper-class="half-year-picker el-date-picker"
|
|
6
|
+
width="324"
|
|
7
|
+
placement="bottom-start"
|
|
8
|
+
trigger="click"
|
|
9
|
+
>
|
|
10
|
+
<div class="el-picker-panel__body">
|
|
11
|
+
<div class="el-date-picker__header el-date-picker__header--bordered">
|
|
12
|
+
<button
|
|
13
|
+
type="button"
|
|
14
|
+
aria-label="前一年"
|
|
15
|
+
class="el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left"
|
|
16
|
+
@click="prev"
|
|
17
|
+
></button>
|
|
18
|
+
<span role="button" class="el-date-picker__header-label" @click="handleYear">{{ year }}{{ '年' | $lc }}</span>
|
|
19
|
+
<button
|
|
20
|
+
type="button"
|
|
21
|
+
aria-label="后一年"
|
|
22
|
+
class="el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right"
|
|
23
|
+
@click="next"
|
|
24
|
+
></button>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div v-if="isHalfYear" class="half-year-picker__grid">
|
|
28
|
+
<el-button
|
|
29
|
+
type="text"
|
|
30
|
+
class="half-year-picker__btn"
|
|
31
|
+
:class="halfYear === 1 ? 'isactive' : ''"
|
|
32
|
+
@click="selectHalfYear(0)"
|
|
33
|
+
>{{ year }}{{ '年 上半年' | $lc }}</el-button
|
|
34
|
+
>
|
|
35
|
+
<el-button
|
|
36
|
+
type="text"
|
|
37
|
+
class="half-year-picker__btn"
|
|
38
|
+
:class="halfYear === 2 ? 'isactive' : ''"
|
|
39
|
+
@click="selectHalfYear(1)"
|
|
40
|
+
>{{ year }}{{ '年 下半年' | $lc }}</el-button
|
|
41
|
+
>
|
|
42
|
+
</div>
|
|
43
|
+
<div v-else class="n20-quarter-date-picker__year__grid">
|
|
44
|
+
<el-button
|
|
45
|
+
v-for="item in getYear"
|
|
46
|
+
:key="item"
|
|
47
|
+
type="text"
|
|
48
|
+
size="medium"
|
|
49
|
+
:class="year === item ? 'color-primary' : ''"
|
|
50
|
+
class="n20-quarter-date-picker__btn"
|
|
51
|
+
@click="selectYear(item)"
|
|
52
|
+
>{{ item }}{{ '年' | $lc }}</el-button
|
|
53
|
+
>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<el-input
|
|
57
|
+
slot="reference"
|
|
58
|
+
ref="halfYear"
|
|
59
|
+
v-model="showValue"
|
|
60
|
+
class="el-date-editor"
|
|
61
|
+
clearable
|
|
62
|
+
:placeholder="'选择半年' | $lc"
|
|
63
|
+
@focus="focusFn"
|
|
64
|
+
>
|
|
65
|
+
<i slot="suffix" class="el-input__icon el-icon-date" :class="showValue && 'half-year-picker__input--icon'"></i>
|
|
66
|
+
</el-input>
|
|
67
|
+
</el-popover>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<script>
|
|
71
|
+
export default {
|
|
72
|
+
props: {
|
|
73
|
+
value: {
|
|
74
|
+
type: Object,
|
|
75
|
+
default: () => ({})
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
data() {
|
|
79
|
+
return {
|
|
80
|
+
showHalfYear: false,
|
|
81
|
+
year: new Date().getFullYear(),
|
|
82
|
+
isHalfYear: true,
|
|
83
|
+
halfYear: 1,
|
|
84
|
+
showValue: ''
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
computed: {
|
|
88
|
+
getYear() {
|
|
89
|
+
let nfOptionsArray = []
|
|
90
|
+
for (var i = this.year - 4; i <= this.year + 5; i++) {
|
|
91
|
+
nfOptionsArray.push(i)
|
|
92
|
+
}
|
|
93
|
+
return nfOptionsArray
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
watch: {
|
|
97
|
+
value: {
|
|
98
|
+
handler(val) {
|
|
99
|
+
if (val && val.startDate && val.endDate) {
|
|
100
|
+
const regex = /(\d{4})-(\d{2})-(\d{2})/
|
|
101
|
+
const startDateMatch = val.startDate.match(regex)
|
|
102
|
+
const [, year, startMonth] = startDateMatch
|
|
103
|
+
this.year = year
|
|
104
|
+
this.halfYear = startMonth === '01' ? 1 : 2
|
|
105
|
+
this.showValue = `${year} 年 ${startMonth === '01' ? '上半年' : '下半年'}`
|
|
106
|
+
} else {
|
|
107
|
+
this.showValue = ''
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
immediate: true
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
methods: {
|
|
114
|
+
selectYear(i) {
|
|
115
|
+
this.year = i
|
|
116
|
+
this.isHalfYear = true
|
|
117
|
+
},
|
|
118
|
+
prev() {
|
|
119
|
+
this.year = this.year * 1 - 1
|
|
120
|
+
},
|
|
121
|
+
next() {
|
|
122
|
+
this.year = this.year * 1 + 1
|
|
123
|
+
},
|
|
124
|
+
handleYear() {
|
|
125
|
+
this.isHalfYear = false
|
|
126
|
+
},
|
|
127
|
+
focusFn() {
|
|
128
|
+
this.$refs.halfYear.blur()
|
|
129
|
+
},
|
|
130
|
+
selectHalfYear(i) {
|
|
131
|
+
this.halfYear = i + 1
|
|
132
|
+
let arr = [`${this.year}-${i === 0 ? '01' : '07'}`, `${this.year}-${i === 0 ? '06' : '12'}`]
|
|
133
|
+
this.showHalfYear = false
|
|
134
|
+
this.showValue = `${this.year} 年 ${i === 0 ? '上半年' : '下半年'}`
|
|
135
|
+
this.$emit('input', { startDate: arr[0] + '-01', endDate: arr[1] + '-31' })
|
|
136
|
+
this.$emit('change', { startDate: arr[0] + '-01', endDate: arr[1] + '-31' })
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
</script>
|
|
141
|
+
|
|
142
|
+
<style>
|
|
143
|
+
.half-year-picker__grid {
|
|
144
|
+
display: flex;
|
|
145
|
+
justify-content: space-around;
|
|
146
|
+
}
|
|
147
|
+
.half-year-picker__btn {
|
|
148
|
+
flex: 1;
|
|
149
|
+
padding: 10px;
|
|
150
|
+
border: none;
|
|
151
|
+
background: #fff;
|
|
152
|
+
color: var(--text-color-base);
|
|
153
|
+
outline: none;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
}
|
|
156
|
+
.half-year-picker__btn.isactive {
|
|
157
|
+
color: var(--color-primary);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.el-date-editor:hover .half-year-picker__input--icon {
|
|
161
|
+
display: none;
|
|
162
|
+
}
|
|
163
|
+
</style>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
class="el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left"
|
|
17
17
|
@click="prev"
|
|
18
18
|
></button>
|
|
19
|
-
<span role="button" class="el-date-picker__header-label" @click="handleYear">{{ year }}
|
|
19
|
+
<span role="button" class="el-date-picker__header-label" @click="handleYear">{{ year }}{{ '年' | $lc }}</span>
|
|
20
20
|
<button
|
|
21
21
|
type="button"
|
|
22
22
|
aria-label="后一年"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
class="n20-quarter-date-picker__btn"
|
|
35
35
|
:class="this.season == 1 ? 'isactive' : ''"
|
|
36
36
|
@click="selectSeason(0)"
|
|
37
|
-
>{{ year }}年
|
|
37
|
+
>{{ year }}{{ '年' | $lc }} {{ '第一季度' | $lc }}</el-button
|
|
38
38
|
>
|
|
39
39
|
<el-button
|
|
40
40
|
type="text"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
class="n20-quarter-date-picker__btn"
|
|
44
44
|
:class="this.season == 2 ? 'isactive' : ''"
|
|
45
45
|
@click="selectSeason(1)"
|
|
46
|
-
>{{ year }}年
|
|
46
|
+
>{{ year }}{{ '年' | $lc }} {{ '第二季度' | $lc }}</el-button
|
|
47
47
|
>
|
|
48
48
|
<el-button
|
|
49
49
|
type="text"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
class="n20-quarter-date-picker__btn"
|
|
53
53
|
:class="this.season == 3 ? 'isactive' : ''"
|
|
54
54
|
@click="selectSeason(2)"
|
|
55
|
-
>{{ year }}年
|
|
55
|
+
>{{ year }}{{ '年' | $lc }} {{ '第三季度' | $lc }}</el-button
|
|
56
56
|
>
|
|
57
57
|
<el-button
|
|
58
58
|
:disabled="isDisabled(year, '4')"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
class="n20-quarter-date-picker__btn"
|
|
62
62
|
:class="this.season == 4 ? 'isactive' : ''"
|
|
63
63
|
@click="selectSeason(3)"
|
|
64
|
-
>{{ year }}年
|
|
64
|
+
>{{ year }}{{ '年' | $lc }} {{ '第四季度' | $lc }}</el-button
|
|
65
65
|
>
|
|
66
66
|
</div>
|
|
67
67
|
<div v-else class="n20-quarter-date-picker__year__grid">
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
size="medium"
|
|
73
73
|
:class="year === item ? 'color-primary' : ''"
|
|
74
74
|
class="n20-quarter-date-picker__btn"
|
|
75
|
-
@click="
|
|
76
|
-
>{{ item }}
|
|
75
|
+
@click="selectYear(item)"
|
|
76
|
+
>{{ item }}{{ '年' | $lc }}</el-button
|
|
77
77
|
>
|
|
78
78
|
</div>
|
|
79
79
|
</div>
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
ref="quarterDate"
|
|
84
84
|
v-model="showValue"
|
|
85
85
|
class="el-date-editor"
|
|
86
|
-
placeholder="选择季度"
|
|
86
|
+
:placeholder="'选择季度' | $lc"
|
|
87
87
|
clearable
|
|
88
88
|
@focus="changeFocus"
|
|
89
89
|
>
|
|
@@ -201,7 +201,7 @@ export default {
|
|
|
201
201
|
this.isQuarter = true
|
|
202
202
|
this.$refs.quarterDate.blur()
|
|
203
203
|
},
|
|
204
|
-
|
|
204
|
+
selectYear(i) {
|
|
205
205
|
this.year = i
|
|
206
206
|
this.isQuarter = true
|
|
207
207
|
},
|
package/src/index.js
CHANGED
|
@@ -74,6 +74,7 @@ import AttachmentPass from './components/AttachmentPass/index.vue'
|
|
|
74
74
|
// 新版日期选择框
|
|
75
75
|
import BusiDatePicker from './components/DateSelect/busiDate.vue'
|
|
76
76
|
import QuarterDatePicker from './components/DateSelect/quarterDatePicker.vue'
|
|
77
|
+
import HalfYearPicker from './components/SelectDatePickerPro/halfYearPicker.vue'
|
|
77
78
|
import SelectDatePickerPro from './components/SelectDatePickerPro/index.vue'
|
|
78
79
|
import TableTransfer from './components/TableTransfer/index.vue'
|
|
79
80
|
import UploadMsg from './components/Upload/uploadMsg.vue'
|
|
@@ -214,6 +215,7 @@ const components = [
|
|
|
214
215
|
Diff,
|
|
215
216
|
SelectDatePicker,
|
|
216
217
|
SelectDatePickerPro,
|
|
218
|
+
HalfYearPicker,
|
|
217
219
|
QuarterDatePicker,
|
|
218
220
|
BusiDatePicker,
|
|
219
221
|
TableTransfer,
|
|
@@ -333,6 +335,7 @@ export {
|
|
|
333
335
|
Pagination,
|
|
334
336
|
Preview,
|
|
335
337
|
QuarterDatePicker,
|
|
338
|
+
HalfYearPicker,
|
|
336
339
|
SecondaryTab,
|
|
337
340
|
SelectDatePicker,
|
|
338
341
|
SelectDatePickerPro,
|