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
88759a5d
Commit
88759a5d
authored
Apr 26, 2021
by
Morson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索页面代码提交
parent
02c7a921
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
256 additions
and
11 deletions
+256
-11
README.md
README.md
+54
-7
order.js
src/common/api/order.js
+6
-1
pages.json
src/pages.json
+12
-2
feedback.vue
src/pages/order/feedback.vue
+0
-1
search.vue
src/pages/order/search.vue
+184
-0
No files found.
README.md
View file @
88759a5d
# self-support
# self-support
## Project setup
### 项目设置
```
```
npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
npm install
npm install
```
```
### Compiles and hot-reloads for development
```
### 开发环境编译和热重装
```
bash
npm run dev:mp-weixin // 运行dev环境
npm run dev:mp-weixin // 运行dev环境
```
```
### Compiles and minifies for production
```
### 生产环境编译和压缩
```
bash
npm run build:mp-weixin // 运行生产环境
npm run build:mp-weixin // 运行生产环境
```
```
### 公共组件:
### 公共组件:
[
图片上传参考
](
https://ext.dcloud.net.cn/plugin?id=822
)
[
图片上传参考
](
https://ext.dcloud.net.cn/plugin?id=822
)
### Customize configuration
See
[
Configuration Reference
](
https://cli.vuejs.org/config/
)
.
### 自定义配置
查看
[
配置参考
](
https://cli.vuejs.org/config/
)
### Easycom [组件模式](https://uniapp.dcloud.io/collocation/pages?id=easycom)
只要组件安装在项目的components目录下,并符合components/组件名称/组件名称.vue目录结构。就可以不用引用、注册,直接在页面中使用
### Mock接口使用
1.
项目根目录下找到
*.env.js*
文件,查看参数:NODE_ENV值
2.
找到对应NODE_ENV值的 .env文件,如:.env.dev.js
3.
添加mock请求头,注释真实请求头,参考下面例子:
```js
const UNI_APP = {
ucenterUrl: {
apiUrl: 'http://192.168.1.46', //php端域名请求头
xueUrl: 'http://192.168.1.46:8088', //学院
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl: {
// apiUrl: 'http://192.168.1.22', //java端域名请求头
apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
}
module.exports = UNI_APP;
```
src/common/api/order.js
View file @
88759a5d
...
@@ -35,6 +35,10 @@ let orderApiFun = function(vm){
...
@@ -35,6 +35,10 @@ let orderApiFun = function(vm){
/* 过程反馈查询接口 */
/* 过程反馈查询接口 */
let
feedbackConfig
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rst/order/v2/getFeedBack/'
+
vm
.
vuex_token
,
params
)
let
feedbackConfig
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rst/order/v2/getFeedBack/'
+
vm
.
vuex_token
,
params
)
/* 预约+过程反馈 接口 */
let
traceAndAppointment
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
`/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/`
+
vm
.
vuex_token
+
`/`
+
orderId
,
params
)
/**
/**
* 查询工单操作记录列表接口
* 查询工单操作记录列表接口
*/
*/
...
@@ -63,7 +67,8 @@ let orderApiFun = function(vm){
...
@@ -63,7 +67,8 @@ let orderApiFun = function(vm){
orderAccept
,
orderAccept
,
orderGan
,
orderGan
,
maintainWorkerCheckin
,
maintainWorkerCheckin
,
feedbackConfig
feedbackConfig
,
traceAndAppointment
}
}
return
orderApi
return
orderApi
}
}
...
...
src/pages.json
View file @
88759a5d
...
@@ -207,6 +207,16 @@
...
@@ -207,6 +207,16 @@
}
}
}
}
,{
"path"
:
"pages/order/search"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
,
"enablePullDownRefresh"
:
false
}
}
],
],
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTextStyle"
:
"black"
,
...
@@ -260,8 +270,8 @@
...
@@ -260,8 +270,8 @@
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
},
{
{
"name"
:
"
入驻首页
"
,
"name"
:
"
工单搜索
"
,
"path"
:
"pages/
settle/index
"
,
"path"
:
"pages/
order/search
"
,
"query"
:
""
"query"
:
""
},
},
{
{
...
...
src/pages/order/feedback.vue
View file @
88759a5d
...
@@ -115,7 +115,6 @@
...
@@ -115,7 +115,6 @@
},
},
computed
:
{
computed
:
{
disabledSubmitBtn
()
{
disabledSubmitBtn
()
{
debugger
let
self
=
this
let
self
=
this
if
(
self
.
trace
.
reasonType
==
'预约'
if
(
self
.
trace
.
reasonType
==
'预约'
&&
(
self
.
trace
.
appointmentDatetime
==
null
||
self
.
trace
.
appointmentDatetimeRange
==
''
&&
(
self
.
trace
.
appointmentDatetime
==
null
||
self
.
trace
.
appointmentDatetimeRange
==
''
...
...
src/pages/order/search.vue
0 → 100644
View file @
88759a5d
<!-- 工单-搜索页 -->
<
template
>
<view
class=
"search-wrap"
>
<view
class=
"top-item"
>
<u-search
v-model=
"search.keyword"
bg-color=
"#FFFFFF"
placeholder=
"搜订单"
search-icon-color=
"#999999"
color=
"#333333"
placeholder-color=
"#999999"
height=
"72"
margin=
"0 30rpx"
:animation=
"true"
:action-style=
"
{
'font-size': '32rpx',
'font-weight': 500,
'color': '#2272FF'
}"
@search="searchOrder"
@custorm="searchOrder"
>
</u-search>
</view>
<view
class=
"content-item"
>
<view
v-if=
"orderList && orderList.length > 0"
class=
"order-row"
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:orderType=
"orderType"
:location=
"dataValue"
@
click=
"handleClick(item)"
@
action=
"handleAction(item)"
>
</OrderCell>
</view>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
<view
v-else=
"search.keyword"
class=
"empty-result"
>
<u-image
width=
"374"
height=
"256"
:src=
"searchEmpty"
>
<u-loading
slot=
"loading"
></u-loading>
</u-image>
<text
class=
"empty-message"
>
当前暂无搜索结果
</text>
</view>
</view>
</view>
</
template
>
<
script
>
import
OrderCell
from
"@/components/order/index.vue"
;
export
default
{
components
:
{
OrderCell
},
data
()
{
return
{
search
:
{
type
:
''
,
keyword
:
''
,
pageSize
:
10
,
pageNumber
:
0
,
orderStatusRangeType
:
''
,
},
orderList
:
[],
};
},
onLoad
()
{
// this.searchOrder()
},
computed
:
{
searchEmpty
()
{
return
process
.
uniEnv
.
qn_base_url
+
'SearchEmpty.png'
},
},
methods
:
{
searchOrder
(
index
)
{
this
.
search
.
pageNumber
=
0
this
.
getOrderList
()
},
// 页面数据
getOrderList
()
{
// 状态处理
var
self
=
this
;
self
.
search
.
pageNumber
+=
1
self
.
$u
.
api
.
listOrder
(
self
.
search
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"getOrderList"
,
res
.
data
)
var
res
=
{
data
:
{
total
:
15
,
orderType
:
this
.
currentIndex
,
list
:
[{
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
categoryName
:
'充电桩'
,
// 品类:充电桩
orderBusinessTypeText
:
'分配单'
,
// 业务类型:分配单、订单池
orderNumber
:
'OR2021041809827'
,
// 工单编号
contactName
:
'郭小清'
,
// 客户信息
contactPhone
:
'13631612077'
,
// 联系方式
contactAddress
:
'湾街道荔枝花园D座125号'
,
// 详细地址
contactAddressLatitud
:
'116.3896'
,
// 联系人地址经度
contactAddressLongitud
:
'39.91917'
,
// 联系人地址纬度
orderStatus
:
0
,
// 工单状态
appointmentDatetime
:
''
,
// 预约时间
currentWillOverTime
:
10000
,
// 剩余时间
currentOverTime
:
0
,
// 超过时间
auditDatetime
:
'2021.04.19 12:45:09'
,
// 审核时间
submissionTime
:
'2021.04.19 16:24:48'
,
// 提交时间
auditResults
:
{},
// 审核结果
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
}]
}
}
res
.
data
.
list
=
[...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
]
// 后台需要返回order_type,防止数据返回延迟期间点击了其他的tab
if
(
res
.
data
)
{
self
.
orderList
.
push
(...
res
.
data
.
list
)
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
?
'loadmore'
:
'nomore'
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
});
},
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
orderId
})
},
handleClick
(
item
)
{
console
.
log
(
'click cell'
)
this
.
viewOderItem
(
item
.
orderId
)
},
handleAction
(
item
)
{
console
.
log
(
'click button'
)
this
.
viewOderItem
(
item
.
orderId
)
},
},
}
</
script
>
<
style
lang=
"scss"
>
.search-wrap
{
.top-item
{
position
:
sticky
;
padding
:
20rpx
0
;
top
:
0rpx
;
background-color
:
#F4F5F7
;
z-index
:
2
;
/
deep
/
.u-search
.u-content
{
padding
:
0
20rpx
0
40rpx
;
}
/
deep
/
.u-search
.u-input
{
margin
:
0
24rpx
;
}
/
deep
/
.u-search
.u-icon--right
.u-iconfont
{
font-size
:
36rpx
!
important
;
}
/
deep
/
.u-search
.u-close-wrap
.u-iconfont
{
color
:
#CCCCCC
;
}
}
.content-item
{
padding
:
10rpx
30rpx
20rpx
30rpx
;
.empty-result
{
padding-top
:
354rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
.empty-message
{
padding-top
:
28rpx
;
font-size
:
28rpx
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
28rpx
;
}
}
}
}
</
style
>
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