cnhis-design-vue 2.1.118 → 2.1.119
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/CHANGELOG.md +17 -0
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +63 -52
- package/es/big-table/style.css +1 -1
- package/es/button/index.js +2 -2
- package/es/captcha/index.js +3 -3
- package/es/card-reader-sdk/index.js +1 -1
- package/es/checkbox/index.js +1 -1
- package/es/color-picker/index.js +1 -1
- package/es/drag-layout/index.js +3 -3
- package/es/editor/index.js +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/fabric-chart/index.js +573 -75
- package/es/fabric-chart/style.css +1 -1
- package/es/form-table/index.js +20 -20
- package/es/full-calendar/index.js +436 -513
- package/es/full-calendar/style.css +1 -1
- package/es/index/index.js +1200 -754
- package/es/index/style.css +1 -1
- package/es/input/index.js +1 -1
- package/es/map/index.js +1 -1
- package/es/multi-chat/index.js +25 -25
- package/es/multi-chat-client/index.js +19 -19
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +4 -4
- package/es/multi-chat-setting/index.js +20 -20
- package/es/multi-chat-sip/index.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/scale-container/index.js +1 -1
- package/es/scale-view/index.js +27 -27
- package/es/select/index.js +4 -4
- package/es/select-label/index.js +3 -3
- package/es/select-person/index.js +2 -2
- package/es/select-tag/index.js +4 -4
- package/es/shortcut-setter/index.js +2 -2
- package/es/slider-tree/index.js +1 -1
- package/es/table-filter/index.js +30 -30
- package/es/tag/index.js +1 -1
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +1316 -865
- package/lib/cui.umd.js +1316 -865
- package/lib/cui.umd.min.js +65 -65
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +5 -1
- package/packages/big-table/src/utils/headerFilter.js +6 -3
- package/packages/fabric-chart/src/FabricChart.vue +1 -1
- package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +6 -6
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +6 -6
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +14 -10
- package/packages/fabric-chart/src/mixins/draw.js +97 -1
- package/packages/fabric-chart/src/mixins/drawExtracorporealCirculation.js +196 -0
- package/packages/fabric-chart/src/mixins/fabricCommon.js +1 -1
- package/packages/fabric-chart/src/utils/index.js +81 -0
- package/packages/full-calendar/src/FullCalendar.vue +96 -60
- package/packages/full-calendar/src/components/Tag.vue +3 -3
- package/packages/full-calendar/src/components/TagDetail.vue +3 -3
- package/packages/full-calendar/src/utils/index.js +14 -0
- package/packages/fabric-chart/src/mixins/type.js +0 -6
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
</div>
|
|
41
41
|
|
|
42
42
|
<TagDetail v-on="$listeners" ref="tagDetailRef"></TagDetail>
|
|
43
|
+
|
|
44
|
+
<div class="c-full-calendar__mask" v-if="!editable"></div>
|
|
43
45
|
</div>
|
|
44
46
|
</template>
|
|
45
47
|
|
|
@@ -55,11 +57,8 @@ import Tag from './components/Tag.vue';
|
|
|
55
57
|
import ListTag from './components/ListTag.vue';
|
|
56
58
|
import TagDetail from './components/TagDetail.vue';
|
|
57
59
|
// import SvgIcon from '@/component/svg/index.vue';
|
|
58
|
-
import { axiosInstance, getScheduleListApi, getScheduleSettingApi, getScheduleDataApi, queryScheduleListApi, saveOrUpdateScheduleApi, delScheduleApi } from './api';
|
|
59
60
|
import vexutils, { moment } from '@/utils/vexutils';
|
|
60
|
-
import {
|
|
61
|
-
|
|
62
|
-
window.moment = moment;
|
|
61
|
+
import { formatDate, weekIsMonth, viewMap, getAddTime } from './utils';
|
|
63
62
|
|
|
64
63
|
export default create({
|
|
65
64
|
name: 'full-calendar',
|
|
@@ -77,13 +76,26 @@ export default create({
|
|
|
77
76
|
[Icon.name]: Icon
|
|
78
77
|
},
|
|
79
78
|
props: {
|
|
80
|
-
serverPrefix: { type: String, default: 'inbox' },
|
|
79
|
+
// serverPrefix: { type: String, default: 'inbox' },
|
|
81
80
|
// userInfo: { type: Object, default: () => {} },
|
|
82
|
-
orgId: { type: String },
|
|
83
|
-
userId: { type: String },
|
|
84
|
-
token: { type: String },
|
|
81
|
+
// orgId: { type: String },
|
|
82
|
+
// userId: { type: String },
|
|
83
|
+
// token: { type: String },
|
|
84
|
+
editable: { type: Boolean, default: true },
|
|
85
85
|
showSearchHeader: { type: Boolean },
|
|
86
|
-
showSidebar: { type: Boolean }
|
|
86
|
+
showSidebar: { type: Boolean },
|
|
87
|
+
queryScheduleList: {
|
|
88
|
+
type: Function,
|
|
89
|
+
default: () => Promise.resolve([])
|
|
90
|
+
},
|
|
91
|
+
saveOrUpdateSchedule: {
|
|
92
|
+
type: Function,
|
|
93
|
+
default: () => Promise.resolve(true)
|
|
94
|
+
},
|
|
95
|
+
delSchedule: {
|
|
96
|
+
type: Function,
|
|
97
|
+
default: () => Promise.resolve(true)
|
|
98
|
+
}
|
|
87
99
|
},
|
|
88
100
|
computed: {
|
|
89
101
|
disabledToday() {
|
|
@@ -224,73 +236,60 @@ export default create({
|
|
|
224
236
|
};
|
|
225
237
|
},
|
|
226
238
|
beforeCreate() {
|
|
227
|
-
axiosInstance.interceptors.request.use(config => {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
});
|
|
232
|
-
},
|
|
233
|
-
async created() {
|
|
234
|
-
// await this.queryScheduleList();
|
|
235
|
-
// await this.getSchedulerList();
|
|
236
|
-
// await this.getSchedulerData();
|
|
239
|
+
// axiosInstance.interceptors.request.use(config => {
|
|
240
|
+
// config.headers['Authorization'] = 'bearer ' + this.token;
|
|
241
|
+
// config.baseURL = '/' + this.serverPrefix;
|
|
242
|
+
// return config;
|
|
243
|
+
// });
|
|
237
244
|
},
|
|
245
|
+
async created() {},
|
|
238
246
|
async mounted() {
|
|
239
247
|
this.calendar = this.$refs.fullCalendar.calendar;
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
// this.loading = true;
|
|
243
|
-
// this.calendar = this.$refs.fullCalendar.calendar;
|
|
244
|
-
// // await this.getScheduleSettingt();
|
|
245
|
-
// // await this.getSchedulerList();
|
|
246
|
-
// // await this.getSchedulerData();
|
|
247
|
-
// } catch (err) {
|
|
248
|
-
// this.loading = false;
|
|
249
|
-
// } finally {
|
|
250
|
-
// this.loading = false;
|
|
251
|
-
// }
|
|
248
|
+
this.setViewTime();
|
|
249
|
+
await this._queryScheduleList();
|
|
252
250
|
},
|
|
253
251
|
methods: {
|
|
254
|
-
async
|
|
252
|
+
async _queryScheduleList() {
|
|
255
253
|
this.loading = true;
|
|
256
254
|
try {
|
|
257
|
-
const
|
|
258
|
-
...this.currentDate
|
|
259
|
-
userId: this.userId,
|
|
260
|
-
orgId: this.orgId
|
|
255
|
+
const res = await this.queryScheduleList({
|
|
256
|
+
...this.currentDate
|
|
257
|
+
// userId: this.userId,
|
|
258
|
+
// orgId: this.orgId
|
|
261
259
|
});
|
|
262
|
-
if (!data.success) return;
|
|
260
|
+
// if (!data.success) return;
|
|
263
261
|
|
|
264
|
-
if (vexutils.isArray(
|
|
265
|
-
this.calendarOptions.events =
|
|
262
|
+
if (vexutils.isArray(res)) {
|
|
263
|
+
this.calendarOptions.events = res.map(item => ({ ...item, start: item.startTime, end: item.endTime }));
|
|
266
264
|
} else {
|
|
267
265
|
this.calendarOptions.events = [];
|
|
268
266
|
}
|
|
269
|
-
// this.dateValue && this.calendar.gotoDate(this.dateValue._d);
|
|
270
267
|
} catch (error) {
|
|
271
268
|
console.log(error);
|
|
272
269
|
} finally {
|
|
273
270
|
this.loading = false;
|
|
274
271
|
}
|
|
275
272
|
},
|
|
276
|
-
async
|
|
273
|
+
async _saveOrUpdateSchedule(params) {
|
|
274
|
+
this.loading = true;
|
|
277
275
|
try {
|
|
278
|
-
|
|
279
|
-
if (data.success) this.$message.success('保存成功');
|
|
280
|
-
await this.
|
|
276
|
+
await this.saveOrUpdateSchedule(params);
|
|
277
|
+
// if (data.success) this.$message.success('保存成功');
|
|
278
|
+
await this._queryScheduleList();
|
|
281
279
|
} catch (error) {
|
|
282
280
|
console.log(error);
|
|
283
281
|
} finally {
|
|
284
282
|
this.loading = false;
|
|
285
283
|
}
|
|
286
284
|
},
|
|
287
|
-
async
|
|
285
|
+
async _delSchedule(params) {
|
|
286
|
+
this.loading = true;
|
|
288
287
|
try {
|
|
289
|
-
const data = await
|
|
290
|
-
if (data
|
|
291
|
-
this.$message.success('删除成功');
|
|
288
|
+
const data = await this.delSchedule(params);
|
|
289
|
+
if (data) {
|
|
290
|
+
// this.$message.success('删除成功');
|
|
292
291
|
// this.calendarOptions.events = this.calendarOptions.events.filter(item => item.scheduleId === params.scheduleId);
|
|
293
|
-
await this.
|
|
292
|
+
await this._queryScheduleList();
|
|
294
293
|
}
|
|
295
294
|
} catch (error) {
|
|
296
295
|
console.log(error);
|
|
@@ -349,28 +348,48 @@ export default create({
|
|
|
349
348
|
handleCurrentDateChange() {
|
|
350
349
|
const date = moment(this.dateValue).format('YYYY-MM-DD');
|
|
351
350
|
let currentDate = {};
|
|
351
|
+
|
|
352
352
|
switch (this.viewType) {
|
|
353
353
|
case 'day':
|
|
354
354
|
currentDate = formatDate(date, 'day');
|
|
355
355
|
break;
|
|
356
|
-
case '
|
|
357
|
-
currentDate = formatDate(date, '
|
|
356
|
+
case 'list':
|
|
357
|
+
currentDate = formatDate(date, 'month');
|
|
358
358
|
break;
|
|
359
359
|
default:
|
|
360
|
-
|
|
360
|
+
this.setViewTime();
|
|
361
361
|
break;
|
|
362
362
|
}
|
|
363
363
|
Object.assign(this.currentDate, currentDate);
|
|
364
|
-
this.
|
|
364
|
+
this._queryScheduleList();
|
|
365
|
+
},
|
|
366
|
+
setViewTime() {
|
|
367
|
+
const currentDate = {};
|
|
368
|
+
const { activeStart, activeEnd } = this.calendar.view;
|
|
369
|
+
currentDate.startTime = moment(activeStart)
|
|
370
|
+
.clone()
|
|
371
|
+
.startOf('day')
|
|
372
|
+
.format('YYYY-MM-DD HH:mm:ss');
|
|
373
|
+
currentDate.endTime = moment(activeEnd)
|
|
374
|
+
.clone()
|
|
375
|
+
.subtract(1, 'day')
|
|
376
|
+
.endOf('day')
|
|
377
|
+
.format('YYYY-MM-DD HH:mm:ss');
|
|
378
|
+
|
|
379
|
+
Object.assign(this.currentDate, currentDate);
|
|
365
380
|
},
|
|
366
381
|
handleAdd() {
|
|
367
|
-
this.$emit('add',
|
|
382
|
+
this.$emit('add', getAddTime(this.dateValue));
|
|
368
383
|
},
|
|
369
384
|
handleSelect(event, type = 'add') {
|
|
370
385
|
const { start, end, extendedProps, title } = event;
|
|
371
|
-
const startTime =
|
|
372
|
-
const endTime = moment(end).format('YYYY-MM-DD HH:mm:ss');
|
|
386
|
+
const { startTime, endTime } = getAddTime(start);
|
|
373
387
|
const params = { ...extendedProps, startTime, endTime, title };
|
|
388
|
+
if (type === 'edit') {
|
|
389
|
+
params.startTime = moment(start).format('YYYY-MM-DD HH:mm:ss');
|
|
390
|
+
params.endTime = moment(end).format('YYYY-MM-DD HH:mm:ss');
|
|
391
|
+
}
|
|
392
|
+
const that = this;
|
|
374
393
|
if (moment(start).valueOf() < moment().valueOf()) {
|
|
375
394
|
this.$confirm({
|
|
376
395
|
title: '提示',
|
|
@@ -378,16 +397,24 @@ export default create({
|
|
|
378
397
|
okText: '确定',
|
|
379
398
|
cancelText: '取消',
|
|
380
399
|
onOk: () => {
|
|
381
|
-
|
|
400
|
+
setEmit();
|
|
382
401
|
},
|
|
383
402
|
onCancel: () => {
|
|
384
403
|
if (type === 'edit') {
|
|
385
|
-
this.
|
|
404
|
+
this._queryScheduleList();
|
|
386
405
|
}
|
|
387
406
|
}
|
|
388
407
|
});
|
|
389
408
|
} else {
|
|
390
|
-
|
|
409
|
+
setEmit();
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
function setEmit() {
|
|
413
|
+
if (type === 'add') {
|
|
414
|
+
that.$emit('add', params);
|
|
415
|
+
} else {
|
|
416
|
+
that._saveOrUpdateSchedule(params);
|
|
417
|
+
}
|
|
391
418
|
}
|
|
392
419
|
},
|
|
393
420
|
handleDrop({ event, oldEvent }) {
|
|
@@ -419,10 +446,18 @@ export default create({
|
|
|
419
446
|
@primary-color: #2d7aff;
|
|
420
447
|
|
|
421
448
|
.c-full-calendar {
|
|
449
|
+
position: relative;
|
|
422
450
|
display: flex;
|
|
423
451
|
flex-flow: column nowrap;
|
|
424
452
|
width: 100%;
|
|
425
453
|
height: 100%;
|
|
454
|
+
&__mask {
|
|
455
|
+
position: absolute;
|
|
456
|
+
z-index: 1;
|
|
457
|
+
width: 100%;
|
|
458
|
+
height: 100%;
|
|
459
|
+
background-color: rgba(0, 0, 0, 0);
|
|
460
|
+
}
|
|
426
461
|
/deep/ .tag-detail-wrpper {
|
|
427
462
|
display: none;
|
|
428
463
|
}
|
|
@@ -452,7 +487,7 @@ export default create({
|
|
|
452
487
|
.main-wrapper {
|
|
453
488
|
display: flex;
|
|
454
489
|
width: 100%;
|
|
455
|
-
|
|
490
|
+
height: 100%;
|
|
456
491
|
.full-calendar {
|
|
457
492
|
display: flex;
|
|
458
493
|
flex-flow: column nowrap;
|
|
@@ -561,6 +596,7 @@ export default create({
|
|
|
561
596
|
/deep/ .full-calendar__body {
|
|
562
597
|
width: 100%;
|
|
563
598
|
flex: 1;
|
|
599
|
+
overflow-y: scroll;
|
|
564
600
|
box-sizing: border-box;
|
|
565
601
|
|
|
566
602
|
.fc-header-toolbar {
|
|
@@ -21,6 +21,7 @@ import { Tooltip, Icon } from 'ant-design-vue';
|
|
|
21
21
|
import { moment } from '@/utils/vexutils';
|
|
22
22
|
import tippy from 'tippy.js';
|
|
23
23
|
import 'tippy.js/dist/tippy.css';
|
|
24
|
+
import { getAddTime } from '../utils';
|
|
24
25
|
|
|
25
26
|
export default {
|
|
26
27
|
name: 'tag',
|
|
@@ -90,7 +91,7 @@ export default {
|
|
|
90
91
|
const { startTime, endTime, scheduleId } = this.item;
|
|
91
92
|
switch (btn.type) {
|
|
92
93
|
case 'plus-square':
|
|
93
|
-
this.$emit('add',
|
|
94
|
+
this.$emit('add', getAddTime(startTime));
|
|
94
95
|
break;
|
|
95
96
|
case 'form':
|
|
96
97
|
this.$emit('edit', this.item);
|
|
@@ -102,8 +103,7 @@ export default {
|
|
|
102
103
|
okText: '确定',
|
|
103
104
|
cancelText: '取消',
|
|
104
105
|
onOk: () => {
|
|
105
|
-
this.$
|
|
106
|
-
this.tagDetailRef.$parent.delSchedule({ id: scheduleId });
|
|
106
|
+
this.tagDetailRef.$parent._delSchedule({ id: scheduleId });
|
|
107
107
|
},
|
|
108
108
|
onCancel() {}
|
|
109
109
|
});
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
<script>
|
|
37
37
|
import { Tooltip, Icon } from 'ant-design-vue';
|
|
38
38
|
import vexutils, { moment } from '@/utils/vexutils';
|
|
39
|
+
import { getAddTime } from '../utils';
|
|
39
40
|
|
|
40
41
|
export default {
|
|
41
42
|
name: 'tag-detail',
|
|
@@ -113,7 +114,7 @@ export default {
|
|
|
113
114
|
const { startTime, endTime, scheduleId } = this.item;
|
|
114
115
|
switch (btn.type) {
|
|
115
116
|
case 'plus-square':
|
|
116
|
-
this.$emit('add',
|
|
117
|
+
this.$emit('add', getAddTime(startTime));
|
|
117
118
|
break;
|
|
118
119
|
case 'form':
|
|
119
120
|
this.$emit('edit', this.item);
|
|
@@ -125,8 +126,7 @@ export default {
|
|
|
125
126
|
okText: '确定',
|
|
126
127
|
cancelText: '取消',
|
|
127
128
|
onOk: () => {
|
|
128
|
-
this.$
|
|
129
|
-
this.$parent.delSchedule({ id: scheduleId });
|
|
129
|
+
this.$parent._delSchedule({ id: scheduleId });
|
|
130
130
|
},
|
|
131
131
|
onCancel() {}
|
|
132
132
|
});
|
|
@@ -185,6 +185,20 @@ export function handleListRows(rows, v) {
|
|
|
185
185
|
return res;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
export function getAddTime(start) {
|
|
189
|
+
const nearestHour = moment()
|
|
190
|
+
.clone()
|
|
191
|
+
.startOf('hour')
|
|
192
|
+
.add(1, 'hour');
|
|
193
|
+
const startTime = moment(start)
|
|
194
|
+
.set({ hour: nearestHour.hour(), minute: 0, second: 0 })
|
|
195
|
+
.format('YYYY-MM-DD HH:mm:ss');
|
|
196
|
+
const endTime = moment(startTime)
|
|
197
|
+
.add(1, 'hour')
|
|
198
|
+
.format('YYYY-MM-DD HH:mm:ss');
|
|
199
|
+
return { startTime, endTime };
|
|
200
|
+
}
|
|
201
|
+
|
|
188
202
|
export const viewMap = {
|
|
189
203
|
list: '列表',
|
|
190
204
|
day: '日',
|