Merge remote-tracking branch 'origin/master'

This commit is contained in:
lideqin
2024-08-21 17:56:30 +08:00
3 changed files with 31 additions and 44 deletions
@@ -200,7 +200,7 @@ export default {
methods: {
// 文档对比的一致按钮点击
consistentAssessmentClick () {
if (!this.dataLeft.id && !this.dataRight.id) {
if (!this.dataLeft.id || !this.dataRight.id) {
this.$message.warning(this.$t('docTool.comparison.pleaseSelectTheDataCompared'))
return
}
@@ -244,7 +244,7 @@ export default {
},
// 文档对比的保存按钮点击
submit () {
if (!this.dataLeft.id && !this.dataRight.id) {
if (!this.dataLeft.id || !this.dataRight.id) {
this.$message.warning(this.$t('docTool.comparison.pleaseSelectTheDataCompared'))
return
}
@@ -5,6 +5,7 @@
:visible="visible"
@close="handleCancel"
width="1100"
destroyOnClose
class="custom-drawer-style">
<div class="custom-drawer-style-scroll">
@@ -5,6 +5,7 @@
:visible="visible"
@close="handleCancel"
width="900"
destroyOnClose
class="custom-drawer-style">
<div class="custom-drawer-style-scroll">
@@ -146,18 +147,26 @@
:label-in-value="false"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt + getPlaceholderSuffix(item)" />
<!--16树形弹框选择-->
<tree-selection v-else-if="item.fieldShowType === FieldType.TREE_MODAL_SELECT.value || item.fieldShowType === FieldType.TREE_MODAL_SELECT_SEARCH_DIFF.value"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt + getPlaceholderSuffix(item)"
v-model="formInline[item.dbFieldName]"
:filedName="item.dbFieldName"
type="checkbox"
:options-href="item.fieldHref"
:nameStr="formInline[item.dbFieldName + '_dictText']"
:dict-id="item.dictId"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
:children-column-name="getTreeSelectionChildrenColumnName(item)"
:is-tag-library-restriction="item.dbFieldName === 'property_tag'"
:search-field-name="item.dbFieldName === 'property_tag' ? 'firstNodeName' : null" />
<!--<tree-selection v-else-if="item.fieldShowType === FieldType.TREE_MODAL_SELECT.value || item.fieldShowType === FieldType.TREE_MODAL_SELECT_SEARCH_DIFF.value"-->
<!-- :placeholder="$t('pleaseSelect')+item.dbFieldTxt + getPlaceholderSuffix(item)"-->
<!-- v-model="formInline[item.dbFieldName]"-->
<!-- :filedName="item.dbFieldName"-->
<!-- type="checkbox"-->
<!-- :options-href="item.fieldHref"-->
<!-- :nameStr="formInline[item.dbFieldName + '_dictText']"-->
<!-- :dict-id="item.dictId"-->
<!-- :disabled="disabled || disabledFieldList.includes(item.dbFieldName)"-->
<!-- :children-column-name="getTreeSelectionChildrenColumnName(item)"-->
<!-- :is-tag-library-restriction="item.dbFieldName === 'property_tag'"-->
<!-- :search-field-name="item.dbFieldName === 'property_tag' ? 'firstNodeName' : null" />-->
<tree-data-selection v-else-if="item.fieldShowType === FieldType.TREE_MODAL_SELECT.value || item.fieldShowType === FieldType.TREE_MODAL_SELECT_SEARCH_DIFF.value"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
v-model="formInline[item.dbFieldName]"
:fieldName="item.dbFieldName"
:nameStr="formInline[item.dbFieldName + '_dictText']"
@nameChange="treeDataSelectNameChange"
:optionsHref="item.treeFirstHref"
:dict-id="item.dictId"/>
</a-form-model-item>
</div>
</template>
@@ -187,13 +196,15 @@ import { getFormDictTreeList } from '../../../../api/api'
import { getAction } from '../../../../api/manage'
import STreeSelect from '../../../../components/STreeSelect'
import TreeSelection from '../../../../components/selection/TreeSelection'
import TreeDataSelection from '@comp/selection/TreeDataSelection'
export default {
name: 'SplitDetailBatchEditDrawer',
components: { TreeSelection, UserSelection, StandardSelection, UploadFile, JMultipleDatePicker, STreeSelect },
components: { TreeDataSelection, TreeSelection, UserSelection, StandardSelection, UploadFile, JMultipleDatePicker, STreeSelect },
data () {
return {
FieldType,
defaultValue: {},
title: this.$t('docTool.split.batchEdit'),
visible: false,
confirmLoading: false,
@@ -206,39 +217,13 @@ export default {
uploadName: '',
type: 'add',
hiddenFieldList: ['item_num', 'item_title', 'item_content', 'interpretation_articles', 'translation'], // 隐藏的字段
radioDictSelect: ['is_long_effect'], // 使用radio样式的数据字典单选
radioDictSelect: [], // 使用radio样式的数据字典单选
disabledFieldList: [], // 禁用的字段
specialPlaceholder: {}, // 特殊的placeholder
optionsData: {} // 通过接口获取的下拉数据
// interpretationArticlesList: [] // 条文解读数据
}
},
watch: {
// 是否长期有效,是的话新认证实施日期、已认证实施日期、新注册实施日期为多选,否则为单选
'formInline.is_long_effect': {
handler (value) {
console.log('是否长期有效', value)
const indexArr = []
// 新认证实施日期
indexArr[0] = this.dataList.findIndex(tt => tt.dbFieldName === 'new_cer_implement_date')
// 已认证实施日期
indexArr[1] = this.dataList.findIndex(tt => tt.dbFieldName === 'cer_implement_date')
// 新注册实施日期
indexArr[2] = this.dataList.findIndex(tt => tt.dbFieldName === 'new_register_implement_date')
if (value === YesOrNoEnum.YES.value) {
indexArr.forEach(index => {
this.$set(this.dataList[index], 'fieldShowType', FieldType.DATE_MORE.value)
})
} else if (value === YesOrNoEnum.NO.value) {
indexArr.forEach(index => {
this.$set(this.dataList[index], 'fieldShowType', FieldType.DATE_SINGLE.value)
})
}
this.$forceUpdate()
},
immediate: true
}
},
methods: {
open (ids) {
this.visible = true
@@ -269,8 +254,6 @@ export default {
// this.interpretationArticlesList = [
// { id: '', itemContent: null }
// ]
// 是否长期有效默认选否
this.$set(this.formInline, 'is_long_effect', YesOrNoEnum.NO.value)
this.dataList = res.result
this.ruleList = res.result
this.integrateData()
@@ -458,6 +441,9 @@ export default {
}
return null
},
treeDataSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
/**
* 如果字段中的usableRange只有一个值,那么就需要在placeholder中标识
* @param field