diff --git a/src/api/DesignForm/tableButton.ts b/src/api/DesignForm/tableButton.ts index 2f36f51..346278d 100644 --- a/src/api/DesignForm/tableButton.ts +++ b/src/api/DesignForm/tableButton.ts @@ -1,4 +1,8 @@ +import { EpPropMergeType } from "element-plus/es/utils"; + export interface tableButton { + help: any; + children: any; control: any; id?: string; name?: string; @@ -18,6 +22,11 @@ export interface optionsInfo { value: string; } export interface attrButton { + activeValue: any; + inactiveValue: any; + fieldClass: string; + auxiliary: any; + value: EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number | null | undefined) | ((new (...args: any[]) => string | number) | (() => string | number | null | undefined))[], unknown, unknown>; label: string; key: string; type: string; @@ -28,38 +37,63 @@ export interface attrButton { export const tableButtonList :attrButton[] = [ { label: "新增", - key:"newAdd", - type:"primary", + key: "newAdd", + type: "primary", size: "small", - icon: "editPen" + icon: "editPen", + value: undefined, + activeValue: undefined, + inactiveValue: undefined, + fieldClass: "", + auxiliary: undefined }, { label: "导入", - key:"import", - type:"danger", + key: "import", + type: "danger", size: "small", - icon: "upload" + icon: "upload", + value: undefined, + activeValue: undefined, + inactiveValue: undefined, + fieldClass: "", + auxiliary: undefined }, { label: "导出", - key:"export", - type:"primary", + key: "export", + type: "primary", size: "small", - icon: "download" + icon: "download", + value: undefined, + activeValue: undefined, + inactiveValue: undefined, + fieldClass: "", + auxiliary: undefined }, { label: "批量删除", key: "del", type: "danger", size: "small", - icon: "delete" + icon: "delete", + value: undefined, + activeValue: undefined, + inactiveValue: undefined, + fieldClass: "", + auxiliary: undefined }, { label: "生成二维码", key: "showQrCode", type: "primary", size: "small", - icon: "setUp" + icon: "setUp", + value: undefined, + activeValue: undefined, + inactiveValue: undefined, + fieldClass: "", + auxiliary: undefined } ] //记录操作 @@ -69,21 +103,36 @@ export const tableLogButtonList :attrButton[] = [ key: "look", type: "success", size: "small", - icon: "view" + icon: "view", + value: undefined, + activeValue: undefined, + inactiveValue: undefined, + fieldClass: "", + auxiliary: undefined }, { label: "编辑", key: "edit", type: "warning", size: "small", - icon: "delete" + icon: "delete", + value: undefined, + activeValue: undefined, + inactiveValue: undefined, + fieldClass: "", + auxiliary: undefined }, { label: "删除", key: "del", type: "danger", size: "small", - icon: "delete" + icon: "delete", + value: undefined, + activeValue: undefined, + inactiveValue: undefined, + fieldClass: "", + auxiliary: undefined } ]; //记录操作 @@ -142,6 +191,7 @@ export const diaOrDrawer = [ //表单结构 export interface FormPageList { + tableProps: any; columns: tableButton[], config: any, controlBtn:tableButton[], @@ -312,6 +362,7 @@ export const weekForDay = [ ] export interface viewPageType { + card: any; list:{ status:boolean, diff --git a/src/api/DesignForm/types.ts b/src/api/DesignForm/types.ts index 278fc2a..22e2461 100644 --- a/src/api/DesignForm/types.ts +++ b/src/api/DesignForm/types.ts @@ -224,6 +224,8 @@ export interface appSetUpContent{ } //图标结构 export interface echatsViews { + widthBox: number + styles: any uuid:string; type:string; title:string; diff --git a/src/api/chart/index.ts b/src/api/chart/index.ts index d32ff26..e60ad02 100644 --- a/src/api/chart/index.ts +++ b/src/api/chart/index.ts @@ -31,3 +31,22 @@ export function analyzeChartData(data?: any) { data: data }); } + +//初始化个人图表配置及数据 +export function getMyChartSetupAndData(data?: any) { + return request({ + url: "/systemapi/chart/getMyChartSetupAndData", + method: 'post', + data: data + }); +} + + +//保存跟人图表设置 +export function saveMyBiCharts(data?: any) { + return request({ + url: "/systemapi/chart/saveMyBiCharts", + method: 'post', + data: data + }); +} diff --git a/src/assets/image/kong.png b/src/assets/image/kong.png new file mode 100644 index 0000000..de66f55 Binary files /dev/null and b/src/assets/image/kong.png differ diff --git a/src/components/DesignForm/tableListPage/index.vue b/src/components/DesignForm/tableListPage/index.vue index d73fcf9..3203682 100644 --- a/src/components/DesignForm/tableListPage/index.vue +++ b/src/components/DesignForm/tableListPage/index.vue @@ -17,6 +17,7 @@ import { FormPageList, FormPageConfig, viewPageType, + tableButton, } from "@/api/DesignForm/tableButton"; import { inputUnit, @@ -47,6 +48,7 @@ import MapPage from "@/components/DesignForm/app/mapPage.vue"; import CalendarPage from "@/components/DesignForm/app/calendar/calendar1/calendarPage.vue"; import SearchSelect from "@/components/DesignForm/app/calendar/selectSearch.vue"; import ContainerPath from "@/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/container.vue"; +import SeeContChart from "@/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/seeContChart.vue"; const props = withDefaults( defineProps<{ @@ -542,7 +544,7 @@ function isAllCharactersNumbers(str: string) { @ 时间: 2024-04-01 11:36:07 @ 功能: 功能按钮动作 */ -const setUpClick = (val: string, id: string) => { +const setUpClick = (val: any, id: string) => { // console.log("功能按钮动作",val,"----id----->",props.versionid,"-----formId---->",props.versiontitle) if (val.key == "newAdd") { drawerWith.value = container.value?.clientWidth; @@ -816,7 +818,7 @@ const setUpClick = (val: string, id: string) => { id: idList.value, isTrue: 2, }; - softDeletion(sendData).then((data) => { + softDeletion(sendData).then((data: { mag: any; }) => { // console.log('cancel!',data) ElNotification({ title: "提示信息!", @@ -1497,10 +1499,10 @@ const tabsView = (val: any, types: number) => { const writeListTitle = (val: any, viewConfig: any) => { // console.log("判断是否有标题--1-->",val) // console.log("判断是否有标题--2-->",viewConfig) - var titleAry = []; + var titleAry: any[] = []; if (viewConfig.form && viewConfig.form.title) { if (viewConfig.form.title.length > 0) { - viewConfig.form.title.forEach((item, index) => { + viewConfig.form.title.forEach((item: string | number, index: any) => { // console.log("判断是否有标题--"+index+"-->",val[item]) if (val[item]) { titleAry.push(val[item]); @@ -1564,7 +1566,7 @@ function optionsValue4Get4(data: any, fieldName: any) { @ 时间: 2024-11-29 13:46:36 @ 功能: 获取级联选择值 */ -const judjeCascader = (val: any[], options: any[]) => { +const judjeCascader = (val: any, options: any[]) => { if (val.length < 0) return ""; let valAry = stringToObj(val); console.log("获取级联选择值", stringToObj(val), val.length, options); @@ -1617,7 +1619,7 @@ const diGuiJilian = (val: any, options: any[]) => { @ 时间: 2024-05-21 16:00:41 @ 功能: 定义自定义表头 */ -const readerColumn = (column: any, isSun: int) => { +const readerColumn = (column: any, isSun: number) => { if (isSun != 1) { let labelLong = column.label.length; // 表头label长度 @@ -1671,7 +1673,7 @@ const tableChildren = (field:string,dataList:any) => { let jieguo = "" if(Array.isArray(dataList)){ - dataList.forEach((item:any,key:string) => { + dataList.forEach((item:any) => { if(isObject(item)){ @@ -1692,7 +1694,7 @@ jieguo = jieguo+"
{ console.log("火1111111兔", data); - if (data.code == 0 && data.data != null) { + if (data.code == 0 && data.data != null && data.data.series != null) { // let optVal = data.data; // let optVal = { // tooltip: { @@ -201,9 +220,12 @@ const drawPictures = () => { xAxis: data.data.xAxis, series: seriesAnlay(data.data.series), }; + myChart.value.setOption(optChart); // myChart.value.resize(); } else { + + myChart.value.setOption({ grid: { left: "2%", @@ -232,7 +254,7 @@ const drawPictures = () => { }, ], }); - // myChart.value.resize(); + } }); // myChart.value.setOption({ @@ -264,7 +286,7 @@ const drawPictures = () => { // ], // }); console.log("画图完毕---->", props); - myChart.value.resize(); + // myChart.value.resize(); }else { myChart.value.setOption({ grid: { @@ -334,7 +356,12 @@ const searBut = (val: string) => { const onSubmit = () => { drawPictures(); }; +const biTitleBox = ref(null) onMounted(() => { + props.kuandu = biTitleBox.value.offsetWidth + setupkuandu.value = biTitleBox.value.offsetWidth + + if(propsUuid.value){ myChart.value = echarts.init(propsUuid.value); myChart.value.setOption({ diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/barRace.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/barRace.vue index 688e4b6..4cc2f12 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/barRace.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/barRace.vue @@ -18,6 +18,7 @@ const props = withDefaults( uuid: string; data: echatsViews; tableKey: string; + kuandu:number; }>(), { uuid: () => { @@ -37,6 +38,11 @@ const barRaceChar = ref(null) */ const drawBarracetures = () => { if (props.uuid && props.uuid != "") { + myChart.value.resize( + { + width: setupkuandu.value + 'px' + } + ); // myChart.value = echarts.init(document.getElementById(props.uuid) as HTMLDivElement); analyzeChartData({ tableKey: props.tableKey, @@ -150,7 +156,22 @@ watch( }, { deep: true } ); +watch(()=>props.kuandu,(val:number)=>{ + if(val>160){ + setupkuandu.value = val-60 + }else{ + setupkuandu.value = 600 + } + + drawBarracetures() +},{ + deep:true +}) +const setupkuandu = ref(props.kuandu>60?props.kuandu-60:600) +const biTitleBoxRace = ref(null) onMounted(() => { + props.kuandu = biTitleBoxRace.value.offsetWidth + setupkuandu.value = biTitleBoxRace.value.offsetWidth if(barRaceChar.value){ myChart.value = echarts.init(barRaceChar.value); myChart.value.setOption({ @@ -181,7 +202,7 @@ onUnmounted(() => { })