资源监控列表以及详情完成
Showing
19 changed files
with
187 additions
and
226 deletions
... | @@ -2,9 +2,4 @@ | ... | @@ -2,9 +2,4 @@ |
2 | ENV = 'development' | 2 | ENV = 'development' |
3 | 3 | ||
4 | # base api | 4 | # base api |
5 | # VUE_APP_BASE_API = 'http://192.168.11.94:8081' | ||
6 | # VUE_APP_BASE_API = 'http://192.168.252.25:8081' | ||
7 | VUE_APP_BASE_API = 'https://pre-web-chery.situdata.com' | ||
8 | |||
9 | VUE_APP_WEBRTC_URL = 'pre-jitsi-chery.situdata.com' | ||
10 | # VUE_APP_WEBRTC_URL = 'srtc.situdata.com' | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
5 | VUE_APP_BASE_API = 'http://192.168.11.67:8096' | ... | ... |
... | @@ -6,12 +6,6 @@ | ... | @@ -6,12 +6,6 @@ |
6 | <meta name="viewport" content="width=device-width,initial-scale=1.0" /> | 6 | <meta name="viewport" content="width=device-width,initial-scale=1.0" /> |
7 | <link rel="icon" href="<%= BASE_URL %>favicon.ico" /> | 7 | <link rel="icon" href="<%= BASE_URL %>favicon.ico" /> |
8 | <title>云销</title> | 8 | <title>云销</title> |
9 | <!-- strophe删除待定 --> | ||
10 | <!-- <script src="./libs/strophe/strophe.js"></script> | ||
11 | <script src="./libs/strophe/strophe.disco.min.js?v=1"></script> | ||
12 | |||
13 | <script src="./libs/jquery-2.1.1.min.js"></script> | ||
14 | <script src="./libs/lib-jitsi-meet.min.js"></script> --> | ||
15 | </head> | 9 | </head> |
16 | <body> | 10 | <body> |
17 | <noscript> | 11 | <noscript> | ... | ... |
public/libs/jquery-2.1.1.js
deleted
100644 → 0
This diff could not be displayed because it is too large.
public/libs/jquery-2.1.1.min.js
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
public/libs/lib-jitsi-meet.min.js
deleted
100644 → 0
This diff could not be displayed because it is too large.
1 | Strophe.addConnectionPlugin("disco",{_connection:null,_identities:[],_features:[],_items:[],init:function(conn){this._connection=conn;this._identities=[];this._features=[];this._items=[];conn.addHandler(this._onDiscoInfo.bind(this),Strophe.NS.DISCO_INFO,"iq","get",null,null);conn.addHandler(this._onDiscoItems.bind(this),Strophe.NS.DISCO_ITEMS,"iq","get",null,null)},addIdentity:function(category,type,name,lang){for(var i=0;i<this._identities.length;i++){if(this._identities[i].category==category&&this._identities[i].type==type&&this._identities[i].name==name&&this._identities[i].lang==lang){return false}}this._identities.push({category:category,type:type,name:name,lang:lang});return true},addFeature:function(var_name){for(var i=0;i<this._features.length;i++){if(this._features[i]==var_name){return false}}this._features.push(var_name);return true},removeFeature:function(var_name){for(var i=0;i<this._features.length;i++){if(this._features[i]===var_name){this._features.splice(i,1);return true}}return false},addItem:function(jid,name,node,call_back){if(node&&!call_back){return false}this._items.push({jid:jid,name:name,node:node,call_back:call_back});return true},info:function(jid,node,success,error,timeout){var attrs={xmlns:Strophe.NS.DISCO_INFO};if(node){attrs.node=node}var info=$iq({from:this._connection.jid,to:jid,type:"get"}).c("query",attrs);this._connection.sendIQ(info,success,error,timeout)},items:function(jid,node,success,error,timeout){var attrs={xmlns:Strophe.NS.DISCO_ITEMS};if(node){attrs.node=node}var items=$iq({from:this._connection.jid,to:jid,type:"get"}).c("query",attrs);this._connection.sendIQ(items,success,error,timeout)},_buildIQResult:function(stanza,query_attrs){var id=stanza.getAttribute("id");var from=stanza.getAttribute("from");var iqresult=$iq({type:"result",id:id});if(from!==null){iqresult.attrs({to:from})}return iqresult.c("query",query_attrs)},_onDiscoInfo:function(stanza){var node=stanza.getElementsByTagName("query")[0].getAttribute("node");var attrs={xmlns:Strophe.NS.DISCO_INFO};if(node){attrs.node=node}var iqresult=this._buildIQResult(stanza,attrs);for(var i=0;i<this._identities.length;i++){var attrs={category:this._identities[i].category,type:this._identities[i].type};if(this._identities[i].name){attrs.name=this._identities[i].name}if(this._identities[i].lang){attrs["xml:lang"]=this._identities[i].lang}iqresult.c("identity",attrs).up()}for(var i=0;i<this._features.length;i++){iqresult.c("feature",{"var":this._features[i]}).up()}this._connection.send(iqresult.tree());return true},_onDiscoItems:function(stanza){var query_attrs={xmlns:Strophe.NS.DISCO_ITEMS};var node=stanza.getElementsByTagName("query")[0].getAttribute("node");if(node){query_attrs.node=node;var items=[];for(var i=0;i<this._items.length;i++){if(this._items[i].node==node){items=this._items[i].call_back(stanza);break}}}else{var items=this._items}var iqresult=this._buildIQResult(stanza,query_attrs);for(var i=0;i<items.length;i++){var attrs={jid:items[i].jid};if(items[i].name){attrs.name=items[i].name}if(items[i].node){attrs.node=items[i].node}iqresult.c("item",attrs).up()}this._connection.send(iqresult.tree());return true}}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
public/libs/strophe/strophe.js
deleted
100644 → 0
This diff could not be displayed because it is too large.
public/libs/strophe/strophe.min.js
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
2 | 2 | ||
3 | /** | 3 | /** |
4 | * 7天业务量 | 4 | * 资源监控列表 |
5 | * @param {*} data | 5 | * @param {*} data |
6 | */ | 6 | */ |
7 | export function volumeCalls(data) { | 7 | export function getResourceMonitorList(data) { |
8 | return request({ | 8 | return request({ |
9 | url: '/chery/homepage/volumeCalls', | 9 | url: '/saleCloud/web/getResourceMonitorList', |
10 | method: 'post', | 10 | method: 'post', |
11 | data | 11 | data |
12 | }) | 12 | }) |
13 | } | 13 | } |
14 | 14 | ||
15 | /** | 15 | /** |
16 | * 通话时长 | 16 | * 资源监控详情 |
17 | * @param {*} data | 17 | * @param {*} data |
18 | */ | 18 | */ |
19 | export function durationsCalls(data) { | 19 | export function getResourceDetail(data) { |
20 | return request({ | 20 | return request({ |
21 | url: '/chery/homepage/durationsCalls', | 21 | url: '/saleCloud/web/getResourceDetail', |
22 | method: 'post', | ||
23 | data | ||
24 | }) | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * 资源监控详情修改备注 | ||
29 | * @param {*} data | ||
30 | */ | ||
31 | export function saveResourceMonitorRemarks(data) { | ||
32 | return request({ | ||
33 | url: '/saleCloud/web/saveResourceMonitorRemarks', | ||
22 | method: 'post', | 34 | method: 'post', |
23 | data | 35 | data |
24 | }) | 36 | }) | ... | ... |
... | @@ -6,7 +6,7 @@ import request from '@/utils/request' | ... | @@ -6,7 +6,7 @@ import request from '@/utils/request' |
6 | */ | 6 | */ |
7 | export function login(data) { | 7 | export function login(data) { |
8 | return request({ | 8 | return request({ |
9 | url: '/chery/account/login', | 9 | url: '/saleCloud/web/login', |
10 | method: 'post', | 10 | method: 'post', |
11 | data | 11 | data |
12 | }) | 12 | }) |
... | @@ -17,89 +17,7 @@ export function login(data) { | ... | @@ -17,89 +17,7 @@ export function login(data) { |
17 | */ | 17 | */ |
18 | export function logout() { | 18 | export function logout() { |
19 | return request({ | 19 | return request({ |
20 | url: '/chery/account/logout', | 20 | url: '/saleCloud/logout', |
21 | method: 'post' | 21 | method: 'post' |
22 | }) | 22 | }) |
23 | } | 23 | } |
24 | |||
25 | /** | ||
26 | * 注册 | ||
27 | * @param {*} data | ||
28 | */ | ||
29 | export function registry(data) { | ||
30 | return request({ | ||
31 | url: '/chery/account/registry', | ||
32 | method: 'post', | ||
33 | data | ||
34 | }) | ||
35 | } | ||
36 | |||
37 | /** | ||
38 | * 重置密码 | ||
39 | * @param {*} data | ||
40 | */ | ||
41 | export function resetPassword(data) { | ||
42 | return request({ | ||
43 | url: '/chery/account/reset-password', | ||
44 | method: 'post', | ||
45 | data | ||
46 | }) | ||
47 | } | ||
48 | |||
49 | /** | ||
50 | * 删除 | ||
51 | * @param {*} data | ||
52 | */ | ||
53 | export function deleteUser(data) { | ||
54 | return request({ | ||
55 | url: '/chery/account/delete', | ||
56 | method: 'post', | ||
57 | data | ||
58 | }) | ||
59 | } | ||
60 | |||
61 | /** | ||
62 | * 禁用账号 | ||
63 | * @param {*} data | ||
64 | */ | ||
65 | export function accountAvailable(data) { | ||
66 | return request({ | ||
67 | url: '/chery/account/available', | ||
68 | method: 'post', | ||
69 | data | ||
70 | }) | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * 账号列表查询 | ||
75 | * @param {*} data | ||
76 | */ | ||
77 | export function accountList(data) { | ||
78 | return request({ | ||
79 | url: '/chery/account/list', | ||
80 | method: 'post', | ||
81 | data | ||
82 | }) | ||
83 | } | ||
84 | /** | ||
85 | * 验证工号是否已存在 | ||
86 | * @param {*} data | ||
87 | */ | ||
88 | export function validUsername(data) { | ||
89 | return request({ | ||
90 | url: '/chery/account/valid-username', | ||
91 | method: 'post', | ||
92 | data | ||
93 | }) | ||
94 | } | ||
95 | /** | ||
96 | * 监控开启关闭 | ||
97 | * @param {*} data | ||
98 | */ | ||
99 | export function switchMonitor(data) { | ||
100 | return request({ | ||
101 | url: '/chery/account/switch-monitor', | ||
102 | method: 'post', | ||
103 | data | ||
104 | }) | ||
105 | } | ... | ... |
... | @@ -43,23 +43,12 @@ export const constantRoutes = [ | ... | @@ -43,23 +43,12 @@ export const constantRoutes = [ |
43 | path: '/login', | 43 | path: '/login', |
44 | component: () => import('@/views/login/index'), | 44 | component: () => import('@/views/login/index'), |
45 | hidden: true | 45 | hidden: true |
46 | } | 46 | }, |
47 | ] | ||
48 | /** | ||
49 | * asyncRoutes | ||
50 | * the routes that need to be dynamically loaded based on user roles | ||
51 | */ | ||
52 | export const asyncRoutes = [ | ||
53 | { | 47 | { |
54 | path: '/', | 48 | path: '/', |
55 | component: Layout, | 49 | component: Layout, |
56 | redirect: '/monitor', | 50 | redirect: '/monitor', |
57 | meta: { | 51 | meta: {}, |
58 | roles: [ | ||
59 | PERMISSION_USER_MAP.admin.code, | ||
60 | PERMISSION_USER_MAP.dataAnalyst.code | ||
61 | ] | ||
62 | }, | ||
63 | children: [ | 52 | children: [ |
64 | { | 53 | { |
65 | path: 'monitor', | 54 | path: 'monitor', |
... | @@ -78,10 +67,17 @@ export const asyncRoutes = [ | ... | @@ -78,10 +67,17 @@ export const asyncRoutes = [ |
78 | meta: { | 67 | meta: { |
79 | title: '远程订单详情', | 68 | title: '远程订单详情', |
80 | icon: 'home' | 69 | icon: 'home' |
81 | } | 70 | }, |
71 | props: route => ({ custInfo: route.query }) | ||
82 | } | 72 | } |
83 | ] | 73 | ] |
84 | }, | 74 | } |
75 | ] | ||
76 | /** | ||
77 | * asyncRoutes | ||
78 | * the routes that need to be dynamically loaded based on user roles | ||
79 | */ | ||
80 | export const asyncRoutes = [ | ||
85 | { | 81 | { |
86 | path: '/404', | 82 | path: '/404', |
87 | component: () => import('@/views/404'), | 83 | component: () => import('@/views/404'), | ... | ... |
... | @@ -6,7 +6,7 @@ import permission from './modules/permisssion' | ... | @@ -6,7 +6,7 @@ import permission from './modules/permisssion' |
6 | 6 | ||
7 | import { login, logout } from '@/api/user' | 7 | import { login, logout } from '@/api/user' |
8 | import { getToken, setToken, removeToken } from '@/utils/auth' | 8 | import { getToken, setToken, removeToken } from '@/utils/auth' |
9 | import { NAME, USER_TYPE, USER_ID, USER_PASS } from '@/utils/mappingData' | 9 | import { NAME, ROLE_TYPE, USER_ID, USER_PASS } from '@/utils/mappingData' |
10 | 10 | ||
11 | Vue.use(Vuex) | 11 | Vue.use(Vuex) |
12 | 12 | ||
... | @@ -14,7 +14,7 @@ export default new Vuex.Store({ | ... | @@ -14,7 +14,7 @@ export default new Vuex.Store({ |
14 | state: { | 14 | state: { |
15 | token: getToken(), | 15 | token: getToken(), |
16 | name: sessionStorage.getItem(NAME), | 16 | name: sessionStorage.getItem(NAME), |
17 | roles: JSON.parse(sessionStorage.getItem(USER_TYPE)) || '', | 17 | roles: JSON.parse(sessionStorage.getItem(ROLE_TYPE)) || '', |
18 | userId: sessionStorage.getItem(USER_ID), | 18 | userId: sessionStorage.getItem(USER_ID), |
19 | resetRouterTemp: '', | 19 | resetRouterTemp: '', |
20 | userpass: JSON.parse(sessionStorage.getItem(USER_PASS)) || '' | 20 | userpass: JSON.parse(sessionStorage.getItem(USER_PASS)) || '' |
... | @@ -34,7 +34,7 @@ export default new Vuex.Store({ | ... | @@ -34,7 +34,7 @@ export default new Vuex.Store({ |
34 | }, | 34 | }, |
35 | SET_ROLES: (state, userType) => { | 35 | SET_ROLES: (state, userType) => { |
36 | state.roles = userType | 36 | state.roles = userType |
37 | sessionStorage.setItem(USER_TYPE, JSON.stringify(userType)) | 37 | sessionStorage.setItem(ROLE_TYPE, JSON.stringify(userType)) |
38 | }, | 38 | }, |
39 | SET_ROUTER_TEMP(state, payload) { | 39 | SET_ROUTER_TEMP(state, payload) { |
40 | state.resetRouterTemp = payload | 40 | state.resetRouterTemp = payload |
... | @@ -53,9 +53,9 @@ export default new Vuex.Store({ | ... | @@ -53,9 +53,9 @@ export default new Vuex.Store({ |
53 | password: password | 53 | password: password |
54 | }) | 54 | }) |
55 | if (res.code === 0) { | 55 | if (res.code === 0) { |
56 | commit('SET_ROLES', res.result.roleCode) | 56 | commit('SET_ROLES', res.result.role) |
57 | commit('SET_NAME', res.result.name) | 57 | commit('SET_NAME', res.result.name) |
58 | commit('SET_USER_ID', res.result.username) | 58 | commit('SET_USER_ID', res.result.name) |
59 | commit('SET_TOKEN', res.result.token) | 59 | commit('SET_TOKEN', res.result.token) |
60 | } | 60 | } |
61 | return res | 61 | return res | ... | ... |
1 | // session key | 1 | // session key |
2 | export const NAME = 'name' | 2 | export const NAME = 'name' |
3 | export const USER_ID = 'userId' | 3 | export const USER_ID = 'userId' |
4 | export const USER_TYPE = 'userType' | 4 | export const ROLE_TYPE = 'roleType' |
5 | export const USER_PASS = 'userpass' | 5 | export const USER_PASS = 'userpass' |
6 | 6 | ||
7 | // 权限字段 | 7 | // 权限字段 |
... | @@ -19,11 +19,3 @@ export const PERMISSION_USER_MAP = { | ... | @@ -19,11 +19,3 @@ export const PERMISSION_USER_MAP = { |
19 | name: '数据分析员' | 19 | name: '数据分析员' |
20 | } | 20 | } |
21 | } | 21 | } |
22 | |||
23 | // contactCard const | ||
24 | export const CONTACT_CARD = { | ||
25 | ANSWER_END: 'answerEnd', // 接听挂断 | ||
26 | ANSWER: 'answer', // 接听 | ||
27 | CALL: 'call', // 呼叫 | ||
28 | CALL_END: 'callEnd' // 呼叫挂断 | ||
29 | } | ... | ... |
... | @@ -7,7 +7,7 @@ import router from '@/router' | ... | @@ -7,7 +7,7 @@ import router from '@/router' |
7 | 7 | ||
8 | // create an axios instance | 8 | // create an axios instance |
9 | const service = axios.create({ | 9 | const service = axios.create({ |
10 | // baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url | 10 | baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url |
11 | withCredentials: false // send cookies when cross-domain requests | 11 | withCredentials: false // send cookies when cross-domain requests |
12 | // timeout: 10000 // request timeout | 12 | // timeout: 10000 // request timeout |
13 | }) | 13 | }) |
... | @@ -19,8 +19,7 @@ service.interceptors.request.use( | ... | @@ -19,8 +19,7 @@ service.interceptors.request.use( |
19 | if (store.state.token) { | 19 | if (store.state.token) { |
20 | // let each request carry token --['X-Token'] as a custom key. | 20 | // let each request carry token --['X-Token'] as a custom key. |
21 | // please modify it according to the actual situation. | 21 | // please modify it according to the actual situation. |
22 | config.headers['X-Source'] = 'web' | 22 | config.headers['X-Auth-Token'] = getToken() |
23 | config.headers['x-auth-token'] = getToken() | ||
24 | } | 23 | } |
25 | return config | 24 | return config |
26 | }, | 25 | }, |
... | @@ -45,30 +44,13 @@ service.interceptors.response.use( | ... | @@ -45,30 +44,13 @@ service.interceptors.response.use( |
45 | */ | 44 | */ |
46 | response => { | 45 | response => { |
47 | const res = response.data | 46 | const res = response.data |
48 | if (response.config.url.includes('download')) { | 47 | if (res && res.code === 0) { |
49 | return res | 48 | return res |
50 | } | 49 | } else if (res && res.code === -1) { |
51 | if (response.config.url.includes('recognize')) { | ||
52 | return res | ||
53 | } | ||
54 | if (response.config.url.includes('verify')) { | ||
55 | return res | ||
56 | } | ||
57 | |||
58 | // 3703图片未识别 3730报表无数据 | ||
59 | if ( | ||
60 | (res && res.code === 0) || | ||
61 | res.code === 2926 || | ||
62 | res.code === 4001 || | ||
63 | res.code === 3703 || | ||
64 | res.code === 3730 | ||
65 | ) { | ||
66 | return res | ||
67 | } else if (res && res.code === 2909) { | ||
68 | // 2909 登录超时 | 50 | // 2909 登录超时 |
69 | // cookie失效 | 51 | // cookie失效 |
70 | Message({ | 52 | Message({ |
71 | message: res.msg || 'error', | 53 | message: res.message || 'error', |
72 | type: 'error', | 54 | type: 'error', |
73 | duration: 5 * 1000 | 55 | duration: 5 * 1000 |
74 | }) | 56 | }) |
... | @@ -76,7 +58,7 @@ service.interceptors.response.use( | ... | @@ -76,7 +58,7 @@ service.interceptors.response.use( |
76 | router.push('/login') | 58 | router.push('/login') |
77 | } else if (res && res.code) { | 59 | } else if (res && res.code) { |
78 | Message({ | 60 | Message({ |
79 | message: res.msg || 'error', | 61 | message: res.message || 'error', |
80 | type: 'error', | 62 | type: 'error', |
81 | duration: 5 * 1000 | 63 | duration: 5 * 1000 |
82 | }) | 64 | }) | ... | ... |
... | @@ -24,13 +24,12 @@ export default { | ... | @@ -24,13 +24,12 @@ export default { |
24 | }, | 24 | }, |
25 | methods: { | 25 | methods: { |
26 | ...mapActions(['login']), | 26 | ...mapActions(['login']), |
27 | ...mapMutations(['SET_ROUTER_TEMP', 'SET_USERPASS']), | 27 | ...mapMutations(['SET_ROUTER_TEMP']), |
28 | async handleLogin({ username, password }) { | 28 | async handleLogin({ username, password }) { |
29 | try { | 29 | try { |
30 | this.btnLoading = true | 30 | this.btnLoading = true |
31 | const { code } = await this.login({ username, password }) | 31 | const { code } = await this.login({ username, password }) |
32 | if (code === 0) { | 32 | if (code === 0) { |
33 | this.SET_USERPASS(password) | ||
34 | this.$router.push({ path: '/' }) | 33 | this.$router.push({ path: '/' }) |
35 | } else { | 34 | } else { |
36 | this.$refs.loginRef.updateCaptcha() | 35 | this.$refs.loginRef.updateCaptcha() | ... | ... |
... | @@ -8,18 +8,18 @@ | ... | @@ -8,18 +8,18 @@ |
8 | inline | 8 | inline |
9 | :model="ruleForm" | 9 | :model="ruleForm" |
10 | > | 10 | > |
11 | <el-form-item label="营销员姓名" prop="customName"> | 11 | <el-form-item label="营销员姓名" prop="username"> |
12 | <el-input | 12 | <el-input |
13 | v-model.trim="ruleForm.customName" | 13 | v-model.trim="ruleForm.username" |
14 | placeholder="请输入营销员姓名" | 14 | placeholder="请输入营销员姓名" |
15 | maxlength="21" | 15 | maxlength="21" |
16 | > | 16 | > |
17 | <i slot="prefix" class="el-icon-search"></i | 17 | <i slot="prefix" class="el-icon-search"></i |
18 | ></el-input> | 18 | ></el-input> |
19 | </el-form-item> | 19 | </el-form-item> |
20 | <el-form-item label="营销员工号" prop="customId"> | 20 | <el-form-item label="营销员工号" prop="userId"> |
21 | <el-input | 21 | <el-input |
22 | v-model.trim="ruleForm.customId" | 22 | v-model.trim="ruleForm.userId" |
23 | placeholder="请输入营销员工号" | 23 | placeholder="请输入营销员工号" |
24 | maxlength="21" | 24 | maxlength="21" |
25 | > | 25 | > |
... | @@ -39,7 +39,9 @@ | ... | @@ -39,7 +39,9 @@ |
39 | </el-form> | 39 | </el-form> |
40 | </div> | 40 | </div> |
41 | <div class="flex-end mb10"> | 41 | <div class="flex-end mb10"> |
42 | <el-button type="primary" size="mini" @click="onSubmit">查询</el-button> | 42 | <el-button type="primary" size="mini" @click="handleQueryOrderList" |
43 | >查询</el-button | ||
44 | > | ||
43 | <el-button size="mini" @click="onReset">重置</el-button> | 45 | <el-button size="mini" @click="onReset">重置</el-button> |
44 | </div> | 46 | </div> |
45 | <el-table | 47 | <el-table |
... | @@ -49,34 +51,40 @@ | ... | @@ -49,34 +51,40 @@ |
49 | style="width: 100%" | 51 | style="width: 100%" |
50 | v-loading="loading" | 52 | v-loading="loading" |
51 | > | 53 | > |
52 | <el-table-column align="center" prop="orderId" label="序号" fixed> | 54 | <el-table-column |
55 | type="index" | ||
56 | label="序号" | ||
57 | fixed | ||
58 | :index="pagination && (pagination.page - 1) * pagination.size + 1" | ||
59 | > | ||
53 | </el-table-column> | 60 | </el-table-column> |
54 | <el-table-column | 61 | <el-table-column |
55 | align="center" | 62 | align="center" |
56 | prop="createTime" | 63 | prop="custName" |
57 | label="客户姓名" | 64 | label="客户姓名" |
58 | width="160" | 65 | width="160" |
59 | > | 66 | > |
60 | </el-table-column> | 67 | </el-table-column> |
61 | <el-table-column | 68 | <el-table-column |
62 | align="center" | 69 | align="center" |
63 | prop="callTime" | 70 | prop="custTel" |
64 | label="客户手机号" | 71 | label="客户手机号" |
65 | width="160" | 72 | width="160" |
66 | > | 73 | > |
67 | </el-table-column> | 74 | </el-table-column> |
68 | <el-table-column align="center" prop="partnerDesc" label="管理员姓名"> | 75 | <el-table-column align="center" prop="userName" label="营销员姓名"> |
69 | </el-table-column> | 76 | </el-table-column> |
70 | <el-table-column align="center" prop="customerName" label="营销员工号"> | 77 | <el-table-column align="center" prop="userId" label="营销员工号"> |
71 | </el-table-column> | 78 | </el-table-column> |
72 | <el-table-column | 79 | <el-table-column align="center" label="展业时长" width="160"> |
73 | align="center" | 80 | <template v-slot="scope"> |
74 | prop="customerPhoneNo" | 81 | {{ parseTimeSecond(scope.row.communicationTime * 1000 - 0) }} |
75 | label="展业时长" | 82 | </template> |
76 | width="160" | ||
77 | > | ||
78 | </el-table-column> | 83 | </el-table-column> |
79 | <el-table-column align="center" prop="callType" label="展业开始时间"> | 84 | <el-table-column align="center" label="展业开始时间"> |
85 | <template v-slot="scope"> | ||
86 | {{ parseTime(scope.row.startTime) }} | ||
87 | </template> | ||
80 | </el-table-column> | 88 | </el-table-column> |
81 | <el-table-column align="center" label="操作" fixed="right"> | 89 | <el-table-column align="center" label="操作" fixed="right"> |
82 | <template v-slot="scope"> | 90 | <template v-slot="scope"> |
... | @@ -97,7 +105,8 @@ | ... | @@ -97,7 +105,8 @@ |
97 | 105 | ||
98 | <script> | 106 | <script> |
99 | import FooterPaginationfrom from './components/FooterPagination' | 107 | import FooterPaginationfrom from './components/FooterPagination' |
100 | import { parseTime } from '@/utils/util' | 108 | import { parseTime, parseTimeSecond } from '@/utils/util' |
109 | import { getResourceMonitorList } from '@/api/monitor' | ||
101 | 110 | ||
102 | export default { | 111 | export default { |
103 | components: { | 112 | components: { |
... | @@ -106,42 +115,53 @@ export default { | ... | @@ -106,42 +115,53 @@ export default { |
106 | data() { | 115 | data() { |
107 | return { | 116 | return { |
108 | parseTime, | 117 | parseTime, |
118 | parseTimeSecond, | ||
109 | ruleForm: { | 119 | ruleForm: { |
110 | customName: '', | 120 | username: '', |
111 | customId: '', | 121 | userId: '', |
112 | times: '' | 122 | times: '' |
113 | }, | 123 | }, |
114 | tableData: [{}], | 124 | tableData: [], |
115 | pagination: null, | 125 | pagination: null, |
116 | loading: false, | 126 | loading: false, |
117 | total: 0 | 127 | total: 0 |
118 | } | 128 | } |
119 | }, | 129 | }, |
120 | methods: { | 130 | methods: { |
121 | onSubmit() { | 131 | async handleGetResourceMonitorList() { |
122 | this.$refs.ruleForm.validate(valid => { | 132 | try { |
123 | if (valid) { | 133 | const { |
124 | this.handleQueryOrderList() | 134 | result: { list, total } |
125 | } else { | 135 | } = await getResourceMonitorList({ |
126 | return false | 136 | username: this.ruleForm.username, |
127 | } | 137 | userId: this.ruleForm.userId, |
128 | }) | 138 | startTime: this.ruleForm.times[0], |
139 | endTime: this.ruleForm.times[1], | ||
140 | pageNo: this.pagination.page, | ||
141 | row: this.pagination.size | ||
142 | }) | ||
143 | this.tableData = list | ||
144 | this.total = total | ||
145 | } catch (error) { | ||
146 | console.log(error) | ||
147 | } | ||
129 | }, | 148 | }, |
130 | onReset() { | 149 | onReset() { |
131 | this.ruleForm = { | 150 | this.ruleForm = { |
132 | customName: '', | 151 | username: '', |
133 | customId: '', | 152 | userId: '', |
134 | times: '' | 153 | times: '' |
135 | } | 154 | } |
136 | this.onSubmit() | 155 | this.handleQueryOrderList() |
137 | }, | 156 | }, |
138 | handleGetPager(data) { | 157 | handleGetPager(data) { |
139 | this.pagination = data | 158 | this.pagination = data |
140 | // this.onSubmit() | 159 | this.handleQueryOrderList() |
141 | }, | 160 | }, |
142 | async handleQueryOrderList() { | 161 | async handleQueryOrderList() { |
143 | try { | 162 | try { |
144 | this.loading = true | 163 | this.loading = true |
164 | await this.handleGetResourceMonitorList() | ||
145 | } catch (error) { | 165 | } catch (error) { |
146 | console.log(error) | 166 | console.log(error) |
147 | } finally { | 167 | } finally { |
... | @@ -151,7 +171,7 @@ export default { | ... | @@ -151,7 +171,7 @@ export default { |
151 | handleDetail(row) { | 171 | handleDetail(row) { |
152 | this.$router.push({ | 172 | this.$router.push({ |
153 | path: 'monitor-details', | 173 | path: 'monitor-details', |
154 | query: { id: row.orderId } | 174 | query: { ...row } |
155 | }) | 175 | }) |
156 | } | 176 | } |
157 | } | 177 | } | ... | ... |
... | @@ -3,22 +3,25 @@ | ... | @@ -3,22 +3,25 @@ |
3 | <div class="top mb10"> | 3 | <div class="top mb10"> |
4 | <Card class="info"> | 4 | <Card class="info"> |
5 | <h4 class="mb10">客户信息</h4> | 5 | <h4 class="mb10">客户信息</h4> |
6 | <div class="item">姓名:刘非法</div> | 6 | <div class="item">姓名:{{ custInfoCopy.custName }}</div> |
7 | <div class="item">性别:男</div> | 7 | <div class="item"> |
8 | <div class="item">证件类型:身份证</div> | 8 | 性别:{{ custInfoCopy.custGender - 0 === 0 ? '女' : '男' }} |
9 | <div class="item">证件号:232303199101294123</div> | 9 | </div> |
10 | <div class="item">微信昵称:</div> | 10 | <div class="item">证件类型:{{ custInfoCopy.custIdType }}</div> |
11 | <div class="item">状态:交流中</div> | 11 | <div class="item">证件号:{{ custInfoCopy.custIdNo }}</div> |
12 | <div class="item">年收入:7万</div> | 12 | <div class="item">微信昵称:{{ custInfoCopy.custWxName }}</div> |
13 | <div class="item">地址:北京</div> | 13 | <div class="item">状态:{{ custInfoCopy.custStatus }}</div> |
14 | <div class="item">年收入:{{ custInfoCopy.custIncome }}</div> | ||
15 | <div class="item">地址:{{ custInfoCopy.custAddr }}</div> | ||
16 | <div class="item">备注:{{ custInfoCopy.custRemarks }}</div> | ||
14 | </Card> | 17 | </Card> |
15 | <div class="video-wrapper"> | 18 | <div class="video-wrapper"> |
16 | <VideoPlayer></VideoPlayer> | 19 | <VideoPlayer :url="videoUrl"></VideoPlayer> |
17 | </div> | 20 | </div> |
18 | </div> | 21 | </div> |
19 | <Card class="mb10"> | 22 | <Card class="mb10"> |
20 | <el-form label-width="50px" :model="form"> | 23 | <el-form label-width="60px" ref="form" :model="form" :rules="rules"> |
21 | <el-form-item label="备注"> | 24 | <el-form-item label="备注" prop="remarks"> |
22 | <el-input | 25 | <el-input |
23 | type="textarea" | 26 | type="textarea" |
24 | placeholder="请输入" | 27 | placeholder="请输入" |
... | @@ -38,20 +41,75 @@ | ... | @@ -38,20 +41,75 @@ |
38 | 41 | ||
39 | <script> | 42 | <script> |
40 | import VideoPlayer from '@/components/videoPlayer' | 43 | import VideoPlayer from '@/components/videoPlayer' |
44 | import { getResourceDetail, saveResourceMonitorRemarks } from '@/api/monitor' | ||
41 | 45 | ||
42 | export default { | 46 | export default { |
43 | components: { | 47 | components: { |
44 | VideoPlayer | 48 | VideoPlayer |
45 | }, | 49 | }, |
50 | props: ['custInfo'], | ||
46 | data() { | 51 | data() { |
47 | return { | 52 | return { |
48 | form: { | 53 | form: { |
49 | remarks: '' | 54 | remarks: '' |
50 | } | 55 | }, |
56 | rules: { | ||
57 | remarks: [ | ||
58 | { required: true, message: '请输入备注', trigger: 'blur' }, | ||
59 | { | ||
60 | min: 1, | ||
61 | max: 200, | ||
62 | message: '长度在 1 到 200 个字符', | ||
63 | trigger: 'blur' | ||
64 | } | ||
65 | ] | ||
66 | }, | ||
67 | videoUrl: '', | ||
68 | custInfoCopy: this.custInfo | ||
51 | } | 69 | } |
52 | }, | 70 | }, |
71 | beforeMount() { | ||
72 | this.handleGetResourceDetail() | ||
73 | }, | ||
53 | methods: { | 74 | methods: { |
54 | handleSubmit() {} | 75 | handleSubmit() { |
76 | this.$refs.form.validate(valid => { | ||
77 | if (valid) { | ||
78 | this.handleSaveResourceMonitorRemarks() | ||
79 | } | ||
80 | return false | ||
81 | }) | ||
82 | }, | ||
83 | async handleGetResourceDetail() { | ||
84 | try { | ||
85 | const { | ||
86 | result: { monitorRemarks, url } | ||
87 | } = await getResourceDetail({ | ||
88 | ossId: this.custInfoCopy.ossId, | ||
89 | recordId: this.custInfoCopy.recordId | ||
90 | }) | ||
91 | this.form.remarks = monitorRemarks | ||
92 | this.videoUrl = url | ||
93 | } catch (error) { | ||
94 | console.log(error) | ||
95 | } | ||
96 | }, | ||
97 | async handleSaveResourceMonitorRemarks() { | ||
98 | try { | ||
99 | const res = await saveResourceMonitorRemarks({ | ||
100 | recordId: this.custInfoCopy.recordId, | ||
101 | remarks: this.form.remarks | ||
102 | }) | ||
103 | if (res.code === 0) { | ||
104 | this.$message({ | ||
105 | message: '更新成功', | ||
106 | type: 'success' | ||
107 | }) | ||
108 | } | ||
109 | } catch (error) { | ||
110 | console.log(error) | ||
111 | } | ||
112 | } | ||
55 | } | 113 | } |
56 | } | 114 | } |
57 | </script> | 115 | </script> | ... | ... |
... | @@ -26,23 +26,23 @@ module.exports = { | ... | @@ -26,23 +26,23 @@ module.exports = { |
26 | assetsDir: 'static', | 26 | assetsDir: 'static', |
27 | // 打包时不生成map文件,减少打包体积,加快打包速度 | 27 | // 打包时不生成map文件,减少打包体积,加快打包速度 |
28 | productionSourceMap: false, | 28 | productionSourceMap: false, |
29 | devServer: { | 29 | // devServer: { |
30 | https: true, | 30 | // https: true, |
31 | inline: true, | 31 | // inline: true, |
32 | proxy: { | 32 | // proxy: { |
33 | '/chery': { | 33 | // '/chery': { |
34 | target: process.env.VUE_APP_BASE_API | 34 | // target: process.env.VUE_APP_BASE_API |
35 | } | 35 | // } |
36 | // '/': { | 36 | // // '/': { |
37 | // bypass: devServerProxyBypass, | 37 | // // bypass: devServerProxyBypass, |
38 | // secure: false, | 38 | // // secure: false, |
39 | // target: serverTarget, | 39 | // // target: serverTarget, |
40 | // headers: { | 40 | // // headers: { |
41 | // Host: new URL(serverTarget).host | 41 | // // Host: new URL(serverTarget).host |
42 | // } | 42 | // // } |
43 | // } | 43 | // // } |
44 | } | 44 | // } |
45 | }, | 45 | // }, |
46 | configureWebpack: {}, | 46 | configureWebpack: {}, |
47 | chainWebpack: config => { | 47 | chainWebpack: config => { |
48 | config.resolve.alias | 48 | config.resolve.alias | ... | ... |
-
Please register or sign in to post a comment