t20-common-lib 0.15.20 → 0.15.22

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": "t20-common-lib",
3
- "version": "0.15.20",
3
+ "version": "0.15.22",
4
4
  "description": "T20",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -18,7 +18,7 @@ export const fileUploadTableMixin = {
18
18
  data() {
19
19
  return {
20
20
  fileUploadTableData: [],
21
- fileAction: () => {},
21
+ fileAction: '/api/neams/eamsbaserecord/save',
22
22
  seeTypes: /\.(jpg|png|gif|svg|pdf|swf|xlsx|xls|docx|doc)$/i,
23
23
  dataPorp: {
24
24
  fileAccept: '.rar,.zip,.doc,.docx,.pdf,image/*,.xls,.xlsx',
@@ -93,15 +93,16 @@ export const fileUploadTableMixin = {
93
93
  const { file } = options
94
94
  const data = new FormData()
95
95
  data.append('file', file)
96
+ const uploadParam = this.uploadParam || {}
96
97
  data.append(
97
98
  'data',
98
99
  JSON.stringify({
99
- syscode: this.uploadParam.syscode,
100
- appno: this.uploadParam.appno,
100
+ syscode: uploadParam.syscode,
101
+ appno: uploadParam.appno,
101
102
  bussValue: this.mapdata[row.type],
102
103
  attno: row.type,
103
104
  bussId:
104
- this.uploadParam && this.uploadParam.paymentTemplate === 'REQUEST_PAYOUT' ? '' : this.uploadParam.bussId,
105
+ uploadParam && uploadParam.paymentTemplate === 'REQUEST_PAYOUT' ? '' : uploadParam.bussId,
105
106
  cltno: JSON.parse(sessionStorage.getItem('userInfo') || '{}').cltNo,
106
107
  memo: file.name,
107
108
  recordname: file.name,
@@ -58,7 +58,7 @@ export default {
58
58
  watch: {},
59
59
  methods: {
60
60
  changeFn(val) {
61
- this.$emit('change', val)
61
+ this.$emit('change')
62
62
  }
63
63
  }
64
64
  }
@@ -51,9 +51,7 @@ export default {
51
51
  return "";
52
52
  },
53
53
  set(val) {
54
- const nextValue = `${val},${this._value2 || this._value2===0?this._value2 : ''}`;
55
- this.$emit("input", nextValue);
56
- this.$emit("change", nextValue);
54
+ this.$emit("input", `${val},${this._value2 || this._value2===0?this._value2 : ''}`);
57
55
  },
58
56
  },
59
57
  _value2: {
@@ -64,9 +62,7 @@ export default {
64
62
  return "";
65
63
  },
66
64
  set(val) {
67
- const nextValue = `${this._value1},${val || val===0?val : ''}`;
68
- this.$emit("input", nextValue);
69
- this.$emit("change", nextValue);
65
+ this.$emit("input", `${this._value1},${val || val===0?val : ''}`);
70
66
  },
71
67
  },
72
68
  },
@@ -51,7 +51,6 @@ export default {
51
51
  set(value) {
52
52
  this.changeTime(value);
53
53
  this.$emit("input", value || []);
54
- this.$emit("change", value || []);
55
54
  },
56
55
  },
57
56
  },
@@ -79,9 +79,7 @@ export default {
79
79
  return "";
80
80
  },
81
81
  set(val) {
82
- const nextValue = `${val}${this.value2}`;
83
- this.$emit("input", nextValue);
84
- this.$emit("change", nextValue);
82
+ this.$emit("input", `${val}${this.value2}`);
85
83
  },
86
84
  },
87
85
  value2: {
@@ -94,9 +92,7 @@ export default {
94
92
  return "D";
95
93
  },
96
94
  set(val) {
97
- const nextValue = `${this.value1}${val}`;
98
- this.$emit("input", nextValue);
99
- this.$emit("change", nextValue);
95
+ this.$emit("input", `${this.value1}${val}`);
100
96
  },
101
97
  },
102
98
  },
@@ -30,7 +30,6 @@ export default {
30
30
  },
31
31
  set(value) {
32
32
  this.$emit("input", value);
33
- this.$emit("change", value);
34
33
  },
35
34
  },
36
35
  },
@@ -38,7 +38,6 @@ export default {
38
38
  methods: {
39
39
  changeTime(val) {
40
40
  this.$emit("input", val ? `${val[0]},${val[1]}` : '');
41
- this.$emit("change", val ? `${val[0]},${val[1]}` : '');
42
41
  },
43
42
  },
44
43
  watch: {
@@ -34,7 +34,6 @@ export default {
34
34
  },
35
35
  set(value) {
36
36
  this.$emit("input", value);
37
- this.$emit("change", value);
38
37
  },
39
38
  },
40
39
  },
@@ -30,7 +30,6 @@ export default {
30
30
  },
31
31
  set(value) {
32
32
  this.$emit("input", value);
33
- this.$emit("change", value);
34
33
  },
35
34
  },
