Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
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
李俊赕
self-support
Commits
5207db1a
Commit
5207db1a
authored
Jun 16, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件页面交互优化
parent
6f49d738
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
14 deletions
+36
-14
document.vue
src/pages/order/document.vue
+36
-14
No files found.
src/pages/order/document.vue
View file @
5207db1a
...
@@ -9,20 +9,25 @@
...
@@ -9,20 +9,25 @@
<!-- 合作商或品牌 -->
<!-- 合作商或品牌 -->
<view>
{{
items
[
key
]
}}
</view>
<view>
{{
items
[
key
]
}}
</view>
<!-- 跳转到所有标签页面的更多按钮 -->
<!-- 跳转到所有标签页面的更多按钮 -->
<view
class=
"label-file-right"
@
click=
"handleMore(key)"
>
<view
class=
"label-file-right"
@
click=
"handleMore(key)"
v-if=
"item.length > 3"
>
<text
class=
"label-right-text"
>
更多
</text>
<text
class=
"label-right-text"
>
更多
</text>
<u-icon
name=
"arrow-right"
></u-icon>
<u-icon
name=
"arrow-right"
></u-icon>
</view>
</view>
</view>
</view>
<view
class=
"label-content"
v-if=
"item.length > 0"
>
<view
class=
"label-content"
>
<view
v-for=
"(label, ind) in item"
:key=
"ind"
class=
"label-item"
>
<view
v-for=
"(label, ind) in item"
:key=
"ind"
class=
"label-item"
>
<!-- 选中为蓝底,非选中状态为灰底 -->
<!-- 选中为蓝底,非选中状态为灰底 -->
<view
:class=
"['label-normal',
{'selected': label.id == selected[key].id}]" @click="handleClick(key, label)">
<view
:class=
"['label-normal',
{'selected': label.id == selected[key].id}]" @click="handleClick(key, label)">
<text
class=
"label-text"
>
{{
label
.
name
}}
</text>
<text
class=
"label-text"
>
{{
label
.
name
}}
</text>
</view>
</view>
</view>
</view>
<!-- 标签加载中 -->
<view
class=
"tag-loading-view"
v-if=
"tapLoading[key]"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<!-- 无供应商、无品牌 -->
<view
class=
"tag-tip-view"
v-else-if=
"item.length
<
=
0
"
>
{{
'暂无'
+
items
[
key
]
}}
</view>
</view>
</view>
<view
class=
"tag-tip-view"
v-else
>
{{
'暂无'
+
items
[
key
]
}}
</view>
</view>
</view>
</
template
>
</
template
>
<view
class=
"file-title"
>
文件列表
</view>
<view
class=
"file-title"
>
文件列表
</view>
...
@@ -68,7 +73,11 @@
...
@@ -68,7 +73,11 @@
'1'
:
{},
// 选中的合作商
'1'
:
{},
// 选中的合作商
'2'
:
{}
// 选中的品牌
'2'
:
{}
// 选中的品牌
},
},
loading
:
false
,
// 文件列表加载中
loading
:
false
,
// 文件列表加载中
tapLoading
:
{
'1'
:
true
,
// 合作商加载中
'2'
:
true
// 品牌加载中
},
orderFile
:
false
,
// 是否是订单详情进来
orderFile
:
false
,
// 是否是订单详情进来
fileList
:
{},
// 文件地址缓存 {url最后一段: tmpPath}
fileList
:
{},
// 文件地址缓存 {url最后一段: tmpPath}
};
};
...
@@ -141,7 +150,7 @@
...
@@ -141,7 +150,7 @@
methods
:
{
methods
:
{
// 选中标签
// 选中标签
handleClick
(
key
,
label
)
{
handleClick
(
key
,
label
)
{
this
.
selected
[
key
]
=
label
this
.
selected
[
key
]
=
label
if
(
key
==
'1'
)
{
// 合作商
if
(
key
==
'1'
)
{
// 合作商
this
.
selected
[
'2'
]
=
{}
// 清空选中品牌标签
this
.
selected
[
'2'
]
=
{}
// 清空选中品牌标签
this
.
list
=
[]
// 清空文件列表
this
.
list
=
[]
// 清空文件列表
...
@@ -258,14 +267,16 @@
...
@@ -258,14 +267,16 @@
}
}
},
},
// 获取合作商或品牌列表
// 获取合作商或品牌列表
async
loadFileLabel
(
type
,
partnerCompanyId
)
{
async
loadFileLabel
(
type
,
partnerCompanyId
)
{
this
.
tapLoading
[
type
]
=
true
let
param
=
{
let
param
=
{
type
:
type
,
// 1:合作商标签,2:品牌标签
type
:
type
,
// 1:合作商标签,2:品牌标签
}
}
if
(
type
==
'2'
)
{
if
(
type
==
'2'
)
{
param
.
partnerCompanyId
=
partnerCompanyId
// 合作商的标签id
param
.
partnerCompanyId
=
partnerCompanyId
// 合作商的标签id
}
}
let
res
=
await
this
.
$u
.
api
.
fileLabel
(
param
)
let
res
=
await
this
.
$u
.
api
.
fileLabel
(
param
)
this
.
tapLoading
[
type
]
=
false
if
(
res
&&
res
.
code
==
200
)
{
if
(
res
&&
res
.
code
==
200
)
{
this
.
labels
[
type
]
=
res
.
data
||
[]
this
.
labels
[
type
]
=
res
.
data
||
[]
...
@@ -378,13 +389,24 @@
...
@@ -378,13 +389,24 @@
}
}
}
}
}
}
.tag-loading-view
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
20rpx
;
position
:
absolute
;
padding-right
:
30rpx
;
}
.tag-tip-view
{
color
:
#999999
;
width
:
100%
;
margin-top
:
30rpx
;
text-align
:
center
;
position
:
absolute
;
padding-right
:
30rpx
;
}
}
}
.tag-tip-view
{
color
:
#999999
;
width
:
100%
;
margin-top
:
30rpx
;
text-align
:
center
;
}
}
}
}
}
...
...
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