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