Sfoglia il codice sorgente

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper

cs 2 anni fa
parent
commit
4a6407d6b5

+ 26 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -1349,5 +1349,30 @@
   "jiaozheng": "Correction succeeded",
   "jie-zhi-yu": "as of",
   "kai-shi": "start",
-  "wan-cheng-yu": "completed at"
+  "wan-cheng-yu": "completed at",
+  "projectoverviewtable": "Project Overview Sheet",
+  "actualworkinghours": "Task Scheduled Work VS Actual Work",
+  "consumingtask": "The most time consuming task",
+  "distributionexecutors": "Executor assignment",
+  "gong-shi-dui-bi": "Working hours comparison",
+  "shi-jian-dai-ding": "Time to be determined",
+  "statisticsbytasklist": "Statistics by task list",
+  "taskNum": "number of tasks",
+  "hao-shi-xiao-shi": "Time spent (hours)",
+  "ren-wu-shu": "number of tasks",
+  "rwushuliang": "Number of tasks (pieces)",
+  "taskListStatistics": "Task List Statistics",
+  "themosttime": "The most time-consuming task map",
+  "xiaoshijihua": "Planned hours (hours)",
+  "zhi-hang-ren-fen-pei-tu": "Executor assignment chart",
+  "allocatethecostbudget": "Allocate cost budget",
+  "caozuo": "operator",
+  "currentcostbaseline": "Current cost baseline",
+  "restcanbedialed": "The rest can be dialed",
+  "saoyixiang": "At least one item of down-appropriation cost cannot be 0",
+  "totalcostbaseline": "total cost baseline",
+  "xiabo": "dial time",
+  "xiabochenggong": "dial down successfully",
+  "yi": "already",
+  "yu": "Remain"
 }

+ 26 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -1349,5 +1349,30 @@
   "jiaozheng": "校正成功",
   "wan-cheng-yu": "完成于",
   "jie-zhi-yu": "截止于",
-  "kai-shi": "开始"
+  "kai-shi": "开始",
+  "projectoverviewtable": "项目概览表",
+  "shi-jian-dai-ding": "时间待定",
+  "distributionexecutors": "执行人分配",
+  "taskNum": "任务数量",
+  "consumingtask": "耗时最多任务",
+  "statisticsbytasklist": "按任务列表统计",
+  "actualworkinghours": "任务 计划工时 VS 实际工时",
+  "gong-shi-dui-bi": "工时对比",
+  "themosttime": "耗时最多任务图",
+  "hao-shi-xiao-shi": "耗时(小时)",
+  "taskListStatistics": "任务列表统计",
+  "ren-wu-shu": "任务数",
+  "zhi-hang-ren-fen-pei-tu": "执行人分配图",
+  "xiaoshijihua": "计划工时(小时)",
+  "rwushuliang": "任务数量(个)",
+  "totalcostbaseline": "总成本基线",
+  "restcanbedialed": "剩余可下拨",
+  "allocatethecostbudget": "下拨成本预算",
+  "currentcostbaseline": "当前成本基线",
+  "yi": "已",
+  "yu": "余",
+  "xiabo": "下拨时间",
+  "caozuo": "操作人员",
+  "saoyixiang": "下拨成本至少一项不能为0",
+  "xiabochenggong": "下拨成功"
 }

+ 26 - 26
fhKeeper/formulahousekeeper/timesheet/src/views/project/CostBaseline.vue

@@ -6,31 +6,31 @@
                     <div class="box" ref="allBox">
                         <div >
                             <!-- <div class="lableTxt">总成本基线</div> -->
-                            <label class="lableTxt">总成本基线<el-link v-if="permissions.projectCorrection" @click="correctBase" style="float:right;"><i class="el-icon-edit"  ></i></el-link></label>
+                            <label class="lableTxt">{{ $t('totalcostbaseline') }}<el-link v-if="permissions.projectCorrection" @click="correctBase" style="float:right;"><i class="el-icon-edit"  ></i></el-link></label>
                             <div class="lableCon" v-for="item in projectBaseCostData" :key="item.id">
                                 <div><span class="gray_label">{{item.baseName}}:</span></div>
                                 <div><span style="float:right;">¥{{item.baseAmount | numberToCurrency}}</span></div>
                                 <div>
