lxl
2022-09-19 0750f86b69763c6bec0e7e6807d248dd8567a87d
1111
已添加4个文件
已修改3个文件
320 ■■■■■ 文件已修改
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/lang/en.js 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/lang/fr.js 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/lang/index.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/lang/zh.js 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/navMenu.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -24,6 +24,7 @@
    "sqlite3": "^5.0.2",
    "vant": "^2.12.25",
    "vue": "^2.6.11",
    "vue-i18n": "^8.27.2",
    "vue-router": "^3.2.0",
    "vuex": "^3.4.0"
  },
src/assets/lang/en.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,85 @@
const en = {
  common: {
    confirm: "confirm",
    choose: "please choose",
    emptydata: "No data",
    Distributionmap: "Distribution map",
    Selectdate: "Select date",
    name: "Name",
    high: "high",
    Medium: "Medium",
    low: "low",
    reName: "rename",
    edit: "edit",
    copy: "copy",
    delete: "delete",
    location: "location",
    coordinate: "coordinate",
    latLon: "Latitude and Longitude",
    pleaseEnter: "Please Enter...",
  },
  nav: {
    SerManage: "DUTY MANAGEMENT",
    digitalMap: "DIGITALMAP",
    PerManage: "MAN-MANAGEMENT",
    EquManage: "EQUIPMENT MANAGEMENT",
    NewsSite: "NEWS SITE",
    Logout: "Logout",
    Newtask: "Newtask",
    Tasklist: "Tasklist",
    Tasksummary: "Tasksummary",
    Distributionlist: "Distributionlist",
    MaterialManage: "Material management",
    LivingMaterials: "Living materials",
    EquipmentMaterials: "Equipment materials",
  },
  taskList: {
    Listregions: "List of regions",
    EnterAreaName: "Please enter the area name",
    taskTotal: "Total number of tasks statistics",
    Tasklevel: "Task risk level statistics",
    addTaskArea: "New task area",
    editTaskArea: "Edit task area",
    DegreeDanger: "Degree of danger",
    Introduction: "Introduction",
  },
  addTask: {
    newTask: "New task",
    Details: "Details",
    taskName: "Task name",
    taskId: "Task number",
    getTime: "Receiving time",
    taskcon: "Task content",
    resoucepai: "Resource allocation",
    lifesub: "Living matter",
    equisub: "Equipment material",
    people: "personnel",
    collmodel: "Collection template",
    doIssued: "Confirm to issue",
    storage: "Temporary storage",
  },
  electronicMap: {
    customMap: "Custom Map",
    mapAnalyse: "Map Analyse",
    mapPlotting: "Map Plotting",
    layerData: "Layer Data",
    peripheralQuery: "Peripheral query",
    text: "text",
    polyline: "Polyline",
    modelLibrary: "Model Library",
    polygon: "Polygon",
    militaryLibrary: "Military Standard Library",
    flattailarrow: "Flat tail arrow",
    dovetailarrow: "Dovetail arrow",
    assemblyPlace: "Assembly place",
    car: "car",
    rocketlauncher: "Rocket launcher",
    missile: "missile",
    rectangle: "Rounded Rectangle",
    sector: "sector",
    arched: "Arched",
    bezierarrow: "Bezier Arrow",
  },
};
export default en;
src/assets/lang/fr.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,85 @@
const fr = {
  common: {
    confirm: "confirmer",
    choose: "Choisissez s'il vous plaît",
    emptydata: "Pas de données",
    Distributionlist: "Liste de distribution",
    Selectdate: "Sélectionner une date",
    name: "Nom",
    high: "haute",
    Medium: "dans",
    low: "faible",
    reName: "Renommer",
    edit: "Édition",
    copy: "Copier",
    delete: "Supprimer",
    location: "emplacement",
    coordinate: "coordonner",
    latLon: "Latitude et longitude",
    pleaseEnter: "Entrez s'il vous plait...",
  },
  nav: {
    SerManage: "Gestion des devoirs",
    digitalMap: "carte numérique",
    PerManage: "Gestion du personnel",
    EquManage: "Gestion des Ã©quipements",
    NewsSite: "Site d'actualités",
    Logout: "Se déconnecter",
    Newtask: "Nouvelle tâche",
    Tasklist: "Liste de tâches",
    Tasksummary: "Résumé des tâches",
    MaterialManage: "La gestion du matériel",
    LivingMaterials: "Matériel de subsistance",
    EquipmentMaterials: "Matériel et fournitures",
  },
  taskList: {
    Listregions: "Liste des régions",
    EnterAreaName: "Veuillez saisir le nom de la zone",
    taskTotal: "Statistiques du nombre total de tâches",
    Tasklevel: "Statistiques du niveau de risque de la tâche",
    addTaskArea: "Nouvelle zone de tâches",
    editTaskArea: "Modifier la zone de tâches",
    DegreeDanger: "Degré de danger",
    Distributionmap: "Carte de distribution",
    Introduction: "introduction",
  },
  addTask: {
    newTask: "Nouvelle tâche",
    Details: "Des détails",
    taskName: "nom de la mission",
    taskId: "Numéro de tâche",
    getTime: "Réception du temps",
    taskcon: "Contenu de la tâche",
    resoucepai: "Allocation des ressources",
    lifesub: "Matière vivante",
    equisub: "Matériel d'équipement",
    people: "personnel",
    collmodel: "Modèle de collection",
    doIssued: "Confirmer pour Ã©mettre",
    storage: "Stockage temporaire",
  },
  electronicMap: {
    customMap: "Carte personnalisée",
    mapAnalyse: "Analyse de la carte",
    mapPlotting: "Icône de la carte",
    layerData: "Données de couche",
    peripheralQuery: "Requête périphérique",
    text: "texte",
    polyline: "Polyligne",
    modelLibrary: "Bibliothèque de modèles",
    polygon: "Polygone",
    militaryLibrary: "Bibliothèque de normes militaires",
    flattailarrow: "Flèche de queue plate",
    dovetailarrow: "Flèche en queue d'aronde",
    assemblyPlace: "Lieu de rassemblement",
    car: "voiture",
    rocketlauncher: "Lance-roquettes",
    missile: "missile",
    rectangle: "Rectangle arrondi",
    sector: "secteur",
    arched: "Arqué",
    bezierarrow: "Flèche de Bézier",
  },
};
export default fr;
src/assets/lang/index.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
import Vue from "vue";
import VueI18n from "vue-i18n";
import ElementLocale from "element-ui/lib/locale";
import enLocale from "element-ui/lib/locale/lang/en";
import zhLocale from "element-ui/lib/locale/lang/zh-CN";
import langZh from "@/assets/lang/zh.js";
import langEN from "@/assets/lang/en.js";
Vue.use(VueI18n);
const i18n = new VueI18n({
  locale: "zh",
  messages: {
    zh: { ...langZh, ...zhLocale },
    en: { ...langEN, ...enLocale },
  },
});
ElementLocale.i18n((key, value) => i18n.t(key, value));
export default i18n;
src/assets/lang/zh.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,99 @@
const zh = {
  common: {
    confirm: "确认",
    choose: "请选择",
    emptydata: "暂无数据",
    name: "名称",
    Distributionmap: "配发地图",
    lon: "经度坐标",
    lat: "纬度坐标",
    Selectdate: "选择日期",
    high: "高",
    Medium: "中",
    low: "低",
    reName: "重命名",
    edit: "编辑",
    copy: "复制",
    delete: "删除",
    location: "地名",
    coordinate: "坐标",
    latLon: "经纬度",
    pleaseEnter: "请输入...",
    geocoding: "地理编码",
    reverseGeocoding: "逆地理编码",
  },
  nav: {
    SerManage: "勤务管理",
    digitalMap: "电子地图",
    PerManage: "人员管理",
    EquManage: "装备管理",
    NewsSite: "新闻网站",
    Logout: "注销",
    Newtask: "新建任务",
    Tasklist: "任务清单",
    Tasksummary: "任务总结",
    taskStatistic: "任务统计",
    Distributionlist: "物资告警",
    MaterialManage: "生活物资管理",
    EquipManage: "装备物资管理",
    LivingMaterials: "生活物资",
    EquipmentMaterials: "装备物资",
    system: "系统管理",
    personmanage: "人员管理",
    equiplable: "标签库管理",
  },
  taskList: {
    Listregions: "地区列表",
    EnterAreaName: "请输入区域名称",
    taskTotal: "任务总数统计",
    Tasklevel: "任务危险度级别统计",
    addTaskArea: "新增任务区",
    editTaskArea: "编辑任务区",
    DegreeDanger: "危险程度",
    Introduction: "简介",
  },
  addTask: {
    newTask: "新建任务",
    taskLevel: "任务级别",
    Details: "详情",
    taskName: "任务名称",
    taskId: "任务编号",
    getTime: "接报时间",
    taskcon: "任务内容",
    resoucepai: "资源分配",
    lifesub: "物资",
    equisub: "装备",
    people: "人员",
    collmodel: "采集模板",
    doIssued: "确认下发",
    storage: "暂存",
  },
  electronicMap: {
    customMap: "自定义地图",
    mapAnalyse: "地图分析",
    mapPlotting: "地图标绘",
    layerData: "图层数据",
    peripheralQuery: "监控查询",
    text: "文本",
    polyline: "折线",
    modelLibrary: "模型库",
    polygon: "多边形",
    militaryLibrary: "军标库",
    flattailarrow: "平尾箭头",
    dovetailarrow: "燕尾箭头",
    flattail2arrow: "平尾双箭头",
    assemblyPlace: "集结地",
    car: "车辆",
    rocketlauncher: "火箭发射架",
    missile: "导弹",
    rectangle: "圆角矩形",
    sector: "扇形",
    arched: "弓形",
    bezierarrow: "贝塞尔箭头",
    mapImagery: "地图影像",
    pointposition: "点位",
    electronicFence: "电子围栏",
  },
};
export default zh;
src/components/navMenu.vue
@@ -18,7 +18,7 @@
        >
          <el-submenu index="1" class="faSub">
            <template slot="title">
              <span>数据管理</span>
              <span>{{ $t("common.confirm") }}</span>
            </template>
            <el-menu-item index="catalogueManage">目录管理</el-menu-item>
            <el-menu-item index="dataUpdata">数据上传</el-menu-item>
