Browse Source

关联表单隐藏效果-组织机构条件

lwx_v3
liwenxuan 1 year ago
parent
commit
97b588d364
  1. 16
      src/components/DesignForm/formControlAttr.vue
  2. 25
      src/components/DesignForm/formControlPropertiNew.vue
  3. 183
      src/components/DesignForm/public/form/form.vue
  4. 8
      src/widget/associatedforms/associatedFormsTinyace.vue
  5. 6
      src/widget/associatedforms/associatedFormsTinyaceRange.vue

16
src/components/DesignForm/formControlAttr.vue

@ -3858,21 +3858,23 @@ const disabledIstrue = (val:string) => {
</el-aside> </el-aside>
<el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain"> <el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain">
<div style="border: 1px solid gainsboro; height: 7%; border-bottom: 0px; padding-top: 3px; padding-left: 5px; background-color: #E6F3FE;">当满足以下条件时此控件隐藏</div> <div style="border: 1px solid gainsboro; height: 7%; border-bottom: 0px; padding-top: 3px; padding-left: 5px; background-color: #E6F3FE;">当满足以下条件时此控件隐藏</div>
<div id="associatedFormsHideEditArea" style="border: 1px solid gainsboro; height: 43%; border-bottom: 0px;"> <div id="associatedFormsHideEditArea" style="border: 1px solid gainsboro; height: 38%; border-bottom: 0px;">
<AssociatedFormsTinyace ref="aft" :aft-text="controlData.control.hideConditionHtml" :aft-text-copy = "controlData.control.hideConditionHtmlCopy" @text-change = "aftTextChanged" @gongshi-change = "aftGongshiChanged"></AssociatedFormsTinyace> <AssociatedFormsTinyace ref="aft" :aft-text="controlData.control.hideConditionHtml" :aft-text-copy = "controlData.control.hideConditionHtmlCopy" @text-change = "aftTextChanged" @gongshi-change = "aftGongshiChanged"></AssociatedFormsTinyace>
<!-- <div style="border: 1px solid #4189EF;width:90px;height:26px;border-radius: 3px;padding:2px;text-align: center;cursor:pointer;float: right;margin-top: -32px;margin-right: 5px;z-index:99999999;position: relative;"> <!-- <div style="border: 1px solid #4189EF;width:90px;height:26px;border-radius: 3px;padding:2px;text-align: center;cursor:pointer;float: right;margin-top: -32px;margin-right: 5px;z-index:99999999;position: relative;">
<span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数 <span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数
</div> --> </div> -->
</div> </div>
<div style="border: 1px solid gainsboro; height: 50%; padding-top: 20px;"> <div style="border: 1px solid gainsboro; height: 55%; padding-top: 20px;">
<ul> <ul>
<li>请从左侧面板<span style="color: red">右击</span>选择字段或选项</li> <li>请从左侧面板<span style="color: red">右击</span>选择字段或选项</li>
<li>支持的符号<span style="color: red">'==', '>=', '>', '<=', '<', '!='</span></li> <li>支持的符号<span style="color: red">'==', '>=', '>', '<=', '<', '!='</span></li>
<li>支持<span style="color: red">"包含,不包含,当前用户"</span>关键字,用于组织机构条件和角色条件</li> <li>支持<span style="color: red">"包含,不包含,当前用户"</span>关键字,用于组织机构条件和角色条件</li>
<li>参考举例</li> <li>参考举例</li>
<span style="margin-left: 14px;">年龄>10</span><br> <span style="margin-left: 14px;">年龄>10</span><br>
<span style="margin-left: 14px;">企管部包含当前用户</span> <span style="margin-left: 14px;">企管部包含当前用户</span><br>
<span style="margin-left: 14px;">绩效考核执行人包含当前用户</span><br>
<span style="margin-left: 14px;">张三!=当前用户</span>
</ul> </ul>
</div> </div>
</el-main> </el-main>
@ -3970,21 +3972,23 @@ const disabledIstrue = (val:string) => {
</el-aside> </el-aside>
<el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain"> <el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain">
<div style="border: 1px solid gainsboro; height: 7%; border-bottom: 0px; padding-top: 3px; padding-left: 5px; background-color: #E6F3FE;">仅可选择符合以下条件的数据</div> <div style="border: 1px solid gainsboro; height: 7%; border-bottom: 0px; padding-top: 3px; padding-left: 5px; background-color: #E6F3FE;">仅可选择符合以下条件的数据</div>
<div id="associatedFormsHideEditArea" style="border: 1px solid gainsboro; height: 43%; border-bottom: 0px;"> <div id="associatedFormsHideEditArea" style="border: 1px solid gainsboro; height: 38%; border-bottom: 0px;">
<AssociatedFormsTinyaceRange ref="aftRange" :aft-text="controlData.control.dataRangeConditionHtml" :aft-text-copy = "controlData.control.dataRangeConditionHtmlCopy" @text-change = "aftTextChangedRange" @gongshi-change = "aftGongshiChangedRange"></AssociatedFormsTinyaceRange> <AssociatedFormsTinyaceRange ref="aftRange" :aft-text="controlData.control.dataRangeConditionHtml" :aft-text-copy = "controlData.control.dataRangeConditionHtmlCopy" @text-change = "aftTextChangedRange" @gongshi-change = "aftGongshiChangedRange"></AssociatedFormsTinyaceRange>
<!-- <div style="border: 1px solid #4189EF;width:90px;height:26px;border-radius: 3px;padding:2px;text-align: center;cursor:pointer;float: right;margin-top: -32px;margin-right: 5px;z-index:99999999;position: relative;"> <!-- <div style="border: 1px solid #4189EF;width:90px;height:26px;border-radius: 3px;padding:2px;text-align: center;cursor:pointer;float: right;margin-top: -32px;margin-right: 5px;z-index:99999999;position: relative;">
<span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数 <span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数
</div> --> </div> -->
</div> </div>
<div style="border: 1px solid gainsboro; height: 50%; padding-top: 20px;"> <div style="border: 1px solid gainsboro; height: 55%; padding-top: 20px;">
<ul> <ul>
<li>请从左侧面板<span style="color: red">右击</span>选择字段或选项</li> <li>请从左侧面板<span style="color: red">右击</span>选择字段或选项</li>
<li>支持的符号<span style="color: red">'==', '>=', '>', '<=', '<', '!='</span></li> <li>支持的符号<span style="color: red">'==', '>=', '>', '<=', '<', '!='</span></li>
<li>支持<span style="color: red">"包含,不包含,当前用户"</span>关键字,用于组织机构条件和角色条件</li> <li>支持<span style="color: red">"包含,不包含,当前用户"</span>关键字,用于组织机构条件和角色条件</li>
<li>参考举例</li> <li>参考举例</li>
<span style="margin-left: 14px;">年龄>10</span><br> <span style="margin-left: 14px;">年龄>10</span><br>
<span style="margin-left: 14px;">企管部包含当前用户</span> <span style="margin-left: 14px;">企管部包含当前用户</span><br>
<span style="margin-left: 14px;">绩效考核执行人包含当前用户</span><br>
<span style="margin-left: 14px;">张三!=当前用户</span>
</ul> </ul>
</div> </div>
</el-main> </el-main>

25
src/components/DesignForm/formControlPropertiNew.vue

@ -3913,21 +3913,23 @@ const disabledIstrue = (val:string) => {
</el-aside> </el-aside>
<el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain"> <el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain">
<div style="border: 1px solid gainsboro; height: 7%; border-bottom: 0px; padding-top: 3px; padding-left: 5px; background-color: #E6F3FE;">当满足以下条件时此控件隐藏</div> <div style="border: 1px solid gainsboro; height: 7%; border-bottom: 0px; padding-top: 3px; padding-left: 5px; background-color: #E6F3FE;">当满足以下条件时此控件隐藏</div>
<div id="associatedFormsHideEditArea" style="border: 1px solid gainsboro; height: 43%; border-bottom: 0px;"> <div id="associatedFormsHideEditArea" style="border: 1px solid gainsboro; height: 38%; border-bottom: 0px;">
<AssociatedFormsTinyace ref="aft" :aft-text="controlData.control.hideConditionHtml" :aft-text-copy = "controlData.control.hideConditionHtmlCopy" @text-change = "aftTextChanged" @gongshi-change = "aftGongshiChanged"></AssociatedFormsTinyace> <AssociatedFormsTinyace ref="aft" :aft-text="controlData.control.hideConditionHtml" :aft-text-copy = "controlData.control.hideConditionHtmlCopy" @text-change = "aftTextChanged" @gongshi-change = "aftGongshiChanged"></AssociatedFormsTinyace>
<!-- <div style="border: 1px solid #4189EF;width:90px;height:26px;border-radius: 3px;padding:2px;text-align: center;cursor:pointer;float: right;margin-top: -32px;margin-right: 5px;z-index:99999999;position: relative;"> <!-- <div style="border: 1px solid #4189EF;width:90px;height:26px;border-radius: 3px;padding:2px;text-align: center;cursor:pointer;float: right;margin-top: -32px;margin-right: 5px;z-index:99999999;position: relative;">
<span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数 <span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数
</div> --> </div> -->
</div> </div>
<div style="border: 1px solid gainsboro; height: 50%; padding-top: 20px;"> <div style="border: 1px solid gainsboro; height: 55%; padding-top: 20px;">
<ul> <ul>
<li>请从左侧面板<span style="color: red">右击</span>选择字段或选项</li> <li>请从左侧面板<span style="color: red">右击</span>选择字段或选项</li>
<li>支持的符号<span style="color: red">'==', '>=', '>', '<=', '<', '!='</span></li> <li>支持的符号<span style="color: red">'==', '>=', '>', '<=', '<', '!='</span></li>
<li>支持<span style="color: red">"包含,不包含,当前用户"</span>关键字,用于组织机构条件和角色条件</li> <li>支持<span style="color: red">"包含,不包含,当前用户"</span>关键字,用于组织机构条件和角色条件</li>
<li>参考举例</li> <li>参考举例</li>
<span style="margin-left: 14px;">年龄>10</span><br> <span style="margin-left: 14px;">年龄>10</span><br>
<span style="margin-left: 14px;">企管部包含当前用户</span> <span style="margin-left: 14px;">企管部包含当前用户</span><br>
<span style="margin-left: 14px;">绩效考核执行人包含当前用户</span><br>
<span style="margin-left: 14px;">张三!=当前用户</span>
</ul> </ul>
</div> </div>
</el-main> </el-main>
@ -4025,22 +4027,23 @@ const disabledIstrue = (val:string) => {
</el-aside> </el-aside>
<el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain"> <el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain">
<div style="border: 1px solid gainsboro; height: 7%; border-bottom: 0px; padding-top: 3px; padding-left: 5px; background-color: #E6F3FE;">仅可选择符合以下条件的数据</div> <div style="border: 1px solid gainsboro; height: 7%; border-bottom: 0px; padding-top: 3px; padding-left: 5px; background-color: #E6F3FE;">仅可选择符合以下条件的数据</div>
<div id="associatedFormsHideEditArea" style="border: 1px solid gainsboro; height: 43%; border-bottom: 0px;"> <div id="associatedFormsHideEditArea" style="border: 1px solid gainsboro; height: 38%; border-bottom: 0px;">
<AssociatedFormsTinyaceRange ref="aftRange" :aft-text="controlData.control.dataRangeConditionHtml" :aft-text-copy = "controlData.control.dataRangeConditionHtmlCopy" @text-change = "aftTextChangedRange" @gongshi-change = "aftGongshiChangedRange"></AssociatedFormsTinyaceRange> <AssociatedFormsTinyaceRange ref="aftRange" :aft-text="controlData.control.dataRangeConditionHtml" :aft-text-copy = "controlData.control.dataRangeConditionHtmlCopy" @text-change = "aftTextChangedRange" @gongshi-change = "aftGongshiChangedRange"></AssociatedFormsTinyaceRange>
<!-- <div style="border: 1px solid #4189EF;width:90px;height:26px;border-radius: 3px;padding:2px;text-align: center;cursor:pointer;float: right;margin-top: -32px;margin-right: 5px;z-index:99999999;position: relative;"> <!-- <div style="border: 1px solid #4189EF;width:90px;height:26px;border-radius: 3px;padding:2px;text-align: center;cursor:pointer;float: right;margin-top: -32px;margin-right: 5px;z-index:99999999;position: relative;">
<span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数 <span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数
</div> --> </div> -->
</div> </div>
<div style="border: 1px solid gainsboro; height: 50%; padding-top: 20px;"> <div style="border: 1px solid gainsboro; height: 55%; padding-top: 20px;">
<ul> <ul>
<li>请从左侧面板<span style="color: red">右击</span>选择字段或选项</li> <li>请从左侧面板<span style="color: red">右击</span>选择字段或选项</li>
<li>支持<span style="color: red">英文</span>模式下运算符<!-- +-*/><== --></li> <li>支持的符号<span style="color: red">'==', '>=', '>', '<=', '<', '!='</span></li>
<li>支持<span style="color: red">"包含,不包含,当前用户"</span>关键字,用于组织机构条件和角色条件</li>
<li>支持<span style="color: red">"包含,不包含"</span>关键字,用于组织机构条件和角色条件</li> <li>参考举例</li>
<li>支持<span style="color: red">"当前用户"</span>关键字,用于角色条件</li> <span style="margin-left: 14px;">年龄>10</span><br>
<li>参考场景</li> <span style="margin-left: 14px;">企管部包含当前用户</span><br>
<span style="margin-left: 14px;">仅可选择关联表单中年龄大于10的数据则可将数据范围设置为年龄>10</span> <span style="margin-left: 14px;">绩效考核执行人包含当前用户</span><br>
<span style="margin-left: 14px;">张三!=当前用户</span>
</ul> </ul>
</div> </div>
</el-main> </el-main>

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

@ -11,6 +11,7 @@ import FormGroup from '@/components/DesignForm/public/form/formGroup.vue'
import { FormData,FormList,FormDataStyle } from '@/api/DesignForm/types' import { FormData,FormList,FormDataStyle } from '@/api/DesignForm/types'
import { getRequest } from '@/api/DesignForm' import { getRequest } from '@/api/DesignForm'
import request from '@/utils/request';
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import { import {
constGetControlByName, constGetControlByName,
@ -177,7 +178,7 @@ const forEachGetFormModel = (list: FormList[], obj: any) => {
} }
} }
}) })
showOrHide() showOrHide("onMounted")
} }
function arrayEqual(a: string[], b: any[]) { function arrayEqual(a: string[], b: any[]) {
@ -407,6 +408,10 @@ const recursionToGetFinallyHideFields = (hideFieldArr: any[],radioSelectArr3: st
if(formProps.value.type!=5){ if(formProps.value.type!=5){
//console.log(hideFieldArr) //console.log(hideFieldArr)
props.formData.config.hideField?.push(...hideFieldArr)// props.formData.config.hideField?.push(...hideFieldArr)//
} }
}); });
@ -418,16 +423,17 @@ if(formProps.value.type!=5){
} }
// tProp // tProp
provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any) => { provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any) => {
// console.log("----------1--------->",key) /* console.log("----------1--------->",key)
// console.log("----------2--------->",value) console.log("表单组件值改变事件----------2--------->",value)
// console.log("----------3--------->",data) console.log("表单组件值改变事件----------3--------->",data)
// console.log("----------4--------->",tProp) console.log("表单组件值改变事件----------4--------->",tProp)
// console.log("----------5--------->",type) console.log("表单组件值改变事件----------5--------->",type)
// console.log("----------6--------->",attribute) console.log("表单组件值改变事件----------6--------->",attribute)
// console.log("----------11--------->",model.value) console.log("表单组件值改变事件----------11--------->",model.value) */
let fieldVal = {} let fieldVal = {}
for(let i in model.value){ for(let i in model.value){
if(i == key){ if(i == key){
@ -493,7 +499,7 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any)
} }
// }) // })
showOrHide() showOrHide(data)
if (typeof props.changeKeyVal === 'function') { if (typeof props.changeKeyVal === 'function') {
props.changeKeyVal(key, value,type,attribute) props.changeKeyVal(key, value,type,attribute)
@ -524,8 +530,114 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any)
*/ */
}) })
let mustBeHidden: any = []
function showOrHide (data:any){
//console.log(data)
/*
企管部有当前用户,
当前用户是什么权限角色.
某表单某字段值大于等于小于不等于某个值
所需接口
接口1:当前用户是不是指定的权限角色
接口2:当前用户是否在指定的机构下或机构的祖先机构下
接口3:本表单(关联关联表单的表单)的某字段的当前值大于等于小于不等于指定的值???也许不需要接口呢?
*/
// start
for(let i = 0; i < props.formData.list.length; i++){
if(props.formData.list[i].type=="associatedForms"&&formProps.value.type!=5){
//console.log(props.formData.list[i].name)
let asfHideCondition = props.formData.list[i].control.hideGongShi.mathsFormula
const leftOperatorsAndRight = splitString(asfHideCondition)
if(leftOperatorsAndRight){
let leftArr = leftOperatorsAndRight.left.split(":")
//console.log(leftArr)
if(data=="onMounted"||(leftArr[0]=="formField"&&leftArr.length==3)){
if(data=="onMounted"||(data!="kong"&&data.name==leftArr[2])){//
if(leftOperatorsAndRight.operator=="包含"){
if(leftOperatorsAndRight.right=="当前用户"){
if(leftOperatorsAndRight.left.startsWith("orgOrPerson")){
//2
queryIfOrgOrPerson(leftOperatorsAndRight).then(({ data }) => {
if(data==true){
props.formData.config.hideField = addStringIfNotExists(props.formData.config.hideField,props.formData.list[i].name)
mustBeHidden.push(props.formData.list[i].name)
}
});
}else if(leftOperatorsAndRight.left.startsWith("roleid")){
//1
}
}
}else if(leftOperatorsAndRight.operator=="不包含"){
if(leftOperatorsAndRight.right=="当前用户"){
if(leftOperatorsAndRight.left.startsWith("orgOrPerson")){
//2
queryIfOrgOrPerson(leftOperatorsAndRight).then(({ data }) => {
if(data==false){
props.formData.config.hideField = addStringIfNotExists(props.formData.config.hideField,props.formData.list[i].name)
mustBeHidden.push(props.formData.list[i].name)
}
});
}else if(leftOperatorsAndRight.left.startsWith("roleid")){
//1
}
}
}else{
//console.log(leftOperatorsAndRight)
if(leftOperatorsAndRight.right=="当前用户"){
if(leftOperatorsAndRight.operator=="=="){
//2
queryIfOrgOrPerson(leftOperatorsAndRight).then(({ data }) => {
if(data==true){
props.formData.config.hideField = addStringIfNotExists(props.formData.config.hideField,props.formData.list[i].name)
mustBeHidden.push(props.formData.list[i].name)
}
});
}else if(leftOperatorsAndRight.operator=="!="){
//2
queryIfOrgOrPerson(leftOperatorsAndRight).then(({ data }) => {
if(data==true){
props.formData.config.hideField = addStringIfNotExists(props.formData.config.hideField,props.formData.list[i].name)
mustBeHidden.push(props.formData.list[i].name)
}
});
}
}else{
//3
console.log(1)
}
}
}
}
}
}
}
// end
function showOrHide (){
//liwenxuan start //liwenxuan start
/* console.log("-1-constControlChange-->",props.formData) /* console.log("-1-constControlChange-->",props.formData)
console.log("监听表单-2-constControlChange-->",key) console.log("监听表单-2-constControlChange-->",key)
@ -766,14 +878,11 @@ function showOrHide (){
hideFieldArr = recursionToGetFinallyHideFields(hideFieldArr,radioSelectArr3,defaultHideFields) hideFieldArr = recursionToGetFinallyHideFields(hideFieldArr,radioSelectArr3,defaultHideFields)
} }
hideFieldArr = recursionToGetFinallyHideFields(hideFieldArr,radioSelectArr3,defaultHideFields) hideFieldArr = recursionToGetFinallyHideFields(hideFieldArr,radioSelectArr3,defaultHideFields)
props.formData.config.hideField?.push(...mustBeHidden)
@ -785,6 +894,46 @@ function showOrHide (){
//console.log("--constControlChange-->",key, value, data, tProp,type,attribute)//liwenxuan //console.log("--constControlChange-->",key, value, data, tProp,type,attribute)//liwenxuan
} }
function removeDuplicates(arr:any) {
//alert(1)
return arr.reduce((accumulator: any[], currentValue: any) => {
if (!accumulator.includes(currentValue)) {
accumulator.push(currentValue);
}
return accumulator;
}, []);
}
function addStringIfNotExists(arr: string[], str: string) {
if (!arr.includes(str)) {
arr.push(str);
}
return arr;
}
function queryIfOrgOrPerson(obj: { left: string; operator: string; right: string }) {
return request({
url: '/javasys/lowCode/AssociatedForms/queryIfOrgOrPerson',
method: 'post',
data: obj,
});
}
function splitString(str:string) {
const operators = ['==', '>', '>=', '<', '<=', '!=', '不包含' ,'包含'];
for (let operator of operators) {
if (str.includes(operator)) {
let index = str.indexOf(operator);
let left = str.slice(0, index).trim();
let right = str.slice(index + operator.length).trim();
return { left,operator, right };
}
}
//return { left: str, right: '' };
}
const dictForm = computed(() => { const dictForm = computed(() => {
const storage = window.localStorage.getItem('akFormDict') const storage = window.localStorage.getItem('akFormDict')
let storageDict = {} let storageDict = {}
@ -1238,7 +1387,7 @@ onMounted(() => {
nextTick(() => { nextTick(() => {
appendRemoveStyle(true) appendRemoveStyle(true)
}) })
showOrHide() showOrHide("kong")
}) })
onUnmounted(() => { onUnmounted(() => {
if (eventName) { if (eventName) {

8
src/widget/associatedforms/associatedFormsTinyace.vue

@ -18,7 +18,7 @@ const tinymceInit = {
language_url: "/tinymce/langs/zh-Hans.js", // public language_url: "/tinymce/langs/zh-Hans.js", // public
language: "zh-Hans", // zh-Hans.js language: "zh-Hans", // zh-Hans.js
skin_url: "/tinymce/skins/ui/oxide", // skin_url: "/tinymce/skins/ui/oxide", //
height: 174, // height: 164, //
statusbar:false, statusbar:false,
toolbar:false, toolbar:false,
branding: false, //Powered by TinyMCE branding: false, //Powered by TinyMCE
@ -87,10 +87,10 @@ watch(()=>tinymceHtml.value, (val:any) => {
errorCondition("不允许出现多个蓝色块") errorCondition("不允许出现多个蓝色块")
}else if(!containsSingleComparator(gongShi.mathsFormula)&&!gongShi.mathsFormula.includes("包含")&&!gongShi.mathsFormula.includes("不包含")){ }else if(!containsSingleComparator(gongShi.mathsFormula)&&!gongShi.mathsFormula.includes("包含")&&!gongShi.mathsFormula.includes("不包含")){
errorCondition("不存在有效符号") errorCondition("不存在有效符号或关键字")
}else if(checkEnding(gongShi.mathsFormula)){ }else if(checkEnding(gongShi.mathsFormula)){
errorCondition("不能以符号为结尾") errorCondition("不能以符号或关键字为结尾")
}else{ }else{
succCondition() succCondition()
} }
@ -169,7 +169,7 @@ function errorCondition(str:string){
ElMessage.closeAll() ElMessage.closeAll()
ElMessage({ ElMessage({
showClose: true, showClose: true,
message: '条件格式错误 : '+str+' , 正确条件格式如 : 年龄==10', message: '条件格式错误 : '+str/* +' , 正确条件格式如 : 年龄==10' */,
type: 'error', type: 'error',
duration:3500, duration:3500,
}) })

