瀏覽代碼

提交project文件夹下的的projectForm文件翻译

Lijy 10 月之前
父節點
當前提交
f71e6e248f

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

@@ -1885,5 +1885,13 @@
   "yuGuGongShiBuNengWei_0": "Estimated working hours cannot be 0",
   "yuGuGongShiShiFouBiTian": "Is estimated working hours mandatory",
   "zhengZaiTongBuZhongQingNaiXinDengDai": "Syncing in progress, please be patient.",
-  "zhiNengFenGongSheZhi": "Functional division of labor setting"
+  "zhiNengFenGongSheZhi": "Functional division of labor setting",
+  "bianJiBiaoDanZiDuan": "Edit Form Fields",
+  "bianJiShiBai": "Editing failed:",
+  "qingShuRuZiDingYiMingCheng": "Please enter a custom name",
+  "shanChuShiBai": "Delete failed:",
+  "tianJiaBiaoDanZiDuan": "Add form fields",
+  "tianJiaShiBai": "Add failed:",
+  "wenBen": "text",
+  "zuiDuoZhiNengCunZaiShiGeZiDingYiZiDuan": "Up to ten custom fields can exist"
 }

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

@@ -1885,5 +1885,13 @@
   "kaiQiChengGong": "开启成功",
   "guanBiChengGong": "关闭成功",
   "ciCaoZuoJiangYongJiuShanChuGaiWenJianShiFouJiXu": "此操作将永久删除该文件, 是否继续?",
-  "qingTianXieGongZuoNeiRong": "请填写工作内容"
+  "qingTianXieGongZuoNeiRong": "请填写工作内容",
+  "tianJiaBiaoDanZiDuan": "添加表单字段",
+  "wenBen": "文本",
+  "bianJiBiaoDanZiDuan": "编辑表单字段",
+  "qingShuRuZiDingYiMingCheng": "请输入自定义名称",
+  "zuiDuoZhiNengCunZaiShiGeZiDingYiZiDuan": "最多只能存在十个自定义字段",
+  "tianJiaShiBai": "添加失败:",
+  "bianJiShiBai": "编辑失败:",
+  "shanChuShiBai": "删除失败:"
 }

+ 24 - 24
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectForm.vue

@@ -1,28 +1,28 @@
 <template>
   <div class="infrastructures">
       <div class="til">
-          <p>项目表单设置</p>
+          <p>{{ $t('navigation.projectFormSettings') }}</p>
           <div style="display: flex;">
-            <p style="cursor:pointer;margin-left: 30px;color: #20A0FF;" @click="addJa('添加表单字段', 'ruleForm')"><i class="el-icon-circle-plus-outline"></i>添加</p>
+             <p style="cursor:pointer;margin-left: 30px;color: #20A0FF;" @click="addJa($t('tianJiaBiaoDanZiDuan'), 'ruleForm')"><i class="el-icon-circle-plus-outline"></i>{{ $t('addTian') }}</p>
           </div>
       </div>
       <div class="tabl">
         <el-table :data="dataList" highlight-current-row v-loading="listLoading" :height="heightDoms" style="width: 100%;">
-            <el-table-column type="index" label="序号" width="250px">
+            <el-table-column type="index" :label="$t('headerTop.serialNumber')" width="250px">
                 <template slot-scope="scope" >
                     {{scope.$index + 1}}
                 </template>
             </el-table-column>
-            <el-table-column prop="customName" label="自定义名称" sortable></el-table-column>
-            <el-table-column prop="customType" label="类型" sortable>
+            <el-table-column prop="customName" :label="$t('ziDingYiMingCheng')" sortable></el-table-column>
+            <el-table-column prop="customType" :label="$t('types')" sortable>
                 <template slot-scope="scope">
-                    {{scope.row.customType == '2' ? '日期' : (scope.row.customType == '1' ? '图片' : '文本')}}
+                    {{scope.row.customType == '2' ? $t('weekDay.date') : (scope.row.customType == '1' ? $t('tuPian') : $t('wenBen'))}}
                 </template>
             </el-table-column>
-            <el-table-column label="操作" width="280">
+            <el-table-column :label="$t('operation')" width="280">
                 <template slot-scope="scope">
