Browse Source

修改无组件属性时得报错

qin_v2
超级管理员 1 year ago
parent
commit
494fb48c84
  1. 4
      src/components/DesignForm/app/calendar/calendar1/calendarPage.vue
  2. 2
      src/components/DesignForm/app/calendar/calendar1/dayPage.vue
  3. 6
      src/components/DesignForm/app/calendar/calendar1/monthPage.vue
  4. 4
      src/components/DesignForm/app/index.vue
  5. 12
      src/components/DesignForm/formControlPropertiNew.vue
  6. 2
      src/components/DesignForm/public/form/formGroup.vue
  7. 20
      src/components/DesignForm/public/form/formItem.vue
  8. 32
      src/components/DesignForm/public/form/select.vue
  9. 9
      src/components/DesignForm/tableListPage/formPageCont.vue

4
src/components/DesignForm/app/calendar/calendar1/calendarPage.vue

@ -164,13 +164,15 @@ const goTady = () => {
const calendarSearchData = (val:any) => {
switch(curtteDayType.value){
case 2:
weekPageRef.value.searchatWeekList(val)
break;
case 3:
dayPageRef.value.searchatDayList(val);
default:
monthPageRef.value.searchatMonthList(val);
break;
}
// console.log("",props.searchSend)
console.log("查询数据",curtteDayType.value,props.searchSend)
}
defineExpose({
calendarSearchData

2
src/components/DesignForm/app/calendar/calendar1/dayPage.vue

@ -91,7 +91,7 @@ const searchatDayList = (val:any) => {
dayType:"",
mapWord:""
}
// console.log("",val)
console.log("获取每天数据",val)
let sendInfo = {
search:val,
timeAry:[dayInfo.value]

6
src/components/DesignForm/app/calendar/calendar1/monthPage.vue

@ -88,13 +88,13 @@ const searchatMonthList = (val:any) => {
dayType:"",
mapWord:""
}
// console.log("",val)
console.log("获取每天数据",val)
let sendInfo = {
search:val,
timeMonthAry:TBody.value,
types:1
}
// console.log("",sendInfo)
console.log("获取每天数据条件",sendInfo)
gainCalendarList(sendInfo)
.then(({data})=>{
// console.log("",data)
@ -104,7 +104,7 @@ const searchatMonthList = (val:any) => {
}
defineExpose({
gainCalendarList
searchatMonthList
})

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

@ -341,14 +341,14 @@ const getPageData = () => {
switch(viewType.value){
case 2:
nextTick(()=>{
// console.log("-------555---------->",calendarPageRef.value)
console.log("获取列表详细信息-------555---------->",calendarPageRef.value)
calendarPageRef.value.calendarSearchData(sendData)
})
// calendarPageRef.value.calendarSearchData()
break;
case 3:
nextTick(()=>{
// console.log("-------222---------->",timeAxisRef.value)
console.log("获取列表详细信息-------222---------->",timeAxisRef.value)
timeAxisRef.value.searchTimeList(sendData,1)
})

12
src/components/DesignForm/formControlPropertiNew.vue

@ -1065,7 +1065,7 @@ const controlChange = (obj: any, val: any) => {
if(val != ""){
let ary = ["founder","founderTime","editTime","owner","deptOrg"]
if (!ary.includes(controlData.value.type)){
if(!props.formField.includes(controlData.value.name)){
if(Array.isArray(props.formField) && !props.formField.includes(controlData.value.name)){
chineseToPinyin({title:val,types:8,connector:"",formJson:JSON.stringify(props.formInfo)})
.then((data:any)=>{
if(data.code == 0){
@ -1555,9 +1555,13 @@ const isNotWrite = (val:any) =>{
return false
}
const isNotWriteWord = (val:any) =>{
if(val.eventName === "filedNameKey" && props.customerformid != "" && props.formField.includes(val.value)){
return true
console.log("isNotWriteWord---->",val)
console.log("isNotWriteWord--formField-->",props.formField)
if(val.eventName === "filedNameKey" && props.customerformid != "" && props.formField && Array.isArray(props.formField) && props.formField.includes(val.value) ){
// if(props.formField.includes(val.value)){
return true
// }
}
return false
}

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

@ -420,7 +420,7 @@ function optionsValue3Get1(data: any,fieldName: string){
v-if="linksIf(element)"
>
{{element.type}}
{{ element.type}}
<!--选项卡组件-->
<template v-if="element.type === 'tabs'">

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

@ -778,7 +778,13 @@ const selectValue = (val:any,list:any) => {
// console.log("",val,list)
let valAry = []
if(val && val != "" && val != null ){
let pickSelect = JSON.parse(val)
let pickSelect = val
if(Array.isArray(val)){
pickSelect = val
}else{
pickSelect = JSON.parse(val)
}
// console.log("-----3------->",pickSelect)
@ -818,9 +824,15 @@ const selectValue = (val:any,list:any) => {
@ 功能: 选择用户
*/
const pickUserVal = (val:any) => {
let valAry = string2json(val)
// console.log("-2->",valAry)
return valAry
console.log("选择用户-2->",val)
if(Array.isArray(val)){
return val
}else{
// let valAry = string2json(val)
// console.log("-2->",valAry)
return val
}
}
</script>
<template>

32
src/components/DesignForm/public/form/select.vue

@ -10,7 +10,6 @@ import {
constSetFormOptions,
objectToArray
} from '@/api/DesignForm/utils'
import { string2json } from '@/utils/DesignForm/form'
import { FormList } from '@/api/DesignForm/types'
const props = withDefaults(
defineProps<{
@ -66,38 +65,9 @@ watch(
)
const value = computed({
get() {
// console.log("--->",props.data,props.modelValue,typeof(formProps.value.model[props.data.name]))
if (props.type === 'slot') {
// console.log("-1->",typeof(formProps.value.model[props.data.name]))
// let jeguo = formProps.value.model[props.data.name]
// if(typeof(jeguo) === 'number'){
// return jeguo.toString()
// }else if(typeof(jeguo) === 'object'){
// let strVal = []
// jeguo.forEach((item) => {
// strVal.push(item.toString())
// })
// return strVal
// }
return formProps.value.model[props.data.name]
} else {
if(props.modelValue && props.modelValue != null && props.modelValue != "") {
let selVal = JSON.parse(props.modelValue)
if(Array.isArray(selVal)){
let selValStr = []
selVal.forEach(item => {
selValStr.push(item.toString())
})
return selValStr
}else{
return selVal.toString()
}
}
// if(typeof(selVal) === 'object'){
// return selVal.toString()
// }
return props.modelValue
}
},
@ -153,7 +123,7 @@ const remoteMethod = (name: string) => {
v-for="item in optionsList"
:key="item.value"
:label="item.label"
:value="item.value"
:value="transformOption(item.value, data.config?.transformData)"
/>
</el-select>
</template>

9
src/components/DesignForm/tableListPage/formPageCont.vue

@ -340,9 +340,14 @@ const jsuanKuandu = () => {
<el-divider v-if="pageLog&&pageLog.length > 0" content-position="left">历史记录</el-divider>
<el-timeline style="width: 100%">
<el-timeline-item v-for="(item,index) in pageLog" :key="index" :timestamp="item.time+' 操作人:'+item.creater" placement="top">
<el-card>
<el-card >
<el-descriptions border>
<el-descriptions-item v-for="(mastItem,mastIndex) in item.masterdata" :key="mastIndex" :label="mastIndex">
<el-descriptions-item v-for="(mastItem,mastIndex) in item.masterdata" :key="mastIndex" label-align="right">
<template #label>
<div style="width: 100px;">
{{mastIndex}}
</div>
</template>
{{mastItem}}
</el-descriptions-item>
</el-descriptions>

Loading…
Cancel
Save