centaline-data-driven-v3 0.0.53 → 0.0.55

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.53",
3
+ "version": "0.0.55",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -2,8 +2,8 @@
2
2
  <template v-for="(col, index) in model.fields" :key="index">
3
3
  <template v-if="col.show !== false&&(col.controlLabel||col.code1||col.name1)">
4
4
  <component v-if="col.show !== false" ref="Fields" :is="col.is" :vmodel="col"
5
- :parameterAction="parameterAction" v-bind="col.bindPara" @fieldClick="fieldClickHandler"
6
- @change="change" @popupSearchList="popupSearchListHandler">
5
+ :parameterAction="parameterAction" v-bind="col.bindPara" @fieldClick="fieldClickHandler(col)"
6
+ @change="change(col)" @popupSearchList="popupSearchListHandler">
7
7
  </component>
8
8
  </template>
9
9
  </template>
@@ -63,6 +63,7 @@ import { ref, nextTick } from 'vue'
63
63
  import { showToast, showConfirmDialog } from 'vant';
64
64
  import { changeHandler } from '../../utils/mixins';
65
65
  import { uploadByPieces } from '../../loader/src/SliceUpload';
66
+ import common from '../../utils/common'
66
67
  import File from '../../loader/src/File';
67
68
  import util from '../../utils/pub-use'
68
69
  import draggable from "vuedraggable";
