Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
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
youjj
cloud-platform-ui
Commits
c513b165
Commit
c513b165
authored
Sep 11, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
84673e99
d53be6a0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2818 additions
and
2652 deletions
+2818
-2652
index.vue
src/views/order/rentVehicleInfo/index.vue
+977
-827
customerServiceModel.vue
...nt/imCustomerServiceManger/model/customerServiceModel.vue
+1
-1
image.js
static/utf8-jsp/dialogs/image/image.js
+1092
-1083
video.js
static/utf8-jsp/dialogs/video/video.js
+748
-741
No files found.
src/views/order/rentVehicleInfo/index.vue
View file @
c513b165
...
...
@@ -7,15 +7,16 @@
<el-form-item
label=
"所属地区"
prop=
"zoneId"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.zoneId"
placeholder=
"请选择"
@
change=
"getProvinceRegions"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
<el-option
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"所属公司"
prop=
"startCompanyId"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.startCompanyId"
placeholder=
"请选择"
@
change=
"getAllBranchCompanyChange"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.startCompanyId"
placeholder=
"请选择"
@
change=
"getAllBranchCompanyChange"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
<el-option
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -26,6 +27,11 @@
</el-col>
</el-row>
<el-row>
<el-col
:span=
"5"
>
<el-form-item
label=
"车牌号"
>
<el-input
v-model=
"listQuery.plateNumber"
placeholder=
"请输入车牌号"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"订单号"
>
<el-input
v-model=
"listQuery.no"
placeholder=
"请输入订单号"
></el-input>
...
...
@@ -35,7 +41,7 @@
<el-form-item
label=
"订单状态"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.status"
placeholder=
"请选择状态"
>
<!--"0--删除"+"1--创建订单" +"2--取消" +"3--待付款" +"4--待出行" +"5--出行中(进行中)" +"6--已完成"-->
<el-option
:key=
"null"
label=
"全部订单"
:value=
"null"
></el-option>
<el-option
:key=
"null"
label=
"全部订单"
:value=
"null"
></el-option>
<el-option
:key=
"3"
label=
"待付款"
:value=
"3"
></el-option>
<el-option
:key=
"4"
label=
"待出行"
:value=
"4"
></el-option>
<el-option
:key=
"5"
label=
"出行中"
:value=
"5"
></el-option>
...
...
@@ -113,18 +119,26 @@
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"300"
fixed=
"right"
>
<
template
scope=
"scope"
>
<el-button
size=
"small"
v-if=
"scope.row.status >=4"
class=
"el-button el-button--text el-button--small"
@
click=
"handleHandoverOrderVehicle(scope.row)"
>
交车记录
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status == 6"
class=
"el-button el-button--text el-button--small"
@
click=
"handleReturnOrderVehicle(scope.row)"
>
还车记录
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status > 3"
class=
"el-button el-button--text el-button--small"
@
click=
"handleRefundVehicle(scope.row)"
>
押金记录
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status == 6&&order_btn_order_violcation_save"
class=
"el-button el-button--text el-button--small"
@
click=
"illegalInquiry(scope.row)"
>
违章查询
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status >=4"
class=
"el-button el-button--text el-button--small"
@
click=
"handleHandoverOrderVehicle(scope.row)"
>
交车记录
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status == 6"
class=
"el-button el-button--text el-button--small"
@
click=
"handleReturnOrderVehicle(scope.row)"
>
还车记录
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status > 3"
class=
"el-button el-button--text el-button--small"
@
click=
"handleRefundVehicle(scope.row)"
>
押金记录
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status == 6&&order_btn_order_violcation_save"
class=
"el-button el-button--text el-button--small"
@
click=
"illegalInquiry(scope.row)"
>
违章查询
</el-button>
</
template
>
</el-table-column>
</el-table>
<!--违章查询弹框-->
<Illegal
:row=
"currentRow"
v-if=
"illegalVisible"
v-on:illegalEvent
=
"illegalEvent"
></Illegal>
<Illegal
:row=
"currentRow"
v-if=
"illegalVisible"
v-on:illegalEvent
=
"illegalEvent"
></Illegal>
<!--查看详情弹框-->
<Detail
:row=
"currentRow"
v-if=
"detailVisible"
v-on:detailEvent=
"detailEvent"
></Detail>
<Detail
:row=
"currentRow"
v-if=
"detailVisible"
v-on:detailEvent=
"detailEvent"
></Detail>
<div
v-show=
"!listLoading"
class=
"pagination-container"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
...
@@ -133,30 +147,35 @@
</div>
<!-- 订单详情 -->
<rentOrderDetailModal
:form=
"form"
:rentCostDetail=
"tourCostDetail"
v-if=
"rentDialogVisible"
v-on:rentOrderDetailDialogEvent=
"rentOrderDetailDialogEvent"
></rentOrderDetailModal>
<rentOrderDetailModal
:form=
"form"
:rentCostDetail=
"tourCostDetail"
v-if=
"rentDialogVisible"
v-on:rentOrderDetailDialogEvent=
"rentOrderDetailDialogEvent"
></rentOrderDetailModal>
<el-dialog
:title=
"modalTitle"
:visible
.
sync=
"orderVehicleCrosstownVisible"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"90px"
>
<div
class=
"label-title"
>
<span
>
订单号:
</span><span
class=
"label-text"
>
{{form.no}}
</span>
<span
>
支付时间:
</span><span
class=
"label-text"
>
{{form.crtTime}}
</span>
<span
>
订单号:
</span><span
class=
"label-text"
>
{{form.no}}
</span>
<span
>
支付时间:
</span><span
class=
"label-text"
>
{{form.crtTime}}
</span>
</div>
<div
class=
"label-title"
>
<span
>
订单状态:
</span><span
class=
"label-text"
>
{{form.ststusName}}
</span>
<span
>
订单状态:
</span><span
class=
"label-text"
>
{{form.ststusName}}
</span>
</div>
<div
class=
"label-title"
>
<span
>
姓名/手机号:
</span>
<span
class=
"label-text"
><span
>
{{form.username}}
</span>
/
<span>
{{form.telephone}}
</span></span>
<span>
姓名/手机号:
</span>
<span
class=
"label-text"
><span>
{{form.username}}
</span>
/
<span>
{{form.telephone}}
</span></span>
</div>
<div
class=
"label-title"
>
<span
>
取车:
</span>
<span
class=
"label-text"
>
{{form.orderRentVehicleDetail.startTime}}
</span><span
class=
"label-text"
>
{{form.orderRentVehicleDetail.startAddr}}
</span>
<span
class=
"label-text"
>
交车公司:
</span><span>
{{form.startCompanyName}}
</span>
<span>
取车:
</span>
<span
class=
"label-text"
>
{{form.orderRentVehicleDetail.startTime}}
</span><span
class=
"label-text"
>
{{form.orderRentVehicleDetail.startAddr}}
</span>
<span
class=
"label-text"
>
交车公司:
</span><span>
{{form.startCompanyName}}
</span>
</div>
<div
class=
"label-title"
>
<span
>
还车:
</span>
<span
class=
"label-text"
>
{{form.orderRentVehicleDetail.endTime}}
</span><span
class=
"label-text"
>
{{form.orderRentVehicleDetail.endAddr}}
</span>
<span
class=
"label-text"
>
交车公司:
</span><span>
{{form.endCompanyName}}
</span>
<span>
还车:
</span>
<span
class=
"label-text"
>
{{form.orderRentVehicleDetail.endTime}}
</span><span
class=
"label-text"
>
{{form.orderRentVehicleDetail.endAddr}}
</span>
<span
class=
"label-text"
>
交车公司:
</span><span>
{{form.endCompanyName}}
</span>
</div>
<div
class=
"stepBox"
v-if=
"depositDetail"
>
<div
class=
"title"
v-if=
"depositRefundRecord.length>0"
>
押金退还进度
</div>
<ul>
<li
v-for =
"(item,index) in depositRefundRecord"
:class=
"{'active':item.iscomplete}"
:key=
"index"
>
<li
v-for=
"(item,index) in depositRefundRecord"
:class=
"{'active':item.iscomplete}"
:key=
"index"
>
<img
class=
"activeImg"
v-if=
"item.iscomplete"
src=
"../../../assets/images/active.png"
alt=
""
>
<img
class=
"activeImg"
v-if=
"!item.iscomplete"
src=
"../../../assets/images/doing.png"
alt=
""
>
<p
class=
"stepTitle"
>
...
...
@@ -202,21 +221,26 @@
<
template
v-if=
"item.status==2"
>
{{
item
.
updTimeStr
}}
到账
</
template
>
<
template
v-if=
"item.status==3"
>
预计
{{
item
.
endTimeStr
}}
之前到账
</
template
>
<
template
v-if=
"item.status==4"
>
押金将在定损后退还,请耐心等待...
</
template
>
<
template
v-if=
"item.status==5"
>
定损流程有疑问可联系滴房车 客服
<a
:href=
"'tel://'+Tel"
style=
"color: #666666;"
>
{{
Tel
}}
</a></
template
>
<
template
v-if=
"item.status==6"
>
定损流程有疑问可联系滴房车 客服
<a
:href=
"'tel://'+Tel"
style=
"color: #666666;"
>
{{
Tel
}}
</a></
template
>
<
template
v-if=
"item.status==5"
>
定损流程有疑问可联系滴房车 客服
<a
:href=
"'tel://'+Tel"
style=
"color: #666666;"
>
{{
Tel
}}
</a></
template
>
<
template
v-if=
"item.status==6"
>
定损流程有疑问可联系滴房车 客服
<a
:href=
"'tel://'+Tel"
style=
"color: #666666;"
>
{{
Tel
}}
</a></
template
>
</p>
<p
class=
"detailTitle"
v-if=
"item.orderViolation && item.status==3"
style=
"margin-top: 15px"
>
违章罚款
</p>
<p
class=
"detailTitle"
v-if=
"item.orderViolation && item.status==3"
>
违章截图:
</p>
<div
class=
"picBox"
v-if=
"dedDetail.length>0"
>
<img
class=
"picItem"
:src=
"itm"
alt=
""
v-for =
"(itm,idx) in item.pictureList"
:key=
"idx"
>
<img
class=
"picItem"
:src=
"itm"
alt=
""
v-for=
"(itm,idx) in item.pictureList"
:key=
"idx"
>
</div>
<p
class=
"detailTitle"
v-if=
"item.orderViolation && item.status==3"
style=
"color: #666666;font-size: 13px"
>
如有疑问,可联系滴房车客服
<a
:href=
"'tel://'+Tel"
style=
"color: #666666;"
>
{{Tel}}
</a></p>
<p
class=
"detailTitle"
v-if=
"dedDetail.length>0 && item.status==5"
style=
"margin-top: 15px"
>
定损总罚款{{dedTotal}}元
</p>
<p
class=
"detailTitle"
v-if=
"item.orderViolation && item.status==3"
style=
"color: #666666;font-size: 13px"
>
如有疑问,可联系滴房车客服
<a
:href=
"'tel://'+Tel"
style=
"color: #666666;"
>
{{Tel}}
</a>
</p>
<p
class=
"detailTitle"
v-if=
"dedDetail.length>0 && item.status==5"
style=
"margin-top: 15px"
>
定损总罚款{{dedTotal}}元
</p>
<p
class=
"detailTitle"
v-if=
"dedDetail.length>0 && item.status==5"
>
明细
</p>
<div
v-if=
"dedDetail.length>0 && item.status==5"
v-for=
"(itm,idx) in dedDetail"
:key=
"idx"
>
<p
class=
"detailTitle"
>
{{itm.id}}、{{itm.statusName}}扣{{itm.cost}}元
</p>
<div
class=
"picBox"
>
<img
class=
"picItem"
:src=
"it"
alt=
""
v-for =
"(it,ix) in itm.picList"
:key=
"ix"
>
<img
class=
"picItem"
:src=
"it"
alt=
""
v-for=
"(it,ix) in itm.picList"
:key=
"ix"
>
</div>
</div>
</li>
...
...
@@ -224,11 +248,13 @@
</div>
<div
v-if=
"vehicleDetail"
style=
"border: 1px solid;"
>
<div
style=
"border-bottom: 1px solid;"
>
<span
class=
"label-text"
>
交车交接人:
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.username}}
</span>
<span
class=
"label-text"
>
交车交接人:
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.username}}
</span>
</div>
<div>
<span
class=
"label-text"
>
上传驾驶证*:
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licenseName}}
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licensePhone}}
</span><br/>
<span
style=
"margin-left:110px;"
>
身份证号:
</span>
<span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licenseIdCard}}
</span><br
/>
<span
class=
"label-text"
>
上传驾驶证*:
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licenseName}}
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licensePhone}}
</span><br/>
<span
style=
"margin-left:110px;"
>
身份证号:
</span>
<span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licenseIdCard}}
</span><br/>
<img
:src=
"orderReturnVehicleCrosstown.licenseImg"
style=
"width: 100px; height: 100px;margin-left:110px;"
/>
</div>
...
...
@@ -263,7 +289,6 @@
</el-dialog>
</div>
</template>
...
...
@@ -285,7 +310,7 @@
import
{
timestamp2Date
}
from
'utils/dateUtils'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
'vuex'
;
import
rsCode
from
'../../../utils/rsCode'
;
import
{
getSysRegionByIds
...
...
@@ -296,6 +321,7 @@
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElCol
from
"element-ui/packages/col/src/col"
;
import
ElButton
from
"../../../../node_modules/element-ui/packages/button/src/button.vue"
;
export
default
{
name
:
'branchCompanyStock'
,
components
:
{
...
...
@@ -308,11 +334,11 @@
},
data
()
{
return
{
pictureList
:
[],
dedDetail
:
[],
depositRefundRecord
:
[],
dedTotal
:
''
,
Tel
:
''
,
pictureList
:
[],
dedDetail
:
[],
depositRefundRecord
:
[],
dedTotal
:
''
,
Tel
:
''
,
form
:
{
couponAmount
:
undefined
,
crtHost
:
undefined
,
...
...
@@ -334,7 +360,8 @@
licenseIdCard
:
""
,
licenseImg
:
""
,
licenseName
:
""
,
licensePhone
:
""
},
licensePhone
:
""
},
orderRentVehicleDetail
:
{
bookRecordId
:
undefined
,
costDetail
:
undefined
,
...
...
@@ -370,7 +397,7 @@
refundStatus
:
undefined
,
startCompanyName
:
undefined
,
status
:
undefined
,
ststusName
:
undefined
,
ststusName
:
undefined
,
telephone
:
undefined
,
type
:
undefined
,
updTime
:
undefined
,
...
...
@@ -379,11 +406,11 @@
vehicleNumberPlat
:
undefined
,
version
:
undefined
},
orderVehicleCrosstownVisible
:
false
,
orderVehicleCrosstownVisible
:
false
,
rentDialogVisible
:
false
,
//租车详情弹框
modalTitle
:
'订单详情'
,
illegalVisible
:
false
,
//违章查询弹框
detailVisible
:
false
,
detailVisible
:
false
,
rules
:
{
// companyName: [
// {
...
...
@@ -399,32 +426,33 @@
listQuery
:
{
page
:
1
,
limit
:
20
,
type
:
1
,
type
:
1
,
no
:
null
,
status
:
null
,
status
:
null
,
startTime
:
undefined
,
endTime
:
undefined
,
zoneId
:
undefined
,
startCompanyId
:
undefined
endTime
:
undefined
,
zoneId
:
undefined
,
startCompanyId
:
undefined
,
plateNumber
:
undefined
},
baranchQuery
:
{
zoneId
:
null
zoneId
:
null
},
orderVehicleQuery
:
{
orderId
:
null
,
type
:
undefined
orderId
:
null
,
type
:
undefined
},
dialogFormVisible
:
false
,
dialogStatus
:
''
,
btn_del
:
true
,
btn_buy
:
true
,
btn_cancel
:
true
,
allZoneArr
:
[],
//全部片区
allBranchCompany
:
[],
tourCostDetail
:
''
,
damageSafe
:
''
,
serviceCost
:
0
,
orderReturnVehicleCrosstown
:
{
allZoneArr
:
[],
//全部片区
allBranchCompany
:
[],
tourCostDetail
:
''
,
damageSafe
:
''
,
serviceCost
:
0
,
orderReturnVehicleCrosstown
:
{
crtTime
:
undefined
,
deduction
:
undefined
,
id
:
undefined
,
...
...
@@ -449,13 +477,13 @@
licensePhone
:
undefined
},
//还车记录
tableKey
:
0
,
otherImg
:
[],
handover
:
false
,
otherImg
:
[],
handover
:
false
,
returnVehicle
:
false
,
refundshow
:
false
,
//退款信息
vehicleDetail
:
false
,
//交还车信息,默认全部显示
order_btn_order_violcation_save
:
false
,
depositDetail
:
false
,
refundshow
:
false
,
//退款信息
vehicleDetail
:
false
,
//交还车信息,默认全部显示
order_btn_order_violcation_save
:
false
,
depositDetail
:
false
,
}
},
created
()
{
...
...
@@ -471,7 +499,7 @@
return
getSonRegionByCodes
(
1
);
},
//获取大区列表
getAllZoneList
()
{
getAllZoneList
()
{
return
getAllZone
();
},
cityRegions
()
{
...
...
@@ -503,12 +531,12 @@
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
this
.
costDetail
=
JSON
.
parse
(
this
.
form
.
orderRentVehicleDetail
.
costDetail
)
var
cost
=
''
;
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
var
detail
=
a
.
detail
==
undefined
?
''
:
a
.
detail
cost
+=
a
.
key
+
":"
+
detail
+
" "
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
var
detail
=
a
.
detail
==
undefined
?
''
:
a
.
detail
cost
+=
a
.
key
+
":"
+
detail
+
" "
})
this
.
tourCostDetail
=
cost
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
this
.
serviceCost
=
this
.
form
.
orderRentVehicleDetail
.
dayNum
*
600
}
this
.
rentDialogVisible
=
true
;
...
...
@@ -516,41 +544,41 @@
/**
* 租车订单详情弹框关闭
* */
rentOrderDetailDialogEvent
(
e
)
{
rentOrderDetailDialogEvent
(
e
)
{
this
.
rentDialogVisible
=
false
;
if
(
e
)
{
if
(
e
)
{
this
.
getList
()
}
},
/**
* 操作-违章查询按钮,显示违章弹框
*/
illegalInquiry
(
row
)
{
illegalInquiry
(
row
)
{
this
.
currentRow
=
row
;
this
.
illegalVisible
=
true
;
},
/**
* 操作-查看详情按钮,显示详情弹框
*/
detailInquiry
(
row
)
{
detailInquiry
(
row
)
{
this
.
currentRow
=
row
;
this
.
detailVisible
=
true
;
},
/**
* 关闭违章查询弹框
* */
illegalEvent
(
params
)
{
illegalEvent
(
params
)
{
this
.
illegalVisible
=
false
;
if
(
params
)
{
if
(
params
)
{
console
.
log
(
params
);
}
},
/**
* 关闭违章查询弹框
* */
detailEvent
(
params
)
{
detailEvent
(
params
)
{
this
.
detailVisible
=
false
;
if
(
params
)
{
if
(
params
)
{
console
.
log
(
params
);
}
},
...
...
@@ -577,11 +605,11 @@
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
this
.
costDetail
=
JSON
.
parse
(
this
.
form
.
orderRentVehicleDetail
.
costDetail
)
var
cost
=
''
;
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
cost
+=
a
.
key
+
":"
+
a
.
detail
+
" "
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
cost
+=
a
.
key
+
":"
+
a
.
detail
+
" "
})
this
.
tourCostDetail
=
cost
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
this
.
serviceCost
=
this
.
form
.
orderRentVehicleDetail
.
dayNum
*
600
}
this
.
orderVehicleQuery
.
orderId
=
this
.
form
.
id
...
...
@@ -589,7 +617,7 @@
this
.
getAllOrderVehicleCrosstown
();
this
.
handover
=
true
this
.
returnVehicle
=
false
this
.
vehicleDetail
=
true
this
.
vehicleDetail
=
true
this
.
depositDetail
=
false
},
...
...
@@ -597,12 +625,12 @@
getOrderVehicleCrosstown
(
this
.
orderVehicleQuery
)
.
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
.
length
<=
0
)
{
if
(
response
.
data
.
length
<=
0
)
{
alert
(
"交还车记录不存在"
)
}
else
{
}
else
{
this
.
orderVehicleCrosstownVisible
=
true
this
.
orderReturnVehicleCrosstown
=
response
.
data
[
0
];
if
(
response
.
data
[
0
].
imgs
)
{
if
(
response
.
data
[
0
].
imgs
)
{
this
.
otherImg
=
response
.
data
[
0
].
imgs
.
split
(
','
)
}
}
...
...
@@ -634,11 +662,11 @@
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
this
.
costDetail
=
JSON
.
parse
(
this
.
form
.
orderRentVehicleDetail
.
costDetail
)
var
cost
=
''
;
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
cost
+=
a
.
key
+
":"
+
a
.
detail
+
" "
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
cost
+=
a
.
key
+
":"
+
a
.
detail
+
" "
})
this
.
tourCostDetail
=
cost
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
this
.
serviceCost
=
this
.
form
.
orderRentVehicleDetail
.
dayNum
*
600
}
this
.
orderVehicleQuery
.
orderId
=
this
.
form
.
id
...
...
@@ -646,40 +674,40 @@
this
.
getAllOrderVehicleCrosstown
();
this
.
returnVehicle
=
true
this
.
handover
=
false
this
.
vehicleDetail
=
true
this
.
vehicleDetail
=
true
this
.
depositDetail
=
false
},
handleRefundVehicle
(
row
)
{
console
.
log
(
row
)
var
that
=
this
;
that
.
pictureList
=
[];
that
.
dedDetail
=
[];
that
.
depositRefundRecord
=
[];
that
.
dedTotal
=
0
;
that
.
Tel
=
''
;
getStep
(
row
.
no
).
then
(
response
=>
{
response
.
data
.
forEach
(
function
(
item
)
{
if
(
item
.
type
!=
1
)
{
that
.
pictureList
=
[];
that
.
dedDetail
=
[];
that
.
depositRefundRecord
=
[];
that
.
dedTotal
=
0
;
that
.
Tel
=
''
;
getStep
(
row
.
no
).
then
(
response
=>
{
response
.
data
.
forEach
(
function
(
item
)
{
if
(
item
.
type
!=
1
)
{
that
.
Tel
=
item
.
customerPhone
that
.
type
=
item
.
type
if
(
item
.
dedDetail
)
{
if
(
item
.
dedDetail
)
{
var
dedTotal
=
0
var
dedDetail
=
JSON
.
parse
(
item
.
dedDetail
);
that
.
dedDetail
=
dedDetail
;
dedDetail
.
forEach
(
function
(
item
)
{
dedDetail
.
forEach
(
function
(
item
)
{
dedTotal
+=
Number
(
item
.
cost
)
})
that
.
dedTotal
=
dedTotal
.
toFixed
(
2
);
}
item
.
depositRefundRecord
.
forEach
(
function
(
itm
)
{
item
.
depositRefundRecord
.
forEach
(
function
(
itm
)
{
itm
.
updTimeStr
=
timestamp2Date
(
itm
.
updTime
);
if
(
itm
.
status
==
3
)
{
itm
.
endTimeStr
=
timestamp2Date
(
Number
(
itm
.
updTime
)
+
2592000000
)
if
(
itm
.
orderViolation
)
{
if
(
itm
.
orderViolation
.
picture
)
{
if
(
itm
.
status
==
3
)
{
itm
.
endTimeStr
=
timestamp2Date
(
Number
(
itm
.
updTime
)
+
2592000000
)
if
(
itm
.
orderViolation
)
{
if
(
itm
.
orderViolation
.
picture
)
{
var
Arr
=
itm
.
orderViolation
.
picture
.
split
(
","
);
var
arrivalPicList
=
[];
Arr
.
map
(
function
(
it
)
{
Arr
.
map
(
function
(
it
)
{
arrivalPicList
.
push
(
it
);
});
itm
.
pictureList
=
arrivalPicList
;
...
...
@@ -687,11 +715,11 @@
}
}
})
if
(
item
.
type
==
3
)
{
if
(
item
.
type
==
3
)
{
var
arr
=
item
.
depositRefundRecord
;
var
item
=
arr
.
shift
();
arr
.
push
(
item
)
}
else
{
}
else
{
var
arr
=
item
.
depositRefundRecord
;
}
...
...
@@ -721,7 +749,7 @@
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
this
.
orderVehicleCrosstownVisible
=
true
this
.
vehicleDetail
=
false
this
.
vehicleDetail
=
false
this
.
depositDetail
=
true
},
//监听change事件
...
...
@@ -788,15 +816,15 @@
});
},
clearSearch
()
{
this
.
listQuery
=
{
this
.
listQuery
=
{
page
:
1
,
limit
:
20
,
type
:
1
,
type
:
1
,
no
:
null
,
status
:
null
,
status
:
null
,
startTime
:
undefined
,
endTime
:
undefined
,
zoneId
:
undefined
,
endTime
:
undefined
,
zoneId
:
undefined
,
startCompanyId
:
undefined
}
this
.
getList
()
...
...
@@ -837,17 +865,20 @@
</
script
>
<
style
scpoed
>
.label-text
{
.label-text
{
margin-left
:
10px
;
margin-right
:
20px
;
}
.label-title
{
.label-title
{
margin-top
:
10px
;
}
.orderDetail
tr
th
{
.orderDetail
tr
th
{
background
:
#eef1f6
;
}
.orderDetail
tr
td
,
.orderDetail
tr
th
{
.orderDetail
tr
td
,
.orderDetail
tr
th
{
width
:
500px
;
text-align
:
center
;
border
:
1px
solid
#dfe6ec
;
...
...
@@ -855,36 +886,155 @@
margin-right
:
100px
;
padding
:
10px
;
}
.label-value
{
.label-value
{
margin-left
:
80px
;
margin-right
:
100px
;
}
#license-img
{
#license-img
{
width
:
50px
;
height
:
50px
;
}
.order-details
.el-form-item
{
.order-details
.el-form-item
{
margin-bottom
:
10px
!important
;
}
.stepBox
{
background-color
:
#fff
;
width
:
100%
;
margin-top
:
10px
;}
.title
{
font-size
:
17px
;
color
:
#171413
;
border-bottom
:
1px
solid
#CCCCCC
;
margin-bottom
:
10px
;
font-weight
:
400
;
padding
:
10px
;}
.stepBox
ul
{
margin-left
:
10px
;
padding-left
:
10px
;
padding-top
:
20px
;}
.stepBox
li
{
position
:
relative
;
padding
:
0
20px
20px
20px
;
list-style
:
none
;
min-height
:
40px
;
border-left
:
1px
solid
#ccc
;
margin-top
:
-15px
;}
.stepBox
li
.active
{
border-color
:
#47E270
;}
.stepBox
ul
li
:last-child
{
border
:
none
;}
.activeImg
,
.doingImg
{
position
:
absolute
;
width
:
28px
;
top
:
-18px
;
left
:
-14px
;
background
:
#fff
}
.stepTitle
{
font-size
:
15px
;
color
:
#171413
;
padding-bottom
:
5px
}
.tip
{
font-size
:
10px
;
color
:
#999999
;}
.detailTitle
{
font-size
:
10px
;
color
:
#171413
;}
.orderBox
{
width
:
100%
;
padding
:
0
10px
;
background
:
#fff
;}
.orderItem
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
align-items
:
center
;
padding-bottom
:
5px
}
.orderItemLeft
{
font-size
:
13px
;
color
:
#171413
}
.orderItemRight
{
font-size
:
13px
;
color
:
#666666
}
.detailBox
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
padding
:
0
10px
10px
10px
;
align-items
:
center
}
.detailBoxLeft
{
width
:
80px
;
height
:
80px
;
border-radius
:
3px
;
margin-right
:
7px
}
.detailBoxRight
{
flex
:
1
;}
.copy
{
font-size
:
10px
;
color
:
#666666
;
background
:
#EEEEEE
;
border-radius
:
3px
;
padding
:
3px
;
margin-left
:
10px
}
.picBox
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
align-items
:
center
;
flex-wrap
:
wrap
}
.picItem
{
width
:
calc
(
33.3%
-
10px
);
margin-right
:
10px
;
margin-bottom
:
10px
;}
.bag
{
background
:
#171413
;
border-radius
:
3px
;
padding
:
0
2px
;
color
:
#fff
;
font-size
:
10px
;
margin-right
:
5px
}
.stepBox
{
background-color
:
#fff
;
width
:
100%
;
margin-top
:
10px
;
}
.title
{
font-size
:
17px
;
color
:
#171413
;
border-bottom
:
1px
solid
#CCCCCC
;
margin-bottom
:
10px
;
font-weight
:
400
;
padding
:
10px
;
}
.stepBox
ul
{
margin-left
:
10px
;
padding-left
:
10px
;
padding-top
:
20px
;
}
.stepBox
li
{
position
:
relative
;
padding
:
0
20px
20px
20px
;
list-style
:
none
;
min-height
:
40px
;
border-left
:
1px
solid
#ccc
;
margin-top
:
-15px
;
}
.stepBox
li
.active
{
border-color
:
#47E270
;
}
.stepBox
ul
li
:last-child
{
border
:
none
;
}
.activeImg
,
.doingImg
{
position
:
absolute
;
width
:
28px
;
top
:
-18px
;
left
:
-14px
;
background
:
#fff
}
.stepTitle
{
font-size
:
15px
;
color
:
#171413
;
padding-bottom
:
5px
}
.tip
{
font-size
:
10px
;
color
:
#999999
;
}
.detailTitle
{
font-size
:
10px
;
color
:
#171413
;
}
.orderBox
{
width
:
100%
;
padding
:
0
10px
;
background
:
#fff
;
}
.orderItem
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
align-items
:
center
;
padding-bottom
:
5px
}
.orderItemLeft
{
font-size
:
13px
;
color
:
#171413
}
.orderItemRight
{
font-size
:
13px
;
color
:
#666666
}
.detailBox
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
padding
:
0
10px
10px
10px
;
align-items
:
center
}
.detailBoxLeft
{
width
:
80px
;
height
:
80px
;
border-radius
:
3px
;
margin-right
:
7px
}
.detailBoxRight
{
flex
:
1
;
}
.copy
{
font-size
:
10px
;
color
:
#666666
;
background
:
#EEEEEE
;
border-radius
:
3px
;
padding
:
3px
;
margin-left
:
10px
}
.picBox
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
align-items
:
center
;
flex-wrap
:
wrap
}
.picItem
{
width
:
calc
(
33.3%
-
10px
);
margin-right
:
10px
;
margin-bottom
:
10px
;
}
.bag
{
background
:
#171413
;
border-radius
:
3px
;
padding
:
0
2px
;
color
:
#fff
;
font-size
:
10px
;
margin-right
:
5px
}
</
style
>
src/views/userManagement/imCustomerServiceManger/model/customerServiceModel.vue
View file @
c513b165
...
...
@@ -13,7 +13,7 @@
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"客服电话"
prop=
"telphone"
>
<el-input
v-model=
"form.telphone"
placeholder=
"请输入客服电话"
type=
"number"
></el-input>
<el-input
v-model=
"form.telphone"
placeholder=
"请输入客服电话"
type=
"number"
:readonly=
"title==='编辑'"
></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
static/utf8-jsp/dialogs/image/image.js
View file @
c513b165
This source diff could not be displayed because it is too large. You can
view the blob
instead.
static/utf8-jsp/dialogs/video/video.js
View file @
c513b165
...
...
@@ -6,14 +6,14 @@
* To change this template use File | Settings | File Templates.
*/
(
function
()
{
(
function
()
{
var
video
=
{},
uploadVideoList
=
[],
isModifyUploadVideo
=
false
,
uploadFile
;
window
.
onload
=
function
()
{
window
.
onload
=
function
()
{
$focus
(
$G
(
"videoUrl"
));
initTabs
();
initVideo
();
...
...
@@ -21,17 +21,17 @@
};
/* 初始化tab标签 */
function
initTabs
()
{
function
initTabs
()
{
var
tabs
=
$G
(
'tabHeads'
).
children
;
for
(
var
i
=
0
;
i
<
tabs
.
length
;
i
++
)
{
domUtils
.
on
(
tabs
[
i
],
"click"
,
function
(
e
)
{
var
j
,
bodyId
,
target
=
e
.
target
||
e
.
srcElement
;
for
(
j
=
0
;
j
<
tabs
.
length
;
j
++
)
{
bodyId
=
tabs
[
j
].
getAttribute
(
'data-content-id'
);
if
(
tabs
[
j
]
==
target
)
{
if
(
tabs
[
j
]
==
target
)
{
domUtils
.
addClass
(
tabs
[
j
],
'focus'
);
domUtils
.
addClass
(
$G
(
bodyId
),
'focus'
);
}
else
{
}
else
{
domUtils
.
removeClasses
(
tabs
[
j
],
'focus'
);
domUtils
.
removeClasses
(
$G
(
bodyId
),
'focus'
);
}
...
...
@@ -40,26 +40,26 @@
}
}
function
initVideo
()
{
createAlignButton
(
[
"videoFloat"
,
"upload_alignment"
]
);
function
initVideo
()
{
createAlignButton
([
"videoFloat"
,
"upload_alignment"
]
);
addUrlChangeListener
(
$G
(
"videoUrl"
));
addOkListener
();
//编辑视频时初始化相关信息
(
function
()
{
var
img
=
editor
.
selection
.
getRange
().
getClosedNode
(),
url
;
if
(
img
&&
img
.
className
)
{
(
function
()
{
var
img
=
editor
.
selection
.
getRange
().
getClosedNode
(),
url
;
if
(
img
&&
img
.
className
)
{
var
hasFakedClass
=
(
img
.
className
==
"edui-faked-video"
),
hasUploadClass
=
img
.
className
.
indexOf
(
"edui-upload-video"
)
!=
-
1
;
if
(
hasFakedClass
||
hasUploadClass
)
{
hasUploadClass
=
img
.
className
.
indexOf
(
"edui-upload-video"
)
!=
-
1
;
if
(
hasFakedClass
||
hasUploadClass
)
{
$G
(
"videoUrl"
).
value
=
url
=
img
.
getAttribute
(
"_url"
);
$G
(
"videoWidth"
).
value
=
img
.
width
;
$G
(
"videoHeight"
).
value
=
img
.
height
;
var
align
=
domUtils
.
getComputedStyle
(
img
,
"float"
),
parentAlign
=
domUtils
.
getComputedStyle
(
img
.
parentNode
,
"text-align"
);
updateAlignButton
(
parentAlign
===
"center"
?
"center"
:
align
);
var
align
=
domUtils
.
getComputedStyle
(
img
,
"float"
),
parentAlign
=
domUtils
.
getComputedStyle
(
img
.
parentNode
,
"text-align"
);
updateAlignButton
(
parentAlign
===
"center"
?
"center"
:
align
);
}
if
(
hasUploadClass
)
{
if
(
hasUploadClass
)
{
isModifyUploadVideo
=
true
;
}
}
...
...
@@ -70,11 +70,11 @@
/**
* 监听确认和取消两个按钮事件,用户执行插入或者清空正在播放的视频实例操作
*/
function
addOkListener
()
{
dialog
.
onok
=
function
()
{
function
addOkListener
()
{
dialog
.
onok
=
function
()
{
$G
(
"preview"
).
innerHTML
=
""
;
var
currentTab
=
findFocus
(
"tabHeads"
,
"tabSrc"
);
switch
(
currentTab
)
{
var
currentTab
=
findFocus
(
"tabHeads"
,
"tabSrc"
);
switch
(
currentTab
)
{
case
"video"
:
return
insertSingle
();
break
;
...
...
@@ -86,7 +86,7 @@
break
;
}
};
dialog
.
oncancel
=
function
()
{
dialog
.
oncancel
=
function
()
{
$G
(
"preview"
).
innerHTML
=
""
;
};
}
...
...
@@ -95,15 +95,15 @@
* 依据传入的align值更新按钮信息
* @param align
*/
function
updateAlignButton
(
align
)
{
var
aligns
=
$G
(
"videoFloat"
).
children
;
for
(
var
i
=
0
,
ci
;
ci
=
aligns
[
i
++
];
)
{
if
(
ci
.
getAttribute
(
"name"
)
==
align
)
{
if
(
ci
.
className
!=
"focus"
)
{
function
updateAlignButton
(
align
)
{
var
aligns
=
$G
(
"videoFloat"
).
children
;
for
(
var
i
=
0
,
ci
;
ci
=
aligns
[
i
++
];
)
{
if
(
ci
.
getAttribute
(
"name"
)
==
align
)
{
if
(
ci
.
className
!=
"focus"
)
{
ci
.
className
=
"focus"
;
}
}
else
{
if
(
ci
.
className
==
"focus"
)
{
if
(
ci
.
className
==
"focus"
)
{
ci
.
className
=
""
;
}
}
...
...
@@ -113,39 +113,39 @@
/**
* 将单个视频信息插入编辑器中
*/
function
insertSingle
()
{
function
insertSingle
()
{
var
width
=
$G
(
"videoWidth"
),
height
=
$G
(
"videoHeight"
),
url
=
$G
(
'videoUrl'
).
value
,
align
=
findFocus
(
"videoFloat"
,
"name"
);
if
(
!
url
)
return
false
;
if
(
!
checkNum
(
[
width
,
height
]
)
)
return
false
;
url
=
$G
(
'videoUrl'
).
value
,
align
=
findFocus
(
"videoFloat"
,
"name"
);
if
(
!
url
)
return
false
;
if
(
!
checkNum
([
width
,
height
])
)
return
false
;
editor
.
execCommand
(
'insertvideo'
,
{
url
:
convert_url
(
url
),
width
:
width
.
value
,
height
:
height
.
value
,
align
:
align
},
isModifyUploadVideo
?
'upload'
:
null
);
},
isModifyUploadVideo
?
'upload'
:
null
);
}
/**
* 将元素id下的所有代表视频的图片插入编辑器中
* @param id
*/
function
insertSearch
(
id
)
{
var
imgs
=
domUtils
.
getElementsByTagName
(
$G
(
id
),
"img"
),
videoObjs
=
[];
for
(
var
i
=
0
,
img
;
img
=
imgs
[
i
++
];)
{
if
(
img
.
getAttribute
(
"selected"
))
{
function
insertSearch
(
id
)
{
var
imgs
=
domUtils
.
getElementsByTagName
(
$G
(
id
),
"img"
),
videoObjs
=
[];
for
(
var
i
=
0
,
img
;
img
=
imgs
[
i
++
];)
{
if
(
img
.
getAttribute
(
"selected"
))
{
videoObjs
.
push
({
url
:
img
.
getAttribute
(
"ue_video_url"
),
width
:
420
,
height
:
280
,
align
:
"none"
url
:
img
.
getAttribute
(
"ue_video_url"
),
width
:
420
,
height
:
280
,
align
:
"none"
});
}
}
editor
.
execCommand
(
'insertvideo'
,
videoObjs
);
editor
.
execCommand
(
'insertvideo'
,
videoObjs
);
}
/**
...
...
@@ -153,19 +153,20 @@
* @param id
* @param returnProperty
*/
function
findFocus
(
id
,
returnProperty
)
{
var
tabs
=
$G
(
id
).
children
,
function
findFocus
(
id
,
returnProperty
)
{
var
tabs
=
$G
(
id
).
children
,
property
;
for
(
var
i
=
0
,
ci
;
ci
=
tabs
[
i
++
];
)
{
if
(
ci
.
className
==
"focus"
)
{
property
=
ci
.
getAttribute
(
returnProperty
);
for
(
var
i
=
0
,
ci
;
ci
=
tabs
[
i
++
];
)
{
if
(
ci
.
className
==
"focus"
)
{
property
=
ci
.
getAttribute
(
returnProperty
);
break
;
}
}
return
property
;
}
function
convert_url
(
url
){
if
(
!
url
)
return
''
;
function
convert_url
(
url
)
{
if
(
!
url
)
return
''
;
url
=
utils
.
trim
(
url
)
.
replace
(
/v
\.
youku
\.
com
\/
v_show
\/
id_
([\w\-
=
]
+
)\.
html/i
,
'player.youku.com/player.php/sid/$1/v.swf'
)
.
replace
(
/
(
www
\.)?
youtube
\.
com
\/
watch
\?
v=
([\w\-]
+
)
/i
,
"www.youtube.com/v/$2"
)
...
...
@@ -187,11 +188,11 @@
* 检测传入的所有input框中输入的长宽是否是正数
* @param nodes input框集合,
*/
function
checkNum
(
nodes
)
{
for
(
var
i
=
0
,
ci
;
ci
=
nodes
[
i
++
];
)
{
function
checkNum
(
nodes
)
{
for
(
var
i
=
0
,
ci
;
ci
=
nodes
[
i
++
];
)
{
var
value
=
ci
.
value
;
if
(
!
isNumber
(
value
)
&&
value
)
{
alert
(
lang
.
numError
);
if
(
!
isNumber
(
value
)
&&
value
)
{
alert
(
lang
.
numError
);
ci
.
value
=
""
;
ci
.
focus
();
return
false
;
...
...
@@ -204,27 +205,27 @@
* 数字判断
* @param value
*/
function
isNumber
(
value
)
{
return
/
(
0|^
[
1-9
]\d
*$
)
/
.
test
(
value
);
function
isNumber
(
value
)
{
return
/
(
0|^
[
1-9
]\d
*$
)
/
.
test
(
value
);
}
/**
* 创建图片浮动选择按钮
* @param ids
*/
function
createAlignButton
(
ids
)
{
for
(
var
i
=
0
,
ci
;
ci
=
ids
[
i
++
];
)
{
var
floatContainer
=
$G
(
ci
),
nameMaps
=
{
"none"
:
lang
[
'default'
],
"left"
:
lang
.
floatLeft
,
"right"
:
lang
.
floatRight
,
"center"
:
lang
.
block
};
for
(
var
j
in
nameMaps
)
{
var
div
=
document
.
createElement
(
"div"
);
div
.
setAttribute
(
"name"
,
j
);
if
(
j
==
"none"
)
div
.
className
=
"focus"
;
function
createAlignButton
(
ids
)
{
for
(
var
i
=
0
,
ci
;
ci
=
ids
[
i
++
];
)
{
var
floatContainer
=
$G
(
ci
),
nameMaps
=
{
"none"
:
lang
[
'default'
],
"left"
:
lang
.
floatLeft
,
"right"
:
lang
.
floatRight
,
"center"
:
lang
.
block
};
for
(
var
j
in
nameMaps
)
{
var
div
=
document
.
createElement
(
"div"
);
div
.
setAttribute
(
"name"
,
j
);
if
(
j
==
"none"
)
div
.
className
=
"focus"
;
div
.
style
.
cssText
=
"background:url(images/"
+
j
+
"_focus.jpg);"
;
div
.
setAttribute
(
"title"
,
nameMaps
[
j
]
);
floatContainer
.
appendChild
(
div
);
div
.
setAttribute
(
"title"
,
nameMaps
[
j
]
);
floatContainer
.
appendChild
(
div
);
}
switchSelect
(
ci
);
switchSelect
(
ci
);
}
}
...
...
@@ -232,16 +233,16 @@
* 选择切换
* @param selectParentId
*/
function
switchSelect
(
selectParentId
)
{
var
selects
=
$G
(
selectParentId
).
children
;
for
(
var
i
=
0
,
ci
;
ci
=
selects
[
i
++
];
)
{
domUtils
.
on
(
ci
,
"click"
,
function
()
{
for
(
var
j
=
0
,
cj
;
cj
=
selects
[
j
++
];
)
{
function
switchSelect
(
selectParentId
)
{
var
selects
=
$G
(
selectParentId
).
children
;
for
(
var
i
=
0
,
ci
;
ci
=
selects
[
i
++
];
)
{
domUtils
.
on
(
ci
,
"click"
,
function
()
{
for
(
var
j
=
0
,
cj
;
cj
=
selects
[
j
++
];
)
{
cj
.
className
=
""
;
cj
.
removeAttribute
&&
cj
.
removeAttribute
(
"class"
);
cj
.
removeAttribute
&&
cj
.
removeAttribute
(
"class"
);
}
this
.
className
=
"focus"
;
}
)
}
)
}
}
...
...
@@ -249,15 +250,15 @@
* 监听url改变事件
* @param url
*/
function
addUrlChangeListener
(
url
)
{
function
addUrlChangeListener
(
url
)
{
if
(
browser
.
ie
)
{
url
.
onpropertychange
=
function
()
{
createPreviewVideo
(
this
.
value
);
createPreviewVideo
(
this
.
value
);
}
}
else
{
url
.
addEventListener
(
"input"
,
function
()
{
createPreviewVideo
(
this
.
value
);
},
false
);
url
.
addEventListener
(
"input"
,
function
()
{
createPreviewVideo
(
this
.
value
);
},
false
);
}
}
...
...
@@ -265,14 +266,14 @@
* 根据url生成视频预览
* @param url
*/
function
createPreviewVideo
(
url
)
{
if
(
!
url
)
return
;
function
createPreviewVideo
(
url
)
{
if
(
!
url
)
return
;
var
conUrl
=
convert_url
(
url
);
conUrl
=
utils
.
unhtmlForUrl
(
conUrl
);
$G
(
"preview"
).
innerHTML
=
'<div class="previewMsg"><span>'
+
lang
.
urlError
+
'</span></div>'
+
$G
(
"preview"
).
innerHTML
=
'<div class="previewMsg"><span>'
+
lang
.
urlError
+
'</span></div>'
+
'<embed class="previewVideo" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"'
+
' src="'
+
conUrl
+
'"'
+
' width="'
+
420
+
'"'
+
...
...
@@ -283,19 +284,19 @@
/* 插入上传视频 */
function
insertUpload
()
{
var
videoObjs
=
[],
function
insertUpload
()
{
var
videoObjs
=
[],
uploadDir
=
editor
.
getOpt
(
'videoUrlPrefix'
),
width
=
parseInt
(
$G
(
'upload_width'
).
value
,
10
)
||
420
,
height
=
parseInt
(
$G
(
'upload_height'
).
value
,
10
)
||
280
,
align
=
findFocus
(
"upload_alignment"
,
"name"
)
||
'none'
;
for
(
var
key
in
uploadVideoList
)
{
align
=
findFocus
(
"upload_alignment"
,
"name"
)
||
'none'
;
for
(
var
key
in
uploadVideoList
)
{
var
file
=
uploadVideoList
[
key
];
videoObjs
.
push
({
url
:
uploadDir
+
file
.
url
,
width
:
width
,
height
:
height
,
align
:
align
width
:
width
,
height
:
height
,
align
:
align
});
}
...
...
@@ -309,7 +310,7 @@
}
/*初始化上传标签*/
function
initUpload
()
{
function
initUpload
()
{
uploadFile
=
new
UploadFile
(
'queueList'
);
}
...
...
@@ -319,6 +320,7 @@
this
.
$wrap
=
target
.
constructor
==
String
?
$
(
'#'
+
target
)
:
$
(
target
);
this
.
init
();
}
UploadFile
.
prototype
=
{
init
:
function
()
{
this
.
fileList
=
[];
...
...
@@ -374,9 +376,10 @@
})(),
// WebUploader实例
uploader
,
actionUrl
=
editor
.
getActionUrl
(
editor
.
getOpt
(
'videoActionName'
)),
actionUrl
=
'/'
+
editor
.
getActionUrl
(
editor
.
getOpt
(
'videoActionName'
)),
fileMaxSize
=
editor
.
getOpt
(
'videoMaxSize'
),
acceptExtensions
=
(
editor
.
getOpt
(
'videoAllowFiles'
)
||
[]).
join
(
''
).
replace
(
/
\.
/g
,
','
).
replace
(
/^
[
,
]
/
,
''
);;
acceptExtensions
=
(
editor
.
getOpt
(
'videoAllowFiles'
)
||
[]).
join
(
''
).
replace
(
/
\.
/g
,
','
).
replace
(
/^
[
,
]
/
,
''
);
;
if
(
!
WebUploader
.
Uploader
.
support
())
{
$
(
'#filePickerReady'
).
after
(
$
(
'<div>'
).
html
(
lang
.
errorNotSupport
)).
hide
();
...
...
@@ -449,7 +452,7 @@
showError
(
file
.
statusText
);
}
else
{
$wrap
.
text
(
lang
.
uploadPreview
);
if
(
'|png|jpg|jpeg|bmp|gif|'
.
indexOf
(
'|'
+
file
.
ext
.
toLowerCase
()
+
'|'
)
==
-
1
)
{
if
(
'|png|jpg|jpeg|bmp|gif|'
.
indexOf
(
'|'
+
file
.
ext
.
toLowerCase
()
+
'|'
)
==
-
1
)
{
$wrap
.
empty
().
addClass
(
'notimage'
).
append
(
'<i class="file-preview file-type-'
+
file
.
ext
.
toLowerCase
()
+
'"></i>'
+
'<span class="file-title">'
+
file
.
name
+
'</span>'
);
}
else
{
...
...
@@ -469,7 +472,7 @@
},
thumbnailWidth
,
thumbnailHeight
);
}
}
percentages
[
file
.
id
]
=
[
file
.
size
,
0
];
percentages
[
file
.
id
]
=
[
file
.
size
,
0
];
file
.
rotation
=
0
;
/* 检查文件格式 */
...
...
@@ -489,11 +492,11 @@
// 成功
if
(
cur
===
'error'
||
cur
===
'invalid'
)
{
showError
(
file
.
statusText
);
percentages
[
file
.
id
][
1
]
=
1
;
percentages
[
file
.
id
][
1
]
=
1
;
}
else
if
(
cur
===
'interrupt'
)
{
showError
(
'interrupt'
);
}
else
if
(
cur
===
'queued'
)
{
percentages
[
file
.
id
][
1
]
=
0
;
percentages
[
file
.
id
][
1
]
=
0
;
}
else
if
(
cur
===
'progress'
)
{
$info
.
hide
();
$prgress
.
css
(
'display'
,
'block'
);
...
...
@@ -546,7 +549,7 @@
// 负责view的销毁
function
removeFile
(
file
)
{
var
$li
=
$
(
'#'
+
file
.
id
);
delete
percentages
[
file
.
id
];
delete
percentages
[
file
.
id
];
updateTotalProgress
();
$li
.
off
().
find
(
'.file-panel'
).
off
().
end
().
remove
();
}
...
...
@@ -558,8 +561,8 @@
percent
;
$
.
each
(
percentages
,
function
(
k
,
v
)
{
total
+=
v
[
0
];
loaded
+=
v
[
0
]
*
v
[
1
];
total
+=
v
[
0
];
loaded
+=
v
[
0
]
*
v
[
1
];
});
percent
=
total
?
loaded
/
total
:
0
;
...
...
@@ -585,7 +588,8 @@
$queue
.
addClass
(
'element-invisible'
);
$statusBar
.
addClass
(
'element-invisible'
);
$placeHolder
.
removeClass
(
'element-invisible'
);
$progress
.
hide
();
$info
.
hide
();
$progress
.
hide
();
$info
.
hide
();
uploader
.
refresh
();
break
;
...
...
@@ -594,25 +598,29 @@
$placeHolder
.
addClass
(
'element-invisible'
);
$queue
.
removeClass
(
'element-invisible'
);
$statusBar
.
removeClass
(
'element-invisible'
);
$progress
.
hide
();
$info
.
show
();
$progress
.
hide
();
$info
.
show
();
$upload
.
text
(
lang
.
uploadStart
);
uploader
.
refresh
();
break
;
/* 上传中 */
case
'uploading'
:
$progress
.
show
();
$info
.
hide
();
$progress
.
show
();
$info
.
hide
();
$upload
.
text
(
lang
.
uploadPause
);
break
;
/* 暂停上传 */
case
'paused'
:
$progress
.
show
();
$info
.
hide
();
$progress
.
show
();
$info
.
hide
();
$upload
.
text
(
lang
.
uploadContinue
);
break
;
case
'confirm'
:
$progress
.
show
();
$info
.
hide
();
$progress
.
show
();
$info
.
hide
();
$upload
.
text
(
lang
.
uploadStart
);
stats
=
uploader
.
getStats
();
...
...
@@ -623,7 +631,8 @@
break
;
case
'finish'
:
$progress
.
hide
();
$info
.
show
();
$progress
.
hide
();
$info
.
show
();
if
(
stats
.
uploadFailNum
)
{
$upload
.
text
(
lang
.
uploadRetry
);
}
else
{
...
...
@@ -657,9 +666,7 @@
}
}
else
{
stats
=
uploader
.
getStats
();
text
=
lang
.
updateStatusFinish
.
replace
(
'_'
,
fileCount
).
replace
(
'_KB'
,
WebUploader
.
formatSize
(
fileSize
)).
replace
(
'_'
,
stats
.
successNum
);
text
=
lang
.
updateStatusFinish
.
replace
(
'_'
,
fileCount
).
replace
(
'_KB'
,
WebUploader
.
formatSize
(
fileSize
)).
replace
(
'_'
,
stats
.
successNum
);
if
(
stats
.
uploadFailNum
)
{
text
+=
lang
.
updateStatusError
.
replace
(
'_'
,
stats
.
uploadFailNum
);
...
...
@@ -704,7 +711,7 @@
case
'startUpload'
:
/* 添加额外的GET参数 */
var
params
=
utils
.
serializeParam
(
editor
.
queryCommandValue
(
'serverparam'
))
||
''
,
url
=
utils
.
formatUrl
(
actionUrl
+
(
actionUrl
.
indexOf
(
'?'
)
==
-
1
?
'?'
:
'&'
)
+
'encode=utf-8&'
+
params
);
url
=
utils
.
formatUrl
(
actionUrl
+
(
actionUrl
.
indexOf
(
'?'
)
==
-
1
?
'?'
:
'&'
)
+
'encode=utf-8&'
+
params
);
uploader
.
option
(
'server'
,
url
);
setState
(
'uploading'
,
files
);
break
;
...
...
@@ -724,7 +731,7 @@
$percent
=
$li
.
find
(
'.progress span'
);
$percent
.
css
(
'width'
,
percentage
*
100
+
'%'
);
percentages
[
file
.
id
][
1
]
=
percentage
;
percentages
[
file
.
id
][
1
]
=
percentage
;
updateTotalProgress
();
});
...
...
@@ -737,7 +744,7 @@
uploadVideoList
.
push
({
'url'
:
json
.
url
,
'type'
:
json
.
type
,
'original'
:
json
.
original
'original'
:
json
.
original
});
$file
.
append
(
'<span class="success"></span>'
);
}
else
{
...
...
@@ -777,13 +784,13 @@
},
getQueueCount
:
function
()
{
var
file
,
i
,
status
,
readyFile
=
0
,
files
=
this
.
uploader
.
getFiles
();
for
(
i
=
0
;
file
=
files
[
i
++
];
)
{
for
(
i
=
0
;
file
=
files
[
i
++
];
)
{
status
=
file
.
getStatus
();
if
(
status
==
'queued'
||
status
==
'uploading'
||
status
==
'progress'
)
readyFile
++
;
}
return
readyFile
;
},
refresh
:
function
()
{
refresh
:
function
()
{
this
.
uploader
.
refresh
();
}
};
...
...
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