centaline-data-driven 1.6.44 → 1.6.46

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.
Files changed (31) hide show
  1. package/.vscode/settings.json +5 -0
  2. package/build/centaline/centaline.path.js +2 -0
  3. package/package.json +1 -1
  4. package/release-log.md +16 -0
  5. package/src/Detail.vue +2 -2
  6. package/src/Form.vue +2 -2
  7. package/src/SearchList.vue +3 -2
  8. package/src/centaline/css/common.css +28 -2
  9. package/src/centaline/dialogList/src/dialog.vue +8 -2
  10. package/src/centaline/dynamicForm/src/dynamicForm.vue +3 -0
  11. package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +3 -0
  12. package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +34 -3
  13. package/src/centaline/dynamicSosNew/index.js +14 -0
  14. package/src/centaline/dynamicSosNew/src/dynamicSosNew.vue +165 -0
  15. package/src/centaline/dynamicTagsNew/index.js +13 -0
  16. package/src/centaline/dynamicTagsNew/src/dynamicTagsNew.vue +336 -0
  17. package/src/centaline/loader/src/ctl/Button.js +1 -1
  18. package/src/centaline/loader/src/ctl/Cb.js +1 -2
  19. package/src/centaline/loader/src/ctl/CellLayout.js +1 -1
  20. package/src/centaline/loader/src/ctl/Checkbox.js +1 -2
  21. package/src/centaline/loader/src/ctl/Compound.js +1 -1
  22. package/src/centaline/loader/src/ctl/Form.js +17 -2
  23. package/src/centaline/loader/src/ctl/FormList.js +1 -1
  24. package/src/centaline/loader/src/ctl/SearchTable.js +4 -4
  25. package/src/centaline/loader/src/ctl/SosNew.js +113 -0
  26. package/src/centaline/loader/src/ctl/TagsNew.js +222 -0
  27. package/src/centaline/loader/src/ctl/lib/LibFunction.js +10 -4
  28. package/src/centaline/loader/src/ctl.js +2 -0
  29. package/src/main.js +4 -4
  30. package/wwwroot/static/centaline/centaline-data-driven.js +3514 -2480
  31. package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
