Browse Source

语言切换

l1069030731 2 years ago
parent
commit
ead328bbcd

+ 2 - 2
src/components/form-test/index.vue

@@ -2,7 +2,7 @@
   <!-- <el-form ref="form" :model="insideData" :rules="insideRules" :label-width="labelWidth + 'px'"> -->
   <el-form
     v-loading="formConfig.loadingStatus"
-    :element-loading-text="formConfig.loadingText"
+    :element-loading-text="$t('loadingText')"
     element-loading-spinner="el-icon-loading"
     element-loading-background="rgba(0, 0, 0, 0.2)"
     ref="form"
@@ -280,7 +280,7 @@ export default {
       this.insideConfig = {}
       for (const key in this.formConfig) {
         // 跳过特殊方法( operation: 搜索、重置, otherButton: 新增等自定义按钮)
-        if (key === 'operation' || key === 'otherButton' || key === 'loadingStatus' || key === 'loadingText') {
+        if (key === 'operation' || key === 'otherButton' || key === 'loadingStatus') {
           continue
         }
         const value = this.formConfig[key]

+ 69 - 9
src/lang/en.js

@@ -6,6 +6,13 @@ export default {
   cancelText: 'cancel',
   search: 'Please input search content',
   menuTip: 'none menu list',
+  operation: '操作',
+  toView: '查看',
+  delete: '删除',
+  loadingText: '删除',
+  addSuccess: '添加成功',
+  deleteSuccess: '删除成功',
+  askDeleteData: '请问是否删除该条数据',
   wel: {
     info: 'Good morning, Smallwei, Avuex is a framework',
     dept: 'a certain technology department',
@@ -22,30 +29,30 @@ export default {
       key3: 'A',
       text1: 'Total Record Number of Classifications',
       text2: 'Number of attachments Uploaded',
-      text3: 'Comment frequency'
+      text3: 'Comment frequency',
     },
     data2: {
       column1: 'Registration today',
       column2: 'Login today',
       column3: 'Subscription today',
-      column4: 'Todays review'
+      column4: 'Todays review',
     },
     data3: {
       column1: 'Conversion rate(Day 28%)',
       column2: 'Attendance rate(Day 11%)',
-      column3: 'Attendance rate(Day 33%)'
+      column3: 'Attendance rate(Day 33%)',
     },
     data4: {
       column1: 'Error log',
       column2: 'Data display',
       column3: 'Privilege management',
-      column4: 'user management'
+      column4: 'user management',
     },
     table: {
       rw: 'Work Tasks',
       nr: 'Work content',
       sj: 'Working hours',
-    }
+    },
   },
   route: {
     info: 'info',
@@ -63,7 +70,7 @@ export default {
     top: 'backtop',
     data: 'data',
     error: 'error',
-    test: 'test'
+    test: 'test',
   },
   login: {
     title: 'Login ',
@@ -97,13 +104,66 @@ export default {
     language: 'language',
     notice: 'notice',
     theme: 'theme',
-    color: 'color'
+    color: 'color',
   },
   tagsView: {
     search: 'Search',
     menu: 'menu',
     clearCache: 'Clear Cache',
     closeOthers: 'Close Others',
-    closeAll: 'Close All'
-  }
+    closeAll: 'Close All',
+  },
+  Internet_of_things: {
+    Industry: {
+      appName: '行业名称',
+      AppId: 'AppId',
+      createUserName: '创建人',
+      createTime: '创建时间',
+      newIndustry: '新建行业',
+      keyword: '关键字',
+      appName: '行业名称',
+      appNameRules: '请输入行业名称',
+      industryInformation: '行业信息',
+      overviewResources: '资源概览',
+      productNum: '产品数',
+      equipmentNum: '设备数',
+    },
+    product: {
+      appName: '所属行业',
+      name: '产品名称',
+      productId: '产品ID',
+      deviceType: '设备类型',
+      protocolType: '协议类型',
+      dataFormat: '数据格式',
+      manufacturerName: '厂商名称',
+      addProduct: '创建产品',
+      keyword: '关键字',
+      industry: '行业',
+      tdaApplicationIdRules: '请选择所属行业',
+      nameRules: '请输入产品名称',
+      protocolTypeRules: '请选择协议类型',
+      dataFormatRules: '请选择数据格式',
+      manufacturerNameRules: '请选择厂商名称',
+      deviceTypeRules: '请选择设备类型',
+    },
+    equipment: {
+      applicationName: '所属行业',
+      productName: '所属产品',
+      deviceName: '设备名称',
+      nodeId: '设备标识',
+      deviceId: '设备ID',
+      deviceStatus: '设备状态',
+      secret: '密钥',
+      applicationName: '所属行业',
+      keyword: '关键字',
+      tdaApplicationId: '行业',
+      tdaProductId: '产品',
+      addEquipment: '添加设备',
+      tdaApplicationIdRules: '请选择所属行业',
+      tdaProductIdRules: '请选择所属产品',
+      deviceNameRules: '请输入设备名称',
+      nodeIdRules: '请输入设备标识',
+      secretRules: '请输入密钥',
+    },
+  },
 }

+ 70 - 10
src/lang/zh.js

@@ -6,6 +6,13 @@ export default {
   cancelText: '取消',
   search: '请输入搜索内容',
   menuTip: '没有发现菜单',
+  operation: '操作',
+  toView: '查看',
+  delete: '删除',
+  loadingText: '删除',
+  addSuccess: '添加成功',
+  deleteSuccess: '删除成功',
+  askDeleteData: '请问是否删除该条数据',
   wel: {
     info: '早安,Smallwei,Avuex一款超乎你想象的框架!',
     dept: '我是avue团队下的一个部门-哈皮部门-哈皮职位',
@@ -22,30 +29,30 @@ export default {
       key3: '评',
       text1: '当前分类总记录数',
       text2: '当前上传的附件数',
-      text3: '评论次数'
+      text3: '评论次数',
     },
     data2: {
       column1: '今日注册',
       column2: '今日登录',
       column3: '今日订阅',
-      column4: '今日评论'
+      column4: '今日评论',
     },
     data3: {
       column1: '转化率(日同比 28%)',
       column2: '签到率(日同比 11%)',
-      column3: '签到率(日同比 11%)'
+      column3: '签到率(日同比 11%)',
     },
     data4: {
       column1: '错误日志',
       column2: '数据展示',
       column3: '权限管理',
-      column4: '用户管理'
+      column4: '用户管理',
     },
     table: {
       rw: '工作任务',
       nr: '工作内容',
-      sj: '工作时间'
-    }
+      sj: '工作时间',
+    },
   },
   route: {
     info: '个人信息',
@@ -63,7 +70,7 @@ export default {
     data: '数据展示',
     permission: '权限',
     error: '异常页面',
-    test: '测试页面'
+    test: '测试页面',
   },
   login: {
     title: '登录 ',
@@ -96,13 +103,66 @@ export default {
     language: '中英文',
     notice: '消息通知',
     theme: '主题',
-    color: '换色'
+    color: '换色',
   },
   tagsView: {
     search: '搜索',
     menu: '更多',
     clearCache: '清除缓存',
     closeOthers: '关闭其它',
-    closeAll: '关闭所有'
-  }
+    closeAll: '关闭所有',
+  },
+  Internet_of_things: {
+    Industry: {
+      appName: '行业名称',
+      AppId: 'AppId',
+      createUserName: '创建人',
+      createTime: '创建时间',
+      newIndustry: '新建行业',
+      keyword: '关键字',
+      appName: '行业名称',
+      appNameRules: '请输入行业名称',
+      industryInformation: '行业信息',
+      overviewResources: '资源概览',
+      productNum: '产品数',
+      equipmentNum: '设备数',
+    },
+    product: {
+      appName: '所属行业',
+      name: '产品名称',
+      productId: '产品ID',
+      deviceType: '设备类型',
+      protocolType: '协议类型',
+      dataFormat: '数据格式',
+      manufacturerName: '厂商名称',
+      addProduct: '创建产品',
+      keyword: '关键字',
+      industry: '行业',
+      tdaApplicationIdRules: '请选择所属行业',
+      nameRules: '请输入产品名称',
+      protocolTypeRules: '请选择协议类型',
+      dataFormatRules: '请选择数据格式',
+      manufacturerNameRules: '请选择厂商名称',
+      deviceTypeRules: '请选择设备类型',
+    },
+    equipment: {
+      applicationName: '所属行业',
+      productName: '所属产品',
+      deviceName: '设备名称',
+      nodeId: '设备标识',
+      deviceId: '设备ID',
+      deviceStatus: '设备状态',
+      secret: '密钥',
+      applicationName: '所属行业',
+      keyword: '关键字',
+      tdaApplicationId: '行业',
+      tdaProductId: '产品',
+      addEquipment: '添加设备',
+      tdaApplicationIdRules: '请选择所属行业',
+      tdaProductIdRules: '请选择所属产品',
+      deviceNameRules: '请输入设备名称',
+      nodeIdRules: '请输入设备标识',
+      secretRules: '请输入密钥',
+    },
+  },
 }

+ 8 - 8
src/views/Internet-of-things/Industry-management/details.vue

@@ -1,36 +1,36 @@
 <template>
   <div>
     <el-card>
-      <div style="padding-left: 8px; border-left: 3px solid #0084ff">行业信息</div>
+      <div style="padding-left: 8px; border-left: 3px solid #0084ff">{{ $t('Internet_of_things.Industry.industryInformation') }}</div>
       <el-row style="font-size: 12px; padding-top: 8px">
         <el-col :span="4">
-          <span>行业名称: {{ transferParams.appName }}</span>
+          <span>{{ `${$t('Internet_of_things.Industry.appName')}: ${transferParams.appName}` }}</span>
         </el-col>
         <el-col :span="20">
-          <span>AppId: {{ transferParams.appId }}</span>
+          <span>{{ `${$t('Internet_of_things.Industry.AppId')}: ${transferParams.appId}` }}</span>
         </el-col>
       </el-row>
       <el-row style="font-size: 12px;">
         <el-col :span="4">
-          <span>创建人: {{ transferParams.createUserName }}</span>
+          <span>{{ `${$t('Internet_of_things.Industry.createUserName')}: ${transferParams.createUserName}` }}</span>
         </el-col>
         <el-col :span="20">
-          <span>创建时间: {{ transferParams.createTime }}</span>
+          <span>{{ `${$t('Internet_of_things.Industry.createTime')}: ${transferParams.createTime}` }}</span>
         </el-col>
       </el-row>
     </el-card>
     <div style="height: 10px"></div>
     <el-card style="height: calc(100vh - 64px - 50px - 140px)">
-      <div style="padding-left: 8px; border-left: 3px solid #0084ff">资源概览</div>
+      <div style="padding-left: 8px; border-left: 3px solid #0084ff">{{ $t('Internet_of_things.Industry.overviewResources') }}</div>
       <el-row style="font-size: 12px; padding-top: 16px">
         <el-col :span="4" style="background-color: #e6f3ff; padding: 8px 16px; display: flex; justify-content: space-between">
-          <div>产品数</div>
+          <div>{{ $t('Internet_of_things.Industry.productNum') }}</div>
           <div>{{ applicationDetails.productCount }}</div>
         </el-col>
       </el-row>
       <el-row style="font-size: 12px; padding-top: 16px">
         <el-col :span="4" style="background-color: #e6f3ff; padding: 8px 16px; display: flex; justify-content: space-between">
-          <div>设备数</div>
+          <div>{{ $t('Internet_of_things.Industry.equipmentNum') }}</div>
           <div>{{ applicationDetails.deviceCount }}</div>
         </el-col>
       </el-row>

+ 19 - 20
src/views/Internet-of-things/Industry-management/index.vue

@@ -3,21 +3,21 @@
     <test v-model="queryParams" :form-config="queryForm"></test>
 
     <el-table :data="tableList" v-loading="loading">
-      <el-table-column label="行业名称" align="center" prop="appName" />
-      <el-table-column label="AppId" align="center" prop="appId" />
-      <el-table-column label="创建人" align="center" prop="createUserName" />
-      <el-table-column label="创建时间" align="center" prop="createTime" width="160" />
-      <el-table-column label="操作" align="center" width="140">
+      <el-table-column :label="$t('Internet_of_things.Industry.appName')" align="center" prop="appName" />
+      <el-table-column :label="$t('Internet_of_things.Industry.appId')" align="center" prop="appId" />
+      <el-table-column :label="$t('Internet_of_things.Industry.createUserName')" align="center" prop="createUserName" />
+      <el-table-column :label="$t('Internet_of_things.Industry.createTime')" align="center" prop="createTime" width="160" />
+      <el-table-column :label="$t('operation')" align="center" width="140">
         <template slot-scope="scope">
-          <el-button type="text" @click="handleToView(scope.row)">查看</el-button>
-          <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
+          <el-button type="text" @click="handleToView(scope.row)">{{ $t('toView') }}</el-button>
+          <el-button type="text" @click="handleDelete(scope.row)">{{ $t('delete') }}</el-button>
         </template>
       </el-table-column>
     </el-table>
 
     <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
 
-    <el-dialog title="新建行业" v-if="open" :visible.sync="open" width="30%">
+    <el-dialog :title="$t('Internet_of_things.Industry.newIndustry')" v-if="open" :visible.sync="open" width="30%">
       <test ref="test" v-model="dialogParams" :form-config="dialogForm" :insideRules="dialogRules"></test>
     </el-dialog>
   </el-card>
@@ -39,7 +39,7 @@ export default {
       },
       queryForm: {
         keyword: {
-          label: '关键字',
+          label: this.$t('Internet_of_things.Industry.keyword'),
           span: 6,
         },
         operation: {
@@ -58,7 +58,7 @@ export default {
         otherButton: {
           list: [
             {
-              name: '新建行业',
+              name: this.$t('Internet_of_things.Industry.newIndustry'),
               methodsText: 'add',
               type: 'primary',
               add: () => {
@@ -78,22 +78,21 @@ export default {
       },
       dialogForm: {
         loadingStatus: false,
-        loadingText: '请稍后',
         appName: {
-          label: '行业名称',
+          label: this.$t('Internet_of_things.Industry.appName'),
         },
         otherButton: {
           align: 'center',
           list: [
             {
-              name: '取消',
+              name: this.$t('cancelText'),
               methodsText: 'cancel',
               cancel: () => {
                 this.open = false
               },
             },
             {
-              name: '确定',
+              name: this.$t('submitText'),
               methodsText: 'submit',
               type: 'primary',
               submit: () => {
@@ -104,7 +103,7 @@ export default {
         },
       },
       dialogRules: {
-        appName: [{ required: true, message: '请输入行业名称', trigger: 'blur' }],
+        appName: [{ required: true, message: this.$t('Internet_of_things.Industry.appNameRules'), trigger: 'blur' }],
       },
     }
   },
@@ -139,7 +138,7 @@ export default {
           this.dialogForm.loadingStatus = true
           API.tdaApplicationAdd(this.dialogParams).then(
             () => {
-              this.msgSuccess('添加成功')
+              this.msgSuccess(this.$t('addSuccess'))
               this.open = false
               this.dialogForm.loadingStatus = false
               this.getList()
@@ -170,13 +169,13 @@ export default {
       })
     },
     handleDelete(row) {
-      this.$confirm('请问是否删除行业:' + row.appName, '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '确定',
+      this.$confirm(this.$t('askDeleteData'), {
+        confirmButtonText: this.$t('submitText'),
+        cancelButtonText: this.$t('cancelText'),
         type: 'warning',
       }).then(() => {
         API.tdaApplicationDelete({ id: row.id }).then(() => {
-          this.msgSuccess('删除成功')
+          this.msgSuccess(this.$t('deleteSuccess'))
           this.getList()
         })
       })

+ 30 - 31
src/views/Internet-of-things/equipment-management/index.vue

@@ -3,16 +3,16 @@
     <test v-model="queryParams" :form-config="queryForm"></test>
 
     <el-table :data="tableList" v-loading="loading">
-      <el-table-column label="所属行业" align="center" prop="applicationName" />
-      <el-table-column label="所属产品" align="center" prop="productName" />
-      <el-table-column label="设备名称" align="center" prop="deviceName" />
-      <el-table-column label="设备标识" align="center" prop="nodeId" width="120" />
-      <el-table-column label="设备状态" align="center" prop="" width="120" />
-      <el-table-column label="设备ID" align="center" prop="deviceId" />
-      <el-table-column label="密钥" align="center" prop="secret" width="120" />
-      <el-table-column label="操作" align="center" width="80">
+      <el-table-column :label="$t('Internet_of_things.equipment.applicationName')" align="center" prop="applicationName" />
+      <el-table-column :label="$t('Internet_of_things.equipment.productName')" align="center" prop="productName" />
+      <el-table-column :label="$t('Internet_of_things.equipment.deviceName')" align="center" prop="deviceName" />
+      <el-table-column :label="$t('Internet_of_things.equipment.nodeId')" align="center" prop="nodeId" width="120" />
+      <el-table-column :label="$t('Internet_of_things.equipment.deviceStatus')" align="center" prop="" width="120" />
+      <el-table-column :label="$t('Internet_of_things.equipment.deviceId')" align="center" prop="deviceId" />
+      <el-table-column :label="$t('Internet_of_things.equipment.secret')" align="center" prop="secret" width="120" />
+      <el-table-column :label="$t('operation')" align="center" width="80">
         <template slot-scope="scope">
-          <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
+          <el-button type="text" @click="handleDelete(scope.row)">{{ $t('delete') }} </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -44,11 +44,11 @@ export default {
       },
       queryForm: {
         keyword: {
-          label: '关键字',
+          label: this.$t('Internet_of_things.equipment.keyword'),
           span: 6,
         },
         tdaApplicationId: {
-          label: '行业',
+          label: this.$t('Internet_of_things.equipment.tdaApplicationId'),
           span: 6,
           type: 'select',
           data: [],
@@ -56,7 +56,7 @@ export default {
           labelName: 'appName',
         },
         tdaProductId: {
-          label: '产品',
+          label: this.$t('Internet_of_things.equipment.tdaProductId'),
           span: 6,
           type: 'select',
           data: [],
@@ -79,7 +79,7 @@ export default {
         otherButton: {
           list: [
             {
-              name: '添加设备',
+              name: this.$t('Internet_of_things.equipment.addEquipment'),
               methodsText: 'add',
               type: 'primary',
               add: () => {
@@ -103,30 +103,29 @@ export default {
       },
       dialogForm: {
         loadingStatus: false,
-        loadingText: '请稍后',
         tdaApplicationId: {
-          label: '所属行业',
+          label: this.$t('Internet_of_things.equipment.applicationName'),
           type: 'select',
           data: [],
           keyName: 'id',
           labelName: 'appName',
         },
         tdaProductId: {
-          label: '所属产品',
+          label: this.$t('Internet_of_things.equipment.productName'),
           type: 'select',
           data: [],
           keyName: 'id',
           labelName: 'name',
         },
         deviceName: {
-          label: '设备名称',
+          label: this.$t('Internet_of_things.equipment.deviceName'),
         },
         nodeId: {
-          label: '设备标识',
+          label: this.$t('Internet_of_things.equipment.nodeId'),
           span: 2,
         },
         secret: {
-          label: '密钥',
+          label: this.$t('Internet_of_things.equipment.secret'),
           disabled: true,
           span: 2,
         },
@@ -134,14 +133,14 @@ export default {
           align: 'center',
           list: [
             {
-              name: '取消',
+              name: this.$t('cancelText'),
               methodsText: 'cancel',
               cancel: () => {
                 this.open = false
               },
             },
             {
-              name: '确定',
+              name: this.$t('submitText'),
               methodsText: 'submit',
               type: 'primary',
               submit: () => {
@@ -152,11 +151,11 @@ export default {
         },
       },
       dialogRules: {
-        tdaApplicationId: [{ required: true, message: '请选择所属行业', trigger: 'change' }],
-        tdaProductId: [{ required: true, message: '请选择所属产品', trigger: 'change' }],
-        deviceName: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
-        nodeId: [{ required: true, message: '请输入设备标识', trigger: 'blur' }],
-        secret: [{ required: true, message: '请输入密钥', trigger: 'blur' }],
+        tdaApplicationId: [{ required: true, message: this.$t('Internet_of_things.equipment.tdaApplicationIdRules'), trigger: 'change' }],
+        tdaProductId: [{ required: true, message: this.$t('Internet_of_things.equipment.tdaProductIdRules'), trigger: 'change' }],
+        deviceName: [{ required: true, message: this.$t('Internet_of_things.equipment.deviceNameRules'), trigger: 'blur' }],
+        nodeId: [{ required: true, message: this.$t('Internet_of_things.equipment.nodeIdRules'), trigger: 'blur' }],
+        secret: [{ required: true, message: this.$t('Internet_of_things.equipment.secretRules'), trigger: 'blur' }],
       },
     }
   },
@@ -221,7 +220,7 @@ export default {
           this.dialogForm.loadingStatus = true
           API.tdaDeviceAdd(this.dialogParams).then(
             () => {
-              this.msgSuccess('添加成功')
+              this.msgSuccess(this.$t('addSuccess'))
               this.open = false
               this.dialogForm.loadingStatus = false
               this.getList()
@@ -240,13 +239,13 @@ export default {
       })
     },
     handleDelete(row) {
-      this.$confirm('请问是否删除设备:' + row.appName, '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '确定',
+      this.$confirm(this.$t('askDeleteData'), {
+        confirmButtonText: this.$t('submitText'),
+        cancelButtonText: this.$t('cancelText'),
         type: 'warning',
       }).then(() => {
         API.tdaDeviceDelete({ id: row.id }).then(() => {
-          this.msgSuccess('删除成功')
+          this.msgSuccess(this.$t('deleteSuccess'))
           this.getList()
         })
       })

+ 34 - 35
src/views/Internet-of-things/product-management/index.vue

@@ -3,23 +3,23 @@
     <test v-model="queryParams" :form-config="queryForm"></test>
 
     <el-table :data="tableList" v-loading="loading">
-      <el-table-column label="所属行业" align="center" prop="appName" />
-      <el-table-column label="产品名称" align="center" prop="name" />
-      <el-table-column label="产品ID" align="center" prop="productId" />
-      <el-table-column label="设备类型" align="center" prop="deviceType" width="120" />
-      <el-table-column label="协议类型" align="center" prop="protocolType" width="120" />
-      <el-table-column label="数据格式" align="center" prop="dataFormat" width="120" />
-      <el-table-column label="厂商名称" align="center" prop="manufacturerName" />
-      <el-table-column label="操作" align="center" width="80">
+      <el-table-column :label="$t('Internet_of_things.product.appName')" align="center" prop="appName" />
+      <el-table-column :label="$t('Internet_of_things.product.name')" align="center" prop="name" />
+      <el-table-column :label="$t('Internet_of_things.product.productId')" align="center" prop="productId" />
+      <el-table-column :label="$t('Internet_of_things.product.deviceType')" align="center" prop="deviceType" width="120" />
+      <el-table-column :label="$t('Internet_of_things.product.protocolType')" align="center" prop="protocolType" width="120" />
+      <el-table-column :label="$t('Internet_of_things.product.dataFormat')" align="center" prop="dataFormat" width="120" />
+      <el-table-column :label="$t('Internet_of_things.product.manufacturerName')" align="center" prop="manufacturerName" />
+      <el-table-column :label="$t('operation')" align="center" width="80">
         <template slot-scope="scope">
-          <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
+          <el-button type="text" @click="handleDelete(scope.row)">{{ $t('delete') }}</el-button>
         </template>
       </el-table-column>
     </el-table>
 
     <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
 
-    <el-dialog title="创建产品" v-if="open" :visible.sync="open" width="30%">
+    <el-dialog :title="$t('Internet_of_things.product.addProduct')" v-if="open" :visible.sync="open" width="30%">
       <test ref="test" v-model="dialogParams" :form-config="dialogForm" :insideRules="dialogRules"></test>
     </el-dialog>
   </el-card>
@@ -45,11 +45,11 @@ export default {
       },
       queryForm: {
         keyword: {
-          label: '关键字',
+          label: this.$t('Internet_of_things.product.keyword'),
           span: 6,
         },
         tdaApplicationId: {
-          label: '行业',
+          label: this.$t('Internet_of_things.product.industry'),
           span: 6,
           type: 'select',
           data: [],
@@ -57,7 +57,7 @@ export default {
           labelName: 'appName',
         },
         deviceType: {
-          label: '设备类型',
+          label: this.$t('Internet_of_things.product.deviceType'),
           span: 6,
           type: 'select',
           data: [],
@@ -65,7 +65,7 @@ export default {
           labelName: 'label',
         },
         manufacturerName: {
-          label: '厂商名称',
+          label: this.$t('Internet_of_things.product.manufacturerName'),
           span: 6,
           type: 'select',
           data: [],
@@ -88,7 +88,7 @@ export default {
         otherButton: {
           list: [
             {
-              name: '创建产品',
+              name: this.$t('Internet_of_things.product.addProduct'),
               methodsText: 'add',
               type: 'primary',
               add: () => {
@@ -113,19 +113,18 @@ export default {
       },
       dialogForm: {
         loadingStatus: false,
-        loadingText: '请稍后',
         tdaApplicationId: {
-          label: '所属行业',
+          label: this.$t('Internet_of_things.product.appName'),
           type: 'select',
           data: [],
           keyName: 'id',
           labelName: 'appName',
         },
         name: {
-          label: '产品名称',
+          label: this.$t('Internet_of_things.product.name'),
         },
         protocolType: {
-          label: '协议类型',
+          label: this.$t('Internet_of_things.product.protocolType'),
           type: 'select',
           span: 2,
           data: [{ label: 'MQTT', value: 'MQTT' }],
@@ -134,7 +133,7 @@ export default {
           disabled: true,
         },
         dataFormat: {
-          label: '数据格式',
+          label: this.$t('Internet_of_things.product.dataFormat'),
           type: 'select',
           span: 2,
           data: [{ label: 'json', value: 'json' }],
@@ -143,14 +142,14 @@ export default {
           disabled: true,
         },
         manufacturerName: {
-          label: '厂商名称',
+          label: this.$t('Internet_of_things.product.manufacturerName'),
           type: 'select',
           data: [],
           keyName: 'value',
           labelName: 'label',
         },
         deviceType: {
-          label: '设备类型',
+          label: this.$t('Internet_of_things.product.deviceType'),
           type: 'select',
           data: [],
           keyName: 'value',
@@ -160,14 +159,14 @@ export default {
           align: 'center',
           list: [
             {
-              name: '取消',
+              name: this.$t('cancelText'),
               methodsText: 'cancel',
               cancel: () => {
                 this.open = false
               },
             },
             {
-              name: '确定',
+              name: this.$t('submitText'),
               methodsText: 'submit',
               type: 'primary',
               submit: () => {
@@ -178,12 +177,12 @@ export default {
         },
       },
       dialogRules: {
-        tdaApplicationId: [{ required: true, message: '请选择所属行业', trigger: 'change' }],
-        name: [{ required: true, message: '请输入产品名称', trigger: 'blur' }],
-        protocolType: [{ required: true, message: '请选择协议类型', trigger: 'change' }],
-        dataFormat: [{ required: true, message: '请选择数据格式', trigger: 'change' }],
-        manufacturerName: [{ required: true, message: '请选择厂商名称', trigger: 'change' }],
-        deviceType: [{ required: true, message: '请选择设备类型', trigger: 'change' }],
+        tdaApplicationId: [{ required: true, message: this.$t('Internet_of_things.product.tdaApplicationIdRules'), trigger: 'change' }],
+        name: [{ required: true, message: this.$t('Internet_of_things.product.nameRules'), trigger: 'blur' }],
+        protocolType: [{ required: true, message: this.$t('Internet_of_things.product.protocolTypeRules'), trigger: 'change' }],
+        dataFormat: [{ required: true, message: this.$t('Internet_of_things.product.dataFormatRules'), trigger: 'change' }],
+        manufacturerName: [{ required: true, message: this.$t('Internet_of_things.product.manufacturerNameRules'), trigger: 'change' }],
+        deviceType: [{ required: true, message: this.$t('Internet_of_things.product.deviceTypeRules'), trigger: 'change' }],
       },
     }
   },
@@ -255,7 +254,7 @@ export default {
           this.dialogForm.loadingStatus = true
           API.tdaProductAdd(this.dialogParams).then(
             () => {
-              this.msgSuccess('添加成功')
+              this.msgSuccess(this.$t('addSuccess'))
               this.open = false
               this.dialogForm.loadingStatus = false
               this.getList()
@@ -274,13 +273,13 @@ export default {
       })
     },
     handleDelete(row) {
-      this.$confirm('请问是否删除产品:' + row.name, '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '确定',
+      this.$confirm(this.$t('askDeleteData'), {
+        confirmButtonText: this.$t('submitText'),
+        cancelButtonText: this.$t('cancelText'),
         type: 'warning',
       }).then(() => {
         API.tdaProductDelete({ id: row.id }).then(() => {
-          this.msgSuccess('删除成功')
+          this.msgSuccess(this.$t('deleteSuccess'))
           this.getList()
         })
       })