three-trees-ui 1.0.72 → 1.0.74

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": "three-trees-ui",
3
- "version": "1.0.72",
3
+ "version": "1.0.74",
4
4
  "publicPath": "/ui",
5
5
  "author": "hotent",
6
6
  "private": false,
@@ -1137,11 +1137,8 @@
1137
1137
  }
1138
1138
  const pInst = utils.getOnlineFormInstance(this)
1139
1139
  this.selectOrgs = this.convertComment2Field(str, field)
1140
- this.custdialog.custDialog.mappingConf.forEach((con) => {
1141
- let val = ''
1142
- let bindValue = ''
1143
- //改造,绑定值,表单列表查询字段绑定对话框时,新增的绑定字段选项
1144
- const bindValueField = con.bindValue && con.bindValue.toLowerCase()
1140
+ this.custdialog.custDialog.mappingConf.forEach((con) => {
1141
+ var val = ''
1145
1142
  str.forEach((item, index) => {
1146
1143
  // 此处添加url跳转参数保存逻辑
1147
1144
  if (
@@ -1162,10 +1159,6 @@
1162
1159
  },`
1163
1160
  } else {
1164
1161
  val += item[con.from] + ','
1165
- //绑定字段处理
1166
- if (bindValueField) {
1167
- bindValue += item[bindValueField] + ','
1168
- }
1169
1162
  }
1170
1163
  })
1171
1164
  if (this.modelName == 'data.' + con['target'][0]) {
@@ -1176,29 +1169,12 @@
1176
1169
  thisIndex
1177
1170
  )
1178
1171
  } else if (this.modelName == 'searchForm.' + con['target'][0]) {
1179
- const bInst = pInst['searchForm'] ? pInst: pInst.data
1180
1172
  utils.setValueByPath(
1181
- bInst,
1173
+ pInst,
1182
1174
  'searchForm.' + con['target'][0],
1183
1175
  val.substring(0, val.length - 1),
1184
1176
  thisIndex
1185
1177
  )
1186
- //绑定字段值处理,bindValue: {target: {id: xxx}}, bindKey: {target: id }
1187
- if (bindValue && bindValueField) {
1188
- const bindValueObj = {}
1189
- //显示value对象
1190
- bindValueObj[bindValueField] = bindValue.substring(0, bindValue.length - 1)
1191
-
1192
- const anInst = pInst['searchForm'] ? pInst['searchForm'] : pInst.data.searchForm
1193
- //若bindKey不存在,则默认空对象,若存在,则取出bindKey
1194
- anInst.bindKey = anInst.bindKey || {}
1195
- //格式 {target: id }
1196
- anInst.bindKey[con['target'][0]] = bindValueField
1197
- //若bindValue不存在,则默认空对象,若存在,则取出bindValue
1198
- anInst.bindValue = anInst.bindValue || {}
1199
- //格式 {target: {id: xxx}}
1200
- anInst.bindValue[con['target'][0]] = bindValueObj
1201
- }
1202
1178
  } else {
1203
1179
  let configAttr = con['target'][0].split('.')
1204
1180
  let path = con['target'][0]
@@ -1223,26 +1199,10 @@
1223
1199
  }
1224
1200
  utils.setValueByPath(
1225
1201
  pInst,
1226
- `${pInst.data ? 'data.' : 'model.'}${this.modelName.includes('searchForm') ? `searchForm.${path}` : path}`,
1202
+ `${pInst.data ? 'data.' : 'model.'}${path}`,
1227
1203
  _val,
1228
1204
  thisIndex
1229
1205
  )
1230
- //绑定字段值处理,bindValue: {target: {id: xxx}}, bindKey: {target: id }
1231
- if (bindValue && bindValueField) {
1232
- const bindValueObj = {}
1233
- //显示value对象
1234
- bindValueObj[bindValueField] = bindValue.substring(0, bindValue.length - 1)
1235
-
1236
- const anInst = pInst['searchForm'] ? pInst['searchForm'] : pInst.data.searchForm
1237
- //若bindKey不存在,则默认空对象,若存在,则取出bindKey
1238
- anInst.bindKey = anInst.bindKey || {}
1239
- //格式 {target: id }
1240
- anInst.bindKey[con['target'][0]] = bindValueField
1241
- //若bindValue不存在,则默认空对象,若存在,则取出bindValue
1242
- anInst.bindValue = anInst.bindValue || {}
1243
- //格式 {target: {id: xxx}}
1244
- anInst.bindValue[con['target'][0]] = bindValueObj
1245
- }
1246
1206
  }
1247
1207
  }
1248
1208
  })
@@ -1896,11 +1856,8 @@
1896
1856
  }
1897
1857
  const pInst = utils.getOnlineFormInstance(this)
1898
1858
  this.custdialog.custDialog.mappingConf.forEach((con) => {
1899
- let val = ''
1900
- let bindValue = ''
1901
- const from = con.from.toLowerCase()
1902
- //改造,绑定值,表单列表查询字段绑定对话框时,新增的绑定字段选项
1903
- const bindValueField = con.bindValue && con.bindValue.toLowerCase()
1859
+ var val = ''
1860
+ var from = con.from.toLowerCase()
1904
1861
  str.forEach((item) => {
1905
1862
  // 如果有绑定url跳转参数 需获取跳转参数的key
1906
1863
  if (item) {
@@ -1928,10 +1885,6 @@
1928
1885
  )}¯${jumpParamKey}:${decodeURIComponent(item[returnMapKey])},`
1929
1886
  } else {
1930
1887
  val += decodeURIComponent(item[from]) + ','
1931
- //绑定字段处理
1932
- if (bindValueField) {
1933
- bindValue += decodeURIComponent(item[bindValueField]) + ','
1934
- }
1935
1888
  }
1936
1889
  }
1937
1890
  })
@@ -1947,28 +1900,13 @@
1947
1900
  this.modelName &&
1948
1901
  this.modelName.startsWith('searchForm.')
1949
1902
  ) {
1950
- const currentValue = val.substring(0, val.length - 1)
1951
- if (this.modelName && this.modelName.endsWith(con['target'][0])) {
1952
- this.$emit('updateInput', currentValue);
1953
- }
1954
1903
  let prePath = pInst['searchForm'] ? '' : 'data.'
1955
- utils.setValueByPath(pInst, prePath + 'searchForm.' + con['target'][0], currentValue, thisIndex)
1956
- //绑定字段值处理,bindValue: {target: {id: xxx}}, bindKey: {target: id }
1957
- if (bindValue && bindValueField) {
1958
- const bindValueObj = {}
1959
- //显示value对象
1960
- bindValueObj[bindValueField] = bindValue.substring(0, bindValue.length - 1)
1961
-
1962
- const anInst = pInst['searchForm'] ? pInst['searchForm'] : pInst.data.searchForm
1963
- //若bindKey不存在,则默认空对象,若存在,则取出bindKey
1964
- anInst.bindKey = anInst.bindKey || {}
1965
- //格式 {target: id }
1966
- anInst.bindKey[con['target'][0]] = bindValueField
1967
- //若bindValue不存在,则默认空对象,若存在,则取出bindValue
1968
- anInst.bindValue = anInst.bindValue || {}
1969
- //格式 {target: {id: xxx}}
1970
- anInst.bindValue[con['target'][0]] = bindValueObj
1971
- }
1904
+ utils.setValueByPath(
1905
+ pInst,
1906
+ prePath + 'searchForm.' + con['target'][0],
1907
+ val.substring(0, val.length - 1),
1908
+ thisIndex
1909
+ )
1972
1910
  } else {
1973
1911
  let configAttr = con['target'][0].split('.')
1974
1912
  let path = con['target'][0]
@@ -33,7 +33,7 @@
33
33
  </template>
34
34
  <script>
35
35
  import permission from '@/mixins/permission.js'
36
- export default {
36
+ export default {
37
37
  name: 'HtDataLists',
38
38
  mixins: [permission],
39
39
  props: {
@@ -56,6 +56,7 @@
56
56
  watch: {
57
57
  options: {
58
58
  handler(val) {
59
+ debugger
59
60
  if (val) {
60
61
  this.tabPaneList = JSON.parse(val)
61
62
  this.activeName = this.tabPaneList[0].dataTemplateKey
@@ -113,4 +114,4 @@
113
114
  margin-top: 24px;
114
115
  }
115
116
  }
116
- </style>
117
+ </style>
@@ -163,46 +163,4 @@ export default {
163
163
  font-weight: bold;
164
164
  color: #f56c6c;
165
165
  }
166
- ::v-deep .page-btn-count {
167
- margin: 0 24px;
168
- float: left;
169
- padding: 10px 0;
170
- }
171
- ::v-deep .page-btn-total {
172
- margin: 5px 0px;
173
- float: left;
174
- padding: 11px 0px;
175
- color: #606266;
176
- font-weight: normal;
177
- font-size: 13px;
178
- }
179
- ::v-deep .pagination {
180
- display: flex;
181
- justify-content: flex-end;
182
- padding: 10px 0;
183
- float: right;
184
- .el-select {
185
- width: 100px;
186
- }
187
- .page-btn {
188
- margin: 0 24px;
189
- }
190
- .target-page {
191
- display: flex;
192
- align-items: center;
193
- color: #606266;
194
- font-weight: normal;
195
- font-size: 13px;
196
- .el-input {
197
- width: 50px;
198
- margin: 0 3px;
199
- }
200
- //::v-deep input::-webkit-outer-spin-button, ::v-deep input::-webkit-inner-spin-button {
201
- // -webkit-appearance: none !important;
202
- //}
203
- //::v-deep input[type='number'] {
204
- // -moz-appearnce: textfield !important
205
- //}
206
- }
207
- }
208
- </style>
166
+ </style>
@@ -231,9 +231,9 @@
231
231
  SubPagination._map.set(instKey, pInst)
232
232
  }
233
233
  },
234
- // destroyed() {
235
- // SubPagination.clear(this.dataSubname, this)
236
- // },
234
+ destroyed() {
235
+ SubPagination.clear(this.dataSubname, this)
236
+ },
237
237
  methods: {
238
238
  transformFieldData(data) {
239
239
  return new Promise(async (resolve) => {
@@ -106,9 +106,9 @@
106
106
  mounted() {
107
107
  this.paginationChange()
108
108
  },
109
- // destroyed() {
110
- // SubPagination.clear(this.dataSubname, this)
111
- // },
109
+ destroyed() {
110
+ SubPagination.clear(this.dataSubname, this)
111
+ },
112
112
  methods: {
113
113
  paginationChange() {
114
114
  // 分页变化时,以dataPath为key设置到公共的js对象中
@@ -15,7 +15,6 @@
15
15
  :class="{ 'is-align-right': isAlignRight }"
16
16
  >
17
17
  <label v-if="label" v-ellipsis :title="label" class="search-field-label">
18
- <span v-if="isRequired" class="red-color">*</span>
19
18
  {{ label }}
20
19
  </label>
21
20
  </div>
@@ -168,7 +167,6 @@
168
167
  type: Boolean,
169
168
  default: false,
170
169
  },
171
- isRequired: Boolean,
172
170
  },
173
171
  data() {
174
172
  return {
@@ -319,9 +317,6 @@
319
317
  display: inline-block;
320
318
  max-width: calc(100% - 10px);
321
319
  line-height: 100%;
322
- .red-color {
323
- color: #f56c6c;
324
- }
325
320
 
326
321
  &::after {
327
322
  content: ':';
@@ -223,49 +223,6 @@
223
223
  margin: 0;
224
224
  padding: 0;
225
225
  }
226
- ::v-deep .page-btn-count {
227
- margin: 0 24px;
228
- float: left;
229
- padding: 10px 0;
230
- }
231
- ::v-deep .page-btn-total {
232
- margin: 5px 0px;
233
- float: left;
234
- padding: 11px 0px;
235
- color: #606266;
236
- font-weight: normal;
237
- font-size: 13px;
238
- }
239
- ::v-deep .pagination {
240
- display: flex;
241
- justify-content: flex-end;
242
- padding: 10px 0;
243
- float: right;
244
- .el-select {
245
- width: 100px;
246
- }
247
- .page-btn {
248
- margin: 0 24px;
249
- }
250
-
251
- .target-page {
252
- display: flex;
253
- align-items: center;
254
- color: #606266;
255
- font-weight: normal;
256
- font-size: 13px;
257
- .el-input {
258
- width: 50px;
259
- margin: 0 3px;
260
- }
261
- //::v-deep input::-webkit-outer-spin-button, ::v-deep input::-webkit-inner-spin-button {
262
- // -webkit-appearance: none !important;
263
- //}
264
- //::v-deep input[type='number'] {
265
- // -moz-appearnce: textfield !important
266
- //}
267
- }
268
- }
269
226
  </style>
270
227
  <style lang="scss">
271
228
  .template-dropdown {