Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
Sign in / Register
Toggle navigation
S
site-uniapp
概览
Overview
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
王柯
site-uniapp
Commits
9d945799
提交
9d945799
authored
2月 01, 2023
作者:
wk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
初次验收问题修复:组织切换增加搜索(前端临时处理)
父级
7cde8089
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
183 行增加
和
8 行删除
+183
-8
api/api.js
+1
-1
pages/mine/changeOrg/changeOrg.vue
+127
-5
pages/mine/mine.vue
+55
-2
没有找到文件。
api/api.js
View file @
9d945799
...
...
@@ -43,7 +43,7 @@ const params = {
method
:
"post"
},
sendCode
:
{
url
:
"/api/v1/access/login/
create
_validate_code"
,
url
:
"/api/v1/access/login/
send
_validate_code"
,
method
:
"post"
},
//获取省市区
...
...
pages/mine/changeOrg/changeOrg.vue
View file @
9d945799
<
template
>
<view
class=
"content"
>
<titleBar
title=
"切换组织"
></titleBar>
<view
class=
"search"
>
<view
class=
"search-content"
>
<image
src=
"../../../static/ic-search.png"
class=
"image"
></image>
<input
placeholder=
"搜索"
placeholder-class=
"placeholderStyle"
@
input=
"search"
class=
"inputStyle"
/>
</view>
</view>
<view
class=
"org-content"
>
<view
class=
"org-list"
>
<view
class=
"org-item"
v-for=
"(tree,index) in trees"
:key=
"index"
>
...
...
@@ -45,7 +51,8 @@
export
default
{
data
()
{
return
{
trees
:
[]
trees
:
[],
temp
:
[]
}
},
onLoad
()
{
...
...
@@ -73,11 +80,12 @@
if
(
result
.
code
==
0
)
{
var
list
=
result
.
data
.
list
if
(
list
&&
list
.
length
>
0
)
{
if
(
list
[
0
].
no
==
'001'
)
{
//
if (list[0].no == '001') {
this
.
trees
=
list
[
0
].
children_list
}
else
{
this
.
trees
=
list
}
// } else {
// this.trees = list
// }
this
.
temp
=
list
[
0
].
children_list
}
}
})
...
...
@@ -140,6 +148,65 @@
delta
:
1
})
},
search
(
e
)
{
var
key
=
e
.
detail
.
value
if
(
key
)
{
var
list
=
[]
var
sourceData
=
this
.
temp
console
.
log
(
"数据源"
,
sourceData
);
sourceData
.
forEach
((
item
)
=>
{
if
(
item
.
name
.
indexOf
(
key
)
!=
-
1
)
{
item
.
isOpen
=
true
list
.
push
(
item
)
}
else
{
var
children
=
item
.
children_list
var
childrens
=
[]
if
(
children
)
{
children
.
forEach
((
child
)
=>
{
if
(
child
.
name
.
indexOf
(
key
)
!=
-
1
)
{
child
.
isOpen
=
true
var
childs
=
child
.
children_list
var
childList
=
[]
if
(
childs
)
{
childs
.
forEach
((
childItem
)
=>
{
if
(
childItem
.
name
.
indexOf
(
key
)
!=
-
1
)
{
childList
.
push
(
childItem
)
}
})
}
child
.
children_list
=
childList
childrens
.
push
(
child
)
}
else
{
var
childs
=
child
.
children_list
var
childList
=
[]
if
(
childs
)
{
childs
.
forEach
((
childItem
)
=>
{
if
(
childItem
.
name
.
indexOf
(
key
)
!=
-
1
)
{
childList
.
push
(
childItem
)
}
})
}
if
(
childList
.
length
>
0
)
{
child
.
children_list
=
childList
child
.
isOpen
=
true
childrens
.
push
(
child
)
}
}
})
}
if
(
childrens
.
length
>
0
)
{
item
.
isOpen
=
true
item
.
children_list
=
childrens
list
.
push
(
item
)
}
}
})
this
.
trees
=
list
}
else
{
this
.
getOrgTree
()
}
}
}
}
</
script
>
...
...
@@ -149,6 +216,61 @@
display
:
flex
;
flex-direction
:
column
;
.search
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
margin
:
30
rpx
30
rpx
0
30
rpx
;
.search-content
{
display
:
flex
;
flex-direction
:
row
;
border
:
1
rpx
solid
#656565
;
height
:
30px
;
width
:
690
rpx
;
border-radius
:
30
rpx
;
align-items
:
center
;
image
{
width
:
24
rpx
;
margin-left
:
30
rpx
;
height
:
24
rpx
;
}
.placeholderStyle
{
font-size
:
24
rpx
;
color
:
#999
;
}
.inputStyle
{
font-size
:
24
rpx
;
margin-left
:
20
rpx
;
color
:
#333
;
}
}
.order-content
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
margin
:
0
30
rpx
;
text
{
font-weight
:
400
;
font-size
:
14px
;
line-height
:
20px
;
text-align
:
center
;
color
:
#656565
;
}
image
{
width
:
28px
;
height
:
14px
;
}
}
}
.org-content
{
display
:
flex
;
flex-direction
:
column
;
...
...
pages/mine/mine.vue
View file @
9d945799
...
...
@@ -24,7 +24,7 @@
<view
class=
"line"
v-if=
"false"
></view>
<view
class=
"item"
@
click=
"linkTo('/pages/mine/myApproval/myApproval')"
v-if=
"isShow('我的审批')"
>
<view
class=
"name"
>
我的审批
</view>
<view
class=
"red-dot"
></view>
<view
class=
"red-dot"
v-if=
"count>0"
></view>
<image
src=
"../../static/right-arrow.png"
class=
"image"
></image>
</view>
<view
class=
"line"
v-if=
"isShow('我的审批')"
></view>
...
...
@@ -52,6 +52,7 @@
</
template
>
<
script
>
import
Api
from
'../../api/api.js'
export
default
{
data
()
{
return
{
...
...
@@ -64,7 +65,9 @@
}
},
menus
:
[],
role
:
"VISITOR"
role
:
"VISITOR"
,
mDatas
:
[],
count
:
0
}
},
onLoad
()
{
...
...
@@ -85,6 +88,7 @@
this
.
currentJob
=
job
this
.
menus
=
getApp
().
globalData
.
authMenus
this
.
role
=
this
.
userInfo
.
identity
.
code
this
.
getComNoApproval
()
},
methods
:
{
isShow
(
name
)
{
...
...
@@ -155,7 +159,56 @@
uni
.
navigateTo
({
url
:
router
,
})
},
//前端临时处理
getComNoApproval
()
{
Api
.
getExamineList
({
data
:
{
dept_type
:
1
,
is_page
:
0
,
},
}).
then
((
result
)
=>
{
console
.
log
(
"公司申请列表"
,
result
);
if
(
result
.
code
==
0
)
{
if
(
result
.
data
.
list
.
length
>
0
)
{
this
.
mDatas
=
result
.
data
.
list
}
this
.
getProjectNoApproval
()
}
else
{
this
.
$toast
.
showToast
(
result
.
msg
)
}
})
},
getProjectNoApproval
()
{
Api
.
getExamineList
({
data
:
{
dept_type
:
2
,
is_page
:
0
,
},
}).
then
((
result
)
=>
{
console
.
log
(
"公司申请列表"
,
result
);
if
(
result
.
code
==
0
)
{
if
(
result
.
data
.
list
.
length
>
0
)
{
this
.
mDatas
=
this
.
mDatas
.
concat
(
result
.
data
.
list
)
this
.
dealStatus
()
}
}
else
{
this
.
$toast
.
showToast
(
result
.
msg
)
}
})
},
dealStatus
()
{
this
.
count
=
0
var
noApprovalList
=
this
.
mDatas
.
filter
(
item
=>
item
.
status
==
'2'
)
noApprovalList
.
forEach
((
item
)
=>
{
if
(
this
.
leaveTime
(
item
.
create_time
)
!=
'0秒'
)
{
count
++
}
})
},
leaveTime
(
time
)
{
return
this
.
$date
.
timeDiff
(
this
.
$date
.
getEndTime
(
time
),
false
)
},
}
}
</
script
>
...
...
Write
Preview
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
Please
register
or
sign in
to comment