|
@@ -11,52 +11,22 @@
|
|
|
<img :src='i.icon'/>
|
|
<img :src='i.icon'/>
|
|
|
<span class="grey-6 ml-5">{{ i.name }}</span>
|
|
<span class="grey-6 ml-5">{{ i.name }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="i.index !== 2" class='flex flex-justify-start mt-5'>
|
|
|
|
|
|
|
+ <div v-if="i.index !== 2" class='flex flex-align-end flex-justify-start mt-20'>
|
|
|
<span class="grey" style="margin-left: 3px">¥</span>
|
|
<span class="grey" style="margin-left: 3px">¥</span>
|
|
|
- <span class="ml-5" :style='`color:` + i.color'>{{ i.value }}</span>
|
|
|
|
|
|
|
+ <span class="ml-5 font-24 " :style='`color:` + i.color'>{{ info[i.prop] }}</span>
|
|
|
|
|
+ <el-icon :size="15" v-if='i.index === 0 && user.info.viewStage === 1' class='ml-10 pointer' @click='edit'>
|
|
|
|
|
+ <Edit/>
|
|
|
|
|
+ </el-icon>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-else class='flex flex-justify-start flex-center mt-5'>
|
|
|
|
|
|
|
+ <div v-else class='flex flex-justify-start flex-align-end flex-center mt-10'>
|
|
|
<div class="progress-bar">
|
|
<div class="progress-bar">
|
|
|
- <div class="bar full-height" style="width: 50%;"></div>
|
|
|
|
|
|
|
+ <div class="bar full-height" :style="`width: `+ info[i.prop]"></div>
|
|
|
</div>
|
|
</div>
|
|
|
- <span class="ml-10" :style='`color:` + i.color'>{{ i.value }}</span>
|
|
|
|
|
|
|
+ <span class="ml-10 font-24 mt-10" :style='`color:` + i.color'>{{ info[i.prop] }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class='' style='height: 50px'>
|
|
|
|
|
- <div class="page">
|
|
|
|
|
- <svg class="waves" viewBox="0 24 150 24" preserveAspectRatio="none">
|
|
|
|
|
- <defs>
|
|
|
|
|
- <path id="wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/>
|
|
|
|
|
- </defs>
|
|
|
|
|
- <use class="wave" xlink:href="#wave" fill="#76CAF8" x="50" y="10">
|
|
|
|
|
- <animateTransform attributeName="transform" attributeType="XML" type="translate" from="-90 0" to="85 0" dur="2.2s" repeatCount="indefinite" />
|
|
|
|
|
- </use>
|
|
|
|
|
- </svg>
|
|
|
|
|
-
|
|
|
|
|
- <svg class="waves" viewBox="0 24 180 24" preserveAspectRatio="none">
|
|
|
|
|
- <defs>
|
|
|
|
|
- <path id="wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/>
|
|
|
|
|
- </defs>
|
|
|
|
|
- <use class="wave" xlink:href="#wave" fill="#AFC6FA" x="50" y="0">
|
|
|
|
|
- <animateTransform attributeName="transform" attributeType="XML" type="translate" from="-90 0" to="85 0" dur="5.2s" repeatCount="indefinite" />
|
|
|
|
|
- </use>
|
|
|
|
|
- </svg>
|
|
|
|
|
-
|
|
|
|
|
- <svg class="waves" viewBox="0 24 150 24" preserveAspectRatio="none">
|
|
|
|
|
- <defs>
|
|
|
|
|
- <path id="wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/>
|
|
|
|
|
- </defs>
|
|
|
|
|
- <use class="wave" xlink:href="#wave" fill="#5691E2" x="150" y="10">
|
|
|
|
|
- <animateTransform attributeName="transform" attributeType="XML" type="translate" from="-90 0" to="85 0" dur="8.2s" repeatCount="indefinite" />
|
|
|
|
|
- </use>
|
|
|
|
|
- </svg>
|
|
|
|
|
-
|
|
|
|
|
- <svg class="waves" viewBox="0 24 150 24" preserveAspectRatio="none">
|
|
|
|
|
- <defs>
|
|
|
|
|
- <path id="wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/>
|
|
|
|
|
- </defs>
|
|
|
|
|
- </svg>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div style='margin-top: -20px'>
|
|
|
|
|
+ <wave :color='i.color'/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -66,19 +36,35 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import basicTab from '@/components/basic-tab/index.vue'
|
|
import basicTab from '@/components/basic-tab/index.vue'
|
|
|
|
|
+import wave from '@/views/invest/components/wave.vue'
|
|
|
|
|
+import { useStore } from '@/store/user.js'
|
|
|
|
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'years',
|
|
name: 'years',
|
|
|
- components: { basicTab },
|
|
|
|
|
|
|
+ components: { basicTab, wave },
|
|
|
|
|
+ setup () {
|
|
|
|
|
+ const user = useStore()
|
|
|
|
|
+ return { user }
|
|
|
|
|
+ },
|
|
|
props: {
|
|
props: {
|
|
|
- type: {
|
|
|
|
|
- type: Number,
|
|
|
|
|
- default: 0
|
|
|
|
|
|
|
+ deptId: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default: ''
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ deptId: {
|
|
|
|
|
+ handler (val) {
|
|
|
|
|
+ this.load()
|
|
|
|
|
+ },
|
|
|
|
|
+ immediate: true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
times: [],
|
|
times: [],
|
|
|
|
|
+ info: {},
|
|
|
tabs: [
|
|
tabs: [
|
|
|
{ name: '总览', value: 0 },
|
|
{ name: '总览', value: 0 },
|
|
|
{ name: '一季度', value: 1 },
|
|
{ name: '一季度', value: 1 },
|
|
@@ -86,12 +72,13 @@ export default {
|
|
|
{ name: '三季度', value: 3 },
|
|
{ name: '三季度', value: 3 },
|
|
|
{ name: '四季度', value: 4 }
|
|
{ name: '四季度', value: 4 }
|
|
|
],
|
|
],
|
|
|
|
|
+ quarter: '',
|
|
|
dash: [
|
|
dash: [
|
|
|
{
|
|
{
|
|
|
icon: new URL('../../../assets/svg/invest/1.svg', import.meta.url).href,
|
|
icon: new URL('../../../assets/svg/invest/1.svg', import.meta.url).href,
|
|
|
name: '责任目标',
|
|
name: '责任目标',
|
|
|
value: 30303,
|
|
value: 30303,
|
|
|
- prop: '',
|
|
|
|
|
|
|
+ prop: 'plan_complete_amount',
|
|
|
box: '0 1px 10px 0 rgba(105, 204, 243, 0.3)',
|
|
box: '0 1px 10px 0 rgba(105, 204, 243, 0.3)',
|
|
|
color: '#32B5F3',
|
|
color: '#32B5F3',
|
|
|
index: 0,
|
|
index: 0,
|
|
@@ -101,7 +88,7 @@ export default {
|
|
|
icon: new URL('../../../assets/svg/invest/2.svg', import.meta.url).href,
|
|
icon: new URL('../../../assets/svg/invest/2.svg', import.meta.url).href,
|
|
|
name: '累计完成投资',
|
|
name: '累计完成投资',
|
|
|
value: 30303,
|
|
value: 30303,
|
|
|
- prop: '',
|
|
|
|
|
|
|
+ prop: 'total_complete_amount',
|
|
|
box: '0 1px 10px 0 rgba(200, 150, 230, 0.3)',
|
|
box: '0 1px 10px 0 rgba(200, 150, 230, 0.3)',
|
|
|
color: '#AD46CB',
|
|
color: '#AD46CB',
|
|
|
index: 1
|
|
index: 1
|
|
@@ -110,7 +97,7 @@ export default {
|
|
|
icon: new URL('../../../assets/svg/invest/3.svg', import.meta.url).href,
|
|
icon: new URL('../../../assets/svg/invest/3.svg', import.meta.url).href,
|
|
|
name: '投资完成比例',
|
|
name: '投资完成比例',
|
|
|
value: 30303,
|
|
value: 30303,
|
|
|
- prop: '',
|
|
|
|
|
|
|
+ prop: 'rate',
|
|
|
box: '0 1px 10px 0 rgba(236, 171, 83, 0.3)',
|
|
box: '0 1px 10px 0 rgba(236, 171, 83, 0.3)',
|
|
|
color: '#EC9040',
|
|
color: '#EC9040',
|
|
|
index: 2
|
|
index: 2
|
|
@@ -119,7 +106,7 @@ export default {
|
|
|
icon: new URL('../../../assets/svg/invest/4.svg', import.meta.url).href,
|
|
icon: new URL('../../../assets/svg/invest/4.svg', import.meta.url).href,
|
|
|
name: '计划纳统投资',
|
|
name: '计划纳统投资',
|
|
|
value: 30303,
|
|
value: 30303,
|
|
|
- prop: '',
|
|
|
|
|
|
|
+ prop: 'total_investment_amount',
|
|
|
box: '0 1px 10px 0 rgba(119, 94, 241, 0.3)',
|
|
box: '0 1px 10px 0 rgba(119, 94, 241, 0.3)',
|
|
|
color: '#4F5EE7',
|
|
color: '#4F5EE7',
|
|
|
index: 3
|
|
index: 3
|
|
@@ -131,12 +118,65 @@ export default {
|
|
|
this.init()
|
|
this.init()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ load () {
|
|
|
|
|
+ this.$api.invest.homeInvest({
|
|
|
|
|
+ deptId: this.deptId === null ? '' : this.deptId,
|
|
|
|
|
+ quarter: this.quarter
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.info = res.data
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
init () {
|
|
init () {
|
|
|
const year = new Date().getFullYear()
|
|
const year = new Date().getFullYear()
|
|
|
this.tabs[0].name = year + '年总览'
|
|
this.tabs[0].name = year + '年总览'
|
|
|
},
|
|
},
|
|
|
change (index) {
|
|
change (index) {
|
|
|
|
|
+ this.quarter = index.value === 0 ? '' : index.value
|
|
|
this.$emit('change', index)
|
|
this.$emit('change', index)
|
|
|
|
|
+ this.load()
|
|
|
|
|
+ },
|
|
|
|
|
+ edit () {
|
|
|
|
|
+ ElMessageBox.prompt('请输入年度责任目标(数字,包括小数点)', '提示', {
|
|
|
|
|
+ confirmButtonText: '保存',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ inputPattern:
|
|
|
|
|
+ /^([1-9]\d*|0)(\.\d+)?$/,
|
|
|
|
|
+ inputErrorMessage: '信息错误'
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(({ value }) => {
|
|
|
|
|
+ console.log(value, this.quarter)
|
|
|
|
|
+ let data = {}
|
|
|
|
|
+ switch (this.quarter) {
|
|
|
|
|
+ case 0: // 年度
|
|
|
|
|
+ data = { number: value }
|
|
|
|
|
+ break
|
|
|
|
|
+ case 1: // 1季度
|
|
|
|
|
+ data = { number: value, type: 1 }
|
|
|
|
|
+ break
|
|
|
|
|
+ case 2: // 2季度
|
|
|
|
|
+ data = { number: value, type: 2 }
|
|
|
|
|
+ break
|
|
|
|
|
+ case 3: // 3季度
|
|
|
|
|
+ data = { number: value, type: 3 }
|
|
|
|
|
+ break
|
|
|
|
|
+ case 4: // 4季度
|
|
|
|
|
+ data = { number: value, type: 4 }
|
|
|
|
|
+ break
|
|
|
|
|
+ default:
|
|
|
|
|
+ data = { number: value }
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$api.invest.savePlan(Object.assign({ deptId: this.deptId === null ? '' : this.deptId }, data)).then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ this.$message.success(res.msg)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(res.msg)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -149,21 +189,6 @@ export default {
|
|
|
background-repeat: no-repeat;
|
|
background-repeat: no-repeat;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.page {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- height: 50px;
|
|
|
|
|
- position: relative;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
-
|
|
|
|
|
- .waves {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- bottom: 0;
|
|
|
|
|
- left: 0;
|
|
|
|
|
- z-index: 1;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
.box {
|
|
.box {
|
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
|
min-height: 115px;
|
|
min-height: 115px;
|