Commit 9542bb24 authored by mengzixuan's avatar mengzixuan

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

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