Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
028d4895
Commit
028d4895
authored
Jul 15, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/superman
parents
aecfa9d3
120963ac
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1010 additions
and
1007 deletions
+1010
-1007
groupTourOrder.vue
src/components/SalesModule/groupTourOrder.vue
+1
-1
TravelControlList.vue
...components/TravelManager/TravelList/TravelControlList.vue
+1
-1
personalCenter.vue
src/components/personalCenter.vue
+2
-2
newpersonal.vue
src/components/personalCenter/newpersonal.vue
+21
-17
dailyAnalysis.vue
src/components/visualization/dailyAnalysis.vue
+1
-1
index.js
src/plug/index.js
+984
-985
No files found.
src/components/SalesModule/groupTourOrder.vue
View file @
028d4895
...
@@ -1511,7 +1511,7 @@
...
@@ -1511,7 +1511,7 @@
<th
width=
"200"
>
操作
</th>
<th
width=
"200"
>
操作
</th>
</tr>
</tr>
<tr>
<tr>
<td
v-show=
"list.length==0"
colspan=
"1
7
"
align=
"center"
>
暂无数据
</td>
<td
v-show=
"list.length==0"
colspan=
"1
8
"
align=
"center"
>
暂无数据
</td>
</tr>
</tr>
<tbody
v-for=
"(item,index) in list"
:key=
"index"
>
<tbody
v-for=
"(item,index) in list"
:key=
"index"
>
<tr>
<tr>
...
...
src/components/TravelManager/TravelList/TravelControlList.vue
View file @
028d4895
...
@@ -445,7 +445,7 @@
...
@@ -445,7 +445,7 @@
<div>
{{
fItem
.
FlightArrivalTime
}}
{{
fItem
.
Arrival_time
}}
</div>
<div>
{{
fItem
.
FlightArrivalTime
}}
{{
fItem
.
Arrival_time
}}
</div>
<div
style=
"margin-top:5px;"
>
(
{{
fItem
.
AIATA
}}
)
{{
fItem
.
aName
}}
</div>
<div
style=
"margin-top:5px;"
>
(
{{
fItem
.
AIATA
}}
)
{{
fItem
.
aName
}}
</div>
</td>
</td>
<td>
(
{{
fItem
.
StopoverIATA
}}
)
{{
fItem
.
StopoverName
}}
</td>
<td>
<template
v-if=
"fItem.StopoverIATA"
>
(
{{
fItem
.
StopoverIATA
}}
)
</
template
>
{{fItem.StopoverName}}
</td>
</tr>
</tr>
</table>
</table>
<div
class=
"FlightDiv-TCL"
slot=
"reference"
>
<div
class=
"FlightDiv-TCL"
slot=
"reference"
>
...
...
src/components/personalCenter.vue
View file @
028d4895
...
@@ -23,12 +23,12 @@
...
@@ -23,12 +23,12 @@
<span
class=
"k"
>
所属部门
</span>
<span
class=
"k"
>
所属部门
</span>
<span
class=
"v"
>
{{
u
.
DepartName
}}
</span>
<span
class=
"v"
>
{{
u
.
DepartName
}}
</span>
</div>
</div>
<div
class=
"item"
>
<
!--
<
div
class=
"item"
>
<span
class=
"k"
>
工作年限
</span>
<span
class=
"k"
>
工作年限
</span>
<span
class=
"v"
>
<span
class=
"v"
>
<span
style=
"font-size:22px"
>
2年
</span>
(900天)
<span
style=
"font-size:22px"
>
2年
</span>
(900天)
</span>
</span>
</div>
</div>
-->
</div>
</div>
<div
class=
"n-info"
>
<div
class=
"n-info"
>
<div
class=
"item"
@
click=
"changeBoard(0)"
>
<div
class=
"item"
@
click=
"changeBoard(0)"
>
...
...
src/components/personalCenter/newpersonal.vue
View file @
028d4895
<
template
>
<
template
>
<div
class=
"newpersonal-c"
>
<div
class=
"newpersonal-c"
>
<div
class=
"item"
v-for=
"(item, index) in users"
:key=
"index"
>
<div
class=
"item"
v-for=
"(item, index) in users"
:key=
"index"
>
<img
:src=
"item.
EmPhoto"
:onerror=
'defaultHeadImg'
/>
<img
:src=
"item.
emPhoto"
:onerror=
"defaultHeadImg"
/>
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"name-box"
>
<div
class=
"name-box"
>
{{
item
.
E
mName
}}
{{
item
.
e
mName
}}
<i
class=
"iconfont icon-nan nan"
></i>
<i
class=
"iconfont icon-nan nan"
></i>
<el-tag
size=
"mini"
style=
"margin-left:10px"
>
{{
item
.
P
ostName
}}
</el-tag>
<el-tag
size=
"mini"
style=
"margin-left:10px"
>
{{
item
.
p
ostName
}}
</el-tag>
</div>
</div>
<div
class=
"last-msg"
>
{{
item
.
CompanyName
}}
·
{{
item
.
DepartmentName
}}
· 6月3日
入职
</div>
<div
class=
"last-msg"
>
{{
item
.
companyName
}}
·
{{
item
.
departmentName
}}
·
{{
emEntryStr
}}
入职
</div>
</div>
</div>
<i
class=
"iconfont icon-chat send-msg"
title=
"认识一下"
></i>
<i
class=
"iconfont icon-chat send-msg"
title=
"认识一下"
@
click=
"openChart(item)"
></i>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:{
props
:
{
users
:{
users
:
{
type
:
Array
,
type
:
Array
,
default
:[]
default
:
[]
}
}
},
},
data
()
{
data
()
{
return
{
return
{
defaultHeadImg
:
defaultHeadImg
:
'this.src="'
+
require
(
"../../assets/img/default_head_img.jpg"
)
+
'"'
,
'this.src="'
+
require
(
"../../assets/img/default_head_img.jpg"
)
+
'"'
}
};
},
mounted
()
{
},
},
mounted
()
{},
methods
:
{
methods
:
{
openChart
(
obj
)
{
},
this
.
MsgBus
.
$emit
(
"openChat"
,
{
account
:
obj
.
emLoginMobile
,
alias
:
obj
.
emName
,
avatar
:
obj
.
emPhoto
});
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.newpersonal-c
{
.newpersonal-c
{
margin-top
:
0px
;
margin-top
:
0px
;
height
:
204px
;
height
:
204px
;
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
.newpersonal-c
.item
{
.newpersonal-c
.item
{
padding
:
12px
30px
;
padding
:
12px
30px
;
...
...
src/components/visualization/dailyAnalysis.vue
View file @
028d4895
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
<div
class=
"sq-block-left"
></div>
<div
class=
"sq-block-left"
></div>
<div
class=
"t"
>
订单来源占比
</div>
<div
class=
"t"
>
订单来源占比
</div>
<div
class=
"c"
>
<div
class=
"c"
>
<pingtai
:data=
"result.Order
JoinType
RatioList"
></pingtai>
<pingtai
:data=
"result.Order
Form
RatioList"
></pingtai>
</div>
</div>
</div>
</div>
<div
class=
"item-box"
style=
"width:346px;"
>
<div
class=
"item-box"
style=
"width:346px;"
>
...
...
src/plug/index.js
View file @
028d4895
...
@@ -12,7 +12,7 @@ export default {
...
@@ -12,7 +12,7 @@ export default {
install
(
Vue
,
options
)
{
install
(
Vue
,
options
)
{
Vue
.
prototype
.
MsgBus
=
MsgBus
;
Vue
.
prototype
.
MsgBus
=
MsgBus
;
Vue
.
prototype
.
md5
=
md5
;
Vue
.
prototype
.
md5
=
md5
;
Vue
.
prototype
.
orderBy
=
function
(
source
,
orders
,
type
)
{
Vue
.
prototype
.
orderBy
=
function
(
source
,
orders
,
type
)
{
if
(
if
(
source
instanceof
Array
&&
source
instanceof
Array
&&
orders
instanceof
Array
&&
orders
instanceof
Array
&&
...
@@ -24,7 +24,7 @@ export default {
...
@@ -24,7 +24,7 @@ export default {
var
totalSum
=
{};
var
totalSum
=
{};
function
grouporder
(
source
,
orders
,
totalSum
)
{
function
grouporder
(
source
,
orders
,
totalSum
)
{
source
.
sort
(
function
(
a
,
b
)
{
source
.
sort
(
function
(
a
,
b
)
{
var
convertA
=
a
[
orders
[
0
]];
var
convertA
=
a
[
orders
[
0
]];
var
convertB
=
b
[
orders
[
0
]];
var
convertB
=
b
[
orders
[
0
]];
if
(
typeof
convertA
==
"string"
&&
typeof
convertB
==
"string"
)
{
if
(
typeof
convertA
==
"string"
&&
typeof
convertB
==
"string"
)
{
...
@@ -78,7 +78,7 @@ export default {
...
@@ -78,7 +78,7 @@ export default {
return
source
;
return
source
;
}
}
},
},
Vue
.
prototype
.
calcPageSize
=
function
(
itemHeight
)
{
Vue
.
prototype
.
calcPageSize
=
function
(
itemHeight
)
{
let
yuHeight
=
itemHeight
let
yuHeight
=
itemHeight
try
{
try
{
let
obj
=
null
let
obj
=
null
...
@@ -100,7 +100,7 @@ export default {
...
@@ -100,7 +100,7 @@ export default {
}
}
return
Math
.
floor
(
yuHeight
/
itemHeight
)
return
Math
.
floor
(
yuHeight
/
itemHeight
)
}
}
Vue
.
prototype
.
random_string
=
function
(
len
)
{
Vue
.
prototype
.
random_string
=
function
(
len
)
{
len
=
len
||
32
;
len
=
len
||
32
;
var
chars
=
'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
;
var
chars
=
'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
;
var
maxPos
=
chars
.
length
;
var
maxPos
=
chars
.
length
;
...
@@ -111,16 +111,15 @@ export default {
...
@@ -111,16 +111,15 @@ export default {
return
pwd
;
return
pwd
;
},
},
//是否是线上环境【发布时修改为true】
//是否是线上环境【发布时修改为true】
Vue
.
prototype
.
isOnline
=
function
()
{
Vue
.
prototype
.
isOnline
=
function
()
{
return
process
.
env
.
NODE_ENV
!==
'development'
;
return
process
.
env
.
NODE_ENV
!==
'development'
;
},
},
//域名管理对象
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
Vue
.
prototype
.
domainManager
=
function
()
{
let
domainUrl
=
''
;
let
domainUrl
=
''
;
let
locationName
=
window
.
location
.
hostname
;
let
locationName
=
window
.
location
.
hostname
;
// domainUrl = "http://192.168.2.214:8082";
// domainUrl = "http://192.168.2.214:8082";
domainUrl
=
"http://192.168.2.65:8025"
;
domainUrl
=
"http://192.168.2.65:8025"
;
domainUrl
=
"http://192.168.2.16:8083"
;
if
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
)
{
if
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
)
{
domainUrl
=
"http://reborn.oytour.com"
;
domainUrl
=
"http://reborn.oytour.com"
;
}
else
if
(
locationName
.
indexOf
(
'viitto'
)
!==
-
1
)
{
}
else
if
(
locationName
.
indexOf
(
'viitto'
)
!==
-
1
)
{
...
@@ -155,14 +154,14 @@ export default {
...
@@ -155,14 +154,14 @@ export default {
};
};
return
obj
;
return
obj
;
},
},
Vue
.
prototype
.
yinyanFn
=
function
(
url
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
yinyanFn
=
function
(
url
,
successCall
,
faildCall
)
{
this
.
$http
.
jsonp
(
url
,
)
this
.
$http
.
jsonp
(
url
,
)
.
then
(
res
=>
{
.
then
(
res
=>
{
successCall
(
res
)
successCall
(
res
)
},
faildCall
)
},
faildCall
)
},
},
//消息成功提示
//消息成功提示
Vue
.
prototype
.
Success
=
function
(
msg
)
{
Vue
.
prototype
.
Success
=
function
(
msg
)
{
this
.
$message
({
this
.
$message
({
message
:
msg
,
message
:
msg
,
duration
:
2000
,
duration
:
2000
,
...
@@ -170,7 +169,7 @@ export default {
...
@@ -170,7 +169,7 @@ export default {
});
});
},
},
//错误提示
//错误提示
Vue
.
prototype
.
Error
=
function
(
msg
)
{
Vue
.
prototype
.
Error
=
function
(
msg
)
{
this
.
$message
({
this
.
$message
({
message
:
msg
,
message
:
msg
,
duration
:
2000
,
duration
:
2000
,
...
@@ -179,7 +178,7 @@ export default {
...
@@ -179,7 +178,7 @@ export default {
},
},
//一般提示
//一般提示
Vue
.
prototype
.
Info
=
function
(
msg
)
{
Vue
.
prototype
.
Info
=
function
(
msg
)
{
this
.
$message
({
this
.
$message
({
message
:
msg
,
message
:
msg
,
duration
:
2000
,
duration
:
2000
,
...
@@ -187,7 +186,7 @@ export default {
...
@@ -187,7 +186,7 @@ export default {
});
});
},
},
//警告提示
//警告提示
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
this
.
$message
({
this
.
$message
({
message
:
msg
,
message
:
msg
,
duration
:
2000
,
duration
:
2000
,
...
@@ -195,7 +194,7 @@ export default {
...
@@ -195,7 +194,7 @@ export default {
});
});
},
},
//Confirm
//Confirm
Vue
.
prototype
.
Confirm
=
function
(
msg
,
callback
)
{
Vue
.
prototype
.
Confirm
=
function
(
msg
,
callback
)
{
this
.
$confirm
(
msg
,
"提示"
,
{
this
.
$confirm
(
msg
,
"提示"
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
"取消"
,
...
@@ -212,7 +211,7 @@ export default {
...
@@ -212,7 +211,7 @@ export default {
},
},
//打开新窗口连接
//打开新窗口连接
Vue
.
prototype
.
OpenNewUrl
=
function
(
URL
)
{
Vue
.
prototype
.
OpenNewUrl
=
function
(
URL
)
{
if
(
URL
!=
''
)
{
if
(
URL
!=
''
)
{
if
(
URL
.
indexOf
(
"https"
)
!=
-
1
)
{
if
(
URL
.
indexOf
(
"https"
)
!=
-
1
)
{
var
str
=
'http://'
+
URL
.
substring
(
8
);
var
str
=
'http://'
+
URL
.
substring
(
8
);
...
@@ -226,7 +225,7 @@ export default {
...
@@ -226,7 +225,7 @@ export default {
}
}
}
}
Vue
.
prototype
.
uploadImg
=
function
(
tcID
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
uploadImg
=
function
(
tcID
,
msg
,
successCall
,
faildCall
)
{
var
apiurl
=
this
.
domainManager
().
UploadUrl
+
'/Upload/UploadBase64Two?fileType=1&fileLimit=5&&filePath=Freature/'
+
tcID
;
var
apiurl
=
this
.
domainManager
().
UploadUrl
+
'/Upload/UploadBase64Two?fileType=1&fileLimit=5&&filePath=Freature/'
+
tcID
;
this
.
$http
.
post
(
apiurl
,
{
this
.
$http
.
post
(
apiurl
,
{
FileIndex
:
msg
.
FileIndex
,
FileIndex
:
msg
.
FileIndex
,
...
@@ -235,7 +234,7 @@ export default {
...
@@ -235,7 +234,7 @@ export default {
headers
:
{
headers
:
{
"Content-Type"
:
"application/x-www-form-urlencoded;"
"Content-Type"
:
"application/x-www-form-urlencoded;"
},
},
}).
then
(
function
(
res
)
{
}).
then
(
function
(
res
)
{
console
.
log
(
res
)
console
.
log
(
res
)
})
})
}
}
...
@@ -243,7 +242,7 @@ export default {
...
@@ -243,7 +242,7 @@ export default {
//HTTP提交数据
//HTTP提交数据
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
this
.
$route
.
name
.
indexOf
(
'login'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'confirmationOrderDownLoad'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'PrintPage'
)
===
-
1
)
{
if
(
this
.
$route
.
name
.
indexOf
(
'login'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'confirmationOrderDownLoad'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'PrintPage'
)
===
-
1
)
{
let
previousPathInfo
=
{
let
previousPathInfo
=
{
path
:
this
.
$route
.
name
,
path
:
this
.
$route
.
name
,
...
@@ -303,7 +302,7 @@ export default {
...
@@ -303,7 +302,7 @@ export default {
},
},
Vue
.
prototype
.
ApiPost2
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
ApiPost2
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
msg
==
null
||
msg
==
""
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
msg
=
{}
}
}
...
@@ -352,7 +351,7 @@ export default {
...
@@ -352,7 +351,7 @@ export default {
},
faildCall
)
},
faildCall
)
},
},
Vue
.
prototype
.
apiJavaPost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
apiJavaPost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
this
.
$route
.
name
.
indexOf
(
'login'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'confirmationOrderDownLoad'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'PrintPage'
)
===
-
1
)
{
if
(
this
.
$route
.
name
.
indexOf
(
'login'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'confirmationOrderDownLoad'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'PrintPage'
)
===
-
1
)
{
let
previousPathInfo
=
{
let
previousPathInfo
=
{
path
:
this
.
$route
.
name
,
path
:
this
.
$route
.
name
,
...
@@ -407,7 +406,7 @@ export default {
...
@@ -407,7 +406,7 @@ export default {
},
faildCall
)
},
faildCall
)
},
},
//下载文件
//下载文件
Vue
.
prototype
.
GetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
Vue
.
prototype
.
GetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
var
apiurl
=
this
.
domainManager
().
LocalFileStreamDownLoadUrl
;
var
apiurl
=
this
.
domainManager
().
LocalFileStreamDownLoadUrl
;
var
timestamp
=
(
new
Date
()).
valueOf
();
var
timestamp
=
(
new
Date
()).
valueOf
();
if
(
!
localStorage
.
userInfo
&&
localStorage
.
userInfo
!=
""
&&
this
.
$route
.
path
.
toLowerCase
()
!=
"/login"
)
{
if
(
!
localStorage
.
userInfo
&&
localStorage
.
userInfo
!=
""
&&
this
.
$route
.
path
.
toLowerCase
()
!=
"/login"
)
{
...
@@ -443,10 +442,10 @@ export default {
...
@@ -443,10 +442,10 @@ export default {
document
.
body
.
appendChild
(
link
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
link
.
click
();
successCall
(
res
);
successCall
(
res
);
}).
catch
(
function
(
res
)
{});
}).
catch
(
function
(
res
)
{});
},
},
Vue
.
prototype
.
getLocalStorage
=
function
()
{
Vue
.
prototype
.
getLocalStorage
=
function
()
{
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
if
(
localStorageData
!==
undefined
&&
localStorageData
!=
'undefined'
)
{
if
(
localStorageData
!==
undefined
&&
localStorageData
!=
'undefined'
)
{
return
JSON
.
parse
(
localStorageData
);
return
JSON
.
parse
(
localStorageData
);
...
@@ -455,7 +454,7 @@ export default {
...
@@ -455,7 +454,7 @@ export default {
}
}
},
},
Vue
.
prototype
.
getLocalStorageSupplier
=
function
()
{
Vue
.
prototype
.
getLocalStorageSupplier
=
function
()
{
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
if
(
localStorageData
!==
undefined
&&
localStorageData
!=
'userInfo'
)
{
if
(
localStorageData
!==
undefined
&&
localStorageData
!=
'userInfo'
)
{
return
JSON
.
parse
(
localStorageData
);
return
JSON
.
parse
(
localStorageData
);
...
@@ -465,11 +464,11 @@ export default {
...
@@ -465,11 +464,11 @@ export default {
},
},
//PDF预览
//PDF预览
Vue
.
prototype
.
previewPDF
=
function
(
url
)
{
Vue
.
prototype
.
previewPDF
=
function
(
url
)
{
window
.
open
(
this
.
domainManager
().
PDFViewUrl
+
url
);
window
.
open
(
this
.
domainManager
().
PDFViewUrl
+
url
);
},
},
Vue
.
prototype
.
downloadFile
=
function
(
objectKey
)
{
Vue
.
prototype
.
downloadFile
=
function
(
objectKey
)
{
var
co
=
require
(
'co'
);
var
co
=
require
(
'co'
);
var
OSS
=
require
(
'ali-oss'
);
var
OSS
=
require
(
'ali-oss'
);
var
oss
=
new
OSS
({
var
oss
=
new
OSS
({
...
@@ -485,7 +484,7 @@ export default {
...
@@ -485,7 +484,7 @@ export default {
link
.
click
();
link
.
click
();
},
},
Vue
.
prototype
.
downloadFileRename
=
function
(
objectKey
,
filename
,
fileurl
)
{
Vue
.
prototype
.
downloadFileRename
=
function
(
objectKey
,
filename
,
fileurl
)
{
var
co
=
require
(
'co'
);
var
co
=
require
(
'co'
);
var
OSS
=
require
(
'ali-oss'
);
var
OSS
=
require
(
'ali-oss'
);
...
@@ -529,7 +528,7 @@ export default {
...
@@ -529,7 +528,7 @@ export default {
});
});
},
},
Vue
.
prototype
.
getFileBlob
=
function
(
objectKey
,
filename
)
{
Vue
.
prototype
.
getFileBlob
=
function
(
objectKey
,
filename
)
{
var
co
=
require
(
'co'
);
var
co
=
require
(
'co'
);
var
OSS
=
require
(
'ali-oss'
);
var
OSS
=
require
(
'ali-oss'
);
var
oss
=
new
OSS
({
var
oss
=
new
OSS
({
...
@@ -552,7 +551,7 @@ export default {
...
@@ -552,7 +551,7 @@ export default {
});
});
return
getBlob
return
getBlob
},
},
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
let
that
=
this
;
let
that
=
this
;
var
uploadUrl
=
that
.
domainManager
().
UploadUrl
+
"/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath="
+
path
;
var
uploadUrl
=
that
.
domainManager
().
UploadUrl
+
"/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath="
+
path
;
var
formData
=
new
FormData
();
var
formData
=
new
FormData
();
...
@@ -567,7 +566,7 @@ export default {
...
@@ -567,7 +566,7 @@ export default {
//path 请按照"/模块名称/用户ID/自定义文件夹/" /谁搞错一次5块红包
//path 请按照"/模块名称/用户ID/自定义文件夹/" /谁搞错一次5块红包
//files 文件数组
//files 文件数组
//p 进度回调函数
//p 进度回调函数
Vue
.
prototype
.
uploadFile
=
function
(
path
,
files
,
successCall
)
{
Vue
.
prototype
.
uploadFile
=
function
(
path
,
files
,
successCall
)
{
if
(
files
&&
files
.
length
>
0
)
{
if
(
files
&&
files
.
length
>
0
)
{
let
nameList
=
new
Array
()
let
nameList
=
new
Array
()
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
...
@@ -580,31 +579,31 @@ export default {
...
@@ -580,31 +579,31 @@ export default {
bucket
:
'reborndev'
bucket
:
'reborndev'
})
})
let
that
=
this
let
that
=
this
co
(
function
*
()
{
co
(
function
*
()
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
let
fileName
=
nameList
[
index
]
let
fileName
=
nameList
[
index
]
fileName
=
"/New"
+
path
+
fileName
+
"."
+
files
[
index
].
name
.
split
(
'.'
).
pop
()
fileName
=
"/New"
+
path
+
fileName
+
"."
+
files
[
index
].
name
.
split
(
'.'
).
pop
()
var
result
=
yield
oss
.
multipartUpload
(
fileName
,
files
[
index
],
{
var
result
=
yield
oss
.
multipartUpload
(
fileName
,
files
[
index
],
{
progress
:
function
*
(
p
)
{},
progress
:
function
*
(
p
)
{},
mime
:
'application/octet-stream'
mime
:
'application/octet-stream'
})
})
successCall
(
result
);
successCall
(
result
);
}
}
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
console
.
log
(
err
);
console
.
log
(
err
);
});
});
}
}
},
},
//上传文件到本地服务器
//上传文件到本地服务器
Vue
.
prototype
.
UploadSelfFileT
=
function
(
path
,
files
,
successCall
,
ocr
)
{
Vue
.
prototype
.
UploadSelfFileT
=
function
(
path
,
files
,
successCall
,
ocr
)
{
if
(
files
&&
files
.
length
>
0
)
{
if
(
files
&&
files
.
length
>
0
)
{
let
nameList
=
new
Array
()
let
nameList
=
new
Array
()
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
nameList
.
push
(
this
.
random_string
());
nameList
.
push
(
this
.
random_string
());
}
}
let
that
=
this
;
let
that
=
this
;
co
(
function
*
()
{
co
(
function
*
()
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
let
fileName
=
nameList
[
index
]
let
fileName
=
nameList
[
index
]
fileName
=
path
+
fileName
+
"."
+
files
[
index
].
name
.
split
(
'.'
).
pop
()
fileName
=
path
+
fileName
+
"."
+
files
[
index
].
name
.
split
(
'.'
).
pop
()
...
@@ -616,7 +615,7 @@ export default {
...
@@ -616,7 +615,7 @@ export default {
successCall
(
res
);
successCall
(
res
);
})
})
}
}
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
console
.
log
(
"上传文件出错"
+
err
);
console
.
log
(
"上传文件出错"
+
err
);
});
});
}
}
...
@@ -626,7 +625,7 @@ export default {
...
@@ -626,7 +625,7 @@ export default {
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽
// w : 宽
// h : 高
// h : 高
Vue
.
prototype
.
compressImg
=
function
(
path
,
type
,
w
,
h
)
{
Vue
.
prototype
.
compressImg
=
function
(
path
,
type
,
w
,
h
)
{
let
url
=
this
.
domainManager
().
UploadUrl
;
let
url
=
this
.
domainManager
().
UploadUrl
;
let
poise
=
'm_filt'
;
let
poise
=
'm_filt'
;
w
=
w
?
w
:
''
w
=
w
?
w
:
''
...
@@ -638,7 +637,7 @@ export default {
...
@@ -638,7 +637,7 @@ export default {
}
}
return
url
+
'/image/index?filePath='
+
path
.
replace
(
'http://192.168.2.214:8130'
,
''
).
replace
(
'http://imgfile.oytour.com'
,
''
).
split
(
'?'
)[
0
]
+
'&process=resize,'
+
poise
+
',w_'
+
w
+
',h_'
+
h
;
return
url
+
'/image/index?filePath='
+
path
.
replace
(
'http://192.168.2.214:8130'
,
''
).
replace
(
'http://imgfile.oytour.com'
,
''
).
split
(
'?'
)[
0
]
+
'&process=resize,'
+
poise
+
',w_'
+
w
+
',h_'
+
h
;
}
}
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
let
that
=
this
;
let
that
=
this
;
var
uploadUrl
=
that
.
domainManager
().
UploadUrl
+
"/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath="
+
path
;
var
uploadUrl
=
that
.
domainManager
().
UploadUrl
+
"/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath="
+
path
;
var
formData
=
new
FormData
();
var
formData
=
new
FormData
();
...
@@ -652,7 +651,7 @@ export default {
...
@@ -652,7 +651,7 @@ export default {
},
},
//验证只能输入2位小数【负数:isMinus传true】
//验证只能输入2位小数【负数:isMinus传true】
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
,
isMinus
)
{
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
,
isMinus
)
{
var
value
=
""
+
item
[
filed
];
//转字符串
var
value
=
""
+
item
[
filed
];
//转字符串
var
t
=
value
.
charAt
(
0
);
var
t
=
value
.
charAt
(
0
);
value
=
value
.
replace
(
/
[^\d
.
]
/g
,
""
);
//清除“数字”和“.”以外的字符
value
=
value
.
replace
(
/
[^\d
.
]
/g
,
""
);
//清除“数字”和“.”以外的字符
...
@@ -670,7 +669,7 @@ export default {
...
@@ -670,7 +669,7 @@ export default {
item
[
filed
]
=
value
;
item
[
filed
]
=
value
;
}
}
//验证输入6位小数汇率
//验证输入6位小数汇率
Vue
.
prototype
.
checkRate
=
function
(
item
,
filed
)
{
Vue
.
prototype
.
checkRate
=
function
(
item
,
filed
)
{
var
value
=
""
+
item
[
filed
];
//转字符串
var
value
=
""
+
item
[
filed
];
//转字符串
var
p1
=
/
[^\d\.]
/g
;
// 过滤非数字及小数点 /g :所有范围中过滤
var
p1
=
/
[^\d\.]
/g
;
// 过滤非数字及小数点 /g :所有范围中过滤
var
p2
=
/
(\.\d{6})\d
*$/g
;
var
p2
=
/
(\.\d{6})\d
*$/g
;
...
@@ -685,7 +684,7 @@ export default {
...
@@ -685,7 +684,7 @@ export default {
}
}
//验证只能输入整数【负数:isMinus传true】
//验证只能输入整数【负数:isMinus传true】
Vue
.
prototype
.
checkInteger
=
function
(
item
,
filed
,
isMinus
)
{
Vue
.
prototype
.
checkInteger
=
function
(
item
,
filed
,
isMinus
)
{
var
value
=
""
+
item
[
filed
];
//转字符串
var
value
=
""
+
item
[
filed
];
//转字符串
var
t
=
value
.
charAt
(
0
);
var
t
=
value
.
charAt
(
0
);
value
=
value
.
replace
(
this
.
$commonUtils
.
Regex
.
isInteger
,
""
);
value
=
value
.
replace
(
this
.
$commonUtils
.
Regex
.
isInteger
,
""
);
...
@@ -695,7 +694,7 @@ export default {
...
@@ -695,7 +694,7 @@ export default {
}
}
item
[
filed
]
=
value
;
item
[
filed
]
=
value
;
}
}
Vue
.
prototype
.
checkTime
=
function
(
item
,
filed
)
{
Vue
.
prototype
.
checkTime
=
function
(
item
,
filed
)
{
var
date
=
item
[
filed
];
var
date
=
item
[
filed
];
if
(
date
.
length
==
1
)
{
if
(
date
.
length
==
1
)
{
var
v1
=
date
.
substring
(
0
,
1
);
var
v1
=
date
.
substring
(
0
,
1
);
...
@@ -740,7 +739,7 @@ export default {
...
@@ -740,7 +739,7 @@ export default {
}
}
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue
.
prototype
.
moneyFormat
=
function
(
value
)
{
Vue
.
prototype
.
moneyFormat
=
function
(
value
)
{
let
nStr
=
Number
(
value
).
toFixed
(
2
)
let
nStr
=
Number
(
value
).
toFixed
(
2
)
nStr
+=
''
;
nStr
+=
''
;
let
x
=
nStr
.
split
(
'.'
);
let
x
=
nStr
.
split
(
'.'
);
...
@@ -753,7 +752,7 @@ export default {
...
@@ -753,7 +752,7 @@ export default {
return
x1
+
x2
;
return
x1
+
x2
;
},
},
Vue
.
prototype
.
loadFileICON
=
function
(
suffix
)
{
Vue
.
prototype
.
loadFileICON
=
function
(
suffix
)
{
let
icons
=
[{
let
icons
=
[{
"name"
:
"
\
u7f51
\
u76d8BT
\
u79bb
\
u7ebf
\
u4e0b
\
u8f7d"
,
"name"
:
"
\
u7f51
\
u76d8BT
\
u79bb
\
u7ebf
\
u4e0b
\
u8f7d"
,
...
...
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