n20-common-lib 2.2.10 → 2.2.12
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 +2 -1
- package/src/components/ApprovalButtons/setCarboncopyProp.vue +5 -1
- package/src/components/DateSelect/index.vue +36 -16
- package/src/components/SelectDatePickerPro/index.vue +33 -12
- package/src/components/SelectDatePickerPro/quarterDatePicker.vue +25 -1
- package/src/components/TableOperateColumn/index.vue +2 -2
- package/u-table.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n20-common-lib",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"theme/fonts",
|
|
37
37
|
"bpmn2svg",
|
|
38
38
|
"g6.js",
|
|
39
|
+
"u-table.js",
|
|
39
40
|
"nstc-g6/index.js",
|
|
40
41
|
"nstc-g6/assets",
|
|
41
42
|
"nstc-g6/components",
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
</span>
|
|
8
8
|
<span class="m-l m-r-ss">{{ '单位名称' | $lc }}</span>
|
|
9
9
|
<span>
|
|
10
|
-
<el-input v-model="searchObj.cltName" size="mini" :placeholder="'
|
|
10
|
+
<el-input v-model="searchObj.cltName" size="mini" :placeholder="'请输入单位名称' | $lc" />
|
|
11
|
+
</span>
|
|
12
|
+
<span class="m-l m-r-ss">{{ '角色名称' | $lc }}</span>
|
|
13
|
+
<span>
|
|
14
|
+
<el-input v-model="searchObj.roleName" size="mini" :placeholder="'请输入角色名称' | $lc" />
|
|
11
15
|
</span>
|
|
12
16
|
<el-button class="m-l" plain size="mini" @click="resetFn">{{ '重置' | $lc }}</el-button>
|
|
13
17
|
<el-button type="primary" size="mini" @click="searchFn">{{ '查询' | $lc }}</el-button>
|
|
@@ -130,10 +130,14 @@ export default {
|
|
|
130
130
|
this.$emit('selectChange', val)
|
|
131
131
|
},
|
|
132
132
|
|
|
133
|
-
dayChange(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
dayChange(value) {
|
|
134
|
+
if (value) {
|
|
135
|
+
this.$emit('input', value)
|
|
136
|
+
this.$emit('change', { startDate: value[0], endDate: value[1] })
|
|
137
|
+
} else {
|
|
138
|
+
this.$emit('input', '')
|
|
139
|
+
this.$emit('change', { startDate: '', endDate: '' })
|
|
140
|
+
}
|
|
137
141
|
},
|
|
138
142
|
timestampToTime(timestamp) {
|
|
139
143
|
var date = new Date(timestamp) // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
|
@@ -143,7 +147,6 @@ export default {
|
|
|
143
147
|
return Y + M + D
|
|
144
148
|
},
|
|
145
149
|
weekChange(val) {
|
|
146
|
-
console.log(val)
|
|
147
150
|
let todayDay = val ? new Date(val) : new Date()
|
|
148
151
|
let todayOfWeek = todayDay.getDay()
|
|
149
152
|
let spendDay = 1
|
|
@@ -164,21 +167,38 @@ export default {
|
|
|
164
167
|
this.$emit('change', weekTime)
|
|
165
168
|
},
|
|
166
169
|
monthChange(val) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
170
|
+
if (val) {
|
|
171
|
+
let IMonth = {
|
|
172
|
+
startDate: dayjs(val).startOf('month').format('YYYY-MM-DD'),
|
|
173
|
+
endDate: dayjs(val).endOf('month').format('YYYY-MM-DD')
|
|
174
|
+
}
|
|
175
|
+
this.$emit('input', val)
|
|
176
|
+
this.$emit('change', IMonth)
|
|
177
|
+
} else {
|
|
178
|
+
let IMonth = {
|
|
179
|
+
startDate: '',
|
|
180
|
+
endDate: ''
|
|
181
|
+
}
|
|
182
|
+
this.$emit('input', val)
|
|
183
|
+
this.$emit('change', IMonth)
|
|
171
184
|
}
|
|
172
|
-
this.$emit('input', val)
|
|
173
|
-
this.$emit('change', IMonth)
|
|
174
185
|
},
|
|
175
186
|
yearChange(val) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
187
|
+
if (val) {
|
|
188
|
+
let iYear = {
|
|
189
|
+
startDate: dayjs(val).startOf('year').format('YYYY-MM-DD'),
|
|
190
|
+
endDate: dayjs(val).endOf('year').format('YYYY-MM-DD')
|
|
191
|
+
}
|
|
192
|
+
this.$emit('input', val)
|
|
193
|
+
this.$emit('change', iYear)
|
|
194
|
+
} else {
|
|
195
|
+
let iYear = {
|
|
196
|
+
startDate: '',
|
|
197
|
+
endDate: ''
|
|
198
|
+
}
|
|
199
|
+
this.$emit('input', val)
|
|
200
|
+
this.$emit('change', iYear)
|
|
179
201
|
}
|
|
180
|
-
this.$emit('input', val)
|
|
181
|
-
this.$emit('change', iYear)
|
|
182
202
|
},
|
|
183
203
|
handleChange(val) {
|
|
184
204
|
this.$emit('input', val)
|
|
@@ -154,13 +154,23 @@ export default {
|
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
156
|
set(value) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
if (value) {
|
|
158
|
+
let IMonth = {
|
|
159
|
+
startDate: dayjs(value).startOf('month').format('YYYY-MM-DD'),
|
|
160
|
+
endDate: dayjs(value).endOf('month').format('YYYY-MM-DD'),
|
|
161
|
+
typeDate: this.value.typeDate
|
|
162
|
+
}
|
|
163
|
+
this.$emit('input', IMonth)
|
|
164
|
+
this.$emit('change', IMonth)
|
|
165
|
+
} else {
|
|
166
|
+
let IMonth = {
|
|
167
|
+
startDate: '',
|
|
168
|
+
endDate: '',
|
|
169
|
+
typeDate: this.value.typeDate
|
|
170
|
+
}
|
|
171
|
+
this.$emit('input', IMonth)
|
|
172
|
+
this.$emit('change', IMonth)
|
|
161
173
|
}
|
|
162
|
-
this.$emit('input', IMonth)
|
|
163
|
-
this.$emit('change', IMonth)
|
|
164
174
|
}
|
|
165
175
|
},
|
|
166
176
|
quarter: {
|
|
@@ -168,6 +178,7 @@ export default {
|
|
|
168
178
|
return this.value
|
|
169
179
|
},
|
|
170
180
|
set(value) {
|
|
181
|
+
console.log(value, 2)
|
|
171
182
|
this.$emit('input', Object.assign(value, { typeDate: this.type }))
|
|
172
183
|
this.$emit('change', Object.assign(value, { typeDate: this.type }))
|
|
173
184
|
}
|
|
@@ -181,13 +192,23 @@ export default {
|
|
|
181
192
|
}
|
|
182
193
|
},
|
|
183
194
|
set(value) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
195
|
+
if (value) {
|
|
196
|
+
let iYear = {
|
|
197
|
+
startDate: dayjs(value).startOf('year').format('YYYY-MM-DD'),
|
|
198
|
+
endDate: dayjs(value).endOf('year').format('YYYY-MM-DD'),
|
|
199
|
+
typeDate: this.value.typeDate
|
|
200
|
+
}
|
|
201
|
+
this.$emit('input', iYear)
|
|
202
|
+
this.$emit('change', iYear)
|
|
203
|
+
} else {
|
|
204
|
+
let iYear = {
|
|
205
|
+
startDate: '',
|
|
206
|
+
endDate: '',
|
|
207
|
+
typeDate: this.value.typeDate
|
|
208
|
+
}
|
|
209
|
+
this.$emit('input', iYear)
|
|
210
|
+
this.$emit('change', iYear)
|
|
188
211
|
}
|
|
189
|
-
this.$emit('input', iYear)
|
|
190
|
-
this.$emit('change', iYear)
|
|
191
212
|
}
|
|
192
213
|
}
|
|
193
214
|
},
|
|
@@ -121,7 +121,31 @@ export default {
|
|
|
121
121
|
return nfOptionsArray
|
|
122
122
|
},
|
|
123
123
|
showValue: {
|
|
124
|
-
set() {
|
|
124
|
+
set(value) {
|
|
125
|
+
if (value) {
|
|
126
|
+
const regex = /(\d{4}) 年 (\d) 季度/
|
|
127
|
+
const match = value.match(regex)
|
|
128
|
+
const [, year, quarter] = match
|
|
129
|
+
switch (quarter) {
|
|
130
|
+
case '1':
|
|
131
|
+
this.$emit('input', { startDate: year + '01-01', endDate: year + '03-31' })
|
|
132
|
+
break
|
|
133
|
+
case '2':
|
|
134
|
+
this.$emit('input', { startDate: year + '04-01', endDate: year + '06-30' })
|
|
135
|
+
break
|
|
136
|
+
case '3':
|
|
137
|
+
this.$emit('input', { startDate: year + '07-01', endDate: year + '09-30' })
|
|
138
|
+
break
|
|
139
|
+
case '4':
|
|
140
|
+
this.$emit('input', { startDate: year + '10-01', endDate: year + '12-31' })
|
|
141
|
+
break
|
|
142
|
+
default:
|
|
143
|
+
break
|
|
144
|
+
}
|
|
145
|
+
} else {
|
|
146
|
+
this.$emit('input', { startDate: '', endDate: '' })
|
|
147
|
+
}
|
|
148
|
+
},
|
|
125
149
|
get() {
|
|
126
150
|
if (this.value.startDate && this.value.endDate) {
|
|
127
151
|
return `${dayjs(this.value.startDate).year()} 年 ${dayjs(this.value.endDate).quarter()} 季度`
|
package/u-table.js
ADDED