Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hs-sky-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何虹
hs-sky-ui
Commits
9059f971
Commit
9059f971
authored
Apr 28, 2020
by
何虹
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化表格当前行
parent
60aeb175
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
303 additions
and
172 deletions
+303
-172
HelloWorld copy.vue
src/components/HelloWorld copy.vue
+54
-0
HelloWorld.vue
src/components/HelloWorld.vue
+107
-46
apiUc.js
src/components/apiUc.js
+3
-0
index.vue
src/packages/hs-file/index.vue
+127
-122
index.vue
src/packages/hs-select-plus/index.vue
+0
-2
index.vue
src/packages/hs-table/index.vue
+4
-2
mes_style.js
src/packages/hs-table/mes_style.js
+1
-0
vue.config.js
vue.config.js
+7
-0
No files found.
src/components/HelloWorld copy.vue
0 → 100644
View file @
9059f971
<
template
>
<div
style=
"width:500px"
>
<hsFile
v-model=
"value"
:allSourceData=
'allSourceData'
:uploadFileFun=
'uploadFileFun_'
>
</hsFile>
<div>
{{
value
}}
</div>
</div>
</
template
>
<
script
>
import
apiUc
from
"./apiUc"
;
export
default
{
mixins
:
[
apiUc
],
data
()
{
return
{
value
:
""
,
formData
:
{
test_p
:
""
},
allSourceData
:
{
config
:
{
appCode
:
"PBOrg"
,
multiple
:
true
,
label
:
"附件"
,
accept
:
".xls,.doc,.txt,.pdf,.jpg"
,
uploaded
:
v
=>
{
console
.
log
(
v
,
"sadas"
);
console
.
log
(
this
.
value
);
}
},
sourceData
:
[]
}
};
},
mounted
()
{},
methods
:
{
uploadFileFun_
(
formData
)
{
return
this
.
uploadFileFun
(
"PBOrg"
,
formData
);
},
printResult
()
{
console
.
log
(
this
.
formData
);
}
}
};
</
script
>
<
style
scoped
>
.codeTxt
{
text-align
:
left
;
}
</
style
>
\ No newline at end of file
src/components/HelloWorld.vue
View file @
9059f971
<
template
>
<
template
>
<div
style=
"width:500px"
>
<div>
<hs
SelectPlus
<hs
Table
v-model=
"formData.test_p"
maxHeight=
'500px'
:allSourceData=
'allSourceData'
:allSourceData=
'allSourceData'
:requestMethod=
'requestMethod'
></hsTable>
:writeBackObject=
'formData'
></hsSelectPlus>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
apiUc
from
"./apiUc"
;
import
apiUc
from
"./apiUc"
;
...
@@ -15,54 +12,118 @@ export default {
...
@@ -15,54 +12,118 @@ export default {
mixins
:
[
apiUc
],
mixins
:
[
apiUc
],
data
()
{
data
()
{
return
{
return
{
formData
:
{
allSourceData
:
{
test_p
:
""
config
:
{
highlightCurrentRow
:
false
,
hover
:{
hoverBackground
:
''
,
leaveBackground
:
''
},
showIndex
:
false
,
// 是否显示 序号
hsConfig
:
{
default_type
:
1
// mes风格
},
showHandle
:
true
,
// 是否显示操作栏
selection
:
true
,
// 是否显示复选框
handleWidth
:
180
,
// 操作栏宽度
isAdaptive
:
true
,
// 宽度自适应
toolItems
:
[
// 工具栏
{
label
:
"测试2"
,
icon
:
""
,
type
:
"text"
,
isHide
:
false
,
// 是否隐藏
disabled
:
false
,
// 是否禁用
click
:
()
=>
{
alert
(
"测试2"
);
}
}
],
handleColumns
:
[
// 操作栏
{
label
:
"测试1"
,
icon
:
""
,
isHide
:
false
,
// 是否隐藏
type
:
"text"
,
disabled
:
false
,
// 是否禁用
click
:
()
=>
{
alert
(
"测试"
);
}
},
},
{
label
:
"测试2"
,
icon
:
""
,
isHide
:
false
,
// 是否隐藏
type
:
"text"
,
disabled
:
false
,
// 是否禁用
click
:
()
=>
{
this
.
allSourceData
.
sourceData
.
push
({});
}
}
],
columnsConfig
:
[
// 列信息
{
prop
:
"order_size"
,
//对应后端的字段
label
:
"型号"
,
// 列名
showOverflowTooltip
:
true
,
// 超出时 显示省略
showType
:
"hsSelectPlus"
,
// 列类型
allSourceData
:
{
allSourceData
:
{
// 参照配置
config
:
{
config
:
{
url
:
""
,
url
:
""
,
isInnerRequest
:
true
,
// 静态查询时 是否在内部请求数据
isInnerRequest
:
true
,
// 是否在内部请求
proxyTag
:
"commonUtilAPI"
,
//
代理前缀
proxyTag
:
"commonUtilAPI"
,
//
代理前缀
ref
:
{
ref
:
{
const_id
:
"0"
,
// 常量id
const_id
:
"0"
,
// 常量值
table_name
:
"mmMaterialCategory
"
,
// 表名
table_name
:
"im_store_group
"
,
// 表名
columns
:
"id,material_category"
,
// 查询列
columns
:
"id,name"
,
//列名
remote_condition
:
"material_category"
,
// 远程搜索字段
remote_condition
:
""
,
// 是否远程搜索
displayfield
:
""
,
// 显示默认值
displayfield
:
""
,
// 显示默认值
writebackfield
:
[]
// 回写对象
writebackfield
:
[]
//回写字段
},
},
multiple
:
false
,
dyncQueryParms
:
{},
// 查询参数
is_computed
:
false
,
multiple
:
false
,
// 是否多选
disabled
:
false
,
disabled
:
false
,
size
:
"mini"
,
size
:
"mini"
,
clearable
:
true
,
clearable
:
true
,
title
:
""
,
title
:
""
,
placeholder
:
""
,
placeholder
:
"请选择"
,
value
:
"id"
,
value
:
"id"
,
// 对应的后端字段
label
:
"material_category"
,
label
:
"name"
,
// 对应的后端字段
linkBtnUi
:
{
is_computed
:
false
// 是否是计算属性
url
:
},
"http://47.110.145.204:59168/queryBi/web//#/DyncUI/Single/PBArchive/pb_unit"
,
sourceData
:
[]
writeProp
:
{
test_p
:
"unit_name"
// 后面这个值是弹出页面返回过来的字段,回写给writeBackObject中的某个属性
},
},
parms
:
{}
requestMethod
:
this
.
requestMethod
// 参照请求方法
},
{
prop
:
"style_code"
,
label
:
"款号"
,
showOverflowTooltip
:
true
,
showType
:
"input"
// 普通输入框
},
{
prop
:
"customer_name"
,
label
:
"客户"
,
showOverflowTooltip
:
true
,
showType
:
"text"
// 文本
}
}
]
},
},
sourceData
:
[]
// [{value:'',lable:''}] 的形式
sourceData
:
[]
//表格数据
}
}
};
};
},
},
mounted
()
{},
mounted
()
{
this
.
init
();
},
methods
:
{
methods
:
{
printResult
()
{
init
()
{
console
.
log
(
this
.
formData
);
this
.
allSourceData
.
sourceData
=
[
{
customer_name
:
1
,
style_code
:
2
,
order_size
:
"0"
,
_styleRowSetting_
:{
"color"
:
"blue"
,
"background"
:
"red"
}
},
{
customer_name
:
1
,
style_code
:
2
,
order_size
:
"0"
,
_styleRowSetting_
:{
"color"
:
"blue"
,
"background"
:
"blue"
}
}
];
}
}
}
}
};
};
</
script
>
</
script
>
\ No newline at end of file
<
style
scoped
>
.codeTxt
{
text-align
:
left
;
}
</
style
>
\ No newline at end of file
src/components/apiUc.js
View file @
9059f971
...
@@ -104,6 +104,9 @@ export default {
...
@@ -104,6 +104,9 @@ export default {
return
url
return
url
}
}
}
}
},
uploadFileFun
(
appCode
,
formData
)
{
return
axios
.
post
(
`fileresourceAPI/file/
${
appCode
}
/`
,
formData
)
}
}
},
},
}
}
src/packages/hs-file/index.vue
View file @
9059f971
This diff is collapsed.
Click to expand it.
src/packages/hs-select-plus/index.vue
View file @
9059f971
...
@@ -278,7 +278,6 @@ export default {
...
@@ -278,7 +278,6 @@ export default {
this
.
dialogIframeVisible
=
false
;
this
.
dialogIframeVisible
=
false
;
},
},
linkBtnUiBack
(
data
)
{
linkBtnUiBack
(
data
)
{
debugger
;
const
linkBtnUi
=
this
.
configData
.
linkBtnUi
;
const
linkBtnUi
=
this
.
configData
.
linkBtnUi
;
if
(
!
linkBtnUi
)
return
;
if
(
!
linkBtnUi
)
return
;
const
writeProp
=
linkBtnUi
.
writeProp
||
{};
const
writeProp
=
linkBtnUi
.
writeProp
||
{};
...
@@ -510,7 +509,6 @@ export default {
...
@@ -510,7 +509,6 @@ export default {
},
},
select_focus
(
event
)
{
select_focus
(
event
)
{
const
{
remote_condition
}
=
this
.
configData
.
ref
;
const
{
remote_condition
}
=
this
.
configData
.
ref
;
debugger
;
if
(
remote_condition
&&
!
this
.
is_mock
)
{
if
(
remote_condition
&&
!
this
.
is_mock
)
{
this
.
remoteMethod_
();
this
.
remoteMethod_
();
}
}
...
...
src/packages/hs-table/index.vue
View file @
9059f971
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
:data=
"this.tableData"
:data=
"this.tableData"
:style=
"tableStyle"
:style=
"tableStyle"
:fit=
'true'
:fit=
'true'
:highlight-current-row=
true
:highlight-current-row=
'configData.highlightCurrentRow'
:show-summary=
'showSummary'
:show-summary=
'showSummary'
:header-row-style=
"setHeaderRowStyle"
:header-row-style=
"setHeaderRowStyle"
:header-cell-style=
"setHeaderCellStyle"
:header-cell-style=
"setHeaderCellStyle"
...
@@ -483,7 +483,8 @@ export default {
...
@@ -483,7 +483,8 @@ export default {
tableDataFirst
:
null
,
// table[0]第一行数据
tableDataFirst
:
null
,
// table[0]第一行数据
hsDyncProp
:
false
,
// 是否含有动态列
hsDyncProp
:
false
,
// 是否含有动态列
targetRowInner
:
{},
// 当前行
targetRowInner
:
{},
// 当前行
dtlDialogFormDisAbled
:
false
dtlDialogFormDisAbled
:
false
,
highlightCurrentRow
:
true
};
};
},
},
watch
:
{
watch
:
{
...
@@ -1560,6 +1561,7 @@ export default {
...
@@ -1560,6 +1561,7 @@ export default {
},
},
// 鼠标移入事件
// 鼠标移入事件
tableCellmouse
(
row
,
column
,
cell
,
event
)
{
tableCellmouse
(
row
,
column
,
cell
,
event
)
{
return
if
(
this
.
configData
.
hover
)
{
if
(
this
.
configData
.
hover
)
{
const
{
hoverBackground
}
=
this
.
configData
.
hover
;
const
{
hoverBackground
}
=
this
.
configData
.
hover
;
if
(
hoverBackground
)
{
if
(
hoverBackground
)
{
...
...
src/packages/hs-table/mes_style.js
View file @
9059f971
...
@@ -3,6 +3,7 @@ export default {
...
@@ -3,6 +3,7 @@ export default {
background
:
'red'
background
:
'red'
},
},
'showHandle'
:
false
,
'showHandle'
:
false
,
highlightCurrentRow
:
true
,
handleWidth
:
80
,
handleWidth
:
80
,
selection
:
false
,
selection
:
false
,
showIndex
:
true
,
showIndex
:
true
,
...
...
vue.config.js
View file @
9059f971
...
@@ -68,6 +68,13 @@ module.exports = {
...
@@ -68,6 +68,13 @@ module.exports = {
'^/api'
:
''
'^/api'
:
''
}
}
},
},
'/fileresourceAPI'
:
{
target
:
fileresourceAPI
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/fileresourceAPI'
:
''
}
},
'/commonUtilAPI'
:
{
'/commonUtilAPI'
:
{
target
:
commonUtilAPI
,
target
:
commonUtilAPI
,
changeOrigin
:
true
,
changeOrigin
:
true
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment