|
|
@@ -49,11 +49,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="类型" prop="type">
|
|
|
- <el-select
|
|
|
- v-model="form.type"
|
|
|
- clearable
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
+ <el-select v-model="form.type" clearable style="width: 100%">
|
|
|
<el-option label="年度" :value="1"></el-option>
|
|
|
<el-option label="季度" :value="2"></el-option>
|
|
|
<el-option label="月度" :value="3"></el-option>
|
|
|
@@ -164,16 +160,13 @@
|
|
|
</ele-modal>
|
|
|
</template>
|
|
|
<script>
|
|
|
-
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import bpmDetail from '@/views/bpm/processInstance/detail.vue';
|
|
|
- import {
|
|
|
- getById
|
|
|
-} from '@/api/targetManage/index.js';
|
|
|
-
|
|
|
+ import { getById } from '@/api/targetManage/index.js';
|
|
|
+ const Decimal = require('decimal.js')
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
- components: {bpmDetail},
|
|
|
+ components: { bpmDetail },
|
|
|
data() {
|
|
|
return {
|
|
|
form: {
|
|
|
@@ -193,11 +186,11 @@
|
|
|
status: '',
|
|
|
type: 1,
|
|
|
describes: '',
|
|
|
- processInstanceId:''
|
|
|
+ processInstanceId: ''
|
|
|
},
|
|
|
title: '',
|
|
|
unitOption: [],
|
|
|
- participantsName:'',
|
|
|
+ participantsName: '',
|
|
|
addOrEditDialogFlag: false,
|
|
|
treeData: { label: '销售目标', children: [], expand: true },
|
|
|
fullscreen: false,
|
|
|
@@ -213,7 +206,12 @@
|
|
|
created() {},
|
|
|
methods: {
|
|
|
renderContent(h, data) {
|
|
|
- let ratio = +((data.number / data.value) * 100 || 0).toFixed(1);
|
|
|
+ console.log(data.number&&new Decimal(data.number)/ new Decimal(10000))
|
|
|
+ let ratio = +(
|
|
|
+ (data.number /
|
|
|
+ (data.unit == '万元' ? data.value * 10000 : data.value)) *
|
|
|
+ 100 || 0
|
|
|
+ ).toFixed(1);
|
|
|
return (
|
|
|
<div>
|
|
|
<div class={!data.type ? 'treeItem1 treeItem' : 'treeItem'}>
|
|
|
@@ -221,6 +219,16 @@
|
|
|
{data.type && <span class="tree_value">{data.value || 0}</span>}
|
|
|
{data.type && <span class="tree_unit">{data.unit}</span>}
|
|
|
</div>
|
|
|
+
|
|
|
+ {/* {(data.type && data.value && data.number &&data.number!=0&& (
|
|
|
+ <span class="label">
|
|
|
+ 完成:
|
|
|
+ {data.unit == '万元' ? new Decimal(data.number).div(new Decimal(10000)) : data.number}
|
|
|
+ {data.unit}
|
|
|
+ </span>
|
|
|
+ )) ||
|
|
|
+ ''} */}
|
|
|
+
|
|
|
{(data.type &&
|
|
|
data.value &&
|
|
|
h('el-progress', {
|
|
|
@@ -237,9 +245,9 @@
|
|
|
async open(row = {}) {
|
|
|
this.addOrEditDialogFlag = true;
|
|
|
this.title = '';
|
|
|
- this.activeComp='main'
|
|
|
- this.form = await getById(row.id)
|
|
|
- console.log( this.form,' this.form')
|
|
|
+ this.activeComp = 'main';
|
|
|
+ this.form = await getById(row.id);
|
|
|
+ // console.log( this.form,' this.form')
|
|
|
this.form.assessmentDimensions =
|
|
|
this.form.assessmentDimensions.split(',');
|
|
|
this.treeData.children = this.form.targetDefinitionList;
|
|
|
@@ -354,10 +362,12 @@
|
|
|
padding: 3px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
+ flex-direction: column;
|
|
|
.el-progress__text {
|
|
|
color: #1890ff !important;
|
|
|
- width: 41px;
|
|
|
- text-align: left;
|
|
|
+ // width: 41px;
|
|
|
+ // text-align: left;
|
|
|
+ margin-top: 5px;
|
|
|
}
|
|
|
}
|
|
|
</style>
|