centaline-data-driven-v3 0.1.29 → 0.1.30

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.29",
3
+ "version": "0.1.30",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -98,6 +98,14 @@ body {
98
98
  align-items: center;
99
99
  }
100
100
 
101
+ .ct-form .search-list .serach-screen .list-field .el-form-item__label {
102
+ width: auto;
103
+ text-align: right;
104
+ line-height: normal;
105
+ min-height: 26px;
106
+ align-items: center;
107
+ }
108
+
101
109
 
102
110
  .errorMessage {
103
111
  height: 26px;
@@ -874,6 +882,15 @@ body {
874
882
  line-height: 22px;
875
883
  }
876
884
 
885
+ .el-select__wrapper {
886
+ height: 28px;
887
+ }
888
+
889
+ .el-select__wrapper .el-select__selection {
890
+ flex-wrap: nowrap !important;
891
+ margin-right: 20px;
892
+ }
893
+
877
894
  .el-select__input-wrapper {
878
895
  height: 22px;
879
896
  line-height: 22px;
@@ -913,7 +930,7 @@ body {
913
930
  .el-col1 {
914
931
  display: flex;
915
932
  flex-direction: column;
916
- justify-content: flex-end;
933
+ justify-content: flex-end;
917
934
  }
918
935
 
919
936
  .el-collapse {
@@ -8,7 +8,7 @@
8
8
  :height="300" @click="clickHandler"
9
9
  :class="[model.moreActionRouter ? 'selectmore' : '', open ? 'open' : '']"
10
10
  :filter-method="debouncedRemoteMethod" @compositionstart="handleCompositionStart"
11
- @compositionend="handleCompositionEnd">
11
+ @compositionend="handleCompositionEnd" :formatter="formatLabel">
12
12
  <template #default="{ item }">
13
13
  <el-tooltip :disabled="!item.toolTip" :content="item.toolTip" placement="right">
14
14
  <span v-html="item.displayName || item.name"></span>
@@ -22,7 +22,7 @@
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
24
  @close="closeTag(v.code)">
25
- {{ v.displayName || v.name }}</el-tag>
25
+ {{ v.name }}</el-tag>
26
26
  </template>
27
27
  </template>
28
28
  </el-select-v2>
@@ -113,7 +113,7 @@ function getOptions(key) {
113
113
  if (item) {
114
114
  v.locked = true
115
115
  }
116
- v.label = v.displayName || v.name
116
+ v.label =v.name
117
117
  v.value = v.code
118
118
  v.disabled = v.locked
119
119
  if (v.options) {
@@ -125,7 +125,7 @@ function getOptions(key) {
125
125
  if (item1) {
126
126
  v2.locked = true
127
127
  }
128
- v2.label = v2.displayName || v2.name
128
+ v2.label = v2.name
129
129
  v2.value = v2.code
130
130
  v2.disabled = v2.locked
131
131
  });
@@ -165,10 +165,18 @@ function debounce(func, delay) {
165
165
  const debouncedRemoteMethod = debounce(getOptions, 300);
166
166
  //选中值发生变化时触发
167
167
  function change(val) {
168
- if (typeof val == 'undefined') {
168
+ if (typeof val == 'undefined' || (model.value.multiple && val.length == 0)) {
169
169
  if (model.value.defaultCode1) {
170
- val = model.value.defaultCode1
171
- model.value.value = val
170
+ if (model.value.multiple) {
171
+ var defaultCode1 = JSON.parse(model.value.defaultCode1)
172
+ defaultCode1.forEach((v) => {
173
+ model.value.value.push(v.code);
174
+ });
175
+ }
176
+ else {
177
+ val = model.value.defaultCode1
178
+ model.value.value = val
179
+ }
172
180
  model.value.itemKey = Math.random()
173
181
  }
174
182
  else {
@@ -265,6 +273,10 @@ function closeTag(val) {
265
273
  model.value.value.splice(model.value.value.indexOf(val), 1)
266
274
  change(model.value.value)
267
275
  }
276
+ const formatLabel = (option) => {
277
+ console.log('进入 formatter', option); // 测试是否触发
278
+ return option.name || option.label;
279
+ };
268
280
  defineExpose({
269
281
  model
270
282
  })
@@ -260,8 +260,8 @@ if (model.value.paramName1 && !model.value.locked) {
260
260
  }
261
261
  else if (!model.value.locked) {
262
262
  config.value.maximumWords = model.value && model.value.maxValue1 ? parseFloat(model.value.maxValue1) : 5000;
263
- config.value.serverUrl = model.value.moreActionRouter.action;
264
- config.value.imageUrl = model.value.moreActionRouter.action;
263
+ config.value.serverUrl = model.value.moreActionRouter?.action;
264
+ config.value.imageUrl = model.value.moreActionRouter?.action;
265
265
  }
266
266
 
267
267
 
@@ -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: from == 'form' ? '100%' : 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">
@@ -26,11 +26,12 @@
26
26
  <div ref="refSidebar" v-if="flagSideBar && flagSideBarOfData"
27
27
  :style="{ 'height': pageHeight ? pageHeight : '100%', 'width': sideBarWidth + 'px', right: sideBarRight + 'px' }"
28
28
  class="sidebar">
29
- <SearchSideRight ref="RefSideRight" :apiParam="sideBarApiParam" :pageType="sideBarPageType"
30
- :rowSelectRouter="rowSelectRouter" :listHeight="listHeight" :selectIndex="selectIndex"
31
- :rowCount="rowCount" :key="detailKey" :drowerClose="drowerClose" @clickNextHandler="clickNextHandler"
32
- @clickPrevHandler="clickPrevHandler" @simpleRouterclickHandler="simpleRouterclickHandler"
33
- @closeSideHandler="closeSideHandler" @submit="submitHandler"></SearchSideRight>
29
+ <SearchSideRight :style="{ 'display': sideBarWidth && sideBarWidth > 0 ? 'block' : 'none' }" ref="RefSideRight"
30
+ :apiParam="sideBarApiParam" :pageType="sideBarPageType" :rowSelectRouter="rowSelectRouter"
31
+ :listHeight="listHeight" :selectIndex="selectIndex" :rowCount="rowCount" :key="detailKey"
32
+ :drowerClose="drowerClose" @clickNextHandler="clickNextHandler" @clickPrevHandler="clickPrevHandler"
33
+ @simpleRouterclickHandler="simpleRouterclickHandler" @closeSideHandler="closeSideHandler"
34
+ @submit="submitHandler"></SearchSideRight>
34
35
  <SearchSideMenu ref="refSideMenu" :sideBarMenuRight="sideBarMenuRight" :sideBarStatus="sideBarStatus"
35
36
  @sideMenuClickHandler="sideMenuClickHandler"></SearchSideMenu>
36
37
  </div>
@@ -266,8 +267,8 @@ function tableLoaded() {
266
267
  var tagkey = window.localStorage.getItem(sideBarPageType.value + "key" + title.value);
267
268
  sideBarStatus.value = tagkey;
268
269
  }
269
-
270
- if ((flagDefaultDisplaySideBar.value && !sideBarStatus.value)||refTable.value.model.isPageInSideBar) {
270
+
271
+ if ((flagDefaultDisplaySideBar.value && !sideBarStatus.value) || refTable.value.model.isPageInSideBar) {
271
272
  sideMenuClickHandler('close');
272
273
  }
273
274
  else {
@@ -283,6 +284,9 @@ function tableLoaded() {
283
284
  flagSideBarOfData.value = false;
284
285
  searchWidth.value = 0;
285
286
  }
287
+ if (model.value) {
288
+ model.value.table = refTable.value;
289
+ }
286
290
  emit('tableLoaded', refTable.value.model);
287
291
  emit('loaded', refTable.value.model);
288
292
  }
@@ -390,10 +394,10 @@ function rowClickHandle() {
390
394
  }
391
395
  );
392
396
  }
393
- if(refTable.value.model.columnName){
397
+ if (refTable.value.model.columnName) {
394
398
  sideBarApiParam.value.columnName = refTable.value.model.columnName;
395
399
  }
396
- if(refTable.value.model.columnGroupId){
400
+ if (refTable.value.model.columnGroupId) {
397
401
  sideBarApiParam.value.columnGroupId = refTable.value.model.columnGroupId;
398
402
  }
399
403
  sideBarApiParam.value.actionType = refTable.value.model.rowSelectRouter.actionType;
@@ -852,8 +852,9 @@ const Base = function (source, moreActionRouter, formLabelPlacement) {
852
852
  if (this.multiple) {
853
853
  this.value.splice(0);
854
854
  this.labelValue.splice(0);
855
- if (this.defaultValue) {
856
- this.defaultValue.forEach((v) => {
855
+ if (this.defaultCode1) {
856
+ var defaultCode1=JSON.parse(this.defaultCode1)
857
+ defaultCode1.forEach((v) => {
857
858
  this.value.push(v.code);
858
859
  this.labelValue.push(v);
859
860
  });
@@ -820,6 +820,26 @@ function loadFromModel(source, isFormList) {
820
820
  });
821
821
  Object.assign(rtnFormObj, customizeColumnsObj);
822
822
  }
823
+ else if (f.controlType == Enum.ControlType.SearchPage) {
824
+ if (f.table) {
825
+ let rtnFormArr = [];
826
+ var tempListData = f.table.model.getSelectRowData({ isMulti: f.table.model.isMulti });
827
+ for (let i = 0; i < tempListData.length; i++) {
828
+ rtnFormArr.push(tempListData[i]);
829
+ }
830
+
831
+ let rtnObj = {};
832
+ Object.defineProperty(rtnObj, f.fieldName1, {
833
+ get: function () {
834
+ return rtnFormArr;
835
+ },
836
+ enumerable: true,
837
+ configurable: true
838
+ });
839
+ Object.assign(rtnFormObj, rtnObj);
840
+ }
841
+
842
+ }
823
843
  else {
824
844
  if (f.hasOwnProperty('getFormObj') && typeof f.getFormObj === "function") {
825
845
  Object.assign(rtnFormObj, f.getFormObj());
@@ -222,13 +222,12 @@ const LibFunction = {
222
222
  item.is = 'ct-location';
223
223
  break;
224
224
  case Enum.ControlType.SearchPage: //搜索列表页面
225
- item = {};
225
+ //item = {};
226
226
  item.is = 'ct-searchlist';
227
227
  item.bindPara = {
228
228
  searchConditionApi: field.code1,
229
229
  searchDataApi: field.code2,
230
230
  pageHeight: field.code4 ? field.code4 + 'px' : '',
231
- from: 'form',
232
231
  apiParam: field.code3 ? JSON.parse(field.code3) : {}
233
232
  };
234
233
  break;
@@ -148,7 +148,8 @@ const Router = function (source) {
148
148
  return source.pageStyle === Enum.PageStyle.BrowserNewTab;
149
149
  },
150
150
  get isClientFuntion() {
151
- return source.pageStyle === Enum.PageStyle.ClientFunction;
151
+ return source.pageStyle === Enum.PageStyle.ClientFunction
152
+ ||source.actionType===Enum.ActionType.ExcuteClientFunction;
152
153
  },
153
154
  get isSearchPageWithList() {
154
155
  return source.pageStyle === Enum.PageStyle.SearchPageWithList;
package/src/main.js CHANGED
@@ -21,7 +21,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
21
21
  }
22
22
 
23
23
  app.use(centaline, {
24
- baseUrl: "https://kq-api-gz.centaline.com.cn/onecard-api/",
24
+ baseUrl: "http://10.88.22.13:7070/onecard-api/",
25
25
  //baseUrl:"http://10.88.22.13:7070/onecard-api/",
26
26
  //baseUrl: "https://kq-api.centaline.com.cn/onecard-api/",
27
27
  //baseUrl: "http://10.88.22.13:6060/onecard-api/",
@@ -30,7 +30,7 @@ app.use(centaline, {
30
30
  //baseUrl: "http://10.1.245.111:38028/",
31
31
 
32
32
  flagRouterSelf: true,
33
- flagApp: true,//是否app端
33
+ flagApp: false,//是否app端
34
34
  zindex: 999,
35
35
  showRequestSuccessMessage: true,
36
36
  showRequestErrorMessage: true,
@@ -65,7 +65,7 @@ app.use(centaline, {
65
65
  //获取请求头
66
66
  getRequestHeaders: function () {
67
67
  return {
68
- authobject: '{token:"jiangzf-1983422832318779392",platform:"WEB"}',
68
+ authobject: '{token:"wufw-1988032150800367616",platform:"WEB"}',
69
69
  //oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
70
70
  //authObject: '{token:"jiangzf-1958445358178844672",platform:"WEB"}',
71
71
  //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
@@ -486,6 +486,11 @@ const Enum = {
486
486
  * 打开百度地图
487
487
  */
488
488
  OpenBaiduMap: 100,
489
+
490
+ /// <summary>
491
+ /// 执行客户端函数
492
+ /// </summary>
493
+ ExcuteClientFunction: 27,
489
494
  },
490
495
 
491
496
  /// <summary>
@@ -669,13 +674,13 @@ const Enum = {
669
674
  * 在tab页打开 前端的VUE组件, 组件名称放在action参数里
670
675
  */
671
676
  OpenVueComponentInTab: 122,
672
- /**
673
- * 表单在侧边栏打开
674
- */
677
+ /**
678
+ * 表单在侧边栏打开
679
+ */
675
680
  FormPageInSideBar: 123,
676
- /**
677
- * 列表在侧边栏打开
678
- */
681
+ /**
682
+ * 列表在侧边栏打开
683
+ */
679
684
  SearchPageInSideBar: 124
680
685
  },
681
686
 
@@ -1,12 +1,10 @@
1
1
  <template>
2
2
  <div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
- <ct-form :api="'/EmployeeMaternity/readDetail'" :apiParam="apiParam"></ct-form>
3
+ <ct-form :api="'/Employee/readDetail'" :apiParam="apiParam"></ct-form>
4
4
  <!-- <ct-textbox :source="source"></ct-textbox> -->
5
5
  <ct-dialoglist ref="dialogList"></ct-dialoglist>
6
6
  </div>
7
7
  </template>
8
8
  <script lang="ts" setup>
9
- const apiParam={
10
- "actionType": 2
11
- }
9
+ const apiParam={"actionType":2}
12
10
  </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="app-search" style="width:100%;height:100%;position: fixed;">
3
- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'https://kq-api-gz.centaline.com.cn/onecard-api/EmployeeWorkLogList/ind/getLayoutOfSearch'"
4
- :searchDataApi="'https://kq-api-gz.centaline.com.cn/onecard-api/EmployeeWorkLogList/ind/getListOfSearchModel'"></ct-searchlist>
3
+ <ct-searchlist :apiParam="apiParam" :searchConditionApi="'ReportOverTimeList/getLayoutOfSearch'"
4
+ :searchDataApi="'ReportOverTimeList/getListOfSearchModel'"></ct-searchlist>
5
5
 
6
6
  <!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/EmployeeMaternityList/getLayoutOfSearch'"
7
7
  :searchDataApi="'/EmployeeMaternityList/getListOfSearchModel'"></ct-searchlist> -->
@@ -15,6 +15,6 @@
15
15
 
16
16
  <script lang="ts" setup>
17
17
  import { ref, nextTick } from 'vue'
18
- const apiParam = {"rowGUID":"{7AE0A3FB-2D6C-4E51-8B10-71EAFA2D269A}","code":"KD01","name":"中原(中国)物业顾问有限公司","deptID":"{7AE0A3FB-2D6C-4E51-8B10-71EAFA2D269A}","path":"KD01","checkBillLeftHours":"1","rightEdit":"1"}
18
+ const apiParam = {}
19
19
 
20
20
  </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="app-Tree" style="height:100%;position: fixed;width:100%;padding: 10px;">
3
3
  <ct-treelist :flagsearch="true" :apiParam="apiParam" :leftWidth="'280'"
4
- :searchConditionApi="'/SystemParameterCatalogList/getLayoutOfSearch'" :searchDataApi="'/SystemParameterCatalogList/getListOfSearchModel'"
4
+ :searchConditionApi="'/SystemUser/getSystemBusinessCategory'" :searchDataApi="'/SystemUser/getSystemBusinessCategory'"
5
5
  @loaded="loaded"></ct-treelist>
6
6
  <!-- <ct-textbox :source="source"></ct-textbox> -->
7
7
  <ct-dialoglist></ct-dialoglist>