centaline-data-driven-v3 0.1.46 → 0.1.48

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.46",
3
+ "version": "0.1.48",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -1099,4 +1099,17 @@ body {
1099
1099
  align-items: center !important;
1100
1100
  }
1101
1101
 
1102
+ .el-message {
1103
+ /* 核心属性:设置最大宽度(可根据需求调整,如 500px、80% 等) */
1104
+ max-width: 50%;
1105
+ }
1106
+
1107
+ .el-message .el-message__content{
1108
+ /* 可选优化:保证超长文本自动换行,不溢出 */
1109
+ max-width: 95%;
1110
+ word-wrap: break-word;
1111
+ white-space: pre-wrap;
1112
+ /* 可选优化:让消息提示居中显示(搭配 max-width 更美观) */
1113
+ }
1114
+
1102
1115
  /*elementPlus样式重置结束*/
@@ -5,6 +5,11 @@
5
5
  v-html="model.controlLabel">
6
6
 
7
7
  </span>
8
+ <div style="display: flex;justify-items: center;height: 100%;" v-else-if="model.isCheckbox">
9
+ <van-checkbox v-model="model.code1" shape="square" @change="clickHandle">
10
+ {{ model.controlLabel }}
11
+ </van-checkbox>
12
+ </div>
8
13
  <van-button v-else type="primary" v-bind="model.attrs" @click="clickHandle"
9
14
  :style="{ color: model.textColor ? model.textColor : '#ffffff', backgroundColor: model.bgColor ? model.bgColor : '#fa5252', borderColor: model.borderColor ? model.borderColor : '#fa5252' }"
10
15
  :disabled="model.disabled || model.locked" :size="size">
@@ -21,7 +21,6 @@
21
21
  <template #tag>
22
22
  <template v-for="(v, i) in model.labelValue" :key="i">
23
23
  <el-tag class="ml-2" type="info" disable-transitions :closable="!v.locked && !model.locked"
24
- :style="{ marginRight: i + 1 == model.labelValue.length ? '20px' : '' }"
25
24
  @close="closeTag(v.code)">
26
25
  {{ v.name }}</el-tag>
27
26
  </template>
