cnhis-design-vue 2.1.160 → 2.2.1

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 (52) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +53 -53
  4. package/es/big-table/style.css +1 -1
  5. package/es/button/index.js +4 -4
  6. package/es/captcha/index.js +3 -3
  7. package/es/card-reader-sdk/index.js +1 -1
  8. package/es/checkbox/index.js +1 -1
  9. package/es/color-picker/index.js +1 -1
  10. package/es/drag-layout/index.js +3 -3
  11. package/es/editor/index.js +1 -1
  12. package/es/ellipsis/index.js +1 -1
  13. package/es/fabric-chart/index.js +9 -9
  14. package/es/form-table/index.js +20 -20
  15. package/es/full-calendar/index.js +4 -4
  16. package/es/index/index.js +472 -409
  17. package/es/index/style.css +1 -1
  18. package/es/input/index.js +1 -1
  19. package/es/map/index.js +1 -1
  20. package/es/multi-chat/index.js +25 -25
  21. package/es/multi-chat-client/index.js +19 -19
  22. package/es/multi-chat-history/index.js +4 -4
  23. package/es/multi-chat-record/index.js +4 -4
  24. package/es/multi-chat-setting/index.js +20 -20
  25. package/es/multi-chat-sip/index.js +1 -1
  26. package/es/radio/index.js +1 -1
  27. package/es/scale-container/index.js +1 -1
  28. package/es/scale-view/index.js +245 -191
  29. package/es/scale-view/style.css +1 -1
  30. package/es/select/index.js +4 -4
  31. package/es/select-label/index.js +26 -26
  32. package/es/select-label/style.css +1 -1
  33. package/es/select-person/index.js +2 -2
  34. package/es/select-tag/index.js +4 -4
  35. package/es/shortcut-setter/index.js +2 -2
  36. package/es/slider-tree/index.js +1 -1
  37. package/es/table-filter/index.js +73 -64
  38. package/es/table-filter/style.css +1 -1
  39. package/es/tag/index.js +1 -1
  40. package/es/verification-code/index.js +2 -2
  41. package/lib/cui.common.js +660 -597
  42. package/lib/cui.umd.js +660 -597
  43. package/lib/cui.umd.min.js +40 -40
  44. package/package.json +1 -1
  45. package/packages/big-table/src/components/player-vod/video-modal.vue +6 -1
  46. package/packages/scale-view/formitem/r-choice.vue +3 -2
  47. package/packages/scale-view/formitem/r-upload.vue +42 -8
  48. package/packages/scale-view/scaleView.vue +65 -1
  49. package/packages/select-label/select-label.vue +2 -2
  50. package/packages/table-filter/src/components/render-widget/components/NumberRange.vue +13 -3
  51. package/packages/upload/chunk-upload/chunk-upload-new.vue +6 -2
  52. package/packages/upload/chunk-upload/vod-chunk-upload.vue +15 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.160",
3
+ "version": "2.2.1",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -13,7 +13,7 @@
13
13
  <div class="preview-wrap">
14
14
  <div class="preview">
15
15
  <playerVod :playerOptions="playerOptions" v-if="fileList && fileList.length === 0"></playerVod>
16
- <a-carousel v-else arrows :initialSlide="palyerIndex">
16
+ <a-carousel v-else arrows :initialSlide="palyerIndex" class="vod-carousel">
17
17
  <div slot="prevArrow" class="custom-slick-arrow" style="left: 10px;zIndex: 1">
18
18
  <a-icon type="left-circle" />
19
19
  </div>
@@ -123,4 +123,9 @@ export default {
123
123
  opacity: 0.5;
124
124
  color: #fff;
125
125
  }
126
+ .vod-carousel {
127
+ /deep/ .video-container {
128
+ height: 520px;
129
+ }
130
+ }
126
131
  </style>
@@ -47,7 +47,7 @@
47
47
  :style="{ color: choiceColor(o) }"
48
48
  >{{ o.suffix }}</template>
49
49
  </template>
50
- <span v-else :style="{ color: choiceColor(o) }">{{ o.label }}</span>
50
+ <span v-else :style="{ color: choiceColor(o) }" class="choice-span">{{ o.label }}</span>
51
51
  <a-input
52
52
  v-if="o.importability"
53
53
  v-model="othersText"
@@ -111,6 +111,7 @@
111
111
  v-else
112
112
  style="white-space: initial;"
113
113
  :style="{ color: choiceColor(o) }"
114
+ class="choice-span"
114
115
  >{{ o.label }}</span>
115
116
  <a-input
116
117
  v-if="o.importability"
