Browse Source

Merge branch 'lwx_v9'

# Conflicts:
#	src/types/components.d.ts
#	src/views/sysworkflow/lowcodepage/pageDesignes.vue
lwx_v10
超级管理员 1 year ago
parent
commit
06e3e3ad68
  1. BIN
      src/assets/paintboard.png
  2. 1507
      src/components/DesignForm/assembly/index.ts
  3. 313
      src/components/DesignForm/formControlAttr.vue
  4. 147
      src/components/DesignForm/public/form/form.vue
  5. 8
      src/types/components.d.ts
  6. 7
      src/views/sysworkflow/lowcodepage/pageDesignes.vue
  7. 39
      src/widget/writingboard/vueSignature.vue

BIN
src/assets/paintboard.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 13 KiB

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

File diff suppressed because it is too large

313
src/components/DesignForm/formControlAttr.vue

@ -619,19 +619,19 @@
path: 'config.componentName',
vShow: ['component']
},
{
label: '隐藏条件',
{
label: '关联表单',
value: config.associatedForms,
path: 'config.associatedForms',
type: 'associatedForms_hide',
type: 'associatedForms_form',
vIf: state.isSearch,
vShow: ['associatedForms']
},
{
label: '关联表单',
{
label: '隐藏条件',
value: config.associatedForms,
path: 'config.associatedForms',
type: 'associatedForms_form',
type: 'associatedForms_hide',
vIf: state.isSearch,
vShow: ['associatedForms']
},
@ -1609,7 +1609,8 @@
let currentUploadImgid = "";
//,imgiddesignForm.activeKey,,controlData.value.type=='lowcodeCarsusel',imgid=''uuid
watch(()=>store.activeKey, () => {
watch(()=>store.activeKey, (newVal) => {
//
if(controlData.value.type==='lowcodeCarsusel'){
const carsuselConfigData:CarsuselConfig[] = controlData.value.control.carsuselConfigArr
carsuselConfigData.forEach(element => {
@ -1623,6 +1624,35 @@
}else if(controlData.value.type==='associatedForms'){
controlData.value.control.fillRoles[0].id = uuidv4().replaceAll('-','').toString();
}
// start
//console.log(controlData.value.name)
resDataForGlxxszExceptself1 = JSON.parse(JSON.stringify(resDataForGlxxszExceptself));
//console.log(resDataForGlxxszExceptself1)
for(let i = 0;i<resDataForGlxxszExceptself1.length;i++){
let strArr:[string] = resDataForGlxxszExceptself1[i].id.split(":")
//console.log(strArr)
let str = strArr[strArr.length-1]
//console.log(str)
if(str==newVal){
resDataForGlxxszExceptself1.splice(i, 1); // 使1
i--; //
}
}
//console.log(resDataForGlxxszExceptself1)
if(getAssociatedFormsCurrentFieldTreeData.treeAttrs!=undefined){
associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value = [{
id: 'rootid_'+getAssociatedFormsCurrentFieldTreeData.label,
//label: '',
label: '当前表单-'+getAssociatedFormsCurrentFieldTreeData.treeAttrs.show,
children: resDataForGlxxszExceptself1,
treeAttrs: getAssociatedFormsCurrentFieldTreeData.treeAttrs,//
}]
}
//associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value.children = [...resDataForGlxxszExceptself1]
// end
})
//
function carouselImgUploadSuccess(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles){
@ -1876,9 +1906,22 @@ function getAsfasfFieldTree() {
});
}
function getAsfasfFieldTreeOptionsValue3() {
return request({
url: '/javasys/lowCode/AssociatedForms/getFieldTree',
method: 'post',
data: {
//cfid:'13'
cfid:controlData.value.control.optionsValue3Formid
},
});
}
//
const asfasfFieldTree = ref<Tree[]>()
const asfasfFieldTreeOptionsValue3 = ref<Tree[]>()
function formidChanged(){
if(controlData.value.control.formid===''){
@ -1898,14 +1941,85 @@ function formidChanged(){
treeAttrs: data.treeAttrs,
}]
}
controlData.value.control.asfasfLabel = data.label
});
}
}
function formidChangedOptionsValue3(){
if(controlData.value.control.optionsValue3Formid===''){
}else{
getAsfasfFieldTreeOptionsValue3().then(({ data }) => {
if(data.id==="cfid为空"){
//alert("cfid")
}else{
if(data.treeAttrs.onlyToShowTableId==""){//
let resData = ref(data.children)
//let rootid_ = data.value.label
asfasfFieldTreeOptionsValue3.value = [{
id: 'rootid_'+data.label,
label: '关联的表单-'+data.label,
children: [...resData.value],
treeAttrs: data.treeAttrs,
}]
}else{//
let resData = ref(data.children)
resData.value = resData.value.filter((item: { children: null }) => item.children != null)
let arr = JSON.parse(JSON.stringify(resData.value));
arr = arr.filter( (item: { label: any }) => item.label == data.treeAttrs.onlyToShowTableId )
arr = arr[0].children
//console.log(arr)
asfasfFieldTreeOptionsValue3.value = [{
id: 'rootid_'+data.label,
label: '关联的表单-'+data.label,
children: [...arr],
treeAttrs: data.treeAttrs,
}]
}
let optionsValue3Formid = controlData.value.control.optionsValue3Formid
let str_optionsValue3Formid = optionsValue3Formid.split(":")[0]
let optionsValue3Field = controlData.value.control.optionsValue3Field
let str_optionsValue3Field = optionsValue3Field.split(":")[1]
//alert(str_optionsValue3Field)
if(typeof(str_optionsValue3Field)!='undefined'){
if(str_optionsValue3Formid!=str_optionsValue3Field){
controlData.value.control.optionsValue3Field = ""
}else{
if(optionsValue3Formid.includes(":zibiaoid-")){
let zibiaoid = optionsValue3Formid.split(":zibiaoid-")[1]
if(!optionsValue3Field.includes(zibiaoid)){
controlData.value.control.optionsValue3Field = ""
}
}
}
}
}
});
}
}
const associatedFormsCurrentFormFieldTree = ref<Tree[]>()
const associatedFormsCurrentFormFieldTreeForGlxxsz = ref<Tree[]>()
let associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf = ref<Tree[]>()
let resDataForGlxxszExceptself: any[] = []
let resDataForGlxxszExceptself1: any[] = []
let getAssociatedFormsCurrentFieldTreeData:any
getAssociatedFormsCurrentFieldTree().then(({ data }) => {
//console.log(data)
getAssociatedFormsCurrentFieldTreeData = JSON.parse(JSON.stringify(data))
//console.log(getAssociatedFormsCurrentFieldTreeData)
if(data.id==="cfid为空"){
//alert("cfid")
}else{
@ -1921,6 +2035,11 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => {
let resDataForGlxxsz = ref(data.children.slice(8))
resDataForGlxxszExceptself = JSON.parse(JSON.stringify(resDataForGlxxsz.value));
//console.log(resDataForGlxxszExceptself)
associatedFormsCurrentFormFieldTreeForGlxxsz.value = [{
id: 'rootid_'+data.label,
@ -1929,6 +2048,15 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => {
children: [...resDataForGlxxsz.value],
treeAttrs: data.treeAttrs,
}]
associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value = [{
id: 'rootid_'+data.label,
//label: '',
label: '当前表单-'+data.treeAttrs.show,
children: [...resDataForGlxxsz.value],
treeAttrs: data.treeAttrs,//getAssociatedFormsCurrentFieldTreeData
}]
}
});
@ -2191,6 +2319,11 @@ watch(()=>store.activeKey, () => {
setTimeout(() => {
formidChanged()
}, 800);
}else if(controlData.value.type==='radio'||controlData.value.type==='select'||controlData.value.type==='checkbox'){
setTimeout(() => {
formidChangedOptionsValue3()
}, 800);
}
})
@ -2213,6 +2346,14 @@ function delRole(id:String){
}
}
}
const associatedFormsChooseDialogFlag = ref(false)
function chooseAssociatedForm(){
associatedFormsChooseDialogFlag.value = true
}
function handleDetermineAssociatedFormsChooseDialog(){
associatedFormsChooseDialogFlag.value = false
}
//liwenxuan20240403 associatedForms end
@ -2222,6 +2363,14 @@ function delRole(id:String){
const glxxszDialogFlag = ref(false)
const glxxszDialogFlagCheckBox = ref(false)
const glxxszDialogFlagSwitch = ref(false)
function handelGlxxszDialogSwitch(){
if(controlData.value.control.activeValue==undefined||controlData.value.control.inactiveValue==undefined){
alert("请先设置开关状态打开/关闭时的值")
}else{
glxxszDialogFlagSwitch.value = true
}
}
function handelGlxxszDialog(){
if(controlData.value.options.length===0){
alert("无可配置选项,请先添加。")
@ -2237,9 +2386,27 @@ function handelGlxxszDialogCheckbox(){
function handleDetermineGlxxszDialog(){
glxxszDialogFlag.value = false
}
function handleDetermineGlxxszDialogSwitch(){
glxxszDialogFlagSwitch.value = false
}
function handleDetermineGlxxszDialogCheckBox(){
glxxszDialogFlagCheckBox.value = false
}
//
watch(()=>controlData.value.control,(newVal) => {
if(typeof(newVal)!="undefined"){
if(typeof(newVal.glxxszSwitch)!="undefined"){
if(typeof(controlData.value.control.activeValue)!="undefined"){
controlData.value.control.glxxszSwitch[0].openValue = controlData.value.control.activeValue
controlData.value.control.glxxszSwitch[0].conditionField = controlData.value.name
}
if(typeof(controlData.value.control.inactiveValue)!="undefined"){
controlData.value.control.glxxszSwitch[1].offValue = controlData.value.control.inactiveValue
controlData.value.control.glxxszSwitch[1].conditionField = controlData.value.name
}
}
}
},{ deep: true })
@ -2295,8 +2462,17 @@ function createRowForGlxxsz(){
function deleteRowForGlxxsz(row: { id: any }){
controlData.value.control.glxxszForCheckBox = controlData.value.control.glxxszForCheckBox.filter((item: { id: any }) => item.id!=row.id)
}
/* */
const optionsValue3SettingDialogOpenFlag = ref(false)
function optionsValue3Setting(){
optionsValue3SettingDialogOpenFlag.value = true
}
function handleDetermineoptionsValue3(){
optionsValue3SettingDialogOpenFlag.value = false
}
//bug:
//liwenxuan20240426 end
@ -2765,18 +2941,8 @@ const loadNextPage = () => {
<el-row v-else-if="item.type === 'associatedForms_form'">
<div style="margin-top: 25px;margin-left: -60px;">
<el-tree-select
v-model="controlData.control.formid"
style="width: 260px;"
:data="customerFormTree[0].children"
check-strictly
:render-after-expand="false"
filterable
@change="formidChanged"
/>
</div>
<!-- <div v-html="controlData.control.formid"></div> -->
<el-button type="primary" link style="display:block;cursor: pointer;" @click="chooseAssociatedForm">{{ controlData.control.asfasfLabel==''?'选择关联表单':controlData.control.asfasfLabel }}</el-button>
</el-row>
<el-row v-else-if="item.type === 'associatedForms_dataRange'">
@ -2920,6 +3086,9 @@ const loadNextPage = () => {
</el-form-item>
</div>
</div>
<div v-if="showHide(['switch'],true)">
<el-button @click="handelGlxxszDialogSwitch">关联选项设置</el-button>
</div>
<div v-if="showHide(['radio','select',],true)">
<el-button @click="handelGlxxszDialog">关联选项设置</el-button>
</div>
@ -2955,6 +3124,7 @@ const loadNextPage = () => {
@change="controlData.config.optionsFun = ''"
>
<el-option :value="0" label="固定选项" />
<el-option :value="3" label="系统表单字段"/>
<el-option :value="1" label="数据源" />
<el-option :value="2" label="接口字典" />
</el-select>
@ -2984,6 +3154,10 @@ const loadNextPage = () => {
<el-button @click="addSelectOption">{{ controlData.type === 'cascader' ? '编辑' : '新增' }}</el-button>
</el-form-item>
</template>
<template v-if="controlData.config.optionsType === 3">
<el-button type="primary" style="margin-bottom:10px;margin-left:11px" plain @click="optionsValue3Setting">选择系统表单字段</el-button>
<!-- <el-button style="padding-top: 5px;" type="primary" link append-to-body="true" modal="true" @click="optionsValue3Setting" >选择系统表单字段</el-button> -->
</template>
<template v-else>
<el-form-item class="form_cont">
<el-input
@ -3502,6 +3676,32 @@ const loadNextPage = () => {
<el-dialog v-model="associatedFormsChooseDialogFlag" class="glxxsztc" top="150px" :close-on-click-modal="false" title="选择关联表单" :show-close="false" style="margin-top:70px;" width="50%" >
<template v-if="controlData.type=='associatedForms'">
<div style="display:flex;margin-bottom: 2px;margin-top:28px"><span style="font-size: larger;margin-left: 35px;margin-right: 15px;">请选择表单</span>
<el-tree-select
v-model="controlData.control.formid"
style="width: 390px;"
:data="customerFormTree[0].children"
check-strictly
:render-after-expand="false"
filterable
@change="formidChanged"
/>
</div>
</template>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="handleDetermineAssociatedFormsChooseDialog">
确定
</el-button>
</div>
</template>
</el-dialog>
<el-dialog v-model="associatedFormsHideDialogFlag" title="隐藏条件" top="150px" :close-on-click-modal="false" :show-close="false" style="margin-top:70px ;min-height: 500px" width="50%" >
<template v-if="controlData.type=='associatedForms'">
@ -3749,8 +3949,8 @@ const loadNextPage = () => {
<!-- 关联表单设置弹窗 liwenxuan 20240402 end -->
<!-- 关联选项设置弹窗 liwenxuan 20240426 start -->
<el-dialog v-model="glxxszDialogFlag" class="glxxsztc" top="150px" :close-on-click-modal="false" title="关联选项设置" :show-close="false" style="margin-top:70px;" width="50%" >
<!-- 关联选项设置弹窗 liwenxuan 20240426 start --> <!-- :title="`关联选项设置--`+controlData.item.label+`--`+controlData.name" -->
<el-dialog v-model="glxxszDialogFlag" class="glxxsztc" top="150px" :close-on-click-modal="false" :title="`关联选项设置--`+controlData.name" :show-close="false" style="margin-top:70px;" width="50%" >
@ -3770,7 +3970,7 @@ const loadNextPage = () => {
<el-table-column fixed="right" label="显示以下组件" >
<template #default="fieldScope">
<el-tree-select v-model="controlData.control.glxxsz[fieldScope.$index].showFields" style="width: 100%" :data="associatedFormsCurrentFormFieldTreeForGlxxsz[0].children" multiple />
<el-tree-select v-model="controlData.control.glxxsz[fieldScope.$index].showFields" style="width: 100%" :data="associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf[0].children" multiple />
</template>
</el-table-column>
</el-table>
@ -3785,7 +3985,7 @@ const loadNextPage = () => {
</template>
</el-dialog>
<el-dialog v-model="glxxszDialogFlagCheckBox" class="glxxsztc" top="150px" :close-on-click-modal="false" title="关联选项设置" :show-close="false" style="margin-top:70px;" width="50%" >
<el-dialog v-model="glxxszDialogFlagCheckBox" class="glxxsztc" top="150px" :close-on-click-modal="false" :title="`关联选项设置--`+controlData.name" :show-close="false" style="margin-top:70px;" width="50%" >
@ -3803,7 +4003,7 @@ const loadNextPage = () => {
<el-table-column fixed="right" label="显示以下组件" >
<template #default="fieldScope">
<el-tree-select v-model="controlData.control.glxxszForCheckBox[fieldScope.$index].showFields" style="width: 100%" :data="associatedFormsCurrentFormFieldTreeForGlxxsz[0].children" multiple />
<el-tree-select v-model="controlData.control.glxxszForCheckBox[fieldScope.$index].showFields" style="width: 100%" :data="associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf[0].children" multiple />
</template>
</el-table-column>
@ -3831,7 +4031,68 @@ const loadNextPage = () => {
</template>
</el-dialog>
<el-dialog v-model="glxxszDialogFlagSwitch" class="glxxsztc" top="150px" :close-on-click-modal="false" :title="`关联选项设置--`+controlData.name" :show-close="false" style="margin-top:70px;" width="50%" >
<template v-if="controlData.type=='switch'">
<div style="display:flex;margin-bottom: 20px;margin-top:20px"><span style="font-size: larger;margin-left: 35px;margin-right: 15px;">当开关打开时显示</span>
<el-tree-select v-model="controlData.control.glxxszSwitch[0].showFields" style="width: 60%" :data="associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf[0].children" multiple />
</div>
<div style="display:flex"><span style="font-size: larger;margin-left: 35px;margin-right: 15px;">当开关关闭时显示</span>
<el-tree-select v-model="controlData.control.glxxszSwitch[1].showFields" style="width: 60%" :data="associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf[0].children" multiple />
</div>
</template>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="handleDetermineGlxxszDialogSwitch">
确定
</el-button>
</div>
</template>
</el-dialog>
<!-- 关联选项设置弹窗 liwenxuan 20240426 end -->
<!-- 单选下拉多选选项来源value3--系统表单字段 start-->
<el-dialog v-model="optionsValue3SettingDialogOpenFlag" class="glxxsztc" top="150px" :close-on-click-modal="false" title="选择表单字段" :show-close="false" style="margin-top:70px;" width="50%" >
<template v-if="controlData.type=='radio'||controlData.type=='select'||controlData.type=='checkbox'">
<div style="display:flex;margin-bottom: 20px;margin-top:20px"><span style="font-size: larger;margin-left: 35px;margin-right: 15px;">请选择表单</span>
<el-tree-select
v-model="controlData.control.optionsValue3Formid"
style="width: 390px;"
:data="customerFormTree[0].children"
check-strictly
:render-after-expand="false"
filterable
@change="formidChangedOptionsValue3"
/>
</div>
<div style="display:flex" v-if="typeof(controlData.control.optionsValue3Formid)!='undefined' && typeof(asfasfFieldTreeOptionsValue3)!='undefined' && controlData.control.optionsValue3Formid!=''"><span style="font-size: larger;margin-left: 35px;margin-right: 15px;">请选择字段</span>
<!--
-->
<el-tree-select v-model="controlData.control.optionsValue3Field" style="width: 390px;" :data="asfasfFieldTreeOptionsValue3[0].children" />
</div>
</template>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="handleDetermineoptionsValue3">
确定
</el-button>
</div>
</template>
</el-dialog>
<!-- 单选下拉多选选项来源value3--系统表单字段 end-->
</template>
<style lang='scss' scoped>

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

@ -164,7 +164,9 @@ const forEachGetFormModel = (list: FormList[], obj: any) => {
})
} else if (['card', 'div'].includes(item.type)) {
forEachGetFormModel(item.list, obj)
} else {
} /* else if(['switch'].includes(item.type)){
console.log(item)
} */else {
const excludeType = ['title', 'divider', 'txt', 'button']
if (excludeType.indexOf(item.type) === -1) {
obj[item.name] = jsonParseStringify(item.control.modelValue)
@ -219,6 +221,9 @@ const recursionToGetFinallyHideFields = (hideFieldArr: any[],radioSelectArr3: st
/* console.log("modelKeyArr^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
console.log(modelKeyArr) */
//console.log("-------------------")
//console.log(model.value)
//
@ -295,7 +300,7 @@ const recursionToGetFinallyHideFields = (hideFieldArr: any[],radioSelectArr3: st
console.log(conditionFieldValue) */
for(let n = 0; n< modelKeyArr.length;n++){
if(modelKeyArr[n]==conditionField){
let count_1 = 0;
//let count_1 = 0;
let trueValue = model.value[modelKeyArr[n]]
if(trueValue.length>0&&arrayEqual(trueValue,conditionFieldValueArr)){
//,conditionField.,x.
@ -304,7 +309,7 @@ const recursionToGetFinallyHideFields = (hideFieldArr: any[],radioSelectArr3: st
console.log(toshow) */
let flag = false//.,
//conditionField,x++
for(let a = 0;a<hideFieldConditionArr.length;a++){
/* for(let a = 0;a<hideFieldConditionArr.length;a++){
if(hideFieldConditionArr[a].toShow==conditionField){//conditions.length>1,=1.
for(let b = 0;b<hideFieldConditionArr[a].conditions.length;b++){
for(let c = 0;c<hideFieldConditionArr[a].conditions[b].condition.length;c++){
@ -315,7 +320,7 @@ const recursionToGetFinallyHideFields = (hideFieldArr: any[],radioSelectArr3: st
}
}
}
}
} */
if(flag==false){
x++
hideFieldsFromCheckbox.push(toshow)
@ -332,7 +337,7 @@ const recursionToGetFinallyHideFields = (hideFieldArr: any[],radioSelectArr3: st
//console.log(conditionFieldValue)
for(let n = 0; n< modelKeyArr.length;n++){
if(modelKeyArr[n]==conditionField){
let count_1 = 0;
//let count_1 = 0;
let trueValue = model.value[modelKeyArr[n]]
//console.log(modelKeyArr[n])
//console.log(trueValue)
@ -371,6 +376,9 @@ const recursionToGetFinallyHideFields = (hideFieldArr: any[],radioSelectArr3: st
model.value[hideFieldArr[i]] = ""
}else if( model.value[hideFieldArr[i]] instanceof Array){
model.value[hideFieldArr[i]] = []
}else if(typeof model.value[hideFieldArr[i]] == "boolean"){
model.value[hideFieldArr[i]] = false
}
}
//
@ -473,6 +481,39 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any)
}
// })
showOrHide()
if (typeof props.changeKeyVal === 'function') {
props.changeKeyVal(key, value,type,attribute)
}
if (key) {
if (!tProp) {
// change
model.value[key] = value
}
// 线AB
if (props.formData.events?.change) {
model.value = props.formData.events.change(key, model.value)
}
const onFormChange = props.formData.events?.change
if (onFormChange) {
if (typeof onFormChange === 'function') {
model.value = onFormChange(key, model.value)
} else {
model.value = formChangeValue(key, model.value, onFormChange)
}
}
// tProps
emits('change', { key, value, model: model.value, data, tProp })
}
/*
*/
})
function showOrHide (){
//liwenxuan start
/* console.log("-1-constControlChange-->",props.formData)
console.log("监听表单-2-constControlChange-->",key)
@ -492,13 +533,14 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any)
//radio,checkbox,select
//radio,checkbox,select,switch
const radioSelectShowConfigArr = []
const checkboxShowConfigArr = []
const switchShowConfigArr = []
//showFieldskey,optionValuevalue,radioselectArr2----
const radioSelectArr2:any[] = []
for(let i = 0;i<props.formData.list.length;i++){
if(props.formData.list[i].type=="radio"||props.formData.list[i].type=="select"||props.formData.list[i].type=="checkbox"){
if(props.formData.list[i].type=="radio"||props.formData.list[i].type=="select"||props.formData.list[i].type=="checkbox"||props.formData.list[i].type=="switch"){
props.formData.config.hideField = [];
}
//console.log(props.formData.list[i].type)
@ -508,15 +550,18 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any)
}else if(props.formData.list[i].type=="checkbox"){
checkboxShowConfigArr.push(props.formData.list[i].control.glxxszForCheckBox)
}else if(props.formData.list[i].type=="switch"){
switchShowConfigArr.push(props.formData.list[i].control.glxxszSwitch)
}
}
//
const radioSelectShowConfigArr2 = JSON.parse(JSON.stringify(radioSelectShowConfigArr));
const checkboxShowConfigArr2 = JSON.parse(JSON.stringify(checkboxShowConfigArr));
const switchShowConfigArr2 = JSON.parse(JSON.stringify(switchShowConfigArr));
/* console.log(radioSelectShowConfigArr2)
console.log(checkboxShowConfigArr2) */
//console.log("fodijafkjlsdhoidnfoidshojhfeknsidjfoiewhofnosdifhjeonoidufeinkdsaofhe")
//console.log(switchShowConfigArr2)
if(radioSelectShowConfigArr2.length>0){
for(let i = 0;i<radioSelectShowConfigArr2.length;i++){
@ -565,7 +610,28 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any)
}
}
//radioSelectArr2,radioSelectArr2
if(switchShowConfigArr2.length>0){
for(let i = 0;i<switchShowConfigArr2.length;i++){
if(switchShowConfigArr2[i].length>0){
for(let j = 0; j<switchShowConfigArr2[i].length;j++){
if(switchShowConfigArr2[i][j].showFields.length>0){
for(let n = 0; n<switchShowConfigArr2[i][j].showFields.length;n++){
//console.log("99999999999999999999------"+switchShowConfigArr2[i][j].showFields[n])
let fieldKeyArr = switchShowConfigArr2[i][j].showFields[n].split(":")
let fieldKeyStr = fieldKeyArr[fieldKeyArr.length-1]
//console.log(fieldKeyStr)
radioSelectArr2.push({
toShowFieldKey:fieldKeyStr,
})
}
}
}
}
}
}
//console.log("radioSelectArr2radioSelectArr2radioSelectArr2radioSelectArr2radioSelectArr2=======")
//console.log(radioSelectArr2)
//showFieldskey,optionValuevalue,radioselectArr3 ---
const radioSelectArr3:any[] = []
@ -645,9 +711,35 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any)
}
}
}
//console.log(radioSelectArr3)
//radioSelectArr3
if(switchShowConfigArr2.length>0){
for(let i = 0;i<switchShowConfigArr2.length;i++){
if(switchShowConfigArr2[i].length>0){
for(let j = 0;j<switchShowConfigArr2[i].length;j++){
//
const jArr = JSON.parse(JSON.stringify(switchShowConfigArr2[i][j]));
//console.log("111111111111111111111-----------"+JSON.stringify(switchShowConfigArr2[i][j]))
if(jArr.showFields!=undefined&&jArr.showFields.length>0){
const optionValueJArr = typeof(jArr.openValue)=="undefined"?jArr.offValue:jArr.openValue
let arr1 = []
for(let n = 0;n<jArr.showFields.length;n++){
let fieldKeyArr = jArr.showFields[n].split(":")
let fieldKeyStr = fieldKeyArr[fieldKeyArr.length-1]
//console.log(fieldKeyStr)
arr1.push(fieldKeyStr)
}
radioSelectArr3.push({
conditionFieldKey:jArr.conditionField,
conditionFieldValue:optionValueJArr,
toShowFieldKey:arr1,
})
}
}
}
}
}
//console.log(radioSelectArr3)
//使props.formData.config.hideField
let hideFieldArr: any[] = [];
@ -679,36 +771,8 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any)
//props.formData.config?.hideField?.push("nin2yuan4yi4wei4wo3menda3fen1ma101939")
//console.log("--constControlChange-->",key, value, data, tProp,type,attribute)//liwenxuan
}
if (typeof props.changeKeyVal === 'function') {
props.changeKeyVal(key, value,type,attribute)
}
if (key) {
if (!tProp) {
// change
model.value[key] = value
}
// 线AB
if (props.formData.events?.change) {
model.value = props.formData.events.change(key, model.value)
}
const onFormChange = props.formData.events?.change
if (onFormChange) {
if (typeof onFormChange === 'function') {
model.value = onFormChange(key, model.value)
} else {
model.value = formChangeValue(key, model.value, onFormChange)
}
}
// tProps
emits('change', { key, value, model: model.value, data, tProp })
}
/*
*/
})
const dictForm = computed(() => {
const storage = window.localStorage.getItem('akFormDict')
let storageDict = {}
@ -1162,6 +1226,7 @@ onMounted(() => {
nextTick(() => {
appendRemoveStyle(true)
})
showOrHide()
})
onUnmounted(() => {
if (eventName) {

8
src/types/components.d.ts

@ -118,8 +118,16 @@ declare module '@vue/runtime-core' {
IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
IEpClose: typeof import('~icons/ep/close')['default']
<<<<<<< HEAD
IEpEdit: typeof import('~icons/ep/edit')['default']
IEpMessageBox: typeof import('~icons/ep/message-box')['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_v9
IEpRefresh: typeof import('~icons/ep/refresh')['default']
IEpSearch: typeof import('~icons/ep/search')['default']
IEpSetting: typeof import('~icons/ep/setting')['default']

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

@ -569,9 +569,16 @@ onMounted(() => {
getInitData()
})
//
<<<<<<< HEAD
watch(() =>versionId.value ,(val:string)=>{
emits('update:formVersion', val)
})
=======
// watch(() =>versionId.value ,(val:string)=>{
// emits('update:formVersion', val)
// })
>>>>>>> lwx_v9
/**
@ 作者: 秦东
@ 时间: 2024-05-09 14:29:06

39
src/widget/writingboard/vueSignature.vue

@ -102,20 +102,24 @@
const getSizeRatio = () => {
return !props.fullScreen && props.backIsCenter
}
const setCanvasImageBack = (status: any) => {
const canvas = canvasRef.value as HTMLCanvasElement
let pat = canvasTxt.value?.createPattern(canvasBackDom.value, (props.isRepeat || "no-repeat"));
canvasTxt.value?.rect(0,0,canvas.width ,canvas.height)
canvasTxt!.value!.fillStyle = (pat as any);
canvasTxt.value?.fill();
if (status) {
autoDraw(null, null)
const setCanvasImageBack = (status: any,canvas:any) => {
//const canvas = canvasRef.value as HTMLCanvasElement
//console.log(canvas)
if(typeof(canvas)!="undefined"&&typeof(canvas.width)!="undefined"){
let pat = canvasTxt.value?.createPattern(canvasBackDom.value, (props.isRepeat || "no-repeat"));
canvasTxt.value?.rect(0,0,canvas.width ,canvas.height)
canvasTxt!.value!.fillStyle = (pat as any);
canvasTxt.value?.fill();
if (status) {
autoDraw(null, null)
}
}
}
const setCanvasBack = (status: any) => {
const canvas = canvasRef.value as HTMLCanvasElement
const setCanvasBack = (status: any,canvas:any) => {
//const canvas = canvasRef.value as HTMLCanvasElement
if (props.canvasBack && canvasBackDom.value && isImgaes(props.canvasBack)) {
setCanvasImageBack(status)
setCanvasImageBack(status,canvas)//liwenxuan
} else {
canvas.style.background = canvasBackground.value
}
@ -145,12 +149,19 @@
canvasTxt.value?.scale(1 * sratio.value, 1 * sratio.value)
sratio.value = realw / (domPatams.width ? domPatams.width : props.fullScreen ? screenPatams.width : props.width)
canvasTxt.value?.scale(1 / sratio.value, 1 / sratio.value)
if (props.canvasBack) {
let IntervaId = setInterval(() => {
if ((canvasBackDom.value && isLoad.value) || !isImgaes(props.canvasBack)) {
setCanvasBack(status)
clearInterval(IntervaId)
//console.log("111111111111111111111111111111111111111111111111111111")
//console.log(canvas)
if(typeof(canvas)!="undefined"){
//console.log(canvas)
if ((canvasBackDom.value && isLoad.value) || !isImgaes(props.canvasBack)) {
setCanvasBack(status,canvas)//liwenxuan
clearInterval(IntervaId)
}
}
}, 100)
} else {
if (status) {

Loading…
Cancel
Save