centaline-data-driven-v3 0.1.39 → 0.1.41

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven-v3",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -25,6 +25,7 @@
25
25
  "vue-cropper": "^1.1.1",
26
26
  "vue-router": "^4.2.5",
27
27
  "vue-ueditor-wrap": "^3.0.8",
28
+ "vue3-cron-plus-picker": "^1.0.2",
28
29
  "vue3-json-viewer": "^2.4.1",
29
30
  "vue3-pdf-app": "^1.0.3",
30
31
  "vuedraggable": "^4.1.0"
@@ -780,7 +780,10 @@ body {
780
780
  user-select: none;
781
781
  /* 禁止文本选择 */
782
782
  }
783
-
783
+ .ct-form .btnPadBom .el-checkbox{
784
+ height: 100% !important;
785
+ padding: 0 !important;
786
+ }
784
787
 
785
788
 
786
789
  /*elementPlus样式重置开始*/
@@ -0,0 +1,194 @@
1
+ <template>
2
+ <ct-field :vmodel="model" v-if="model">
3
+ <template #Control>
4
+ <el-input v-model="model.code1" :placeholder="点击选择" @click="showCron = true" />
5
+ <el-dialog v-model="showCron" title="" width="700px" append-to-body>
6
+ <Vue3CronPlusPicker :expression="model.code1" class="cron-plus-picker" :teleported="true"
7
+ @fill="val => { model.code1 = val; showCron = false }" @hide="showCron = false" />
8
+ </el-dialog>
9
+ </template>
10
+ </ct-field>
11
+ </template>
12
+
13
+ <script setup>
14
+ import { Vue3CronPlusPicker } from 'vue3-cron-plus-picker'
15
+ import 'vue3-cron-plus-picker/style.css'
16
+ import { nextTick, ref, onMounted } from "vue";
17
+ const props = defineProps({
18
+ api: String,
19
+ vmodel: Object,
20
+ actionRouter: Array,
21
+ listHeight: Number,
22
+ })
23
+ const model = ref(null);
24
+
25
+ const showCron = ref(false)
26
+
27
+ init()
28
+ //初始化数据
29
+ function init() {
30
+ nextTick(function () {
31
+ if (props.vmodel) {
32
+ load(props.vmodel);
33
+ }
34
+ });
35
+ }
36
+ function load(data) {
37
+ model.value = data;
38
+ }
39
+ </script>
40
+ <style scoped>
41
+ .cron-plus-picker :deep(.el-input__wrapper) {
42
+ align-items: center;
43
+ background-color: var(--el-input-bg-color, var(--el-fill-color-blank));
44
+ background-image: none;
45
+ border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
46
+ box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
47
+ cursor: text;
48
+ display: inline-flex;
49
+ flex-grow: 1;
50
+ justify-content: center;
51
+ padding: 1px 11px;
52
+ transform: translateZ(0);
53
+ transition: var(--el-transition-box-shadow);
54
+ }
55
+
56
+ .cron-plus-picker :deep(.el-input--small) {
57
+ --el-input-inner-height: calc(var(--el-input-height, 24px) - 2px);
58
+ }
59
+
60
+ .cron-plus-picker :deep(.el-input--small),
61
+ .cron-plus-picker :deep(.el-input) {
62
+ --el-input-height: var(--el-component-size-small);
63
+ font-size: 12px;
64
+ }
65
+
66
+ /* 使用更精确的选择器,避免全局覆盖 */
67
+ .cron-plus-picker :deep(.el-input .el-input__wrapper) {
68
+ align-items: center;
69
+ background-color: var(--el-input-bg-color, var(--el-fill-color-blank));
70
+ background-image: none;
71
+ border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
72
+ box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
73
+ cursor: text;
74
+ display: inline-flex;
75
+ flex-grow: 1;
76
+ justify-content: center;
77
+ padding: 1px 11px;
78
+ transform: translateZ(0);
79
+ transition: var(--el-transition-box-shadow);
80
+ }
81
+
82
+ .cron-plus-picker :deep(.el-select__wrapper) {
83
+
84
+ min-height: 24px;
85
+ /* 使用 min-height 而不是 height */
86
+ }
87
+
88
+ .cron-plus-picker :deep(.el-radio.el-radio--small) {
89
+ height: 24px;
90
+ }
91
+
92
+ .cron-plus-picker :deep(.el-select) {
93
+ --el-select-border-color-hover: var(--el-border-color-hover);
94
+ --el-select-disabled-color: var(--el-disabled-text-color);
95
+ --el-select-disabled-border: var(--el-disabled-border-color);
96
+ --el-select-font-size: var(--el-font-size-base);
97
+ --el-select-close-hover-color: var(--el-text-color-secondary);
98
+ --el-select-input-color: var(--el-text-color-placeholder);
99
+ --el-select-multiple-input-color: var(--el-text-color-regular);
100
+ --el-select-input-focus-border-color: var(--el-color-primary);
101
+ --el-select-input-font-size: 14px;
102
+ --el-select-width: 100%;
103
+ display: inline-block;
104
+ position: relative;
105
+ vertical-align: middle;
106
+ width: var(--el-select-width);
107
+ z-index: 100;
108
+
109
+ }
110
+
111
+ /* 修改Cron组件的样式 - 区分焦点和非焦点状态 */
112
+ .cron-plus-picker :deep(.el-form-item.is-error .el-input__wrapper),
113
+ .cron-plus-picker :deep(.el-form-item.is-error .el-select__wrapper),
114
+ .cron-plus-picker :deep(.el-form-item.is-error .el-textarea__inner) {
115
+ box-shadow: 0 0 0 1px var(--el-border-color) inset;
116
+ /* 非焦点状态 */
117
+ }
118
+
119
+ .cron-plus-picker :deep(.el-form-item.is-error .el-input__wrapper.is-focus),
120
+ .cron-plus-picker :deep(.el-form-item.is-error .el-input__wrapper:focus),
121
+ .cron-plus-picker :deep(.el-form-item.is-error .el-select__wrapper.is-focus),
122
+ .cron-plus-picker :deep(.el-form-item.is-error .el-select__wrapper:focus),
123
+ .cron-plus-picker :deep(.el-form-item.is-error .el-textarea__inner.is-focus),
124
+ .cron-plus-picker :deep(.el-form-item.is-error .el-textarea__inner:focus) {
125
+ box-shadow: 0 0 0 1px var(--el-color-primary) inset !important;
126
+ /* 焦点状态 - 蓝色 */
127
+ }
128
+
129
+ /* hover状态保持原来的灰色 */
130
+ .cron-plus-picker :deep(.el-form-item.is-error .el-input__wrapper:hover),
131
+ .cron-plus-picker :deep(.el-form-item.is-error .el-select__wrapper:hover),
132
+ .cron-plus-picker :deep(.el-form-item.is-error .el-textarea__inner:hover) {
133
+ box-shadow: 0 0 0 1px var(--el-text-color-secondary) inset;
134
+ /* hover时也保持灰色 */
135
+ }
136
+
137
+ .cron-plus-picker :deep(.el-radio) {
138
+ --el-radio-font-size: var(--el-font-size-base);
139
+ --el-radio-text-color: var(--el-text-color-regular);
140
+ --el-radio-font-weight: var(--el-font-weight-primary);
141
+ --el-radio-input-height: 12px;
142
+ --el-radio-input-width: 12px;
143
+ --el-radio-input-border-radius: var(--el-border-radius-circle);
144
+ --el-radio-input-bg-color: var(--el-fill-color-blank);
145
+ --el-radio-input-border: var(--el-border);
146
+ --el-radio-input-border-color: var(--el-border-color);
147
+ --el-radio-input-border-color-hover: var(--el-color-primary);
148
+ align-items: center;
149
+ color: var(--el-radio-text-color);
150
+ cursor: pointer;
151
+ display: inline-flex;
152
+ font-size: var(--el-font-size-base);
153
+ font-weight: var(--el-radio-font-weight);
154
+ height: 32px;
155
+ margin-right: 30px;
156
+ outline: none;
157
+ position: relative;
158
+ -webkit-user-select: none;
159
+ -moz-user-select: none;
160
+ user-select: none;
161
+ white-space: nowrap;
162
+ }
163
+
164
+ .cron-plus-picker :deep(.el-radio:last-child) {
165
+ margin-right: 0;
166
+ }
167
+
168
+ .cron-plus-picker :deep(.el-checkbox.el-checkbox--small .el-checkbox__inner),
169
+ .cron-plus-picker :deep(.el-radio.el-radio--small .el-radio__inner) {
170
+ width: 12px;
171
+ height: 12px;
172
+ }
173
+
174
+ /* 1. 让内部 el-select 继续用 ElementPlus 的公共骨架,我们只覆盖 mini 尺寸变量 */
175
+ .cron-plus-picker :deep(.el-radio--small) {
176
+ font-size: 12px;
177
+ }
178
+
179
+ .cron-plus-picker :deep(.el-radio--small .el-select__wrapper) {
180
+ height: 24px;
181
+ line-height: 24px;
182
+ padding: 0 7px 0 11px;
183
+ /* 左右各缩 4px,与官网 mini 保持一致 */
184
+ }
185
+
186
+ .cron-plus-picker :deep(.el-form-item--small) {
187
+ margin-bottom: 18px;
188
+ }
189
+
190
+ .cron-plus-picker :deep(.el-select__placeholder) {
191
+ pointer-events: none;
192
+ }
193
+
194
+ </style>
@@ -22,11 +22,11 @@
22
22
  </DateTimePicker>
