Browse Source

在列表新增数据页增加扫码填单按钮显示填单二维码

lwx_v17
liwenxuan 10 months ago
parent
commit
0db0ff530c
  1. 81
      src/views/sysworkflow/lowcodepage/pageFlow/appTableFlow.vue
  2. 83
      src/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue

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

@ -8,6 +8,7 @@ import { nodeFlow,conditionInfo,nodelPeoples } from '@/api/taskapi/types'
import { haveCustomerFormVersion,generateFlow,echoTableFormPage,realTimeUpdateFlow } from '@/api/taskapi/management' import { haveCustomerFormVersion,generateFlow,echoTableFormPage,realTimeUpdateFlow } from '@/api/taskapi/management'
import { string2json,stringToObj } from '@/utils/DesignForm/form' import { string2json,stringToObj } from '@/utils/DesignForm/form'
import { judgeSubmitCancel,startRunFlow,gainAppPageInfo,getFieldRecord } from '@/api/DesignForm/requestapi' import { judgeSubmitCancel,startRunFlow,gainAppPageInfo,getFieldRecord } from '@/api/DesignForm/requestapi'
import request from "@/utils/request";
import { notAsA_BasisForJudgment,asAnApprovalActionControl,fixedValueControl,timeControl,timeEquation,submitButton, afreshSubmitButton } from '@/utils/workflow/const' import { notAsA_BasisForJudgment,asAnApprovalActionControl,fixedValueControl,timeControl,timeEquation,submitButton, afreshSubmitButton } from '@/utils/workflow/const'
import { appPageDataInit,appWorkFlow } from "@/api/date/type" import { appPageDataInit,appWorkFlow } from "@/api/date/type"
@ -582,6 +583,39 @@ const initLoadData = () => {
} }
//liwenxuan 20250206 start
let qrCodeImgInside = ""
const qrCodeInsideDialogFlag = ref(false)
function showFillFormQrCode(){
//,,app,,
//,,,
//cfid
if(stateForm.formData.form.qrCodeFlag==true&&stateForm.formData.form.qrCodeInside==true){
getQrCodeImgInside().then(({ data }) => {
qrCodeImgInside = data
if(qrCodeInsideDialogFlag.value==false){
//console.log(qrCodeImgInside)
qrCodeInsideDialogFlag.value = true
}
})
}else{
alert("请先开启表单二维码功能")
}
}
function getQrCodeImgInside() {
return request({
url: "/javasys/lowCode/QrCode/getQrCodeImgInside",
method: "post",
data: {
cfid: stateForm.formId,
},
});
}
//liwenxuan 20250206 end
function optionsValue3Get3(data: any,fieldName: string){ function optionsValue3Get3(data: any,fieldName: string){
/* console.log(data) /* console.log(data)
console.log(fileName) console.log(fileName)
@ -598,6 +632,18 @@ function optionsValue3Get3(data: any,fieldName: string){
</script> </script>
<template> <template>
<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" > <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" >
<!-- liwenxuan 20250206 在列表新增数据页增加扫码填单按钮显示填单二维码 start -->
<!-- 自定义抽屉头部 -->
<template #header>
<div v-if="stateForm.formData.form.qrCodeFlag==true&&stateForm.formData.form.qrCodeInside==true" class="drawer-header" >
{{versiontitle}}
<div class="flex-grow"></div>
<el-button size="small" style="margin-right: 15px" @click="showFillFormQrCode" >扫码填单</el-button>
</div>
</template>
<!-- liwenxuan 20250206 在列表新增数据页增加扫码填单按钮显示填单二维码 end -->
<!-- <AppFormPage <!-- <AppFormPage
ref="formEl" ref="formEl"
@ -632,6 +678,26 @@ function optionsValue3Get3(data: any,fieldName: string){
/> />
</el-drawer> </el-drawer>
<el-dialog
v-model="qrCodeInsideDialogFlag"
class="glxxsztc"
top="150px"
:close-on-click-modal="false"
title="内部二维码"
:show-close="false"
style="margin-top: 70px"
width="25%"
>
<img :src="qrCodeImgInside" style="width: 80%;height: 50%;" />
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="qrCodeInsideDialogFlag = false">
确定
</el-button>
</div>
</template>
</el-dialog>
</template> </template>
<style lang='scss' scoped> <style lang='scss' scoped>
.common-layout{ .common-layout{
@ -655,6 +721,21 @@ function optionsValue3Get3(data: any,fieldName: string){
cursor:pointer; cursor:pointer;
} }
} }
.drawer-header {
display: flex;
align-items: center;
//padding: 12px;
}
.flex-grow {
/* 占据剩余的可用空间,将后面的元素推到右边 */
flex-grow: 1;
}
.drawer-close {
cursor: pointer;
//margin-left: 8px;
}
} }
</style> </style>

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

