diff --git a/src/views/qms/inspectionTemplate/addForm.vue b/src/views/qms/inspectionTemplate/addForm.vue index 488227a0d..db9d7eec7 100644 --- a/src/views/qms/inspectionTemplate/addForm.vue +++ b/src/views/qms/inspectionTemplate/addForm.vue @@ -22,62 +22,57 @@ - + - -
- - -
-
-
- - -
- -
-
-
+ +
+ + +
+
+ + + +
+ +
+
+
- +
检验工序
-
检验特性
@@ -179,8 +172,14 @@ @@ -231,9 +230,12 @@ >
- + + +
+ +
+
+
- + @@ -298,7 +313,7 @@ - + @@ -347,65 +362,92 @@ label="是否设定上限" prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" > - + - + - - + - - + + - - + - - - + + + - + - + - - - + + + - +
+ + +
+ +
+
+
@@ -476,7 +536,12 @@ import * as DynamicRuleApi from '@/api/qms/dynamicRule' //动态修改规则 import { DynamicRule } from '@/views/qms/dynamicRule/dynamicRule.data' //动态修改规则 import * as SelectedSetApi from '@/api/qms/selectedSet' //选择集 import { SelectedSet } from '@/views/qms/selectedSet/selectedSet.data' //选择集 -import { validateInteger,validateTwoNum,validateMaxNumber5,validateNumSix } from '@/utils/validator' +import { + validateInteger, + validateTwoNum, + validateMaxNumber5, + validateNumSix +} from '@/utils/validator' const message = useMessage() // 消息弹窗 const props = defineProps({ @@ -525,7 +590,7 @@ const data = ref({ code: '', description: '', version: '', - dynamicUpdateCode:'', + dynamicUpdateCode: '', process: [] }) @@ -543,13 +608,13 @@ const rules = ref({ description: [{ required: true, message: '请填写描述', trigger: 'blur' }], version: [ { required: true, message: '请填写版本', trigger: 'blur' }, - { validator:validateNumSix, message: '版本号小数点前位数不得大于6', trigger: 'blur'}, - { validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'} + { validator: validateNumSix, message: '版本号小数点前位数不得大于6', trigger: 'blur' }, + { validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' } ], inspectionCode: [{ required: true, message: '请选择检验方案模板', trigger: 'blur' }], sequenceCode: [ { required: true, message: '请填写顺序号', trigger: 'blur' }, - { validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'} + { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' } ], inspectionCharCode: [{ required: true, message: '请选择检验特性', trigger: 'blur' }], 'inspectionCharacteristicsBaseVO.description': [ @@ -571,28 +636,27 @@ const rules = ref({ { required: true, message: '请选择特征类型', trigger: ['blur', 'change'] } ], 'inspectionCharacteristicsBaseVO.quantifyTarget': [ - { required: true, message: '请输入目标值', trigger: 'blur' }, + { required: true, message: '请输入目标值', trigger: 'blur' } ], 'inspectionCharacteristicsBaseVO.quantifyCapping': [ - { required: true, message: '请输入上限值', trigger: 'blur' }, + { required: true, message: '请输入上限值', trigger: 'blur' } ], 'inspectionCharacteristicsBaseVO.quantifyLowlimit': [ - { required: true, message: '请输入下限值', trigger: 'blur' }, + { required: true, message: '请输入下限值', trigger: 'blur' } ], 'inspectionCharacteristicsBaseVO.quantifyUom': [ { required: true, message: '请选择计量单位', trigger: 'blur' } ], 'inspectionCharacteristicsBaseVO.quantifyDecimal': [ { required: true, message: '请输入小数位', trigger: 'blur' }, - { validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}, - { validator:validateMaxNumber5, message: '不能大于5', trigger: 'blur'} + { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }, + { validator: validateMaxNumber5, message: '不能大于5', trigger: 'blur' } ], 'inspectionCharacteristicsBaseVO.quantifyQuantifyCode': [ { required: true, message: '请输入选定集', trigger: 'blur' } ] }) - /** 打开弹窗 */ let tabIndex = 1 const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { @@ -606,13 +670,13 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any if (row) { console.log(row) // 如果点击复制进入 - if(formType.value == 'create'){ - data.value ={ + if (formType.value == 'create') { + data.value = { code: '', - description:row.description, - version:String(row.version), - dynamicUpdateCode:row.dynamicUpdateCode, - dynamicUpdateName:row.dynamicUpdateName, + description: row.description, + version: String(row.version), + dynamicUpdateCode: row.dynamicUpdateCode, + dynamicUpdateName: row.dynamicUpdateName, process: [] } let list = await InspectionProcessPageApi.getListByTempleteCode(row.code) @@ -620,34 +684,34 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any let arr = [] list.forEach((item, index) => { let obj = { - description:item.description, - inspectionCharCode:item.inspectionCharCode, - inspectionCode:item.inspectionCode, - sequenceCode:item.sequenceCode, - name :String(index + 1), - inspectionCharacteristicsBaseVO:{ - description:item.inspectionCharacteristicsBaseVO.description, - featureType:item.inspectionCharacteristicsBaseVO.featureType, - inspectionMethodCode:item.inspectionCharacteristicsBaseVO.inspectionMethodCode, - inspectionMethodName:item.inspectionCharacteristicsBaseVO.inspectionMethodName, - isCanUpdate:item.inspectionCharacteristicsBaseVO.isCanUpdate, - isDestructionInspection:item.inspectionCharacteristicsBaseVO.isDestructionInspection, - quantifyCapping:item.inspectionCharacteristicsBaseVO.quantifyCapping, - quantifyDecimal:item.inspectionCharacteristicsBaseVO.quantifyDecimal, - quantifyIsCapping:item.inspectionCharacteristicsBaseVO.quantifyIsCapping, - quantifyIsLowlimit:item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit, - quantifyIsTarget:item.inspectionCharacteristicsBaseVO.quantifyIsTarget, - quantifyLowlimit:item.inspectionCharacteristicsBaseVO.quantifyLowlimit, - quantifyQuantifyCode:item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode, - quantifyQuantifyName:item.inspectionCharacteristicsBaseVO.quantifyQuantifyName, - quantifyTarget:item.inspectionCharacteristicsBaseVO.quantifyTarget, - quantifyUom:item.inspectionCharacteristicsBaseVO.quantifyUom, - resultEntryMethod:item.inspectionCharacteristicsBaseVO.resultEntryMethod, - samplingProcessCode:item.inspectionCharacteristicsBaseVO.samplingProcessCode, - samplingProcessName:item.inspectionCharacteristicsBaseVO.samplingProcessName, + description: item.description, + inspectionCharCode: item.inspectionCharCode, + inspectionCode: item.inspectionCode, + sequenceCode: item.sequenceCode, + name: String(index + 1), + inspectionCharacteristicsBaseVO: { + description: item.inspectionCharacteristicsBaseVO.description, + featureType: item.inspectionCharacteristicsBaseVO.featureType, + inspectionMethodCode: item.inspectionCharacteristicsBaseVO.inspectionMethodCode, + inspectionMethodName: item.inspectionCharacteristicsBaseVO.inspectionMethodName, + isCanUpdate: item.inspectionCharacteristicsBaseVO.isCanUpdate, + isDestructionInspection: item.inspectionCharacteristicsBaseVO.isDestructionInspection, + quantifyCapping: item.inspectionCharacteristicsBaseVO.quantifyCapping, + quantifyDecimal: item.inspectionCharacteristicsBaseVO.quantifyDecimal, + quantifyIsCapping: item.inspectionCharacteristicsBaseVO.quantifyIsCapping, + quantifyIsLowlimit: item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit, + quantifyIsTarget: item.inspectionCharacteristicsBaseVO.quantifyIsTarget, + quantifyLowlimit: item.inspectionCharacteristicsBaseVO.quantifyLowlimit, + quantifyQuantifyCode: item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode, + quantifyQuantifyName: item.inspectionCharacteristicsBaseVO.quantifyQuantifyName, + quantifyTarget: item.inspectionCharacteristicsBaseVO.quantifyTarget, + quantifyUom: item.inspectionCharacteristicsBaseVO.quantifyUom, + resultEntryMethod: item.inspectionCharacteristicsBaseVO.resultEntryMethod, + samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode, + samplingProcessName: item.inspectionCharacteristicsBaseVO.samplingProcessName } } - + // 编辑判断上限下限目标值是否必填 if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true @@ -667,8 +731,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any arr.push(obj) }) data.value.process = arr - - }else{ + } else { data.value = JSON.parse(JSON.stringify(row)) data.value.version = String(data.value.version) let list = await InspectionProcessPageApi.getListByTempleteCode(row.code) @@ -694,7 +757,6 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any }) data.value.process = list } - } else { data.value = { code: '', @@ -703,8 +765,8 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any process: [] } rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false - rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false - rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false + rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false + rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false } tabIndex = data.value.process.length + 1 @@ -748,7 +810,7 @@ const buttonBaseClick1 = (val) => { description: nameForm.value.name, name: newTabName, inspectionCode: '', - dynamicUpdateCode:'', + dynamicUpdateCode: '', sequenceCode: '', inspectionCharCode: '', inspectionCharacteristicsBaseVO: { @@ -786,6 +848,7 @@ const buttonBaseClick1 = (val) => { } } const buttonBaseClick = (val) => { + console.log(val) // 保存 if (val == 'save') { submitForm() @@ -808,23 +871,19 @@ const validateForm = (formRef) => { return false }) } - // 判断对象数组是否有相同属性 相同:true \ 不相同:false - const hasDuplicates =(array)=>{ - return array.some((item, index) => { - return ( - array.findIndex((v, i) => { - return ( - i !== index && - JSON.stringify(v.sequenceCode) === JSON.stringify(item.sequenceCode) - ) - }) !== -1 - ) - }) - } +// 判断对象数组是否有相同属性 相同:true \ 不相同:false +const hasDuplicates = (array) => { + return array.some((item, index) => { + return ( + array.findIndex((v, i) => { + return i !== index && JSON.stringify(v.sequenceCode) === JSON.stringify(item.sequenceCode) + }) !== -1 + ) + }) +} const submitForm = async () => { try { - // 检验主表字段 await validateForm(formProcessRef.value) await formMainRef.value.validate() @@ -833,7 +892,7 @@ const submitForm = async () => { message.error(`请添加工序`) return } - if(hasDuplicates(data.value.process)){ + if (hasDuplicates(data.value.process)) { message.error(`检验工序顺序号不能相同`) return } @@ -844,7 +903,7 @@ const submitForm = async () => { message.error(`模板中有检验工序和检验特性未填写完全`) return } - + // 是否设定上线,是否设定下限,是否是定目标值至少一项为是 const arr = data.value.process.filter( (item) => @@ -862,10 +921,16 @@ const submitForm = async () => { console.log(data.value.process) const arr1 = data.value.process.filter( (item) => - ((item.inspectionCharacteristicsBaseVO.quantifyIsCapping && (String(item.inspectionCharacteristicsBaseVO.quantifyCapping).split('.')[1]?.length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))|| - (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && (String(item.inspectionCharacteristicsBaseVO.quantifyLowlimit).split('.')[1]?.length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))|| - (item.inspectionCharacteristicsBaseVO.quantifyIsTarget && (String(item.inspectionCharacteristicsBaseVO.quantifyTarget).split('.')[1]?.length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))) && - item.inspectionCharacteristicsBaseVO.featureType == 0 + ((item.inspectionCharacteristicsBaseVO.quantifyIsCapping && + String(item.inspectionCharacteristicsBaseVO.quantifyCapping).split('.')[1]?.length > + Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)) || + (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && + String(item.inspectionCharacteristicsBaseVO.quantifyLowlimit).split('.')[1]?.length > + Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)) || + (item.inspectionCharacteristicsBaseVO.quantifyIsTarget && + String(item.inspectionCharacteristicsBaseVO.quantifyTarget).split('.')[1]?.length > + Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal))) && + item.inspectionCharacteristicsBaseVO.featureType == 0 ) if (arr1 && arr1.length > 0) { const str = arr1.map((item) => item.description).join(',') @@ -873,20 +938,39 @@ const submitForm = async () => { return } // 检验上限值应大目标值大于下限值 - const arr2 = data.value.process.filter( - (item) => - { + const arr2 = data.value.process.filter((item) => { // 上限值存在并且下限值存在时,目标值不存在,上限值应大于下限值 - return (item.inspectionCharacteristicsBaseVO.quantifyIsCapping && item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && !item.inspectionCharacteristicsBaseVO.quantifyIsTarget && (parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <=parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit)))|| - // 上限值存在并且目标值存在时,下限值不存在,上限值应大于目标值 - (item.inspectionCharacteristicsBaseVO.quantifyIsCapping && item.inspectionCharacteristicsBaseVO.quantifyIsTarget && !item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && (parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <=parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget)))|| - // 下限值存在并且目标值存在时,上限值不存在,下限值应小于目标值 - ( item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && item.inspectionCharacteristicsBaseVO.quantifyIsTarget&&!item.inspectionCharacteristicsBaseVO.quantifyIsCapping && (parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) >= parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget)))|| - // 上限值,下限值,目标值都存在时,上限值应大于目标值大于下限值 - (item.inspectionCharacteristicsBaseVO.quantifyIsCapping && item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && item.inspectionCharacteristicsBaseVO.quantifyIsTarget && ((parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <=parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) )||(parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <=parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget))||(parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) >= parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget)))) - } - ) - console.log(99,arr2) + return ( + (item.inspectionCharacteristicsBaseVO.quantifyIsCapping && + item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && + !item.inspectionCharacteristicsBaseVO.quantifyIsTarget && + parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <= + parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit)) || + // 上限值存在并且目标值存在时,下限值不存在,上限值应大于目标值 + (item.inspectionCharacteristicsBaseVO.quantifyIsCapping && + item.inspectionCharacteristicsBaseVO.quantifyIsTarget && + !item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && + parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <= + parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget)) || + // 下限值存在并且目标值存在时,上限值不存在,下限值应小于目标值 + (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && + item.inspectionCharacteristicsBaseVO.quantifyIsTarget && + !item.inspectionCharacteristicsBaseVO.quantifyIsCapping && + parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) >= + parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget)) || + // 上限值,下限值,目标值都存在时,上限值应大于目标值大于下限值 + (item.inspectionCharacteristicsBaseVO.quantifyIsCapping && + item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && + item.inspectionCharacteristicsBaseVO.quantifyIsTarget && + (parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <= + parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) || + parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <= + parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget) || + parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) >= + parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget))) + ) + }) + console.log(99, arr2) if (arr2 && arr2.length > 0) { const str = arr2.map((item) => item.description).join(',') message.error(`${str}工序上限值应大于目标值大于下限值`) @@ -914,15 +998,15 @@ if (props.footButttondata) { ] } // 选择特征类型 -const changeFeatureType = (e,item) => { +const changeFeatureType = (e, item) => { item.inspectionCharacteristicsBaseVO.quantifyIsCapping = false item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit = false item.inspectionCharacteristicsBaseVO.quantifyIsTarget = false item.inspectionCharacteristicsBaseVO.quantifyCapping = '' item.inspectionCharacteristicsBaseVO.quantifyLowlimit = '' - item.inspectionCharacteristicsBaseVO.quantifyTarget= '' - item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode= '' - item.inspectionCharacteristicsBaseVO.quantifyQuantifyName= '' + item.inspectionCharacteristicsBaseVO.quantifyTarget = '' + item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode = '' + item.inspectionCharacteristicsBaseVO.quantifyQuantifyName = '' console.log(e) if (e) { rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true @@ -1010,35 +1094,33 @@ const opensearchTable = ( // val : 弹层列表row 数据 const searchTableSuccess = (formField, searchField, val, type, row) => { console.log(row) - if(type == 'features'){ + if (type == 'features') { row.inspectionCharacteristicsBaseVO[formField] = val[0].code - if(formField == 'inspectionMethodCode'){ + if (formField == 'inspectionMethodCode') { row.inspectionCharacteristicsBaseVO.inspectionMethodName = val[0].description - }else if(formField == 'samplingProcessCode'){ + } else if (formField == 'samplingProcessCode') { row.inspectionCharacteristicsBaseVO.samplingProcessName = val[0].description - }else if(formField == 'quantifyQuantifyCode'){ + } else if (formField == 'quantifyQuantifyCode') { row.inspectionCharacteristicsBaseVO.quantifyQuantifyName = val[0].description } - }else{ - if(formField == 'dynamicUpdateCode'){ + } else { + if (formField == 'dynamicUpdateCode') { data.value[formField] = val[0].code data.value.dynamicUpdateName = val[0].description } } - } // 选择是否设定上限值 -const changeIsCapping = (e,item) => { +const changeIsCapping = (e, item) => { item.inspectionCharacteristicsBaseVO.quantifyCapping = '' if (e) { rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true } else { rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false } - } // 选择是否设定下限值 -const changeLowlimit = (e,item) => { +const changeLowlimit = (e, item) => { item.inspectionCharacteristicsBaseVO.quantifyLowlimit = '' if (e) { rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true @@ -1047,7 +1129,7 @@ const changeLowlimit = (e,item) => { } } // 选择是否设定目标值 -const changeIsTarget = (e,item) => { +const changeIsTarget = (e, item) => { item.inspectionCharacteristicsBaseVO.quantifyTarget = '' if (e) { rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true @@ -1056,52 +1138,72 @@ const changeIsTarget = (e,item) => { } } // 复制工序 -const copy = (item)=>{ +const copy = (item) => { const newItem = JSON.parse(JSON.stringify(item)) - newItem.name = data.value.process[data.value.process.length-1].name + 1 + newItem.name = data.value.process[data.value.process.length - 1].name + 1 newItem.code = '' newItem.id = '' - newItem.sequenceCode =data.value?.process[data.value?.process?.length-1]?.sequenceCode? parseInt(data.value.process[data.value.process.length-1].sequenceCode) + 1 : '' + newItem.sequenceCode = data.value?.process[data.value?.process?.length - 1]?.sequenceCode + ? parseInt(data.value.process[data.value.process.length - 1].sequenceCode) + 1 + : '' newItem.inspectionCharacteristicsBaseVO.code = '' - newItem.inspectionCharacteristicsBaseVO. id = '' + newItem.inspectionCharacteristicsBaseVO.id = '' newItem.inspectionCharacteristicsBaseVO.concurrencyStamp = 1 data.value.process.push(newItem) - editableTabsValue.value = newItem.name + editableTabsValue.value = newItem.name } // 动态修改规则失去焦点 -const dynamicUpdateCodeBlur = async () => { - const _searchCondition = {} - const filters: any[] = [] - filters.push( - { - action: '==', - column: 'available', - value: 'TRUE' - }, - { - column: 'code', - action: '==', - value: data.value?.dynamicUpdateCode?.trim() +const mainblur = async (field, pageApi, item) => { + const dataObj = item ? item.inspectionCharacteristicsBaseVO : data.value + if (dataObj[field + 'Code']) { + const _searchCondition = {} + const filters: any[] = [] + filters.push( + { + action: '==', + column: 'available', + value: 'TRUE' + }, + { + column: 'code', + action: '==', + value: dataObj[field + 'Code']?.trim() + } + ) + // 参数整理 + _searchCondition.isSearch = true + _searchCondition.filters = filters + const array = await pageApi(_searchCondition) + Butttondata = [ + defaultButtons.formSaveBtn(null), // 保存 + defaultButtons.formCloseBtn(null) // 关闭 + ] + count.value++ + const obj = array.list[0] + if (obj) { + dataObj[field + 'Name'] = obj.description + } else { + message.alert('暂无数据') + dataObj[field + 'Code'] = '' + dataObj[field + 'Name'] = '' } - ) - // 参数整理 - _searchCondition.isSearch = true - _searchCondition.filters = filters - const array = await DynamicRuleApi.getDynamicRulePage(_searchCondition) - const obj = array.list[0] - if (obj) { - data.value.dynamicUpdateName = obj.description } else { - message.alert('暂无数据') - data.value.dynamicUpdateCode ='' - data.value.dynamicUpdateName ='' - } + dataObj[field + 'Name'] = '' + Butttondata = [ + defaultButtons.formSaveBtn(null), // 保存 + defaultButtons.formCloseBtn(null) // 关闭 + ] + count.value++ + } } -// 检验方法失去焦点 -const inspectionMethodCodeBlur = async () => { - +const count = ref(0) +const mainFocus = () => { + Butttondata = [ + defaultButtons.formSaveBtn({ disabled: true }), // 保存 + defaultButtons.formCloseBtn(null) // 关闭 + ] + count.value++ } -