23
23
  </template>
24
24
  <template v-else>
25
- <el-date-picker v-model="model.code1" :type="model.dateType" v-bind="model.attrs"
25
+ <el-date-picker v-model="model.code1" :type="model.dateType" v-bind="model.attrs" :format="model.format"
26
26
  :disabled="model.locked" :disabled-date="disabledDate" @change="changeHandler(model, emit)"
27
27
  class="fieldControl" />
28
28
  <span class="range-span" v-if="model.flagrange"> - </span>
29
- <el-date-picker v-if="model.flagrange" v-model="model.code2" :type="model.dateType"
29
+ <el-date-picker v-if="model.flagrange" v-model="model.code2" :type="model.dateType" :format="model.format"
30
30
  v-bind="model.attrs" :disabled="model.locked" :disabled-date="disabledDate"
31
31
  @change="changeHandler(model, emit)" class="fieldControl" />
32
32
  </template>
@@ -3,8 +3,9 @@
3
3
  :style="{ width: pageWidth ? pageWidth + 'px' : '100%', margin: 'auto', 'min-height': minHeight }">
4
4
  <div style="display: flex; width: 100%;">
5
5
  <div style="flex: 1; min-width: 0;">
6
- <div v-if="model !== null && !loading" class="ct-form">
7
- <el-affix target=".ct-form" v-if="model.tip" :offset="62">
6
+ <div v-if="model !== null && !loading" class="ct-form"
7
+ :style="{ margin: openType != 'tree' ? '10px' : '0px' }">
8
+ <el-affix target=".ct-form" v-if="model.tip" :offset="tipTopHight">
8
9
  <div class="ct-form-tip" ref="refTip">
