Pārlūkot izejas kodu

国际化优化

kuaifan 5 gadi atpakaļ
vecāks
revīzija
2068bba093
32 mainītis faili ar 582 papildinājumiem un 556 dzēšanām
  1. 1 2
      resources/assets/js/common.js
  2. 19 19
      resources/assets/js/main/components/ImgUpload.vue
  3. 12 12
      resources/assets/js/main/components/TEditor.vue
  4. 40 36
      resources/assets/js/main/components/UseridInput.vue
  5. 1 5
      resources/assets/js/main/components/WHeader.vue
  6. 25 25
      resources/assets/js/main/components/docs/minder/minder.vue
  7. 15 14
      resources/assets/js/main/components/project/archived.vue
  8. 14 13
      resources/assets/js/main/components/project/header/archived.vue
  9. 10 9
      resources/assets/js/main/components/project/header/create.vue
  10. 11 10
      resources/assets/js/main/components/project/my/favor.vue
  11. 9 8
      resources/assets/js/main/components/project/my/join.vue
  12. 9 8
      resources/assets/js/main/components/project/my/manage.vue
  13. 14 13
      resources/assets/js/main/components/project/statistics.vue
  14. 9 9
      resources/assets/js/main/components/project/task/add.vue
  15. 97 94
      resources/assets/js/main/components/project/task/detail/detail.vue
  16. 32 31
      resources/assets/js/main/components/project/task/files.vue
  17. 32 31
      resources/assets/js/main/components/project/task/lists.vue
  18. 8 10
      resources/assets/js/main/components/project/task/logs.vue
  19. 11 10
      resources/assets/js/main/components/project/todo/attention.vue
  20. 9 8
      resources/assets/js/main/components/project/todo/complete.vue
  21. 20 19
      resources/assets/js/main/components/project/users.vue
  22. 12 8
      resources/assets/js/main/components/report/add.vue
  23. 30 28
      resources/assets/js/main/components/report/my.vue
  24. 25 23
      resources/assets/js/main/components/report/receive.vue
  25. 4 4
      resources/assets/js/main/mixins/project.js
  26. 29 25
      resources/assets/js/main/pages/docs.vue
  27. 16 16
      resources/assets/js/main/pages/docs/edit.vue
  28. 2 2
      resources/assets/js/main/pages/index.vue
  29. 24 23
      resources/assets/js/main/pages/project.vue
  30. 17 17
      resources/assets/js/main/pages/project/panel.vue
  31. 18 17
      resources/assets/js/main/pages/team.vue
  32. 7 7
      resources/assets/js/main/pages/todo.vue

+ 1 - 2
resources/assets/js/common.js

@@ -1359,8 +1359,7 @@
             //
             if (typeof params.header !== 'object') params.header = {};
             params.header['Content-Type'] = 'application/json';
-            // params.header['platform'] = 'wap';
-            // params.header['release'] = '1.0.0';
+            params.header['language'] = window.localStorage['__language:type__'] || 'zh';
             params.header['token'] = $A.token();
             //渠道
             let channel = $A.hashParameter('channel');

+ 19 - 19
resources/assets/js/main/components/ImgUpload.vue

@@ -18,7 +18,7 @@
             </div>
             <div class="add-box-upload">
                 <div class="add-box-item" @click="browsePicture">
-                    <span>浏览<em v-if="type === 'callback'">图片</em></span>
+                    <span>{{$L('浏览')}}<em v-if="type === 'callback'">{{$L('图片')}}</em></span>
                 </div>
                 <div class="add-box-item">
                     <Upload
@@ -36,13 +36,13 @@
                             :on-exceeded-size="handleMaxSize"
                             :before-upload="handleBeforeUpload"
                             :multiple=multiple>
-                        <span>上传<em v-if="type === 'callback'">图片</em></span>
+                        <span>{{$L('上传')}}<em v-if="type === 'callback'">{{$L('图片')}}</em></span>
                     </Upload>
                 </div>
             </div>
         </div>
-        <Modal title="浏览图片空间的图片" v-model="browseVisible" class="img-upload-modal" width="710" :styles="{top: '35px',paddingBottom: '35px'}">
-            <div class="browse-load" v-if="isLoading">加载中...</div>
+        <Modal :title="$L('浏览图片空间的图片')" v-model="browseVisible" class="img-upload-modal" width="710" :styles="{top: '35px',paddingBottom: '35px'}">
+            <div class="browse-load" v-if="isLoading">{{$L('加载中...')}}</div>
             <div class="browse-list" :class="httpType==='input'?'browse-list-disabled':''" ref="browselistbox">
                 <div class="browse-item" v-for="item in browseList" @click="browseItem(item)">
                     <Icon v-if="item.active" class="browse-icon" type="ios-checkmark-circle"></Icon>
@@ -53,18 +53,18 @@
             <div slot="footer" class="img-upload-foot">
                 <div v-if="type !== 'callback' && http && httpType===''" class="img-upload-foot-input" @click="httpType='input'">
                     <Icon type="ios-image" size="22"/>
-                    <div class="img-upload-foot-httptitle">自定义图片地址</div>
+                    <div class="img-upload-foot-httptitle">{{$L('自定义图片地址')}}</div>
                 </div>
                 <div v-if="type !== 'callback' && http && httpType==='input'" class="img-upload-foot-input">
-                    <Input v-model="httpValue" placeholder="以“http://”或“https://”开头" @on-search="httpEnter" search enter-button="确定">
-                        <span slot="prepend" @click="httpType=''" style="cursor:pointer">自定义地址:</span>
+                    <Input v-model="httpValue" :placeholder="$L('以“http://”或“https://”开头')" @on-search="httpEnter" search :enter-button="$L('确定')">
+                        <span slot="prepend" @click="httpType=''" style="cursor:pointer">{{$L('自定义地址')}}: </span>
                     </Input>
                 </div>
-                <Button v-if="httpType===''" @click="browseVisible=false">关闭</Button>
-                <Button v-if="httpType===''" type="primary" @click="handleCallback(true)">完成</Button>
+                <Button v-if="httpType===''" @click="browseVisible=false">{{$L('关闭')}}</Button>
+                <Button v-if="httpType===''" type="primary" @click="handleCallback(true)">{{$L('完成')}}</Button>
             </div>
         </Modal>
-        <Modal title="查看图片" v-model="visible" class="img-upload-modal" draggable>
+        <Modal :title="$L('查看图片')" v-model="visible" class="img-upload-modal" draggable>
             <div style="max-height:480px;overflow:auto;">
                 <a :href="imgVisible" target="_blank"><img :src="imgVisible" v-if="visible" style="max-width:100%;max-height:900px;display:block;margin:0 auto"></a>
             </div>
@@ -414,8 +414,8 @@
                     this.handleCallback(file);
                 }else{
                     this.$Modal.warning({
-                        title: '上传失败',
-                        content: '文件 ' + file.name + ' 上传失败,' + res.msg
+                        title: this.$L('上传失败'),
+                        content: this.$L('文件')+ ' ' + file.name + ' ' + this.$L('上传失败') + ', ' + res.msg
                     });
                     this.$refs.upload.fileList.pop();
                 }
@@ -424,22 +424,22 @@
             handleFormatError (file) {
                 //上传类型错误
                 this.$Modal.warning({
-                    title: '文件格式不正确',
-                    content: '文件 ' + file.name + ' 格式不正确,请上传 jpg、jpeg、gif、png 格式的图片'
+                    title: this.$L('文件格式不正确'),
+                    content: this.$L('文件') + ' ' + file.name + ' ' + this.$L('格式不正确,请上传') + ' jpg、jpeg、gif、png ' + this.$L('格式的图片')
                 });
             },
             handleMaxSize (file) {
                 //上传大小错误
                 this.$Modal.warning({
-                    title: '超出文件大小限制',
-                    content: '文件 ' + file.name + ' 太大,不能超过 2M'
+                    title: this.$L('超出文件大小限制'),
+                    content: this.$L('文件') + ' ' + file.name + ' ' + this.$L('太大,不能超过') + ' 2M'
                 });
             },
             handleBeforeUpload () {
                 //上传前判断
                 let check = this.uploadList.length < this.maxNum;
                 if (!check) {
-                    this.$Modal.warning({ title: '温馨提示', content: '最多只能上传 ' + this.maxNum + ' 张图片' });
+                    this.$Modal.warning({ title: this.$L('温馨提示'), content: this.$L('最多只能上传') + ' ' + this.maxNum + ' ' + this.$L('张图片') });
                 }
                 return check;
             },
@@ -471,7 +471,7 @@
                             this.browsePictureFor(res.data['files']);
                         }else if (res.ret === -2) {
                             this.browseVisible = false;
-                            this.$Modal.warning({ title: '温馨提示', content: res.msg });
+                            this.$Modal.warning({ title: this.$L('温馨提示'), content: res.msg });
                         }
                     }
                 });
@@ -515,7 +515,7 @@
                         }
                         let check = this.uploadList.length < this.maxNum;
                         if (!check) {
-                            this.$Modal.warning({ title: '温馨提示', content: '最多只能选择 ' + this.maxNum + ' 张图片' });
+                            this.$Modal.warning({ title: this.$L('温馨提示'), content: this.$L('最多只能选择') + ' ' + this.maxNum + ' ' + this.$L('张图片') });
                             return;
                         }
                         item.active = true;

+ 12 - 12
resources/assets/js/main/components/TEditor.vue

@@ -4,13 +4,13 @@
             <textarea ref="myTextarea" :id="id">{{ content }}</textarea>
             <Spin fix v-if="spinShow">
                 <Icon type="ios-loading" size=18 class="teditor-spin-icon-load"></Icon>
-                <div>加载组件中...</div>
+                <div>{{$L('加载组件中...')}}</div>
             </Spin>
             <img-upload ref="myUpload" class="teditor-upload" type="callback" @on-callback="editorImage" num="50" style="margin-top:5px;height:26px;"></img-upload>
         </div>
         <Modal v-model="transfer" class="teditor-transfer" @on-visible-change="transferChange" footer-hide fullscreen transfer>
             <div slot="close">
-                <Button type="primary" size="small">完成</Button>
+                <Button type="primary" size="small">{{$L('完成')}}</Button>
             </div>
             <div class="teditor-transfer-body">
                 <textarea :id="'T_' + id">{{ content }}</textarea>
