Browse Source

工作流修改权限设置问题

space2
herenshan112 3 months ago
parent
commit
4db0d54798
  1. 10
      src/components/DesignForm/public/expand/uploadPage.vue
  2. 4
      src/components/DesignForm/public/form/formItem.vue
  3. 82
      src/components/workflow/drwer/approverDrawer.vue
  4. 8
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue

10
src/components/DesignForm/public/expand/uploadPage.vue

@ -36,7 +36,7 @@ const emits = defineEmits<{
}>();
const value = computed({
get: () => {
console.log("图片上传处理-112->", props.modelValue);
// console.log("-112->", props.modelValue);
// if(props.modelValue != ""){
// return props.modelValue.split(",");
// }else{
@ -53,9 +53,9 @@ const formProps = inject(constFormProps, {}) as any;
// -----------------------
const fileList = computed<any>(() => {
// const imgVal = formProps.value.model[props.data.name]
console.log("图片上传处理-2->", value.value);
// console.log("-2->", value.value);
const imgVal = value.value;
console.log("图片上传处理-->", imgVal);
// console.log("-->", imgVal);
if (imgVal && typeof imgVal === "string") {
// console.log("-2->",imgVal)
const temp: any = [];
@ -73,7 +73,7 @@ const fileList = computed<any>(() => {
//
const getFormItemInputStyle = (ele: any, sty: number) => {
if (ele?.inputStyle) {
console.log("返回栅格宽度4", AnalysisInputCss(ele?.inputStyle, sty));
// console.log("4", AnalysisInputCss(ele?.inputStyle, sty));
return AnalysisInputCss(ele?.inputStyle, sty);
}
};
@ -102,7 +102,7 @@ const uploadError = (err: any, file: any, fileList: any) => {
};
const changeEvent = inject(constControlChange, "") as any;
const updateModel = (val: any) => {
console.log("图片上传处理-111->", val);
// console.log("-111->", val);
value.value = val;
let controlAttribute = "";
if (props.data.control) {

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

@ -626,8 +626,8 @@ const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API + "/api/upordown";
@ 功能: 判断此组件是否可见
*/
const judgeIsShow = (key: string) => {
console.log("判断此组件是否可见--nodeKey-->", props.nodeKey);
console.log("判断此组件是否可见--purview-->", props.purview);
// console.log("--nodeKey-->", props.nodeKey);
// console.log("--purview-->", props.purview);
if (
props.nodeKey != undefined &&
props.purview != undefined &&

82
src/components/workflow/drwer/approverDrawer.vue

@ -4,6 +4,7 @@
@ 备注: 审批人设置
-->
<script lang="ts" setup>
import { toRaw } from "vue";
import $func from "@/utils/workflow/index";
import { setTypes, selectModes, selectRanges } from "@/utils/workflow/const";
import { useStore } from "@/store/workflow/index";
@ -118,7 +119,7 @@ const matrixIsShow = ref(false);
watch(approverConfig1, (val: any) => {
val.value.attribute = val.value.attribute * 1;
console.log("directormaxlevel", val.value, val.value.type);
// console.log("directormaxlevel", val.value, val.value.type);
matrixIsShow.value = false;
approverConfig.value = val.value;
if (val.value.type == 3) {
@ -258,7 +259,7 @@ const saveApprover = () => {
}
});
}
// console.log("",formData.value)
// console.log("", formData.value);
if (formData.value.purview) {
// console.log("")
let isNew = true;
@ -286,13 +287,19 @@ const saveApprover = () => {
},
];
}
const formDataRaw = toRaw(formData.value);
const purviewRaw = toRaw(formData.value.purview);
// console.log("formData.value", formDataRaw);
// console.log("formData.value.purview", purviewRaw);
// console.log("formData.value", JSON.stringify(formDataRaw, null, 2));
// console.log("formData.value.purview", JSON.stringify(formData.value.purview));
let sendInfo: any = {
formKey: props.customerFormKey.toString(),
formVersion: props.formVersion.toString(),
formData: JSON.stringify(formData.value),
formPower: JSON.stringify(formData.value.purview),
};
// console.log("sendInfo",sendInfo)
// console.log("sendInfo", sendInfo);
setFlowFormKeyPower(sendInfo);
closeDrawer();
};
@ -322,7 +329,7 @@ const sureFormTableApprover = (data: any) => {
//
const updateMatrix = (val: any) => {
approverConfig.value.matrix = val;
console.log("值改变-222--->", approverConfig.value);
// console.log("-222--->", approverConfig.value);
};
const formTableFielding = reactive<formTableField>({});
@ -338,7 +345,11 @@ const jieForm = () => {
nodeJson: JSON.stringify(formData.value),
}).then((data) => {
if (data.code == 0) {
// console.log("--->", data.data);
powerUnitAry.value = data.data;
nextTick(() => {
isLookAllPick();
});
}
});
@ -390,11 +401,35 @@ const lookOpenOrClose = (val: boolean) => {
@ 功能: 操作单一可见
*/
const oneLookSet = (val: any) => {
// if (!val.isLook) {
// val.isEdit = val;
// isEditAll.value = val;
// }
if (!val.isLook) {
val.isEdit = val;
isEditAll.value = val;
val.isEdit = false;
isEditAll.value = false;
}
// console.log("--->", val.isLook);
// console.log("-isEditAll-->", isEditAll);
if (powerUnitAry.value.recUnitAry.masterUnitList) {
let lookAll = 0;
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item: any) => {
if (item.isLook) {
lookAll++;
}
});
if (lookAll != powerUnitAry.value.recUnitAry.masterUnitList.length) {
isLookAll.value = false;
} else {
isLookAll.value = true;
}
}
};
//
const isLookAllPick = () => {
if (powerUnitAry.value.recUnitAry.masterUnitList) {
oneEditSet();
let lookAll = 0;
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item: any) => {
if (item.isLook) {
@ -403,6 +438,7 @@ const oneLookSet = (val: any) => {
});
if (lookAll != powerUnitAry.value.recUnitAry.masterUnitList.length) {
isLookAll.value = false;
isEditAll.value = false;
} else {
isLookAll.value = true;
}
@ -413,7 +449,7 @@ const oneLookSet = (val: any) => {
@ 时间: 2024-07-25 16:17:32
@ 功能: 操作单一可编辑
*/
const oneEditSet = (val: any) => {
const oneEditSet = (val?: any) => {
if (powerUnitAry.value.recUnitAry.masterUnitList) {
let lookAll = 0;
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item: any) => {
@ -465,13 +501,13 @@ watch(
@ 功能: 选中的哪个行政组织
*/
const handleNodeClickOrg = (data: any, threePickAry: any) => {
console.log("选中的哪个行政组织----data------->", data);
console.log("选中的哪个行政组织----checked------->", threePickAry);
console.log(
"选中的哪个行政组织----halfCheckedKeys------->",
threePickAry.halfCheckedKeys
);
console.log("选中的哪个行政组织----checkedKeys------->", threePickAry.checkedKeys);
// console.log("----data------->", data);
// console.log("----checked------->", threePickAry);
// console.log(
// "----halfCheckedKeys------->",
// threePickAry.halfCheckedKeys
// );
// console.log("----checkedKeys------->", threePickAry.checkedKeys);
if (
threePickAry.halfCheckedKeys &&
Array.isArray(threePickAry.halfCheckedKeys) &&
@ -483,10 +519,10 @@ const handleNodeClickOrg = (data: any, threePickAry: any) => {
threePickAry.checkedKeys.length > 0
) {
approverConfig.value.orgList = threePickAry.checkedKeys;
console.log("选中的哪个行政组织----1------->", approverConfig.value.orgList);
// console.log("----1------->", approverConfig.value.orgList);
} else {
approverConfig.value.orgList = [];
console.log("选中的哪个行政组织----2------->", approverConfig.value.orgList);
// console.log("----2------->", approverConfig.value.orgList);
}
} else {
if (
@ -500,10 +536,10 @@ const handleNodeClickOrg = (data: any, threePickAry: any) => {
);
}
approverConfig.value.orgList = threePickAry.checkedKeys;
console.log("选中的哪个行政组织----3------->", approverConfig.value.orgList);
// console.log("----3------->", approverConfig.value.orgList);
} else {
approverConfig.value.orgList = [];
console.log("选中的哪个行政组织----4------->", approverConfig.value.orgList);
// console.log("----4------->", approverConfig.value.orgList);
}
}
// if(approverConfig.value.orgList && Array.isArray(approverConfig.value.orgList)){
@ -538,10 +574,10 @@ const handleNodeClickOrg = (data: any, threePickAry: any) => {
// }
// }
// }
console.log(
"选中的哪个行政组织----approverConfig.value.orgList------->",
approverConfig.value.orgList
);
// console.log(
// "----approverConfig.value.orgList------->",
// approverConfig.value.orgList
// );
};
// watch(()=>approverConfig.value.orgList,(val:any)=>{
@ -556,7 +592,7 @@ const handleNodeClickOrg = (data: any, threePickAry: any) => {
@ 功能: 设置选项
*/
const setOrgTree = (val: any) => {
console.log("设置选项", val);
// console.log("", val);
if (Array.isArray(val)) {
flowOrgTree.value!.setCheckedKeys(val, true);
} else {

8
src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue

@ -217,7 +217,7 @@ const handleAppPageClick = () => {};
const gainAppFormPageInit = () => {
if (props.menusInfo.id) {
gainAppPageInfo({ id: props.menusInfo.id }).then((data) => {
console.log("获取初始化表单数据----->", data);
// console.log("----->", data);
appInitData.value = data.data;
echatsViews.value = data.data.chartList;
if (data.data.page && data.data.pageList && data.data.appFlow) {
@ -273,7 +273,7 @@ const gainAppFormPageInit = () => {
//data.data.appForm.mastesformjson =
//options end
console.log("columns------1111----->", stateData.tableData.columns);
// console.log("columns------1111----->", stateData.tableData.columns);
if (
stateData.tableData.columns &&
stateData.tableData.columns != null &&
@ -386,12 +386,12 @@ const gainAppFormPageInit = () => {
// console.log("---->", stateList.view);
}
if (data.data.page) {
console.log("data.data.mastesform", data.data);
// console.log("data.data.mastesform", data.data);
stateForm.id = data.data.appForm.version.toString();
stateForm.formId = data.data.appForm.cfid.toString();
stateForm.versionId = data.data.appForm.id.toString();
stateForm.formData = stringToObj(data.data.appForm.mastesform);
console.log(stateForm.formData);
// console.log(stateForm.formData);
stateForm.dict = string2json(data.data.appForm.dict);
stateForm.formData.powerstr = string2json(data.data.appForm.powerstr);
}

Loading…
Cancel
Save