Browse Source

Merge branch 'master' of http://git.wdklian.com/allen/ncs_ui

* 'master' of http://git.wdklian.com/allen/ncs_ui:
  开发多个页面的语言文件

# Conflicts:
#	languages/zh-CN.js
wuyunfeng 3 years ago
parent
commit
b4afcac06e
50 changed files with 1053 additions and 813 deletions
  1. 206 9
      languages/zh-CN.js
  2. 10 0
      src/api/ncs_systemconfig.js
  3. 8 8
      src/views/calling-board/index.vue
  4. 9 9
      src/views/calling-message/index.vue
  5. 5 5
      src/views/calling-ncError/index.vue
  6. 8 8
      src/views/calling-nurse/index.vue
  7. 1 1
      src/views/calling-setting/components/SpeechSetting.vue
  8. 1 1
      src/views/calling-setting/components/SystemSetting.vue
  9. 22 9
      src/views/customer/components/customerManager.vue
  10. 162 158
      src/views/customer/components/elderlyCareManager.vue
  11. 14 11
      src/views/customer/components/patientManager.vue
  12. 2 2
      src/views/customer/customerEdit.vue
  13. 4 4
      src/views/customer/customer_relative.vue
  14. 7 7
      src/views/customer/list.vue
  15. 1 1
      src/views/dashboard/calling-admin/components/AppVersionManager.vue
  16. 1 1
      src/views/dashboard/calling-admin/components/partInfoEdit.vue
  17. 9 9
      src/views/dashboard/calling-admin/components/partUserManager.vue
  18. 8 8
      src/views/dashboard/calling-admin/index.vue
  19. 6 6
      src/views/dashboard/calling/components/SickBedBoard.vue
  20. 33 30
      src/views/dashboard/calling/index.vue
  21. 7 7
      src/views/hospital/clerkManager.vue
  22. 18 18
      src/views/hospital/ncs_customer/customerManager.vue
  23. 14 14
      src/views/hospital/ncs_device/deviceManager.vue
  24. 21 21
      src/views/hospitalFrame/frameGroup.vue
  25. 11 9
      src/views/hospitalFrame/frameGroupEdit.vue
  26. 5 5
      src/views/hospitalFrame/hospitalFrame.vue
  27. 2 2
      src/views/ncs-auth/compontents/roleEdit.vue
  28. 5 5
      src/views/ncs-auth/superadmin/defaultRoleManager.vue
  29. 2 2
      src/views/ncs-broadcast/broadcastEdit.vue
  30. 35 35
      src/views/ncs-broadcast/components/broadcastFileList.vue
  31. 40 38
      src/views/ncs-broadcast/components/broadcastInfo.vue
  32. 62 62
      src/views/ncs-broadcast/index.vue
  33. 29 28
      src/views/ncs-channel/index.vue
  34. 2 2
      src/views/ncs-device/components/deviceManager.vue
  35. 2 2
      src/views/ncs-device/device-edit.vue
  36. 4 4
      src/views/ncs-device/deviceInfo.vue
  37. 7 7
      src/views/ncs-device/index.vue
  38. 50 50
      src/views/ncs-event/index.vue
  39. 36 48
      src/views/ncs-interaction/index.vue
  40. 3 3
      src/views/ncs-menu/menuManager.vue
  41. 41 40
      src/views/ncs-nurse-config/index.vue
  42. 1 1
      src/views/ncs-orginazition/components/AppVersionManager.vue
  43. 14 2
      src/views/ncs-orginazition/components/partInfoEdit.vue
  44. 9 9
      src/views/ncs-orginazition/components/partUserManager.vue
  45. 11 11
      src/views/ncs-orginazition/index.vue
  46. 16 12
      src/views/ncs-remark/index.vue
  47. 28 28
      src/views/ncs-sos-device-setting/sos_device_setting.vue
  48. 12 12
      src/views/ncs-system-config/index.vue
  49. 48 48
      src/views/ncs-task/index.vue
  50. 1 1
      src/views/vital-sign/setting.vue

+ 206 - 9
languages/zh-CN.js