-                                    <span style="float:right;">剩余可下拨 <span :style="item.baseAmount * 0.9 < baseCostFilter(item.baseId) ? 'color:red;' : ''">¥{{(item.baseAmount - baseCostFilter(item.baseId)) | numberToCurrency}}</span></span>
+                                    <span style="float:right;">{{ $t('restcanbedialed') }} <span :style="item.baseAmount * 0.9 < baseCostFilter(item.baseId) ? 'color:red;' : ''">¥{{(item.baseAmount - baseCostFilter(item.baseId)) | numberToCurrency}}</span></span>
                                 </div>
                             </div>
                             <div style="height:24px">
-                            <el-link style="float:right;margin-right:10px" @click="addCostAdd" size="small" v-if="permissions.projectAllocate" type="primary">下拨成本预算</el-link>
+                            <el-link style="float:right;margin-right:10px" @click="addCostAdd" size="small" v-if="permissions.projectAllocate" type="primary">{{ $t('allocatethecostbudget') }}</el-link>
                             </div>
                         </div>
                     </div>
                 </el-col>
                 <el-col :span="12">
                     <div class="box" ref="nowBox" :style="'height:' + nowBaseHeight + 'px;'">
-                        <label class="lableTxt">当前成本基线</label>
+                        <label class="lableTxt">{{ $t('currentcostbaseline') }}</label>
                             <div class="lableCon" v-for="item in nowBaseList" :key="item.id">
                                 <div><span class="gray_label">{{item.baseName}}:</span></div>
                                 <div><span style="float:right;">¥{{item.baseAmount==null?'-':item.baseAmount | numberToCurrency}}</span></div>
                                 <div class="nowBase_div3">
-                                    <span style="float:right;"><span>¥{{item.realCost | numberToCurrency}}</span></span>
+                                    <span style="float:right;">{{ $t('yi') }}<span>¥{{item.realCost | numberToCurrency}}</span></span>
                                 </div>
                                 <div class="nowBase_div4">
-                                    <span style="float:right;"><span :style="item.baseAmount * 0.9 < item.realCost ? 'color:red;' : ''">¥{{(item.baseAmount - item.realCost) | numberToCurrency}}</span></span>
+                                    <span style="float:right;">{{ $t('yu') }}<span :style="item.baseAmount * 0.9 < item.realCost ? 'color:red;' : ''">¥{{(item.baseAmount - item.realCost) | numberToCurrency}}</span></span>
                                 </div>
                             </div>
                             <div style="height:24px">
@@ -49,12 +49,12 @@
                                     <span style="margin-right: 40px;">¥{{itemListFilter(scope.row.addItemList,item.id) | numberToCurrency}}</span>
                                 </template>
                             </el-table-column>
-                            <el-table-column label="下拨时间" prop="indate" align="center" min-width="200"></el-table-column>
-                            <el-table-column label="操作人员" prop="userName" align="center" min-width="120"></el-table-column>
-                            <el-table-column label="备注" prop="remark" align="left" header-align="left" show-overflow-tooltip min-width="200"></el-table-column>
+                            <el-table-column :label="$t('xiabo')" prop="indate" align="center" min-width="200"></el-table-column>
+                            <el-table-column :label="$t('caozuo')" prop="userName" align="center" min-width="120"></el-table-column>
+                            <el-table-column :label="$t('bei-zhu')" prop="remark" align="left" header-align="left" show-overflow-tooltip min-width="200"></el-table-column>
                             <el-table-column label="" align="center" fixed="right" v-if="permissions.projectAllocate">
                                 <template slot-scope="scope">
-                                    <el-button size="small" @click="revert(scope.row.id)" v-if="scope.$index == 0">撤销</el-button>
+                                    <el-button size="small" @click="revert(scope.row.id)" v-if="scope.$index == 0">{{ $t('btn.undo') }}</el-button>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -64,34 +64,34 @@
         </div>
 
 