-                    <el-button size="mini" type="primary" @click="editor(scope.row, '编辑表单字段')">编辑</el-button>
-                    <el-button size="mini" type="danger" @click="deteles(scope.row)">删除</el-button>
+                     <el-button size="mini" type="primary" @click="editor(scope.row, $t('bianJiBiaoDanZiDuan'))">{{ $t('bian-ji') }}</el-button>
+                    <el-button size="mini" type="danger" @click="deteles(scope.row)">{{ $t('btn.delete') }}</el-button>
                 </template>
             </el-table-column>
         </el-table>
@@ -31,21 +31,21 @@
       <el-dialog :title="titleTex" :visible.sync="dialogVisible" width="400px" :before-close="handleClose">
         <div>
             <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm">
-                <el-form-item label="类型">
+                <el-form-item :label="$t('types')">
                     <el-radio-group v-model="ruleForm.customType">
-                        <el-radio-button label="0">文本</el-radio-button>
-                        <el-radio-button label="1">图片</el-radio-button>
-                        <el-radio-button label="2">日期</el-radio-button>
+                        <el-radio-button label="0">{{ $t('wenBen') }}</el-radio-button>
+                        <el-radio-button label="1">{{ $t('tuPian') }}</el-radio-button>
+                        <el-radio-button label="2">{{ $t('weekDay.date') }}</el-radio-button>
                     </el-radio-group>
                 </el-form-item>
-                <el-form-item label="名称" prop="customName">
-                    <el-input placeholder="请输入自定义名称" v-model.trim="ruleForm.customName" clearable></el-input>
+                <el-form-item :label="$t('names')" prop="customName">
+                    <el-input :placeholder="$t('qingShuRuZiDingYiMingCheng')" v-model.trim="ruleForm.customName" clearable></el-input>
                 </el-form-item>
             </el-form>
         </div>
         <span slot="footer" class="dialog-footer">
-            <el-button @click="dialogVisible = false">取 消</el-button>
-            <el-button type="primary" @click="determine('ruleForm')" v-loading="listLoading">确 定</el-button>
+            <el-button @click="dialogVisible = false">{{ $t('quXiao') }}</el-button>
+            <el-button type="primary" @click="determine('ruleForm')" v-loading="listLoading">{{ $t('queDing') }}</el-button>
         </span>
       </el-dialog>
   </div>
@@ -58,7 +58,7 @@ export default {
   data() {
     return {
       heightDoms: document.documentElement.clientHeight - 130,
-      titleTex: '添加表单字段',
+      titleTex: this.$t('tianJiaBiaoDanZiDuan'),
       dialogVisible: false,
       ruleForm: {
           id: '',
@@ -66,7 +66,7 @@ export default {
           customName: '',
           customType: '0'
       },
-      rules: {customName: [{required: true, message: '请输入自定义名称', trigger: 'blur'}]},
+      rules: {customName: [{required: true, message: this.$t('qingShuRuZiDingYiMingCheng'), trigger: 'blur'}]},
       listLoading: false,
       user: JSON.parse(sessionStorage.getItem("user")),
       dataList: []
@@ -104,7 +104,7 @@ export default {
     addJa(tex) {
         if(this.dataList.length >= 10) {
             this.$message({
-                message: '最多只能存在十个自定义字段',
+                message: this.$t('zuiDuoZhiNengCunZaiShiGeZiDingYiZiDuan'),
                 type: 'warning'
             });
             return
@@ -139,14 +139,14 @@ export default {
                 this.listLoading = false
                 if(res.code == 'ok') {
                     this.$message({
-                        message: this.titleTex == '添加表单字段' ? '添加成功' : '编辑成功',
+                        message: this.titleTex == this.$t('tianJiaBiaoDanZiDuan') ? this.$t('addsuccessful') : this.$t('editsuccess'),
                         type: 'success'
                     });
                     this.dialogVisible = false
                     this.getObtain()
                 } else {
                     this.$message({
-                        message: this.titleTex == '添加表单字段' ? '添加失败: ' + res.msg : '编辑失败: ' + res.msg,
+                        message: this.titleTex == this.$t('tianJiaBiaoDanZiDuan') ? this.$t('tianJiaShiBai') + res.msg : this.$t('bianJiShiBai') + res.msg,
                         type: 'error'
                     });
                 }
@@ -171,13 +171,13 @@ export default {
         res => {
             if(res.code == 'ok') {
                 this.$message({
-                    message: '删除成功',
+                    message: this.$t('message.successfullyDeleted'),
                     type: 'success'
                 });
                 this.getObtain()
             } else {
                 this.$message({
-                    message: '删除失败:' + res.msg,
+                    message: this.$t('shanChuShiBai') + res.msg,
                     type: 'error'
                 });
             }