diff --git a/package.json b/package.json index ac607b0..b781b64 100644 --- a/package.json +++ b/package.json @@ -124,6 +124,7 @@ "postcss-html": "^1.5.0", "postcss-scss": "^4.0.6", "prettier": "^2.8.8", + "rollup-plugin-terser": "^7.0.2", "sass": "^1.58.3", "stylelint": "^15.5.0", "stylelint-config-html": "^1.1.0", diff --git a/src/api/DesignForm/filterUnit.ts b/src/api/DesignForm/filterUnit.ts index 1105823..208369a 100644 --- a/src/api/DesignForm/filterUnit.ts +++ b/src/api/DesignForm/filterUnit.ts @@ -6,7 +6,7 @@ import { layoutUnit } from "@/api/DesignForm/fieldUnit"; @ 功能: 解析出表单可作为AI变量的元素 */ const analysisFromUnit = (unitInfo:formStruct) => { - console.log("解析出表单可作为AI变量的元素------------>",unitInfo) + // console.log("解析出表单可作为AI变量的元素------------>",unitInfo) let optionsInfo = new Array if(unitInfo.formData&&unitInfo.formData.list && unitInfo.formData.list.length>0 ){ unitInfo.formData.list.forEach((item:any) => { @@ -17,7 +17,7 @@ const analysisFromUnit = (unitInfo:formStruct) => { //显示子表单字段 if(item.type=="table"){ - item.list.forEach(eles => { + item.list.forEach((eles: { label: string; item: { label: string; }; unitName: string; name: any; }) => { let labelName = "" if(eles.label){ labelName = eles.label diff --git a/src/api/DesignForm/flowPower.ts b/src/api/DesignForm/flowPower.ts new file mode 100644 index 0000000..a0734c3 --- /dev/null +++ b/src/api/DesignForm/flowPower.ts @@ -0,0 +1,7 @@ +const allNodePwoer = inject('flowNodePower') +const currentNodePowerKey = inject('currentNodeKey') + +export const ObtainAuthorization = (key:string,types?:number) => { + console.log("测试是否获取授权-1-->",allNodePwoer) + console.log("测试是否获取授权-2-->",currentNodePowerKey) +} diff --git a/src/api/DesignForm/types.ts b/src/api/DesignForm/types.ts index 5c70611..3081a6e 100644 --- a/src/api/DesignForm/types.ts +++ b/src/api/DesignForm/types.ts @@ -10,9 +10,9 @@ export interface FormList { tableData?: any // 子表时 options?: Options[] // radio;checkbox;select选项 styles:{ - divStyle:{}, - labelStyle:{}, - inputStyle:{} + divStyle:any, + labelStyle:any, + inputStyle:any } } export interface Options { diff --git a/src/api/taskapi/management.ts b/src/api/taskapi/management.ts index b28dacc..7678209 100644 --- a/src/api/taskapi/management.ts +++ b/src/api/taskapi/management.ts @@ -77,7 +77,7 @@ export function generateFlow(data: nodeFlow):any{ //获取任务表单内容 -export function gainTaskFormInfo(data: customerFormLogo):AxiosPromise { +export function gainTaskFormInfo(data: customerFormLogo) { return request({ url: '/systemapi/task_management/gainTaskFormInfo', method: 'post', @@ -104,7 +104,7 @@ export function gainEditDataLog(data: any):any{ } //添加任务是回显表单数据,若有流程回显流程 -export function echoTableFormPage(data: any):any{ +export function echoTableFormPage(data: any){ return request({ url: '/systemapi/task_management/echoTableFormPage', method: 'post', diff --git a/src/api/taskapi/types.ts b/src/api/taskapi/types.ts index e5d114e..af21294 100644 --- a/src/api/taskapi/types.ts +++ b/src/api/taskapi/types.ts @@ -41,6 +41,7 @@ export interface taskListCont{ //自定义表单标识符 export interface customerFormLogo{ id:string; + runFlowId?:string; } //自定义表单版本内容 export interface customerFormVersionCont{ @@ -109,3 +110,22 @@ export interface runWeekInfo { hour:number; minute:number; } +//节点赋权 +export interface nodePoweInfo { + nodeKey:string; + powerAry:powerAryInfo[]; + apiSetup?:apiSetupInfo +} +//节点福泉结构体 +export interface powerAryInfo{ + id:string; + isEdit:boolean; + isLook:boolean; + name:string; + status?:number +} +//节点福泉补充 +export interface apiSetupInfo{ + library?:any[]; + title?:any[]; +} diff --git a/src/components/DesignForm/aceDrawer.vue b/src/components/DesignForm/aceDrawer.vue index de58f47..6b6ec6a 100644 --- a/src/components/DesignForm/aceDrawer.vue +++ b/src/components/DesignForm/aceDrawer.vue @@ -74,7 +74,7 @@ const jiShuDiGui = (val: []) => { if (!Array.isArray(val)) return (jibuqi = 0); val.forEach((item: any) => { jibuqi++; - console.log("递归查数", jibuqi); + // console.log("递归查数", jibuqi); if (item.children && item.children.length > 0) { jiShuDiGui(item.children); } @@ -113,7 +113,7 @@ const drawerBeforeClose = () => { treeSelectAry.value = []; }; onMounted(() => { - console.log("预览视图--------------------------------》", props.data); + // console.log("预览视图--------------------------------》", props.data); }); onUnmounted(() => { if (Object.keys(editor.value).length !== 0) { @@ -217,7 +217,7 @@ const dialogConfirmTree = () => { // }) // emits('confirm', treeSelectAry) - console.log("回填主表值", treeSelectAry.value); + // console.log("回填主表值", treeSelectAry.value); emits("confirmTree", treeSelectAry.value, props.data.type); drawerBeforeClose(); }; @@ -227,9 +227,9 @@ const dialogConfirmTree = () => { @ 功能: 删除指定节点数据 */ const pickDel = (val: treeStruct) => { - console.log("要删除得节点-->", val.value); + // console.log("要删除得节点-->", val.value); delDiGui(treeSelectAry.value, val); - console.log("删除指定节点数据---结果-->", treeSelectAry); + // console.log("删除指定节点数据---结果-->", treeSelectAry); }; /** @ 作者: 秦东 @@ -237,7 +237,7 @@ const pickDel = (val: treeStruct) => { @ 功能: 执行递归删除 */ const delDiGui = (tree: treeStruct[], val: treeStruct) => { - console.log("要删除得节点-11->", tree, val.value); + // console.log("要删除得节点-11->", tree, val.value); for (let i = 0; i < tree.length; i++) { const node = tree[i]; if (node.value == val.value) { diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index cfa2e39..455f67b 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -1399,7 +1399,7 @@ const getPropByPath = (obj: any, path: string, val: any) => { } } // liwenxuan 关联选项设置会在标签名称改变时清空 end 250410 - console.log("修改指定路径下的值", keyArr, tempObj); + // console.log("修改指定路径下的值", keyArr, tempObj); let i = 0; for (i; i < keyArr.length - 1; i++) { const key = keyArr[i]; @@ -1593,12 +1593,12 @@ const openAttrDialog = (type?: string, tooltip?: string) => { console.log("更多属性弹窗", controlData.value); switch (type) { case "treeSelect": - console.log("更多属性弹窗", controlData.value.control.data); + // console.log("更多属性弹窗", controlData.value.control.data); editData = controlData.value.control.data; break; case "cascader": - console.log("更多属性级联", controlData.value.options); + // console.log("更多属性级联", controlData.value.options); editData = controlData.value.options; break; case "optionsParams": // 选项请求附加参数 @@ -1617,12 +1617,12 @@ const openAttrDialog = (type?: string, tooltip?: string) => { callback: (result: any) => { switch (type) { case "treeSelect": - console.log("更多属性弹窗会写数据:", result); + // console.log("更多属性弹窗会写数据:", result); controlData.value.control.data = result; - console.log( - "更多属性弹窗会写数据-----1------>:", - controlData.value.control.data - ); + // console.log( + // "更多属性弹窗会写数据-----1------>:", + // controlData.value.control.data + // ); break; case "cascader": controlData.value.options = result; @@ -1865,8 +1865,8 @@ const isNotWrite = (val: any) => { return false; }; const isNotWriteWord = (val: any) => { - console.log("isNotWriteWord---->", val); - console.log("isNotWriteWord--formField-->", props.formField); + // console.log("isNotWriteWord---->", val); + // console.log("isNotWriteWord--formField-->", props.formField); if ( val.eventName === "filedNameKey" && props.customerformid != "" && @@ -1891,7 +1891,7 @@ const formListmap = ref(); const subUnit = ref(); //默认值处理 const digitPageSub = (val: any, envt: any) => { - console.log("默认值处理--->", val, envt, props.formData); + // console.log("默认值处理--->", val, envt, props.formData); // console.log("默认值处理-1-->",props.formList) // console.log("默认值处理-2-->",props.formConfig) @@ -2131,7 +2131,7 @@ function haveOrgTreeInfo() { //orgTreeLoading.value = true; getOrgTreeList({ orgid: 309 }) .then(({ data }) => { - console.log("行政组织树对照值", data); + // console.log("行政组织树对照值", data); @@ -2963,7 +2963,7 @@ function associatedFormsHideDialoghandle() { controlData.value.control.hideConditionHtmlCopy = controlData.value.control.hideConditionHtml; nextTick(() => { - aft.value.focusEditor(); + aft.value.focusEditor }); } @@ -3466,8 +3466,8 @@ watch( ) ); } else { - console.log(changedOptions); - console.log(controlData.value.control.glxxsz); + // console.log(changedOptions); + // console.log(controlData.value.control.glxxsz); for (var i = 0; i < changedOptions.length; i++) { if (controlData.value.control.glxxsz[i] === undefined) { //新增了某个option @@ -3893,7 +3893,7 @@ const requiredText = (val: any) => { @ 功能: 校验文本框改变 */ const requiredTextRadio = (val: any) => { - console.log("校验文本框改变-->", val); + // console.log("校验文本框改变-->", val); if (val.type == radioVerify.type) { if (typeof controlData.value.customRules == "object") { if (Array.isArray(controlData.value.customRules)) { @@ -3962,7 +3962,7 @@ const requiredChangeSet = (val: boolean) => { @ 功能: 单选改变事件 */ const radioChangeSet = (val: any) => { - console.log("单选改变事件-222-->", val); + // console.log("单选改变事件-222-->", val); let pickRadio = {}; let isTrue = true; textUinrVerfy.forEach((item: any) => { @@ -4026,7 +4026,7 @@ watch( // } }); } else { - console.log("formData.value---------------", formData.value); + // console.log("formData.value---------------", formData.value); if (formData.value.dataSourceConfi) { formData.value.dataSourceConfig.id = ""; formData.value.dataSourceConfig.dataBaseName = ""; @@ -4042,7 +4042,7 @@ watch( } formAttr.value.forEach((item) => { - console.log(item.label, "item.", item.type); + // console.log(item.label, "item.", item.type); if (!item.hide) { if (!item.type) { // console.log(item.label, "item.", item.type); @@ -4239,7 +4239,7 @@ function resetClick(){ function delRowClick(param: any){ let key = param.key - console.log(key) + // console.log(key) controlData.value.control.roleCheckDataList = controlData.value.control.roleCheckDataList.filter((item: { key: any; }) => item.key !== key); let arr: any[] = [] controlData.value.control.roleCheckDataList.forEach((element: { key: string; }) => { @@ -4286,7 +4286,7 @@ const closeDataSource = () => { */ // const dataList = ref([]); const updataBase = (val: any) => { - console.log("设定关联数据", val); + // console.log("设定关联数据", val); formData.value.dataSourceConfig.id = val.id; formData.value.dataSourceConfig.dataBaseName = val.dataBaseName; formData.value.dataSourceConfig.tableName = val.tableName; diff --git a/src/components/DesignForm/public/expand/org.vue b/src/components/DesignForm/public/expand/org.vue index 6844fbf..ee26a75 100644 --- a/src/components/DesignForm/public/expand/org.vue +++ b/src/components/DesignForm/public/expand/org.vue @@ -11,7 +11,7 @@ const props = withDefaults( defineProps<{ modelValue?: string; disabled?: boolean; - data?: Object; + data?: any; }>(), {} ); @@ -24,7 +24,7 @@ const value = computed({ if(hasComma(props.modelValue)||multiple){ return commaStringToNumberArray(props.modelValue) }else{ - return props.modelValue * 1; + return props.modelValue; } } else { return props.modelValue; @@ -131,13 +131,13 @@ function haveOrgTreeInfo() { orgTreeLoading.value = true; getOrgTreeList({ orgid: 309 }) .then(({ data }) => { - console.log("行政组织树对照值", data); + // console.log("行政组织树对照值", data); //liwenxuan 250916 start // 目标ID数组(需保留的核心节点ID)自动忽略id数组中为其他id子节点的id const targetIds = props.data.control.range - console.log(targetIds) + // console.log(targetIds) if(targetIds&&targetIds.length>0){ // 执行过滤 const filteredTree = filterOrganizationTree(data, targetIds); @@ -233,7 +233,7 @@ function filterChildTargetIds(targetIds: any[], nodeMap: Map) { // 向上追溯所有祖先,判断是否有祖先在有效目标ID中 while (parentId !== undefined && nodeMap.has(parentId)) { if (validTargetIds.includes(parentId)) { - console.log(`提示:ID ${currentId} 是目标ID ${parentId} 的子节点,已忽略`); + // console.log(`提示:ID ${currentId} 是目标ID ${parentId} 的子节点,已忽略`); return false; // 是其他目标ID的子节点,排除 } parentId = nodeMap.get(parentId).superior; // 继续向上追溯 diff --git a/src/components/DesignForm/public/expand/pickpost.vue b/src/components/DesignForm/public/expand/pickpost.vue index 3cf03ea..288bd02 100644 --- a/src/components/DesignForm/public/expand/pickpost.vue +++ b/src/components/DesignForm/public/expand/pickpost.vue @@ -71,7 +71,7 @@ function haveOrgTreeInfo() { orgTreeLoading.value = true; getOrgTreeList({ orgid: 309 }) .then(({ data }) => { - console.log("行政组织树对照值", data); + // console.log("行政组织树对照值", data); orgTreeList.value = data; }) .finally(() => { diff --git a/src/components/DesignForm/public/form/childTable.vue b/src/components/DesignForm/public/form/childTable.vue index c6ab728..63c4586 100644 --- a/src/components/DesignForm/public/form/childTable.vue +++ b/src/components/DesignForm/public/form/childTable.vue @@ -47,7 +47,7 @@ const editDisabled = computed(() => { return formProps.value.type === 2 && props.data.config?.editDisabled; }); const addColumn = () => { - console.log("如果编辑页禁用时--------->", tableDataNew.value); + // console.log("如果编辑页禁用时--------->", tableDataNew.value); const temp: any = {}; if (props.data.list) { props.data.list.forEach((item: any) => { @@ -55,15 +55,15 @@ const addColumn = () => { temp[item.name] = item.control.modelValue; } }); - console.log("如果编辑页禁用时-------temp:", temp); - console.log("如果编辑页禁用时-------jsonParseStringify:", jsonParseStringify(temp)); + // console.log("如果编辑页禁用时-------temp:", temp); + // console.log("如果编辑页禁用时-------jsonParseStringify:", jsonParseStringify(temp)); tableDataNew.value.push(jsonParseStringify(temp)); } }; const getText = (text: any, val: any, name: any) => { - console.log("text===>", text); - console.log("name===>", name); - console.log("val===>", val); + // console.log("text===>", text); + // console.log("name===>", name); + // console.log("val===>", val); if (typeof text === "string") { return text; } else { diff --git a/src/components/DesignForm/public/form/formGroup.vue b/src/components/DesignForm/public/form/formGroup.vue index b218643..1f18cd6 100644 --- a/src/components/DesignForm/public/form/formGroup.vue +++ b/src/components/DesignForm/public/form/formGroup.vue @@ -16,7 +16,8 @@ import { constFormBtnEvent, constFormProps } from "@/api/DesignForm/utils"; import { Md5 } from "ts-md5"; import { jsonParseStringify } from "@/utils/DesignForm"; import request from "@/utils/request"; -import { AnalysisCss } from "@/components/DesignForm/public/form/calculate/cssInfo.ts"; +import { AnalysisCss } from "@/components/DesignForm/public/form/calculate/cssInfo"; +import { nodePoweInfo,powerAryInfo } from "@/api/taskapi/types"; const props = withDefaults( defineProps<{ @@ -751,6 +752,48 @@ function optionsValue3GetTable(data: any, fieldName: string) { /* */ + +const allNodePwoer = inject('flowNodePower') as any +const currentNodePowerKey = inject('currentNodeKey') as any + +//获取当前节点授权 +const curNodePowerAry = () => { + if(currentNodePowerKey && currentNodePowerKey.value && currentNodePowerKey.value != ""){ + if(allNodePwoer.value && Array.isArray(allNodePwoer.value) && allNodePwoer.value.length > 0){ + let powerAry: any[] = [] + allNodePwoer.value.forEach((item:nodePoweInfo) => { + if(item.nodeKey == currentNodePowerKey.value){ + powerAry = item.powerAry + } + }) + return powerAry + }else{ + return [] + } + }else{ + return [] + } +} +/** +@ 作者: 秦东 +@ 时间: 2025-11-06 14:03:21 +@ 功能: 判断此组件是否可见 +*/ +const judgeIsShow = (key: string) => { + let myPower = curNodePowerAry() //获取权限数组 + if(Array.isArray(myPower) && myPower.length > 0){ + let isOk = true + myPower.forEach((item:powerAryInfo) => { + if(key == item.id){ + isOk = item.isLook + } + }) + return isOk + }else{ + return true + } +} +