yuanchao пре 2 месеци
родитељ
комит
2890adeebe

+ 7 - 7
src/views/pms/device/allotlog/ConfigDeviceAllot.vue

@@ -4,7 +4,7 @@
       <!-- 左侧设备列表 -->
       <el-col :span="12" class="col-height">
         <div class="card left-card">
-          <h3>设备列表</h3>
+          <h3>{{ t('configPerson.deviceList') }}</h3>
           <div class="dept-select">
             <el-tree-select
               clearable
@@ -14,7 +14,7 @@
               check-strictly
               node-key="id"
               filterable
-              placeholder="请选择设备所属部门"
+              :placeholder="t('configPerson.deviceListHolder')"
               @node-click="handleDeptDeviceTreeNodeClick"
             />
           </div>
@@ -37,7 +37,7 @@
       <!-- 右侧部门选择 -->
       <el-col :span="12" class="col-height">
         <div class="card right-card">
-          <h3>部门列表</h3>
+          <h3>{{ t('configDevice.deptList') }}</h3>
           <ContentWrap class="dept-tree-container" height="400px">
             <DeptTree2 ref="deptTreeRef" v-model="selectedDeptId" height="100%" @update:modelValue="handleDeptChange"/>
           </ContentWrap>
@@ -50,7 +50,7 @@
       <div class="card">
         <el-input
           v-model="formData.reason"
-          placeholder="请输入调拨原因"
+          :placeholder="t('configDevice.rfaHolder')"
           class="reason-input"
           type="textarea"
           :rows="3"
@@ -63,10 +63,10 @@
         @click="submitRelations"
         :disabled="tempRelations.length === 0"
       >
-        保 存
+        {{ t('iotMaintain.save') }}
       </el-button>
       <div class="temp-list card" v-if="false">
-        <h3>设备调拨记录</h3>
+        <h3>{{ t('configPerson.adjustmentRecords') }}</h3>
         <el-table :data="tempRelations" style="width: 100%">
           <el-table-column prop="deviceNames" label="设备" width="200" />
           <el-table-column prop="deptName" label="部门" />
@@ -98,7 +98,7 @@ import {IotDeviceApi, IotDeviceVO} from "@/api/pms/device";
 import DeptTree2 from "@/views/pms/device/DeptTree2.vue";
 import { useRouter } from 'vue-router'
 const router = useRouter()
-
+const { t } = useI18n() // 国际化
 defineOptions({ name: 'ConfigDeviceAllot' })
 const selectedDeptId = ref<number | string>('')
 const simpleDevices = ref<IotDeviceVO[]>([])

+ 24 - 24
src/views/pms/device/allotlog/DeviceAllot.vue

@@ -16,28 +16,28 @@
           :inline="true"
           label-width="68px"
         >
-          <el-form-item label="资产编码" prop="deviceCode">
+          <el-form-item :label="t('devicePerson.deviceCode')" prop="deviceCode" style="margin-left: 25px">
             <el-input
               v-model="queryParams.deviceCode"
-              placeholder="请输入资产编码"
+              :placeholder="t('devicePerson.codeHolder')"
               clearable
               @keyup.enter="handleQuery"
               class="!w-200px"
             />
           </el-form-item>
-          <el-form-item label="设备名称" prop="deviceName">
+          <el-form-item :label="t('devicePerson.deviceName')" prop="deviceName">
             <el-input
               v-model="queryParams.deviceName"
-              placeholder="请输入设备名称"
+              :placeholder="t('devicePerson.nameHolder')"
               clearable
               @keyup.enter="handleQuery"
               class="!w-200px"
             />
           </el-form-item>
-          <el-form-item label="是否发生过调拨" prop="setFlag" label-width="140px">
+          <el-form-item :label="t('deviceStatus.transfer')" prop="setFlag" label-width="140px">
             <el-select
               v-model="queryParams.setFlag"
