hbte-saas-ui 0.0.2 → 1.0.0
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 +8 -2
- package/.browserslistrc +0 -3
- package/.editorconfig +0 -7
- package/.env.development +0 -1
- package/.env.lib +0 -1
- package/.eslintrc.js +0 -14
- package/.prettierrc +0 -3
- package/babel.config.js +0 -3
- package/docs/.vuepress/config.js +0 -23
- package/docs/.vuepress/styles/index.styl +0 -4
- package/docs/AdvQuery.md +0 -26
- package/docs/CustomQuery.md +0 -21
- package/docs/EditArea.md +0 -16
- package/docs/FilterDrop.md +0 -29
- package/docs/FullTable.md +0 -68
- package/docs/Pagination.md +0 -22
- package/docs/QueryForm.md +0 -27
- package/docs/README.md +0 -17
- package/docs/Table.md +0 -58
- package/docs/ToolGroup.md +0 -32
- package/examples/App.vue +0 -97
- package/examples/image/hb-image-viewer/3k.jpg +0 -0
- package/examples/image/hb-image-viewer/a.jpg +0 -0
- package/examples/image/hb-image-viewer/b.jpg +0 -0
- package/examples/main.js +0 -39
- package/examples/mock/authority.js +0 -1108
- package/examples/mock/dept.js +0 -4001
- package/examples/mock/fulltable.js +0 -407
- package/examples/mock/organizeData.js +0 -18965
- package/examples/router/index.js +0 -111
- package/examples/views/ElementCpTest.vue +0 -299
- package/examples/views/Fragment.vue +0 -196
- package/examples/views/HBAdvQuery.vue +0 -150
- package/examples/views/HBAuthority.vue +0 -339
- package/examples/views/HBDialog.vue +0 -39
- package/examples/views/HBEditarea.vue +0 -350
- package/examples/views/HBFilterDrop.vue +0 -72
- package/examples/views/HBFloatFooter.vue +0 -42
- package/examples/views/HBFullTable.vue +0 -751
- package/examples/views/HBImageViewer.vue +0 -57
- package/examples/views/HBNavMenu.vue +0 -37
- package/examples/views/HBOrganizeDialog.vue +0 -133
- package/examples/views/HBPagination.vue +0 -80
- package/examples/views/HBSelectVague.vue +0 -57
- package/examples/views/HBToolgroup.vue +0 -29
- package/examples/views/HBTopBar.vue +0 -16
- package/packages/adv-query/index.js +0 -5
- package/packages/adv-query/src/main.vue +0 -294
- package/packages/area-select/index.js +0 -7
- package/packages/area-select/src/main.vue +0 -37
- package/packages/authority/index.js +0 -5
- package/packages/authority/src/main.vue +0 -606
- package/packages/config.js +0 -3
- package/packages/custom-query/index.js +0 -5
- package/packages/custom-query/src/main.vue +0 -80
- package/packages/dialog/index.js +0 -7
- package/packages/dialog/src/main.vue +0 -176
- package/packages/edit-area/index.js +0 -13
- package/packages/edit-area/src/config.js +0 -3
- package/packages/edit-area/src/main.vue +0 -304
- package/packages/edit-area/src/simulateEvent.js +0 -219
- package/packages/filter-drop/index.js +0 -6
- package/packages/filter-drop/src/main.vue +0 -107
- package/packages/float-footer/index.js +0 -7
- package/packages/float-footer/src/main.vue +0 -40
- package/packages/fragment/index.js +0 -7
- package/packages/fragment/src/main.vue +0 -74
- package/packages/fragment/src/old.vue +0 -144
- package/packages/full-table/index.js +0 -6
- package/packages/full-table/src/config.js +0 -14
- package/packages/full-table/src/main.vue +0 -141
- package/packages/image-viewer/index.js +0 -8
- package/packages/image-viewer/src/main.js +0 -14
- package/packages/image-viewer/src/main.vue +0 -138
- package/packages/image-viewer/src/svg/cancel.svg +0 -2
- package/packages/image-viewer/src/svg/delete.svg +0 -2
- package/packages/image-viewer/src/svg/download.svg +0 -2
- package/packages/image-viewer/src/svg/rotate.svg +0 -77
- package/packages/image-viewer/src/svg/scaledown.svg +0 -71
- package/packages/image-viewer/src/svg/scaleup.svg +0 -72
- package/packages/index.js +0 -43
- package/packages/nav-menu/index.js +0 -7
- package/packages/nav-menu/src/main.vue +0 -277
- package/packages/organize-dialog/index.js +0 -5
- package/packages/organize-dialog/src/main.vue +0 -427
- package/packages/pagination/index.js +0 -6
- package/packages/pagination/src/main.vue +0 -146
- package/packages/query-form/index.js +0 -5
- package/packages/query-form/src/main.vue +0 -142
- package/packages/select-vague/index.js +0 -5
- package/packages/select-vague/src/main.vue +0 -80
- package/packages/table/index.js +0 -5
- package/packages/table/src/main.vue +0 -265
- package/packages/theme-chalk/adv-query.scss +0 -107
- package/packages/theme-chalk/authority.scss +0 -103
- package/packages/theme-chalk/common/elementCover.scss +0 -722
- package/packages/theme-chalk/common/flex.scss +0 -66
- package/packages/theme-chalk/common/global.scss +0 -147
- package/packages/theme-chalk/common/reset.scss +0 -92
- package/packages/theme-chalk/common/var.scss +0 -46
- package/packages/theme-chalk/custom-query.scss +0 -10
- package/packages/theme-chalk/dialog.scss +0 -9
- package/packages/theme-chalk/edit-area.scss +0 -119
- package/packages/theme-chalk/filter-drop.scss +0 -81
- package/packages/theme-chalk/float-footer.scss +0 -14
- package/packages/theme-chalk/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/fragment.scss +0 -51
- package/packages/theme-chalk/full-table.scss +0 -40
- package/packages/theme-chalk/icon.scss +0 -96
- package/packages/theme-chalk/image-viewer.scss +0 -94
- package/packages/theme-chalk/images/company-logo--default.png +0 -0
- package/packages/theme-chalk/images/nodata.png +0 -0
- package/packages/theme-chalk/images/user-logo--default.png +0 -0
- package/packages/theme-chalk/index.scss +0 -21
- package/packages/theme-chalk/nav-menu.scss +0 -205
- package/packages/theme-chalk/organize-dialog.scss +0 -170
- package/packages/theme-chalk/pagination.scss +0 -91
- package/packages/theme-chalk/select.scss +0 -8
- package/packages/theme-chalk/table.scss +0 -102
- package/packages/theme-chalk/tool-group.scss +0 -105
- package/packages/theme-chalk/top-bar.scss +0 -195
- package/packages/tool-group/index.js +0 -13
- package/packages/tool-group/src/config.js +0 -40
- package/packages/tool-group/src/main.vue +0 -93
- package/packages/top-bar/index.js +0 -7
- package/packages/top-bar/src/main.vue +0 -280
- package/public/index.html +0 -20
- package/vue.config.js +0 -6
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="wrapper">
|
|
3
|
-
<img
|
|
4
|
-
v-for="(item, index) in urls"
|
|
5
|
-
:src="item"
|
|
6
|
-
:key="index"
|
|
7
|
-
alt=""
|
|
8
|
-
@click="show(index)"
|
|
9
|
-
/>
|
|
10
|
-
<!-- <hb-image-viewer></hb-image-viewer> -->
|
|
11
|
-
<div>
|
|
12
|
-
<pre>
|
|
13
|
-
快捷键功能 esc => 关闭弹窗
|
|
14
|
-
→ => 下一张
|
|
15
|
-
← => 上一张
|
|
16
|
-
鼠标滚轮下 => 放大
|
|
17
|
-
鼠标滚轮上 => 缩小
|
|
18
|
-
|
|
19
|
-
</pre>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
<script>
|
|
24
|
-
import img1 from "../image/hb-image-viewer/3k.jpg";
|
|
25
|
-
import img2 from "../image/hb-image-viewer/a.jpg";
|
|
26
|
-
import img3 from "../image/hb-image-viewer/b.jpg";
|
|
27
|
-
|
|
28
|
-
export default {
|
|
29
|
-
data() {
|
|
30
|
-
return {
|
|
31
|
-
zIndex: 200, //组件内默认100
|
|
32
|
-
urls: [img1, img2, img3],
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
methods: {
|
|
36
|
-
show(index) {
|
|
37
|
-
this.$hbViewer({
|
|
38
|
-
urls: this.urls,
|
|
39
|
-
activeIndex: index,
|
|
40
|
-
});
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<style lang="scss" scoped>
|
|
47
|
-
.wrapper {
|
|
48
|
-
img {
|
|
49
|
-
width: 100px;
|
|
50
|
-
height: 100px;
|
|
51
|
-
object-fit: contain;
|
|
52
|
-
border: 1px solid #000;
|
|
53
|
-
margin: 10px;
|
|
54
|
-
background: #fff;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
</style>
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<hb-navmenu :data="menuList" :props="defaultProps"></hb-navmenu>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
data() {
|
|
10
|
-
return {
|
|
11
|
-
menuList: [
|
|
12
|
-
{
|
|
13
|
-
label: "说明1",
|
|
14
|
-
icon: "el-icon-delete",
|
|
15
|
-
path: "/HBNavMenu",
|
|
16
|
-
children: [
|
|
17
|
-
{
|
|
18
|
-
label: "说明文字说明文字说明文字",
|
|
19
|
-
icon: "el-icon-delete",
|
|
20
|
-
path: "/HBNavMenu/pathsub1",
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
defaultProps: {
|
|
26
|
-
icon: "icon",
|
|
27
|
-
label: "label",
|
|
28
|
-
path: "path",
|
|
29
|
-
children: "children",
|
|
30
|
-
id: "id",
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<style></style>
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<hb-organize-dialog
|
|
4
|
-
:deptOnly="deptOnly"
|
|
5
|
-
:cancelAble="cancelAble"
|
|
6
|
-
ref="organize"
|
|
7
|
-
@confirm="confirm"
|
|
8
|
-
/>
|
|
9
|
-
<el-button @click="open">选择部门和人员</el-button>
|
|
10
|
-
<el-button @click="openDept">仅选择部门</el-button>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
<script>
|
|
14
|
-
import organizeData from "../mock/organizeData";
|
|
15
|
-
import { deptData } from "../mock/dept";
|
|
16
|
-
|
|
17
|
-
export default {
|
|
18
|
-
data() {
|
|
19
|
-
return {
|
|
20
|
-
deptOnly: false,
|
|
21
|
-
cancelAble: true,
|
|
22
|
-
checkedList: [
|
|
23
|
-
//要把当前登录账号传进去,如果后端没返的话
|
|
24
|
-
{
|
|
25
|
-
id: "1",
|
|
26
|
-
isDept: "0",
|
|
27
|
-
name: "admin",
|
|
28
|
-
key: "value", //传入额外的key在选中时会抛出来!!
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: "373449754",
|
|
32
|
-
isDept: "1",
|
|
33
|
-
name: "微测中心",
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: "425752602",
|
|
37
|
-
isDept: "1",
|
|
38
|
-
name: "区域中心",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: "774345882437943296",
|
|
42
|
-
isDept: "0",
|
|
43
|
-
name: "刘洋",
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: "774345860757585920",
|
|
47
|
-
isDept: "0",
|
|
48
|
-
name: "尹松",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: "774345856772997120",
|
|
52
|
-
isDept: "0",
|
|
53
|
-
name: "许小辉",
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
checkedDeptList: [
|
|
57
|
-
{
|
|
58
|
-
id: "455215811",
|
|
59
|
-
name: "商务组",
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: "455114863",
|
|
63
|
-
name: "销售组",
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
data: organizeData,
|
|
67
|
-
};
|
|
68
|
-
},
|
|
69
|
-
methods: {
|
|
70
|
-
openDept() {
|
|
71
|
-
this.deptOnly = true;
|
|
72
|
-
this.$refs.organize.open();
|
|
73
|
-
let p1 = new Promise((resolve) => {
|
|
74
|
-
setTimeout(() => {
|
|
75
|
-
this.fixData(deptData);
|
|
76
|
-
resolve(deptData);
|
|
77
|
-
}, 0);
|
|
78
|
-
});
|
|
79
|
-
let p2 = new Promise((resolve) => {
|
|
80
|
-
setTimeout(() => {
|
|
81
|
-
let arr = this.checkedDeptList.map((item) =>
|
|
82
|
-
Object.assign(item, { isDept: "1" })
|
|
83
|
-
);
|
|
84
|
-
resolve(arr);
|
|
85
|
-
}, 0);
|
|
86
|
-
});
|
|
87
|
-
Promise.all([p1, p2])
|
|
88
|
-
.then((res) => {
|
|
89
|
-
this.$refs.organize.init(res[0][0], res[1]);
|
|
90
|
-
})
|
|
91
|
-
.catch((err) => {
|
|
92
|
-
console.log(err);
|
|
93
|
-
});
|
|
94
|
-
},
|
|
95
|
-
fixData(deptData) {
|
|
96
|
-
deptData.forEach((item) => {
|
|
97
|
-
item.children = item.child || [];
|
|
98
|
-
item.isDept = "1";
|
|
99
|
-
item.child?.length && this.fixData(item.child);
|
|
100
|
-
});
|
|
101
|
-
},
|
|
102
|
-
open() {
|
|
103
|
-
this.deptOnly = false;
|
|
104
|
-
this.$refs.organize.open();
|
|
105
|
-
let p1 = new Promise((resolve) => {
|
|
106
|
-
setTimeout(() => {
|
|
107
|
-
resolve(this.data); //!!!!!data是obj不是array
|
|
108
|
-
}, 0);
|
|
109
|
-
});
|
|
110
|
-
let p2 = new Promise((resolve) => {
|
|
111
|
-
setTimeout(() => {
|
|
112
|
-
resolve(this.checkedList);
|
|
113
|
-
}, 0);
|
|
114
|
-
});
|
|
115
|
-
Promise.all([p1, p2])
|
|
116
|
-
.then((res) => {
|
|
117
|
-
this.$refs.organize.init(res[0], res[1]);
|
|
118
|
-
})
|
|
119
|
-
.catch((err) => {
|
|
120
|
-
console.log(err);
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
|
-
confirm(data) {
|
|
124
|
-
console.log(data);
|
|
125
|
-
//不会自动关闭人员选择框需要手动调用
|
|
126
|
-
// this.$refs.organize.close()
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
</script>
|
|
131
|
-
|
|
132
|
-
<style>
|
|
133
|
-
</style>
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<hb-pagination
|
|
4
|
-
:columns="columns"
|
|
5
|
-
:pageData="pageData"
|
|
6
|
-
:pageSizes="pageSizes"
|
|
7
|
-
@change="handlePageChange"
|
|
8
|
-
@changeColumn="handleChangeColumn"
|
|
9
|
-
>
|
|
10
|
-
</hb-pagination>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
export default {
|
|
16
|
-
data() {
|
|
17
|
-
return {
|
|
18
|
-
columns: [
|
|
19
|
-
{
|
|
20
|
-
prop: "name",
|
|
21
|
-
label: "名称",
|
|
22
|
-
currentSelect: true,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
prop: "code",
|
|
26
|
-
label: "编码",
|
|
27
|
-
currentSelect: true,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
prop: "company",
|
|
31
|
-
label: "公司",
|
|
32
|
-
currentSelect: true,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
prop: "addr",
|
|
36
|
-
label: "地址",
|
|
37
|
-
currentSelect: true,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
prop: "desc",
|
|
41
|
-
label: "简介",
|
|
42
|
-
currentSelect: true,
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
prop: "remark",
|
|
46
|
-
label: "说明",
|
|
47
|
-
currentSelect: true,
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
// 分页配置
|
|
51
|
-
pageData: {
|
|
52
|
-
pageSize: 2,
|
|
53
|
-
pageNum: 1,
|
|
54
|
-
total: 100,
|
|
55
|
-
},
|
|
56
|
-
pageSizes: [2, 30, 50, 100],
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
methods: {
|
|
60
|
-
/**
|
|
61
|
-
* @function handleChangeColumn 列改变
|
|
62
|
-
*/
|
|
63
|
-
handleChangeColumn(newColumns) {
|
|
64
|
-
this.$message.success("列改变");
|
|
65
|
-
this.columns = newColumns;
|
|
66
|
-
},
|
|
67
|
-
/**
|
|
68
|
-
* @function handlePageChange 页码改变
|
|
69
|
-
*/
|
|
70
|
-
handlePageChange() {
|
|
71
|
-
//
|
|
72
|
-
this.$message.success("页码改变");
|
|
73
|
-
console.log(arguments);
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
mounted() {},
|
|
77
|
-
};
|
|
78
|
-
</script>
|
|
79
|
-
|
|
80
|
-
<style></style>
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="demo-wrapper">
|
|
3
|
-
<hb-select-vague
|
|
4
|
-
:options="options"
|
|
5
|
-
:defaultProps="defaultProps"
|
|
6
|
-
multiple
|
|
7
|
-
v-model="selected"
|
|
8
|
-
@change="onSelected"
|
|
9
|
-
></hb-select-vague>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
<script>
|
|
13
|
-
export default {
|
|
14
|
-
data() {
|
|
15
|
-
return {
|
|
16
|
-
options: [
|
|
17
|
-
{
|
|
18
|
-
id: 1,
|
|
19
|
-
name: "刘洋",
|
|
20
|
-
disabled: true,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: 2,
|
|
24
|
-
name: "柏飞",
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: 3,
|
|
28
|
-
name: "白费了",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: 4,
|
|
32
|
-
name: "一百飞",
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
defaultProps: {
|
|
36
|
-
value: "id",
|
|
37
|
-
label: "name",
|
|
38
|
-
},
|
|
39
|
-
selected: "",
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
methods: {
|
|
43
|
-
onSelected(res) {
|
|
44
|
-
//this.formData.selectValue = res 模拟数据绑定
|
|
45
|
-
console.log("hb-selected下拉框已选数据:", res);
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
<style lang="scss" scoped>
|
|
52
|
-
.demo-wrapper {
|
|
53
|
-
display: flex;
|
|
54
|
-
justify-content: center;
|
|
55
|
-
padding-top: 150px;
|
|
56
|
-
}
|
|
57
|
-
</style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<hb-toolgroup
|
|
4
|
-
:icons="['add', 'test', 'upload', 'delete']"
|
|
5
|
-
:tools="tools"
|
|
6
|
-
@event="handleEvent"
|
|
7
|
-
@search="handleSearch"
|
|
8
|
-
>
|
|
9
|
-
<el-button size="mini">附加按钮</el-button>
|
|
10
|
-
</hb-toolgroup>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
<script>
|
|
14
|
-
export default {
|
|
15
|
-
data() {
|
|
16
|
-
return {
|
|
17
|
-
tools: [{ event: "test", text: "测试" }],
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
methods: {
|
|
21
|
-
handleEvent(event) {
|
|
22
|
-
this.$message.success(`事件:${event}`);
|
|
23
|
-
},
|
|
24
|
-
handleSearch(kw) {
|
|
25
|
-
this.$message.success(`搜索:${kw}`);
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
</script>
|
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="hb-advquery">
|
|
3
|
-
<div class="hb-advquery-handles">
|
|
4
|
-
<div class="hb-advquery__tools">
|
|
5
|
-
<slot name="tools"></slot>
|
|
6
|
-
</div>
|
|
7
|
-
<div class="hb-advquery-query-btn">
|
|
8
|
-
<el-button
|
|
9
|
-
size="mini"
|
|
10
|
-
class="hb-advquery-query-btn__item"
|
|
11
|
-
@click="extend ? unextend() : extendFrom()"
|
|
12
|
-
v-if="showAdvQuery"
|
|
13
|
-
icon="hbui-gaojichaxun"
|
|
14
|
-
>
|
|
15
|
-
高级查询
|
|
16
|
-
</el-button>
|
|
17
|
-
|
|
18
|
-
<slot name="cusBtn"></slot>
|
|
19
|
-
<el-dropdown trigger="click" size="small" v-if="showCusQuery">
|
|
20
|
-
<div
|
|
21
|
-
v-if="customQueryLabel.length > 10"
|
|
22
|
-
class="hb-advquery-query-btn__custom"
|
|
23
|
-
>
|
|
24
|
-
<el-tooltip :content="customQueryLabel">
|
|
25
|
-
<span>{{ customQueryLabel.slice(0, 10) + "..." }}</span>
|
|
26
|
-
</el-tooltip>
|
|
27
|
-
</div>
|
|
28
|
-
<div v-else class="hb-advquery-query-btn__custom">
|
|
29
|
-
{{ customQueryLabel }}
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<el-dropdown-menu slot="dropdown">
|
|
33
|
-
<el-dropdown-item
|
|
34
|
-
><span @click="customQuery({ label: '全部', value: 'all' })"
|
|
35
|
-
>全部</span
|
|
36
|
-
></el-dropdown-item
|
|
37
|
-
>
|
|
38
|
-
<el-dropdown-item>
|
|
39
|
-
<slot name="dropdownSlotItem"></slot>
|
|
40
|
-
</el-dropdown-item>
|
|
41
|
-
|
|
42
|
-
<el-dropdown-item
|
|
43
|
-
v-for="(i, index) in customQueryData"
|
|
44
|
-
:key="index"
|
|
45
|
-
:command="i.value"
|
|
46
|
-
>
|
|
47
|
-
<span v-if="i.label.length > 10"
|
|
48
|
-
><el-tooltip :content="customQueryLabel">
|
|
49
|
-
<span
|
|
50
|
-
@click="customQuery(i)"
|
|
51
|
-
class="hb-advquery-query-btn__custom__dropdown-item"
|
|
52
|
-
>{{ i.label.slice(0, 10) + "..." }}</span
|
|
53
|
-
>
|
|
54
|
-
</el-tooltip></span
|
|
55
|
-
><span
|
|
56
|
-
@click="customQuery(i)"
|
|
57
|
-
v-else
|
|
58
|
-
class="hb-advquery-query-btn__custom__dropdown-item"
|
|
59
|
-
>{{ i.label }}</span
|
|
60
|
-
>
|
|
61
|
-
<i
|
|
62
|
-
class="el-icon-delete hb-advquery-query-btn__custom__handle-btn"
|
|
63
|
-
size="mini"
|
|
64
|
-
@click="deleteCus(i)"
|
|
65
|
-
></i>
|
|
66
|
-
<i
|
|
67
|
-
class="el-icon-edit hb-advquery-query-btn__custom__handle-btn"
|
|
68
|
-
size="mini"
|
|
69
|
-
@click="editCus(i)"
|
|
70
|
-
></i>
|
|
71
|
-
</el-dropdown-item>
|
|
72
|
-
|
|
73
|
-
<span @click="addCus">
|
|
74
|
-
<el-dropdown-item divided icon="el-icon-plus">
|
|
75
|
-
新建筛选</el-dropdown-item
|
|
76
|
-
>
|
|
77
|
-
</span>
|
|
78
|
-
</el-dropdown-menu>
|
|
79
|
-
</el-dropdown>
|
|
80
|
-
<el-button
|
|
81
|
-
size="mini"
|
|
82
|
-
class="hb-advquery-query-btn__item"
|
|
83
|
-
v-if="showRefresh"
|
|
84
|
-
@click="refresh"
|
|
85
|
-
icon="hbui-shuaxin"
|
|
86
|
-
>
|
|
87
|
-
刷新
|
|
88
|
-
</el-button>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
<div
|
|
92
|
-
class="hb-advquery-form"
|
|
93
|
-
id="qry-form"
|
|
94
|
-
:class="extend ? 'hb-advquery-form-extend' : 'hb-advquery-form-unextend'"
|
|
95
|
-
>
|
|
96
|
-
<el-form
|
|
97
|
-
class="hb-advquery-form__content"
|
|
98
|
-
ref="queryForm"
|
|
99
|
-
:model="qryFormData"
|
|
100
|
-
label-position="top"
|
|
101
|
-
:rules="rules"
|
|
102
|
-
>
|
|
103
|
-
<div class="hb-advquery-form__row">
|
|
104
|
-
<el-form-item
|
|
105
|
-
v-for="(i, index) in qryFormProps"
|
|
106
|
-
:key="index"
|
|
107
|
-
class="hb-advquery-form__item"
|
|
108
|
-
:label="i.label"
|
|
109
|
-
:prop="i.prop ? i.prop : ''"
|
|
110
|
-
>
|
|
111
|
-
<hb-query-form
|
|
112
|
-
:formProp="i"
|
|
113
|
-
:qryFormData="qryFormData"
|
|
114
|
-
v-bind="i.bind"
|
|
115
|
-
>
|
|
116
|
-
<template :slot="i.prop" :index="index">
|
|
117
|
-
<slot :name="i.prop"></slot>
|
|
118
|
-
</template>
|
|
119
|
-
</hb-query-form>
|
|
120
|
-
</el-form-item>
|
|
121
|
-
<div class="hb-advquery-search-button">
|
|
122
|
-
<el-button
|
|
123
|
-
class="hb-advquery-search-button__btn"
|
|
124
|
-
size="small"
|
|
125
|
-
@click="advQuery"
|
|
126
|
-
type="primary"
|
|
127
|
-
>查询</el-button
|
|
128
|
-
>
|
|
129
|
-
<el-button
|
|
130
|
-
class="hb-advquery-search-button__btn"
|
|
131
|
-
@click="reset"
|
|
132
|
-
size="small"
|
|
133
|
-
>重置</el-button
|
|
134
|
-
>
|
|
135
|
-
<el-button
|
|
136
|
-
class="el-icon-arrow-up hb-advquery-search-button__extend"
|
|
137
|
-
size="small"
|
|
138
|
-
@click="unextend"
|
|
139
|
-
></el-button>
|
|
140
|
-
</div>
|
|
141
|
-
</div>
|
|
142
|
-
</el-form>
|
|
143
|
-
</div>
|
|
144
|
-
<hb-custom-query
|
|
145
|
-
ref="dialog"
|
|
146
|
-
:qryFormProps="qryFormProps"
|
|
147
|
-
:qryFormData="qryFormData"
|
|
148
|
-
@customQuerySave="customQuerySave"
|
|
149
|
-
></hb-custom-query>
|
|
150
|
-
</div>
|
|
151
|
-
</template>
|
|
152
|
-
<script>
|
|
153
|
-
export default {
|
|
154
|
-
name: "HbAdvquery",
|
|
155
|
-
componentName: "HbAdvquery",
|
|
156
|
-
props: {
|
|
157
|
-
sessionExtend: {
|
|
158
|
-
type: Boolean,
|
|
159
|
-
default: true,
|
|
160
|
-
},
|
|
161
|
-
qryFormProps: {
|
|
162
|
-
type: Array,
|
|
163
|
-
default: () => [],
|
|
164
|
-
},
|
|
165
|
-
qryFormData: {
|
|
166
|
-
type: Object,
|
|
167
|
-
default: () => {
|
|
168
|
-
return {
|
|
169
|
-
AdvQueryExtend: false,
|
|
170
|
-
};
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
customQueryData: {
|
|
174
|
-
type: Array,
|
|
175
|
-
default: () => [],
|
|
176
|
-
},
|
|
177
|
-
showAdvQuery: {
|
|
178
|
-
type: Boolean,
|
|
179
|
-
default: true,
|
|
180
|
-
},
|
|
181
|
-
showCusQuery: {
|
|
182
|
-
type: Boolean,
|
|
183
|
-
default: true,
|
|
184
|
-
},
|
|
185
|
-
showRefresh: {
|
|
186
|
-
type: Boolean,
|
|
187
|
-
default: true,
|
|
188
|
-
},
|
|
189
|
-
rules: {
|
|
190
|
-
type: Object,
|
|
191
|
-
default: () => {},
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
data() {
|
|
195
|
-
return {
|
|
196
|
-
customQueryLabel: "全部",
|
|
197
|
-
firstExtend: true, // 首次展开
|
|
198
|
-
extend: false,
|
|
199
|
-
sessionKey: "",
|
|
200
|
-
};
|
|
201
|
-
},
|
|
202
|
-
created() {
|
|
203
|
-
if (this.sessionExtend) {
|
|
204
|
-
this.sessionKey =
|
|
205
|
-
"Extend-" + this.$router.options.base + this.$route.fullPath;
|
|
206
|
-
let localData = sessionStorage.getItem(this.sessionKey);
|
|
207
|
-
this.extend = localData ? JSON.parse(localData) : false;
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
beforeDestroy() {
|
|
211
|
-
const { sessionExtend, extend, sessionKey } = this;
|
|
212
|
-
sessionExtend && sessionStorage.setItem(sessionKey, JSON.stringify(extend));
|
|
213
|
-
},
|
|
214
|
-
methods: {
|
|
215
|
-
/**
|
|
216
|
-
* 自定义筛选点击查询
|
|
217
|
-
*/
|
|
218
|
-
customQuery(val) {
|
|
219
|
-
console.log(val);
|
|
220
|
-
|
|
221
|
-
this.customQueryLabel = val.label;
|
|
222
|
-
this.$emit("customQuery", val);
|
|
223
|
-
},
|
|
224
|
-
/**
|
|
225
|
-
* 刷新
|
|
226
|
-
*/
|
|
227
|
-
refresh() {
|
|
228
|
-
this.$emit("refresh");
|
|
229
|
-
},
|
|
230
|
-
/**
|
|
231
|
-
* 新增自定义
|
|
232
|
-
*/
|
|
233
|
-
addCus() {
|
|
234
|
-
this.$refs.dialog.open("add");
|
|
235
|
-
},
|
|
236
|
-
/**
|
|
237
|
-
* 编辑自定义
|
|
238
|
-
*/
|
|
239
|
-
editCus(i) {
|
|
240
|
-
this.$refs.dialog.open("edit", i);
|
|
241
|
-
},
|
|
242
|
-
/**
|
|
243
|
-
* 删除自定义
|
|
244
|
-
*/
|
|
245
|
-
deleteCus(i) {
|
|
246
|
-
this.$emit("deleteCus", i);
|
|
247
|
-
},
|
|
248
|
-
/**
|
|
249
|
-
* 自定义保存
|
|
250
|
-
*/
|
|
251
|
-
customQuerySave(type, data) {
|
|
252
|
-
console.log(type);
|
|
253
|
-
console.log(data);
|
|
254
|
-
},
|
|
255
|
-
/**
|
|
256
|
-
* 查询回调
|
|
257
|
-
*/
|
|
258
|
-
advQuery() {
|
|
259
|
-
console.log(this.qryFormData);
|
|
260
|
-
this.$emit("advQuery", this.qryFormData);
|
|
261
|
-
},
|
|
262
|
-
/**
|
|
263
|
-
* 重置
|
|
264
|
-
*/
|
|
265
|
-
reset() {
|
|
266
|
-
this.$refs.queryForm.resetFields();
|
|
267
|
-
this.$emit("reset");
|
|
268
|
-
},
|
|
269
|
-
/**
|
|
270
|
-
* 高级查询展开
|
|
271
|
-
*/
|
|
272
|
-
extendFrom() {
|
|
273
|
-
if (this.extend) {
|
|
274
|
-
this.unextend();
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
// 首次展开
|
|
279
|
-
if (this.firstExtend) {
|
|
280
|
-
this.$emit("firstExtend");
|
|
281
|
-
this.firstExtend = false;
|
|
282
|
-
}
|
|
283
|
-
// 展开回调
|
|
284
|
-
this.$emit("extendFrom");
|
|
285
|
-
//展开
|
|
286
|
-
this.extend = true;
|
|
287
|
-
},
|
|
288
|
-
unextend() {
|
|
289
|
-
//收起
|
|
290
|
-
this.extend = false;
|
|
291
|
-
},
|
|
292
|
-
},
|
|
293
|
-
};
|
|
294
|
-
</script>
|