Forráskód Böngészése

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

ggooalice 2 éve
szülő
commit
4ea81da7c5

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

@@ -692,5 +692,32 @@
   "uploadedsuccessfully": "Uploaded successfully",
   "pleaseaddtheinvoice": "Please add an invoice",
   "pleaseselectpictures": "Please select an image",
-  "yousureyouwanttodelete": "Are you sure you want to delete"
+  "yousureyouwanttodelete": "Are you sure you want to delete",
+  "approvalprocesssetting": "Approval Process Settings",
+  "timeApprovalProcess": "Working hours approval process",
+  "workinghoursapprovalprocessofdirectstaff": "Immediate staff approval process",
+  "approvaltocomplete": "Approval completed",
+  "employeeisallowed": "Employee fills in the report",
+  "selectheapprovingdepartment": "Please select an approval department",
+  "departmenthead": "Department heads",
+  "dministrator": "designated administrator",
+  "electanapprovaladministrator": "Please select an approval administrator",
+  "personnelAdministrator": "Personnel administrator",
+  "setupthesuccess": "set successfully",
+  "onlyapplicabletotheimmediatestaffofthecurrentdepartment": "Applicable only to the direct staff of the current department, the approval process of the staff of the sub-department needs to be set separately",
+  "add": "new",
+  "bulkimport": "Batch Import",
+  "guan-li": "manage",
+  "ge": "indivual",
+  "numberofrelatedprojects": "Number of related projects",
+  "addedormodifiedthemaintenancedata": "Add/Modify Maintenance Data",
+  "dao-ru": "import",
+  "importtheresults": "Import results",
+  "shu-ju": "data",
+  "importTemplate": "import template",
+  "makesuretodeleteinbatches": "Are you sure you want to delete in bulk",
+  "pleaseentername": "Please enter a name",
+  "pleaseselectheonesyouwanttodelete": "Please select to delete",
+  "customersdata": "pieces of customer data",
+  "makesuretodeletethisone": "Are you sure you want to delete this"
 }

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

@@ -692,5 +692,32 @@
   "editsuccess": "编辑成功",
   "pleaseaddtheinvoice": "请添加发票",
   "yousureyouwanttodelete": "确认要删除吗",
-  "pleaseselectpictures": "请选择图片"
+  "pleaseselectpictures": "请选择图片",
+  "approvalprocesssetting": "审批流程设置",
+  "timeApprovalProcess": "工时审批流程",
+  "workinghoursapprovalprocessofdirectstaff": "直属人员工时审批流程",
+  "employeeisallowed": "员工填报",
+  "approvaltocomplete": "审批完成",
+  "selectheapprovingdepartment": "请选择审批部门",
+  "electanapprovaladministrator": "请选择审批管理员",
+  "dministrator": "指定管理员",
+  "departmenthead": "部门主管",
+  "personnelAdministrator": "人事管理员",
+  "setupthesuccess": "设置成功",
+  "onlyapplicabletotheimmediatestaffofthecurrentdepartment": "仅适用于当前部门的直属人员,子部门人员的审批流程需要单独设置",
+  "guan-li": "管理",
+  "bulkimport": "批量导入",
+  "add": "新增",
+  "numberofrelatedprojects": "相关项目数量",
+  "ge": "个",
+  "addedormodifiedthemaintenancedata": "新增/修改维护数据",
+  "importtheresults": "导入结果",
+  "dao-ru": "导入",
+  "shu-ju": "数据",
+  "importTemplate": "导入模板",
+  "pleaseentername": "请输入名称",
+  "pleaseselectheonesyouwanttodelete": "请选择要删除的",
+  "makesuretodeleteinbatches": "确定要批量删除",
+  "customersdata": "条客户数据",
+  "makesuretodeletethisone": "确定要删除这条"
 }

+ 42 - 41
fhKeeper/formulahousekeeper/timesheet/src/views/centerManage/centerManage.vue

@@ -2,70 +2,71 @@
     <section >
         <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
             <el-form :inline="true">
-                <el-form-item :label="user.timeType.customDegreeName + '管理'">
+                <el-form-item :label="user.timeType.customDegreeName + $t('guan-li')">
                 </el-form-item>
                 <!-- <el-link type="primary" :underline="false" @click="intoCenterRatio" class="tanjia">批量导入{{user.timeType.customDegreeName}}</el-link>
                 <el-link icon="el-icon-circle-plus-outline" type="primary" :underline="false" class="tanjia" @click="addNewSubProject()">添加{{user.timeType.customDegreeName}}</el-link>
                 <el-link type="primary" :underline="false" @click="batchDelete" class="tanjia">批量删除{{user.timeType.customDegreeName}}</el-link> -->
