|
@@ -129,21 +129,21 @@
|
|
|
<template #reference>
|
|
<template #reference>
|
|
|
<div class="tag-group">
|
|
<div class="tag-group">
|
|
|
<el-tag
|
|
<el-tag
|
|
|
- v-for="(unit, idx) in scope.row.participating_units.split(';').slice(0, 2)"
|
|
|
|
|
|
|
+ v-for="(unit, idx) in scope.row.participating_units.split(VALUE_DELIMITER).slice(0, 2)"
|
|
|
:key="idx"
|
|
:key="idx"
|
|
|
size="small"
|
|
size="small"
|
|
|
class="info-tag"
|
|
class="info-tag"
|
|
|
>
|
|
>
|
|
|
{{ unit }}
|
|
{{ unit }}
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
- <el-tag v-if="scope.row.participating_units.split(';').length > 2" size="small" type="info" class="info-tag">
|
|
|
|
|
- +{{ scope.row.participating_units.split(';').length - 2 }}
|
|
|
|
|
|
|
+ <el-tag v-if="scope.row.participating_units.split(VALUE_DELIMITER).length > 2" size="small" type="info" class="info-tag">
|
|
|
|
|
+ +{{ scope.row.participating_units.split(VALUE_DELIMITER).length - 2 }}
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<div class="popover-tag-list">
|
|
<div class="popover-tag-list">
|
|
|
<el-tag
|
|
<el-tag
|
|
|
- v-for="(unit, idx) in scope.row.participating_units.split(';')"
|
|
|
|
|
|
|
+ v-for="(unit, idx) in scope.row.participating_units.split(VALUE_DELIMITER)"
|
|
|
:key="idx"
|
|
:key="idx"
|
|
|
size="small"
|
|
size="small"
|
|
|
class="popover-info-tag"
|
|
class="popover-info-tag"
|
|
@@ -168,7 +168,7 @@
|
|
|
<template #reference>
|
|
<template #reference>
|
|
|
<div class="tag-group">
|
|
<div class="tag-group">
|
|
|
<el-tag
|
|
<el-tag
|
|
|
- v-for="(std, idx) in scope.row.reference_basis.split(';').slice(0, 2)"
|
|
|
|
|
|
|
+ v-for="(std, idx) in scope.row.reference_basis.split(VALUE_DELIMITER).slice(0, 2)"
|
|
|
:key="idx"
|
|
:key="idx"
|
|
|
size="small"
|
|
size="small"
|
|
|
type="info"
|
|
type="info"
|
|
@@ -176,14 +176,14 @@
|
|
|
>
|
|
>
|
|
|
{{ std }}
|
|
{{ std }}
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
- <el-tag v-if="scope.row.reference_basis.split(';').length > 2" size="small" type="info" class="info-tag">
|
|
|
|
|
- +{{ scope.row.reference_basis.split(';').length - 2 }}
|
|
|
|
|
|
|
+ <el-tag v-if="scope.row.reference_basis.split(VALUE_DELIMITER).length > 2" size="small" type="info" class="info-tag">
|
|
|
|
|
+ +{{ scope.row.reference_basis.split(VALUE_DELIMITER).length - 2 }}
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<div class="popover-tag-list">
|
|
<div class="popover-tag-list">
|
|
|
<el-tag
|
|
<el-tag
|
|
|
- v-for="(std, idx) in scope.row.reference_basis.split(';')"
|
|
|
|
|
|
|
+ v-for="(std, idx) in scope.row.reference_basis.split(VALUE_DELIMITER)"
|
|
|
:key="idx"
|
|
:key="idx"
|
|
|
size="small"
|
|
size="small"
|
|
|
type="info"
|
|
type="info"
|
|
@@ -444,13 +444,13 @@
|
|
|
<el-descriptions-item label="专业领域">{{ currentItem?.professional_field || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="专业领域">{{ currentItem?.professional_field || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="参编单位">
|
|
<el-descriptions-item label="参编单位">
|
|
|
<div v-if="currentItem?.participating_units">
|
|
<div v-if="currentItem?.participating_units">
|
|
|
- <div v-for="(unit, idx) in currentItem.participating_units.split(';')" :key="idx">{{ unit }}</div>
|
|
|
|
|
|
|
+ <div v-for="(unit, idx) in currentItem.participating_units.split(VALUE_DELIMITER)" :key="idx">{{ unit }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="引用依据">
|
|
<el-descriptions-item label="引用依据">
|
|
|
<div v-if="currentItem?.reference_basis">
|
|
<div v-if="currentItem?.reference_basis">
|
|
|
- <div v-for="(std, idx) in currentItem.reference_basis.split(';')" :key="idx">{{ std }}</div>
|
|
|
|
|
|
|
+ <div v-for="(std, idx) in currentItem.reference_basis.split(VALUE_DELIMITER)" :key="idx">{{ std }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
@@ -538,6 +538,8 @@ const formRules = {
|
|
|
|
|
|
|
|
const ingesting = ref(false)
|
|
const ingesting = ref(false)
|
|
|
const knowledgeBases = ref<any[]>([])
|
|
const knowledgeBases = ref<any[]>([])
|
|
|
|
|
+// 参编/引用类多值字段统一使用该分隔符
|
|
|
|
|
+const VALUE_DELIMITER = '、'
|
|
|
|
|
|
|
|
// 动态列表字段存储
|
|
// 动态列表字段存储
|
|
|
const participatingUnitsList = ref<string[]>([''])
|
|
const participatingUnitsList = ref<string[]>([''])
|
|
@@ -806,8 +808,8 @@ const handleAction = async (action: string, row: any) => {
|
|
|
Object.keys(editForm).forEach(key => {
|
|
Object.keys(editForm).forEach(key => {
|
|
|
editForm[key] = row[key] || ''
|
|
editForm[key] = row[key] || ''
|
|
|
})
|
|
})
|
|
|
- participatingUnitsList.value = row.participating_units ? row.participating_units.split(';') : ['']
|
|
|
|
|
- referenceBasisList.value = row.reference_basis ? row.reference_basis.split(';') : ['']
|
|
|
|
|
|
|
+ participatingUnitsList.value = row.participating_units ? row.participating_units.split(VALUE_DELIMITER) : ['']
|
|
|
|
|
+ referenceBasisList.value = row.reference_basis ? row.reference_basis.split(VALUE_DELIMITER) : ['']
|
|
|
editForm.id = row.id
|
|
editForm.id = row.id
|
|
|
fileList.value = []
|
|
fileList.value = []
|
|
|
formDialogVisible.value = true
|
|
formDialogVisible.value = true
|
|
@@ -905,8 +907,8 @@ const submitForm = async () => {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- editForm.participating_units = participatingUnitsList.value.filter(item => item.trim() !== '').join(';')
|
|
|
|
|
- editForm.reference_basis = referenceBasisList.value.filter(item => item.trim() !== '').join(';')
|
|
|
|
|
|
|
+ editForm.participating_units = participatingUnitsList.value.filter(item => item.trim() !== '').join(VALUE_DELIMITER)
|
|
|
|
|
+ editForm.reference_basis = referenceBasisList.value.filter(item => item.trim() !== '').join(VALUE_DELIMITER)
|
|
|
|
|
|
|
|
const url = editForm.id
|
|
const url = editForm.id
|
|
|
? `/api/v1/sample/basic-info/edit?type=standard&id=${editForm.id}`
|
|
? `/api/v1/sample/basic-info/edit?type=standard&id=${editForm.id}`
|