fmui-base 2.0.73 → 2.0.74

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/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.0.74:移动门户部件样式修改
6
7
  - 2.0.73:移动门户部件样式修改
7
8
  - 2.0.72:选人组件初始化性能优化
8
9
  - 2.0.71:移动门户部件样式修改
@@ -23,11 +23,11 @@
23
23
  .t-tab-bar::before {
24
24
  content: "";
25
25
  width: 3px;
26
- height: 65%;
26
+ height: 70%;
27
27
  border-radius: 3px;
28
28
  background-color: rgba(112, 59, 58,0.8);
29
29
  position: absolute;
30
- top: 4px;
30
+ top:1px;
31
31
  left: 8px;
32
32
  }
33
33
 
@@ -46,6 +46,7 @@
46
46
  max-width: 95px;
47
47
  padding: 2px 5px;
48
48
  min-height: 28px;
49
+ line-height: 1;
49
50
  white-space: nowrap;
50
51
  overflow: hidden;
51
52
  text-overflow: ellipsis;
@@ -122,7 +123,7 @@
122
123
  }
123
124
 
124
125
  .global-search {
125
- padding: 16px 16px 45px 16px;
126
+ padding: 16px 10px 25px 10px;
126
127
  }
127
128
  }
128
129
 
@@ -143,44 +143,63 @@ var Page = function (_React$Component) {
143
143
  popCode = popCode.replace(",dep,", ",org,");
144
144
  popObj += ",dept";
145
145
  }
146
- var chooseName = "";
146
+ // var chooseName = "";
147
147
  var chooseObj = "";
148
148
  var extObj = {};