-                <el-link type="primary" :underline="false" @click="batchDelete" class="tanjia">批量删除</el-link>
-                <el-link type="primary" :underline="false" @click="outoCenterRatio" class="tanjia">数据导出</el-link>
-                <el-link type="primary" :underline="false" @click="intoCenterRatio" class="tanjia">批量导入</el-link>
-                <el-link icon="el-icon-circle-plus-outline" type="primary" :underline="false" class="tanjia" @click="addNewSubProject()">新增</el-link>
+                <el-link type="primary" :underline="false" @click="batchDelete" class="tanjia">{{ $t('Batchdelete') }}</el-link>
+                <el-link type="primary" :underline="false" @click="outoCenterRatio" class="tanjia">{{ $t('Exportdata') }}</el-link>
+                <el-link type="primary" :underline="false" @click="intoCenterRatio" class="tanjia">{{ $t('bulkimport') }}</el-link>
+                <el-link icon="el-icon-circle-plus-outline" type="primary" :underline="false" class="tanjia" @click="addNewSubProject()">{{ $t('add') }}</el-link>
 
             </el-form>
         </el-col>
         <el-table :data="subProjectList" highlight-current-row v-loading="listLoading" :height="heightDoms" style="width: 100%;" @selection-change="selectionChange">
             <el-table-column type="selection"></el-table-column>
-            <el-table-column prop="id" width="200" label="序号" align="center">
+            <el-table-column prop="id" width="200" :label="$t('headerTop.serialNumber')" align="center">
                 <template slot-scope="scope" >
                     {{scope.$index + 1}}
                 </template>
             </el-table-column>
-            <el-table-column prop="name" label="名称" width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="projectNum" label="相关项目数量" width="160">
-                <template slot-scope="scope">{{scope.row.projectNum + '个'}}</template>
+            <el-table-column prop="name" :label="$t('names')" width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="projectNum" :label="$t('numberofrelatedprojects')" width="160">
+                <template slot-scope="scope">{{scope.row.projectNum +  $t('ge')}}</template>
             </el-table-column>
-            <el-table-column prop="projects" label="相关项目" min-width="180" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="rmark" label="备注" min-width="180" show-overflow-tooltip></el-table-column>
-            <el-table-column label="操作" width="170">
+            <el-table-column prop="projects" :label="$t('relatedprojects')" min-width="180" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="rmark" :label="$t('bei-zhu')" min-width="180" show-overflow-tooltip></el-table-column>
+            <el-table-column :label="$t('operation')" width="170">
                 <template slot-scope="scope" >
-                    <el-button size="small" type="primary" @click="addNewSubProject(scope.row)">编辑</el-button>
-                    <el-button size="small" type="danger" @click="deleteSubPro(scope.row)">删除</el-button>
+                    <el-button size="small" type="primary" @click="addNewSubProject(scope.row)">{{ $t('bian-ji') }}</el-button>
+                    <el-button size="small" type="danger" @click="deleteSubPro(scope.row)">{{ $t('btn.delete') }}</el-button>
                 </template>
             </el-table-column>
         </el-table>
-        <el-dialog title="新增/修改维护数据" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="600px">
+        <el-dialog :title="$t('addedormodifiedthemaintenancedata')" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="600px">
             <el-form ref="form2" :model="addfm" :rules="ruless" label-width="100px">
-                <el-form-item label="名称" prop="name">
-                    <el-input v-model="addfm.name" placeholder="请输入名称" clearable></el-input>
+                <el-form-item :label="$t('names')" prop="name">
+                    <el-input v-model="addfm.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
                 </el-form-item>
-                <el-form-item label="备注">
-                    <el-input type="textarea" :rows="4" placeholder="请输入备注" v-model="addfm.rmark" clearable  maxlength="150" show-word-limit> </el-input>
+                <el-form-item :label="$t('bei-zhu')">
+                    <el-input type="textarea" :rows="4" :placeholder="$t('peaseenterthe')" v-model="addfm.rmark" clearable  maxlength="150" show-word-limit> </el-input>
                 </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
-                <el-button @click.native="addSubProject = false">取消</el-button>
-                <el-button type="primary" @click="submitInsertSubProject" :loading="addLoading">提交</el-button>
+                <el-button @click.native="addSubProject = false">{{ $t('btn.cancel') }}</el-button>
+                <el-button type="primary" @click="submitInsertSubProject" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
             </div>
         </el-dialog>
         <!-- 导入结果说明 -->
