curry преди 3 месеца
родител
ревизия
e9dc6a45fa

+ 1 - 1
server/config.yaml

@@ -125,7 +125,7 @@ mysql:
     config: charset=utf8mb4&parseTime=True&loc=Local
     db-name: lc_garage
     username: root
-    password: 123456
+    password: Mysql123@
 
     path: 127.0.0.1
     engine: ""

+ 28 - 19
web/src/lang/en.js

@@ -41,7 +41,7 @@ export default {
   Mobile_Phone: 'Mobile Phone',
   Email: 'Email',
   Expire_Time: 'Expire Time',
-  Black_White: 'Black & White List',
+  roster: 'Black & White List',
   Search: 'Search',
   LicensePlateNo: 'License Plate No',
   RFID_Tag: 'RFID Tag',
@@ -121,23 +121,32 @@ export default {
   saveFail: 'Save failed',
   addSuccess: 'Added successfully',
   confirmDelete: 'Confirm delete?',
-  parking: 'Parking Lot Management',
-  parkingInfo: 'Parking Information Management',
-  carOwner: 'Car Owner Management',
-  carInfo: 'Vehicle Information',
-  pricing: 'Fee Configuration',
-  report: 'Report Information Query',
-  enter: 'Entry & Exit Records',
-  sheet: 'Exception Reports',
-  statistics: 'Statistics Query',
-  vehicle: 'On-site Vehicle Statistics',
+  parking: 'ParkingLotManagement',
+  parkingInfo: 'ParkingInformationManagement',
+  carOwner: 'CarOwnerManagement',
+  carInfo: 'VehicleInformation',
+  pricing: 'FeeConfiguration',
+  report: 'ReportInformationQuery',
+  enter: 'Entry&ExitRecords',
+  sheet: 'ExceptionReports',
+  statistics: 'StatisticsQuery',
+  vehicle: 'On-siteVehicleStatistics',
   dashboard: 'Dashboard',
-  superAdmin: 'Super Admin',
-  roleManagement: 'Role Management',
-  menuManagement: 'Menu Management',
-  apiManagement: 'API Management',
-  userManagement: 'User Management',
-  dictionaryManagement: 'Dictionary Management',
-  operationHistory: 'Operation History',
-  personalInfo: 'Personal Information'
+  superAdmin: 'SuperAdmin',
+  authority: 'RoleManagement',
+  menu: 'MenuManagement',
+  api: 'APIManagement',
+  user: 'UserManagement',
+  dictionary: 'DictionaryManagement',
+  operation: 'OperationHistory',
+  person: 'PersonalInformation',
+  areaName: 'Area Name',
+  areaCapacity: 'Area Capacity',
+  createArea: 'Create Area',
+  editArea: 'Edit Area',
+  addPassage: 'Add Passage',
+  editPassage: 'Edit Passage',
+  addDevice: 'Add Device',
+  editDevice: 'Edit Device',
+  smartBarrier: 'SmartBarrierGate'
 }

+ 17 - 8
web/src/lang/zh-CN.js

@@ -41,7 +41,7 @@ export default {
   Mobile_Phone: '手机',
   Email: '邮箱',
   Expire_Time: '过期时间',
-  Black_White: '黑白名单',
+  roster: '黑白名单',
   Search: '搜索',
   LicensePlateNo: '车牌号码',
   licensePlate: '车牌',
@@ -133,11 +133,20 @@ export default {
   vehicle: '在场车辆统计',
   dashboard: '仪表盘',
   superAdmin: '超级管理员',
-  roleManagement: '角色管理',
-  menuManagement: '菜单管理',
-  apiManagement: 'API管理',
-  userManagement: '用户管理',
-  dictionaryManagement: '字典管理',
-  operationHistory: '操作历史',
-  personalInfo: '个人信息'
+  authority: '角色管理',
+  menu: '菜单管理',
+  api: 'API管理',
+  user: '用户管理',
+  dictionary: '字典管理',
+  operation: '操作历史',
+  person: '个人信息',
+  areaName: '区域名称',
+  areaCapacity: '区域容量',
+  createArea: '创建区域',
+  editArea: '编辑区域',
+  addPassage: '通道新增',
+  editPassage: '通道编辑',
+  addDevice: '新增设备',
+  editDevice: '编辑设备',
+  smartBarrier: '智慧道闸'
 }

+ 17 - 8
web/src/lang/zh-HK.js

@@ -41,7 +41,7 @@ export default {
   Mobile_Phone: '手提電話',
   Email: '電郵',
   Expire_Time: '過期時間',
-  Black_White: '黑白名單',
+  roster: '黑白名單',
   Search: '搜尋',
   LicensePlateNo: '車牌號碼',
   RFID_Tag: 'RFID標籤',
@@ -133,11 +133,20 @@ export default {
   vehicle: '在場車輛統計',
   dashboard: '儀表板',
   superAdmin: '超級管理員',
-  roleManagement: '角色管理',
-  menuManagement: '選單管理',
-  apiManagement: 'API管理',
-  userManagement: '用戶管理',
-  dictionaryManagement: '字典管理',
-  operationHistory: '操作記錄',
-  personalInfo: '個人資訊'
+  authority: '角色管理',
+  menu: '選單管理',
+  api: 'API管理',
+  user: '用戶管理',
+  dictionary: '字典管理',
+  operation: '操作記錄',
+  person: '個人資訊',
+  areaName: '區域名稱',
+  areaCapacity: '區域容量',
+  createArea: '建立區域',
+  editArea: '編輯區域',
+  addPassage: '通道新增',
+  editPassage: '通道編輯',
+  addDevice: '新增設備',
+  editDevice: '編輯設備',
+  smartBarrier: '智慧閘機'
 }

+ 17 - 8
web/src/lang/zh-TW.js

@@ -79,7 +79,7 @@ export default {
   ParkManage: '停車場管理',
   ParkInfoManage: '停車資訊管理',
   OwnerManage: '車主管理',
-  BlackWhiteList: '黑白名單',
+  roster: '黑白名單',
   VehicleInfo: '車輛資訊',
   ChargeConfig: '收費設定',
   ReportInfoQuery: '報表資訊查詢',
@@ -133,11 +133,20 @@ export default {
   vehicle: '場內車輛統計',
   dashboard: '儀表板',
   superAdmin: '超級管理員',
-  roleManagement: '角色管理',
-  menuManagement: '選單管理',
-  apiManagement: 'API管理',
-  userManagement: '使用者管理',
-  dictionaryManagement: '字典管理',
-  operationHistory: '操作紀錄',
-  personalInfo: '個人資訊'
+  authority: '角色管理',
+  menu: '選單管理',
+  api: 'API管理',
+  user: '使用者管理',
+  dictionary: '字典管理',
+  operation: '操作紀錄',
+  person: '個人資訊',
+  areaName: '區域名稱',
+  areaCapacity: '區域容量',
+  createArea: '建立區域',
+  editArea: '編輯區域',
+  addPassage: '通道新增',
+  editPassage: '通道編輯',
+  addDevice: '新增設備',
+  editDevice: '編輯設備',
+  smartBarrier: '智慧閘門'
 }

+ 1 - 3
web/src/view/layout/aside/asideComponent/asyncSubmenu.vue

@@ -69,10 +69,8 @@ watch(() => props.theme, () => {
 
 const getText = (title) => {
   if (!title) return ''
-  console.log('数据1', t.value)
-  console.log('数据2', title)
   // 从语言包找,找不到就返回原来的中文(不报错、不空白)
-  return t.title || title
+  return t.value[title] || title
 }
 
 </script>

+ 6 - 7
web/src/view/layout/aside/asideComponent/index.vue

@@ -21,8 +21,7 @@
 <script setup>
 import MenuItem from './menuItem.vue'
 import AsyncSubmenu from './asyncSubmenu.vue'
-import { computed, onMounted } from 'vue'
-import { t } from '@/lang/index.js'
+import { computed } from 'vue'
 
 defineOptions({
   name: 'AsideComponent',
@@ -55,10 +54,10 @@ const menuComponent = computed(() => {
   }
 })
 
-onMounted(() => {
-  setTimeout(function() {
-    console.log('数据', props.routerInfo)
-  }, 2000)
-})
+// onMounted(() => {
+//   setTimeout(function() {
+//     console.log('数据', props.routerInfo)
+//   }, 2000)
+// })
 </script>
 

+ 9 - 2
web/src/view/layout/aside/asideComponent/menuItem.vue

@@ -4,7 +4,7 @@
       <el-tooltip
         class="box-item"
         effect="light"
-        :content="routerInfo.meta.title"
+        :content="getText(routerInfo.name)"
         placement="right"
       >
         <el-icon v-if="routerInfo.meta.icon">
@@ -17,7 +17,7 @@
         <el-icon v-if="routerInfo.meta.icon">
           <component :is="routerInfo.meta.icon" />
         </el-icon>
-        <span class="gva-menu-item-title">{{ routerInfo.meta.title }}</span>
+        <span class="gva-menu-item-title">{{ getText(routerInfo.name) }}</span>
       </div>
     </template>
   </el-menu-item>
@@ -25,6 +25,7 @@
 
 <script setup>
 import { ref, watch } from 'vue'
+import { t } from '@/lang/index.js'
 
 defineOptions({
   name: 'MenuItem',
@@ -65,6 +66,12 @@ watch(() => props.theme, () => {
   hoverText.value = props.theme.hoverText
 })
 
+const getText = (title) => {
+  if (!title) return ''
+  // 从语言包找,找不到就返回原来的中文(不报错、不空白)
+  return t.value[title] || title
+}
+
 </script>
 
 <style lang="scss" scoped>

+ 2 - 1
web/src/view/layout/index.vue

@@ -22,7 +22,7 @@
             v-if="isSider"
             class="inline-flex font-bold text-2xl"
             :style="{color:textColor}"
-          >{{ $GIN_VUE_ADMIN.appName }}</div>
+          >{{ $t.value.smartBarrier }}</div>
         </div>
         <Aside class="aside" />
       </el-aside>
@@ -202,6 +202,7 @@ import { useRouter, useRoute } from 'vue-router'
 import { useRouterStore } from '@/pinia/modules/router'
 import { fmtTitle } from '@/utils/fmtRouterTitle'
 import { useUserStore } from '@/pinia/modules/user'
+import { t } from '@/lang/index.js'
 
 defineOptions({
   name: 'Layout',

+ 1 - 0
web/src/view/parking/carInfo.vue

@@ -534,6 +534,7 @@ const getOwnerList = async() => {
 }
 
 onMounted(async() => {
+  console.log('车辆信息')
   await loadAllTypes()
   getVehicleList()
   getOwnerList()

+ 24 - 25
web/src/view/parking/parkingInfo.vue

@@ -10,7 +10,7 @@
             <el-icon
               size="large"
               color="#008000"
-              @click="openRegion('创建区域', '')"
+              @click="openRegion($t.value.createArea, '')"
             >
               <Plus />
             </el-icon>
@@ -36,7 +36,7 @@
             <div style="display: flex;justify-content: space-between; align-items: center;width: 100%">
               <span>{{ item.lot_name }}}</span>
               <div>
-                <el-icon @click.stop="openRegion('编辑区域', item)">
+                <el-icon @click.stop="openRegion($t.value.editArea, item)">
                   <edit />
                 </el-icon>
                 <el-icon @click.stop="deleteRegion(item.ID)">
@@ -67,7 +67,7 @@
                 icon="Plus"
                 text
                 type="success"
-                @click="openPosition('岗亭新增','')"
+                @click="openPosition($t.value.GuardAdd,'')"
               >
                 {{ $t.value.new }}
               </el-button>
@@ -119,7 +119,7 @@
                   text
                   type="primary"
                   icon="edit"
-                  @click="openPosition('岗亭编辑', scope.row)"
+                  @click="openPosition($t.value.GuardEdit, scope.row)"
                 >
                   {{ $t.value.modify }}
                 </el-button>
@@ -157,7 +157,7 @@
                 icon="Plus"
                 text
                 type="success"
-                @click="openChannel('通道新增','')"
+                @click="openChannel($t.value.addPassage,'')"
               >{{ $t.value.new }}
               </el-button>
             </el-form-item>
@@ -224,7 +224,7 @@
                 type="primary"
                 icon="edit"
                 text
-                @click="openChannel('通道编辑', scope.row)"
+                @click="openChannel($t.value.editPassage, scope.row)"
               >{{ $t.value.modify }}
               </el-button>
               <el-button
@@ -259,7 +259,7 @@
                 icon="Plus"
                 text
                 type="success"
-                @click="openDevice('新增设备','')"
+                @click="openDevice($t.value.addDevice,'')"
               >{{ $t.value.new }}
               </el-button>
             </el-form-item>
@@ -338,7 +338,7 @@
                   type="primary"
                   icon="edit"
                   text
-                  @click="openDevice('编辑设备', scope.row)"
+                  @click="openDevice($t.value.editDevice, scope.row)"
                 >{{ $t.value.modify }}
                 </el-button>
                 <el-button
@@ -600,20 +600,20 @@
       :title="regionTitle"
       width="500"
     >
-      <el-form label-width="90">
-        <el-form-item label="区域编码:">
+      <el-form label-width="120">
+        <el-form-item :label="$t.value.Area_Code + ':'">
           <el-input v-model="regionData.lot_code" />
         </el-form-item>
-        <el-form-item label="区域名称:">
+        <el-form-item :label="$t.value.areaName + ':'">
           <el-input v-model="regionData.lot_name" />
         </el-form-item>
-        <el-form-item label="区域容量:">
+        <el-form-item :label="$t.value.areaCapacity + ':'">
           <el-input
             v-model="regionData.capacity"
             type="number"
           />
         </el-form-item>
-        <el-form-item label="备注:">
+        <el-form-item :label="$t.value.Remarks + ':'">
           <el-input
             v-model="regionData.description"
             type="textarea"
@@ -660,7 +660,7 @@ const handleClick = () => {
 }
 const positionShow = ref(false)
 
-const positionTitle = ref('岗亭新增')
+const positionTitle = ref(t.value.GuardAdd)
 // 岗亭数据.......................................
 const positionRegionName = ref('')
 const positionData = reactive({
@@ -675,7 +675,7 @@ const guardTotal = ref(0)
 
 const positionList = reactive([])
 const addPosition = () => {
-  if (positionTitle.value === '岗亭新增') {
+  if (positionTitle.value === t.value.GuardAdd) {
     if (positionData.parking_lot_id === 0) {
       ElMessage.error('请选择停车区域')
       return
@@ -721,7 +721,7 @@ const changePositionRegion = (val) => {
 const openPosition = (head, data) => {
   positionTitle.value = head
   positionShow.value = true
-  if (head === '岗亭编辑') {
+  if (head === t.value.GuardEdit) {
     positionData.id = data.ID
     positionData.booth_code = data.booth_code
     positionData.booth_name = data.booth_name
@@ -827,7 +827,7 @@ const channelData = reactive({
   booth_id: 0,
 })
 
-const channelTitle = ref('通道新增')
+const channelTitle = ref(t.value.addPassage)
 
 const channelList = reactive([])
 
@@ -842,7 +842,7 @@ const channelTotal = ref(0)
 const openChannel = (head, data) => {
   channelTitle.value = head
   channelShow.value = true
-  if (head === '通道编辑') {
+  if (head === t.value.editPassage) {
     channelData.id = data.ID
     channelData.channel_code = data.channel_code
     channelData.channel_name = data.channel_name
@@ -866,7 +866,7 @@ const openChannel = (head, data) => {
   }
 }
 const channelOperation = () => {
-  if (channelTitle.value === '通道新增') {
+  if (channelTitle.value === t.value.addPassage) {
     if (channelData.booth_id === 0) {
       ElMessage.error('请选择岗亭')
       return
@@ -876,7 +876,6 @@ const channelOperation = () => {
       return
     }
     addChannel(channelData).then(res => {
-      console.log('添加通道操作', res.data)
       if (res.code === 0) {
         ElMessage.success('添加成功')
         channelShow.value = false
@@ -979,7 +978,7 @@ const deviceShow = ref(false)
 const openDevice = (head, data) => {
   deviceTitle.value = head
   deviceShow.value = true
-  if (head === '编辑设备') {
+  if (head === t.value.editDevice) {
     deviceData.id = data.ID
     deviceData.device_code = data.device_code
     deviceData.device_name = data.device_name
@@ -1014,7 +1013,7 @@ const openDevice = (head, data) => {
 const deviceOperation = async() => {
   deviceData.baud_rate = Number(deviceData.baud_rate)
   deviceData.port = Number(deviceData.port)
-  if (deviceTitle.value === '新增设备') {
+  if (deviceTitle.value === t.value.addDevice) {
     await addDevice(deviceData).then(res => {
       if (res.code === 0) {
         ElMessage.success('添加成功')
@@ -1144,11 +1143,11 @@ const regionData = reactive({
   description: ''
 })
 const regionShow = ref(false)
-const regionTitle = ref('创建区域')
+const regionTitle = ref(t.value.createArea)
 const openRegion = (head, data) => {
   regionTitle.value = head
   regionShow.value = true
-  if (head === '编辑区域') {
+  if (head === t.value.editArea) {
     regionData.id = data.ID
     regionData.lot_code = data.lot_code
     regionData.lot_name = data.lot_name
@@ -1162,7 +1161,7 @@ const openRegion = (head, data) => {
   }
 }
 const regionOperation = async() => {
-  if (regionTitle.value === '创建区域') {
+  if (regionTitle.value === t.value.createArea) {
     regionData.capacity = Number(regionData.capacity)
     await addPullOver(regionData).then(res => {
       if (res.code === 0) {