cloud-web-corejs 1.0.54-dev.338 → 1.0.54-dev.339

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,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.338",
4
+ "version": "1.0.54-dev.339",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -1,23 +1,35 @@
1
1
  <template>
2
- <static-content-wrapper :designer="designer" :field="field" :design-state="designState"
3
- :display-style="field.options.displayStyle"
4
- :parent-widget="parentWidget" :parent-list="parentList"
5
- :index-of-parent-list="indexOfParentList"
6
- :sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex"
7
- :sub-form-row-id="subFormRowId">
8
- <vxe-grid ref="table-m1" :data="oplogDTOs" v-bind="m1Option" @resizable-change="$vxeTableUtil.onColumnWitchChange" @custom="$vxeTableUtil.customHandle"></vxe-grid>
2
+ <static-content-wrapper
3
+ :designer="designer"
4
+ :field="field"
5
+ :design-state="designState"
6
+ :display-style="field.options.displayStyle"
7
+ :parent-widget="parentWidget"
8
+ :parent-list="parentList"
9
+ :index-of-parent-list="indexOfParentList"
10
+ :sub-form-row-index="subFormRowIndex"
11
+ :sub-form-col-index="subFormColIndex"
12
+ :sub-form-row-id="subFormRowId"
13
+ >
14
+ <vxe-grid
15
+ ref="table-m1"
16
+ :data="oplogDTOs"
17
+ v-bind="m1Option"
18
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
19
+ @custom="$vxeTableUtil.customHandle"
20
+ ></vxe-grid>
9
21
  </static-content-wrapper>
10
22
  </template>
11
23
 
12
24
  <script>
13
- import StaticContentWrapper from './static-content-wrapper'
14
- import emitter from '../../../utils/emitter'
25
+ import StaticContentWrapper from "./static-content-wrapper";
26
+ import emitter from "../../../utils/emitter";
15
27
  import i18n from "../../../utils/i18n";
16
28
  import fieldMixin from "./fieldMixin";
17
29
 