-        <el-dialog title="下拨成本预算" v-if="addCostAddDialog" :visible.sync="addCostAddDialog" :close-on-click-modal="false" width="600px">
+        <el-dialog :title="$t('allocatethecostbudget')" v-if="addCostAddDialog" :visible.sync="addCostAddDialog" :close-on-click-modal="false" width="600px">
             <el-form>
                 <el-form-item v-for="item,index in modBaseCostData" :key="item.id" :label="item.baseName" label-width="150px">
-                    <el-input :id="'nowBaseCost'+index" v-model="item.baseAmount" placeholder="请输入" clearable @keyup.native="restrictNumber('nowBaseCost'+index)" style="width:350px"></el-input>
+                    <el-input :id="'nowBaseCost'+index" v-model="item.baseAmount" :placeholder="$t('peaseenterthe')" clearable @keyup.native="restrictNumber('nowBaseCost'+index)" style="width:350px"></el-input>
                 </el-form-item>
-                <el-form-item label="备注" label-width="150px">
-                    <el-input v-model="remark"  placeholder="请输入下拨备注" style="width:350px"></el-input>
+                <el-form-item :label="$t('bei-zhu')" label-width="150px">
+                    <el-input v-model="remark"  :placeholder="$t('peaseenterthe')" style="width:350px"></el-input>
                 </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
                 <!-- <el-button @click="test">test</el-button> -->
-                <el-button @click.native="addCostAddDialog = false">取消</el-button>
-                <el-button type="primary" @click="addCostAddSure" :loading="addLoading">提交</el-button>
+                <el-button @click.native="addCostAddDialog = false">{{ $t('btn.cancel') }}</el-button>
+                <el-button type="primary" @click="addCostAddSure" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
             </div>
         </el-dialog>
-        <el-dialog title="校正成本基线" v-if="correctBaseDialog" :visible.sync="correctBaseDialog" :close-on-click-modal="false" width="600px">
+        <el-dialog :title="$t('jiaoyan')" v-if="correctBaseDialog" :visible.sync="correctBaseDialog" :close-on-click-modal="false" width="600px">
             <el-form>
                 <el-form-item v-for="item,index in correctBaseCostData" :key="item.id" :label="item.baseName" label-width="150px">
-                    <el-input :id="'baseCost'+index" v-model="item.baseAmount" placeholder="请输入" clearable @keyup.native="restrictNumber('baseCost'+index)" style="width:350px"></el-input>
+                    <el-input :id="'baseCost'+index" v-model="item.baseAmount" :placeholder="$t('peaseenterthe')" clearable @keyup.native="restrictNumber('baseCost'+index)" style="width:350px"></el-input>
                 </el-form-item>
-                <el-form-item label="备注" label-width="150px">
-                    <el-input v-model="remark"  placeholder="请输入校正原因" style="width:350px"></el-input>
+                <el-form-item :label="$t('bei-zhu')" label-width="150px">
+                    <el-input v-model="remark"  :placeholder="$t('reasoforcorrection')" style="width:350px"></el-input>
                 </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
                 <!-- <el-button @click="test">test</el-button> -->
-                <el-button @click.native="correctBaseDialog = false">取消</el-button>
-                <el-button type="primary" @click="correctBaseSure" :loading="addLoading">提交</el-button>
+                <el-button @click.native="correctBaseDialog = false">{{ $t('btn.cancel') }}</el-button>
+                <el-button type="primary" @click="correctBaseSure" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
             </div>
         </el-dialog>
     </div>
