lambo-design-bi 0.0.205 → 0.0.207
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/bi/designer/index.vue +7 -8
- package/bi/protocol/widget.js +0 -0
- package/bi/widget/container/card/card-widget.vue +1 -1
- package/bi/widget/page/child-page-tm.vue +2 -22
- package/bi/widget/search/search-form.vue +12 -6
- package/bi/widget/search/search-item.vue +1 -5
- package/package.json +1 -1
- package/pub/search/checkbox/index.vue +34 -0
package/bi/designer/index.vue
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-container class="designer-container" direction="vertical">
|
|
3
3
|
<!-- 顶部标题栏 -->
|
|
4
|
-
<el-header class="header">
|
|
4
|
+
<!-- <el-header class="header">
|
|
5
5
|
<span>物流查询设计器</span>
|
|
6
|
-
</el-header>
|
|
6
|
+
</el-header> -->
|
|
7
7
|
|
|
8
8
|
<!-- 主体内容区 -->
|
|
9
9
|
<el-container class="main-content">
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<el-button size="small">导入JSON</el-button>
|
|
42
42
|
<el-button size="small" type="primary">导出JSON</el-button>
|
|
43
43
|
<el-button size="small" type="success">导出代码</el-button>
|
|
44
|
-
<el-button size="small" type="warning">生成SFC</el-button>
|
|
44
|
+
<!-- <el-button size="small" type="warning">生成SFC</el-button> -->
|
|
45
45
|
</div>
|
|
46
46
|
</el-header>
|
|
47
47
|
|
|
@@ -84,18 +84,17 @@ export default {
|
|
|
84
84
|
.designer-container {
|
|
85
85
|
height: 100vh;
|
|
86
86
|
width: 100vw;
|
|
87
|
-
min-width: 1024px;
|
|
88
87
|
}
|
|
89
88
|
|
|
90
|
-
.header {
|
|
91
|
-
height:
|
|
92
|
-
line-height:
|
|
89
|
+
/* .header {
|
|
90
|
+
height: 32px;
|
|
91
|
+
line-height: 32px;
|
|
93
92
|
padding-left: 20px;
|
|
94
93
|
border-bottom: 1px solid #dcdfe6;
|
|
95
94
|
background: #fff;
|
|
96
95
|
font-size: 16px;
|
|
97
96
|
font-weight: bold;
|
|
98
|
-
}
|
|
97
|
+
} */
|
|
99
98
|
|
|
100
99
|
.main-content {
|
|
101
100
|
height: calc(100vh - 48px);
|
|
File without changes
|
|
@@ -41,7 +41,7 @@ export default {
|
|
|
41
41
|
methods: {
|
|
42
42
|
getWidgetName,
|
|
43
43
|
initConfig() {
|
|
44
|
-
this.containerStyle = parseStyleStr(this.widget.options.style) || {}
|
|
44
|
+
this.containerStyle = parseStyleStr(this.widget.options.style || {}) || {}
|
|
45
45
|
console.log("ContainerCard this.containerStyle:", this.containerStyle)
|
|
46
46
|
}
|
|
47
47
|
},
|
|
@@ -82,28 +82,8 @@ export default {
|
|
|
82
82
|
})
|
|
83
83
|
},
|
|
84
84
|
goBack() {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
let parentRouteName = null
|
|
88
|
-
if (routeConfig && routeConfig.meta && routeConfig.meta.crumbs) {
|
|
89
|
-
let crumbs = routeConfig.meta.crumbs
|
|
90
|
-
if (crumbs && crumbs.length > 1) {
|
|
91
|
-
let parentRoute = crumbs[crumbs.length - 2]
|
|
92
|
-
if (parentRoute) {
|
|
93
|
-
parentRouteName = parentRoute.name || null
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
if (parentRouteName) {
|
|
98
|
-
console.log("child-page-tm goBack parentRouteName:", parentRouteName)
|
|
99
|
-
this.$router.push({
|
|
100
|
-
name: parentRouteName,
|
|
101
|
-
query: { pageId: this.parentPageId }
|
|
102
|
-
})
|
|
103
|
-
} else {
|
|
104
|
-
console.log("child-page-tm goBack history.back()")
|
|
105
|
-
this.$router.go(-1)
|
|
106
|
-
}
|
|
85
|
+
console.log("child-page-tm goBack history.back()")
|
|
86
|
+
this.$router.go(-1)
|
|
107
87
|
},
|
|
108
88
|
initSearch() {
|
|
109
89
|
let resObj = getInitSearchRes(this.childPageWidget)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="widget.widgets && widget.widgets.length > 0">
|
|
3
|
-
<LamboQueryFilter :default-rows="
|
|
2
|
+
<div class="bi-search-form" v-if="widget.widgets && widget.widgets.length > 0">
|
|
3
|
+
<LamboQueryFilter :default-rows="2" :label-width="150" :span="8" :showSearchIcon="true" :autocomplete="'on'" :hideResetButton="true" @do-search="doSearch" @on-reset="onReset">
|
|
4
4
|
<div v-for="(item, index) in widget.widgets" :key="index">
|
|
5
5
|
<FormItem v-if="item.options.searchType !== 'A0'" :label="item.name">
|
|
6
6
|
<BiSearchItem :widget="item"></BiSearchItem>
|
|
@@ -59,9 +59,9 @@ export default {
|
|
|
59
59
|
} else {
|
|
60
60
|
if (item.options.searchType === SEARCH_DICT.SINGLE_DATE.id) {
|
|
61
61
|
params[qKey] = moment(val).format(DEFAULT_DATE_FORMAT)
|
|
62
|
-
}else if (item.options.searchType === SEARCH_DICT.SINGLE_YEAR.id) {
|
|
62
|
+
} else if (item.options.searchType === SEARCH_DICT.SINGLE_YEAR.id) {
|
|
63
63
|
params[qKey] = moment(val).format(DEFAULT_YEAR_FORMAT)
|
|
64
|
-
}else if (item.options.searchType === SEARCH_DICT.SINGLE_MONTH.id) {
|
|
64
|
+
} else if (item.options.searchType === SEARCH_DICT.SINGLE_MONTH.id) {
|
|
65
65
|
params[qKey] = moment(val).format(DEFAULT_MONTH_FORMAT)
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
@@ -95,8 +95,14 @@ export default {
|
|
|
95
95
|
},
|
|
96
96
|
mounted() {
|
|
97
97
|
this.cacheWidget = deepCopy(this.widget)
|
|
98
|
-
this.doSearch()
|
|
98
|
+
this.doSearch()
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
</script>
|
|
102
|
-
<style scoped
|
|
102
|
+
<style scoped>
|
|
103
|
+
.bi-search-form {
|
|
104
|
+
::v-deep .ivu-form-item {
|
|
105
|
+
margin-bottom: 8px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
@@ -17,10 +17,6 @@
|
|
|
17
17
|
</Select>
|
|
18
18
|
</div>
|
|
19
19
|
<div v-else-if="widget.options.searchType === searchDict.MUlTI_SELECT.id"> <!-- 多选下拉框 -->
|
|
20
|
-
<!-- <Select v-model="widget.options.val" class="lambo-query-class" filterable :clearable="true" placeholder="请选择" multiple
|
|
21
|
-
:max-tag-count="1">
|
|
22
|
-
<Option v-for="(item, index) in widget.options.dataList" :key="index" :value="item.K"> {{ item.V }}</Option>
|
|
23
|
-
</Select> -->
|
|
24
20
|
<LamboElMultiSelect v-model="widget.options.val" :data="widget.options.dataList"></LamboElMultiSelect>
|
|
25
21
|
</div>
|
|
26
22
|
<div v-else-if="widget.options.searchType === searchDict.SINGLE_HELP.id"> <!-- 单选帮助框 -->
|
|
@@ -64,7 +60,7 @@
|
|
|
64
60
|
import HelpBox from "../../../pub/helpbox/index.vue"
|
|
65
61
|
import biConfig from "../config/config"
|
|
66
62
|
import { SEARCH_DICT } from '../../../util/constants'
|
|
67
|
-
import LamboElMultiSelect from '../../../pub/search/multi-select/index.vue'
|
|
63
|
+
import LamboElMultiSelect from '../../../pub/search/multi-select/index.vue'
|
|
68
64
|
|
|
69
65
|
export default {
|
|
70
66
|
name: 'BiSearchItem',
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<CheckboxGroup v-model="fruit">
|
|
4
|
+
<Checkbox label="香蕉"></Checkbox>
|
|
5
|
+
<Checkbox label="苹果"></Checkbox>
|
|
6
|
+
<Checkbox label="西瓜"></Checkbox>
|
|
7
|
+
</CheckboxGroup>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
<script>
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: "LamboCheckBox",
|
|
14
|
+
components: {},
|
|
15
|
+
props: {
|
|
16
|
+
|
|
17
|
+
},
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
fruit: ['苹果']
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
|
|
25
|
+
},
|
|
26
|
+
created() {
|
|
27
|
+
|
|
28
|
+
},
|
|
29
|
+
mounted() {
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
<style scoped></style>
|