149
- // var nameObj = {};
150
- $.ajax({
151
- type: 'GET',
152
- url: getLoginUserInfo().context + "/api/m/cmp/popuser/mobile/getSceneInfo?token=" + getLoginUserInfo().token,
153
- data: {
154
- popCode: popCode,
155
- chooseObj: popObj
156
- },
157
- dataType: "json",
158
- async: false,
159
- success: function success(data) {
160
- if (data.type == "success") {
161
- if (data.data && data.data.length > 0) {
162
- for (var j = 0; j < data.data.length; j++) {
163
- chooseCode += data.data[j].popuCode + ",";
164
- if (data.data[j].chooseObj) {
165
- chooseObj += data.data[j].chooseObj ? data.data[j].chooseObj : "" + ",";
166
- }
167
- chooseName += data.data[j].popuName + ",";
168
- if (data.data[j].popuUrl) {
169
- extObj[data.data[j].popuCode] = data.data[j];
170
- // nameObj[chooseCode]=data.data[j].popuName;
149
+
150
+ if (_this.checkHasEtraTab(popCode)) {
151
+ // var nameObj = {};
152
+ $.ajax({
153
+ type: 'GET',
154
+ url: getLoginUserInfo().context + "/api/m/cmp/popuser/mobile/getSceneInfo?token=" + getLoginUserInfo().token,
155
+ data: {
156
+ popCode: popCode,
157
+ chooseObj: popObj
158
+ },
159
+ dataType: "json",
160
+ async: false,
161
+ success: function success(data) {
162
+ if (data.type == "success") {
163
+ if (data.data && data.data.length > 0) {
164
+ for (var j = 0; j < data.data.length; j++) {
165
+ chooseCode += data.data[j].popuCode + ",";
166
+ if (data.data[j].chooseObj) {
167
+ chooseObj += data.data[j].chooseObj ? data.data[j].chooseObj + "," : "" + ",";
168
+ }
169
+ // chooseName += data.data[j].popuName+",";
170
+ if (data.data[j].popuUrl) {
171
+ extObj[data.data[j].popuCode] = data.data[j];
172
+ // nameObj[chooseCode]=data.data[j].popuName;
173
+ }
171
174
  }
172
175
  }
176
+ if (chooseCode) {
177
+ chooseCode = chooseCode.substring(0, chooseCode.length - 1);
178
+ }
179
+ if (chooseObj) {
180
+ chooseObj = chooseObj.substring(0, chooseObj.length - 1);
181
+ }
173
182
  }
174
- if (chooseCode) {
175
- chooseCode = chooseCode.substring(0, chooseCode.length - 1);
176
- }
177
- if (chooseObj) {
178
- chooseObj = chooseObj.substring(0, chooseObj.length - 1);
183
+ } });
184
+ if (popCode.indexOf("common,") >= 0) {
185
+ chooseCode = "common," + chooseCode;
186
+ }
187
+ } else {
188
+ var returnPopcode = _this.dealwithPopcode(popCode, popObj);
189
+ for (var j = 0; j < returnPopcode.length; j++) {
190
+ if (returnPopcode[j].popuCode) {
191
+ chooseCode += returnPopcode[j].popuCode + ",";
192
+ if (returnPopcode[j].chooseObj) {
193
+ chooseObj += returnPopcode[j].chooseObj ? returnPopcode[j].chooseObj + "," : "" + ",";
179
194
  }
180
195
  }
181
- } });
182
- if (popCode.indexOf("common,") >= 0) {
183
- chooseCode = "common," + chooseCode;
196
+ }
197
+ if (chooseCode) {
198
+ chooseCode = chooseCode.substring(0, chooseCode.length - 1);
199
+ }
200
+ if (chooseObj) {
201
+ chooseObj = chooseObj.substring(0, chooseObj.length - 1);
202
+ }
184
203
  }
185
204
  _this.state = {
186
205
  bottomHeight: bottomHeight,
@@ -299,6 +318,144 @@ var Page = function (_React$Component) {
299
318
  });
300
319
  }
301
320
 
321
+ //检查是否有额外tab
322
+
323
+ }, {
324
+ key: 'checkHasEtraTab',
325
+ value: function checkHasEtraTab(codes) {
326
+ codes && codes.split(",").forEach(function (item) {
327
+ if (item == "" || item == "org" || item == "user" || item == "group" || item == "role" || item == "station" || item == "duty" || item == "personGroup" || item == "politicalOutlook") {} else {
328
+ return true;
329
+ }
330
+ });
331
+ return false;
332
+ }
333
+
334
+ //处理popcode
335
+
336
+ }, {
337
+ key: 'dealwithPopcode',
338
+ value: function dealwithPopcode(popCode, popObj) {
339
+ var codeArray = [];
340
+ var isOrigin = true;
341
+ if (popObj) {
342
+ isOrigin = false;
343
+ }
344
+ var popCodeArray = popCode && popCode.split(",");
345
+ var _iteratorNormalCompletion = true;
346
+ var _didIteratorError = false;
347
+ var _iteratorError = undefined;
348
+
349
+ try {
350
+ for (var _iterator = popCodeArray[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
351
+ var item = _step.value;
352
+
353
+ if (item) {
354
+ var codeObj = {};
355
+ codeObj.popuCode = item;
356
+
357
+ if (isOrigin) {
358
+ if (popCode.indexOf("user") >= 0 && popCode.indexOf("org") >= 0) {
359
+ if ("user" != item) {
360
+ if ("org" == item) {
361
+ codeObj.chooseObj = "userAndOrg";
362
+ }
363
+ } else {
364
+ continue;
365
+ }
366
+ } else if (popCode.indexOf("user") >= 0 || popCode.indexOf("station") >= 0) {
367
+ if ("user" != item) {
368
+ if ("station" == item) {
369
+ codeObj.chooseObj = "userAndStation";
370
+ }
371
+ } else {
372
+ continue;
373
+ }
374
+ }
375
+ } else if ("user" != item) {
376
+ if ("org" == item) {
377
+ if (popObj.indexOf("userAndOrg") >= 0) {
378
+ codeObj.chooseObj = "userAndOrg";
379
+ } else if (popObj.indexOf("userNotOrg") >= 0) {
380
+ codeObj.chooseObj = "userNotOrg";
381
+ } else if (popObj.indexOf("org") >= 0) {
382
+ codeObj.chooseObj = "org";
383
+ } else {
384
+ codeObj.chooseObj = "";
385
+ }
386
+ } else if ("group" == item) {
387
+ if (popObj.indexOf("userAndGroup") >= 0) {
388
+ codeObj.chooseObj = "userAndGroup";
389
+ } else if (popObj.indexOf("userNotGroup") >= 0) {
390
+ codeObj.chooseObj = "userNotGroup";
391
+ } else if (popObj.indexOf("group") >= 0) {
392
+ codeObj.chooseObj = "group";
393
+ } else {
394
+ codeObj.chooseObj = "";
395
+ }
396
+ } else if ("personGroup" == item) {
397
+ if (popObj.indexOf("userAndPersonGroup") >= 0) {
398
+ codeObj.chooseObj = "userAndPersonGroup";
399
+ } else if (popObj.indexOf("userNotPersonGroup") >= 0) {
400
+ codeObj.chooseObj = "userNotPersonGroup";
401
+ } else if (popObj.indexOf("personGroup") >= 0) {
402
+ codeObj.chooseObj = "personGroup";
403
+ } else {
404
+ codeObj.chooseObj = "";
405
+ }
406
+ } else if ("station" == item) {
407
+ if (popObj.indexOf("userAndStation") >= 0) {
408
+ codeObj.chooseObj = "userAndStation";
409
+ } else if (popObj.indexOf("userNotStation") >= 0) {
410
+ codeObj.chooseObj = "userNotStation";
411
+ } else if (popObj.indexOf("station") >= 0) {
412
+ codeObj.chooseObj = "station";
413
+ } else {
414
+ codeObj.chooseObj = "";
415
+ }
416
+ } else if ("duty" == item) {
417
+ if (popObj.indexOf("userAndDuty") >= 0) {
418
+ codeObj.chooseObj = "userAndDuty";
419
+ } else if (popObj.indexOf("userNotDuty") >= 0) {
420
+ codeObj.chooseObj = "userNotDuty";
421
+ } else if (popObj.indexOf("duty") >= 0) {
422
+ codeObj.chooseObj = "duty";
423
+ } else {
424
+ codeObj.chooseObj = "";
425
+ }
426
+ } else if ("politicalOutlook" == item) {
427
+ if (popObj.indexOf("userAndPoliticalOutlook") >= 0) {
428
+ codeObj.chooseObj = "userAndPoliticalOutlook";
429
+ } else if (popObj.indexOf("userNotPoliticalOutlook") >= 0) {
430
+ codeObj.chooseObj = "userNotPoliticalOutlook";
431
+ } else if (popObj.indexOf("politicalOutlook") >= 0) {
432
+ codeObj.chooseObj = "politicalOutlook";
433
+ } else {
434
+ codeObj.chooseObj = "";
435
+ }
436
+ }
437
+ }
438
+ codeArray.push(codeObj);
439
+ }
440
+ }
441
+ } catch (err) {
442
+ _didIteratorError = true;
443
+ _iteratorError = err;
444
+ } finally {
445
+ try {
446
+ if (!_iteratorNormalCompletion && _iterator.return) {
447
+ _iterator.return();
448
+ }
449
+ } finally {
450
+ if (_didIteratorError) {
451
+ throw _iteratorError;
452
+ }
453
+ }
454
+ }
455
+
456
+ return codeArray;
457
+ }
458
+
302
459
  //去除监听并关闭弹出页
303
460
 
304
461
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.0.73",
3
+ "version": "2.0.74",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",