@ -8,6 +8,7 @@ import { nodeFlow,conditionInfo,nodelPeoples } from '@/api/taskapi/types'
import { haveCustomerFormVersion,generateFlow,echoTableFormPage,realTimeUpdateFlow } from '@/api/taskapi/management' import { haveCustomerFormVersion,generateFlow,echoTableFormPage,realTimeUpdateFlow } from '@/api/taskapi/management'
import { string2json,stringToObj } from '@/utils/DesignForm/form' import { string2json,stringToObj } from '@/utils/DesignForm/form'
import { judgeSubmitCancel,startRunFlow } from '@/api/DesignForm/requestapi' import { judgeSubmitCancel,startRunFlow } from '@/api/DesignForm/requestapi'
import request from "@/utils/request";
import { notAsA_BasisForJudgment,asAnApprovalActionControl,fixedValueControl,timeControl,timeEquation,submitButton, afreshSubmitButton } from '@/utils/workflow/const' import { notAsA_BasisForJudgment,asAnApprovalActionControl,fixedValueControl,timeControl,timeEquation,submitButton, afreshSubmitButton } from '@/utils/workflow/const'
import FlowStep from '@/views/taskplatform/taskmanagement/flowStep.vue' import FlowStep from '@/views/taskplatform/taskmanagement/flowStep.vue'
@ -417,7 +418,38 @@ const saveDraftPage = (type: string,val?:any) => {
} }
closeAppSubmit() closeAppSubmit()
} }
//liwenxuan 20250206 start
let qrCodeImgInside = ""
const qrCodeInsideDialogFlag = ref(false)
function showFillFormQrCode(){
//,,app,,
//,,,
//cfid
if(state.formData.form.qrCodeFlag==true&&state.formData.form.qrCodeInside==true){
getQrCodeImgInside().then(({ data }) => {
qrCodeImgInside = data
if(qrCodeInsideDialogFlag.value==false){
//console.log(qrCodeImgInside)
qrCodeInsideDialogFlag.value = true
}
})
}else{
alert("请先开启表单二维码功能")
}
}
function getQrCodeImgInside() {
return request({
url: "/javasys/lowCode/QrCode/getQrCodeImgInside",
method: "post",
data: {
cfid: state.id,
},
});
}
//liwenxuan 20250206 end
function optionsValue3Get3(data: any,fieldName: string){ function optionsValue3Get3(data: any,fieldName: string){
//console.log("tableFlow","optionsValue3Get3") //console.log("tableFlow","optionsValue3Get3")
@ -447,12 +479,24 @@ function optionsValue3Get3(data: any,fieldName: string){
} }
} }
} }
/*
*/
</script> </script>
<template> <template>
<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" > <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" >
<!-- liwenxuan 20250206 在列表新增数据页增加扫码填单按钮显示填单二维码 start -->
<!-- 自定义抽屉头部 -->
<template #header>
<div v-if="state.formData.form.qrCodeFlag==true&&state.formData.form.qrCodeInside==true" class="drawer-header" >
{{versiontitle}}
<div class="flex-grow"></div>
<el-button size="small" style="margin-right: 15px" @click="showFillFormQrCode" >扫码填单</el-button>
</div>
</template>
<!-- liwenxuan 20250206 在列表新增数据页增加扫码填单按钮显示填单二维码 end -->
<div v-if="isFlowTable" class="common-layout"> <div v-if="isFlowTable" class="common-layout">
<el-container> <el-container>
<el-main v-loading="formLoading" element-loading-text="Loading..."> <el-main v-loading="formLoading" element-loading-text="Loading...">
@ -498,7 +542,29 @@ function optionsValue3Get3(data: any,fieldName: string){
@optionsValue3Get3="optionsValue3Get3" @optionsValue3Get3="optionsValue3Get3"
/> />
</div> </div>
</el-drawer> </el-drawer>
<el-dialog
v-model="qrCodeInsideDialogFlag"
class="glxxsztc"
top="150px"
:close-on-click-modal="false"
title="内部二维码"
:show-close="false"
style="margin-top: 70px"
width="25%"
>
<img :src="qrCodeImgInside" style="width: 80%;height: 50%;" />
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="qrCodeInsideDialogFlag = false">
确定
</el-button>
</div>
</template>
</el-dialog>
</template> </template>
<style lang='scss' scoped> <style lang='scss' scoped>
@ -523,6 +589,21 @@ function optionsValue3Get3(data: any,fieldName: string){
cursor:pointer; cursor:pointer;
} }
} }
.drawer-header {
display: flex;
align-items: center;
//padding: 12px;
}
.flex-grow {
/* 占据剩余的可用空间,将后面的元素推到右边 */
flex-grow: 1;
}
.drawer-close {
cursor: pointer;
//margin-left: 8px;
}
} }
</style> </style>

Loading…
Cancel
Save