@@ -0,0 +1,222 @@
1
+ import base from '../../index';
2
+ import Base from './Base';
3
+ import valid from '../../../validate/index';
4
+ import common from '../../../common';
5
+ import Vue from 'vue';
6
+ import Enum from './lib/Enum';
7
+ const TagsNew = function (source, moreActionRouter) {
8
+ var rtn = {
9
+ itemKey : Math.random(),
10
+ isShowPrefix : false,
11
+ get filterable() {
12
+ return true;
13
+ },
14
+ get multiple() {
15
+ return true;
16
+ },
17
+ options: source.code1 === '' ? [] : [].concat(JSON.parse(source.code1)),
18
+ _lockedValue: null,
19
+ _value: null,
20
+ get value() {
21
+ if (this._value !== null) {
22
+ return this._value;
23
+ }
24
+ else {
25
+ this._value = [];
26
+ if(source.code1){
27
+ JSON.parse(source.code1).forEach((v) => {
28
+ if (v.flagDeleted !== 1) {
29
+ if(v.flagDeleted!=undefined && v.flagDeleted==true){
30
+ }
31
+ else{
32
+ this._value.push(v.code);
33
+ }
34
+ }
35
+ });
36
+ }
37
+ return this._value;
38
+ }
39
+ },
40
+ set value(v) {
41
+ this._value = v;
42
+ },
43
+ get labelValue() {
44
+ if (source.code1 && rtn.multiple) {
45
+ let rtnLabelValue = [];
46
+ JSON.parse(source.code1).forEach((op) => {
47
+ if (op.flagDeleted !== 1) {
48
+ if (op.flagDeleted != undefined && op.flagDeleted == true) {
49
+ }
50
+ else {
51
+ rtnLabelValue.push(op)
52
+ }
53
+ }
54
+ });
55
+ return rtnLabelValue;
56
+ }
57
+ else {
58
+ return [];
59
+ }
60
+ },
61
+ //初始数据
62
+ get globalOptions() {
63
+ if (rtn.multiple) {
64
+ if (source.code1 === '') {
65
+ return []
66
+ }
67
+ else {
68
+ return [].concat(JSON.parse(source.code1));
69
+ }
70
+ }
71
+ return []
72
+ },
73
+ //重新赋值code1
74
+ setCode() {
75
+ let currentOptions = this.labelValue.filter((v) => {
76
+ return this.value.indexOf(v['code']) > -1;
77
+ });
78
+ let currentOptions1 = this.options.filter((v) => {
79
+ return this.value.indexOf(v['code']) > -1;
80
+ });
81
+ currentOptions1.forEach((v) => {
82
+ let item = currentOptions.find((v1) => {
83
+ return v1.code === v.code;
84
+ });
85
+ if (!item) {
86
+ currentOptions.push(v)
87
+ }
88
+ });
89
+
90
+ if (source.code1 != '') {
91
+ let checked = JSON.parse(source.code1 || '[]')
92
+ checked.forEach((v) => {
93
+ let item = rtn.globalOptions.find((v1) => {
94
+ return v1.code === v.code;
95
+ });
96
+ if (item && this.value.indexOf(v['code']) < 0) {
97
+ if (!item.locked) {
98
+ v['flagDeleted'] = true;
99
+ }
100
+ }
101
+ else {
102
+ return
103
+ }
104
+ currentOptions.push(v)
105
+ });
106
+ source.code1 = JSON.stringify(currentOptions);
107
+ }
108
+ else {
109
+ source.code1 = JSON.stringify(currentOptions);
110
+ }
111
+
112
+ this.labelValue = currentOptions.filter((v) => {
113
+ return !v.flagDeleted;
114
+ });
115
+ },
116
+
117
+
118
+ get valueLabel() {
119
+ if (source.isList && this.value.length > 0 && rtn.attrs.placeholder) {
120
+ return rtn.attrs.placeholder + ":";
121
+ }
122
+ return '';
123
+ },
124
+ get parentName() {
125
+ return source.parentField;
126
+ },
127
+ attrs: {
128
+ style: {
129
+ width: '100%'
130
+ },
131
+ clearable: true
132
+ },
133
+ apiParams: {
134
+ paramName: 'k',
135
+ parentName: 'pk',
136
+ parentValue: 'pv',
137
+ search: 't'
138
+ },
139
+ get defaultValue() {
140
+ var rtnArr = [];
141
+ if (this.defaultText !== '') {
142
+ [].concat(JSON.parse(this.defaultText)).forEach((v) => {
143
+ rtnArr.push(v.code);
144
+ });
145
+ }
146
+ return rtnArr;
147
+ },
148
+ defaultText: source.code1,
149
+ get clearable() {
150
+ if (typeof source.clear === 'undefined') {
151
+ return true;
152
+ }
153
+ if (source.clear) {
154
+ return true;
155
+ }
156
+ else {
157
+ return false;
158
+ }
159
+ },
160
+ set clearable(v) {
161
+ source.clear = v;
162
+ },
163
+ get searchTick() {
164
+ return parseInt(source.searchTick) || 250;
165
+ },
166
+ set searchTick(v) {
167
+ source.searchTick = v;
168
+ },
169
+ getOptions(paramsAction, key) {
170
+ var self = this;
171
+ var apiAddrs = paramsAction || this.api;
172
+ var params = {
173
+ action: apiAddrs,
174
+ para: {
175
+ paramName: self.paramName,
176
+ parentValue: rtn.getFormParentFieldPara(),
177
+ key: key,
178
+ extraData: rtn.getFormRefFieldPara()
179
+ }
180
+ };
181
+ Vue.prototype.$api.postHandler(common.globalUri(), params).then((response) => {
182
+ if (response.rtnCode === Enum.ReturnCode.Successful) {
183
+ self.options = response.content;
184
+ }
185
+ });
186
+ },
187
+ moreActionRouter: moreActionRouter,//更多高级查询
188
+ //弹出SearchList类型,0不弹框,1点按钮弹框,2直接点搜索框弹框
189
+ get popupSearchListType() {
190
+ if (moreActionRouter) {
191
+ return 1;
192
+ }
193
+
194
+ return 0;
195
+ },
196
+ get moreActionBtnName() {
197
+ if (moreActionRouter) {
198
+ return moreActionRouter.label;
199
+ }
200
+
201
+ return null;
202
+ },
203
+ get lockedValue() {
204
+ if (this._lockedValue !== null) {
205
+ return this._lockedValue;
206
+ }
207
+ else {
208
+ this._lockedValue = [];
209
+ this.options.forEach((v) => {
210
+ if(v.locked){
211
+ this._lockedValue.push(v.code);
212
+ }
213
+ });
214
+ return this._lockedValue;
215
+ }
216
+ },
217
+ };
218
+ rtn = base.copy(Base(source), rtn);
219
+ rtn = base.copy(rtn, valid.Init(rtn));
220
+ return rtn;
221
+ }
222
+ export default TagsNew;
@@ -2,6 +2,7 @@ import base from '../../../index';
2
2
  import Enum from './Enum';
