centaline-data-driven-v3 0.0.66 → 0.0.67

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.66",
3
+ "version": "0.0.67",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -128,6 +128,9 @@ body {
128
128
  line-height: 26px;
129
129
  color: var(--centalineGray);
130
130
  }
131
+ .el-input__suffix{
132
+ font-size: 12px;
133
+ }
131
134
 
132
135
  .button-initial {
133
136
  margin-top: 8px;
@@ -2,8 +2,8 @@
2
2
  <div class="alert fade in" role="alert"
3
3
  style="padding:0px;border-bottom:none;display: table-caption;margin-left: 5px;">
4
4
  <video :src="submitData[router.submitFormField]" controls="true" autoplay controlslist="nodownload"
5
- :height="router.dialogHeight ? router.dialogHeight - 10 : '40'"
6
- :width="router.dialogWidth ? router.dialogWidth - 10 : '100%'">您的浏览器不支持 video 标签。
5
+ :height="router.pageHeight ? router.pageHeight - 10 : '40'"
6
+ :width="router.pageWidth ? router.pageWidth - 10 : '100%'">您的浏览器不支持 video 标签。
7
7
  </video>
8
8
  </div>
9
9
  </template>
@@ -6,7 +6,8 @@
6
6
  :placeholder="model.placeholder" @visible-change="visibleChange" @clear="clear"
7
7
  :filterable="model.filterable" :multiple="model.multiple" class="fieldControl" :height="300"
8
8
  @click="clickHandler" :class="[model.moreActionRouter ? 'selectmore' : '', open ? 'open' : '']"
9
- :filter-method="getOptions">
9
+ :filter-method="debouncedRemoteMethod" @compositionstart="handleCompositionStart"
10
+ @compositionend="handleCompositionEnd">
10
11
  <template #default="{ item }">
11
12
  <el-tooltip :disabled="!item.toolTip" :content="item.toolTip" placement="right">
12
13
  <span v-html="item.displayName || item.name"></span>
@@ -57,6 +58,7 @@ const model = initData(props, ComboBox)
57
58
  const refselect = ref()
58
59
  const open = ref(false)
59
60
  const itemKey = ref(Math.random())
61
+ const isComposing = ref(false);
60
62
 
61
63
  //下拉框出现/隐藏时触发
62
64
  function visibleChange(visible) {
@@ -79,8 +81,9 @@ function visibleChange(visible) {
79
81
  }
80
82
  //获取数据列表
81
83
  function getOptions(key) {
82
- if (!model.value.moreActionRouter) {
84
+ if (!isComposing.value &&!model.value.moreActionRouter) {
83
85
  model.value.getOptions(props.parameterAction, key, function (data) {
86
+ if(data){
84
87
  data.forEach((v) => {
85
88
  let item = model.value.globalOptions.find((v1) => {
86
89
  return v1.code === v.code && v1.locked;
@@ -113,10 +116,25 @@ function getOptions(key) {
113
116
  nextTick(function () {
114
117
  setminWidth()
115
118
  });
119
+ }
116
120
  })
117
121
  }
118
122
 
119
123
  }
124
+ // 防抖函数
125
+ function debounce(func, delay) {
126
+ let timer = null;
127
+ return function () {
128
+ const context = this;
129
+ const args = arguments;
130
+ clearTimeout(timer);
131
+ timer = setTimeout(() => {
132
+ func.apply(context, args);
133
+ }, delay);
134
+ };
135
+ }
136
+ // 创建防抖后的远程搜索方法,延迟 300 毫秒
137
+ const debouncedRemoteMethod = debounce(getOptions, 300);
120
138
  //选中值发生变化时触发
121
139
  function change(val) {
122
140
  if (typeof val == 'undefined') {
@@ -131,6 +149,13 @@ function change(val) {
131
149
  if (model.value.autoSearch) emit('search');
132
150
 
133
151
  }
152
+ function handleCompositionStart() {
153
+ isComposing.value = true;
154
+ }
155
+
156
+ function handleCompositionEnd() {
157
+ isComposing.value = false;
158
+ }
134
159
  //弹出选择列表
135
160
  function popupSearchListHandle() {
136
161
  emit('popupSearchList', false, model, model.value.moreActionRouter, (optionArr) => {
@@ -68,6 +68,9 @@
68
68
  </div>
69
69
  </template>
70
70
  <template v-else>
71
+ <div v-if="model.controlLabel" class="list-title">
72
+ <h5>{{ model.controlLabel }}</h5>
73
+ </div>
71
74
  <div class="list-button">
72
75
  <component v-if="model.selectRouter !== null" :is="model.selectRouter.is"
73
76
  :vmodel="model.selectRouter" @click="popupSearchListHandle(model.selectRouter)"></component>
@@ -79,33 +82,37 @@
79
82
  <el-table :data="model.tableData" border :show-summary="model.showSummary"
80
83
  :summary-method="getSummaries" style="width: 100%" highlight-current-row>
81
84
  <template v-if="model.rowActionRoutersAlign === 1">
82
- <el-table-column label="操作"
83
- v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0" :width="'100%'">
84
- <template #header="{ column, $index }">
85
- {{ setcolumnminWidth(column) }}
86
- <span style="width:auto; white-space: nowrap;">{{ column.label }}</span>
87
- </template>
88
- <template #default="scope">
89
- <el-tag :disable-transitions="true" v-if="scope.row.edit || scope.row.isSet" type="success"
90
- @click="saveRow(scope.row, scope.$index, true)" style="cursor: pointer;">{{
91
- scope.row.isSet
92
- ?
93
- '保存' :
94
- "修改" }}</el-tag>
95
- <el-tag :disable-transitions="true" v-if="scope.row.delete && !scope.row.isSet"
96
- style="cursor: pointer;" type="danger"
97
- @click="deleteRow(scope.$index, scope.row.$sourceIndex)">删除</el-tag>
98
- <el-tag :disable-transitions="true" v-else-if="scope.row.isSet"
99
- @click="saveRow(scope.row, scope.$index, false)" style="cursor: pointer;">取消</el-tag>
100
- <template v-for="(v, i) in model.buttons">
101
- <el-tag
102
- v-if="!scope.row.isSet && v.show && (!v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1)"
103
- style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label }} 1</el-tag>
104
-
85
+ <el-table-column label="操作"
86
+ v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0"
87
+ :width="'100%'">
88
+ <template #header="{ column, $index }">
89
+ {{ setcolumnminWidth(column) }}
90
+ <span style="width:auto; white-space: nowrap;">{{ column.label }}</span>
105
91
  </template>
92
+ <template #default="scope">
93
+ <el-tag :disable-transitions="true" v-if="scope.row.edit || scope.row.isSet"
94
+ type="success" @click="saveRow(scope.row, scope.$index, true)"
95
+ style="cursor: pointer;">{{
96
+ scope.row.isSet
97
+ ?
98
+ '保存' :
99
+ "修改" }}</el-tag>
100
+ <el-tag :disable-transitions="true" v-if="scope.row.delete && !scope.row.isSet"
101
+ style="cursor: pointer;" type="danger"
102
+ @click="deleteRow(scope.$index, scope.row.$sourceIndex)">删除</el-tag>
103
+ <el-tag :disable-transitions="true" v-else-if="scope.row.isSet"
104
+ @click="saveRow(scope.row, scope.$index, false)"
105
+ style="cursor: pointer;">取消</el-tag>
106
+ <template v-for="(v, i) in model.buttons">
107
+ <el-tag
108
+ v-if="!scope.row.isSet && v.show && (!v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1)"
109
+ style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label }}
110
+ 1</el-tag>
106
111
 
107
- </template>
108
- </el-table-column>
112
+ </template>
113
+
114
+ </template>
115
+ </el-table-column>
109
116
  </template>
110
117
  <template v-for="(v, i) in model.rows[0].field" :key="i">
111
118
  <el-table-column :prop="v.fieldName1" :label="v.controlLabel" :width="v.width"
@@ -137,33 +144,37 @@
137
144
  </el-table-column>
138
145
  </template>
139
146
  <template v-if="model.rowActionRoutersAlign !== 1">
140
- <el-table-column label="操作"
141
- v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0" :width="'100%'">
142
- <template #header="{ column, $index }">
143
- {{ setcolumnminWidth(column) }}
144
- <span style="width:auto; white-space: nowrap;">{{ column.label }}</span>
145
- </template>
146
- <template #default="scope">
147
- <el-tag :disable-transitions="true" v-if="scope.row.edit || scope.row.isSet" type="success"
148
- @click="saveRow(scope.row, scope.$index, true)" style="cursor: pointer;">{{
149
- scope.row.isSet
150
- ?
151
- '保存' :
152
- "修改" }}</el-tag>
153
- <el-tag :disable-transitions="true" v-if="scope.row.delete && !scope.row.isSet"
154
- style="cursor: pointer;" type="danger"
155
- @click="deleteRow(scope.$index, scope.row.$sourceIndex)">删除</el-tag>
156
- <el-tag :disable-transitions="true" v-else-if="scope.row.isSet"
157
- @click="saveRow(scope.row, scope.$index, false)" style="cursor: pointer;">取消</el-tag>
158
- <template v-for="(v, i) in model.buttons">
159
- <el-tag
160
- v-if="!scope.row.isSet && v.show && (!v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1)"
161
- style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label }} 1</el-tag>
162
-
147
+ <el-table-column label="操作"
148
+ v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0"
149
+ :width="'100%'">
150
+ <template #header="{ column, $index }">
151
+ {{ setcolumnminWidth(column) }}
152
+ <span style="width:auto; white-space: nowrap;">{{ column.label }}</span>
163
153
  </template>
154
+ <template #default="scope">
155
+ <el-tag :disable-transitions="true" v-if="scope.row.edit || scope.row.isSet"
156
+ type="success" @click="saveRow(scope.row, scope.$index, true)"
157
+ style="cursor: pointer;">{{
158
+ scope.row.isSet
159
+ ?
160
+ '保存' :
161
+ "修改" }}</el-tag>
162
+ <el-tag :disable-transitions="true" v-if="scope.row.delete && !scope.row.isSet"
163
+ style="cursor: pointer;" type="danger"
164
+ @click="deleteRow(scope.$index, scope.row.$sourceIndex)">删除</el-tag>
165
+ <el-tag :disable-transitions="true" v-else-if="scope.row.isSet"
166
+ @click="saveRow(scope.row, scope.$index, false)"
167
+ style="cursor: pointer;">取消</el-tag>
168
+ <template v-for="(v, i) in model.buttons">
169
+ <el-tag
170
+ v-if="!scope.row.isSet && v.show && (!v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1)"
171
+ style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label }}
172
+ 1</el-tag>
173
+
174
+ </template>
164
175
 
165
- </template>
166
- </el-table-column>
176
+ </template>
177
+ </el-table-column>
167
178
  </template>
168
179
  <template #empty>
169
180
  {{ common.LocalizedString('暂无数据', '暫無數據') }}
@@ -425,7 +436,7 @@ function fieldsValidExcute() {
425
436
  if (i === 0) {
426
437
  if (f.displayValidMessage) {
427
438
  model.value.displayValidMessage = f.displayValidMessage;
428
- }
439
+ }
429
440
  }
430
441
  i++;
431
442
  rtnBool = false;
@@ -577,6 +588,12 @@ defineExpose({
577
588
  })
578
589
  </script>
579
590
  <style scoped>
591
+ .list-title {
592
+ padding-bottom: 5px;
593
+ text-align: left;
594
+ display: inline-table;
595
+ }
596
+
580
597
  .list-button {
581
598
  padding-bottom: 5px;
582
599
  text-align: right;
@@ -591,6 +608,7 @@ defineExpose({
591
608
  width: 100%;
592
609
  }
593
610
 
611
+
594
612
  .ct-form-repeat .list-title {
595
613
  padding-bottom: 5px;
596
614
  text-align: left;
@@ -25,8 +25,15 @@ const props = defineProps({
25
25
  const model = initData(props, RadioButton)
26
26
 
27
27
  function change() {
28
- changeHandler(model.value, emit);
29
- if (model.value.autoSearch) emit('search');
28
+ if(model.value.code1){
29
+ model.value.selectItems1.forEach((v) => {
30
+ if(model.value.code1===v.code){
31
+ model.value.name1=v.name;
32
+ }
33
+ });
34
+ }
35
+ changeHandler(model.value, emit);
36
+ if (model.value.autoSearch) emit('search');
30
37
  }
31
38
  function clearClickHandle() {
32
39
  model.value.reset()
@@ -38,8 +38,8 @@
38
38
  </button>
39
39
  <video ref="video" :src="rowData[router.submitFormField]" controls="true"
40
40
  controlslist="nodownload" @timeupdate="saveVoiceHistoryHandler" @ended="voiceEndedHandler"
41
- :height="router.dialogHeight ? router.dialogHeight : '40'"
42
- :width="router.dialogWidth ? router.dialogWidth : '100%'">您的浏览器不支持 video 标签。
41
+ :height="router.pageHeight ? router.pageHeight : '40'"
42
+ :width="router.pageWidth ? router.pageWidth : '100%'">您的浏览器不支持 video 标签。
43
43
  </video>
44
44
  </div>
45
45
  <img v-if="router.imgUrl && isShowImg" slot="reference"
@@ -107,7 +107,7 @@ const option = ref({
107
107
  const tooltipModel = ref({});
108
108
  const labelColor = ref('')
109
109
  const video = ref()
110
- const label = computed(() => {
110
+ const label = computed(() => {
111
111
  return (typeof props.colValue === "undefined" || props.colValue === '') ? props.router.controlLabel : props.colValue
112
112
  })
113
113
  const isShowLabel = computed(() => {
@@ -127,6 +127,7 @@ const isShowLabel = computed(() => {
127
127
  }
128
128
  return flag;
129
129
  })
130
+
130
131
  isVisited()
131
132
  function isVisited() {
132
133
  var key = props.router.action + props.rowData.chanceID;
@@ -22,7 +22,7 @@
22
22
  @SaveSearchWhere="SaveSearchWhere" @SearchWhereManage="SearchWhereManage"
23
23
  @clickSearchWhere="clickSearchWhere"></component>
24
24
  <br v-else-if="col.controlType === Enum.ControlType.LineFeed" />
25
- <component v-else :from="from" class="list-field" ref="Fields" v-bind="col.listBind"
25
+ <component v-else :from="from" class="list-field" v-bind="col.listBind"
26
26
  :is="col.is" :vmodel="col" :parameterAction="model.parameterAction"
27
27
  @search="searchHandler(col)" @change="changeHandler(col)">
28
28
  </component>
@@ -109,6 +109,7 @@ function loadFromModel(source, isFormList) {
109
109
  rtn1["options"][0]["value"] = attrValue
110
110
  }
111
111
  if (attrKey == 'name1') {
112
+ rtn1["name1"] = attrValue;
112
113
  rtn1["options"][0]["label"] = attrValue
113
114
  }
114
115
  }
@@ -135,16 +135,16 @@ function loadSearchScreenModel(source, prevParam) {
135
135
  var advIndex = rtn.sourceFieldsArr.findIndex((v) => {
136
136
  return v.controlType === Enum.ControlType.ButtonAdvancedSearch;
137
137
  });
138
- // if (advIndex === -1) {
139
- // advIndex = rtn.sourceFieldsArr.findIndex((v) => {
140
- // return v.controlType === Enum.ControlType.ButtonReset;
141
- // });
142
- // }
143
- // if (advIndex === -1) {
144
- // advIndex = rtn.sourceFieldsArr.findIndex((v) => {
145
- // return v.controlType === Enum.ControlType.ButtonSearch;
146
- // });
147
- // }
138
+ if (advIndex === -1) {
139
+ advIndex = rtn.sourceFieldsArr.findIndex((v) => {
140
+ return v.controlType === Enum.ControlType.ButtonReset;
141
+ });
142
+ }
143
+ if (advIndex === -1) {
144
+ advIndex = rtn.sourceFieldsArr.findIndex((v) => {
145
+ return v.controlType === Enum.ControlType.ButtonSearch;
146
+ });
147
+ }
148
148
  var screens = rtn.sourceFieldsArr.filter((v, i) => {
149
149
  return (advIndex !== -1 && i > advIndex) && v.controlType !== Enum.ControlType.From;
150
150
  });
package/src/main.js CHANGED
@@ -26,7 +26,7 @@ app.use(centaline, {
26
26
  //baseUrl: "http://10.1.245.50:38735/max-uplink-api/",
27
27
  //baseUrl: "http://10.1.245.111:38028/",
28
28
  flagRouterSelf: true,
29
- flagApp: true,//是否app端
29
+ flagApp: false,//是否app端
30
30
  zindex: 999,
31
31
  showRequestSuccessMessage: true,
32
32
  showRequestErrorMessage: true,
@@ -64,7 +64,7 @@ app.use(centaline, {
64
64
  //authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
65
65
  //oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
66
66
  //authObject: '{token:"1-a7289bb2-9f1e-4a04-9016-1e555bf39188"}',
67
- authObject: '{EmpID:"Token_052cca91-c75e-45cc-b549-90730d12f6bc",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_052cca91-c75e-45cc-b549-90730d12f6bc",Platform:"IOS"}',
67
+ authObject: '{EmpID:"Token_00f32936-8123-45d4-b1b2-2206150ab06e",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_00f32936-8123-45d4-b1b2-2206150ab06e",Platform:"WEB"}',
68
68
  };
69
69
  },
70
70
  // 请求完成事件,可判断是否登录过期执行响应操作