diff --git a/src/components/DesignForm/assembly/index.ts b/src/components/DesignForm/assembly/index.ts
index dc4031dd0..d2775cc1a 100644
--- a/src/components/DesignForm/assembly/index.ts
+++ b/src/components/DesignForm/assembly/index.ts
@@ -247,15 +247,6 @@ const selectOption: any = [
},
config: {}
},
- {
- type: 'orgCentent',
- label: '行政组织',
- icon: 'sliders',
- iconFont: 'fa-sliders',
- control: {
- },
- config: {}
- },
{
type: 'colorPicker',
label: '取色器',
@@ -409,6 +400,15 @@ const selectOption: any = [
modelValue: ''
},
config: {} // 其他配置信息
+ },
+ {
+ type: 'orgCentent',
+ label: '行政组织',
+ icon: 'sliders',
+ iconFont: 'fa-sliders',
+ control: {
+ },
+ config: {}
}
]
}
diff --git a/src/components/DesignForm/formControlAttr.vue b/src/components/DesignForm/formControlAttr.vue
index 38a9ef354..0868c292b 100644
--- a/src/components/DesignForm/formControlAttr.vue
+++ b/src/components/DesignForm/formControlAttr.vue
@@ -1267,9 +1267,13 @@ const updataDigit = (key:sring,val:any) => {
// console.log("默认值处理-1-->",props.formList)
// console.log("默认值处理-2-->",props.formConfig)
// console.log("默认值处理--3->",props.formOtherData)
- // console.log("默认值处理--4->",formAttr)
- formConfig.value[key] = val.mathsFormula
- // console.log("返回值处理--->",key,val)
+ console.log("默认值处理--4->",val)
+ formConfig.value[key] = {
+ mathsFormula:val.mathsFormula,
+ takingMethod:val.takingMethod,
+ digit:val.digit
+ }
+ console.log("返回值处理--->",formConfig.value)
attrList.value.forEach((item:any)=>{
// console.log("返回值处理--1->",item)
if(item.type == "digitpage"){
diff --git a/src/components/DesignForm/math/matchFunction.ts b/src/components/DesignForm/math/matchFunction.ts
index 7f542b70b..7a06a0559 100644
--- a/src/components/DesignForm/math/matchFunction.ts
+++ b/src/components/DesignForm/math/matchFunction.ts
@@ -4,7 +4,7 @@ export const funcList = [
name: "函数列表",
children: [
{
- id: "11",
+ id: "1",
name: "SUM",
type:'func',
dataType: "number",
@@ -22,16 +22,16 @@ export const funcList = [
`,
},
{
- id: "14",
- name: "AVG",
+ id: "2",
+ name: "AVERAGE",
type:'func',
dataType: "number",
dataTypeName: "数字",
desc: `
- - 平均公式 AVG(1,2)=1.5
+ - 平均公式 AVERAGE(1,2)=1.5
-
- 用法:AVG(参数1,...)
+ 用法:AVERAGE(参数1,...)
-
示例:SUM(语文成绩,数学成绩,其他语种成绩)返回三门课程成绩的平均值
@@ -40,22 +40,25 @@ export const funcList = [
`,
},
{
- id: "12",
+ id: "3",
name: "MIN",
type:'func',
dataType: "number",
dataTypeName: "数字",
desc: `
- - 取最小 SUM(1,2)=1
+ - 取最小 SUM(1,2)=1
-
用法:MIN(参数1,...)
+ -
+ 示例:MIN(2,3,1,5,6)返回其中最小值
+
`,
},
{
- id: "13",
+ id: "4",
name: "MAX",
type:'func',
dataType: "number",
@@ -64,11 +67,152 @@ export const funcList = [
- 取最大 SUM(1,2)=2
-
- MAX(参数1,...)
+ 用法:MAX(参数1,...)
+
+ -
+ 示例:MAX(2,3,1,5,6)返回其中最大值
+
+
+ `,
+ },
+ {
+ id: "5",
+ name: "ABS",
+ type:'func',
+ dataType: "number",
+ dataTypeName: "数字",
+ desc: `
+
+ - 取绝对值 ABS(-1)=1
+ -
+ 用法:ABS(参数)
+
+ -
+ 示例:ABS(-1)返回其绝对值1
`,
},
+ {
+ id: "6",
+ name: "SQRT",
+ type:'func',
+ dataType: "number",
+ dataTypeName: "数字",
+ desc: `
+
+ - 取平方根 SQRT(4)=2
+ -
+ 用法:SQRT(参数)
+
+
+ `,
+ },
+ {
+ id: "7",
+ name: "CBRT",
+ type:'func',
+ dataType: "number",
+ dataTypeName: "数字",
+ desc: `
+
+ - 取立方根 CBRT(9)=3
+ -
+ 用法:CBRT(参数)
+
+
+ `,
+ },
+ {
+ id: "8",
+ name: "SIN",
+ type:'func',
+ dataType: "number",
+ dataTypeName: "数字",
+ desc: `
+
+ - 正弦函数 SIN(π/2)=1
+ -
+ 用法:SIN(参数)
+
+
+ `,
+ },
+ {
+ id: "9",
+ name: "COS",
+ type:'func',
+ dataType: "number",
+ dataTypeName: "数字",
+ desc: `
+
+ - 余弦函数 COS(0)=1
+ -
+ 用法:COS(参数)
+
+
+ `,
+ },
+ {
+ id: "10",
+ name: "TAN",
+ type:'func',
+ dataType: "number",
+ dataTypeName: "数字",
+ desc: `
+
+ - 正切函数 TAN(π/4)=1
+ -
+ 用法:TAN(参数)
+
+
+ `,
+ },
+ {
+ id: "11",
+ name: "COT",
+ type:'func',
+ dataType: "number",
+ dataTypeName: "数字",
+ desc: `
+
+ - 余切函数 COT(π/4)=1
+ -
+ 用法:COT(参数)
+
+
+ `,
+ },
+ {
+ id: "11",
+ name: "SEC",
+ type:'func',
+ dataType: "number",
+ dataTypeName: "数字",
+ desc: `
+
+ - 正割函数 SEC(0)=1
+ -
+ 用法:SEC(参数)
+
+
+ `,
+ },
+ {
+ id: "12",
+ name: "CSC",
+ type:'func',
+ dataType: "number",
+ dataTypeName: "数字",
+ desc: `
+
+ - 余割函数 CSC(π/2)=1
+ -
+ 用法:CSC(参数)
+
+
+ `,
+ }
],
},
diff --git a/src/components/DesignForm/math/mathFormula.vue b/src/components/DesignForm/math/mathFormula.vue
index 41d9d7146..6ed16e639 100644
--- a/src/components/DesignForm/math/mathFormula.vue
+++ b/src/components/DesignForm/math/mathFormula.vue
@@ -195,7 +195,7 @@ const sendDigitFunc = () => {
// console.log("tinymceBox--3--->",tinymceBox.value);
let fsdf = tinymceBox.value.innerHTML.match(pattern);
// console.log("tinymceBox--4--->",fsdf,fsdf[2]);
-
+
// console.log("tinymceBox--5--->",tinymceBox.value.childNodes);
let formulaOne = [];
let formulaTwo = [];
diff --git a/src/components/DesignForm/public/form/form.vue b/src/components/DesignForm/public/form/form.vue
index 312ffa711..e450e07fc 100644
--- a/src/components/DesignForm/public/form/form.vue
+++ b/src/components/DesignForm/public/form/form.vue
@@ -164,7 +164,68 @@ const forEachGetFormModel = (list: FormList[], obj: any) => {
// 表单组件值改变事件 tProp为子表格相关
provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any) => {
- // console.log("监听表单--constControlChange-->",key, value, data, tProp,type,attribute)
+ console.log("表单组件值改变事件----------1--------->",key)
+ console.log("表单组件值改变事件----------2--------->",value)
+ console.log("表单组件值改变事件----------3--------->",data)
+ console.log("表单组件值改变事件----------4--------->",tProp)
+ console.log("表单组件值改变事件----------5--------->",type)
+ console.log("表单组件值改变事件----------6--------->",attribute)
+ // console.log("表单组件值改变事件----------1--------->",key, value, data, tProp, type, attribute)
+ let fieldVal = {}
+ validate((valid: boolean, fields: any) => {
+ // console.log("监听表单--constControlChange----------1--------->",valid,fields,type)
+ for(let i in fields){
+ fieldVal[i]=fields[i].toString()
+ }
+ //判断是否进行计算
+ if(type == "digitpage"){
+ let sendInfo = {
+ "fieldKey":key,
+ "mathsFornula":props.formData.config,
+ "keyVal":fieldVal
+ }
+ console.log("sendInfoe-->",sendInfo)
+ currencyFormApiSubmit("/systemapi/maths/mathematicalCalculations",sendInfo)
+ .then((data:any)=>{
+ // console.log("结果-->",data)
+ let formatRes: any = data.data
+ // 比较适用通用表单,保存在服务端
+ const afterResponse = props.formData.events?.afterResponse
+
+ if (typeof afterResponse === 'string' && afterResponse) {
+ formatRes = formatResult(result, afterResponse)
+ } else if (typeof afterResponse === 'function') {
+ formatRes = afterResponse(result) ?? result
+ }
+ // 比较适用于导出vue文件
+ if (typeof props.afterResponse === 'string' && props.afterResponse) {
+ formatRes = formatResult(result, props.afterResponse)
+ } else if (typeof props.afterResponse === 'function') {
+ formatRes = props.afterResponse(result) ?? result
+ }
+ if (formatRes === false) {
+ return
+ }
+ // console.log("停止数据请求--->",formatRes)
+ setValue(formatRes.result || formatRes)
+ nextTick(() => {
+ // 将dict保存,可用于从接口中设置表单组件options。
+ if (formatRes.dict && Object.keys(formatRes.dict).length) {
+ resultDict.value = formatRes.dict
+ }
+ })
+ })
+ }
+ })
+
+
+ // console.log("监听表单-1-constControlChange-->",props.formData)
+ // console.log("监听表单-2-constControlChange-->",key)
+ // console.log("监听表单-3-constControlChange-->", value)
+ // console.log("监听表单-4-constControlChange-->",data)
+ // console.log("监听表单-5-constControlChange-->",type)
+ // console.log("监听表单-6-constControlChange-->",attribute)
+
if (typeof props.changeKeyVal === 'function') {
props.changeKeyVal(key, value,type,attribute)
}
@@ -188,6 +249,8 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any)
// 当表格和弹性内的字段和外面字段冲突时,可通过tProps区分
emits('change', { key, value, model: model.value, data, tProp })
}
+
+
})
const dictForm = computed(() => {
const storage = window.localStorage.getItem('akFormDict')
@@ -514,9 +577,9 @@ const submit = (params = {}) => {
if (valid) {
const formatParams = Object.assign({}, fields, params)
- // console.log("params--->",params)
- // console.log("fields--->",fields)
- // console.log("formatParams-Object-->",formatParams)
+ console.log("params--->",params)
+ console.log("fields--->",fields)
+ console.log("formatParams-Object-->",formatParams)
let submitParams
const beforeSubmit = props.formData.events?.beforeSubmit
@@ -535,14 +598,16 @@ const submit = (params = {}) => {
if (submitParams === false) {
return
}
- // console.log("beforeSubmit--->",beforeSubmit)
- // console.log("props.beforeSubmit--->",props.beforeSubmit)
+ console.log("beforeSubmit--->",beforeSubmit)
+ console.log("props.beforeSubmit--->",props.beforeSubmit)
// console.log("props.beforeSubmit--->",props.beforeSubmit)
// loading.value = true
console.log("apiUrl--->",apiUrl)
console.log("submitParams--->",submitParams)
console.log("formatParams--->",formatParams)
+
+ debugger
// 提交保存表单
currencyFormApiSubmit(apiUrl, submitParams ?? formatParams)
.then((res: any) => {
diff --git a/src/utils/workflow/const.ts b/src/utils/workflow/const.ts
index d6661faac..17270f625 100644
--- a/src/utils/workflow/const.ts
+++ b/src/utils/workflow/const.ts
@@ -66,6 +66,7 @@ export let notAsA_BasisForJudgment = [
"upload",
"tinymce",
"button",
+ "digitpage"
]
//作为审批节点操作人控件
export let asAnApprovalActionControl = ["expand-user"]
diff --git a/src/views/taskplatform/taskmanagement/taskcustomerformnew.vue b/src/views/taskplatform/taskmanagement/taskcustomerformnew.vue
index 81ecd622e..62dabb8a9 100644
--- a/src/views/taskplatform/taskmanagement/taskcustomerformnew.vue
+++ b/src/views/taskplatform/taskmanagement/taskcustomerformnew.vue
@@ -214,6 +214,11 @@ const changeKeyVal = (key:any,val:any,type:any,attribute:any) => {
// console.log("改变表单值--attribute--->",attribute)
// console.log("改变表单值--type-1-true->",notAsA_BasisForJudgment.indexOf(type))
+
+
+ // console.log("改变表单值--flowFactor--->",flowFactor)
+
+
// if(notAsA_BasisForJudgment.indexOf(type) != -1){
// console.log("改变表单值--type--true->",notAsA_BasisForJudgment.indexOf(type))
// }
@@ -225,7 +230,7 @@ const changeKeyVal = (key:any,val:any,type:any,attribute:any) => {
flowFactor.forEach((item:any)=>{
if(item.factorid == key){
isWrite = false
- isUpdateFlowChart = true
+
item.type=3
if(type == "checkbox"){
item.isCheckbox = true
@@ -234,6 +239,9 @@ const changeKeyVal = (key:any,val:any,type:any,attribute:any) => {
item.isCheckbox = false
item.oneanswer = val.toString()
}
+ if(notAsA_BasisForJudgment.indexOf(type) === -1){
+ isUpdateFlowChart = true
+ }
}
})
if(isWrite){