3
3
  import Gp from '../Gp';
4
4
  import Sos from '../Sos';
5
+ import SosNew from '../SosNew';
5
6
  import SosTt from '../SosTt';
6
7
  import Iti from '../Iti';
7
8
  import So from '../So';
@@ -9,6 +10,7 @@ import ComboBoxWithTextBox from '../ComboBoxWithTextBox';
9
10
  import T from '../T';
10
11
  import L from '../L';
11
12
  import Tags from '../Tags';
13
+ import TagsNew from '../TagsNew';
12
14
  import Button from '../Button';
13
15
  import Mo from '../Mo';
14
16
  import Seg from '../Seg';
@@ -126,8 +128,10 @@ const LibFunction = {
126
128
  break;
127
129
  case Enum.ControlType.SearchListBox: //搜索下拉框
128
130
  moreActionRouter = LibFunction.getRouter(source.actionRouters, field.moreActionRouterKey);
129
- item = Sos(field, moreActionRouter);
130
- item.is = 'ct-sos';
131
+ // item = Sos(field, moreActionRouter);
132
+ // item.is = 'ct-sos';
133
+ item = SosNew(field, moreActionRouter);
134
+ item.is = 'ct-sosNew';
131
135
  break;
132
136
  case Enum.ControlType.NumericRange://数字区间
133
137
  item = Iti(field);
@@ -158,13 +162,15 @@ const LibFunction = {
158
162
  break;
159
163
  case Enum.ControlType.MultiSelectWithSearch: //带搜索多选
160
164
  moreActionRouter = LibFunction.getRouter(source.actionRouters, field.moreActionRouterKey);
161
- item = Tags(field, moreActionRouter);
165
+ // item = Tags(field, moreActionRouter);
166
+ item = TagsNew(field, moreActionRouter);
162
167
  item = base.copy(item, {
163
168
  attrs: {
164
169
  collapseTags: true
165
170
  }
166
171
  });
167
- item.is = 'ct-tags';
172
+ // item.is = 'ct-tags';
173
+ item.is = 'ct-tagsNew';
168
174
  break;
169
175
  case Enum.ControlType.MultiSelectNoSearch: //不带搜索多选
170
176
  moreActionRouter = LibFunction.getRouter(source.actionRouters, field.moreActionRouterKey);
@@ -49,6 +49,8 @@ const loader = {
49
49
  AppContainer: require("./ctl/AppContainer.js").default,
50
50
  Steps: require("./ctl/Steps.js").default,
51
51
  Location: require("./ctl/Location.js").default,
52
+ SosNew: require("./ctl/SosNew.js").default,
53
+ TagsNew: require("./ctl/TagsNew.js").default,
52
54
  };
53
55
 
54
56
  export default loader;
package/src/main.js CHANGED
@@ -21,7 +21,7 @@ Vue.use(centaline, {
21
21
  // baseUrl: "http://10.88.22.46:22324/service-api/v1/form/router",
22
22
  // baseUrl: "http://10.88.22.13:17070/max-uplink-api/",
23
23
  // baseUrl: "http://10.88.22.13:9004/max-uplink-api/",
24
- // baseUrl:"http://szamax-api.centaline.com.cn/max-uplink-api/",
24
+ // baseUrl:"http://szamaxbusiness-api-test2.centaline.com.cn/max-uplink-api/",
25
25
  // baseUrl: "http://10.88.22.13:6060/onecard-api/",
26
26
  // baseUrl: "http://10.6.1.163:9000/max-uplink-api/v1/form/router",
27
27
  // baseUrl: "http://10.28.21.164:9004/max-uplink-api/",
@@ -69,14 +69,14 @@ Vue.use(centaline, {
69
69
  return {
70
70
  oldToken: 'c827efdb-95fd-4b50-9b65-4e3f736acb53',
71
71
  token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjksOwjAMBe-SdS05tuPE7PpJNhwCBWglWCHaSiDE3SniEGznjfTm5eb16HYuIUWltoc-sYKkYGDcF_ApGWYzjrE_CHOHKANQxAJSYgYTCYBoahaC0qAHJc6lbRW8bLuUbpNIBDS3QTJhZiHXuPFxczsfmXxCJG3cpS4_gMb6Bes83vfj8x9x1-Wy3eJ48seQJuCaziATTWDRIlSazCNrlerd-wMAAP__.93H7c7k4TLTqbKpozp0aTSU4U_WrQu3eS990iS-TCpw',
72
- // authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjktqAzEQBe-itRv6Oy15J3mkTQ5hxnEPOKsQ25AQcveIXCK7R_Gg6jvdn5d0TOxr174QtE4CyipzCQOi2drq6M35XEa1vKICc2mgwwfk4gJGRSrm3HrTcz4hMTKBnaqDejWoNgpIX9Qz-oqN0yHF53s6kouhEGU9pNv2-ANadP4meN7j4yW-_iPu7XGbWovd46oIsV9tatEgRwmg14V1l4tssaWfXwAAAP__.sF1LYLtwnVq8_fFcoq7FA9hy44G1H7SMCYBmZqeKnLY"}',
72
+ // authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjkluAjEQAP_iMy315ulubjZjX_IIxGSMBCfEIoGi_D1EeURupbpUfaXbY0nbxDY3bRNBbSSgrPImYUDMea6lt2q8j16yz6jAHBW0WwcPE8gUUtC9tqp73yExMkHeFQO1kqHkHiBtUnO0GSunTRrPS9qSaUxM4rpJp8P9T2TR-BWP27h-jNd_zJ3vp3fWjI1kXSHiM0BXDFgGLXDU42FycedlpO8fAAAA__8.ivEDjo_ZDzbRbY8bF3PeEQaGhl5uvrVbVDPjq9iYHb4"}',
73
73
 
74
74
  // originalRequestURL: 'http://10.88.22.67:8080',
75
75
  EstateInfo: '{"estateId":"1c581b7c-d629-4670-8a7c-6d622860bc58","estateName":"0%E9%87%91%E9%9A%85%E4%BA%91%E7%AD%91%E5%A4%A9%E6%B4%A5","estDeptPath":"009.014.001.001"}',
76
76
  estateId: '',
77
77
 
78
- authObject: '{"currentEstate":{},"platform":1,"osVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"7Y0R7s","time":1747898817322,"sign":"1504b27c1f85894e7455899feb027859","systemSource":"CCESU","empNo":"hqxtgl","empId":"2411121446336B97FBEB7FD54905A903","clientVersion":"12.5","empName":"hq%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86","roleName":"%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98","deptFullName":"%E6%9C%AA%E5%8C%B9%E9%85%8DCCHR%E4%B8%ADHROC%E9%83%A8%E9%97%A8%2F%E9%9B%86%E5%9B%A2IT%2FCCES%E7%BB%84"}',
79
- AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImEyNzAwZjdkLThiNmUtNDlmNS1iMzRhLTYzODcxOTYxZDc3MiJ9.6sBUgoPllhuhBcLespy8OuTj63cvTgJLEw6tRdmqTLi2A9xVyTyYTv_0HILD5AW6mqfzZOO8NhY6DKNOTusUvA',
78
+ authObject: '{"currentEstate":{"estateId":"241112160400DF3DC1EB63A14A1DBBF4","estateName":"%E6%B5%8B%E8%AF%95%E6%8C%89%E7%82%B9%E4%BD%8Dhq","estDeptPath":"001.200.063.001"},"platform":1,"osVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"6TnEgk","time":1749115399017,"sign":"3a50eb5f08b7bd75b2e7c99f32fa220e","systemSource":"CCESU","empNo":"hqxtgl","empId":"2411121446336B97FBEB7FD54905A903","clientVersion":"12.5","empName":"hq%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86","roleName":"%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98","deptFullName":"%E6%9C%AA%E5%8C%B9%E9%85%8DCCHR%E4%B8%ADHROC%E9%83%A8%E9%97%A8%2F%E9%9B%86%E5%9B%A2IT%2FCCES%E7%BB%84"}',
79
+ AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImU0Y2MyMmVjLTA2OGEtNDE1Yi1hNzY3LTE0ZDBkODBkNTMxMCJ9.Rqk2TL4Q8rPqFh8LvDP5nAMDzRCzVia_DnrSXi5qnV8NoIkcl-nrRS4DRS-yRapMS5h8biWjI1tcFsneDJNvFQ',
80
80
  };
81
81
  },
82
82
  // 请求完成事件,可判断是否登录过期执行响应操作