jinx 2 년 전
부모
커밋
43afb250b7
6개의 변경된 파일215개의 추가작업 그리고 118개의 파일을 삭제
  1. 94 1
      public/__langs/css/index.css
  2. 20 16
      public/__langs/index.html
  3. 3 3
      public/__langs/locales/en.json
  4. 1 1
      src/components/files/content/Comment.vue
  5. 3 3
      src/locales/en.json
  6. 94 94
      src/locales/zh.json

+ 94 - 1
public/__langs/css/index.css

@@ -77,4 +77,97 @@
   text-align: center;
   background: #fff;
   margin-left: 10px;
-}
+}
+
+
+
+
+
+.loader {
+  position: relative;
+  margin: 0 auto;
+  width: 100px
+
+}
+.loader:before {
+  content: '';
+  display: block;
+  padding-top: 100%;
+}
+
+.circular {
+  animation: rotate 2s linear infinite;
+  height: 100%;
+  transform-origin: center center;
+  width: 100%;
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  margin: auto;
+}
+
+.path {
+  stroke-dasharray: 1, 200;
+  stroke-dashoffset: 0;
+  animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
+  stroke-linecap: round;
+}
+
+@keyframes rotate {
+  100% {
+    transform: rotate(360deg);
+  }
+}
+
+@keyframes dash {
+  0% {
+    stroke-dasharray: 1, 200;
+    stroke-dashoffset: 0;
+  }
+  50% {
+    stroke-dasharray: 89, 200;
+    stroke-dashoffset: -35px;
+  }
+  100% {
+    stroke-dasharray: 89, 200;
+    stroke-dashoffset: -124px;
+  }
+}
+
+@keyframes color {
+  100%,
+  0% {
+    stroke: #d62d20;
+  }
+  40% {
+    stroke: #0057e7;
+  }
+  66% {
+    stroke: #008744;
+  }
+  80%,
+  90% {
+    stroke: #ffa700;
+  }
+}
+
+
+body {
+  background-color: #eee;
+}
+.showbox {
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  padding: 5%;
+  z-index: 100000;
+  background: rgba(0, 0, 0, 0.5);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+

+ 20 - 16
public/__langs/index.html

@@ -38,11 +38,17 @@
                     </main>
                 </div>
             </div>
+            <div class="showbox" v-if="loading">
+                <div class="loader">
+                    <svg class="circular" viewBox="25 25 50 50">
+                        <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10" />
+                    </svg>
+                </div>
+            </div>
         </div>
 
         <script>
             const { createApp } = Vue
-
             createApp({
                 data() {
                     return {
@@ -52,11 +58,13 @@
                         menus: [],
                         module: 'home',
                         respone: null,
+                        loading: false,
                     }
                 },
                 methods: {
                     async onSave() {
-                        console.log(this.respone)
+                        this.loading = true
+
                         let params = this.respone
                         fetch('http://192.168.0.130:9091/save', {
                             method: 'post',
@@ -64,12 +72,17 @@
                                 'Content-Type': 'application/x-www-form-urlencoded',
                             },
                             body: `q=${JSON.stringify(params)}&locale=${this.locale}`,
-                        }).then(async res => {
-                            let json = await res.json()
-                            if (json.success) {
-                                alert('保存成功')
-                            }
                         })
+                            .then(async res => {
+                                this.loading = false
+
+                                let json = await res.json()
+                                alert('保存成功')
+                            })
+                            .catch(err => {
+                                this.loading = false
+                                alert('保存失败,请联系管理员')
+                            })
                     },
                     onChangeVal(item) {
                         this.respone[this.module][item.key] = item.value
@@ -82,8 +95,6 @@
                     onModuleChange(name) {
                         this.locales = []
                         this.module = name
-                        console.log(this.module)
-                        console.log(this.respone)
                         this.initData(this.respone)
                     },
                     initData(data, init = false) {
@@ -93,15 +104,9 @@
                                     this.menus.push({ name: key.split('.')[0], text: data[key] })
                                 }
                             } else if (typeof data[key] == 'object' && key == this.module) {
-                                console.log(this.module)
                                 this.initData(data[key])
                             } else if (typeof data[key] == 'string') {
                                 this.locales.push({ key: key.split('.')[0], value: data[key] })
-                                // if (!this.info[key]) {
-                                //     this.info[key] = []
-                                // }
-                                // this.info[key].push({ key: key.split('.')[0], value: data[key] })
-                                // this.locales.push({ key: key.split('.')[0], value: data[key] })
                             }
                         }
                     },
@@ -114,7 +119,6 @@
                         this.respone = res
                         this.initData(res, true)
                     })
