diff --git a/config/index.js b/config/index.js index caeb687..70523c2 100644 --- a/config/index.js +++ b/config/index.js @@ -3,10 +3,10 @@ // see http://vuejs-templates.github.io/webpack for documentation. const path = require('path') +const IP = require('ip').address() module.exports = { dev: { - // Paths assetsSubDirectory: 'static', assetsPublicPath: '/', @@ -15,14 +15,13 @@ module.exports = { target: `https://tlzmanagement.ldxinyong.com`, changeOrigin: true, secure: false , - pathRewrite: { - '^/lz_management': '/' - } + // pathRewrite: { + // '^/lz_management': '/' + // } } }, - // Various Dev Server settings - host: 'localhost', // can be overwritten by process.env.HOST + host: IP, // can be overwritten by process.env.HOST port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, @@ -54,13 +53,11 @@ module.exports = { build: { // Template for index.html - index: path.resolve(__dirname, '../dist/index.html'), - + index: path.resolve(__dirname, '../dist/digitization/index.html'), // Paths - assetsRoot: path.resolve(__dirname, '../dist'), + assetsRoot: path.resolve(__dirname, '../dist/digitization/'), assetsSubDirectory: 'static', - assetsPublicPath: '/', - + assetsPublicPath: '/digitization/', /** * Source Maps */ diff --git a/index.html b/index.html index bdff4c1..4fbe269 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - linzi_kpi + 绩效系统
diff --git a/package.json b/package.json index 9672647..ef7708b 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "file-loader": "^1.1.4", "friendly-errors-webpack-plugin": "^1.6.1", "html-webpack-plugin": "^2.30.1", + "ip": "^1.1.5", "jest": "^22.0.4", "jest-serializer-vue": "^0.3.0", "nightwatch": "^0.9.12", diff --git a/src/api/data.js b/src/api/data.js index 8f2673a..f85b4cc 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -1,11 +1,9 @@ import request from '@/utils/request' -import URL from '@/api/config' -const baseUrl = process.env.PROXY ? URL.baseUrl : '/lz_management' // 获取管理员 export function getGround (query) { return request({ - url: baseUrl + '/lz_management/user/lzstaffrole/listByGroupId', + url: '/lz_management/user/lzstaffrole/listByGroupId', method: 'get', params: query }) @@ -14,7 +12,7 @@ export function getGround (query) { // 获取维度类型 export function getDimensions (quer = {}) { return request({ - url: baseUrl + '/lz_management/resultDimension/getDimensions', + url: '/lz_management/resultDimension/getDimensions', method: 'get' }) } diff --git a/src/api/workbench.js b/src/api/workbench.js index 757fb60..7a67b77 100644 --- a/src/api/workbench.js +++ b/src/api/workbench.js @@ -1,12 +1,9 @@ import request from '@/utils/request' -import URL from '@/api/config' -const baseUrl = process.env.PROXY ? URL.baseUrl : '/lz_management' -console.log('baseUrl: ', baseUrl) // 获取考核组列表 export function getWorkList (query) { return request({ - url: baseUrl + '/lz_management/evaluationGroup/getGroups', + url: '/lz_management/evaluationGroup/getGroups', method: 'POST', data: query }) @@ -15,8 +12,44 @@ export function getWorkList (query) { // 保存基础设置 export function saveBaseSet (query) { return request({ - url: baseUrl + '/lz_management/evaluationGroup/save', + url: '/lz_management/evaluationGroup/save', method: 'POST', data: query }) } + +// 删除考核组基础设置 +export function groundDelete (query) { + return request({ + url: '/lz_management/evaluationGroup/delete', + method: 'get', + params: query + }) +} + +// 保存模板设置 +export function saveTemSet (query) { + return request({ + url: '/lz_management/resultModel/saveDetail', + method: 'post', + data: query + }) +} + +// 获取流程设计的流程节点 +export function getByFlowManagerId (query) { + return request({ + url: '/lz_management/flowChart/getByFlowManagerId', + method: 'get', + params: query + }) +} + +// 保存流程节点小流程列表 +export function saveDetailProcs (query) { + return request({ + url: '/lz_management/flowChart/saveDetailProcs', + method: 'get', + params: query + }) +} diff --git a/src/main.js b/src/main.js index 33f8cfa..abd29c4 100644 --- a/src/main.js +++ b/src/main.js @@ -7,9 +7,12 @@ import store from './store' import './utils/elementConfig' import './utils/permission' import './style/index.less' +import {debounce} from '@/utils/common' import '@/icons' console.log('store: ', store) Vue.config.productionTip = false +Vue.prototype.debounce = debounce + /* eslint-disable no-new */ new Vue({ el: '#app', diff --git a/src/router/index.js b/src/router/index.js index 2d0a1cc..0303ac8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -9,6 +9,9 @@ const routes = [ redirect: kpiRouter.length > 0 ? kpiRouter[0].redirect : '/' } ].concat(kpiRouter) + export default new Router({ + base: '/digitization/', + mode: 'history', routes }) diff --git a/src/utils/common.js b/src/utils/common.js new file mode 100644 index 0000000..1816abc --- /dev/null +++ b/src/utils/common.js @@ -0,0 +1,27 @@ +/** + * @desc 函数防抖 + * @param func 函数 + * @param wait 延迟执行毫秒数 + * @param immediate true 表立即执行,false 表非立即执行 + */ +export function debounce (func, wait, immediate) { + let timeout + + return function () { + let context = this + let args = arguments + + if (timeout) clearTimeout(timeout) + if (immediate) { + var callNow = !timeout + timeout = setTimeout(() => { + timeout = null + }, wait) + if (callNow) func.apply(context, args) + } else { + timeout = setTimeout(function () { + func.apply(context, args) + }, wait) + } + } +} diff --git a/src/utils/request.js b/src/utils/request.js index 489cfbe..bf8a0c2 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,5 +1,4 @@ import axios from 'axios' -// import { Notification, MessageBox, Message } from 'element-ui' import { Message } from 'element-ui' // import store from '@/store' // import { getToken } from '@/utils/auth' diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/basis.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/basis.vue index 46cfba9..fa62ad9 100644 --- a/src/views/kpi/workbench/assessmentGroup/edit/components/basis.vue +++ b/src/views/kpi/workbench/assessmentGroup/edit/components/basis.vue @@ -34,7 +34,7 @@ size="mini" placeholder="请选择考评组管理员" readonly - v-model="form.input1"> + :value="Ground.title+ ' 等'+ Ground.list.length + '人'"> @@ -99,8 +99,8 @@
-
- hahahhHah +
+ {{i.staffName}}
@@ -130,6 +130,8 @@ export default { }, data () { return { + GroundList: [], + GroundList1: [], isSshowOutIds: false, outIdsLsit: { list: [] @@ -173,7 +175,23 @@ export default { PopupRight }, computed: { - + Ground () { + const params = { + list: [], + title: '', + managerIds: '' + } + params.list = this.GroundList1.filter(i => i.isSelect === 1) + params.list.map((i, index) => { + params.managerIds += i.staffId + ',' + if (index < 2) params.title += i.staffName.split(' ')[0] + ',' + }) + params.managerIds = params.managerIds.substring(0, params.managerIds.length - 1) + params.title = params.title.substring(0, params.title.length - 1) + // eslint-disable-next-line vue/no-side-effects-in-computed-properties + this.form.managerIds = params.managerIds + return params + } }, beforeMount () {}, async mounted () { @@ -183,16 +201,24 @@ export default { methods: { async handleGetGround () { try { - const res = await getGround({groupId: 1}) + let res = await getGround({groupId: 1}) console.log('res: ', res) + res = res.map(i => { + i.isDisable = i.isSelect + return i + }) + this.GroundList = JSON.parse(JSON.stringify(res)) + this.GroundList1 = JSON.parse(JSON.stringify(res)) } catch (error) { this.$message.error(error.msg) } }, handleCancel () { + this.GroundList = JSON.parse(JSON.stringify(this.GroundList1)) this.showRight = false }, handleSubmit () { + this.GroundList1 = JSON.parse(JSON.stringify(this.GroundList)) this.showRight = false }, handleGetChoose (item) { diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/process.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/process.vue index 7b2543f..04e3c47 100644 --- a/src/views/kpi/workbench/assessmentGroup/edit/components/process.vue +++ b/src/views/kpi/workbench/assessmentGroup/edit/components/process.vue @@ -29,7 +29,7 @@ import Perform from './Perform' import Entry from './Entry' import Score from './Score' import Approval from './Approval' - +import {getByFlowManagerId, saveDetailProcs} from '@/api/workbench' export default { data () { return { diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue index b46422c..267f51c 100644 --- a/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue +++ b/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue @@ -4,9 +4,9 @@
总分规则
- + - + 加权计算
-
-
+
+
{{i.name}}
- + - - + +
@@ -67,72 +69,74 @@
{{handleWeiDu(i)}}
-
- 所含指标数量 {{i.center.number1String}} +
+ 所含指标数量 {{i.maxCount}}
-
- 所含指标总权重 {{i.center.number2String}}% +
+ 所含指标总权重 {{i.weight * 100}}%
-
- - - - - - - - - - - +
+
+
增加指标项
-
+
- +
- + + :value="i.id"> @@ -142,11 +146,11 @@
- - 不限数量 - 自定义 + + 不限数量 + 自定义 - +
所含指标总权重 @@ -154,34 +158,37 @@
- - 不限权重 - 自定义 + + 不限权重 + 自定义 - +
- +
- - - + + - - + + - - + + @@ -195,20 +202,30 @@