-              placeholder="请选择"
+              :placeholder="t('deviceStatus.choose')"
               clearable
               class="!w-240px"
             >
@@ -49,10 +49,10 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item v-show="ifShow" label="设备状态" label-width="85px" prop="deviceStatus">
+          <el-form-item v-show="ifShow" :label="t('devicePerson.status')" label-width="85px" prop="deviceStatus">
             <el-select
               v-model="queryParams.deviceStatus"
-              placeholder="设备状态"
+              :placeholder="t('devicePerson.status')"
               clearable
               class="!w-240px"
             >
@@ -65,10 +65,10 @@
             </el-select>
           </el-form-item>
 
-          <el-form-item v-show="ifShow" label="资产性质" prop="assetProperty">
+          <el-form-item v-show="ifShow" :label="t('devicePerson.assets')" prop="assetProperty">
             <el-select
               v-model="queryParams.assetProperty"
-              placeholder="资产性质"
+              :placeholder="t('devicePerson.assets')"
               clearable
               class="!w-240px"
             >
@@ -81,10 +81,10 @@
             </el-select>
           </el-form-item>
 
-          <el-form-item v-show="ifShow" label="品牌" prop="brand">
+          <el-form-item v-show="ifShow" :label="t('devicePerson.brand')" prop="brand">
             <el-input
               v-model="queryParams.brand"
-              placeholder="请输入品牌"
+              :placeholder="t('devicePerson.brandHolder')"
               clearable
               @keyup.enter="handleQuery"
               class="!w-200px"
@@ -93,16 +93,16 @@
 
           <el-form-item>
             <el-button v-if="!ifShow" @click="moreQuery(true)" type="warning"
-              ><Icon icon="ep:search" class="mr-5px" /> 更多查询</el-button
+              ><Icon icon="ep:search" class="mr-5px" /> {{ t('devicePerson.moreSearch') }}</el-button
             >
             <el-button v-if="ifShow" @click="moreQuery(false)" type="danger"
-              ><Icon icon="ep:search" class="mr-5px" /> 收起查询</el-button
+              ><Icon icon="ep:search" class="mr-5px" /> {{ t('devicePerson.closeSearch') }}</el-button
             >
             <el-button @click="handleQuery"
-              ><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button
+              ><Icon icon="ep:search" class="mr-5px" /> {{ t('devicePerson.search') }}</el-button
             >
             <el-button @click="resetQuery"
-              ><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button
+              ><Icon icon="ep:refresh" class="mr-5px" /> {{ t('devicePerson.reset') }}</el-button
             >
             <el-button
               type="primary"
@@ -110,7 +110,7 @@
               @click="openForm('create', undefined, queryParams.deptId)"
               v-hasPermi="['rq:iot-device:create']"
             >
-              <Icon icon="ep:plus" class="mr-5px" /> 设备调拨
+              <Icon icon="ep:plus" class="mr-5px" /> {{ t('devicePerson.setUp') }}
             </el-button>
             <el-button
               type="success"
@@ -128,21 +128,21 @@
       <!-- 列表 -->
       <ContentWrap>
         <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
-          <el-table-column label="序号" width="60" align="center">
+          <el-table-column :label="t('monitor.serial')" width="70" align="center">
             <template #default="scope">
               {{ scope.$index + 1 }}
             </template>
           </el-table-column>
-          <el-table-column label="资产编码" align="center" prop="deviceCode" />
-          <el-table-column label="设备名称" align="center" prop="deviceName">
+          <el-table-column :label="t('monitor.deviceCode')"  align="center" prop="deviceCode" />
+          <el-table-column :label="t('monitor.deviceName')" align="center" prop="deviceName">
             <template #default="scope">
               <el-link :underline="false" type="primary" @click="handleDetail(scope.row.id)">
                 {{ scope.row.deviceName }}
               </el-link>
             </template>
           </el-table-column>