18
30
  export default {
19
31
  name: "oplog-widget",
20
- componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
32
+ componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
21
33
  mixins: [emitter, fieldMixin, i18n],
22
34
  props: {
23
35
  field: Object,
@@ -28,106 +40,108 @@ export default {
28
40
 
29
41
  designState: {
30
42
  type: Boolean,
31
- default: false
43
+ default: false,
32
44
  },
33
45
 
34
- subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
35
- type: Number,
36
- default: -1
46
+ subFormRowIndex: {
47
+ /* 子表单组件行索引,从0开始计数 */ type: Number,
48
+ default: -1,
37
49
  },
38
- subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
39
- type: Number,
40
- default: -1
50
+ subFormColIndex: {
51
+ /* 子表单组件列索引,从0开始计数 */ type: Number,
52
+ default: -1,
41
53
  },
42
- subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
43
- type: String,
44
- default: ''
54
+ subFormRowId: {
55
+ /* 子表单组件行Id,唯一id且不可变 */ type: String,
56
+ default: "",
45
57
  },
46
-
47
58
  },
48
59
  components: {
49
60
  StaticContentWrapper,
50
61
  },
51
62
  computed: {
52
- showLabel(){
53
- return this.field.options.labelHidden? null: this.label;
63
+ showLabel() {
64
+ return this.field.options.labelHidden ? null : this.label;
54
65
  },
55
66
  label() {
56
- return this.field.options.isFormLabel ? this.currentValue : this.getI18nLabel(this.field.options.label);
67
+ return this.field.options.isFormLabel
68
+ ? this.currentValue
69
+ : this.getI18nLabel(this.field.options.label);
57
70
  },
58
71
  widgetClass() {
59
72
  let list = [];
60
- let optionModel = this.field.options
73
+ let optionModel = this.field.options;
61
74
  if (optionModel.colorClass) list.push(optionModel.colorClass);
62
- if (optionModel.underline) list.push('underLine');
63
- if (optionModel.disabled) list.push('is-disabled');
64
- return list
65
- }
75
+ if (optionModel.underline) list.push("underLine");
76
+ if (optionModel.disabled) list.push("is-disabled");
77
+ return list;
78
+ },
66
79
  },
67
80
  beforeCreate() {
68
81
  /* 这里不能访问方法和属性!! */
69
82
  },
70
- data(){
83
+ data() {
71
84
  return {
72
- m1Option:{},
73
- oplogDTOs:[]
74
- }
85
+ m1Option: {},
86
+ oplogDTOs: [],
87
+ };
75
88
  },
76
89
 
77
90
  created() {
78
91
  /* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
79
92
  需要在父组件created中初始化!! */
80
- this.registerToRefList()
81
- this.initEventHandler()
93
+ this.registerToRefList();
94
+ this.initEventHandler();
82
95
 
83
- this.handleOnCreated()
96
+ this.handleOnCreated();
84
97
  },
85
98
 
86
99
  mounted() {
87
- this.handleOnMounted()
100
+ this.handleOnMounted();
88
101
  this.initOplogDTOs();
89
102
  },
90
103
 
91
104
  beforeDestroy() {
92
- this.unregisterFromRefList()
105
+ this.unregisterFromRefList();
93
106
  },
94
107
 
95
108
  methods: {
96
109
  initOplogDTOs() {
97
110
  const tableOption = {
98
111
  vue: this,
99
- tableRef: 'table-m1',
100
- tableName: 'xform-oplog-oplogList-m1Grid',
101
- columns: [{
102
- type: 'checkbox',
103
- fixed: 'left',
104
- width: 48,
105
- resizable: false
106
- },
112
+ tableRef: "table-m1",
113
+ tableName: "xform-oplog-oplogList-m1Grid",
114
+ columns: [
107
115
  {
108
- title: this.$t2('操作时间', 'components.oplogTable.createDate'),
109
- field: 'createDate',
110
- width: 150
116
+ type: "checkbox",
117
+ fixed: "left",
118
+ width: 48,
119
+ resizable: false,
111
120
  },
112
121
  {
113
- title: this.$t2('操作人员', 'components.oplogTable.createBy'),
114
- field: '_createBy',
115
- width: 150
122
+ title: this.$t2("操作时间", "components.oplogTable.createDate"),
123
+ field: "create_date",
124
+ width: 150,
116
125
  },
117
126
  {
118
- title: this.$t2('操作日志', 'components.oplogTable.content'),
119
- field: 'content',
120
- width: 150
127
+ title: this.$t2("操作人员", "components.oplogTable.createBy"),
128
+ field: "_createBy",
129
+ width: 150,
130
+ },
131
+ {
132
+ title: this.$t2("操作日志", "components.oplogTable.content"),
133
+ field: "content",
134
+ width: 250,
121
135
  },
122
136
  {
123
137
  width: 47,
124
- fixed: 'right',
125
- title: '',
126
- sortable: false
127
- }
128
- ]
138
+ fixed: "right",
139
+ title: "",
140
+ sortable: false,
141
+ },
142
+ ],
129
143
  };
130
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
144
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
131
145
  this.m1Option = opts;
132
146
  });
133
147
  this.initData();
@@ -140,7 +154,7 @@ export default {
140
154
  let oplogBusinessKey = this.field.options.oplogBusinessKey || "id";
141
155
  if (!scriptCode) return;
142
156
  let business_code = this.formModel[oplogBusinessKey];
143
- if(!business_code) return;
157
+ if (!business_code) return;
144
158
  this.formHttp({
145
159
  scriptCode: scriptCode,
146
160
  data: {
@@ -148,18 +162,19 @@ export default {
148
162
  formVersion: reportTemplate.formVersion,
149
163
  data: {
150
164
  log_type: oplogTypeCode,
151
- business_code: business_code
152
- }
165
+ business_code: business_code,
166
+ },
153
167
  },
154
- callback: res => {
168
+ addCreateInfo: true,
169
+ queryCreateInfo: true,
170
+ callback: (res) => {
155
171
  let rows = res.objx || [];
156
172
  this.oplogDTOs = rows;
157
- }
173
+ },
158
174
  });
159
175
  },
160
- }
161
-
162
- }
176
+ },
177
+ };
163
178
  </script>
164
179
 
165
180
  <style lang="scss" scoped>
@@ -167,5 +182,4 @@ export default {
167
182
  a.is-disabled {
168
183
  cursor: not-allowed;
169
184
  }
170
-
171
185
  </style>