Browse Source

合并李文轩代码

lwx_v12
超级管理员 1 year ago
parent
commit
f229012067
  1. 14
      src/components/DesignForm/app/formPage.vue
  2. 2
      src/components/DesignForm/assembly/index.ts
  3. 25
      src/components/DesignForm/formControlAttr.vue
  4. 23
      src/components/DesignForm/formControlPropertiNew.vue
  5. 7
      src/components/DesignForm/public/form/form.vue
  6. 9
      src/components/DesignForm/public/form/formGroup.vue
  7. 47
      src/components/DesignForm/public/form/formItem.vue
  8. 8
      src/types/components.d.ts
  9. 12
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue
  10. 43
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/pageForm.vue
  11. 16
      src/views/sysworkflow/lowcodepage/pageDesignes.vue
  12. 13
      src/views/sysworkflow/lowcodepage/pageFlow/appTableFlow.vue
  13. 15
      src/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue
  14. 13
      src/views/sysworkflow/lowcodepage/runApp/runAppForm.vue

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

@ -97,7 +97,11 @@ const emits = defineEmits<{
(e: 'btnClick', type: string): void (e: 'btnClick', type: string): void
(e: 'change', val: any): void // (e: 'change', val: any): void //
(e: 'update:issave', type: boolean): void (e: 'update:issave', type: boolean): void
<<<<<<< HEAD
(e: 'closePage', type: string): void (e: 'closePage', type: string): void
=======
(e: 'optionsValue3Get3', val: any,fieldName: string): void
>>>>>>> lwx_v11
}>() }>()
const route = useRoute() const route = useRoute()
@ -1025,6 +1029,14 @@ defineExpose({
// getEditData, // getEditData,
// submitEdit // submitEdit
}) })
function optionsValue3Get2(data: any,fieldName: string){
emits('optionsValue3Get3',data,fieldName)
}
</script> </script>
<template> <template>
<div class="common-layout"> <div class="common-layout">
@ -1067,7 +1079,7 @@ defineExpose({
}" }"
> >
<FormGroup :tableinfo="formData.form" :numrun="numrun" :data="formData.list" /> <FormGroup :tableinfo="formData.form" :numrun="numrun" :data="formData.list" @optionsValue3Get2="optionsValue3Get2"/>
<slot></slot> <slot></slot>
</el-form> </el-form>

2
src/components/DesignForm/assembly/index.ts

@ -14,7 +14,7 @@ const selectOption: any = [
}*/ }*/
] ]
const config: { optionsType: number } = { const config: { optionsType: number } = {
optionsType: 0 // 0固定 1数据源 2 接口字典 optionsType: 0 // 0固定 1数据源 2 接口字典 3系统表单字段
} }
export default [ export default [
{ {

25
src/components/DesignForm/formControlAttr.vue

@ -1153,7 +1153,7 @@
//liwenxuan 20240508 checkbox start //liwenxuan 20240508 checkbox start
let delflag = true let delflag = true
let breakFlag = 0 let breakFlag = 0
if(controlData.value.type === 'checkbox'){ if(controlData.value.type === 'checkbox'&& controlData.value.config.optionsType==0){
for(var i = 0;i < controlData.value.control.glxxszForCheckBox.length;i ++){ for(var i = 0;i < controlData.value.control.glxxszForCheckBox.length;i ++){
if(breakFlag>0){ if(breakFlag>0){
break break
@ -2432,7 +2432,9 @@ watch(()=>controlData.value.control,(newVal) => {
//radio,select //radio,select
watch(()=>controlData.value.options, (changedOptions:any) => { watch(()=>controlData.value.options, (changedOptions:any) => {
if(controlData.value.type === "radio" || controlData.value.type === "select"){ if(controlData.value.type === "radio" || controlData.value.type === "select"){
if(controlData.value.config.optionsType==0){
if(changedOptions.length===0){ if(changedOptions.length===0){
//option //option
controlData.value.control.glxxsz = [] controlData.value.control.glxxsz = []
@ -2461,13 +2463,17 @@ watch(()=>controlData.value.options, (changedOptions:any) => {
} }
} }
} }
}
}else if(controlData.value.type === "checkbox"){ }else if(controlData.value.type === "checkbox"){
} }
},{ deep: true }) },{ deep: true })
function createRowForGlxxsz(){ function createRowForGlxxsz(){
if(controlData.value.config.optionsType==0){
controlData.value.control.glxxszForCheckBox.push( controlData.value.control.glxxszForCheckBox.push(
{ {
conditionField: controlData.value.name, conditionField: controlData.value.name,
@ -2478,9 +2484,13 @@ function createRowForGlxxsz(){
) )
} }
}
function deleteRowForGlxxsz(row: { id: any }){ function deleteRowForGlxxsz(row: { id: any }){
if(controlData.value.config.optionsType==0){
controlData.value.control.glxxszForCheckBox = controlData.value.control.glxxszForCheckBox.filter((item: { id: any }) => item.id!=row.id) controlData.value.control.glxxszForCheckBox = controlData.value.control.glxxszForCheckBox.filter((item: { id: any }) => item.id!=row.id)
} }
}
/* */ /* */
const optionsValue3SettingDialogOpenFlag = ref(false) const optionsValue3SettingDialogOpenFlag = ref(false)
@ -2494,6 +2504,11 @@ function handleDetermineoptionsValue3(){
//liwenxuan20240426 end //liwenxuan20240426 end
function optionsTypeChanged(){
controlData.value.config.optionsFun = ''
controlData.value.options = []
}
@ -3118,13 +3133,13 @@ const disabledIstrue = (val:string) => {
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
<div v-if="showHide(['switch'],true)"> <div v-if="showHide(['switch'],true)&&controlData.config.optionsType==0">
<el-button @click="handelGlxxszDialogSwitch">关联选项设置</el-button> <el-button @click="handelGlxxszDialogSwitch">关联选项设置</el-button>
</div> </div>
<div v-if="showHide(['radio','select',],true)"> <div v-if="showHide(['radio','select',],true)&&controlData.config.optionsType==0">
<el-button @click="handelGlxxszDialog">关联选项设置</el-button> <el-button @click="handelGlxxszDialog">关联选项设置</el-button>
</div> </div>
<div v-if="showHide(['checkbox',],true)"> <div v-if="showHide(['checkbox',],true)&&controlData.config.optionsType==0">
<el-button @click="handelGlxxszDialogCheckbox">关联选项设置</el-button> <el-button @click="handelGlxxszDialogCheckbox">关联选项设置</el-button>
</div> </div>
<div <div
@ -3153,7 +3168,7 @@ const disabledIstrue = (val:string) => {
<el-form-item label="选项数据源" class="form_cont"> <el-form-item label="选项数据源" class="form_cont">
<el-select <el-select
v-model="controlData.config.optionsType" v-model="controlData.config.optionsType"
@change="controlData.config.optionsFun = ''" @change="optionsTypeChanged"
> >
<el-option :value="0" label="固定选项" /> <el-option :value="0" label="固定选项" />
<el-option :value="3" label="系统表单字段"/> <el-option :value="3" label="系统表单字段"/>

23
src/components/DesignForm/formControlPropertiNew.vue

@ -1194,7 +1194,7 @@ const delSelectOption = (index: number, type?: string) => {
//liwenxuan 20240508 checkbox start //liwenxuan 20240508 checkbox start
let delflag = true let delflag = true
let breakFlag = 0 let breakFlag = 0
if(controlData.value.type === 'checkbox'){ if(controlData.value.type === 'checkbox'&& controlData.value.config.optionsType==0){
for(var i = 0;i < controlData.value.control.glxxszForCheckBox.length;i ++){ for(var i = 0;i < controlData.value.control.glxxszForCheckBox.length;i ++){
if(breakFlag>0){ if(breakFlag>0){
break break
@ -2466,6 +2466,7 @@ watch(()=>controlData.value.control,(newVal) => {
//radio,select //radio,select
watch(()=>controlData.value.options, (changedOptions:any) => { watch(()=>controlData.value.options, (changedOptions:any) => {
if(controlData.value.type === "radio" || controlData.value.type === "select"){ if(controlData.value.type === "radio" || controlData.value.type === "select"){
if(controlData.value.config.optionsType==0){
if(changedOptions.length===0){ if(changedOptions.length===0){
//option //option
controlData.value.control.glxxsz = [] controlData.value.control.glxxsz = []
@ -2494,6 +2495,7 @@ watch(()=>controlData.value.options, (changedOptions:any) => {
} }
} }
} }
}
}else if(controlData.value.type === "checkbox"){ }else if(controlData.value.type === "checkbox"){
} }
@ -2501,6 +2503,7 @@ watch(()=>controlData.value.options, (changedOptions:any) => {
function createRowForGlxxsz(){ function createRowForGlxxsz(){
if(controlData.value.config.optionsType==0){
controlData.value.control.glxxszForCheckBox.push( controlData.value.control.glxxszForCheckBox.push(
{ {
conditionField: controlData.value.name, conditionField: controlData.value.name,
@ -2510,10 +2513,13 @@ function createRowForGlxxsz(){
} }
) )
} }
}
function deleteRowForGlxxsz(row: { id: any }){ function deleteRowForGlxxsz(row: { id: any }){
if(controlData.value.config.optionsType==0){
controlData.value.control.glxxszForCheckBox = controlData.value.control.glxxszForCheckBox.filter((item: { id: any }) => item.id!=row.id) controlData.value.control.glxxszForCheckBox = controlData.value.control.glxxszForCheckBox.filter((item: { id: any }) => item.id!=row.id)
} }
}
/* */ /* */
const optionsValue3SettingDialogOpenFlag = ref(false) const optionsValue3SettingDialogOpenFlag = ref(false)
@ -2529,6 +2535,13 @@ function handleDetermineoptionsValue3(){
//liwenxuan20240426 end //liwenxuan20240426 end
function optionsTypeChanged(){
controlData.value.config.optionsFun = ''
controlData.value.options = []
}
const optionsCss = [ const optionsCss = [
@ -3150,13 +3163,13 @@ const disabledIstrue = (val:string) => {
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
<div v-if="showHide(['switch'],true)"> <div v-if="showHide(['switch'],true)&&controlData.config.optionsType==0">
<el-button @click="handelGlxxszDialogSwitch">关联选项设置</el-button> <el-button @click="handelGlxxszDialogSwitch">关联选项设置</el-button>
</div> </div>
<div v-if="showHide(['radio','select',],true)"> <div v-if="showHide(['radio','select',],true)&&controlData.config.optionsType==0">
<el-button @click="handelGlxxszDialog">关联选项设置</el-button> <el-button @click="handelGlxxszDialog">关联选项设置</el-button>
</div> </div>
<div v-if="showHide(['checkbox',],true)"> <div v-if="showHide(['checkbox',],true)&&controlData.config.optionsType==0">
<el-button @click="handelGlxxszDialogCheckbox">关联选项设置</el-button> <el-button @click="handelGlxxszDialogCheckbox">关联选项设置</el-button>
</div> </div>
<div <div
@ -3185,7 +3198,7 @@ const disabledIstrue = (val:string) => {
<el-form-item label="选项数据源" class="form_cont"> <el-form-item label="选项数据源" class="form_cont">
<el-select <el-select
v-model="controlData.config.optionsType" v-model="controlData.config.optionsType"
@change="controlData.config.optionsFun = ''" @change="optionsTypeChanged"
> >
<el-option :value="0" label="固定选项" /> <el-option :value="0" label="固定选项" />
<el-option :value="3" label="系统表单字段"/> <el-option :value="3" label="系统表单字段"/>

7
src/components/DesignForm/public/form/form.vue

@ -84,6 +84,7 @@ const emits = defineEmits<{
(e: 'change', val: any): void // (e: 'change', val: any): void //
(e: 'update:issave', type: boolean): void (e: 'update:issave', type: boolean): void
(e: 'refresh'): void (e: 'refresh'): void
(e: 'optionsValue3Get3', val: any,fieldName: string): void
}>() }>()
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
@ -1587,6 +1588,10 @@ const submitEdit = (type: string, res: any) => {
} }
} }
function optionsValue3Get2(data: any,fieldName: string){
emits('optionsValue3Get3',data,fieldName)
}
defineExpose({ defineExpose({
setOptions, setOptions,
setValue, setValue,
@ -1616,7 +1621,7 @@ defineExpose({
}" }"
> >
<FormGroup :tableinfo="formData.form" :numrun="numrun" :data="formData.list" /> <FormGroup :tableinfo="formData.form" :numrun="numrun" :data="formData.list" @optionsValue3Get2="optionsValue3Get2"/>
<slot></slot> <slot></slot>
</el-form> </el-form>

9
src/components/DesignForm/public/form/formGroup.vue

@ -35,6 +35,7 @@ const props = withDefaults(
} }
) )
let emits = defineEmits(['optionsValue3Get2']);
const store = useDesignFormStore() as any // const store = useDesignFormStore() as any //
const formProps = inject(constFormProps, {}) as any const formProps = inject(constFormProps, {}) as any
@ -377,7 +378,13 @@ const getFormItemLableStyle = (ele: any) => {
return AnalysisCss(ele?.labelStyle) return AnalysisCss(ele?.labelStyle)
} }
} }
<<<<<<< HEAD
=======
function optionsValue3Get1(data: any,fieldName: string){
emits('optionsValue3Get2',data,fieldName)
}
>>>>>>> lwx_v11
</script> </script>
<template> <template>
<draggable <draggable
@ -586,7 +593,7 @@ const getFormItemLableStyle = (ele: any) => {
<UrlLink v-else-if="element.type === 'urllink'" :data="element" /> <UrlLink v-else-if="element.type === 'urllink'" :data="element" />
<SerialNumber v-else-if="element.type === 'serialNumber'" :data="element" :tablekey="props.tableinfo.name" :numrun="props.numrun" /> <SerialNumber v-else-if="element.type === 'serialNumber'" :data="element" :tablekey="props.tableinfo.name" :numrun="props.numrun" />
<!--其他组件--> <!--其他组件-->
<FormItem v-else :data="element" /> <FormItem v-else :data="element" @optionsValue3Get1="optionsValue3Get1"/>
<!--组件设计外功能框架--> <!--组件设计外功能框架-->
<template v-if="type === 5"> <template v-if="type === 5">

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

@ -37,6 +37,8 @@ import TextImg from "@/assets/image/tinymce.png"
import { AnalysisCss,AnalysisInputCss } from '@/components/DesignForm/public/form/calculate/cssInfo.ts' import { AnalysisCss,AnalysisInputCss } from '@/components/DesignForm/public/form/calculate/cssInfo.ts'
import request from '@/utils/request';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
data: FormList data: FormList
@ -47,6 +49,7 @@ const props = withDefaults(
) )
const emits = defineEmits<{ const emits = defineEmits<{
(e: 'update:modelValue', val: any): void (e: 'update:modelValue', val: any): void
(e: 'optionsValue3Get1', val: any,fieldName: string): void
}>() }>()
const route = useRoute() const route = useRoute()
const formProps = inject(constFormProps, {}) as any const formProps = inject(constFormProps, {}) as any
@ -187,6 +190,7 @@ const itemRules = computed(() => {
}) })
// data selectdata // data selectdata
const getAxiosOptions = debounce((data?: any) => { const getAxiosOptions = debounce((data?: any) => {
//console.log(props.data)
const { const {
optionsType, optionsType,
optionsFun, optionsFun,
@ -277,10 +281,53 @@ const getAxiosOptions = debounce((data?: any) => {
// console.log(res) // console.log(res)
// }) // })
} }
}else if(optionsType === 3){//liwenxuan 20240611
/*
在这里请求后台获取字段
*/
getFieldRecord(props.data.control.optionsValue3Field).then(({ data }) => {
//console.log(data)
//console.log(props.data.name)
let fieldName = props.data.name
//console.log(options.value)
//options.value = data
/*
*/
emits('optionsValue3Get1',data,fieldName)
//console.log(options.value)
//console.log()
})
} }
setFormDict(formProps.value.dict) // setFormDict(formProps.value.dict) //
} }
}) })
watch(
() => props.data.control.optionsValue3Field,
() => {
getAxiosOptions()
}
)
watch(
() => props.data.config.optionsType,
() => {
getAxiosOptions()
}
)
function getFieldRecord(param1: any) {
return request({
url: '/javasys/lowCode/AssociatedForms/getFieldRecord',
method: 'post',
data: {
optionsValue3Field:param1
},
});
}
watch( watch(
() => formProps.value.model[sourceFunKey.value], () => formProps.value.model[sourceFunKey.value],
() => { () => {

8
src/types/components.d.ts

@ -127,6 +127,7 @@ declare module '@vue/runtime-core' {
IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default'] IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
IEpCaretTop: typeof import('~icons/ep/caret-top')['default'] IEpCaretTop: typeof import('~icons/ep/caret-top')['default']
IEpClose: typeof import('~icons/ep/close')['default'] IEpClose: typeof import('~icons/ep/close')['default']
<<<<<<< HEAD
IEpCollection: typeof import('~icons/ep/collection')['default'] IEpCollection: typeof import('~icons/ep/collection')['default']
IEpDelete: typeof import('~icons/ep/delete')['default'] IEpDelete: typeof import('~icons/ep/delete')['default']
IEpDownload: typeof import('~icons/ep/download')['default'] IEpDownload: typeof import('~icons/ep/download')['default']
@ -137,6 +138,13 @@ declare module '@vue/runtime-core' {
IEpPicture: typeof import('~icons/ep/picture')['default'] IEpPicture: typeof import('~icons/ep/picture')['default']
IEpPlus: typeof import('~icons/ep/plus')['default'] IEpPlus: typeof import('~icons/ep/plus')['default']
IEpPosition: typeof import('~icons/ep/position')['default'] IEpPosition: typeof import('~icons/ep/position')['default']
=======
IEpDelete: typeof import('~icons/ep/delete')['default']
IEpEdit: typeof import('~icons/ep/edit')['default']
IEpMessageBox: typeof import('~icons/ep/message-box')['default']
IEpOperation: typeof import('~icons/ep/operation')['default']
IEpPlus: typeof import('~icons/ep/plus')['default']
>>>>>>> lwx_v11
IEpRefresh: typeof import('~icons/ep/refresh')['default'] IEpRefresh: typeof import('~icons/ep/refresh')['default']
IEpRefreshLeft: typeof import('~icons/ep/refresh-left')['default'] IEpRefreshLeft: typeof import('~icons/ep/refresh-left')['default']
IEpSearch: typeof import('~icons/ep/search')['default'] IEpSearch: typeof import('~icons/ep/search')['default']

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

@ -198,6 +198,17 @@ const gainAppFormPageInit = () =>{
} }
} }
function optionsValue3Get3(data: any,fieldName: string){
for(let i = 0; i < stateForm.formData.list.length; i++){
if(stateForm.formData.list[i].name==fieldName){
stateForm.formData.list[i].options = []
for(let j = 0;j<data.length;j++){
stateForm.formData.list[i].options.push(data[j])
}
}
}
}
defineExpose({ defineExpose({
gainAppFormPageInit gainAppFormPageInit
}) })
@ -245,6 +256,7 @@ defineExpose({
:close-app-submit="closeAppSubmit" :close-app-submit="closeAppSubmit"
:change-key-val="changeKeyVal" :change-key-val="changeKeyVal"
:save-draft-page="saveDraftPage" :save-draft-page="saveDraftPage"
@optionsValue3Get3="optionsValue3Get3"
/> />
</el-scrollbar> </el-scrollbar>

43
src/views/sysworkflow/lowcodepage/appPage/appPageForm/pageForm.vue

@ -501,6 +501,47 @@ const versionPreviewPage = (val:string) => {
} }
} }
//liwenxuan bug: start
const formNameChanged = (param1: any)=>{
for(let i = 0; i < state.value.formData.list.length; i++){
if(state.value.formData.list[i].type=="radio"||state.value.formData.list[i].type=="select"||state.value.formData.list[i].type=="checkbox"){
if(state.value.formData.list[i].control.glxxsz!=undefined&&state.value.formData.list[i].control.glxxsz.length>0){
state.value.formData.list[i].control.glxxsz = []
state.value.formData.list[i].options.push({
label: '',
value: ''
})
state.value.formData.list[i].options.pop();
}
if(state.value.formData.list[i].control.glxxszForCheckBox!=undefined&&state.value.formData.list[i].control.glxxszForCheckBox.length>0){
state.value.formData.list[i].control.glxxszForCheckBox = []
}
}
}
ElMessage({
message: '因字段标识改变,本表单的所有单选、多选、下拉的关联选项设置已重置,请重新设置。',
type: 'warning',
})
}
//liwenxuan bug: end
function optionsValue3Get3(data: any,fieldName: string){
console.log(state.value.formData.list)
console.log(data)
console.log(fieldName)
for(let i = 0; i < state.value.formData.list.length; i++){
if(state.value.formData.list[i].name==fieldName){
state.value.formData.list[i].options = []
for(let j = 0;j<data.length;j++){
state.value.formData.list[i].options.push(data[j])
}
}
}
}
</script> </script>
<template> <template>
<el-aside class="asideBox leftBox"> <el-aside class="asideBox leftBox">
@ -529,6 +570,7 @@ const versionPreviewPage = (val:string) => {
:type="5" :type="5"
:form-data="state.formData" :form-data="state.formData"
:dict="state.formDict" :dict="state.formDict"
@optionsValue3Get3="optionsValue3Get3"
/> />
</div> </div>
</el-main> </el-main>
@ -544,6 +586,7 @@ const versionPreviewPage = (val:string) => {
:is-edit="isEdit" :is-edit="isEdit"
:form-field="formFieldAry" :form-field="formFieldAry"
@open-dialog="openAceEditDrawer" @open-dialog="openAceEditDrawer"
@form-name-change="formNameChanged"
/> />
</el-aside> </el-aside>
<ace-drawer <ace-drawer

16
src/views/sysworkflow/lowcodepage/pageDesignes.vue

@ -623,6 +623,21 @@ function refreshFunc(){
index.value = index.value+1 index.value = index.value+1
} }
function optionsValue3Get3(data: any,fieldName: string){
/* console.log(state.value.formData.list)
console.log(data)
console.log(fieldName) */
for(let i = 0; i < state.value.formData.list.length; i++){
if(state.value.formData.list[i].name==fieldName){
state.value.formData.list[i].options = []
for(let j = 0;j<data.length;j++){
state.value.formData.list[i].options.push(data[j])
}
}
}
}
</script> </script>
<template> <template>
@ -649,6 +664,7 @@ function refreshFunc(){
:type="5" :type="5"
:form-data="state.formData" :form-data="state.formData"
:dict="state.formDict" :dict="state.formDict"
@optionsValue3Get3="optionsValue3Get3"
/> />
</div> </div>
</div> </div>

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

@ -485,6 +485,18 @@ const initLoadData = () => {
} }
} }
function optionsValue3Get3(data: any,fieldName: string){
for(let i = 0; i < stateForm.formData.list.length; i++){
if(stateForm.formData.list[i].name==fieldName){
stateForm.formData.list[i].options = []
for(let j = 0;j<data.length;j++){
stateForm.formData.list[i].options.push(data[j])
}
}
}
}
</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" >
@ -502,6 +514,7 @@ const initLoadData = () => {
:version-id="versionid" :version-id="versionid"
:after-submit="afterSubmit" :after-submit="afterSubmit"
add-url="addData" add-url="addData"
@optionsValue3Get3="optionsValue3Get3"
/> />
</el-drawer> </el-drawer>

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

@ -62,7 +62,7 @@ const state = reactive<any>({
id: 0, id: 0,
loading: true loading: true
}) })
const emits = defineEmits(["update:isopen","searchquery"]); const emits = defineEmits(["update:isopen","searchquery","optionsValue3Get4"]);
const drawerOpenOrClose = computed({ const drawerOpenOrClose = computed({
get: () => props.isopen, get: () => props.isopen,
set: (val) => { set: (val) => {
@ -408,6 +408,18 @@ const saveDraftPage = (type: string,val?:any) => {
} }
closeAppSubmit() closeAppSubmit()
} }
function optionsValue3Get3(data: any,fieldName: string){
for(let i = 0; i < state.formData.list.length; i++){
if(state.formData.list[i].name==fieldName){
state.formData.list[i].options = []
for(let j = 0;j<data.length;j++){
state.formData.list[i].options.push(data[j])
}
}
}
}
</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" >
@ -452,6 +464,7 @@ const saveDraftPage = (type: string,val?:any) => {
:after-submit="afterSubmit" :after-submit="afterSubmit"
:close-app-submit="closeAppSubmit" :close-app-submit="closeAppSubmit"
:save-draft-page="saveDraftPage" :save-draft-page="saveDraftPage"
@optionsValue3Get3="optionsValue3Get3"
/> />
</div> </div>
</el-drawer> </el-drawer>

13
src/views/sysworkflow/lowcodepage/runApp/runAppForm.vue

@ -171,6 +171,18 @@ watch(() => props.pickAppMenu,(val:any) => {
},{ },{
deep: true deep: true
}) })
function optionsValue3Get3(data: any,fieldName: string){
for(let i = 0; i < stateForm.formData.list.length; i++){
if(stateForm.formData.list[i].name==fieldName){
stateForm.formData.list[i].options = []
for(let j = 0;j<data.length;j++){
stateForm.formData.list[i].options.push(data[j])
}
}
}
}
</script> </script>
<template> <template>
<el-row> <el-row>
@ -204,6 +216,7 @@ watch(() => props.pickAppMenu,(val:any) => {
:sign-code="appInitData.signCode" :sign-code="appInitData.signCode"
:version-id="appInitData.versionId" :version-id="appInitData.versionId"
add-url="addData" add-url="addData"
@optionsValue3Get3="optionsValue3Get3"
/> />
</el-card> </el-card>

Loading…
Cancel
Save