|
@@ -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,
|
|
@@ -72,13 +71,15 @@ interface Field {
|
|
|
value?: string
|
|
value?: string
|
|
|
isFilter: boolean
|
|
isFilter: boolean
|
|
|
isSort: boolean
|
|
isSort: boolean
|
|
|
|
|
+ mapping?: { system: string; converted: string }[]
|
|
|
groupName: string
|
|
groupName: string
|
|
|
|
|
+ isFieldDataMapping?: string
|
|
|
}
|
|
}
|
|
|
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',
|
|
@@ -95,151 +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 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
|
|
|
|
|
- })
|
|
|
|
|
- newFieldInfo.value = {
|
|
|
|
|
- name: '',
|
|
|
|
|
- fieldType: 'Blank',
|
|
|
|
|
- value: ''
|
|
|
|
|
- }
|
|
|
|
|
- addNewFieldVisible.value = false
|
|
|
|
|
-}
|
|
|
|
|
-// 调整应用字段
|
|
|
|
|
-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)
|
|
|
|
|
|
|
@@ -248,6 +104,11 @@ const specificRoles = ref({
|
|
|
groupName: [],
|
|
groupName: [],
|
|
|
systemAccount: []
|
|
systemAccount: []
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+const changeControlType = () => {
|
|
|
|
|
+ specificRoles.value = { partyId: [], groupName: [], systemAccount: [] }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const changePartyId = (val: string[]) => {
|
|
const changePartyId = (val: string[]) => {
|
|
|
specificRoles.value.partyId = val
|
|
specificRoles.value.partyId = val
|
|
|
}
|
|
}
|
|
@@ -259,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()) {
|
|
@@ -282,11 +152,13 @@ const handlePageSave = () => {
|
|
|
}
|
|
}
|
|
|
if (
|
|
if (
|
|
|
accessControlType.value === 'Specific Roles' &&
|
|
accessControlType.value === 'Specific Roles' &&
|
|
|
- specificRoles.value.partyId?.length === 0 &&
|
|
|
|
|
- specificRoles.value.groupName?.length === 0 &&
|
|
|
|
|
- specificRoles.value.systemAccount?.length === 0
|
|
|
|
|
|
|
+ !specificRoles.value.partyId?.length &&
|
|
|
|
|
+ !specificRoles.value.groupName?.length &&
|
|
|
|
|
+ !specificRoles.value.systemAccount?.length
|
|
|
) {
|
|
) {
|
|
|
- ElMessage.warning('Please select Party ID or Group Name for Specific Roles access control.')
|
|
|
|
|
|
|
+ ElMessage.warning(
|
|
|
|
|
+ 'Please select Party ID or Group Name or KLN ONLINE Account for Specific Roles access control.'
|
|
|
|
|
+ )
|
|
|
verified = false
|
|
verified = false
|
|
|
}
|
|
}
|
|
|
if (!verified) {
|
|
if (!verified) {
|
|
@@ -301,7 +173,7 @@ 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) {
|
|
@@ -324,7 +196,7 @@ const handlePageSave = () => {
|
|
|
</script>
|
|
</script>
|
|
|
<template>
|
|
<template>
|
|
|
<div class="dashboard" v-vloading="pageLoading">
|
|
<div class="dashboard" v-vloading="pageLoading">
|
|
|
- <div class="Title">
|
|
|
|
|
|
|
+ <div class="title">
|
|
|
<span>Create New Report Template</span>
|
|
<span>Create New Report Template</span>
|
|
|
<div class="button-group">
|
|
<div class="button-group">
|
|
|
<el-button type="default" @click="handleCancel">
|
|
<el-button type="default" @click="handleCancel">
|
|
@@ -354,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"
|
|
@@ -377,108 +253,21 @@ 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>
|
|
|
|
|
- <span
|
|
|
|
|
- style="margin-right: 4px"
|
|
|
|
|
- @click="handleCopyField(index)"
|
|
|
|
|
- class="font_family icon-icon_clone_b"
|
|
|
|
|
- ></span>
|
|
|
|
|
- <span
|
|
|
|
|
- @click="handleDeleteField(index, fieldItem.uniqueId)"
|
|
|
|
|
- class="font_family icon-icon_delete_b"
|
|
|
|
|
- ></span>
|
|
|
|
|
- </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">
|
|
|
- <el-radio-group class="radio-group" v-model="accessControlType">
|
|
|
|
|
|
|
+ <el-radio-group
|
|
|
|
|
+ class="radio-group"
|
|
|
|
|
+ @change="changeControlType"
|
|
|
|
|
+ v-model="accessControlType"
|
|
|
|
|
+ >
|
|
|
<el-radio class="radio-item" value="All Users">
|
|
<el-radio class="radio-item" value="All Users">
|
|
|
<template #default>
|
|
<template #default>
|
|
|
<div class="radio-content">
|
|
<div class="radio-content">
|
|
@@ -540,58 +329,11 @@ 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"
|
|
|
|
|
- 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>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-.Title {
|
|
|
|
|
|
|
+.title {
|
|
|
position: sticky;
|
|
position: sticky;
|
|
|
top: 0;
|
|
top: 0;
|
|
|
z-index: 100;
|
|
z-index: 100;
|
|
@@ -605,12 +347,6 @@ const handlePageSave = () => {
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
background-color: var(--color-mode);
|
|
background-color: var(--color-mode);
|
|
|
}
|
|
}
|
|
|
-.heaer_top {
|
|
|
|
|
- margin-top: 6.57px;
|
|
|
|
|
- margin-bottom: 8px;
|
|
|
|
|
- padding-right: 8px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
.display {
|
|
.display {
|
|
|
max-height: calc(100vh - 140px);
|
|
max-height: calc(100vh - 140px);
|
|
@@ -644,105 +380,7 @@ const handlePageSave = () => {
|
|
|
padding: 8px 16px 16px;
|
|
padding: 8px 16px 16px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-.fields-configuration {
|
|
|
|
|
- div.content-box {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: flex-start;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- min-height: 272px;
|
|
|
|
|
- max-height: 400px;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- padding-bottom: 8px;
|
|
|
|
|
- padding-right: 0px;
|
|
|
|
|
- // overflow: auto;
|
|
|
|
|
- .empty-box {
|
|
|
|
|
- align-self: center;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- p {
|
|
|
|
|
- margin-top: 12px;
|
|
|
|
|
- color: var(--color-neutral-2);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .fields-list {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- max-height: 400px;
|
|
|
|
|
- padding: 8px 0;
|
|
|
|
|
- padding-right: 16px;
|
|
|
|
|
- overflow: auto;
|
|
|
|
|
- user-select: none;
|
|
|
|
|
- .field-item {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- height: 48px;
|
|
|
|
|
- margin-bottom: 8px;
|
|
|
|
|
- padding: 0 16px;
|
|
|
|
|
- border-radius: 6px;
|
|
|
|
|
- border: 1px solid var(--color-border);
|
|
|
|
|
- .label {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- .required-symbol {
|
|
|
|
|
- color: var(--color-danger);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .display-name {
|
|
|
|
|
- flex: 1.2;
|
|
|
|
|
- margin: 0 16px;
|
|
|
|
|
- :deep(.el-input__wrapper) {
|
|
|
|
|
- height: 32px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .actions {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- width: 240px;
|
|
|
|
|
- padding-left: 30px;
|
|
|
|
|
- .checkbox-group {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- }
|
|
|
|
|
- .el-checkbox {
|
|
|
|
|
- margin-right: 16px;
|
|
|
|
|
- :deep(.el-checkbox__inner) {
|
|
|
|
|
- height: 16px;
|
|
|
|
|
- width: 16px;
|
|
|
|
|
- &::after {
|
|
|
|
|
- border-width: 2px;
|
|
|
|
|
- height: 9px;
|
|
|
|
|
- width: 5px;
|
|
|
|
|
- left: 4px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- :deep(.el-checkbox__label) {
|
|
|
|
|
- margin-top: 3px;
|
|
|
|
|
- padding-left: 4px;
|
|
|
|
|
- line-height: 2;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .font_family {
|
|
|
|
|
- float: right;
|
|
|
|
|
- cursor: pointer;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .ghost-column {
|
|
|
|
|
- cursor: move !important;
|
|
|
|
|
- span {
|
|
|
|
|
- opacity: 0;
|
|
|
|
|
- }
|
|
|
|
|
- border: 1px dashed var(--color-customize-column-item-drag-border) !important;
|
|
|
|
|
- background-color: var(--color-customize-column-item-drag-bg) !important;
|
|
|
|
|
- box-shadow: none !important;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- .fallback-class {
|
|
|
|
|
- opacity: 1 !important;
|
|
|
|
|
- background-color: var(--color-customize-column-item-hover-bg) !important;
|
|
|
|
|
- cursor: move !important;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
.basic-info {
|
|
.basic-info {
|
|
|
.info-item {
|
|
.info-item {
|
|
|
&:first-child {
|
|
&:first-child {
|
|
@@ -817,9 +455,6 @@ const handlePageSave = () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- // .radio-item.specific-roles {
|
|
|
|
|
- // padding: 0;
|
|
|
|
|
- // }
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -834,37 +469,3 @@ const handlePageSave = () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|
|
|
-<style lang="scss">
|
|
|
|
|
-.add-new-field-dialog {
|
|
|
|
|
- .field-item {
|
|
|
|
|
- margin-bottom: 16px;
|
|
|
|
|
- .label {
|
|
|
|
|
- margin-bottom: 4px;
|
|
|
|
|
- }
|
|
|
|
|
- &:last-child {
|
|
|
|
|
- margin-bottom: 0;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .field-value {
|
|
|
|
|
- .el-radio-group {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- .el-radio {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- margin-right: 0;
|
|
|
|
|
- padding-left: 12px;
|
|
|
|
|
- border: 1px solid var(--color-border);
|
|
|
|
|
- &:first-child {
|
|
|
|
|
- border-radius: 6px 0 0 6px;
|
|
|
|
|
- border-right: none;
|
|
|
|
|
- }
|
|
|
|
|
- &:last-child {
|
|
|
|
|
- border-radius: 0 6px 6px 0;
|
|
|
|
|
- }
|
|
|
|
|
- .el-radio__label {
|
|
|
|
|
- color: var(--color-neutral-1);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-</style>
|
|
|