@@ -254,18 +254,18 @@
                     toolbar_drawer: 'floating',
                     setup: (editor) => {
                         editor.ui.registry.addMenuButton('uploadImages', {
-                            text: '图片',
-                            tooltip: '上传/浏览 图片',
+                            text: this.$L('图片'),
+                            tooltip: this.$L('上传/浏览 图片'),
                             fetch: (callback) => {
                                 let items = [{
                                     type: 'menuitem',
-                                    text: '上传图片',
+                                    text: this.$L('上传图片'),
                                     onAction: () => {
                                         this.$refs.myUpload.handleClick();
                                     }
                                 }, {
                                     type: 'menuitem',
-                                    text: '浏览图片',
+                                    text: this.$L('浏览图片'),
                                     onAction: () => {
                                         this.$refs.myUpload.browsePicture();
                                     }
@@ -274,13 +274,13 @@
                             }
                         });
                         editor.ui.registry.addMenuItem('uploadImages', {
-                            text: '上传图片',
+                            text: this.$L('上传图片'),
                             onAction: () => {
                                 this.$refs.myUpload.handleClick();
                             }
                         });
                         editor.ui.registry.addMenuItem('browseImages', {
-                            text: '浏览图片',
+                            text: this.$L('浏览图片'),
                             onAction: () => {
                                 this.$refs.myUpload.browsePicture();
                             }
@@ -288,13 +288,13 @@
                         if (isFull) {
                             editor.ui.registry.addButton('screenload', {
                                 icon: 'fullscreen',
-                                tooltip: '退出全屏',
+                                tooltip: this.$L('退出全屏'),
                                 onAction: () => {
                                     this.closeFull();
                                 }
                             });
                             editor.ui.registry.addMenuItem('screenload', {
-                                text: '退出全屏',
+                                text: this.$L('退出全屏'),
                                 onAction: () => {
                                     this.closeFull();
                                 }
@@ -311,7 +311,7 @@
                         }else{
                             editor.ui.registry.addButton('screenload', {
                                 icon: 'fullscreen',
-                                tooltip: '全屏',
+                                tooltip: this.$L('全屏'),
                                 onAction: () => {
                                     this.content = editor.getContent();
                                     this.transfer = true;
@@ -319,7 +319,7 @@
                                 }
                             });
                             editor.ui.registry.addMenuItem('screenload', {
-                                text: '全屏',
+                                text: this.$L('全屏'),
                                 onAction: () => {
                                     this.content = editor.getContent();
                                     this.transfer = true;

+ 40 - 36
resources/assets/js/main/components/UseridInput.vue

@@ -9,7 +9,7 @@
                 <div v-if="$slots.prepend !== undefined" slot="prepend"><slot name="prepend"></slot></div>
                 <div v-if="$slots.append !== undefined" slot="append"><slot name="append"></slot></div>
             </Input>
-            <div v-if="userName" class="user-id-subtitle">用户名: {{userName}}</div>
+            <div v-if="userName" class="user-id-subtitle">{{$L('用户名')}}: {{userName}}</div>
             <div v-if="spinShow" class="user-id-spin"><div><w-loading></w-loading></div></div>
         </div>
 
@@ -171,38 +171,42 @@
 
                 winStyle: {},
 
-                columns: [
-                    {
-                        "title": "昵称",
-                        "key": "nickname",
-                        "minWidth": 80,
-                        "ellipsis": true,
-                        "tooltip": true,
-                        render: (h, params) => {
-                            let arr = [];
-                            let username = params.row.username;
-                            let mLists = this.multipleLists.filter((item) => { return item.username == username; });
-                            if (mLists.length > 0) {
-                                arr.push(h('Icon', {
-                                    props: { type: 'md-checkmark' },
-                                    style: { marginRight: '6px', fontSize: '16px', color: '#FF5722' },
-                                }));
-                            }
-                            arr.push(h('span', params.row.nickname || '-'));
-                            return h('div', arr);
-                        }
-                    }, {
-                        "title": "用户名",
-                        "key": "username",
-                        "minWidth": 80,
-                        "ellipsis": true,
-                        "tooltip": true,
-                    },
-                ],
+                columns: [],
                 userLists: [],
-                noDataText: "数据加载中.....",
+                noDataText: '',
             }
         },
+        created() {
+            this.columns = [
+                {
+                    "title": this.$L("昵称"),
+                    "key": "nickname",
+                    "minWidth": 80,
+                    "ellipsis": true,
+                    "tooltip": true,
+                    render: (h, params) => {
+                        let arr = [];
+                        let username = params.row.username;
+                        let mLists = this.multipleLists.filter((item) => { return item.username == username; });
+                        if (mLists.length > 0) {
+                            arr.push(h('Icon', {
+                                props: { type: 'md-checkmark' },
+                                style: { marginRight: '6px', fontSize: '16px', color: '#FF5722' },
+                            }));
+                        }
+                        arr.push(h('span', params.row.nickname || '-'));
+                        return h('div', arr);
+                    }
+                }, {
+                    "title": this.$L("用户名"),
+                    "key": "username",
+                    "minWidth": 80,
+                    "ellipsis": true,
+                    "tooltip": true,
+                },
+            ];
+            this.noDataText = this.$L("数据加载中.....");
+        },
         watch: {
             value (val) {
                 if (this.multiple) {
@@ -234,7 +238,7 @@
                         if (this.projectid) {
                             where['projectid'] = this.projectid;
                         }
-                        this.noDataText = "数据加载中.....";
+                        this.noDataText = this.$L("数据加载中.....");
                         $A.aAjax({
                             url: window.location.origin + '/api/users/searchinfo',
                             data: {
@@ -246,10 +250,10 @@
                             },
                             complete: () => {
                                 this.spinShow = false;
-                                this.noDataText = "没有相关的数据";
+                                this.noDataText = this.$L("没有相关的数据");
                             },
                             error: () => {
-                                this.noDataText = "数据加载失败!";
+                                this.noDataText = this.$L("数据加载失败!");
                             },
                             success: (res) => {
                                 if (res.ret === 1 && res.data.total > 0) {
@@ -370,7 +374,7 @@
                 if (this.projectid) {
                     where['projectid'] = this.projectid;
                 }
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: window.location.origin + '/api/users/searchinfo',
                     data: {
@@ -382,10 +386,10 @@
                     },
                     complete: () => {
                         this.spinShow = false;
-                        this.noDataText = "没有相关的数据";
+                        this.noDataText = this.$L("没有相关的数据");
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {

+ 1 - 5
resources/assets/js/main/components/WHeader.vue

@@ -14,7 +14,6 @@
                     </li>
                 </ul>
             </div>
-            <div class="w-header-row-flex"></div>
             <div class="w-header-row-right">
                 <Dropdown class="right-info" trigger="click" @on-click="setRightSelect" placement="bottom-end" transfer>
                    <div>
@@ -127,7 +126,7 @@
             z-index: 10;
             margin: 0 32px;
             .w-header-row-left {
-                max-width: 50%;
+                flex: 1;
                 white-space: nowrap;
                 overflow: hidden;
                 overflow-x: auto;
@@ -154,9 +153,6 @@
                     background: #0277c0;
                 }
             }
-            .w-header-row-flex {
-                flex: 1;
-            }
             .w-header-row-right {
                 white-space: nowrap;
                 text-align: right;

+ 25 - 25
resources/assets/js/main/components/docs/minder/minder.vue

@@ -2,7 +2,7 @@
     <div class="minder-editor-container">
         <div class="quickbar">
             <Tooltip placement="top" theme="light">
-                <i class="ft icon" title="缩放">&#xE7B3;</i>
+                <i class="ft icon" :title="$L('缩放')">&#xE7B3;</i>
                 <div slot="content">
                     <ul class="quickul">
                         <li @click="minder.execCommand('Zoom', 200)">200%</li>
@@ -14,7 +14,7 @@
                 </div>
             </Tooltip>
             <Tooltip placement="top" theme="light">
-                <i class="ft icon" title="图形">&#xE621;</i>
+                <i class="ft icon" :title="$L('图形')">&#xE621;</i>
                 <div slot="content">
                     <ul class="quickul mold">
                         <li @click="minder.execCommand('template', 'default')"><span class="default"></span></li>
@@ -27,41 +27,41 @@
                 </div>
             </Tooltip>
             <Tooltip placement="top" theme="light">
-                <i class="ft icon" title="样式">&#xE678;</i>
+                <i class="ft icon" :title="$L('样式')">&#xE678;</i>
                 <div slot="content">
                     <ul class="quickul">
-                        <li @click="minder.execCommand('theme', 'fresh-blue')">天空蓝</li>
-                        <li @click="minder.execCommand('theme', 'wire')">线框</li>
-                        <li @click="minder.execCommand('theme', 'fish')">鱼骨图</li>
-                        <li @click="minder.execCommand('theme', 'classic')">脑图经典</li>
-                        <li @click="minder.execCommand('theme', 'classic-compact')">紧凑经典</li>
-                        <li @click="minder.execCommand('theme', 'snow')">温柔冷光</li>
-                        <li @click="minder.execCommand('theme', 'snow-compact')">紧凑冷光</li>
-                        <li @click="minder.execCommand('theme', 'tianpan')">经典天盘</li>
-                        <li @click="minder.execCommand('theme', 'tianpan-compact')">紧凑天盘</li>
+                        <li @click="minder.execCommand('theme', 'fresh-blue')">{{$L('天空蓝')}}</li>
+                        <li @click="minder.execCommand('theme', 'wire')">{{$L('线框')}}</li>
+                        <li @click="minder.execCommand('theme', 'fish')">{{$L('鱼骨图')}}</li>
+                        <li @click="minder.execCommand('theme', 'classic')">{{$L('脑图经典')}}</li>
+                        <li @click="minder.execCommand('theme', 'classic-compact')">{{$L('紧凑经典')}}</li>
+                        <li @click="minder.execCommand('theme', 'snow')">{{$L('温柔冷光')}}</li>
+                        <li @click="minder.execCommand('theme', 'snow-compact')">{{$L('紧凑冷光')}}</li>
+                        <li @click="minder.execCommand('theme', 'tianpan')">{{$L('经典天盘')}}</li>
+                        <li @click="minder.execCommand('theme', 'tianpan-compact')">{{$L('紧凑天盘')}}</li>
                     </ul>
                 </div>
             </Tooltip>
             <Tooltip placement="top" theme="light">
-                <i class="ft icon" title="折叠">&#xE779;</i>
+                <i class="ft icon" :title="$L('折叠')">&#xE779;</i>
                 <div slot="content">
                     <ul class="quickul">
-                        <li @click="minder.execCommand('ExpandToLevel', 1)">展开到一级节点</li>
-                        <li @click="minder.execCommand('ExpandToLevel', 2)">展开到二级节点</li>
-                        <li @click="minder.execCommand('ExpandToLevel', 3)">展开到三级节点</li>
-                        <li @click="minder.execCommand('ExpandToLevel', 4)">展开到四级节点</li>
-                        <li @click="minder.execCommand('ExpandToLevel', 5)">展开到五级节点</li>
-                        <li @click="minder.execCommand('ExpandToLevel', 99)">展开全部节点</li>
+                        <li @click="minder.execCommand('ExpandToLevel', 1)">{{$L('展开到一级节点')}}</li>
+                        <li @click="minder.execCommand('ExpandToLevel', 2)">{{$L('展开到二级节点')}}</li>
+                        <li @click="minder.execCommand('ExpandToLevel', 3)">{{$L('展开到三级节点')}}</li>
+                        <li @click="minder.execCommand('ExpandToLevel', 4)">{{$L('展开到四级节点')}}</li>
+                        <li @click="minder.execCommand('ExpandToLevel', 5)">{{$L('展开到五级节点')}}</li>
+                        <li @click="minder.execCommand('ExpandToLevel', 99)">{{$L('展开全部节点')}}</li>
                     </ul>
                 </div>
             </Tooltip>
-            <Tooltip placement="top" content="居中">
+            <Tooltip placement="top" :content="$L('居中')">
                 <div @click="minder.execCommand('camera', minder.getRoot(), 600)"><i class="ft icon">&#xE61F;</i></div>
             </Tooltip>
-            <Tooltip placement="top" content="移动">
+            <Tooltip placement="top" :content="$L('移动')">
                 <div @click="[minder.execCommand('Hand'),isHand=!isHand]"><i class="ft icon" :class="{active:isHand}">&#xE6CF;</i></div>
             </Tooltip>
-            <Tooltip placement="top" content="导出PNG图片">
+            <Tooltip placement="top" :content="$L('导出PNG图片')">
                 <div @click="exportHandle(0)"><Icon type="md-photos"/></div>
             </Tooltip>
         </div>
@@ -224,7 +224,7 @@
                     this.minder.exportData('png').then((content) => {
                         let element = document.createElement('a');
                         element.setAttribute('href', content);
-                        let filename = this.value.root.data.text || '无标题';
+                        let filename = this.value.root.data.text || this.$L('无标题');
                         element.setAttribute('download', filename);
                         element.style.display = 'none';
                         document.body.appendChild(element);
@@ -235,7 +235,7 @@
                     this.minder.exportData('png').then((content) => {
                         var doc = new JSPDF();
                         doc.addImage(content, 'PNG', 0, 0, 0, 0);
-                        doc.save(`${this.value.root.data.text || '无标题'}.pdf`);
+                        doc.save(`${this.value.root.data.text || this.$L('无标题')}.pdf`);
                     });
                 }
             },
@@ -269,7 +269,7 @@
                         newObj.root = {
                             data: {
                                 id: generateMixed(12),
-                                text: '默认节点',
+                                text: this.$L('默认节点'),
                             },
                             children: []
                         }

+ 15 - 14
resources/assets/js/main/components/project/archived.vue

@@ -49,40 +49,41 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
             }
         },
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "任务名称",
+                "title": this.$L("任务名称"),
                 "key": 'title',
                 "minWidth": 120,
                 render: (h, params) => {
                     return this.renderTaskTitle(h, params);
                 }
             }, {
-                "title": "创建人",
+                "title": this.$L("创建人"),
                 "key": 'createuser',
                 "minWidth": 80,
             }, {
-                "title": "负责人",
+                "title": this.$L("负责人"),
                 "key": 'username',
                 "minWidth": 80,
             }, {
-                "title": "完成",
+                "title": this.$L("完成"),
                 "minWidth": 70,
                 "align": "center",
                 render: (h, params) => {
                     return h('span', params.row.complete ? '√' : '-');
                 }
             }, {
-                "title": "归档时间",
+                "title": this.$L("归档时间"),
                 "width": 160,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.archiveddate));
                 }
             }, {
-                "title": "操作",
+                "title": this.$L("操作"),
                 "key": 'action',
                 "width": 100,
                 "align": 'center',
@@ -98,8 +99,8 @@
                         on: {
                             click: () => {
                                 this.$Modal.confirm({
-                                    title: '取消归档',
-                                    content: '你确定要取消归档吗?',
+                                    title: this.$L('取消归档'),
+                                    content: this.$L('你确定要取消归档吗?'),
                                     loading: true,
                                     onOk: () => {
                                         $A.aAjax({
@@ -129,7 +130,7 @@
                                 });
                             }
                         }
-                    }, '取消归档');
+                    }, this.$L('取消归档'));
                 }
             }];
         },
@@ -210,11 +211,11 @@
                 if (this.projectid == 0) {
                     this.lists = [];
                     this.listTotal = 0;
-                    this.noDataText = "没有相关的数据";
+                    this.noDataText = this.$L("没有相关的数据");
                     return;
                 }
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/task/lists',
                     data: {
@@ -227,13 +228,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;

+ 14 - 13
resources/assets/js/main/components/project/header/archived.vue

@@ -46,40 +46,41 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
             }
         },
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "任务名称",
+                "title": this.$L("任务名称"),
                 "key": 'title',
                 "minWidth": 120,
                 render: (h, params) => {
                     return this.renderTaskTitle(h, params);
                 }
             }, {
-                "title": "创建人",
+                "title": this.$L("创建人"),
                 "key": 'createuser',
                 "minWidth": 80,
             }, {
-                "title": "负责人",
+                "title": this.$L("负责人"),
                 "key": 'username',
                 "minWidth": 80,
             }, {
-                "title": "完成",
+                "title": this.$L("完成"),
                 "minWidth": 70,
                 "align": "center",
                 render: (h, params) => {
                     return h('span', params.row.complete ? '√' : '-');
                 }
             }, {
-                "title": "归档时间",
+                "title": this.$L("归档时间"),
                 "width": 160,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.archiveddate));
                 }
             }, {
-                "title": "操作",
+                "title": this.$L("操作"),
                 "key": 'action',
                 "width": 100,
                 "align": 'center',
@@ -95,8 +96,8 @@
                         on: {
                             click: () => {
                                 this.$Modal.confirm({
-                                    title: '取消归档',
-                                    content: '你确定要取消归档吗?',
+                                    title: this.$L('取消归档'),
+                                    content: this.$L('你确定要取消归档吗?'),
                                     loading: true,
                                     onOk: () => {
                                         $A.aAjax({
@@ -126,7 +127,7 @@
                                 });
                             }
                         }
-                    }, '取消归档');
+                    }, this.$L('取消归档'));
                 }
             }];
         },
@@ -206,7 +207,7 @@
                     this.listPage = 1;
                 }
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/task/lists',
                     data: {
@@ -218,13 +219,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;

+ 10 - 9
resources/assets/js/main/components/project/header/create.vue

@@ -46,37 +46,38 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
             }
         },
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "任务名称",
+                "title": this.$L("任务名称"),
                 "key": 'title',
                 "minWidth": 120,
                 render: (h, params) => {
                     return this.renderTaskTitle(h, params);
                 }
             }, {
-                "title": "负责人",
+                "title": this.$L("负责人"),
                 "key": 'username',
                 "minWidth": 80,
             }, {
-                "title": "完成",
+                "title": this.$L("完成"),
                 "minWidth": 70,
                 "align": "center",
                 render: (h, params) => {
                     return h('span', params.row.complete ? '√' : '-');
                 }
             }, {
-                "title": "归档",
+                "title": this.$L("归档"),
                 "minWidth": 70,
                 "align": "center",
                 render: (h, params) => {
                     return h('span', params.row.archived ? '√' : '-');
                 }
             }, {
-                "title": "创建时间",
+                "title": this.$L("创建时间"),
                 "width": 160,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.indate));
@@ -140,7 +141,7 @@
                     this.listPage = 1;
                 }
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/task/lists',
                     data: {
@@ -153,13 +154,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;

+ 11 - 10
resources/assets/js/main/components/project/my/favor.vue

@@ -43,12 +43,13 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
             }
         },
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "项目名称",
+                "title": this.$L("项目名称"),
                 "key": 'title',
                 "minWidth": 100,
                 render: (h, params) => {
@@ -64,13 +65,13 @@
                     }, params.row.title);
                 },
             }, {
-                "title": "收藏时间",
+                "title": this.$L("收藏时间"),
                 "minWidth": 160,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.uindate));
                 }
             }, {
-                "title": "操作",
+                "title": this.$L("操作"),
                 "key": 'action',
                 "width": 80,
                 "align": 'center',
@@ -86,8 +87,8 @@
                         on: {
                             click: () => {
                                 this.$Modal.confirm({
-                                    title: '取消收藏',
-                                    content: '你确定要取消收藏此项目吗?',
+                                    title: this.$L('取消收藏'),
+                                    content: this.$L('你确定要取消收藏此项目吗?'),
                                     loading: true,
                                     onOk: () => {
                                         this.favorProject('cancel', params.row.id, () => {
@@ -97,7 +98,7 @@
                                 });
                             }
                         }
-                    }, '取消');
+                    }, this.$L('取消'));
                 }
             }];
         },