@@ -145,9 +146,9 @@ function uploadProcess(file) {
145
146
  function handleRemove(file) {
146
147
  showConfirmDialog({
147
148
  title: "提示",
148
- confirmButtonText: "确定",
149
+ confirmButtonText: common.LocalizedString("确定","確認"),
149
150
  cancelButtonText: "取消",
150
- message: "确定删除该附件?",
151
+ message: common.LocalizedString("确定删除该附件?","確定刪除該附件?"),
151
152
  })
152
153
  .then(() => {
153
154
  File.deleteFile(file, false, model.value);
@@ -166,7 +166,7 @@ function Init() {
166
166
  model.value.validExcute = () => {
167
167
  var rtn = fieldsValidExcute();
168
168
  if (!rtn) {
169
- model.value.displayValidMessage = '请填写[' + model.value.controlLabel + ']'
169
+ model.value.displayValidMessage = common.LocalizedString('请填写','請填寫')+'[' + model.value.controlLabel + ']'
170
170
  }
171
171
  return fieldsValidExcute();
172
172
  }
@@ -6,7 +6,7 @@
6
6
  <span style="line-height: 32px;" v-for="item in model.value" :key="item" class="tag">{{ item }}</span>
7
7
  </template>
8
8
  <template v-else>
9
- <span style="line-height: 32px;" v-html="model.value"></span>
9
+ <span style="line-height: 32px;" v-html="model.value" @click="clickHandle"></span>
10
10
  </template>
11
11
  </div>
12
12
  </template>
@@ -21,7 +21,7 @@
21
21
  <script lang="ts" setup>
22
22
  import { initData } from '../../utils/mixins';
23
23
  import Label from '../../loader/src/Label';
24
- const emit = defineEmits(['popupSearchList'])
24
+ const emit = defineEmits(['popupSearchList','change'])
25
25
  const props = defineProps({
26
26
  parameterAction: String,
27
27
  vmodel: Object,
@@ -33,6 +33,9 @@ function popupSearchListHandle() {
33
33
  let isSingle=model.value.moreActionRouter.isSingle
34
34
  emit('popupSearchList', isSingle, model, model.value.moreActionRouter);
35
35
  }
36
+ function clickHandle(){
37
+ emit('change', model);
38
+ }
36
39
  defineExpose({
37
40
  model
38
41
  })
@@ -78,6 +78,7 @@ import { ref, nextTick } from 'vue'
78
78
  import { showToast, showConfirmDialog } from 'vant';
79
79
  import { changeHandler } from '../../utils/mixins';
80
80
  import { uploadByPieces } from '../../loader/src/SliceUpload';
81
+ import common from '../../utils/common'
81
82
  import Photo from '../../loader/src/Photo';
82
83
  import util from '../../utils/pub-use'
83
84
  const emit = defineEmits(['loaded', "change", "click"])
@@ -134,9 +135,9 @@ function uploadProcess(file) {
134
135
  function handleRemove(file) {
135
136
  showConfirmDialog({
136
137
  title: "提示",
137
- confirmButtonText: "确定",
138
+ confirmButtonText: common.LocalizedString("确定","確認"),
138
139
  cancelButtonText: "取消",
139
- message: "确定删除该附件?",
140
+ message: common.LocalizedString("确定删除该附件?","確定刪除該附件?"),
140
141
  })
141
142
  .then(() => {
142
143
  Photo.deleteFile(file, false, model.value);
@@ -173,6 +173,9 @@ function onswipenext() {
173
173
  touch-action: none;
174
174
  }
175
175
 
176
+
177
+ </style>
178
+ <style scoped>
176
179
  .viewerContent {
177
180
  background: #000000;
178
181
  height: 100%;
@@ -181,8 +184,6 @@ function onswipenext() {
181
184
  justify-content: center;
182
185
 
183
186
  }
184
- </style>
185
- <style scoped>
186
187
  .cont {
187
188
  position: absolute;
188
189
  z-index: 100000000000000;
@@ -15,7 +15,7 @@
15
15
  </el-tooltip>
16
16
  </el-icon>
17
17
  </el-checkbox>
18
- <el-icon @click="clearClickHandle" class="el-range__close-icon" style="margin-left: 10px;">
18
+ <el-icon @click="clearClickHandle" class="el-range__close-icon" style="margin-left: 10px;" v-if="!common.flagHK()">
19
19
  <CircleClose />
20
20
  </el-icon>
21
21
  </el-checkbox-group>
@@ -26,6 +26,7 @@
26
26
  <script lang="ts" setup>
27
27
  import { initData, changeHandler } from '../../utils/mixins';
28
28
  import CheckBoxList from '../../loader/src/CheckBoxList';
29
+ import common from '../../utils/common'
29
30
  const emit = defineEmits(['click', 'change', 'search'])
30
31
  const props = defineProps({
31
32
  parameterAction: String,
@@ -8,7 +8,7 @@
8
8
  :class="index > 0 && (col.controlLabel == '' || col.is == 'ct-button') ? 'complex-left-10' : ''"
9
9
  :style="{ 'width': (col.width != '0' ? col.width + 'px' : '100%'), 'flex': (col.width != '0' ? '0 0 ' + col.width + 'px' : '100%') }">
10
10
  <component ref="Fields" :is="col.is" :vmodel="col" :parameterAction="parameterAction"
11
- v-bind="col.bindPara" @fieldClick="fieldClickHandler(col)" @change="change"
11
+ v-bind="col.bindPara" @fieldClick="fieldClickHandler(col)" @change="change(col)"
12
12
  @popupSearchList="popupSearchListHandler"></component>
13
13
  </div>
14
14
  </template>
@@ -23,7 +23,7 @@
23
23
  :class="[index > 0 && (col.controlLabel == '' || col.is == 'ct-btn') ? 'complex-left-10' : '', 'containerCol']"
24
24
  :style="{ 'width': (col.width != '0' ? col.width + 'px' : '100%'), 'flex': (col.width != '0' ? '0 0 ' + col.width + 'px' : '100%') }">
25
25
  <component ref="Fields" :is="col.is" :vmodel="col" :parameterAction="parameterAction"
26
- v-bind="col.bindPara" @fieldClick="fieldClickHandler(col)" @change="change"
26
+ v-bind="col.bindPara" @fieldClick="fieldClickHandler(col)" @change="change(col)"
27
27
  @popupSearchList="popupSearchListHandler">
28
28
  </component>
29
29
  </el-col>
@@ -8,11 +8,10 @@
8
8
  :data="model.uploadData" :headers="headers" :before-upload="beforeUploadProcess"
9
9
  :on-success="handleAvatarSuccess" :on-error="handleAvatarError" :on-progress="uploadProcess"
10
10
  :limit="parseInt(model.maxValue1 || 999)" :on-exceed="handleExceed"
11
- :uploadStatus="!model.disableUpload&&!model.locked?'upload':'lock'"
12
- >
11
+ :uploadStatus="!model.disableUpload && !model.locked ? 'upload' : 'lock'">
13
12
  <el-icon>
14
13
  <Plus />
15
- </el-icon>
14
+ </el-icon>
16
15
  <template #tip>
17
16
  <div class="el-upload__tip errorMessage" style="white-space:pre-wrap;" v-show="!model.valid"
18
17
  v-html="model.validMessage">
@@ -20,7 +19,7 @@
20
19
  <div v-show="model.description" v-html="model.description">
21
20
  </div>
22
21
  </template>
23
- <div class="qrcode-target" v-if="model.QRCodeAction">
22
+ <div class="qrcode-target" v-if="model.QRCodeAction">
24
23
  <img @click.stop="qrcodeFn" ref="QRCodeRef" :src="util.getAssetsImage('serw1.png')"
25
24
  style="width: 35px;height: 35px; float: right; " alt="扫码上传" title="扫码上传" />
26
25
  </div>
@@ -106,7 +105,7 @@
106
105
 
107
106
 
108
107
  <div @dragstart="drag($event, file)" @drop="drop($event, file)" @dragover.prevent
109
- @dragenter="dragenter($event, file)" @dragleave="dragleave($event, file)" >
108
+ @dragenter="dragenter($event, file)" @dragleave="dragleave($event, file)">
110
109
  <el-image fit="fill" @click="viewerfile(file)"
111
110
  :src="file.url ? file.url : file.mediaUrl ? file.mediaUrl + '/100/100' : util.getAssetsImage('blank.png')"
112
111
  style="width: 100px; height: 100px" :z-index="previewZIndex">
@@ -187,12 +186,12 @@ const props = defineProps({
187
186
  })
188
187
  const refct_upload = ref()
189
188
  const refupload = ref()
190
- const QRCodeRef = ref()
189
+ const QRCodeRef = ref()
191
190
  const UploadhttpRequest = ref({})
192
191
  const startfile = ref();
193
192
  const endfile = ref();
194
193
  const model = ref(null);
195
-
194
+
196
195
 
197
196
  const headers = computed(() => {
198
197
  return common.getDataDrivenOpts().handler.getRequestHeaders();
@@ -246,6 +245,9 @@ function load(data) {
246
245
  showClose: true,
247
246
  });
248
247
  }
248
+ if (model.value?.fileList && model.value.fileList.length > 0) {
249
+ selfValidExcute("valid");
250
+ }
249
251
  }
250
252
  //校验上传数量
251
253
  const handleExceed: UploadProps['onExceed'] = (files) => {
@@ -261,8 +263,8 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
261
263
  function handleRemove(file) {
262
264
 
263
265
 
264
- common.confirm("确定删除该附件?", "提示", {
265
- confirmButtonText: "确定",
266
+ common.confirm(common.LocalizedString("确定删除该附件?", "確定刪除該附件?"), "提示", {
267
+ confirmButtonText: common.LocalizedString("确定", "確認"),
266
268
  cancelButtonText: "取消",
267
269
  //type: 'warning'
268
270
  }).then(() => {
@@ -283,7 +285,7 @@ function handleEdit(file) {
283
285
  var dialogOption = {
284
286
  title: "编辑图片",
285
287
  content: [{
286
- component: 'ct-pictureedit',
288
+ component: 'ct-picturedit',
287
289
  width: width + "px",
288
290
  height: (window.document.body.clientHeight * 0.8).toString() + "px",
289
291
  attrs: {
@@ -626,55 +628,66 @@ function viewerfile(file) {
626
628
  File.viewerfile(file, model.value)
627
629
  }
628
630
 
629
-
630
-
631
+
632
+
631
633
  function PasteUpload(event) {
632
634
  if (!model.value.locked && !model.value.disableUpload) {
633
635
  // 获取粘贴板中的图片
634
636
  const clipboardDatas = (event.clipboardData || event.originalEvent.clipboardData);
635
637
  const items = clipboardDatas.items;
638
+ //检测是否全是文件才上传
639
+ let fileSum = 0;
636
640
  for (let index in items) {
637
641
  const item = items[index];
638
642
  if (item.kind === 'file') {
643
+ ++fileSum;
644
+ }
645
+ }
639
646
 
640
- const file = item.getAsFile();
641
- let uid = File.uploadguid();
647
+ if (fileSum == items.length) {
648
+ for (let index in items) {
649
+ const item = items[index];
650
+ if (item.kind === 'file') {
642
651
 
643
- file.uid = file.uid || uid;
644
- refupload.value.handleStart(file);
645
- // 提交上传队列
646
- refupload.value.submit();
652
+ const file = item.getAsFile();
653
+ let uid = File.uploadguid();
654
+
655
+ file.uid = file.uid || uid;
656
+ refupload.value.handleStart(file);
657
+ // 提交上传队列
658
+ refupload.value.submit();
659
+ }
647
660
  }
648
661
  }
649
662
  }
650
663
  }
651
664
 
652
- function ListenerPaste(event) {
653
- var target = event.target;
654
- const uploads = document.querySelectorAll('[uploadStatus="upload"]');
665
+ function ListenerPaste(event) {
666
+ var target = event.target;
667
+ const uploads = document.querySelectorAll('[uploadStatus="upload"]');
655
668
 
656
- if (!window.uploads) {
657
- window.uploads = { count: 0, length: uploads.length };
658
- }
659
- if (uploads.length > 1) {
660
- window.uploads.count = window.uploads.count + 1;
661
- window.uploads.length = uploads.length;
669
+ if (!window.uploads) {
670
+ window.uploads = { count: 0, length: uploads.length };
671
+ }
672
+ if (uploads.length > 1) {
673
+ window.uploads.count = window.uploads.count + 1;
674
+ window.uploads.length = uploads.length;
662
675
 
663
- if (window.uploads.count == window.uploads.length) {
664
- window.uploads = null;
665
- ElMessage({
666
- message: "存在多个上传组件,请点击粘贴上传!",
667
- type: 'info',
668
- showClose: true,
669
- });
670
- return false;
671
- }
672
- }
673
- else if (uploads.length == 1) {
676
+ if (window.uploads.count == window.uploads.length) {
674
677
  window.uploads = null;
675
- PasteUpload(event);
678
+ ElMessage({
679
+ message: "存在多个上传组件,请点击粘贴上传!",
680
+ type: 'info',
681
+ showClose: true,
682
+ });
683
+ return false;
676
684
  }
677
-
685
+ }
686
+ else if (uploads.length == 1) {
687
+ window.uploads = null;
688
+ PasteUpload(event);
689
+ }
690
+
678
691
 
679
692
  }
680
693
 
@@ -179,7 +179,7 @@ model.value.$vue = { insertOrUpdateRow, insertRow, delRow, deleteAll, insertSing
179
179
  model.value.validExcute = () => {
180
180
  var rtn=fieldsValidExcute();
181
181
  if(!rtn){
182
- model.value.displayValidMessage='请填写['+model.value.controlLabel+']'
182
+ model.value.displayValidMessage=common.LocalizedString('请填写','請填寫')+'['+model.value.controlLabel+']'
183
183
  }
184
184
  return fieldsValidExcute();
185
185
  }
@@ -2,7 +2,7 @@
2
2
  <ct-field :vmodel="model">
3
3
  <template #Control v-if="model.code1">
4
4
  <template v-if="model.controlType==Enum.ControlType.HtmlLabel">
5
- <span class="ct-html" v-html="model.value"></span>
5
+ <span class="ct-html" @click="clickHandle" v-html="model.value"></span>
6
6
  </template>
7
7
  <template v-else-if="model.flagJson">
8
8
  <el-tag v-for="item in model.value" :key="item" type="info" :disable-transitions="true" style="margin: 2px 6px 2px 0px;">{{ item
@@ -16,7 +16,7 @@
16
16
  <div :style="{ 'width': (model.value.length > 66 ? '400px' : 'auto') }" v-html="model.value">
17
17
  </div>
18
18
  </template>
19
- <span class="ct-lable" @mouseover="onMouseOver($event)" v-html="model.value"></span>
19
+ <span class="ct-lable" @mouseover="onMouseOver($event)" v-html="model.value" @click="clickHandle"></span>
20
20
  </el-tooltip>
21
21
  <span class="unitName">{{ model.unitName1 }}</span>
22
22
  </template>
@@ -36,7 +36,7 @@ import { ref, nextTick } from 'vue'
36
36
  import { initData } from '../../utils/mixins';
37
37
  import Enum from '../../utils/Enum'
38
38
  import Label from '../../loader/src/Label';
39
- const emit = defineEmits(['popupSearchList'])
39
+ const emit = defineEmits(['popupSearchList','change'])
40
40
  const props = defineProps({
41
41
  parameterAction: String,
42
42
  vmodel: Object,
@@ -64,7 +64,9 @@ function popupSearchListHandle() {
64
64
  let isSingle=model.value.moreActionRouter.isSingle
65
65
  emit('popupSearchList', isSingle, model, model.value.moreActionRouter);
66
66
  }
67
-
67
+ function clickHandle(){
68
+ emit('change', model);
69
+ }
68
70
  defineExpose({
69
71
  model
70
72
  })
@@ -495,8 +495,10 @@ function uploadpro(filesize, res, xhr, flagError) {
495
495
  props.file.mediaUrl = media.mediaUrl;
496
496
  props.file.savedFileName = media.savedFileName;
497
497
  props.file.mediaDate = media.mediaDate;
498
+ props.file.mediaCode== media.mediaCode;
498
499
  props.file.width = canvas.value.width;
499
500
  props.file.height = canvas.value.height;
501
+
500
502
  emit('handleEditPhoto', props.file);
501
503
  }
502
504
  return true;
@@ -1145,7 +1145,13 @@ function refreshTableColumns(data) {
1145
1145
  load(SearchTable.loadSearchTableModel(data, model.value.searchModel, false, props.api));
1146
1146
  }
1147
1147
  else {
1148
- SearchTable.loadSearchTableApi(props.api, load, model.value.searchModel, true);
1148
+ if (refTableStats.value){
1149
+ disabledStats.value = true;
1150
+ getPage(1, true);
1151
+ }
1152
+ else{
1153
+ SearchTable.loadSearchTableApi(props.api, load, searchModel, true);
1154
+ }
1149
1155
  }
1150
1156
  model.value.searchStats = searchStats;
1151
1157
  model.value.toolbarKey = Math.random();
@@ -118,7 +118,7 @@
118
118
  <template v-else>
119
119
  <div class="viewerContent" style="max-height: 200px; text-align: center">
120
120
  <a :href="resultObject" target="_blank">
121
- <img :src="itemFile.thumbnailUrl" /><br />{{
121
+ <img :src="(itemFile.thumbnailUrl||itemFile.url)" /><br />{{
122
122
  itemFile.mediaLabelName || itemFile.fileName
123
123
  }}
124
124
  </a>
@@ -13,12 +13,13 @@
13
13
  <div style="width: 100%;position: relative" ref="refct_Photo" class="block ct-file"
14
14
  :style="{ 'width': (model.maxValue1 || 100) + 'px', 'height': (model.minValue1 || 100) + 'px' }"
15
15
  :class="[model.attrs.size ? 'ct-checkbox-' + model.attrs.size : '']">
16
-
17
- <el-upload :class="model.disableUpload ? 'ct-upload-display-none' : ''" v-bind="UploadhttpRequest" :uploadStatus="!model.disableUpload&&!model.locked?'upload':'lock'"
18
- ref="refupload" :disabled="model.locked" :accept="model.fileAccept1" :on-change="handleChange"
19
- :multiple="false" :auto-upload="true" :action="action()" :headers="headers"
20
- :before-upload="beforeUploadProcess" :on-success="handleAvatarSuccess" :on-error="handleAvatarError"
21
- :on-progress="uploadProcess" :on-exceed="handleExceed" :show-file-list="false">
16
+
17
+ <el-upload :class="model.disableUpload ? 'ct-upload-display-none' : ''" v-bind="UploadhttpRequest"
18
+ :uploadStatus="!model.disableUpload && !model.locked ? 'upload' : 'lock'" ref="refupload" :disabled="model.locked"
19
+ :accept="model.fileAccept1" :on-change="handleChange" :multiple="false" :auto-upload="true"
20
+ :action="action()" :headers="headers" :before-upload="beforeUploadProcess" :on-success="handleAvatarSuccess"
21
+ :on-error="handleAvatarError" :on-progress="uploadProcess" :on-exceed="handleExceed"
22
+ :show-file-list="false">
22
23
 
23
24
 
24
25
  <el-icon class="avatar-uploader-icon"
@@ -93,9 +94,8 @@
93
94
  </div>
94
95
  </template>
95
96
  <div class="qrcode-target" v-if="model.QRCodeAction">
96
- <img @click.stop="qrcodeFn" ref="QRCodeRef"
97
- :src="util.getAssetsImage('serw1.png')" style="width: 35px;height: 35px; float: right; " alt="扫码上传"
98
- title="扫码上传" />
97
+ <img @click.stop="qrcodeFn" ref="QRCodeRef" :src="util.getAssetsImage('serw1.png')"
98
+ style="width: 35px;height: 35px; float: right; " alt="扫码上传" title="扫码上传" />
99
99
  </div>
100
100
  <div class="ScanUploadPhoto" v-if="model.qrcodeVisible" @click.stop="qrcodeVisible = true"
101
101
  :style="{ top: model.QRCodeRefTop + 'px', left: model.QRCodeRefLeft + 'px' }">
@@ -143,9 +143,9 @@ const props = defineProps({
143
143
  })
144
144
  const refct_Photo = ref()
145
145
  const refupload = ref()
146
- const QRCodeRef = ref()
146
+ const QRCodeRef = ref()
147
147
  const UploadhttpRequest = ref({})
148
- const model = ref(null)
148
+ const model = ref(null)
149
149
 
150
150
  const headers = computed(() => {
151
151
  return common.getDataDrivenOpts().handler.getRequestHeaders();
@@ -215,8 +215,8 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
215
215
  function handleRemove(file) {
216
216
 
217
217
 
218
- common.confirm("确定删除该附件?", "提示", {
219
- confirmButtonText: "确定",
218
+ common.confirm(common.LocalizedString("确定删除该附件?","確定刪除該附件?"), "提示", {
219
+ confirmButtonText: common.LocalizedString("确定","確認"),
220
220
  cancelButtonText: "取消",
221
221
  //type: 'warning'
222
222
  }).then(() => {
@@ -476,55 +476,66 @@ function QRCodeLocate() {
476
476
  function viewerfile(file) {
477
477
  Photo.viewerfile(file, model.value)
478
478
  }
479
-
479
+
480
480
  function PasteUpload(event) {
481
481
  if (!model.value.locked) {
482
482
  // 获取粘贴板中的图片
483
483
  const clipboardDatas = (event.clipboardData || event.originalEvent.clipboardData);
484
484
  const items = clipboardDatas.items;
485
+ //检测是否全是文件才上传
486
+ let fileSum = 0;
485
487
  for (let index in items) {
486
488
  const item = items[index];
487
489
  if (item.kind === 'file') {
488
-
489
- const file = item.getAsFile();
490
- let uid = Photo.uploadguid();
491
-
492
- file.uid = file.uid || uid;
493
- refupload.value.handleStart(file);
494
- // 提交上传队列
495
- refupload.value.submit();
490
+ ++fileSum;
491
+ }
492
+ }
493
+
494
+ if (fileSum == items.length) {
495
+ for (let index in items) {
496
+ const item = items[index];
497
+ if (item.kind === 'file') {
498
+
499
+ const file = item.getAsFile();
500
+ let uid = Photo.uploadguid();
501
+
502
+ file.uid = file.uid || uid;
503
+ refupload.value.handleStart(file);
504
+ // 提交上传队列
505
+ refupload.value.submit();
506
+ }
496
507
  }
497
508
  }
498
509
  }
499
510
  }
500
511
 
501
- function ListenerPaste(event) {
512
+ function ListenerPaste(event) {
502
513
 
503
- var target = event.target;
504
- const uploads = document.querySelectorAll('[uploadStatus="upload"]');
514
+ var target = event.target;
515
+ const uploads = document.querySelectorAll('[uploadStatus="upload"]');
505
516
 
506
- if (!window.uploads) {
507
- window.uploads = { count: 0, length: uploads.length };
508
- }
509
- if (uploads.length > 1) {
510
- window.uploads.count = window.uploads.count + 1;
511
- window.uploads.length = uploads.length;
517
+ if (!window.uploads) {
518
+ window.uploads = { count: 0, length: uploads.length };
519
+ }
520
+ if (uploads.length > 1) {
521
+ window.uploads.count = window.uploads.count + 1;
522
+ window.uploads.length = uploads.length;
512
523
 
513
- if (window.uploads.count == window.uploads.length) {
514
- window.uploads = null;
515
- ElMessage({
516
- message: "存在多个上传组件,请点击上传!",
517
- type: 'info',
518
- showClose: true,
519
- });
520
- return false;
521
- }
522
- }
523
- else if (uploads.length == 1) {
524
+ if (window.uploads.count == window.uploads.length) {
524
525
  window.uploads = null;
525
- PasteUpload(event);
526
+ ElMessage({
527
+ message: "存在多个上传组件,请点击上传!",
528
+ type: 'info',
529
+ showClose: true,
530
+ });
531
+ return false;
526
532
  }
527
-
533
+ }
534
+ else if (uploads.length == 1) {
535
+ window.uploads = null;
536
+ PasteUpload(event);
537
+ }
538
+
528
539
  }
529
540
 
530
541
  // 添加粘贴事件监听器
@@ -668,7 +679,7 @@ defineExpose({
668
679
 
669
680
  :deep(.qrcode-target) {
670
681
  position: absolute;
671
- right: 3px;
682
+ right: 3px;
672
683
  width: 35px;
673
684
  height: 35px;
674
685
  color: red;
@@ -7,7 +7,10 @@ const CheckBoxList = function (source) {
7
7
 
8
8
  this._value = [];
9
9
  if (source.code1) {
10
- let val = JSON.parse(source.code1)
10
+ let val = source.code1
11
+ if (typeof source.code1 === 'string'){
12
+ val = JSON.parse(source.code1)
13
+ }
11
14
  val.forEach((v) => {
12
15
  if (v['code']) {
13
16
  if (!v['flagDeleted']) {
@@ -36,7 +39,10 @@ const CheckBoxList = function (source) {
36
39
  });
37
40
  });
38
41
  if (source.code1) {
39
- let checked = JSON.parse(source.code1)
42
+ let checked = source.code1
43
+ if (typeof source.code1 === 'string'){
44
+ checked = JSON.parse(source.code1)
45
+ }
40
46
  checked.forEach((v) => {
41
47
  let item = rtn.globalOptions.find((v1) => {
42
48
  return v1.code === v.code;
@@ -62,7 +68,11 @@ const CheckBoxList = function (source) {
62
68
  //初始数据
63
69
  get globalOptions() {
64
70
  if (source.code1) {
65
- return [].concat(JSON.parse(source.code1));
71
+ if (typeof source.code1 === 'string'){
72
+ return [].concat(JSON.parse(source.code1));
73
+ }
74
+ return [].concat(source.code1);
75
+
66
76
  }
67
77
  else {
68
78
  return []
@@ -511,6 +511,7 @@ function updateFile(file, model) {
511
511
  model.fileSourceList[j].mediaUrl = file.mediaUrl;
512
512
  model.fileSourceList[j].savedFileName = file.savedFileName;
513
513
  model.fileSourceList[j].mediaDate = file.mediaDate;
514
+ model.fileSourceList[j].mediaCode = file.mediaCode;
514
515
  break;
515
516
  }
516
517
  }
@@ -585,7 +586,7 @@ function selfValidExcute(eventName, model) {
585
586
  }
586
587
  if (model.required) {
587
588
  if (File.getfileListLength(model) === 0) {
588
- model.validMessage = "必须上传附件";
589
+ model.validMessage = common.LocalizedString("必须上传附件","必須上傳附件");
589
590
  model.valid = false;
590
591
  model.displayValidMessage = model.validMessage;
591
592
  return false;