centaline-data-driven-v3 0.0.45 → 0.0.47

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.45",
3
+ "version": "0.0.47",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -80,7 +80,7 @@ body {
80
80
  line-height: normal;
81
81
  }
82
82
 
83
- .ct-form-tip{
83
+ .ct-form-tip {
84
84
  background-color: #ffe7cc;
85
85
  border-color: #ffe7cc;
86
86
  border-radius: 5px;
@@ -114,6 +114,7 @@ body {
114
114
  line-height: 26px;
115
115
  color: var(--centalineGray);
116
116
  }
117
+
117
118
  .sufLabel2 {
118
119
  margin-left: 20px;
119
120
  font-size: 12px;
@@ -146,7 +147,8 @@ body {
146
147
  margin: auto;
147
148
  box-shadow: 0 2px 20px 0 rgb(0 0 0 / 10%);
148
149
  }
149
- .unitName{
150
+
151
+ .unitName {
150
152
  font-size: 12px;
151
153
  line-height: 26px;
152
154
  }
@@ -418,6 +420,7 @@ body {
418
420
  cursor: pointer;
419
421
  color: #2E58E6;
420
422
  }
423
+
421
424
  .ct-tablecurrencyImg {
422
425
  width: 24px;
423
426
  margin-top: 2px;
@@ -777,6 +780,11 @@ body {
777
780
  margin-right: 15px;
778
781
  }
779
782
 
783
+ .ct-Radio .el-checkbox .el-checkbox__label {
784
+ display: flex;
785
+ align-items: center;
786
+ }
787
+
780
788
  #ct-TreeList .el-main {
781
789
  padding: 0 0 0 10px;
782
790
  }
@@ -799,9 +807,11 @@ body {
799
807
  .viewerMenu .el-sub-menu__title .el-sub-menu__icon-arrow {
800
808
  display: inline-block;
801
809
  }
802
- .handle{
803
- cursor: move;
804
- user-select: none; /* 禁止文本选择 */
810
+
811
+ .handle {
812
+ cursor: move;
813
+ user-select: none;
814
+ /* 禁止文本选择 */
805
815
  }
806
816
 
807
817
 
@@ -1035,7 +1045,8 @@ body {
1035
1045
  width: 14px;
1036
1046
  height: 14px;
1037
1047
  }
1038
- .ct-Radio .el-radio.el-radio--small .el-radio__label{
1048
+
1049
+ .ct-Radio .el-radio.el-radio--small .el-radio__label {
1039
1050
  height: 24px;
1040
1051
  line-height: 24px;
1041
1052
  }
@@ -1053,21 +1064,26 @@ body {
1053
1064
  border-color: #EE6B6B;
1054
1065
  color: #EE6B6B;
1055
1066
  }
1056
- .el-tag--small{
1067
+
1068
+ .el-tag--small {
1057
1069
  height: auto;
1058
1070
  line-height: 16px;
1059
1071
  padding: 3px 9px;
1060
1072
  }
1061
- .el-checkbox.el-checkbox--small{
1073
+
1074
+ .el-checkbox.el-checkbox--small {
1062
1075
  height: auto;
1063
1076
  padding: 5px 0;
1064
1077
  }
1065
- .ct-photoSelectList .el-checkbox.el-checkbox--small .el-checkbox__inner{
1078
+
1079
+ .ct-photoSelectList .el-checkbox.el-checkbox--small .el-checkbox__inner {
1066
1080
  width: 15px;
1067
1081
  height: 15px;
1068
1082
  border: 1px solid #ed745f;
1069
1083
  }
1070
- .ct-photoSelectList .el-checkbox__input.is-checked .el-checkbox__inner{
1084
+
1085
+ .ct-photoSelectList .el-checkbox__input.is-checked .el-checkbox__inner {
1071
1086
  background-color: #ed745f;
1072
1087
  }
1088
+
1073
1089
  /*elementPlus样式重置结束*/
@@ -1,12 +1,20 @@
1
1
  <template>
2
2
  <ct-field :vmodel="model">
3
3
  <template #Control>
4
- <van-checkbox-group v-model="model.value" direction="horizontal" @change="change"
5
- :disabled="model.locked" :max="parseInt(model.maxValue1 || 999)">
6
- <van-checkbox v-for="item in model.selectItems1" :key="item.code" shape="square" :name="item.code"
7
- :style="{ width: model.width1 + 'px' }" style="white-space: normal;">
8
- <span v-html="item.name"></span>
9
- </van-checkbox>
4
+ <van-checkbox-group v-model="model.value" direction="horizontal" @change="change" :disabled="model.locked"
5
+ :max="parseInt(model.maxValue1 || 999)">
6
+ <template v-for="item in model.selectItems1" :key="item.code">
7
+ <van-checkbox shape="square" :name="item.code" :style="{ width: model.width1 + 'px' }"
8
+ style="white-space: normal;">
9
+ <span v-html="item.name"></span>
10
+ </van-checkbox>
11
+ <van-popover v-if="item.toolTip">
12
+ <div v-html="item.toolTip" style="font-size: 14px;padding: 10px;"></div>
13
+ <template #reference>
14
+ <van-icon name="info" size="20" style="top: 5px;" />
15
+ </template>
16
+ </van-popover>
17
+ </template>
10
18
  </van-checkbox-group>
11
19
  </template>
12
20
  </ct-field>
@@ -14,7 +22,7 @@
14
22
  <script lang="ts" setup>
15
23
  import { initData, changeHandler } from '../../utils/mixins';
16
24
  import CheckBoxList from '../../loader/src/CheckBoxList';
17
- const emit = defineEmits(['click', 'change','search'])
25
+ const emit = defineEmits(['click', 'change', 'search'])
18
26
  const props = defineProps({
19
27
  parameterAction: String,
20
28
  vmodel: Object,
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="van-uploader" style="margin:10px 10px 0 10px; ">
3
3
  <div class="van-uploader__wrapper">
4
- <draggable :list="photoList" v-bind="dragOptions" @change="onEnd" class="card" @dragover.prevent @drop.prevent>
4
+ <draggable :list="photoList" v-bind="dragOptions" :distance="1" @change="onEnd" class="card" @dragover.prevent @drop.prevent>
5
5
  <template #item="{ element, index }">
6
6
  <div class="van-uploader__preview" style="display:inline-block;" @click="viewerfile(photoList, index)">
7
7
  <div class="van-image van-uploader__preview-image">
@@ -205,13 +205,7 @@ function allchoose() {
205
205
  function handleClick() {
206
206
  if (chooseList.value && chooseList.value.length > 0) {
207
207
  emit('handlePhoto', chooseList.value);
208
- } else {
209
- ElMessage({
210
- message: "请选择至少一张图片",
211
- type: 'warning',
212
- showClose: true,
213
- });
214
- }
208
+ }
215
209
  }
216
210
  function rolRouterCellClickHandler(routerKey, rowindex, sourceIndex) {
217
211
  if (routerKey == 'photoPreview') {
@@ -21,9 +21,14 @@ const props = defineProps({
21
21
  Boolean,
22
22
  default: false,
23
23
  },
24
+ apiParam: {
25
+ type: Object,
26
+ default: () => { }
27
+ },
24
28
  })
25
29
  const model = ref(null)
26
30
  const selectStats = ref("")
31
+ const fieldName1 = ref("")
27
32
  const tableStatistics = ref()
28
33
  function searchStatsComplate() {
29
34
  nextTick(function () {
@@ -40,6 +45,17 @@ function searchStatsComplate() {
40
45
  }
41
46
  function load(data) {
42
47
  model.value = data;
48
+ data.source.content.forEach((item) => {
49
+ fieldName1.value = item.fieldName1;
50
+ });
51
+ if (selectStats.value == '') {
52
+ var i = data.source.content.findIndex((v) => {
53
+ return v.code1 == props.apiParam[fieldName1.value];
54
+ });
55
+ if (i > -1) {
56
+ selectStats.value = i
57
+ }
58
+ }
43
59
  emit("setTableHeight");
44
60
  }
45
61
  function handleClick(ev) {
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <div class="ct-searchtableAPP" ref="refSearchTable" v-if="model">
3
3
  <SearchStats ref="refTableStats" v-if="model && searchStatsApi" :api="searchStatsApi"
4
- @searchStats="clickSearchStats" :searchModel="model.searchModel" @setTableHeight="setTableHeight">
4
+ @searchStats="clickSearchStats" :searchModel="model.searchModel" @setTableHeight="setTableHeight"
5
+ :apiParam="apiParam">
5
6
  </SearchStats>
6
7
  <div class="ct-table-tip ct-table-tip-mini" style="display: block;" ref="refListHeader"
7
8
  v-if="model && model.listHeader" v-html="model.listHeader">
@@ -16,7 +17,7 @@
16
17
  <van-radio-group v-model="checkeds" ref="refCheckboxGroup">
17
18
  <div class="ct-list" v-for="(row, rowindex) in model.listData" :key="rowindex">
18
19
  <van-radio @click="selectRow(row)" icon-size="16px" checked-color="#EE6B6B"
19
- :name="rowindex" :disabled="row.flagSelect == false ? true : false"> </van-radio>
20
+ :name="rowindex" :disabled="!flagSelect(row)"> </van-radio>
20
21
  <ct-layout :vmodel="row" :cellLayout="model.cellLayout" :rowindex="rowindex"
21
22
  :key="itemKey" @rolRouterclick="rolRouterCellClickHandler"
22
23
  :actionRouter="model.actionRouter"
@@ -30,7 +31,7 @@
30
31
  <div class="ct-list" v-for="(row, rowindex) in model.listData" :key="rowindex">
31
32
  <van-checkbox v-if="isoperate || flagPopupSearchlist" shape="square"
32
33
  checked-color="#EE6B6B" icon-size="14px" :name="rowindex" @click="selectRow(row)"
33
- :disabled="row.flagSelect == false ? true : false"></van-checkbox>
34
+ :disabled="!flagSelect(row)"></van-checkbox>
34
35
  <ct-layout :vmodel="row" :cellLayout="model.cellLayout" :rowindex="rowindex"
35
36
  :key="itemKey" @rolRouterclick="rolRouterCellClickHandler"
36
37
  :actionRouter="model.actionRouter"
@@ -90,6 +91,10 @@ const props = defineProps({
90
91
  api: String,
91
92
  searchStatsApi: String,
92
93
  flagAppMode: Boolean,
94
+ apiParam: {
95
+ type: Object,
96
+ default: () => { }
97
+ },
93
98
  flagFocus: {
94
99
  Boolean,
95
100
  default: true,
@@ -461,6 +466,12 @@ function confirmClickHandler() {
461
466
  emit('submit', rtnData);
462
467
  }
463
468
  }
469
+ function flagSelect(row) {
470
+ if (!model.value.rightCheckBoxColumn || common.getDataOfUpperLower(row, model.value.rightCheckBoxColumn) == 1) {
471
+ return true;
472
+ }
473
+ return false;
474
+ }
464
475
  defineExpose({
465
476
  model,
466
477
  searchComplate,
@@ -10,7 +10,8 @@
10
10
  @showTitle="showTitleScreenHandler" @sort="loadsort"></ct-searchscreen>
11
11
  <searchTable ref="refTable" :api="searchDataApi" :searchStatsApi="searchStatsApi"
12
12
  :flagPopupSearchlist="flagPopupSearchlist" :singleSelectio="singleSelectio" :flagTabbar="flagTabbar"
13
- @scrollHandle="scrollHandle" v-on:submit="popupSearchListConfirm" @loaded="tableLoaded"></searchTable>
13
+ :apiParam="apiParam" @scrollHandle="scrollHandle" v-on:submit="popupSearchListConfirm"
14
+ @loaded="tableLoaded"></searchTable>
14
15
  </div>
15
16
  </template>
16
17
  <script lang="ts" setup>
@@ -111,17 +112,17 @@ function tableLoaded() {
111
112
  var router = refTable.value.model.buttons.find((v) => {
112
113
  return v.key === 'sort';
113
114
  });
114
- if(router&&refScreen.value){
115
+ if (router && refScreen.value) {
115
116
  refScreen.value.getsortfield(router);
116
117
  }
117
118
  emit('loaded', refTable.value.model);
118
119
  }
119
- function loadsort(ev){
120
+ function loadsort(ev) {
120
121
  if (refTable.value.model) {
121
122
  refTable.value.model.sortString = ev.code;
122
123
  refTable.value.getPage(1);
123
124
  }
124
-
125
+
125
126
  }
126
127
  function showTitleScreenHandler() {
127
128
 
@@ -32,8 +32,7 @@
32
32
  </div>
33
33
  </div>
34
34
  <template v-if="file.mediaTypeID == '1'">
35
- <iframe :src="file.mediaUrl" :height="displayAreaHeight - 80 + 'px'"
36
- :width="displayAreaWidth + 'px'" style="border-width: 0px;">
35
+ <iframe :src="file.mediaUrl" height="100%" width="100%" style="border-width: 0px;">
37
36
  </iframe>
38
37
  </template>
39
38
  <!--Photo-->
@@ -48,11 +47,16 @@
48
47
  <template v-else-if="file.mediaTypeID == '4'">
49
48
  <div class="viewerContent">
50
49
  <template v-if="file.thumbnailUrl">
51
- <video preload="none" :poster="file.thumbnailUrl" :src="file.mediaUrl"
52
- controls="controls" controlslist="nodownload" style="width: 100%;">
53
- 您的浏览器不支持 video 标签。
54
- </video>
55
-
50
+ <template v-if="common.isVideoFile(file.mediaUrl)">
51
+ <video preload="none" :poster="file.thumbnailUrl" :src="file.mediaUrl"
52
+ controls="controls" controlslist="nodownload" style="width: 100%;">
53
+ 您的浏览器不支持 video 标签。
54
+ </video>
55
+ </template>
56
+ <template v-else>
57
+ <iframe :src="file.mediaUrl" height="100%" width="100%" style="border-width: 0px;">
58
+ </iframe>
59
+ </template>
56
60
  </template>
57
61
  <template v-else>
58
62
  <video preload="none" :src="file.mediaUrl" controls="controls" class="viewerContent"
@@ -109,7 +113,7 @@
109
113
  </template>
110
114
  <script setup lang="ts">
111
115
  import { ref, onMounted } from 'vue'
112
-
116
+ import common from '../../utils/common'
113
117
  import viewerImage from './ViewerFile/ViewerImage.vue';
114
118
  import viewerPDF from './ViewerFile/ViewerPDF.vue';
115
119
  import viewerP360 from './ViewerFile/viewerP360.vue';
@@ -188,10 +192,11 @@ function onswipenext() {
188
192
  display: inline-block !important;
189
193
  font-size: 14px;
190
194
  padding: 10px;
195
+ background: rgba(0, 0, 0, .45);
191
196
  }
192
197
 
193
198
  .enlarge-picture {
194
- display:flex;
199
+ display: flex;
195
200
  padding: 2px 0;
196
201
  }
197
202
  </style>
@@ -6,7 +6,7 @@
6
6
  style=" width: 100%;">
7
7
  <van-dropdown-item v-for="(field, index) in screendata" :key="index" ref="Refitem"
8
8
  :title-class="field.searchValue || field.searchValue1 ? 'title color-EE6B6B' : 'title'"
9
- @open="open(field)" @close="close(field)">
9
+ @open="open(field)" @close="close(field)" :disabled="field.locked">
10
10
  <template #title>
11
11
  <span v-if="field.searchValue || field.searchValue1">{{ getLableShow(field) }}</span>
12
12
  <span v-else>{{ field.controlLabel }}</span>
@@ -16,31 +16,31 @@
16
16
  <div style="padding: 5px 16px; display: flex;" v-if="field.is != 'ct-combobox'">
17
17
  <van-button color="#ECECEC" block @click="field.reset()"
18
18
  style="color:333333;margin-right: 10px;">
19
- 重置
19
+ {{ getBtnLabel(Enum.ControlType.ButtonReset, '重置') }}
20
20
  </van-button>
21
21
  <van-button color="#FF5252" block @click="clickHandler(field)">
22
- 确定
22
+ {{ getBtnLabel(Enum.ControlType.ButtonSearch, '确定') }}
23
23
  </van-button>
24
24
  </div>
25
25
  </van-dropdown-item>
26
26
  <van-dropdown-item v-if="ismore" key="4" title="更多" ref="RefitemMore" title-class="title"
27
27
  class="screen-more" @open="openMore" @close="closeMore">
28
28
  <template v-for="(field, index) in model.screen" :key="index">
29
- <component :is="field.is" :vmodel="field" ref="Fields"
29
+ <component v-if="field.show !== false" :is="field.is" :vmodel="field" ref="Fields"
30
30
  :parameterAction="model.parameterAction" />
31
31
  </template>
32
32
  <template v-for="(field, index) in model.highScreen" :key="index">
33
- <component :is="field.is" :vmodel="field" ref="Fields"
33
+ <component v-if="field.show !== false" :is="field.is" :vmodel="field" ref="Fields"
34
34
  :parameterAction="model.parameterAction" />
35
35
  </template>
36
36
  <van-sticky position="bottom">
37
37
  <div style="padding: 5px 16px; display: flex;background-color: #ffffff;">
38
38
  <van-button color="#ECECEC" block @click="reset"
39
39
  style="color:333333;margin-right: 10px;">
40
- 重置
40
+ {{ getBtnLabel(Enum.ControlType.ButtonReset, '重置') }}
41
41
  </van-button>
42
42
  <van-button color="#FF5252" block @click="clickHandlerMore()">
43
- 确定
43
+ {{ getBtnLabel(Enum.ControlType.ButtonSearch, '确定') }}
44
44
  </van-button>
45
45
  </div>
46
46
  </van-sticky>
@@ -157,7 +157,9 @@ function failLoad() {
157
157
  //无任何筛选条件时,不显示该div
158
158
  function setScreenShow() {
159
159
  let showField = model.value.screen.find((v) => {
160
- return v.show !== false;
160
+ return v.show !== false &&
161
+ v.controlType !== Enum.ControlType.LineFeed &&
162
+ v.controlType !== Enum.ControlType.IndependentGroup;
161
163
  });
162
164
  if (!showField) {
163
165
  showField = model.value.btnScreen.find((v) => {
@@ -172,8 +174,9 @@ function setscreendata() {
172
174
  screendata.value = [];
173
175
  var screens = model.value.screen.filter((v, i) => {
174
176
  return (
175
- v.show === true &&
176
- v.type != Enum.ControlType.IndependentGroup
177
+ v.show !== false &&
178
+ v.controlType !== Enum.ControlType.IndependentGroup &&
179
+ v.controlType !== Enum.ControlType.LineFeed
177
180
  );
178
181
  });
179
182
  if (screens.length > 4) {
@@ -280,10 +283,14 @@ function closeMore() {
280
283
  function setsearchdata() {
281
284
  searchdata.value = [];
282
285
  var screens = model.value.screen.filter((v) => {
283
- return v.show === true && v.controlType != Enum.ControlType.IndependentGroup;
286
+ return v.show === true &&
287
+ v.controlType != Enum.ControlType.IndependentGroup &&
288
+ v.controlType !== Enum.ControlType.LineFeed;
284
289
  });
285
290
  var highScreen = model.value.highScreen.filter((v) => {
286
- return v.show === true && v.controlType != Enum.ControlType.IndependentGroup;
291
+ return v.show === true &&
292
+ v.controlType != Enum.ControlType.IndependentGroup &&
293
+ v.controlType !== Enum.ControlType.LineFeed;
287
294
  });
288
295
  screens = [...screens, ...highScreen];
289
296
  screens.forEach((v) => {
@@ -337,6 +344,16 @@ function selectsort(ev) {
337
344
  }
338
345
  emit("sort", ev);
339
346
  }
347
+ function getBtnLabel(controlType, controlLabel) {
348
+ let rtn = controlLabel;
349
+ let field = model.value.btnScreen.find((v) => {
350
+ return v.controlType === controlType;
351
+ });
352
+ if (field) {
353
+ rtn = field.controlLabel
354
+ }
355
+ return rtn;
356
+ }
340
357
  function getLableShow(field) {
341
358
  let labelShow = field.searchName;
342
359
  if (!labelShow) {
@@ -1,11 +1,19 @@
1
1
  <template>
2
2
  <ct-field :vmodel="model">
3
3
  <template #Control>
4
- <div class="ct-Radio fieldControl" :class="[model.value !== ''&&model.value.length>0&&!model.locked ? 'hasValue' : '']" >
5
- <el-checkbox-group v-model="model.value" @change="change" :max="parseInt(model.maxValue1 || 999)" style="display: inline-block;">
4
+ <div class="ct-Radio fieldControl"
5
+ :class="[model.value !== '' && model.value.length > 0 && !model.locked ? 'hasValue' : '']">
6
+ <el-checkbox-group v-model="model.value" @change="change" :max="parseInt(model.maxValue1 || 999)"
7
+ style="display: inline-block;">
6
8
  <el-checkbox v-bind="model.attrs" v-for="(item, index) in model.selectItems1" :key="index"
7
- :label="item.code" :disabled="model.locked" :style="{ width: model.width1 + 'px' }" style="white-space: normal;">
9
+ :label="item.code" :disabled="model.locked" :style="{ width: model.width1 + 'px' }"
10
+ style="white-space: normal;">
8
11
  <span v-html="item.name" style="line-height: 16px;"></span>
12
+ <el-icon :size="18" v-if="item.toolTip" style="margin-left: 5px;">
13
+ <el-tooltip raw-content :content="item.toolTip" placement="top" effect="light">
14
+ <WarningFilled />
15
+ </el-tooltip>
16
+ </el-icon>
9
17
  </el-checkbox>
10
18
  <el-icon @click="clearClickHandle" class="el-range__close-icon" style="margin-left: 10px;">
11
19
  <CircleClose />
@@ -18,7 +26,7 @@
18
26
  <script lang="ts" setup>
19
27
  import { initData, changeHandler } from '../../utils/mixins';
20
28
  import CheckBoxList from '../../loader/src/CheckBoxList';
21
- const emit = defineEmits(['click', 'change','search'])
29
+ const emit = defineEmits(['click', 'change', 'search'])
22
30
  const props = defineProps({
23
31
  parameterAction: String,
24
32
  vmodel: Object,
@@ -33,7 +41,7 @@ function change() {
33
41
  }
34
42
  function clearClickHandle() {
35
43
  model.value.reset()
36
- change()
44
+ change()
37
45
  }
38
46
  defineExpose({
39
47
  model
@@ -7,12 +7,12 @@
7
7
  v-model:file-list="model.fileList" :multiple="true" :auto-upload="true" :action="action()"
8
8
  :data="model.uploadData" :headers="headers" :before-upload="beforeUploadProcess"
9
9
  :on-success="handleAvatarSuccess" :on-error="handleAvatarError" :on-progress="uploadProcess"
10
- :limit="parseInt(model.maxValue1 || 999)" :on-exceed="handleExceed">
10
+ :limit="parseInt(model.maxValue1 || 999)" :on-exceed="handleExceed"
11
+ :uploadStatus="!model.disableUpload&&!model.locked?'upload':'lock'"
12
+ >
11
13
  <el-icon>
12
14
  <Plus />
13
- </el-icon>
14
- <input style="position: absolute;width: 0px;height: 0px;top: 13px;left: 5px;" type="text" placeholder="粘贴上传"
15
- source="upload" @paste="handlePaste" ref="refPasteUpload" />
15
+ </el-icon>
16
16
  <template #tip>
17
17
  <div class="el-upload__tip errorMessage" style="white-space:pre-wrap;" v-show="!model.valid"
18
18
  v-html="model.validMessage">
@@ -20,14 +20,9 @@
20
20
  <div v-show="model.description" v-html="model.description">
21
21
  </div>
22
22
  </template>
23
- <div class="qrcode-target">
24
- <img @click.stop="qrcodeFn" ref="QRCodeRef" v-if="model.QRCodeAction" :src="util.getAssetsImage('serw1.png')"
23
+ <div class="qrcode-target" v-if="model.QRCodeAction">
24
+ <img @click.stop="qrcodeFn" ref="QRCodeRef" :src="util.getAssetsImage('serw1.png')"
25
25
  style="width: 35px;height: 35px; float: right; " alt="扫码上传" title="扫码上传" />
26
- <div style="cursor: pointer; height: 16px;line-height: 16px; float: right;" @click.stop="getFocus">
27
- <el-icon style="font-size: 14px;" title="粘贴上传">
28
- <DocumentCopy />
29
- </el-icon>
30
- </div>
31
26
  </div>
32
27
  <div class="ScanUploadPhoto" v-if="model.qrcodeVisible" @click.stop="qrcodeVisible = true"
33
28
  :style="{ top: model.QRCodeRefTop + 'px', left: model.QRCodeRefLeft + 'px' }">
@@ -192,14 +187,12 @@ const props = defineProps({
192
187
  })
193
188
  const refct_upload = ref()
194
189
  const refupload = ref()
195
- const QRCodeRef = ref()
196
- const refPasteUpload = ref()
190
+ const QRCodeRef = ref()
197
191
  const UploadhttpRequest = ref({})
198
192
  const startfile = ref();
199
193
  const endfile = ref();
200
194
  const model = ref(null);
201
-
202
- const flagPasteUpload = ref(false);
195
+
203
196
 
204
197
  const headers = computed(() => {
205
198
  return common.getDataDrivenOpts().handler.getRequestHeaders();
@@ -633,40 +626,32 @@ function viewerfile(file) {
633
626
  File.viewerfile(file, model.value)
634
627
  }
635
628
 
636
- function getFocus() {
637
- refPasteUpload.value.focus();
638
- }
639
-
640
- function handlePaste(event) {
641
- flagPasteUpload.value = true;
642
- PasteUpload(event);
643
- }
644
-
629
+
630
+
645
631
  function PasteUpload(event) {
646
-
647
- // 获取粘贴板中的图片
648
- const clipboardDatas = (event.clipboardData || event.originalEvent.clipboardData);
649
- const items = clipboardDatas.items;
650
- for (let index in items) {
651
- const item = items[index];
652
- if (item.kind === 'file') {
653
-
654
- const file = item.getAsFile();
655
- let uid = File.uploadguid();
656
-
657
- file.uid = file.uid || uid;
658
- refupload.value.handleStart(file);
659
- // 提交上传队列
660
- refupload.value.submit();
632
+ if (!model.value.locked && !model.value.disableUpload) {
633
+ // 获取粘贴板中的图片
634
+ const clipboardDatas = (event.clipboardData || event.originalEvent.clipboardData);
635
+ const items = clipboardDatas.items;
636
+ for (let index in items) {
637
+ const item = items[index];
638
+ if (item.kind === 'file') {
639
+
640
+ const file = item.getAsFile();
641
+ let uid = File.uploadguid();
642
+
643
+ file.uid = file.uid || uid;
644
+ refupload.value.handleStart(file);
645
+ // 提交上传队列
646
+ refupload.value.submit();
647
+ }
661
648
  }
662
649
  }
663
-
664
650
  }
665
651
 
666
- function ListenerPaste(event) {
667
- if (!flagPasteUpload.value) {
652
+ function ListenerPaste(event) {
668
653
  var target = event.target;
669
- const uploads = document.querySelectorAll('input[source="upload"]');
654
+ const uploads = document.querySelectorAll('[uploadStatus="upload"]');
670
655
 
671
656
  if (!window.uploads) {
672
657
  window.uploads = { count: 0, length: uploads.length };
@@ -689,10 +674,7 @@ function ListenerPaste(event) {
689
674
  window.uploads = null;
690
675
  PasteUpload(event);
691
676
  }
692
- }
693
- else {
694
- flagPasteUpload.value = false;
695
- }
677
+
696
678
 
697
679
  }
698
680
 
@@ -840,7 +822,7 @@ defineExpose({
840
822
  position: absolute;
841
823
  top: 3px;
842
824
  right: 3px;
843
- width: 50px;
825
+ width: 35px;
844
826
  height: 35px;
845
827
  color: red;
846
828
  text-align: right;