|
@@ -3,9 +3,7 @@ import { useRouter, useRoute } from 'vue-router'
|
|
|
import partyIDSelect from './components/partyIDSelect.vue'
|
|
import partyIDSelect from './components/partyIDSelect.vue'
|
|
|
import GroupNameSelect from './components/GroupNameSelect.vue'
|
|
import GroupNameSelect from './components/GroupNameSelect.vue'
|
|
|
import AccountSelect from './components/AccountSelect.vue'
|
|
import AccountSelect from './components/AccountSelect.vue'
|
|
|
-import { VueDraggable } from 'vue-draggable-plus'
|
|
|
|
|
-import AdjustmentField from './components/AdjustmentField.vue'
|
|
|
|
|
-import { cloneDeep } from 'lodash'
|
|
|
|
|
|
|
+import ReportFieldsConfiguration from './components/ReportFieldsConfiguration.vue'
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
@@ -30,6 +28,7 @@ onMounted(() => {
|
|
|
reportLevel: data.reportLevel,
|
|
reportLevel: data.reportLevel,
|
|
|
reportDescription: data.reportDescription
|
|
reportDescription: data.reportDescription
|
|
|
}
|
|
}
|
|
|
|
|
+ oldReportLevel.value = data.reportLevel
|
|
|
fieldsList.value = data.reportFields.map((item) => {
|
|
fieldsList.value = data.reportFields.map((item) => {
|
|
|
return {
|
|
return {
|
|
|
...item,
|
|
...item,
|
|
@@ -79,8 +78,8 @@ interface Field {
|
|
|
const fieldsList = ref<Field[]>([])
|
|
const fieldsList = ref<Field[]>([])
|
|
|
const levelOptions = [
|
|
const levelOptions = [
|
|
|
{
|
|
{
|
|
|
- label: 'Shipment level',
|
|
|
|
|
- value: 'Shipment level'
|
|
|
|
|
|
|
+ label: 'Shipment Level',
|
|
|
|
|
+ value: 'Shipment Level'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: 'Container Level',
|
|
label: 'Container Level',
|
|
@@ -97,199 +96,6 @@ const generate8DigitUnique = () => {
|
|
|
return Math.floor(10000000 + Math.random() * 90000000).toString()
|
|
return Math.floor(10000000 + Math.random() * 90000000).toString()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const changeFieldConfig = (state: any, field: string, index: number, key: string) => {
|
|
|
|
|
- if (!state) return
|
|
|
|
|
- fieldsList.value.forEach((item) => {
|
|
|
|
|
- if (item.field === field) {
|
|
|
|
|
- item[key] = false
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- const firstMatch = fieldsList.value[index]
|
|
|
|
|
- if (firstMatch) {
|
|
|
|
|
- firstMatch[key] = true
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-const handleDeleteField = (index: number, uniqueId: string) => {
|
|
|
|
|
- fieldsList.value.splice(index, 1)
|
|
|
|
|
-
|
|
|
|
|
- Object.keys(copyFieldsList.value).forEach((key) => {
|
|
|
|
|
- copyFieldsList.value[key] = copyFieldsList.value[key].filter(
|
|
|
|
|
- (item) => item.uniqueId !== uniqueId
|
|
|
|
|
- )
|
|
|
|
|
- })
|
|
|
|
|
-}
|
|
|
|
|
-const copyFieldsList = ref({})
|
|
|
|
|
-
|
|
|
|
|
-const fieldMappingVisible = ref(false)
|
|
|
|
|
-const curFieldItem = ref()
|
|
|
|
|
-const mappingData = ref([
|
|
|
|
|
- {
|
|
|
|
|
- system: '',
|
|
|
|
|
- converted: ''
|
|
|
|
|
- }
|
|
|
|
|
-])
|
|
|
|
|
-const handleMappingField = (index: number) => {
|
|
|
|
|
- curFieldItem.value = fieldsList.value[index]
|
|
|
|
|
- mappingData.value = curFieldItem.value.mapping
|
|
|
|
|
- ? cloneDeep(curFieldItem.value.mapping)
|
|
|
|
|
- : [
|
|
|
|
|
- {
|
|
|
|
|
- system: '',
|
|
|
|
|
- converted: ''
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
- fieldMappingVisible.value = true
|
|
|
|
|
-}
|
|
|
|
|
-const handleDeleteMappingField = (index: number) => {
|
|
|
|
|
- mappingData.value.splice(index, 1)
|
|
|
|
|
-}
|
|
|
|
|
-const handleAddMapping = () => {
|
|
|
|
|
- curFieldItem.value.mapping = mappingData.value
|
|
|
|
|
- clearMappingData()
|
|
|
|
|
- fieldMappingVisible.value = false
|
|
|
|
|
-}
|
|
|
|
|
-const handleAddMappingItem = () => {
|
|
|
|
|
- mappingData.value.push({
|
|
|
|
|
- system: '',
|
|
|
|
|
- converted: ''
|
|
|
|
|
- })
|
|
|
|
|
-}
|
|
|
|
|
-const clearMappingData = () => {
|
|
|
|
|
- mappingData.value = [
|
|
|
|
|
- {
|
|
|
|
|
- system: '',
|
|
|
|
|
- converted: ''
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-const handleCopyField = (index: number) => {
|
|
|
|
|
- const curField = cloneDeep(fieldsList.value[index])
|
|
|
|
|
- curField.displayName = `${curField.displayName} (Copy)`
|
|
|
|
|
- curField.isFilter = false
|
|
|
|
|
- curField.isSort = false
|
|
|
|
|
- curField.uniqueId = generate8DigitUnique()
|
|
|
|
|
- if (copyFieldsList.value[curField.field]) {
|
|
|
|
|
- copyFieldsList.value[curField.field].push(cloneDeep(curField))
|
|
|
|
|
- } else {
|
|
|
|
|
- copyFieldsList.value[curField.field] = [cloneDeep(curField)]
|
|
|
|
|
- }
|
|
|
|
|
- fieldsList.value.splice(index + 1, 0, cloneDeep(curField))
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-const AdjustmentFieldRef = ref()
|
|
|
|
|
-// 打开定制表格弹窗
|
|
|
|
|
-const handleCustomizeColumns = () => {
|
|
|
|
|
- if (!infoData.value.reportLevel) {
|
|
|
|
|
- ElMessage.warning('Please select the report level.')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- const params = {
|
|
|
|
|
- serial_no: '',
|
|
|
|
|
- level: infoData.value.reportLevel
|
|
|
|
|
- }
|
|
|
|
|
- const seen = new Set()
|
|
|
|
|
- const uniqueArray = fieldsList.value.filter((item) => {
|
|
|
|
|
- if (seen.has(item.field)) {
|
|
|
|
|
- return false // 已存在,跳过
|
|
|
|
|
- }
|
|
|
|
|
- seen.add(item.field)
|
|
|
|
|
- return true // 第一次出现,保留
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- AdjustmentFieldRef.value.openDialog(
|
|
|
|
|
- params,
|
|
|
|
|
- -220,
|
|
|
|
|
- 'Drag item over to this selection or click "add" icon to show the field on report template list',
|
|
|
|
|
- uniqueArray
|
|
|
|
|
- )
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-const newFieldInfo = ref<{
|
|
|
|
|
- name: string
|
|
|
|
|
- fieldType: 'Blank' | 'Fixed Value'
|
|
|
|
|
- value: string
|
|
|
|
|
-}>({
|
|
|
|
|
- name: '',
|
|
|
|
|
- fieldType: 'Blank',
|
|
|
|
|
- value: ''
|
|
|
|
|
-})
|
|
|
|
|
-const addNewFieldVisible = ref(false)
|
|
|
|
|
-// 添加新字段
|
|
|
|
|
-const handleAddNewField = () => {
|
|
|
|
|
- addNewFieldVisible.value = true
|
|
|
|
|
-}
|
|
|
|
|
-const handleFieldTypeChange = () => {
|
|
|
|
|
- newFieldInfo.value.value = ''
|
|
|
|
|
-}
|
|
|
|
|
-const addNewField = () => {
|
|
|
|
|
- if (!newFieldInfo.value.name?.trim()) {
|
|
|
|
|
- ElMessage.warning('Please enter the new field name.')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (newFieldInfo.value.fieldType === 'Fixed Value' && !newFieldInfo.value.value?.trim()) {
|
|
|
|
|
- ElMessage.warning('Please enter the fixed value.')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- fieldsList.value.unshift({
|
|
|
|
|
- uniqueId: generate8DigitUnique(),
|
|
|
|
|
- field: newFieldInfo.value.name,
|
|
|
|
|
- title: newFieldInfo.value.name,
|
|
|
|
|
- displayName: newFieldInfo.value.name,
|
|
|
|
|
- value: newFieldInfo.value.value,
|
|
|
|
|
- fieldType: 'Custom',
|
|
|
|
|
- groupName: '',
|
|
|
|
|
- isFilter: false,
|
|
|
|
|
- isSort: false
|
|
|
|
|
- })
|
|
|
|
|
- clearNewFieldData()
|
|
|
|
|
- addNewFieldVisible.value = false
|
|
|
|
|
-}
|
|
|
|
|
-const clearNewFieldData = () => {
|
|
|
|
|
- newFieldInfo.value = {
|
|
|
|
|
- name: '',
|
|
|
|
|
- fieldType: 'Blank',
|
|
|
|
|
- value: ''
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-// 调整应用字段
|
|
|
|
|
-const handleApplay = (data: any) => {
|
|
|
|
|
- const customizeData = fieldsList.value.filter((item: any) => item.field_type === 'Custom')
|
|
|
|
|
- fieldsList.value = data.map((item: any) => {
|
|
|
|
|
- return {
|
|
|
|
|
- ...item,
|
|
|
|
|
- label: item.label,
|
|
|
|
|
- title: item.title || item.label,
|
|
|
|
|
- displayName: item.displayName || item.label,
|
|
|
|
|
- isFilter: !!item.isFilter,
|
|
|
|
|
- isSort: !!item.isSort,
|
|
|
|
|
- uniqueId: item.uniqueId || generate8DigitUnique()
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- fieldsList.value = [...customizeData, ...fieldsList.value]
|
|
|
|
|
-
|
|
|
|
|
- const validFields = new Set(fieldsList.value.map((item) => item.field))
|
|
|
|
|
- for (const field in copyFieldsList.value) {
|
|
|
|
|
- if (!validFields.has(field)) {
|
|
|
|
|
- delete copyFieldsList.value[field]
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // === 第三步:从后往前插入副本(不修改原始项)===
|
|
|
|
|
- for (let i = fieldsList.value.length - 1; i >= 0; i--) {
|
|
|
|
|
- const field = fieldsList.value[i].field
|
|
|
|
|
- const copies = copyFieldsList.value[field]
|
|
|
|
|
-
|
|
|
|
|
- if (copies?.length) {
|
|
|
|
|
- // 插入副本到原项后面
|
|
|
|
|
- fieldsList.value.splice(i + 1, 0, ...copies)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
const accessControlType = ref('All Users')
|
|
const accessControlType = ref('All Users')
|
|
|
const detailRef: Ref<HTMLElement | null> = ref(null)
|
|
const detailRef: Ref<HTMLElement | null> = ref(null)
|
|
|
|
|
|
|
@@ -314,13 +120,22 @@ const changeAccount = (val: string[]) => {
|
|
|
specificRoles.value.systemAccount = val
|
|
specificRoles.value.systemAccount = val
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const fieldLoading = ref(false)
|
|
|
|
|
-const handleRightRemove = () => {}
|
|
|
|
|
-
|
|
|
|
|
const handleCancel = () => {
|
|
const handleCancel = () => {
|
|
|
router.push('/template-management')
|
|
router.push('/template-management')
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const fieldsConfigurationRef = ref()
|
|
|
|
|
+const oldReportLevel = ref('')
|
|
|
|
|
+const changeLevel = (val: string) => {
|
|
|
|
|
+ fieldsConfigurationRef.value.changeReportLevel(val, oldReportLevel.value)
|
|
|
|
|
+}
|
|
|
|
|
+const cancelChangeLevel = (val: string) => {
|
|
|
|
|
+ infoData.value.reportLevel = val
|
|
|
|
|
+}
|
|
|
|
|
+const changeOldLevel = (val: string) => {
|
|
|
|
|
+ oldReportLevel.value = val
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const handlePageSave = () => {
|
|
const handlePageSave = () => {
|
|
|
let verified = true
|
|
let verified = true
|
|
|
if (!infoData.value.reportName.trim()) {
|
|
if (!infoData.value.reportName.trim()) {
|
|
@@ -358,13 +173,12 @@ const handlePageSave = () => {
|
|
|
party_ids: specificRoles.value.partyId || [],
|
|
party_ids: specificRoles.value.partyId || [],
|
|
|
group_names: specificRoles.value.groupName || [],
|
|
group_names: specificRoles.value.groupName || [],
|
|
|
system_account: specificRoles.value.systemAccount || [],
|
|
system_account: specificRoles.value.systemAccount || [],
|
|
|
- fieldsList: fieldsList.value
|
|
|
|
|
|
|
+ fieldsList: fieldsConfigurationRef.value.getFieldsList()
|
|
|
}
|
|
}
|
|
|
let serial_no = ''
|
|
let serial_no = ''
|
|
|
if (route.query.copy !== 't' && route.query.serial_no) {
|
|
if (route.query.copy !== 't' && route.query.serial_no) {
|
|
|
serial_no = String(route.query.serial_no)
|
|
serial_no = String(route.query.serial_no)
|
|
|
}
|
|
}
|
|
|
- console.log(data, 'save Data')
|
|
|
|
|
$api
|
|
$api
|
|
|
.saveNewReportTemplate({ ...data, serial_no })
|
|
.saveNewReportTemplate({ ...data, serial_no })
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
@@ -412,7 +226,11 @@ const handlePageSave = () => {
|
|
|
<span style="color: var(--color-danger)">*</span>
|
|
<span style="color: var(--color-danger)">*</span>
|
|
|
<span>Report Level</span>
|
|
<span>Report Level</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-select v-model="infoData.reportLevel" placeholder="Please enter...">
|
|
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="infoData.reportLevel"
|
|
|
|
|
+ @change="changeLevel"
|
|
|
|
|
+ placeholder="Please enter..."
|
|
|
|
|
+ >
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in levelOptions"
|
|
v-for="item in levelOptions"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
@@ -435,116 +253,13 @@ const handlePageSave = () => {
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="fields-configuration template-box">
|
|
|
|
|
- <div class="header">
|
|
|
|
|
- <span>Report Fields Configuration</span>
|
|
|
|
|
-
|
|
|
|
|
- <div class="right-option">
|
|
|
|
|
- <el-button
|
|
|
|
|
- class="el-button--dark"
|
|
|
|
|
- @click="handleAddNewField"
|
|
|
|
|
- style="width: 148px; padding-top: 11px"
|
|
|
|
|
- >
|
|
|
|
|
- <span style="margin-right: 3px" class="font_family icon-icon_add_b"></span>
|
|
|
|
|
- <span>Add New Field</span>
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- v-if="fieldsList.length > 0"
|
|
|
|
|
- class="el-button--dark"
|
|
|
|
|
- @click="handleCustomizeColumns()"
|
|
|
|
|
- style="width: 110px; padding-top: 11px"
|
|
|
|
|
- >
|
|
|
|
|
- <span style="margin-right: 3px" class="font_family icon-icon_add_b"></span>
|
|
|
|
|
- <span>Select Field</span>
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="content-box">
|
|
|
|
|
- <div class="empty-box" v-if="fieldsList.length === 0">
|
|
|
|
|
- <el-button class="el-button--dark" @click="handleCustomizeColumns">
|
|
|
|
|
- <span class="font_family icon-icon_add_b"></span>Add/Edit Field
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <p>No field selected. click “Add Field” to get started.</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="fields-list" v-else>
|
|
|
|
|
- <VueDraggable
|
|
|
|
|
- v-vloading="fieldLoading"
|
|
|
|
|
- v-model="fieldsList"
|
|
|
|
|
- class="column-list"
|
|
|
|
|
- ghost-class="ghost-column"
|
|
|
|
|
- :forceFallback="true"
|
|
|
|
|
- fallback-class="fallback-class"
|
|
|
|
|
- group="customizeColumns"
|
|
|
|
|
- item-key="uniqueId"
|
|
|
|
|
- @end="handleRightRemove"
|
|
|
|
|
- handle=".handle-draggable"
|
|
|
|
|
- >
|
|
|
|
|
- <div
|
|
|
|
|
- class="field-item"
|
|
|
|
|
- v-for="(fieldItem, index) in fieldsList"
|
|
|
|
|
- :key="fieldItem.uniqueId"
|
|
|
|
|
- >
|
|
|
|
|
- <span
|
|
|
|
|
- class="font_family icon-icon_dragsort__b draggable-icon handle-draggable"
|
|
|
|
|
- style="margin-right: 12px; font-size: 16px"
|
|
|
|
|
- ></span>
|
|
|
|
|
- <div class="label handle-draggable">
|
|
|
|
|
- <span style="font-weight: 700">[{{ fieldItem.field }}]</span>
|
|
|
|
|
- <span style="margin-left: 8px">{{ fieldItem.title }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- :id="fieldItem.uniqueId"
|
|
|
|
|
- :name="fieldItem.uniqueId"
|
|
|
|
|
- class="display-name"
|
|
|
|
|
- v-model="fieldItem.displayName"
|
|
|
|
|
- placeholder="Display Name in Report"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- <div class="actions">
|
|
|
|
|
- <div class="checkbox-group">
|
|
|
|
|
- <el-checkbox
|
|
|
|
|
- :disabled="
|
|
|
|
|
- fieldItem.fieldType !== 'System' ||
|
|
|
|
|
- fieldItem.groupName === 'Container Status' ||
|
|
|
|
|
- fieldItem.groupName === 'Milestone'
|
|
|
|
|
- "
|
|
|
|
|
- v-model="fieldItem.isFilter"
|
|
|
|
|
- @change="changeFieldConfig($event, fieldItem.field, index, 'isFilter')"
|
|
|
|
|
- >Filter</el-checkbox
|
|
|
|
|
- >
|
|
|
|
|
- <el-checkbox
|
|
|
|
|
- :disabled="fieldItem.fieldType !== 'System'"
|
|
|
|
|
- v-model="fieldItem.isSort"
|
|
|
|
|
- @change="changeFieldConfig($event, fieldItem.field, index, 'isSort')"
|
|
|
|
|
- >Sort</el-checkbox
|
|
|
|
|
- >
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="action-icon">
|
|
|
|
|
- <span
|
|
|
|
|
- style="padding: 5px"
|
|
|
|
|
- v-if="
|
|
|
|
|
- fieldItem.fieldType === 'System' && fieldItem.isFieldDataMapping === 't'
|
|
|
|
|
- "
|
|
|
|
|
- @click="handleMappingField(index)"
|
|
|
|
|
- class="font_family icon-icon_convert_b"
|
|
|
|
|
- ></span>
|
|
|
|
|
- <span v-else style="width: 20px"></span>
|
|
|
|
|
- <span
|
|
|
|
|
- style="padding: 5px"
|
|
|
|
|
- @click="handleCopyField(index)"
|
|
|
|
|
- class="font_family icon-icon_clone_b"
|
|
|
|
|
- ></span>
|
|
|
|
|
- <span
|
|
|
|
|
- style="padding: 5px 7px"
|
|
|
|
|
- @click="handleDeleteField(index, fieldItem.uniqueId)"
|
|
|
|
|
- class="font_family icon-icon_delete_b"
|
|
|
|
|
- ></span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </VueDraggable>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <ReportFieldsConfiguration
|
|
|
|
|
+ :report-level="infoData.reportLevel"
|
|
|
|
|
+ :pageData="fieldsList"
|
|
|
|
|
+ @confirm-change-level="changeOldLevel"
|
|
|
|
|
+ @cancel-change-level="cancelChangeLevel"
|
|
|
|
|
+ ref="fieldsConfigurationRef"
|
|
|
|
|
+ ></ReportFieldsConfiguration>
|
|
|
<div class="report-access-control template-box">
|
|
<div class="report-access-control template-box">
|
|
|
<div class="header">Report Access Control</div>
|
|
<div class="header">Report Access Control</div>
|
|
|
<div class="content-box">
|
|
<div class="content-box">
|
|
@@ -614,119 +329,6 @@ const handlePageSave = () => {
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <AdjustmentField @apply="handleApplay" ref="AdjustmentFieldRef" />
|
|
|
|
|
- <el-dialog
|
|
|
|
|
- class="add-new-field-dialog"
|
|
|
|
|
- title="Add New Field"
|
|
|
|
|
- v-model="addNewFieldVisible"
|
|
|
|
|
- @closed="clearNewFieldData"
|
|
|
|
|
- width="480"
|
|
|
|
|
- >
|
|
|
|
|
- <div>
|
|
|
|
|
- <div class="field-item">
|
|
|
|
|
- <div class="label">
|
|
|
|
|
- <span class="required-symbol">*</span>
|
|
|
|
|
- <span>New Field Name</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-input placeholder="Please enter..." v-model="newFieldInfo.name"></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="field-item field-value">
|
|
|
|
|
- <div class="label">
|
|
|
|
|
- <span class="required-symbol">*</span>
|
|
|
|
|
- <span>Field Value</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-radio-group v-model="newFieldInfo.fieldType" @change="handleFieldTypeChange">
|
|
|
|
|
- <el-radio label="Blank">Blank</el-radio>
|
|
|
|
|
- <el-radio label="Fixed Value">Fixed Value</el-radio>
|
|
|
|
|
- </el-radio-group>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="field-item" v-if="newFieldInfo.fieldType === 'Fixed Value'">
|
|
|
|
|
- <div class="label">
|
|
|
|
|
- <span class="required-symbol">*</span>
|
|
|
|
|
- <span>Fixed Value</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-input placeholder="Please enter..." v-model="newFieldInfo.value"></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <el-button
|
|
|
|
|
- style="height: 40px; width: 115px"
|
|
|
|
|
- class="cancel-btn"
|
|
|
|
|
- type="default"
|
|
|
|
|
- @click="addNewFieldVisible = false"
|
|
|
|
|
- >Cancel</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button style="height: 40px; width: 120px" class="el-button--dark" @click="addNewField"
|
|
|
|
|
- >Apply</el-button
|
|
|
|
|
- >
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- <el-dialog
|
|
|
|
|
- class="field-mapping-dialog"
|
|
|
|
|
- v-model="fieldMappingVisible"
|
|
|
|
|
- title="Mapping (Field: Final Destination)"
|
|
|
|
|
- width="800"
|
|
|
|
|
- @close="clearMappingData"
|
|
|
|
|
- >
|
|
|
|
|
- <div>
|
|
|
|
|
- <div class="mapping-list">
|
|
|
|
|
- <div class="label">
|
|
|
|
|
- <div class="left-label">
|
|
|
|
|
- <span style="color: var(--color-danger)">*</span>
|
|
|
|
|
- <span>System Value</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="right-label">
|
|
|
|
|
- <span style="color: var(--color-danger)">*</span>
|
|
|
|
|
- <span>System Value</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="max-height: 380px; overflow-y: auto">
|
|
|
|
|
- <div class="list-item" v-for="(item, index) in mappingData" :key="index">
|
|
|
|
|
- <div class="left-system-value">
|
|
|
|
|
- <el-input placeholder="Please enter..." clearable v-model="item.system"></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="right-converted-value">
|
|
|
|
|
- <el-input
|
|
|
|
|
- placeholder="Please enter..."
|
|
|
|
|
- clearable
|
|
|
|
|
- v-model="item.converted"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="delete-icon">
|
|
|
|
|
- <span
|
|
|
|
|
- @click="handleDeleteMappingField(index)"
|
|
|
|
|
- class="font_family icon-icon_delete_b"
|
|
|
|
|
- ></span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-button
|
|
|
|
|
- class="el-button--text"
|
|
|
|
|
- @click="handleAddMappingItem"
|
|
|
|
|
- style="height: 32px; margin-top: 8px; padding: 8px"
|
|
|
|
|
- >
|
|
|
|
|
- <span class="font_family icon-icon_add_b" style="color: var(--color-theme)"></span>
|
|
|
|
|
- <span style="color: var(--color-theme)">Add Mapping</span>
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <el-button
|
|
|
|
|
- style="height: 40px; width: 115px"
|
|
|
|
|
- class="cancel-btn"
|
|
|
|
|
- type="default"
|
|
|
|
|
- @click="fieldMappingVisible = false"
|
|
|
|
|
- >Cancel</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button
|
|
|
|
|
- style="height: 40px; width: 120px"
|
|
|
|
|
- class="el-button--dark"
|
|
|
|
|
- @click="handleAddMapping"
|
|
|
|
|
- >Apply</el-button
|
|
|
|
|
- >
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|