@@ -443,6 +443,9 @@ function changeHandler(field) {
443
443
  //组件点击操作
444
444
  function fieldClickHandler(field) {
445
445
  let data = Form.getRouterAndSubmitData(field, model.value);
446
+ if (field.isOpenFileDialog) {
447
+ data.router.fileList = field.fileList || [];
448
+ }
446
449
  clickHandler(data.router, data.submitData);
447
450
  }
448
451
  function clickHandler(field, submitData, formList) {
@@ -719,21 +722,21 @@ function updateFields(data) {
719
722
  Form.updateFields(data, model.value)
720
723
  }
721
724
  function setCss() {
722
- if (props.topHeight > -1) {
723
- minHeight.value = (document.documentElement.clientHeight - props.topHeight - 20) + 'px';
724
- }
725
- else if (props.dialogHeight) {
726
- minHeight.value = (props.dialogHeight) + 'px';
727
- }
728
- else if (props.openType == 'tree') {
725
+ if (props.openType == 'tree') {
729
726
  if (refForm.value) {
730
727
  let parentDom = refForm.value.parentElement;
731
728
  minHeight.value = parentDom.clientHeight + 'px';
732
729
  refForm.value.style.height = minHeight.value
733
730
  refForm.value.style.overflowY = 'auto'
734
- refForm.value.style.paddingBottom = '45px'
731
+ refForm.value.style.paddingBottom = '35px'
735
732
  }
736
733
  }
734
+ else if (props.topHeight > -1) {
735
+ minHeight.value = (document.documentElement.clientHeight - props.topHeight - 20) + 'px';
736
+ }
737
+ else if (props.dialogHeight) {
738
+ minHeight.value = (props.dialogHeight) + 'px';
739
+ }
737
740
  else if (props.openType == 'detail') {
738
741
  if (refForm.value) {
739
742
  let parentDom = refForm.value.parentElement;
@@ -15,7 +15,7 @@
15
15
  <div v-loading="operationLoading"></div>
16
16
 
17
17
  <div class="ct-tableParent" ref="refTableParent" v-bind="model.attrs" v-if="!isLoading && model"
18
- :style="{ height:model.tableHeight + 'px', 'border-bottom': model.isLayout ? 'none' : '', 'border-top': model.isLayout ? 'none' : '', }"
18
+ :style="{ height: model.tableHeight + 'px', 'border-bottom': model.isLayout ? 'none' : '', 'border-top': model.isLayout ? 'none' : '', }"
19
19
  @scroll="scrollHandle($event)" @keydown.up="rowKeyDownHandle($event, 0)"
20
20
  @keydown.down="rowKeyDownHandle($event, 1)" tabindex="-1">
21
21
  <div class="ct-table-content" v-if="!model.isLayout">
@@ -404,7 +404,7 @@ function searchComplate(m, defaultSearch) {
404
404
  //初始化数据
405
405
  function load(data) {
406
406
  model.value = data;
407
- model.value.$vue = { searchStrat, searchEnd, downloadUrl, loadStats, setTableHeight, updateCurrentRow, doAction, itemKey, refreshTableColumns, calculatingRowHeight, emit, operationLoading, getPage, toolbarClickHandler };
407
+ model.value.$vue = { searchStrat, searchEnd, downloadUrl, loadStats, setTableHeight, updateCurrentRow, doAction, itemKey, refreshTableColumns, calculatingRowHeight, emit, operationLoading, getPage, toolbarClickHandler,closeTabThen };
408
408
  model.value.isIframe = props.isIframe
409
409
  model.value.isPageInSideBar = false
410
410
  model.value.columnName = null
@@ -1642,6 +1642,12 @@ function getValueCaseInsensitive(obj, key) {
1642
1642
  const foundKey = Object.keys(obj).find(k => k.toLowerCase() === searchKey);
1643
1643
  return foundKey ? obj[foundKey] : undefined;
1644
1644
  }
1645
+ function closeTabThen(ev) {
1646
+ if (SearchTable.checkCloseTabThen(ev.notification)) {
1647
+ doAction(ev);
1648
+ }
1649
+ }
1650
+
1645
1651
 
1646
1652
  defineExpose({
1647
1653
  model,
@@ -399,6 +399,9 @@ function rowClickHandle() {
399
399
  }
400
400
  if (refTable.value.model.columnGroupId) {
401
401
  sideBarApiParam.value.columnGroupId = refTable.value.model.columnGroupId;
402
+ }
403
+ if (refTable.value.model.rowSelectRouter.flagAttachSearchCondition) {
404
+ sideBarApiParam.value["searchFields"] = refTable.value.model.getSearchData();
402
405
  }
403
406
  sideBarApiParam.value.actionType = refTable.value.model.rowSelectRouter.actionType;
404
407
  detailKey.value = detailKey.value + 1;
@@ -924,12 +924,24 @@ const Base = function (source, moreActionRouter, formLabelPlacement) {
924
924
  //搜索组件宽度
925
925
  get listBind() {
926
926
  let bind = {};
927
- bind = {
928
- style: {
929
- 'width': source.width + 'px',
930
- display: 'inline-table'
927
+ if (this.controlType === Enum.ControlType.MultiSelectNoSearch
928
+ || this.controlType === Enum.ControlType.MultiSelectWithSearch) {
929
+ bind = {
930
+ style: {
931
+ 'min-width': source.width + 'px',
932
+ display: 'inline-table'
933
+ }
934
+ }
935
+ }
936
+ else {
937
+ bind = {
938
+ style: {
939
+ 'width': source.width + 'px',
940
+ display: 'inline-table'
941
+ }
931
942
  }
932
943
  }
944
+
933
945
  return bind;
934
946
  },
935
947
  //获取控件fieldName1对应的code1
@@ -835,10 +835,11 @@ function loadFromModel(source, isFormList) {
835
835
  if (f.table) {
836
836
  let rtnFormArr = [];
837
837
  var tempListData = f.table.model.getSelectRowData({ isMulti: f.table.model.isMulti });
838
- for (let i = 0; i < tempListData.length; i++) {
839
- rtnFormArr.push(tempListData[i]);
838
+ if (tempListData) {
839
+ for (let i = 0; i < tempListData.length; i++) {
840
+ rtnFormArr.push(tempListData[i]);
841
+ }
840
842
  }
841
-
842
843
  let rtnObj = {};
843
844
  Object.defineProperty(rtnObj, f.fieldName1, {
844
845
  get: function () {
@@ -23,34 +23,28 @@ const Label = function (source) {
23
23
  let rtn = {
24
24
  flagJson: false,
25
25
  get value() {
26
- if (source.name1) {
27
- return source.name1;
28
- }
29
- else {
30
- if (source.code1) {
31
- try {
32
- let _value = []
33
- var obj = JSON.parse(source.code1)
34
- if (typeof obj == 'object' && obj) {
35
- obj.forEach((v) => {
36
- if (!v.flagDeleted) {
37
- _value.push(v.name);
38
- }
39
- });
40
- rtn.flagJson = true;
41
- return _value;
42
- }
26
+ if (source.code1) {
27
+ try {
28
+ let _value = []
29
+ var obj = JSON.parse(source.code1)
30
+ if (typeof obj == 'object' && obj) {
31
+ obj.forEach((v) => {
32
+ if (!v.flagDeleted) {
33
+ _value.push(v.name);
34
+ }
35
+ });
36
+ rtn.flagJson = true;
37
+ return _value;
38
+ }
43
39
 
44
- } catch (e) {
40
+ } catch (e) {
45
41
 
46
- }
47
42
  }
48
- let _value = [];
49
- var joinChar = source.joinChar == undefined ? '' : source.joinChar;
50
- _value = getFileNameVal(source);
51
- return _value.join(joinChar);
52
43
  }
53
-
44
+ let _value = [];
45
+ var joinChar = source.joinChar == undefined ? '' : source.joinChar;
46
+ _value = getFileNameVal(source);
47
+ return _value.join(joinChar);
54
48
  }
55
49
  };
56
50
  rtn = base.copy(source, rtn);
@@ -1231,6 +1231,15 @@ function getAction(api, submitData, callback) {
1231
1231
  }
1232
1232
  });
1233
1233
  }
1234
+ function checkCloseTabThen(notification) {
1235
+ var rtn = false;
1236
+ if (notification == Enum.ActionType.CloseTabThenDelete
1237
+ || notification == Enum.ActionType.CloseTabThenNew
1238
+ || notification == Enum.ActionType.CloseTabThenUpdate) {
1239
+ rtn = true;
1240
+ }
1241
+ return rtn;
1242
+ }
1234
1243
  const SearchTable = {
1235
1244
  loadSearchTableApi,
1236
1245
  loadSearchTableModel,
@@ -1244,6 +1253,7 @@ const SearchTable = {
1244
1253
  clearSort,
1245
1254
  getCurrentRowApiData,
1246
1255
  doAction,
1247
- getAction
1256
+ getAction,
1257
+ checkCloseTabThen
1248
1258
  };
1249
1259
  export default SearchTable;
package/src/main.js CHANGED
@@ -22,7 +22,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
22
22
 
23
23
  app.use(centaline, {
24
24
  //baseUrl: "http://10.88.22.13:7080/ibs-api/",
25
- baseUrl:"http://10.88.22.13:7070/onecard-api/",
25
+ baseUrl:"http://10.88.22.42:20403/service-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/",
@@ -66,8 +66,8 @@ app.use(centaline, {
66
66
  getRequestHeaders: function () {
67
67
  return {
68
68
 
69
- //AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyaWQiOiIyNTEyMTUxNzQyMTg5QzI4MTgwRDkxRTk0MDhEOTA0QSIsImxvZ2luX3VzZXJfa2V5IjoiN2MzYzNjNjAtNWVjMy00MzdkLWExMDYtOWYxZTMwYjU0Mjg2In0.daG9mS98Gg8KmHSUjYHktMcO2Jk7SVtCcqm2sRB0I8Y2N0TuonIrVUDcHdNdDiuD3v6qO_f010tQWlBsAQ1dqg',
70
- authobject: '{token:"wufw-2008030035520409600",platform:"WEB"}',
69
+ AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjRkNjY4MGIwLWZkODYtNGUzZi04ZGIzLThiNGM1M2FhZjdjZCJ9.s_xUROsWS_ALjTvn094XqDgBE6jgcQTx6LyjWgSBHODsKWs3PPPoCZ1NT4A74-9nhcJwehekRaJiggmwp4Q9bA',
70
+ authobject: '{"currentEstate":{},"platform":1,"osVersion":"","clientVersion":"","machineCode":"d54f7a41920fa955f1d111f63daa33de","token":"","random":"VJmPc","time":1769742645004,"sign":""}',
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"}',
@@ -65,12 +65,9 @@ const request = {
65
65
  }
66
66
 
67
67
  //关闭tab页
68
- if (data.notification === Enum.ActionType.CloseTab
69
- || data.notification === Enum.ActionType.CloseTabThenDelete
70
- || data.notification === Enum.ActionType.CloseTabThenNew
71
- || data.notification === Enum.ActionType.CloseTabThenUpdate) {
68
+ if (data.notification === Enum.ActionType.CloseTab) {
72
69
  if (typeof common.getDataDrivenOpts().handler.closeTab === 'function') {
73
- //common.getDataDrivenOpts().handler.closeTab();
70
+ common.getDataDrivenOpts().handler.closeTab();
74
71
  }
75
72
  }
76
73
 
@@ -1,10 +1,11 @@
1
1
  <template>
2
- <div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
- <ct-form :api="'/employee/getLayoutOfPwd'" :apiParam="apiParam"></ct-form>
2
+ <div
3
+ :style="{ 'width': '800px' , 'height': '300px', margin: 'auto', 'position': 'relative'}">
4
+ <ct-form :api="'/Order/readDetail'" :apiParam="apiParam" :openType="'tree'"></ct-form>
4
5
  <!-- <ct-textbox :source="source"></ct-textbox> -->
5
6
  <ct-dialoglist ref="dialogList"></ct-dialoglist>
6
7
  </div>
7
8
  </template>
8
9
  <script lang="ts" setup>
9
- const apiParam={actionType: 3,empId: "260104160031E4FF8D4434FD4400BAC9"}
10
+ const apiParam={"orderId":"2016080708371660800","actionType":3,"pageStyle":2,"pageOnly":true,"pageWidth":800,"pageFromFullPath":"/ord/orderList"}
10
11
  </script>
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div id="app-search" style="width:100%;height:100%;position: fixed;">
3
- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyTenderList/getLayoutOfSearch'"
3
+ <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/ccesmanage/AppUseSummaryList/getLayoutOfSearch'"
4
4
 
5
- :searchDataApi="'/propertyTenderList/getListOfSearchModel'"></ct-searchlist>
5
+ :searchDataApi="'/ccesmanage/AppUseSummaryList/getList'"></ct-searchlist>
6
6
 
7
7
  <!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyTenderList/getLayoutOfSearch'"
8
8