-                    // this.onLocaleChange()
                 },
             }).mount('#app')
         </script>

+ 3 - 3
public/__langs/locales/en.json

@@ -1,7 +1,7 @@
 {
     "home": {
         "tag": "tag",
-        "splitScreen": "分屏12",
+        "splitScreen": "分屏",
         "fullScreen": "全屏"
     },
     "home.name": "首页",
@@ -78,8 +78,8 @@
         "exit": "退出",
         "delete": "删除",
         "edit": "编辑",
-        "confirm": "确定",
-        "tips": "提示",
+        "confirm": "confirm",
+        "tips": "tips",
         "login": "login",
         "cancel": "cancel",
         "sync": "sync",

+ 1 - 1
src/components/files/content/Comment.vue

@@ -61,7 +61,7 @@
     </div>
     <Toast v-if="showTips" :type="tipsType" :content="showTips" :close="() => (showTips = null)" />
 
-    <ui-confirm v-if="delComfirm" @ok="handlerDel" @no="handlerDel">
+    <ui-confirm v-if="delComfirm" :title="$t('common.tips')" :noText="$t('common.cancel')" :okText="$t('common.confirm')" @ok="handlerDel" @no="handlerDel">
         <template #content>
             <div>{{ $t('tag.deletetCommentTips') }}</div>
         </template>

+ 3 - 3
src/locales/en.json

@@ -1,7 +1,7 @@
 {
     "home": {
         "tag": "tag",
-        "splitScreen": "分屏12",
+        "splitScreen": "分屏",
         "fullScreen": "全屏"
     },
     "home.name": "首页",
@@ -78,8 +78,8 @@
         "exit": "退出",
         "delete": "删除",
         "edit": "编辑",
-        "confirm": "确定",
-        "tips": "提示",
+        "confirm": "confirm",
+        "tips": "tips",
         "login": "login",
         "cancel": "cancel",
         "sync": "sync",

+ 94 - 94
src/locales/zh.json

@@ -1,96 +1,96 @@
 {
-  "home": {
-    "tag": "标注",
-    "splitScreen": "分屏",
-    "fullScreen": "全屏"
-  },
-  "home.name": "首页",
-  "header": {
-    "passwordText1": "密码不能为空",
-    "phoneText1": "手机号码不能为空",
-    "phoneText2": "请输入正确手机号",
-    "copyLink": "复制链接",
-    "shareLink": "分享链接",
-    "setting": "设为",
-    "reset": "重设",
-    "userInfo": "个人信息",
-    "loginout": "退出登录",
-    "adhustText1": "为场景设置关联位置",
-    "adhustText2": "请选择位置,确认左右视图中的场景在同一位置后,单击右侧按钮将其设为关联位置。",
-    "userLogin": "用户登录",
-    "rememberPassword": "记住密码",
-    "forgetPassword": "忘记密码",
-    "resigter": "官网注册",
-    "setPointfaidText": "匹配失败,请选择不同点位进行同步",
-    "pointUpdate": "关联位置已更新"
-  },
-  "components": {
-    "uploadVideo": "上传视频",
-    "limitFileSizeBit": "支持 {file} 文件:≤ {size}MB,≤ {bit}Mbps",
-    "linkView": "网页展示区",
-    "continueAdd": "继续添加",
-    "uploadImg": "上传图片",
-    "limitImgLength": "支持JPG、PNG等图片格式,单张不超过5MB,最多支持上传9张。",
-    "TipsImgLength": "图片数量最多支持上传9张",
-    "limitFileSize": "支持 {file} 文件:≤ {size}MB",
-    "FileSizeTips": "请上传 {size}MB 以内的 {file} 文件",
-    "uploadAudio": "上传音频",
-    "year": "年",
-    "month": "月",
-    "day": "日",
-    "chooseTime": "选择时间"
-  },
-  "tag": {
-    "addComment": "发一条评论吧",
-    "addCommentTips": "请输入内容",
-    "deletetCommentTips": "确定要删除吗?",
-    "noComment": "暂无评论",
-    "unkownUser": "未知用户",
-    "reply": "回复",
-    "comment": "评论",
-    "creater": "创建人",
-    "createTime": "创建时间",
-    "statusText1": "待处理",
-    "statusText2": "进行中",
-    "statusText3": "未解决",
-    "statusText4": "已解决",
-    "uploadFile": "上传附件",
-    "desc": "描述",
-    "member": "涉及的成员",
-    "status": "状态",
-    "inputDesc": "请输入描述",
-    "inputMember": "请选择需要通知的项目人员",
-    "inputStatus": "请选择处理状态",
-    "inputTagName": "请输入标注名称",
-    "tagName": "标注名称",
-    "creatTag": "新建标注",
-    "addTag": "添加标注",
-    "isAddTag": "已添加标注",
-    "deleteTagText": "确定要删除资料吗?"
-  },
-  "tag.name": "标注",
-  "components.name": "组件",
-  "header.name": "头部",
-  "common": {
-    "input": "请输入",
-    "publish": "发布",
-    "submit": "提交",
-    "exit": "退出",
-    "delete": "删除",
-    "edit": "编辑",
-    "confirm": "确定",
-    "tips": "提示",
-    "login": "登录",
-    "cancel": "取消",
-    "sync": "同步",
-    "deleteSuccess": "删除成功",
-    "copySuccess": "复制成功",
-    "syncSuccess": "同步成功"
-  },
-  "common.name": "通用",
-  "code": {
-    "failed": "连接服务器失败",
-    "4008": "用户未登录"
-  },
-  "code.name": "状态码"
+    "home": {
+        "tag": "标注",
+        "splitScreen": "分屏",
+        "fullScreen": "全屏"
+    },
+    "home.name": "首页",
+    "header": {
+        "passwordText1": "密码不能为空",
+        "phoneText1": "手机号码不能为空",
+        "phoneText2": "请输入正确手机号",
+        "copyLink": "复制链接",
+        "shareLink": "分享链接",
+        "setting": "设为",
+        "reset": "重设",
+        "userInfo": "个人信息",
+        "loginout": "退出登录",
+        "adhustText1": "为场景设置关联位置",
+        "adhustText2": "请选择位置,确认左右视图中的场景在同一位置后,单击右侧按钮将其设为关联位置。",
+        "userLogin": "用户登录",
+        "rememberPassword": "记住密码",
+        "forgetPassword": "忘记密码",
+        "resigter": "官网注册",
+        "setPointfaidText": "匹配失败,请选择不同点位进行同步",
+        "pointUpdate": "关联位置已更新"
+    },
+    "components": {
+        "uploadVideo": "上传视频",
+        "limitFileSizeBit": "支持 {file} 文件:≤ {size}MB,≤ {bit}Mbps",
+        "linkView": "网页展示区",
+        "continueAdd": "继续添加",
+        "uploadImg": "上传图片",
+        "limitImgLength": "支持JPG、PNG等图片格式,单张不超过5MB,最多支持上传9张。",
+        "TipsImgLength": "图片数量最多支持上传9张",
+        "limitFileSize": "支持 {file} 文件:≤ {size}MB",
+        "FileSizeTips": "请上传 {size}MB 以内的 {file} 文件",
+        "uploadAudio": "上传音频",
+        "year": "年",
+        "month": "月",
+        "day": "日",
+        "chooseTime": "选择时间"
+    },
+    "tag": {
+        "addComment": "发一条评论吧",
+        "addCommentTips": "请输入内容",
+        "deletetCommentTips": "确定要删除吗?",
+        "noComment": "暂无评论",
+        "unkownUser": "未知用户",
+        "reply": "回复",
+        "comment": "评论",
+        "creater": "创建人",
+        "createTime": "创建时间",
+        "statusText1": "待处理",
+        "statusText2": "进行中",
+        "statusText3": "未解决",
+        "statusText4": "已解决",
+        "uploadFile": "上传附件",
+        "desc": "描述",
+        "member": "涉及的成员",
+        "status": "状态",
+        "inputDesc": "请输入描述",
+        "inputMember": "请选择需要通知的项目人员",
+        "inputStatus": "请选择处理状态",
+        "inputTagName": "请输入标注名称",
+        "tagName": "标注名称",
+        "creatTag": "新建标注",
+        "addTag": "添加标注",
+        "isAddTag": "已添加标注",
+        "deleteTagText": "确定要删除资料吗?"
+    },
+    "tag.name": "标注",
+    "components.name": "组件",
+    "header.name": "头部",
+    "common": {
+        "input": "请输入",
+        "publish": "发布",
+        "submit": "提交",
+        "exit": "退出",
+        "delete": "删除",
+        "edit": "编辑",
+        "confirm": "确定",
+        "tips": "提示",
+        "login": "登录",
+        "cancel": "取消",
+        "sync": "同步",
+        "deleteSuccess": "删除成功",
+        "copySuccess": "复制成功",
+        "syncSuccess": "同步成功"
+    },
+    "common.name": "通用",
+    "code": {
+        "4008": "用户未登录",
+        "failed": "连接服务器失败"
+    },
+    "code.name": "状态码"
 }