Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
fc9cc84a
Commit
fc9cc84a
authored
Aug 19, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整工作中心UI
parent
37b529ee
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
12 deletions
+78
-12
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
...essPlatform/ViewController/工作中心/WorkCViewController.swift
+60
-11
GeliBusinessPlatform/ViewController/工作中心/WorkItemTableViewCell.swift
...sPlatform/ViewController/工作中心/WorkItemTableViewCell.swift
+2
-0
GeliBusinessPlatform/ViewController/工作中心/WorkItemTableViewCell.xib
...essPlatform/ViewController/工作中心/WorkItemTableViewCell.xib
+16
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
fc9cc84a
No preview for this file type
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
View file @
fc9cc84a
...
...
@@ -14,7 +14,9 @@ import SwiftyJSON
class
WorkCViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
WorkSelectTimeViewDelegate
,
WorkItemTableViewCellDelegate
,
EditWorkCViewControllerDelegate
,
GeliAlertViewDelegate
{
//MARK:--一级分类
var
titleStrArr
:[
String
]
=
[]
var
pAuthResModelArr
:[
WorkcenterIndexAuthResModel
]
=
[]
@IBOutlet
weak
var
topNavBtn
:
UIButton
!
@IBOutlet
weak
var
contentView
:
UIView
!
...
...
@@ -39,9 +41,6 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
super
.
viewDidLoad
()
setTabv
()
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
jpushServiceNotification(notion:)
)
,
name
:
NSNotification
.
Name
(
rawValue
:
"jpushServiceNotification2"
),
object
:
nil
)
...
...
@@ -244,6 +243,28 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
UserDefaults
.
standard
.
set
(
userDataStr
,
forKey
:
"WorkDataModel"
)
UserDefaults
.
standard
.
synchronize
()
self
.
titleStrArr
.
removeAll
()
self
.
pAuthResModelArr
.
removeAll
()
self
.
dataModel
?
.
auth_res
?
.
forEach
({
(
md
)
in
if
md
.
auth_pid
==
0
{
var
chlicdAuthResModelArr
:[
WorkcenterIndexAuthResModel
]
=
[]
let
pAuthModel
=
md
//父model
self
.
dataModel
?
.
auth_res
?
.
forEach
({
(
model
)
in
//子model
if
pAuthModel
.
auth_id
==
model
.
auth_pid
{
chlicdAuthResModelArr
.
append
(
md
)
}
})
if
chlicdAuthResModelArr
.
count
>
0
{
self
.
titleStrArr
.
append
(
md
.
auth_name
!
)
self
.
pAuthResModelArr
.
append
(
md
)
}
}
})
self
.
tableV
.
reloadData
()
}
self
.
tableV
.
mj_header
?
.
endRefreshing
()
...
...
@@ -252,11 +273,12 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
}
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
dataModel
==
nil
{
return
0
}
return
4
return
3
+
pAuthResModelArr
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
...
...
@@ -272,6 +294,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
return
cell
}
else
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"WorkItemTableViewCell"
)
as!
WorkItemTableViewCell
cell
.
cellHeaderHeight
.
constant
=
CGFloat
(
15
)
cell
.
headerLeftLineV
.
isHidden
=
true
//下面这两个语句一定要添加,否则第一屏显示的collection view尺寸,以及里面的单元格位置会不正确
cell
.
frame
=
tableView
.
bounds
cell
.
delegate
=
self
...
...
@@ -299,21 +323,26 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
cell
.
reloadData
(
title
:
arr
[
indexPath
.
row
-
1
],
items
:
tempArr
)
break
case
3
:
default
:
var
tempArr
:[
String
]
=
[]
var
itemDataArrs
:[
WorkcenterIndexAuthResModel
]
=
[]
self
.
dataModel
?
.
auth_res
?
.
forEach
({
(
md
)
in
if
md
.
auth_pid
!=
0
{
let
pAuthModel
=
pAuthResModelArr
[
indexPath
.
row
-
3
]
//父model
self
.
dataModel
?
.
auth_res
?
.
forEach
({
(
md
)
in
//子model
if
pAuthModel
.
auth_id
==
md
.
auth_pid
{
tempArr
.
append
(
md
.
auth_name
!
)
itemDataArrs
.
append
(
md
)
}
})
cell
.
itemDataArrs
=
itemDataArrs
cell
.
reloadData
(
title
:
arr
[
indexPath
.
row
-
1
],
items
:
tempArr
)
break
cell
.
reloadData
(
title
:
pAuthModel
.
auth_name
!
,
items
:
tempArr
)
if
indexPath
.
row
!=
3
{
cell
.
cellHeaderHeight
.
constant
=
CGFloat
(
1
)
cell
.
headerLeftLineV
.
isHidden
=
false
}
default
:
break
}
return
cell
...
...
@@ -625,6 +654,26 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self
.
oftenArr
?
.
removeAll
()
self
.
oftenArr
=
Array
<
WorkcenterIndexAuthResModel
>
(
JSONString
:
oftenStr
!
)
}
self
.
titleStrArr
.
removeAll
()
self
.
pAuthResModelArr
.
removeAll
()
self
.
dataModel
?
.
auth_res
?
.
forEach
({
(
md
)
in
if
md
.
auth_pid
==
0
{
var
chlicdAuthResModelArr
:[
WorkcenterIndexAuthResModel
]
=
[]
let
pAuthModel
=
md
//父model
self
.
dataModel
?
.
auth_res
?
.
forEach
({
(
model
)
in
//子model
if
pAuthModel
.
auth_id
==
model
.
auth_pid
{
chlicdAuthResModelArr
.
append
(
md
)
}
})
if
chlicdAuthResModelArr
.
count
>
0
{
self
.
titleStrArr
.
append
(
md
.
auth_name
!
)
self
.
pAuthResModelArr
.
append
(
md
)
}
}
})
self
.
tableV
.
reloadData
()
}
else
{
print
(
"没有数据hehe--"
)
...
...
GeliBusinessPlatform/ViewController/工作中心/WorkItemTableViewCell.swift
View file @
fc9cc84a
...
...
@@ -21,6 +21,8 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
@IBOutlet
weak
var
gotoImgV
:
UIImageView
!
var
dataModel
:
WorkcenterIndexDataModel
?
=
nil
@IBOutlet
weak
var
headerLeftLineV
:
UIView
!
@IBOutlet
weak
var
cellHeaderHeight
:
NSLayoutConstraint
!
var
dataIndexSection
=
0
//数据
var
itemArrs
:[
String
]
=
[]
...
...
GeliBusinessPlatform/ViewController/工作中心/WorkItemTableViewCell.xib
View file @
fc9cc84a
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16097"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16097
.2
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<deployment
identifier=
"iOS"
/>
...
...
@@ -57,11 +57,21 @@
</attributedString>
<nil
key=
"highlightedColor"
/>
</label>
<view
hidden=
"YES"
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"c96-cW-eMw"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"15"
height=
"1"
/>
<color
key=
"backgroundColor"
name=
"白色背景色"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"15"
id=
"UKJ-QV-ncL"
/>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"fvs-sZ-6mf"
/>
</constraints>
</view>
</subviews>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"U2a-kl-3Rs"
secondAttribute=
"trailing"
id=
"638-Yz-CeV"
/>
<constraint
firstItem=
"c96-cW-eMw"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"CqF-jY-SlM"
/>
<constraint
firstItem=
"j1a-a2-V8p"
firstAttribute=
"top"
secondItem=
"U2a-kl-3Rs"
secondAttribute=
"bottom"
id=
"DGo-Kv-a2w"
/>
<constraint
firstItem=
"j1a-a2-V8p"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
id=
"E4F-HD-NeP"
/>
<constraint
firstItem=
"c96-cW-eMw"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
id=
"GBY-nd-0j0"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"j1a-a2-V8p"
secondAttribute=
"bottom"
id=
"N7G-JE-GMy"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"dum-a9-xsC"
secondAttribute=
"trailing"
constant=
"15"
id=
"NZp-Yo-rhh"
/>
<constraint
firstItem=
"U2a-kl-3Rs"
firstAttribute=
"top"
secondItem=
"Ihn-Ad-uPT"
secondAttribute=
"bottom"
constant=
"15"
id=
"UiX-Hp-vmw"
/>
...
...
@@ -76,9 +86,11 @@
<gestureRecognizers/>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"cellHeaderHeight"
destination=
"ERR-BB-bri"
id=
"zqE-s5-ybd"
/>
<outlet
property=
"collectionView"
destination=
"j1a-a2-V8p"
id=
"Tgt-LU-8iy"
/>
<outlet
property=
"collectionViewHeight"
destination=
"v8g-As-Pb6"
id=
"mea-yU-erh"
/>
<outlet
property=
"gotoImgV"
destination=
"dum-a9-xsC"
id=
"oxC-Yd-2dT"
/>
<outlet
property=
"headerLeftLineV"
destination=
"c96-cW-eMw"
id=
"prF-bc-iJd"
/>
<outlet
property=
"titleLbl"
destination=
"U2a-kl-3Rs"
id=
"pbp-im-yey"
/>
</connections>
<point
key=
"canvasLocation"
x=
"170.28985507246378"
y=
"87.053571428571431"
/>
...
...
@@ -92,5 +104,8 @@
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"白色背景色"
>
<color
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</resources>
</document>
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