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({ const value = computed({
get: () => { get: () => {
console.log("图片上传处理-112->", props.modelValue); // console.log("-112->", props.modelValue);
// if(props.modelValue != ""){ // if(props.modelValue != ""){
// return props.modelValue.split(","); // return props.modelValue.split(",");
// }else{ // }else{
@ -53,9 +53,9 @@ const formProps = inject(constFormProps, {}) as any;
// ----------------------- // -----------------------
const fileList = computed<any>(() => { const fileList = computed<any>(() => {
// const imgVal = formProps.value.model[props.data.name] // const imgVal = formProps.value.model[props.data.name]
console.log("图片上传处理-2->", value.value); // console.log("-2->", value.value);
const imgVal = value.value; const imgVal = value.value;
console.log("图片上传处理-->", imgVal); // console.log("-->", imgVal);
if (imgVal && typeof imgVal === "string") { if (imgVal && typeof imgVal === "string") {
// console.log("-2->",imgVal) // console.log("-2->",imgVal)
const temp: any = []; const temp: any = [];
@ -73,7 +73,7 @@ const fileList = computed<any>(() => {
// //
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);
} }
}; };
@ -102,7 +102,7 @@ const uploadError = (err: any, file: any, fileList: any) => {
}; };
const changeEvent = inject(constControlChange, "") as any; const changeEvent = inject(constControlChange, "") as any;
const updateModel = (val: any) => { const updateModel = (val: any) => {
console.log("图片上传处理-111->", val); // console.log("-111->", val);
value.value = val; value.value = val;
let controlAttribute = ""; let controlAttribute = "";
if (props.data.control) { 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) => { 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 ( if (
props.nodeKey != undefined && props.nodeKey != undefined &&
props.purview != undefined && props.purview != undefined &&

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

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

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

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

Loading…
Cancel
Save