@@ -56,7 +56,7 @@
            <template slot="title">
              <span>综合展示</span>
            </template>
            <el-menu-item index="Synthesis" >综合展示</el-menu-item>
            <el-menu-item index="Synthesis">综合展示</el-menu-item>
            <el-menu-item index="Thematic">专题地图</el-menu-item>
            <el-menu-item index="Archive">资料馆</el-menu-item>
          </el-submenu>
@@ -80,6 +80,8 @@
        <img src="../assets/img/user.png" alt="" />
        <span>admin</span>
        <span>注销</span>
        &nbsp;
        <span @click="switchLang"> åˆ‡æ¢è¯­è¨€</span>
      </div>
      <div class="btnBox">
        <div><img src="../assets/img/leftBtn.png" alt="" /></div>
@@ -93,6 +95,11 @@
export default {
  name: "navMenu",
  //import引入的组件需要注入到对象中才能使用
  data() {
    return {
      lang: "en",
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      if (
@@ -117,6 +124,15 @@
    },
    showChange() {
      this.$emit("shwoMapView", true);
    },
    switchLang() {
      if (this.lang == "en") {
        this.$i18n.locale = this.lang;
        this.lang = "zh";
      } else {
        this.$i18n.locale = this.lang;
        this.lang = "en";
      }
    },
  },
};
@@ -162,7 +178,7 @@
  justify-content: space-between;
  align-items: center;
  .userInfo {
    width: 138px;
    // width: 138px;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: 400;
@@ -170,6 +186,7 @@
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
  }
  .btnBox {
    width: 65px;
src/main.js
@@ -3,19 +3,23 @@
import router from "./router";
import store from "./store";
import "./assets/css/global.css";
import i18n from "./assets/lang/index";
import axios from "./http";
import ElementUI from "element-ui";
import locale from "element-ui/lib/locale/lang/en";
// import locale from 'element-ui/lib/locale/lang/zh-CN'
import "element-ui/lib/theme-chalk/index.css";
Vue.prototype.$echarts = echarts;
import * as echarts from "echarts";
Vue.use(ElementUI);
Vue.use(ElementUI, { locale });
Vue.prototype.$http = axios;
Vue.prototype.$bus = new Vue();
Vue.config.productionTip = false;
new Vue({
  router,
  i18n,
  store,
  render: (h) => h(App),
}).$mount("#app");