Browse Source

Merge branch 'qin_24'

han_v3
herenshan112 4 months ago
parent
commit
809647fa6b
  1. 347
      src/components/DesignForm/app/index.vue
  2. 6
      src/components/DesignForm/public/expand/lowcodeImage.vue
  3. 162
      src/components/DesignForm/public/expand/uploadPageList.vue
  4. 17
      src/components/DesignForm/public/form/formItem.vue
  5. 108
      src/components/DesignForm/tableListPage/formPageCont.vue
  6. 98
      src/components/DesignForm/tableListPage/index.vue
  7. 1
      src/permission.ts
  8. 3
      src/store/modules/permission.ts
  9. 57
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue
  10. 13
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/barRace.vue
  11. 94
      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

347
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,
@ -551,10 +551,10 @@ const setUpClick = (val: string, id: string) => {
if (val.key == "newAdd") { if (val.key == "newAdd") {
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
//, //,
@ -869,19 +869,19 @@ const columnsFilter = computed(() => {
console.log("获取表格头内容", props.data.columns); console.log("获取表格头内容", props.data.columns);
}); });
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,42 +981,46 @@ 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 })
state.loading = false; .finally(() => {
asfs = []; // finally
radios = []; state.loading = false;
checkboxs = []; asfs = [];
switchs = []; radios = [];
selects = []; checkboxs = [];
tables = []; switchs = [];
dofs = []; selects = [];
getAsfs(); tables = [];
}) dofs = [];
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,79 +1028,87 @@ function doExportTableData(){
searchData: json2string(props.searchData), searchData: json2string(props.searchData),
}; };
// //
doGainFormPageListCont(sendData).then(datas=>{ doGainFormPageListCont(sendData)
const array: string[] = []; .then((datas) => {
// const array: string[] = [];
const title:string[] = []; //
for (let val of fields){ const title: string[] = [];
title.push(val.label) for (let val of fields) {
} title.push(val.label);
for (let val of subs){
title.push(val.label)
}
array.push(title.join(","))
//
datas.list.forEach((item)=>{
const line=[];
let maxline=0;
//
for (let val of fields){
if(typeof(val)==="string") line.push((item[val.field] as string).replaceAll(",",","))
else line.push(item[val.field])
} }
for (let val of subs) {
// title.push(val.label);
if (subs.length>0){ }
// array.push(title.join(","));
for (let tab of subTableFieldsFilter.value.tables){
if(item[tab] && item[tab].length>maxline) maxline=item[tab].length //
} datas.list.forEach((item) => {
// const line = [];
if(maxline===0){ let maxline = 0;
array.push(line.join(",")+","+Array(subs.length).fill("")) //
return for (let val of fields) {
if (typeof val === "string")
line.push((item[val.field] as string).replaceAll(",", ","));
else line.push(item[val.field]);
} }
//spaceprefix //
const spacePrefix=Array(line.length).fill("") if (subs.length > 0) {
//
for(let i=0;i<maxline;i++){ for (let tab of subTableFieldsFilter.value.tables) {
const row:any[]=[] if (item[tab] && item[tab].length > maxline) maxline = item[tab].length;
subTableFieldsFilter.value.tables.forEach(name => { }
if(item[name] && item[name].length-1>=i){ //
// if (maxline === 0) {
subs.filter(v=>v.table===name).forEach(f=>{ array.push(line.join(",") + "," + Array(subs.length).fill(""));
row.push(item[name][i][f.field]) return;
}) }
}else{
//N //spaceprefix
row.push(...(Array(subs.filter(v=>v.table===name).length).fill(""))) const spacePrefix = Array(line.length).fill("");
}
}) for (let i = 0; i < maxline; i++) {
const row: any[] = [];
//csv subTableFieldsFilter.value.tables.forEach((name) => {
if(i===0){ if (item[name] && item[name].length - 1 >= i) {
array.push(line.join(",")+","+row.join(",")) //
}else{ subs
array.push(spacePrefix+","+row.join(",")) .filter((v) => v.table === name)
.forEach((f) => {
row.push(item[name][i][f.field]);
});
} else {
//N
row.push(
...Array(subs.filter((v) => v.table === name).length).fill("")
);
}
});
//csv
if (i === 0) {
array.push(line.join(",") + "," + row.join(","));
} else {
array.push(spacePrefix + "," + row.join(","));
}
} }
return;
} }
//
array.push(line.join(","));
});
return //
} if (array.length - 1 !== datas.total)
// alert(`导出记录数:${datas.total}, 共计:${array.length - 1}`);
array.push(line.join(","))
})
// const filename = props.pickAppMenu.label + ".csv";
if((array.length-1)!==datas.total) alert(`导出记录数:${datas.total}, 共计:${array.length-1}`) const csvString = array.join("\n");
const blob = new Blob([csvString], { type: "text/csv;charset=utf-8;" });
const filename= props.pickAppMenu.label+".csv" const link = document.createElement("a");
const csvString = array.join('\n'); if (link.download !== undefined) {
const blob = new Blob([csvString], { type: "text/csv;charset=utf-8;" }); // feature detection
const link = document.createElement("a");
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);
@ -1105,21 +1117,22 @@ function doExportTableData(){
document.body.appendChild(link); document.body.appendChild(link);
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, {
fields:columnsFilter.value.filter((item)=>item.pattern!=="table"), fields: columnsFilter.value.filter((item) => item.pattern !== "table"),
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) => {
@ -1179,68 +1192,68 @@ async function doGainFormPageListCont(sendData:any){
} }
return dataList.data; return dataList.data;
}); });
} }
return data.data; return data.data;
} }
//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)
for (const key in obj) { for (const key in obj) {
// //
if (Object.prototype.hasOwnProperty.call(obj, key)) { if (Object.prototype.hasOwnProperty.call(obj, key)) {
const value = obj[key]; const value = obj[key];
// /使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(key==element.field){ if (key == element.field) {
//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]);
} }
} }
} }
}); });
}); });
return data.data; return data.data;
//tableDataList.value = data.data.list //tableDataList.value = data.data.list
//liwenxuan end //liwenxuan end
} }
interface TreeNode { interface TreeNode {
id: string; id: string;
label: string; label: string;
disabled: boolean; disabled: boolean;
children: TreeNode[]; children: TreeNode[];
} }
function mapIdsToLabels(treeNodes: TreeNode[], ids1: string): string[] { function mapIdsToLabels(treeNodes: TreeNode[], ids1: string): string[] {
const ids: string[] = JSON.parse(ids1); const ids: string[] = JSON.parse(ids1);
// idlabel // idlabel
const idToLabelMap: Record<string, string> = {}; const idToLabelMap: Record<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"
@ -2204,7 +2216,7 @@ const readerColumnSun = (column: any) => {
</el-table> </el-table>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-else v-else
:prop="item.field" :prop="item.field"
@ -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>

162
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
/** /**
@ -43,64 +46,79 @@ const imgStr = ref<String>(props.imgList)
// return [] // return []
// } // }
// } // }
const imgAry =computed({ const imgAry = computed({
get: () => { get: () => {
if(props.imgList != "" && props.imgList != null && props.imgList != undefined && props.imgList != "undefined"){ if (
// let zj = props.imgList props.imgList != "" &&
// let img = zj.Split(","); props.imgList != null &&
let arr = props.imgList.match(/[^,]+/g); props.imgList != undefined &&
console.log("文件列表",arr) props.imgList != "undefined"
return arr ) {
}else{ // let zj = props.imgList
return [] // let img = zj.Split(",");
} let arr = props.imgList.match(/[^,]+/g);
} console.log("文件列表", arr);
}) return arr;
} else {
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>
<div v-if="props.control.listType=='picture-card'"> {{ props.control.listType }}
<div v-for="item in imgAry"> <div v-if="props.control.listType == 'picture-card'">
<el-image class="imgCss" :style="getFormItemInputStyle(configStyle,2)" :src="item" :fit="fit" :preview-src-list="imgAry" /> <div v-for="item in imgAry">
</div> <el-image
</div> class="imgCss"
<div v-else-if="props.control.listType=='picture'"> :style="getFormItemInputStyle(configStyle, 2)"
<div v-for="item in imgAry"> :src="item"
<el-image class="imgCss" :style="getFormItemInputStyle(configStyle,2)" :src="item" :fit="fit" :preview-src-list="imgAry" /> :fit="fit"
</div> :preview-src-list="imgAry"
</div> />
<div v-else> </div>
<div v-for="item in imgAry"> </div>
<el-link :underline="false" :href="item" target="_blank">{{ item }}</el-link><br> <div v-else-if="props.control.listType == 'picture'">
</div> <div v-for="item in imgAry">
</div> <el-image
</div> class="imgCss"
:style="getFormItemInputStyle(configStyle, 2)"
:src="item"
:fit="fit"
:preview-src-list="imgAry"
/>
</div>
</div>
<div v-else>
<div v-for="item in imgAry">
<el-link :underline="false" :href="item" target="_blank">{{ item }}</el-link
><br />
</div>
</div>
</div>
</template> </template>
<style lang='scss' scoped> <style lang="scss" scoped>
.imgCss{ .imgCss {
width: 100px; width: 100px;
height: 100px; height: 100px;
} }
</style> </style>

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

@ -1066,7 +1066,7 @@ const diGuiJilian = (val: any, options: any[]) => {
/> />
<LowcodeTransfer <LowcodeTransfer
v-else-if="judgeIsShow(data.name) && data.type === 'lowcodeTransfer' " v-else-if="judgeIsShow(data.name) && data.type === 'lowcodeTransfer'"
:data="data" :data="data"
/> />
@ -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>

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

@ -80,7 +80,7 @@ const formProps = inject(constFormProps, {}) as any;
let getFieldRecordPromises: any[] = []; let getFieldRecordPromises: any[] = [];
let objMastesform: any; let objMastesform: any;
let transferDetails:any = []; let transferDetails: any = [];
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ -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";
@ -169,44 +167,44 @@ watch(
//alert(props.pageInfo.masters_key) //alert(props.pageInfo.masters_key)
gainEditDataLog({ id: props.pageInfo.masters_key }).then(({ data }) => { gainEditDataLog({ id: props.pageInfo.masters_key }).then(({ data }) => {
//console.log(formState.formData.list) //console.log(formState.formData.list)
//console.log("-1111-->",data) //console.log("-1111-->",data)
transferDetails.forEach((element: any) => { transferDetails.forEach((element: any) => {
//console.log(element) //console.log(element)
data.forEach((obj: any) => { data.forEach((obj: any) => {
//console.log(obj.masterdata) //console.log(obj.masterdata)
obj.masterdata.forEach((item: any) => { obj.masterdata.forEach((item: any) => {
if(item.field==element.name){ if (item.field == element.name) {
//console.log(element.control.fixedOptions) //console.log(element.control.fixedOptions)
//console.log(item) //console.log(item)
for (const key in item) { for (const key in item) {
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
const formattedValue =
// /使JSON Array.isArray(value) ||
const formattedValue = (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(
item[key] = mapIdsToLabels(element.control.fixedOptions,item[key]) element.control.fixedOptions,
} item[key]
);
} }
} }
} }
} }
}); }
}); });
});
}); });
pageLog.value = data; pageLog.value = data;
}); });
}); });
@ -216,37 +214,33 @@ watch(
} }
); );
interface TreeNode { interface TreeNode {
id: string; id: string;
label: string; label: string;
disabled: boolean; disabled: boolean;
children: TreeNode[]; children: TreeNode[];
} }
function mapIdsToLabels(treeNodes: TreeNode[], ids1: string): string[] { function mapIdsToLabels(treeNodes: TreeNode[], ids1: string): string[] {
/* console.log(treeNodes) /* console.log(treeNodes)
console.log(ids1) */ console.log(ids1) */
const ids: string[] = JSON.parse(ids1); const ids: string[] = JSON.parse(ids1);
// idlabel // idlabel
const idToLabelMap: Record<string, string> = {}; const idToLabelMap: Record<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;
} }
}; };

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

