centaline-data-driven-v3 0.1.51 → 0.1.53

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.51",
3
+ "version": "0.1.53",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <template v-if="model.routerKey && model.visibility != '0'">
3
- <div style="display: flex;height: max-content;cursor: pointer;" :class="[flagflex == true ? 'flagflex' : '',model.className]"
3
+ <div style="display: flex;cursor: pointer;" :class="[flagflex == true ? 'flagflex' : '',model.className]"
4
4
  v-if="model.rightRouter && model.value != ''" :style="model.styleObject" @click="clickHandlerLayout()">
5
5
  <component v-for="(item, index) in model.fields" :actionRouter="actionRouter" :rowdata="rowdata" :key="index"
6
6
  :is="item.is" :vmodel="item" :rowindex="rowindex" :fields="fields" :forname="forname" :forrowindex="forrowindex" :parameterAction="parameterAction"
7
7
  :rowMenuDisplayCountForAPP="rowMenuDisplayCountForAPP" @click="clickHandler" @changeHandler="changeHandler"></component>
8
8
  </div>
9
9
  </template>
10
- <div style="display: flex;height: max-content;" :class="[flagflex == true ? 'flagflex' : '',model.className]"
10
+ <div style="display: flex;" :class="[flagflex == true ? 'flagflex' : '',model.className]"
11
11
  v-else-if="model.value != '' && model.visibility != '0'" :style="model.styleObject">
12
12
  <component v-for="(item, index) in model.fields" :actionRouter="actionRouter" :rowdata="rowdata" :key="index"
13
13
  :is="item.is" :vmodel="item" :rowindex="rowindex" :fields="fields" :forname="forname" :forrowindex="forrowindex" :parameterAction="parameterAction"
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  style="margin-top: 15px;margin-bottom: 15px;min-width: 150px;text-align: center; display: flex; justify-content: center;padding-left: 28px;padding-right: 16px;">
4
- <div style="text-align: left;">{{ text }}</div>
4
+ <div style="text-align: left;" v-html="text"></div>
5
5
  </div>
6
6
  <div style="text-align:center;width:100%;margin-bottom: 15px;">
