cloud-web-corejs 1.0.54-dev.274 → 1.0.54-dev.276

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.
@@ -0,0 +1,87 @@
1
+ <template>
2
+ <static-content-wrapper :designer="designer" :field="field" :design-state="designState" :display-style="field.options.displayStyle"
3
+ :parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
4
+ :sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex" :sub-form-row-id="subFormRowId">
5
+ <el-button class="button-sty" @click="clickHandle" icon="el-icon-document-copy" :disabled="!designState &&field.options.disabled">
6
+ {{ getI18nLabel(field.options.label)}}
7
+ </el-button>
8
+ </static-content-wrapper>
9
+ </template>
10
+
11
+ <script>
12
+ import StaticContentWrapper from './static-content-wrapper'
13
+ import emitter from '../../../../../components/xform/utils/emitter'
14
+ import i18n from "../../../../../components/xform/utils/i18n";
15
+ import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
16
+
17
+ export default {
18
+ name: "copy_button-widget",
19
+ componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
20
+ mixins: [emitter, fieldMixin, i18n],
21
+ props: {
22
+ field: Object,
23
+ parentWidget: Object,
24
+ parentList: Array,
25
+ indexOfParentList: Number,
26
+ designer: Object,
27
+
28
+ designState: {
29
+ type: Boolean,
30
+ default: false
31
+ },
32
+
33
+ subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
34
+ type: Number,
35
+ default: -1
36
+ },
37
+ subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
38
+ type: Number,
39
+ default: -1
40
+ },
41
+ subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
42
+ type: String,
43
+ default: ''
44
+ },
45
+
46
+ },
47
+ components: {
48
+ StaticContentWrapper,
49
+ },
50
+ computed: {
51
+
52
+ },
53
+ beforeCreate() {
54
+ /* 这里不能访问方法和属性!! */
55
+ },
56
+
57
+ created() {
58
+ /* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
59
+ 需要在父组件created中初始化!! */
60
+ this.registerToRefList()
61
+ this.initEventHandler()
62
+
63
+ this.handleOnCreated()
64
+ },
65
+
66
+ mounted() {
67
+ this.handleOnMounted()
68
+ },
69
+
70
+ beforeDestroy() {
71
+ this.unregisterFromRefList()
72
+ },
73
+
74
+ methods: {
75
+ clickHandle(){
76
+ if(this.designState || this.field.options.disabled)return
77
+ this.getFormRef().openCopyEditTab();
78
+ }
79
+ }
80
+
81
+ }
82
+ </script>
83
+
84
+ <style lang="scss" scoped>
85
+ @import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
86
+
87
+ </style>
@@ -6,7 +6,7 @@
6
6
  :sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex"
7
7
  :sub-form-row-id="subFormRowId">
8
8
  <el-button class="button-sty" @click="handleButtonWidgetClick" icon="el-icon-search" :disabled="!designState &&field.options.disabled">
9
- {{ field.options.label }}
9
+ {{ getI18nLabel(field.options.label)}}
10
10
  </el-button>
11
11
  </static-content-wrapper>