@@ -135,7 +136,7 @@
                     this.listPage = 1;
                 }
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/lists',
                     data: {
@@ -147,13 +148,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;

+ 9 - 8
resources/assets/js/main/components/project/my/join.vue

@@ -43,12 +43,13 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
             }
         },
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "项目名称",
+                "title": this.$L("项目名称"),
                 "key": 'title',
                 "minWidth": 100,
                 render: (h, params) => {
@@ -64,13 +65,13 @@
                     }, params.row.title);
                 },
             }, {
-                "title": "加入时间",
+                "title": this.$L("加入时间"),
                 "minWidth": 160,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.uindate));
                 }
             }, {
-                "title": "操作",
+                "title": this.$L("操作"),
                 "key": 'action',
                 "width": 80,
                 "align": 'center',
@@ -90,7 +91,7 @@
                                 });
                             }
                         }
-                    }, '退出');
+                    }, this.$L('退出'));
                 }
             }];
         },
@@ -128,7 +129,7 @@
                     this.listPage = 1;
                 }
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/lists',
                     data: {
@@ -140,13 +141,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;

+ 9 - 8
resources/assets/js/main/components/project/my/manage.vue

@@ -43,12 +43,13 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
             }
         },
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "项目名称",
+                "title": this.$L("项目名称"),
                 "key": 'title',
                 "minWidth": 100,
                 render: (h, params) => {
@@ -64,13 +65,13 @@
                     }, params.row.title);
                 },
             }, {
-                "title": "创建时间",
+                "title": this.$L("创建时间"),
                 "minWidth": 160,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.indate));
                 }
             }, {
-                "title": "操作",
+                "title": this.$L("操作"),
                 "key": 'action',
                 "width": 80,
                 "align": 'center',
@@ -90,7 +91,7 @@
                                 });
                             }
                         }
-                    }, '删除');
+                    }, this.$L('删除'));
                 }
             }];
         },
@@ -128,7 +129,7 @@
                     this.listPage = 1;
                 }
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/lists',
                     data: {
@@ -140,13 +141,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;

+ 14 - 13
resources/assets/js/main/components/project/statistics.vue

@@ -6,19 +6,19 @@
                 <li :class="[taskType==='未完成'?'active':'']" @click="taskType='未完成'">
                     <div class="yellow">
                         <h1 class="count">{{statistics_unfinished}}</h1>
-                        <p>未完成任务</p>
+                        <p>{{$L('未完成任务')}}</p>
                     </div>
                 </li>
                 <li :class="[taskType==='已超期'?'active':'']" @click="taskType='已超期'">
                     <div class="red">
                         <h1 class="count">{{statistics_overdue}}</h1>
-                        <p>超期任务</p>
+                        <p>{{$L('超期任务')}}</p>
                     </div>
                 </li>
                 <li :class="[taskType==='已完成'?'active':'']" @click="taskType='已完成'">
                     <div class="terques">
                         <h1 class="count">{{statistics_complete}}</h1>
-                        <p>已完成任务</p>
+                        <p>{{$L('已完成任务')}}</p>
                     </div>
                 </li>
             </ul>
@@ -156,7 +156,7 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
 
                 statistics_unfinished: 0,
                 statistics_overdue: 0,
@@ -164,30 +164,31 @@
             }
         },
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "任务名称",
+                "title": this.$L("任务名称"),
                 "key": 'title',
                 "minWidth": 120,
                 render: (h, params) => {
                     return this.renderTaskTitle(h, params);
                 }
             }, {
-                "title": "创建人",
+                "title": this.$L("创建人"),
                 "key": 'createuser',
                 "minWidth": 80,
             }, {
-                "title": "负责人",
+                "title": this.$L("负责人"),
                 "key": 'username',
                 "minWidth": 80,
             }, {
-                "title": "完成",
+                "title": this.$L("完成"),
                 "minWidth": 70,
                 "align": "center",
                 render: (h, params) => {
                     return h('span', params.row.complete ? '√' : '-');
                 }
             }, {
-                "title": "创建时间",
+                "title": this.$L("创建时间"),
                 "width": 160,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.indate));
@@ -296,12 +297,12 @@
                 if (this.projectid == 0) {
                     this.lists = [];
                     this.listTotal = 0;
-                    this.noDataText = "没有相关的数据";
+                    this.noDataText = this.$L("没有相关的数据");
                     return;
                 }
                 this.loadIng++;
                 let tempType = this.taskType;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/task/lists',
                     data: {
@@ -315,7 +316,7 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (tempType != this.taskType) {
@@ -324,7 +325,7 @@
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;

+ 9 - 9
resources/assets/js/main/components/project/task/add.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="task-input-box">
         <div v-if="!addText" class="input-placeholder">
-            <Icon type="md-create" size="18"/>&nbsp;{{addFocus?`输入任务,回车即可保存`:placeholder}}
+            <Icon type="md-create" size="18"/>&nbsp;{{addFocus?`${$L('输入任务,回车即可保存')}`:placeholder}}
         </div>
         <div class="input-enter">
             <Input
@@ -16,13 +16,13 @@
                 :maxlength="255"
                 @on-keydown="addKeydown"/>
             <div v-if="!!addText" class="input-enter-module">
-                <Tooltip content="重要且紧急" placement="bottom" transfer><div @click="addLevel=1" class="enter-module-icon p1"><Icon v-if="addLevel=='1'" type="md-checkmark" /></div></Tooltip>
-                <Tooltip content="重要不紧急" placement="bottom" transfer><div @click="addLevel=2" class="enter-module-icon p2"><Icon v-if="addLevel=='2'" type="md-checkmark" /></div></Tooltip>
-                <Tooltip content="紧急不重要" placement="bottom" transfer><div @click="addLevel=3" class="enter-module-icon p3"><Icon v-if="addLevel=='3'" type="md-checkmark" /></div></Tooltip>
-                <Tooltip content="不重要不紧急" placement="bottom" transfer><div @click="addLevel=4" class="enter-module-icon p4"><Icon v-if="addLevel=='4'" type="md-checkmark" /></div></Tooltip>
+                <Tooltip :content="$L('重要且紧急')" placement="bottom" transfer><div @click="addLevel=1" class="enter-module-icon p1"><Icon v-if="addLevel=='1'" type="md-checkmark" /></div></Tooltip>
+                <Tooltip :content="$L('重要不紧急')" placement="bottom" transfer><div @click="addLevel=2" class="enter-module-icon p2"><Icon v-if="addLevel=='2'" type="md-checkmark" /></div></Tooltip>
+                <Tooltip :content="$L('紧急不重要')" placement="bottom" transfer><div @click="addLevel=3" class="enter-module-icon p3"><Icon v-if="addLevel=='3'" type="md-checkmark" /></div></Tooltip>
+                <Tooltip :content="$L('不重要不紧急')" placement="bottom" transfer><div @click="addLevel=4" class="enter-module-icon p4"><Icon v-if="addLevel=='4'" type="md-checkmark" /></div></Tooltip>
                 <div class="enter-module-flex"></div>
                 <Poptip placement="bottom" @on-popper-show="nameTipDisabled=true" @on-popper-hide="nameTipDisabled=false" transfer>
-                    <Tooltip :content="`负责人: ${addUsername||'自己'}`" placement="bottom" :disabled="nameTipDisabled">
+                    <Tooltip :content="`${$L('负责人')}: ${addUsername||$L('自己')}`" placement="bottom" :disabled="nameTipDisabled">
                         <div class="enter-module-icon user">
                             <img v-if="addUserimg" @error="addUserimg=''" :src="addUserimg"/>
                             <Icon v-else type="md-person" />
@@ -30,12 +30,12 @@
                     </Tooltip>
                     <div slot="content">
                         <div style="width:240px">
-                            选择负责人
-                            <UseridInput v-model="addUsername" :projectid="projectid" @change="changeUser" placeholder="留空默认: 自己" style="margin:5px 0 3px"></UseridInput>
+                            {{$L('选择负责人')}}
+                            <UseridInput v-model="addUsername" :projectid="projectid" @change="changeUser" :placeholder="$L('留空默认: 自己')" style="margin:5px 0 3px"></UseridInput>
                         </div>
                     </div>
                 </Poptip>
-                <Button class="enter-module-btn" type="info" size="small" @click="clickAdd">添加任务</Button>
+                <Button class="enter-module-btn" type="info" size="small" @click="clickAdd">{{$L('添加任务')}}</Button>
             </div>
         </div>
         <div v-if="loadIng > 0" class="load-box" @click.stop="">

+ 97 - 94
resources/assets/js/main/components/project/task/detail/detail.vue

@@ -6,83 +6,83 @@
                     <input v-model="detail.title" :disabled="!!loadData.title" type="text" maxlength="60" @keydown.enter="(e)=>{e.target.blur()}" @blur="handleTask('title')">
                     <div class="time">
                         <span class="z-nick">{{detail.createuser}}</span>
-                        创建于:
+                        {{$L('创建于:')}}
                         <span>{{$A.formatDate("Y-m-d H:i:s", detail.indate)}}</span>
                     </div>
                 </div>
                 <div class="detail-desc-box detail-icon">
-                    <div class="detail-h2"><strong class="active">描述</strong></div>
-                    <textarea v-model="detail.desc" placeholder="添加详细描述..."  @keydown="descKeydown" @blur="handleTask('desc')"></textarea>
+                    <div class="detail-h2"><strong class="active">{{$L('描述')}}</strong></div>
+                    <textarea v-model="detail.desc" :placeholder="$L('添加详细描述...')"  @keydown="descKeydown" @blur="handleTask('desc')"></textarea>
                 </div>
                 <ul class="detail-text-box">
                     <li v-if="detail.startdate > 0 && detail.enddate > 0" class="text-time detail-icon">
-                        <span>计划时间:</span>
-                        <em>{{$A.formatDate("Y-m-d H:i", detail.startdate)}} 至 {{$A.formatDate("Y-m-d H:i", detail.enddate)}}</em>
-                        <em v-if="detail.overdue" class="overdue">[已超期]</em>
+                        <span>{{$L('计划时间:')}}</span>
+                        <em>{{$A.formatDate("Y-m-d H:i", detail.startdate)}} {{$L('')}} {{$A.formatDate("Y-m-d H:i", detail.enddate)}}</em>
+                        <em v-if="detail.overdue" class="overdue">[{{$L('已超期')}}]</em>
                     </li>
                     <li class="text-username detail-icon">
-                        <span>负责人:</span>
+                        <span>{{$L('负责人:')}}</span>
                         <em>{{detail.username}}</em>
                     </li>
                     <li v-if="followerLength(detail.follower) > 0" class="text-follower detail-icon">
-                        <span>关注者:</span>
+                        <span>{{$L('关注者:')}}</span>
                         <em>
                             <Tag v-for="(fname, findex) in detail.follower" :key="findex" closable @on-close="handleTask('unattention', {username:fname,uisynch:true})">{{fname}}</Tag>
                         </em>
                     </li>
                     <li class="text-level detail-icon">
-                        <span>优先级:</span>
+                        <span>{{$L('优先级:')}}</span>
                         <em :class="`p${detail.level}`">{{levelFormt(detail.level)}}</em>
                     </li>
                     <li class="text-status detail-icon">
-                        <span>任务状态:</span>
-                        <em v-if="detail.complete" class="complete">已完成</em>
-                        <em v-else class="unfinished">未完成</em>
+                        <span>{{$L('任务状态:')}}</span>
+                        <em v-if="detail.complete" class="complete">{{$L('已完成')}}</em>
+                        <em v-else class="unfinished">{{$L('未完成')}}</em>
                     </li>
                 </ul>
                 <div :style="`${detail.filenum>0?'':'display:none'}`">
-                    <div class="detail-h2 detail-file-box detail-icon"><strong class="active">附件</strong></div>
+                    <div class="detail-h2 detail-file-box detail-icon"><strong class="active">{{$L('附件')}}</strong></div>
                     <project-task-files ref="upload" :taskid="taskid" :simple="true" @change="handleTask('filechange', $event)"></project-task-files>
                 </div>
-                <div class="detail-h2 detail-comment-box detail-icon"><strong class="link" :class="{active:logType=='评论'}" @click="logType='评论'">评论</strong><em></em><strong class="link" :class="{active:logType=='日志'}" @click="logType='日志'">操作记录</strong></div>
+                <div class="detail-h2 detail-comment-box detail-icon"><strong class="link" :class="{active:logType=='评论'}" @click="logType='评论'">{{$L('评论')}}</strong><em></em><strong class="link" :class="{active:logType=='日志'}" @click="logType='日志'">{{$L('操作记录')}}</strong></div>
                 <div class="detail-log-box">
                     <project-task-logs ref="log" :logtype="logType" :projectid="detail.projectid" :taskid="taskid" :pagesize="5"></project-task-logs>
                 </div>
                 <div class="detail-footer-box">
-                    <Input class="comment-input" v-model="commentText" type="textarea" :rows="1" :autosize="{ minRows: 1, maxRows: 3 }" :maxlength="255" @on-keydown="commentKeydown" placeholder="输入评论,Enter发表评论,Shift+Enter换行" />
+                    <Input class="comment-input" v-model="commentText" type="textarea" :rows="1" :autosize="{ minRows: 1, maxRows: 3 }" :maxlength="255" @on-keydown="commentKeydown" :placeholder="$L('输入评论,Enter发表评论,Shift+Enter换行')" />
                     <Button :loading="!!loadData.comment" :disabled="!commentText" type="primary" @click="handleTask('comment')">评 论</Button>
                 </div>
             </div>
             <div class="detail-right">
                 <div class="cancel"><em @click="visible=false"></em></div>
                 <Dropdown trigger="click" class="block" @on-click="handleTask">
-                    <Button :loading="!!loadData.unfinished || !!loadData.complete" icon="md-checkmark-circle-outline" class="btn">标记{{detail.complete?'未完成':'已完成'}}</Button>
+                    <Button :loading="!!loadData.unfinished || !!loadData.complete" icon="md-checkmark-circle-outline" class="btn">{{$L('标记')}}{{$L(detail.complete?'未完成':'已完成')}}</Button>
                     <DropdownMenu slot="list">
-                        <DropdownItem name="unfinished">标记未完成<Icon v-if="!detail.complete" type="md-checkmark" class="checkmark"/></DropdownItem>
-                        <DropdownItem name="complete">标记已完成<Icon v-if="detail.complete" type="md-checkmark" class="checkmark"/></DropdownItem>
-                        <DropdownItem name="archived2">完成并归档<Icon v-if="detail.complete && detail.archived" type="md-checkmark" class="checkmark"/></DropdownItem>
+                        <DropdownItem name="unfinished">{{$L('标记未完成')}}<Icon v-if="!detail.complete" type="md-checkmark" class="checkmark"/></DropdownItem>
+                        <DropdownItem name="complete">{{$L('标记已完成')}}<Icon v-if="detail.complete" type="md-checkmark" class="checkmark"/></DropdownItem>
+                        <DropdownItem name="archived2">{{$L('完成并归档')}}<Icon v-if="detail.complete && detail.archived" type="md-checkmark" class="checkmark"/></DropdownItem>
                     </DropdownMenu>
                 </Dropdown>
                 <Dropdown trigger="click" class="block" @on-click="handleTask">
-                    <Button :loading="!!loadData.level" icon="md-funnel" class="btn">优先级</Button>
+                    <Button :loading="!!loadData.level" icon="md-funnel" class="btn">{{$L('优先级')}}</Button>
                     <DropdownMenu slot="list">
                         <DropdownItem v-for="level in [1,2,3,4]" :key="level" :name="`level-${level}`" :class="`p${level}`">{{levelFormt(level)}}<Icon v-if="detail.level==level" type="md-checkmark" class="checkmark"/></DropdownItem>
                     </DropdownMenu>
                 </Dropdown>
                 <Poptip placement="bottom" class="block">
-                    <Button :loading="!!loadData.username" icon="md-person" class="btn">负责人</Button>
+                    <Button :loading="!!loadData.username" icon="md-person" class="btn">{{$L('负责人')}}</Button>
                     <div slot="content">
                         <div style="width:280px">
-                            选择负责人
-                            <UseridInput :projectid="detail.projectid" :nousername="detail.username" :transfer="false" @change="handleTask('usernameb', $event)" placeholder="输入关键词搜索" style="margin:5px 0 3px"></UseridInput>
+                            {{$L('选择负责人')}}
+                            <UseridInput :projectid="detail.projectid" :nousername="detail.username" :transfer="false" @change="handleTask('usernameb', $event)" :placeholder="$L('输入关键词搜索')" style="margin:5px 0 3px"></UseridInput>
                         </div>
                     </div>
                 </Poptip>
                 <Poptip ref="timeRef" placement="bottom" class="block" @on-popper-show="handleTask('inittime')">
-                    <Button :loading="!!loadData.plannedtime || !!loadData.unplannedtime" icon="md-calendar" class="btn">计划时间</Button>
+                    <Button :loading="!!loadData.plannedtime || !!loadData.unplannedtime" icon="md-calendar" class="btn">{{$L('计划时间')}}</Button>
                     <div slot="content">
                         <div style="width:280px">
-                            选择日期范围
+                            {{$L('选择日期范围')}}
                             <Date-picker
                                 v-model="timeValue"
                                 :options="timeOptions"
@@ -96,22 +96,22 @@
                         </div>
                     </div>
                 </Poptip>
-                <Button icon="md-attach" class="btn" @click="handleTask('fileupload')">添加附件</Button>
+                <Button icon="md-attach" class="btn" @click="handleTask('fileupload')">{{$L('添加附件')}}</Button>
                 <Poptip ref="attentionRef" v-if="detail.username == myUsername" placement="bottom" class="block" @on-popper-show="() => {$set(detail, 'attentionLists', followerToStr(detail.follower))}">
-                    <Button :loading="!!loadData.attention" icon="md-at" class="btn">关注人</Button>
+                    <Button :loading="!!loadData.attention" icon="md-at" class="btn">{{$L('关注人')}}</Button>
                     <div slot="content">
                         <div style="width:280px">
-                            选择关注人
-                            <UseridInput :multiple="true" :transfer="false" v-model="detail.attentionLists" placeholder="输入关键词搜索" style="margin:5px 0 3px"></UseridInput>
+                            {{$L('选择关注人')}}
+                            <UseridInput :multiple="true" :transfer="false" v-model="detail.attentionLists" :placeholder="$L('输入关键词搜索')" style="margin:5px 0 3px"></UseridInput>
                             <Button :loading="!!loadData.attention" :disabled="!detail.attentionLists" class="btn" type="primary" style="text-align:center;width:72px;height:28px;font-size:13px" @click="handleTask('attention')">确 定</Button>
                         </div>
                     </div>
                 </Poptip>
-                <Button v-else-if="haveAttention(detail.follower)" :loading="!!loadData.unattention" icon="md-at" class="btn" @click="handleTask('unattention', {username:myUsername})">取消关注</Button>
-                <Button v-else :loading="!!loadData.attention" icon="md-at" class="btn" @click="handleTask('attentiona')">关注任务</Button>
-                <Button v-if="!detail.archived" :loading="!!loadData.archived" icon="md-filing" class="btn" @click="handleTask('archived')">归档</Button>
-                <Button v-else :loading="!!loadData.unarchived" icon="md-filing" class="btn" @click="handleTask('unarchived')">取消归档</Button>
-                <Button :loading="!!loadData.delete" icon="md-trash" class="btn" type="error" ghost @click="handleTask('deleteb')">删除</Button>
+                <Button v-else-if="haveAttention(detail.follower)" :loading="!!loadData.unattention" icon="md-at" class="btn" @click="handleTask('unattention', {username:myUsername})">{{$L('取消关注')}}</Button>
+                <Button v-else :loading="!!loadData.attention" icon="md-at" class="btn" @click="handleTask('attentiona')">{{$L('关注任务')}}</Button>
+                <Button v-if="!detail.archived" :loading="!!loadData.archived" icon="md-filing" class="btn" @click="handleTask('archived')">{{$L('归档')}}</Button>
+                <Button v-else :loading="!!loadData.unarchived" icon="md-filing" class="btn" @click="handleTask('unarchived')">{{$L('取消归档')}}</Button>
+                <Button :loading="!!loadData.delete" icon="md-trash" class="btn" type="error" ghost @click="handleTask('deleteb')">{{$L('删除')}}</Button>
             </div>
         </div>
     </div>
@@ -136,52 +136,7 @@
                 logType: '评论',
 
                 timeValue: [],
-                timeOptions: {
-                    shortcuts: [{
-                        text: '今天',
-                        value() {
-                            return [new Date(), new Date()];
-                        }
-                    }, {
-                        text: '明天',
-                        value() {
-                            let e = new Date();
-                            e.setDate(e.getDate() + 1);
-                            return [new Date(), e];
-                        }
-                    }, {
-                        text: '本周',
-                        value() {
-                            return [$A.getData('今天', true), $A.getData('本周结束', true)];
-                        }
-                    }, {
-                        text: '本月',
-                        value() {
-                            return [$A.getData('今天', true), $A.getData('本月结束', true)];
-                        }
-                    }, {
-                        text: '3天',
-                        value() {
-                            let e = new Date();
-                            e.setDate(e.getDate() + 3);
-                            return [new Date(), e];
-                        }
-                    }, {
-                        text: '5天',
-                        value() {
-                            let e = new Date();
-                            e.setDate(e.getDate() + 5);
-                            return [new Date(), e];
-                        }
-                    }, {
-                        text: '7天',
-                        value() {
-                            let e = new Date();
-                            e.setDate(e.getDate() + 7);
-                            return [new Date(), e];
-                        }
-                    }]
-                },
+                timeOptions: {},
 
                 myUsername: '',
             }
@@ -192,6 +147,54 @@
                 if (doms[i].parentNode != null) doms[i].parentNode.removeChild(doms[i]);
             }
         },
