|
|
@ -58,11 +58,13 @@ import TextImg from "@/assets/image/tinymce.png"; |
|
|
import { |
|
|
import { |
|
|
AnalysisCss, |
|
|
AnalysisCss, |
|
|
AnalysisInputCss, |
|
|
AnalysisInputCss, |
|
|
} from "@/components/DesignForm/public/form/calculate/cssInfo.ts"; |
|
|
} from "@/components/DesignForm/public/form/calculate/cssInfo"; |
|
|
|
|
|
|
|
|
import request from "@/utils/request"; |
|
|
import request from "@/utils/request"; |
|
|
|
|
|
|
|
|
import { getgovcont } from "@/api/hr/org/index"; |
|
|
import { getgovcont } from "@/api/hr/org/index"; |
|
|
|
|
|
import { nodePoweInfo,powerAryInfo } from "@/api/taskapi/types"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const props = withDefaults( |
|
|
const props = withDefaults( |
|
|
defineProps<{ |
|
|
defineProps<{ |
|
|
@ -75,6 +77,7 @@ const props = withDefaults( |
|
|
tablekey?: any; |
|
|
tablekey?: any; |
|
|
numrun?: any; |
|
|
numrun?: any; |
|
|
rowIndex?: any; |
|
|
rowIndex?: any; |
|
|
|
|
|
alldata?:any; |
|
|
}>(), |
|
|
}>(), |
|
|
{} |
|
|
{} |
|
|
); |
|
|
); |
|
|
@ -630,6 +633,29 @@ const getFormItemInputStyle = (ele: any, sty: number) => { |
|
|
}; |
|
|
}; |
|
|
const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API + "/api/upordown"; |
|
|
const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API + "/api/upordown"; |
|
|
|
|
|
|
|
|
|
|
|
const allNodePwoer = inject('flowNodePower') as any |
|
|
|
|
|
const currentNodePowerKey = inject('currentNodeKey') as any |
|
|
|
|
|
|
|
|
|
|
|
//获取当前节点授权 |
|
|
|
|
|
const curNodePowerAry = () => { |
|
|
|
|
|
// console.log("获取当前节点授权--nodeKey-->", currentNodePowerKey); |
|
|
|
|
|
// console.log("获取当前节点授权--purview-->", allNodePwoer); |
|
|
|
|
|
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 [] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
/** |
|
|
/** |
|
|
@ 作者: 秦东 |
|
|
@ 作者: 秦东 |
|
|
@ 时间: 2024-07-27 14:17:16 |
|
|
@ 时间: 2024-07-27 14:17:16 |
|
|
@ -638,56 +664,75 @@ const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API + "/api/upordown"; |
|
|
const judgeIsShow = (key: string) => { |
|
|
const judgeIsShow = (key: string) => { |
|
|
// console.log("判断此组件是否可见--nodeKey-->", props.nodeKey); |
|
|
// console.log("判断此组件是否可见--nodeKey-->", props.nodeKey); |
|
|
// console.log("判断此组件是否可见--purview-->", props.purview); |
|
|
// console.log("判断此组件是否可见--purview-->", props.purview); |
|
|
if ( |
|
|
|
|
|
props.nodeKey != undefined && |
|
|
|
|
|
props.purview != undefined && |
|
|
|
|
|
props.purview != null && |
|
|
|
|
|
props.purview != null && |
|
|
|
|
|
props.purview != "" && |
|
|
|
|
|
props.purview != "" |
|
|
|
|
|
) { |
|
|
|
|
|
|
|
|
|
|
|
if (props.purview.length < 1) { |
|
|
let myPower = curNodePowerAry() |
|
|
return true; |
|
|
// console.log("测试是否获取授权-3-->",key) |
|
|
} else { |
|
|
// console.log("测试是否获取授权-4-->",myPower) |
|
|
let isShow = false; |
|
|
if(Array.isArray(myPower) && myPower.length > 0){ |
|
|
if (Array.isArray(props.purview)) { |
|
|
let isOk = true |
|
|
|
|
|
myPower.forEach((item:powerAryInfo) => { |
|
|
props.purview.forEach((item) => { |
|
|
if(key == item.id){ |
|
|
// console.log("判断此组件是否可见--purview-->", item.nodeKey , props.nodeKey); |
|
|
isOk = item.isLook |
|
|
if (item.nodeKey == props.nodeKey) { |
|
|
|
|
|
if (item.powerAry && item.powerAry.length > 0) { |
|
|
|
|
|
item.powerAry.forEach((itm) => { |
|
|
|
|
|
if (itm.id == key) { |
|
|
|
|
|
// console.log( |
|
|
|
|
|
// "判断此组件是否可见", |
|
|
|
|
|
// itm, |
|
|
|
|
|
// itm.id == key, |
|
|
|
|
|
// "--------->", |
|
|
|
|
|
// itm.isLook |
|
|
|
|
|
// ); |
|
|
|
|
|
isShow = itm.isLook; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
}) |
|
|
return isShow; |
|
|
return isOk |
|
|
} |
|
|
}else{ |
|
|
} else { |
|
|
return true |
|
|
return true; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// if ( |
|
|
|
|
|
// props.nodeKey != undefined && |
|
|
|
|
|
// props.purview != undefined && |
|
|
|
|
|
// props.purview != null && |
|
|
|
|
|
// props.purview != null |
|
|
|
|
|
// ) { |
|
|
|
|
|
|
|
|
|
|
|
// if (props.purview.length < 1) { |
|
|
|
|
|
// return true; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// let isShow = false; |
|
|
|
|
|
// if (Array.isArray(props.purview)) { |
|
|
|
|
|
|
|
|
|
|
|
// props.purview.forEach((item) => { |
|
|
|
|
|
// // console.log("判断此组件是否可见--purview-->", item.nodeKey , props.nodeKey); |
|
|
|
|
|
// if (item.nodeKey == props.nodeKey) { |
|
|
|
|
|
// if (item.powerAry && item.powerAry.length > 0) { |
|
|
|
|
|
// item.powerAry.forEach((itm: { id: string; isLook: boolean; }) => { |
|
|
|
|
|
// if (itm.id == key) { |
|
|
|
|
|
// // console.log( |
|
|
|
|
|
// // "判断此组件是否可见", |
|
|
|
|
|
// // itm, |
|
|
|
|
|
// // itm.id == key, |
|
|
|
|
|
// // "--------->", |
|
|
|
|
|
// // itm.isLook |
|
|
|
|
|
// // ); |
|
|
|
|
|
// isShow = itm.isLook; |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// return isShow; |
|
|
|
|
|
// } |
|
|
|
|
|
// } else { |
|
|
|
|
|
// return true; |
|
|
|
|
|
// } |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ 作者: 秦东 |
|
|
@ 作者: 秦东 |
|
|
@ 时间: 2024-07-27 15:11:42 |
|
|
@ 时间: 2024-07-27 15:11:42 |
|
|
@ 功能: 判断是否禁用 |
|
|
@ 功能: 判断是否禁用 |
|
|
*/ |
|
|
*/ |
|
|
const judgeIsDisabled = (key: string) => { |
|
|
const judgeIsDisabled = (key: string) => { |
|
|
// console.log("判断是否禁用", key); |
|
|
// console.log("判断是否禁用", key); |
|
|
|
|
|
// console.log("测试是否获取授权-1-->",allNodePwoer) |
|
|
|
|
|
// console.log("测试是否获取授权-2-->",currentNodePowerKey) |
|
|
if (type.value === 3) { |
|
|
if (type.value === 3) { |
|
|
return true; // 查看模式,为不可编辑状态 |
|
|
return true; // 查看模式,为不可编辑状态 |
|
|
} |
|
|
} |
|
|
@ -698,48 +743,62 @@ const judgeIsDisabled = (key: string) => { |
|
|
return true; // 编辑模式 |
|
|
return true; // 编辑模式 |
|
|
} |
|
|
} |
|
|
// console.log("判断是否禁用-------props.nodeKey----------->", props.purview); |
|
|
// console.log("判断是否禁用-------props.nodeKey----------->", props.purview); |
|
|
if ( |
|
|
|
|
|
props.nodeKey != undefined && |
|
|
|
|
|
props.purview != undefined && |
|
|
let myPower = curNodePowerAry() |
|
|
props.purview != null && |
|
|
// console.log("测试是否获取授权-3-->",myPower) |
|
|
props.purview != null && |
|
|
if(Array.isArray(myPower) && myPower.length > 0){ |
|
|
props.purview != "" && |
|
|
let isOk = false |
|
|
props.purview != "" |
|
|
myPower.forEach((item:powerAryInfo) => { |
|
|
) { |
|
|
if(key == item.id){ |
|
|
if (props.purview.length < 1) { |
|
|
isOk = !item.isEdit |
|
|
return false; |
|
|
} |
|
|
} else { |
|
|
}) |
|
|
let isShow = true; |
|
|
return isOk |
|
|
props.purview.forEach((item) => { |
|
|
}else{ |
|
|
if (item.nodeKey == props.nodeKey) { |
|
|
return false |
|
|
if (item.powerAry && item.powerAry.length > 0) { |
|
|
|
|
|
item.powerAry.forEach((itm) => { |
|
|
|
|
|
if (itm.id == key) { |
|
|
|
|
|
// console.log( |
|
|
|
|
|
// "判断此组件是否禁用", |
|
|
|
|
|
// itm, |
|
|
|
|
|
// itm.id == key, |
|
|
|
|
|
// "--------->", |
|
|
|
|
|
// itm.isLook |
|
|
|
|
|
// ); |
|
|
|
|
|
isShow = !itm.isEdit; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
return isShow; |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// if ( |
|
|
|
|
|
// props.nodeKey != undefined && |
|
|
|
|
|
// props.purview != undefined && |
|
|
|
|
|
// props.purview != null && |
|
|
|
|
|
// props.purview != null |
|
|
|
|
|
// ) { |
|
|
|
|
|
// if (props.purview.length < 1) { |
|
|
|
|
|
// return false; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// let isShow = true; |
|
|
|
|
|
// props.purview.forEach((item) => { |
|
|
|
|
|
// if (item.nodeKey == props.nodeKey) { |
|
|
|
|
|
// if (item.powerAry && item.powerAry.length > 0) { |
|
|
|
|
|
// item.powerAry.forEach((itm: { id: string; isEdit: any; }) => { |
|
|
|
|
|
// if (itm.id == key) { |
|
|
|
|
|
// // console.log( |
|
|
|
|
|
// // "判断此组件是否禁用", |
|
|
|
|
|
// // itm, |
|
|
|
|
|
// // itm.id == key, |
|
|
|
|
|
// // "--------->", |
|
|
|
|
|
// // itm.isLook |
|
|
|
|
|
// // ); |
|
|
|
|
|
// isShow = !itm.isEdit; |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
// return isShow; |
|
|
|
|
|
// } |
|
|
|
|
|
// } else { |
|
|
|
|
|
// return false; |
|
|
|
|
|
// } |
|
|
}; |
|
|
}; |
|
|
/** |
|
|
/** |
|
|
@ 作者: 秦东 |
|
|
@ 作者: 秦东 |
|
|
@ 时间: 2024-08-02 13:02:49 |
|
|
@ 时间: 2024-08-02 13:02:49 |
|
|
@ 功能: 将时间戳转换成字符串 |
|
|
@ 功能: 将时间戳转换成字符串 |
|
|
*/ |
|
|
*/ |
|
|
const timeToString = (timeVal: any, types: int) => { |
|
|
const timeToString = (timeVal: any, types: string) => { |
|
|
// console.log("将时间戳转换成字符串",timeVal,types) |
|
|
// console.log("将时间戳转换成字符串",timeVal,types) |
|
|
let timeStr = ""; |
|
|
let timeStr = ""; |
|
|
if (Array.isArray(timeVal)) { |
|
|
if (Array.isArray(timeVal)) { |
|
|
@ -757,8 +816,8 @@ const timeToString = (timeVal: any, types: int) => { |
|
|
timeStr = `${startTime.year}-${startTime.month}-${startTime.day} ${startTime.hours}:${startTime.minutes}:${startTime.seconds} 至 ${endTime.year}-${endTime.month}-${endTime.day} ${endTime.hours}:${endTime.minutes}:${endTime.seconds}`; |
|
|
timeStr = `${startTime.year}-${startTime.month}-${startTime.day} ${startTime.hours}:${startTime.minutes}:${startTime.seconds} 至 ${endTime.year}-${endTime.month}-${endTime.day} ${endTime.hours}:${endTime.minutes}:${endTime.seconds}`; |
|
|
break; |
|
|
break; |
|
|
case "week": //周 |
|
|
case "week": //周 |
|
|
let startWeek = getYearWeek(startTime); |
|
|
let startWeek = getYearWeek(timeVal[0]); |
|
|
let endWeek = getYearWeek(endTime); |
|
|
let endWeek = getYearWeek(timeVal[1]); |
|
|
timeStr = `${startWeek} 至 ${endWeek}`; |
|
|
timeStr = `${startWeek} 至 ${endWeek}`; |
|
|
break; |
|
|
break; |
|
|
case "timeCalss": //时间 |
|
|
case "timeCalss": //时间 |
|
|
@ -790,7 +849,7 @@ const timeToString = (timeVal: any, types: int) => { |
|
|
timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
|
|
timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
|
|
break; |
|
|
break; |
|
|
case "week": //周 |
|
|
case "week": //周 |
|
|
timeStr = getYearWeek(timeVal); |
|
|
timeStr = getYearWeek(timeVal[0]).toString(); |
|
|
break; |
|
|
break; |
|
|
case "timeCalss": //时间 |
|
|
case "timeCalss": //时间 |
|
|
timeStr = `${hours}:${minutes}:${seconds}`; |
|
|
timeStr = `${hours}:${minutes}:${seconds}`; |
|
|
@ -815,7 +874,7 @@ const timeToString = (timeVal: any, types: int) => { |
|
|
timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
|
|
timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
|
|
break; |
|
|
break; |
|
|
case "week": //周 |
|
|
case "week": //周 |
|
|
timeStr = getYearWeek(timeVal); |
|
|
timeStr = getYearWeek(timeVal*1).toString(); |
|
|
break; |
|
|
break; |
|
|
case "timeCalss": //时间 |
|
|
case "timeCalss": //时间 |
|
|
timeStr = `${hours}:${minutes}:${seconds}`; |
|
|
timeStr = `${hours}:${minutes}:${seconds}`; |
|
|
@ -858,7 +917,7 @@ const timeToAry = (timestamp: number) => { |
|
|
const getYearWeek = (timestamp: number) => { |
|
|
const getYearWeek = (timestamp: number) => { |
|
|
const date = new Date(timestamp); |
|
|
const date = new Date(timestamp); |
|
|
const firstDayOfYear = new Date(date.getFullYear(), 0, 1); |
|
|
const firstDayOfYear = new Date(date.getFullYear(), 0, 1); |
|
|
const pastDaysOfYear = (date - firstDayOfYear) / 86400000; |
|
|
const pastDaysOfYear = (date.getTime() - firstDayOfYear.getTime()) / 86400000; |
|
|
const weekNumber = Math.ceil((pastDaysOfYear + firstDayOfYear.getDay() + 1) / 7); |
|
|
const weekNumber = Math.ceil((pastDaysOfYear + firstDayOfYear.getDay() + 1) / 7); |
|
|
return weekNumber; |
|
|
return weekNumber; |
|
|
}; |
|
|
}; |
|
|
@ -886,7 +945,7 @@ const judgeRadio = (val: any, list: any) => { |
|
|
@ 功能: 判断多选值 |
|
|
@ 功能: 判断多选值 |
|
|
*/ |
|
|
*/ |
|
|
const judgeCheckbox = (val: any, list: any) => { |
|
|
const judgeCheckbox = (val: any, list: any) => { |
|
|
let valAry = []; |
|
|
let valAry: any[] = []; |
|
|
if (Array.isArray(val)) { |
|
|
if (Array.isArray(val)) { |
|
|
if (val.length > 0) { |
|
|
if (val.length > 0) { |
|
|
if (Array.isArray(list)) { |
|
|
if (Array.isArray(list)) { |
|
|
@ -909,7 +968,7 @@ const judgeCheckbox = (val: any, list: any) => { |
|
|
*/ |
|
|
*/ |
|
|
const selectValue = (val: any, list: any) => { |
|
|
const selectValue = (val: any, list: any) => { |
|
|
// console.log("下拉菜单处理",val,list) |
|
|
// console.log("下拉菜单处理",val,list) |
|
|
let valAry = []; |
|
|
let valAry: any[] = []; |
|
|
if (val && val != "" && val != null) { |
|
|
if (val && val != "" && val != null) { |
|
|
let pickSelect = val; |
|
|
let pickSelect = val; |
|
|
if (Array.isArray(val)) { |
|
|
if (Array.isArray(val)) { |
|
|
@ -990,7 +1049,7 @@ const uploadPic = (val: any) => { |
|
|
@ 时间: 2024-11-29 13:46:36 |
|
|
@ 时间: 2024-11-29 13:46:36 |
|
|
@ 功能: 获取级联选择值 |
|
|
@ 功能: 获取级联选择值 |
|
|
*/ |
|
|
*/ |
|
|
const judjeCascader = (val: any[], options: any[]) => { |
|
|
const judjeCascader = (val: any, options: any) => { |
|
|
// console.log("val===========>", val); |
|
|
// console.log("val===========>", val); |
|
|
if (val == "" || val == undefined || val == null) return ""; |
|
|
if (val == "" || val == undefined || val == null) return ""; |
|
|
if (val && val.length < 0) return ""; |
|
|
if (val && val.length < 0) return ""; |
|
|
@ -1042,6 +1101,8 @@ const diGuiJilian = (val: any, options: any[]) => { |
|
|
}); |
|
|
}); |
|
|
return dataVal; |
|
|
return dataVal; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
<template> |
|
|
<template> |
|
|
<BaiduMap |
|
|
<BaiduMap |
|
|
@ -1261,7 +1322,7 @@ const diGuiJilian = (val: any, options: any[]) => { |
|
|
:type="data.type === 'password' ? 'password' : 'text'" |
|
|
:type="data.type === 'password' ? 'password' : 'text'" |
|
|
:style="getFormItemInputStyle(configStyle, 2)" |
|
|
:style="getFormItemInputStyle(configStyle, 2)" |
|
|
:input-style="getFormItemInputStyle(configStyle, 3)" |
|
|
:input-style="getFormItemInputStyle(configStyle, 3)" |
|
|
v-if="['input', 'password'].includes(data.type)" |
|
|
v-if="['input', 'password'].includes(data.type) || judgeIsShow(data.name)" |
|
|
@change="onValueChange(data.type)" |
|
|
@change="onValueChange(data.type)" |
|
|
:placeholder=" |
|
|
:placeholder=" |
|
|
data.control.placeholder |
|
|
data.control.placeholder |
|
|
|