-        <el-dialog title="导入结果" v-if="showImportResult" :visible.sync="showImportResult" customClass="customWidth" width="500px">
+        <el-dialog :title="$t('importtheresults')" v-if="showImportResult" :visible.sync="showImportResult" customClass="customWidth" width="500px">
             <div>
                 <span>{{importResultMsg}}</span>
                 
             </div>
             <span slot="footer" class="dialog-footer">
-                <el-button type="primary" @click="showImportResult=false">确定</el-button>
+                <el-button type="primary" @click="showImportResult=false">{{ $t('btn.determine') }}</el-button>
             </span> 
         </el-dialog>
-        <el-dialog :title="`导入${user.timeType.customDegreeName}数据`" v-if="intoCenterDialog" :visible.sync="intoCenterDialog" customClass="customWidth" width="500px">
-            <p>1. 下载
-            <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/研究中心导入模板.xlsx" :download="`${user.timeType.customDegreeName}导入模板.xlsx`">{{user.timeType.customDegreeName}}导入模板.xlsx</el-link>
+        <span>{{ $t('importTemplate') }}</span>
+        <el-dialog :title="$t('dao-ru') + user.timeType.customDegreeName + $t('shu-ju')" v-if="intoCenterDialog" :visible.sync="intoCenterDialog" customClass="customWidth" width="500px">
+            <p>1. {{ $t('other.download') }}
+            <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/研究中心导入模板.xlsx" :download="user.timeType.customDegreeName+ $t('importTemplate') +'.xlsx'">{{user.timeType.customDegreeName + $t('importTemplate')}}.xlsx</el-link>
             </p>
             <!-- <p>2. 填写excel模板,请确保模板中的项目和人员已添加到系统中。</p> -->
             <p style="display: flex;justify-content: center;padding:1em 0">
                 <el-upload ref="upload"  action="#" :limit="1" :http-request="batchImportData" :show-file-list="false">
-                <el-button type="primary" :underline="false" :loading="importingData">开始导入</el-button>
+                <el-button type="primary" :underline="false" :loading="importingData">{{ $t('other.startImporting') }}</el-button>
             </el-upload>
             </p>
         </el-dialog>
@@ -84,7 +85,7 @@
                 },
                 addSubProject: false,
                 ruless: {
-                    name: [{ required: true, message: "请输入名称", trigger: "blur" }],
+                    name: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
                 },
                 heightDoms: document.documentElement.clientHeight - 140,
                 intoCenterDialog:false,