@ -547,10 +547,10 @@ const setUpClick = (val: string, id: string) => {
if (val.key == "newAdd") { if (val.key == "newAdd") {
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++) {
@ -1020,7 +1020,7 @@ const getPageData = () => {
} }
} }
} }
tableDataList.value = dataList.data.list; tableDataList.value = dataList.data.list;
}); });
} else { } else {
@ -1028,32 +1028,32 @@ 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)
for (const key in obj) { for (const key in obj) {
// //
if (Object.prototype.hasOwnProperty.call(obj, key)) { if (Object.prototype.hasOwnProperty.call(obj, key)) {
const value = obj[key]; const value = obj[key];
// /使JSON // /使JSON
const formattedValue = const formattedValue =
(Array.isArray(value) || (typeof value === 'object' && value !== null)) Array.isArray(value) ||
? JSON.stringify(value, null, 2) (typeof value === "object" && value !== null)
: value; ? JSON.stringify(value, null, 2)
: value;
//console.log(`${key}: ${formattedValue}`);
if(key==element.field){ //console.log(`${key}: ${formattedValue}`);
//console.log(key) if (key == element.field) {
/* console.log(element.control.fixedOptions) //console.log(key)
/* 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.)
@ -1077,28 +1077,28 @@ const getPageData = () => {
}; };
interface TreeNode { interface TreeNode {
id: string; id: string;
label: string; label: string;
disabled: boolean; disabled: boolean;
children: TreeNode[]; children: TreeNode[];
} }
function mapIdsToLabels(treeNodes: TreeNode[], ids1: string): string[] { function mapIdsToLabels(treeNodes: TreeNode[], ids1: string): string[] {
const ids: string[] = JSON.parse(ids1); const ids: string[] = JSON.parse(ids1);
// idlabel // idlabel
const idToLabelMap: Record<string, string> = {}; const idToLabelMap: Record<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 {

57
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 = {
// left: "2%", // tooltip: {
// right: "2%", // trigger: "axis",
// bottom: "15%", // axisPointer: {
// top: "15%", // type: "shadow",
// containLabel: true, // },
// },
// grid: {
// left: "2%",
// right: "2%",
// bottom: "15%",
// top: "15%",
// 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();
} }
}); });

94
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">
<svg-icon icon-class="zydq" :size="20" /> <div>
<el-text>{{ props.data.title }}</el-text> <svg-icon icon-class="zydq" :size="20" />
<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