Browse Source

Merge branch 'qin_24'

han_v3
herenshan112 4 months ago
parent
commit
809647fa6b
  1. 145
      src/components/DesignForm/app/index.vue
  2. 6
      src/components/DesignForm/public/expand/lowcodeImage.vue
  3. 82
      src/components/DesignForm/public/expand/uploadPageList.vue
  4. 15
      src/components/DesignForm/public/form/formItem.vue
  5. 28
      src/components/DesignForm/tableListPage/formPageCont.vue
  6. 34
      src/components/DesignForm/tableListPage/index.vue
  7. 1
      src/permission.ts
  8. 3
      src/store/modules/permission.ts
  9. 47
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue
  10. 13
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/barRace.vue
  11. 80
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/line.vue
  12. 1
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/pie.vue
  13. 26
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/radar.vue
  14. 5
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/container.vue
  15. 2
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/pageList.vue
  16. 2
      src/views/sysworkflow/lowcodepage/pageList.vue
  17. 4
      src/views/sysworkflow/lowcodepage/runApp/runAppForm.vue

145
src/components/DesignForm/app/index.vue

@ -54,7 +54,7 @@ import CalendarPage from "@/components/DesignForm/app/calendar/calendar1/calenda
import SearchSelect from "@/components/DesignForm/app/calendar/selectSearch.vue"; import SearchSelect from "@/components/DesignForm/app/calendar/selectSearch.vue";
import AKSelect from "@/components/DesignForm/public/form/select.vue"; import AKSelect from "@/components/DesignForm/public/form/select.vue";
import ContainerPath from "@/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/container.vue"; import ContainerPath from "@/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/container.vue";
import exportPanel from '../exportPanel.vue'; import exportPanel from "../exportPanel.vue";
import importPanel from "../importPanel.vue"; import importPanel from "../importPanel.vue";
const props = withDefaults( const props = withDefaults(
@ -155,7 +155,7 @@ const currentAsfTableDataList = ref([]); //当前点击的关联表单数据
const openTaskDrawer = ref(false); // const openTaskDrawer = ref(false); //
// //
const dynamicVNode = ref<VNode | null>(null) // const dynamicVNode = ref<VNode | null>(null); //
const state = reactive({ const state = reactive({
loading: false, loading: false,
@ -552,9 +552,9 @@ const setUpClick = (val: string, id: string) => {
drawerWith.value = container.value?.clientWidth; drawerWith.value = container.value?.clientWidth;
openTaskDrawer.value = true; openTaskDrawer.value = true;
} else if (val.key === "export") { } else if (val.key === "export") {
doExportTableData() doExportTableData();
} else if (val.key === "import") { } else if (val.key === "import") {
doImportTableData() doImportTableData();
} else if (val.key == "showQrCode") { } else if (val.key == "showQrCode") {
//liwenxuan 20250114 start //liwenxuan 20250114 start
//, //,
@ -870,18 +870,18 @@ const columnsFilter = computed(() => {
}); });
const subTableFieldsFilter = computed(() => { const subTableFieldsFilter = computed(() => {
const arr:{table:string,field:string,label:string}[]=[] const arr: { table: string; field: string; label: string }[] = [];
const names:string[]=[] const names: string[] = [];
props.fieldsDetailList.forEach((item: any) => { props.fieldsDetailList.forEach((item: any) => {
if (item.type === "table") { if (item.type === "table") {
names.push(item.name) names.push(item.name);
item.list.forEach((sub: any) => { item.list.forEach((sub: any) => {
arr.push({table:item.name, field: sub.name, label: sub.item.label}) arr.push({ table: item.name, field: sub.name, label: sub.item.label });
}) });
} }
}) });
return {tables:names,fields:arr} return { tables: names, fields: arr };
}) });
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ -981,10 +981,12 @@ const getPageData = () => {
default: default:
state.loading = true; state.loading = true;
//by han2015, 便 //by han2015, 便
doGainFormPageListCont(sendData).then(datas=>{ doGainFormPageListCont(sendData)
tableDataList.value = datas.list .then((datas) => {
state.total=datas.total tableDataList.value = datas.list;
}).finally(()=>{ state.total = datas.total;
})
.finally(() => {
// finally // finally
state.loading = false; state.loading = false;
asfs = []; asfs = [];
@ -995,28 +997,30 @@ const getPageData = () => {
tables = []; tables = [];
dofs = []; dofs = [];
getAsfs(); getAsfs();
}) });
} }
}; };
// //
function doImportTableData() { function doImportTableData() {
dynamicVNode.value = h(importPanel, { dynamicVNode.value = h(importPanel, {
fields:props.fieldsDetailList.filter(val=>val.type!=="table"), fields: props.fieldsDetailList.filter((val) => val.type !== "table"),
formId: props.versionid, formId: props.versionid,
commitFunc: () => { commitFunc: () => {
getPageData() //table getPageData(); //table
dynamicVNode.value=null dynamicVNode.value = null;
}, },
closeFunc:()=>dynamicVNode.value=null closeFunc: () => (dynamicVNode.value = null),
}) });
} }
// //
function doExportTableData() { function doExportTableData() {
//fieldssubs //fieldssubs
function exportFunc(fields:{field:string,label:string}[],subs:{table:string,field:string,label:string}[]){ function exportFunc(
fields: { field: string; label: string }[],
subs: { table: string; field: string; label: string }[]
) {
let sendData = { let sendData = {
formId: props.formId, formId: props.formId,
page: 1, page: 1,
@ -1024,17 +1028,18 @@ function doExportTableData(){
searchData: json2string(props.searchData), searchData: json2string(props.searchData),
}; };
// //
doGainFormPageListCont(sendData).then(datas=>{ doGainFormPageListCont(sendData)
.then((datas) => {
const array: string[] = []; const array: string[] = [];
// //
const title: string[] = []; const title: string[] = [];
for (let val of fields) { for (let val of fields) {
title.push(val.label) title.push(val.label);
} }
for (let val of subs) { for (let val of subs) {
title.push(val.label) title.push(val.label);
} }
array.push(title.join(",")) array.push(title.join(","));
// //
datas.list.forEach((item) => { datas.list.forEach((item) => {
@ -1042,61 +1047,68 @@ function doExportTableData(){
let maxline = 0; let maxline = 0;
// //
for (let val of fields) { for (let val of fields) {
if(typeof(val)==="string") line.push((item[val.field] as string).replaceAll(",",",")) if (typeof val === "string")
else line.push(item[val.field]) line.push((item[val.field] as string).replaceAll(",", ","));
else line.push(item[val.field]);
} }
// //
if (subs.length > 0) { if (subs.length > 0) {
// //
for (let tab of subTableFieldsFilter.value.tables) { for (let tab of subTableFieldsFilter.value.tables) {
if(item[tab] && item[tab].length>maxline) maxline=item[tab].length if (item[tab] && item[tab].length > maxline) maxline = item[tab].length;
} }
// //
if (maxline === 0) { if (maxline === 0) {
array.push(line.join(",")+","+Array(subs.length).fill("")) array.push(line.join(",") + "," + Array(subs.length).fill(""));
return return;
} }
//spaceprefix //spaceprefix
const spacePrefix=Array(line.length).fill("") const spacePrefix = Array(line.length).fill("");
for (let i = 0; i < maxline; i++) { for (let i = 0; i < maxline; i++) {
const row:any[]=[] const row: any[] = [];
subTableFieldsFilter.value.tables.forEach(name => { subTableFieldsFilter.value.tables.forEach((name) => {
if (item[name] && item[name].length - 1 >= i) { if (item[name] && item[name].length - 1 >= i) {
// //
subs.filter(v=>v.table===name).forEach(f=>{ subs
row.push(item[name][i][f.field]) .filter((v) => v.table === name)
}) .forEach((f) => {
row.push(item[name][i][f.field]);
});
} else { } else {
//N //N
row.push(...(Array(subs.filter(v=>v.table===name).length).fill(""))) row.push(
...Array(subs.filter((v) => v.table === name).length).fill("")
);
} }
}) });
//csv //csv
if (i === 0) { if (i === 0) {
array.push(line.join(",")+","+row.join(",")) array.push(line.join(",") + "," + row.join(","));
} else { } else {
array.push(spacePrefix+","+row.join(",")) array.push(spacePrefix + "," + row.join(","));
} }
} }
return return;
} }
// //
array.push(line.join(",")) array.push(line.join(","));
}) });
// //
if((array.length-1)!==datas.total) alert(`导出记录数:${datas.total}, 共计:${array.length-1}`) if (array.length - 1 !== datas.total)
alert(`导出记录数:${datas.total}, 共计:${array.length - 1}`);
const filename= props.pickAppMenu.label+".csv" const filename = props.pickAppMenu.label + ".csv";
const csvString = array.join('\n'); const csvString = array.join("\n");
const blob = new Blob([csvString], { type: "text/csv;charset=utf-8;" }); const blob = new Blob([csvString], { type: "text/csv;charset=utf-8;" });
const link = document.createElement("a"); const link = document.createElement("a");
if (link.download !== undefined) { // feature detection if (link.download !== undefined) {
// feature detection
// Browsers that support HTML5 download attribute // Browsers that support HTML5 download attribute
const url = URL.createObjectURL(blob); const url = URL.createObjectURL(blob);
link.setAttribute("href", url); link.setAttribute("href", url);
@ -1106,7 +1118,8 @@ function doExportTableData(){
link.click(); link.click();
document.body.removeChild(link); document.body.removeChild(link);
} }
}).finally(()=>dynamicVNode.value=null) })
.finally(() => (dynamicVNode.value = null));
} }
dynamicVNode.value = h(exportPanel, { dynamicVNode.value = h(exportPanel, {
@ -1114,12 +1127,12 @@ function doExportTableData(){
subtabs: columnsFilter.value.filter((item) => item.pattern === "table"), subtabs: columnsFilter.value.filter((item) => item.pattern === "table"),
subFields: subTableFieldsFilter.value.fields, subFields: subTableFieldsFilter.value.fields,
commitFunc: exportFunc, commitFunc: exportFunc,
closeFunc:()=>dynamicVNode.value=null closeFunc: () => (dynamicVNode.value = null),
}) });
} }
async function doGainFormPageListCont(sendData: any) { async function doGainFormPageListCont(sendData: any) {
const data =await gainFormPageListCont(sendData) const data = await gainFormPageListCont(sendData);
// console.log("----------------->",data) // console.log("----------------->",data)
//console.log(dataList) //console.log(dataList)
asfDetails = props.data.columns.filter((item: any) => { asfDetails = props.data.columns.filter((item: any) => {
@ -1185,7 +1198,7 @@ async function doGainFormPageListCont(sendData:any){
} }
//console.log(data.data.list) //console.log(data.data.list)
transferDetails.forEach(element => { transferDetails.forEach((element) => {
//console.log(element) //console.log(element)
data.data.list.forEach((obj: any) => { data.data.list.forEach((obj: any) => {
//console.log(obj) //console.log(obj)
@ -1196,7 +1209,7 @@ async function doGainFormPageListCont(sendData:any){
// /使JSON // /使JSON
const formattedValue = const formattedValue =
(Array.isArray(value) || (typeof value === 'object' && value !== null)) Array.isArray(value) || (typeof value === "object" && value !== null)
? JSON.stringify(value, null, 2) ? JSON.stringify(value, null, 2)
: value; : value;
@ -1205,7 +1218,7 @@ async function doGainFormPageListCont(sendData:any){
//console.log(key) //console.log(key)
/* console.log(element.control.fixedOptions) /* console.log(element.control.fixedOptions)
console.log(obj[key]) */ console.log(obj[key]) */
obj[key] = mapIdsToLabels(element.control.fixedOptions,obj[key]) obj[key] = mapIdsToLabels(element.control.fixedOptions, obj[key]);
} }
} }
} }
@ -1233,14 +1246,14 @@ function mapIdsToLabels(treeNodes: TreeNode[], ids1: string): string[] {
// //
function traverse(node: TreeNode) { function traverse(node: TreeNode) {
idToLabelMap[node.id] = node.label; // idToLabelMap[node.id] = node.label; //
node.children.forEach(child => traverse(child)); // node.children.forEach((child) => traverse(child)); //
} }
// //
treeNodes.forEach(root => traverse(root)); treeNodes.forEach((root) => traverse(root));
//console.log(ids) //console.log(ids)
// idlabel // idlabel
return ids.map(id => idToLabelMap[id] || "已删除的节点(id):"+id); return ids.map((id) => idToLabelMap[id] || "已删除的节点(id):" + id);
} }
const asfGetPageData = (asfFormId: any, asfToSelectMastersKey: any) => { const asfGetPageData = (asfFormId: any, asfToSelectMastersKey: any) => {
@ -1755,7 +1768,7 @@ const transformOption = (val: string | number, type?: string) => {
}; };
const readerColumnSun = (column: any) => { const readerColumnSun = (column: any) => {
console.log("表头label长度-11->", column); // console.log("label-11->", column);
let labelLong = 0; // label let labelLong = 0; // label
if (column.children) { if (column.children) {
labelLong = column.children.length; labelLong = column.children.length;
@ -1764,12 +1777,12 @@ const readerColumnSun = (column: any) => {
let countLenght = 3; let countLenght = 3;
column.children.forEach((item: any) => { column.children.forEach((item: any) => {
if (item.label.length < 3) { if (item.label.length < 3) {
countLenght = countLenght + 90; countLenght = countLenght + 15;
} else { } else {
countLenght = countLenght + item.label.length * 40; countLenght = countLenght + item.label.length * 15;
} }
}); });
console.log("表头label长度-->", countLenght); // console.log("label-->", countLenght);
return countLenght; return countLenght;
} else { } else {
return 100; return 100;
@ -2044,7 +2057,6 @@ const readerColumnSun = (column: any) => {
> >
<template #default="scope"> <template #default="scope">
<el-button-group> <el-button-group>
<el-tooltip <el-tooltip
v-if="scope.row.flowIsOpens == 1 && scope.row.taskStatus == 1" v-if="scope.row.flowIsOpens == 1 && scope.row.taskStatus == 1"
class="box-item" class="box-item"
@ -2263,7 +2275,6 @@ const readerColumnSun = (column: any) => {
{{ scope.row[scope.column.property] }}== {{ scope.row[scope.column.property] }}==
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
</el-table> </el-table>
@ -2516,7 +2527,7 @@ const readerColumnSun = (column: any) => {
width: 100%; width: 100%;
} }
.table-list-comm { .table-list-comm {
padding: 0px 15px 5px 15px; padding: 0px 5px 5px 5px;
} }
.seacherForm { .seacherForm {
min-height: auto; min-height: auto;

6
src/components/DesignForm/public/expand/lowcodeImage.vue

@ -120,7 +120,11 @@ const getFormItemInputStyle = (ele: any, sty: number) => {
<style lang="scss" scoped> <style lang="scss" scoped>
.upload-demo { .upload-demo {
img { img {
width: 100%; min-width: 150px;
max-width: 300px;
} }
} }
.avatar {
width: 150px;
}
</style> </style>

82
src/components/DesignForm/public/expand/uploadPageList.vue

@ -3,27 +3,30 @@
@ 时间: 2024-09-17 14:57:49 @ 时间: 2024-09-17 14:57:49
@ 备注: 解析上传文件问题 @ 备注: 解析上传文件问题
--> -->
<script lang='ts' setup> <script lang="ts" setup>
import { AnalysisCss,AnalysisInputCss } from '@/components/DesignForm/public/form/calculate/cssInfo' import {
AnalysisCss,
AnalysisInputCss,
} from "@/components/DesignForm/public/form/calculate/cssInfo";
const props = defineProps({ const props = defineProps({
imgList: { imgList: {
type: String, type: String,
default:"" default: "",
}, },
data: { data: {
type: Object, type: Object,
default() { default() {
return {} return {};
} },
}, },
control: { control: {
type: Object, type: Object,
default() { default() {
return {} return {};
} },
} },
}) });
const imgStr = ref<String>(props.imgList) const imgStr = ref<String>(props.imgList);
//css //css
/** /**
@ -45,60 +48,75 @@ const imgStr = ref<String>(props.imgList)
// } // }
const imgAry = computed({ const imgAry = computed({
get: () => { get: () => {
if(props.imgList != "" && props.imgList != null && props.imgList != undefined && props.imgList != "undefined"){ if (
props.imgList != "" &&
props.imgList != null &&
props.imgList != undefined &&
props.imgList != "undefined"
) {
// let zj = props.imgList // let zj = props.imgList
// let img = zj.Split(","); // let img = zj.Split(",");
let arr = props.imgList.match(/[^,]+/g); let arr = props.imgList.match(/[^,]+/g);
console.log("文件列表",arr) console.log("文件列表", arr);
return arr return arr;
} else { } else {
return [] return [];
}
} }
}) },
});
const listType = () => { const listType = () => {
if (props.control.listType) { if (props.control.listType) {
return props.control.listType return props.control.listType;
} else { } else {
return "text" return "text";
}
} }
};
// //
const getFormItemInputStyle = (ele: any, sty: number) => { const getFormItemInputStyle = (ele: any, sty: number) => {
if (ele?.inputStyle) { if (ele?.inputStyle) {
console.log("返回栅格宽度4",AnalysisInputCss(ele?.inputStyle,sty)) console.log("返回栅格宽度4", AnalysisInputCss(ele?.inputStyle, sty));
return AnalysisInputCss(ele?.inputStyle,sty) return AnalysisInputCss(ele?.inputStyle, sty);
}
} }
};
const configStyle = computed(() => { const configStyle = computed(() => {
return props.data.styles || {} return props.data.styles || {};
}) });
</script> </script>
<template> <template>
<div> <div>
{{ props.control.listType }}
<div v-if="props.control.listType == 'picture-card'"> <div v-if="props.control.listType == 'picture-card'">
<div v-for="item in imgAry"> <div v-for="item in imgAry">
<el-image class="imgCss" :style="getFormItemInputStyle(configStyle,2)" :src="item" :fit="fit" :preview-src-list="imgAry" /> <el-image
class="imgCss"
:style="getFormItemInputStyle(configStyle, 2)"
:src="item"
:fit="fit"
:preview-src-list="imgAry"
/>
</div> </div>
</div> </div>
<div v-else-if="props.control.listType == 'picture'"> <div v-else-if="props.control.listType == 'picture'">
<div v-for="item in imgAry"> <div v-for="item in imgAry">
<el-image class="imgCss" :style="getFormItemInputStyle(configStyle,2)" :src="item" :fit="fit" :preview-src-list="imgAry" /> <el-image
class="imgCss"
:style="getFormItemInputStyle(configStyle, 2)"
:src="item"
:fit="fit"
:preview-src-list="imgAry"
/>
</div> </div>
</div> </div>
<div v-else> <div v-else>
<div v-for="item in imgAry"> <div v-for="item in imgAry">
<el-link :underline="false" :href="item" target="_blank">{{ item }}</el-link><br> <el-link :underline="false" :href="item" target="_blank">{{ item }}</el-link
><br />
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<style lang='scss' scoped> <style lang="scss" scoped>
.imgCss { .imgCss {
width: 100px; width: 100px;
height: 100px; height: 100px;

15
src/components/DesignForm/public/form/formItem.vue

@ -1194,6 +1194,21 @@ const diGuiJilian = (val: any, options: any[]) => {
:type="type" :type="type"
v-model="value" v-model="value"
/> />
<component
v-else-if="['lowcodeImage'].includes(data.type)"
:is="currentComponent"
v-bind="control"
:disabled="judgeIsDisabled(data.name)"
:placeholder="
data.control.placeholder
? data.control.placeholder
: '请选择' + getLabel(data.item)
"
:data="data"
:tablekey="props.tablekey"
:form-table-set-up="props.alldata"
v-model="value"
/>
<div class="form-value" v-else v-html="value"></div> <div class="form-value" v-else v-html="value"></div>
</template> </template>
<template v-else> <template v-else>

28
src/components/DesignForm/tableListPage/formPageCont.vue

@ -159,8 +159,6 @@ watch(
}); });
}) })
.finally(() => { .finally(() => {
//console.log(objMastesform.list) //console.log(objMastesform.list)
transferDetails = objMastesform.list.filter((item: any) => { transferDetails = objMastesform.list.filter((item: any) => {
return item.type == "lowcodeTransfer"; return item.type == "lowcodeTransfer";
@ -184,24 +182,24 @@ watch(
const value = item[key]; const value = item[key];
// //
if (Object.prototype.hasOwnProperty.call(item, key)) { if (Object.prototype.hasOwnProperty.call(item, key)) {
if (key == "value") { if (key == "value") {
// /使JSON // /使JSON
const formattedValue = const formattedValue =
(Array.isArray(value) || (typeof value === 'object' && value !== null)) Array.isArray(value) ||
(typeof value === "object" && value !== null)
? JSON.stringify(value, null, 2) ? JSON.stringify(value, null, 2)
: value; : value;
//console.log(`${key}: ${formattedValue}`); //console.log(`${key}: ${formattedValue}`);
if (item[key] && item[key].length > 0) { if (item[key] && item[key].length > 0) {
item[key] = mapIdsToLabels(element.control.fixedOptions,item[key]) item[key] = mapIdsToLabels(
element.control.fixedOptions,
item[key]
);
} }
} }
} }
} }
} }
}); });
}); });
@ -216,8 +214,6 @@ watch(
} }
); );
interface TreeNode { interface TreeNode {
id: string; id: string;
label: string; label: string;
@ -235,18 +231,16 @@ function mapIdsToLabels(treeNodes: TreeNode[], ids1: string): string[] {
// //
function traverse(node: TreeNode) { function traverse(node: TreeNode) {
idToLabelMap[node.id] = node.label; // idToLabelMap[node.id] = node.label; //
node.children.forEach(child => traverse(child)); // node.children.forEach((child) => traverse(child)); //
} }
// //
treeNodes.forEach(root => traverse(root)); treeNodes.forEach((root) => traverse(root));
//console.log(ids) //console.log(ids)
// idlabel // idlabel
return ids.map(id => idToLabelMap[id]); return ids.map((id) => idToLabelMap[id]);
} }
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-04-03 14:25:15 @ 时间: 2024-04-03 14:25:15
@ -272,8 +266,6 @@ const pageLog = ref<any[]>([]);
let gainTaskFormInfoData: customerFormVersionCont; let gainTaskFormInfoData: customerFormVersionCont;
let gainTaskFormInfoPromise: any[] = []; let gainTaskFormInfoPromise: any[] = [];
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-04-03 14:33:15 @ 时间: 2024-04-03 14:33:15
@ -418,7 +410,7 @@ const jsuanKuandu = () => {
if (props.pageInfo.flowIsOpen == 1) { if (props.pageInfo.flowIsOpen == 1) {
return 900 + 350; return 900 + 350;
} else { } else {
return 900; return 900 + 350;
} }
}; };

34
src/components/DesignForm/tableListPage/index.vue

@ -548,9 +548,9 @@ const setUpClick = (val: string, id: string) => {
drawerWith.value = container.value?.clientWidth; drawerWith.value = container.value?.clientWidth;
openTaskDrawer.value = true; openTaskDrawer.value = true;
} else if (val.key === "export") { } else if (val.key === "export") {
alert("请在非编辑模式操作") alert("请在非编辑模式操作");
} else if (val.key === "import") { } else if (val.key === "import") {
alert("请在非编辑模式操作") alert("请在非编辑模式操作");
} else if (val.key == "showQrCode") { } else if (val.key == "showQrCode") {
//liwenxuan 20250114 start //liwenxuan 20250114 start
//, //,
@ -978,7 +978,7 @@ const getPageData = () => {
//console.log(asfDetails) //console.log(asfDetails)
if (asfDetails.length > 0 && data.data.list != null) { if (asfDetails.length > 0 && data.data.list != null) {
console.log(data.data.list) console.log(data.data.list);
//,asf //,asf
asfQueryParams = []; asfQueryParams = [];
for (let j = 0; j < asfDetails.length; j++) { for (let j = 0; j < asfDetails.length; j++) {
@ -1028,7 +1028,7 @@ const getPageData = () => {
} }
} else { } else {
//console.log(data.data.list) //console.log(data.data.list)
transferDetails.forEach(element => { transferDetails.forEach((element) => {
//console.log(element) //console.log(element)
data.data.list.forEach((obj: any) => { data.data.list.forEach((obj: any) => {
//console.log(obj) //console.log(obj)
@ -1039,7 +1039,8 @@ const getPageData = () => {
// /使JSON // /使JSON
const formattedValue = const formattedValue =
(Array.isArray(value) || (typeof value === 'object' && value !== null)) Array.isArray(value) ||
(typeof value === "object" && value !== null)
? JSON.stringify(value, null, 2) ? JSON.stringify(value, null, 2)
: value; : value;
@ -1048,12 +1049,11 @@ const getPageData = () => {
//console.log(key) //console.log(key)
/* console.log(element.control.fixedOptions) /* console.log(element.control.fixedOptions)
console.log(obj[key]) */ console.log(obj[key]) */
obj[key] = mapIdsToLabels(element.control.fixedOptions,obj[key]) obj[key] = mapIdsToLabels(element.control.fixedOptions, obj[key]);
} }
} }
} }
}); });
}); });
//console.log(transferDetails) //console.log(transferDetails)
//convertIdsToLabels(data.data.list.) //convertIdsToLabels(data.data.list.)
@ -1091,14 +1091,14 @@ function mapIdsToLabels(treeNodes: TreeNode[], ids1: string): string[] {
// //
function traverse(node: TreeNode) { function traverse(node: TreeNode) {
idToLabelMap[node.id] = node.label; // idToLabelMap[node.id] = node.label; //
node.children.forEach(child => traverse(child)); // node.children.forEach((child) => traverse(child)); //
} }
// //
treeNodes.forEach(root => traverse(root)); treeNodes.forEach((root) => traverse(root));
//console.log(ids) //console.log(ids)
// idlabel // idlabel
return ids.map(id => idToLabelMap[id] || "已删除的节点( id : "+id+") "); return ids.map((id) => idToLabelMap[id] || "已删除的节点( id : " + id + ") ");
} }
const asfGetPageData = (asfFormId: any, asfToSelectMastersKey: any) => { const asfGetPageData = (asfFormId: any, asfToSelectMastersKey: any) => {
@ -1624,7 +1624,7 @@ const readerColumn = (column: any, isSun: int) => {
if (column.label.length < 3) { if (column.label.length < 3) {
labelLong = 3; labelLong = 3;
} }
let size = 30; // let size = 15; //
return labelLong * size; return labelLong * size;
} else { } else {
return "100%"; return "100%";
@ -1639,12 +1639,12 @@ const readerColumnSun = (column: any) => {
let countLenght = 3; let countLenght = 3;
column.children.forEach((item: any) => { column.children.forEach((item: any) => {
if (item.label.length < 3) { if (item.label.length < 3) {
countLenght = countLenght + 90; countLenght = countLenght + 15;
} else { } else {
countLenght = countLenght + item.label.length * 40; countLenght = countLenght + item.label.length * 15;
} }
}); });
console.log("表头label长度-->", countLenght); // console.log("label-->", countLenght);
return countLenght; return countLenght;
} else { } else {
return 100; return 100;
@ -2047,8 +2047,7 @@ const readerColumnSun = (column: any) => {
:label="item.label" :label="item.label"
:width="readerColumnSun(item)" :width="readerColumnSun(item)"
> >
<template #default="scope" <template #default="scope">
>{{ data.tableProps }}
<el-table <el-table
v-if="item.pattern == 'table'" v-if="item.pattern == 'table'"
v-bind="data.tableProps" v-bind="data.tableProps"
@ -2159,6 +2158,9 @@ const readerColumnSun = (column: any) => {
{{ scope.row[scope.column.property] }} {{ scope.row[scope.column.property] }}
</el-link> </el-link>
</template> </template>
<template v-else #default="scope">
{{ scope.row[scope.column.property] }}
</template>
</el-table-column> </el-table-column>
</template> </template>
</el-table> </el-table>

1
src/permission.ts

@ -43,6 +43,7 @@ router.beforeEach(async (to:any, from:any, next:any) => {
try { try {
// const { roles } = await userStore.getInfo(); // const { roles } = await userStore.getInfo();
const { perms } = await userStore.getInfo(); const { perms } = await userStore.getInfo();
console.log("路由权限---》",perms);
const accessRoutes = await permissionStore.generateRoutes(perms); const accessRoutes = await permissionStore.generateRoutes(perms);
console.log("路由权限--perms--》",accessRoutes); console.log("路由权限--perms--》",accessRoutes);
accessRoutes.forEach((route:any) => { accessRoutes.forEach((route:any) => {

3
src/store/modules/permission.ts

@ -61,9 +61,10 @@ const filterAsyncRoutes = (routes: RouteRecordRaw[], roles: string[]) => {
tmpRoute.component = Layout; tmpRoute.component = Layout;
// console.log(); // console.log();
} else { } else {
console.log("判断用户-251->",tmpRoute.component);
const component = modules[`../../views/${tmpRoute.component}.vue`]; const component = modules[`../../views/${tmpRoute.component}.vue`];
// const component = modules[`${tmpRoute.component}.vue`]; // const component = modules[`${tmpRoute.component}.vue`];
// console.log("判断用户-->",component); console.log("判断用户-1111111111111111->",component);
if (component) { if (component) {
tmpRoute.component = component; tmpRoute.component = component;
} else { } else {

47
src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue

@ -30,6 +30,17 @@ const props = withDefaults(
} }
); );
var myChart = ref<any>(); var myChart = ref<any>();
const seriesAnlay = (listVal: any[]) => {
if (listVal && Array.isArray(listVal)) {
listVal.forEach((item: any) => {
item.label = {
show: true,
position: "top",
};
});
}
return listVal;
};
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2025-06-26 11:34:21 @ 时间: 2025-06-26 11:34:21
@ -45,16 +56,44 @@ const drawPictures = () => {
}).then((data) => { }).then((data) => {
console.log("火1111111兔", data); console.log("火1111111兔", data);
if (data.code == 0 && data.data != null) { if (data.code == 0 && data.data != null) {
let optVal = data.data; // let optVal = data.data;
// optVal.grid = { // let optVal = {
// tooltip: {
// trigger: "axis",
// axisPointer: {
// type: "shadow",
// },
// },
// grid: {
// left: "2%", // left: "2%",
// right: "2%", // right: "2%",
// bottom: "15%", // bottom: "15%",
// top: "15%", // top: "15%",
// containLabel: true, // containLabel: true,
// },
// ...data.data,
// }; // };
myChart.value.setOption(optVal); let optChart = {
myChart.value.resize(); grid: {
left: "2%",
right: "2%",
bottom: "15%",
top: "15%",
containLabel: true,
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
legend: data.data.legend,
yAxis: data.data.yAxis,
xAxis: data.data.xAxis,
series: seriesAnlay(data.data.series),
};
myChart.value.setOption(optChart);
// myChart.value.resize();
} else { } else {
myChart.value.setOption({ myChart.value.setOption({
grid: { grid: {

13
src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/barRace.vue

@ -46,13 +46,13 @@ const drawBarracetures = () => {
if (data.code == 0 && data.data != null) { if (data.code == 0 && data.data != null) {
let radMap = data.data; let radMap = data.data;
let seriesList = new Array(); let seriesList = new Array();
if (radMap.seriesData && Array.isArray(radMap.seriesData)) { if (radMap.series && Array.isArray(radMap.series)) {
radMap.seriesData.forEach((item: any) => { radMap.series.forEach((item: any) => {
seriesList.push({ seriesList.push({
realtimeSort: true, realtimeSort: true,
name: item.name, name: item.name,
type: "bar", type: "bar",
data: item.value, data: item.data,
label: { label: {
show: true, show: true,
position: "right", position: "right",
@ -61,6 +61,7 @@ const drawBarracetures = () => {
}); });
}); });
} }
console.log("排行榜--->", seriesList);
let optionData = { let optionData = {
grid: { grid: {
left: "2%", left: "2%",
@ -80,14 +81,14 @@ const drawBarracetures = () => {
}, },
yAxis: { yAxis: {
type: "category", type: "category",
data: radMap.yAxisData, data: radMap.xAxis.data,
inverse: true, inverse: true,
max: radMap.max, // only the largest 3 bars will be displayed max: radMap.max, // only the largest 3 bars will be displayed
}, },
series: seriesList, series: seriesList,
}; };
myChart.value.setOption(optionData); myChart.value.setOption(optionData);
myChart.value.resize(); // myChart.value.resize();
} else { } else {
myChart.value.setOption({ myChart.value.setOption({
grid: { grid: {
@ -120,7 +121,7 @@ const drawBarracetures = () => {
}, },
], ],
}); });
myChart.value.resize(); // myChart.value.resize();
} }
}); });

80
src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/line.vue

@ -28,7 +28,31 @@ const props = withDefaults(
} }
); );
var myChartPie = ref<any>(); var myChartPie = ref<any>();
const pinhuaOrzejiao = ref(false);
/**
@ 作者: 秦东
@ 时间: 2025-08-04 14:31:20
@ 功能: 解析数据结果
*/
const seriesAnlay = (listVal: any[]) => {
if (listVal && Array.isArray(listVal)) {
listVal.forEach((item: any) => {
item.smooth = pinhuaOrzejiao.value;
item.label = {
show: true,
position: "top",
};
});
}
return listVal;
};
watch(
() => pinhuaOrzejiao.value,
() => {
drawLine();
}
);
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2025-06-26 11:34:21 @ 时间: 2025-06-26 11:34:21
@ -46,18 +70,50 @@ const drawLine = () => {
}).then((data) => { }).then((data) => {
console.log("火兔", data); console.log("火兔", data);
if (data.code == 0 && data.data != null) { if (data.code == 0 && data.data != null) {
let optVal = data.data; let optChart = {
optVal.grid = { grid: {
left: "2%", left: "2%",
right: "2%", right: "2%",
bottom: "15%", bottom: "15%",
top: "15%", top: "15%",
containLabel: true, containLabel: true,
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
legend: data.data.legend,
yAxis: data.data.yAxis,
xAxis: data.data.xAxis,
series: seriesAnlay(data.data.series),
}; };
myChartPie.value.setOption(optVal);
myChartPie.value.resize(); // let optVal = data.data;
// optVal.grid = {
// left: "2%",
// right: "2%",
// bottom: "15%",
// top: "15%",
// containLabel: true,
// };
// (optVal.tooltip = {
// trigger: "axis",
// axisPointer: {
// type: "shadow",
// },
// }),
myChartPie.value.setOption(optChart);
// myChartPie.value.resize();
} else { } else {
myChartPie.value.setOption({ myChartPie.value.setOption({
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
grid: { grid: {
left: "2%", left: "2%",
right: "2%", right: "2%",
@ -80,17 +136,17 @@ const drawLine = () => {
name: "销量", name: "销量",
data: [820, 932, 901, 934, 1290, 1330, 1320], data: [820, 932, 901, 934, 1290, 1330, 1320],
type: "line", type: "line",
smooth: true, smooth: pinhuaOrzejiao.value,
}, },
{ {
name: "销量科技", name: "销量科技",
data: [822, 942, 951, 4, 1290, 1330, 1320], data: [822, 942, 951, 4, 1290, 1330, 1320],
type: "line", type: "line",
smooth: true, smooth: pinhuaOrzejiao.value,
}, },
], ],
}); });
myChartPie.value.resize(); // myChartPie.value.resize();
} }
}); });
@ -126,9 +182,12 @@ onMounted(() => {
</script> </script>
<template> <template>
<div> <div>
<el-space wrap class="spaceBox"> <el-space wrap class="spaceBox leftOrRight">
<div>
<svg-icon icon-class="zydq" :size="20" /> <svg-icon icon-class="zydq" :size="20" />
<el-text>{{ props.data.title }}</el-text> <el-text>{{ props.data.title }}</el-text>
</div>
<el-switch v-model="pinhuaOrzejiao" active-text="平滑" inactive-text="折角" />
</el-space> </el-space>
<el-form <el-form
v-if="props.data.search" v-if="props.data.search"
@ -248,4 +307,9 @@ onMounted(() => {
.demo-form-inline .el-select { .demo-form-inline .el-select {
--el-select-width: 200px; --el-select-width: 200px;
} }
.leftOrRight {
display: flex;
justify-content: space-between;
align-items: center;
}
</style> </style>

1
src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/pie.vue

@ -145,6 +145,7 @@ const searBut = (val: string) => {
} }
return false; return false;
}; };
watch( watch(
() => props.data, () => props.data,
(val: any) => { (val: any) => {

26
src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/radar.vue

@ -65,8 +65,9 @@ const drawRadar = () => {
}, },
], ],
}; };
console.log("雷达数据结构---》", optionData);
myChartPie.value.setOption(optionData); myChartPie.value.setOption(optionData);
myChartPie.value.resize(); // myChartPie.value.resize();
} else { } else {
myChartPie.value.setOption({ myChartPie.value.setOption({
grid: { grid: {
@ -167,7 +168,7 @@ onMounted(() => {
<el-date-picker <el-date-picker
v-else-if="item.type == 3 && item.timeType == 'year'" v-else-if="item.type == 3 && item.timeType == 'year'"
v-model="item.value" v-model="item.value"
type="yearrange" type="yeayearrange"
range-separator="To" range-separator="To"
start-placeholder="起始时间" start-placeholder="起始时间"
end-placeholder="结束时间" end-placeholder="结束时间"
@ -266,4 +267,25 @@ onMounted(() => {
.demo-form-inline .el-select { .demo-form-inline .el-select {
--el-select-width: 200px; --el-select-width: 200px;
} }
.demo-date-picker {
display: flex;
width: 100%;
padding: 0;
flex-wrap: wrap;
}
.demo-date-picker .block {
padding: 30px 0;
text-align: center;
border-right: solid 1px var(--el-border-color);
flex: 1;
}
.demo-date-picker .block:last-child {
border-right: none;
}
.demo-date-picker .demonstration {
display: block;
color: var(--el-text-color-secondary);
font-size: 14px;
margin-bottom: 20px;
}
</style> </style>

5
src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/container.vue

@ -106,6 +106,7 @@ const getGroupName = (item: any) => {
} }
}; };
const groupClick = (item: any, ele?: string) => { const groupClick = (item: any, ele?: string) => {
// if (props.types == 5) {
store.setActiveKey(getGroupName(item)); store.setActiveKey(getGroupName(item));
store.setControlAttr(item); store.setControlAttr(item);
// grid // grid
@ -113,7 +114,9 @@ const groupClick = (item: any, ele?: string) => {
// state.clone = !notNested(item.type) // state.clone = !notNested(item.type)
// state.clone = !notNestedTableFlex(item.type); // state.clone = !notNestedTableFlex(item.type);
pickEcharts.value = item; pickEcharts.value = item;
console.log("点击激活当前--->", item, ele); // }
console.log("点击激活当前--->", props.types, item, ele);
}; };
// //
const click = (action: string, index: number, item?: any) => { const click = (action: string, index: number, item?: any) => {

2
src/views/sysworkflow/lowcodepage/appPage/appPageForm/pageList.vue

@ -608,7 +608,7 @@ const readerColumn = (column: any, isSun: int) => {
if (column.label.length < 3) { if (column.label.length < 3) {
labelLong = 3; labelLong = 3;
} }
let size = 30; // let size = 15; //
return labelLong * size; return labelLong * size;
} else { } else {
return "100%"; return "100%";

2
src/views/sysworkflow/lowcodepage/pageList.vue

@ -612,7 +612,7 @@ const readerColumn = (column: any) => {
if (column.label.length < 3) { if (column.label.length < 3) {
labelLong = 3; labelLong = 3;
} }
let size = 30; // let size = 15; //
// column.minWidth = labelLong * size // column.minWidth = labelLong * size
//@ts-ignore //@ts-ignore
return labelLong * size; return labelLong * size;

4
src/views/sysworkflow/lowcodepage/runApp/runAppForm.vue

@ -459,10 +459,10 @@ function optionsValue3Get3(data: any, fieldName: string) {
justify-content: space-between; justify-content: space-between;
background-color: #ffffff; background-color: #ffffff;
padding: 15px 15px 5px 15px; padding: 15px 15px 5px 15px;
margin-bottom: 15px; margin-bottom: 10px;
} }
.scroBox { .scroBox {
padding: 0 15px; padding: 0 10px;
height: calc(100vh - 110px); height: calc(100vh - 110px);
.tispMsg { .tispMsg {
margin: 0 auto 15px auto; margin: 0 auto 15px auto;

Loading…
Cancel
Save