12
12
  </template>
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <static-content-wrapper
3
+ :designer="designer" :field="field" :design-state="designState"
4
+ :display-style="field.options.displayStyle"
5
+ :parent-widget="parentWidget" :parent-list="parentList"
6
+ :index-of-parent-list="indexOfParentList">
7
+ <el-button :type="field.options.type" class="button-sty" size="mini" icon="el-icon-upload2" @click="toDo('selected')"
8
+ :disabled="field.options.disabled">{{ getI18nLabel(field.options.label)}}
9
+ </el-button>
10
+ </static-content-wrapper>
11
+
12
+ </template>
13
+ <script>
14
+ import emitter from '../../../../../components/xform/utils/emitter'
15
+ import i18n from "../../../../../components/xform/utils/i18n";
16
+ import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
17
+ import StaticContentWrapper
18
+ from "../../../../../components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue";
19
+
20
+ export default {
21
+ name: 'select-export-button-widget',
22
+ components: {StaticContentWrapper},
23
+ componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
24
+ mixins: [emitter, fieldMixin, i18n],
25
+ props: {
26
+ field: Object,
27
+ parentWidget: Object,
28
+ parentList: Array,
29
+ indexOfParentList: Number,
30
+ designer: Object,
31
+ designState: {
32
+ type: Boolean,
33
+ default: false
34
+ }
35
+ },
36
+ data() {
37
+ return {}
38
+ },
39
+ beforeCreate() {
40
+ /* 这里不能访问方法和属性!! */
41
+ },
42
+
43
+ created() {
44
+ /* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
45
+ 需要在父组件created中初始化!! */
46
+ this.registerToRefList()
47
+ this.initEventHandler()
48
+
49
+ this.handleOnCreated()
50
+ },
51
+
52
+ mounted() {
53
+ this.handleOnMounted()
54
+ },
55
+
56
+ beforeDestroy() {
57
+ this.unregisterFromRefList()
58
+ },
59
+
60
+ methods: {
61
+ toDo(type = null) {
62
+ if (this.designState) {
63
+ return
64
+ }
65
+ let opt = {
66
+ title: this.field.options.exportFileName || null,
67
+ targetRef: this.field.options.tableRef || null,
68
+ pageSize: (this.field.options.exportPageSize || null),
69
+ showImageAtTable: this.field.options.showImageAtTable || null
70
+ };
71
+ let tableExportParam = this.handleCustomEvent(this.field.options.tableExportParam);
72
+ let options = {...opt, ...tableExportParam, type: type};
73
+ let tableRef = options?.targetRef;
74
+ delete options.targetRef
75
+ let tableWidget = this.getWidgetRef(tableRef);
76
+ tableWidget.exportData(options)
77
+ }
78
+ }
79
+
80
+ }
81
+ </script>
82
+
83
+ <style lang="scss" scoped>
84
+ @import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
85
+
86
+ </style>
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <div>
3
+ <el-form-item label-width="0">
4
+ <el-divider class="custom-divider">明细导出设置</el-divider>
5
+ </el-form-item>
6
+ <el-form-item label="导出文件名称">
7
+ <el-input v-model="optionModel.exportFileName"></el-input>
8
+ </el-form-item>
9
+ <el-form-item label="表格唯一名称">
10
+ <el-input v-model="optionModel.tableRef"></el-input>
11
+ </el-form-item>
12
+ <el-form-item label="导出列表显示图片">
13
+ <el-switch v-model="optionModel.showImageAtTable" @change="changeShowImageAtTable"></el-switch>
14
+ </el-form-item>
15
+ <!-- <el-form-item label="导出参数" label-width="150px">
16
+ <a href="javascript:void(0);" class="a-link link-oneLind"
17
+ @click="editEventHandler('tableExportParam', eventParams)">
18
+ <span>{{ optionModel.tableExportParam }}</span>
19
+ <i class="el-icon-edit"></i>
20
+ </a>
21
+ </el-form-item> -->
22
+ </div>
23
+ </template>
24
+
25
+ <script>
26
+ import i18n from "../../../../utils/i18n";
27
+ import eventMixin
28
+ from "../event-handler/eventMixin";
29
+
30
+ export default {
31
+ name: "select-export-button-editor",
32
+ mixins: [i18n, eventMixin],
33
+ props: {
34
+ designer: Object,
35
+ selectedWidget: Object,
36
+ optionModel: Object,
37
+ },
38
+ data() {
39
+ return {
40
+ eventParams: [],
41
+ };
42
+ },
43
+ methods: {
44
+ changeShowImageAtTable(val) {
45
+ if (val) {
46
+ let exportPageSize = this.optionModel.exportPageSize || 0;
47
+ if (exportPageSize > 150) {
48
+ this.optionModel.exportPageSize = 150
49
+ }
50
+ }
51
+ }
52
+ }
53
+ };
54
+ </script>
55
+
56
+ <style scoped></style>
@@ -143,7 +143,8 @@ const COMMON_PROPERTIES = {
143
143
  treeDataEdit: "treeData-editor",
144
144
  treePane: "tree-pane-editor",
145
145
 
146
- tableExportParam: "table-export-button-editor",
146
+ tableExportFlag: "table-export-button-editor",
147
+ selectExportFlag: "select-export-button-editor",
147
148
  importEntity: "import-button-editor",
148
149
  frontImportFlag: "import2-button-editor",
149
150
  printTableRef: "print-button-editor",