Sfoglia il codice sorgente

英文翻译,按钮权限控制

Karsa 1 anno fa
parent
commit
d105f5a9a4

+ 12 - 0
src/lang/commonLang.js

@@ -288,6 +288,18 @@ export default {
       en: 'Upload failed!',
       zh: '上传失败!'
     },
+    no_edb_auth: {
+      zh:'暂无指标权限,如有问题请联系管理员!',
+      en:'You currently have no metric permissions. If there is an issue, please contact the administrator!'
+    },
+    no_chart_auth: {
+      zh:'暂无图表权限,如有问题请联系管理员!',
+      en:'You currently have no chart permissions. If there is an issue, please contact the administrator!'
+    },
+    no_sheet_auth: {
+      zh:'暂无表格权限,如有问题请联系管理员!',
+      en:'You currently have no table permissions. If there is an issue, please contact the administrator!'
+    },
   },
   Common: {
     category: {

+ 58 - 2
src/lang/modules/systemManage/OperateAuth.js

@@ -9,13 +9,15 @@ export const OperateAuthEn = {
     tab03:'ETA Indicator Library',
     tab04:'ETA Predictive Indicators',
     tab05:'Image Library',
+    tab06:'ETA Tables',
 
     placeholder01:'Please Enter Chart Name',
     placeholder02:'Enter Indicator ID/Indicator Name',
     placeholder03:'Select Category',
     placeholder04:'Select User',
+    placeholder_sheet:'Please Enter Table Name',
 
-    btn_text01:'Batch Edit',
+    btn_text01:'Batch Settings',
     btn_text02:'Permission Settings',
 
     table_col_name01:'Chart Name',
@@ -23,6 +25,8 @@ export const OperateAuthEn = {
     table_col_name03:'Creator',
     table_col_name04:'Indicator ID',
     table_col_name05:'Indicator Name',
+    table_col_sheet_name:'Table Name',
+    table_col_sheet_menu:'Table Category',
 
     edit_title01:'Edit Permissions',
     edit_title02:'Batch Edit Permissions',
@@ -37,6 +41,31 @@ export const OperateAuthEn = {
     permission_confirm_msg:"Are you sure you want to delete the user's invisible permission?",
     set_success:'Setting Successful',
     placeholder05:'New creator cannot be empty',
+
+    set_assets_tab:'Set Asset Permissions',
+    set_data_tab:'Set Data Permissions',
+    transfer_all_btn:'Full Asset Transfer',
+    classify_secret_btn: 'Classified Encryption Settings',
+    classify_set_btn: 'Set Permissions by Category',
+    all_select:' Select All in List',
+    old_creator_msg:'Please select the original creator',
+    tab_sub_sheet1:'Custom analysis',
+    tab_sub_sheet2:'Time Series Table',
+    tab_sub_sheet3:'Mixed Table ',
+    label_count: 'Quantity',
+    label_checked:'Selected',
+
+    /* 转移弹窗 */
+    transfer_title1:'Full Asset Transfer',
+    transfer_title1:'Bulk Asset Transfer Setup',
+    transfer_title1:'Set Asset Transfer',
+
+    /* 分类加密弹窗 */
+    label_open:'Public',
+    label_secret:'Private',
+
+    title_batch_set_auth:'Batch Set Data Permissions',
+    title_single_set_auth:'Set Data Permissions',
 };
   
 /* 中文 */
@@ -54,7 +83,7 @@ export const OperateAuthZh = {
     placeholder04:'请选择用户',
     placeholder_sheet:'请输入表格名称',
 
-    btn_text01:'批量编辑',
+    btn_text01:'批量设置',
     btn_text02:'权限设置',
 
     table_col_name01:'图表名称',
@@ -69,6 +98,7 @@ export const OperateAuthZh = {
     edit_title02:'批量编辑权限',
     original_creator:'原创建人',
     new_creator:'新创建人',
+    label_assets: '资产模块',
 
     msg01:'请至少勾选一个',
 
@@ -79,6 +109,32 @@ export const OperateAuthZh = {
     set_success:'配置成功',
     placeholder05:'新创建人不能为空',
 
+    
+    set_assets_tab:'设置资产权限',
+    set_data_tab:'设置数据权限',
+    transfer_all_btn:'全量资产转移',
+    classify_secret_btn: '分类加密设置',
+    classify_set_btn: '按分类设置权限',
+    all_select:'列表全选',
+    old_creator_msg:'请选择原创建人',
+    tab_sub_sheet1:'自定义分析',
+    tab_sub_sheet2:'时间序列表格',
+    tab_sub_sheet3:'混合表格',
+    label_count: '数量',
+    label_checked:'已选',
+
+    /* 转移弹窗 */
+    transfer_title1:'全量资产转移',
+    transfer_title1:'批量设置资产转移',
+    transfer_title1:'设置资产转移',
+
+    /* 分类加密弹窗 */
+    label_open:'公开',
+    label_secret:'私密',
+
+    title_batch_set_auth:'批量设置数据权限',
+    title_single_set_auth:'设置数据权限',
+
 };
   
 /**

+ 1 - 1
src/views/dataEntry_manage/chartSetting.vue

@@ -771,7 +771,7 @@
             </div>
           </template>
 
-          <noDataAuth v-else text="暂无图表权限,如需权限请联系管理员!"/>
+          <noDataAuth v-else :text="$t('MsgPrompt.no_chart_auth')"/>
         </div>
         <!-- ==============图表列表展示============= -->
         <div class="chart-public-cont" v-else>

+ 1 - 1
src/views/dataEntry_manage/databaseList.vue

@@ -382,7 +382,7 @@
 					</div>
 				</div>
 
-				<noDataAuth v-else text="暂无指标权限,如需权限请联系管理员!"/>
+				<noDataAuth v-else :text="$t('MsgPrompt.no_edb_auth')"/>
 				
 			</div>
 		</div>

+ 1 - 1
src/views/datasheet_manage/components/CustomTable.vue

@@ -817,7 +817,7 @@ export default {
       //非详情页不跳转
       if(!this.disabled) return
       
-      if(!edb.HaveOperaAuth) return this.$message.warning('暂无指标权限,如需权限请联系管理员!')
+      if(!edb.HaveOperaAuth) return this.$message.warning(this.$t('MsgPrompt.no_edb_auth'))
 
       const res = await dataBaseInterface.targetDetail({EdbInfoId:edb.EdbInfoId})
       if(res.Ret !== 200) return

+ 1 - 1
src/views/datasheet_manage/customAnalysis/list.vue

@@ -249,7 +249,7 @@
             </div>
           </template>
 
-          <noDataAuth v-else text="暂无表格权限,如需权限请联系管理员!"/>
+          <noDataAuth v-else :text="$t('MsgPrompt.no_sheet_auth')"/>
         </div>
 
          <!-- 列表 -->

+ 1 - 1
src/views/datasheet_manage/sheetList.vue

@@ -288,7 +288,7 @@
             </div>
           </template>
 
-          <noDataAuth v-else text="暂无表格权限,如需权限请联系管理员!"/>
+          <noDataAuth v-else :text="$t('MsgPrompt.no_sheet_auth')"/>
         </div>
 
          <!-- 列表 -->

+ 1 - 1
src/views/edbHistoryPage.vue

@@ -39,7 +39,7 @@ export default {
         handleClickNode(e, data) {
             //EdbInfoType=1 跳预测指标详情,=0跳指标库详情
             const { ClassifyId, UniqueCode, EdbInfoId, EdbInfoType,HaveOperaAuth } = data
-            if(!HaveOperaAuth) return this.$message.warning('暂无指标权限,如有问题请联系管理员!')
+            if(!HaveOperaAuth) return this.$message.warning(this.$t('MsgPrompt.no_edb_auth'))
             
             let { href } =
             this.$router.resolve({ path: EdbInfoType === 1 ? '/predictEdb' : '/database', query: { code: UniqueCode, id:

+ 1 - 1
src/views/mychart_manage/components/chartDetailDia.vue

@@ -27,7 +27,7 @@
 
         <!-- 无权限 -->
         <div class="nodata" v-if="!chartInfo.HaveOperaAuth">
-          <noDataAuth text="暂无图表权限,如需权限请联系管理员!"/>
+          <noDataAuth :text="$t('MsgPrompt.no_chart_auth')"/>
         </div>
 
         <template v-else>

+ 1 - 1
src/views/mychart_manage/components/chooseChart.vue

@@ -166,7 +166,7 @@ export default {
 
     /* 加入我的图库 */
     addMychartHandle(item) {
-      if(this.chart_source===1&&!item.HaveOperaAuth) return this.$message.warning('暂无图表权限,如需权限请联系管理员!')
+      if(this.chart_source===1&&!item.HaveOperaAuth) return this.$message.warning(this.$t('MsgPrompt.no_chart_auth'))
 
       this.add_chart_id = item.ChartInfoId;
       //已有的分类ids

+ 2 - 2
src/views/ppt_manage/newVersion/pptEditor.vue

@@ -832,8 +832,8 @@ export default {
     //点击右侧图表/沙盘图/表格
     chooseChart:_.throttle(async function(item,type){
       const noAuthMsg = {
-        'chart': '暂无图表权限,如有问题请联系管理员!',
-        'sheet': '暂无表格权限,如有问题请联系管理员!'
+        'chart': this.$t('MsgPrompt.no_chart_auth'),
+        'sheet': this.$t('MsgPrompt.no_sheet_auth')
       }
       if(!item.HaveOperaAuth&&noAuthMsg[type]) return this.$message.warning(noAuthMsg[type])
 

+ 2 - 2
src/views/ppt_manage/newVersion/pptEnEditor.vue

@@ -848,8 +848,8 @@ export default {
     //点击右侧图表或者沙盘图
     chooseChart:_.throttle(async function(item,type){
         const noAuthMsg = {
-          'chart': '暂无图表权限,如有问题请联系管理员!',
-          'sheet': '暂无表格权限,如有问题请联系管理员!'
+          'chart': this.$t('MsgPrompt.no_chart_auth'),
+          'sheet': this.$t('MsgPrompt.no_sheet_auth')
         }
         if(!item.HaveOperaAuth&&noAuthMsg[type]) return this.$message.warning(noAuthMsg[type])
 

+ 1 - 1
src/views/predictEdb_manage/predictEdb.vue

@@ -289,7 +289,7 @@
 						</div>
 					</template>
 
-					<!-- <noDataAuth v-else text="暂无图表权限,如需权限请联系管理员!"/> -->
+					<!-- <noDataAuth v-else :text="$t('MsgPrompt.no_edb_auth')"/> -->
 				</div>
 
 				<!-- 列表 -->

+ 2 - 2
src/views/report_manage/mixins/reportMixin.js

@@ -212,8 +212,8 @@ export default {
   methods: {
     insertHtml(item, type = "chart") {
       const noAuthMsg = {
-        'chart': '暂无图表权限,如有问题请联系管理员!',
-        'sheet': '暂无表格权限,如有问题请联系管理员!'
+        'chart': this.$t('MsgPrompt.no_chart_auth'),
+        'sheet': this.$t('MsgPrompt.no_sheet_auth')
       }
       if(!item.HaveOperaAuth&&noAuthMsg[type]) return this.$message.warning(noAuthMsg[type])
 

+ 1 - 1
src/views/smartReport/components/ETASheet.vue

@@ -107,7 +107,7 @@ export default {
         },
         
         messageTip: _.debounce(function() {
-            this.$message.warning('暂无图表权限,如有问题请联系管理员!')
+            this.$message.warning(this.$t('MsgPrompt.no_sheet_auth'))
         },200)
     },
 }

+ 1 - 1
src/views/smartReport/components/ImportETAChart.vue

@@ -104,7 +104,7 @@ export default {
         },
         
         messageTip: _.debounce(function() {
-            this.$message.warning('暂无图表权限,如有问题请联系管理员!')
+            this.$message.warning(this.$t('MsgPrompt.no_chart_auth'))
         },200)
     },
 }

+ 14 - 5
src/views/system_manage/components/opearAuthSetDia.vue

@@ -3,11 +3,11 @@
 		:visible.sync="isShow"
 		:close-on-click-modal="false"
 		:modal-append-to-body='false'
-    title="设置可见权限"
+    :title="titleMap[form.type]"
 		@close="cancelHandle"
 		custom-class="dialog"
 		center
-		width="650px"
+		width="750px"
 		v-dialogDrag
   >
     <div class="main">
@@ -73,7 +73,7 @@
             node-key="ClassifyId"
           />
         </div>
-        <p v-html="classifyTips"></p>
+        <p v-html="$i18n.locale==='en'?classifyTipsEn:classifyTips"></p>
       </div>
     </div>
 
@@ -115,11 +115,20 @@ export default {
       selectUserIds: [],
       selectUserList: [],
 
+      titleMap: {
+        'classify': /* '按分类设置权限' */this.$t('SystemManage.OperateAuth.classify_set_btn'),
+        'multiple': /* '批量设置数据权限' */this.$t('SystemManage.OperateAuth.classify_set_btn'),
+        'single': /* '设置数据权限' */this.$t('SystemManage.OperateAuth.classify_set_btn'),
+      },
+
       currentTab: 3,
       currentSubTab: '4',
       classifyList: [],
       classifyTips: `注:1、支持加密分类关联部分用户;<br>
-       2、若模块分类中,子分类加密父分类不加密,则父分类展示但禁选。`
+       2、若模块分类中,子分类加密父分类不加密,则父分类展示但禁选。`,
+      classifyTipsEn: `
+        Note:1. Supports encrypted categorization  associated with certain users;<br>
+        2. If in the module categorization, a subcategory is encrypted but its parent category is not, the parent category will be displayed but cannot be selected.`
     }
   },
   mounted(){
@@ -177,7 +186,7 @@ export default {
     },
 
     saveHandle() {
-      if(!this.selectUserIds.length) return this.$message.warning('请选择用户')
+      if(!this.selectUserIds.length) return this.$message.warning(/* '请选择用户' */this.$t('SystemManage.OperateAuth.placeholder04'))
       this.cancelHandle()
     },
 

+ 4 - 4
src/views/system_manage/components/setClassifySecretDia.vue

@@ -3,11 +3,11 @@
 		:visible.sync="isShow"
 		:close-on-click-modal="false"
 		:modal-append-to-body='false'
-    title="设置可见权限"
+    :title="$t('SystemManage.OperateAuth.classify_secret_btn')"
 		@close="cancelHandle"
 		custom-class="dialog"
 		center
-		width="650px"
+		width="750px"
 		v-dialogDrag
   >
     <div class="main">
@@ -51,12 +51,12 @@
                     :class="data.IsPublic === 0 ? 'el-dropdown-menu-item-chat-act' : ''"
                     class="el-dropdown-menu-item-chat"
                   >
-                    公开
+                    <!-- 公开 -->{{$t('SystemManage.OperateAuth.label_open')}}
                   </el-dropdown-item>
                   <el-dropdown-item 
                     class="el-dropdown-menu-item-chat"
                   >
-                    私密
+                    <!-- 私密 -->{{$t('SystemManage.OperateAuth.label_secret')}}
                   </el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>

+ 57 - 23
src/views/system_manage/dataOperaAuth.vue

@@ -6,8 +6,8 @@
           v-model="currAuthSet"
           @change="changeSet"
         >
-          <el-option label="设置资产权限" :value="1"/>
-          <el-option label="设置数据权限" :value="2"/>
+          <el-option :label="$t('SystemManage.OperateAuth.set_assets_tab')" :value="1"/>
+          <el-option :label="$t('SystemManage.OperateAuth.set_data_tab')" :value="2"/>
         </el-select>
         <el-cascader
           v-model="searchForm.user"
@@ -32,25 +32,42 @@
         <el-button 
           type="primary" 
           @click="transferAuthHandle({},'all')" 
-          v-if="currAuthSet===1"
-        >全量资产转移</el-button>
+          v-if="currAuthSet===1&&authBtn('operateAuth_transfer_all')"
+        ><!-- 全量资产转移 -->{{$t('SystemManage.OperateAuth.transfer_all_btn')}}</el-button>
         <template v-if="currAuthSet===2">
-          <el-tooltip effect="dark" placement="right">
+
+          <el-tooltip effect="dark" placement="right" v-if="authBtn('operateAuth_set_classifySercet')">
             <div
               slot="content"
-              v-html="ruleTips.classifySet"
+              v-html="$i18n.locale==='en'?ruleTips.classifySetEn:ruleTips.classifySet "
               style="line-height: 20px;width:300px"
             ></div>
             <i class="el-icon-warning" style="color: #666" />
           </el-tooltip>
           
-          <el-button type="primary" @click="setMenuSecretHandle">分类加密设置</el-button>
-          <el-button type="primary" @click="setAuthHandle({},'classify')">按分类设置权限</el-button>
+          <el-button 
+            type="primary" 
+            @click="setMenuSecretHandle"
+            v-if="authBtn('operateAuth_set_classifySercet')"
+          >
+            <!-- 分类加密设置 -->{{$t('SystemManage.OperateAuth.classify_secret_btn')}}
+          </el-button>
+
+          <el-button 
+            type="primary" 
+            @click="setAuthHandle({},'classify')"
+            v-if="authBtn('operateAuth_set_classifySet')"
+          >
+            <!-- 按分类设置权限 -->{{$t('SystemManage.OperateAuth.classify_set_btn')}}
+          </el-button>
         </template>
         <el-button 
-          type="primary" 
+          type="primary"
+          v-if="authBtn(currAuthSet===1?'operateAuth_transfer_batch':'operateAuth_set_batch')"
           @click="()=>{ currAuthSet===1 ? transferAuthHandle({},'multiple') : setAuthHandle({},'multiple') }"
-        >批量设置</el-button>
+        >
+          <!-- 批量设置 -->{{$t('SystemManage.OperateAuth.btn_text01')}}
+        </el-button>
       </div>
     </div>
 
@@ -60,7 +77,7 @@
         <li :class="['tab-li',{act: default_tab===item.key}]" v-for="item in tabs" :key="item.key" @click="changeTab(item)">
           {{item.label}}
 
-          <div style="margin-top:20px;color: #666;" v-if="statisticCountMap[item.key]">数量:{{statisticCountMap[item.key]}}</div>
+          <div style="margin-top:20px;color: #666;" v-if="statisticCountMap[item.key]"><!-- 数量: -->{{$t('SystemManage.OperateAuth.label_count')}}:{{statisticCountMap[item.key]}}</div>
         </li>
       </ul>
 
@@ -103,14 +120,14 @@
         </div>
 
         <div>
-          <!-- <span>已选:{{ searchForm.checkAll ? total : checkedList.length }}</span> -->
+          <!-- <span>{{$t('SystemManage.OperateAuth.label_checked')}}:{{ searchForm.checkAll ? total : checkedList.length }}</span> -->
           <el-checkbox 
             v-model="searchForm.checkAll"
             :indeterminate="searchForm.checkSome"
             :disabled="tableData.length===0"
             style="margin-left:20px" 
             @change="listCheckAllChange"
-          >列表全选</el-checkbox>
+          ><!-- 列表全选 -->{{$t('SystemManage.OperateAuth.all_select')}}</el-checkbox>
         </div>
       </div>
 
@@ -140,7 +157,13 @@
           >
             <template slot-scope="{row}">
               <template v-if="item.key==='handle'">
-                <span class="editsty" @click="() => {currAuthSet===1 ? transferAuthHandle(row) : setAuthHandle(row)}"><!-- 编辑 -->{{$t('Dialog.title_prefix_edit')}}</span>
+                <span 
+                  class="editsty" 
+                  @click="() => {currAuthSet===1 ? transferAuthHandle(row) : setAuthHandle(row)}"
+                  v-if="authBtn(currAuthSet===1?'operateAuth_transfer_one':'operateAuth_set_one')"
+                >
+                  <!-- 编辑 -->{{$t('Dialog.title_prefix_edit')}}
+                </span>
               </template>
 
               <span v-else>{{ row[item.key] }}</span>
@@ -174,7 +197,7 @@
           ref="formRef"
           label-position="left"
           hide-required-asterisk
-          label-width="80px"
+          label-width="110px"
           :model="transferForm"
           @close="cancelTransfer"
         >
@@ -224,7 +247,7 @@
             />
           </el-form-item>
 
-          <el-form-item label="资产模块" prop="assetTypes" v-if="transferForm.type==='all'">
+          <el-form-item :label="$t('SystemManage.OperateAuth.label_assets')" prop="assetTypes" v-if="transferForm.type==='all'">
             <el-select v-model="transferForm.assetTypes" multiple style="width: 250px">
               <el-option v-for="item in tabs" :key="item.key" :value="item.key" :label="item.label"/>
             </el-select>
@@ -284,9 +307,9 @@ export default {
     },
     subTabs() {
       const subTabs = [
-        { label: '自定义分析', key: 4 },
-        { label: '时间序列表格', key: 2 },
-        { label: '混合表格', key: 3 },
+        { label: /* '自定义分析' */this.$t('SystemManage.OperateAuth.tab_sub_sheet1'), key: 4 },
+        { label:/*  '时间序列表格' */this.$t('SystemManage.OperateAuth.tab_sub_sheet2'), key: 2 },
+        { label: /* '混合表格' */this.$t('SystemManage.OperateAuth.tab_sub_sheet3'), key: 3 },
       ]
 
       return subTabs
@@ -358,6 +381,11 @@ export default {
           1、”分类加密设置“:分类默认公开,分类设置加密后,新增用户默认无加密分类的数据权限。<br>
           2、按分类设置权限:加密的分类支持开放权限给用户。<br>
           3、批量设置:同时设置单个或多个数据的权限。
+        `,
+        'classifySetEn': `
+          1. "Classified Encryption Settings": By default, categories are public. Once a category is set to encrypted, new users will not have data permissions for the encrypted category by default.<br>
+          2. "Set Permissions by Category": Encrypted categories support granting access permissions to users.<br>
+          3. "Batch Settings": Set permissions for single or multiple data entries at the same time.
         `
       },
 
@@ -372,9 +400,9 @@ export default {
         assetTypes: []
       },
       transferTitMap: {
-        'all': '全量资产转移',
-        'multiple': '批量设置资产转移',
-        'single': '设置资产权限',
+        'all': /* '全量资产转移' */ this.$t('SystemManage.OperateAuth.transfer_title1'),
+        'multiple': /* '批量设置资产转移' */this.$t('SystemManage.OperateAuth.transfer_title2'),
+        'single':/*  '设置资产转移' */this.$t('SystemManage.OperateAuth.transfer_title3'),
       },
 
       /* 设置权限弹窗 */
@@ -658,7 +686,7 @@ export default {
 
     /* 全量转移 */
     async transferAllHandle() {
-      if(!this.transferForm.creatorIds.length) return this.$message.warning('请选择原创建人')
+      if(!this.transferForm.creatorIds.length) return this.$message.warning(/* '请选择原创建人' */this.$t('SystemManage.OperateAuth.old_creator_msg'))
 
       const res = await operateAuthInterface.transferAllData({
         Source: this.transferForm.assetTypes,
@@ -689,6 +717,12 @@ export default {
       
       this.authForm.type = type;
       this.isSetAuthDia = true
+    },
+
+    authBtn(key){
+      const {operateAuthPermission,checkPermissionBtn} = this.permissionBtn
+       
+      return checkPermissionBtn(operateAuthPermission[key])
     }
 
   },