9
10
  <span v-html="model.tip"></span>
10
11
  </div>
@@ -57,7 +58,8 @@
57
58
  <template v-if="model.isHorizontalLayout">
58
59
  <component :is="model.flagFixedTabOnHorizontalLayout ? 'el-affix' : 'div'"
59
60
  v-bind="model.flagFixedTabOnHorizontalLayout ? { offset: tabTopHight, target: '.ct-form' } : {}">
60
- <el-tabs v-model="activeName" @tab-click="tabClick" style="background: #fff;">
61
+ <el-tabs v-model="activeName" @tab-click="tabClick" style="background: #fff;"
62
+ ref="refTabs">
61
63
  <template v-for="(item, index) in model.collapse" :key="index">
62
64
  <el-tab-pane :name="index.toString()" :lazy="item.lazyLoad"
63
65
  v-if="item.show !== false" :key="index">
@@ -100,7 +102,7 @@
100
102
  <template #title>
101
103
  <i class="sign"></i>
102
104
  <span :class="[item.required ? 'requiredLabel' : '']">{{ item.controlLabel
103
- }}</span>
105
+ }}</span>
104
106
  <span v-html="item.sufLabel1"></span>
105
107
  </template>
106
108
 
@@ -110,10 +112,11 @@
110
112
  v-if="col.show !== false && col.lineFeed"></div>
111
113
  <el-col :span="col.colspan" v-if="col.show !== false" style="padding:5px"
112
114
  :class="[col.is == 'ct-button' && col.labelPlacement == '1' ? 'el-col1' : '']">
