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

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.274",
4
+ "version": "1.0.54-dev.275",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -1,48 +1,48 @@
1
- import vue from "vue"
2
- import excelExport from './index.vue'
3
-
4
- const moudule = {};
5
- const ExcelExportInstance = vue.extend(excelExport);
6
- let instance = null;
7
- const initInstance = (containter) => {
8
- // 实例化vue实例
9
- instance = new ExcelExportInstance({i18n: window.$vueRoot._i18n}).$mount();
10
- let dom = instance.$el;
11
- containter.appendChild(dom);
12
- return instance;
13
- };
14
-
15
- function toDo(options) {
16
- // let containter = this && this.$el ? this.$el : document.body;
17
- // let containter = document.body;
18
- let containter = this && this.$el ? this.$el : document.body;
19
-
20
- let vueTarget = this && this.$el ? this : window.$vueRoot;
21
- let currentInstance = initInstance(containter);
22
- currentInstance.param = {};
23
- Object.assign(currentInstance.param, {vue: vueTarget, destroyComponent: destroyComponent}, options);
24
- return currentInstance.exc(destroyComponent);
25
- };
26
-
27
- function destroyComponent(loadingObj) {
28
- if (instance) {
29
- setTimeout(()=>{
30
- instance.$destroy(); // 触发销毁生命周期
31
- instance.$el.remove(); // 移除 DOM 节点
32
- instance = null;
33
- setTimeout(function (){
34
- loadingObj.close()
35
- },200)
36
- },0)
37
- }
38
- }
39
-
40
-
41
- // vue的install方法,用于定义vue插件
42
- moudule.install = function (Vue) {
43
- // 在Vue的原型上添加实例方法,以全局调用
44
- Vue.prototype.$excelExport = toDo;
45
- };
46
- moudule.excelExport = toDo;
47
-
48
- export default moudule;
1
+ import vue from "vue"
2
+ import excelExport from './index.vue'
3
+
4
+ const moudule = {};
5
+ const ExcelExportInstance = vue.extend(excelExport);
6
+ let instance = null;
7
+ const initInstance = (containter) => {
8
+ // 实例化vue实例
9
+ instance = new ExcelExportInstance({i18n: window.$vueRoot._i18n}).$mount();
10
+ let dom = instance.$el;
11
+ containter.appendChild(dom);
12
+ return instance;
13
+ };
14
+
15
+ function toDo(options) {
16
+ // let containter = this && this.$el ? this.$el : document.body;
17
+ // let containter = document.body;
18
+ let containter = this && this.$el ? this.$el : document.body;
19
+
20
+ let vueTarget = this && this.$el ? this : window.$vueRoot;
21
+ let currentInstance = initInstance(containter);
22
+ currentInstance.param = {};
23
+ Object.assign(currentInstance.param, {vue: vueTarget, destroyComponent: destroyComponent}, options);
24
+ return currentInstance.exc(destroyComponent);
25
+ };
26
+
27
+ function destroyComponent(loadingObj) {
28
+ if (instance) {
29
+ setTimeout(()=>{
30
+ instance.$destroy(); // 触发销毁生命周期
31
+ instance.$el.remove(); // 移除 DOM 节点
32
+ instance = null;
33
+ setTimeout(function (){
34
+ loadingObj.close()
35
+ },200)
36
+ },0)
37
+ }
38
+ }
39
+
40
+
41
+ // vue的install方法,用于定义vue插件
42
+ moudule.install = function (Vue) {
43
+ // 在Vue的原型上添加实例方法,以全局调用
44
+ Vue.prototype.$excelExport = toDo;
45
+ };
46
+ moudule.excelExport = toDo;
47
+
48
+ export default moudule;
@@ -124,7 +124,6 @@ function getGrid(that, tableRef) {
124
124
  return;
125
125
  }
126
126
  }
127
- this.lockMenu()
128
127
 
129
128
  this.isMinimize = false;
130
129
  this.showExportFieldDialog = true;
@@ -158,6 +157,7 @@ function getGrid(that, tableRef) {
158
157
  this.clearExportTimer();
159
158
  },
160
159
  startProcess() {
160
+ this.lockMenu();
161
161
  this.createCountTimer();
162
162
  this.tableTarget = getGrid(this.option.vue, this.option.targetRef);
163
163
 
@@ -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",