Commit 9542bb24 authored by mengzixuan's avatar mengzixuan

Merge remote-tracking branch 'origin/develop' into develop

parents 6d590253 41c55278
......@@ -69,6 +69,7 @@
}
},
"dependencies": {
"moment": "2.30.1",
"@ant-design/icons-vue": "^7.0.1",
"@iconify/iconify": "^3.1.1",
"@logicflow/core": "^1.2.26",
......
......@@ -71,6 +71,9 @@ importers:
mockjs:
specifier: ^1.1.0
version: 1.1.0
moment:
specifier: 2.30.1
version: 2.30.1
nprogress:
specifier: ^0.2.0
version: 0.2.0
......@@ -5012,6 +5015,9 @@ packages:
module-details-from-path@1.0.3:
resolution: {integrity: sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==}
moment@2.30.1:
resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==}
mousetrap@1.6.5:
resolution: {integrity: sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==}
......@@ -12654,6 +12660,8 @@ snapshots:
module-details-from-path@1.0.3: {}
moment@2.30.1: {}
mousetrap@1.6.5: {}
mri@1.2.0: {}
......
......@@ -40,9 +40,9 @@ export const getNatureConstruction = () =>
export const getProgress = () =>
export const getProgress = (params?: ProjectParams) =>
defHttp.get<ProjectListGetResultModel>(
{ url: Api.progress })
{ url: Api.progress,params })
......
......@@ -12,6 +12,7 @@ enum Api {
UpdateProject = '/pro/tenderManager/update',
DeleteProject = '/pro/tenderManager/del',
ProjectDetail = '/pro/tenderManager/details',
selectCount = '/pro/tenderManager/selectCount',
Itemdelete = '/pro/tenderManager/details/del',
audit = '/pro/tenderManager/examine',
}
......@@ -48,3 +49,9 @@ export const auditItem = (params?: any) =>
url: Api.audit,
data: params,
});
export const selectCount = (params?: any) =>
defHttp.post<ProjectModel>({
url: Api.selectCount,
data: params,
});
......@@ -9,6 +9,7 @@ enum Api {
ProjectDetail = '/pro/tenderPlan/details',
Itemdelete = '/pro/tenderPlan/details/del',
audit = '/pro/tenderPlan/examine',
selectCount = '/pro/tenderPlan/selectCount',
}
export const getListByPage = (params?: ProjectPageParams) =>
defHttp.post<ListGetResultModel>({ url: Api.GetList, data: params });
......@@ -30,6 +31,12 @@ export const updateItem = (params?: any) =>
'Content-Type': 'application/json;charset=UTF-8',
},
});
export const selectCount = (params?: any) =>
defHttp.post<ProjectModel>({
url: Api.selectCount,
data: params,
});
export const auditItem = (params?: any) =>
defHttp.post<ProjectModel>({
url: Api.audit,
......
......@@ -9,6 +9,7 @@ enum Api {
ProjectDetail = '/pro/monthEngineer/details',
Itemdelete = '/pro/monthEngineer/delByDetail',
audit = '/pro/monthEngineer/audit',
selectCount = '/pro/monthEngineer/selectCount',
}
export const getMonthlyPlanList = (params?: ProjectParams) =>
defHttp.post<ProjectModel>({ url: Api.GetList, data: params });
......@@ -30,6 +31,11 @@ export const updateItem = (params?: any) =>
'Content-Type': 'application/json;charset=UTF-8',
},
});
export const selectCount = (params?: any) =>
defHttp.post<ProjectModel>({
url: Api.selectCount,
params,
});
export const auditItem = (params?: any) =>
defHttp.post<ProjectModel>({
url: Api.audit,
......
......@@ -37,7 +37,7 @@ export const columns: (
width: 200,
},
{
title: '投资金额',
title: '结算金额',
dataIndex: 'investmentAount',
width: 180,
},
......
<template>
<div>
<BasicForm ref="formElRef" @register="registerForm" style="height: 50px" @changeEvent="handleFormValuesChange">
<BasicForm ref="formElRef" @register="registerForm" style="height: 50px" >
</BasicForm>
</div>
</template>
<script lang="ts" setup>
import { ref} from 'vue';
import { BasicForm, useForm, FormActionType } from '@/components/Form';
import { formSchema } from './project.data';
import {BasicForm, useForm, FormActionType, FormSchema} from '@/components/Form';
const emit = defineEmits(['success', 'register']);
const formElRef = ref<Nullable<FormActionType>>(null);
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] = useForm({
const formSchema: FormSchema[] = [
{
//bidding_method
field: 'biddingMethod',
component: 'Select',
componentProps: {
options: getRecentFiveYears(),
placeholder: '请选择年份',
onChange: handleSelectChange,
},
//选择事件
colProps: { span: 10, offset: 13},
},
];
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema}] = useForm({
labelWidth: 90,
baseColProps: { span: 24 },
schemas: formSchema,
showActionButtonGroup: false,
});
function handleFormValuesChange(values: string){
console.log("wssss");
function getRecentFiveYears(): Array<{ label: string, value: number }> {
const currentYear = new Date().getFullYear();
const years: Array<{ label: string, value: number }> = [];
for (let i = 0; i <= 4; i++) {
const year = currentYear - i;
years.push({ label: year.toString(), value: year });
}
return years.reverse(); // 可选:反转数组使年份从最近到最远排序
}
function handleSelectChange(value: string) {
console.log('下拉框值变化:', value);
emit("success", value)
// 在这里处理变更逻辑
}
// emit('success', res);
</script>
......@@ -6,7 +6,9 @@ export const formSchema: FormSchema[] = [
component: 'Select',
componentProps: {
options: getRecentFiveYears(),
placeholder: '请选择年份',
},
//选择事件
colProps: { span: 10, offset: 13},
},
......
......@@ -50,7 +50,7 @@
// fixed: undefined,
// },
});
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
function getSelectRowList() {
// createMessage.info('请在控制台查看!');
......
......@@ -15,12 +15,12 @@
import { ref, nextTick, reactive } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, FormSchema, useForm } from '@/components/Form';
import moment from 'moment';
let schemas = reactive<FormSchema[]>([]);
const props = defineProps({
userData: { type: Object },
});
const emit = defineEmits(['close']);
const emit = defineEmits(['close', 'register']);
const modelRef = ref({});
const [
registerForm,
......@@ -57,6 +57,7 @@
picker: 'year',
valueFormat: 'YYYY',
format: 'YYYY',
defaultValue: moment().format('YYYY'),
style: {
width: '100%',
},
......@@ -74,6 +75,7 @@
placeholder: '月份',
picker: 'month',
valueFormat: 'YYYY-MM',
defaultValue: moment().format('YYYY-MM'),
format: 'YYYY-MM',
style: {
width: '100%',
......@@ -109,6 +111,7 @@
},
],
},
defaultValue: '第三季度',
colProps: { span: 11, offset: 1 },
});
}
......@@ -139,7 +142,7 @@
schemas = [];
console.log('submit');
emit('close', value);
closeModal();
// closeModal();
});
}
</script>
......@@ -2,10 +2,11 @@
<div>
<BasicTable @register="registerTable" :title="'年度工程资金计划'">
<template #toolbar>
<a-button class="btn" type="primary" @click="addAnnualPlan"> 新建年度工程资金计划 </a-button>
<a-button class="btn" type="primary" @click="addAnnualPlan">
新建年度工程资金计划
</a-button>
</template>
<template #bodyCell="{ column, text, record, index }">
<!-- 当前列是序号列时,显示序号 -->
<span v-if="column.dataIndex === 'serialNumber'">{{ index + 1 }}</span>
......@@ -65,32 +66,32 @@
</div>
</template>
<script lang="ts" setup>
import {useRouter} from "vue-router";
const { push } = useRouter();
import { Tag } from 'ant-design-vue';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { getAnnualPlanList } from '@/api/project/annualPlan';
import annualPlanModel from './annualPlanModel/annualPlanModel.vue';
import { useRouter } from 'vue-router';
const { push } = useRouter();
import { Tag } from 'ant-design-vue';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { getAnnualPlanList } from '@/api/project/annualPlan';
import annualPlanModel from './annualPlanModel/annualPlanModel.vue';
import { getListByPage } from '@/api/project/biddingPlan';
import { getListByPage } from '@/api/project/biddingPlan';
import { useDrawer } from '@/components/Drawer';
import { useDrawer } from '@/components/Drawer';
import { columns, searchFormSchema } from './data';
import {useModal} from "@/components/Modal";
import {router} from "@/router";
import { BasicForm, useForm, FormProps, UseFormReturnType } from '@/components/Form';
import {formSchema} from "@/views/annualPlan/annualPlanEdit/tableData";
import {auditItem, deleteItem} from "@/api/project/annualPlan";
import {onMounted} from "vue";
import {getDepartmentList} from "@/api/project/settlementManage";
import { columns, searchFormSchema } from './data';
import { useModal } from '@/components/Modal';
import { router } from '@/router';
import { BasicForm, useForm, FormProps, UseFormReturnType } from '@/components/Form';
import { formSchema } from '@/views/annualPlan/annualPlanEdit/tableData';
import { auditItem, deleteItem } from '@/api/project/annualPlan';
import { onMounted } from 'vue';
import { getDepartmentList } from '@/api/project/settlementManage';
const [register, { openModal: openModal }] = useModal();
const [register, { openModal: openModal }] = useModal();
defineOptions({ name: 'Performance' });
defineOptions({ name: 'Performance' });
const [registerDrawer, { openDrawer }] = useDrawer();
const [registerTable, { reload }] = useTable({
const [registerDrawer, { openDrawer }] = useDrawer();
const [registerTable, { reload }] = useTable({
api: getAnnualPlanList,
title: '123',
columns,
......@@ -109,14 +110,14 @@ const [registerTable, { reload }] = useTable({
// slots: { customRender: 'action' },
fixed: undefined,
},
});
});
onMounted(async () => {
const data = await getDepartmentList()
searchFormSchema[1].componentProps.options=data
});
onMounted(async () => {
const data = await getDepartmentList();
searchFormSchema[1].componentProps.options = data;
});
function handleEdit(record: Recordable, disabled: number) {
function handleEdit(record: Recordable, disabled: number) {
push({
path: '/annualPlan/annualPlanEdit',
query: {
......@@ -124,25 +125,25 @@ function handleEdit(record: Recordable, disabled: number) {
disabled: String(disabled),
},
});
}
}
function handleDelete(record: Recordable) {
function handleDelete(record: Recordable) {
console.log(record);
deleteItem({ id: record.id });
reload();
}
}
function handleSuccess() {
function handleSuccess() {
reload();
}
}
const addAnnualPlan = () => {
const addAnnualPlan = () => {
openModal(true, {
data: ['year'],
});
};
};
const handleNew = (e) => {
const handleNew = (e) => {
console.log('eeee', e);
router.push({
path: '/annualPlan/annualPlanEdit',
......@@ -150,21 +151,21 @@ const handleNew = (e) => {
source: JSON.stringify(e),
},
});
};
};
const change = (key: string) => {
const change = (key: string) => {
reload();
};
};
async function examine(record: Recordable, disabled: boolean) {
async function examine(record: Recordable, disabled: boolean) {
const id = record.id;
const res = await auditItem({ id });
console.log(res);
reload();
}
}
</script>
<style scoped>
.btn {
.btn {
margin-right: 10px;
}
}
</style>
......@@ -62,12 +62,19 @@
</template>
<script lang="ts" setup>
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { getListByPage, deleteItem, auditItem } from '@/api/project/biddingManagement';
import {
getListByPage,
deleteItem,
auditItem,
selectCount,
} from '@/api/project/biddingManagement';
import { columns, searchFormSchema } from './biddingManagement.data';
import { useModal } from '@/components/Modal';
import yearModal from '@/components/yearModal.vue';
import { useRouter } from 'vue-router';
const { push } = useRouter();
import { useMessage } from '@/hooks/web/useMessage';
const { error } = createMessage;
defineOptions({ name: 'RoleManagement' });
const [registerTable, { reload }] = useTable({
......@@ -89,7 +96,7 @@
fixed: undefined,
},
});
const [register, { openModal: openModal }] = useModal();
const [register, { openModal: openModal, closeModal: closeModal }] = useModal();
function handleCreate() {
openModal(true, {
data: ['year', 'quarter'],
......@@ -111,12 +118,17 @@
reload();
}
function handleNew(e) {
console.log(e);
async function handleNew(e) {
let res = await selectCount(e);
if (res == true) {
closeModal();
push({
path: '/biddingManagement/edit',
query: e,
});
} else {
error('该周期已填报');
}
}
async function examine(record: Recordable, disabled: boolean) {
const id = record.id;
......
......@@ -62,13 +62,14 @@
</template>
<script lang="ts" setup>
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { getListByPage, deleteItem, auditItem } from '@/api/project/biddingPlan';
import { getListByPage, deleteItem, auditItem, selectCount } from '@/api/project/biddingPlan';
import { useModal } from '@/components/Modal';
import yearModal from '@/components/yearModal.vue';
import { columns, searchFormSchema } from './biddingPlan.data';
import { useRouter } from 'vue-router';
const { error } = createMessage;
const { push } = useRouter();
const [register, { openModal: openModal }] = useModal();
const [register, { openModal: openModal, closeModal: closeModal }] = useModal();
const [registerTable, { reload }] = useTable({
api: getListByPage,
columns,
......@@ -110,13 +111,19 @@
reload();
}
function handleNew(e) {
console.log(e);
async function handleNew(e) {
let res = await selectCount(e);
if (res == true) {
closeModal();
push({
path: '/biddingPlan/edit',
query: e,
});
} else {
error('该周期已填报');
}
}
async function examine(record: Recordable, disabled: boolean) {
const id = record.id;
const res = await auditItem({ id });
......
......@@ -30,8 +30,6 @@
</PageWrapper>
</template>
<script lang="ts" setup>
import {unref, computed, onMounted, reactive,ref} from 'vue';
import {router} from "@/router";
const getTitle = ref('');
......@@ -244,6 +242,7 @@ async function handleNew(info: any) {
const contractList = []
const contract = {
contractId: info.id,
//合同名称
proChngeVisaQuarterId:null
}
if( isUpdate){
......
......@@ -129,6 +129,14 @@ export const formSchema: FormSchema[] = [
},
];
export const Content: FormSchema[] = [
{
field: 'contractName',
label: ' 合同名称',
required: true,
component: 'Input',
colProps: { span: 7, offset: 1 },
},
{
//bidding_method
field: 'biddingMethod',
......@@ -189,13 +197,6 @@ export const Content: FormSchema[] = [
},
colProps: { span: 7, offset: 1 },
},
{
field: 'contractName',
label: ' 合同名称',
required: true,
component: 'Input',
colProps: { span: 7, offset: 1 },
},
{
//first_party_name
......
......@@ -32,6 +32,28 @@ if(data){
setOptions({
xAxis: {
type: 'category',
axisLabel: {
interval: 0, // 确保每个标签都显示
rotate: 0, // 取消旋转,以便于换行显示
formatter: function (value) {
const charPerLine = 6; // 每行显示的字符数
let result = '';
for (let i = 0; i < value.length; i += charPerLine) {
if (i + charPerLine < value.length) {
result += value.substring(i, i + charPerLine) + '\n';
} else {
result += value.substring(i);
}
}
return result;
},
// 为了更好地控制换行效果,可能需要调整样式以适应文本换行
rich: {
line1: {
lineHeight: 24, // 调整行高以适应换行
},
},
},
data: data.title
},
yAxis: {
......
<template>
<Card title="形象进度占比" :loading="loading" size="small">
<YearSelect @close="handleNewData" />
<YearSelect @close="handleNewData" @success="handleNewData" />
<div ref="chartRef" :style="{ width, height }"></div>
</Card>
</template>
......@@ -11,30 +11,26 @@ import { Card } from 'ant-design-vue';
import { useECharts } from '@/hooks/web/useECharts';
import {getProgress} from '@/api/dashboard/dashboard';
const loading=ref(true)
const data=ref([])
onBeforeMount( async ()=>{
const data = await getProgress()
poops(null)
})
async function poops(title){
if(title){
data.value = await getProgress({year:title})
}
else {
data.value = await getProgress()
}
console.log(`形象进度占比`,data)
if(data){
loading.value=false
}
setOptions({
xAxis: {
type: 'category',
//设置宽度并文字超过宽度自动隐藏
axisLabel: {
// interval: 0,
// rotate: 10,
// rich: {
// text: {
// width: 400,
// overflow: 'truncate',
// }
// },
// formatter: function (value) {
// return `{text|${value}}`;
// },
interval: 0, // 确保每个标签都显示
rotate: 0, // 取消旋转,以便于换行显示
formatter: function (value) {
......@@ -55,28 +51,21 @@ onBeforeMount( async ()=>{
lineHeight: 24, // 调整行高以适应换行
},
},
// 使用富文本样式
formatter: function (value) {
return `{line1|${value}}`;
},
},
data:data.title
data:data.value.title
},
yAxis: {
type: 'value'
},
series: [
{
data: data.content,
data: data.value.content,
type: 'bar'
}
]
});
})
}
const props = defineProps({
loading: Boolean,
width: {
......@@ -93,6 +82,6 @@ const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
function handleNewData(info: null) {
console.log(info," 传递数据查看")
poops(info)
}
</script>
<template>
<Card title="建设性质占比" :loading="loading" size="small">
<div ref="chartRef" :style="{ width, height }"></div>
<Card title="资金来源占比" :loading="loading" size="small">
<div ref="chartRef" :style="{ width, height }" id="showChar"></div>
</Card>
</template>
<script lang="ts" setup>
import { Ref, ref,onBeforeMount } from 'vue';
import { Ref, ref,onMounted } from 'vue';
import { Card } from 'ant-design-vue';
import { useECharts } from '@/hooks/web/useECharts';
import echarts from "@/utils/lib/echarts";
import {getNatureConstruction} from '@/api/dashboard/dashboard';
const chartRef = ref<HTMLDivElement | null>(null);
const IndexPie = ref(null) // 保存索引
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
const loading=ref(true)
const dataNumber= ref([])
onBeforeMount( async ()=>{
let data=await getNatureConstruction();
if(data){
onMounted( async ()=>{
loading.value=false
}
dataNumber.value= data
console.log(data,"建设性质占比")
setOptions({
tooltip: {
trigger: 'item'
let result=await getNatureConstruction();
const data = result
const colorList = [
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "#0099FF",
},
{
offset: 1,
color: "#0099FF",
},
]),
new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#FEC03D",
},
{
offset: 1,
color: "#FEC03D",
},
]),
new echarts.graphic.LinearGradient(1, 0, 0, 0, [
{
offset: 0,
color: "#52C1F5",
},
{
offset: 1,
color: "#52C1F5",
},
]),
];
const color = [
"#0099FF",
"#FEC03D",
"#52C1F5"
];
// 外圈数据
const data1 = data.map((item, index) => {
return {
...item,
emphasis: {
show: true,
scaleSize: 9,
itemStyle: {
color: color[index],
},
label: {
show: true,
},
},
};
});
let chat = echarts.init(document.getElementById("showChar") as HTMLDivElement);
chat.setOption({
legend: {
top: '20%',
right: 'right'
// show: true,
// top: '40%',
// right: 'right',
show: true,
orient: 'vertical',
top: 'center',
right: '7%',
icon: 'rect',
itemGap: 30,
itemWidth: 20,
itemHeight: 10,
color: '#fff',
formatter: (name) => {
let item = data.find((item) => item.name === name);
return `${item.name}`+" " + `${item.value}`;
},
},
series: [
{
color: ['#0099FF','#FEC03D', '#52C1F5'],
name: '',
type: 'pie',
radius: ['30%', '70%'],
avoidLabelOverlap: false,
type: "pie",
radius: [80, 100],
center: ["35%", "60%"],
itemStyle: {
color: (params) => {
return colorList[params.dataIndex];
},
},
label: {
show: false,
position: 'center'
position: "center",
formatter: (params) => {
return `{name|${params.name}}\n{value|${params.percent}}{label|%}`;
},
rich: {
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",
},
itemStyle: {
borderRadius:7,
borderColor: '#fff',
borderWidth:20
},
emphasis: {
label: {
show: true,
fontSize: 40,
fontWeight: 'bold'
}
},
labelLine: {
show: false
data: data1,
},
data: dataNumber.value
],
})
chat.dispatchAction({type: 'highlight', seriesIndex: 0, dataIndex: 0})
chat.on('mouseover',function(e){
console.log(e.dataIndex,'e.dataIndex', '-',IndexPie.value)
if(e.dataIndex !== IndexPie.value){
if(IndexPie.value == null){
chat.dispatchAction({type: 'downplay', seriesIndex: 0, dataIndex: 0})
chat.dispatchAction({type: 'highlight', seriesIndex: 0, dataIndex: e.dataIndex})
}else{
chat.dispatchAction({type: 'downplay', seriesIndex: 0, dataIndex: IndexPie.value})
}
}
]
});
chat.on('mouseout',function(e){
IndexPie.value = e.dataIndex
chat.dispatchAction({type: 'highlight', seriesIndex: 0, dataIndex: IndexPie.value})
});
return
})
const props = defineProps({
width: {
type: String as PropType<string>,
......@@ -69,6 +166,6 @@ const props = defineProps({
default: '300px',
},
});
const chartRef = ref<HTMLDivElement | null>(null);
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
</script>
<template>
<Card title="资金来源占比" :loading="loading" size="small">
<div ref="chartRef" :style="{ width, height }"></div>
<div ref="chartRef" :style="{ width, height }" id="main"></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 { Ref, ref, watch,onMounted } from 'vue';
import { Card } from 'ant-design-vue';
import { useECharts } from '@/hooks/web/useECharts';
import echarts from "@/utils/lib/echarts";
import {getSourceOfFunds} from '@/api/dashboard/dashboard';
const chartRef = ref<HTMLDivElement | null>(null);
import {getSourceOfFunds} from '@/api/dashboard/dashboard';
const loading=ref(true)
const dataNumber= ref([])
onMounted( async ()=>{
let data=await getSourceOfFunds();
if(data){
const IndexPie = ref(null) // 保存索引
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
const loading=ref(true)
onMounted( async ()=>{
loading.value=false
}
dataNumber.value= data
console.log(data,"数据查看")
setOptions({
tooltip: {
trigger: 'item'
let result=await getSourceOfFunds();
const data = result
const colorList = [
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "#FF7A8C",
},
{
offset: 1,
color: "#FF7A8C",
},
]),
new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#52C1F5",
},
{
offset: 1,
color: "#52C1F5",
},
]),
new echarts.graphic.LinearGradient(1, 0, 0, 0, [
{
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,
},
},
};
});
let chat = echarts.init(document.getElementById("main") as HTMLDivElement);
chat.setOption({
legend: {
top: '20%',
right: 'right'
show: true,
orient: 'vertical',
top: 'center',
right: '7%',
icon: 'rect',
itemGap: 30,
itemWidth: 20,
itemHeight: 10,
color: '#fff',
formatter: (name) => {
let item = data.find((item) => item.name === name);
return `${item.name}`+" " + `${item.value}`;
},
},
series: [
{
color: ['#FF7A8C', '#52C1F5', '#8167F5', '#FFA94C'],
name: 'Access From',
type: 'pie',
radius: ['30%', '60%'],
avoidLabelOverlap: false,
type: "pie",
radius: [80, 100],
center: ["30%", "60%"],
itemStyle: {
borderRadius:7,
borderColor: '#fff',
borderWidth:10
color: (params) => {
return colorList[params.dataIndex];
},
},
label: {
show: false,
position: 'center'
position: "center",
formatter: (params) => {
return `{name|${params.name}}\n{value|${params.percent}}{label|%}`;
},
emphasis: {
label: {
show: true,
fontSize: 40,
fontWeight: 'bold'
}
rich: {
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",
},
labelLine: {
show: false
},
data: dataNumber.value
},
data: data1,
},
],
})
chat.dispatchAction({type: 'highlight', seriesIndex: 0, dataIndex: 0})
// chat.dispatchAction({type: 'downplay',seriesIndex: 0,dataIndex: 0});
chat.on('mouseover',function(e){
console.log(e.dataIndex,'e.dataIndex', '-',IndexPie.value)
if(e.dataIndex !== IndexPie.value){
if(IndexPie.value == null){
chat.dispatchAction({type: 'downplay', seriesIndex: 0, dataIndex: 0})
chat.dispatchAction({type: 'highlight', seriesIndex: 0, dataIndex: e.dataIndex})
}else{
chat.dispatchAction({type: 'downplay', seriesIndex: 0, dataIndex: IndexPie.value})
}
}
]
});
chat.on('mouseout',function(e){
IndexPie.value = e.dataIndex
chat.dispatchAction({type: 'highlight', seriesIndex: 0, dataIndex: IndexPie.value})
});
return
})
})
const props = defineProps({
const props = defineProps({
width: {
type: String as PropType<string>,
default: '100%',
......@@ -68,7 +187,7 @@
type: String as PropType<string>,
default: '300px',
},
});
const chartRef = ref<HTMLDivElement | null>(null);
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
});
</script>
......@@ -68,12 +68,19 @@
</template>
<script lang="ts" setup>
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { getMonthlyPlanList, deleteItem, auditItem } from '@/api/project/monthlyPlan';
import {
getMonthlyPlanList,
deleteItem,
auditItem,
selectCount,
} from '@/api/project/monthlyPlan';
import { Tag } from 'ant-design-vue';
import { useDrawer } from '@/components/Drawer';
import { columns, searchFormSchema } from './data';
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
const { error } = createMessage;
defineOptions({ name: 'MonthlyPlan' });
import yearModal from '@/components/yearModal.vue';
......@@ -81,11 +88,10 @@
import { useModal } from '@/components/Modal';
import { useRouter } from 'vue-router';
import {onMounted} from "vue";
import {getDepartmentList} from "@/api/project/settlementManage";
import { onMounted } from 'vue';
import { getDepartmentList } from '@/api/project/settlementManage';
const { push } = useRouter();
const [register, { openModal: openModal }] = useModal();
const [register, { openModal: openModal, closeModal: closeModal }] = useModal();
const [registerTable, { reload }] = useTable({
api: getMonthlyPlanList,
......@@ -109,8 +115,8 @@
});
onMounted(async () => {
const data = await getDepartmentList()
searchFormSchema[1].componentProps.options=data
const data = await getDepartmentList();
searchFormSchema[1].componentProps.options = data;
});
function handleEdit(record: Recordable, disabled: number) {
......@@ -144,12 +150,18 @@
});
};
const handleNew = (e) => {
async function handleNew(e) {
let res = await selectCount(e);
if (res == true) {
closeModal();
push({
path: '/monthlyPlan/monthlyPlanEdit',
query: e,
});
};
} else {
error('该周期已填报');
}
}
</script>
<style scoped>
.btn {
......
......@@ -37,7 +37,17 @@
columns: contractColumns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
schemas: [
{
field: 'contactName',
label: '',
component: 'Input',
componentProps: {
placeholder: '合同名称',
},
colProps: { span: 5 },
},
],
},
searchInfo: {
proId: detailId,
......
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