113
- <component ref="Fields" :is="col.is" :vmodel="col" :key="col.fieldItemKey"
114
- :listHeight="listHeight" :parameterAction="model.parameterAction"
115
- v-bind="col.bindPara" :fileData="getFileData(col)"
116
- @change="changeHandler" @fieldClick="fieldClickHandler"
115
+ <component ref="Fields" :is="col.is" :vmodel="col"
116
+ :key="col.fieldItemKey" :listHeight="listHeight"
117
+ :parameterAction="model.parameterAction" v-bind="col.bindPara"
118
+ :fileData="getFileData(col)" @change="changeHandler"
119
+ @fieldClick="fieldClickHandler"
117
120
  @popupLocation="popupLocationHandler"
118
121
  @popupSearchList="popupSearchListHandler"
119
122
  @importComplete="importComplete"
@@ -272,7 +275,6 @@ const props = defineProps({
272
275
  dialoWidth: Number,
273
276
  listHeight: Number,
274
277
  })
275
-
276
278
  const itemKey = ref(1)
277
279
  const router = useRouter()
278
280
  const loading = ref(true)
@@ -288,7 +290,9 @@ const showAI = ref(false);
288
290
  const dialogHeight = ref(props.dialogHeight || (window.innerHeight - 60));
289
291
  const tabActiveNameKey = ref('')
290
292
  const refTip = ref()
291
- const tabTopHight = ref(52)
293
+ const tipTopHight = ref(0)
294
+ const tabTopHight = ref(0)
295
+ const refTabs = ref()
292
296
 
293
297
  const qrtimer1 = ref(null)
294
298
  const qrtimer2 = ref(null)
@@ -322,6 +326,17 @@ onDeactivated(() => {
322
326
  })
323
327
  onMounted(() => {
324
328
  setCss();
329
+ if (refForm.value) {
330
+ const rect = refForm.value.getBoundingClientRect()
331
+ const distanceFromTop = rect.top + window.scrollY
332
+ tipTopHight.value = distanceFromTop;
333
+ if (refTip.value) {
334
+ tabTopHight.value = tabTopHight.value + refTip.value.clientHeight + 10
335
+ }
336
+ else {
337
+ tabTopHight.value = tipTopHight.value;
338
+ }
339
+ }
325
340
  })
326
341
  init()
327
342
  //初始化数据
@@ -379,11 +394,6 @@ function load(data) {
379
394
 
380
395
  }
381
396
  }
382
- nextTick(() => {
383
- if (refTip.value) {
384
- tabTopHight.value = tabTopHight.value + refTip.value.clientHeight + 10
385
- }
386
- })
387
397
  //通知父组件加载完成
388
398
  emit('loaded', model.value);
389
399
  }
