|
|
@ -84,6 +84,8 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getDicts } from '@/api/archivesConfig/dict' |
|
|
|
import { getNoFormatField } from '@/api/category/fileNoFormat' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'SettingForm', |
|
|
|
components: {}, |
|
|
@ -328,13 +330,24 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
// 自动生成 - 规则出自“档案规则设置”页面,著录形式为“文本框”才可 |
|
|
|
changeAuto() { |
|
|
|
changeAuto(value) { |
|
|
|
if (this.form.isAutomaticField === 1) { |
|
|
|
this.form.isAutomatic = false |
|
|
|
this.$message.error('已经为档号组成项,不可设置为自动生成') |
|
|
|
} else if (this.form.isInputClass !== 'text') { |
|
|
|
this.form.isAutomatic = false |
|
|
|
this.$message.error('著录形式必须为文本框才可操作!') |
|
|
|
} else if (value) { |
|
|
|
console.log(this.form) |
|
|
|
getNoFormatField({ categoryId: this.form.categoryId }).then((res) => { |
|
|
|
const repeatIndex = res.findIndex((item) => { |
|
|
|
return item.dictionaryId === this.form.id |
|
|
|
}) |
|
|
|
if (repeatIndex >= 0) { |
|
|
|
this.form.isAutomatic = false |
|
|
|
this.$message.error('已经为档号组成项,不能设为自动生成!') |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// submitForm(formName) { |
|
|
|