|
@ -3,7 +3,7 @@ |
|
|
<el-form ref="addOrUpdateForm" :model="addOrUpdateForm" :rules="rules" :validate-on-rule-change="false" label-width="125px"> |
|
|
<el-form ref="addOrUpdateForm" :model="addOrUpdateForm" :rules="rules" :validate-on-rule-change="false" label-width="125px"> |
|
|
<el-row :gutter="4" style="padding:0 20px"> |
|
|
<el-row :gutter="4" style="padding:0 20px"> |
|
|
<draggable v-bind="{draggable:'.drag-item',animation:500}" :disabled="!isDraggable" @update="datadragEnd"> |
|
|
<draggable v-bind="{draggable:'.drag-item',animation:500}" :disabled="!isDraggable" @update="datadragEnd"> |
|
|
<el-col v-for="(item,index) in formPreviewData" v-show="item.fieldName !== 'barcode' && item.fieldName !== 'is_entity'" :key="index" :class="['drag-item',item.fieldName === 'barcode'? 'barcode-input':'']" :span="item.isLine || item.fieldName === 'barcode' ? 24 : 12"> |
|
|
|
|
|
|
|
|
<el-col v-for="(item,index) in formPreviewData" v-show="item.fieldName !== 'barcode' && item.fieldName !== 'is_entity'" :key="index" :class="['drag-item',item.fieldName === 'barcode'? 'barcode-input': (item.fieldName === 'fonds_no' && (isDesFormType === 'arcives' || isDesFormType === 'manageArcives') ? ((collectLevel ===1 || (isTitleType===3 && selectedCategory.arrangeType !== 1) || (isTitleType===4 && selectedCategory.arrangeType !== 2)) ? 'disabled-fonds-xm' : 'disabled-fonds') : '')]" :span="item.isLine || item.fieldName === 'barcode' ? 24 : 12"> |
|
|
<el-form-item :label="item.fieldCnName" :prop="item.fieldName"> |
|
|
<el-form-item :label="item.fieldCnName" :prop="item.fieldName"> |
|
|
<!-- select :load-options="loadOptions"--> |
|
|
<!-- select :load-options="loadOptions"--> |
|
|
<treeselect |
|
|
<treeselect |
|
@ -15,7 +15,7 @@ |
|
|
placeholder="" |
|
|
placeholder="" |
|
|
flat |
|
|
flat |
|
|
:style="{ width: item.editLength+'px'}" |
|
|
:style="{ width: item.editLength+'px'}" |
|
|
:disabled="isDisabled" |
|
|
|
|
|
|
|
|
:disabled="isDisabled|| (item.fieldName === 'fonds_no' && (isDesFormType === 'arcives' || isDesFormType === 'manageArcives')) " |
|
|
:validate-event="!isDisabled" |
|
|
:validate-event="!isDisabled" |
|
|
no-options-text="无数据" |
|
|
no-options-text="无数据" |
|
|
@select="selectTree" |
|
|
@select="selectTree" |
|
@ -32,7 +32,7 @@ |
|
|
:rows="item.isInputClass === 'textarea' ? 3 : ''" |
|
|
:rows="item.isInputClass === 'textarea' ? 3 : ''" |
|
|
:class="{'input-popover':(item.isInputClass === 'popover')}" |
|
|
:class="{'input-popover':(item.isInputClass === 'popover')}" |
|
|
:style="{ width: item.editLength+'px'}" |
|
|
:style="{ width: item.editLength+'px'}" |
|
|
:disabled="isDisabled || (item.fieldName === 'archival_category_code') " |
|
|
|
|
|
|
|
|
:disabled="isDisabled || (item.fieldName === 'archival_category_code') || (item.fieldName === 'fonds_no'&& (isDesFormType === 'arcives' || isDesFormType === 'manageArcives')) " |
|
|
:validate-event="!isDisabled" |
|
|
:validate-event="!isDisabled" |
|
|
@mousewheel.native.prevent |
|
|
@mousewheel.native.prevent |
|
|
@DOMMouseScroll.native.prevent |
|
|
@DOMMouseScroll.native.prevent |
|
@ -658,6 +658,9 @@ export default { |
|
|
// popover - 当前选中得 |
|
|
// popover - 当前选中得 |
|
|
handleCurrentFieldName(item) { |
|
|
handleCurrentFieldName(item) { |
|
|
this.currentFieldName = item.fieldName |
|
|
this.currentFieldName = item.fieldName |
|
|
|
|
|
if (item.fieldName === 'fonds_no' && (this.isDesFormType === 'arcives' || this.isDesFormType === 'manageArcives')) { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
this.getAllSubset(item) |
|
|
this.getAllSubset(item) |
|
|
}, |
|
|
}, |
|
|
// 预览和输入时,自动补零 |
|
|
// 预览和输入时,自动补零 |
|
@ -702,9 +705,10 @@ export default { |
|
|
} |
|
|
} |
|
|
if (item.fieldName === 'archival_category_code') { |
|
|
if (item.fieldName === 'archival_category_code') { |
|
|
let targetNode |
|
|
let targetNode |
|
|
if (this.isDesFormType !== 'mergeFile' && this.isDesFormType !== 'arcives' && this.isDesFormType !== 'manageArcives') { |
|
|
|
|
|
const targetId = this.selectedCategory.pid |
|
|
|
|
|
targetNode = this.findNodeById(this.crud.data[0], targetId) |
|
|
|
|
|
|
|
|
if (this.isDesFormType === 'mergeFile') { |
|
|
|
|
|
targetNode = this.selectedCategory |
|
|
|
|
|
} else if (this.isDesFormType !== 'arcives' && this.isDesFormType !== 'manageArcives') { |
|
|
|
|
|
targetNode = this.findNodeById(this.crud.data[0], this.selectedCategory.pid) |
|
|
} else { |
|
|
} else { |
|
|
targetNode = this.findNodeById(this.categoryMenu[0], this.selectedCategory.id) |
|
|
targetNode = this.findNodeById(this.categoryMenu[0], this.selectedCategory.id) |
|
|
} |
|
|
} |
|
@ -718,7 +722,7 @@ export default { |
|
|
if (item.fieldName === 'is_entity') { |
|
|
if (item.fieldName === 'is_entity') { |
|
|
this.$set(this.addOrUpdateForm, item.fieldName, 1) |
|
|
this.$set(this.addOrUpdateForm, item.fieldName, 1) |
|
|
} |
|
|
} |
|
|
if (item.fieldName === 'fonds_no') { |
|
|
|
|
|
|
|
|
if (item.fieldName === 'fonds_no' && (this.isDesFormType === 'arcives' || this.isDesFormType === 'manageArcives')) { |
|
|
this.$set(this.addOrUpdateForm, item.fieldName, this.selectedCategory.fondsNo) |
|
|
this.$set(this.addOrUpdateForm, item.fieldName, this.selectedCategory.fondsNo) |
|
|
} |
|
|
} |
|
|
this.$set(this.rules, item.fieldName, [ |
|
|
this.$set(this.rules, item.fieldName, [ |
|
@ -1146,4 +1150,13 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.disabled-fonds{ |
|
|
|
|
|
height: 34px; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
} |
|
|
|
|
|
.disabled-fonds-xm{ |
|
|
|
|
|
height: auto; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |