diff --git a/src/api/data.js b/src/api/data.js index a107b70..f85b4cc 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -1,19 +1,18 @@ import request from '@/utils/request' -// const baseUrl = process.env.APP_BASE_API -export function getCaseCollectorListPage (query) { +// 获取管理员 +export function getGround (query) { return request({ - url: '/caseCollector/caseCollectorListPage', + url: '/lz_management/user/lzstaffrole/listByGroupId', method: 'get', params: query }) } -export function apiCaseCenterExport (query) { +// 获取维度类型 +export function getDimensions (quer = {}) { return request({ - url: '/market-api/marketCaseExport/exportMarketCaseDataList', - method: 'get', - params: query, - responseType: 'blob' + url: '/lz_management/resultDimension/getDimensions', + method: 'get' }) } diff --git a/src/api/workbench.js b/src/api/workbench.js index 27b78e3..7a67b77 100644 --- a/src/api/workbench.js +++ b/src/api/workbench.js @@ -1,6 +1,4 @@ import request from '@/utils/request' -// import URL from '@/api/config' -// const baseUrl = process.env.PROXY ? URL.baseUrl : '/lz_management' // 获取考核组列表 export function getWorkList (query) { @@ -19,3 +17,39 @@ export function saveBaseSet (query) { 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 4b0d1d7..35eca22 100644 --- a/src/main.js +++ b/src/main.js @@ -7,6 +7,9 @@ import store from './store' import './utils/elementConfig' import './utils/permission' import './style/index.less' +import { + debounce +} from '@/utils/common' import '@/icons' import { format @@ -15,6 +18,8 @@ import { console.log('store: ', store) Vue.config.productionTip = false Vue.prototype.$format = format +Vue.prototype.debounce = debounce + /* eslint-disable no-new */ new Vue({ el: '#app', 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/views/kpi/workbench/assessmentGroup/edit/components/basis.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/basis.vue index 3249110..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}}
@@ -111,6 +111,7 @@ import getDepart from './getDepart' import getPersonnel from './getPersonnel' import PopupRight from '@/components/PopupRight' +import {getGround} from '@/api/data' export default { props: { basisForm: { @@ -129,6 +130,8 @@ export default { }, data () { return { + GroundList: [], + GroundList1: [], isSshowOutIds: false, outIdsLsit: { list: [] @@ -172,17 +175,50 @@ 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 () {}, - mounted () { + async mounted () { this.form = this.basisForm + this.handleGetGround() }, methods: { + async handleGetGround () { + try { + 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 a4bfa82..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}}
- + - - + +
- {{i.leixing}} + {{handleWeiDu(i)}}
-
- 所含指标数量 {{i.center.number1String}} +
+ 所含指标数量 {{i.maxCount}}
-
- 所含指标总权重 {{i.center.number2String}}% +
+ 所含指标总权重 {{i.weight * 100}}%
-
- - - - - - - - - - - +
+
+
增加指标项
-
+
- +
- - - + + @@ -139,11 +146,11 @@
- - 不限数量 - 自定义 + + 不限数量 + 自定义 - +
所含指标总权重 @@ -151,34 +158,37 @@
- - 不限权重 - 自定义 + + 不限权重 + 自定义 - +
- +
- - - + + - - + + - - + + @@ -192,16 +202,30 @@