Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WX_h5
Project
Project
Details
Activity
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
godwithdh
WX_h5
Commits
169085a6
Commit
169085a6
authored
Aug 26, 2019
by
张锡奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send
parent
1913572c
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
122 additions
and
91 deletions
+122
-91
http.js
src/libs/http.js
+4
-5
main.js
src/main.js
+7
-1
index.js
src/router/index.js
+6
-6
app.js
src/store/modules/app.js
+2
-2
detail.vue
src/view/chart/custom/detail.vue
+3
-3
index.vue
src/view/chart/custom/index.vue
+5
-5
index.vue
src/view/chart/income/index.vue
+5
-5
detail.vue
src/view/chart/sales/detail.vue
+4
-3
index.vue
src/view/chart/sales/index.vue
+7
-5
statistics.vue
src/view/chart/sales/statistics.vue
+7
-6
index.vue
src/view/specimen/index.vue
+72
-50
No files found.
src/libs/http.js
View file @
169085a6
...
@@ -52,10 +52,9 @@ Http.install = function (Vue) {
...
@@ -52,10 +52,9 @@ Http.install = function (Vue) {
* @returns {Promise}
* @returns {Promise}
*/
*/
Vue
.
prototype
.
apiPost
=
function
(
url
,
data
,
toast
=
false
,
header
)
{
Vue
.
prototype
.
apiPost
=
function
(
url
,
data
,
toast
=
false
,
header
)
{
if
(
!!
header
&&
JSON
.
stringify
(
header
)
!=
"{}"
){
for
(
let
x
in
header
){
AsInst
.
defaults
.
headers
.
common
[
'iProject'
]
=
header
.
iProject
;
AsInst
.
defaults
.
headers
.
common
[
x
]
=
header
[
x
]
;
}
}
if
(
toast
&&
typeof
(
toast
)
===
'boolean'
)
{
if
(
toast
&&
typeof
(
toast
)
===
'boolean'
)
{
loading
();
loading
();
}
else
if
(
toast
&&
typeof
(
toast
)
===
'string'
)
{
}
else
if
(
toast
&&
typeof
(
toast
)
===
'string'
)
{
...
@@ -96,8 +95,8 @@ Http.install = function (Vue) {
...
@@ -96,8 +95,8 @@ Http.install = function (Vue) {
loading
(
toast
);
loading
(
toast
);
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!!
header
&&
JSON
.
stringify
(
header
)
!=
"{}"
){
for
(
let
x
in
header
){
AsInst
.
defaults
.
headers
.
common
[
'iProjectId'
]
=
header
.
iProject
;
AsInst
.
defaults
.
headers
.
common
[
x
]
=
header
[
x
]
;
}
}
AsInst
.
get
(
url
,
{
AsInst
.
get
(
url
,
{
params
:
data
params
:
data
...
...
src/main.js
View file @
169085a6
...
@@ -33,7 +33,13 @@ Vue.prototype.$echarts = echarts
...
@@ -33,7 +33,13 @@ Vue.prototype.$echarts = echarts
function
getAbsolutePath
()
{
function
getAbsolutePath
()
{
let
path
=
location
.
pathname
let
path
=
location
.
pathname
// return path.substring(0, path.lastIndexOf('/') + 1)
// return path.substring(0, path.lastIndexOf('/') + 1)
return
"/apiproxy/huansi/hszh_report/main"
let
base
;
if
(
path
.
indexOf
(
'/apiproxy/huansi/hszh_report'
)
!=
-
1
){
base
=
'/apiproxy/huansi/hszh_report/main'
;
}
else
{
base
=
'/main'
;
}
return
base
;
}
}
const
router
=
new
VueRouter
({
const
router
=
new
VueRouter
({
mode
:
'history'
,
mode
:
'history'
,
...
...
src/router/index.js
View file @
169085a6
...
@@ -37,7 +37,7 @@ let routes = [
...
@@ -37,7 +37,7 @@ let routes = [
path
:
'/main'
,
path
:
'/main'
,
children
:[
children
:[
{
{
path
:
'/sales'
,
path
:
'/sales
/:iProjectId
'
,
name
:
'chartMmcolorsale'
,
name
:
'chartMmcolorsale'
,
component
:()
=>
import
(
'@/view/chart/sales/index.vue'
),
component
:()
=>
import
(
'@/view/chart/sales/index.vue'
),
meta
:{
meta
:{
...
@@ -53,7 +53,7 @@ let routes = [
...
@@ -53,7 +53,7 @@ let routes = [
}
}
},
},
{
{
path
:
'/custom'
,
path
:
'/custom
/:iProjectId
'
,
name
:
'chartCustom'
,
name
:
'chartCustom'
,
component
:()
=>
import
(
'@/view/chart/custom/index.vue'
),
component
:()
=>
import
(
'@/view/chart/custom/index.vue'
),
meta
:{
meta
:{
...
@@ -69,7 +69,7 @@ let routes = [
...
@@ -69,7 +69,7 @@ let routes = [
}
}
},
},
{
{
path
:
'/income'
,
path
:
'/income
/:iProjectId
'
,
name
:
'chartIncome'
,
name
:
'chartIncome'
,
component
:()
=>
import
(
'@/view/chart/income/index.vue'
),
component
:()
=>
import
(
'@/view/chart/income/index.vue'
),
meta
:{
meta
:{
...
@@ -77,7 +77,7 @@ let routes = [
...
@@ -77,7 +77,7 @@ let routes = [
}
}
},
},
{
{
path
:
'/salesStatistics'
,
path
:
'/salesStatistics
/:iProjectId
'
,
name
:
'chartStatistics'
,
name
:
'chartStatistics'
,
component
:()
=>
import
(
'@/view/chart/sales/statistics.vue'
),
component
:()
=>
import
(
'@/view/chart/sales/statistics.vue'
),
meta
:{
meta
:{
...
@@ -92,8 +92,8 @@ let routes = [
...
@@ -92,8 +92,8 @@ let routes = [
path
:
'/main'
,
path
:
'/main'
,
children
:[
children
:[
{
{
path
:
'/specim
i
n/:iProjectId/:sMaterialNo'
,
path
:
'/specim
e
n/:iProjectId/:sMaterialNo'
,
name
:
'specim
i
n'
,
name
:
'specim
e
n'
,
component
:()
=>
import
(
'@/view/specimen/index.vue'
),
component
:()
=>
import
(
'@/view/specimen/index.vue'
),
meta
:{
meta
:{
title
:
'样品信息'
title
:
'样品信息'
...
...
src/store/modules/app.js
View file @
169085a6
...
@@ -5,7 +5,7 @@ const app = {
...
@@ -5,7 +5,7 @@ const app = {
state
:
{
state
:
{
userInfo
:{},
userInfo
:{},
chartHearData
:{},
chartHearData
:{},
iProject
:
5599
iProject
Id
:
5599
},
},
mutations
:
{
mutations
:
{
getUserInfo
(
state
,
obj
){
getUserInfo
(
state
,
obj
){
...
@@ -15,7 +15,7 @@ const app = {
...
@@ -15,7 +15,7 @@ const app = {
state
.
chartHearData
=
obj
;
state
.
chartHearData
=
obj
;
},
},
setIproject
(
state
,
data
){
setIproject
(
state
,
data
){
state
.
iProject
=
data
;
state
.
iProject
Id
=
data
;
}
}
},
},
actions
:
{
actions
:
{
...
...
src/view/chart/custom/detail.vue
View file @
169085a6
...
@@ -68,7 +68,7 @@ export default {
...
@@ -68,7 +68,7 @@ export default {
computed
:{
computed
:{
...
mapState
({
...
mapState
({
chartHearData
:
state
=>
state
.
app
.
chartHearData
,
chartHearData
:
state
=>
state
.
app
.
chartHearData
,
iProject
:
state
=>
state
.
app
.
iProject
iProject
Id
:
state
=>
state
.
app
.
iProjectId
})
})
},
},
mounted
(){
mounted
(){
...
@@ -84,13 +84,13 @@ export default {
...
@@ -84,13 +84,13 @@ export default {
async
getPbcustomerDtl
(){
async
getPbcustomerDtl
(){
let
result
=
await
this
.
request
(
'getPbcustomerDtl'
,{
let
result
=
await
this
.
request
(
'getPbcustomerDtl'
,{
params
:
this
.
chartHearData
params
:
this
.
chartHearData
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
value
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
||
[]
this
.
value
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
||
[]
},
},
async
getPbsalesDtl
(){
async
getPbsalesDtl
(){
let
result
=
await
this
.
request
(
'getPbsalesDtl'
,{
let
result
=
await
this
.
request
(
'getPbsalesDtl'
,{
params
:
this
.
chartHearData
params
:
this
.
chartHearData
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
value
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
||
[]
this
.
value
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
||
[]
},
},
setChart
(){
setChart
(){
...
...
src/view/chart/custom/index.vue
View file @
169085a6
...
@@ -63,7 +63,7 @@ export default {
...
@@ -63,7 +63,7 @@ export default {
dBeginDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-01'
),
dBeginDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-01'
),
dEndDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
),
dEndDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
),
},
},
iProject
:
5599
,
iProject
Id
:
5599
,
myChart1
:
null
,
myChart1
:
null
,
myChart2
:
null
,
myChart2
:
null
,
...
@@ -86,8 +86,8 @@ export default {
...
@@ -86,8 +86,8 @@ export default {
// this.initChart(this.myChart2,'myChart2');
// this.initChart(this.myChart2,'myChart2');
this
.
iProject
=
this
.
$route
.
query
.
id
||
window
.
location
.
search
.
slice
(
1
)
this
.
iProject
Id
=
this
.
$route
.
params
.
iProjectId
;
this
.
$store
.
dispatch
(
'setIproject'
,
this
.
iProject
);
this
.
$store
.
dispatch
(
'setIproject'
,
this
.
iProject
Id
);
await
this
.
getPbcustomer
();
await
this
.
getPbcustomer
();
await
this
.
getPbsales
();
await
this
.
getPbsales
();
...
@@ -156,7 +156,7 @@ export default {
...
@@ -156,7 +156,7 @@ export default {
async
getPbcustomer
(){
async
getPbcustomer
(){
let
result
=
await
this
.
request
(
'getPbcustomer'
,{
let
result
=
await
this
.
request
(
'getPbcustomer'
,{
params
:
this
.
search
params
:
this
.
search
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
pbcustomer
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
.
map
(
v
=>
{
this
.
pbcustomer
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
.
map
(
v
=>
{
v
.
name
=
`
${
v
.
sCustomerName
||
''
}
\n
${
v
.
sCustomerNo
||
''
}
`
v
.
name
=
`
${
v
.
sCustomerName
||
''
}
\n
${
v
.
sCustomerNo
||
''
}
`
return
v
return
v
...
@@ -166,7 +166,7 @@ export default {
...
@@ -166,7 +166,7 @@ export default {
async
getPbsales
(){
async
getPbsales
(){
let
result
=
await
this
.
request
(
'getPbsales'
,{
let
result
=
await
this
.
request
(
'getPbsales'
,{
params
:
this
.
search
params
:
this
.
search
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
pbsales
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
.
map
(
v
=>
{
this
.
pbsales
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
.
map
(
v
=>
{
v
.
name
=
`
${
v
.
sSalesName
||
''
}
\n
${
v
.
sSalesNo
||
''
}
`
v
.
name
=
`
${
v
.
sSalesName
||
''
}
\n
${
v
.
sSalesNo
||
''
}
`
return
v
return
v
...
...
src/view/chart/income/index.vue
View file @
169085a6
...
@@ -63,7 +63,7 @@ export default {
...
@@ -63,7 +63,7 @@ export default {
dBeginDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-01'
),
dBeginDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-01'
),
dEndDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
),
dEndDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
),
},
},
iProject
:
5599
,
iProject
Id
:
5599
,
toUrl
:{
toUrl
:{
"myChart20"
:
"/shopVersion/pages/form/revenue"
,
"myChart20"
:
"/shopVersion/pages/form/revenue"
,
"myChart21"
:
"/shopVersion/pages/form/expenditure"
,
"myChart21"
:
"/shopVersion/pages/form/expenditure"
,
...
@@ -90,8 +90,8 @@ export default {
...
@@ -90,8 +90,8 @@ export default {
})
})
})
})
this
.
iProject
=
this
.
$route
.
query
.
id
||
window
.
location
.
search
.
slice
(
1
)
this
.
iProject
Id
=
this
.
$route
.
params
.
iProjectId
;
this
.
$store
.
dispatch
(
'setIproject'
,
this
.
iProject
);
this
.
$store
.
dispatch
(
'setIproject'
,
this
.
iProject
Id
);
await
this
.
getPayable
();
await
this
.
getPayable
();
await
this
.
getReceivepay
();
await
this
.
getReceivepay
();
...
@@ -150,14 +150,14 @@ export default {
...
@@ -150,14 +150,14 @@ export default {
async
getPayable
(){
async
getPayable
(){
let
result
=
await
this
.
request
(
'getPayable'
,{
let
result
=
await
this
.
request
(
'getPayable'
,{
params
:
this
.
search
params
:
this
.
search
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
payable
=
result
;
this
.
payable
=
result
;
this
.
drawLine1
(
'myChart1'
);
this
.
drawLine1
(
'myChart1'
);
},
},
async
getReceivepay
(){
async
getReceivepay
(){
let
result
=
await
this
.
request
(
'getReceivepay'
,{
let
result
=
await
this
.
request
(
'getReceivepay'
,{
params
:
this
.
search
params
:
this
.
search
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
receivepay
=
result
;
this
.
receivepay
=
result
;
this
.
drawLine2
(
'myChart2'
);
this
.
drawLine2
(
'myChart2'
);
},
},
...
...
src/view/chart/sales/detail.vue
View file @
169085a6
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
computed
:{
computed
:{
...
mapState
({
...
mapState
({
chartHearData
:
state
=>
state
.
app
.
chartHearData
,
chartHearData
:
state
=>
state
.
app
.
chartHearData
,
iProject
:
state
=>
state
.
app
.
iProject
iProject
Id
:
state
=>
state
.
app
.
iProjectId
})
})
},
},
mounted
(){
mounted
(){
...
@@ -82,18 +82,19 @@ export default {
...
@@ -82,18 +82,19 @@ export default {
this
.
myChart
.
setOption
(
options
);
this
.
myChart
.
setOption
(
options
);
this
.
myChart
.
resize
()
this
.
myChart
.
resize
()
});
});
console
.
log
(
this
.
iProjectId
)
},
},
methods
:{
methods
:{
async
getMmcolorsaledtltop
(){
async
getMmcolorsaledtltop
(){
let
result
=
await
this
.
request
(
'getMmcolorsaledtltop'
,{
let
result
=
await
this
.
request
(
'getMmcolorsaledtltop'
,{
params
:
this
.
chartHearData
params
:
this
.
chartHearData
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
value
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
||
[]
this
.
value
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
||
[]
},
},
async
getMmsaledtltop
(){
async
getMmsaledtltop
(){
let
result
=
await
this
.
request
(
'getMmsaledtltop'
,{
let
result
=
await
this
.
request
(
'getMmsaledtltop'
,{
params
:
this
.
chartHearData
params
:
this
.
chartHearData
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
value
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
||
[]
this
.
value
=
typeof
result
==
'object'
&&
result
.
length
>
0
&&
result
||
[]
},
},
setChart
(){
setChart
(){
...
...
src/view/chart/sales/index.vue
View file @
169085a6
...
@@ -64,7 +64,7 @@ export default {
...
@@ -64,7 +64,7 @@ export default {
dEndDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
),
dEndDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
),
},
},
timer
:
null
,
timer
:
null
,
iProject
:
5599
,
iProject
Id
:
5599
,
i
:
0
,
i
:
0
,
myChart1
:
null
,
myChart1
:
null
,
myChart2
:
null
myChart2
:
null
...
@@ -75,8 +75,9 @@ export default {
...
@@ -75,8 +75,9 @@ export default {
this
.
myChart2
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'myChart2'
))
this
.
myChart2
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'myChart2'
))
this
.
initChart
(
this
.
myChart1
,
'myChart1'
);
this
.
initChart
(
this
.
myChart1
,
'myChart1'
);
this
.
initChart
(
this
.
myChart2
,
'myChart2'
);
this
.
initChart
(
this
.
myChart2
,
'myChart2'
);
this
.
iProject
=
window
.
location
.
search
.
slice
(
1
,
window
.
location
.
search
.
length
)
this
.
$store
.
dispatch
(
'setIproject'
,
this
.
iProject
);
this
.
iProjectId
=
this
.
$route
.
params
.
iProjectId
;
this
.
$store
.
dispatch
(
'setIproject'
,
this
.
iProjectId
);
await
this
.
getMmcolorsaletop
();
await
this
.
getMmcolorsaletop
();
await
this
.
getMmsaletop
();
await
this
.
getMmsaletop
();
...
@@ -95,14 +96,14 @@ export default {
...
@@ -95,14 +96,14 @@ export default {
async
getMmcolorsaletop
(){
async
getMmcolorsaletop
(){
let
result
=
await
this
.
request
(
'getMmcolorsaletop'
,{
let
result
=
await
this
.
request
(
'getMmcolorsaletop'
,{
params
:
this
.
search
params
:
this
.
search
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
mmcolorsaletop
=
result
;
this
.
mmcolorsaletop
=
result
;
this
.
setChart
(
this
.
myChart1
,
'myChart1'
)
this
.
setChart
(
this
.
myChart1
,
'myChart1'
)
},
},
async
getMmsaletop
(){
async
getMmsaletop
(){
let
result
=
await
this
.
request
(
'getMmsaletop'
,{
let
result
=
await
this
.
request
(
'getMmsaletop'
,{
params
:
this
.
search
params
:
this
.
search
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
mmsaletop
=
result
;
this
.
mmsaletop
=
result
;
this
.
setChart
(
this
.
myChart2
,
'myChart2'
)
this
.
setChart
(
this
.
myChart2
,
'myChart2'
)
},
},
...
@@ -242,6 +243,7 @@ export default {
...
@@ -242,6 +243,7 @@ export default {
let
index
=
param
.
dataIndex
;
let
index
=
param
.
dataIndex
;
let
data
=
{};
let
data
=
{};
if
(
id
==
'myChart1'
){
if
(
id
==
'myChart1'
){
console
.
log
(
that
.
pbcustomer
)
data
=
Object
.
assign
(
that
.
pbcustomer
[
index
],{
type
:
'pbcustomer'
})
data
=
Object
.
assign
(
that
.
pbcustomer
[
index
],{
type
:
'pbcustomer'
})
}
else
{
}
else
{
data
=
Object
.
assign
(
that
.
pbsales
[
index
],{
type
:
'pbsales'
});
data
=
Object
.
assign
(
that
.
pbsales
[
index
],{
type
:
'pbsales'
});
...
...
src/view/chart/sales/statistics.vue
View file @
169085a6
...
@@ -106,7 +106,7 @@ export default {
...
@@ -106,7 +106,7 @@ export default {
dBeginDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-01'
),
dBeginDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-01'
),
dEndDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
),
dEndDate
:
Util
.
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
),
},
},
iProject
:
5599
,
iProject
Id
:
5599
,
chartData
:{
chartData
:{
set3
:[],
set3
:[],
set4
:{
set4
:{
...
@@ -153,8 +153,9 @@ export default {
...
@@ -153,8 +153,9 @@ export default {
})
})
})
})
this
.
iProject
=
this
.
$route
.
query
.
id
||
window
.
location
.
search
.
slice
(
1
)
this
.
iProjectId
=
this
.
$route
.
params
.
iProjectId
;
this
.
$store
.
dispatch
(
'setIproject'
,
this
.
iProject
);
console
.
log
(
this
.
$route
)
this
.
$store
.
dispatch
(
'setIproject'
,
this
.
iProjectId
);
this
.
searchData
()
this
.
searchData
()
this
.
global
.
$on
(
'searchData'
,()
=>
{
this
.
global
.
$on
(
'searchData'
,()
=>
{
this
.
searchData
()
this
.
searchData
()
...
@@ -220,7 +221,7 @@ export default {
...
@@ -220,7 +221,7 @@ export default {
dStartDate
:
this
.
search
.
dBeginDate
,
dStartDate
:
this
.
search
.
dBeginDate
,
dEndDate
:
this
.
search
.
dEndDate
dEndDate
:
this
.
search
.
dEndDate
}
}
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
Object
.
assign
(
this
.
chartData
,{
Object
.
assign
(
this
.
chartData
,{
nOrderSameRatio
:
Math
.
round
((
value
.
set1
&&
value
.
set1
[
0
]
&&
value
.
set1
[
0
].
nOrderSameRatio
||
0
)
*
100
)
/
100
,
nOrderSameRatio
:
Math
.
round
((
value
.
set1
&&
value
.
set1
[
0
]
&&
value
.
set1
[
0
].
nOrderSameRatio
||
0
)
*
100
)
/
100
,
nOrderRingRatio
:
Math
.
round
((
value
.
set2
&&
value
.
set2
[
0
]
&&
value
.
set2
[
0
].
nOrderRingRatio
||
0
)
*
100
)
/
100
,
nOrderRingRatio
:
Math
.
round
((
value
.
set2
&&
value
.
set2
[
0
]
&&
value
.
set2
[
0
].
nOrderRingRatio
||
0
)
*
100
)
/
100
,
...
@@ -238,14 +239,14 @@ export default {
...
@@ -238,14 +239,14 @@ export default {
async
chart2Data
(){
async
chart2Data
(){
var
value
=
await
this
.
request
(
'getMmcolorsaletop'
,{
var
value
=
await
this
.
request
(
'getMmcolorsaletop'
,{
params
:
this
.
search
params
:
this
.
search
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
chartData
.
set5
=
typeof
value
==
'object'
&&
value
.
length
>
0
&&
value
||
[]
this
.
chartData
.
set5
=
typeof
value
==
'object'
&&
value
.
length
>
0
&&
value
||
[]
this
.
chartData
.
set5
.
forEach
(
v
=>
v
.
type
=
'mmcolorsaletop'
)
this
.
chartData
.
set5
.
forEach
(
v
=>
v
.
type
=
'mmcolorsaletop'
)
var
value
=
await
this
.
request
(
'getMmsaletop'
,{
var
value
=
await
this
.
request
(
'getMmsaletop'
,{
params
:
this
.
search
params
:
this
.
search
},
true
,{
iProject
:
this
.
iProject
})
},
true
,{
iProject
Id
:
this
.
iProjectId
})
this
.
chartData
.
set6
=
typeof
value
==
'object'
&&
value
.
length
>
0
&&
value
||
[]
this
.
chartData
.
set6
=
typeof
value
==
'object'
&&
value
.
length
>
0
&&
value
||
[]
this
.
chartData
.
set6
.
forEach
(
v
=>
v
.
type
=
'mmsaletop'
)
this
.
chartData
.
set6
.
forEach
(
v
=>
v
.
type
=
'mmsaletop'
)
...
...
src/view/specimen/index.vue
View file @
169085a6
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
display: block;
display: block;
max-width: 100%;
max-width: 100%;
}
}
#imageView .imageBox li img
[data-v-cc57528a]
{
#imageView .imageBox li img{
height:auto !important;
height:auto !important;
}
}
#imageView .imageBox li{
#imageView .imageBox li{
...
@@ -43,25 +43,26 @@
...
@@ -43,25 +43,26 @@
justify-content: center;
justify-content: center;
align-items: center;
align-items: center;
background: #eef4fe;
background: #eef4fe;
position: relative;
//
position: relative;
}
}
img{
img{
height:200px;
height:200px;
width:100%;
}
}
img:after {
//
img:after {
content: "";
//
content: "";
display: inline-block;
//
display: inline-block;
position: absolute;
//
position: absolute;
z-index: 2;
//
z-index: 2;
top: 0;
//
top: 0;
left: calc(50% - 100px);
//
left: calc(50% - 100px);
width: 200px;
//
width: 200px;
height: 200px;
//
height: 200px;
background: url("../../assets/imgErr.png") no-repeat;
//
background: url("../../assets/imgErr.png") no-repeat;
background-position: center;
//
background-position: center;
background-size: contain;
//
background-size: contain;
background-color: #fff;
//
background-color: #fff;
}
//
}
}
}
.info{
.info{
.content{
.content{
...
@@ -77,24 +78,30 @@
...
@@ -77,24 +78,30 @@
background: white;
background: white;
border-top:1px solid #eef4fe;
border-top:1px solid #eef4fe;
.img{
.img{
position: relative;
// position: relative;
min-height:50px;
display: flex;
}
justify-content: center;
img:after {
align-items: center;
content: "";
img{
display: inline-block;
position: absolute;
z-index: 2;
top: 0;
left: 0;
width: 100%;
width: 100%;
height: 50px;
max-height:50px;
background: url("../../assets/imgErr.png") no-repeat;
background-position: center;
background-size: contain;
background-color: #fff;
}
}
}
}
// img:after {
// content: "";
// display: inline-block;
// position: absolute;
// z-index: 2;
// top: 0;
// left: 0;
// width: 100%;
// height: 50px;
// background: url("../../assets/imgErr.png") no-repeat;
// background-position: center;
// background-size: contain;
// background-color: #fff;
// }
}
}
}
</
style
>
</
style
>
...
@@ -116,19 +123,20 @@
...
@@ -116,19 +123,20 @@
</div>
</div>
</transition>
</transition>
<div
class=
"hdrImg"
>
<div
class=
"hdrImg"
>
<img
v-for=
"(item, index) in hdr_src"
:src=
"item"
@
click=
"selectImg('hdr',index)"
:key=
"index"
/>
<img
v-for=
"(item, index) in hdr_src"
v-if=
"!hdr.isErr"
@
error=
"error(item,index,'hdr')"
:src=
"item"
@
click=
"selectImg('hdr',index)"
:key=
"index"
/>
<img
v-else
src=
"../../assets/imgErr.png"
/>
</div>
</div>
<div
class=
"info"
>
<div
class=
"info"
>
<h3>
参数
</h3>
<h3>
参数
</h3>
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"left"
>
<div
class=
"left"
>
<p>
产品编号:
{{
hdr
.
sMaterialNo
}}
</p>
<p>
产品编号:
{{
hdr
.
sMaterialNo
}}
</p>
<p>
幅宽:
{{
hdr
.
sWidth
}}
</p>
<p>
产品名称:
{{
hdr
.
sMaterialName
}}
</p>
<p>
规格:
{{
hdr
.
sSpecification
}}
</p>
<p>
规格:
{{
hdr
.
sSpecification
}}
</p>
<p>
成分:
{{
hdr
.
sComponent
}}
</p>
<p>
成分:
{{
hdr
.
sComponent
}}
</p>
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
<p>
产品名称:
{{
hdr
.
sMaterialName
}}
</p>
<p>
幅宽:
{{
hdr
.
sWidth
}}
</p>
<p>
克重:
{{
hdr
.
sGMWT
}}
</p>
<p>
克重:
{{
hdr
.
sGMWT
}}
</p>
</div>
</div>
</div>
</div>
...
@@ -142,7 +150,8 @@
...
@@ -142,7 +150,8 @@
<v-layout
row
wrap
>
<v-layout
row
wrap
>
<v-flex
xs3
v-for=
"(item, index) in dtl_src"
:key=
"index"
>
<v-flex
xs3
v-for=
"(item, index) in dtl_src"
:key=
"index"
>
<div
class=
"img"
>
<div
class=
"img"
>
<img
:src=
"item"
@
click=
"selectImg('dtl',index)"
/>
<img
:src=
"item"
@
error=
"error(item,index,'dtl')"
v-if=
"!dtl[index].isErr"
@
click=
"selectImg('dtl',index)"
/>
<img
v-else
src=
"../../assets/imgErr.png"
/>
</div>
</div>
<div
style=
"border:1px solid #ddd;border-top:0;height:20px;font-size:12px;"
>
<div
style=
"border:1px solid #ddd;border-top:0;height:20px;font-size:12px;"
>
{{
dtl
[
index
].
sColorNo
}}
{{
dtl
[
index
].
sColorNo
}}
...
@@ -156,12 +165,9 @@
...
@@ -156,12 +165,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
imageView
from
'vue-imageview'
import
imageView
from
'vue-imageview'
import
Util
from
'@/libs/util.js'
import
Util
from
'@/libs/util.js'
function
nofind
(
e
){
console
.
log
(
e
,
11
)
}
export
default
{
export
default
{
name
:
'specimen'
,
name
:
'specimen'
,
data
()
{
data
()
{
...
@@ -180,25 +186,34 @@ export default {
...
@@ -180,25 +186,34 @@ export default {
},
},
async
mounted
(){
async
mounted
(){
this
.
iProjectId
=
this
.
$route
.
params
.
iProjectId
;
this
.
iProjectId
=
this
.
$route
.
params
.
iProjectId
;
this
.
sMaterialNo
=
this
.
$route
.
params
.
sMaterialNo
;
this
.
$route
.
params
.
sMaterialNo
.
split
(
'.'
).
map
((
x
,
y
)
=>
{
this
.
sMaterialNo
+=
String
.
fromCharCode
(
x
)
})
await
this
.
getSpeciminHdr
();
await
this
.
getSpeciminHdr
();
await
this
.
getSpeciminDtl
();
await
this
.
getSpeciminDtl
();
},
},
components
:{
components
:{
'image-view'
:
imageView
'image-view'
:
imageView
},
},
methods
:{
methods
:{
error
(
item
,
index
,
type
){
if
(
type
==
'hdr'
){
this
.
$set
(
this
.
hdr
,
'isErr'
,
true
)
}
else
{
this
.
$set
(
this
.
dtl
[
index
],
'isErr'
,
true
)
}
},
async
getSpeciminHdr
(){
async
getSpeciminHdr
(){
let
result
=
await
this
.
request
(
'getSpeciminHdr'
,{
let
result
=
await
this
.
request
(
'getSpeciminHdr'
,{
data
:[
data
:[
{
key
:
"url"
,
value
:
"sMaterialName"
},
{
key
:
"url"
,
value
:
"sMaterialName"
},
{
key
:
"searchname"
,
value
:
this
.
sMaterialNo
}
{
key
:
"searchname"
,
value
:
this
.
sMaterialNo
}
]
]
},
true
,{
iProject
:
this
.
iProject
});
},
true
,{
iProjectId
:
this
.
iProjectId
,
sUserName
:
'huansi'
});
if
(
this
.
hdr
.
length
<=
0
)
return
false
;
this
.
hdr
=
result
[
0
];
this
.
hdr
=
result
[
0
];
this
.
hdr
.
isErr
=
false
;
this
.
hdr_src
.
push
(
`https://weixin.huansi.net/apiproxy/huansi/Mall/mmmaterial/image_click/?iProjectId=
${
this
.
iProjectId
}
&iIden=
${
this
.
hdr
.
iIden
}
&m=
${
Math
.
random
()
/
9999
}
`
)
this
.
hdr_src
.
push
(
`https://weixin.huansi.net/apiproxy/huansi/Mall/mmmaterial/image_click/?iProjectId=
${
this
.
iProjectId
}
&iIden=
${
this
.
hdr
.
iIden
}
&m=
${
Math
.
random
()
/
9999
}
`
)
},
},
async
getSpeciminDtl
(){
async
getSpeciminDtl
(){
...
@@ -207,11 +222,18 @@ export default {
...
@@ -207,11 +222,18 @@ export default {
{
key
:
"url"
,
value
:
"getDetail"
},
{
key
:
"url"
,
value
:
"getDetail"
},
{
key
:
"iIden"
,
value
:
this
.
hdr
.
iIden
}
{
key
:
"iIden"
,
value
:
this
.
hdr
.
iIden
}
]
]
},
true
,{
iProject
:
this
.
iProject
});
},
true
,{
iProject
Id
:
this
.
iProjectId
});
result
.
map
(
x
=>
{
result
.
map
(
x
=>
{
x
.
tCreateTime
=
x
.
tCreateTime
.
replace
(
/-/g
,
'/'
).
split
(
'.'
)[
0
];
})
let
data
=
result
.
sort
((
x
,
y
)
=>
{
return
new
Date
(
x
.
tCreateTime
).
getTime
()
-
new
Date
(
y
.
tCreateTime
).
getTime
();
})
data
.
map
(
x
=>
{
x
.
isErr
=
false
;
this
.
dtl_src
.
push
(
`https://weixin.huansi.net/apiproxy/huansi/Mall/mmmaterial/image_click/?iProjectId=
${
this
.
iProjectId
}
&iIden=
${
x
.
iIden
}
&m=
${
Math
.
random
()
/
9999
}
`
)
this
.
dtl_src
.
push
(
`https://weixin.huansi.net/apiproxy/huansi/Mall/mmmaterial/image_click/?iProjectId=
${
this
.
iProjectId
}
&iIden=
${
x
.
iIden
}
&m=
${
Math
.
random
()
/
9999
}
`
)
})
})
this
.
dtl
=
result
;
this
.
dtl
=
data
;
},
},
showImgView
(
type
)
{
showImgView
(
type
)
{
if
(
type
==
'hdr'
){
if
(
type
==
'hdr'
){
...
...
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