6
src/widget/associatedforms/associatedFormsTinyaceRange.vue

@ -17,7 +17,7 @@ const tinymceInit = {
language_url: "/tinymce/langs/zh-Hans.js", // public language_url: "/tinymce/langs/zh-Hans.js", // public
language: "zh-Hans", // zh-Hans.js language: "zh-Hans", // zh-Hans.js
skin_url: "/tinymce/skins/ui/oxide", // skin_url: "/tinymce/skins/ui/oxide", //
height: 174, // height: 164, //
statusbar:false, statusbar:false,
toolbar:false, toolbar:false,
branding: false, //Powered by TinyMCE branding: false, //Powered by TinyMCE
@ -86,10 +86,10 @@ watch(()=>tinymceHtml.value, (val:any) => {
errorCondition("不允许出现多个蓝色块") errorCondition("不允许出现多个蓝色块")
}else if(!containsSingleComparator(gongShi.mathsFormula)&&!gongShi.mathsFormula.includes("包含")&&!gongShi.mathsFormula.includes("不包含")){ }else if(!containsSingleComparator(gongShi.mathsFormula)&&!gongShi.mathsFormula.includes("包含")&&!gongShi.mathsFormula.includes("不包含")){
errorCondition("不存在有效符号") errorCondition("不存在有效符号或关键字")
}else if(checkEnding(gongShi.mathsFormula)){ }else if(checkEnding(gongShi.mathsFormula)){
errorCondition("不能以符号为结尾") errorCondition("不能以符号或关键字为结尾")
}else{ }else{
succCondition() succCondition()
} }

Loading…
Cancel
Save