@@ -201,7 +201,7 @@
                 },res => {
                     if(res.code == 'ok'){
                         this.$message({
-                            message: '撤销成功',
+                            message: this.$t('Revocationofsuccess'),
                             type: 'success'
                         })
                         this.getAddList()
@@ -252,7 +252,7 @@
                 }
                 if(isAll0){
                     this.$message({
-                        message: '下拨成本至少一项不能为0',
+                        message: this.$t('saoyixiang'),
                         type: 'warning'
                     })
                     this.addLoading = false
@@ -269,7 +269,7 @@
                         this.addLoading = false
                         this.addCostAddDialog = false
                         this.$message({
-                            message: '下拨成功',
+                            message: this.$t('xiabochenggong'),
                             type: 'success'
                         })
                         this.remark = ''
@@ -315,7 +315,7 @@
                     if (res.code == "ok") {
                         this.correctBaseDialog = false;
                         this.$message({
-                            message: '校正成功',
+                            message: this.$t('jiaozheng'),
                             type: "success"
                         });
                         this.remark = ''

+ 36 - 36
fhKeeper/formulahousekeeper/timesheet/src/views/project/summary.vue

@@ -7,41 +7,41 @@
             <el-col :span="12">    
             <div class="box">
                 <div >
-                    <div class="lableTxt">项目概览表</div>
+                    <div class="lableTxt">{{ $t('projectoverviewtable') }}</div>
                     <el-divider></el-divider>
                     <el-row :gutter="10">
                     <el-col :span="6" style="text-align:center;">
-                        <p style="color:#666;font-size:12px;">全部</p>
+                        <p style="color:#666;font-size:12px;">{{ $t('all') }}</p>
                         <p style="font-size:28px;font-weight:bold;color:black;">{{taskSum.total}}</p>
                     </el-col>    
                     <el-col :span="6" style="text-align:center;">
-                        <p style="color:#666;font-size:12px;">已完成</p>
+                        <p style="color:#666;font-size:12px;">{{ $t('state.completed') }}</p>
                         <p style="font-size:28px;font-weight:bold;color:green;">{{taskSum.finishCount}}</p>
                     </el-col>
                     <el-col :span="6" style="text-align:center;">
-                        <p style="color:#666;font-size:12px;">未完成</p>
+                        <p style="color:#666;font-size:12px;">{{ $t('wei-wan-cheng') }}</p>
                         <p style="font-size:28px;color:blue;font-weight:bold;">{{taskSum.unfinishCount}}</p>
                     </el-col>
                     <el-col :span="6" style="text-align:center;">
-                        <p style="color:#666;font-size:12px;">已逾期</p>
+                        <p style="color:#666;font-size:12px;">{{ $t('yi-yu-qi') }}</p>
                         <p style="font-size:28px;color:red;font-weight:bold;">{{taskSum.timeupCount}}</p>
                     </el-col>
                     </el-row>
                     <el-row :gutter="10">
                     <el-col :span="6" style="text-align:center;">
-                        <p style="color:#666;font-size:12px;">待认领</p>
+                        <p style="color:#666;font-size:12px;">{{ $t('dai-ren-ling') }}</p>
                         <p style="font-size:28px;color:#orange;font-weight:bold;">{{taskSum.unassignCount}}</p>
                     </el-col>
                     <el-col :span="6" style="text-align:center;">
-                        <p style="color:#666;font-size:12px;">今日到期</p>
+                        <p style="color:#666;font-size:12px;">{{ $t('duetoday') }}</p>
                         <p style="font-size:28px;font-weight:bold;color:pink;">{{taskSum.todayTimeupCount}}</p>
                     </el-col>
                     <el-col :span="6" style="text-align:center;">
-                        <p style="color:#666;font-size:12px;">逾期完成</p>
+                        <p style="color:#666;font-size:12px;">{{ $t('limittocomplete') }}</p>
                         <p style="font-size:28px;font-weight:bold;color:gray;">{{taskSum.timeupFinishCount}}</p>
                     </el-col>
                     <el-col :span="6" style="text-align:center;">
-                        <p style="color:#666;font-size:12px;">时间待定</p>
+                        <p style="color:#666;font-size:12px;">{{ $t('shi-jian-dai-ding') }}</p>
                         <p style="font-size:28px;font-weight:bold;color:black;">{{taskSum.timeunsetCount}}</p>
                     </el-col>
                     </el-row>
@@ -50,10 +50,10 @@
             </el-col>
             <el-col :span="12">    
                 <div class="box">   
-                    <div class="lableTxt" style="display:flex;justify-content:space-between;align-items:center;">执行人分配
+                    <div class="lableTxt" style="display:flex;justify-content:space-between;align-items:center;">{{ $t('distributionexecutors') }}
                         <el-radio-group v-model="sumListRadio" size="mini" @change="sumRadioChange">
-                            <el-radio-button label="任务数量"></el-radio-button>
-                            <el-radio-button label="计划工时"></el-radio-button>
+                            <el-radio-button :label="$t('taskNum')"></el-radio-button>
+                            <el-radio-button :label="$t('plantime')"></el-radio-button>
                         </el-radio-group>
                     </div>
                     <el-divider></el-divider>
@@ -64,14 +64,14 @@
             <el-row :gutter="10">
                 <el-col :span="12">    
                     <div class="box">   
-                        <div class="lableTxt">耗时最多任务</div>
+                        <div class="lableTxt">{{ $t('consumingtask') }}</div>
                         <el-divider></el-divider>
                         <div id="costPanel" style="height:300px;width:500px;"></div>
                     </div>
                 </el-col>
                 <el-col :span="12">    
                     <div class="box">   
-                        <div class="lableTxt">按任务列表统计</div>
+                        <div class="lableTxt">{{ $t('statisticsbytasklist') }}</div>
                         <el-divider></el-divider>
                         <div id="stagesPanel" style="height:300px;width:500px;"></div>
                     </div>
@@ -81,7 +81,7 @@
             <el-row :gutter="10">
                 <el-col :span="24">    
                     <div class="box" style="height:550px;">   
-                        <div class="lableTxt">任务 计划工时 VS 实际工时 <el-link @click="exportTaskCompare" style="float:right;"><i class="iconfont firerock-iconexport"></i>导出</el-link></div>
+                        <div class="lableTxt">{{ $t('actualworkinghours') }} <el-link @click="exportTaskCompare" style="float:right;"><i class="iconfont firerock-iconexport"></i>{{ $t('export.export') }}</el-link></div>
                         <el-divider></el-divider>
                         <div id="taskTimeComparePanel" style="height:500px;width:1100px;"></div>
                     </div>
@@ -131,18 +131,18 @@
                 pVisible:false,
                 taskSum:{},
                 users:[],
-                importanceList:[{id:1,label:'一般'},{id:2,label:'紧急'},{id:3,label:'重要'},{id:4,label:'重要且紧急'}],
+                importanceList:[{id:1,label:this.$t('yi-ban')},{id:2,label:this.$t('jin-ji')},{id:3,label:this.$t('zhong-yao')},{id:4,label:this.$t('zhong-yao-qie-jin-ji')}],
                 //1-一般,2-紧急,3-重要,4-重要且紧急
-                levelTxt:["全部","一般","紧急","重要","重要且紧急"],
+                levelTxt:[this.$t('all'),this.$t('yi-ban'),this.$t('jin-ji'),this.$t('zhong-yao'),this.$t('zhong-yao-qie-jin-ji')],
                 //1-进行中,2-已完成,3-已撤销
-                statusTxt: ["全部","进行中","已完成","已撤销"],
+                statusTxt: [this.$t('all'),this.$t('ongoing'),this.$t('state.completed'),this.$t('state.undone')],
                 addFolderDialog: false,
                 upLoading:false,
                 user: JSON.parse(sessionStorage.getItem("user")),
                 addLoading: false,
                 curProjectId:null,
                 title: "",
-                sumListRadio: '任务数量'
+                sumListRadio: this.$t('taskNum')
             };
         },
         methods: {
@@ -197,7 +197,7 @@
                                     fontSize: 18,
                                     fontWeight: 'normal',
                                  },
-                              text: list.length == 0?"暂无数据":"工时对比",
+                              text: list.length == 0?this.$t('nodata'):this.$t('gong-shi-dui-bi'),
                               left: "center",
                               top: "center"
                             },
