centaline-data-driven-v3 0.0.70 → 0.0.72

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.0.70",
3
+ "version": "0.0.72",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -16,7 +16,8 @@
16
16
  :style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
17
17
  @click="clickHandle">{{ model.controlLabel }}</el-link>
18
18
  <el-upload v-else-if="model.isImport" :action="model.action" :data="uploadData" :headers="headers" :multiple="false"
19
- :show-file-list="false" :on-success="handleAvatarSuccess" :on-error="handleAvatarError" :before-upload="handleAvatarBeforeUpload">
19
+ :show-file-list="false" :on-success="handleAvatarSuccess" :on-error="handleAvatarError"
20
+ :before-upload="handleAvatarBeforeUpload">
20
21
  <el-button type="primary" v-bind="model.attrs"
21
22
  :style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
22
23
  :disabled="model.disabled || model.locked">
@@ -37,7 +38,7 @@
37
38
  <div>{{ model.controlLabel }}</div>
38
39
  <div class="subText">{{ model.subText }}</div>
39
40
  </el-button>
40
- <el-button v-else type="primary" v-bind="model.attrs" @click="clickHandle"
41
+ <el-button v-else type="primary" :loading="model.loading" v-bind="model.attrs" @click="clickHandle"
41
42
  :style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
42
43
  :disabled="model.disabled || model.locked">
43
44
  <template #icon v-if="model.icon">
@@ -47,7 +48,7 @@
47
48
  <img :src="model.imgUrl" :height="model.buttonHeight" />
48
49
  <div style="margin-top:5px;" class="labelText" v-html="model.controlLabel"></div>
49
50
  </template>
50
- <template v-else>
51
+ <template v-else :style="{display:model.loading?'inline-block':''}">
51
52
  <img v-if="model.imgUrl" :title="model.controlLabel" :src="model.imgUrl" :height="model.buttonHeight" />
52
53
  <span v-else v-html="model.controlLabel"></span>
53
54
  </template>
@@ -80,14 +81,14 @@ const uploadData = computed(() => {
80
81
  //因传输方式是FormData,故需要对Value是object的进行转化
81
82
  let data = {};
82
83
  for (var key in props.fileData) {
83
- if (typeof props.fileData[key] === "object") {
84
- data[key] = JSON.stringify(props.fileData[key]);
85
- }
86
- else {
87
- data[key] = props.fileData[key];
88
- }
84
+ if (typeof props.fileData[key] === "object") {
85
+ data[key] = JSON.stringify(props.fileData[key]);
86
+ }
87
+ else {
88
+ data[key] = props.fileData[key];
89
+ }
89
90
  }
90
- data.flagHaveAlert=0;
91
+ data.flagHaveAlert = 0;
91
92
  return data;
92
93
  })
