|
|
@@ -37,10 +37,10 @@ const handleColumns = (columns: any, status?: string) => {
|
|
|
...curColumn,
|
|
|
slots: { default: 'status' }
|
|
|
}
|
|
|
- } else if (item.type === 'link' && status !== 'all') {
|
|
|
+ } else if (item.type === 'multiple_link') {
|
|
|
curColumn = {
|
|
|
...curColumn,
|
|
|
- slots: { default: 'link' }
|
|
|
+ slots: { default: 'multLink' }
|
|
|
}
|
|
|
}
|
|
|
// 格式化
|
|
|
@@ -76,7 +76,7 @@ const getTableColumns = async () => {
|
|
|
if (index === -1) {
|
|
|
tableData.value.columns.push({
|
|
|
title: 'Action',
|
|
|
- fixed: 'right',
|
|
|
+ fixed: 'left',
|
|
|
width: 130,
|
|
|
slots: { default: 'action' }
|
|
|
})
|
|
|
@@ -104,7 +104,7 @@ const assignTableData = (data: any) => {
|
|
|
if (index === -1) {
|
|
|
tableData.value.columns.push({
|
|
|
title: 'Action',
|
|
|
- fixed: 'right',
|
|
|
+ fixed: 'left',
|
|
|
width: 130,
|
|
|
slots: { default: 'action' }
|
|
|
})
|
|
|
@@ -112,7 +112,7 @@ const assignTableData = (data: any) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const isEmployeeRole = ref(true)
|
|
|
+const isEmployeeRole = ref(null)
|
|
|
|
|
|
const emit = defineEmits(['getNumberCards'])
|
|
|
const rtnNumberCards = (data) => {
|
|
|
@@ -163,7 +163,7 @@ const getTableData = async (isPageChange?: boolean) => {
|
|
|
})
|
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
|
- isEmployeeRole.value = res.data.is_employee
|
|
|
+ isEmployeeRole.value = res.data.is_employee || false
|
|
|
assignTableData(res.data)
|
|
|
rtnNumberCards(res.data)
|
|
|
}
|
|
|
@@ -187,7 +187,7 @@ const SearchOperationLog = () => {
|
|
|
})
|
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
|
- isEmployeeRole.value = res.data.is_employee
|
|
|
+ isEmployeeRole.value = res.data.is_employee || false
|
|
|
assignTableData(res.data)
|
|
|
rtnNumberCards(res.data)
|
|
|
}
|
|
|
@@ -307,19 +307,22 @@ const handleCreate = () => {
|
|
|
router.push({ name: 'Create New Booking' })
|
|
|
}
|
|
|
|
|
|
-const handleLinkClick = (row: any, column: any) => {
|
|
|
- if (column.title === 'Booking No.') {
|
|
|
- router.push({
|
|
|
- path: '/booking/detail',
|
|
|
- query: { a: row.__serial_no, _schemas: row._schemas, status: row.Status }
|
|
|
- })
|
|
|
- // visitedRowState.setBookingTableData(row['__serial_no'])
|
|
|
- } else if (column.title === 'HBOL/HAWB No.') {
|
|
|
- router.push({
|
|
|
- path: '/tracking/detail',
|
|
|
- query: { a: row.__serial_no, _schemas: row._schemas }
|
|
|
- })
|
|
|
+const testData = [
|
|
|
+ {
|
|
|
+ key: 'A1703530062',
|
|
|
+ value: 'CD1Xeh4rG%2FPmYIiCHAw2%2B0Gw8BFZ8k%2F2pQDkYX3vuf6iZ3kcQXj%2BzQ'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'A1703530062',
|
|
|
+ value: 'CD1Xeh4rG%2FPmYIiCHAw2%2B0Gw8BFZ8k%2F2pQDkYX3vuf6iZ3kcQXj%2BzQ'
|
|
|
}
|
|
|
+]
|
|
|
+
|
|
|
+const handleMultLinkClick = (item: any) => {
|
|
|
+ router.push({
|
|
|
+ path: '/tracking/detail',
|
|
|
+ query: { a: item.value, _schemas: item.order_from }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const tipsDialogRef = ref()
|
|
|
@@ -331,7 +334,8 @@ const handleChangeRowState = () => {
|
|
|
}
|
|
|
|
|
|
defineExpose({
|
|
|
- SearchOperationLog
|
|
|
+ SearchOperationLog,
|
|
|
+ isEmployeeRole
|
|
|
})
|
|
|
</script>
|
|
|
|
|
|
@@ -362,6 +366,7 @@ defineExpose({
|
|
|
<p>ensure smooth last-mile delivery.</p>
|
|
|
<el-button
|
|
|
style="height: 40px"
|
|
|
+ v-if="isEmployeeRole === false"
|
|
|
class="el-button--main el-button--pain-theme"
|
|
|
@click="handleCreate"
|
|
|
>
|
|
|
@@ -431,13 +436,19 @@ defineExpose({
|
|
|
<VTag :type="row[column.field]">{{ row[column.field] }}</VTag>
|
|
|
</template>
|
|
|
<!-- Booking No字段的插槽 -->
|
|
|
- <template #link="{ row, column }">
|
|
|
- <span
|
|
|
- style="color: var(--color-theme); cursor: pointer"
|
|
|
- @click="handleLinkClick(row, column)"
|
|
|
+ <template #multLink="{ row, column }">
|
|
|
+ <div
|
|
|
+ style="display: inline-block"
|
|
|
+ v-for="(item, index) in row[column.field]"
|
|
|
+ :key="item.key"
|
|
|
>
|
|
|
- {{ row[column.field] }}
|
|
|
- </span>
|
|
|
+ <span v-if="index > 0">、</span>
|
|
|
+ <span
|
|
|
+ style="color: var(--color-theme); cursor: pointer"
|
|
|
+ @click="handleMultLinkClick(item)"
|
|
|
+ >{{ item.key }}</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</vxe-grid>
|
|
|
|