@@ -231,7 +232,7 @@ export default {
231
232
  choiceColor() {
232
233
  return function (p) {
233
234
  let color = p.color || 'rgba(0, 0, 0, 0.65)';
234
- return `${color} !important`;
235
+ return `${color}`;
235
236
  };
236
237
  },
237
238
  showImgWrap() {
@@ -1,16 +1,17 @@
1
1
  <template>
2
- <div class="r-upload">
2
+ <div class="r-upload" :class="{'r-upload-lock': isLock}">
3
3
  <div v-if="upType == 'UPFILE'">
4
4
  <a-upload-dragger
5
5
  name="file"
6
6
  :multiple="true"
7
7
  :defaultFileList="defaultFileList"
8
8
  :action="uploadFileUrl"
9
+ :before-upload="beforeUploadFile"
9
10
  @change="handleFileChange"
10
11
  :disabled="isLock"
11
12
  >
12
- <p class="dragger-upload-text">
13
- <a-icon class="m-icon" type="plus" />请点击文件上传,单个文件50M以内。
13
+ <p class="dragger-upload-text">
14
+ <a-icon class="m-icon" type="plus" />请点击文件上传,单个文件{{maxSizeFile}}M以内。
14
15
  </p>
15
16
  </a-upload-dragger>
16
17
  </div>
@@ -32,11 +33,10 @@
32
33
  添加图片
33
34
  </div> -->
34
35
  <a-icon type="camera" />
35
- <p>添加图片</p>
36
+ <p>点击上传(不超过{{ maxSize }}M)</p>
36
37
  </div>
37
38
  </a-upload>
38
- <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel" :cancelText="'取消'"
39
- :okText="'确定'">
39
+ <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel" :cancelText="'取消'" :okText="'确定'">
40
40
  <img alt="example" style="width: 100%" :src="previewImage" />
41
41
  </a-modal>
42
42
  </div>
@@ -49,6 +49,7 @@ import utils from "@/utils/utils-map";
49
49
  export default {
50
50
  props: {
51
51
  value: [Array, String],
52
+ item: { type: Object, default: () => ({}) },
52
53
  upType: { default: "UPFILE", type: String },
53
54
  isLock: { type: Boolean, default: false },
54
55
  limitPic: { type: [String, Number], default: "1" },
@@ -78,6 +79,17 @@ export default {
78
79
  previewImage: ""
79
80
  };
80
81
  },
82
+ computed:{
83
+ cMaxSize() {
84
+ return this.item.setting?.maxSize;
85
+ },
86
+ maxSize() {
87
+ return this.cMaxSize || 2;
88
+ },
89
+ maxSizeFile() {
90
+ return this.cMaxSize || 50;
91
+ },
92
+ },
81
93
  methods: {
82
94
  handleCancel() {
83
95
  this.previewVisible = false;
@@ -103,6 +115,11 @@ export default {
103
115
  if (file.status == "removed") return;
104
116
  this.$message.error(file.response.resultMsg || "上传失败!");
105
117
  }
118
+ } else {
119
+ if (file.status !== "uploading") {
120
+ let curIndex = fileList.findIndex(f => f.uid == file.uid);
121
+ fileList.splice(curIndex, 1);
122
+ }
106
123
  }
107
124
  },
108
125
  handlePictureChange(info) {
@@ -131,12 +148,19 @@ export default {
131
148
  if (!isJpgOrPng) {
132
149
  this.$message.error("仅支持jpeg/png格式");
133
150
  }
134
- const isLt2M = file.size / 1024 / 1024 < 2;
151
+ const isLt2M = file.size / 1024 / 1024 < this.maxSize;
135
152
  if (!isLt2M) {
136
- this.$message.error("上传图片限制在2MB以内");
153
+ this.$message.error(`图片大小超过了${this.maxSize}MB`);
137
154
  }
138
155
  return isJpgOrPng && isLt2M;
139
156
  },
157
+ beforeUploadFile(file) {
158
+ const isLimit = file.size / 1024 / 1024 < this.maxSizeFile;
159
+ if (!isLimit) {
160
+ this.$message.error(`附件大小超过了${this.maxSizeFile}MB`);
161
+ }
162
+ return isLimit;
163
+ },
140
164
  handlerFormatUpload(data = []) {
141
165
  // type = pic / file
142
166
  if (data.length === 0) {
@@ -284,4 +308,14 @@ export default {
284
308
  }
285
309
  }
286
310
  }
311
+ .r-upload-lock {
312
+ /deep/ .ant-upload {
313
+ &.ant-upload-drag.ant-upload-disabled {
314
+ display: none;
315
+ }
316
+ &.ant-upload-select-picture-card.ant-upload-disabled {
317
+ display: none;
318
+ }
319
+ }
320
+ }
287
321
  </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="r-scale r-scale-v3">
2
+ <div class="r-scale r-scale-v2">
3
3
  <slot v-if="spinning">
4
4
  <a-spin :indicator="indicator" tip="加载中..." />
5
5
  </slot>
@@ -190,6 +190,7 @@
190
190
  :useFileList="item.dbValue"
191
191
  :limitPic="item.setting.limitPic"
192
192
  :isLock="componentDisable"
193
+ :item="item"
193
194
  @change="changeUpload($event, item)"
194
195
  />
195
196
  <!-- 地图 -->
@@ -2019,4 +2020,67 @@ export default create({
2019
2020
  max-width: 100%;
2020
2021
  }
2021
2022
  }
2023
+ .r-scale-v2 {
2024
+ /deep/ .scale-container {
2025
+
2026
+ .choice-radio-div .ant-radio-wrapper-disabled,
2027
+ .choice-radio-div .ant-checkbox-wrapper-disabled {
2028
+ padding: 4px;
2029
+ box-sizing: border-box;
2030
+ border: 1px solid transparent;
2031
+
2032
+ }
2033
+ .ant-radio-wrapper-checked.ant-radio-wrapper-disabled {
2034
+ border-color: #2d7aff;
2035
+ border-radius: 4px;
2036
+ .choice-span {
2037
+ color: #000 !important;
2038
+ }
2039
+ >.ant-radio-disabled {
2040
+ .ant-radio-inner {
2041
+ background-color: #fff !important;
2042
+ border-color: #2d7aff !important;
2043
+ &::after {
2044
+ background-color: #2d7aff;
2045
+ }
2046
+ }
2047
+ }
2048
+ }
2049
+ .ant-checkbox-wrapper-checked.ant-checkbox-wrapper-disabled {
2050
+ border-color: #2d7aff;
2051
+ border-radius: 4px;
2052
+ .choice-span {
2053
+ color: #000 !important;
2054
+ }
2055
+ >.ant-checkbox-disabled {
2056
+ .ant-checkbox-inner {
2057
+ background-color: #2d7aff;
2058
+ border-color: #2d7aff !important;
2059
+ &::after {
2060
+ border-color: #fff !important;
2061
+ }
2062
+ }
2063
+ }
2064
+ }
2065
+
2066
+ .ant-input-disabled {
2067
+ color: #000 !important;
2068
+ font-weight: 700;
2069
+ }
2070
+
2071
+ .ant-select-disabled {
2072
+ .ant-select-selection-selected-value {
2073
+ color: #000 !important;
2074
+ font-weight: 700;
2075
+ }
2076
+ }
2077
+
2078
+ .ant-cascader-picker-disabled {
2079
+ .ant-cascader-picker-label {
2080
+ color: #000 !important;
2081
+ font-weight: 700;
2082
+ }
2083
+ }
2084
+ }
2085
+ }
2022
2086
  </style>
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div class="label-page">
3
3
  <div class="tag-label">
4
- <a-tag v-for="v in labelSelectedList" :key="v.labelId" :style="handleLabelColor(v, true)" :closable="item_is_edit" @close="closeTag(v)">
4
+ <a-tag v-for="v in labelSelectedList" :key="v.labelId" :style="handleLabelColor(v, true)" :closable="item_is_edit && !isLock" @close="closeTag(v)">
5
5
  {{ v.labelName }}
6
6
  </a-tag>
7
- <span v-if="!explicit" class="form-add-icon form-add-icon-label" @click="handleEditLabel" :class="{ disable: isLock }" v-show="item_is_edit">
7
+ <span v-if="!explicit && !isLock" class="form-add-icon form-add-icon-label" @click="handleEditLabel" :class="{ disable: isLock }" v-show="item_is_edit">
8
8
  <a-icon class="add-icon" type="plus-circle" />
9
9
  新增
10
10
  </span>
@@ -102,11 +102,21 @@ export default {
102
102
  this.lessValue = resVal.split('~')?.[0] ?? undefined;
103
103
  this.bigValue = resVal.split('~')?.[1] ?? undefined;
104
104
  },
105
+ handleChangeValue(lessValue, bigValue) {
106
+ if(!lessValue && lessValue !== 0) return;
107
+ if(!bigValue && bigValue !== 0) return;
108
+ let lessNum = +lessValue
109
+ if(isNaN(lessNum)) return;
110
+ let bigNum = +bigValue
111
+ if(isNaN(bigNum)) return;
112
+ if(lessNum > bigNum) {
113
+ return `${bigValue}~${lessValue}`
114
+ }
115
+ },
105
116
  changeFilterNumber() {
106
117
  let res = `${this.lessValue ?? ''}~${this.bigValue ?? ''}`
107
- if (this.lessValue && this.bigValue && this.lessValue > this.bigValue) {
108
- res = `${this.bigValue}~${this.lessValue}`
109
- }
118
+ let transferRes = this.handleChangeValue(this.lessValue, this.bigValue)
119
+ if(transferRes) res = transferRes;
110
120
  this.$emit("update:value", res);
111
121
  },
112
122
  clearFilterNumber() {
@@ -133,7 +133,7 @@ export default {
133
133
  default: ""
134
134
  },
135
135
  max_size: {
136
- type: String,
136
+ type: [String, Number],
137
137
  default: ""
138
138
  },
139
139
  maxLength: {
@@ -162,7 +162,8 @@ export default {
162
162
  getChunkUploadConfig:{
163
163
  type: Function,
164
164
  default: () => Promise.resolve({})
165
- }
165
+ },
166
+ source: { type: String, default: ""}
166
167
  },
167
168
  data() {
168
169
  return {
@@ -401,6 +402,9 @@ export default {
401
402
  },
402
403
 
403
404
  curMaxSize(curMax) {
405
+ if(this.source === 'guage') {
406
+ return curMax / 1024 + 'MB';
407
+ }
404
408
  let useMax;
405
409
  if (curMax) {
406
410
  useMax = +(+curMax).toFixed(2);
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <div class="upload">
3
- <div v-if="!isDetail" class="chunk-uploader-btn" :class="{ 'disable-upload': isDisabled }" v-show="isShowBtn" @click="handleBtnOnClick">
3
+ <div v-if="!isDetail && !isLock" class="chunk-uploader-btn" :class="{ 'disable-upload': isDisabled }" v-show="isShowBtn" @click="handleBtnOnClick">
4
4
  <div class="chunk-btn-content">
5
5
  <div class="c-uploader-btn">
6
6
  <template v-if="source == 'guage'">
7
7
  <img :src="require('@/assets/img/video.png')" alt="" class="guage-img" />
8
8
  <div class="uploader-text">
9
9
  <p>点击上传</p>
10
- <span class="guage-text">上传视频(不超过50M)</span>
10
+ <span class="guage-text">上传视频(不超过{{guageMaxSize}}M)</span>
11
11
  </div>
12
12
  </template>
13
13
  <template v-else>
@@ -82,6 +82,7 @@
82
82
  :maxLength="maxlength"
83
83
  :propsCategoryMap="propsDefaultAccept"
84
84
  :defaultList="fileList"
85
+ :source="source"
85
86
  @getSumbitList="getSumbitList"
86
87
  ></vodUploadModal>
87
88
  </div>
@@ -166,9 +167,15 @@ export default {
166
167
  defaultFileList() {
167
168
  return this.handleDefList();
168
169
  },
170
+ isGuage(){
171
+ return this.source == 'guage';
172
+ },
173
+ guageMaxSize(){
174
+ return this.formData?.setting?.maxSize || 50;
175
+ },
169
176
  isShowBtn() {
170
177
  let { max_length } = this.formData?.validate || {};
171
- if (this.source == 'guage') {
178
+ if (this.isGuage) {
172
179
  max_length = +this.limitNum;
173
180
  }
174
181
  if (max_length) {
@@ -188,7 +195,7 @@ export default {
188
195
  };
189
196
  },
190
197
  allow_format() {
191
- if (this.source === 'guage') return this.defaultAccept;
198
+ if (this.isGuage) return this.defaultAccept;
192
199
  const { allow_format } = this.formData;
193
200
  try {
194
201
  if (allow_format) {
@@ -217,7 +224,7 @@ export default {
217
224
 
218
225
  defaultValue() {
219
226
  const { formData, mainForm } = this;
220
- if (this.source === 'guage') {
227
+ if (this.isGuage) {
221
228
  return this.defFileList;
222
229
  }
223
230
  return mainForm.defaultValue[formData.name] || formData.default_val;
@@ -232,6 +239,7 @@ export default {
232
239
  },
233
240
 
234
241
  max_size() {
242
+ if(this.isGuage) return this.guageMaxSize * 1024;
235
243
  const { max_size } = this.formData?.validate || {};
236
244
  return max_size || '';
237
245
  },
@@ -263,7 +271,7 @@ export default {
263
271
  handleDefList() {
264
272
  const { formData, mainForm } = this;
265
273
  let defList = [];
266
- if (this.source === 'guage') {
274
+ if (this.isGuage) {
267
275
  defList = this.defFileList;
268
276
  } else {
269
277
  defList = mainForm.handleSysParams(mainForm.defaultValue[formData.name] || formData.default_val);
@@ -313,7 +321,7 @@ export default {
313
321
  });
314
322
  // let resVal = resList.length ? JSON.stringify(resList) : "";
315
323
  let resVal = JSON.stringify(resList);
316
- if (this.source === 'guage') {
324
+ if (this.isGuage) {
317
325
  this.$emit('vodFileList', resVal);
318
326
  return;
319
327
  }