93
94
  const headers = computed(() => {
@@ -98,20 +99,20 @@ function clickHandle() {
98
99
  }
99
100
 
100
101
  function handleAvatarBeforeUpload(file) {
101
- if(model.value.form && model.value.form.$vue){
102
- let submitData = model.value.form.$vue.getFileData(model.value);
103
- for (var key in submitData) {
104
- if (typeof submitData[key] === "object") {
105
- uploadData.value[key] = JSON.stringify(submitData[key]);
106
- }
107
- else {
108
- uploadData.value[key] = submitData[key];
109
- }
102
+ if (model.value.form && model.value.form.$vue) {
103
+ let submitData = model.value.form.$vue.getFileData(model.value);
104
+ for (var key in submitData) {
105
+ if (typeof submitData[key] === "object") {
106
+ uploadData.value[key] = JSON.stringify(submitData[key]);
107
+ }
108
+ else {
109
+ uploadData.value[key] = submitData[key];
110
+ }
111
+ }
110
112
  }
111
- }
112
113
  }
113
114
  function handleAvatarSuccess(res) {
114
- emit('importComplete', res, model.value);
115
+ emit('importComplete', res, model.value);
115
116
  }
116
117
  function handleAvatarError(info) {
117
118
  ElMessage({
@@ -137,47 +138,47 @@ function commandClick(code) {
137
138
  color: var(--chinaRed);
138
139
  font-weight: 700;
139
140
  }
141
+
140
142
  /* 查询搜索 */
141
143
  .search-btn,
142
144
  .more-btn {
143
- height: 26px;
144
- background: var(--chinaRed);
145
- border-color: var(--chinaRed);
146
- box-shadow: 0px 2px 4px 0px rgba(238, 107, 107, 0.25);
147
- border-radius: 6px;
148
- color: #fff;
145
+ height: 26px;
146
+ background: var(--chinaRed);
147
+ border-color: var(--chinaRed);
148
+ box-shadow: 0px 2px 4px 0px rgba(238, 107, 107, 0.25);
149
+ border-radius: 6px;
150
+ color: #fff;
149
151
  }
150
152
 
151
153
  /* 重置按钮 更多按钮*/
152
154
  .reset-btn {
153
- height: 26px;
154
- background: #FFFFFF;
155
- border-color: var(--chinaRed);
156
- border-radius: 6px;
157
- color: var(--chinaRed);
155
+ height: 26px;
156
+ background: #FFFFFF;
157
+ border-color: var(--chinaRed);
158
+ border-radius: 6px;
159
+ color: var(--chinaRed);
158
160
  }
159
161
 
160
162
  /* 搜索按钮,重置按钮和更多按钮的hover */
161
163
  .search-btn:hover,
162
164
  .reset-btn:hover,
163
165
  .more-btn:hover {
164
- background-color: var(--btnHoverRed);
165
- border-color: var(--btnHoverRed);
166
- color: #fff;
166
+ background-color: var(--btnHoverRed);
167
+ border-color: var(--btnHoverRed);
168
+ color: #fff;
167
169
  }
168
170
 
169
171
  .more-btn:hover .open,
170
172
  .more-btn:hover .fold {
171
- background-color: var(--btnHoverRed);
173
+ background-color: var(--btnHoverRed);
172
174
  }
173
175
 
174
176
  .search-btn:active,
175
177
  .search-btn:focus,
176
178
  .reset-btn:active.reset-btn:focus,
177
179
  .more-btn:active.more-btn:focus {
178
- background-color: var(--btnFocusRed);
179
- border-color: var(--btnFocusRed);
180
- color: #fff;
180
+ background-color: var(--btnFocusRed);
181
+ border-color: var(--btnFocusRed);
182
+ color: #fff;
181
183
  }
182
-
183
184
  </style>
@@ -4,7 +4,7 @@
4
4
  <ct-searchscreen ref="reftreescreen" :from="'tree'" :api="searchConditionApi" :screenPara="screenPara"
5
5
  @search="search" @loaded="screenload" ></ct-searchscreen>
6
6
  </div>
7
- <tree ref="reftree" :api="searchDataApi" @loaded="loaded" :treeHeight="treeHeight">
7
+ <tree v-if="loadTree" ref="reftree" :api="searchDataApi" @loaded="loaded" :treeHeight="treeHeight">
8
8
  </tree>
9
9
 
10
10
 
@@ -14,6 +14,7 @@
14
14
  import { ref, nextTick, watch, onMounted } from 'vue'
15
15
  import Tree from './Tree/Tree.vue';
16
16
  const emit = defineEmits(['loaded'])
17
+ const loadTree=ref(false)
17
18
 
18
19
  const props = defineProps({
19
20
  searchConditionApi: String,
@@ -54,6 +55,7 @@ function loaded(data) {
54
55
  } catch (e) { }
55
56
  }
56
57
  function screenload(data) {
58
+ loadTree.value=true
57
59
  setTreeHeight();
58
60
  }
59
61
  onMounted(() => {
@@ -19,6 +19,9 @@ onActivated(() => {
19
19
  })
20
20
  function close() {
21
21
  emit('close', props);
22
+ if (props.vmodel.content[0].attrs && typeof props.vmodel.content[0].attrs["onCloseDialog"] === "function") {
23
+ props.vmodel.content[0].attrs["onCloseDialog"]();
24
+ }
22
25
  }
23
26
  function scrollHandle(ev) {
24
27
  contentTop.value = content.value.scrollTop;
@@ -4,6 +4,7 @@ import Enum from '../../utils/Enum';
4
4
  const Router = function (source) {
5
5
  let rtn = {
6
6
  disabled: source.selectedMode && source.selectedMode === Enum.ListSelectMode.Multiple ? true : false,//是否可以多选
7
+ loading: false,
7
8
  //动作的 key 值
8
9
  get key() {
9
10
  return source.key;
@@ -320,6 +320,8 @@ function isHandle(type) {
320
320
  let result = false;
321
321
  switch (type) {
322
322
  case Enum.ControlType.CheckBoxList://复选列表
323
+ case Enum.ControlType.MultiSelectNoSearch:
324
+ case Enum.ControlType.MultiSelectWithSearch:
323
325
  result = true;
324
326
  break;
325
327
  default:
package/src/main.js CHANGED
@@ -21,10 +21,11 @@ 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/",
24
+ //baseUrl:"http://10.88.22.66/IBS.Mvc/api/",
25
25
  //baseUrl: "http://10.88.22.66:6060/xian/",
26
26
  //baseUrl: "http://10.1.245.50:38735/max-uplink-api/",
27
- //baseUrl: "http://10.1.245.111:38028/",
27
+ baseUrl: "http://10.88.22.66:6060/onecard-api/",
28
+
28
29
  flagRouterSelf: true,
29
30
  flagApp: false,//是否app端
30
31
  zindex: 999,
@@ -63,8 +64,8 @@ app.use(centaline, {
63
64
  return {
64
65
  //authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
65
66
  //oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
66
- //authObject: '{token:"1-a7289bb2-9f1e-4a04-9016-1e555bf39188"}',
67
- authObject: '{EmpID:"Token_15dc3fe3-b962-4bd2-85e2-2ce843676353",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_15dc3fe3-b962-4bd2-85e2-2ce843676353",Platform:"IOS"}',
67
+ authObject: '{token:"1647-1902992017571581952",platform:"WEB"}',
68
+ //authObject: '{EmpID:"Token_2e493771-28ae-485d-afea-0e6dcef23f64",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_2e493771-28ae-485d-afea-0e6dcef23f64",Platform:"WEB"}',
68
69
  };
69
70
  },
70
71
  // 请求完成事件,可判断是否登录过期执行响应操作
@@ -437,7 +437,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
437
437
  submitData = field.getActionPara(submitData).para;
438
438
  common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
439
439
  }
440
- else if(field.isVueComponentInTab){
440
+ else if (field.isVueComponentInTab) {
441
441
  submitData = field.getActionPara(submitData).para;
442
442
  common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
443
443
  }
@@ -665,7 +665,12 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
665
665
  }
666
666
  }
667
667
  else {
668
+ field.loading = true;
669
+ if (!field.flagAlert && field.content) {
670
+ common.message( field.content, 'info',1500,true)
671
+ }
668
672
  field.doBlobAction(submitData, (data, headers) => {
673
+ field.loading=false;
669
674
  if (data.type == "application/json") {
670
675
  const reader = new FileReader();
671
676
  reader.readAsText(data, 'utf-8');
@@ -838,10 +843,10 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
838
843
  }
839
844
  else {
840
845
  if (source == 'table') {
841
- model.$vue.operationLoading = true
846
+ model.$vue.operationLoading = true
842
847
  }
843
- else{
844
- submitData = field.getActionPara(submitData).para;
848
+ else {
849
+ submitData = field.getActionPara(submitData).para;
845
850
  }
846
851
  field.doAction(submitData, (data) => {
847
852
  if (source == 'table') {
@@ -928,10 +933,10 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
928
933
  fun(submitData, title, model);
929
934
  }
930
935
  }
936
+ if (typeof field.onChanged !== 'undefined') {
937
+ common.excute.call(model.scripts, field.onChanged)
938
+ }
931
939
  if (field.isSubmit && field.flagVerifyData) {
932
- if (typeof field.onChanged !== 'undefined') {
933
- common.excute.call(model.scripts, field.onChanged)
934
- }
935
940
  if (source == 'form' && !model.$vue.validExcute()) {
936
941
  return;
937
942
  }
@@ -1602,7 +1607,7 @@ export function RouterMouseenterHandler(field, submitData, action, model, source
1602
1607
  cancelButtonText: '取消',
1603
1608
  type: 'warning'
1604
1609
  }).then(() => {
1605
-
1610
+
1606
1611
  submitData.flagHaveAlert = '1';
1607
1612
  field.doAction(submitData, (res) => {
1608
1613
  if (res.rtnCode === Enum.ReturnCode.Successful) {
@@ -1659,10 +1664,10 @@ export function RouterMouseenterHandler(field, submitData, action, model, source
1659
1664
  fun(submitData, title, model);
1660
1665
  }
1661
1666
  }
1667
+ if (typeof field.onChanged !== 'undefined') {
1668
+ common.excute.call(model.scripts, field.onChanged)
1669
+ }
1662
1670
  if (field.isSubmit && field.flagVerifyData) {
1663
- if (typeof field.onChanged !== 'undefined') {
1664
- common.excute.call(model.scripts, field.onChanged)
1665
- }
1666
1671
  if (source == 'form' && !model.$vue.validExcute()) {
1667
1672
  return;
1668
1673
  }
@@ -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="'/batchcontractadjust/batchAdjustCommissionPointList/getLayoutOfSearch'"
4
- :searchDataApi="'/batchcontractadjust/batchAdjustCommissionPointList/getList'"></ct-searchlist>
3
+ <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/ReportMonthAttendanceList/getLayoutOfSearch'"
4
+ :searchDataApi="'/ReportMonthAttendanceList/getListOfSearchModel'"></ct-searchlist>
5
5
  <ct-dialoglist ref="dialogList"></ct-dialoglist>
6
6
 
7
7
  </div>