-          <el-table-column label="所在部门" align="center" prop="deptName" />
-          <el-table-column label="设备状态" align="center" prop="deviceStatus">
+          <el-table-column :label="t('devicePerson.dept')" align="center" prop="deptName" />
+          <el-table-column :label="t('deviceStatus.status')" align="center" prop="deviceStatus">
             <template #default="scope">
               <dict-tag :type="DICT_TYPE.PMS_DEVICE_STATUS" :value="scope.row.deviceStatus" />
             </template>
@@ -155,7 +155,7 @@
             :formatter="dateFormatter"
             width="180px"
           /> -->
-          <el-table-column label="操作" align="center" min-width="120px">
+          <el-table-column :label="t('deviceStatus.operation')" align="center" min-width="120px">
             <template #default="scope">
               <el-button
                 link
@@ -163,7 +163,7 @@
                 @click="handleView(scope.row.id)"
                 v-hasPermi="['rq:iot-device:query']"
               >
-                调拨记录
+                {{ t('deviceStatus.adjustmentRecords') }}
               </el-button>
             </template>
           </el-table-column>

+ 9 - 9
src/views/pms/device/allotlog/DeviceAllotLogDrawer.vue

@@ -1,6 +1,6 @@
 <template>
   <el-drawer
-    title="设备调拨记录"
+    :title="t('configPerson.adjustmentRecords')"
     :append-to-body="true"
     :model-value="modelValue"
     @update:model-value="$emit('update:modelValue', $event)"
@@ -12,14 +12,14 @@
     <template v-if="deviceId">
       <div v-loading="loading" style="height: 100%">
         <el-table :data="deviceAllots" style="width: 100%">
-          <el-table-column prop="deviceName" label="设备名称" width="180" />
-          <el-table-column prop="deviceCode" label="设备编码" width="180" />
-          <el-table-column prop="oldDeptName" label="调整前部门" width="180" />
-          <el-table-column prop="newDeptName" label="调用后部门" width="180" />
-          <el-table-column prop="reason" label="调拨原因" width="180" />
-          <el-table-column prop="creatorName" label="调整人" width="180" />
+          <el-table-column prop="deviceName" :label="t('deviceStatus.deviceName')" width="180" />
+          <el-table-column prop="deviceCode" :label="t('deviceStatus.deviceCode')" width="180" />
+          <el-table-column prop="oldDeptName" :label="t('deviceStatus.beforeDept')" width="180" />
+          <el-table-column prop="newDeptName" :label="t('deviceStatus.afterDept')" width="180" />
+          <el-table-column prop="reason" :label="t('configDevice.reasonForAdjustment')" width="180" />
+          <el-table-column prop="creatorName" :label="t('deviceStatus.adjuster')" width="180" />
           <el-table-column
-            label="调整时间"
+            :label="t('deviceStatus.adjustTime')"
             align="center"
             prop="createTime"
             width="180"
@@ -39,7 +39,7 @@
   </el-drawer>
 </template>
 <script setup lang="ts">
-
+const { t } = useI18n() // 国际化
 import { ref, watch, defineOptions, defineEmits } from 'vue'
 import { ElMessage } from 'element-plus'
 import {dateFormatter} from "@/utils/formatTime";

+ 2 - 2
src/views/pms/device/statuslog/DeviceStatus.vue

@@ -68,7 +68,7 @@
           <el-form-item v-show="ifShow" :label="t('devicePerson.assets')" prop="assetProperty">
             <el-select
               v-model="queryParams.assetProperty"
-              :label="t('devicePerson.assetsHolder')"
+              :placeholder="t('devicePerson.assetsHolder')"
               clearable
               class="!w-240px"
             >
@@ -84,7 +84,7 @@
           <el-form-item v-show="ifShow" :label="t('devicePerson.brand')" prop="brand">
             <el-input
               v-model="queryParams.brand"
-              :label="t('devicePerson.brandHolder')"
+              :placeholder="t('devicePerson.brandHolder')"
               clearable
               @keyup.enter="handleQuery"
               class="!w-200px"