Commit e43c9b41 authored by 牛虎林's avatar 牛虎林

代码修改

parent e66372db
...@@ -37,7 +37,7 @@ export const columns: ( ...@@ -37,7 +37,7 @@ export const columns: (
width: 200, width: 200,
}, },
{ {
title: '投资金额', title: '结算金额',
dataIndex: 'investmentAount', dataIndex: 'investmentAount',
width: 180, width: 180,
}, },
......
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {unref, computed, onMounted, reactive,ref} from 'vue'; import {unref, computed, onMounted, reactive,ref} from 'vue';
import {router} from "@/router"; import {router} from "@/router";
const getTitle = ref(''); const getTitle = ref('');
...@@ -244,6 +242,7 @@ async function handleNew(info: any) { ...@@ -244,6 +242,7 @@ async function handleNew(info: any) {
const contractList = [] const contractList = []
const contract = { const contract = {
contractId: info.id, contractId: info.id,
//合同名称
proChngeVisaQuarterId:null proChngeVisaQuarterId:null
} }
if( isUpdate){ if( isUpdate){
......
...@@ -130,6 +130,14 @@ export const formSchema: FormSchema[] = [ ...@@ -130,6 +130,14 @@ export const formSchema: FormSchema[] = [
]; ];
export const Content: FormSchema[] = [ export const Content: FormSchema[] = [
{ {
field: 'contractName',
label: ' 合同名称',
required: true,
component: 'Input',
colProps: { span: 7, offset: 1 },
},
{
//bidding_method //bidding_method
field: 'biddingMethod', field: 'biddingMethod',
label: '招标方式', label: '招标方式',
...@@ -189,13 +197,6 @@ export const Content: FormSchema[] = [ ...@@ -189,13 +197,6 @@ export const Content: FormSchema[] = [
}, },
colProps: { span: 7, offset: 1 }, colProps: { span: 7, offset: 1 },
}, },
{
field: 'contractName',
label: ' 合同名称',
required: true,
component: 'Input',
colProps: { span: 7, offset: 1 },
},
{ {
//first_party_name //first_party_name
......
...@@ -32,7 +32,7 @@ onBeforeMount( async ()=>{ ...@@ -32,7 +32,7 @@ onBeforeMount( async ()=>{
name: '', name: '',
type: 'pie', type: 'pie',
radius: ['30%', '70%'], radius: ['30%', '70%'],
avoidLabelOverlap: false, // avoidLabelOverlap: false,
label: { label: {
show: false, show: false,
position: 'center' position: 'center'
......
<!--<template>-->
<!-- <Card title="资金来源占比" :loading="loading" size="small">-->
<!-- <div ref="chartRef" :style="{ width, height }"></div>-->
<!-- </Card>-->
<!--</template>-->
<!--<script lang="ts" setup>-->
<!-- import { Ref, ref, watch,onMounted } from 'vue';-->
<!-- import { Card } from 'ant-design-vue';-->
<!-- import { useECharts } from '@/hooks/web/useECharts';-->
<!-- import {getSourceOfFunds} from '@/api/dashboard/dashboard';-->
<!-- const loading=ref(true)-->
<!-- const dataNumber= ref([])-->
<!-- onMounted( async ()=>{-->
<!-- let data=await getSourceOfFunds();-->
<!-- if(data){-->
<!-- loading.value=false-->
<!-- }-->
<!-- dataNumber.value= data-->
<!-- console.log(data,"数据查看")-->
<!-- setOptions({-->
<!-- tooltip: {-->
<!-- trigger: 'item'-->
<!-- },-->
<!-- legend: {-->
<!-- top: '20%',-->
<!-- right: 'right'-->
<!-- },-->
<!-- series: [-->
<!-- {-->
<!-- color: ['#FF7A8C', '#52C1F5', '#8167F5', '#FFA94C'],-->
<!-- name: 'Access From',-->
<!-- type: 'pie',-->
<!-- radius: ['30%', '60%'],-->
<!-- avoidLabelOverlap: false,-->
<!-- itemStyle: {-->
<!-- borderRadius:7,-->
<!-- borderColor: '#fff',-->
<!-- borderWidth:10-->
<!-- },-->
<!-- label: {-->
<!-- show: false,-->
<!-- position: 'center'-->
<!-- },-->
<!-- emphasis: {-->
<!-- label: {-->
<!-- show: true,-->
<!-- fontSize: 40,-->
<!-- fontWeight: 'bold'-->
<!-- }-->
<!-- },-->
<!-- labelLine: {-->
<!-- show: false-->
<!-- },-->
<!-- data: dataNumber.value-->
<!-- }-->
<!-- ]-->
<!-- });-->
<!-- })-->
<!-- const props = defineProps({-->
<!-- width: {-->
<!-- type: String as PropType<string>,-->
<!-- default: '100%',-->
<!-- },-->
<!-- height: {-->
<!-- type: String as PropType<string>,-->
<!-- default: '300px',-->
<!-- },-->
<!-- });-->
<!-- const chartRef = ref<HTMLDivElement | null>(null);-->
<!-- const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);-->
<!--</script>-->
<template> <template>
<Card title="资金来源占比" :loading="loading" size="small"> <Card title="资金来源占比" :loading="loading" size="small">
<div ref="chartRef" :style="{ width, height }"></div> <div ref="chartRef" :style="{ width, height }" id="main"></div>
</Card> </Card>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Ref, ref, watch,onMounted } from 'vue'; import { Ref, ref, watch,onMounted } from 'vue';
import { Card } from 'ant-design-vue'; import { Card } from 'ant-design-vue';
import { useECharts } from '@/hooks/web/useECharts'; import { useECharts } from '@/hooks/web/useECharts';
import echarts from "@/utils/lib/echarts";
import {getSourceOfFunds} from '@/api/dashboard/dashboard'; import {getSourceOfFunds} from '@/api/dashboard/dashboard';
const loading=ref(true) const chartRef = ref<HTMLDivElement | null>(null);
const dataNumber= ref([]) const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
onMounted( async ()=>{ const loading=ref(true)
let data=await getSourceOfFunds(); onMounted( async ()=>{
if(data){ loading.value=false
loading.value=false let result=await getSourceOfFunds();
} console.log(result,"数据查看")
dataNumber.value= data //在初始化 myChart ref是chartRef
console.log(data,"数据查看")
setOptions({ const data = result
tooltip: { const colorList = [
trigger: 'item' new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "#FF7A8C",
}, },
legend: { {
top: '20%', offset: 1,
right: 'right' color: "#FF7A8C",
}, },
series: [ ]),
{ new echarts.graphic.LinearGradient(0, 0, 0, 1, [
color: ['#FF7A8C', '#52C1F5', '#8167F5', '#FFA94C'], {
name: 'Access From', offset: 0,
type: 'pie', color: "#52C1F5",
radius: ['30%', '60%'], },
avoidLabelOverlap: false, {
itemStyle: { offset: 1,
borderRadius:7, color: "#52C1F5",
borderColor: '#fff', },
borderWidth:10 ]),
},
label: { new echarts.graphic.LinearGradient(1, 0, 0, 0, [
show: false, {
position: 'center' offset: 0,
color: "#8167F5",
},
{
offset: 1,
color: "#8167F5",
},
]),
new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "#FFA94C",
},
{
offset: 1,
color: "#FFA94C",
},
]),
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "rgba(126, 66, 255, 0)",
},
{
offset: 1,
color: "rgba(126, 66, 255, 1)",
},
]),
];
const color = [
"#FF7A8C",
"#52C1F5",
"#8167F5",
"#FFA94C",
];
// 外圈数据
const data1 = data.map((item, index) => {
return {
...item,
emphasis: {
show: true,
scaleSize: 9,
itemStyle: {
color: color[index],
},
label: {
show: true,
},
},
};
});
console.log(data1,"data1")
// 内圈数据
// 鼠标移入移出效果
setOptions({
legend: {
top: '20%',
right: 'right',
formatter: (name) => {
let item = data.find((item) => item.name === name);
return `${item.name}`+" " + `${item.value}`;
},
},
series: [
{
// 外圈
// name: "mainPie",
type: "pie",
radius: [80, 100],
center: ["50%", "60%"],
itemStyle: {
color: (params) => {
return colorList[params.dataIndex];
}, },
emphasis: { },
label: { label: {
show: true, show: false,
fontSize: 40, position: "center",
fontWeight: 'bold' formatter: (params) => {
} return `{name|${params.name}}\n{value|${params.percent}}{label|%}`;
}, },
labelLine: { rich: {
show: false value: {
padding: 10,
align: "center",
verticalAlign: "middle",
fontSize: 26,
fontWeight: "bold",
color: "#000",
},
name: {
padding: 5,
align: "center",
verticalAlign: "middle",
fontSize: 14,
fontWeight: 500,
color: "#ccc",
},
}, },
data: dataNumber.value },
}
]
});
})
const props = defineProps({ data: data1,
width: { },
type: String as PropType<string>, ],
default: '100%',
},
height: {
type: String as PropType<string>,
default: '300px',
},
}); });
const chartRef = ref<HTMLDivElement | null>(null); })
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
const props = defineProps({
width: {
type: String as PropType<string>,
default: '100%',
},
height: {
type: String as PropType<string>,
default: '300px',
},
});
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment