fmui-base 2.3.36 → 2.3.38

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,8 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.3.38:选人组件增加参数noSelectRoot,为1时根组织不可选,默认根组织可选
7
+ - 2.3.37:已办列表增加办理缓急标识,表单说明组件附件允许下载
6
8
  - 2.3.36:单选多选可输入,输入内容过多时不换行
7
9
  - 2.3.35:upload:鸿蒙微信端上传异常点击无反应问题
8
10
  - 2.3.34:移动端支持新疆CA电子签章功能,去除截图base64png图片的操作
package/lib/form/form.js CHANGED
@@ -1373,6 +1373,10 @@ var PageHome = function (_React$Component) {
1373
1373
  // }
1374
1374
 
1375
1375
  }
1376
+ // 根组织不可选:仅开启时透传,与 PC data-noSelectRoot 一致
1377
+ if (form.popuserMap.noSelectRoot == "1" || form.popuserMap.noSelectRoot == 1) {
1378
+ itemParam.noSelectRoot = "1";
1379
+ }
1376
1380
  scopeTable = form.popuserMap.scopeTable;
1377
1381
  } else {
1378
1382
  popCode = "user";
@@ -4791,6 +4795,7 @@ var PageHome = function (_React$Component) {
4791
4795
  defaultValue: t.state.itemParam.defaultValue,
4792
4796
  queryLimit: t.state.itemParam.queryLimit,
4793
4797
  limitData: t.state.itemParam.limitData,
4798
+ noSelectRoot: t.state.itemParam.noSelectRoot,
4794
4799
  ref: "selectMember_" + t.state.itemParam.fieldData,
4795
4800
  isDelete: !t.state.itemParam.readOnly,
4796
4801
  includeDel: "2",
@@ -356,9 +356,15 @@ var ListItem = function (_React$Component) {
356
356
  var checkIsNotComplete = true;
357
357
  var urgencyTag = false;
358
358
  var tagClass = '';
359
- if (data.type == 0) {
360
- //待办
361
- checkIsNotComplete = true;
359
+ if (data.type == 0 || data.type == 2) {
360
+ //待办 / 已办:缓急角标
361
+ if (data.type == 0) {
362
+ checkIsNotComplete = true;
363
+ } else if (data.status == 2) {
364
+ checkIsNotComplete = false;
365
+ } else {
366
+ checkIsNotComplete = true;
367
+ }
362
368
  if (data.urgency == '90') {
363
369
  urgencyTag = true;
364
370
  tagClass = 'label label-danger';
@@ -381,13 +387,6 @@ var ListItem = function (_React$Component) {
381
387
  } else {
382
388
  checkIsNotComplete = true;
383
389
  }
384
- } else if (data.type == 2) {
385
- //已办
386
- if (data.status == 2) {
387
- checkIsNotComplete = false;
388
- } else {
389
- checkIsNotComplete = true;
390
- }
391
390
  } else if (data.type == 3) {
392
391
  //已阅
393
392
  if (data.status == 2) {
@@ -198,6 +198,7 @@ export default class DemoPage extends React.Component {
198
198
  |------|------|------|------|
199
199
  | `queryLimit` | string | 否 | `1` 自身及下级;`2` 仅自身;`3` 查询传入数据;`4` 自身及直接下级;`5` 自身及所有下级 |
200
200
  | `limitData` | string | `queryLimit` 有值时必填 | 与 `queryLimit` 对应的 ID,逗号分隔 |
201
+ | `noSelectRoot` | string | 否 | `"1"` 时请求 `getPopuOrgInfo` 带 `noSelectRoot=1`,由接口返回的 `canUse` 控制是否可勾选 |
201
202
 
202
203
  ### 定密与其它
203
204
 
@@ -226,6 +226,7 @@ var Page = function (_React$Component) {
226
226
  placeholder: props.placeholder,
227
227
  queryLimit: props.queryLimit,
228
228
  limitData: props.limitData,
229
+ noSelectRoot: props.noSelectRoot, //是否禁止选择根组织 1-是
229
230
  showSecret: props.showSecret, //是否开启定密 true/false
230
231
  secretlevel: props.secretlevel == null ? "" : props.secretlevel, //密级 绝密-1/机密-2/秘密-3/非密-4
231
232
  chooseType: "",
@@ -2097,6 +2098,10 @@ var Page = function (_React$Component) {
2097
2098
  if (showSecret && secretlevel != null && secretlevel != '') {
2098
2099
  searchLimit += "&secretlevel=" + secretlevel;
2099
2100
  }
2101
+ //根组织不可选:传给 getPopuOrgInfo,由接口返回 canUse 控制勾选
2102
+ if (type == "org" && this.isNoSelectRoot()) {
2103
+ searchLimit += "&noSelectRoot=1";
2104
+ }
2100
2105
  var chooseType = this.getChooseType();
2101
2106
  var url = "";
2102
2107
  var orgType = this.getOrgType();
@@ -6538,6 +6543,15 @@ var Page = function (_React$Component) {
6538
6543
  return noUseNum;
6539
6544
  }
6540
6545
 
6546
+ //是否开启根组织不可选(请求 getPopuOrgInfo 时传 noSelectRoot,由接口返回 canUse)
6547
+
6548
+ }, {
6549
+ key: 'isNoSelectRoot',
6550
+ value: function isNoSelectRoot() {
6551
+ var v = this.props.noSelectRoot;
6552
+ return v === "1" || v === 1 || v === true;
6553
+ }
6554
+
6541
6555
  //切换tab
6542
6556
 
6543
6557
  }, {
@@ -393,21 +393,13 @@ var SelectInput = function (_React$Component) {
393
393
  { className: 'dd-select-input-option-text' },
394
394
  option.text
395
395
  ),
396
- showInput ? _react2.default.createElement('textarea', {
396
+ showInput ? _react2.default.createElement('input', {
397
397
  className: 'dd-select-input-text',
398
- rows: 1,
398
+ type: 'text',
399
399
  value: _this3.state.inputValues[optionValue] || ''
400
400
  // 输入框只有在当前项已选中且 readOnly=false 时才允许输入。
401
401
  , disabled: inputDisabled,
402
- ref: function ref(el) {
403
- if (el) {
404
- el.style.height = 'auto';
405
- el.style.height = el.scrollHeight + 'px';
406
- }
407
- },
408
402
  onChange: function onChange(e) {
409
- e.target.style.height = 'auto';
410
- e.target.style.height = e.target.scrollHeight + 'px';
411
403
  _this3.handleInputChange(optionValue, e.target.value);
412
404
  },
413
405
  onBlur: function onBlur() {
@@ -1,103 +1,87 @@
1
- .dd-select-input-field {
2
- width: 100%;
3
- }
4
-
5
- .dd-select-input-option {
6
- display: flex;
7
- align-items: flex-start;
8
- width: 100%;
9
- margin: 8px 0;
10
- cursor: pointer;
11
- }
12
-
13
- .dd-select-input-native {
14
- position: absolute;
15
- opacity: 0;
16
- pointer-events: none;
17
- }
18
-
19
- .dd-select-input-icon {
20
- position: relative;
21
- flex: 0 0 18px;
22
- width: 18px;
23
- height: 18px;
24
- margin-right: 8px;
25
- margin-top: 2px;
26
- border: 1px solid #c7ced9;
27
- background: #fff;
28
- transition: all .2s ease;
29
- box-sizing: border-box;
30
- }
31
-
32
- .dd-select-input-icon.radio {
33
- border-radius: 50%;
34
- }
35
-
36
- .dd-select-input-icon.checkbox {
37
- border-radius: 4px;
38
- }
39
-
40
- .dd-select-input-option.checked .dd-select-input-icon {
41
- border-color: #3480fb;
42
- background: #3480fb;
43
- }
44
-
45
- .dd-select-input-option.checked .dd-select-input-icon.radio::after {
46
- content: '';
47
- position: absolute;
48
- top: 50%;
49
- left: 50%;
50
- width: 8px;
51
- height: 8px;
52
- border-radius: 50%;
53
- background: #fff;
54
- transform: translate(-50%, -50%);
55
- }
56
-
57
- .dd-select-input-option.checked .dd-select-input-icon.checkbox::after {
58
- content: '';
59
- position: absolute;
60
- left: 5px;
61
- top: 1px;
62
- width: 5px;
63
- height: 10px;
64
- border: solid #fff;
65
- border-width: 0 2px 2px 0;
66
- transform: rotate(45deg);
67
- }
68
-
69
- .dd-select-input-option-text {
70
- margin-right: 8px;
71
- min-width: 32px;
72
- max-width: 40%;
73
- flex: 0 1 auto;
74
- white-space: normal;
75
- word-break: break-word;
76
- line-height: 1.4;
77
- }
78
-
79
- .dd-select-input-text {
80
- flex: 1 1 0;
81
- min-width: 0;
82
- width: auto;
83
- max-width: 100%;
84
- border: none;
85
- border-bottom: 1px solid #ddd;
86
- outline: none;
87
- padding: 4px 2px;
88
- font-size: 14px;
89
- line-height: 1.4;
90
- background-color: transparent;
91
- white-space: pre-wrap;
92
- word-break: break-all;
93
- overflow-wrap: anywhere;
94
- resize: none;
95
- overflow: hidden;
96
- field-sizing: content;
97
- }
98
-
99
- .dd-select-input-text:disabled {
100
- color: #333;
101
- border-bottom-color: #eee;
102
- cursor: not-allowed;
103
- }
1
+ .dd-select-input-field {
2
+ width: 100%;
3
+ }
4
+
5
+ .dd-select-input-option {
6
+ display: flex;
7
+ align-items: center;
8
+ margin: 8px 0;
9
+ cursor: pointer;
10
+ }
11
+
12
+ .dd-select-input-native {
13
+ position: absolute;
14
+ opacity: 0;
15
+ pointer-events: none;
16
+ }
17
+
18
+ .dd-select-input-icon {
19
+ position: relative;
20
+ flex: 0 0 18px;
21
+ width: 18px;
22
+ height: 18px;
23
+ margin-right: 8px;
24
+ border: 1px solid #c7ced9;
25
+ background: #fff;
26
+ transition: all .2s ease;
27
+ box-sizing: border-box;
28
+ }
29
+
30
+ .dd-select-input-icon.radio {
31
+ border-radius: 50%;
32
+ }
33
+
34
+ .dd-select-input-icon.checkbox {
35
+ border-radius: 4px;
36
+ }
37
+
38
+ .dd-select-input-option.checked .dd-select-input-icon {
39
+ border-color: #3480fb;
40
+ background: #3480fb;
41
+ }
42
+
43
+ .dd-select-input-option.checked .dd-select-input-icon.radio::after {
44
+ content: '';
45
+ position: absolute;
46
+ top: 50%;
47
+ left: 50%;
48
+ width: 8px;
49
+ height: 8px;
50
+ border-radius: 50%;
51
+ background: #fff;
52
+ transform: translate(-50%, -50%);
53
+ }
54
+
55
+ .dd-select-input-option.checked .dd-select-input-icon.checkbox::after {
56
+ content: '';
57
+ position: absolute;
58
+ left: 5px;
59
+ top: 1px;
60
+ width: 5px;
61
+ height: 10px;
62
+ border: solid #fff;
63
+ border-width: 0 2px 2px 0;
64
+ transform: rotate(45deg);
65
+ }
66
+
67
+ .dd-select-input-option-text {
68
+ margin-right: 8px;
69
+ min-width: 32px;
70
+ }
71
+
72
+ .dd-select-input-text {
73
+ flex: 1;
74
+ min-width: 120px;
75
+ border: none;
76
+ border-bottom: 1px solid #ddd;
77
+ outline: none;
78
+ padding: 4px 2px;
79
+ font-size: 14px;
80
+ background-color: transparent;
81
+ }
82
+
83
+ .dd-select-input-text:disabled {
84
+ color: #333;
85
+ border-bottom-color: #eee;
86
+ cursor: not-allowed;
87
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.3.36",
3
+ "version": "2.3.38",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",