开发个人业绩组件
This commit is contained in:
		@@ -29,11 +29,11 @@ export default {
 | 
			
		||||
    setup( props )
 | 
			
		||||
    {
 | 
			
		||||
        const ui = reactive({
 | 
			
		||||
            mensualList:[],
 | 
			
		||||
            mensualList: [],
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        // 设置图表
 | 
			
		||||
        const initCharts = () =>
 | 
			
		||||
        const initCharts = (): void =>
 | 
			
		||||
        {
 | 
			
		||||
            console.log( "每月业绩", props.chartData );
 | 
			
		||||
            const chartDom = document.getElementById( "chartWrapper" );
 | 
			
		||||
@@ -55,7 +55,7 @@ export default {
 | 
			
		||||
                ],
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            option && myChart.setOption( option );
 | 
			
		||||
            myChart.setOption( option );
 | 
			
		||||
 | 
			
		||||
            window.onresize = function ()
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
@@ -11,10 +11,10 @@
 | 
			
		||||
    <div class="caller-archievment-wrapper">
 | 
			
		||||
        <table>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>坐席名称</td><td>{{ ui.callerName }}</td>
 | 
			
		||||
                <td>坐席名称</td><td>{{ CallerName }}</td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>车险保费</td><td>{{ ui.thisMonthPremium }}</td>
 | 
			
		||||
                <td>车险保费</td><td>{{ PresentMonthPremium }} 万元</td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>车非渗透率</td><td>{{ ui.attachingRate }}</td>
 | 
			
		||||
@@ -26,7 +26,8 @@
 | 
			
		||||
    </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
interface  CallerArchievementComponentUI
 | 
			
		||||
import { computed } from "vue";
 | 
			
		||||
interface CallerArchievementComponentUI
 | 
			
		||||
{
 | 
			
		||||
    callerName: string,
 | 
			
		||||
    thisMonthPremium: number,
 | 
			
		||||
@@ -36,25 +37,43 @@ interface  CallerArchievementComponentUI
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
    name: "CallerArchievementComponent",
 | 
			
		||||
    props:{
 | 
			
		||||
    props: {
 | 
			
		||||
        callerName: {
 | 
			
		||||
            type: String,
 | 
			
		||||
            require: true,
 | 
			
		||||
            default: (): string => "",
 | 
			
		||||
        },
 | 
			
		||||
        thisMonthPremium: {
 | 
			
		||||
            type: Number,
 | 
			
		||||
            require: true,
 | 
			
		||||
            default:()=>0,
 | 
			
		||||
            default: (): number => 0,
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
    setup()
 | 
			
		||||
    setup( props )
 | 
			
		||||
    {
 | 
			
		||||
        const ui:CallerArchievementComponentUI = {
 | 
			
		||||
        const ui: CallerArchievementComponentUI = {
 | 
			
		||||
            callerName: "",
 | 
			
		||||
            thisMonthPremium: 0,
 | 
			
		||||
            attachingRate: "0.0",
 | 
			
		||||
            renewalRate: "0.0",
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        return {ui,};
 | 
			
		||||
        const PresentMonthPremium = computed((): string =>
 | 
			
		||||
        {
 | 
			
		||||
            return ( props.thisMonthPremium / 10000 ).toFixed( 2 );
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        const CallerName = computed((): string =>
 | 
			
		||||
        {
 | 
			
		||||
            return props.callerName;
 | 
			
		||||
        });
 | 
			
		||||
        return {
 | 
			
		||||
            CallerName,
 | 
			
		||||
            PresentMonthPremium,
 | 
			
		||||
            ui,
 | 
			
		||||
        };
 | 
			
		||||
    },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
</style>
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user