|
@ -24,7 +24,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="对应字典" prop="isDefaultValueType"> |
|
|
<el-form-item label="对应字典" prop="isDefaultValueType"> |
|
|
<el-select v-model="form.isDefaultValueType" placeholder="" :disabled="isDisabled"> |
|
|
<el-select v-model="form.isDefaultValueType" placeholder="" :disabled="isDisabled"> |
|
|
<el-option v-for="item in dictionaryData" :key="item.id" :label="item.dicName" :value="item.dicCode" /> |
|
|
|
|
|
|
|
|
<el-option v-for="item in dictionaryData" :key="item.id" :label="item.dicName" :value="item.dicName" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="显示长度" prop="isInputLength"> |
|
|
<el-form-item label="显示长度" prop="isInputLength"> |
|
@ -33,10 +33,6 @@ |
|
|
<el-form-item label="默认值" prop="isDefaultValue"> |
|
|
<el-form-item label="默认值" prop="isDefaultValue"> |
|
|
<el-input v-model="form.isDefaultValue" :disabled="isDisabled" /> |
|
|
<el-input v-model="form.isDefaultValue" :disabled="isDisabled" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item class="checkbox-item"> |
|
|
|
|
|
<span>自动补零</span> |
|
|
|
|
|
<el-checkbox v-model="form.isSupplement" label="" name="isSupplement" :disabled="isDisabled" @change="changeSupplement" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="9"> |
|
|
<el-col :span="9"> |
|
|
<el-form-item class="checkbox-item"> |
|
|
<el-form-item class="checkbox-item"> |
|
@ -53,16 +49,16 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item class="checkbox-item"> |
|
|
<el-form-item class="checkbox-item"> |
|
|
<span>自动生成</span> |
|
|
<span>自动生成</span> |
|
|
<el-checkbox v-model="form.isAuto" label="" name="isAuto" :disabled="isDisabled" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item class="checkbox-item"> |
|
|
|
|
|
<span>自动加一</span> |
|
|
|
|
|
<el-checkbox v-model="form.isIncrease" label="" name="isIncrease" :disabled="isDisabled || form.isInputClass!='number'" /> |
|
|
|
|
|
|
|
|
<el-checkbox v-model="form.isAuto" label="" name="isAuto" :disabled="isDisabled" @change="changeAuto" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item class="checkbox-item"> |
|
|
<el-form-item class="checkbox-item"> |
|
|
<span>值不重复</span> |
|
|
<span>值不重复</span> |
|
|
<el-checkbox v-model="form.isNoRepetition" label="" name="isNoRepetition" :disabled="isDisabled" /> |
|
|
<el-checkbox v-model="form.isNoRepetition" label="" name="isNoRepetition" :disabled="isDisabled" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item class="checkbox-item"> |
|
|
|
|
|
<span>自动补零</span> |
|
|
|
|
|
<el-checkbox v-model="form.isSupplement" label="" name="isSupplement" :disabled="isDisabled" @change="changeSupplement" /> |
|
|
|
|
|
</el-form-item> |
|
|
<el-form-item class="input-num" label="位数" prop="isSupplementNum"> |
|
|
<el-form-item class="input-num" label="位数" prop="isSupplementNum"> |
|
|
<!-- <el-input v-model="form.isSupplementNum" type="number" :min="1" :disabled="isDisabled || !form.isSupplement" /> --> |
|
|
<!-- <el-input v-model="form.isSupplementNum" type="number" :min="1" :disabled="isDisabled || !form.isSupplement" /> --> |
|
|
<el-input-number v-model="form.isSupplementNum" controls-position="right" :min="1" :disabled="isDisabled || !form.isSupplement" /> |
|
|
<el-input-number v-model="form.isSupplementNum" controls-position="right" :min="1" :disabled="isDisabled || !form.isSupplement" /> |
|
@ -197,13 +193,22 @@ export default { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
getForm() { |
|
|
getForm() { |
|
|
|
|
|
// 初始化 |
|
|
this.form.isSupplement = !!this.form.isSupplement |
|
|
this.form.isSupplement = !!this.form.isSupplement |
|
|
this.form.isFullrow = !!this.form.isFullrow |
|
|
this.form.isFullrow = !!this.form.isFullrow |
|
|
this.form.isInput = !!this.form.isInput |
|
|
this.form.isInput = !!this.form.isInput |
|
|
this.form.isRequired = !!this.form.isRequired |
|
|
this.form.isRequired = !!this.form.isRequired |
|
|
|
|
|
this.form.isAuto = !!this.form.isAuto |
|
|
|
|
|
// 初始化 - 著录形式 - 对应字典 |
|
|
|
|
|
if (this.form.isInputClass === 'select' || this.form.isInputClass === 'popover') { |
|
|
|
|
|
this.dictionaryData = dictionarylist |
|
|
|
|
|
} else { |
|
|
|
|
|
this.dictionaryData = [] |
|
|
|
|
|
this.form.isDefaultValueType = null |
|
|
|
|
|
} |
|
|
this.changeSupplement() |
|
|
this.changeSupplement() |
|
|
}, |
|
|
}, |
|
|
// 著录形式为'下拉框'、'弹出框'的,对应字典不为空,反之为空; |
|
|
|
|
|
|
|
|
// 著录形式为'下拉框'、'弹出框'的,对应字典不为空,反之为空 |
|
|
selectInputClass(value) { |
|
|
selectInputClass(value) { |
|
|
if (value === 'select' || value === 'popover') { |
|
|
if (value === 'select' || value === 'popover') { |
|
|
this.dictionaryData = dictionarylist |
|
|
this.dictionaryData = dictionarylist |
|
@ -211,9 +216,11 @@ export default { |
|
|
this.dictionaryData = [] |
|
|
this.dictionaryData = [] |
|
|
this.form.isDefaultValueType = null |
|
|
this.form.isDefaultValueType = null |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (value !== 'number') { |
|
|
|
|
|
this.form.isIncrease = false |
|
|
|
|
|
|
|
|
// 字段类型为数字型,且默认著录类型为数字框不可更改 |
|
|
|
|
|
if (this.form.isDataType === 2) { |
|
|
|
|
|
this.form.isInputClass = 'number' |
|
|
|
|
|
this.dictionaryData = [] |
|
|
|
|
|
this.$message.error('字段类型为数字型,且默认著录类型为数字框') |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// '自动补零' false - 补零位数清空 |
|
|
// '自动补零' false - 补零位数清空 |
|
@ -221,6 +228,28 @@ export default { |
|
|
if (!this.form.isSupplement) { |
|
|
if (!this.form.isSupplement) { |
|
|
this.form.isSupplementNum = undefined |
|
|
this.form.isSupplementNum = undefined |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.form.isSupplement) { |
|
|
|
|
|
// '字段类型'为数字型时,'自动补零'不可操作 |
|
|
|
|
|
if (this.form.isDataType === 2) { |
|
|
|
|
|
this.form.isSupplement = false |
|
|
|
|
|
this.$message.error('字段类型必须为字符型才可操作!') |
|
|
|
|
|
} |
|
|
|
|
|
// 著录形式必须-数字框 |
|
|
|
|
|
if (this.form.isInputClass !== 'number') { |
|
|
|
|
|
this.form.isSupplement = false |
|
|
|
|
|
this.$message.error('著录形式必须为数字框才可操作!') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 自动生成 - 规则出自“档案规则设置”页面,著录形式为“文本框”才可 |
|
|
|
|
|
changeAuto() { |
|
|
|
|
|
if (this.form.isAutoField === 1) { |
|
|
|
|
|
this.form.isAuto = false |
|
|
|
|
|
this.$message.error('已经为档号组成项,不可设置为自动生成') |
|
|
|
|
|
} else if (this.form.isInputClass !== 'text') { |
|
|
|
|
|
this.form.isAuto = false |
|
|
|
|
|
this.$message.error('著录形式必须为文本框才可操作!') |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
submitForm(formName) { |
|
|
submitForm(formName) { |
|
|
// 选择'自动补零',位数必填 |
|
|
// 选择'自动补零',位数必填 |
|
|