36
35
  _dNum() {
@@ -24,7 +24,6 @@ export default {
24
24
  changeTime() {
25
25
  this.$emit("update:label", this.startValue + "~" + this.endValue);
26
26
  this.$emit("input", [this.startValue, this.endValue]);
27
- this.$emit("change", [this.startValue, this.endValue]);
28
27
  },
29
28
  },
30
29
  watch: {
@@ -41,7 +41,6 @@ export default {
41
41
  let res = (this.items.options || []).find(row => row.value == value)
42
42
  this.$emit(`update:label`, res?.label)
43
43
  this.$emit('input', value)
44
- this.$emit('change', value)
45
44
  }
46
45
  },
47
46
  _options: {
@@ -39,7 +39,6 @@ export default {
39
39
  },
40
40
  set(value) {
41
41
  this.$emit("input", value);
42
- this.$emit("change", value);
43
42
  },
44
43
  },
45
44
  },
@@ -25,7 +25,6 @@ export default {
25
25
  set(value) {
26
26
  this.$emit(`update:label`, value==1? this.$l('是'): this.$l('否'));
27
27
  this.$emit("input", value);
28
- this.$emit("change", value);
29
28
  },
30
29
  },
31
30
  },
@@ -42,7 +42,6 @@ export default {
42
42
  },
43
43
  set(value) {
44
44
  this.$emit("input", value);
45
- this.$emit("change", value);
46
45
  },
47
46
  },
48
47
  },
@@ -78,8 +78,8 @@
78
78
  </N20-anchor-item>
79
79
  </N20-anchor>
80
80
  <div slot="footer">
81
- <el-button type="primary" @click="submit('submit')">{{ $lc('提交') }}</el-button>
82
- <el-button @click="submit('save')">{{ $lc('保存') }}</el-button>
81
+ <el-button type="primary" @click="submit('SUBMIT')">{{ $lc('提交') }}</el-button>
82
+ <el-button @click="submit('SAVE')">{{ $lc('保存') }}</el-button>
83
83
  </div>
84
84
  </T20-Form-Page>
85
85
  </template>
@@ -95,6 +95,7 @@ const context = require.context('./components/', true, /\.vue$/)
95
95
  const demoComponents = {}
96
96
  context.keys().forEach(key => {
97
97
  const component = context(key).default
98
+ if (!component || !component.name) return
98
99
  demoComponents[component.name] = component
99
100
  })
100
101
 
@@ -445,10 +446,10 @@ export default {
445
446
  })
446
447
  },
447
448
  // 第一步仅做模板渲染校验,提交逻辑后续步骤再扩展
448
- async submit() {
449
+ async submit(operate) {
449
450
  const valid = await this.$refs.dynamicForms.validate()
450
451
  if (!valid) return
451
- const payload = { formData: this.formData }
452
+ const payload = { formData: this.formData, operate }
452
453
  if (this.needFile) {
453
454
  payload.fileUploadTableData = (this.fileUploadTableData || []).filter(t => t.beid)
454
455
  }