centaline-data-driven-v3 0.1.26 → 0.1.27

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.26",
3
+ "version": "0.1.27",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -1,27 +1,20 @@
1
1
  <template>
2
2
  <div class="searchSideMenu toggler" :style="{ right: sideBarMenuRight + 'px' }" @click="clickHandler()">
3
3
  <el-icon>
4
- <ArrowRight v-show="side == 'open'" />
5
- <ArrowLeft v-show="side == 'close'" />
4
+ <ArrowRight v-show="sideBarStatus == 'open'" />
5
+ <ArrowLeft v-show="sideBarStatus == 'close'" />
6
6
  </el-icon>
7
7
  </div>
8
8
  </template>
9
9
  <script setup lang="ts">
10
- import { ref } from 'vue'
11
10
  const emit = defineEmits(['sideMenuClickHandler'])
12
11
  const props = defineProps({
13
12
  sideBarMenuRight: Number,
14
13
  sideBarStatus: String,
15
14
  })
16
- const side = ref('open')
17
- if (props.sideBarStatus) {
18
- side.value = props.sideBarStatus;
19
- }
15
+
20
16
  function clickHandler() {
21
- let v = side.value;
22
- if (v == 'close') side.value = 'open';
23
- else if (v == 'open') side.value = 'close';
24
- emit('sideMenuClickHandler', v);
17
+ emit('sideMenuClickHandler', props.sideBarStatus);
25
18
  }
26
19
  defineExpose({
27
20
  clickHandler
@@ -32,7 +32,6 @@ const props = defineProps({
32
32
  })
33
33
  const detailSearchlist=ref()
34
34
 
35
-
36
35
  function submit(modelForm, responseData) {
37
36
  emit('submit', modelForm, responseData);
38
37
  }
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div style="width: 100%" class="ct-searchtable" ref="refSearchTable">
3
3
  <ct-searchstats ref="refTableStats" v-if="!isLoading && model && searchStatsApi" :api="searchStatsApi"
4
- @searchStats="clickSearchStats" :searchModel="model.searchModel"
5
- :flagDisabled="disabledStats" :apiParam="apiParam">
4
+ @searchStats="clickSearchStats" :searchModel="model.searchModel" :flagDisabled="disabledStats"
5
+ :apiParam="apiParam">
6
6
  </ct-searchstats>
7
7
  <TableToolbar ref="refToolbar" v-if="!isLoading && model && model.buttons" :buttons="model.buttons"
8
8
  :key="model.toolbarKey" @click="toolbarClickHandler" @importComplete="importComplete"
@@ -25,8 +25,9 @@
25
25
  <thead ref="refTableHead" class="right-no-fixation-th">
26
26
  <tr class="ct-tr" ref="refHeadTr" v-for="(columns, columnsIndex) in model.columnsArr"
27
27
  :key="columnsIndex">
28
- <th v-if="model.isMulti && columnsIndex === 0" ref="headLeftThs" :rowspan="model.multiRowSpan"
29
- class="ct-td left-fixation-th checkbox-td" :class="[model.tdClass]">
28
+ <th v-if="model.isMulti && columnsIndex === 0" ref="headLeftThs"
29
+ :rowspan="model.multiRowSpan" class="ct-td left-fixation-th checkbox-td"
30
+ :class="[model.tdClass]">
30
31
  <el-checkbox v-model="model.selectAll" :indeterminate="model.isIndeterminate"
31
32
  size="default" @change="selectAll"></el-checkbox>
32
33
  </th>
@@ -184,7 +185,7 @@
184
185
  :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'"
185
186
  :columnName="column.id" :router="column.router"
186
187
  :columnGroupId="column.groupId"
187
- :colValue="getValueCaseInsensitive(row,column.id)" :rowData="row"
188
+ :colValue="getValueCaseInsensitive(row, column.id)" :rowData="row"
188
189
  :eventTriggerType="column.eventTriggerType"
189
190
  @click="rolRouterClickHandler"
190
191
  @mouseenter="rolRouterMouseenterHandler">
@@ -405,6 +406,9 @@ function load(data) {
405
406
  model.value = data;
406
407
  model.value.$vue = { searchStrat, searchEnd, downloadUrl, loadStats, setTableHeight, updateCurrentRow, doAction, itemKey, refreshTableColumns, calculatingRowHeight, emit, operationLoading, getPage, toolbarClickHandler };
407
408
  model.value.isIframe = props.isIframe
409
+ model.value.isPageInSideBar = false
410
+ model.value.columnName = null
411
+ model.value.columnGroupId = null
408
412
  //自动查询 调用合并列
409
413
  if (model.value.listData.length > 0) {
410
414
  if (model.value.rowMergedColumns.length > 0) {
@@ -555,7 +559,7 @@ function importComplete(res, field) {
555
559
  message: data.rtnMsg,
556
560
  type: 'success',
557
561
  showClose: true,
558
- dangerouslyUseHTMLString:true,
562
+ dangerouslyUseHTMLString: true,
559
563
  });
560
564
  }
561
565
  getPage(1, false);
@@ -566,7 +570,7 @@ function importComplete(res, field) {
566
570
  message: data.rtnMsg,
567
571
  type: 'warning',
568
572
  showClose: true,
569
- dangerouslyUseHTMLString:true,
573
+ dangerouslyUseHTMLString: true,
570
574
  });
571
575
  }
572
576
  },
