Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
bfa7d813
Commit
bfa7d813
authored
Mar 26, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除多余e页面
parent
4f3ca04f
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
189 additions
and
940 deletions
+189
-940
pages.json
take-order/pages.json
+3
-30
brand.vue
take-order/pages/photo/brand.vue
+0
-118
detail.vue
take-order/pages/photo/detail.vue
+0
-295
index.vue
take-order/pages/photo/index.vue
+186
-252
product.vue
take-order/pages/photo/product.vue
+0
-245
try - 副本.vue
take-order/pages/photo/try - 副本.vue
+0
-0
No files found.
take-order/pages.json
View file @
bfa7d813
...
...
@@ -6,19 +6,13 @@
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/photo/
product
"
,
"path"
:
"pages/photo/
index
"
,
"style"
:
{
"navigationBarTitleText"
:
"拍照小工具"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"backgroundColor"
:
"#F4F5F7"
}
},
{
"path"
:
"pages/photo/index"
,
"style"
:
{
"navigationBarTitleText"
:
"拍照小工具首页"
}
},
{
"path"
:
"pages/index/index"
,
"style"
:
{
...
...
@@ -141,16 +135,6 @@
"disableScroll"
:
true
}
},
{
"path"
:
"pages/photo/detail"
,
"style"
:
{
"navigationBarTitleText"
:
"图片展示"
,
"navigationBarBackgroundColor"
:
"#333333"
,
"navigationBarTextStyle"
:
"#FFFFFF"
,
"disableScroll"
:
true
}
},
{
"path"
:
"pages/photo/preview"
,
"style"
:
{
...
...
@@ -167,17 +151,6 @@
}
},
{
"path"
:
"pages/photo/brand"
,
"style"
:
{
"navigationBarTitleText"
:
"扳手会工单规范"
}
},
{
"path"
:
"pages/index/success"
,
"style"
:
{
...
...
@@ -278,8 +251,8 @@
"path"
:
"pages/settle/index"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},{
"name"
:
"拍照-
规范
"
,
//模式名称
"path"
:
"pages/photo/
take
"
,
//启动页面,必选
"name"
:
"拍照-
首页
"
,
//模式名称
"path"
:
"pages/photo/
index
"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},{
"name"
:
"基本信息"
,
//模式名称
...
...
take-order/pages/photo/brand.vue
deleted
100644 → 0
View file @
4f3ca04f
<
template
>
<view
class=
"backView"
>
<text
class=
"topTitle"
>
{{
product
}}
> 选择品牌
</text>
<view
class=
"u-p-b-48"
>
<view
class=
"itemView u-m-t-48"
@
click=
"itemClick(item)"
v-for=
"(item,ikey) in brandList"
:key=
"ikey"
>
<text
class=
"itemTitle"
>
{{
item
.
name
}}
</text>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
product_code
:
''
,
brandList
:[],
brand_code
:
''
,
product
:
''
,
brand
:
''
,
}
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'选择品牌页'
)
if
(
e
&&
e
.
product_code
){
this
.
product_code
=
e
.
product_code
}
if
(
e
&&
e
.
product
){
this
.
product
=
e
.
product
}
this
.
getBrandList
()
},
methods
:
{
getBrandList
:
function
()
{
let
that
=
this
this
.
$u
.
cloudApi
.
getBrand
({
product_code
:
this
.
product_code
}).
then
(
res
=>
{
console
.
log
(
'获取品牌数据:'
)
console
.
log
(
res
)
if
(
res
.
result
.
data
){
that
.
brandList
=
res
.
result
.
data
}
}
)
},
//选择 点击
itemClick
:
function
(
item
)
{
if
(
item
.
product_code
){
this
.
brand_code
=
item
.
code
}
if
(
item
.
name
){
this
.
brand
=
item
.
name
}
uni
.
navigateTo
({
url
:
'/pages/photo/list'
+
'?brand_code='
+
this
.
brand_code
+
'&brand='
+
this
.
brand
+
'&product_code='
+
this
.
product_code
+
'&product='
+
this
.
product
,
})
},
}
}
</
script
>
<
style
>
.backView
{
background-color
:
#FAFAFA
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.topTitle
{
margin-top
:
192
rpx
;
font-size
:
32
rpx
;
}
.itemView
{
background-color
:
#FFFFFF
;
width
:
548
rpx
;
height
:
96
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
border-style
:
solid
;
box-shadow
:
0px
2px
7px
0px
rgba
(
0
,
0
,
0
,
0.05
);
border-width
:
0
rpx
;
}
.itemTitle
{
font-size
:
32
rpx
;
font-weight
:
bold
;
}
</
style
>
take-order/pages/photo/detail.vue
deleted
100644 → 0
View file @
4f3ca04f
<
template
>
<view
class=
"backView"
>
<view
class=
"topView"
>
<!--text class="topTitle">示范照片 (
{{
currentNumber
}}
/
{{
totalNumber
}}
)
</text-->
</view>
<view
class=
"wrap"
>
<u-swiper
@
click=
"imageClick"
@
change=
"changeSwipter"
img-mode=
"aspectFit"
bg-color=
"#333333"
:height=
"600"
:list=
"swiperList"
:autoplay=
"false"
:circular=
'false'
mode=
"dot"
:current=
"done_count"
></u-swiper>
</view>
<view
class=
"bottomView"
>
<image
class=
"takeView"
:src=
"icon_gotake"
mode=
""
@
click=
"takeClick"
></image>
<image
class=
"backIcon"
:src=
"icon_arrow_down"
mode=
""
@
click=
"backClick"
></image>
</view>
</view>
</
template
>
<
script
>
import
uSwiper
from
'@/uview-ui/components/u-swiper/u-swiper'
export
default
{
components
:{
uSwiper
},
data
()
{
return
{
// background: ['color1', 'color2', 'color3'],
// indicatorDots: true,
// autoplay: true,
// interval: 2000,
// duration: 500,
image_count
:
1
,
current_count
:
1
,
current_image
:
''
,
done_count
:
0
,
images
:[],
icon_gotake
:
'https://qn-static.banshouhui.com/gotake.png'
,
icon_arrow_down
:
'https://qn-static.banshouhui.com/arrow_down.png'
,
ifFirst
:
true
,
last_done_count
:
0
,
swiperList
:[],
windowHeight
:
0
,
title
:
''
}
},
watch
:{
images
(
val
){
let
list
=
val
.
map
(
img
=>
{
return
{
image
:
img
}
})
this
.
swiperList
=
list
// console.log(this.swiperList,'this.swiperList')
}
},
computed
:{
// swiperList(){
// console.log(this.images,'this.images')
// let list = this.images.map(img=>{
// return {
// image:img
// }
// })
// return list
// }
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'照片规范详情页'
)
this
.
initData
(
e
)
},
onShow
(){
if
(
this
.
isFirst
==
false
){
this
.
checkDoneCount
()
}
},
methods
:
{
initData
:
function
(
e
)
{
if
(
e
&&
e
.
current_image
){
this
.
current_image
=
e
.
current_image
}
if
(
e
&&
e
.
image_count
){
this
.
image_count
=
e
.
image_count
}
if
(
e
&&
e
.
current_count
){
this
.
done_count
=
e
.
current_count
}
if
(
e
&&
e
.
current_count
){
this
.
current_count
=
Math
.
max
(
e
.
current_count
-
1
,
0
)
}
if
(
e
&&
e
.
images
){
this
.
images
=
[].
concat
(
JSON
.
parse
(
e
.
images
))
}
if
(
e
&&
e
.
title
){
this
.
title
=
e
.
title
if
(
this
.
title
.
length
>
6
){
this
.
title
=
this
.
title
.
substr
(
0
,
6
)
+
'...'
}
}
uni
.
setNavigationBarTitle
({
title
:
this
.
title
+
' ('
+
this
.
current_count
+
'/'
+
this
.
image_count
+
')'
})
uni
.
setNavigationBarColor
({
frontColor
:
'#FFFFFF'
,
backgroundColor
:
'#333333'
,
})
},
//检查已拍照数量
checkDoneCount
:
function
(){
let
pages
=
getCurrentPages
();
let
currPage
=
pages
[
pages
.
length
-
1
];
this
.
done_count
=
currPage
.
data
.
done_count
console
.
log
(
'是否清除:'
)
//console.log(currPage.data.isClean)
if
(
currPage
.
data
.
done_count
==
this
.
image_count
){
console
.
log
(
'已拍完 所有数量照片'
)
uni
.
showToast
({
icon
:
'none'
,
title
:
'已拍完此项照片'
})
setTimeout
(
function
()
{
uni
.
navigateBack
({
})
},
2000
);
}
else
{
if
(
this
.
done_count
!=
this
.
last_done_count
){
console
.
log
(
'没有拍完 所有数量照片'
)
this
.
last_done_count
=
this
.
done_count
this
.
current_count
=
currPage
.
data
.
done_count
+
1
this
.
current_image
=
this
.
images
[
currPage
.
data
.
done_count
]
console
.
log
(
'没有拍完 所有数量照片 current_count:'
+
this
.
current_count
)
console
.
log
(
'没有拍完 所有数量照片 current_image:'
+
this
.
current_image
)
uni
.
setNavigationBarTitle
({
title
:
this
.
title
+
' ('
+
this
.
current_count
+
'/'
+
this
.
image_count
+
')'
})
}
}
},
//照片预览
imageClick
:
function
(
index
)
{
let
currentImg
=
this
.
images
[
index
]
uni
.
previewImage
({
urls
:
[
currentImg
],
current
:
index
})
},
changeSwipter
(
index
){
let
txt
=
'走线照片 ('
+
(
index
+
1
)
+
'/'
+
this
.
image_count
+
')'
uni
.
setNavigationBarTitle
({
title
:
txt
})
},
//拍照 点击
takeClick
:
function
()
{
this
.
isFirst
=
false
uni
.
navigateTo
({
url
:
'/pages/photo/try'
})
},
//返回 点击
backClick
:
function
()
{
uni
.
navigateBack
({
})
},
}
}
</
script
>
<
style
>
.wrap
{
width
:
100%
;
height
:
calc
(
100vh
-
600
rpx
);
background-color
:
#333
;
/* padding:0 40rpx; */
}
.backView
{
background-color
:
#FAFAFA
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.topView
{
background-color
:
#333333
;
width
:
100%
;
height
:
12%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.topTitle
{
font-size
:
28
rpx
;
color
:
#FFFFFF
;
}
.centerBackView
{
background-color
:
#333333
;
height
:
47.3%
;
display
:
flex
;
flex-direction
:
row
;
}
.photoImage
{
background-color
:
#333333
;
width
:
750
rpx
;
height
:
568
rpx
;
}
.bottomView
{
background-color
:
#333333
;
width
:
100%
;
height
:
40.7%
;
position
:
fixed
;
bottom
:
0
;
display
:
flex
;
flex-direction
:
column-reverse
;
align-items
:
center
;
}
.takeView
{
background-color
:
#FFFFFF
;
width
:
146
rpx
;
height
:
102
rpx
;
border-radius
:
16
rpx
;
margin-bottom
:
50
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.takeText
{
font-size
:
28
rpx
;
text-align
:
center
;
}
.backIcon
{
background-color
:
#FFFFFF
;
width
:
54
rpx
;
height
:
54
rpx
;
border-radius
:
27
rpx
;
position
:
fixed
;
left
:
60
rpx
;
bottom
:
50
rpx
;
}
</
style
>
take-order/pages/photo/index.vue
View file @
bfa7d813
This diff is collapsed.
Click to expand it.
take-order/pages/photo/product.vue
deleted
100644 → 0
View file @
4f3ca04f
<
template
>
<view
class=
"backView"
>
<view
class=
"ph-pr-arr"
v-for=
"(dataItem, index) in list"
:key=
"index"
>
<template
v-if=
"dataItem.data.length > 0"
>
<view
class=
"topTitle"
><text>
{{
dataItem
.
title
}}
</text></view>
<view
class=
"ph-pr-content"
>
<view
v-for=
"(item,ikey) in dataItem.data"
:class=
"param[dataItem.type] === item._id ? 'select-item-view' : 'item-view'"
@
click=
"itemClick(dataItem.type, item)"
:key=
"item._id"
>
<text
class=
"itemTitle"
>
{{
item
.
name
}}
</text>
</view>
</view>
</
template
>
</view>
<button
class=
"ph-pr-button"
type=
"primary"
@
click=
"handleClick"
:disabled=
"!selectedAll"
:style=
"buttonStyle"
>
下一步
</button>
</view>
</template>
<
script
>
export
default
{
data
()
{
return
{
classifyList
:
[],
systemList
:
[],
brandList
:
[],
param
:
{
classifyId
:
''
,
systemId
:
''
,
brandId
:
''
,
},
brandName
:
''
,
selectedAll
:
false
,
}
},
computed
:
{
list
()
{
return
[{
title
:
'请选择类别'
,
type
:
'classifyId'
,
data
:
this
.
classifyList
},
{
title
:
'请选择系统'
,
type
:
'systemId'
,
data
:
this
.
systemList
},
{
title
:
'请选择品牌'
,
type
:
'brandId'
,
data
:
this
.
brandList
}
]
},
buttonStyle
()
{
return
this
.
selectedAll
?
'color: #FFFFFF;background-color: #2272FF;'
:
'color: #FFFFFF;background-color: #D1D4D4;'
}
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'选择产品页'
)
this
.
getclassifyList
()
},
onShareAppMessage
(
res
)
{
let
shareObj
=
{
title
:
''
,
path
:
'/pages/photo/product'
,
imageUrl
:
''
,
success
()
{},
fail
()
{}
}
return
shareObj
},
methods
:
{
getclassifyList
:
function
()
{
let
that
=
this
this
.
$u
.
cloudApi
.
getClassifyDictionary
().
then
(
res
=>
{
console
.
log
(
'获取产品数据:'
)
console
.
log
(
res
)
if
(
res
.
result
&&
res
.
result
.
data
)
{
that
.
classifyList
=
res
.
result
.
data
that
.
param
.
classifyId
=
that
.
classifyList
[
0
].
_id
that
.
$u
.
cloudApi
.
getRelationDictionary
({
"classify_id"
:
that
.
param
.
classifyId
,
"field"
:
"system_id"
}).
then
(
res1
=>
{
that
.
systemList
=
res1
.
result
})
}
})
},
//选择 点击
itemClick
:
function
(
type
,
item
)
{
switch
(
type
)
{
case
'classifyId'
:
this
.
param
=
{
classifyId
:
item
.
_id
,
systemId
:
''
,
brandId
:
''
}
this
.
selectedAll
=
false
this
.
systemList
=
[]
this
.
brandList
=
[]
this
.
$u
.
cloudApi
.
getRelationDictionary
({
"classify_id"
:
this
.
param
.
classifyId
,
"field"
:
"system_id"
}).
then
(
res
=>
{
this
.
systemList
=
res
.
result
})
break
case
'systemId'
:
this
.
param
=
{
classifyId
:
this
.
param
.
classifyId
,
systemId
:
item
.
_id
,
brandId
:
''
}
this
.
selectedAll
=
false
this
.
brandList
=
[]
this
.
$u
.
cloudApi
.
getRelationDictionary
({
"classify_id"
:
this
.
param
.
classifyId
,
"system_id"
:
this
.
param
.
systemId
,
"field"
:
"brand_id"
}).
then
(
res
=>
{
console
.
log
(
'获取品牌数据:'
,
res
)
this
.
brandList
=
res
.
result
})
break
case
'brandId'
:
this
.
param
.
brandId
=
item
.
_id
this
.
selectedAll
=
true
this
.
brandName
=
item
.
name
break
default
:
break
}
},
// 点击下一步
handleClick
()
{
// 点击下一步设置全局拍照品牌品类
const
globalData
=
getApp
().
globalData
let
keys
=
[
'brandId'
,
'brandName'
,
'classifyId'
,
'systemId'
]
keys
.
map
(
key
=>
{
globalData
.
photo
.
product
[
key
]
=
this
[
key
]
||
this
.
param
[
key
]
})
uni
.
navigateTo
({
url
:
'/pages/photo/list'
+
'?brandId='
+
this
.
param
.
brandId
+
'&brand='
+
this
.
brandName
+
'&classifyId='
+
this
.
param
.
systemId
+
'&systemId='
+
this
.
param
.
systemId
,
})
}
}
}
</
script
>
<
style
>
.backView
{
background-color
:
#FAFAFA
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
height
:
100%
;
}
.topTitle
{
margin-top
:
50
rpx
;
padding-left
:
30
rpx
;
font-size
:
36
rpx
;
font-weight
:
bold
;
color
:
#333333
;
}
.ph-pr-content
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
flex-start
;
width
:
100%
;
padding
:
22
rpx
22
rpx
;
}
.ph-pr-arr
{
width
:
100%
;
}
.item-view
{
background-color
:
#FFFFFF
;
/* width: 548rpx; */
margin
:
0
rpx
8
rpx
24
rpx
8
rpx
;
/* flex: 1 1 0%;
max-width: 33%; */
width
:
222
rpx
;
height
:
76
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
border-style
:
solid
;
box-shadow
:
0px
2px
7px
0px
rgba
(
0
,
0
,
0
,
0.05
);
border-width
:
0
rpx
;
border-radius
:
12
rpx
;
font-size
:
26
rpx
;
color
:
#666666
;
}
.select-item-view
{
background-color
:
#2272FF
;
margin
:
0
rpx
8
rpx
24
rpx
8
rpx
;
/* flex: 1 1 0%;
max-width: 33%; */
width
:
222
rpx
;
height
:
76
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
border-style
:
solid
;
box-shadow
:
0px
2px
7px
0px
rgba
(
0
,
0
,
0
,
0.05
);
border-width
:
0
rpx
;
border-radius
:
12
rpx
;
font-size
:
26
rpx
;
color
:
#FFFFFF
;
}
.ph-pr-button
{
position
:
absolute
;
bottom
:
76
rpx
;
border-radius
:
52
rpx
;
height
:
104
rpx
;
font-size
:
32
rpx
;
width
:
600
rpx
;
line-height
:
104
rpx
;
}
</
style
>
take-order/pages/photo/try - 副本.vue
deleted
100644 → 0
View file @
4f3ca04f
This diff is collapsed.
Click to expand it.
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