+        created() {
+            this.timeOptions = {
+                shortcuts: [{
+                    text: this.$L('今天'),
+                    value() {
+                        return [new Date(), new Date()];
+                    }
+                }, {
+                    text: this.$L('明天'),
+                    value() {
+                        let e = new Date();
+                        e.setDate(e.getDate() + 1);
+                        return [new Date(), e];
+                    }
+                }, {
+                    text: this.$L('本周'),
+                    value() {
+                        return [$A.getData('今天', true), $A.getData('本周结束', true)];
+                    }
+                }, {
+                    text: this.$L('本月'),
+                    value() {
+                        return [$A.getData('今天', true), $A.getData('本月结束', true)];
+                    }
+                }, {
+                    text: this.$L('3天'),
+                    value() {
+                        let e = new Date();
+                        e.setDate(e.getDate() + 3);
+                        return [new Date(), e];
+                    }
+                }, {
+                    text: this.$L('5天'),
+                    value() {
+                        let e = new Date();
+                        e.setDate(e.getDate() + 5);
+                        return [new Date(), e];
+                    }
+                }, {
+                    text: this.$L('7天'),
+                    value() {
+                        let e = new Date();
+                        e.setDate(e.getDate() + 7);
+                        return [new Date(), e];
+                    }
+                }]
+            };
+        },
         mounted() {
             this.$nextTick(() => {
                 let dom = this.$el;
@@ -237,13 +240,13 @@
             levelFormt(p) {
                 switch (parseInt(p)) {
                     case 1:
-                        return "重要且紧急 (P1)";
+                        return this.$L("重要且紧急") + " (P1)";
                     case 2:
-                        return "重要不紧急 (P2)";
+                        return this.$L("重要不紧急") + " (P2)";
                     case 3:
-                        return "紧急不重要 (P3)";
+                        return this.$L("紧急不重要") + " (P3)";
                     case 4:
-                        return "不重要不紧急 (P4)";
+                        return this.$L("不重要不紧急") + " (P4)";
                 }
             },
 
@@ -400,8 +403,8 @@
                             return;
                         }
                         this.$Modal.confirm({
-                            title: '修改负责人',
-                            content: '你确定修改负责人设置为“' + (eve.nickname || eve.username) + '”吗?',
+                            title: this.$L('修改负责人'),
+                            content: this.$L('你确定修改负责人设置为“') + (eve.nickname || eve.username) + this.$L('”吗?'),
                             onOk: () => {
                                 this.handleTask('username', eve);
                             }
@@ -416,8 +419,8 @@
                         ajaxCallback = (res) => {
                             if (res === 1) {
                                 this.$Modal.info({
-                                    title: '温馨提示',
-                                    content: '任务负责人已改变,点击确定关闭窗口。',
+                                    title: this.$L('温馨提示'),
+                                    content: this.$L('任务负责人已改变,点击确定关闭窗口。'),
                                     onOk: () => {
                                         this.visible = false;
                                     }
@@ -437,8 +440,8 @@
                     case 'plannedtimeb':
                         let temp = $A.date2string(this.timeValue, "Y-m-d H:i");
                         this.$Modal.confirm({
-                            title: '修改计划时间',
-                            content: '你确定将任务计划时间设置为“' + temp[0] + "~" + temp[1] + '”吗?',
+                            title: this.$L('修改计划时间'),
+                            content: this.$L('你确定将任务计划时间设置为“') + temp[0] + "~" + temp[1] + this.$L('”吗?'),
                             onOk: () => {
                                 this.handleTask('plannedtime');
                             }
@@ -453,8 +456,8 @@
 
                     case 'unplannedtimeb':
                         this.$Modal.confirm({
-                            title: '取消计划时间',
-                            content: '你确定将任务计划时间取消吗?',
+                            title: this.$L('取消计划时间'),
+                            content: this.$L('你确定将任务计划时间取消吗?'),
                             onOk: () => {
                                 this.handleTask('unplannedtime');
                             }
@@ -505,8 +508,8 @@
                         ajaxCallback = (res) => {
                             if (res === 1) {
                                 this.$Modal.info({
-                                    title: '温馨提示',
-                                    content: '任务已删除,点击确定关闭窗口。',
+                                    title: this.$L('温馨提示'),
+                                    content: this.$L('任务已删除,点击确定关闭窗口。'),
                                     onOk: () => {
                                         this.visible = false;
                                     }

+ 32 - 31
resources/assets/js/main/components/project/task/files.vue

@@ -6,17 +6,17 @@
             <Row v-if="!simple" class="sreachBox">
                 <div class="item">
                     <div class="item-2">
-                        <sreachTitle :val="keys.name">文件名</sreachTitle>
-                        <Input v-model="keys.name" placeholder="关键词"/>
+                        <sreachTitle :val="keys.name">{{$L('文件名')}}</sreachTitle>
+                        <Input v-model="keys.name" :placeholder="$L('关键词')"/>
                     </div>
                     <div class="item-2">
-                        <sreachTitle :val="keys.username">上传者</sreachTitle>
-                        <Input v-model="keys.username" placeholder="用户名"/>
+                        <sreachTitle :val="keys.username">{{$L('上传者')}}</sreachTitle>
+                        <Input v-model="keys.username" :placeholder="$L('用户名')"/>
                     </div>
                 </div>
                 <div class="item item-button">
-                    <Button type="text" v-if="$A.objImplode(keys)!=''" @click="sreachTab(true)">取消筛选</Button>
-                    <Button type="primary" icon="md-search" :loading="loadIng > 0" @click="sreachTab">搜索</Button type="primary">
+                    <Button type="text" v-if="$A.objImplode(keys)!=''" @click="sreachTab(true)">{{$L('取消筛选')}}</Button>
+                    <Button type="primary" icon="md-search" :loading="loadIng > 0" @click="sreachTab">{{$L('搜索')}}</Button type="primary">
                 </div>
             </Row>
 
@@ -34,7 +34,7 @@
                     :on-success="handleSuccess"
                     :on-format-error="handleFormatError"
                     :on-exceeded-size="handleMaxSize">
-                    <Button :loading="loadIng > 0" type="primary" icon="ios-cloud-upload-outline" @click="">上传文件</Button>
+                    <Button :loading="loadIng > 0" type="primary" icon="ios-cloud-upload-outline" @click="">{{$L('上传文件')}}</Button>
                 </Upload>
             </Row>
 
@@ -99,7 +99,7 @@
                 listPage: 1,
                 listTotal: 0,
                 lastPage: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
 
                 uploadFormat: ['jpg', 'jpeg', 'png', 'gif', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt'],
                 actionUrl: $A.aUrl('project/files/upload'),
@@ -109,6 +109,7 @@
         },
 
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             let columns = [];
             columns.push({
                 "title": "",
@@ -136,7 +137,7 @@
                 }
             });
             columns.push({
-                "title": "文件名",
+                "title": this.$L("文件名"),
                 "key": 'name',
                 "minWidth": 100,
                 "tooltip": true,
@@ -158,7 +159,7 @@
                 },
             });
             columns.push({
-                "title": "大小",
+                "title": this.$L("大小"),
                 "key": 'size',
                 "minWidth": 90,
                 "maxWidth": 120,
@@ -170,21 +171,21 @@
             });
             if (!this.simple) {
                 columns.push({
-                    "title": "下载次数",
+                    "title": this.$L("下载次数"),
                     "key": 'download',
                     "align": "center",
                     "sortable": true,
                     "width": 100,
                 });
                 columns.push({
-                    "title": "上传者",
+                    "title": this.$L("上传者"),
                     "key": 'username',
                     "minWidth": 90,
                     "maxWidth": 130,
                     "sortable": true,
                 });
                 columns.push({
-                    "title": "上传时间",
+                    "title": this.$L("上传时间"),
                     "key": 'indate',
                     "width": 160,
                     "sortable": true,
@@ -204,7 +205,7 @@
                     }
                     return h('div', [
                         h('Tooltip', {
-                            props: { content: '下载', transfer: true, delay: 600 },
+                            props: { content: this.$L('下载'), transfer: true, delay: 600 },
                             style: { position: 'relative' },
                         }, [h('Icon', {
                             props: { type: 'md-arrow-down', size: 16 },
@@ -223,7 +224,7 @@
                             }
                         })]),
                         h('Tooltip', {
-                            props: { content: '重命名', transfer: true, delay: 600 }
+                            props: { content: this.$L('重命名'), transfer: true, delay: 600 }
                         }, [h('Icon', {
                             props: { type: 'md-create', size: 16 },
                             style: { margin: '0 3px', cursor: 'pointer' },
@@ -234,7 +235,7 @@
                             }
                         })]),
                         h('Tooltip', {
-                            props: { content: '复制链接', transfer: true, delay: 600 }
+                            props: { content: this.$L('复制链接'), transfer: true, delay: 600 }
                         }, [h('Icon', {
                             props: { type: 'md-link', size: 16 },
                             style: { margin: '0 3px', cursor: 'pointer', transform: 'rotate(-45deg)' },
@@ -249,7 +250,7 @@
                             }
                         })]),
                         h('Tooltip', {
-                            props: { content: '删除', transfer: true, delay: 600 }
+                            props: { content: this.$L('删除'), transfer: true, delay: 600 }
                         }, [h('Icon', {
                             props: { type: 'md-trash', size: 16 },
                             style: { margin: '0 3px', cursor: 'pointer' },
@@ -334,7 +335,7 @@
                 if (this.projectid == 0 && this.taskid == 0) {
                     this.lists = [];
                     this.listTotal = 0;
-                    this.noDataText = "没有相关的文件";
+                    this.noDataText = this.$L("没有相关的文件");
                     return;
                 }
                 this.loadIng++;
@@ -344,7 +345,7 @@
                 whereData.projectid = this.projectid;
                 whereData.taskid = this.taskid;
                 whereData.sorts = this.sorts;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/files/lists',
                     data: whereData,
@@ -352,14 +353,14 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
                             this.lastPage = res.data.lastPage;
-                            this.noDataText = "没有相关的文件";
+                            this.noDataText = this.$L("没有相关的文件");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;
@@ -381,12 +382,12 @@
                                     fontWeight: '500',
                                     marginBottom: '20px',
                                 }
-                            }, '重命名文件名'),
+                            }, this.$L('重命名文件名')),
                             h('Input', {
                                 props: {
                                     value: this.renameValue,
                                     autofocus: true,
-                                    placeholder: item.name || '请输入新的文件名称'
+                                    placeholder: item.name || this.$L('请输入新的文件名称')
                                 },
                                 on: {
                                     input: (val) => {
@@ -435,8 +436,8 @@
 
             deleteFile(item) {
                 this.$Modal.confirm({
-                    title: '删除文件',
-                    content: '你确定要删除此文件吗?',
+                    title: this.$L('删除文件'),
+                    content: this.$L('你确定要删除此文件吗?'),
                     loading: true,
                     onOk: () => {
                         $A.aAjax({
@@ -485,8 +486,8 @@
                     this.$emit('change', 'add');
                 } else {
                     this.$Modal.warning({
-                        title: '上传失败',
-                        content: '文件 ' + file.name + ' 上传失败,' + res.msg
+                        title: this.$L('上传失败'),
+                        content: this.$L('文件') + ' ' + file.name + ' ' + this.$L('上传失败,') + res.msg
                     });
                     this.$refs.upload.fileList.pop();
                     this.lists.some((item, index) => {
@@ -503,16 +504,16 @@
             handleFormatError (file) {
                 //上传类型错误
                 this.$Modal.warning({
-                    title: '文件格式不正确',
-                    content: '文件 ' + file.name + ' 格式不正确,仅支持上传:' + this.uploadFormat.join(',') + '。'
+                    title: this.$L('文件格式不正确'),
+                    content: this.$L('文件') + ' ' + file.name + ' ' + this.$L('格式不正确,仅支持上传:') + this.uploadFormat.join(',')
                 });
             },
 
             handleMaxSize (file) {
                 //上传大小错误
                 this.$Modal.warning({
-                    title: '超出文件大小限制',
-                    content: '文件 ' + file.name + ' 太大,不能超过 2M'
+                    title: this.$L('超出文件大小限制'),
+                    content: this.$L('文件') + ' ' + file.name + ' ' + this.$L('太大,不能超过') + ' 2M'
                 });
             },
         }

+ 32 - 31
resources/assets/js/main/components/project/task/lists.vue

@@ -6,22 +6,22 @@
             <Row class="sreachBox">
                 <div class="item">
                     <div class="item-4">
-                        <sreachTitle :val="keys.type">状态</sreachTitle>
-                        <Select v-model="keys.type" placeholder="全部">
-                            <Option value="">全部</Option>
-                            <Option value="未完成">未完成</Option>
-                            <Option value="已超期">已超期</Option>
-                            <Option value="已完成">已完成</Option>
+                        <sreachTitle :val="keys.type">{{$L('状态')}}</sreachTitle>
+                        <Select v-model="keys.type" :placeholder="$L('全部')">
+                            <Option value="">{{$L('全部')}}</Option>
+                            <Option value="未完成">{{$L('未完成')}}</Option>
+                            <Option value="已超期">{{$L('已超期')}}</Option>
+                            <Option value="已完成">{{$L('已完成')}}</Option>
                         </Select>
                     </div>
                     <div class="item-4">
-                        <sreachTitle :val="keys.username">负责人</sreachTitle>
-                        <Input v-model="keys.username" placeholder="用户名"/>
+                        <sreachTitle :val="keys.username">{{$L('负责人')}}</sreachTitle>
+                        <Input v-model="keys.username" :placeholder="$L('用户名')"/>
                     </div>
                     <div class="item-4">
-                        <sreachTitle :val="keys.level">级别</sreachTitle>
-                        <Select v-model="keys.level" placeholder="全部">
-                            <Option value="">全部</Option>
+                        <sreachTitle :val="keys.level">{{$L('级别')}}</sreachTitle>
+                        <Select v-model="keys.level" :placeholder="$L('全部')">
+                            <Option value="">{{$L('全部')}}</Option>
                             <Option value="1">P1</Option>
                             <Option value="2">P2</Option>
                             <Option value="3">P3</Option>
@@ -29,9 +29,9 @@
                         </Select>
                     </div>
                     <div class="item-4">
-                        <sreachTitle :val="keys.labelid">阶段</sreachTitle>
-                        <Select v-model="keys.labelid" placeholder="全部">
-                            <Option value="">全部</Option>
+                        <sreachTitle :val="keys.labelid">{{$L('阶段')}}</sreachTitle>
+                        <Select v-model="keys.labelid" :placeholder="$L('全部')">
+                            <Option value="">{{$L('全部')}}</Option>
                             <Option
                                 v-for="item in labelLists"
                                 :value="item.id"
@@ -40,8 +40,8 @@
                     </div>
                 </div>
                 <div class="item item-button">
-                    <Button type="text" v-if="$A.objImplode(keys)!=''" @click="sreachTab(true)">取消筛选</Button>
-                    <Button type="primary" icon="md-search" :loading="loadIng > 0" @click="sreachTab">搜索</Button>
+                    <Button type="text" v-if="$A.objImplode(keys)!=''" @click="sreachTab(true)">{{$L('取消筛选')}}</Button>
+                    <Button type="primary" icon="md-search" :loading="loadIng > 0" @click="sreachTab">{{$L('搜索')}}</Button>
                 </div>
             </Row>
 
@@ -102,20 +102,21 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
             }
         },
 
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "任务名称",
+                "title": this.$L("任务名称"),
                 "key": 'title',
                 "minWidth": 120,
                 render: (h, params) => {
                     return this.renderTaskTitle(h, params);
                 }
             }, {
-                "title": "阶段",
+                "title": this.$L("阶段"),
                 "key": 'labelid',
                 "minWidth": 80,
                 "sortable": true,
@@ -125,7 +126,7 @@
                     return h('span', labelDetail ? labelDetail.title : labelid);
                 }
             }, {
-                "title": "计划时间",
+                "title": this.$L("计划时间"),
                 "key": 'enddate',
                 "width": 160,
                 "align": "center",
@@ -145,12 +146,12 @@
                     ]);
                 }
             }, {
-                "title": "负责人",
+                "title": this.$L("负责人"),
                 "key": 'username',
                 "minWidth": 90,
                 "sortable": true,
             }, {
-                "title": "优先级",
+                "title": this.$L("优先级"),
                 "key": 'level',
                 "align": "center",
                 "minWidth": 90,
@@ -180,7 +181,7 @@
                     }, "P" + level);
                 },
             }, {
-                "title": "状态",
+                "title": this.$L("状态"),
                 "key": 'type',
                 "align": "center",
                 "minWidth": 80,
@@ -191,13 +192,13 @@
                     let status;
                     if (params.row.overdue) {
                         color = "#ff0000";
-                        status = "已超期";
+                        status = this.$L("已超期");
                     } else if (params.row.complete) {
                         color = "";
-                        status = "已完成";
+                        status = this.$L("已完成");
                     } else {
                         color = "#19be6b";
-                        status = "未完成";
+                        status = this.$L("未完成");
                     }
                     return h('span', {
                         style: {
@@ -206,7 +207,7 @@
                     }, status);
                 },
             }, {
-                "title": "创建时间",
+                "title": this.$L("创建时间"),
                 "key": 'indate',
                 "width": 160,
                 "sortable": true,
@@ -306,7 +307,7 @@
                 if (this.projectid == 0) {
                     this.lists = [];
                     this.listTotal = 0;
-                    this.noDataText = "没有相关的数据";
+                    this.noDataText = this.$L("没有相关的数据");
                     return;
                 }
                 this.loadIng++;
@@ -315,7 +316,7 @@
                 whereData.pagesize = Math.max($A.runNum(this.listPageSize), 10);
                 whereData.projectid = this.projectid;
                 whereData.sorts = $A.cloneData(this.sorts);
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/task/lists',
                     data: whereData,
@@ -323,13 +324,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;

+ 8 - 10
resources/assets/js/main/components/project/task/logs.vue

@@ -3,7 +3,7 @@
         <div class="project-task-logs">
             <ul class="logs-activity" :class="`${taskid>0?'istaskid':''}`">
                 <li v-for="items in lists">
-                    <div class="logs-date">{{items | logDate}}</div>
+                    <div class="logs-date">{{logDate(items)}}</div>
                     <div class="logs-section">
                         <Timeline>
                             <TimelineItem v-for="(item, index) in items.lists" :key="index">
@@ -21,8 +21,8 @@
                     </div>
                 </li>
                 <li v-if="loadIng > 0" class="logs-loading"><w-loading></w-loading></li>
-                <li v-else-if="hasMorePages" class="logs-more" @click="getMore">加载更多</li>
-                <li v-else-if="totalNum == 0" class="logs-none" @click="getLists(true)">没有相关{{['日志', '评论'].indexOf(logtype)===-1?'数据':logtype}}</li>
+                <li v-else-if="hasMorePages" class="logs-more" @click="getMore">{{$L('加载更多')}}</li>
+                <li v-else-if="totalNum == 0" class="logs-none" @click="getLists(true)">{{$L('没有相关内容')}}</li>
             </ul>
         </div>
     </drawer-tabs-container>
@@ -162,13 +162,6 @@
             }
         },
 
-        filters: {
-            logDate(items) {
-                let md = $A.formatDate("m-d");
-                return md == items.ymd ? (items.ymd + ' 今天') : items.key;
-            }
-        },
-
         watch: {
             projectid() {
                 if (this.loadYet) {
@@ -197,6 +190,11 @@
         },
 
         methods: {
+            logDate(items) {
+                let md = $A.formatDate("m-d");
+                return md == items.ymd ? (items.ymd + ' ' + this.$L('今天')) : items.key;
+            },
+
             getLists(resetLoad, noLoading) {
                 if (resetLoad === true) {
                     this.listPage = 1;

+ 11 - 10
resources/assets/js/main/components/project/todo/attention.vue

@@ -46,41 +46,42 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
             }
         },
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "任务名称",
+                "title": this.$L("任务名称"),
                 "key": 'title',
                 "minWidth": 120,
                 render: (h, params) => {
                     return this.renderTaskTitle(h, params);
                 }
             }, {
-                "title": "创建人",
+                "title": this.$L("创建人"),
                 "key": 'createuser',
                 "minWidth": 80,
             }, {
-                "title": "负责人",
+                "title": this.$L("负责人"),
                 "key": 'username',
                 "minWidth": 80,
             }, {
-                "title": "完成",
+                "title": this.$L("完成"),
                 "minWidth": 70,
                 "align": "center",
                 render: (h, params) => {
                     return h('span', params.row.complete ? '√' : '-');
                 }
             }, {
-                "title": "归档",
+                "title": this.$L("归档"),
                 "minWidth": 70,
                 "align": "center",
                 render: (h, params) => {
                     return h('span', params.row.archived ? '√' : '-');
                 }
             }, {
-                "title": "关注时间",
+                "title": this.$L("关注时间"),
                 "width": 160,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.attentiondate));
@@ -167,7 +168,7 @@
                     this.listPage = 1;
                 }
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/task/lists',
                     data: {
@@ -180,13 +181,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;

+ 9 - 8
resources/assets/js/main/components/project/todo/complete.vue

@@ -46,27 +46,28 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
             }
         },
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "任务名称",
+                "title": this.$L("任务名称"),
                 "key": 'title',
                 "minWidth": 120,
                 render: (h, params) => {
                     return this.renderTaskTitle(h, params);
                 }
             }, {
-                "title": "创建人",
+                "title": this.$L("创建人"),
                 "key": 'createuser',
                 "minWidth": 80,
             }, {
-                "title": "负责人",
+                "title": this.$L("负责人"),
                 "key": 'username',
                 "minWidth": 80,
             }, {
-                "title": "完成时间",
+                "title": this.$L("完成时间"),
                 "width": 160,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.completedate));
@@ -150,7 +151,7 @@
                     this.listPage = 1;
                 }
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/task/lists',
                     data: {
@@ -162,13 +163,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;

+ 20 - 19
resources/assets/js/main/components/project/users.vue

@@ -2,7 +2,7 @@
     <drawer-tabs-container>
         <div class="project-complete">
             <!-- 按钮 -->
-            <Button :loading="loadIng > 0" type="primary" icon="md-add" @click="addUser">添加成员</Button>
+            <Button :loading="loadIng > 0" type="primary" icon="md-add" @click="addUser">{{$L('添加成员')}}</Button>
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
@@ -44,12 +44,13 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
             }
         },
         created() {
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "头像",
+                "title": this.$L("头像"),
                 "minWidth": 60,
                 "maxWidth": 100,
                 render: (h, params) => {
@@ -67,38 +68,38 @@
                     });
                 }
             }, {
-                "title": "昵称",
+                "title": this.$L("昵称"),
                 "minWidth": 80,
                 "ellipsis": true,
                 render: (h, params) => {
                     return h('span', params.row.nickname || '-');
                 }
             }, {
-                "title": "用户名",
+                "title": this.$L("用户名"),
                 "key": 'username',
                 "minWidth": 80,
                 "ellipsis": true,
             }, {
-                "title": "职位/职称",
+                "title": this.$L("职位/职称"),
                 "minWidth": 100,
                 "ellipsis": true,
                 render: (h, params) => {
                     return h('span', params.row.profession || '-');
                 }
             }, {
-                "title": "成员角色",
+                "title": this.$L("成员角色"),
                 "minWidth": 100,
                 render: (h, params) => {
-                    return h('span', params.row.isowner ? '项目负责人' : '成员');
+                    return h('span', params.row.isowner ? this.$L('项目负责人') : this.$L('成员'));
                 }
             }, {
-                "title": "加入时间",
+                "title": this.$L("加入时间"),
                 "width": 160,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.indate));
                 }
             }, {
-                "title": "操作",
+                "title": this.$L("操作"),
                 "key": 'action',
                 "width": 80,
                 "align": 'center',
@@ -114,8 +115,8 @@
                         on: {
                             click: () => {
                                 this.$Modal.confirm({
-                                    title: '移出成员',
-                                    content: '你确定要将此成员移出项目吗?',
+                                    title: this.$L('移出成员'),
+                                    content: this.$L('你确定要将此成员移出项目吗?'),
                                     loading: true,
                                     onOk: () => {
                                         $A.aAjax({
@@ -145,7 +146,7 @@
                                 });
                             }
                         }
-                    }, '删除');
+                    }, this.$L('删除'));
                 }
             }];
         },