@@ -102,7 +103,7 @@
             },
             batchDelete(){
                 if(this.selectionArr.length == 0){
-                    this.$message('请选择要删除的' + this.user.timeType.customDegreeName + '数据')
+                    this.$message(this.$t('pleaseselectheonesyouwanttodelete') + this.user.timeType.customDegreeName + this.$t('shu-ju'))
                     return
                 }else{
                     let nametext = ''
@@ -110,9 +111,9 @@
                         nametext += this.selectionArr[i].name + '、'
                     }
                     nametext = nametext.substring(0,nametext.length - 1)
-                    this.$confirm('确定要批量删除' + this.user.timeType.customDegreeName + '数据:' + nametext + '\u3000吗?','删除',{
-                        confirmButtonText: '确定',
-                        cancelButtonText: '取消',
+                    this.$confirm(this.$t('makesuretodeleteinbatches') + this.user.timeType.customDegreeName + this.$t('shu-ju') +':' + nametext + '\u3000' + $t('ma'),this.$t('btn.delete'),{
+                        confirmButtonText: this.$t('btn.determine'),
+                        cancelButtonText: this.$t('btn.cancel'),
                         type: 'warning'
                     }).then(()=>{
                         let batchIds = ''
@@ -125,7 +126,7 @@
                         },res => {
                             if(res.code == 'ok'){
                                 this.$message({
-                                    message: '删除成功',
+                                    message: this.$t('message.successfullyDeleted'),
                                     type: 'success'
                                 })
                                 this.getSub()
@@ -179,7 +180,7 @@
                 let format = str[str.length - 1];
                 if (format != "xls" && format != "xlsx") {
                     this.$message({
-                        message: "请选择.xls或.xlsx文件",
+                        message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
                         type: "error"
                     });
                 } else {
@@ -193,10 +194,10 @@
                         this.showImportResult = true;
                         if (res.code == "ok") {
                             //换成弹出框,以免有人等了半天回来啥也没看到
-                            this.importResultMsg = "成功导入/更新"+res.data+"条客户数据。"+(res.msg?res.msg:"");
+                            this.importResultMsg = this.$t('importedupdatedsuccessfully')+res.data+this.$t('customersdata')+"。"+(res.msg?res.msg:"");
                             this.getSub();
                         } else {
-                            this.importResultMsg = "导入失败:"+res.msg;
+                            this.importResultMsg = this.$t('export.Importfailure') + ":"+res.msg;
                         }
                     },
                     error => {
@@ -251,9 +252,9 @@
                 this.addSubProject = true;
             },
             deleteSubPro(subProject) {
-                this.$confirm("确定要删除这条" + subProject.name + "数据吗?","删除", {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
+                this.$confirm(this.$t('makesuretodeletethisone') + subProject.name + this.$t('shu-ju'),this.$t('btn.delete'), {
+                    confirmButtonText: this.$t('btn.determine'),
+                    cancelButtonText: this.$t('btn.cancel'),
                     type: "warning"
                 })
                 .then(() => {
@@ -265,7 +266,7 @@
                         this.listLoading = false;
                         if (res.code == "ok") {
                             this.$message({
-                                message: "删除成功",
+                                message: this.$t('message.successfullyDeleted'),
                                 type: "success"
                             });
                             this.getSub();
@@ -298,7 +299,7 @@
                             this.listLoading = false;
                             if (res.code == "ok") {
                                 this.$message({
-                                    message: '成功',
+                                    message: this.$t('other.successful'),
                                     type: "success"
                                 });
                                 this.addfm = {name: '',rmark: ''}

+ 23 - 23
fhKeeper/formulahousekeeper/timesheet/src/views/workflow/report.vue

@@ -2,11 +2,11 @@
     <section >
         <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
             <el-form :inline="true">
-                <el-form-item label="审批流程设置">
+                <el-form-item :label="$t('approvalprocesssetting')">
                 </el-form-item>
             </el-form>
         </el-col>
-        <p style="padding-top:80px;margin: 0 0 10px 10px;color:#666;">工时审批流程</p>
+        <p style="padding-top:80px;margin: 0 0 10px 10px;color:#666;">{{$t('timeApprovalProcess')}}</p>
         <div>
         <el-col :span="6" >
             <el-scrollbar style="height:100%;border:1px solid #dddddd;margin-left:15px;" >
@@ -18,21 +18,21 @@
         <el-col :span="18" >
             <el-scrollbar style="height:100%;border:1px solid #dddddd;margin-right:20px;" >
             <div class="tree" :style="'height:'+ (tableHeight-120) + 'px'">
-                <div style="padding:5px;color:#333;" v-if="depData != null">设置 &lt;<span style="color:#20a0ff;">{{depData.label}}&gt;</span> 直属人员工时审批流程
-                    <el-tooltip effect="dark" v-if="depData != null && depData.children!=null" content="仅适用于当前部门的直属人员,子部门人员的审批流程需要单独设置" placement="top-start">
+                <div style="padding:5px;color:#333;" v-if="depData != null">{{ $t('setup') }} &lt;<span style="color:#20a0ff;">{{depData.label}}&gt;</span> {{ $t('workinghoursapprovalprocessofdirectstaff') }}
+                    <el-tooltip effect="dark" v-if="depData != null && depData.children!=null" :content="$t('onlyapplicabletotheimmediatestaffofthecurrentdepartment')" placement="top-start">
                     <i class="el-icon-question"></i>
                     </el-tooltip>
                 </div>
-                <div style="padding:5px;" v-if="depData == null">请选择部门</div>
+                <div style="padding:5px;" v-if="depData == null">{{ $t('qing-xuan-ze-bu-men') }}</div>
                 <div style="width:100%;margin:0 auto;text-align: center; margin-top:50px;" v-if="depData != null">
-                    <span>员工填报</span>
+                    <span>{{ $t('employeeisallowed') }}</span>
                     <icon class="iconfont firerock-iconright"></icon>
                     <icon class="iconfont firerock-iconInsertLine addNode" @click="showNodeDialog(0)"></icon>
                     <icon class="iconfont firerock-iconright"></icon>
                     <span v-for="(item, index) in dataArray" :key="item.seq" >
                         
                         <el-button type="primary" v-if="item.isDeptAudit == 1" @click="editNodeDialog(index, item)">{{item.auditDeptName}}</el-button>
-                        <el-button type="primary" v-if="item.isDeptAudit == 0" >项目审核人</el-button>
+                        <el-button type="primary" v-if="item.isDeptAudit == 0" >{{ $t('other.projectAuditor') }}</el-button>
                         <icon class="iconfont firerock-iconright"></icon>
                         <icon class="iconfont firerock-iconInsertLine addNode" @click="showNodeDialog(index+1)"></icon>
                         <icon class="iconfont firerock-iconright"></icon>
@@ -40,11 +40,11 @@
 
                     <!--结束点 -->
                     <icon class="iconfont firerock-iconApp_New_Line" style="color:#20A0FF;"></icon>
-                    审批完成
-                </div>
+                    {{ $t('approvaltocomplete') }}
+                    </div>
 
                 <div style="width:100%;margin:0 auto;margin-bottom:30px;position: absolute;bottom: 0px;text-align: center; ">
-                    <el-button type="primary" @click="submitInsert" :loading="addLoading">保存</el-button>
+                    <el-button type="primary" @click="submitInsert" :loading="addLoading">{{ $t('save') }}</el-button>
                 </div>
             </div>
             </el-scrollbar>
@@ -53,30 +53,30 @@
         </div>
         
         <!--部门选择列表 -->
-        <el-dialog  title="请选择审批部门" v-if="dialogVisible" :visible.sync="dialogVisible"  width="400px">
+        <el-dialog  :title="$t('selectheapprovingdepartment')" v-if="dialogVisible" :visible.sync="dialogVisible"  width="400px">
               <el-form label-width="80px">
-              <el-form-item label="选择部门" >
-                  <el-cascader ref="deptCascader"  v-model="curDeptId" placeholder="请选择部门" style="width: 100%" @change="chooseDept"
+              <el-form-item :label="$t('other.selectdepartment')" >
+                  <el-cascader ref="deptCascader"  v-model="curDeptId" :placeholder="$t('qing-xuan-ze-bu-men')" style="width: 100%" @change="chooseDept"
                     :options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
               </el-form-item>
               </el-form>
             <div slot="footer" class="dialog-footer">
-              <el-button type="default" @click="deleteNode" v-if="!isAdd" style="float:left;">删除</el-button>
-                <el-button type="primary" @click="addNode" >确定</el-button>
+              <el-button type="default" @click="deleteNode" v-if="!isAdd" style="float:left;">{{ $t('btn.delete') }}</el-button>
+                <el-button type="primary" @click="addNode" >{{ $t('btn.determine') }}</el-button>
             </div>
         </el-dialog>
 
         <!--管理员设置 -->
-        <el-dialog  title="请选择审批管理员" v-if="userDialogVisible" :visible.sync="userDialogVisible"  width="400px">
+        <el-dialog  :title="$t('electanapprovaladministrator')" v-if="userDialogVisible" :visible.sync="userDialogVisible"  width="400px">
               <el-form label-width="100px">
-              <el-form-item label="指定管理员" >
+              <el-form-item :label="$t('dministrator')" >
                   <el-select v-model="auditManagerId" >
                       <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                   </el-select>
               </el-form-item>
               </el-form>
             <div slot="footer" class="dialog-footer">
-                <el-button type="primary" @click="setAuditUser" >确定</el-button>
+                <el-button type="primary" @click="setAuditUser" >{{ $t('btn.determine') }}</el-button>
             </div>
         </el-dialog>
     </section>
@@ -103,9 +103,9 @@
                 curUserId: null,
                 index:0,
                 roleArray:[
-                {label:"项目管理员",value:5},
-                {label:"部门主管",value:6},
-                {label:"人事管理员",value:4},
+                {label:this.$t('role.projectManager'),value:5},
+                {label:this.$t('departmenthead'),value:6},
+                {label:this.$t('personnelAdministrator'),value:4},
                 ],
                 dialogVisible:false,
                 editNode:{},
@@ -123,7 +123,7 @@
                             this.sysAuditUSer = res.data;
                             this.userDialogVisible = false;
                             this.$message({
-                                message: '设置成功',
+                                message: this.$t('setupthesuccess'),
                                 type: "success"
                             });
                         } else {
@@ -282,7 +282,7 @@
                                 this.listLoading = false;
                                 if (res.code == "ok") {
                                     this.$message({
-                                        message: '保存成功',
+                                        message: this.$t('savesuccess'),
                                         type: "success"
                                     });
                                 } else {