@@ -216,7 +216,7 @@
                                 }
                             },
                             legend: {
-                                data: ['实际工时', '计划工时']
+                                data: [this.$t('shi-ji-gong-shi'), this.$t('plantime')]
                             },
                             grid: {
                                 left: '3%',
@@ -234,7 +234,7 @@
                                 type: 'value',
                                 boundaryGap: [0, 1],
                                 axisLabel: {
-                                    formatter:'{value} 小时'
+                                    formatter:'{value} '+this.$t('time.hour')
                                 }
                             },
                             yAxis: [{
@@ -242,12 +242,12 @@
                                 data: taskNames
                             }],
                             series: [{
-                                    name: '实际工时',
+                                    name: this.$t('shi-ji-gong-shi'),
                                     type: 'bar',
                                     data: xList1
                                 },
                                 {
-                                    name: '计划工时',
+                                    name: this.$t('plantime'),
                                     type: 'bar',
                                     data: xList2
                                 }]
@@ -291,7 +291,7 @@
                                     fontSize: 18,
                                     fontWeight: 'normal',
                                  },
-                              text: list.length == 0?"暂无数据":"耗时最多任务图",
+                              text: list.length == 0?this.$t('nodata'):this.$t('themosttime'),
                               left: "center",
                               top: "center"
                             },
