|
@@ -14,12 +14,18 @@
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="airport-settings">
|
|
|
- <CommonSwitch v-model:flag="goodsCountFlag" label="显示件数" />
|
|
|
- <CommonSwitch v-model:flag="UTCFlag" label="开启UTC" />
|
|
|
- <ColumnSet
|
|
|
- :table-columns="tableColumns"
|
|
|
- @checked-submit="columnChecked"
|
|
|
- />
|
|
|
+ <div v-permission="getPermission('count')">
|
|
|
+ <CommonSwitch v-model:flag="goodsCountFlag" label="显示件数" />
|
|
|
+ </div>
|
|
|
+ <div v-permission="getPermission('UTC')">
|
|
|
+ <CommonSwitch v-model:flag="UTCFlag" label="开启UTC" />
|
|
|
+ </div>
|
|
|
+ <div v-permission="getPermission('columnSet')">
|
|
|
+ <ColumnSet
|
|
|
+ :table-columns="tableColumns"
|
|
|
+ @checked-submit="columnChecked"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="airport-table">
|
|
@@ -129,6 +135,36 @@ const {
|
|
|
tableDataSortRuleMap,
|
|
|
dealedTableData,
|
|
|
} = useTableFilterAndSort(tableColumns, tableData)
|
|
|
+
|
|
|
+const permissionMap = {
|
|
|
+ DepartureAirport: {
|
|
|
+ count:
|
|
|
+ 'number_of_pieces_displayed_in_domestic_departure_terminal_view_button',
|
|
|
+ UTC: 'turn_on_utc_in_view_of_domestic_departure_terminal_button',
|
|
|
+ columnSet: 'domestic_departure_terminal_view_column_setting_button',
|
|
|
+ },
|
|
|
+ InternationalDepartureAirport: {
|
|
|
+ count:
|
|
|
+ 'number_of_pieces_displayed_in_international_departure_terminal_view_button',
|
|
|
+ UTC: 'international_departure_terminal_view_opens_utc_button',
|
|
|
+ columnSet: 'international_departure_terminal_view_column_setting_button',
|
|
|
+ },
|
|
|
+ ArrivalAirport: {
|
|
|
+ count:
|
|
|
+ 'number_of_pieces_displayed_in_domestic_inbound_terminal_view_button',
|
|
|
+ UTC: 'turn_on_utc_in_view_of_domestic_inbound_terminal_button',
|
|
|
+ columnSet: 'domestic_inbound_terminal_view_column_setting_button',
|
|
|
+ },
|
|
|
+ InternationalArrivalAirport: {
|
|
|
+ count:
|
|
|
+ 'number_of_display_pieces_of_international_inbound_terminal_view_button',
|
|
|
+ UTC: 'the_view_of_international_inbound_terminal_opens_utc_button',
|
|
|
+ columnSet: 'view_column_setting_of_international_inbound_terminal_button',
|
|
|
+ },
|
|
|
+}
|
|
|
+const getPermission = (type?: string) => {
|
|
|
+ return [permissionMap[props.name][type]]
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
@import './index.scss';
|