cloud-web-corejs 1.0.54-dev.7 → 1.0.54-dev.8
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 +1 -1
- package/src/components/excelExport/exportFieldDialog.vue +51 -11
- package/src/components/excelExport/index.js +27 -1
- package/src/components/excelExport/index.vue +1 -0
- package/src/components/excelExport/mixins.js +709 -1
- package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -1
- package/src/views/bd/setting/bd_attach_setting/edit.vue +1 -1
- package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +1 -1
- package/src/views/user/user/list.vue +15 -8
package/package.json
CHANGED
@@ -23,9 +23,10 @@
|
|
23
23
|
:expand-on-click-node="true"
|
24
24
|
class="organization-tree"
|
25
25
|
icon-class="el-icon-arrow-right"
|
26
|
+
:default-checked-keys="defaultCheckedKeys"
|
26
27
|
></el-tree>
|
27
28
|
</div>
|
28
|
-
|
29
|
+
<span slot="footer" class="dialog-footer">
|
29
30
|
<el-button type="primary" plain class="button-sty" @click="dialogClose">
|
30
31
|
<i class="el-icon-close el-icon"></i>
|
31
32
|
取 消
|
@@ -40,34 +41,73 @@
|
|
40
41
|
<script>
|
41
42
|
export default {
|
42
43
|
name: "exportFieldDialog",
|
43
|
-
|
44
|
-
data(){
|
44
|
+
props: ['param'],
|
45
|
+
data() {
|
45
46
|
return {
|
46
|
-
showDialog:true,
|
47
|
-
data:[],
|
47
|
+
showDialog: true,
|
48
|
+
data: [],
|
48
49
|
defaultProps: {
|
49
50
|
label: 'title', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
|
50
51
|
children: 'children'
|
51
52
|
},
|
53
|
+
defaultCheckedKeys: []
|
52
54
|
}
|
53
55
|
},
|
54
|
-
|
55
|
-
init()
|
56
|
-
|
56
|
+
created() {
|
57
|
+
this.init();
|
58
|
+
},
|
59
|
+
methods: {
|
60
|
+
init() {
|
61
|
+
let target = this.getGrid();
|
62
|
+
let {fullColumn:columns} = target.getTableColumn();
|
63
|
+
let defaultCheckedKeys = []
|
64
|
+
let cols = [];
|
65
|
+
columns.forEach(column => {
|
66
|
+
if (column.title) {
|
67
|
+
cols.push(column);
|
68
|
+
if (column.visible) {
|
69
|
+
defaultCheckedKeys.push(column.id)
|
70
|
+
}
|
71
|
+
}
|
72
|
+
});
|
73
|
+
this.defaultCheckedKeys = defaultCheckedKeys;
|
74
|
+
this.data = this.$baseLodash.cloneDeep(cols);
|
57
75
|
},
|
58
|
-
dialogClose(){
|
76
|
+
dialogClose() {
|
59
77
|
this.showDialog = false;
|
60
78
|
this.$emit('update:visiable', false);
|
61
79
|
},
|
62
|
-
dialogConfirm(){
|
80
|
+
dialogConfirm() {
|
63
81
|
this.dialogClose();
|
82
|
+
},
|
83
|
+
getExportTitleJson() {
|
84
|
+
let target = this.getGrid();
|
85
|
+
let columns = target.getColumns();
|
86
|
+
debugger
|
87
|
+
let cols = [];
|
88
|
+
columns.forEach(column => {
|
89
|
+
if (column.title && column.visible) {
|
90
|
+
cols.push(column);
|
91
|
+
}
|
92
|
+
});
|
93
|
+
return cols;
|
94
|
+
},
|
95
|
+
getGrid() {
|
96
|
+
let that = this.param.vue;
|
97
|
+
let tableRef = this.param.targetRef;
|
98
|
+
let $grid;
|
99
|
+
if (Array.isArray(that.$refs[tableRef])) {
|
100
|
+
$grid = that.$refs[tableRef][0];
|
101
|
+
} else {
|
102
|
+
$grid = that.$refs[tableRef];
|
103
|
+
}
|
104
|
+
return $grid;
|
64
105
|
}
|
65
106
|
}
|
66
107
|
}
|
67
108
|
</script>
|
68
109
|
|
69
110
|
|
70
|
-
|
71
111
|
<style scoped>
|
72
112
|
|
73
113
|
</style>
|
@@ -1,5 +1,31 @@
|
|
1
1
|
import vue from "vue"
|
2
2
|
import excelExport from './index.vue'
|
3
3
|
const moudule = {};
|
4
|
-
|
4
|
+
const ExcelExportInstance = vue.extend(excelExport);
|
5
|
+
const initInstance = (containter) => {
|
6
|
+
// 实例化vue实例
|
7
|
+
let currentInstance = new ExcelExportInstance({i18n: window.$vueRoot._i18n});
|
8
|
+
let dom = currentInstance.$mount().$el;
|
9
|
+
containter.appendChild(dom);
|
10
|
+
return currentInstance;
|
11
|
+
};
|
12
|
+
|
13
|
+
function toDo(options) {
|
14
|
+
// let containter = this && this.$el ? this.$el : document.body;
|
15
|
+
let containter = document.body;
|
16
|
+
let vueTarget = this && this.$el ? this : window.$vueRoot;
|
17
|
+
let currentInstance = initInstance(containter);
|
18
|
+
currentInstance.param = {};
|
19
|
+
Object.assign(currentInstance.param, {vue: vueTarget}, options);
|
20
|
+
return currentInstance.exc();
|
21
|
+
};
|
22
|
+
|
23
|
+
|
24
|
+
// vue的install方法,用于定义vue插件
|
25
|
+
moudule.install = function (Vue) {
|
26
|
+
// 在Vue的原型上添加实例方法,以全局调用
|
27
|
+
Vue.prototype.$excelExport = toDo;
|
28
|
+
};
|
29
|
+
moudule.excelExport = toDo;
|
30
|
+
|
5
31
|
export default moudule;
|