Browse Source

Merge branch 'qin_v2'

lwx_v4
超级管理员 1 year ago
parent
commit
21dd544d40
  1. 2
      src/components/DesignForm/app/formPage.vue
  2. 2
      src/components/DesignForm/app/index.vue
  3. 2
      src/components/DesignForm/tableListPage/index.vue
  4. 90
      src/components/workflow/drwer/approverDrawer.vue
  5. 133
      src/components/workflow/drwer/promoterDrawer.vue
  6. 30
      src/views/sysworkflow/lowcodepage/pageFlow/appTableFlow.vue
  7. 2
      src/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue

2
src/components/DesignForm/app/formPage.vue

@ -174,7 +174,7 @@ watch(()=>props.isWorkFlow,(val:number)=>{
const getFlowInitSwps = () => {
gainRunFlowStart({id:props.flowkey})
.then(({data})=>{
// console.log("",data)
console.log("获取流程",data)
flowMap.value = data.flowList
nextStep.value = data.nextStep
currentProgress.value = data.Step

2
src/components/DesignForm/app/index.vue

@ -1028,7 +1028,7 @@ const judgeListTitle = (val:any,viewConfig:any) => {
:key="item.id || item.label"
>
<el-table-column v-if="['-'].includes(item.fieldClass)" :type="item.type" :prop="item.field" :label="item.label" config="" width="60">
<el-table-column v-if="['-'].includes(item.fieldClass)" :type="item.type" :prop="item.field" :label="item.label" config="" width="60" fixed>
<template v-if="item.help" #header="scope">
{{ scope.column.label }}
<tooltip :content="item.help" />

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

@ -1018,7 +1018,7 @@ const judgeListTitle = (val:any,viewConfig:any) => {
:key="item.id || item.label"
>
<el-table-column v-if="['-'].includes(item.fieldClass)" :type="item.type" :prop="item.field" :label="item.label" config="" width="60">
<el-table-column v-if="['-'].includes(item.fieldClass)" :type="item.type" :prop="item.field" :label="item.label" config="" width="60" fixed>
<template v-if="item.help" #header="scope">
{{ scope.column.label }}
<tooltip :content="item.help" />

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

@ -48,6 +48,11 @@ const isExecutor = ref(false)
const nodeTitle = ref<string>("审批人设置")
const nodeOptional = ref<any[]>() //线
const nodeAllVerify = ref<any[]>()
const isLookAll = ref(false)
const isEditAll = ref(false)
let approverConfig = ref<any>({})
let approverVisible = ref(false)
let approverRoleVisible = ref(false)
@ -309,6 +314,77 @@ watch(()=>visible.value,(val:boolean)=>{
}
})
const nodeSetUp = ref("first")
/**
@ 作者: 秦东
@ 时间: 2024-07-25 15:43:09
@ 功能: 选择情况
*/
const editOpenOrClose = (val: any) => {
if(powerUnitAry.value.recUnitAry.masterUnitList){
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{
item.isEdit = val
})
}
}
const lookOpenOrClose = (val: boolean) => {
if(powerUnitAry.value.recUnitAry.masterUnitList){
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{
item.isLook = val
if(!val){
item.isEdit = val
isEditAll.value = val
}
})
}
}
/**
@ 作者: 秦东
@ 时间: 2024-07-25 16:09:18
@ 功能: 操作单一可见
*/
const oneLookSet = (val: any) => {
if(!val.isLook){
val.isEdit = val
isEditAll.value = val
}
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
}
}
}
/**
@ 作者: 秦东
@ 时间: 2024-07-25 16:17:32
@ 功能: 操作单一可编辑
*/
const oneEditSet = (val: any) => {
if(powerUnitAry.value.recUnitAry.masterUnitList){
let lookAll = 0
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{
if(item.isEdit){
lookAll++
}
})
if(lookAll != powerUnitAry.value.recUnitAry.masterUnitList.length){
isEditAll.value = false
}else{
isEditAll.value = true
}
}
}
</script>
<template>
@ -492,14 +568,20 @@ const nodeSetUp = ref("first")
<div class="table_name"><el-text class="mx-1" type="primary">主表</el-text></div>
<el-table v-if="powerUnitAry.recUnitAry.masterUnitList" :data="powerUnitAry.recUnitAry.masterUnitList" size="small" style="width: 100%; --el-table-border-color: none;" :header-cell-style="{background:'#eef1f6',color:'#606266'}" class="customer-no-border-table" >
<el-table-column prop="name" label="字段" />
<el-table-column label="可见" align="center" width="80">
<el-table-column align="center" width="80">
<template #header>
<el-checkbox v-model="isLookAll" label="" @change="lookOpenOrClose" />可见
</template>
<template #default="scope">
<el-checkbox v-model="scope.row.isLook" label="" />
<el-checkbox v-model="scope.row.isLook" label="" @change="oneLookSet(scope.row)" />
</template>
</el-table-column>
<el-table-column label="可编辑" align="center" width="80">
<el-table-column align="center" width="120">
<template #header>
<el-checkbox v-model="isEditAll" label="" @change="editOpenOrClose" />可编辑
</template>
<template #default="scope">
<el-checkbox v-model="scope.row.isEdit" label="" />
<el-checkbox v-model="scope.row.isEdit" label="" @change="oneEditSet(scope.row)" />
</template>
</el-table-column>
</el-table>

133
src/components/workflow/drwer/promoterDrawer.vue

@ -45,7 +45,8 @@ const formData = computed({
emits('update:formData', val)
}
});
const isLookAll = ref(false)
const isEditAll = ref(false)
//
@ -86,12 +87,17 @@ const savePromoter = () => {
flag: true,
id: flowPermission1.value.id
})
// console.log(1);
let powerAry = [];
if(powerUnitAry.value.recUnitAry.masterUnitList && powerUnitAry.value.recUnitAry.masterUnitList.length > 0){
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{
powerAry.push(item)
})
}
// console.log(2);
if(powerUnitAry.value.recUnitAry.sunUnitList && powerUnitAry.value.recUnitAry.sunUnitList.length > 0){
powerUnitAry.value.recUnitAry.sunUnitList.forEach((item:any)=>{
if(item.masterUnitList && item.masterUnitList.length > 0){
@ -110,20 +116,20 @@ const savePromoter = () => {
let isNew = true
formData.value.purview.forEach((item:any)=>{
// console.log("---->",item.nodeKey)
if(item.nodeKey == "begin"){
if(item.nodeKey == props.nodeConfig.nodeNumber){
item.powerAry=powerAry
isNew = false
}
});
if(isNew){
formData.value.purview.push({
nodeKey: "begin",
nodeKey: props.nodeConfig.nodeNumber,
powerAry:powerAry
})
}
}else{
formData.value.purview = [{
nodeKey: "begin",
nodeKey: props.nodeConfig.nodeNumber,
powerAry:powerAry
}]
}
@ -132,7 +138,12 @@ const savePromoter = () => {
// nodeKey: "begin",
// powerAry:powerAry
// }) {{props.formKey}}=>{{props.formVersion}}
// console.log(4);
// console.log("formKey--->",props.formKey.toString());
// console.log("formVersion--->",props.formVersion.toString());
// console.log("value--->",formData.value);
console.log("purview--->",formData.value.purview);
let sendInfo: any = {
formKey:props.formKey.toString(),
formVersion:props.formVersion.toString(),
@ -168,6 +179,29 @@ const jieForm = () => {
.then((data)=>{
if(data.code == 0){
powerUnitAry.value = data.data
if(powerUnitAry.value.recUnitAry.masterUnitList && powerUnitAry.value.recUnitAry.masterUnitList.length > 0){
let allToal = powerUnitAry.value.recUnitAry.masterUnitList.length
let isAll = 0
let editAll = 0
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{
if(item.isLook){
isAll++
}
if(item.isEdit){
editAll++
}
})
if(isAll == allToal){
isLookAll.value = true
}
if(editAll == allToal){
isEditAll.value = true
}
}
}
})
}
@ -179,11 +213,81 @@ watch(()=>visible.value,(val:boolean)=>{
})
const nodeSetUp = ref("first")
const contentpage = ref("")
/**
@ 作者: 秦东
@ 时间: 2024-07-25 15:43:09
@ 功能: 选择情况
*/
const editOpenOrClose = (val: any) => {
if(powerUnitAry.value.recUnitAry.masterUnitList){
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{
item.isEdit = val
})
}
}
const lookOpenOrClose = (val: boolean) => {
if(powerUnitAry.value.recUnitAry.masterUnitList){
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{
item.isLook = val
if(!val){
item.isEdit = val
isEditAll.value = val
}
})
}
}
/**
@ 作者: 秦东
@ 时间: 2024-07-25 16:09:18
@ 功能: 操作单一可见
*/
const oneLookSet = (val: any) => {
if(!val.isLook){
val.isEdit = val.isLook
isEditAll.value = val.isLook
}
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
}
}
}
/**
@ 作者: 秦东
@ 时间: 2024-07-25 16:17:32
@ 功能: 操作单一可编辑
*/
const oneEditSet = (val: any) => {
if(powerUnitAry.value.recUnitAry.masterUnitList){
let lookAll = 0
powerUnitAry.value.recUnitAry.masterUnitList.forEach((item:any)=>{
if(item.isEdit){
lookAll++
}
})
if(lookAll != powerUnitAry.value.recUnitAry.masterUnitList.length){
isEditAll.value = false
}else{
isEditAll.value = true
}
}
}
</script>
<template>
<el-drawer v-model="visible" :append-to-body="true" title="发起人" class="set_promoter" :show-close="false" :size="550" :before-close="closeDrawer">
<div class="demo-drawer__content">
{{props.nodeConfig}}
<div class="promoter_content drawer_content">
<el-tabs v-model="nodeSetUp" class="demo-tabs">
<el-tab-pane name="first">
@ -204,16 +308,23 @@ const contentpage = ref("")
<!-- <el-divider content-position="left">操作权限</el-divider> -->
<div class="info_box">
<div class="table_name"><el-text class="mx-1" type="primary">主表</el-text></div>
<el-table v-if="powerUnitAry.recUnitAry.masterUnitList" :data="powerUnitAry.recUnitAry.masterUnitList" size="small" style="width: 100%; --el-table-border-color: none;" :header-cell-style="{background:'#eef1f6',color:'#606266'}" class="customer-no-border-table" >
<el-table v-if="powerUnitAry.recUnitAry.masterUnitList" :data="powerUnitAry.recUnitAry.masterUnitList" size="small" style="width: 100%; --el-table-border-color: none;" :header-cell-style="{background:'#eef1f6',color:'#606266'}" class="customer-no-border-table"
>
<el-table-column prop="name" label="字段" />
<el-table-column label="可见" align="center" width="80">
<el-table-column align="center" width="80">
<template #header>
<el-checkbox v-model="isLookAll" label="" @change="lookOpenOrClose" />可见
</template>
<template #default="scope">
<el-checkbox v-model="scope.row.isLook" label="" />
<el-checkbox v-model="scope.row.isLook" label="" @change="oneLookSet(scope.row)" />
</template>
</el-table-column>
<el-table-column label="可编辑" align="center" width="80">
<el-table-column align="center" width="120">
<template #header>
<el-checkbox v-model="isEditAll" label="" @change="editOpenOrClose" />可编辑
</template>
<template #default="scope">
<el-checkbox v-model="scope.row.isEdit" label="" />
<el-checkbox v-model="scope.row.isEdit" label="" @change="oneEditSet(scope.row)" />
</template>
</el-table-column>
</el-table>

30
src/views/sysworkflow/lowcodepage/pageFlow/appTableFlow.vue

@ -445,7 +445,7 @@ const initLoadData = () => {
// appFormTitle.value = props.pickAppMenu.label
gainAppPageInfo({id:props.pickAppMenu.id})
.then((data)=>{
// console.log("",data)
console.log("获取初始化表单数据",data)
appInitData.value = data.data
// console.log("---!",appInitData.value)
mastesformjson.value = data.data.appForm.mastesformjson
@ -494,20 +494,20 @@ function optionsValue3Get3(data: any,fieldName: string){
<el-drawer v-model="drawerOpenOrClose" v-loading="loadingData" :title="versiontitle" :close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true" :size="drawbox" class="drawerClass" >
<AppFormPage
ref="formEl"
:number="props.pickAppMenu.id"
:isWorkFlow="isFlow"
:form-data="stateForm.formData"
:type="1"
:mastesformjson="mastesformjson"
:flowkey="appInitData.flowkey"
:groupid="appInitData.groupid"
:sign-code="appInitData.signCode"
:version-id="versionid"
:after-submit="afterSubmit"
add-url="addData"
@optionsValue3Get3="optionsValue3Get3"
/>
ref="formEl"
:number="props.pickAppMenu.id"
:isWorkFlow="isFlow"
:form-data="stateForm.formData"
:type="1"
:mastesformjson="mastesformjson"
:flowkey="appInitData.flowkey"
:groupid="appInitData.groupid"
:sign-code="appInitData.signCode"
:version-id="versionid"
:after-submit="afterSubmit"
add-url="addData"
@optionsValue3Get3="optionsValue3Get3"
/>
</el-drawer>
</template>

2
src/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue

@ -75,7 +75,7 @@ const drawbox = computed({
if(props.drawerwith > 1200){
return '50%';
}else{
console.log("isFlowTable",isFlowTable.value)
// console.log("isFlowTable",isFlowTable.value)
if(isFlowTable.value){
return '90%'
}

Loading…
Cancel
Save