只有结构化提示词才需要校验属性完整性

ocr_2.0
DESKTOP-DDTUS3E\yaxin 7 months ago
parent f515468995
commit 2b6e425ef2

@ -308,7 +308,7 @@ export default {
}, },
reset() { reset() {
this.dataInfo = { this.dataInfo = {
rules: '(问[:](.*?))\s*答[:](.*?)(?=(问[:]|$))', rules: '(问[:](.*?))\s*答[:](.*?)(?=(问[:]|$))',
caseType: '', caseType: '',
type: '1', type: '1',
@ -323,10 +323,12 @@ export default {
submit() { submit() {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
for (const item of this.dataInfo.extractAttributes) { if (this.dataInfo.type === '1') {
if (item.attrName === '' || item.attrValueType === '') { for (const item of this.dataInfo.extractAttributes) {
this.$baseMessage.error('请填写完整属性') if (item.attrName === '' || item.attrValueType === '') {
return this.$baseMessage.error('请填写完整属性')
return
}
} }
} }
const params = { const params = {

Loading…
Cancel
Save