@@ -703,11 +713,29 @@ function setCss() {
703
713
  if (props.topHeight > -1) {
704
714
  minHeight.value = (document.documentElement.clientHeight - props.topHeight - 20) + 'px';
705
715
  }
706
- else if(props.dialogHeight){
716
+ else if (props.dialogHeight) {
707
717
  minHeight.value = (props.dialogHeight) + 'px';
708
718
  }
709
- else{
710
- minHeight.value = document.documentElement.clientHeight + 'px';
719
+ else if (props.openType == 'tree') {
720
+ if (refForm.value) {
721
+ let parentDom = refForm.value.parentElement;
722
+ minHeight.value = parentDom.clientHeight + 'px';
723
+ refForm.value.style.height = minHeight.value
724
+ refForm.value.style.overflowY = 'auto'
725
+ refForm.value.style.paddingBottom = '45px'
726
+ }
727
+ }
728
+ else if (props.openType == 'detail') {
729
+ if (refForm.value) {
730
+ let parentDom = refForm.value.parentElement;
731
+ minHeight.value = parentDom.clientHeight + 'px';
732
+ }
733
+ }
734
+ else {
735
+ if (refForm.value) {
736
+ let parentDom = refForm.value.parentElement;
737
+ minHeight.value = parentDom.clientHeight + 'px';
738
+ }
711
739
  }
712
740
  }
713
741
 
@@ -726,18 +754,93 @@ function buttonsWidth() {
726
754
  rtn = props.dialoWidth - model.value.aiAttr.width - 4 + 'px';
727
755
  }
728
756
  else if (props.pageWidth) {
729
- rtn = props.pageWidth - 20 + 'px';
757
+ rtn = props.pageWidth + 'px';
730
758
 
731
759
  }
760
+
732
761
  return rtn;
733
762
  }
734
763
 
735
- function tabClick(event) {
764
+
765
+ // 点击后让激活 Tab 居中
766
+ async function tabClick(pane: TabsPaneContext) {
736
767
  if (props.openType == 'detail') {
737
768
  window.localStorage.setItem(tabActiveNameKey.value, model.value.collapse[event.index].fieldName1);//存储
738
769
  }
770
+ // await nextTick() // 等 DOM 更新完再取节点
771
+ // debugger
772
+ // const navWrapScroll = document.querySelector('.el-tabs__nav-scroll') as HTMLElement
773
+ // const firstTab = document.querySelector('.el-tabs__item') as HTMLElement
774
+ // if (!navWrapScroll || !firstTab) return
775
+
776
+ // // 第一个 tab 的“右边”到容器左边的距离
777
+ // const firstRight = firstTab.getBoundingClientRect().right
778
+ // const wrapLeft = navWrapScroll.getBoundingClientRect().left
779
+
780
+ // // 只要右边还在容器左边之外,就说明还没进来
781
+ // const firstVisible = firstRight >= wrapLeft
782
+ // const visibleCount = getVisibleTabCount();
783
+ // if (pane.index < visibleCount / 2 && firstVisible) {
784
+ // return;
785
+ // }
786
+
787
+ // const navWrap = document.querySelector('.el-tabs__nav') as HTMLElement
788
+ // const activeBtn = document.querySelector(
789
+ // `.el-tabs__item#tab-${pane.paneName}`
790
+ // ) as HTMLElement
791
+
792
+ // if (!navWrapScroll || !navWrap || !activeBtn) return
793
+
794
+ // const wrapWidth = navWrapScroll.clientWidth
795
+ // const btnLeft = activeBtn.offsetLeft
796
+ // const btnWidth = activeBtn.offsetWidth
797
+
798
+ // /* 想让 activeBtn 居中,需要整个 navWrap 向左移动的距离 */
799
+ // const dx = (wrapWidth - btnWidth) / 2 - btnLeft
800
+
801
+ // setTimeout(() => {
802
+ // navWrap.style.transition = 'transform .3s ease-out'
803
+ // navWrap.style.transform = `translateX(${dx}px)`
804
+ // }, 50);
805
+
806
+ // const navWrapScroll = document.querySelector('.el-tabs__nav-scroll') as HTMLElement
807
+ // const navWrap = document.querySelector('.el-tabs__nav') as HTMLElement
808
+ // const activeBtn = document.querySelector(
809
+ // `.el-tabs__item#tab-${pane.paneName}`
810
+ // ) as HTMLElement
811
+ // if (!navWrapScroll || !activeBtn) return
812
+
813
+ // const wrapWidth = navWrapScroll.clientWidth
814
+ // const btnLeft = activeBtn.offsetLeft
815
+ // const btnWidth = activeBtn.offsetWidth
816
+
817
+ // // 滚动到“元素中心 - 容器半宽”的位置,就能居中
818
+ // navWrapScroll.scrollTo({
819
+ // left: btnLeft - (wrapWidth - btnWidth) / 2,
820
+ // behavior: 'smooth'
821
+ // })
822
+
823
+ }
824
+ /** 返回当前屏幕完全可见的 tab 个数 */
825
+ function getVisibleTabCount(): number {
826
+ const navWrapScroll = document.querySelector('.el-tabs__nav-scroll') as HTMLElement
827
+ const navWrap = document.querySelector('.el-tabs__nav') as HTMLElement
828
+ if (!navWrapScroll || !navWrap) return 0
829
+
830
+ const wrapWidth = navWrapScroll.clientWidth // 容器可视宽
831
+ const allTabs = Array.from(navWrap.querySelectorAll('.el-tabs__item')) as HTMLElement[]
832
+ if (!allTabs.length) return 0
833
+
834
+ // ① 如果所有 tab 总宽度 ≤ 容器宽,全部可见
835
+ const totalWidth = allTabs.reduce((sum, tab) => sum + tab.offsetWidth, 0)
836
+ if (totalWidth <= wrapWidth) return allTabs.length
837
+
838
+ // ② 否则按“平均宽度”向下取整
839
+ const avgWidth = totalWidth / allTabs.length
840
+ return Math.floor(wrapWidth / avgWidth)
739
841
  }
740
842
 
843
+
741
844
  </script>
742
845
 
743
846
  <style scoped>
@@ -24,7 +24,7 @@ import { JsonViewer } from "vue3-json-viewer"
24
24
  import "vue3-json-viewer/dist/vue3-json-viewer.css";
25
25
  import { useDistanceCalculator } from '../../utils/distance-utils.js';
26
26
 
27
- import { nextTick, ref, onMounted ,inject} from "vue";
27
+ import { nextTick, ref, onMounted} from "vue";
28
28
  const props = defineProps({
29
29
  api: String,
30
30
  vmodel: Object,
@@ -180,8 +180,10 @@ function searchHandler(field) {
180
180
  SearchScreen.hiddenHandle(v, model.value);
181
181
  SearchScreen.displayHandle(v, model.value);
182
182
  })
183
- if (validExcute()) {
184
- emit('resetSearch', model.value);
183
+ if (field.autoSearch) {
184
+ if (validExcute()) {
185
+ emit('resetSearch', model.value);
186
+ }
185
187
  }
186
188
  break;
187
189
  default:
@@ -16,8 +16,8 @@
16
16
  <template v-if="pageType == 'form'">
17
17
  <div style="height: 100%;">
18
18
  <div class="ct-form"
19
- :style="{ 'width': (width ? width + 'px' : 'auto'), 'height': (height ? height + 'px' : 'auto') }">
20
- <ct-form :api="formApi" :api-param="apiParam1" :width="width" :height="height"></ct-form>
19
+ :style="{ 'width': (width ? width + 'px' : 'auto'), 'height': (height ? height + 'px' : '100%') ,margin: '0px','position': 'relative','background-color': '#FFFFFF','border-radius': '6px'}">
20
+ <ct-form :api="formApi" :api-param="apiParam1" :pageWidth="width" :pageHeight="height" :openType="'tree'"></ct-form>
21
21
  </div>
22
22
  </div>
23
23
  </template>
@@ -12,6 +12,7 @@ const contentTop = ref(0)
12
12
  const content = ref()
13
13
  const captionBarButtons = ref([])
14
14
  const modelSelf = ref(null)
15
+ const submitCancelData= ref(null)
15
16
  onBeforeUnmount(()=>{
16
17
  modelSelf.value=null
17
18
  })
@@ -23,7 +24,7 @@ onActivated(() => {
23
24
  function close() {
24
25
  emit('close', props);
25
26
  if (props.vmodel.content[0].component != 'ct-iframe' && props.vmodel.content[0].attrs && typeof props.vmodel.content[0].attrs["onCloseDialog"] === "function") {
26
- props.vmodel.content[0].attrs["onCloseDialog"]();
27
+ props.vmodel.content[0].attrs["onCloseDialog"](submitCancelData.value);
27
28
  }
28
29
  }
29
30
  function scrollHandle(ev) {
@@ -159,6 +160,13 @@ const render = () => {
159
160
  close();
160
161
  }
161
162
  }
163
+
164
+ //加载失败关闭弹框
165
+ if (!item.attrs.onSubmitCancel) {
166
+ item.attrs.onSubmitCancel = (ev) => {
167
+ submitCancelData.value = ev;
168
+ }
169
+ }
162
170
  //此行代码是为了防止弹出的窗口高度 大于父级页面的高度
163
171
  //暂时注释 高度由接口控制
164
172
  var ph = 0;
@@ -0,0 +1,11 @@
1
+ import base from '../../loader/index';
2
+ import valid from '../../utils//validate';
3
+ const Cron = function (source) {
4
+ let rtn = {
5
+
6
+ };
7
+ rtn = base.copy(source, rtn);
8
+ rtn = base.copy(rtn, valid.Init(rtn));
9
+ return rtn;
10
+ };
11
+ export default Cron
@@ -41,13 +41,6 @@ const DatePicker = function (source) {
41
41
 
42
42
  if (this.flagtime) {
43
43
  dateformat = 'HH:mm';
44
- if (source.paramName1 && source.paramName1.length >= 2) {
45
- dateformat = source.paramName1;
46
- }
47
- }
48
-
49
- else if (source.paramName1 && source.paramName1.length >= 10) {
50
- dateformat = source.paramName1;
51
44
  }
52
45
  else if (source.controlType == Enum.ControlType.DateTime || source.controlType == Enum.ControlType.DateTimeRange) {
53
46
  dateformat = 'YYYY-MM-DD HH:mm';
@@ -55,6 +48,9 @@ const DatePicker = function (source) {
55
48
  else if (source.controlType == Enum.ControlType.DateYearMonth) {
56
49
  dateformat = 'YYYY-MM';
57
50
  }
51
+ if (source.paramName1) {
52
+ dateformat = source.paramName1;
53
+ }
58
54
  return dateformat
59
55
  },
60
56
  get minuteStep() {
@@ -24,6 +24,7 @@ import Tags from './Tags';
24
24
  import Location from './Location';
25
25
  import AIChat from './AIChat';
26
26
  import JsonViewer from './JsonViewer';
27
+ import Cron from './Cron';
27
28
  const LibFunction = {
28
29
  install(app) {
29
30
  },
@@ -279,6 +280,10 @@ const LibFunction = {
279
280
  item = JsonViewer.loadJsonViewerModel(item);
280
281
  item.is = 'ct-jsonviewer';
281
282
  break;
283
+ case Enum.ControlType.Cron: //Cron表达式控件
284
+ item = Cron(item)
285
+ item.is = 'ct-cron'
286
+ break;
282
287
  default:
283
288
  item = Label(item)
284
289
  item.is = 'ct-label'
package/src/main.js CHANGED
@@ -21,8 +21,8 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
21
21
  }
22
22
 
23
23
  app.use(centaline, {
24
- baseUrl: "http://10.88.22.66/IBS.Mvc/api/",
25
- //baseUrl:"http://10.88.22.13:7070/onecard-api/",
24
+ baseUrl: "http://10.88.22.66:7080/ibs-api/",
25
+ //baseUrl:"http://10.88.22.66/IBS.Mvc/api/",
26
26
  //baseUrl: "https://kq-api.centaline.com.cn/onecard-api/",
27
27
  //baseUrl: "http://10.88.22.13:6060/onecard-api/",
28
28
  //baseUrl: "http://10.88.22.66/IBS.Mvc/api/",
@@ -65,7 +65,10 @@ app.use(centaline, {
65
65
  //获取请求头
66
66
  getRequestHeaders: function () {
67
67
  return {
68
- authobject: '{EmpID:"Token_a3e4add3-642b-40b6-bc3f-32bdf8114668",MachineCode:"ae184643-f8e2-453c-a752-ba82612b592f",SSO_Token:"SSOToken_a3e4add3-642b-40b6-bc3f-32bdf8114668",Platform:"WEB"}',
68
+
69
+ //AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQxZTM1MGE1LWFiMGMtNDY2Mi05MTQ5LTAwYTQ4NTljMDkyYSJ9.3ci0CpgcmIqm-ORf9efFnvB6sgAWVSGv6ptrWMe3ZSs3fQ8PvlZv3BizhcBJjk0l7csA2Ihw9oodq2N81ELUoQ',
70
+ authobject: '{token:"T5067-2003269852298657792",platform:"WEB"}',
71
+ //authobject: '{EmpID:"Token_946d56e1-7972-4382-9d10-4a72496aab39",MachineCode:"ae184643-f8e2-453c-a752-ba82612b592f",SSO_Token:"SSOToken_946d56e1-7972-4382-9d10-4a72496aab39",Platform:"WEB"}',
69
72
  //oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
70
73
  //authObject: '{token:"jiangzf-1958445358178844672",platform:"WEB"}',
71
74
  //authObject: '{EmpID:"Token_4e09499b-4b76-46df-9ce5-5498d48ed062",MachineCode:"ae184643-f8e2-453c-a752-ba82612b592f",SSO_Token:"SSOToken_4e09499b-4b76-46df-9ce5-5498d48ed062",Platform:"WEB"}',
package/src/utils/Enum.js CHANGED
@@ -313,7 +313,12 @@ const Enum = {
313
313
  /// <summary>
314
314
  /// Json预览控件
315
315
  /// </summary>
316
- JsonViewer: 63
316
+ JsonViewer: 63,
317
+
318
+ /**
319
+ * cron 表达式生成/选择
320
+ */
321
+ Cron:65,
317
322
  },
318
323
 
319
324
  //返回状态码