@@ -609,7 +613,7 @@ function importComplete(res, field) {
609
613
  message: data.rtnMsg,
610
614
  type: 'success',
611
615
  showClose: true,
612
- dangerouslyUseHTMLString:true,
616
+ dangerouslyUseHTMLString: true,
613
617
  });
614
618
  }
615
619
  getPage(1, false);
@@ -620,7 +624,7 @@ function importComplete(res, field) {
620
624
  message: data.rtnMsg,
621
625
  type: 'warning',
622
626
  showClose: true,
623
- dangerouslyUseHTMLString:true,
627
+ dangerouslyUseHTMLString: true,
624
628
  });
625
629
  }
626
630
  },
@@ -727,7 +731,7 @@ function rowLayoutClickHandle(index) {
727
731
  }
728
732
 
729
733
  //表单列表操作
730
- function rolRouterClickHandler(field, rowData, rowindex, visible, columnName, columnGroupId,callBack, flagMouseenter) {
734
+ function rolRouterClickHandler(field, rowData, rowindex, visible, columnName, columnGroupId, callBack, flagMouseenter) {
731
735
  field.rowindex = rowindex;
732
736
  if (refRowsPopover.value[rowindex]) {
733
737
  refRowsPopover.value[rowindex].hide();
@@ -739,6 +743,7 @@ function rolRouterClickHandler(field, rowData, rowindex, visible, columnName, co
739
743
  model.value.currentListenVoice = visible ? 'router' + field.id + rowindex : '';
740
744
  }
741
745
 
746
+
742
747
  var submitData = {};
743
748
  field.submitListField.forEach((k) => {
744
749
  submitData[k] = rowData[k];
@@ -752,9 +757,11 @@ function rolRouterClickHandler(field, rowData, rowindex, visible, columnName, co
752
757
  }
753
758
  if (columnName) {
754
759
  submitData.columnName = columnName;
760
+ model.value.columnName = columnName
755
761
  }
756
762
  if (columnGroupId) {
757
763
  submitData.columnGroupId = columnGroupId;
764
+ model.value.columnGroupId = columnGroupId
758
765
  }
759
766
 
760
767
  let action = field.action;
@@ -762,11 +769,26 @@ function rolRouterClickHandler(field, rowData, rowindex, visible, columnName, co
762
769
  action = rowData[field.actionField];
763
770
  }
764
771
 
772
+ if (field.isFormPageInSideBar || field.isSearchPageInSideBar) {
773
+ if (field.isFormPageInSideBar) {
774
+ field.actionSource = 'Form';
775
+ }
776
+ else if (field.isSearchPageInSideBar) {
777
+ field.actionSource = 'SearchList';
778
+ }
779
+ model.value._rowSelectRouter = field;
780
+ model.value.flagSideBar = true;
781
+ model.value.isPageInSideBar = true;
782
+ model.value.sideBarWidth = field.pageWidth;
783
+ emit("loaded");
784
+ return;
785
+ }
786
+
765
787
  RouterClickHandler(field, submitData, action, model.value, 'table', callBack, flagMouseenter)
766
788
  }
767
789
  //表单列表操作
768
- function rolRouterMouseenterHandler(field, rowData, rowindex, visible, columnName,columnGroupId, callBack, flagMouseenter) {
769
- rolRouterClickHandler(field, rowData, rowindex, visible, columnName,columnGroupId, callBack, true)
790
+ function rolRouterMouseenterHandler(field, rowData, rowindex, visible, columnName, columnGroupId, callBack, flagMouseenter) {
791
+ rolRouterClickHandler(field, rowData, rowindex, visible, columnName, columnGroupId, callBack, true)
770
792
  }
771
793
  function popupClickHandler() {
772
794
  var tempListData = model.value.getSelectRowData({ isMulti: model.value.isMulti });
@@ -1609,9 +1631,9 @@ function addClass(el, className) {
1609
1631
  el.className = newClassName.join(" ");
1610
1632
  }
1611
1633
  function getValueCaseInsensitive(obj, key) {
1612
- const searchKey = key.toLowerCase();
1613
- const foundKey = Object.keys(obj).find(k => k.toLowerCase() === searchKey);
1614
- return foundKey ? obj[foundKey] : undefined;
1634
+ const searchKey = key.toLowerCase();
1635
+ const foundKey = Object.keys(obj).find(k => k.toLowerCase() === searchKey);
1636
+ return foundKey ? obj[foundKey] : undefined;
1615
1637
  }
1616
1638
 
1617
1639
  defineExpose({
@@ -32,7 +32,7 @@
32
32
  @clickPrevHandler="clickPrevHandler" @simpleRouterclickHandler="simpleRouterclickHandler"
33
33
  @closeSideHandler="closeSideHandler" @submit="submitHandler"></SearchSideRight>
34
34
  <SearchSideMenu ref="refSideMenu" :sideBarMenuRight="sideBarMenuRight" :sideBarStatus="sideBarStatus"
35
- @sideMenuClickHandler="sideMenuClickHandler"></SearchSideMenu>
35
+ @sideMenuClickHandler="sideMenuClickHandler" :key="reloadKey"></SearchSideMenu>
36
36
  </div>
37
37
  </div>
38
38
  </template>
@@ -218,7 +218,6 @@ function categoryLoadedError() {
218
218
  function categorychange(param) {
219
219
  if (param) screenPara.value = param;
220
220
  reloadKey.value++;
221
- reloadKey.value++;
222
221
 
223
222
  }
224
223
  function searchComplate(index) {
@@ -267,8 +266,8 @@ function tableLoaded() {
267
266
  var tagkey = window.localStorage.getItem(sideBarPageType.value + "key" + title.value);
268
267
  sideBarStatus.value = tagkey;
269
268
  }
270
-
271
- if (flagDefaultDisplaySideBar.value && !sideBarStatus.value) {
269
+
270
+ if ((flagDefaultDisplaySideBar.value && !sideBarStatus.value)||refTable.value.model.isPageInSideBar) {
272
271
  sideMenuClickHandler('close');
273
272
  }
274
273
  else {
@@ -391,6 +390,12 @@ function rowClickHandle() {
391
390
  }
392
391
  );
393
392
  }
393
+ if(refTable.value.model.columnName){
394
+ sideBarApiParam.value.columnName = refTable.value.model.columnName;
395
+ }
396
+ if(refTable.value.model.columnGroupId){
397
+ sideBarApiParam.value.columnGroupId = refTable.value.model.columnGroupId;
398
+ }
394
399
  sideBarApiParam.value.actionType = refTable.value.model.rowSelectRouter.actionType;
395
400
  detailKey.value = detailKey.value + 1;
396
401
  }
@@ -50,6 +50,9 @@ const Router = function (source) {
50
50
  get actionSource() {
51
51
  return source.actionSource;
52
52
  },
53
+ set actionSource(v) {
54
+ source.actionSource = v;
55
+ },
53
56
  //动作之前执行的脚本,属性名称需再斟酌
54
57
  get onChanged() {
55
58
  return source.onChanged;
@@ -165,6 +168,12 @@ const Router = function (source) {
165
168
  get isLayerInSystem() {
166
169
  return source.pageStyle === Enum.PageStyle.LayerInSystem;
167
170
  },
171
+ get isFormPageInSideBar() {
172
+ return source.pageStyle === Enum.PageStyle.FormPageInSideBar;
173
+ },
174
+ get isSearchPageInSideBar() {
175
+ return source.pageStyle === Enum.PageStyle.SearchPageInSideBar;
176
+ },
168
177
 
169
178
  //执行的动作类型(比如新增、修改)
170
179
  get actionType() {
@@ -270,6 +279,9 @@ const Router = function (source) {
270
279
  })
271
280
  return submitArr;
272
281
  },
282
+ set submitListField(v) {
283
+ rtn.submitListField = v;
284
+ },
273
285
  //选中列表时,调用回调函数
274
286
  get callBackFunName() {
275
287
  return source.callBackFunName;
@@ -151,6 +151,9 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
151
151
  get flagSideBar() {
152
152
  return source.content.flagSideBar || false;
153
153
  },
154
+ set flagSideBar(v) {
155
+ source.content.flagSideBar = v;
156
+ },
154
157
  //侧边栏默认是否显示
155
158
  get flagDefaultDisplaySideBar() {
156
159
  return source.content.flagDefaultDisplaySideBar || false;
@@ -166,6 +169,9 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
166
169
  get mainBarWidth() {
167
170
  return source.content.mainBarWidth;
168
171
  },
172
+ set mainBarWidth(v) {
173
+ source.content.mainBarWidth = v;
174
+ },
169
175
  //用于移动端列表单元格的布局
170
176
  get cellLayout() {
171
177
  return source.content.cellLayout;
package/src/main.js CHANGED
@@ -65,7 +65,7 @@ app.use(centaline, {
65
65
  //获取请求头
66
66
  getRequestHeaders: function () {
67
67
  return {
68
- authobject: '{token:"wufw-1980431367841927168",platform:"WEB"}',
68
+ authobject: '{token:"jiangzf-1980566715226116096",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
@@ -668,7 +668,15 @@ const Enum = {
668
668
  /**
669
669
  * 在tab页打开 前端的VUE组件, 组件名称放在action参数里
670
670
  */
671
- OpenVueComponentInTab: 122
671
+ OpenVueComponentInTab: 122,
672
+ /**
673
+ * 表单在侧边栏打开
674
+ */
675
+ FormPageInSideBar: 123,
676
+ /**
677
+ * 列表在侧边栏打开
678
+ */
679
+ SearchPageInSideBar: 124
672
680
  },
673
681
 
674
682
  /// <summary>
@@ -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="'/ReportPersonAttendanceList/getLayoutOfSearch'"
4
- :searchDataApi="'ReportPersonAttendanceList/getListOfSearchModel'"></ct-searchlist>
3
+ <ct-searchlist :apiParam="apiParam" :searchConditionApi="'http://10.88.22.13:7070/onecard-api/EmployeeWorkLogList/ind/getLayoutOfSearch'"
4
+ :searchDataApi="'http://10.88.22.13:7070/onecard-api/EmployeeWorkLogList/ind/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 = {}
18
+ const apiParam = {"rowGUID":"{7AE0A3FB-2D6C-4E51-8B10-71EAFA2D269A}","code":"KD01","name":"中原(中国)物业顾问有限公司","deptID":"{7AE0A3FB-2D6C-4E51-8B10-71EAFA2D269A}","path":"KD01","checkBillLeftHours":"1","rightEdit":"1"}
19
19
 
20
20
  </script>