Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
ebf90fb0
提交
ebf90fb0
authored
3月 31, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 组件解偶 使用继承
上级
79d37827
隐藏空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
675 行增加
和
38 行删除
+675
-38
package.json
frontend/package.json
+1
-0
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+13
-4
DeButton.vue
frontend/src/components/widget/DeWidget/DeButton.vue
+43
-0
DeDate.vue
frontend/src/components/widget/DeWidget/DeDate.vue
+27
-0
DeDrawingWidget.vue
frontend/src/components/widget/DeWidget/DeDrawingWidget.vue
+20
-0
DeInputSearch.vue
frontend/src/components/widget/DeWidget/DeInputSearch.vue
+12
-10
DeQuarter.vue
frontend/src/components/widget/DeWidget/DeQuarter.vue
+24
-0
DeSelect.vue
frontend/src/components/widget/DeWidget/DeSelect.vue
+38
-0
ElQuarter.vue
...tend/src/components/widget/DeWidget/sources/ElQuarter.vue
+138
-0
index.js
frontend/src/components/widget/index.js
+32
-0
WidgetService.js
frontend/src/components/widget/service/WidgetService.js
+1
-0
ButtonSureServiceImpl.js
...rc/components/widget/serviceImpl/ButtonSureServiceImpl.js
+9
-2
TextInputServiceImpl.js
...src/components/widget/serviceImpl/TextInputServiceImpl.js
+48
-0
TextSelectServiceImpl.js
...rc/components/widget/serviceImpl/TextSelectServiceImpl.js
+67
-0
TimeDateRangeServiceImpl.js
...components/widget/serviceImpl/TimeDateRangeServiceImpl.js
+47
-0
TimeDateServiceImpl.js
.../src/components/widget/serviceImpl/TimeDateServiceImpl.js
+45
-0
TimeMonthServiceImpl.js
...src/components/widget/serviceImpl/TimeMonthServiceImpl.js
+45
-0
TimeQuarterServiceImpl.js
...c/components/widget/serviceImpl/TimeQuarterServiceImpl.js
+45
-0
TimeYearServiceImpl.js
.../src/components/widget/serviceImpl/TimeYearServiceImpl.js
+8
-3
WidgetServiceImpl.js
...nd/src/components/widget/serviceImpl/WidgetServiceImpl.js
+0
-16
main.js
frontend/src/main.js
+2
-2
index.vue
frontend/src/views/panel/filter/index.vue
+10
-1
没有找到文件。
frontend/package.json
浏览文件 @
ebf90fb0
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
"fit2cloud-ui"
:
"^0.1.12"
,
"fit2cloud-ui"
:
"^0.1.12"
,
"js-cookie"
:
"2.2.0"
,
"js-cookie"
:
"2.2.0"
,
"jsencrypt"
:
"^3.0.0-rc.1"
,
"jsencrypt"
:
"^3.0.0-rc.1"
,
"lodash"
:
"4.17.21"
,
"normalize.css"
:
"7.0.0"
,
"normalize.css"
:
"7.0.0"
,
"nprogress"
:
"0.2.0"
,
"nprogress"
:
"0.2.0"
,
"screenfull"
:
"4.2.0"
,
"screenfull"
:
"4.2.0"
,
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
ebf90fb0
...
@@ -24,17 +24,26 @@
...
@@ -24,17 +24,26 @@
:index=
"index"
:index=
"index"
:class=
"
{ lock: item.isLock }"
:class=
"
{ lock: item.isLock }"
>
>
<de-drawing-widget
v-if=
"item.type==='custom'"
:id=
"'component' + item.id"
class=
"component"
:style=
"getComponentStyle(item.style)"
:element=
"item"
:item=
"item"
/>
<component
<component
:is=
"item.component"
:is=
"item.component"
v-
if=
"item.component !== 'v-text'"
v-
else
:id=
"'component' + item.id"
:id=
"'component' + item.id"
class=
"component"
class=
"component"
:style=
"getComponentStyle(item.style)"
:style=
"getComponentStyle(item.style)"
:prop-value=
"item.propValue"
:prop-value=
"item.propValue"
:element=
"item"
:element=
"item"
/>
/>
<!--
<component
<component
:is=
"item.component"
:is=
"item.component"
v-else
v-else
:id=
"'component' + item.id"
:id=
"'component' + item.id"
...
@@ -43,7 +52,7 @@
...
@@ -43,7 +52,7 @@
:prop-value=
"item.propValue"
:prop-value=
"item.propValue"
:element=
"item"
:element=
"item"
@
input=
"handleInput"
@
input=
"handleInput"
/>
/>
-->
</Shape>
</Shape>
<!-- 右击菜单 -->
<!-- 右击菜单 -->
<ContextMenu
/>
<ContextMenu
/>
...
...
frontend/src/components/widget/DeWidget/DeButton.vue
0 → 100644
浏览文件 @
ebf90fb0
<
template
>
<el-button
v-if=
"options!== null && options.attrs!==null"
:type=
"options.attrs.type"
:round=
"options.attrs.round"
>
{{
options
.
value
}}
</el-button>
</
template
>
<
script
>
export
default
{
props
:
{
options
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
// this.defaultOptions = Object.assign({}, this.options)
// const dom = this.$refs[this.options.refId]
// for (const key in this.options.attrs) {
// if (Object.hasOwnProperty.call(this.defaultOptions.attrs, key)) {
// const element = this.defaultOptions.attrs[key]
// dom.$props[key] = element
// }
// }
})
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
frontend/src/components/widget/DeWidget/DeDate.vue
0 → 100644
浏览文件 @
ebf90fb0
<
template
>
<el-date-picker
v-if=
"options!== null && options.attrs!==null"
v-model=
"options.value"
:type=
"options.attrs.type"
:range-separator=
"options.attrs.rangeSeparator"
:start-placeholder=
"options.attrs.startPlaceholder"
:end-placeholder=
"options.attrs.endPlaceholder"
:placeholder=
"options.attrs.placeholder"
/>
</
template
>
<
script
>
export
default
{
props
:
{
options
:
{
type
:
Object
,
default
:
null
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
frontend/src/components/widget/DeWidget/DeDrawingWidget.vue
0 → 100644
浏览文件 @
ebf90fb0
<
script
>
export
default
{
functional
:
true
,
props
:
{
item
:
{
type
:
Object
,
default
:
null
}
},
render
(
createElement
,
context
)
{
const
item
=
context
.
props
.
item
return
createElement
(
item
.
component
,
{
props
:
{
options
:
item
.
options
,
element
:
item
}
})
}
}
</
script
>
frontend/src/components/widget/DeWidget/
index
.vue
→
frontend/src/components/widget/DeWidget/
DeInputSearch
.vue
浏览文件 @
ebf90fb0
<
template
>
<
template
>
<div>
de-widget
</div>
<el-input
v-if=
"options!== null && options.attrs!==null"
v-model=
"options.value"
style=
"width:260px;"
:placeholder=
"options.attrs.placeholder"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
/>
</el-input>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
ApplicationContext
}
from
'@/utils/ApplicationContext'
export
default
{
export
default
{
props
:
{
props
:
{
options
:
{
options
:
{
type
:
Object
,
type
:
Object
,
...
@@ -13,20 +18,17 @@ export default {
...
@@ -13,20 +18,17 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
widget
:
null
}
}
},
},
computed
()
{
mounted
()
{
this
.
widget
=
ApplicationContext
.
getService
(
this
.
options
.
name
)
this
.
$nextTick
(()
=>
{
console
.
log
(
this
.
widget
.
name
)
},
methods
:
{
onDraw
()
{
}
}
)
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
</
style
>
</
style
>
frontend/src/components/widget/DeWidget/DeQuarter.vue
0 → 100644
浏览文件 @
ebf90fb0
<
template
>
<el-quarter
v-if=
"options!== null && options.attrs!==null"
v-model=
"options.value"
:placeholder=
"options.attrs.placeholder"
/>
</
template
>
<
script
>
export
default
{
props
:
{
options
:
{
type
:
Object
,
default
:
null
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
frontend/src/components/widget/DeWidget/DeSelect.vue
0 → 100644
浏览文件 @
ebf90fb0
<
template
>
<el-select
v-if=
"options!== null && options.attrs!==null"
v-model=
"options.value"
:placeholder=
"options.attrs.placeholder"
>
<el-option
v-for=
"item in options.attrs.datas"
:key=
"item[options.attrs.key]"
:label=
"item[options.attrs.label]"
:value=
"item[options.attrs.value]"
/>
</el-select>
</
template
>
<
script
>
export
default
{
props
:
{
options
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
})
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
frontend/src/components/widget/DeWidget/sources/ElQuarter.vue
0 → 100644
浏览文件 @
ebf90fb0
<
template
>
<div>
<mark
v-show=
"showSeason"
style=
"position:fixed;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,0);z-index:999;"
@
click
.
stop=
"showSeason=false"
/>
<el-input
v-model=
"showValue"
:placeholder=
"placeholder"
style=
"width:138px;"
@
focus=
"showSeason=true"
>
<i
slot=
"prefix"
class=
"el-input__icon el-icon-date"
/>
</el-input>
<el-card
v-show=
"showSeason"
class=
"box-card"
style=
"width:322px;padding: 0 3px 20px;margin-top:10px;position:fixed;z-index:9999"
>
<div
slot=
"header"
class=
"clearfix"
style=
"text-align:center;padding:0"
>
<button
type=
"button"
aria-label=
"前一年"
class=
"el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left"
@
click=
"prev"
/>
<span
role=
"button"
class=
"el-date-picker__header-label"
>
{{
year
}}
年
</span>
<button
type=
"button"
aria-label=
"后一年"
class=
"el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right"
@
click=
"next"
/>
</div>
<div
class=
"text item"
style=
"text-align:center;"
>
<el-button
type=
"text"
size=
"medium"
style=
"width:40%;color: #606266;float:left;"
@
click=
"selectSeason(0)"
>
第一季度
</el-button>
<el-button
type=
"text"
size=
"medium"
style=
"float:right;width:40%;color: #606266;"
@
click=
"selectSeason(1)"
>
第二季度
</el-button>
</div>
<div
class=
"text item"
style=
"text-align:center;"
>
<el-button
type=
"text"
size=
"medium"
style=
"width:40%;color: #606266;float:left;"
@
click=
"selectSeason(2)"
>
第三季度
</el-button>
<el-button
type=
"text"
size=
"medium"
style=
"float:right;width:40%;color: #606266;"
@
click=
"selectSeason(3)"
>
第四季度
</el-button>
</div>
</el-card>
</div>
</
template
>
<
script
>
/**
* @file: View 组件 季节选择控件
* @author: v_zhuchun
* @date: 2019-05-23
* @description: UI组件 可选择季节
* @api: valueArr : 季度value defalut['01-03', '04-06', '07-09', '10-12'] 默认值待设置
*/
export
default
{
props
:
{
placeholder
:
{
type
:
String
,
default
:
''
},
valueArr
:
{
default
:
()
=>
{
return
[
'01-03'
,
'04-06'
,
'07-09'
,
'10-12'
]
},
type
:
Array
},
getValue
:
{
default
:
()
=>
{},
type
:
Function
},
defaultValue
:
{
default
:
''
,
type
:
String
}
},
data
()
{
return
{
showSeason
:
false
,
season
:
''
,
year
:
new
Date
().
getFullYear
(),
showValue
:
''
}
},
watch
:
{
defaultValue
:
function
(
value
,
oldValue
)
{
const
arr
=
value
.
split
(
'-'
)
this
.
year
=
arr
[
0
].
slice
(
0
,
4
)
const
str
=
arr
[
0
].
slice
(
4
,
6
)
+
'-'
+
arr
[
1
].
slice
(
4
,
6
)
const
arrAll
=
this
.
valueArr
this
.
showValue
=
`
${
this
.
year
}
年
${
arrAll
.
indexOf
(
str
)
+
1
}
季度`
}
},
created
()
{
if
(
this
.
defaultValue
)
{
const
value
=
this
.
defaultValue
const
arr
=
value
.
split
(
'-'
)
this
.
year
=
arr
[
0
].
slice
(
0
,
4
)
const
str
=
arr
[
0
].
slice
(
4
,
6
)
+
'-'
+
arr
[
1
].
slice
(
4
,
6
)
const
arrAll
=
this
.
valueArr
this
.
showValue
=
`
${
this
.
year
}
年
${
arrAll
.
indexOf
(
str
)
+
1
}
季度`
}
},
methods
:
{
one
()
{
this
.
showSeason
=
false
},
prev
()
{
this
.
year
=
this
.
year
*
1
-
1
},
next
()
{
this
.
year
=
this
.
year
*
1
+
1
},
selectSeason
(
i
)
{
const
that
=
this
that
.
season
=
i
+
1
const
arr
=
that
.
valueArr
[
i
].
split
(
'-'
)
that
.
getValue
(
that
.
year
+
arr
[
0
]
+
'-'
+
that
.
year
+
arr
[
1
])
that
.
showSeason
=
false
this
.
showValue
=
`
${
this
.
year
}
年
${
this
.
season
}
季度`
}
}
}
</
script
>
frontend/src/components/widget/index.js
浏览文件 @
ebf90fb0
// import store from '@/store'
// import store from '@/store'
import
Vue
from
'vue'
import
upperFirst
from
'lodash/upperFirst'
import
camelCase
from
'lodash/camelCase'
const
requireComponent
=
require
.
context
(
'./DeWidget'
,
true
,
/
\.
vue$/
)
requireComponent
.
keys
().
forEach
(
fileName
=>
{
// 获取组件配置
const
componentConfig
=
requireComponent
(
fileName
)
// 这个地方直接传入filename其实就是内部会调用了resolve方法,会返回对应的文件内容(不理解可以console一下看看)
// 获取组件的 PascalCase 命名
const
componentName
=
upperFirst
(
camelCase
(
// 获取和目录深度无关的文件名
fileName
.
split
(
'/'
)
.
pop
()
.
replace
(
/
\.\w
+$/
,
''
)
)
)
// 全局注册组件
Vue
.
component
(
componentName
,
// 如果这个组件选项是通过 `export default` 导出的,
// 那么就会优先使用 `.default`,
// 否则回退到使用模块的根。
componentConfig
.
default
||
componentConfig
)
})
const
req
=
require
.
context
(
'./serviceImpl'
,
false
,
/
\.
js$/
)
const
req
=
require
.
context
(
'./serviceImpl'
,
false
,
/
\.
js$/
)
const
requireAll
=
requireContext
=>
requireContext
.
keys
()
const
requireAll
=
requireContext
=>
requireContext
.
keys
()
...
...
frontend/src/components/widget/service/WidgetService.js
浏览文件 @
ebf90fb0
...
@@ -16,6 +16,7 @@ export class WidgetService {
...
@@ -16,6 +16,7 @@ export class WidgetService {
options
=
{
...
commonAttr
,
...
options
}
options
=
{
...
commonAttr
,
...
options
}
Object
.
assign
(
this
,
options
)
Object
.
assign
(
this
,
options
)
this
.
style
=
{
...
commonStyle
,
...
options
.
style
}
this
.
style
=
{
...
commonStyle
,
...
options
.
style
}
this
.
type
=
'custom'
this
.
storeWidget
()
this
.
storeWidget
()
}
}
storeWidget
()
{
storeWidget
()
{
...
...
frontend/src/components/widget/serviceImpl/ButtonSureServiceImpl.js
浏览文件 @
ebf90fb0
...
@@ -17,8 +17,15 @@ const defaultOptions = {
...
@@ -17,8 +17,15 @@ const defaultOptions = {
color
:
''
,
color
:
''
,
backgroundColor
:
''
backgroundColor
:
''
},
},
propValue
:
'按钮'
,
component
:
'de-button'
,
component
:
'v-button'
options
:
{
refId
:
'1234567890'
,
attrs
:
{
type
:
'primary'
,
round
:
true
},
value
:
'测试按钮'
}
}
}
class
ButtonSureServiceImpl
extends
WidgetService
{
class
ButtonSureServiceImpl
extends
WidgetService
{
...
...
frontend/src/components/widget/serviceImpl/TextInputServiceImpl.js
0 → 100644
浏览文件 @
ebf90fb0
import
{
WidgetService
}
from
'../service/WidgetService'
const
defaultOptions
=
{
name
:
'textInputWidget'
,
icon
:
null
,
label
:
'文本搜索'
,
style
:
{
width
:
100
,
height
:
34
,
borderWidth
:
''
,
borderColor
:
''
,
borderRadius
:
''
,
fontSize
:
14
,
fontWeight
:
500
,
lineHeight
:
''
,
letterSpacing
:
0
,
textAlign
:
''
,
color
:
''
,
backgroundColor
:
''
},
component
:
'de-input-search'
,
options
:
{
refId
:
'1234567890'
,
attrs
:
{
placeholder
:
'请输入关键字'
},
value
:
''
}
}
class
TextInputServiceImpl
extends
WidgetService
{
constructor
(
options
)
{
Object
.
assign
(
options
,
defaultOptions
)
super
(
options
)
}
initWidget
()
{
// console.log('this is first initWidget')
}
toDrawWidget
()
{
// console.log('this is first toDrawWidget')
}
// 移动到画布之前回掉
beforeToDraw
()
{
}
}
const
textInputServiceImpl
=
new
TextInputServiceImpl
({
name
:
'textInputWidget'
})
export
default
textInputServiceImpl
frontend/src/components/widget/serviceImpl/TextSelectServiceImpl.js
0 → 100644
浏览文件 @
ebf90fb0
import
{
WidgetService
}
from
'../service/WidgetService'
const
defaultOptions
=
{
name
:
'textSelectWidget'
,
icon
:
null
,
label
:
'文本下拉'
,
style
:
{
width
:
200
,
height
:
22
,
fontSize
:
14
,
fontWeight
:
500
,
lineHeight
:
''
,
letterSpacing
:
0
,
textAlign
:
''
,
color
:
''
},
options
:
{
refId
:
'1234567890'
,
attrs
:
{
multiple
:
false
,
placeholder
:
'请选择'
,
datas
:
[
{
id
:
'0'
,
text
:
'北京'
},
{
id
:
'1'
,
text
:
'上海'
},
{
id
:
'2'
,
text
:
'广东'
},
{
id
:
'3'
,
text
:
'深圳'
}
],
key
:
'id'
,
label
:
'text'
,
value
:
'id'
},
value
:
''
},
component
:
'de-select'
}
class
TextSelectServiceImpl
extends
WidgetService
{
constructor
(
options
)
{
Object
.
assign
(
options
,
defaultOptions
)
super
(
options
)
}
initWidget
()
{
// console.log('this is first initWidget')
}
toDrawWidget
()
{
// console.log('this is first toDrawWidget')
}
// 移动到画布之前回掉
beforeToDraw
()
{
}
}
const
textSelectServiceImpl
=
new
TextSelectServiceImpl
({
name
:
'textSelectWidget'
})
export
default
textSelectServiceImpl
frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js
0 → 100644
浏览文件 @
ebf90fb0
import
{
WidgetService
}
from
'../service/WidgetService'
const
defaultOptions
=
{
name
:
'timeDateRangeWidget'
,
icon
:
null
,
label
:
'日期范围'
,
style
:
{
width
:
200
,
height
:
22
,
fontSize
:
14
,
fontWeight
:
500
,
lineHeight
:
''
,
letterSpacing
:
0
,
textAlign
:
''
,
color
:
''
},
options
:
{
refId
:
'1234567890'
,
attrs
:
{
type
:
'daterange'
,
rangeSeparator
:
'至'
,
startPlaceholder
:
'开始日期'
,
endPlaceholder
:
'结束日期'
},
value
:
''
},
component
:
'de-date'
}
class
TimeDateRangeServiceImpl
extends
WidgetService
{
constructor
(
options
)
{
Object
.
assign
(
options
,
defaultOptions
)
super
(
options
)
}
initWidget
()
{
// console.log('this is first initWidget')
}
toDrawWidget
()
{
// console.log('this is first toDrawWidget')
}
// 移动到画布之前回掉
beforeToDraw
()
{
}
}
const
timeDateRangeServiceImpl
=
new
TimeDateRangeServiceImpl
({
name
:
'timeDateRangeWidget'
})
export
default
timeDateRangeServiceImpl
frontend/src/components/widget/serviceImpl/TimeDateServiceImpl.js
0 → 100644
浏览文件 @
ebf90fb0
import
{
WidgetService
}
from
'../service/WidgetService'
const
defaultOptions
=
{
name
:
'timeDateWidget'
,
icon
:
null
,
label
:
'日期'
,
style
:
{
width
:
200
,
height
:
22
,
fontSize
:
14
,
fontWeight
:
500
,
lineHeight
:
''
,
letterSpacing
:
0
,
textAlign
:
''
,
color
:
''
},
options
:
{
refId
:
'1234567890'
,
attrs
:
{
type
:
'date'
,
placeholder
:
'请选择日期'
},
value
:
''
},
component
:
'de-date'
}
class
TimeDateServiceImpl
extends
WidgetService
{
constructor
(
options
)
{
Object
.
assign
(
options
,
defaultOptions
)
super
(
options
)
}
initWidget
()
{
// console.log('this is first initWidget')
}
toDrawWidget
()
{
// console.log('this is first toDrawWidget')
}
// 移动到画布之前回掉
beforeToDraw
()
{
}
}
const
timeDateServiceImpl
=
new
TimeDateServiceImpl
({
name
:
'timeDateWidget'
})
export
default
timeDateServiceImpl
frontend/src/components/widget/serviceImpl/TimeMonthServiceImpl.js
0 → 100644
浏览文件 @
ebf90fb0
import
{
WidgetService
}
from
'../service/WidgetService'
const
defaultOptions
=
{
name
:
'timeMonthWidget'
,
icon
:
null
,
label
:
'年月'
,
style
:
{
width
:
200
,
height
:
22
,
fontSize
:
14
,
fontWeight
:
500
,
lineHeight
:
''
,
letterSpacing
:
0
,
textAlign
:
''
,
color
:
''
},
options
:
{
refId
:
'1234567890'
,
attrs
:
{
type
:
'month'
,
placeholder
:
'请选择年月'
},
value
:
''
},
component
:
'de-date'
}
class
TimeMonthServiceImpl
extends
WidgetService
{
constructor
(
options
)
{
Object
.
assign
(
options
,
defaultOptions
)
super
(
options
)
}
initWidget
()
{
// console.log('this is first initWidget')
}
toDrawWidget
()
{
// console.log('this is first toDrawWidget')
}
// 移动到画布之前回掉
beforeToDraw
()
{
}
}
const
timeMonthServiceImpl
=
new
TimeMonthServiceImpl
({
name
:
'timeMonthWidget'
})
export
default
timeMonthServiceImpl
frontend/src/components/widget/serviceImpl/TimeQuarterServiceImpl.js
0 → 100644
浏览文件 @
ebf90fb0
import
{
WidgetService
}
from
'../service/WidgetService'
const
defaultOptions
=
{
name
:
'timeQuarterWidget'
,
icon
:
null
,
label
:
'季度'
,
style
:
{
width
:
200
,
height
:
22
,
fontSize
:
14
,
fontWeight
:
500
,
lineHeight
:
''
,
letterSpacing
:
0
,
textAlign
:
''
,
color
:
''
},
options
:
{
refId
:
'1234567890'
,
attrs
:
{
placeholder
:
'请选择季度'
},
value
:
''
},
component
:
'de-quarter'
}
class
TimeQuarterServiceImpl
extends
WidgetService
{
constructor
(
options
)
{
Object
.
assign
(
options
,
defaultOptions
)
super
(
options
)
}
initWidget
()
{
// console.log('this is first initWidget')
}
toDrawWidget
()
{
// console.log('this is first toDrawWidget')
}
// 移动到画布之前回掉
beforeToDraw
()
{
}
}
const
timeQuarterServiceImpl
=
new
TimeQuarterServiceImpl
({
name
:
'timeQuarterWidget'
})
export
default
timeQuarterServiceImpl
frontend/src/components/widget/serviceImpl/TimeYearServiceImpl.js
浏览文件 @
ebf90fb0
...
@@ -13,10 +13,15 @@ const defaultOptions = {
...
@@ -13,10 +13,15 @@ const defaultOptions = {
textAlign
:
''
,
textAlign
:
''
,
color
:
''
color
:
''
},
},
deProp
:
{
options
:
{
type
:
'year'
refId
:
'1234567890'
,
attrs
:
{
type
:
'year'
,
placeholder
:
'请选择年份'
},
value
:
''
},
},
component
:
'
el-date-picker
'
component
:
'
de-date
'
}
}
class
TimeYearServiceImpl
extends
WidgetService
{
class
TimeYearServiceImpl
extends
WidgetService
{
...
...
frontend/src/components/widget/serviceImpl/WidgetServiceImpl.js
deleted
100644 → 0
浏览文件 @
79d37827
// import { WidgetService } from '../service/WidgetService'
// class WidgetServiceImpl extends WidgetService {
// constructor(options) {
// super(options)
// console.log('init child class WidgetServiceImpl')
// }
// initWidget() {
// console.log('this is first initWidget')
// }
// toDrawWidget() {
// console.log('this is first toDrawWidget')
// }
// }
// const widgetServiceImpl = new WidgetServiceImpl({ name: 'testWidget' })
// export default widgetServiceImpl
frontend/src/main.js
浏览文件 @
ebf90fb0
...
@@ -64,9 +64,9 @@ Vue.use(message)
...
@@ -64,9 +64,9 @@ Vue.use(message)
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
new
Vue
({
new
Vue
({
el
:
'#app'
,
router
,
router
,
store
,
store
,
i18n
,
i18n
,
render
:
h
=>
h
(
App
)
render
:
h
=>
h
(
App
)
})
})
.
$mount
(
'#app'
)
frontend/src/views/panel/filter/index.vue
浏览文件 @
ebf90fb0
...
@@ -49,7 +49,16 @@ export default {
...
@@ -49,7 +49,16 @@ export default {
componentList
,
componentList
,
widgetSubjects
:
{
widgetSubjects
:
{
'时间过滤组件'
:
[
'时间过滤组件'
:
[
'timeYearWidget'
'timeYearWidget'
,
'timeMonthWidget'
,
'timeQuarterWidget'
,
'timeDateWidget'
,
'timeDateRangeWidget'
],
'文本过滤组件'
:
[
'textSelectWidget'
,
'textInputWidget'
],
],
'按钮'
:
[
'按钮'
:
[
'buttonSureWidget'
'buttonSureWidget'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论