@@ -313,7 +313,7 @@
                                 trigger:'axis',
                                 formatter: function (params,ticket,callback) {
                                     var res = params[0].data.fullName + ""+" : " + params[0].data.value 
-                                    + "小时";
+                                    + this.$t('time.hour');
                                     _this.params = params;
                                     return res;
                                 }
@@ -327,11 +327,11 @@
                             yAxis: [{
                                 type : 'value',
                                 axisLabel: {
-                                    formatter:'{value} 小时'
+                                    formatter:'{value}'+this.$t('time.hour')
                                 }
                             }],
                             series: [{
-                                name: '耗时(小时)',
+                                name: this.$t('hao-shi-xiao-shi'),
                                 type: 'bar',
                                 barMaxWidth: 30,
                                 data: yList,
@@ -368,7 +368,7 @@
                                     fontSize: 18,
                                     fontWeight: 'normal',
                                  },
-                              text: list.length == 0?"暂无数据":"任务列表统计",
+                              text: list.length == 0?this.$t('nodata'):this.$t('taskListStatistics'),
                               left: "center",
                               top: "center"
                             },
@@ -382,11 +382,11 @@
                             },
                             tooltip:{
                                 trigger:'item',
-                                formatter: "{b}<br/>任务数:{c} ({d}%)",
+                                formatter: "{b}<br/>"+this.$t('ren-wu-shu')+":{c} ({d}%)",
                             },
                             series : [
                                 {
-                                    name: '任务列表',
+                                    name: this.$t('tasklist'),
                                     type: 'pie',
                                     radius: '55%',
                                     data:list
@@ -410,7 +410,7 @@
             getExecutorPanel(){
                 let _this = this;
                 let url
-                if(this.sumListRadio == '计划工时'){
+                if(this.sumListRadio == this.$t('plantime')){
                     url = '/task/getExecutorPlanHour'
                 }else{
                     url = '/task/getExecutorPanel'
@@ -422,7 +422,7 @@
                         for(var i in list) {
                             xList.push(list[i].executorName);
                             yList.push({
-                                "value": _this.sumListRadio == '计划工时' ? list[i].taskHours : list[i].taskCount,
+                                "value": _this.sumListRadio == this.$t('plantime') ? list[i].taskHours : list[i].taskCount,
                                 "id": list[i].executorId
                             });
                         }
@@ -437,7 +437,7 @@
                                     fontSize: 18,
                                     fontWeight: 'normal',
                                  },
-                              text: list.length == 0?"暂无数据":"执行人分配图",
+                              text: list.length == 0?this.$t('nodata'):this.$t('zhi-hang-ren-fen-pei-tu'),
                               left: "center",
                               top: "center"
                             },
@@ -459,7 +459,7 @@
                                 trigger:'axis',
                                 formatter: function (params,ticket,callback) {
                                     var res = params[0].name + ""+" : " + params[0].data.value 
-                                    + (_this.sumListRadio == '计划工时' ? '小时' : "个");
+                                    + (_this.sumListRadio == this.$t('plantime') ? this.$t('time.hour') : this.$t('ge'));
                                     _this.params = params;
                                     return res;
                                 }
@@ -477,7 +477,7 @@
                                 }
                             }],
                             series: [{
-                                name: _this.sumListRadio == '计划工时' ? '计划工时(小时)' : '任务数量(个)',
+                                name: _this.sumListRadio == this.$t('plantime') ? this.$t('xiaoshijihua') : this.$t('rwushuliang'),
                                 type: 'bar',
                                 barMaxWidth: 30,
                                 data: yList,