Browse Source

门类修复

master
xuhuajiao 9 months ago
parent
commit
a782e00b34
  1. 2
      src/assets/styles/yxk-admin.scss
  2. 27
      src/views/components/category/PreviewForm.vue

2
src/assets/styles/yxk-admin.scss

@ -864,7 +864,7 @@
.el-dialog{ .el-dialog{
width: 758px !important; width: 758px !important;
.preview-content{ .preview-content{
max-height: calc(100vh - 330px) !important;
height: calc(100vh - 330px) !important;
overflow: hidden !important; overflow: hidden !important;
overflow-y: auto !important; overflow-y: auto !important;
border: none !important; border: none !important;

27
src/views/components/category/PreviewForm.vue

@ -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>
Loading…
Cancel
Save