Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-manage-shell
Project
Overview
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
姜雷
dcxy-manage-shell
Commits
61209dc4
Commit
61209dc4
authored
May 08, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
Develop See merge request
!88
parents
e7e721ff
49b07d64
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
22 deletions
+56
-22
validate.js
src/api/validate.js
+10
-5
CustomerFeedback.vue
...ontainers/Dashboard/CustomerFeedback/CustomerFeedback.vue
+29
-13
CustomerFeedbackStore.js
...iners/Dashboard/CustomerFeedback/CustomerFeedbackStore.js
+17
-4
No files found.
src/api/validate.js
View file @
61209dc4
import
{
isCancel
}
from
'axios'
;
import
{
Message
,
MessageBox
}
from
'element-ui'
;
import
{
Message
,
MessageBox
}
from
'element-ui'
;
import
store
from
'../store'
;
import
store
from
'../store'
;
...
@@ -37,10 +38,14 @@ export const errorHandle = error => {
...
@@ -37,10 +38,14 @@ export const errorHandle = error => {
});
});
return
Promise
.
reject
({
error
,
msg
:
'请求超时!'
});
return
Promise
.
reject
({
error
,
msg
:
'请求超时!'
});
}
}
Message
({
if
(
isCancel
(
error
))
{
message
:
error
.
message
,
console
.
log
(
'取消请求'
);
type
:
'error'
,
}
else
{
duration
:
5
*
1000
,
Message
({
});
message
:
error
.
message
,
type
:
'error'
,
duration
:
5
*
1000
,
});
}
return
Promise
.
reject
(
error
);
return
Promise
.
reject
(
error
);
};
};
src/containers/Dashboard/CustomerFeedback/CustomerFeedback.vue
View file @
61209dc4
...
@@ -14,19 +14,28 @@
...
@@ -14,19 +14,28 @@
class=
"CustomerFeedback-List"
class=
"CustomerFeedback-List"
v-if=
"show"
v-if=
"show"
:style=
"`width:$
{width}px`"
:style=
"`width:$
{width}px`"
v-loading="loading"
>
>
<div
<template
v-if=
"feedbackList && feedbackList.length"
>
class=
"CustomerFeedback-Item"
<div
v-for=
"(item, index) in feedbackList"
class=
"CustomerFeedback-Item"
:key=
"index"
v-for=
"(item, index) in feedbackList"
>
:key=
"index"
<span
class=
"CustomerFeedback-ItemNum"
>
{{
item
.
count
}}
条
</span>
>
<span
<span
class=
"CustomerFeedback-ItemNum"
>
{{
item
.
count
}}
条
</span>
class=
"CustomerFeedback-ItemName"
<span
@
click=
"() => clickHandle(item)"
class=
"CustomerFeedback-ItemName"
:title=
"item.areaName"
@
click=
"() => clickHandle(item)"
>
{{
item
.
areaName
}}
</span>
:title=
"item.areaName"
</div>
>
{{
item
.
areaName
}}
</span>
</div>
</
template
>
<
template
v-else
>
<div
class=
"noFeedbackText"
>
没有需要处理的反馈
</div>
</
template
>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -37,7 +46,11 @@ import { mapGetters, mapActions } from 'vuex';
...
@@ -37,7 +46,11 @@ import { mapGetters, mapActions } from 'vuex';
export
default
{
export
default
{
name
:
'CustomerFeedback'
,
name
:
'CustomerFeedback'
,
computed
:
{
computed
:
{
...
mapGetters
(
'Dashboard/customerFeedback'
,
[
'feedbackList'
,
'count'
]),
...
mapGetters
(
'Dashboard/customerFeedback'
,
[
'feedbackList'
,
'count'
,
'loading'
,
]),
...
mapGetters
([
'feedbackPage'
]),
...
mapGetters
([
'feedbackPage'
]),
},
},
data
()
{
data
()
{
...
@@ -100,6 +113,9 @@ export default {
...
@@ -100,6 +113,9 @@ export default {
.CustomerFeedback-List
{
.CustomerFeedback-List
{
flex
:
1
;
flex
:
1
;
overflow-y
:
auto
;
overflow-y
:
auto
;
.noFeedbackText
{
padding
:
50px
20px
;
}
}
}
.CustomerFeedback-Item
{
.CustomerFeedback-Item
{
display
:
flex
;
display
:
flex
;
...
...
src/containers/Dashboard/CustomerFeedback/CustomerFeedbackStore.js
View file @
61209dc4
import
{
getFeedbackList
}
from
'@/api/dashboard/dashboard'
;
import
{
getFeedbackList
}
from
'@/api/dashboard/dashboard'
;
const
FETCH_FFEDBACK_LIST
=
'FETCH_FFEDBACK_LIST'
;
const
FETCH_FFEDBACK_LIST
=
'FETCH_FFEDBACK_LIST'
;
const
FETCH_DATA
=
'FETCH_DATA'
;
const
state
=
()
=>
({
const
state
=
()
=>
({
loading
:
false
,
list
:
[],
list
:
[],
count
:
0
,
count
:
0
,
});
});
...
@@ -9,14 +11,22 @@ const state = () => ({
...
@@ -9,14 +11,22 @@ const state = () => ({
const
getters
=
{
const
getters
=
{
feedbackList
:
state
=>
state
.
list
,
feedbackList
:
state
=>
state
.
list
,
count
:
state
=>
state
.
count
,
count
:
state
=>
state
.
count
,
loading
:
state
=>
state
.
loading
,
};
};
const
actions
=
{
const
actions
=
{
getFeedbackList
({
commit
})
{
getFeedbackList
({
commit
})
{
return
getFeedbackList
().
then
(
res
=>
{
commit
(
FETCH_DATA
,
true
);
const
{
data
,
count
}
=
res
;
return
getFeedbackList
()
commit
(
FETCH_FFEDBACK_LIST
,
{
list
:
data
,
count
});
.
then
(
res
=>
{
});
const
{
data
,
count
}
=
res
;
commit
(
FETCH_FFEDBACK_LIST
,
{
list
:
data
,
count
});
commit
(
FETCH_DATA
,
false
);
})
.
catch
(
err
=>
{
console
.
error
(
err
);
commit
(
FETCH_DATA
,
false
);
});
},
},
};
};
...
@@ -25,6 +35,9 @@ const mutations = {
...
@@ -25,6 +35,9 @@ const mutations = {
state
.
list
=
data
.
list
;
state
.
list
=
data
.
list
;
state
.
count
=
data
.
count
;
state
.
count
=
data
.
count
;
},
},
[
FETCH_DATA
](
state
,
fetching
)
{
state
.
loading
=
fetching
;
},
};
};
export
default
{
export
default
{
...
...
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