Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
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
mobile-group
galaxy-iOS
Commits
b69179bf
Commit
b69179bf
authored
Aug 01, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 原则批
parent
d7190bc2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
23 deletions
+90
-23
YHPrincipleReviewListVC.swift
...(客服段)/PrincipleBatch(原则批)/C/YHPrincipleReviewListVC.swift
+29
-13
YHPrincipleUnapprovedCell.swift
...服段)/PrincipleBatch(原则批)/V/YHPrincipleUnapprovedCell.swift
+56
-4
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+5
-6
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService(客服段)/PrincipleBatch(原则批)/C/YHPrincipleReviewListVC.swift
View file @
b69179bf
...
...
@@ -24,7 +24,7 @@ class YHPrincipleReviewListVC: YHBaseViewController {
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
YHPrincipleGroupReviewListCell
.
self
,
forCellReuseIdentifier
:
YHPrincipleGroupReviewListCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHPrincipleGroupUploadCell
.
self
,
forCellReuseIdentifier
:
YHPrincipleGroupUploadCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHPrincipleUnapprovedCell
.
self
,
forCellReuseIdentifier
:
YHPrincipleUnapprovedCell
.
cellReuseIdentifier
)
return
tableView
}()
...
...
@@ -81,24 +81,40 @@ extension YHPrincipleReviewListVC: UITableViewDelegate, UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
indexPath
.
section
%
2
==
0
{
if
indexPath
.
section
%
3
==
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHPrincipleGroupUploadCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHPrincipleGroupUploadCell
return
cell
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHPrincipleGroupReviewListCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHPrincipleGroupReviewListCell
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
let
model
=
items
[
indexPath
.
section
]
cell
.
updateModel
(
model
)
cell
.
expandClick
=
{
[
weak
self
]
isExpand
in
guard
let
self
=
self
else
{
return
}
model
.
isExpand
=
isExpand
self
.
tableView
.
reloadData
()
}
else
if
indexPath
.
section
%
3
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHPrincipleGroupReviewListCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHPrincipleGroupReviewListCell
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
let
model
=
items
[
indexPath
.
section
]
cell
.
updateModel
(
model
)
cell
.
expandClick
=
{
[
weak
self
]
isExpand
in
guard
let
self
=
self
else
{
return
}
model
.
isExpand
=
isExpand
self
.
tableView
.
reloadData
()
}
}
return
cell
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHPrincipleUnapprovedCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHPrincipleUnapprovedCell
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
let
model
=
items
[
indexPath
.
section
]
cell
.
updateModel
(
model
)
cell
.
expandClick
=
{
[
weak
self
]
isExpand
in
guard
let
self
=
self
else
{
return
}
model
.
isExpand
=
isExpand
self
.
tableView
.
reloadData
()
}
}
return
cell
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService(客服段)/PrincipleBatch(原则批)/V/YHPrincipleUnapprovedCell.swift
View file @
b69179bf
...
...
@@ -10,6 +10,8 @@ import UIKit
class
YHPrincipleUnapprovedItemView
:
UIView
{
static
let
viewH
:
CGFloat
=
20.0
lazy
var
pointView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
brandMainColor
(
alpha
:
0.16
)
...
...
@@ -74,6 +76,9 @@ class YHPrincipleUnapprovedItemView: UIView {
class
YHPrincipleUnapprovedCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHPrincipleUnapprovedCell"
var
itemModel
:
YHPrincleGroupModel
?
var
items
:
[
String
]
=
[]
var
expandClick
:((
Bool
)
->
())?
lazy
var
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
...
...
@@ -107,16 +112,42 @@ class YHPrincipleUnapprovedCell: UITableViewCell {
lazy
var
expandBtn
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
setImage
(
UIImage
(
named
:
"custom_service_expand_0"
),
for
:
.
normal
)
btn
.
addTarget
(
self
,
action
:
#selector(
didExpandBtnClicked
)
,
for
:
.
touchUpInside
)
return
btn
}()
func
updateModel
(
_
model
:
YHPrincleGroupModel
)
{
itemModel
=
model
items
.
removeAll
()
items
.
append
(
contentsOf
:
model
.
fileList
)
whiteView
.
isHidden
=
!
model
.
isExpand
let
imgName
=
model
.
isExpand
?
"custom_service_expand_1"
:
"custom_service_expand_0"
expandBtn
.
setImage
(
UIImage
(
named
:
imgName
),
for
:
.
normal
)
expandBtn
.
isHidden
=
items
.
count
<=
0
if
!
model
.
isExpand
||
items
.
count
<=
0
{
whiteView
.
removeSubviews
()
whiteView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
0.0
)
make
.
height
.
equalTo
(
0.0
)
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
bottom
.
equalTo
(
-
32
)
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
return
}
whiteView
.
removeSubviews
()
whiteView
.
addSubview
(
self
.
listTitleLabel
)
listTitleLabel
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
16
)
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
}
whiteView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
16.0
)
make
.
left
.
equalTo
(
20
)
...
...
@@ -124,6 +155,22 @@ class YHPrincipleUnapprovedCell: UITableViewCell {
make
.
bottom
.
equalTo
(
-
32
)
}
var
lastItemView
:
UIView
=
listTitleLabel
for
(
index
,
title
)
in
items
.
enumerated
()
{
let
itemView
=
YHPrincipleUnapprovedItemView
(
frame
:
.
zero
)
whiteView
.
addSubview
(
itemView
)
itemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
YHPrincipleUnapprovedItemView
.
viewH
)
make
.
top
.
equalTo
(
lastItemView
.
snp
.
bottom
)
.
offset
(
16.0
)
if
index
==
items
.
count
-
1
{
make
.
bottom
.
equalTo
(
-
16.0
)
}
}
lastItemView
=
itemView
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
...
...
@@ -137,6 +184,11 @@ class YHPrincipleUnapprovedCell: UITableViewCell {
setupUI
()
}
@objc
func
didExpandBtnClicked
()
{
guard
let
model
=
itemModel
else
{
return
}
expandClick
?(
!
model
.
isExpand
)
}
func
setupUI
()
{
self
.
selectionStyle
=
.
none
...
...
@@ -156,7 +208,7 @@ class YHPrincipleUnapprovedCell: UITableViewCell {
make
.
left
.
equalTo
(
iconImgView
.
snp
.
right
)
.
offset
(
6
)
make
.
right
.
equalTo
(
expandBtn
.
snp
.
left
)
make
.
top
.
equalTo
(
0
)
make
.
height
.
equalTo
(
2
2
)
make
.
height
.
equalTo
(
2
0
)
}
expandBtn
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
b69179bf
...
...
@@ -280,12 +280,11 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
return
}
if
true
{
// YHPrincipleReviewListVC
let
vc
=
YHPrincipleReviewListVC
()
self
.
navigationController
?
.
pushViewController
(
vc
)
return
}
// if true {
// let vc = YHPrincipleReviewListVC()
// self.navigationController?.pushViewController(vc)
// return
// }
let
item
:
PersonalModuleItem
=
items
[
indexPath
.
row
]
switch
item
.
type
{
...
...
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