@@ -11,6 +11,10 @@ module.exports = {
     cancel: '取消',
     back: '返回',
     handle: '操作',
+    details: '详情',
+    sort: '排序',
+    submit: '提交',
+    systemCreate: '系统创建',
     cancelHandle: '取消操作!',
     handleSuccess: '操作成功',
     saveEdit: '保存修改',
@@ -27,6 +31,8 @@ module.exports = {
     editSuccess: '修改成功!',
     addSuccess: '新增成功!',
     createSuccess: '创建成功!',
+    createTime: '创建时间',
+    updateTime: '更新时间',
     save: '保存',
     saveSuccess: '保存成功!',
     notDevelopedYet: '暂未开发',
@@ -44,11 +50,52 @@ module.exports = {
     time: '小时',
     minute: '分钟',
     second: '秒',
+    Monday: '周一',
+    Tuesday: '周二',
+    Wednesday: '周三',
+    Thursday: '周四',
+    Friday: '周五',
+    Saturday: '周六',
+    Sunday: '周日',
+    every: '每',
+    times: '次',
     choice: '请选择',
     choiceAll: '全选',
     colour: '颜色',
+    searchDateRange: '搜索时间段',
+    to: '至',
+    startDate: '开始日期',
+    endDate: '结束日期',
+    startTime: '开始时间',
+    endTime: '结束时间',
+    lastWeek: '最近一周',
+    lastMonth: '最近一个月',
+    lastThreeMonths: '最近三个月',
     getMsg: '收到消息:',
-    sureInitialize: '您确定要初始化吗?'
+    sureInitialize: '您确定要初始化吗?',
+    dateNull: '暂无数据',
+    content: '内容',
+    inputContent: '请输入文本内容,长度300',
+    uploader: '附件',
+    uploaderDownload: '下载附件',
+    uploaderImg: '上传附件只能是txt,doc,docx,xls,xlsx,jpg,png,jpeg格式!',
+    uploaderImg2: '上传头像图片只能是 JPG、PNG、GIF 格式!',
+    uploaderSize: '上传附件大小不能超过 5MB!',
+    uploaderSize2: '上传头像图片大小不能超过 2MB!',
+    uploaderImgMsg: '图片宽度必须在100~500之间,宽高比为1:1!',
+    uploaderImgMsg2: '请上传宽高比为1:1的图片',
+    uploaderImgMsg3: '图片高度必须在100~500之间!',
+    uploadFile: '上传文件',
+    uploadFileMsg: '将文件拖到此处,或',
+    uploadFileMsg2: '点击上传',
+    uploadFileMsg3: '只能上传mp3文件',
+    uploadFileMsg4: '上传附件大小不能超过 5MB!',
+    uploadFileName: '文件名称',
+    uploadFileNameMsg: '文件名称不能为空',
+    uploadFileUrl: '文件路径',
+    uploadFileUrlMsg: '文件路径不能为空,请上传文件',
+    uploadFileAuthor: '上传者',
+    uploadFileDate: '上传日期'
   },
   member: {
     face: '头像',
@@ -131,8 +178,10 @@ module.exports = {
   },
   deviceManage: {
     deviceManage: '设备管理',
+    deviceKeywords: '请输入设备别名或设备标识码',
     deviceAdd: '新增设备',
     deviceEdit: '修改设备',
+    deviceId: '设备id',
     deviceType: '设备类型',
     choiceDeviceType: '请选择设备类型',
     deviceName: '设备别名',
@@ -183,12 +232,13 @@ module.exports = {
     transRs485: '上属485转换盒',
     re485SipId: '485地址',
     inputRe485SipId: '请输入485地址',
-    sosDeviceSetting: '报警设备模式',
+    sosDeviceSettingType: '报警模式',
     sosDeviceSettingStatusFalse: '不开启',
     sosDeviceSettingControlModel: '疫情防控模式',
     sosDeviceSettingElderlyModel: '关爱老人模式',
     sosDeviceSettingTime: '报警时间',
     sosDeviceSettingUnit: '报警时间单位',
+    sosDeviceSettingEdit: '修改设备报警',
     ledResolutionRatio: '点阵屏规格',
     ledVoice: '语音播放',
     ledVoiceStatus: '启用语音',
@@ -205,12 +255,16 @@ module.exports = {
   },
   customerManage: {
     customerAdd: '入住登记',
+    customerAdd2: '登记注册',
+    customerQrCode: '二维码',
     customerInfo: '用户信息',
     baseInfo: '基本信息',
     named: '用户姓名',
     inputNamed: '请输入姓名',
     cardNo: '入住编号',
-    inputCardNo: '请输入入住编号',
+    cardNo2: '登记号',
+    inputCardNo: '请输入病人编号',
+    inputCardNo2: '请输入登记号',
     age: '年龄',
     inputAge: '请输入年龄',
     ageUnit: '年龄单位',
@@ -235,14 +289,18 @@ module.exports = {
     nickname: '昵称',
     inputNickname: '请输入用户其他称呼',
     frame: '入住床位',
+    frame2: '登记位置',
     choiceFrame: '请选择床位',
     illnessDesc: '用户情况简述',
+    illnessDesc2: '用户简介',
     patientIllnessDesc: '病况描述',
     inputIllnessDesc: '请输入文本内容,长度2~50',
     advice: '医嘱',
     inputAdvice: '请输入文本内容,长度2~50',
     doctor: '责任医生',
+    doctor2: '监护人',
     choiceDoctor: '请选择医生',
+    choiceDoctor2: '请选择监护人',
     nurse: '责任护士',
     choiceNurse: '请选择护士',
     worker: '责任护工',
@@ -259,16 +317,15 @@ module.exports = {
     inputRemarks: '请输入备注内容',
     remarkTime: '时间:',
     remarkName: '备注人:',
-    content: '内容',
-    inputContent: '\'请输入文本内容,长度300\'',
-    uploader: '附件',
-    uploaderImg: '上传附件只能是txt,doc,docx,xls,xlsx,jpg,png,jpeg格式!',
-    uploaderSize: '上传附件大小不能超过 5MB!',
     addRemark: '添加备注',
     outBed: '退床',
+    outBed2: '注销登记',
+    outBed3: '注销',
     sureOutBed: '确定退床吗?',
     outBedSuccess: '退床成功!',
     changeBed: '换床',
+    changeBed2: '更换位置',
+    changeBed3: '更换',
     changeBedSuccess: '',
     oldBed: '当前床位',
     newBed: '换到床位',
@@ -301,7 +358,128 @@ module.exports = {
     you: '您于',
     in: '在',
     nearby: '附近',
-    notCovered: '当前不在信标范围内',
+    notCovered: '当前不在信标范围内'
+  },
+  channel: {
+    channelAdd: '新增频道',
+    channelName: '频道名称',
+    inputChannelName: '请输入频道名称',
+    subscribeManage: '订阅管理'
+  },
+  remark: {
+    remarkAdd: '新建便签',
+    remarkContent: '便签内容:',
+    remarkCreateTime: '创建时间:',
+    remarkCreateName: '创建人:'
+  },
+  task: {
+    all: '全部',
+    taskType: '任务状态',
+    notOperated: '未操作',
+    taskFail: '任务失败',
+    taskSuccess: '任务成功',
+    isTaskSuccess: '任务完成?',
+    success: '成功',
+    failed: '失败',
+    noticeAndTask: '通知/任务',
+    taskPlanTime: '计划任务执行时间',
+    taskPlanTime2: '计划执行时间:',
+    taskToTime: '实际任务执行时间',
+    taskToName: '任务操作人',
+    doTask: '操作任务',
+    creatName: '创建人',
+    choiceTaskPlanTime: '请选择计划任务执行时间',
+    inputTaskContent: '请输入任务内容',
+    choiceTaskToTime: '请选择实际任务时间'
+  },
+  interaction: {
+    interactionKeywords: '请输入发起方或接收方',
+    fromMemberName: '发起方',
+    toMemberName: '接收方',
+    actionType: '交互类型',
+    actionEnd: '交互结果',
+    success: '成功',
+    notOperated: '未响应',
+    data: '交互数据',
+    createDate: '交互时间',
+    fromDevice: '发起设备',
+    toDevice: '接收设备'
+  },
+  frameGroup: {
+    frameGroupAdd: '新建区域',
+    frameGroupName: '区域名称',
+    inputFrameGroupName: '请输入区域名称',
+    frameGroupNameMsg: '区域名称不能为空',
+    frameGroupManage: '区域管辖空间'
+  },
+  broadcast: {
+    broadcastAdd: '新建广播',
+    broadcastName: '广播名称',
+    inputBroadcastName: '请输入广播名称',
+    broadcastNameMsg: '广播名称不能为空',
+    broadcastMode: '广播模式',
+    broadcastModeMsg: '广播模式必须选择',
+    playMode: '播放模式',
+    manualMode: '手动模式',
+    autoMode: '自动模式',
+    playModeMsg: '播放模式必须选择',
+    timePlay: '定时播放',
+    scheduledPlay: '定次播放',
+    playStart: '自动播放开始',
+    playStartMsg: '自动模式开始时间必须选择',
+    anyTime: '任意时间点',
+    playEnd: '定时播放结束',
+    playEndMsg: '定时播放结束时间必须选择',
+    repeatTimes: '定次播放次数',
+    repeatTimesMsg: '播放次数必须填写',
+    repeatTime: '播放次数',
+    broadcastStatus: '是否启用',
+    broadcastStart: '开启此广播',
+    status: '开启状态',
+    statusTrue: '启用',
+    statusFalse: '关闭',
+    repeatDay: '开启日',
+    play: '播放',
+    stop: '停止',
+    playOrder: '播放顺序',
+    playOrderMsg: '播放顺序必填',
+    broadcastFrameGroup: '广播区域',
+    otherBroadcastFrameGroup: '其他广播位置',
+    broadcastInfo: '广播信息',
+    broadcastFile: '广播文件'
+  },
+  event: {
+    eventEdit: '编辑按钮事件',
+    name: '名称',
+    inputName: '请输入名称',
+    desc: '描述',
+    inputDesc: '请输入描述',
+    keyCode: '唯一标识码',
+    inputKeyCode: '请输入唯一标识码',
+    coordinateX: 'x坐标范围',
+    minX: '最小x轴',
+    manX: '最大x轴',
+    coordinateY: 'y坐标范围',
+    minY: '最小y轴',
+    manY: '最大y轴',
+    deviceType: '设备类型',
+    choiceDeviceType: '请选择类型',
+    remoteControl: '遥控器',
+    emergencyButton: 'SOS紧急按钮',
+    roleName: '适用角色',
+    choiceRoleName: '请选择适用人',
+    icon: '图标'
+  },
+  nurseConfig: {
+    configName: '护理名',
+    inputConfigName: '请输入护理名称',
+    configAdd: '新增护理参数',
+    configEdit: '修改护理',
+    optionAdd: '新增护理项',
+    optionName: '护理项名',
+    inputOptionName: '请输入护理项名称',
+    optionColor: '护理灯颜色',
+    colorRgb: '颜色标识',
   },
   partInfo: {
     partInfo: '系统设置',
@@ -373,6 +551,7 @@ module.exports = {
     clerkManage: '员工管理',
     patientManage: '病人管理',
     customerManage: '用户管理',
+    customerQrCode: '用户二维码',
     mobileDeviceManage: '移动设备',
     sosDeviceSettingManage: '报警设备',
     channelManage: '对讲频道',
@@ -433,5 +612,23 @@ module.exports = {
     NOT_START: '不启动',
     EPIDEMIC_PATTERN: '疫情防控模式',
     CARING_PATTERN: '关爱老人模式'
+  },
+  tcpType: {
+    CALLBACK: 'TCP反馈',
+    VOICE: '语音',
+    VIDEO: '视频',
+    SOS: '紧急呼叫',
+    REINFORCE: '增援',
+    IM: '留言',
+    DEVICE: '设备',
+    DATA: '数据',
+    EVENT: '事件',
+    SIDE: '边外信息',
+    BROADCAST: '广播',
+    TIME: '时间',
+    ENTRACEGUARD: '门禁',
+    CHANNELIM: '频道留言',
+    LOCATION: '定位',
+    UNKNOWN: '未知'
   }
 }

+ 10 - 0
src/api/ncs_systemconfig.js

@@ -63,3 +63,13 @@ export function getConfig(keyCode) {
     loading: false
   })
 }
+
+/** 查询是否连接云服务器 */
+export function cloud() {
+  return request({
+    url: `/ncs/config/cloud`,
+    method: 'get',
+    loading: false
+  })
+}
+

+ 8 - 8
src/views/calling-board/index.vue

@@ -18,7 +18,7 @@
       <!--        @rowDoubleClicked="getList"-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
       </div>
       <el-pagination
@@ -233,12 +233,12 @@ export default {
         sortable: false
       },
       {
-        headerName: '删除', field: 'shop_id',
+        headerName: this.$t('action.delete'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.deleteSingle,
-            label: '删除',
+            label: this.$t('action.delete'),
             buttonType: 'danger',
             buttonSize: 'mini'
           }
@@ -293,9 +293,9 @@ export default {
       this.handlerDelete(row.id)
     },
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Device.remove(ids).then(
@@ -303,7 +303,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -315,7 +315,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },

+ 9 - 9
src/views/calling-message/index.vue

@@ -13,7 +13,7 @@
       <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" @click="handlerAdd">新增留言</el-button>
@@ -163,9 +163,9 @@ export default {
     },
     /** 删除单条数据 */
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Message.remove(ids).then(
@@ -173,7 +173,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -185,7 +185,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -193,7 +193,7 @@ export default {
     batchDelete: function() {
       if (this.multipleSelection.length === 0) {
         this.$alert('没有选择任何记录!', '系统提示', {
-          confirmButtonText: '确定',
+          confirmButtonText: this.$t('action.yes'),
           callback: action => {
           }
         })
@@ -242,14 +242,14 @@ export default {
             this.formmodel.partid = this.$store.getters.partId
             API_Message.add(this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.getList()
             })
           } else {
             /** 修改 */
             API_Message.update(this.formmodel.id, this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('修改成功!')
+              this.$message.success(this.$t('action.editSuccess'))
               this.getList()
             }).catch(response => {
               this.formshow = false

+ 5 - 5
src/views/calling-ncError/index.vue

@@ -216,9 +216,9 @@ export default {
       this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
     },
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_ErrorLog.remove(ids).then(
@@ -226,7 +226,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -238,7 +238,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },

+ 8 - 8
src/views/calling-nurse/index.vue

@@ -5,7 +5,7 @@
       <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" @click="handlerAdd">新增护理</el-button>
@@ -138,9 +138,9 @@ export default {
   },
   methods: {
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_CallingNurse.remove(ids).then(
@@ -148,7 +148,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -160,7 +160,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -233,14 +233,14 @@ export default {
             this.formmodel.partid = this.$store.getters.partId
             API_CallingNurse.add(this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.getList()
             })
           } else {
             /** 修改 */
             API_CallingNurse.update(this.formmodel.id, this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('修改成功!')
+              this.$message.success(this.$t('action.editSuccess'))
               this.getList()
             }).catch(response => {
               this.formshow = false

+ 1 - 1
src/views/calling-setting/components/SpeechSetting.vue

@@ -256,7 +256,7 @@ export default {
       this.$refs['editform'].validate((valid) => {
         if (valid) {
           API_Speech.update(this.formmodel.id, this.formmodel).then(res => {
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
           }).catch(err => {
             this.$message.error(err.message)
           })

+ 1 - 1
src/views/calling-setting/components/SystemSetting.vue

@@ -279,7 +279,7 @@ export default {
             this.formmodel.part_night_start = this.nightStart.toLocaleTimeString('chinese', { hour12: false })
           }
           API_Part.update(this.formmodel.id, this.formmodel).then(res => {
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
           }).catch(err => {
           })
         } else {

+ 22 - 9
src/views/customer/components/customerManager.vue

@@ -263,7 +263,7 @@
                   width="100"
               >
                 <template slot-scope="scope">
-                  <el-button type="danger" size="mini" @click="handlerDeleteRelative(scope.row.member_id)">{{ this.$t('action.delete') }}</el-button>
+                  <el-button type="danger" size="mini" @click="handlerDeleteRelative(scope.row.member_id)">{{ deleted }}</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -344,12 +344,12 @@
                         :minlength="2"
                         :maxlength="300"
                         show-word-limit
-                        :placeholder="this.$t('customerManage.inputContent')"
+                        :placeholder="this.$t('action.inputContent')"
                       />
                     </el-form-item>
                   </el-col>
                   <el-col :span="8">
-                    <el-form-item :label="this.$t('customerManage.uploader')" style="margin-bottom: 0">
+                    <el-form-item :label="this.$t('action.uploader')" style="margin-bottom: 0">
                       <el-upload
                         v-if="!attachFilePath"
                         class="attach-uploader"
@@ -503,6 +503,7 @@ import * as API_User from '@/api/user'
 import { FRAME_TYPE } from '@/utils/enum/FrameTypeEnum'
 import vitalSignLog from '@/views/vital-sign/log'
 import vueQr from 'vue-qr'
+import * as API_SystemConfig from '@/api/ncs_systemconfig'
 const serverUrl = domain.serverUrl
 export default {
   name: 'CustomerManager',
@@ -536,6 +537,7 @@ export default {
       filterState: null,
       rowSelection: null,
       frameworkComponents: null,
+      isCloud: false,
       /** 列表参数 */
       params: {
         page_size: 20,
@@ -600,10 +602,13 @@ export default {
         true_name: [{ required: true, message: this.$t('customerManage.inputRemarks'), trigger: 'blur' }],
         relative_name: [{ required: true, message: this.$t('customerManage.inputRelativeName'), trigger: 'blur' }],
         mobile: [
-          {
+          { required: false, message: this.$t('member.inputMobile'), trigger: 'blur',
             validator: (rule, value, callback) => {
-              if (value === null || value === '') { // 手机号可为空
-                callback()
+              // this.isCloud = false
+              if (this.isCloud === false) {
+                if (value === null || value === '') { // 手机号可为空
+                  callback()
+                }
               }
               if (!RegExp.mobile.test(value)) {
                 callback(new Error(this.$t('member.mobileInputMsg')))
@@ -665,7 +670,8 @@ export default {
         { key: this.$t('customerManage.customerStatusTrue'), value: 0, color: 'green' },
         { key: this.$t('customerManage.customerStatusFalse'), value: 1, color: 'red' }
       ],
-      detailsVisible: false
+      detailsVisible: false,
+      deleted: this.$t('action.delete')
     }
   },
   computed: {
@@ -879,6 +885,7 @@ export default {
       ]
     })
     this.getEmptyBeds()
+    this.getCloud()
   },
   methods: {
     windowResize() {
@@ -1190,6 +1197,7 @@ export default {
     },
 
     handleEdit(row) {
+      this.relativeRules.mobile[0].required = this.isCloud
       this.formmodel = {
         ...row
       }
@@ -1307,11 +1315,11 @@ export default {
         const isImg = extension === 'jpeg' || extension === 'png' || extension === 'jpg' || extension === 'txt' || extension === 'doc' || extension === 'docx' || extension === 'xls' || extension === 'xlsx'
         const isLt5M = file.size / 1024 / 1024 < 5
         if (!isImg) {
-          this.$message.error(this.$t('customerManage.uploaderImg'))
+          this.$message.error(this.$t('action.uploaderImg'))
           reject()
         }
         if (!isLt5M) {
-          this.$message.error(this.$t('customerManage.uploaderSize'))
+          this.$message.error(this.$t('action.uploaderSize'))
           reject()
         }
         resolve()
@@ -1404,6 +1412,11 @@ export default {
     },
     qrCode(member_id){
       return 'http://m.wdklian.com/care/apk/care.user?type=USER_LOGIN&uid=' + member_id
+    },
+    getCloud() {
+      API_SystemConfig.cloud().then(r => {
+        this.isCloud = r
+      })
     }
   }
 }

+ 162 - 158
src/views/customer/components/elderlyCareManager.vue

@@ -19,11 +19,11 @@
             <!--        @rowDoubleClicked="getList"-->
             <div slot="toolbar" class="inner-toolbar">
                 <div class="toolbar-search">
-                    <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch"/>
+                    <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch"/>
                 </div>
                 <div class="toolbar-btns">
-                    <el-button type="primary" size="mini" :disabled="!isEmptyFrame" @click="handleAdd">登记注册</el-button>
-                    <el-button type="danger" size="mini" @click="batchDelete">批量删除</el-button>
+                    <el-button type="primary" size="mini" :disabled="!isEmptyFrame" @click="handleAdd">{{ this.$t('customerManage.customerAdd2') }}</el-button>
+                    <el-button type="danger" size="mini" @click="batchDelete">{{ this.$t('action.deleteList') }}</el-button>
                 </div>
             </div>
             <el-pagination
@@ -40,21 +40,21 @@
         </ag-grid-layout>
 
         <!-- 用户信息 -->
-        <el-dialog :visible.sync="customerFormVisible" title="用户信息" class="customer-dialog">
+        <el-dialog :visible.sync="customerFormVisible" :title="this.$t('customerManage.customerInfo')" class="customer-dialog">
             <el-tabs v-model="activeName" type="border-card" tab-position="bottom" width="50%" @tab-click="handleClick">
-                <el-tab-pane label="基本信息" name="customerBaseInfo">
+                <el-tab-pane :label="this.$t('customerManage.baseInfo')" name="customerBaseInfo">
                     <div style="height: 590px">
                         <el-form ref="editForm" :model="formmodel" :rules="rules" label-width="120px">
                             <el-row>
                                 <el-col :span="12">
-                                    <el-form-item label="用户姓名" prop="named">
-                                        <el-input v-model="formmodel.named" clearable placeholder="请输入姓名"
+                                    <el-form-item :label="this.$t('customerManage.named')" prop="named">
+                                        <el-input v-model="formmodel.named" clearable :placeholder="this.$t('customerManage.inputNamed')"
                                                   :maxlength="20"/>
                                     </el-form-item>
                                 </el-col>
                                 <el-col :span="12">
-                                    <el-form-item label="登记号">
-                                        <el-input v-model="formmodel.card_no" clearable placeholder="请输入登记号"
+                                    <el-form-item :label="this.$t('customerManage.cardNo2')">
+                                        <el-input v-model="formmodel.card_no" clearable :placeholder="this.$t('customerManage.inputCardNo2')"
                                                   :maxlength="20"/>
                                     </el-form-item>
                                 </el-col>
@@ -62,20 +62,20 @@
 
                             <el-row>
                                 <el-col :span="12">
-                                    <el-form-item label="性别" class="form-item-sex">
-                                        <el-radio v-model="formmodel.sex" :label="0"></el-radio>
-                                        <el-radio v-model="formmodel.sex" :label="1"></el-radio>
+                                    <el-form-item :label="this.$t('member.sex')" class="form-item-sex">
+                                        <el-radio v-model="formmodel.sex" :label="0">{{ this.$t('member.woman') }}</el-radio>
+                                        <el-radio v-model="formmodel.sex" :label="1">{{ this.$t('member.man') }}</el-radio>
                                         <!--                    <el-radio v-model="formmodel.sex" :label="2">未知</el-radio>-->
                                     </el-form-item>
                                 </el-col>
 
                                 <el-col :span="12">
-                                    <el-form-item label="年龄" prop="age">
-                                        <el-input v-model="formmodel.age" clearable :maxlength="4" placeholder="请输入年龄">
-                                            <el-select slot="append" v-model="formmodel.age_unit" placeholder="请选择年龄单位">
-                                                <el-option label="岁" value="岁"/>
-                                                <el-option label="月" value="月"/>
-                                                <el-option label="天" value="天"/>
+                                    <el-form-item :label="this.$t('customerManage.age')" prop="age">
+                                        <el-input v-model="formmodel.age" clearable :maxlength="4" :placeholder="this.$t('customerManage.inputAge')">
+                                            <el-select slot="append" v-model="formmodel.age_unit" :placeholder="this.$t('customerManage.choiceAgeUnit')">
+                                                <el-option :label="this.$t('customerManage.year')" value="岁"/>
+                                                <el-option :label="this.$t('customerManage.month')" value="月"/>
+                                                <el-option :label="this.$t('customerManage.day')" value="天"/>
                                             </el-select>
                                         </el-input>
                                     </el-form-item>
@@ -83,54 +83,54 @@
                             </el-row>
                             <el-row>
                                 <el-col :span="12">
-                                    <el-form-item label="手机号码" prop="mobile">
-                                        <el-input v-model="formmodel.mobile" clearable placeholder="请输入手机号码"
+                                    <el-form-item :label="this.$t('member.mobile')" prop="mobile">
+                                        <el-input v-model="formmodel.mobile" clearable :placeholder="this.$t('member.inputMobile')"
                                                   :maxlength="20"/>
                                     </el-form-item>
                                 </el-col>
                                 <el-col :span="12">
-                                    <el-form-item label="家庭住址" prop="address">
+                                    <el-form-item :label="this.$t('member.homeAddress')" prop="address">
                                         <el-input v-model="formmodel.address" clearable :maxlength="20"
-                                                  placeholder="请输入家庭住址"/>
+                                                  :placeholder="this.$t('member.inputHomeAddress')"/>
                                     </el-form-item>
                                 </el-col>
                                 <el-col :span="12">
-                                    <el-form-item label="生日" prop="birthday">
+                                    <el-form-item :label="this.$t('member.birthday')" prop="birthday">
                                         <el-date-picker
                                                 v-model="formmodel.birthday"
                                                 type="date"
                                                 :editable="false"
                                                 value-format="timestamp"
-                                                placeholder="选择日期"
+                                                :placeholder="this.$t('member.choiceBirthday')"
                                                 :picker-options="{disabledDate(time) { return time.getTime() > Date.now() }}"
                                                 @change="birthdayChange"
                                         />
                                     </el-form-item>
                                 </el-col>
                                 <el-col :span="12">
-                                    <el-form-item label="登记日期" prop="in_date">
+                                    <el-form-item :label="this.$t('customerManage.inDate')" prop="in_date">
                                         <el-date-picker
                                                 v-model="formmodel.in_date"
                                                 type="date"
                                                 :editable="false"
                                                 value-format="timestamp"
                                                 :default-value="new Date()"
-                                                placeholder="选择日期"
+                                                :placeholder="this.$t('customerManage.choiceDate')"
                                                 :picker-options="{disabledDate(time) { return time.getTime() > Date.now() }}"
                                         />
                                     </el-form-item>
                                 </el-col>
 
                                 <el-col :span="12">
-                                    <el-form-item label="证件类型">
-                                        <el-radio v-model="formmodel.id_type" label="身份证">身份证</el-radio>
-                                        <el-radio v-model="formmodel.id_type" label="护照">护照</el-radio>
-                                        <el-radio v-model="formmodel.id_type" label="军人证">军人证</el-radio>
+                                    <el-form-item :label="this.$t('customerManage.idType')">
+                                        <el-radio v-model="formmodel.id_type" label="身份证">{{ this.$t('customerManage.idCard') }}</el-radio>
+                                        <el-radio v-model="formmodel.id_type" label="护照">{{ this.$t('customerManage.passport') }}</el-radio>
+                                        <el-radio v-model="formmodel.id_type" label="军人证">{{ this.$t('customerManage.servicemanCard') }}</el-radio>
                                     </el-form-item>
                                 </el-col>
                                 <el-col :span="12">
-                                    <el-form-item label="证件号码">
-                                        <el-input v-model="formmodel.id_no" clearable placeholder="请输入证件号"
+                                    <el-form-item :label="this.$t('customerManage.idNo')">
+                                        <el-input v-model="formmodel.id_no" clearable :placeholder="this.$t('customerManage.inputIdNo')"
                                                   :maxlength="20"/>
                                     </el-form-item>
                                 </el-col>
@@ -140,34 +140,34 @@
                                 <el-col :span="16">
                                     <el-row>
                                         <el-col :span="12">
-                                            <el-form-item label="昵称" prop="nickname">
-                                                <el-input v-model="formmodel.nickname" clearable placeholder="请输入用户其他称呼"
+                                            <el-form-item :label="this.$t('customerManage.nickname')" prop="nickname">
+                                                <el-input v-model="formmodel.nickname" clearable :placeholder="this.$t('customerManage.inputNickname')"
                                                           :maxlength="20"/>
                                             </el-form-item>
                                         </el-col>
                                         <el-col :span="12">
-                                            <el-form-item label="登记位置" prop="frame_id">
+                                            <el-form-item :label="this.$t('customerManage.frame2')" prop="frame_id">
                                                 <el-select v-model="formmodel.frame_id" :disabled="bedSelectabled"
-                                                           placeholder="请选择床位">
+                                                           :placeholder="this.$t('customerManage.choiceFrame')">
                                                     <el-option v-for="(item,index) in emptyBeds" :key="index"
                                                                :label="item.full_name" :value="item.id"/>
                                                 </el-select>
                                             </el-form-item>
                                         </el-col>
                                     </el-row>
-                                    <el-form-item label="用户简介">
+                                    <el-form-item :label="this.$t('customerManage.illnessDesc')">
                                         <el-input
                                                 v-model="formmodel.illness_desc"
                                                 type="textarea"
                                                 :autosize="{ minRows: 2, maxRows: 4}"
                                                 :minlength="2"
                                                 :maxlength="50"
-                                                :placeholder="'请输入文本内容,长度2~50'"
+                                                :placeholder="this.$t('customerManage.inputIllnessDesc')"
                                         />
                                     </el-form-item>
                                 </el-col>
                                 <el-col :span="8">
-                                    <el-form-item label="头像">
+                                    <el-form-item :label="this.$t('member.face')">
                                         <el-upload
                                                 class="avatar-uploader"
                                                 :action="`${uploadServer}/ncs/upload/uploadFile?scene=avatar`"
@@ -184,8 +184,8 @@
 
                             <el-row>
                                 <el-col :span="8">
-                                    <el-form-item label="监护人">
-                                        <el-select v-model="formmodel.doctor_id" placeholder="请选择监护人" clearable
+                                    <el-form-item :label="this.$t('customerManage.doctor')">
+                                        <el-select v-model="formmodel.doctor_id" :placeholder="this.$t('customerManage.choiceDoctor')" clearable
                                                    @change="doctorChange(1)">
                                             <el-option v-for="(item,index) in doctors" :key="index"
                                                        :label="item.clerk_name" :value="item.clerk_id"/>
@@ -193,8 +193,8 @@
                                     </el-form-item>
                                 </el-col>
 <!--                                <el-col :span="8">-->
-<!--                                    <el-form-item label="责任护士">-->
-<!--                                        <el-select v-model="formmodel.nurse_id" placeholder="请选择护士" clearable-->
+<!--                                    <el-form-item :label="责任护士">-->
+<!--                                        <el-select v-model="formmodel.nurse_id" :placeholder="请选择护士" clearable-->
 <!--                                                   @change="doctorChange(2)">-->
 <!--                                            <el-option v-for="(item,index) in nurses" :key="index"-->
 <!--                                                       :label="item.clerk_name" :value="item.clerk_id"/>-->
@@ -202,8 +202,8 @@
 <!--                                    </el-form-item>-->
 <!--                                </el-col>-->
                                 <el-col :span="8">
-                                    <el-form-item label="责任护工">
-                                        <el-select v-model="formmodel.worker_id" placeholder="请选择护工" clearable
+                                    <el-form-item :label="this.$t('customerManage.worker')">
+                                        <el-select v-model="formmodel.worker_id" :placeholder="this.$t('customerManage.choiceWorker')" clearable
                                                    @change="doctorChange(3)">
                                             <el-option v-for="(item,index) in workers" :key="index"
                                                        :label="item.clerk_name" :value="item.clerk_id"/>
@@ -230,13 +230,13 @@
 
                             <el-form-item>
                                 <el-button type="primary" :disabled="isDisabled" class="save"
-                                           @click="handlerSubmit('editForm')">保存
+                                           @click="handlerSubmit('editForm')">{{ this.$t('action.save') }}
                                 </el-button>
                             </el-form-item>
                         </el-form>
                     </div>
                 </el-tab-pane>
-                <el-tab-pane v-if="formmodel.id" label="用户亲属" name="customerRelative">
+                <el-tab-pane v-if="formmodel.id" :label="this.$t('customerManage.customerRelative')" name="customerRelative">
                     <div style="height: 450px">
                         <!--            <customer-relative :member-id="memberId" />-->
                         <el-table
@@ -247,31 +247,31 @@
                         >
                             <el-table-column
                                     prop="true_name"
-                                    label="亲属姓名"
+                                    :label="this.$t('customerManage.customerRelativeTrueName')"
                                     width="180"
                             />
                             <el-table-column
                                     prop="sex"
-                                    label="性别"
+                                    :label="this.$t('member.sex')"
                                     width="180"
                                     :formatter="formatterSex"
                             />
                             <el-table-column
                                     prop="relative_name"
-                                    label="关系"
+                                    :label="this.$t('customerManage.relativeName')"
                                     width="180"
                             />
                             <el-table-column
                                     prop="mobile"
-                                    label="手机号码"
+                                    :label="this.$t('member.mobile')"
                             />
                             <el-table-column
-                                    label="操作"
+                                    :label="this.$t('action.handle')"
                                     width="100"
                             >
                                 <template slot-scope="scope">
                                     <el-button type="danger" size="mini"
-                                               @click="handlerDeleteRelative(scope.row.member_id)">删除
+                                               @click="handlerDeleteRelative(scope.row.member_id)">{{ deleted }}
                                     </el-button>
                                 </template>
                             </el-table-column>
@@ -281,35 +281,35 @@
                                  label-width="120px" style="margin-top:20px">
                             <el-row>
                                 <el-col :span="12">
-                                    <el-form-item label="姓名" prop="true_name">
-                                        <el-input v-model="relativeFormModel.true_name" clearable placeholder="请输入姓名"
+                                    <el-form-item :label="this.$t('customerManage.customerRelativeTrueName')" prop="true_name">
+                                        <el-input v-model="relativeFormModel.true_name" clearable :placeholder="请输入姓名"
                                                   :maxlength="20"/>
                                     </el-form-item>
                                 </el-col>
                                 <el-col :span="12">
-                                    <el-form-item label="亲属关系" prop="relative_name">
+                                    <el-form-item :label="this.$t('customerManage.relativeName')" prop="relative_name">
                                         <el-input v-model="relativeFormModel.relative_name" clearable
-                                                  placeholder="请输入亲属关系 如:朋友" :maxlength="20"/>
+                                                  :placeholder="this.$t('customerManage.inputRelativeName')" :maxlength="20"/>
                                     </el-form-item>
                                 </el-col>
                             </el-row>
                             <el-row>
                                 <el-col :span="12">
-                                    <el-form-item label="性别" class="form-item-sex">
-                                        <el-radio v-model="relativeFormModel.sex" :label="0"></el-radio>
-                                        <el-radio v-model="relativeFormModel.sex" :label="1"></el-radio>
+                                    <el-form-item :label="this.$t('member.sex')" class="form-item-sex">
+                                        <el-radio v-model="relativeFormModel.sex" :label="0">{{ this.$t('member.woman') }}</el-radio>
+                                        <el-radio v-model="relativeFormModel.sex" :label="1">{{ this.$t('member.man') }}</el-radio>
                                         <!--                    <el-radio v-model="relativeFormModel.sex" :label="2">未知</el-radio>-->
                                     </el-form-item>
                                 </el-col>
                                 <el-col :span="12">
-                                    <el-form-item label="手机号码" prop="mobile">
-                                        <el-input v-model="relativeFormModel.mobile" clearable placeholder="请输入手机号码"
+                                    <el-form-item :label="this.$t('member.mobile')" prop="mobile">
+                                        <el-input v-model="relativeFormModel.mobile" clearable :placeholder="this.$t('member.inputMobile')"
                                                   :maxlength="20"/>
                                     </el-form-item>
                                 </el-col>
                             </el-row>
                             <el-form-item>
-                                <el-button type="primary" @click="addRelative">添加</el-button>
+                                <el-button type="primary" @click="addRelative">{{ this.$t('action.add') }}</el-button>
                             </el-form-item>
                         </el-form>
 
@@ -317,16 +317,16 @@
 
                 </el-tab-pane>
 
-                <el-tab-pane v-if="formmodel.id" label="体征" name="customer-vital-sign">
+                <el-tab-pane v-if="formmodel.id" :label="this.$t('customerManage.vital')" name="customer-vital-sign">
                     <vital-sign-log :member-id="formmodel.id+''" :active-name="'vital_signs1'"/>
                 </el-tab-pane>
 
-                <el-tab-pane v-if="formmodel.id" label="备注" name="customerRemark">
+                <el-tab-pane v-if="formmodel.id" :label="this.$t('customerManage.remark')" name="customerRemark">
                     <div style="height: 450px;display: flex;flex-direction: column;">
                         <div style="height: 350px;overflow-y: auto;box-sizing:border-box;box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);margin:5px -10px">
                             <el-card v-for="(item, index) in remarks" :key="index" style="margin-bottom: 10px">
                                 <div>
-                                    <span style="margin-left: 20px;font-weight:bold">备注内容:</span><span
+                                    <span style="margin-left: 20px;font-weight:bold">{{ customerRemarks }}</span><span
                                         style="line-height:1.5">{{ item.content }}</span>
                                 </div>
                                 <div style="margin: 10px">
@@ -338,9 +338,9 @@
                                     </div>
                                     <div style="float: right">
                                         <p>
-                                            <span style="font-weight:bold">时间:</span>{{ item.create_time |
+                                            <span style="font-weight:bold">{{ customerRemarkTime }}</span>{{ item.create_time |
                                             unixDateFilter }}
-                                            <span style="font-weight:bold;margin-left: 10px;">备注人:</span>{{
+                                            <span style="font-weight:bold;margin-left: 10px;">{{ customerRemarkName }}</span>{{
                                             item.create_name }}
                                         </p>
                                     </div>
@@ -354,7 +354,7 @@
                                      style="margin-right: 10px">
                                 <el-row>
                                     <el-col :span="16">
-                                        <el-form-item label="内容" prop="content">
+                                        <el-form-item :label="this.$t('action.content')" prop="content">
                                             <el-input
                                                     v-model="remarkFormModel.content"
                                                     type="textarea"
@@ -362,12 +362,12 @@
                                                     :minlength="2"
                                                     :maxlength="300"
                                                     show-word-limit
-                                                    :placeholder="'请输入文本内容,长度300'"
+                                                    :placeholder="this.$t('action.inputContent')"
                                             />
                                         </el-form-item>
                                     </el-col>
                                     <el-col :span="8">
-                                        <el-form-item label="附件" style="margin-bottom: 0">
+                                        <el-form-item :label="this.$t('action.uploader')" style="margin-bottom: 0">
                                             <el-upload
                                                     v-if="!attachFilePath"
                                                     class="attach-uploader"
@@ -383,7 +383,7 @@
                                     </el-col>
                                 </el-row>
                                 <el-form-item>
-                                    <el-button type="primary" @click="addRemark">添加备注</el-button>
+                                    <el-button type="primary" @click="addRemark">{{ this.$t('customerManage.addRemark') }}</el-button>
                                 </el-form-item>
                             </el-form>
                         </div>
@@ -394,18 +394,18 @@
         </el-dialog>
         <!-- 用户信息 -->
         <!-- 用户换床-->
-        <el-dialog :visible.sync="changeBedFormVisible" title="用户换床">
+        <el-dialog :visible.sync="changeBedFormVisible" :title="this.$t('customerManage.changeBed')">
             <el-form ref="changeBedForm" :model="changeBedFormModel" :rules="changeBedRules" label-width="120px">
                 <el-row>
                     <el-col :span="12">
-                        <el-form-item label="用户姓名" prop="named">
-                            <el-input v-model="changeBedFormModel.named" clearable placeholder="请输入姓名" readonly
+                        <el-form-item :label="this.$t('customerManage.named')" prop="named">
+                            <el-input v-model="changeBedFormModel.named" clearable :placeholder="this.$t('customerManage.inputNamed')" readonly
                                       :maxlength="20"/>
                         </el-form-item>
                     </el-col>
                     <el-col :span="12">
-                        <el-form-item label="登记号">
-                            <el-input v-model="changeBedFormModel.card_no" clearable placeholder="请输入登记号" readonly
+                        <el-form-item :label="this.$t('customerManage.cardNo2')">
+                            <el-input v-model="changeBedFormModel.card_no" clearable :placeholder="this.$t('customerManage.inputCardNo2')" readonly
                                       :maxlength="20"/>
                         </el-form-item>
                     </el-col>
@@ -413,22 +413,22 @@
 
                 <el-row>
                     <el-col :span="12">
-                        <el-form-item label="性别" class="form-item-sex">
-                            <el-radio v-model="changeBedFormModel.sex" :label="0" disabled></el-radio>
-                            <el-radio v-model="changeBedFormModel.sex" :label="1" disabled></el-radio>
+                        <el-form-item :label="this.$t('member.sex')" class="form-item-sex">
+                            <el-radio v-model="changeBedFormModel.sex" :label="0" disabled>{{ this.$t('member.woman') }}</el-radio>
+                            <el-radio v-model="changeBedFormModel.sex" :label="1" disabled>{{ this.$t('member.man') }}</el-radio>
                             <!--              <el-radio v-model="changeBedFormModel.sex" :label="2" disabled>未知</el-radio>-->
                         </el-form-item>
                     </el-col>
 
                     <el-col :span="12">
-                        <el-form-item label="年龄" prop="age">
+                        <el-form-item :label="this.$t('customerManage.age')" prop="age">
                             <el-input v-model="changeBedFormModel.age" clearable :maxlength="4" readonly
-                                      placeholder="请输入年龄">
+                                      :placeholder="this.$t('customerManage.inputAge')">
                                 <el-select slot="append" v-model="changeBedFormModel.age_unit" disabled
-                                           placeholder="请选择年龄单位">
-                                    <el-option label="岁" value="岁"/>
-                                    <el-option label="月" value="月"/>
-                                    <el-option label="天" value="年"/>
+                                           :placeholder="this.$t('customerManage.choiceAgeUnit')">
+                                    <el-option :label="this.$t('customerManage.year')" value="岁"/>
+                                    <el-option :label="this.$t('customerManage.month')" value="月"/>
+                                    <el-option :label="this.$t('customerManage.day')" value="年"/>
                                 </el-select>
                             </el-input>
                         </el-form-item>
@@ -437,13 +437,13 @@
                 </el-row>
                 <el-row>
                     <el-col :span="12">
-                        <el-form-item label="登记位置" prop="nickname">
+                        <el-form-item :label="this.$t('customerManage.frame2')" prop="nickname">
                             <el-input v-model="changeBedFormModel.current_bed" clearable readonly :maxlength="20"/>
                         </el-form-item>
                     </el-col>
                     <el-col :span="12">
-                        <el-form-item label="换到位置" prop="frame_id">
-                            <el-select v-model="changeBedFormModel.frame_id" clearable filterable placeholder="请选择登记位置">
+                        <el-form-item :label="this.$t('customerManage.newBed')" prop="frame_id">
+                            <el-select v-model="changeBedFormModel.frame_id" clearable filterable :placeholder="this.$t('customerManage.choiceNewBed')">
                                 <el-option v-for="(item,index) in emptyBeds" :key="index" :label="item.full_name"
                                            :value="item.id"/>
                             </el-select>
@@ -453,7 +453,7 @@
                 </el-row>
 
                 <el-form-item>
-                    <el-button type="primary" class="save" @click="handleChangeBedSubmit('changeBedForm')">确定
+                    <el-button type="primary" class="save" @click="handleChangeBedSubmit('changeBedForm')">{{ this.$t('action.yes') }}
                     </el-button>
                 </el-form-item>
             </el-form>
@@ -542,7 +542,7 @@
                     content: ''
                 },
                 remarkRules: {
-                    content: [{required: true, message: '请输入备注内容', trigger: 'blur'}]
+                    content: [{required: true, message: this.$t('customerManage.inputRemarks'), trigger: 'blur'}]
                 },
                 attachFilePath: null,
                 /** 亲属表单 **/
@@ -561,8 +561,8 @@
                     fixedCondition: Object.keys(this.frame).length === 0 ? 'part_id=' + this.$store.getters.partId : 'part_id=' + this.$store.getters.partId + ' and relative_id =' + this.formmodel.member_id
                 },
                 relativeRules: {
-                    true_name: [{required: true, message: '请输入姓名', trigger: 'blur'}],
-                    relative_name: [{required: true, message: '请输入亲属关系', trigger: 'blur'}],
+                    true_name: [{required: true, message: this.$t('customerManage.inputRemarks'), trigger: 'blur'}],
+                    relative_name: [{required: true, message: this.$t('customerManage.inputRelativeName'), trigger: 'blur'}],
                     mobile: [
                         {
                             validator: (rule, value, callback) => {
@@ -570,7 +570,7 @@
                                     callback()
                                 }
                                 if (!RegExp.mobile.test(value)) {
-                                    callback(new Error('手机格式有误!'))
+                                    callback(new Error(this.$t('member.mobileInputMsg')))
                                 } else {
                                     callback()
                                 }
@@ -582,7 +582,7 @@
                 changeBedFormVisible: false,
                 changeBedFormModel: {},
                 changeBedRules: {
-                    frame_id: [{required: true, message: '请选择床位!', trigger: 'blur'}]
+                    frame_id: [{required: true, message: this.$t('customerManage.choiceFrame'), trigger: 'blur'}]
                 },
                 /** 空床位 **/
                 emptyBeds: [],
@@ -590,17 +590,17 @@
                 isEmptyFrame: true,
                 rules: {
                     named: [
-                        this.MixinRequired('请输入用户姓名!')
+                        this.MixinRequired(this.$t('customerManage.inputNamed'))
                     ],
                     age: [
-                        {required: true, message: '请输入年龄', trigger: 'blur'}
+                        {required: true, message: this.$t('customerManage.inputAge'), trigger: 'blur'}
                     ],
                     mobile: [
-                        this.MixinRequired('请输入手机号!'),
+                        this.MixinRequired(this.$t('member.inputMobile')),
                         {
                             validator: (rule, value, callback) => {
                                 if (!RegExp.mobile.test(value)) {
-                                    callback(new Error('手机格式有误!'))
+                                    callback(new Error(this.$t('member.mobileInputMsg')))
                                 } else {
                                     callback()
                                 }
@@ -608,7 +608,7 @@
                         }
                     ],
                     frame_id: [
-                        {required: Object.keys(this.frame).length === 0, message: '请选床位!', trigger: 'blur'} // 没有传入frame 属性,必须选择床位
+                        {required: Object.keys(this.frame).length === 0, message: this.$t('customerManage.choiceFrame'), trigger: 'blur'} // 没有传入frame 属性,必须选择床位
                     ]
                 },
                 doctors: [],
@@ -617,13 +617,17 @@
                 nurseData: [],
                 nurseconfigSelection: [],
                 sexTransfer: [
-                    {key: '男', value: 1, color: 'green'},
-                    {key: '女', value: 0, color: 'red'}
+                    {key: this.$t('member.man'), value: 1, color: 'green'},
+                    {key: this.$t('member.woman'), value: 0, color: 'red'}
                 ],
                 customerStatusTransfer: [
-                    {key: '入住中', value: 0, color: 'green'},
-                    {key: '已离开', value: 1, color: 'red'}
-                ]
+                    {key: this.$t('customerManage.customerStatusTrue'), value: 0, color: 'green'},
+                    {key: this.$t('customerManage.customerStatusFalse'), value: 1, color: 'red'}
+                ],
+                customerRemarks: this.$t('customerManage.remarks'),
+                customerRemarkTime: this.$t('customerManage.remarkTime'),
+                customerRemarkName: this.$t('customerManage.remarkName'),
+                deleted: this.$t('action.delete')
             }
         },
         computed: {
@@ -656,10 +660,10 @@
                     valueGetter: this.hashValueGetter
                 },
                 {headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 100},
-                {headerName: '用户姓名', field: 'named', sortable: true, filter: 'agTextColumnFilter', width: 160},
-                {headerName: '昵称', field: 'nickname', sortable: true, filter: 'agTextColumnFilter', width: 130},
+                {headerName: this.$t('customerManage.named'), field: 'named', sortable: true, filter: 'agTextColumnFilter', width: 160},
+                {headerName:  this.$t('customerManage.nickname'), field: 'nickname', sortable: true, filter: 'agTextColumnFilter', width: 130},
                 {
-                    headerName: '当前状态', field: 'status', sortable: true, filterFramework: 'RadioFilter', width: 130,
+                    headerName: this.$t('customerManage.customerStatus'), field: 'status', sortable: true, filterFramework: 'RadioFilter', width: 130,
                     filterParams: {
                         listData: this.customerStatusTransfer
                     },
@@ -669,7 +673,7 @@
                 // lockPinned = true 不能拖动然后固定
                 // resizeable 单元个大小是否可以调整
                 {
-                    headerName: '性别', field: 'sex', sortable: true, filterFramework: 'RadioFilter', width: 130,
+                    headerName: this.$t('member.sex'), field: 'sex', sortable: true, filterFramework: 'RadioFilter', width: 130,
                     filterParams: {
                         listData: this.sexTransfer
                     },
@@ -677,7 +681,7 @@
                 },
 
                 {
-                    headerName: '生日',
+                    headerName: this.$t('member.birthday'),
                     field: 'birthday',
                     sortable: true,
                     filter: 'agDateColumnFilter',
@@ -690,20 +694,20 @@
                     }
                 },
                 {
-                    headerName: '年龄', field: 'age', sortable: true, filter: 'agNumberColumnFilter', width: 130
+                    headerName: this.$t('customerManage.age'), field: 'age', sortable: true, filter: 'agNumberColumnFilter', width: 130
                 },
                 {
-                    headerName: '年龄单位', field: 'age_unit', sortable: true, filter: 'agTextColumnFilter', width: 130
+                    headerName: this.$t('customerManage.ageUnit'), field: 'age_unit', sortable: true, filter: 'agTextColumnFilter', width: 130
                 },
-                {headerName: '入住编号', field: 'card_no', sortable: true, filter: 'agTextColumnFilter'},
-                {headerName: '身份证件类型', field: 'id_type', sortable: true, filter: 'agTextColumnFilter'},
-                {headerName: '证件号码', field: 'id_no', sortable: true, filter: 'agNumberColumnFilter', width: 160},
-                {headerName: '入住床位', field: 'full_name', sortable: true, filter: 'agTextColumnFilter'},
-                {headerName: '手机号码', field: 'mobile', sortable: true, filter: 'agTextColumnFilter'},
-                {headerName: '家庭住址', field: 'address', sortable: true, filter: 'agTextColumnFilter', width: 260},
+                {headerName: this.$t('customerManage.cardNo'), field: 'card_no', sortable: true, filter: 'agTextColumnFilter'},
+                {headerName: this.$t('customerManage.idType'), field: 'id_type', sortable: true, filter: 'agTextColumnFilter'},
+                {headerName: this.$t('customerManage.idNo'), field: 'id_no', sortable: true, filter: 'agNumberColumnFilter', width: 160},
+                {headerName: this.$t('customerManage.frame'), field: 'full_name', sortable: true, filter: 'agTextColumnFilter'},
+                {headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: 'agTextColumnFilter'},
+                {headerName: this.$t('member.homeAddress'), field: 'address', sortable: true, filter: 'agTextColumnFilter', width: 260},
 
                 {
-                    headerName: '入住时间',
+                    headerName: this.$t('customerManage.inDate'),
                     field: 'in_date',
                     sortable: true,
                     filter: 'agDateColumnFilter',
@@ -716,7 +720,7 @@
                     }
                 },
                 {
-                    headerName: '离开时间',
+                    headerName: this.$t('customerManage.outDate'),
                     field: 'out_date',
                     sortable: true,
                     filter: 'agDateColumnFilter',
@@ -729,11 +733,11 @@
                     }
                 },
                 {
-                    headerName: '编辑', field: 'id',
+                    headerName: this.$t('action.edit'), field: 'id',
                     cellRendererFramework: 'ButtonCellRender',
                     cellRendererParams: {
                         onClick: this.handleEdit,
-                        label: '编辑',
+                        label: this.$t('action.edit'),
                         buttonType: 'primary',
                         buttonSize: 'mini'
                     },
@@ -745,12 +749,12 @@
                     sortable: false
                 },
                 {
-                    headerName: '注销登记', field: 'id',
+                    headerName: this.$t('customerManage.outBed2'), field: 'id',
                     cellRendererFramework: 'ButtonCellRender',
                     cellRendererParams: param => {
                         return {
                             onClick: this.handleOut,
-                            label: '注销',
+                            label: this.$t('customerManage.outBed3'),
                             buttonType: 'warning',
                             buttonSize: 'mini',
                             disabled: param.data['status'] !== 0
@@ -764,12 +768,12 @@
                     sortable: false
                 },
                 {
-                    headerName: '更换位置', field: 'id',
+                    headerName: this.$t('customerManage.changeBed2'), field: 'id',
                     cellRendererFramework: 'ButtonCellRender',
                     cellRendererParams: param => {
                         return {
                             onClick: this.handleChangeBed,
-                            label: '更换',
+                            label: this.$t('customerManage.changeBed3'),
                             buttonType: 'success',
                             buttonSize: 'mini',
                             disabled: param.data['status'] !== 0
@@ -783,12 +787,12 @@
                     sortable: false
                 },
                 {
-                    headerName: '删除', field: 'shop_id',
+                    headerName: this.$t('action.delete'), field: 'shop_id',
                     cellRendererFramework: 'ButtonCellRender',
                     cellRendererParams: param => {
                         return {
                             onClick: this.deleteSingle,
-                            label: '删除',
+                            label: this.$t('action.delete'),
                             buttonType: 'danger',
                             buttonSize: 'mini',
                             disabled: param.data['member_name'] === 'superadmin'
@@ -861,7 +865,7 @@
                         this.emptyBeds = [...res]
                         resolve()
                     }).catch(err => {
-                        this.$message.error('获取空床位:' + err.message)
+                        this.$message.error(this.$t('customerManage.getEmptyBed') + err.message)
                         reject()
                     })
                 })
@@ -1063,10 +1067,10 @@
                 const isImg = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif'
                 const isLt2M = file.size / 1024 / 1024 < 2
                 if (!isImg) {
-                    this.$message.error('上传头像图片只能是 JPG、PNG、GIF 格式!')
+                    this.$message.error(this.$t('member.faceImg'))
                 }
                 if (!isLt2M) {
-                    this.$message.error('上传头像图片大小不能超过 2MB!')
+                    this.$message.error(this.$t('member.faceSize'))
                 }
                 return isImg && isLt2M
             },
@@ -1091,7 +1095,7 @@
                         this.formmodel.list = list
                         if (!this.formmodel.id) {
                             API_Customer.addAll(this.formmodel).then(res => {
-                                this.$message.success('添加成功!')
+                                this.$message.success(this.$t('action.addSuccess'))
                                 this.customerFormVisible = false
                                 this.isDisabled = false
                                 this.getList()
@@ -1102,7 +1106,7 @@
                             })
                         } else {
                             API_Customer.updateAll(this.formmodel).then(res => {
-                                this.$message.success('修改成功!')
+                                this.$message.success(this.$t('action.editSuccess'))
                                 this.customerFormVisible = false
                                 this.getList()
                                 this.isDisabled = false
@@ -1113,7 +1117,7 @@
                             })
                         }
                     } else {
-                        this.$message.error('表单填写有误,请检查!')
+                        this.$message.error(this.$t('action.fromError'))
                         return false
                     }
                 })
@@ -1125,10 +1129,10 @@
             },
             /** 单条数据删除处理 */
             handlerDelete(ids) {
-                const test = '你确定要删除此用户信息?'
-                this.$confirm(test, '警告', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
+                const test = this.$t('member.deleteMember')
+                this.$confirm(test, this.$t('action.waring'), {
+                    confirmButtonText: this.$t('action.yes'),
+                    cancelButtonText: this.$t('action.cancel'),
                     type: 'warning'
                 }).then(() => {
                     API_Customer.remove(ids).then(
@@ -1143,7 +1147,7 @@
                         })
                     })
                 }).catch(() => {
-                    this.$message.info('取消删除!')
+                    this.$message.info(this.$t('action.cancelDelete'))
                 })
             },
 
@@ -1185,18 +1189,18 @@
                     ...row,
                     status: 1
                 }
-                this.$confirm('确定退床吗?', '警告', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
+                this.$confirm(this.$t('customerManage.sureOutBed'), this.$t('action.waring'), {
+                    confirmButtonText: this.$t('action.yes'),
+                    cancelButtonText: this.$t('action.cancel'),
                     type: 'warning'
                 }).then(() => {
                     API_Customer.updateAll(this.formmodel).then(res => {
-                        this.$message.success('退床成功!')
+                        this.$message.success(this.$t('customerManage.outBedSuccess'))
                         this.getList()
                         this.infoChanged()
                     })
                 }).catch(err => {
-                    this.$message.info('取消操作!')
+                    this.$message.info(this.$t('action.cancelHandle'))
                 })
             },
             /** 换床 **/
@@ -1213,13 +1217,13 @@
                 this.$refs[formName].validate(valid => {
                     if (valid) {
                         API_Customer.updateAll(this.changeBedFormModel).then(res => {
-                            this.$message.success('换床成功!')
+                            this.$message.success(this.$t('customerManage.changeBedSuccess'))
                             this.getList()
                             this.infoChanged()
                             this.changeBedFormVisible = false
                         })
                     } else {
-                        this.$message.error('表单填写有误,请检查!')
+                        this.$message.error(this.$t('action.fromError'))
                         return false
                     }
                 })
@@ -1248,13 +1252,13 @@
                         }
 
                         API_Remark.save(data).then(res => {
-                            this.$message.success('添加成功!')
+                            this.$message.success(this.$t('action.addSuccess'))
                             this.remarkFormModel = {}
                             this.attachFilePath = null
                             this.getRemarks()
                         })
                     } else {
-                        this.$message.error('表单填写有误,请检查!')
+                        this.$message.error(this.$t('action.fromError'))
                         return false
                     }
                 })
@@ -1274,11 +1278,11 @@
                     const isImg = extension === 'jpeg' || extension === 'png' || extension === 'jpg' || extension === 'txt' || extension === 'doc' || extension === 'docx' || extension === 'xls' || extension === 'xlsx'
                     const isLt5M = file.size / 1024 / 1024 < 5
                     if (!isImg) {
-                        this.$message.error('上传附件只能是txt,doc,docx,xls,xlsx,jpg,png,jpeg格式!')
+                        this.$message.error(this.$t('action.uploaderImg'))
                         reject()
                     }
                     if (!isLt5M) {
-                        this.$message.error('上传附件大小不能超过 5MB!')
+                        this.$message.error(this.$t('action.uploaderSize'))
                         reject()
                     }
                     resolve()
@@ -1312,10 +1316,10 @@
             },
             /** 单条数据删除处理 */
             handlerDeleteRelative(ids) {
-                const test = '你确定要删除此病人亲属信息?'
-                this.$confirm(test, '警告', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
+                const test = this.$t('customerManage.sureDeleteRelative')
+                this.$confirm(test, this.$t('action.waring'), {
+                    confirmButtonText: this.$t('action.yes'),
+                    cancelButtonText: this.$t('action.cancel'),
                     type: 'warning'
                 }).then(() => {
                     API_User.remove(ids).then(
@@ -1332,11 +1336,11 @@
             },
             formatterSex(row, column, cellValue) {
                 if (row.sex === 1) {
-                    return '男'
+                    return this.$t('member.man')
                 } else if (row.sex === 0) {
-                    return '女'
+                    return this.$t('member.woman')
                 } else {
-                    return '未知'
+                    return this.$t('member.unknown')
                 }
             },
             /** 信息变化后操作,如床位状态改变,传入的空间结构变化了 **/
@@ -1438,7 +1442,7 @@
             batchDelete: function () {
                 const rows = this.gridApi.getSelectedRows()
                 if (rows.length === 0) {
-                    this.$message({type: 'info', message: '请先勾选需要删除的数据'})
+                    this.$message({type: 'info', message: this.$t('member.pleaseChoiceDelete')})
                     return
                 }
                 const ids = []

+ 14 - 11
src/views/customer/components/patientManager.vue

@@ -229,12 +229,12 @@
                                 <el-col v-for="(item, index) in nurseconfigSelection" :key="index" :span="8">
                                     <el-form-item :label="item.config.config_name">
                                         <el-select :ref="'patient_nurse_'+item.config.id" v-model="item.selected_id"
-                                                   :placeholder="this.$t('action.choice')+item.config.config_name" clearable
+                                                   :placeholder="choice + item.config.config_name" clearable
                                                    @change="(val)=>{changeNurseData(val,item.config.id,index)}">
                                             <el-option v-for="(t,i) in item.options" :key="i" :label="t.option_name"
                                                        :value="t.id">
                                                 <span style="float: left">{{ t.option_name }}</span>
-                                                <span :style="'float: right; background-color: #'+t.color_rgb+';color: #'+t.color_rgb">{{ this.$t('action.colour') }}</span>
+                                                <span :style="'float: right; background-color: #'+t.color_rgb+';color: #'+t.color_rgb">{{ colour }}</span>
                                             </el-option>
                                         </el-select>
                                     </el-form-item>
@@ -296,7 +296,7 @@
                             >
                                 <template slot-scope="scope">
                                     <el-button type="danger" size="mini"
-                                               @click="handlerDeleteRelative(scope.row.member_id)">{{ this.$t('action.delete') }}
+                                               @click="handlerDeleteRelative(scope.row.member_id)">{{ deleted }}
                                     </el-button>
                                 </template>
                             </el-table-column>
@@ -322,7 +322,7 @@
                                 <el-col :span="12">
                                     <el-form-item :label="this.$t('member.sex')" class="form-item-sex">
                                         <el-radio v-model="relativeFormModel.sex" :label="0">{{ this.$t('member.woman') }}</el-radio>
-                                        <el-radio v-model="relativeFormModel.sex" :label="1">{{ this.$t('member.man') }</el-radio>
+                                        <el-radio v-model="relativeFormModel.sex" :label="1">{{ this.$t('member.man') }}</el-radio>
                                         <!--                    <el-radio v-model="relativeFormModel.sex" :label="2">未知</el-radio>-->
                                     </el-form-item>
                                 </el-col>
@@ -379,7 +379,7 @@
                                      style="margin-right: 10px">
                                 <el-row>
                                     <el-col :span="16">
-                                        <el-form-item :label="this.$t('customerManage.content')" prop="content">
+                                        <el-form-item :label="this.$t('action.content')" prop="content">
                                             <el-input
                                                     v-model="remarkFormModel.content"
                                                     type="textarea"
@@ -387,12 +387,12 @@
                                                     :minlength="2"
                                                     :maxlength="300"
                                                     show-word-limit
-                                                    :placeholder="this.$t('customerManage.inputContent')"
+                                                    :placeholder="this.$t('action.inputContent')"
                                             />
                                         </el-form-item>
                                     </el-col>
                                     <el-col :span="8">
-                                        <el-form-item :label="this.$t('customerManage.uploader')" style="margin-bottom: 0">
+                                        <el-form-item :label="this.$t('action.uploader')" style="margin-bottom: 0">
                                             <el-upload
                                                     v-if="!attachFilePath"
                                                     class="attach-uploader"
@@ -654,7 +654,10 @@
                 customerStatusTransfer: [
                     {key: this.$t('customerManage.customerStatusTrue'), value: 0, color: 'green'},
                     {key: this.$t('customerManage.customerStatusFalse'), value: 1, color: 'red'}
-                ]
+                ],
+                choice: this.$t('action.choice'),
+                colour: this.$t('action.colour'),
+                deleted: this.$t('action.delete')
             }
         },
         computed: {
@@ -746,7 +749,7 @@
                 {headerName: this.$t('customerManage.idNo'), field: 'id_no', sortable: true, filter: 'agNumberColumnFilter', width: 160},
                 {headerName: this.$t('customerManage.frame'), field: 'full_name', sortable: true, filter: 'agTextColumnFilter'},
                 {headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: 'agTextColumnFilter'},
-                {headerName: this.$t('customerManage.homeAddress'), field: 'address', sortable: true, filter: 'agTextColumnFilter', width: 260},
+                {headerName: this.$t('member.homeAddress'), field: 'address', sortable: true, filter: 'agTextColumnFilter', width: 260},
 
                 {
                     headerName: this.$t('customerManage.inDate'),
@@ -1320,11 +1323,11 @@
                     const isImg = extension === 'jpeg' || extension === 'png' || extension === 'jpg' || extension === 'txt' || extension === 'doc' || extension === 'docx' || extension === 'xls' || extension === 'xlsx'
                     const isLt5M = file.size / 1024 / 1024 < 5
                     if (!isImg) {
-                        this.$message.error(this.$t('customerManage.uploaderImg'))
+                        this.$message.error(this.$t('action.uploaderImg'))
                         reject()
                     }
                     if (!isLt5M) {
-                        this.$message.error(this.$t('customerManage.uploaderSize'))
+                        this.$message.error(this.$t('action.uploaderSize'))
                         reject()
                     }
                     resolve()

+ 2 - 2
src/views/customer/customerEdit.vue

@@ -439,13 +439,13 @@ export default {
           } else {
             this.formmodel.list = this.nurseConfigDtos
             customer_API.updateAll(this.formmodel).then(res => {
-              this.$message.success('修改成功!')
+              this.$message.success(this.$t('action.editSuccess'))
               this.isDisabled = false
               this.$emit('saved')
             })
           }
         } else {
-          this.$message.error('表单填写有误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
           return false
         }
       })

+ 4 - 4
src/views/customer/customer_relative.vue

@@ -12,7 +12,7 @@
       <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search @search="handlerSearch" placeholder="请输入搜索关键字"/>
+          <en-table-search @search="handlerSearch" :placeholder="this.$t('action.keywords')"/>
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" @click="handleAdd">添加亲属</el-button>
@@ -194,9 +194,9 @@
       handlerDelete(ids) {
         let test = '你确定要删除此用户亲属信息?'
         let _this = this
-        this.$confirm(test, '警告', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
+        this.$confirm(test, this.$t('action.waring'), {
+          confirmButtonText: this.$t('action.yes'),
+          cancelButtonText: this.$t('action.cancel'),
           type: 'warning'
         }).then(() => {
           API_user.remove(ids).then(

+ 7 - 7
src/views/customer/list.vue

@@ -174,7 +174,7 @@
           cellRendererParams: param => {
             return {
               onClick: this.handleAdd,
-              label: '编辑',
+              label: this.$t('action.edit'),
               buttonType: 'primary',
               buttonSize: 'mini'
             }
@@ -282,9 +282,9 @@
       handlerDelete(ids) {
         let test = '你确定要删除此用户信息?'
         let _this = this
-        this.$confirm(test, '警告', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
+        this.$confirm(test, this.$t('action.waring'), {
+          confirmButtonText: this.$t('action.yes'),
+          cancelButtonText: this.$t('action.cancel'),
           type: 'warning'
         }).then(() => {
           API_customer.remove(ids).then(
@@ -329,9 +329,9 @@
       cy(row) {
         this.customerId = row.id
         let _this = this
-        this.$confirm('你确定要进行出院操作吗', '警告', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
+        this.$confirm('你确定要进行出院操作吗', this.$t('action.waring'), {
+          confirmButtonText: this.$t('action.yes'),
+          cancelButtonText: this.$t('action.cancel'),
           type: 'warning'
         }).then(() => {
           const data = {

+ 1 - 1
src/views/dashboard/calling-admin/components/AppVersionManager.vue

@@ -105,7 +105,7 @@ export default {
           this.formmodel.ver_devicetype = this.deviceType
           API_Device.setAPPVersion(this.formmodel).then(res => {
             this.formmodel = { ...res }
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
           }).catch(response => {
             this.$message.error(response.message)
           })

+ 1 - 1
src/views/dashboard/calling-admin/components/partInfoEdit.vue

@@ -324,7 +324,7 @@ export default {
             this.formmodel.part_night_start = this.nightStart.toLocaleTimeString('chinese', { hour12: false })
           }
           API_Part.update(this.formmodel.id, this.formmodel).then(res => {
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
           }).catch(err => {
             this.$message.error(err.message)
           })

+ 9 - 9
src/views/dashboard/calling-admin/components/partUserManager.vue

@@ -13,7 +13,7 @@
       <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" @click="handlerAdd">新增账号</el-button>
@@ -177,9 +177,9 @@ export default {
     /** 删除单条数据 */
 
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_UserInfo.remove(ids).then(
@@ -187,7 +187,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -199,7 +199,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -207,7 +207,7 @@ export default {
     batchDelete: function() {
       if (this.multipleSelection.length === 0) {
         this.$alert('没有选择任何记录!', '系统提示', {
-          confirmButtonText: '确定',
+          confirmButtonText: this.$t('action.yes'),
           callback: action => {
           }
         })
@@ -256,7 +256,7 @@ export default {
             this.formmodel.partid = this.partId
             API_UserInfo.add(this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.getList()
             }).catch(response => {
               this.formshow = false
@@ -267,7 +267,7 @@ export default {
             /** 修改 */
             API_UserInfo.update(this.formmodel.id, this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('修改成功!')
+              this.$message.success(this.$t('action.editSuccess'))
               this.getList()
             }).catch(response => {
               this.formshow = false

+ 8 - 8
src/views/dashboard/calling-admin/index.vue

@@ -13,7 +13,7 @@
       <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" @click="handlerAdd">新建科室</el-button>
@@ -240,9 +240,9 @@ export default {
       this.multipleSelection = val
     },
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Part.remove(ids).then(
@@ -250,7 +250,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -262,7 +262,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -270,7 +270,7 @@ export default {
     batchDelete: function() {
       if (this.multipleSelection.length === 0) {
         this.$alert('没有选择任何记录!', '系统提示', {
-          confirmButtonText: '确定',
+          confirmButtonText: this.$t('action.yes'),
           callback: action => {
           }
         })
@@ -318,7 +318,7 @@ export default {
           this.formmodel.partid = this.$store.getters.partId
           API_Part.add(this.formmodel).then(() => {
             this.formshow = false
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
             this.getList()
           })
         }

+ 6 - 6
src/views/dashboard/calling/components/SickBedBoard.vue

@@ -3,7 +3,7 @@
     <el-card class="margin-top-sm">
       <div class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-radio-group v-model="searchObj.bed_status" size="medium" style="margin-right: 150px;" fill="#E6A23C" @change="bedStatusChange">
@@ -538,9 +538,9 @@ export default {
     },
     /** 出院 **/
     patientOut(bedinfo) {
-      this.$confirm('该床位确定出院?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm('该床位确定出院?', this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Patient.remove(bedinfo.DEVICE_HUMAN_ID, bedinfo.ID).then(
@@ -615,14 +615,14 @@ export default {
             this.formmodel.partid = this.$store.getters.partId
             API_Patient.add(this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.$emit('change', this.searchObj)
             })
           } else {
             /** 修改 */
             API_Patient.update(this.formmodel.id, this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('修改成功!')
+              this.$message.success(this.$t('action.editSuccess'))
               this.$emit('change', this.searchObj)
             }).catch(response => {
               this.formshow = false

+ 33 - 30
src/views/dashboard/calling/index.vue

@@ -12,7 +12,7 @@
               <vue-seamless-scroll :data="todayList" :class-option="defaultOption" class="seamless-warp">
                 <el-card v-for="(item, index) in todayList" :key="index">
                   <div>
-                    <span>计划执行时间:{{ forDate(item.task_plan_time) }}</span>
+                    <span>{{ taskPlanTime }}{{ forDate(item.task_plan_time) }}</span>
                   </div>
                   <div style="margin-top: 5px;" @click="showArticleContext(item.task_content)">
                     <span style="margin-left: 20px; line-height:1.2"><a>{{ item.task_content }}</a></span>
@@ -25,8 +25,8 @@
                     </div>
                     <div style="float: right">
                       <p>
-                        <span style="font-weight:bold">创建时间:</span>{{ forDate(item.create_time) }}
-                        <span style="font-weight:bold;margin-left: 10px;">创建人:</span>{{ item.create_name }}
+                        <span style="font-weight:bold">{{ createTime }}</span>{{ forDate(item.create_time) }}
+                        <span style="font-weight:bold;margin-left: 10px;">{{ createName }}</span>{{ item.create_name }}
                       </p>
                     </div>
                   </div>
@@ -40,8 +40,8 @@
       <el-col :span="12">
         <el-card>
           <div slot="header" class="clearfix">
-            <span style="float: left">{{ this.$t("home.recentNote") }}</span>
-            <el-link type="primary" style="float: right" @click="goMove('remarkList')">{{ this.$t("action.more") }}</el-link>
+            <span style="float: left">{{ this.$t('home.recentNote') }}</span>
+            <el-link type="primary" style="float: right" @click="goMove('remarkList')">{{ this.$t('action.more') }}</el-link>
           </div>
           <div style="clear:both;font-size: 14px;height: 300px;">
             <el-scrollbar wrap-class="scrollbar-wrapper" style="min-height: 250px">
@@ -58,8 +58,8 @@
                     </div>
                     <div style="float: right">
                       <p>
-                        <span style="font-weight:bold">创建时间:</span>{{ forDate(item.create_time) }}
-                        <span style="font-weight:bold;margin-left: 10px;">创建人:</span>{{ item.create_name }}
+                        <span style="font-weight:bold">{{ createTime }}</span>{{ forDate(item.create_time) }}
+                        <span style="font-weight:bold;margin-left: 10px;">{{ createName }}</span>{{ item.create_name }}
                       </p>
                     </div>
                   </div>
@@ -75,16 +75,16 @@
       <el-col :span="16">
         <el-card style="maring:10px">
           <div slot="header" class="clearfix">
-            <span style="float: left">{{ this.$t("home.recentInteract") }}</span>
+            <span style="float: left">{{ this.$t('home.recentInteract') }}</span>
             <el-link type="primary" style="float: right" @click="goMove('CallingList')">{{ this.$t("action.more") }}</el-link>
           </div>
           <div style="height: 300px">
             <el-table :data="callingHistoryList" height="300px">
-              <el-table-column prop="fromMemberName" label="发起方" min-width="140" align="center" :formatter="formatterFromName" />
-              <el-table-column prop="toMemberName" label="接收方" min-width="140" align="center" :formatter="formatterToName" />
-              <el-table-column prop="action_type" label="交互类型" width="100" align="center" :formatter="formatterType" />
-              <el-table-column prop="action_end" label="交互结果" width="100" align="center" :formatter="formatterResult" />
-              <el-table-column prop="create_date" label="交互时间" width="170" align="center" :formatter="formatterCreateTime" />
+              <el-table-column prop="fromMemberName" :label=" this.$t('interaction.fromMemberName')" min-width="140" align="center" :formatter="formatterFromName" />
+              <el-table-column prop="toMemberName" :label=" this.$t('interaction.toMemberName')" min-width="140" align="center" :formatter="formatterToName" />
+              <el-table-column prop="action_type" :label=" this.$t('interaction.actionType')" width="100" align="center" :formatter="formatterType" />
+              <el-table-column prop="action_end" :label=" this.$t('interaction.actionEnd')" width="100" align="center" :formatter="formatterResult" />
+              <el-table-column prop="create_date" :label=" this.$t('interaction.createDate')" width="170" align="center" :formatter="formatterCreateTime" />
             </el-table>
           </div>
         </el-card>
@@ -93,7 +93,7 @@
       <el-col :span="8">
         <el-card>
           <div slot="header" class="clearfix">
-            <span style="float: left">{{ this.$t("home.recentRemarks") }}</span>
+            <span style="float: left">{{ this.$t('home.recentRemarks') }}</span>
             <el-link type="primary" style="float: right" @click="goMove('customerList')">{{ this.$t("action.more") }}</el-link>
           </div>
           <div style="clear:both;font-size: 14px;height: 300px;">
@@ -111,8 +111,8 @@
                     </div>
                     <div style="float: right">
                       <p>
-                        <span style="font-weight:bold">创建时间:</span>{{ forDate(item.create_time) }}
-                        <span style="font-weight:bold;margin-left: 10px;">创建人:</span>{{ item.create_name }}
+                        <span style="font-weight:bold">{{ createTime }}</span>{{ forDate(item.create_time) }}
+                        <span style="font-weight:bold;margin-left: 10px;">{{ createName }}</span>{{ item.create_name }}
                       </p>
                     </div>
                   </div>
@@ -123,7 +123,7 @@
         </el-card>
       </el-col>
     </el-row>
-    <el-dialog title="详情" :visible.sync="isShowArticle" width="50%" align="center">
+    <el-dialog :title="this.$t('action.details')" :visible.sync="isShowArticle" width="50%" align="center">
       <p style="text-align: left;" class="current-content" v-html="currentContent.replace(/\n/g, '<br>')" />
     </el-dialog>
   </div>
@@ -151,7 +151,10 @@ export default {
       callingHistoryList: [],
       remarkList: [],
       isShowArticle: false,
-      currentContent: ''
+      currentContent: '',
+      taskPlanTime: this.$t('task.taskPlanTime2'),
+      createTime: this.$t('remark.remarkCreateTime'),
+      createName: this.$t('remark.remarkCreateName'),
     }
   },
   computed: {
@@ -274,32 +277,32 @@ export default {
     formatterType(row, column, cellValue) {
       switch (cellValue) {
         case 'CALLBACK':
-          return 'TCP反馈'
+          return this.$t('tcpType.CALLBACK')
         case 'VOICE':
-          return '语音'
+          return this.$t('tcpType.VOICE')
         case 'VIDEO':
-          return '视频'
+          return this.$t('tcpType.VIDEO')
         case 'IM':
-          return '留言'
+          return this.$t('tcpType.IM')
         case 'DEVICE':
-          return '设备'
+          return this.$t('tcpType.DEVICE')
         case 'DATA':
-          return '数据'
+          return this.$t('tcpType.DATA')
         case 'EVENT':
-          return '事件'
+          return this.$t('tcpType.EVENT')
         case 'BROADCAST':
-          return '广播'
+          return this.$t('tcpType.BROADCAST')
         case 'TIME':
-          return '时间'
+          return this.$t('tcpType.TIME')
         default:
-          return '未知'
+          return this.$t('tcpType.UNKNOWN')
       }
     },
     formatterResult(row, column, cellValue) {
       if (cellValue) {
-        return '成功'
+        return this.$t('interaction.success')
       } else if (!cellValue) {
-        return '未响应'
+        return this.$t('interaction.notOperated')
       }
     },
     formatterCreateTime(row, column, cellValue) {

+ 7 - 7
src/views/hospital/clerkManager.vue

@@ -16,7 +16,7 @@
     >
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" @click="handleAddMember">新增</el-button>
@@ -382,7 +382,7 @@ export default {
         cellRendererParams: param => {
           return {
             onClick: this.handlerEdit,
-            label: '编辑',
+            label: this.$t('action.edit'),
             buttonType: 'primary',
             buttonSize: 'mini'
           }
@@ -460,9 +460,9 @@ export default {
     },
     /** 单条数据删除处理 */
     handlerDelete(ids) {
-      this.$confirm('你确定要禁用此用户?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm('你确定要禁用此用户?', this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         clerk_API.remove(ids).then(
@@ -504,7 +504,7 @@ export default {
     batchDelete: function() {
       if (this.multipleSelection.length === 0) {
         this.$alert('没有选择任何记录!', '系统提示', {
-          confirmButtonText: '确定',
+          confirmButtonText: this.$t('action.yes'),
           callback: action => {
           }
         })
@@ -568,7 +568,7 @@ export default {
             })
           }
         } else {
-          this.$message.error('表单填写有误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
           return false
         }
       })

+ 18 - 18
src/views/hospital/ncs_customer/customerManager.vue

@@ -19,7 +19,7 @@
       <!--        @rowDoubleClicked="getList"-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" size="mini" :disabled="!isEmptyFrame" @click="handleAdd">入住登记</el-button>
@@ -671,11 +671,11 @@ export default {
           return (new Date(celldate).getTime() / 1000) - (filterLocalDateAtMidnight.getTime() / 1000)
         }
       }},
-      { headerName: '编辑', field: 'id',
+      { headerName: this.$t('action.edit'), field: 'id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: {
           onClick: this.handleEdit,
-          label: '编辑',
+          label: this.$t('action.edit'),
           buttonType: 'primary',
           buttonSize: 'mini'
         },
@@ -719,12 +719,12 @@ export default {
         width: 80,
         resizable: false,
         sortable: false },
-      { headerName: '删除', field: 'shop_id',
+      { headerName: this.$t('action.delete'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.deleteSingle,
-            label: '删除',
+            label: this.$t('action.delete'),
             buttonType: 'danger',
             buttonSize: 'mini',
             disabled: param.data['member_name'] === 'superadmin'
@@ -1023,7 +1023,7 @@ export default {
             })
           } else {
             API_Customer.updateAll(this.formmodel).then(res => {
-              this.$message.success('修改成功!')
+              this.$message.success(this.$t('action.editSuccess'))
               this.customerFormVisible = false
               this.isDisabled = false
               this.getList()
@@ -1031,7 +1031,7 @@ export default {
             })
           }
         } else {
-          this.$message.error('表单填写有误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
           return false
         }
       })
@@ -1044,9 +1044,9 @@ export default {
     /** 单条数据删除处理 */
     handlerDelete(ids) {
       const test = '你确定要删除此用户信息?'
-      this.$confirm(test, '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(test, this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Customer.remove(ids).then(
@@ -1085,9 +1085,9 @@ export default {
         ...row,
         status: 1
       }
-      this.$confirm('确定退床吗?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm('确定退床吗?', this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Customer.updateAll(this.formmodel).then(res => {
@@ -1127,7 +1127,7 @@ export default {
             this.changeBedFormVisible = false
           })
         } else {
-          this.$message.error('表单填写有误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
           return false
         }
       })
@@ -1161,7 +1161,7 @@ export default {
             this.getRemarks()
           })
         } else {
-          this.$message.error('表单填写有误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
           return false
         }
       })
@@ -1220,9 +1220,9 @@ export default {
     /** 单条数据删除处理 */
     handlerDeleteRelative(ids) {
       const test = '你确定要删除此病人亲属信息?'
-      this.$confirm(test, '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(test, this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_User.remove(ids).then(

+ 14 - 14
src/views/hospital/ncs_device/deviceManager.vue

@@ -17,7 +17,7 @@
     >
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" size="mini" @click="handleAdd">新增设备</el-button>
@@ -494,11 +494,11 @@ export default {
           return (new Date(celldate).getTime() / 1000) - (filterLocalDateAtMidnight.getTime() / 1000)
         }
       }},
-      { headerName: '编辑', field: 'shop_id',
+      { headerName: this.$t('action.edit'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: {
           onClick: this.handleEdit,
-          label: '编辑',
+          label: this.$t('action.edit'),
           buttonType: 'primary',
           buttonSize: 'mini'
         },
@@ -508,12 +508,12 @@ export default {
         width: 90,
         resizable: false,
         sortable: false },
-      { headerName: '删除', field: 'shop_id',
+      { headerName: this.$t('action.delete'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.deleteSingle,
-            label: '删除',
+            label: this.$t('action.delete'),
             buttonType: 'danger',
             buttonSize: 'mini',
             disabled: param.data['member_name'] === 'superadmin'
@@ -666,9 +666,9 @@ export default {
     },
     /** 删除设备 **/
     handlerDelete(id) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Device.remove(id).then(
@@ -690,7 +690,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -825,14 +825,14 @@ export default {
           /** 新增 */
           if (!this.deviceModel.id) {
             API_Device.add(this.deviceModel).then(r => {
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               _this.device = r
               this.sosDeviceSetting.device_id = _this.device.id
               this.sosDeviceSetting.part_id = _this.device.part_id
 
               if (this.hasSosDeviceSettings) {
                 API_SosDeviceSetting.add(this.sosDeviceSetting).then(() => {
-                  this.$message.success('保存成功!')
+                  this.$message.success(this.$t('action.saveSuccess'))
                   this.hasSosDeviceSettings = false
                 })
               }
@@ -843,7 +843,7 @@ export default {
           } else {
             /** 修改 */
             API_Device.update(this.deviceModel.id, this.deviceModel).then(() => {
-              this.$message.success('修改成功!')
+              this.$message.success(this.$t('action.editSuccess'))
               this.deviceDialogVisible = false
               this.getList()
             })
@@ -868,13 +868,13 @@ export default {
             if (this.hasSosDeviceSettings) {
               this.sosDeviceSetting.device_id = this.deviceModel.id
               API_SosDeviceSetting.updateByDeviceId(this.deviceModel.id, this.sosDeviceSetting).then(() => {
-                this.$message.success('保存成功!')
+                this.$message.success(this.$t('action.saveSuccess'))
 
                 if (this.hasSosDeviceSettings) {
                   this.sosDeviceSetting.device_id = this.deviceModel.id
                   this.sosDeviceSetting.part_id = this.deviceModel.part_id
                   API_SosDeviceSetting.updateByDeviceId(this.deviceModel.id, this.sosDeviceSetting).then(() => {
-                    this.$message.success('保存成功!')
+                    this.$message.success(this.$t('action.saveSuccess'))
                     this.hasSosDeviceSettings = false
                   })
                 }

+ 21 - 21
src/views/hospitalFrame/frameGroup.vue

@@ -17,10 +17,10 @@
       <!--        @rowDoubleClicked="getList"-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
-          <el-button type="primary" size="mini" @click="createOrginazition">新建区域</el-button>
+          <el-button type="primary" size="mini" @click="createOrginazition">{{ this.$t('frameGroup.frameGroupAdd') }}</el-button>
         </div>
       </div>
       <el-pagination
@@ -42,12 +42,12 @@
 
           <el-row>
             <el-col :span="24">
-              <el-form-item label="区域名称" prop="group_name">
+              <el-form-item :label="this.$t('frameGroup.frameGroupName')" prop="group_name">
                 <el-input
                   v-model="formmodel.group_name"
                   clearable
                   :maxlength="100"
-                  placeholder="请输入区域名称"
+                  :placeholder="this.$t('frameGroup.inputFrameGroupName')"
                 />
               </el-form-item>
 
@@ -57,8 +57,8 @@
 
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="formshow = false">取 消</el-button>
-        <el-button type="primary" @click="handlerFormSubmit('editform')">确 定</el-button>
+        <el-button @click="formshow = false">{{ this.$t('action.cancel') }}</el-button>
+        <el-button type="primary" @click="handlerFormSubmit('editform')">{{ this.$t('action.yes') }}</el-button>
       </div>
     </el-dialog>
     <!-- 新建病区弹窗结束 -->
@@ -87,12 +87,12 @@ export default {
         fixedCondition: ' part_id = ' + this.$store.getters.partId
       },
       /** 新建组织弹出参数 **/
-      formtitle: '新建病区',
+      formtitle: this.$t('frameGroup.frameGroupAdd'),
       formshow: false,
       formmodel: {},
       rules: {
         group_name: [
-          { required: true, message: '区域名称不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('frameGroup.frameGroupNameMsg'), trigger: 'blur' }
         ]
       },
       /** ag-grid参数 **/
@@ -132,13 +132,13 @@ export default {
       },
       { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter' },
       {
-        headerName: '区域名称', field: 'group_name', sortable: true, filter: 'agTextColumnFilter', flex: 1
+        headerName: this.$t('frameGroup.frameGroupName'), field: 'group_name', sortable: true, filter: 'agTextColumnFilter', flex: 1
       },
       // lockPosition 锁定位置,会在第一列
       // lockPinned = true 不能拖动然后固定
       // resizeable 单元个大小是否可以调整
       {
-        headerName: '创建时间',
+        headerName: this.$t('action.createTime'),
         field: 'create_time',
         sortable: true,
         filter: 'agDateColumnFilter',
@@ -146,7 +146,7 @@ export default {
         valueFormatter: this.unixDateFormatter
       },
       {
-        headerName: '更新时间',
+        headerName: this.$t('action.updateTime'),
         field: 'update_time',
         sortable: true,
         filter: 'agDateColumnFilter',
@@ -154,11 +154,11 @@ export default {
         valueFormatter: this.unixDateFormatter
       },
       {
-        headerName: '编辑', field: 'shop_id',
+        headerName: this.$t('action.edit'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: {
           onClick: this.handEdit,
-          label: '编辑',
+          label: this.$t('action.edit'),
           buttonType: 'primary',
           buttonSize: 'mini'
         },
@@ -170,12 +170,12 @@ export default {
         sortable: false
       },
       {
-        headerName: '删除', field: 'shop_id',
+        headerName: this.$t('action.delete'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.deleteSingle,
-            label: '删除',
+            label: this.$t('action.delete'),
             buttonType: 'danger',
             buttonSize: 'mini'
           }
@@ -222,9 +222,9 @@ export default {
       this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
     },
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_FrameGroup.remove(ids).then(
@@ -232,7 +232,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -244,7 +244,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -370,7 +370,7 @@ export default {
           this.formmodel.part_id = this.$store.getters.partId
           API_FrameGroup.add(this.formmodel).then(() => {
             this.formshow = false
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
             this.getList()
           }).catch(err => {
             this.$message.error(err.message)

+ 11 - 9
src/views/hospitalFrame/frameGroupEdit.vue

@@ -4,25 +4,26 @@
       <el-form ref="editform" :rules="rules" label-width="80px" :model="formmodel">
         <el-row>
           <el-col :span="12">
-            <el-form-item label="区域名称" prop="group_name">
+            <el-form-item :label="this.$t('frameGroup.frameGroupName')" prop="group_name">
               <el-input
                 v-model="formmodel.group_name"
                 clearable
                 :maxlength="100"
-                placeholder="请输入区域名称"
+                :placeholder="this.$t('frameGroup.inputFrameGroupName')"
               />
             </el-form-item>
 
           </el-col>
         </el-row>
         <fieldset class="margin-top-sm">
-          <legend>区域管辖空间</legend>
+          <legend>{{ this.$t('frameGroup.frameGroupManage') }}</legend>
           <el-row :gutter="20" type="flex">
             <el-col v-for="(item,index) in rooms" :key="index"  :xs="8" :sm="6" :md="4" :lg="4" :xl="4">
               <el-card class="box-card">
                 <div slot="header" class="clearfix">
                   <el-checkbox v-model="item.checked" @change="handleCheckboxChanged(item)"><svg-icon icon-class="sickroom" style="color: #9aaabf;margin-right: 5px" /><span>{{ item.name }}</span></el-checkbox>
-                  <el-checkbox v-model="item.allCkeck" style="float: right;" :indeterminate="item.indeterminate" @change="(checked)=>{handleCheckAll(checked,item)}">全选</el-checkbox>
+                  <el-checkbox v-model="item.allCkeck" style="float: right;" :indeterminate="item.indeterminate" @change="(checked)=>{handleCheckAll(checked,item)}">
+                    {{ choiceAll }}</el-checkbox>
                 </div>
                 <div v-for="(bed,_index) in item.children" :key="_index" class="text item">
                   <el-checkbox v-model="bed.checked" @change="handleCheckboxChanged(item)"><svg-icon icon-class="bed" style="color: #9aaabf;margin-right: 5px" />{{ bed.name }}</el-checkbox>
@@ -32,7 +33,7 @@
           </el-row>
         </fieldset>
         <el-form-item align="center" class="margin-top-sm">
-          <el-button type="success" @click="onSubmit">保存设置</el-button>
+          <el-button type="success" @click="onSubmit">{{ this.$t('action.saveSettings') }}</el-button>
         </el-form-item>
       </el-form>
     </el-card>
@@ -54,10 +55,11 @@ export default {
       },
       rules: {
         group_name: [
-          { required: true, message: '区域名称不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('frameGroup.frameGroupNameMsg'), trigger: 'blur' }
         ] },
       /** 空间结构房间 **/
-      rooms: []
+      rooms: [],
+      choiceAll: this.$t('action.choiceAll')
     }
   },
   mounted() {
@@ -150,12 +152,12 @@ export default {
       this.$refs['editform'].validate((valid) => {
         if (valid) {
           API_FrameGroup.update(this.formmodel.id, { frame_group: this.formmodel, areas: this.rooms }).then(res => {
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
           }).catch(err => {
             this.$message.error(err.message)
           })
         } else {
-          this.$message.error('表单填写错误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
         }
       })
     }

+ 5 - 5
src/views/hospitalFrame/hospitalFrame.vue

@@ -257,9 +257,9 @@ export default {
     },
     /** 单条数据删除处理 */
     handlerDeleteFrame(ids) {
-      this.$confirm('确定要删除此结构及其所有下级吗?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm('确定要删除此结构及其所有下级吗?', this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         HospitalFrame_API.deleteHospitalFrame(ids).then(response => {
@@ -298,7 +298,7 @@ export default {
               params.full_name = params.name + '房'
             }
             HospitalFrame_API.updateHospitalFrame(params.id, params).then(response => {
-              this.$message.success('修改成功!')
+              this.$message.success(this.$t('action.editSuccess'))
               this.handleFrameFinished()
             })
           } else {
@@ -312,7 +312,7 @@ export default {
             })
           }
         } else {
-          this.$message.error('表单填写有误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
           return false
         }
       })

+ 2 - 2
src/views/ncs-auth/compontents/roleEdit.vue

@@ -171,7 +171,7 @@ export default {
             ? API_Auth.addRole(params).then((response) => saveSuccess(response))
             : API_Auth.editRole(this.role_id, params).then((response) => saveSuccess(response))
           const saveSuccess = (response) => {
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
             // this.$route.params.callback()
             // this.$store.dispatch('delCurrentViews', {
             //   view: this.$route,
@@ -180,7 +180,7 @@ export default {
             this.$emit('aftersave', response)
           }
         } else {
-          this.$message.error('表单填写有误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
           return false
         }
       })

+ 5 - 5
src/views/ncs-auth/superadmin/defaultRoleManager.vue

@@ -109,9 +109,9 @@ export default {
         this.$message.error('没有选中任何角色!')
         return
       }
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Auth.deleteRole(this.role_id).then(
@@ -120,7 +120,7 @@ export default {
             this.getRoleList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -132,7 +132,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },

+ 2 - 2
src/views/ncs-broadcast/broadcastEdit.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="tab-container">
     <el-tabs v-model="activeName" style="margin:15px;" type="border-card">
-      <el-tab-pane name="broadInfo" label="广播信息">
+      <el-tab-pane name="broadInfo" :label="this.$t('broadcast.broadcastInfo')">
         <keep-alive>
           <broadcast-info  :broadcast-id="broadcastId" />
         </keep-alive>
       </el-tab-pane>
-      <el-tab-pane name="broadFileList"  label="广播文件">
+      <el-tab-pane name="broadFileList" :label="this.$t('broadcast.broadcastFile')">
         <keep-alive>
           <broadcast-file-list :broadcast-id="broadcastId" /></keep-alive>
       </el-tab-pane>

+ 35 - 35
src/views/ncs-broadcast/components/broadcastFileList.vue

@@ -17,10 +17,10 @@
       <!--        @rowDoubleClicked="getList"-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
-          <el-button type="primary" size="mini" @click="uploadFile">上传文件</el-button>
+          <el-button type="primary" size="mini" @click="uploadFile">{{ this.$t('action.uploadFile') }}</el-button>
         </div>
       </div>
       <el-pagination
@@ -35,7 +35,7 @@
         @current-change="handlePageCurrentChange"
       />
     </ag-grid-layout>
-    <el-dialog title="文件上传" :visible.sync="formshow" width="40%">
+    <el-dialog :title="this.$t('action.uploadFile')" :visible.sync="formshow" width="40%">
       <div>
         <el-form ref="editform" :rules="rules" label-width="120px" :model="formmodel">
 
@@ -51,26 +51,26 @@
                 :before-upload="handleUploadBefore"
               >
                 <i class="el-icon-upload" />
-                <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-                <div slot="tip" class="el-upload__tip">只能上传mp3文件</div>
+                <div class="el-upload__text">{{ this.$t('action.uploadFileMsg') }}<em>{{ this.$t('action.uploadFileMsg2') }}</em></div>
+                <div slot="tip" class="el-upload__tip">{{ this.$t('action.uploadFileMsg3') }}</div>
               </el-upload>
             </el-col>
           </el-row>
-          <el-form-item label="文件名称" prop="file_name">
-            <el-input v-model="formmodel.file_name" clearable :maxlength="100" placeholder="文件名称" />
+          <el-form-item :label="this.$t('action.uploadFileName')" prop="file_name">
+            <el-input v-model="formmodel.file_name" clearable :maxlength="100" :placeholder="this.$t('action.uploadFileName')" />
           </el-form-item>
-          <el-form-item label="文件路径" prop="file_url">
-            <el-input v-model="formmodel.file_url" clearable readonly placeholder="文件路径" />
+          <el-form-item :label="this.$t('action.uploadFileUrl')" prop="file_url">
+            <el-input v-model="formmodel.file_url" clearable readonly :placeholder="this.$t('action.uploadFileUrl')" />
           </el-form-item>
-          <el-form-item label="播放顺序" prop="play_index">
+          <el-form-item :label="this.$t('broadcast.playOrder')" prop="play_index">
             <el-input-number v-model="formmodel.play_index" :min="1" label="play_index" />
           </el-form-item>
         </el-form>
 
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="formshow = false">取 消</el-button>
-        <el-button type="primary" @click="handlerFormSubmit('editform')">确 定</el-button>
+        <el-button @click="formshow = false">{{ this.$t('action.cancel') }}</el-button>
+        <el-button type="primary" @click="handlerFormSubmit('editform')">{{ this.$t('action.yes') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -121,13 +121,13 @@ export default {
       frameworkComponents: null,
       rules: {
         file_name: [
-          { required: true, message: '文件名称不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('action.uploadFileNameMsg'), trigger: 'blur' }
         ],
         file_url: [
-          { required: true, message: '文件路径不能为空,请上传文件', trigger: 'blur' }
+          { required: true, message: this.$t('action.uploadFileUrlMsg'), trigger: 'blur' }
         ],
         play_index: [
-          { required: true, message: '播放顺序必填', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.playOrderMsg'), trigger: 'blur' }
         ]
       }
     }
@@ -153,22 +153,22 @@ export default {
       },
       { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 130 },
       {
-        headerName: '播放顺序', field: 'play_index', sortable: true, filter: 'agNumberColumnFilter', width: 150
+        headerName: this.$t('broadcast.playOrder'), field: 'play_index', sortable: true, filter: 'agNumberColumnFilter', width: 150
       },
       {
-        headerName: '文件名称', field: 'file_name', sortable: true, filter: 'agTextColumnFilter', width: 150
+        headerName: this.$t('action.uploadFileName'), field: 'file_name', sortable: true, filter: 'agTextColumnFilter', width: 150
       },
       {
-        headerName: '文件路径', field: 'file_url', sortable: true, filterFramework: 'agTextColumnFilter', flex: 1
+        headerName: this.$t('action.uploadFileUrl'), field: 'file_url', sortable: true, filterFramework: 'agTextColumnFilter', flex: 1
       },
       {
-        headerName: '上传者', field: 'file_author', sortable: true, filter: 'agTextColumnFilter', width: 150
+        headerName: this.$t('action.uploadFileAuthor'), field: 'file_author', sortable: true, filter: 'agTextColumnFilter', width: 150
       },
       // lockPosition 锁定位置,会在第一列
       // lockPinned = true 不能拖动然后固定
       // resizeable 单元个大小是否可以调整
       {
-        headerName: '上传日期',
+        headerName: this.$t('action.uploadFileDate'),
         field: 'create_time',
         sortable: true,
         filter: 'agNumberColumnFilter',
@@ -176,7 +176,7 @@ export default {
         valueFormatter: this.unixDateFormatter
       },
       {
-        headerName: '更新时间',
+        headerName: this.$t('action.updateTime'),
         field: 'update_time',
         sortable: true,
         filter: 'agNumberColumnFilter',
@@ -184,11 +184,11 @@ export default {
         valueFormatter: this.unixDateFormatter
       },
       {
-        headerName: '编辑', field: 'shop_id',
+        headerName: this.$t('action.edit'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: {
           onClick: this.handEdit,
-          label: '编辑',
+          label: this.$t('action.edit'),
           buttonType: 'primary',
           buttonSize: 'mini'
         },
@@ -200,12 +200,12 @@ export default {
         sortable: false
       },
       {
-        headerName: '删除', field: 'shop_id',
+        headerName: this.$t('action.delete'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.deleteSingle,
-            label: '删除',
+            label: this.$t('action.delete'),
             buttonType: 'danger',
             buttonSize: 'mini'
           }
@@ -250,9 +250,9 @@ export default {
       this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
     },
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_BroadcastFiles.remove(ids).then(
@@ -260,7 +260,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -272,7 +272,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -397,11 +397,11 @@ export default {
         const isMp3 = extension.toLowerCase() === 'mp3'
         const isLt5M = file.size / 1024 / 1024 < 5
         if (!isMp3) {
-          this.$message.error('只能上传mp3文件!')
+          this.$message.error(this.$t('action.uploadFileMsg3'))
           reject()
         }
         if (!isLt5M) {
-          this.$message.error('上传附件大小不能超过 5MB!')
+          this.$message.error(this.$t('action.uploadFileMsg4'))
           reject()
         }
         this.formmodel.file_name = filename
@@ -415,19 +415,19 @@ export default {
           if (this.formmodel.id) {
             API_BroadcastFiles.update(this.formmodel.id, this.formmodel).then(res => {
               this.formshow = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.getList()
             })
           } else {
             this.formmodel.part_id = this.$store.getters.partId
             API_BroadcastFiles.add(this.formmodel).then(res => {
               this.formshow = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.getList()
             })
           }
         } else {
-          this.$message.error('表单填写错误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
         }
       })
     },

+ 40 - 38
src/views/ncs-broadcast/components/broadcastInfo.vue

@@ -4,17 +4,17 @@
 
       <el-row>
         <el-col :span="12">
-          <el-form-item label="广播名称" prop="title">
+          <el-form-item :label="this.$t('broadcast.broadcastName')" prop="title">
             <el-input
               v-model="formmodel.title"
               clearable
               :maxlength="100"
-              placeholder="请输入广播名称"
+              :placeholder="this.$t('broadcast.inputBroadcastName')"
             />
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="广播模式" prop="broadcast_mode">
+          <el-form-item :label="this.$t('broadcast.broadcastMode')" prop="broadcast_mode">
             <el-radio-group v-model="formmodel.broadcast_mode" @change="broadcastModeChanage">
               <!--                  <el-radio :label="1">手动模式</el-radio>-->
               <!--                  <el-radio :label="2">自动模式</el-radio>-->
@@ -25,7 +25,7 @@
       </el-row>
       <el-row>
         <el-col :span="12">
-          <el-form-item label="播放模式(自动)" prop="play_mode">
+          <el-form-item :label="this.$t('broadcast.playMode')" prop="play_mode">
             <el-radio-group v-model="formmodel.play_mode" @change="playModeChange">
               <!--                  <el-radio :label="1">定时播放</el-radio>-->
               <!--                  <el-radio :label="2">定次播放</el-radio>-->
@@ -34,12 +34,12 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="自动播放开始" prop="play_start">
+          <el-form-item :label="this.$t('broadcast.playStart')" prop="play_start">
             <el-time-picker
               v-model="formmodel.play_start"
               :disabled="formmodel.broadcast_mode===1"
               value-format="HH:mm:ss"
-              placeholder="任意时间点"
+              :placeholder="this.$t('broadcast.anyTime')"
               @change="playStartChange"
             />
           </el-form-item>
@@ -49,7 +49,7 @@
 
       <el-row>
         <el-col :span="12">
-          <el-form-item label="定时播放结束" prop="play_end">
+          <el-form-item :label="this.$t('broadcast.playEnd')" prop="play_end">
             <el-time-picker
               v-model="formmodel.play_end"
               :disabled="formmodel.broadcast_mode===1||formmodel.play_mode===2"
@@ -58,12 +58,12 @@
                 selectableRange: (this.formmodel.play_start ? this.formmodel.play_start : '00:00:00') + ' - 23:59:59',
                 format: 'HH:mm:ss'
               }"
-              placeholder="任意时间点"
+              :placeholder="this.$t('broadcast.anyTime')"
             />
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="定次播放次数" prop="repeat_times">
+          <el-form-item :label="this.$t('broadcast.repeatTimes')" prop="repeat_times">
             <el-input-number v-model="formmodel.repeat_times" :min="0" :disabled="formmodel.broadcast_mode===1 || formmodel.play_mode === 1" :max="100" label="repeat_times" />
           </el-form-item>
         </el-col>
@@ -71,29 +71,29 @@
       </el-row>
       <el-row>
         <el-col :span="12">
-          <el-form-item label="是否启用" prop="status">
-            <el-checkbox v-model="formmodel.status" :true-label="1" :false-label="0">开启此广播</el-checkbox>
+          <el-form-item :label="this.$t('broadcast.broadcastStatus')" prop="status">
+            <el-checkbox v-model="formmodel.status" :true-label="1" :false-label="0">{{ this.$t('broadcast.broadcastStart') }}</el-checkbox>
           </el-form-item>
         </el-col>
       </el-row>
       <el-row>
         <el-col :span="24">
-          <el-form-item label="开启日">
+          <el-form-item :label="this.$t('broadcast.repeatDay')">
             <el-checkbox-group v-model="formmodel.repeat_day" :disabled="formmodel.broadcast_mode===1">
-              <el-checkbox label="1">周一</el-checkbox>
-              <el-checkbox label="2">周二</el-checkbox>
-              <el-checkbox label="3">周三</el-checkbox>
-              <el-checkbox label="4">周四</el-checkbox>
-              <el-checkbox label="5">周五</el-checkbox>
-              <el-checkbox label="6">周六</el-checkbox>
-              <el-checkbox label="0">周日</el-checkbox>
+              <el-checkbox label="1">{{ this.$t('action.Monday') }}</el-checkbox>
+              <el-checkbox label="2">{{ this.$t('action.Tuesday') }}</el-checkbox>
+              <el-checkbox label="3">{{ this.$t('action.Wednesday') }}</el-checkbox>
+              <el-checkbox label="4">{{ this.$t('action.Thursday') }}</el-checkbox>
+              <el-checkbox label="5">{{ this.$t('action.Friday') }}</el-checkbox>
+              <el-checkbox label="6">{{ this.$t('action.Saturday') }}</el-checkbox>
+              <el-checkbox label="0">{{ this.$t('action.Sunday') }}</el-checkbox>
             </el-checkbox-group>
           </el-form-item>
         </el-col>
       </el-row>
       <el-row>
         <el-col :span="24">
-          <el-form-item label="广播区域">
+          <el-form-item :label="this.$t('broadcast.broadcastFrameGroup')">
             <el-checkbox-group v-model="formmodel.group_ids">
               <el-checkbox v-for="(item,index) in frameGroups" :key="index" :label="item.id+''">{{ item.group_name }}</el-checkbox>
             </el-checkbox-group>
@@ -102,13 +102,14 @@
       </el-row>
 
       <fieldset>
-        <legend>其他广播位置</legend>
+        <legend>{{ this.$t('broadcast.otherBroadcastFrameGroup') }}</legend>
         <el-row :gutter="20" type="flex">
           <el-col v-for="(item,index) in rooms" :key="index"  :xs="8" :sm="6" :md="4" :lg="4" :xl="4">
             <el-card class="box-card">
               <div slot="header" class="clearfix">
                 <el-checkbox v-model="item.checked" @change="handleCheckboxChanged(item)"><svg-icon icon-class="sickroom" style="color: #9aaabf;margin-right: 5px" /><span>{{ item.name }}</span></el-checkbox>
-                <el-checkbox v-model="item.allCkeck" style="float: right;" :indeterminate="item.indeterminate" @change="(checked)=>{handleCheckAll(checked,item)}">全选</el-checkbox>
+                <el-checkbox v-model="item.allCkeck" style="float: right;" :indeterminate="item.indeterminate" @change="(checked)=>{handleCheckAll(checked,item)}">
+                  {{ choiceAll }}</el-checkbox>
               </div>
               <div v-for="(bed,_index) in item.children" :key="_index" class="text item">
                 <el-checkbox v-model="bed.checked" @change="handleCheckboxChanged(item)"><svg-icon icon-class="bed" style="color: #9aaabf;margin-right: 5px" />{{ bed.name }}</el-checkbox>
@@ -118,7 +119,7 @@
         </el-row>
       </fieldset>
       <el-form-item align="center" class="margin-top-sm">
-        <el-button type="success" @click="onSubmit('editform')">保存设置</el-button>
+        <el-button type="success" @click="onSubmit('editform')">{{ this.$t('action.saveSettings') }}</el-button>
       </el-form-item>
     </el-form>
 
@@ -149,38 +150,39 @@ export default {
       rooms: [],
       rules: {
         title: [
-          { required: true, message: '广播名称不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.broadcastNameMsg'), trigger: 'blur' }
         ],
         broadcast_mode: [
-          { required: true, message: '广播模式必须选择', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.broadcastModeMsg'), trigger: 'blur' }
         ],
         play_mode: [
-          { required: true, message: '播放模式必须选择', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.playModeMsg'), trigger: 'blur' }
         ],
         repeat_times: [
-          { required: true, message: '播放次数必须填写', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.repeatTimesMsg'), trigger: 'blur' }
         ],
         play_start: [
-          { required: true, message: '自动模式开始时间必须选择', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.playStartMsg'), trigger: 'blur' }
         ],
         play_end: [
-          { required: true, message: '定时播放结束时间必须选择', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.playEndMsg'), trigger: 'blur' }
         ]
       },
       timeRange: [new Date(2020, 11, 11, 7, 0), new Date(2020, 11, 11, 8, 0)],
       checkWeek: [],
       broadcastStatus: [
-        { key: '启用', value: true, color: 'green' },
-        { key: '关闭', value: false, color: 'red' }
+        { key: this.$t('broadcast.statusTrue'), value: true, color: 'green' },
+        { key: this.$t('broadcast.statusFalse'), value: false, color: 'red' }
       ],
       broadcastMode: [
-        { key: '手动模式', value: 1, color: 'green' },
-        { key: '自动模式', value: 2, color: 'red' }
+        { key: this.$t('broadcast.manualMode'), value: 1, color: 'green' },
+        { key: this.$t('broadcast.autoMode'), value: 2, color: 'red' }
       ],
       playMode: [
-        { key: '定时播放', value: 1 },
-        { key: '定次播放', value: 2 }
-      ]
+        { key: this.$t('broadcast.timePlay'), value: 1 },
+        { key: this.$t('broadcast.scheduledPlay'), value: 2 }
+      ],
+      choiceAll: this.$t('action.choiceAll')
     }
   },
   mounted() {
@@ -364,13 +366,13 @@ export default {
 
           API_Broadcast.update(this.formmodel.id, this.formmodel).then(() => {
             this.formshow = false
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
             this.getBroadInfo().then(() => {
               this.getRoomStructs()
             })
           })
         } else {
-          this.$message.error('表单填写错误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
         }
       })
     }

+ 62 - 62
src/views/ncs-broadcast/index.vue

@@ -18,10 +18,10 @@
       <!--        @rowDoubleClicked="getList"-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
-          <el-button type="primary" size="mini" @click="createBroadcast">新建广播</el-button>
+          <el-button type="primary" size="mini" @click="createBroadcast">{{ this.$t('broadcast.broadcastAdd') }}</el-button>
         </div>
       </div>
       <el-pagination
@@ -43,17 +43,17 @@
 
           <el-row>
             <el-col :span="12">
-              <el-form-item label="广播名称" prop="title">
+              <el-form-item :label="this.$t('broadcast.broadcastName')" prop="title">
                 <el-input
                   v-model="formmodel.title"
                   clearable
                   :maxlength="100"
-                  placeholder="请输入广播名称"
+                  :placeholder="this.$t('broadcast.inputBroadcastName')"
                 />
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="广播模式" prop="broadcast_mode">
+              <el-form-item :label="this.$t('broadcast.broadcastMode')" prop="broadcast_mode">
                 <el-radio-group v-model="formmodel.broadcast_mode" @change="broadcastModeChanage">
                   <!--                  <el-radio :label="1">手动模式</el-radio>-->
                   <!--                  <el-radio :label="2">自动模式</el-radio>-->
@@ -64,7 +64,7 @@
           </el-row>
           <el-row>
             <el-col :span="12">
-              <el-form-item label="播放模式(自动)" prop="play_mode">
+              <el-form-item :label="this.$t('broadcast.playMode')" prop="play_mode">
                 <el-radio-group v-model="formmodel.play_mode" @change="playModeChange">
                   <!--                  <el-radio :label="1">定时播放</el-radio>-->
                   <!--                  <el-radio :label="2">定次播放</el-radio>-->
@@ -73,13 +73,13 @@
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="自动播放开始" prop="play_start">
+              <el-form-item :label="this.$t('broadcast.playStart')" prop="play_start">
                 <el-time-picker
                   v-model="formmodel.play_start"
                   :disabled="formmodel.broadcast_mode===1"
                   arrow-control
                   value-format="HH:mm:ss"
-                  placeholder="任意时间点"
+                  :placeholder="this.$t('broadcast.anyTime')"
                   @change="playStartChange"
                 />
               </el-form-item>
@@ -89,7 +89,7 @@
 
           <el-row>
             <el-col :span="12">
-              <el-form-item label="定时播放结束" prop="play_end">
+              <el-form-item :label="this.$t('broadcast.playEnd')" prop="play_end">
                 <el-time-picker
                   v-model="formmodel.play_end"
                   :disabled="formmodel.broadcast_mode===1||formmodel.play_mode===2"
@@ -99,12 +99,12 @@
                     selectableRange: (this.formmodel.play_start ? this.formmodel.play_start : '00:00:00') + ' - 23:59:59',
                     format: 'HH:mm:ss'
                   }"
-                  placeholder="任意时间点"
+                  :placeholder="this.$t('broadcast.anyTime')"
                 />
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="定次播放次数" prop="repeat_times">
+              <el-form-item :label="this.$t('broadcast.repeatTimes')" prop="repeat_times">
                 <el-input-number v-model="formmodel.repeat_times" :min="0" :disabled="formmodel.broadcast_mode===1 || formmodel.play_mode === 1" :max="100" label="repeat_times" />
               </el-form-item>
             </el-col>
@@ -112,29 +112,29 @@
           </el-row>
           <el-row>
             <el-col :span="12">
-              <el-form-item label="是否启用" prop="status">
-                <el-checkbox v-model="formmodel.status" :true-label="1" :false-label="0">开启此广播</el-checkbox>
+              <el-form-item :label="this.$t('broadcast.broadcastStatus')" prop="status">
+                <el-checkbox v-model="formmodel.status" :true-label="1" :false-label="0">{{ this.$t('broadcast.broadcastStart') }}</el-checkbox>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="24">
-              <el-form-item label="开启日">
+              <el-form-item :label="this.$t('broadcast.repeatDay')">
                 <el-checkbox-group v-model="formmodel.repeat_day" :disabled="formmodel.broadcast_mode===1">
-                  <el-checkbox label="1">周一</el-checkbox>
-                  <el-checkbox label="2">周二</el-checkbox>
-                  <el-checkbox label="3">周三</el-checkbox>
-                  <el-checkbox label="4">周四</el-checkbox>
-                  <el-checkbox label="5">周五</el-checkbox>
-                  <el-checkbox label="6">周六</el-checkbox>
-                  <el-checkbox label="0">周日</el-checkbox>
+                  <el-checkbox label="1">{{ this.$t('action.Monday') }}</el-checkbox>
+                  <el-checkbox label="2">{{ this.$t('action.Tuesday') }}</el-checkbox>
+                  <el-checkbox label="3">{{ this.$t('action.Wednesday') }}</el-checkbox>
+                  <el-checkbox label="4">{{ this.$t('action.Thursday') }}</el-checkbox>
+                  <el-checkbox label="5">{{ this.$t('action.Friday') }}</el-checkbox>
+                  <el-checkbox label="6">{{ this.$t('action.Saturday') }}</el-checkbox>
+                  <el-checkbox label="0">{{ this.$t('action.Sunday') }}</el-checkbox>
                 </el-checkbox-group>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="24">
-              <el-form-item label="广播区域">
+              <el-form-item :label="this.$t('broadcast.broadcastFrameGroup')">
                 <el-checkbox-group v-model="formmodel.group_ids">
                   <el-checkbox v-for="(item,index) in frameGroups" :key="index" :label="item.id">{{ item.group_name }}</el-checkbox>
                 </el-checkbox-group>
@@ -145,8 +145,8 @@
 
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="formshow = false">取 消</el-button>
-        <el-button type="primary" @click="handlerFormSubmit('editform')">确 定</el-button>
+        <el-button @click="formshow = false">{{ this.$t('action.cancel') }}</el-button>
+        <el-button type="primary" @click="handlerFormSubmit('editform')">{{ this.$t('action.yes') }}</el-button>
       </div>
     </el-dialog>
     <!--    &lt;!&ndash; 新建广播弹窗结束 &ndash;&gt;-->
@@ -183,7 +183,7 @@ export default {
         fixedCondition: ' part_id = ' + this.$store.getters.partId
       },
       /** 新建组织弹出参数 **/
-      formtitle: '新建广播',
+      formtitle: this.$t('broadcast.broadcastAdd'),
       formshow: false,
       formmodel: {
         repeat_times: 1,
@@ -192,22 +192,22 @@ export default {
       frameGroups: [],
       rules: {
         title: [
-          { required: true, message: '广播名称不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.broadcastNameMsg'), trigger: 'blur' }
         ],
         broadcast_mode: [
-          { required: true, message: '广播模式必须选择', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.broadcastModeMsg'), trigger: 'blur' }
         ],
         play_mode: [
-          { required: true, message: '播放模式必须选择', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.playModeMsg'), trigger: 'blur' }
         ],
         repeat_times: [
-          { required: true, message: '播放次数必须填写', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.repeatTimesMsg'), trigger: 'blur' }
         ],
         play_start: [
-          { required: true, message: '自动模式开始时间必须选择', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.playStartMsg'), trigger: 'blur' }
         ],
         play_end: [
-          { required: true, message: '定时播放结束时间必须选择', trigger: 'blur' }
+          { required: true, message: this.$t('broadcast.playEndMsg'), trigger: 'blur' }
         ]
       },
       timeRange: [new Date(2020, 11, 11, 7, 0), new Date(2020, 11, 11, 8, 0)],
@@ -228,16 +228,16 @@ export default {
       rowSelection: null,
       frameworkComponents: null,
       broadcastStatus: [
-        { key: '启用', value: true, color: 'green' },
-        { key: '关闭', value: false, color: 'red' }
+        { key: this.$t('broadcast.statusTrue'), value: true, color: 'green' },
+        { key: this.$t('broadcast.statusFalse'), value: false, color: 'red' }
       ],
       broadcastMode: [
-        { key: '手动模式', value: 1, color: 'green' },
-        { key: '自动模式', value: 2, color: 'red' }
+        { key: this.$t('broadcast.manualMode'), value: 1, color: 'green' },
+        { key: this.$t('broadcast.autoMode'), value: 2, color: 'red' }
       ],
       playMode: [
-        { key: '定时播放', value: 1 },
-        { key: '定次播放', value: 2 }
+        { key: this.$t('broadcast.timePlay'), value: 1 },
+        { key: this.$t('broadcast.scheduledPlay'), value: 2 }
       ],
       websocket: null,
       scheduledIds: []
@@ -264,43 +264,43 @@ export default {
       },
       { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 130 },
       {
-        headerName: '广播名称', field: 'title', sortable: true, filter: 'agTextColumnFilter', width: 150
+        headerName: this.$t('broadcast.broadcastName'), field: 'title', sortable: true, filter: 'agTextColumnFilter', width: 150
       },
       {
-        headerName: '开启状态', field: 'status', sortable: true, filterFramework: 'RadioFilter', filterParams: {
+        headerName: this.$t('broadcast.status'), field: 'status', sortable: true, filterFramework: 'RadioFilter', filterParams: {
           listData: this.broadcastStatus
         }, width: 150, cellRenderer: this.statusFormatter
       },
       {
-        headerName: '广播模式', field: 'broadcast_mode', sortable: true, filterFramework: 'RadioFilter', filterParams: {
+        headerName: this.$t('broadcast.broadcastMode'), field: 'broadcast_mode', sortable: true, filterFramework: 'RadioFilter', filterParams: {
           listData: this.broadcastMode
         }, width: 150,
         cellRenderer: (para) => { return this.radioFilterFormatter(para, this.broadcastMode) }
       },
       {
-        headerName: '播放模式', field: 'play_mode', sortable: true, filterFramework: 'RadioFilter', filterParams: {
+        headerName: this.$t('broadcast.playMode'), field: 'play_mode', sortable: true, filterFramework: 'RadioFilter', filterParams: {
           listData: this.playMode
         }, width: 150,
         cellRenderer: (para) => { return this.radioFilterFormatter(para, this.playMode) }
       },
       {
-        headerName: '开始时间', field: 'play_start', sortable: true, filter: 'agTextColumnFilter', width: 150
+        headerName: this.$t('action.startTime'), field: 'play_start', sortable: true, filter: 'agTextColumnFilter', width: 150
       },
       {
-        headerName: '结束时间', field: 'play_end', sortable: true, filter: 'agTextColumnFilter', width: 150
+        headerName: this.$t('action.endTime'), field: 'play_end', sortable: true, filter: 'agTextColumnFilter', width: 150
       },
       {
-        headerName: '播放次数', field: 'repeat_times', sortable: true, filter: 'agNumberColumnFilter', width: 150
+        headerName: this.$t('broadcast.repeatTime'), field: 'repeat_times', sortable: true, filter: 'agNumberColumnFilter', width: 150
       },
       {
-        headerName: '开启日', field: 'repeat_day', sortable: true, filter: 'agTextColumnFilter', width: 300, valueFormatter: this.weekdayFormatter
+        headerName: this.$t('broadcast.repeatDay'), field: 'repeat_day', sortable: true, filter: 'agTextColumnFilter', width: 300, valueFormatter: this.weekdayFormatter
       },
 
       // lockPosition 锁定位置,会在第一列
       // lockPinned = true 不能拖动然后固定
       // resizeable 单元个大小是否可以调整
       {
-        headerName: '创建时间',
+        headerName: this.$t('action.createTime'),
         field: 'create_time',
         sortable: true,
         filter: 'agNumberColumnFilter',
@@ -308,7 +308,7 @@ export default {
         valueFormatter: this.unixDateFormatter
       },
       {
-        headerName: '更新时间',
+        headerName: this.$t('action.createTime'),
         field: 'update_time',
         sortable: true,
         filter: 'agNumberColumnFilter',
@@ -316,11 +316,11 @@ export default {
         valueFormatter: this.unixDateFormatter
       },
       {
-        headerName: '编辑', field: 'shop_id',
+        headerName: this.$t('action.edit'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: {
           onClick: this.handEdit,
-          label: '编辑',
+          label: this.$t('action.edit'),
           buttonType: 'primary',
           buttonSize: 'mini'
         },
@@ -332,12 +332,12 @@ export default {
         sortable: false
       },
       {
-        headerName: '删除', field: 'shop_id',
+        headerName: this.$t('action.delete'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.deleteSingle,
-            label: '删除',
+            label: this.$t('action.delete'),
             buttonType: 'danger',
             buttonSize: 'mini'
           }
@@ -350,12 +350,12 @@ export default {
         sortable: false
       },
       {
-        headerName: '播放', field: 'id',
+        headerName: this.$t('broadcast.play'), field: 'id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: () => { param.data.playing ? this.stopBroadcast(param.data) : this.playBroadcast(param.data) },
-            label: param.data.playing ? '停止' : '播放',
+            label: param.data.playing ? this.$t('broadcast.stop') : this.$t('broadcast.play'),
             buttonType: param.data.playing ? 'danger' : 'primary',
             buttonSize: 'mini',
             disabled: param.data.broadcast_mode !== 1 || !param.data.status
@@ -410,9 +410,9 @@ export default {
       this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
     },
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Broadcast.remove(ids).then(
@@ -420,7 +420,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -432,7 +432,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -628,11 +628,11 @@ export default {
 
           API_Broadcast.add(this.formmodel).then(() => {
             this.formshow = false
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
             this.getList()
           })
         } else {
-          this.$message.error('表单填写错误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
         }
       })
     },
@@ -693,10 +693,10 @@ export default {
       this.websock.onclose = this.websocketclose
     },
     websocketonopen: function() {
-      console.log('WebSocket连接成功')
+      console.log(this.$t('action.webSocketSuccess'))
     },
     websocketonerror: function(e) {
-      console.log('WebSocket连接发生错误')
+      console.log(this.$t('action.webSocketError'))
     },
     websocketonmessage: function(e) {
       this.scheduledIds = JSON.parse(e.data)

+ 29 - 28
src/views/ncs-channel/index.vue

@@ -18,10 +18,10 @@
       <!--        @rowDoubleClicked="getList"-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
-          <el-button type="primary" size="mini" @click="createChannel">新增频道</el-button>
+          <el-button type="primary" size="mini" @click="createChannel">{{ this.$t('channel.channelAdd') }}</el-button>
         </div>
       </div>
       <el-pagination
@@ -42,12 +42,12 @@
 
           <el-row>
             <el-col :span="24">
-              <el-form-item label="频道名称" prop="channel_name">
+              <el-form-item :label="this.$t('channel.channelName')" prop="channel_name">
                 <el-input
                   v-model="formmodel.channel_name"
                   clearable
                   :maxlength="100"
-                  placeholder="请输入频道名称"
+                  :placeholder="this.$t('channel.inputChannelName')"
                 />
               </el-form-item>
             </el-col>
@@ -56,15 +56,15 @@
 
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="formshow = false">取 消</el-button>
-        <el-button type="primary" @click="handlerFormSubmit('editform')">确 定</el-button>
+        <el-button @click="formshow = false">{{ this.$t('action.cancel') }}</el-button>
+        <el-button type="primary" @click="handlerFormSubmit('editform')">{{ this.$t('action.yes') }}</el-button>
       </div>
     </el-dialog>
     <el-dialog :title.sync="subscribeTitle" :visible.sync="formSubscribe" width="50%">
 
       <div>
         <fieldset v-for="(item,index) in channelSubscribers" v-if="item.roleName!=='管理员'" :key="index" style="margin-top: 10px">
-          <legend><span style="margin-right: 10px">{{ item.roleName }} </span><el-checkbox v-model="item.allCkeck" style="float: right;" :indeterminate="item.indeterminate" @change="(checked)=>{handleCheckAll(checked,item)}">全选</el-checkbox></legend>
+          <legend><span style="margin-right: 10px">{{ item.roleName }} </span><el-checkbox v-model="item.allCkeck" style="float: right;" :indeterminate="item.indeterminate" @change="(checked)=>{handleCheckAll(checked,item)}">{{ choiceAll }}</el-checkbox></legend>
           <el-row :gutter="20" type="flex" style="padding: 10px">
             <el-col :span="24">
               <el-checkbox v-for="(clerk,_index) in item.clerks" :key="_index" v-model="clerk.checked" @change="handleCheckboxChanged(item)">{{ clerk.clerk_name }}</el-checkbox>
@@ -73,8 +73,8 @@
         </fieldset>
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="formSubscribe = false">取 消</el-button>
-        <el-button type="primary" @click="handlerSubscribeSubmit">确 定</el-button>
+        <el-button @click="formSubscribe = false">{{ this.$t('action.cancel') }}</el-button>
+        <el-button type="primary" @click="handlerSubscribeSubmit">{{ this.$t('action.yes') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -133,7 +133,8 @@ export default {
       frameworkComponents: null,
       /** 频道订阅者情况数组 */
       channelSubscribers: [],
-      subscribeTitle: ''
+      subscribeTitle: '',
+      choiceAll: this.$t('action.choiceAll')
     }
   },
   computed: {
@@ -157,13 +158,13 @@ export default {
       },
       { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 130 },
       {
-        headerName: '频道名称', field: 'channel_name', sortable: true, filter: 'agTextColumnFilter', flex: 1
+        headerName: this.$t('channel.channelName'), field: 'channel_name', sortable: true, filter: 'agTextColumnFilter', flex: 1
       },
       // lockPosition 锁定位置,会在第一列
       // lockPinned = true 不能拖动然后固定
       // resizeable 单元个大小是否可以调整
       {
-        headerName: '创建时间',
+        headerName: this.$t('action.createTime'),
         field: 'create_time',
         sortable: true,
         filter: 'agNumberColumnFilter',
@@ -171,11 +172,11 @@ export default {
         valueFormatter: this.unixDateFormatter
       },
       {
-        headerName: '编辑', field: 'id',
+        headerName: this.$t('action.edit'), field: 'id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: {
           onClick: this.handEdit,
-          label: '编辑',
+          label: this.$t('action.edit'),
           buttonType: 'primary',
           buttonSize: 'mini'
         },
@@ -188,11 +189,11 @@ export default {
       },
 
       {
-        headerName: '订阅管理', field: 'id',
+        headerName: this.$t('channel.subscribeManage'), field: 'id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: {
           onClick: this.manageSubscribe,
-          label: '订阅管理',
+          label: this.$t('channel.subscribeManage'),
           buttonType: 'success',
           buttonSize: 'mini'
         },
@@ -205,12 +206,12 @@ export default {
       },
 
       {
-        headerName: '删除', field: 'id',
+        headerName: this.$t('action.delete'), field: 'id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.deleteSingle,
-            label: '删除',
+            label: this.$t('action.delete'),
             buttonType: 'danger',
             buttonSize: 'mini'
           }
@@ -256,9 +257,9 @@ export default {
       this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
     },
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Channel.remove(ids).then(
@@ -266,7 +267,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -278,7 +279,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -414,18 +415,18 @@ export default {
 
             API_Channel.add(this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('新增成功!')
+              this.$message.success(this.$t('action.addSuccess'))
               this.getList()
             })
           } else {
             API_Channel.update(this.formmodel.id, this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('修改成功!')
+              this.$message.success(this.$t('action.editSuccess'))
               this.getList()
             })
           }
         } else {
-          this.$message.error('表单填写错误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
         }
       })
     },
@@ -437,7 +438,7 @@ export default {
       })
       API_Channel.setChannelSubscribers({ channel_id: this.formmodel.id, member_ids: subscribeIds.length === 0 ? null : [...subscribeIds] }).then(() => {
         this.formSubscribe = false
-        this.$message.success('修改成功!')
+        this.$message.success(this.$t('action.editSuccess'))
       })
     },
     manageSubscribe(row) {
@@ -453,7 +454,7 @@ export default {
           this.$set(item, 'indeterminate', (checkedLength !== 0) && (item.clerks.length !== checkedLength))
         })
       })
-      this.subscribeTitle = row.channel_name + '订阅管理'
+      this.subscribeTitle = row.channel_name + this.$t('channel.subscribeManage')
       this.formSubscribe = true
     },
     getEmployees() {

+ 2 - 2
src/views/ncs-device/components/deviceManager.vue

@@ -184,8 +184,8 @@
         </el-row>
         <el-row v-if="hasSosDeviceSettings">
           <el-col :span="12">
-            <el-form-item :label="this.$t('deviceManage.sosDeviceSetting')" prop="type">
-              <el-select v-model="sosDeviceSetting.type" :placeholder="this.$t('deviceManage.sosDeviceSetting')" clearable>
+            <el-form-item :label="this.$t('deviceManage.sosDeviceSettingType')" prop="type">
+              <el-select v-model="sosDeviceSetting.type" :placeholder="this.$t('deviceManage.sosDeviceSettingType')" clearable>
 <!--                <el-option v-for="item in sosDeviceSettingsTypeOptions" :key="item.value" :label="item.label" :value="item.value" /><el-option v-for="(item, index) in Object.keys(sosDeviceSettingEnum)" :key="index" :label="sosDeviceSettingEnum[item]" :value="parseInt(item)" />-->
                 <el-option v-for="(item, index) in Object.keys(sosDeviceSettingEnum)" :key="index" :label="sosDeviceSettingEnum[item]" :value="parseInt(item)" />
               </el-select>

+ 2 - 2
src/views/ncs-device/device-edit.vue

@@ -287,14 +287,14 @@ export default {
             params.part_id = this.$store.getters.partId
             params.frame_id = this.frameId
             API_Device.add(params).then(() => {
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.handlerAdd()
               this.$emit('saved')
             })
           } else {
             /** 修改 */
             API_Device.update(params.id, params).then(() => {
-              this.$message.success('修改成功!')
+              this.$message.success(this.$t('action.editSuccess'))
               // this.handlerAdd()
               this.$emit('saved')
             }).catch(response => {

+ 4 - 4
src/views/ncs-device/deviceInfo.vue

@@ -12,7 +12,7 @@
       <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" @click="handleAddDeviceInfo">新增</el-button>
@@ -146,9 +146,9 @@ export default {
     handlerDelete(ids) {
       const test = '你确定要删除此设备信息?'
       const _this = this
-      this.$confirm(test, '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(test, this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Device.remove(ids).then(

+ 7 - 7
src/views/ncs-device/index.vue

@@ -13,7 +13,7 @@
       <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-switch
@@ -155,9 +155,9 @@ export default {
     },
     /** 删除单条数据 */
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_Device.remove(ids).then(
@@ -165,7 +165,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -177,7 +177,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -185,7 +185,7 @@ export default {
     batchDelete: function() {
       if (this.multipleSelection.length === 0) {
         this.$alert('没有选择任何记录!', '系统提示', {
-          confirmButtonText: '确定',
+          confirmButtonText: this.$t('action.yes'),
           callback: action => {
           }
         })

+ 50 - 50
src/views/ncs-event/index.vue

@@ -17,10 +17,10 @@
       <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
-          <el-button type="primary" size="mini" @click="handleAdd">新增</el-button>
+          <el-button type="primary" size="mini" @click="handleAdd">{{ this.$t('action.add') }}</el-button>
         </div>
       </div>
       <el-pagination
@@ -39,42 +39,42 @@
       <image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="srcList" />
     </template>
     <!--编辑表单-->
-    <el-dialog title="编辑按钮事件" :visible.sync="formshow" width="50%">
+    <el-dialog :title="this.$t('event.eventEdit')" :visible.sync="formshow" width="50%">
       <div>
         <el-form ref="editform" :rules="rules" label-width="140px" :model="formmodel">
-          <el-form-item label="名称" prop="name">
-            <el-input v-model="formmodel.name" placeholder="请输入名称" :maxlength="20" />
+          <el-form-item :label="this.$t('event.name')" prop="name">
+            <el-input v-model="formmodel.name" :placeholder="this.$t('event.inputName')" :maxlength="20" />
           </el-form-item>
-          <el-form-item label="描述" prop="desc">
-            <el-input v-model="formmodel.desc" type="textarea" rows="2" placeholder="请输入描述" maxlength="50" show-word-limit />
+          <el-form-item :label="this.$t('event.desc')" prop="desc">
+            <el-input v-model="formmodel.desc" type="textarea" rows="2" :placeholder="this.$t('event.inputDesc')" maxlength="50" show-word-limit />
           </el-form-item>
-          <el-form-item label="唯一标识码" prop="key_code">
-            <el-input v-model="formmodel.key_code" placeholder="请输入唯一标识码" :maxlength="20" />
+          <el-form-item :label="this.$t('event.keyCode')" prop="key_code">
+            <el-input v-model="formmodel.key_code" :placeholder="this.$t('event.inputKeyCode')" :maxlength="20" />
           </el-form-item>
-          <el-form-item label="x坐标范围" prop="min_x">
-            <el-input-number v-model="formmodel.min_x" :min="0" :max="10000" placeholder="最小x轴" @change="handleChangeMinX" />至
-            <el-input-number v-model="formmodel.max_x" :min="0" :max="10000" placeholder="最大x轴" @change="handleChangeMaxX" />
+          <el-form-item :label="this.$t('event.coordinateX')" prop="min_x">
+            <el-input-number v-model="formmodel.min_x" :min="0" :max="10000" :placeholder="this.$t('event.minX')" @change="handleChangeMinX" />至
+            <el-input-number v-model="formmodel.max_x" :min="0" :max="10000" :placeholder="this.$t('event.manX')" @change="handleChangeMaxX" />
           </el-form-item>
-          <el-form-item label="y坐标范围" prop="min_y">
-            <el-input-number v-model="formmodel.min_y" :min="0" :max="10000" placeholder="最小y轴" @change="handleChangeMinY" />至
-            <el-input-number v-model="formmodel.max_y" :min="0" :max="10000" placeholder="最大y轴" @change="handleChangeMaxY" />
+          <el-form-item :label="this.$t('event.coordinateY')" prop="min_y">
+            <el-input-number v-model="formmodel.min_y" :min="0" :max="10000" :placeholder="this.$t('event.minY')" @change="handleChangeMinY" />至
+            <el-input-number v-model="formmodel.max_y" :min="0" :max="10000" :placeholder="this.$t('event.manY')" @change="handleChangeMaxY" />
           </el-form-item>
 
-          <el-form-item label="排序" prop="sort">
-            <el-input-number v-model="formmodel.sort" :min="1"  placeholder="排序"  />
+          <el-form-item :label="this.$t('action.sort')" prop="sort">
+            <el-input-number v-model="formmodel.sort" :min="1"  :placeholder="this.$t('action.sort')"  />
           </el-form-item>
-          <el-form-item label="设备类型" prop="type">
-            <el-select v-model="formmodel.type" placeholder="请选择类型">
-              <el-option label="遥控器" value="遥控器" />
-              <el-option label="SOS紧急按钮" value="SOS紧急按钮" />
+          <el-form-item :label="this.$t('event.deviceType')" prop="type">
+            <el-select v-model="formmodel.type" :placeholder="this.$t('event.choiceDeviceType')">
+              <el-option :label="this.$t('event.remoteControl')" value="遥控器" />
+              <el-option :label="this.$t('event.emergencyButton')" value="SOS紧急按钮" />
             </el-select>
           </el-form-item>
-          <el-form-item label="适用角色" prop="role_id">
-            <el-select v-model="formmodel.role_id" placeholder="适用角色" clearable>
+          <el-form-item :label="this.$t('event.roleName')" prop="role_id">
+            <el-select v-model="formmodel.role_id" :placeholder="this.$t('event.roleName')" clearable>
               <el-option v-for="item in rolesOptions" :key="item.role_id" :label="item.role_name" :value="item.role_id" />
             </el-select>
           </el-form-item>
-          <el-form-item label="图标">
+          <el-form-item :label="this.$t('event.icon')">
             <el-upload
               class="avatar-uploader"
               :action="`${uploadurl}?scene=avatar`"
@@ -89,8 +89,8 @@
         </el-form>
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="formshow = false">取 消</el-button>
-        <el-button type="primary" @click="handlerFormSubmit('editform')">确 定</el-button>
+        <el-button @click="formshow = false">{{ this.$t('action.cancel') }}</el-button>
+        <el-button type="primary" @click="handlerFormSubmit('editform')">{{ this.$t('action.yes') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -121,10 +121,10 @@ export default {
       /** 表单校验 */
       rules: {
         name: [
-          { required: true, message: '请输入名称', trigger: 'blur' }
+          { required: true, message: this.$t('event.inputName'), trigger: 'blur' }
         ],
         role_id: [
-          { required: true, message: '请选择适用人', trigger: 'blur' }
+          { required: true, message: this.$t('event.choiceRoleName'), trigger: 'blur' }
         ]
       },
       pageData: [],
@@ -170,7 +170,7 @@ export default {
         resizable: false,
         valueGetter: this.hashValueGetter
       },
-      { headerName: '图标', field: 'icon_src', sortable: true, filter: false, width: 70,
+      { headerName: this.$t('event.icon'), field: 'icon_src', sortable: true, filter: false, width: 70,
         cellRendererFramework: 'AgGridImg',
         cellRendererParams: param => {
           return {
@@ -179,25 +179,25 @@ export default {
           }
         }
       },
-      { headerName: '名称', field: 'name', sortable: true },
-      { headerName: '描述', field: 'desc', sortable: true},
-      { headerName: '唯一标识码', field: 'key_code', sortable: true },
-      { headerName: 'x轴范围', field: 'min_x', sortable: true, filter: false, valueFormatter: this.formatterX },
-      { headerName: 'y轴范围', field: 'min_y', sortable: true, filter: false, valueFormatter: this.formatterY },
-      { headerName: '排序', field: 'sort', sortable: true, filter: true },
-      { headerName: '创建时间', field: 'create_time', sortable: true, valueFormatter: this.formatterDate, filter: 'agDateColumnFilter',
+      { headerName: this.$t('event.name'), field: 'name', sortable: true },
+      { headerName: this.$t('event.desc'), field: 'desc', sortable: true},
+      { headerName: this.$t('event.keyCode'), field: 'key_code', sortable: true },
+      { headerName: this.$t('event.coordinateX'), field: 'min_x', sortable: true, filter: false, valueFormatter: this.formatterX },
+      { headerName: this.$t('event.coordinateY'), field: 'min_y', sortable: true, filter: false, valueFormatter: this.formatterY },
+      { headerName: this.$t('action.sort'), field: 'sort', sortable: true, filter: true },
+      { headerName: this.$t('action.createTime'), field: 'create_time', sortable: true, valueFormatter: this.formatterDate, filter: 'agDateColumnFilter',
         filterParams: {
           comparator: (filterLocalDateAtMidnight, cellValue) => { // 所有数据都由服务器端过滤,此处只需返回0 即可
             const celldate = unixToDate(cellValue, 'yyyy-MM-dd 00:00:00')
             return (new Date(celldate).getTime() / 1000) - (filterLocalDateAtMidnight.getTime() / 1000)
           }
         }},
-      { headerName: '编辑', field: 'id',
+      { headerName: this.$t('action.edit'), field: 'id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.handlerEdit,
-            label: '编辑',
+            label: this.$t('action.edit'),
             buttonType: 'primary',
             buttonSize: 'mini'
           }
@@ -209,12 +209,12 @@ export default {
         resizable: false,
         sortable: false
       },
-      { headerName: '删除', field: 'id',
+      { headerName: this.$t('action.delete'), field: 'id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.deleteSingle,
-            label: '删除',
+            label: this.$t('action.delete'),
             buttonType: 'danger',
             buttonSize: 'mini'
           }
@@ -277,9 +277,9 @@ export default {
     },
     /** 单条数据删除处理 */
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_event.remove(ids).then(
@@ -287,7 +287,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -299,7 +299,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -387,11 +387,11 @@ export default {
         const isLt2M = file.size / 1024 / 1024 < 2
 
         if (!isImg) {
-          this.$message.error('上传头像图片只能是 JPG、PNG、GIF 格式!')
+          this.$message.error(this.$t('action.uploaderImg2'))
           reject()
         }
         if (!isLt2M) {
-          this.$message.error('上传头像图片大小不能超过 2MB!')
+          this.$message.error(this.$t('action.uploaderSize2'))
           reject()
         }
         const reader = new FileReader()
@@ -401,15 +401,15 @@ export default {
             const width = image.width
             const height = image.height
             if (width > 500 || width < 100) {
-              this.$message.error('图片宽度必须在100~500之间,宽高比为1:1!')
+              this.$message.error(this.$t('action.uploaderImgMsg'))
               reject()
             }
             if (width !== height) {
-              this.$message.error('请上传宽高比为1:1的图片')
+              this.$message.error(this.$t('action.uploaderImgMsg2'))
               reject()
             }
             if (height > 500 || height < 100) {
-              this.$message.error('图片高度必须在100~500之间!')
+              this.$message.error(this.$t('action.uploaderImgMsg3'))
               reject()
             }
             resolve()

+ 36 - 48
src/views/ncs-interaction/index.vue

@@ -18,26 +18,26 @@
       <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入发起方或接收方" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('interaction.interactionKeywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
 
           <el-form label-width="120px">
-            <el-form-item label="搜索时间段">
+            <el-form-item :label="this.$t('action.searchDateRange')">
               <el-date-picker
                 v-model="searchDateRange"
                 type="daterange"
                 align="right"
                 unlink-panels
                 value-format="yyyy/MM/dd"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
+                :range-separator="this.$t('action.to')"
+                :start-placeholder="this.$t('action.startDate')"
+                :end-placeholder="this.$t('action.endDate')"
                 :picker-options="pickerOptions"
                 :default-time="['00:00:00', '23:59:59']"
                 @change="dateRangeChange"
               />
-              <el-button type="danger" @click="batchDelete">删除</el-button>
+              <el-button type="danger" @click="batchDelete">{{ this.$t('action.delete') }}</el-button>
             </el-form-item>
 
           </el-form>
@@ -71,7 +71,7 @@ export default {
     return {
       pickerOptions: {
         shortcuts: [{
-          text: '最近一周',
+          text: this.$t('action.lastWeek'),
           onClick(picker) {
             const end = new Date()
             const start = new Date()
@@ -79,7 +79,7 @@ export default {
             picker.$emit('pick', [start, end])
           }
         }, {
-          text: '最近一个月',
+          text: this.$t('action.lastMonth'),
           onClick(picker) {
             const end = new Date()
             const start = new Date()
@@ -87,7 +87,7 @@ export default {
             picker.$emit('pick', [start, end])
           }
         }, {
-          text: '最近三个月',
+          text: this.$t('action.lastThreeMonths'),
           onClick(picker) {
             const end = new Date()
             const start = new Date()
@@ -141,14 +141,14 @@ export default {
         resizable: false,
         valueGetter: this.hashValueGetter
       },
-      { headerName: '发起方', field: 'fromMemberName', sortable: false, valueFormatter: this.formatterFromName, minWidth: 150 },
-      { headerName: '接收方', field: 'toMemberName', sortable: false, valueFormatter: this.formatterToName, minWidth: 150 },
-      { headerName: '交互类型', field: 'action_type', sortable: true, valueFormatter: this.formatterType, width: 100 },
-      { headerName: '交互结果', field: 'action_end', sortable: true, cellRenderer: this.formatterResult, width: 100 },
-      { headerName: '交互数据', field: 'data', sortable: true, width: 120 },
-      { headerName: '交互时间', field: 'create_date', sortable: true, valueFormatter: this.formatterDate, width: 150 },
-      { headerName: '发起设备', field: 'from_device_type', sortable: true, valueFormatter: this.formatterDeviceType, width: 120 },
-      { headerName: '接收设备', field: 'to_device_type', sortable: true, valueFormatter: this.formatterDeviceType, width: 120 }
+      { headerName: this.$t('interaction.fromMemberName'), field: 'fromMemberName', sortable: false, valueFormatter: this.formatterFromName, minWidth: 150 },
+      { headerName: this.$t('interaction.toMemberName'), field: 'toMemberName', sortable: false, valueFormatter: this.formatterToName, minWidth: 150 },
+      { headerName: this.$t('interaction.actionType'), field: 'action_type', sortable: true, valueFormatter: this.formatterType, width: 100 },
+      { headerName: this.$t('interaction.actionEnd'), field: 'action_end', sortable: true, cellRenderer: this.formatterResult, width: 100 },
+      { headerName: this.$t('interaction.data'), field: 'data', sortable: true, width: 120 },
+      { headerName: this.$t('interaction.createDate'), field: 'create_date', sortable: true, valueFormatter: this.formatterDate, width: 150 },
+      { headerName: this.$t('interaction.fromDevice'), field: 'from_device_type', sortable: true, valueFormatter: this.formatterDeviceType, width: 120 },
+      { headerName: this.$t('interaction.toDevice'), field: 'to_device_type', sortable: true, valueFormatter: this.formatterDeviceType, width: 120 }
     ]
     this.defaultColDef = {
       filter: false,
@@ -177,7 +177,7 @@ export default {
     batchDelete: function() {
       const rows = this.gridApi.getSelectedRows()
       if (rows.length === 0) {
-        this.$message({ type: 'info', message: '请先勾选需要删除的数据' })
+        this.$message({ type: 'info', message: this.$t('action.pleaseChoiceDelete') })
         return
       }
       const ids = []
@@ -188,9 +188,9 @@ export default {
     },
     /** 删除单条数据 */
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_interaction.remove(ids).then(
@@ -198,7 +198,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -210,7 +210,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -308,44 +308,32 @@ export default {
     formatterType(param) {
       switch (param.value) {
         case 'CALLBACK':
-          return 'TCP反馈'
+          return this.$t('tcpType.CALLBACK')
         case 'VOICE':
-          return '语音'
+          return this.$t('tcpType.VOICE')
         case 'VIDEO':
-          return '视频'
-        case 'SOS':
-          return '紧急呼叫'
-        case 'REINFORCE':
-          return '增援'
+          return this.$t('tcpType.VIDEO')
         case 'IM':
-          return '留言'
+          return this.$t('tcpType.IM')
         case 'DEVICE':
-          return '设备'
+          return this.$t('tcpType.DEVICE')
         case 'DATA':
-          return '数据'
+          return this.$t('tcpType.DATA')
         case 'EVENT':
-          return '事件'
-        case 'SIDE':
-          return '边外信息'
+          return this.$t('tcpType.EVENT')
         case 'BROADCAST':
-          return '广播'
+          return this.$t('tcpType.BROADCAST')
         case 'TIME':
-          return '时间'
-        case 'ENTRACEGUARD':
-          return '门禁'
-        case 'CHANNELIM':
-          return '频道留言'
-        case 'LOCATION':
-          return '定位'
+          return this.$t('tcpType.TIME')
         default:
-          return '未知'
+          return this.$t('tcpType.UNKNOWN')
       }
     },
     formatterResult(param) {
       if (param.value) {
-        return '<span style="color:green">成功</span>'
+        return '<span style="color:green">' + this.$t('interaction.success') + '</span>'
       } else if (!param.value) {
-        return '<span style="color:red">未响应</span>'
+        return '<span style="color:red">' + this.$t('interaction.notOperated') + '</span>'
       }
     },
     formatterDeviceType(param) {
@@ -355,7 +343,7 @@ export default {
         if (param.value) {
           return returnDeviceType(param.value)
         } else {
-          return '暂未响应'
+          return this.$t('interaction.notOperated')
         }
       }
     },

+ 3 - 3
src/views/ncs-menu/menuManager.vue

@@ -137,7 +137,7 @@ export default {
           if (id) {
             API_Menus.editMenu(id, this.menuForm).then(response => {
               this.dialogMenuVisible = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.GET_Memus()
             })
           } else {
@@ -150,11 +150,11 @@ export default {
                 data.children.push(response)
               }
               this.dialogMenuVisible = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
             })
           }
         } else {
-          this.$message.error('表单填写有误,请检查!')
+          this.$message.error(this.$t('action.fromError'))
           return false
         }
       })

+ 41 - 40
src/views/ncs-nurse-config/index.vue

@@ -21,13 +21,13 @@
           stripe
           @row-click="tableClick"
         >
-          <el-table-column prop="config_name" label="护理名" width="120px" />
+          <el-table-column prop="config_name" :label="this.$t('nurseConfig.configName')" width="120px" />
           <el-table-column
             width="160px"
             align="right"
           >
             <template slot="header" slot-scope="scope">
-              <el-button type="primary" size="mini" @click="addNurseConfig(1,null,1)">添加护理参数</el-button>
+              <el-button type="primary" size="mini" @click="addNurseConfig(1,null,1)">{{ configAdd }}</el-button>
             </template>
             <template slot-scope="scope">
               <!--              <el-button-->
@@ -62,13 +62,13 @@
         <!--        &lt;!&ndash;        <el-header style="text-align: right; font-size: 12px;height: 30px">当前选择:<h4>{{pName}}</h4></el-header>&ndash;&gt;-->
         <!--        <el-table v-loading="listLoading" :data="tagList2" highlight-current-row stripe class="mytable">-->
         <!--          <el-table-column v-if="false" prop="id" />-->
-        <!--          <el-table-column prop="option_name" label="护理项名" />-->
-        <!--          <el-table-column prop="nursecfg_color" label="颜色标识" width="160" align="center">-->
+        <!--          <el-table-column prop="option_name" :label="护理项名" />-->
+        <!--          <el-table-column prop="nursecfg_color" :label="颜色标识" width="160" align="center">-->
         <!--            <template slot-scope="scope">-->
         <!--              <el-button :style="'width: 120px;height: 30px;background-color: #'+scope.row.color_rgb" />-->
         <!--            </template>-->
         <!--          </el-table-column>-->
-        <!--          <el-table-column label="" width="140">-->
+        <!--          <el-table-column :label="" width="140">-->
         <!--            <template slot-scope="scope">-->
         <!--              <el-button type="primary" icon="el-icon-edit" circle @click.native.prevent="updateRow(scope.$index, scope.row, 2)" />-->
         <!--              <el-button type="danger" icon="el-icon-delete" circle @click.native.prevent="deleteRow(scope.$index, scope.row,2)" />-->
@@ -93,10 +93,10 @@
           <!--        @rowDoubleClicked="getList"-->
           <div slot="toolbar" class="inner-toolbar">
             <div class="toolbar-search">
-              <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+              <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
             </div>
             <div class="toolbar-btns">
-              <el-button type="primary" size="mini" @click="addOption">新增护理项</el-button>
+              <el-button type="primary" size="mini" @click="addOption">{{ this.$t('nurseConfig.optionAdd') }}</el-button>
             </div>
           </div>
           <el-pagination
@@ -128,9 +128,9 @@
     <!--        <el-table :data="tagList1" highlight-current-row v-loading="listLoading" stripe-->
     <!--                  @cell-click="tableClick" class="mytable">-->
     <!--          <el-table-column v-if="false" prop="id"></el-table-column>-->
-    <!--          <el-table-column prop="config_name" label="护理名"></el-table-column>-->
+    <!--          <el-table-column prop="config_name" :label="护理名"></el-table-column>-->
     <!--          <el-table-column-->
-    <!--                  label=""-->
+    <!--                  :label=""-->
     <!--                  width="180">-->
     <!--            <template slot-scope="scope">-->
     <!--              <el-button type="success" icon="el-icon-circle-plus-outline" circle-->
@@ -150,13 +150,13 @@
     <!--        </el-row>-->
     <!--        <el-table :data="tagList2" highlight-current-row v-loading="listLoading" stripe class="mytable">-->
     <!--          <el-table-column v-if="false" prop="id"></el-table-column>-->
-    <!--          <el-table-column prop="option_name" label="护理项名"></el-table-column>-->
-    <!--          <el-table-column prop="nursecfg_color" label="颜色标识" width="160" align="center">-->
+    <!--          <el-table-column prop="option_name" :label="护理项名"></el-table-column>-->
+    <!--          <el-table-column prop="nursecfg_color" :label="颜色标识" width="160" align="center">-->
     <!--            <template slot-scope="scope">-->
     <!--              <el-button :style="'width: 120px;height: 30px;background-color: #'+scope.row.color_rgb" />-->
     <!--            </template>-->
     <!--          </el-table-column>-->
-    <!--          <el-table-column label="" width="140">-->
+    <!--          <el-table-column :label="" width="140">-->
     <!--            <template slot-scope="scope">-->
     <!--              <el-button type="primary" icon="el-icon-edit" circle @click.native.prevent="updateRow(scope.$index, scope.row, 2)"></el-button>-->
     <!--              <el-button type="danger" icon="el-icon-delete" circle @click.native.prevent="deleteRow(scope.$index, scope.row,2)"></el-button>-->
@@ -168,31 +168,31 @@
     <!--新增护理界面-->
     <el-dialog v-model="addFormVisible" :title="myTitle" :visible.sync="addFormVisible" :close-on-click-modal="false">
       <el-form ref="addForm" :model="addForm" label-width="140px" :rules="addFormRules">
-        <el-form-item label="护理名" prop="config_name">
+        <el-form-item :label="this.$t('nurseConfig.configName')" prop="config_name">
           <el-input v-model="addForm.config_name" maxlength="12" />
         </el-form-item>
-        <el-form-item label="排序" prop="index_no">
+        <el-form-item :label="this.$t('action.sort')" prop="index_no">
           <el-input-number v-model="addForm.index_no" :min="1" :max="100" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click.native="addFormVisible = false">取消</el-button>
-        <el-button type="primary" :loading="addOptionLoading" @click.native="addSubmit">提交</el-button>
+        <el-button @click.native="addFormVisible = false">{{ this.$t('action.cancel') }}</el-button>
+        <el-button type="primary" :loading="addOptionLoading" @click.native="addSubmit">{{ this.$t('action.submit') }}</el-button>
       </div>
     </el-dialog>
     <!--新增护理项界面-->
     <el-dialog v-model="addFormOptionVisible" :title="myTitle" :visible.sync="addFormOptionVisible" :close-on-click-modal="false">
       <el-form ref="addOptionForm" :model="addOptionForm" label-width="140px" :rules="addFormRules">
-        <el-form-item label="护理项名" prop="option_name">
+        <el-form-item :label="this.$t('nurseConfig.optionName')" prop="option_name">
           <el-input v-model="addOptionForm.option_name" maxlength="12" />
         </el-form-item>
-        <el-form-item label="护理灯颜色">
+        <el-form-item :label="this.$t('nurseConfig.optionColor')">
           <colorPicker v-model="addOptionForm.color_rgb" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click.native="addFormOptionVisible = false">取消</el-button>
-        <el-button type="primary" :loading="addOptionLoading" @click.native="addOptionSubmit">提交</el-button>
+        <el-button @click.native="addFormOptionVisible = false">{{ this.$t('action.cancel') }}</el-button>
+        <el-button type="primary" :loading="addOptionLoading" @click.native="addOptionSubmit">{{ this.$t('action.submit') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -222,10 +222,10 @@ export default {
       addLoading: false,
       addFormRules: {
         config_name: [
-          { required: true, message: '请输入护理名称', trigger: 'blur' }
+          { required: true, message: this.$t('nurseConfig.inputConfigName'), trigger: 'blur' }
         ],
         option_name: [
-          { required: true, message: '请输入护理项名称', trigger: 'blur' }
+          { required: true, message: this.$t('nurseConfig.inputOptionName'), trigger: 'blur' }
         ]
       },
       addFormOptionVisible: false,
@@ -258,7 +258,8 @@ export default {
       columnApi: null,
       localeText: AG_GRID_LOCALE_CN,
       filterState: null,
-      rowSelection: null
+      rowSelection: null,
+      configAdd: this.$t('nurseConfig.configAdd')
     }
   },
   computed: {
@@ -280,8 +281,8 @@ export default {
         resizable: false,
         valueGetter: this.hashValueGetter
       },
-      { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter' },
-      { headerName: '护理项名称', field: 'option_name', sortable: true, flex: 1, filter: 'agTextColumnFilter', filterParams: {
+      { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 80 },
+      { headerName: this.$t('nurseConfig.optionName'), field: 'option_name', sortable: true, flex: 1, filter: 'agTextColumnFilter', filterParams: {
         debounceMs: 200,
         newRowsAction: 'keep'
       }
@@ -289,15 +290,15 @@ export default {
       // lockPosition 锁定位置,会在第一列
       // lockPinned = true 不能拖动然后固定
       // resizeable 单元个大小是否可以调整
-      { headerName: '颜色标识', field: 'color_rgb', sortable: true, filter: false,
+      { headerName: this.$t('nurseConfig.colorRgb'), field: 'color_rgb', sortable: true, filter: false,
         cellRenderer: this.colorFormatter
       },
 
-      { headerName: '编辑',
+      { headerName: this.$t('action.edit'),
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: {
           onClick: this.handEdit,
-          label: '编辑',
+          label: this.$t('action.edit'),
           buttonType: 'primary',
           buttonSize: 'mini'
         },
@@ -307,12 +308,12 @@ export default {
         width: 100,
         resizable: false,
         sortable: false },
-      { headerName: '删除',
+      { headerName: this.$t('action.delete'),
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.deleteSingle,
-            label: '删除',
+            label: this.$t('action.delete'),
             buttonType: 'danger',
             buttonSize: 'mini',
             disabled: param.data['member_name'] === 'superadmin'
@@ -387,7 +388,7 @@ export default {
       this.type = type
       this.addOredit = 'add'
       if (type === 1) {
-        this.myTitle = '新增护理'
+        this.myTitle = this.$t('nurseConfig.configAdd')
         this.addFormVisible = true
         this.addForm = {
           index_no: 1
@@ -398,7 +399,7 @@ export default {
           color_rgb: '#000000'
         }
         this.pid = row.id
-        this.myTitle = '新增护理项'
+        this.myTitle = this.$t('nurseConfig.optionAdd')
         this.addFormOptionVisible = true
       }
     },
@@ -418,7 +419,7 @@ export default {
             API_NcsNurseConfigOption.add(classEntity).then(r => {
               _this.gettagList2()
               _this.$message({
-                message: '新增成功!',
+                message: this.$t('action.addSuccess'),
                 type: 'success'
               })
             })
@@ -426,7 +427,7 @@ export default {
             API_NcsNurseConfigOption.update(this.addOptionForm.id, this.addOptionForm).then(r => {
               _this.gettagList2()
               _this.$message({
-                message: '修改成功!',
+                message: this.$t('action.editSuccess'),
                 type: 'success'
               })
             })
@@ -446,7 +447,7 @@ export default {
             API_NcsNurseConfig.add(classEntity).then(r => {
               _this.gettagList1()
               _this.$message({
-                message: '新增成功!',
+                message: this.$t('action.addSuccess'),
                 type: 'success'
               })
             })
@@ -454,7 +455,7 @@ export default {
             API_NcsNurseConfig.update(this.addForm.id, this.addForm).then(r => {
               _this.gettagList1()
               _this.$message({
-                message: '修改成功!',
+                message: this.$t('action.editSuccess'),
                 type: 'success'
               })
             })
@@ -471,7 +472,7 @@ export default {
     },
     updateRow(index, row, type) {
       this.addOredit = 'edit'
-      this.myTitle = '修改护理'
+      this.myTitle = this.$t('nurseConfig.configEdit')
       if (type === 1) {
         this.addForm = { ...row }
         this.addFormVisible = true
@@ -502,12 +503,12 @@ export default {
     deleteRow(index, row, type) {
       this.type = type
       const _this = this
-      this.$confirm('删除提交吗?', '提示', {}).then(() => {
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {}).then(() => {
         if (type === 1) {
           API_NcsNurseConfig.remove(row.id).then(r => {
             _this.gettagList1()
             _this.$message({
-              message: '删除成功!',
+              message: this.$t('action.deleted'),
               type: 'success'
             })
           })
@@ -515,7 +516,7 @@ export default {
           API_NcsNurseConfigOption.remove(row.id).then(r => {
             _this.gettagList2()
             _this.$message({
-              message: '删除成功!',
+              message: this.$t('action.deleted'),
               type: 'success'
             })
           })

+ 1 - 1
src/views/ncs-orginazition/components/AppVersionManager.vue

@@ -110,7 +110,7 @@ export default {
           this.formmodel.device_type = this.deviceType
           API_Device.setAPPVersion(this.formmodel).then(res => {
             this.formmodel = { ...res }
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
           }).catch(response => {
             this.$message.error(response.message)
           })

+ 14 - 2
src/views/ncs-orginazition/components/partInfoEdit.vue

@@ -34,7 +34,11 @@
             </el-col>
             <el-col :span="8">
               <el-form-item :label="this.$t('partInfo.shopMemberName')" prop="member_name">
-                <el-input v-model="formmodel.member_name" clearable :maxlength="100" readonly :placeholder="this.$t('partInfo.inputShopMemberName')" />
+                <el-input v-model="formmodel.member_name"
+                          clearable
+                          :maxlength="100"
+                          readonly
+                          :placeholder="this.$t('partInfo.inputShopMemberName')" />
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -382,7 +386,8 @@ export default {
       isShow: false,
       isDisabled: false,
       partRoles: [],
-      systemConfig: {}
+      systemConfig: {},
+      formmodelAdmin: {},
     }
   },
   async mounted() {
@@ -553,6 +558,13 @@ export default {
       }).catch(() => {
         console.log(this.$t('action.cancel'))
       })
+    },
+    createAdmin() {
+      this.formshow = true
+      this.formmodelAdmin = {
+        member_name: '',
+        member_password: ''
+      }
     }
   }
 }

+ 9 - 9
src/views/ncs-orginazition/components/partUserManager.vue

@@ -13,7 +13,7 @@
       <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" @click="handlerAdd">新增账号</el-button>
@@ -177,9 +177,9 @@ export default {
     /** 删除单条数据 */
 
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_UserInfo.remove(ids).then(
@@ -187,7 +187,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -199,7 +199,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -207,7 +207,7 @@ export default {
     batchDelete: function() {
       if (this.multipleSelection.length === 0) {
         this.$alert('没有选择任何记录!', '系统提示', {
-          confirmButtonText: '确定',
+          confirmButtonText: this.$t('action.yes'),
           callback: action => {
           }
         })
@@ -256,7 +256,7 @@ export default {
             this.formmodel.partid = this.partId
             API_UserInfo.add(this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.getList()
             }).catch(response => {
               this.formshow = false
@@ -267,7 +267,7 @@ export default {
             /** 修改 */
             API_UserInfo.update(this.formmodel.id, this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('修改成功!')
+              this.$message.success(this.$t('action.editSuccess'))
               this.getList()
             }).catch(response => {
               this.formshow = false

+ 11 - 11
src/views/ncs-orginazition/index.vue

@@ -17,7 +17,7 @@
       <!--        @rowDoubleClicked="getList"-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" size="mini" @click="createOrginazition">新建组织</el-button>
@@ -209,11 +209,11 @@ export default {
         newRowsAction: 'keep',
         flex: 1
       }},
-      { headerName: '编辑', field: 'shop_id',
+      { headerName: this.$t('action.edit'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: {
           onClick: this.handEdit,
-          label: '编辑',
+          label: this.$t('action.edit'),
           buttonType: 'primary',
           buttonSize: 'mini'
         },
@@ -223,12 +223,12 @@ export default {
         width: 100,
         resizable: false,
         sortable: false },
-      { headerName: '删除', field: 'shop_id',
+      { headerName: this.$t('action.delete'), field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.deleteSingle,
-            label: '删除',
+            label: this.$t('action.delete'),
             buttonType: 'danger',
             buttonSize: 'mini',
             disabled: param.data['member_name'] === 'superadmin' ? true:false
@@ -292,9 +292,9 @@ export default {
       this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
     },
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_PartInfo.remove(ids).then(
@@ -302,7 +302,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -314,7 +314,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -453,7 +453,7 @@ export default {
           this.formmodel.partid = this.$store.getters.partId
           API_PartInfo.add(this.formmodel).then(() => {
             this.formshow = false
-            this.$message.success('保存成功!')
+            this.$message.success(this.$t('action.saveSuccess'))
             this.getList()
           }).catch(err => {
             this.$message.error(err.message)

+ 16 - 12
src/views/ncs-remark/index.vue

@@ -3,15 +3,15 @@
         <!--工具栏-->
         <div slot="toolbar" class="inner-toolbar">
             <div class="toolbar-search">
-                <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch"/>
+                <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch"/>
             </div>
         </div>
         <div class="toolbar-btns">
-            <el-button type="success" @click="dialogAddVisible = true">新建便签</el-button>
+            <el-button type="success" @click="dialogAddVisible = true">{{ this.$t('remark.remarkAdd') }}</el-button>
         </div>
         <div v-if="tableData.length > 0" style="margin-top: 20px;">
             <el-card v-for="(item, index) in tableData" :key="index">
-                <div><span style="margin-left: 20px;font-weight:bold">便签内容:</span><span style="line-height:1.5">{{item.content}}</span>
+                <div><span style="margin-left: 20px;font-weight:bold">{{ remarkContent }}</span><span style="line-height:1.5">{{item.content}}</span>
                 </div>
                 <div style="margin: 10px">
                     <div style="float: left">
@@ -22,15 +22,15 @@
                     </div>
                     <div style="float: right">
                         <p>
-                            <span style="font-weight:bold">创建时间:</span>{{formatterCreateTime(item.create_time)}}
-                            <span style="font-weight:bold;margin-left: 10px;">创建人:</span>{{item.create_name}}
+                            <span style="font-weight:bold">{{ remarkCreateTime }}</span>{{formatterCreateTime(item.create_time)}}
+                            <span style="font-weight:bold;margin-left: 10px;">{{ remarkCreateName }}</span>{{item.create_name}}
                         </p>
                     </div>
                 </div>
             </el-card>
         </div>
         <div v-else class="zwsj">
-            <span>暂无数据</span>
+            <span>{{ dateNull }}</span>
         </div>
         <!--翻页-->
         <el-pagination
@@ -45,20 +45,20 @@
                 @current-change="handlePageCurrentChange"
         />
 
-        <el-dialog title="添加便签" :visible.sync="dialogAddVisible" :append-to-body="true" width="80%">
+        <el-dialog :title="this.$t('remark.remarkAdd')" :visible.sync="dialogAddVisible" :append-to-body="true" width="80%">
             <el-form :rules="rules" ref="editForm" label-width="140px">
-                <el-form-item label="内容" prop="content">
+                <el-form-item :label="this.$t('action.content')" prop="content">
                     <el-input
                             type="textarea"
                             :autosize="{ minRows: 2, maxRows: 6}"
                             :minlength="2"
                             :maxlength="300"
                             show-word-limit
-                            :placeholder="'请输入文本内容,长度300'"
+                            :placeholder="this.$t('action.inputContent')"
                             v-model="content">
                     </el-input>
                 </el-form-item>
-                <el-form-item label="附件">
+                <el-form-item :label="this.$t('action.uploader')">
                     <el-upload v-if="!filePath"
                                class="avatar-uploader"
                                :action="`${uploadServer}?scene=avatar`"
@@ -71,8 +71,8 @@
                     <span v-if="filePath">{{fileName}}</span>
                 </el-form-item>
                 <el-form-item>
-                    <el-button type="primary" @click="addRemark">立即添加</el-button>
-                    <el-button @click="quxiao">取消</el-button>
+                    <el-button type="primary" @click="addRemark">{{ this.$t('action.save') }}</el-button>
+                    <el-button @click="quxiao">{{ this.$t('action.cancel') }}</el-button>
                 </el-form-item>
             </el-form>
         </el-dialog>
@@ -109,6 +109,10 @@
                 rules: {
                     content: [{required: true, message: '请输入备注内容', trigger: 'blur'}],
                 },
+              remarkContent: this.$t('remark.remarkContent'),
+              remarkCreateTime: this.$t('remark.remarkCreateTime'),
+              remarkCreateName: this.$t('remark.remarkCreateName'),
+              dateNull: this.$t('action.dateNull'),
             }
         },
         computed: {

+ 28 - 28
src/views/ncs-sos-device-setting/sos_device_setting.vue

@@ -17,7 +17,7 @@
       <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入设备别名或设备标识码" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('deviceManage.keywords')" @search="handlerSearch" />
         </div>
       </div>
       <el-pagination
@@ -37,31 +37,31 @@
       <el-form ref="sosDeviceSettingEditForm" :rules="sosDeviceSettingRules" label-width="120px" :model="sosDeviceSettingModel">
         <el-row>
           <el-col :span="12">
-            <el-form-item label="报警设备模式" prop="type">
-              <el-select v-model="sosDeviceSettingModel.type" placeholder="报警设备模式" clearable>
+            <el-form-item :label="this.$t('deviceManage.sosDeviceSettingType')" prop="type">
+              <el-select v-model="sosDeviceSettingModel.type" :placeholder="this.$t('deviceManage.sosDeviceSettingType')" clearable>
 <!--                <el-option v-for="item in sosDeviceSettingsTypeOptions" :key="item.value" :label="item.key" :value="item.value" />-->
                 <el-option v-for="(item, index) in Object.keys(sosDeviceSettingEnum)" :key="index" :label="sosDeviceSettingEnum[item]" :value="parseInt(item)" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="报警时间" prop="setting_time">
+            <el-form-item :label="this.$t('deviceManage.sosDeviceSettingTime')" prop="setting_time">
               <el-input-number v-model="sosDeviceSettingModel.setting_time" controls-position="right" :min="0" :max="60" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="报警时间单位" prop="unit">
+            <el-form-item :label="this.$t('deviceManage.sosDeviceSettingUnit')" prop="unit">
               <el-radio-group v-model="sosDeviceSettingModel.unit" size="mini" prop="unit">
-                <el-radio label="小时">小时</el-radio>
-                <el-radio label="分钟">分钟</el-radio>
-                <el-radio label="秒"></el-radio>
+                <el-radio label="小时">{{ this.$t('action.time') }}</el-radio>
+                <el-radio label="分钟">{{ this.$t('action.minute') }}</el-radio>
+                <el-radio label="秒">{{ this.$t('action.second') }}</el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="handlerFormSubmit('sosDeviceSettingEditForm')">保存修改</el-button>
+        <el-button type="primary" @click="handlerFormSubmit('sosDeviceSettingEditForm')">{{ this.$t('action.saveEdit') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -85,19 +85,19 @@ export default {
       /** 表格数据 */
       tableData: [],
       /** 表单数据 */
-      sosDeviceSettingEditTitle: '编辑',
+      sosDeviceSettingEditTitle: this.$t('action.edit'),
       sosDeviceSettingModel: {},
       sosDeviceSettingFormShow: false, // 编辑表单显示开关
       /** 表单校验 */
       sosDeviceSettingRules: {
         type: [
-          { required: true, message: '报警设备模式', trigger: 'blur' }
+          { required: true, message: this.$t('deviceManage.sosDeviceSettingType'), trigger: 'blur' }
         ],
         sosDeviceSetting: [
-          { required: true, message: '报警时间', trigger: 'blur' }
+          { required: true, message: this.$t('deviceManage.sosDeviceSettingTime'), trigger: 'blur' }
         ],
         unit: [
-          { required: true, message: '报警时间单位', trigger: 'blur' }
+          { required: true, message: this.$t('deviceManage.sosDeviceSettingUnit'), trigger: 'blur' }
         ],
       },
       pageData: [],
@@ -125,9 +125,9 @@ export default {
       timer: '',
       // sosDeviceSetting: {},
       sosDeviceSettingsTypeOptions: [
-        { key: '不开启', value: 0},
-        { key: '疫情防控模式', value: 1 },
-        { key: '关爱老人模式', value: 2 }
+        { key: this.$t('deviceManage.sosDeviceSettingStatusFalse'), value: 0},
+        { key: this.$t('deviceManage.sosDeviceSettingControlModel'), value: 1 },
+        { key: this.$t('deviceManage.sosDeviceSettingElderlyModel'), value: 2 }
       ],
       sosDeviceSettingEnum: SOS_DEVICE_SETTING_TYPE.getValueList(),
     }
@@ -152,26 +152,26 @@ export default {
         valueGetter: this.hashValueGetter
       },
       { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 100 },
-      { headerName: '报警时间', field: 'setting_time', sortable: false, filter: false , width: 120, valueGetter: this.settingTimeGetter},
-      { headerName: '报警模式', field: 'type', sortable: true,
+      { headerName: this.$t('deviceManage.sosDeviceSettingTime'), field: 'setting_time', sortable: false, filter: false , width: 120, valueGetter: this.settingTimeGetter},
+      { headerName: this.$t('deviceManage.sosDeviceSettingType'), field: 'type', sortable: true,
         filterFramework: 'ListFilter', width: 150,
         filterParams: {
           listData: this.sosDeviceSettingsTypeOptions
         },
         valueGetter: this.sosDeviceSettingTypeGetter
       },
-      { headerName: '设备id', field: 'device_id', sortable: true, filter: 'agNumberColumnFilter' , width: 100 },
-      { headerName: '设备别名', field: 'device_name', sortable: false, filter: false , width: 150 },
-      { headerName: '设备类型', field: 'device_type', sortable: false, filter: false, width: 120, valueFormatter: this.deviceTypeGetter},
-      { headerName: '设备标识码', field: 'device_eth_mac', sortable: false, filter: false, width: 200  },
-      { headerName: '空间全称', field: 'frame_full_name', sortable: false, filter: false , width: 150 },
+      { headerName: this.$t('deviceManage.deviceId'), field: 'device_id', sortable: true, filter: 'agNumberColumnFilter' , width: 100 },
+      { headerName: this.$t('deviceManage.deviceName'), field: 'device_name', sortable: false, filter: false , width: 150 },
+      { headerName: this.$t('deviceManage.deviceType'), field: 'device_type', sortable: false, filter: false, width: 120, valueFormatter: this.deviceTypeGetter},
+      { headerName: this.$t('deviceManage.ethMac'), field: 'device_eth_mac', sortable: false, filter: false, width: 200  },
+      { headerName: this.$t('deviceManage.frameName'), field: 'frame_full_name', sortable: false, filter: false , width: 150 },
       {
-        headerName: '编辑', field: 'id',
+        headerName: this.$t('action.edit'), field: 'id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.handleEdit,
-            label: '编辑',
+            label: this.$t('action.edit'),
             buttonType: 'primary',
             buttonSize: 'mini'
           }
@@ -294,7 +294,7 @@ export default {
       this.sosDeviceSettingModel = {
         ...params
       }
-      this.sosDeviceSettingEditTitle = '修改设备报警'
+      this.sosDeviceSettingEditTitle = this.$t('deviceManage.sosDeviceSettingEdit')
       this.sosDeviceSettingFormShow = true
     },
     /** 提交表单  **/
@@ -304,7 +304,7 @@ export default {
           const _this = this;
           /** 修改 */
           API_SosDeviceSetting.updateByDeviceId(this.sosDeviceSettingModel.device_id, this.sosDeviceSettingModel).then(() => {
-            this.$message.success('保存成功!')
+            this.$message.success( this.$t('action.saveSuccess'))
             this.sosDeviceSettingFormShow = false
             this.getList()
           })
@@ -325,7 +325,7 @@ export default {
     settingTimeGetter(params) {
       const settingTime = params.data.setting_time
       const unit = params.data.unit
-      return '每' + settingTime + unit + '/次'
+      return this.$t('action.every') + settingTime + unit + '/' + this.$t('action.times')
     }
     // fanhui() {
     //   this.sosDeviceSettingFormShow = false

+ 12 - 12
src/views/ncs-system-config/index.vue

@@ -18,7 +18,7 @@
       <!--        @rowDoubleClicked="getList"-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
-          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" size="mini" @click="createBroadcast">新增参数配置</el-button>
@@ -154,11 +154,11 @@ export default {
         headerName: '参数说明', field: 'description', sortable: true, filter: 'agTextColumnFilter', flex: 1
       },
       {
-        headerName: '编辑',
+        headerName: this.$t('action.edit'),
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: {
           onClick: this.handEdit,
-          label: '编辑',
+          label: this.$t('action.edit'),
           buttonType: 'primary',
           buttonSize: 'mini'
         },
@@ -170,12 +170,12 @@ export default {
         sortable: false
       },
       {
-        headerName: '删除',
+        headerName: this.$t('action.delete'),
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: param => {
           return {
             onClick: this.deleteSingle,
-            label: '删除',
+            label: this.$t('action.delete'),
             buttonType: 'danger',
             buttonSize: 'mini'
           }
@@ -220,9 +220,9 @@ export default {
       this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
     },
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_SystemConfig.remove(ids).then(
@@ -230,7 +230,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -242,7 +242,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -355,7 +355,7 @@ export default {
           if (this.formmodel.id) {
             API_SystemConfig.update(this.formmodel.id, this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.getList()
             }).catch(err => {
               this.$message.error(err.message)
@@ -364,7 +364,7 @@ export default {
             /** 新增 */
             API_SystemConfig.add(this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.getList()
             }).catch(err => {
               this.$message.error(err.message)

+ 48 - 48
src/views/ncs-task/index.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="formwrap">
     <el-tabs v-model="activeName" @tab-click="handleClick">
-      <el-tab-pane label="全部" name="all" />
-      <el-tab-pane label="未操作" name="not_operating" />
-      <el-tab-pane label="任务失败" name="fail" />
-      <el-tab-pane label="任务成功" name="success" />
+      <el-tab-pane :label="this.$t('task.all')" name="all" />
+      <el-tab-pane :label="this.$t('task.notOperated')" name="not_operating" />
+      <el-tab-pane :label="this.$t('task.taskFail')" name="fail" />
+      <el-tab-pane :label="this.$t('task.taskSuccess')" name="success" />
     </el-tabs>
 
     <ag-grid-layout
@@ -23,11 +23,11 @@
     >
       <div slot="toolbar" class="inner-toolbar">
         <!--                <div class="toolbar-search">-->
-        <!--                    <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />-->
+        <!--                    <en-table-search :placeholder="请输入搜索关键字" @search="handlerSearch" />-->
         <!--                </div>-->
         <div class="toolbar-btns">
-          <el-button type="primary" @click="handlerAdd">新增</el-button>
-          <el-button type="danger" @click="batchDelete">删除</el-button>
+          <el-button type="primary" @click="handlerAdd">{{ this.$t('action.add') }}</el-button>
+          <el-button type="danger" @click="batchDelete">{{ this.$t('action.delete') }}</el-button>
         </div>
       </div>
       <el-pagination
@@ -43,39 +43,39 @@
       />
     </ag-grid-layout>
     <!--编辑表单-->
-    <el-dialog title="通知/任务" :visible.sync="formshow" width="50%">
+    <el-dialog :title="this.$t('task.noticeAndTask')" :visible.sync="formshow" width="50%">
       <div>
         <el-form ref="editform" :rules="rules" label-width="140px" :model="formmodel">
           <div v-if="editflag === 1">
-            <el-form-item label="任务完成?">
+            <el-form-item :label="this.$t('task.isTaskSuccess')">
               <el-switch
                 v-model="task_success"
-                active-text="成功"
-                inactive-text="失败"
+                :active-text="this.$t('task.success')"
+                :inactive-text="this.$t('task.failed')"
               />
             </el-form-item>
-            <el-form-item label="实际回访时间" prop="task_do_time">
+            <el-form-item :label="this.$t('task.taskToTime')" prop="task_do_time">
               <el-date-picker
                 v-model="formmodel.task_do_time"
                 type="datetime"
                 value-format="timestamp"
-                placeholder="实际回访时间"
+                :placeholder="this.$t('task.taskToTime')"
               />
             </el-form-item>
           </div>
           <div v-if="!task_success">
-            <el-form-item label="计划任务执行时间" prop="task_plan_time">
+            <el-form-item :label="this.$t('task.taskPlanTime')" prop="task_plan_time">
               <el-date-picker
                 v-model="formmodel.task_plan_time"
                 type="datetime"
                 value-format="timestamp"
-                placeholder="计划任务执行时间"
+                :placeholder="this.$t('task.taskPlanTime')"
               />
             </el-form-item>
-            <el-form-item label="内容" prop="task_content">
-              <el-input v-model="formmodel.task_content" type="textarea" rows="10" placeholder="请选输入内容" />
+            <el-form-item :label="this.$t('action.content')" prop="task_content">
+              <el-input v-model="formmodel.task_content" type="textarea" rows="10" :placeholder="this.$t('action.inputContent')" />
             </el-form-item>
-            <el-form-item label="附件">
+            <el-form-item :label="this.$t('action.uploader')">
               <el-upload
                 v-if="!filePath"
                 class="avatar-uploader"
@@ -94,8 +94,8 @@
 
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="formshow = false">取 消</el-button>
-        <el-button type="primary" @click="handlerFormSubmit('editform')">确 定</el-button>
+        <el-button @click="formshow = false">{{ this.$t('action.cancel') }}</el-button>
+        <el-button type="primary" @click="handlerFormSubmit('editform')">{{ this.$t('action.yes') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -123,13 +123,13 @@ export default {
       /** 表单校验 */
       rules: {
         task_plan_time: [
-          { required: true, message: '请选择计划任务执行时间', trigger: 'blur' }
+          { required: true, message: this.$t('task.choiceTaskPlanTime'), trigger: 'blur' }
         ],
         task_content: [
-          { required: true, message: '请输入任务内容', trigger: 'blur' }
+          { required: true, message: this.$t('task.inputTaskContent'), trigger: 'blur' }
         ],
         task_do_time: [
-          { required: true, message: '请选择实际任务时间', trigger: 'blur' }
+          { required: true, message: this.$t('task.choiceTaskToTime'), trigger: 'blur' }
         ]
       },
       pageData: [],
@@ -176,45 +176,45 @@ export default {
         resizable: false,
         valueGetter: this.hashValueGetter
       },
-      { headerName: '内容', field: 'task_content', sortable: true, filter: 'agTextColumnFilter', width: 400,
+      { headerName: this.$t('task.choiceTaskPlanTime'), field: 'task_content', sortable: true, filter: 'agTextColumnFilter', width: 400,
         cellRendererFramework: 'Tooltip',
         cellRendererParams: {
           content: 'task_content'
         }
       },
-      { headerName: '计划任务执行时间', field: 'task_plan_time', valueFormatter: this.formatterDate, sortable: true, filter: false, minWidth: 180 },
-      { headerName: '实际任务执行时间', field: 'task_do_time', valueFormatter: this.formatterDate, sortable: true, filter: false, minWidth: 180 },
-      { headerName: '任务状态', field: 'task_success', filter: false, cellRenderer: this.formatterStasus, minWidth: 100 },
+      { headerName: this.$t('task.taskPlanTime'), field: 'task_plan_time', valueFormatter: this.formatterDate, sortable: true, filter: false, minWidth: 180 },
+      { headerName: this.$t('task.taskToTime'), field: 'task_do_time', valueFormatter: this.formatterDate, sortable: true, filter: false, minWidth: 180 },
+      { headerName: this.$t('task.taskType'), field: 'task_success', filter: false, cellRenderer: this.formatterStasus, minWidth: 100 },
       // { headerName: '任务结果', field: 'task_result', sortable: true, filter: false, width: 220,
       //     cellRendererFramework: 'Tooltip',
       //     cellRendererParams: {
       //         content: 'task_result'
       //     },
       // },
-      { headerName: '任务操作人', field: 'task_do_name', sortable: true, filter: true, minWidth: 120 },
-      { headerName: '创建人', field: 'create_name', valueFormatter: this.formatterName, sortable: true, filter: true, minWidth: 120 },
-      { headerName: '操作', field: 'id',
+      { headerName: this.$t('task.taskToName'), field: 'task_do_name', sortable: true, filter: true, minWidth: 120 },
+      { headerName: this.$t('task.creatName'), field: 'create_name', valueFormatter: this.formatterName, sortable: true, filter: true, minWidth: 120 },
+      { headerName: this.$t('action.handle'), field: 'id',
         cellRendererFramework: 'ButtonCellRenderList',
         cellRendererParams: param => {
           return {
             list: [
               {
                 onClick: this.handlerEdit,
-                label: '操作任务',
+                label: this.$t('task.doTask'),
                 buttonType: 'primary',
                 buttonSize: 'mini',
                 disabled: param.data['task_do_time'] !== null
               },
               {
                 onClick: this.xzfj,
-                label: '下载附件',
+                label: this.$t('action.uploaderDownload'),
                 buttonType: 'success',
                 buttonSize: 'mini',
                 disabled: param.data['file_path'] === '' || param.data['file_path'] === null
               },
               {
                 onClick: this.deleteSingle,
-                label: '删除',
+                label: this.$t('action.delete'),
                 buttonType: 'danger',
                 buttonSize: 'mini'
               }
@@ -277,9 +277,9 @@ export default {
     },
     /** 单条数据删除处理 */
     handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
         type: 'warning'
       }).then(() => {
         API_task.remove(ids).then(
@@ -287,7 +287,7 @@ export default {
             this.getList()
             this.$message({
               type: 'success',
-              message: '删除成功!'
+              message: this.$t('action.deleted')
             })
           }
         ).catch(response => {
@@ -299,7 +299,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: this.$t('action.cancelDelete')
         })
       })
     },
@@ -307,7 +307,7 @@ export default {
     batchDelete: function() {
       const rows = this.gridApi.getSelectedRows()
       if (rows.length === 0) {
-        this.$message({ type: 'info', message: '请先勾选需要删除的数据' })
+        this.$message({ type: 'info', message: this.$t('action.pleaseChoiceDelete') })
         return
       }
       const ids = []
@@ -357,7 +357,7 @@ export default {
             this.formmodel.part_id = this.$store.getters.partId
             API_task.add(this.formmodel).then(() => {
               this.formshow = false
-              this.$message.success('保存成功!')
+              this.$message.success(this.$t('action.saveSuccess'))
               this.getList()
               this.fileName = null
               this.filePath = null
@@ -370,7 +370,7 @@ export default {
             if (this.task_success) {
               API_task.update(this.formmodel.id, this.formmodel).then(() => {
                 this.formshow = false
-                this.$message.success('修改成功!')
+                this.$message.success(this.$t('action.editSuccess'))
                 this.getList()
               })
             } else {
@@ -382,7 +382,7 @@ export default {
               this.formmodel.part_id = this.$store.getters.partId
               API_task.updateOrSave(this.formmodel.id, this.formmodel).then(() => {
                 this.formshow = false
-                this.$message.success('修改成功!')
+                this.$message.success(this.$t('action.editSuccess'))
                 this.getList()
               })
             }
@@ -408,16 +408,16 @@ export default {
     },
     formatterStasus(param) {
       if (param.value) {
-        return '<span style="color:green">成功</span>'
+        return '<span style="color:green">' + this.$t('task.success') + '</span>'
       } else if (param.value == false) {
-        return '<span style="color:red">失败</span>'
+        return '<span style="color:red">' + this.$t('task.failed') + '</span>'
       } else if (param.value == null) {
-        return '<span style="color:orange">暂未操作</span>'
+        return '<span style="color:orange">' + this.$t('task.notOperated') + '</span>'
       }
     },
     formatterName(param) {
       if (param.data.create_id === 0) {
-        return '系统创建'
+        return this.$t('action.systemCreate')
       } else {
         return param.value
       }
@@ -478,11 +478,11 @@ export default {
         const isImg = hz === 'jpeg' || hz === 'png' || hz === 'jpg' || hz === 'txt' || hz === 'doc' || hz === 'docx' || hz === 'xls' || hz === 'xlsx'
         const isLt5M = file.size / 1024 / 1024 < 5
         if (!isImg) {
-          _this.$message.error('上传附件只能是txt,doc,docx,xls,xlsx,jpg,png,jpeg格式!')
+          _this.$message.error(this.$t('action.uploaderImg'))
           reject()
         }
         if (!isLt5M) {
-          _this.$message.error('上传附件大小不能超过 5MB!')
+          _this.$message.error(this.$t('action.uploaderSize'))
           reject()
         }
         resolve()

+ 1 - 1
src/views/vital-sign/setting.vue

@@ -101,7 +101,7 @@
       /** 提交体征告警设置 */
       SetVitalSigns() {
         API_Params.saveVitalSignsSetting(this.baseInfoForm.goods_params_list, this.memberId).then((response) => {
-          this.$message.success('修改成功!')
+          this.$message.success(this.$t('action.editSuccess'))
           this.GET_VitalSignsParams()
         })
       }