diff --git a/client/dist/index.html b/client/dist/index.html index 84ad2be..9772179 100644 --- a/client/dist/index.html +++ b/client/dist/index.html @@ -1 +1 @@ -vue Admin Template
\ No newline at end of file +vue Admin Template
\ No newline at end of file diff --git a/client/package.json b/client/package.json index 2cb862a..09754e1 100644 --- a/client/package.json +++ b/client/package.json @@ -26,7 +26,7 @@ "normalize.css": "7.0.0", "nprogress": "0.2.0", "path-to-regexp": "2.4.0", - "vod-js-sdk-v6": "^1.4.12", + "vod-js-sdk-v6": "^1.4.12", "vue": "2.6.10", "vue-pdf": "^4.2.0", "vue-router": "3.0.6", diff --git a/client/src/api/org.js b/client/src/api/org.js index 3ee4928..8c535b4 100644 --- a/client/src/api/org.js +++ b/client/src/api/org.js @@ -42,3 +42,9 @@ export function deleteOrg(id) { method: 'delete' }) } +export function getOrgItem(id) { + return request({ + url: `/system/organization/${id}/`, + method: 'get' + }) +} diff --git a/client/src/router/index.js b/client/src/router/index.js index 69d86d1..6c3acb9 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -175,6 +175,12 @@ export const asyncRoutes = [ meta: { title: '资讯资料分享', icon: 'guide', perms: ['consulting_views'] }, alwaysShow: true, children: [ + { + path: 'deptFile', + name: 'deptFile', + component: () => import('@/views/consulting/deptFile.vue'), + meta: { title: '总部文件', perms: ['test'] } + }, { path: 'rule', name: 'rule', diff --git a/client/src/store/modules/user.js b/client/src/store/modules/user.js index 1b23525..8766130 100644 --- a/client/src/store/modules/user.js +++ b/client/src/store/modules/user.js @@ -1,5 +1,6 @@ import { login, logout, getInfo, login2, fulllogin } from '@/api/user' import { getToken, setToken, removeToken } from '@/utils/auth' +import { getOrgItem} from "@/api/org"; import { resetRouter } from '@/router' const getDefaultState = () => { @@ -68,7 +69,6 @@ const actions = { } const { perms, name, avatar } = data.user - // perms must be a non-empty array if (!perms || perms.length <= 0) { reject('没有任何权限!') @@ -104,23 +104,26 @@ const actions = { return new Promise((resolve, reject) => { getInfo(state.token).then(response => { const { data } = response - if (!data) { reject('验证失败,重新登陆.') } - - const { perms, name, avatar, dept, dept_name} = data - + const { perms, name, avatar, dept, dept_name} = data; // perms must be a non-empty array - if (!perms || perms.length <= 0) { - reject('没有任何权限!') - } - - commit('SET_PERMS', perms) commit('SET_NAME', name) commit('SET_AVATAR', avatar) commit('SET_DEPT', dept) commit('SET_DEPTNAME', dept_name) + if (!perms || perms.length <= 0) { + reject('没有任何权限!') + }else{ + if(dept==5||dept==33||dept==34||dept==55||dept==36||dept==37||dept==38 + ||dept==39||dept==40||dept==41||dept==42||dept==67||dept==97){ + perms.push('test') + commit('SET_PERMS', perms); + }else{ + commit('SET_PERMS', perms); + } + } resolve(data) }).catch(error => { reject(error) diff --git a/client/src/views/consulting/deptFile.vue b/client/src/views/consulting/deptFile.vue new file mode 100644 index 0000000..a162377 --- /dev/null +++ b/client/src/views/consulting/deptFile.vue @@ -0,0 +1,314 @@ + + diff --git a/client/src/views/supervisionNew/statisticsGroup.vue b/client/src/views/supervisionNew/statisticsGroup.vue index 4948b41..adb90ed 100644 --- a/client/src/views/supervisionNew/statisticsGroup.vue +++ b/client/src/views/supervisionNew/statisticsGroup.vue @@ -100,7 +100,7 @@ top:'3%' }, grid: { - left: '2%', + left: '1%', right: '2%', bottom: '25%', top: '12%', @@ -341,13 +341,25 @@ data42.push(item4.客户投诉处理满意率设定值) }) minNumber1 =Math.min(...data1) - minNumber1 = Math.floor(minNumber1) + minNumber1 = Math.floor(minNumber1); + if(minNumber1>0){ + minNumber1 = minNumber1-1; + } minNumber2 =Math.min(...data2) minNumber2 = Math.floor(minNumber2) + if(minNumber2>0){ + minNumber2 = minNumber2-1; + } minNumber3 =Math.min(...data3) minNumber3 = Math.floor(minNumber3) + if(minNumber3>0){ + minNumber3 = minNumber3-1; + } minNumber4 =Math.min(...data4) minNumber4 = Math.floor(minNumber4) + if(minNumber4>0){ + minNumber4 = minNumber4-1; + } markLine4 = sortedArr4[0].客户投诉处理满意率基础值; function tofixed1(item){ @@ -525,14 +537,14 @@ } }; -