@@ -190,11 +191,11 @@
                 if (this.projectid == 0) {
                     this.lists = [];
                     this.listTotal = 0;
-                    this.noDataText = "没有相关的数据";
+                    this.noDataText = this.$L("没有相关的数据");
                     return;
                 }
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'project/users/lists',
                     data: {
@@ -206,13 +207,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;
@@ -233,13 +234,13 @@
                                     fontWeight: '500',
                                     marginBottom: '20px',
                                 }
-                            }, '添加成员'),
+                            }, this.$L('添加成员')),
                             h('UseridInput', {
                                 props: {
                                     value: this.userValue,
                                     multiple: true,
                                     noprojectid: this.projectid,
-                                    placeholder: '请输入昵称/用户名搜索'
+                                    placeholder: this.$L('请输入昵称/用户名搜索')
                                 },
                                 on: {
                                     input: (val) => {

+ 12 - 8
resources/assets/js/main/components/report/add.vue

@@ -3,21 +3,21 @@
         <div class="report-add">
             <div class="add-header">
                 <div class="add-title">
-                    <Input v-model="dataDetail.title" placeholder="汇报标题"></Input>
+                    <Input v-model="dataDetail.title" :placeholder="$L('汇报标题')"></Input>
                 </div>
                 <ButtonGroup>
-                    <Button :disabled="id > 0" :type="`${type=='日报'?'primary':'default'}`" @click="type='日报'">日报</Button>
-                    <Button :disabled="id > 0" :type="`${type=='周报'?'primary':'default'}`" @click="type='周报'">周报</Button>
+                    <Button :disabled="id > 0" :type="`${type=='日报'?'primary':'default'}`" @click="type='日报'">{{$L('日报')}}</Button>
+                    <Button :disabled="id > 0" :type="`${type=='周报'?'primary':'default'}`" @click="type='周报'">{{$L('周报')}}</Button>
                 </ButtonGroup>
             </div>
             <t-editor class="add-edit" v-model="dataDetail.content" height="100%"></t-editor>
             <div class="add-input">
-                <userid-input v-model="dataDetail.ccuser" placeholder="输入关键词搜索" multiple><span slot="prepend">抄送人</span></userid-input>
+                <userid-input v-model="dataDetail.ccuser" :placeholder="$L('输入关键词搜索')" multiple><span slot="prepend">{{$L('抄送人')}}</span></userid-input>
             </div>
             <div class="add-footer">
-                <Button :loading="loadIng > 0" type="primary" @click="handleSubmit" style="margin-right:6px">保 存</Button>
-                <Button v-if="dataDetail.status=='已发送'" :loading="loadIng > 0" type="success" icon="md-checkmark-circle-outline" ghost @click="handleSubmit(true)">已发送</Button>
-                <Button v-else :loading="loadIng > 0" @click="handleSubmit(true)">保存并发送</Button>
+                <Button :loading="loadIng > 0" type="primary" @click="handleSubmit" style="margin-right:6px">{{$L('保存')}}</Button>
+                <Button v-if="dataDetail.status=='已发送'" :loading="loadIng > 0" type="success" icon="md-checkmark-circle-outline" ghost @click="handleSubmit(true)">{{$L('已发送')}}</Button>
+                <Button v-else :loading="loadIng > 0" @click="handleSubmit(true)">{{$L('保存并发送')}}</Button>
             </div>
         </div>
     </drawer-tabs-container>
@@ -85,7 +85,7 @@
 
                 dataDetail: {
                     title: '',
-                    content: '数据加载中.....',
+                    content: '',
                     ccuser: '',
                     status: '',
                 },
@@ -94,6 +94,10 @@
             }
         },
 
+        created() {
+            this.dataDetail.content = this.$L('数据加载中.....')
+        },
+
         mounted() {
             if (this.canload) {
                 this.loadYet = true;

+ 30 - 28
resources/assets/js/main/components/report/my.vue

@@ -5,26 +5,26 @@
             <Row class="sreachBox">
                 <div class="item">
                     <div class="item-2">
-                        <sreachTitle :val="keys.type">类型</sreachTitle>
-                        <Select v-model="keys.type" placeholder="全部">
-                            <Option value="">全部</Option>
-                            <Option value="日报">日报</Option>
-                            <Option value="周报">周报</Option>
+                        <sreachTitle :val="keys.type">{{$L('类型')}}</sreachTitle>
+                        <Select v-model="keys.type" :placeholder="$L('全部')">
+                            <Option value="">{{$L('全部')}}</Option>
+                            <Option value="日报">{{$L('日报')}}</Option>
+                            <Option value="周报">{{$L('周报')}}</Option>
                         </Select>
                     </div>
                     <div class="item-2">
-                        <sreachTitle :val="keys.indate">日期</sreachTitle>
-                        <Date-picker v-model="keys.indate" type="daterange" placement="bottom" placeholder="日期范围"></Date-picker>
+                        <sreachTitle :val="keys.indate">{{$L('日期')}}</sreachTitle>
+                        <Date-picker v-model="keys.indate" type="daterange" placement="bottom" :placeholder="$L('日期范围')"></Date-picker>
                     </div>
                 </div>
                 <div class="item item-button">
-                    <Button type="text" v-if="$A.objImplode(keys)!=''" @click="sreachTab(true)">取消筛选</Button>
-                    <Button type="primary" icon="md-search" :loading="loadIng > 0" @click="sreachTab">搜索</Button>
+                    <Button type="text" v-if="$A.objImplode(keys)!=''" @click="sreachTab(true)">{{$L('取消筛选')}}</Button>
+                    <Button type="primary" icon="md-search" :loading="loadIng > 0" @click="sreachTab">{{$L('搜索')}}</Button>
                 </div>
             </Row>
             <!-- 按钮 -->
             <Row class="butBox" style="float:left;margin-top:-32px;">
-                <Button :loading="loadIng > 0" type="primary" icon="md-add" @click="[addDrawerId=0,addDrawerShow=true]">新建汇报</Button>
+                <Button :loading="loadIng > 0" type="primary" icon="md-add" @click="[addDrawerId=0,addDrawerShow=true]">{{$L('新建汇报')}}</Button>
             </Row>
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
@@ -84,35 +84,37 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
 
                 addDrawerId: 0,
                 addDrawerShow: false,
 
                 contentShow: false,
                 contentTitle: '',
-                contentText: '内容加载中.....',
+                contentText: '',
             }
         },
         created() {
+            this.noDataText = this.$L("数据加载中.....");
+            this.contentText = this.$L("内容加载中.....");
             this.columns = [{
-                "title": "标题",
+                "title": this.$L("标题"),
                 "key": 'title',
                 "minWidth": 120,
             }, {
-                "title": "类型",
+                "title": this.$L("类型"),
                 "key": 'type',
                 "minWidth": 80,
                 "maxWidth": 120,
                 "align": 'center',
             }, {
-                "title": "状态",
+                "title": this.$L("状态"),
                 "key": 'status',
                 "minWidth": 80,
                 "maxWidth": 120,
                 "align": 'center',
             }, {
-                "title": "创建日期",
+                "title": this.$L("创建日期"),
                 "minWidth": 160,
                 "maxWidth": 200,
                 "align": 'center',
@@ -131,7 +133,7 @@
                     }
                     return h('div', [
                         h('Tooltip', {
-                            props: { content: '查看', transfer: true, delay: 600 },
+                            props: { content: this.$L('查看'), transfer: true, delay: 600 },
                             style: { position: 'relative' },
                         }, [h('Icon', {
                             props: { type: 'md-eye', size: 16 },
@@ -143,7 +145,7 @@
                             }
                         })]),
                         h('Tooltip', {
-                            props: { content: '编辑', transfer: true, delay: 600 }
+                            props: { content: this.$L('编辑'), transfer: true, delay: 600 }
                         }, [h('Icon', {
                             props: { type: 'md-create', size: 16 },
                             style: { margin: '0 3px', cursor: 'pointer' },
@@ -155,7 +157,7 @@
                             }
                         })]),
                         h('Tooltip', {
-                            props: { content: '发送', transfer: true, delay: 600 }
+                            props: { content: this.$L('发送'), transfer: true, delay: 600 }
                         }, [h('Icon', {
                             props: { type: 'md-send', size: 16 },
                             style: { margin: '0 3px', cursor: 'pointer' },
@@ -166,7 +168,7 @@
                             }
                         })]),
                         h('Tooltip', {
-                            props: { content: '删除', transfer: true, delay: 600 }
+                            props: { content: this.$L('删除'), transfer: true, delay: 600 }
                         }, [h('Icon', {
                             props: { type: 'md-trash', size: 16 },
                             style: { margin: '0 3px', cursor: 'pointer' },
@@ -230,7 +232,7 @@
                 whereData.pagesize = Math.max($A.runNum(this.listPageSize), 10);
                 whereData.sorts = $A.cloneData(this.sorts);
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'report/my',
                     data: whereData,
@@ -238,13 +240,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;
@@ -262,7 +264,7 @@
             contentReport(row) {
                 this.contentShow = true;
                 this.contentTitle = row.title;
-                this.contentText = '详细内容加载中.....';
+                this.contentText = this.$L('详细内容加载中.....');
                 $A.aAjax({
                     url: 'report/content?id=' + row.id,
                     error: () => {
@@ -282,8 +284,8 @@
 
             sendReport(row) {
                 this.$Modal.confirm({
-                    title: '发送汇报',
-                    content: '你确定要发送汇报吗?',
+                    title: this.$L('发送汇报'),
+                    content: this.$L('你确定要发送汇报吗?'),
                     loading: true,
                     onOk: () => {
                         $A.aAjax({
@@ -310,8 +312,8 @@
 
             deleteReport(row) {
                 this.$Modal.confirm({
-                    title: '删除汇报',
-                    content: '你确定要删除汇报吗?',
+                    title: this.$L('删除汇报'),
+                    content: this.$L('你确定要删除汇报吗?'),
                     loading: true,
                     onOk: () => {
                         $A.aAjax({

+ 25 - 23
resources/assets/js/main/components/report/receive.vue

@@ -5,25 +5,25 @@
             <Row class="sreachBox">
                 <div class="item">
                     <div class="item-3">
-                        <sreachTitle :val="keys.username">发送人</sreachTitle>
-                        <Input v-model="keys.username" placeholder="用户名"/>
+                        <sreachTitle :val="keys.username">{{$L('发送人')}}</sreachTitle>
+                        <Input v-model="keys.username" :placeholder="$L('用户名')"/>
                     </div>
                     <div class="item-3">
-                        <sreachTitle :val="keys.type">类型</sreachTitle>
-                        <Select v-model="keys.type" placeholder="全部">
-                            <Option value="">全部</Option>
-                            <Option value="日报">日报</Option>
-                            <Option value="周报">周报</Option>
+                        <sreachTitle :val="keys.type">{{$L('类型')}}</sreachTitle>
+                        <Select v-model="keys.type" :placeholder="$L('全部')">
+                            <Option value="">{{$L('全部')}}</Option>
+                            <Option value="日报">{{$L('日报')}}</Option>
+                            <Option value="周报">{{$L('周报')}}</Option>
                         </Select>
                     </div>
                     <div class="item-3">
-                        <sreachTitle :val="keys.indate">日期</sreachTitle>
-                        <Date-picker v-model="keys.indate" type="daterange" placement="bottom" placeholder="日期范围"></Date-picker>
+                        <sreachTitle :val="keys.indate">{{$L('日期')}}</sreachTitle>
+                        <Date-picker v-model="keys.indate" type="daterange" placement="bottom" :placeholder="$L('日期范围')"></Date-picker>
                     </div>
                 </div>
                 <div class="item item-button">
-                    <Button type="text" v-if="$A.objImplode(keys)!=''" @click="sreachTab(true)">取消筛选</Button>
-                    <Button type="primary" icon="md-search" :loading="loadIng > 0" @click="sreachTab">搜索</Button>
+                    <Button type="text" v-if="$A.objImplode(keys)!=''" @click="sreachTab(true)">{{$L('取消筛选')}}</Button>
+                    <Button type="primary" icon="md-search" :loading="loadIng > 0" @click="sreachTab">{{$L('搜索')}}</Button>
                 </div>
             </Row>
 
@@ -85,34 +85,36 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
 
                 contentShow: false,
                 contentTitle: '',
-                contentText: '内容加载中.....',
+                contentText: '',
             }
         },
 
         created() {
+            this.noDataText = this.$L("数据加载中.....");
+            this.contentText = this.$L("内容加载中.....");
             this.columns = [{
-                "title": "标题",
+                "title": this.$L("标题"),
                 "key": 'title',
                 "sortable": true,
                 "minWidth": 120,
             }, {
-                "title": "发送人",
+                "title": this.$L("发送人"),
                 "key": 'username',
                 "sortable": true,
                 "minWidth": 80,
                 "maxWidth": 130,
             }, {
-                "title": "类型",
+                "title": this.$L("类型"),
                 "key": 'type',
                 "minWidth": 80,
                 "maxWidth": 120,
                 "align": 'center',
             }, {
-                "title": "创建日期",
+                "title": this.$L("创建日期"),
                 "minWidth": 160,
                 "maxWidth": 200,
                 "align": 'center',
@@ -128,7 +130,7 @@
                 render: (h, params) => {
                     return h('div', [
                         h('Tooltip', {
-                            props: { content: '查看', transfer: true, delay: 600 },
+                            props: { content: this.$L('查看'), transfer: true, delay: 600 },
                             style: { position: 'relative' },
                         }, [h('Icon', {
                             props: { type: 'md-eye', size: 16 },
@@ -194,7 +196,7 @@
                 whereData.pagesize = Math.max($A.runNum(this.listPageSize), 10);
                 whereData.sorts = $A.cloneData(this.sorts);
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'report/receive',
                     data: whereData,
@@ -202,13 +204,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         } else {
                             this.lists = [];
                             this.listTotal = 0;
@@ -221,11 +223,11 @@
             contentReport(row) {
                 this.contentShow = true;
                 this.contentTitle = row.title;
-                this.contentText = '详细内容加载中.....';
+                this.contentText = this.$L('详细内容加载中.....');
                 $A.aAjax({
                     url: 'report/content?id=' + row.id,
                     error: () => {
-                        alert(this.$L('网络繁忙,请稍后再试!'));
+                        alert(this.$L(this.$L('网络繁忙,请稍后再试!')));
                         this.contentShow = false;
                     },
                     success: (res) => {

+ 4 - 4
resources/assets/js/main/mixins/project.js

@@ -6,8 +6,8 @@ export default {
 
         outProject(projectid, successCallback) {
             this.$Modal.confirm({
-                title: '退出项目',
-                content: '你确定要退出此项目吗?',
+                title: this.$L('退出项目'),
+                content: this.$L('你确定要退出此项目吗?'),
                 loading: true,
                 onOk: () => {
                     $A.aAjax({
@@ -59,8 +59,8 @@ export default {
 
         deleteProject(projectid, successCallback) {
             this.$Modal.confirm({
-                title: '删除项目',
-                content: '你确定要删除此项目吗?',
+                title: this.$L('删除项目'),
+                content: this.$L('你确定要删除此项目吗?'),
                 loading: true,
                 onOk: () => {
                     $A.aAjax({

+ 29 - 25
resources/assets/js/main/pages/docs.vue

@@ -11,7 +11,7 @@
                     <div class="page-nav-left">
                         <span class="hover" @click="[addBookId=0,addBookShow=true]"><i class="ft icon">&#xE740;</i> {{$L('新建知识库')}}</span>
                         <div v-if="loadIng > 0" class="page-nav-loading"><w-loading></w-loading></div>
-                        <div v-else class="page-nav-refresh"><em @click="">刷新</em></div>
+                        <div v-else class="page-nav-refresh"><em @click="getBookLists(true)">{{$L('刷新')}}</em></div>
                     </div>
                 </div>
                 <div class="w-nav-flex"></div>
@@ -22,7 +22,7 @@
             <div class="docs-main">
                 <div class="docs-body">
                     <div class="docs-menu">
-                        <h3>我的知识库</h3>
+                        <h3>{{$L('我的知识库')}}</h3>
                         <ul>
                             <li v-for="book in bookLists" :class="{active:book.id==selectBookData.id}" @click="[selectBookData=book,getSectionLists(true)]">
                                 <div class="docs-title">{{book.title}}</div>
@@ -36,10 +36,10 @@
                             <div class="docs-header">
                                 <div class="docs-h1">{{selectBookData.title}}</div>
                                 <div class="docs-setting">
-                                    <Button @click="[addSectionId=0,addSectionShow=true]">新增章节</Button>
-                                    <Button @click="[addBookId=selectBookData.id,addBookShow=true]">修改标题</Button>
-                                    <!--<Button>权限设置</Button>-->
-                                    <Button type="warning" ghost @click="onBookDelete(selectBookData.id)">删除</Button>
+                                    <Button @click="[addSectionId=0,addSectionShow=true]">{{$L('新增章节')}}</Button>
+                                    <Button @click="[addBookId=selectBookData.id,addBookShow=true]">{{$L('修改标题')}}</Button>
+                                    <!--<Button>{{$L('权限设置')}}</Button>-->
+                                    <Button type="warning" ghost @click="onBookDelete(selectBookData.id)">{{$L('删除')}}</Button>
                                 </div>
                             </div>
                             <div class="docs-section">
@@ -201,7 +201,7 @@
                 bookLists: [],
                 bookListPage: 1,
                 bookListTotal: 0,
-                bookNoDataText: "数据加载中.....",
+                bookNoDataText: "",
 
                 addBookId: 0,
                 addBookShow: false,
@@ -212,7 +212,7 @@
                 selectBookData: {},
 
                 sectionLists: [],
-                sectionNoDataText: "数据加载中.....",
+                sectionNoDataText: "",
 
                 addSectionId: 0,
                 addSectionShow: false,
@@ -221,19 +221,23 @@
                     type: 'document',
                 },
                 ruleSectionAdd: {},
-                sectionTypeLists: [
-                    {value: 'document', text: "文本"},
-                    {value: 'mind', text: "脑图"},
-                    {value: 'sheet', text: "表格"},
-                    {value: 'flow', text: "流程图"},
-                    {value: 'folder', text: "目录"},
-                ],
+                sectionTypeLists: [],
 
                 sortDisabled: false,
             }
         },
 
         created() {
+            this.bookNoDataText = this.$L("数据加载中.....");
+            this.bookNoDataText = this.$L("数据加载中.....");
+            this.sectionNoDataText = this.$L("数据加载中.....");
+            this.sectionTypeLists = [
+                {value: 'document', text: this.$L("文本")},
+                {value: 'mind', text: this.$L("脑图")},
+                {value: 'sheet', text: this.$L("表格")},
+                {value: 'flow', text: this.$L("流程图")},
+                {value: 'folder', text: this.$L("目录")},
+            ];
             this.ruleBookAdd = {
                 title: [
                     { required: true, message: this.$L('请填写知识库名称!'), trigger: 'change' },
@@ -311,7 +315,7 @@
                     this.bookListPage = 1;
                 }
                 this.loadIng++;
-                this.bookNoDataText = "数据加载中.....";
+                this.bookNoDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'docs/book/lists',
                     data: {
@@ -322,13 +326,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.bookNoDataText = "数据加载失败!";
+                        this.bookNoDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.bookLists = res.data.lists;
                             this.bookListTotal = res.data.total;
-                            this.bookNoDataText = "没有相关的数据";
+                            this.bookNoDataText = this.$L("没有相关的数据");
                             if (typeof this.selectBookData.id === "undefined") {
                                 this.selectBookData = this.bookLists[0];
                                 this.getSectionLists();
@@ -381,8 +385,8 @@
 
             onBookDelete(bookId) {
                 this.$Modal.confirm({
-                    title: '删除知识库',
-                    content: '你确定要删除此知识库吗?',
+                    title: this.$L('删除知识库'),
+                    content: this.$L('你确定要删除此知识库吗?'),
                     loading: true,
                     onOk: () => {
                         $A.aAjax({
@@ -424,7 +428,7 @@
                 }
                 let bookid = this.selectBookData.id;
                 this.loadIng++;
-                this.sectionNoDataText = "数据加载中.....";
+                this.sectionNoDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'docs/section/lists',
                     data: {
@@ -437,7 +441,7 @@
                         if (bookid != this.selectBookData.id) {
                             return;
                         }
-                        this.sectionNoDataText = "数据加载失败!";
+                        this.sectionNoDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (bookid != this.selectBookData.id) {
@@ -445,7 +449,7 @@
                         }
                         if (res.ret === 1) {
                             this.sectionLists = res.data;
-                            this.sectionNoDataText = "没有相关的数据";
+                            this.sectionNoDataText = this.$L("没有相关的数据");
                         }else{
                             this.sectionLists = [];
                             this.sectionNoDataText = res.msg;
@@ -489,8 +493,8 @@
 
             onSectionDelete(sectionId) {
                 this.$Modal.confirm({
-                    title: '删除文档',
-                    content: '你确定要删除此文档吗?',
+                    title: this.$L('删除文档'),
+                    content: this.$L('你确定要删除此文档吗?'),
                     loading: true,
                     onOk: () => {
                         $A.aAjax({

+ 16 - 16
resources/assets/js/main/pages/docs/edit.vue

@@ -11,8 +11,8 @@
                 <div class="header-menu" @click="handleClick('view')"><Icon type="md-eye" /></div>-->
                 <div class="header-menu" @click="handleClick('history')"><Icon type="md-time" /></div>
                 <div class="header-title">{{docDetail.title}}</div>
-                <div v-if="docDetail.type=='mind'" class="header-hint">选中节点,按enter键添加子节点,tab键添加同级节点</div>
-                <Button :disabled="(disabledBtn || loadIng > 0) && hid == 0" class="header-button" size="small" type="primary" @click="handleClick('save')">保存</Button>
+                <div v-if="docDetail.type=='mind'" class="header-hint">{{$L('选中节点,按enter键添加子节点,tab键添加同级节点')}}</div>
+                <Button :disabled="(disabledBtn || loadIng > 0) && hid == 0" class="header-button" size="small" type="primary" @click="handleClick('save')">{{$L('保存')}}</Button>
             </div>
             <div class="docs-body">
                 <t-editor v-if="docDetail.type=='document'" class="body-text" v-model="docContent.content" height="100%"></t-editor>
@@ -201,14 +201,14 @@
         },
         created() {
             this.historyColumns = [{
-                "title": "存档日期",
+                "title": this.$L("存档日期"),
                 "minWidth": 160,
                 "maxWidth": 200,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.indate));
                 }
             }, {
-                "title": "操作员",
+                "title": this.$L("操作员"),
                 "key": 'username',
                 "minWidth": 80,
                 "maxWidth": 130,
@@ -243,7 +243,7 @@
                                 this.docDrawerShow = false;
                             }
                         }
-                    }, '还原');
+                    }, this.$L('还原'));
                 }
             }];
         },
@@ -276,7 +276,7 @@
                 switch (act) {
                     case "menu":
                         if (!this.sectionNoDataText) {
-                            this.sectionNoDataText = "数据加载中.....";
+                            this.sectionNoDataText = this.$L("数据加载中.....");
                             let bookid = this.docDetail.bookid;
                             $A.aAjax({
                                 url: 'docs/section/lists',
@@ -287,7 +287,7 @@
                                     if (bookid != this.docDetail.bookid) {
                                         return;
                                     }
-                                    this.sectionNoDataText = "数据加载失败!";
+                                    this.sectionNoDataText = this.$L("数据加载失败!");
                                 },
                                 success: (res) => {
                                     if (bookid != this.docDetail.bookid) {
@@ -295,7 +295,7 @@
                                     }
                                     if (res.ret === 1) {
                                         this.sectionLists = res.data;
-                                        this.sectionNoDataText = "没有相关的数据";
+                                        this.sectionNoDataText = this.$L("没有相关的数据");
                                     }else{
                                         this.sectionLists = [];
                                         this.sectionNoDataText = res.msg;
@@ -307,7 +307,7 @@
 
                     case "history":
                         if (!this.historyNoDataText) {
-                            this.historyNoDataText = "数据加载中.....";
+                            this.historyNoDataText = this.$L("数据加载中.....");
                             let sid = this.getSid();
                             $A.aAjax({
                                 url: 'docs/section/history',
@@ -319,7 +319,7 @@
                                     if (sid != this.getSid()) {
                                         return;
                                     }
-                                    this.historyNoDataText = "数据加载失败!";
+                                    this.historyNoDataText = this.$L("数据加载失败!");
                                 },
                                 success: (res) => {
                                     if (sid != this.getSid()) {
@@ -327,7 +327,7 @@
                                     }
                                     if (res.ret === 1) {
                                         this.historyLists = res.data;
-                                        this.historyNoDataText = "没有相关的数据";
+                                        this.historyNoDataText = this.$L("没有相关的数据");
                                     }else{
                                         this.historyLists = [];
                                         this.historyNoDataText = res.msg;
@@ -399,14 +399,14 @@
                             return;
                         }
                         this.$Modal.confirm({
-                            title: '温馨提示',
-                            content: '是否放弃修改的内容返回?',
+                            title: this.$L('温馨提示'),
+                            content: this.$L('是否放弃修改的内容返回?'),
                             loading: true,
-                            cancelText: '放弃保存',
+                            cancelText: this.$L('放弃保存'),
                             onCancel: () => {
                                 this.goBack();
                             },
-                            okText: '保存并返回',
+                            okText: this.$L('保存并返回'),
                             onOk: () => {
                                 this.bakContent = $A.jsonStringify(this.docContent);
                                 $A.aAjax({
@@ -466,7 +466,7 @@
 
                     case "share":
                     case "view":
-                        this.$Message.info("敬请期待!");
+                        this.$Message.info(this.$L("敬请期待!"));
                         break;
 
                 }

+ 2 - 2
resources/assets/js/main/pages/index.vue

@@ -376,8 +376,8 @@
                                     this.goForward({path: '/todo'}, true);
                                 } else {
                                     this.$Modal.error({
-                                        title: "温馨提示",
-                                        content: res.msg
+                                        title: this.$L("温馨提示"),
+                                        content: this.$L(res.msg)
                                     });
                                 }
                             }

+ 24 - 23
resources/assets/js/main/pages/project.vue

@@ -11,7 +11,7 @@
                     <div class="page-nav-left">
                         <span class="hover" @click="addShow=true"><i class="ft icon">&#xE740;</i> {{$L('新建项目')}}</span>
                         <div v-if="loadIng > 0" class="page-nav-loading"><w-loading></w-loading></div>
-                        <div v-else class="page-nav-refresh"><em @click="getLists(true)">刷新</em></div>
+                        <div v-else class="page-nav-refresh"><em @click="getLists(true)">{{$L('刷新')}}</em></div>
                     </div>
                 </div>
                 <div class="w-nav-flex"></div>
@@ -48,22 +48,22 @@
                             </div>
                         </div>
                         <div class="project-num" @click="handleProject('open', item)">
-                            <div class="project-complete"><em>{{item.complete}}</em>已完成数</div>
+                            <div class="project-complete"><em>{{item.complete}}</em>{{$L('已完成数')}}</div>
                             <div class="project-num-line"></div>
-                            <div class="project-unfinished"><em>{{item.unfinished}}</em>未完成数</div>
+                            <div class="project-unfinished"><em>{{item.unfinished}}</em>{{$L('未完成数')}}</div>
                         </div>
                         <div class="project-bottom">
                             <div class="project-iconbtn" @click.stop="handleProject('archived', item)">
                                 <Icon class="project-iconbtn-icon1" type="md-filing" size="24" />
-                                <div class="project-iconbtn-text">已归档任务</div>
+                                <div class="project-iconbtn-text">{{$L('已归档任务')}}</div>
                             </div>
                             <div class="project-iconbtn" @click.stop="handleProject('statistics', item)">
                                 <Icon class="project-iconbtn-icon3" type="md-stats" size="24" />
-                                <div class="project-iconbtn-text">项目统计</div>
+                                <div class="project-iconbtn-text">{{$L('项目统计')}}</div>
                             </div>
                             <div class="project-iconbtn" @click.stop="handleProject('member', item)">
                                 <Icon class="project-iconbtn-icon2" type="md-people" size="24" />
-                                <div class="project-iconbtn-text">成员管理</div>
+                                <div class="project-iconbtn-text">{{$L('成员管理')}}</div>
                             </div>
                         </div>
                     </div>
@@ -96,7 +96,7 @@
                     </div>
                     <div v-if="formAdd.labels.length > 0" style="margin-top:4px;"></div>
                     <div style="margin-bottom:-16px">
-                        <Button icon="ios-add" type="dashed" @click="addLabels">添加流程</Button>
+                        <Button icon="ios-add" type="dashed" @click="addLabels">{{$L('添加流程')}}</Button>
                     </div>
                 </FormItem>
             </Form>
@@ -304,16 +304,7 @@
                 },
                 ruleAdd: {},
 
-                labelLists: [{
-                    label: '空白模板',
-                    value: [],
-                }, {
-                    label: '软件开发',
-                    value: ['产品规划','前端开发','后端开发','测试','发布','其它'],
-                }, {
-                    label: '产品开发',
-                    value: ['产品计划', '正在设计', '正在研发', '测试', '准备发布', '发布成功'],
-                }],
+                labelLists: [],
 
                 lists: [],
                 listPage: 1,
@@ -329,6 +320,16 @@
             }
         },
         created() {
+            this.labelLists = [{
+                label: this.$L('空白模板'),
+                value: [],
+            }, {
+                label: this.$L('软件开发'),
+                value: [this.$L('产品规划'),this.$L('前端开发'),this.$L('后端开发'),this.$L('测试'),this.$L('发布'),this.$L('其它')],
+            }, {
+                label: this.$L('产品开发'),
+                value: [this.$L('产品计划'), this.$L('正在设计'), this.$L('正在研发'), this.$L('测试'), this.$L('准备发布'), this.$L('发布成功')],
+            }];
             this.ruleAdd = {
                 title: [
                     { required: true, message: this.$L('请填写项目名称!'), trigger: 'change' },
@@ -432,12 +433,12 @@
                                     fontWeight: '500',
                                     marginBottom: '20px',
                                 }
-                            }, '添加流程'),
+                            }, this.$L('添加流程')),
                             h('Input', {
                                 props: {
                                     value: this.labelsValue,
                                     autofocus: true,
-                                    placeholder: '请输入流程名称,多个可用空格分隔。'
+                                    placeholder: this.$L('请输入流程名称,多个可用空格分隔。')
                                 },
                                 on: {
                                     input: (val) => {
@@ -549,12 +550,12 @@
                                     fontWeight: '500',
                                     marginBottom: '20px',
                                 }
-                            }, '重命名项目'),
+                            }, this.$L('重命名项目')),
                             h('Input', {
                                 props: {
                                     value: this.renameValue,
                                     autofocus: true,
-                                    placeholder: '请输入新的项目名称'
+                                    placeholder: this.$L('请输入新的项目名称')
                                 },
                                 on: {
                                     input: (val) => {
@@ -612,12 +613,12 @@
                                     fontWeight: '500',
                                     marginBottom: '20px',
                                 }
-                            }, '移交项目'),
+                            }, this.$L('移交项目')),
                             h('UseridInput', {
                                 props: {
                                     value: this.transferValue,
                                     nousername: item.username,
-                                    placeholder: '请输入昵称/用户名搜索'
+                                    placeholder: this.$L('请输入昵称/用户名搜索')
                                 },
                                 on: {
                                     input: (val) => {

+ 17 - 17
resources/assets/js/main/pages/project/panel.vue

@@ -11,15 +11,15 @@
                     <div class="page-nav-left">
                         <span class="bold">{{projectDetail.title}}</span>
                         <div v-if="loadIng > 0" class="page-nav-loading"><w-loading></w-loading></div>
-                        <div v-else class="page-nav-refresh"><em @click="getDetail(true)">刷新</em></div>
+                        <div v-else class="page-nav-refresh"><em @click="getDetail(true)">{{$L('刷新')}}</em></div>
                     </div>
                 </div>
                 <div class="w-nav-flex"></div>
                 <div class="w-nav-right">
-                    <span class="ft hover" @click="openProjectDrawer('lists')"><i class="ft icon">&#xE89E;</i> 任务列表</span>
-                    <span class="ft hover" @click="openProjectDrawer('files')"><i class="ft icon">&#xE701;</i> 文件列表</span>
-                    <span class="ft hover" @click="openProjectDrawer('logs')"><i class="ft icon">&#xE753;</i> 项目动态</span>
-                    <span class="ft hover" @click="openProjectSettingDrawer('archived')"><i class="ft icon">&#xE7A7;</i> 设置</span>
+                    <span class="ft hover" @click="openProjectDrawer('lists')"><i class="ft icon">&#xE89E;</i> {{$L('任务列表')}}</span>
+                    <span class="ft hover" @click="openProjectDrawer('files')"><i class="ft icon">&#xE701;</i> {{$L('文件列表')}}</span>
+                    <span class="ft hover" @click="openProjectDrawer('logs')"><i class="ft icon">&#xE753;</i> {{$L('项目动态')}}</span>
+                    <span class="ft hover" @click="openProjectSettingDrawer('archived')"><i class="ft icon">&#xE7A7;</i> {{$L('设置')}}</span>
                 </div>
             </div>
         </div>
@@ -67,22 +67,22 @@
                                     ]" @click="openTaskModal(task)">
                                     <div class="task-title">{{task.title}}</div>
                                     <div class="task-more">
-                                        <div v-if="task.overdue" class="task-status">已超期</div>
-                                        <div v-else-if="task.complete" class="task-status">已完成</div>
-                                        <div v-else class="task-status">未完成</div>
+                                        <div v-if="task.overdue" class="task-status">{{$L('已超期')}}</div>
+                                        <div v-else-if="task.complete" class="task-status">{{$L('已完成')}}</div>
+                                        <div v-else class="task-status">{{$L('未完成')}}</div>
                                         <Tooltip class="task-userimg" :content="task.nickname || task.username" transfer><img :src="task.userimg"/></Tooltip>
                                     </div>
                                 </div>
                             </div>
                             <div slot="footer">
-                                <project-add-task :placeholder='`添加任务至"${label.title}"`' :projectid="label.projectid" :labelid="label.id" @on-add-success="addTaskSuccess($event, label)"></project-add-task>
+                                <project-add-task :placeholder='`${$L("添加任务至")}"${label.title}"`' :projectid="label.projectid" :labelid="label.id" @on-add-success="addTaskSuccess($event, label)"></project-add-task>
                             </div>
                         </draggable>
                     </div>
                 </div>
                 <div v-if="loadDetailed" slot="footer" class="label-item label-create" @click="addLabel">
                     <div class="label-body">
-                        <div class="trigger-box ft hover"><i class="ft icon">&#xE8C8;</i>添加一个新列表</div>
+                        <div class="trigger-box ft hover"><i class="ft icon">&#xE8C8;</i>{{$L('添加一个新列表')}}</div>
                     </div>
                 </div>
             </draggable>
@@ -525,12 +525,12 @@
                                     fontWeight: '500',
                                     marginBottom: '20px',
                                 }
-                            }, '重命名列表'),
+                            }, this.$L('重命名列表')),
                             h('Input', {
                                 props: {
                                     value: this.renameValue,
                                     autofocus: true,
-                                    placeholder: '请输入新的列表名称'
+                                    placeholder: this.$L('请输入新的列表名称')
                                 },
                                 on: {
                                     input: (val) => {
@@ -579,10 +579,10 @@
             },
 
             deleteLabel(item) {
-                let redTip = item.taskLists.length > 0 ? '<div style="color:red;font-weight:500">注:将同时删除列表下所有任务</div>' : '';
+                let redTip = item.taskLists.length > 0 ? ('<div style="color:red;font-weight:500">' + this.$L('注:将同时删除列表下所有任务') + '</div>') : '';
                 this.$Modal.confirm({
-                    title: '删除列表',
-                    content: '<div>你确定要删除此列表吗?</div>' + redTip,
+                    title: this.$L('删除列表'),
+                    content: '<div>' + this.$L('你确定要删除此列表吗?') + '</div>' + redTip,
                     loading: true,
                     onOk: () => {
                         $A.aAjax({
@@ -629,12 +629,12 @@
                                     fontWeight: '500',
                                     marginBottom: '20px',
                                 }
-                            }, '添加列表'),
+                            }, this.$L('添加列表')),
                             h('Input', {
                                 props: {
                                     value: this.labelValue,
                                     autofocus: true,
-                                    placeholder: '请输入列表名称'
+                                    placeholder: this.$L('请输入列表名称')
                                 },
                                 on: {
                                     input: (val) => {

+ 18 - 17
resources/assets/js/main/pages/team.vue

@@ -11,7 +11,7 @@
                     <div class="page-nav-left">
                         <span><i class="ft icon">&#xE90D;</i> {{$L('团队成员')}}</span>
                         <div v-if="loadIng > 0" class="page-nav-loading"><w-loading></w-loading></div>
-                        <div v-else class="page-nav-refresh"><em @click="getLists(true)">刷新</em></div>
+                        <div v-else class="page-nav-refresh"><em @click="getLists(true)">{{$L('刷新')}}</em></div>
                     </div>
                 </div>
                 <div class="w-nav-flex"></div>
@@ -104,7 +104,7 @@
                 lists: [],
                 listPage: 1,
                 listTotal: 0,
-                noDataText: "数据加载中.....",
+                noDataText: "",
 
                 addShow: false,
                 formAdd: {
@@ -119,8 +119,9 @@
         },
         created() {
             let isAdmin = $A.identity('admin');
+            this.noDataText = this.$L("数据加载中.....");
             this.columns = [{
-                "title": "头像",
+                "title": this.$L("头像"),
                 "minWidth": 60,
                 "maxWidth": 100,
                 render: (h, params) => {
@@ -138,32 +139,32 @@
                     });
                 }
             }, {
-                "title": "昵称",
+                "title": this.$L("昵称"),
                 "minWidth": 80,
                 "ellipsis": true,
                 render: (h, params) => {
                     return h('span', params.row.nickname || '-');
                 }
             }, {
-                "title": "用户名",
+                "title": this.$L("用户名"),
                 "key": 'username',
                 "minWidth": 80,
                 "ellipsis": true,
             }, {
-                "title": "职位/职称",
+                "title": this.$L("职位/职称"),
                 "minWidth": 100,
                 "ellipsis": true,
                 render: (h, params) => {
                     return h('span', params.row.profession || '-');
                 }
             }, {
-                "title": "加入时间",
+                "title": this.$L("加入时间"),
                 "width": 160,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.regdate));
                 }
             }, {
-                "title": "操作",
+                "title": this.$L("操作"),
                 "key": 'action',
                 "width": isAdmin ? 160 : 80,
                 "align": 'center',
@@ -180,12 +181,12 @@
                         on: {
                             click: () => {
                                 this.$Modal.info({
-                                    title: '会员信息',
-                                    content: `<p>昵称: ${params.row.nickname || '-'}</p><p>职位/职称: ${params.row.profession || '-'}</p>`
+                                    title: this.$L('会员信息'),
+                                    content: `<p>${this.$L('昵称')}: ${params.row.nickname || '-'}</p><p>${this.$L('职位/职称')}: ${params.row.profession || '-'}</p>`
                                 });
                             }
                         }
-                    }, '查看'));
+                    }, this.$L('查看')));
                     if (isAdmin) {
                         array.push(h('Button', {
                             props: {
@@ -199,8 +200,8 @@
                             on: {
                                 click: () => {
                                     this.$Modal.confirm({
-                                        title: '删除团队成员',
-                                        content: '你确定要删除此团队成员吗?',
+                                        title: this.$L('删除团队成员'),
+                                        content: this.$L('你确定要删除此团队成员吗?'),
                                         loading: true,
                                         onOk: () => {
                                             $A.aAjax({
@@ -225,7 +226,7 @@
                                     });
                                 }
                             }
-                        }, '删除'));
+                        }, this.$L('删除')));
                     }
                     return h('div', array);
                 }
@@ -272,7 +273,7 @@
                     this.listPage = 1;
                 }
                 this.loadIng++;
-                this.noDataText = "数据加载中.....";
+                this.noDataText = this.$L("数据加载中.....");
                 $A.aAjax({
                     url: 'users/team/lists',
                     data: {
@@ -283,13 +284,13 @@
                         this.loadIng--;
                     },
                     error: () => {
-                        this.noDataText = "数据加载失败!";
+                        this.noDataText = this.$L("数据加载失败!");
                     },
                     success: (res) => {
                         if (res.ret === 1) {
                             this.lists = res.data.lists;
                             this.listTotal = res.data.total;
-                            this.noDataText = "没有相关的数据";
+                            this.noDataText = this.$L("没有相关的数据");
                         }else{
                             this.lists = [];
                             this.listTotal = 0;

+ 7 - 7
resources/assets/js/main/pages/todo.vue

@@ -11,7 +11,7 @@
                     <div class="page-nav-left">
                         <span><i class="ft icon">&#xE787;</i> {{$L('我的待办')}}</span>
                         <div v-if="loadIng > 0" class="page-nav-loading"><w-loading></w-loading></div>
-                        <div v-else class="page-nav-refresh"><em @click="refreshTask">刷新</em></div>
+                        <div v-else class="page-nav-refresh"><em @click="refreshTask">{{$L('刷新')}}</em></div>
                     </div>
                 </div>
                 <div class="w-nav-flex"></div>
@@ -58,10 +58,10 @@
                                         <Icon v-if="task.complete" class="task-check" type="md-checkbox-outline" @click.stop="taskComplete(task, false)"/>
                                         <Icon v-else class="task-check" type="md-square-outline" @click.stop="taskComplete(task, true)"/>
                                         <div v-if="!!task.loadIng" class="task-loading"><w-loading></w-loading></div>
-                                        <div v-if="task.overdue" class="task-overdue">[超期]</div>
+                                        <div v-if="task.overdue" class="task-overdue">[{{$L('超期')}}]</div>
                                         <div class="task-title">{{task.title}}</div>
                                     </div>
-                                    <div v-if="taskDatas[index].hasMorePages === true" class="content-li more" @click="getTaskLists(index, true)">加载更多</div>
+                                    <div v-if="taskDatas[index].hasMorePages === true" class="content-li more" @click="getTaskLists(index, true)">{{$L('加载更多')}}</div>
                                 </draggable>
                                 <div v-else-if="taskDatas[index].loadIng == 0" class="content-empty">{{$L('恭喜你!已完成了所有待办')}}</div>
                                 <div v-if="taskDatas[index].loadIng > 0" class="content-loading"><w-loading></w-loading></div>
@@ -479,13 +479,13 @@
             pTitle(p) {
                 switch (p) {
                     case "1":
-                        return "重要且紧急";
+                        return this.$L("重要且紧急");
                     case "2":
-                        return "重要不紧急";
+                        return this.$L("重要不紧急");
                     case "3":
-                        return "紧急不重要";
+                        return this.$L("紧急不重要");
                     case "4":
-                        return "不重要不紧急";
+                        return this.$L("不重要不紧急");
                 }
             },