7
7
  <el-button @click="clickHandler($event, true)" type="danger" size="small">{{ options.confirmButtonText || '确定'
@@ -265,6 +265,10 @@ const props = defineProps({
265
265
  Boolean,
266
266
  default: false,
267
267
  },
268
+ appendToBody: {
269
+ Boolean,
270
+ default: false,
271
+ },
268
272
  relationParentFormFields: {
269
273
  Array,
270
274
  default: function () {
@@ -375,6 +379,7 @@ function load(data) {
375
379
  model.value.$vue = { fieldClickHandler, clickHandler, validExcute, emit, getFormObj, changeCallBackHandler, getFileData, Form, load, init, updateFields, itemKey, downloadUrl, doAction };
376
380
  model.value.$vue.openType = props.openType
377
381
  model.value.isIframe = props.isIframe
382
+ model.value.appendToBody=props.appendToBody
378
383
  if (model.value.scripts) {
379
384
  model.value.scripts.formData = model.value.formData;
380
385
  model.value.scripts.formData.form = model.value;
@@ -300,6 +300,10 @@ const props = defineProps({
300
300
  String,
301
301
  default: '',
302
302
  },
303
+ appendToBody: {
304
+ Boolean,
305
+ default: false,
306
+ },
303
307
  })
304
308
  const isLoading = ref(true)
305
309
  const operationLoading = ref(false) //操作等待
@@ -406,6 +410,7 @@ function load(data) {
406
410
  model.value = data;
407
411
  model.value.$vue = { searchStrat, searchEnd, downloadUrl, loadStats, setTableHeight, updateCurrentRow, doAction, itemKey, refreshTableColumns, calculatingRowHeight, emit, operationLoading, getPage, toolbarClickHandler,closeTabThen };
408
412
  model.value.isIframe = props.isIframe
413
+ model.value.appendToBody=props.appendToBody
409
414
  model.value.isPageInSideBar = false
410
415
  model.value.columnName = null
411
416
  model.value.columnGroupId = null
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <render />
2
+ <teleport to="body" v-if="vmodel.appendToBody">
3
+ <render />
4
+ </teleport>
5
+ <render v-else />
3
6
  </template>
4
7
  <script setup>
5
8
  import { h, ref, onActivated, resolveComponent, onBeforeUnmount } from 'vue'
@@ -12,9 +15,14 @@ const contentTop = ref(0)
12
15
  const content = ref()
13
16
  const captionBarButtons = ref([])
14
17
  const modelSelf = ref(null)
15
- const submitCancelData= ref(null)
16
- onBeforeUnmount(()=>{
17
- modelSelf.value=null
18
+ const submitCancelData = ref(null)
19
+ const vzindex = ref(999);
20
+ vzindex.value = props.vmodel.appendToBody ? props.zindex + 1000 : props.zindex
21
+ // if (props.vmodel.content[0].component == 'ct-comfirm') {
22
+ // vzindex.value = vzindex.value + 2000;
23
+ // }
24
+ onBeforeUnmount(() => {
25
+ modelSelf.value = null
18
26
  })
19
27
  onActivated(() => {
20
28
  if (contentTop.value && content) {
@@ -33,7 +41,7 @@ function scrollHandle(ev) {
33
41
  ev.stopPropagation();
34
42
  }
35
43
 
36
- const render = () => {
44
+ const render = () => {
37
45
  return h('div', {}, [
38
46
  h('div', {
39
47
  style: {
@@ -49,7 +57,7 @@ const render = () => {
49
57
  'ct-dialog_wrapper'
50
58
  ],
51
59
  style: {
52
- 'z-index': props.zindex,
60
+ 'z-index': vzindex.value,
53
61
  'height': '100%',
54
62
  'width': '100%',
55
63
  }
@@ -184,11 +192,11 @@ const render = () => {
184
192
  item.height = (props.vmodel.pane.clientHeight - 60) + 'px';
185
193
  }
186
194
  if (item.component == 'ct-form') {
187
- if(props.vmodel.pane.clientHeight>window.innerHeight){
195
+ if (props.vmodel.pane.clientHeight > window.innerHeight) {
188
196
  item.documentHeight = (window.innerHeight) + 'px';
189
197
  }
190
- else{
191
- item.documentHeight = (props.vmodel.pane.clientHeight - 60) + 'px';
198
+ else {
199
+ item.documentHeight = (props.vmodel.pane.clientHeight - 60) + 'px';
192
200
  }
193
201
  }
194
202
  }
@@ -213,6 +221,9 @@ const render = () => {
213
221
  }
214
222
  item.attrs.dialoWidth = parseInt((item.width || 0).replace('px', ''));
215
223
  item.attrs.dialogHeight = parseInt((item.height || 0).replace('px', ''));
224
+ if (props.vmodel.appendToBody) {
225
+ item.attrs.appendToBody = props.vmodel.appendToBody;
226
+ }
216
227
  return h('div', {
217
228
  style: {
218
229
  width: item.width,
@@ -264,6 +264,9 @@ const CellLayout = function (source, actionRouter, rowdata, forname, forrowindex
264
264
  self._styleObject.WebkitBoxOrient = "vertical";
265
265
  self._styleObject.display = "-webkit-box";
266
266
  self._styleObject.overflow = "hidden";
267
+ }
268
+ if (typeof source.whiteSpace !== 'undefined') {
269
+ self._styleObject.whiteSpace = source.whiteSpace;
267
270
  }
268
271
  return self._styleObject;
269
272
  }
@@ -533,6 +533,7 @@ function loadFromModel(source, isFormList) {
533
533
  rtn._fieldsDic = {};
534
534
  if (rtn.fields) {
535
535
  rtn.fields.forEach((f) => {
536
+ f.controlType = common.getEnumValue(Enum.ControlType, f.controlType);
536
537
  if (f.controlType == Enum.ControlType.Compound || f.controlType == Enum.ControlType.ContainerControl) {
537
538
  if (f.fields) {
538
539
  f.fields.forEach((v) => {
@@ -671,6 +672,7 @@ function loadFromModel(source, isFormList) {
671
672
  rtn._buttons = [];
672
673
  if (source.buttons) {
673
674
  source.buttons.forEach((v) => {
675
+ v.buttonType = common.getEnumValue(Enum.ButtonType, v.buttonType);
674
676
  var button = Router(v);
675
677
  button.is = "ct-button";
676
678
  rtn._buttons.push(button);
@@ -689,6 +691,7 @@ function loadFromModel(source, isFormList) {
689
691
  rtn._captionBarButtons = [];
690
692
  if (source.captionBarButtons) {
691
693
  source.captionBarButtons.forEach((v) => {
694
+ v.buttonType = common.getEnumValue(Enum.ButtonType, v.buttonType);
692
695
  var button = Router(v);
693
696
  button.is = "ct-button";
694
697
  rtn._captionBarButtons.push(button);
@@ -707,6 +710,7 @@ function loadFromModel(source, isFormList) {
707
710
  rtn._links = [];
708
711
  if (source.links) {
709
712
  source.links.forEach((v) => {
713
+ v.buttonType = common.getEnumValue(Enum.ButtonType, v.buttonType);
710
714
  var button = Router(v);
711
715
  button.is = "ct-button";
712
716
  rtn._links.push(button);
@@ -725,6 +729,7 @@ function loadFromModel(source, isFormList) {
725
729
  rtn._actionRouters = [];
726
730
  if (source.actionRouters) {
727
731
  source.actionRouters.forEach((v) => {
732
+ v.buttonType = common.getEnumValue(Enum.ButtonType, v.buttonType);
728
733
  var button = Router(v);
729
734
  button.is = "ct-button";
730
735
  rtn._actionRouters.push(button);
@@ -1,3 +1,4 @@
1
+ import common from '../../utils/common';
1
2
  import Enum from '../../utils/Enum';
2
3
  import base from '../index';
3
4
  import Field from './Field';
@@ -30,6 +31,7 @@ const LibFunction = {
30
31
  },
31
32
  GetControl(field, source, showLabel, isList) {
32
33
  let item;
34
+ field.controlType = common.getEnumValue(Enum.ControlType, field.controlType);
33
35
  //列表设置默认宽度、不显示label
34
36
  if (isList) {
35
37
  if (field.controlType === Enum.ControlType.Date) {
package/src/main.js CHANGED
@@ -67,7 +67,7 @@ app.use(centaline, {
67
67
  return {
68
68
 
69
69
  //AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyaWQiOiIyNTEyMTUxNzQyMTg5QzI4MTgwRDkxRTk0MDhEOTA0QSIsImxvZ2luX3VzZXJfa2V5IjoiN2MzYzNjNjAtNWVjMy00MzdkLWExMDYtOWYxZTMwYjU0Mjg2In0.daG9mS98Gg8KmHSUjYHktMcO2Jk7SVtCcqm2sRB0I8Y2N0TuonIrVUDcHdNdDiuD3v6qO_f010tQWlBsAQ1dqg',
70
- authobject: '{token:"T5067-2038438946182201344",platform:"WEB"}',
70
+ authobject: '{token:"T5067-2042438796758376448",platform:"WEB"}',
71
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"}',
72
72
  //oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
73
73
  //authObject: '{token:"jiangzf-1958445358178844672",platform:"WEB"}',
@@ -226,7 +226,7 @@ const common = {
226
226
  * @param {Object} options 参数 如confirmButtonText,cancelButtonText
227
227
  * @desc 确认框
228
228
  */
229
- confirm(message, title, options) {
229
+ confirm(message, title, options,appendToBody) {
230
230
  let self = this;
231
231
  return new Promise((resolve, reject) => {
232
232
  if (dataDrivenOpts.flagApp) {
@@ -245,6 +245,7 @@ const common = {
245
245
  var dialogOption = {
246
246
  title: title,
247
247
  name: 'ct-comfirm',
248
+ appendToBody:appendToBody,
248
249
  vmodel: {},
249
250
  content: [{
250
251
  component: 'ct-comfirm',
@@ -899,5 +900,14 @@ const common = {
899
900
  const videoExtensions = /\.(mp4|mov|webm|avi|wmv|flv)$/i;
900
901
  return videoExtensions.test(url);
901
902
  },
903
+ getEnumValue(enumObj, value) {
904
+ if (typeof value === 'number') {
905
+ return value;
906
+ }
907
+ if(value=="CompoundControl"){
908
+ return enumObj["Compound"]
909
+ }
910
+ return enumObj[value];
911
+ },
902
912
  };
903
913
  export default common;
@@ -155,6 +155,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
155
155
  if (res.content && res.content.action) {
156
156
  var dialogOption = {
157
157
  title: field.pageTitle || field.controlLabel,
158
+ appendToBody: model.appendToBody,
158
159
  content: [{
159
160
  component: 'ct-progress',
160
161
  width: '350px',
@@ -215,12 +216,13 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
215
216
  confirmButtonText: '确定',
216
217
  cancelButtonText: '取消',
217
218
  type: 'warning'
218
- }).then(() => {
219
+ },model.appendToBody).then(() => {
219
220
  field.doAction(model.$vue.getFormObj({ flagHaveAlert: '1' }), (res202) => {
220
221
  if (res202.rtnCode === Enum.ReturnCode.Successful) {
221
222
  if (res202.content && res202.content.action) {
222
223
  var dialogOption = {
223
224
  title: field.pageTitle || field.controlLabel,
225
+ appendToBody: model.appendToBody,
224
226
  content: [{
225
227
  component: 'ct-progress',
226
228
  width: '350px',
@@ -302,7 +304,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
302
304
  confirmButtonText: '确定',
303
305
  cancelButtonText: '取消',
304
306
  type: 'warning'
305
- }).then(() => {
307
+ },model.appendToBody).then(() => {
306
308
  //如果没有弹框 则关闭tab页
307
309
  if (common.dialogList && common.dialogList.List.value.length === 0) {
308
310
  if (typeof common.getDataDrivenOpts().handler.closeTab === 'function') {
@@ -336,7 +338,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
336
338
  confirmButtonText: '确定',
337
339
  cancelButtonText: '取消',
338
340
  type: 'warning'
339
- }).then(() => {
341
+ },model.appendToBody).then(() => {
340
342
  field.disabled = true;
341
343
  field.doAction(model.$vue.getFormObj({ flagHaveAlert: '1' }), (res) => {
342
344
  field.disabled = false;
@@ -397,6 +399,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
397
399
  if (field.isOpenBaiduMap) {
398
400
  var dialogOption = {
399
401
  title: field.pageTitle,
402
+ appendToBody: model.appendToBody,
400
403
  content: [
401
404
  {
402
405
  component: "ct-mapbaidu",
@@ -494,6 +497,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
494
497
  var dialogOption = {
495
498
  title: field.pageTitle,
496
499
  pane: common.getParentPane(),
500
+ appendToBody: model.appendToBody,
497
501
  content: [
498
502
  {
499
503
  component: "ct-iframe",
@@ -547,6 +551,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
547
551
  if (res.content && res.content.action) {
548
552
  var dialogOption = {
549
553
  title: field.pageTitle || field.controlLabel,
554
+ appendToBody: model.appendToBody,
550
555
  content: [{
551
556
  component: 'ct-progress',
552
557
  width: '350px',
@@ -613,12 +618,13 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
613
618
  confirmButtonText: '确定',
614
619
  cancelButtonText: '取消',
615
620
  type: 'warning'
616
- }).then(() => {
621
+ },model.appendToBody).then(() => {
617
622
  field.doAction(submitData, (res202) => {
618
623
  if (res202.rtnCode === Enum.ReturnCode.Successful) {
619
624
  if (res202.content && res202.content.action) {
620
625
  var dialogOption = {
621
626
  title: field.pageTitle || field.controlLabel,
627
+ appendToBody: model.appendToBody,
622
628
  content: [{
623
629
  component: 'ct-progress',
624
630
  width: '350px',
@@ -738,6 +744,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
738
744
  var dialogOption = {
739
745
  title: field.pageTitle,
740
746
  pane: common.getParentPane(),
747
+ appendToBody: model.appendToBody,
741
748
  content: [{
742
749
  component: 'ct-form',
743
750
  width: field.pageWidth + 'px',
@@ -866,6 +873,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
866
873
  var dialogOption = {
867
874
  title: field.pageTitle,
868
875
  pane: common.getParentPane(),
876
+ appendToBody: model.appendToBody,
869
877
  content: [{
870
878
  component: 'ct-searchlist',
871
879
  width: field.pageWidth + 'px',
@@ -897,6 +905,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
897
905
  var dialogOption = {
898
906
  title: field.pageTitle,
899
907
  pane: common.getParentPane(),
908
+ appendToBody: model.appendToBody,
900
909
  content: [{
901
910
  component: field.vueComponentName,
902
911
  width: field.pageWidth + 'px',
@@ -983,7 +992,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
983
992
  confirmButtonText: '确定',
984
993
  cancelButtonText: '取消',
985
994
  type: 'warning'
986
- }).then(() => {
995
+ },model.appendToBody).then(() => {
987
996
  submitData.flagHaveAlert = '1';
988
997
  field.doAction(submitData, (res) => {
989
998
  if (res.rtnCode === Enum.ReturnCode.Successful) {
@@ -1065,7 +1074,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
1065
1074
  confirmButtonText: field.confirmButtonText,
1066
1075
  cancelButtonText: field.cancelButtonText,
1067
1076
  center: field.contentCenter
1068
- }).then(() => {
1077
+ },model.appendToBody).then(() => {
1069
1078
  clickAcion(field);
1070
1079
  }).catch(() => {
1071
1080
  });
@@ -1,11 +1,12 @@
1
1
  <template>
2
2
  <div
3
3
  :style="{ 'width': '800px' , 'height': '800px', margin: 'auto', 'position': 'relative'}">
4
- <ct-form :api="'/Order/readDetail'" :apiParam="apiParam" :openType="'tree'"></ct-form>
4
+ <ct-form :source="source" :openType="'tree'"></ct-form>
5
5
  <!-- <ct-textbox :source="source"></ct-textbox> -->
6
6
  <ct-dialoglist ref="dialogList"></ct-dialoglist>
7
7
  </div>
8
8
  </template>
9
9
  <script lang="ts" setup>
10
+ const source={"flagSearch":false,"parameterAction":"/cache/getParamList","actionTitle":"","title":"新跟進","flagFixedTabOnHorizontalLayout":false,"layoutOrientation":"Vertical","flagHideSaveLine":true,"captionBarButtons":[],"flagAlertCloseWindowAfterSave":false,"scripts":"","actionRouters":[{"buttonHeight":0,"hidden":false,"align":"left","pageHeight":600,"pageWidth":800,"buttonType":"Submit","action":"ind/PropertyFollow/save","flagAlert":false,"pageColumns":0,"text":"保存","locked":false,"key":"save","flagAttachSearchCondition":false,"flagAddRowAfterAction":false,"flagFreshCurrentRow":false,"actionType":"New","flagAsync":false,"flagVerifyData":true}],"buttons":[],"colSpan":0,"list":[],"labelPlacement":"left","onload":"","medias":[],"flagShowTitle":false,"fields":[{"displayLabelAfterSelected":true,"code1":"100476","fieldName1":"PropertyID","SearchOperation":"None","lazyLoad":false,"autoSearch":false,"autoFill":false,"SearchDataType":"None","controlLabel":"","mediaViewPageType":"PageInLayer","hidden":false,"spanCols":1,"controlType":"Hidden"},{"displayLabelAfterSelected":true,"code1":"1","fieldName1":"FlagShortcutFollow","SearchOperation":"None","lazyLoad":false,"autoSearch":false,"autoFill":false,"SearchDataType":"None","controlLabel":"","mediaViewPageType":"PageInLayer","hidden":false,"spanCols":1,"controlType":"Hidden"},{"displayLabelAfterSelected":true,"code1":"","fieldName1":"FullFollow","SearchOperation":"None","lazyLoad":false,"autoSearch":false,"autoFill":false,"SearchDataType":"None","controlLabel":"","mediaViewPageType":"PageInLayer","compoundFields":[{"displayLabelAfterSelected":true,"code1":"","fieldName1":"FollowContent","SearchOperation":"None","lazyLoad":false,"autoSearch":false,"autoFill":false,"SearchDataType":"None","controlLabel":"","mediaViewPageType":"PageInLayer","hidden":false,"spanCols":1,"maxValue1":"50","controlType":"TextBox"},{"displayLabelAfterSelected":true,"code1":"","fieldName1":"saveShortcutFollow","SearchOperation":"None","lazyLoad":false,"autoSearch":false,"autoFill":false,"SearchDataType":"None","controlLabel":"保存","mediaViewPageType":"PageInLayer","hidden":false,"spanCols":1,"controlType":"ButtonCommon"}],"hidden":false,"spanCols":1,"controlType":"CompoundControl"}]}
10
11
  const apiParam={"originalOrderId":"2014640778344816640","columnName":"orderNo","actionType":"1","pageStyle":"2","pageOnly":"true"}
11
12
  </script>