提交修改

This commit is contained in:
quyixiao 2020-09-24 11:33:26 +08:00
parent 5c817ee69a
commit 577410eb3e
8 changed files with 352 additions and 20 deletions

View File

@ -130,3 +130,10 @@ export const apiGetCodes = data => {
return http({ url: `/lz_management/oneCode/get/getPrints`, method: 'post', data })
}
export const apiResourceItuation = data => {
return http({ url: `/lz_management/oneCode/get/resourceItuation/${data}`, method: 'post'})
}
export const handleNums = data => {
return http({ url: `/lz_management/oneCode/get/nums`, method: 'post', data })
}

View File

@ -18,8 +18,8 @@ export const apiGetFlowInfo = params => {
return http({url: `/lz_management/user/lzflowmanager/get/flowInfo/${params}`, method: 'post'})
}
export const getFlow = params => {
return http({url: `/lz_management/user/lzflowmanager/get/flow/${params}`, method: 'post'})
export const getFlow = (data) => {
return http({url: `/lz_management/user/lzflowmanager/get/flow`, method: 'post',data})
}
export const saveFlow = (data) => {

View File

@ -0,0 +1,91 @@
<!-- -->
<template>
<div class="staff-archives-charts">
<div class="staff-archives-title">{{title}}</div>
<div>
<ve-ring
height="300px"
:data="dataInfo"
:extend="color.length>0?Object.assign({},chartExtend,{color}):chartExtend"
:settings="chartSettings"
></ve-ring>
</div>
</div>
</template>
<script>
export default {
props: {
dataInfo: {
type: Object,
default: () => {
return {}
}
},
title: {
type: String,
default: () => '分布'
},
color: {
type: Array,
default: () => []
}
},
data () {
return {
chartExtend: {
legend: {
x: 'center',
y: '80%',
show: true
},
series: {
center: ['50%', '40%'],
itemStyle: {
borderWidth: 2, // border
borderColor: '#fff'
}
}
},
chartData: {
columns: ['分类', '数量', '占比'],
rows: [
{ '分类': '0-3年', '数量': '50', '占比': '10%' },
{ '分类': '3-5年', '数量': '80', '占比': '10%' },
{ '分类': '5-8年', '数量': '58', '占比': '10%' },
{ '分类': '8-10年', '数量': '58', '占比': '10%' }
]
},
chartSettings: {
radius: ['60px', '80px'],
itemStyle: {
textAlign: 'center'
},
label: {
formatter: params => {
return `{a|${params.data.name} ${params.data.value}}`
},
rich: {
a: {
color: '#ccc',
textAlign: 'center'
}
}
}
}
}
},
computed: {},
beforeMount () { },
mounted () { },
methods: {},
watch: {}
}
</script>
<style lang='scss' scoped>
.staff-archives-charts {
// width: 50%;
}
</style>

View File

@ -0,0 +1,143 @@
<!-- -->
<template>
<div>
<div class="staff-archives-title">条件筛选</div>
<el-form :inline="true" :model="formInline" class="demo-form-inline staff-archives-form">
<el-form-item label="员工姓名">
<el-select v-model="formInline.number" prop="staffId" placeholder="请选择" clearable filterable>
<el-option
v-for="item in numbers"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import {getDataForMonth} from '@/utils'
import {handleNums} from '@/api/api_equipment'
export default {
data () {
return {
numbers: [{
id: 1,
name: '第 1 次'
}, {
id: 2,
name: '第 2 次'
}],
index: null,
title: null,
value2: [],
isChooseObj: {},
isChoose: false,
menuList: [],
defaultProps: {
children: 'list',
label: 'name'
},
formInline: {
value: [],
number: 1
}
}
},
computed: {},
beforeMount () {
},
created () {
this.handleNumsList()
},
mounted () {
},
methods: {
async handleChangeData (data) {
this.index = data.Month
this.title = data.title
let dataList = getDataForMonth(data.Month)
this.formInline.value = dataList
this.formInline.beginDate = dataList[0]
this.formInline.endDate = dataList[1]
this.onSubmit()
},
changeData (data) {
this.index = null
this.title = null
this.formInline.beginDate = data[0]
this.formInline.endDate = data[1]
},
//
async handleNumsList () {
let result = await handleNums()
this.numbers = result.numbers
},
onSubmit () {
let obj = {
departmentId: this.formInline.departmentId,
beginDate: this.formInline.beginDate,
endDate: this.formInline.endDate,
number: this.formInline.number
}
let monthLetter = {
index: this.index,
title: this.title
}
this.$emit('submit', obj, monthLetter)
},
restValue () {
this.formInline = {}
this.index = null
this.title = null
},
onsumbit () {
this.formInline = Object.assign({}, this.formInline, this.isChooseObj)
this.isChoose = false
},
handleNodeClick (a, b) {
this.isChooseObj = {
departmentId: a.departmentId,
departmentName: a.departmentName
}
}
},
watch: {}
}
</script>
<style lang='scss'>
.el-range-separator {
width: 7% !important;
}
.el-input__icon {
transition: all 0.5s;
}
.staff-archives-choose {
margin: 2px;
height: 200px;
overflow: auto;
transition: all 0.3s;
position: relative;
border: 1px solid #dcdfe6;
}
.staff-archives-choose1 {
height: 0px;
opacity: 0;
overflow: hidden;
}
</style>

View File

@ -0,0 +1,103 @@
<!-- -->
<template>
<div class="staff-archives">
<el-main :loding="true">
<el-card>
<query-form @submit="submit"/>
</el-card>
<div class="staff-archives-chart">
<el-card v-if="dataInfo.genderDistribution">
<chart-form :dataInfo="dataInfo.genderDistribution" title="总体概览"/>
</el-card>
<el-card v-if="dataInfo.ageDistribution">
<chart-form :dataInfo="dataInfo.ageDistribution" title="部门分布"/>
</el-card>
</div>
</el-main>
</div>
</template>
<script>
import chartForm from './componments/chart-form'
import queryForm from './componments/query-form'
import {apiResourceItuation} from '@/api/api_equipment'
export default {
components: {
chartForm,
queryForm
},
created () {
this.handleResourceItuation(0)
},
data () {
return {
monthLetter: {},
dataInfo: {}
}
},
computed: {},
beforeMount () {
},
mounted () {
},
methods: {
async handleResourceItuation (data = {}) {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
let result = await apiResourceItuation(data)
setTimeout(() => {
loading.close()
}, 500)
if (result.code === 0) {
this.dataInfo = result.data
} else {
this.$message.error(result.mgs)
}
},
submit (data, monthLetter) {
this.monthLetter = monthLetter
this.handleResourceItuation(data.number)
}
},
watch: {}
}
</script>
<style>
.el-card {
margin: 0 0 7px 0 !important;
}
.staff-archives {
overflow: hidden;
}
.staff-archives-title {
font-size: 18px;
font-weight: 700;
}
.staff-archives-form {
margin: 20px 0 0 0;
}
</style>
<style lang="scss">
.staff-archives-chart {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
> div {
width: 49.6%;
}
}
</style>

View File

@ -8,17 +8,11 @@
<el-form-item label="目标/指标" v-show="auth.target >= 1" prop="target">
<el-input :disabled="auth.target<2" v-model="dataForm.target" placeholder="目标/指标"></el-input>
</el-form-item>
<el-form-item label="关键结果" v-show="auth.keyResult >= 1 && this.type == 1 " prop="keyResult">
<el-form-item label="关键结果" v-show="auth.keyResult >= 1 " prop="keyResult">
<div id="keyResultEditorElem" class="editor"></div>
</el-form-item>
<!-- <el-form-item label="3.5-考核标准" v-show="auth.keyResult35 >= 1 && this.type ===1 " prop="keyResult35">
<div id="keyResultEditorElem3_5" class="editor"></div>
</el-form-item>
<el-form-item label="3.75-考核标准" v-show="auth.keyResult37 >= 1 && this.type ===1" prop="keyResult37">
<div id="keyResultEditorElem3_7" class="editor"></div>
</el-form-item>-->
<el-form-item v-show="auth.checkWeight>=1" label="考核权重" prop="checkWeight">
<el-input v-model="dataForm.checkWeight" :disabled="auth.checkWeight<2" placeholder="考核权重"></el-input>

View File

@ -326,7 +326,7 @@ export default {
} else if (rowIndex === (this.yeJiCheckNum + 1)) {
return {
rowspan: 2,
rowspan: this.wenHuaJiaZhiGuanNum,
colspan: 1
}
} else if (rowIndex >= (this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum) && rowIndex <= (this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum + this.lastResultNum)) {
@ -352,13 +352,9 @@ export default {
}
}
if (rowIndex >= this.yeJiCheckNum + 1 && rowIndex < this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum) {
if (columnIndex === 1) {
return [1, 2]
} else if (columnIndex === 2) {
return [0, 0]
}
}
/* if (rowIndex >= this.yeJiCheckNum + 1 && rowIndex < this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum) {
}*/
if (rowIndex === this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum) {
if (columnIndex === 0) {
return [1, 2]

View File

@ -69,11 +69,9 @@ export default {
a: {
color: '#ccc',
textAlign: 'center'
}
}
}
}
}
},