Sfoglia il codice sorgente

Merge branch 'custom' of http://8.136.199.33:3000/eta_front/eta_front into newbug5386

ldong 2 mesi fa
parent
commit
1b9e069e2d

+ 1 - 1
build/webpack.dll.config.js

@@ -2,7 +2,7 @@ const path = require('path')
 const webpack = require('webpack')
 module.exports = {
   entry: {
-    vendor: ['highcharts','@antv/x6','vue-router']
+    vendor: ['highcharts','vue-router']
   },
   output: {
     path: path.join(__dirname, '../static'),

+ 2 - 0
src/utils/buttonConfig.js

@@ -689,6 +689,7 @@ export const sysDepartPermission = {
     sysDepart_enable:'sysDepart:enable',//启用禁用
     sysDepart_del:'sysDepart:del',//用户删除
     sysDepart_saveUser_researchGroup:'sysDepart:saveUser:researchGroup',//添加/编辑用户表单中,研究方向的按钮
+    sysDepart_userType:'sysDepart:userType',//添加/编辑用户表单中,用户类型按钮
     sysDepart_saveUser_LabelVal:'sysDepart:saveUser:LabelVal',//姓名角色的标签
     sysDepart_classifyOpt_edit:'sysDepart:classifyOpt:edit',//添加/编辑部门
     sysDepart_classifyOpt_delete:'sysDepart:classifyOpt:delete',//删除部门
@@ -766,6 +767,7 @@ export const baseConfigPermission = {
     etaBaseConfig_login_websiteName_pc:'baseSetting:loginSetting:websiteName:pc',//网站名称移动端
     etaBaseConfig_source_edit:'baseSetting:sourceSetting:edit',//资源库编辑
     etaBaseConfig_source_del:'baseSetting:sourceSetting:del',//资源库删除
+    etaBaseConfig_watermark_ybEnShare:'etaBaseConfig:watermark:ybEnShare',//英文研报抬头
 }
 
 /*-----------外部链接配置-------- */

+ 4 - 3
src/views/chartRelevance_manage/crossVarietyAnalysis/components/tagRelationDialog.vue

@@ -17,7 +17,7 @@
 
           <selectTarget
             :defaultId="item.edbInfoId"
-            :defaultOpt="searchOptions"
+            :defaultOpt="item.edbInfoId?searchOptions:[]"
             @select="e => selectTargetHandle(e,item)"  
             :filter="false"
             style="max-width: 200px;"
@@ -118,8 +118,9 @@ export default {
 
       this.searchOptions = this.list.map(_ => ({
         EdbName: _.edbName,
-        EdbInfoId: _.edbInfoId
-      }))
+        EdbInfoId: _.edbInfoId,
+        HaveOperaAuth:true
+      })).filter(_ =>_.EdbInfoId)
     },
 
     /* 保存`` */

+ 7 - 32
src/views/dataEntry_manage/chartSetting.vue

@@ -1878,15 +1878,17 @@ export default {
       }
 
       const { EdbInfoList } = res.Data;
-
+      
       this.tableData.forEach((item) => {
+        //只更新数据和显性字段
         let edbData = EdbInfoList.find(_ => _.EdbInfoId===item.EdbInfoId);
         item.DataList = edbData.DataList;
-        //更新起始时间和最近更新时间
+        
         item.StartDate = edbData.StartDate;
         item.ModifyTime = edbData.ModifyTime;
-
-        if(edbData.EdbInfoCategoryType===1) item.MoveLatestDate = edbData.MoveLatestDate;
+        item.MoveLatestDate = edbData.MoveLatestDate;
+        item.LatestDate = edbData.LatestDate;
+        item.LatestValue = edbData.LatestValue;
       });
     },
 
@@ -2160,34 +2162,7 @@ export default {
         })
         .catch(() => {});
     },
-    /* 图表未保存时更新图表数据 */
-    refreshTarget() {
-      for (let i in this.tableData) {
-        let params = {
-          EdbInfoId: this.tableData[i].EdbInfoId,
-          DateType: this.year_select,
-          StartDate:
-            this.year_select === 5 || this.year_select === 6
-              ? this.select_date[0]
-              : '',
-          EndDate: this.year_select === 5 ? this.select_date[1] : '',
-          EdbInfoType: this.tableData[i].EdbInfoType,
-          LeadValue: this.tableData[i].EdbInfoType
-            ? 0
-            : this.tableData[i].LeadValue,
-          LeadUnit: this.tableData[i].EdbInfoType
-            ? ''
-            : this.tableData[i].LeadUnit,
-        };
-        dataBaseInterface.edbinfoDetail(params).then((res) => {
-          if (res.Ret === 200) {
-            let newData = res.Data.EdbInfo;
-            this.tableData[i].DataList = newData.DataList;
-            if(newData.EdbInfoCategoryType===1) this.tableData[i].MoveLatestDate = newData.MoveLatestDate;
-          }
-        });
-      }
-    },
+
     /* 年份改变 重新刷新图表接口  保存当前的图表配置和上下限 只改变图表 */
     changeYear(item) {
       this.year_select = item.value;

+ 4 - 0
src/views/dataEntry_manage/databaseList.vue

@@ -1040,6 +1040,8 @@ export default {
 							}, 1000);
 						})
 						
+						// 重绘图表,刷新数据
+						this.$refs.createChart&&this.$refs.createChart.getEdbData()
 
 					}else {
 						this.tableData = [];
@@ -1460,6 +1462,8 @@ export default {
 
 						this.page_no = 1;
 						this.getDataList('refresh')
+						
+						this.$refs.createChart && this.$refs.createChart.getDataByPath()
 					}else{
 						this.loading.close();
 					}

+ 3 - 3
src/views/datasheet_manage/components/insertDateDia.vue

@@ -29,7 +29,7 @@
               />
               
               <span v-show="selectEdbInfo.Frequency" style="margin: 0 10px">{{$t('ETableChildren.frequency_lable')}}: {{ getFrequencyTrans(selectEdbInfo.Frequency) }}</span>
-              <span v-show="selectEdbInfo.LatestDate">{{$t('OnlineExcelPage.lastest_date_lab')}}: {{ selectEdbInfo.LatestDate }}</span>
+              <span v-show="selectEdbInfo.EndDate">{{$t('OnlineExcelPage.lastest_date_lab')}}: {{ selectEdbInfo.EndDate }}</span>
             </li>
             <li class="form-item" style="padding-left:10px">
               <label class="el-form-item__label">{{$t('ETableChildren.lagging_period_label')}}</label>
@@ -103,8 +103,8 @@ export default {
           if(this.info.DataTimeType===2) { //指标日期时获取指标详情
             const { Data } = await dataBaseInterface.targetDetail({EdbInfoId: valueObj.EdbInfoId})
 
-            const { EdbName,LatestDate,Frequency,EdbInfoId } = Data;
-            this.selectEdbInfo = { EdbName,LatestDate,Frequency,EdbInfoId }
+            const { EdbName,LatestDate,Frequency,EdbInfoId,EndDate } = Data;
+            this.selectEdbInfo = { EdbName,LatestDate,Frequency,EdbInfoId,EndDate }
 
             this.search_edb = valueObj.EdbInfoId;
             this.searchOptions = [this.selectEdbInfo];

+ 12 - 6
src/views/mychart_manage/components/chartDetailDia.vue

@@ -100,8 +100,12 @@
                 />
                 <!-- 复制到 -->{{$t('Chart.chart_copyto_btn')}}
               </span>
-              <span v-permission="permissionBtn.myETAPermission.myChart_refresh"
-                  class="span-item" @click="refreshHandle" style="margin-left: 7px;">
+              <span 
+                v-permission="permissionBtn.myETAPermission.myChart_refresh"
+                class="span-item" 
+                @click="refreshHandle" 
+                style="margin-left: 7px;"
+              >
                 <span><i class="el-icon-refresh" style="font-size: 15px;"/>&nbsp;<!-- 刷新 -->{{$t('Edb.detail_refresh_btn')}} </span>
               </span>
               <span
@@ -760,7 +764,7 @@ export default {
     },
 
     /* 曲线图筛选项发生变化时 非配置项 获取新的图表数据 */
-   async getPreviewChartInfo() {
+    async getPreviewChartInfo() {
       let dateArray=this.chartInfo.ChartType==2?this.season_year:this.select_date
       let params = {
         ChartSource:this.chartInfo.Source,
@@ -812,13 +816,15 @@ export default {
       const { EdbInfoList } = res.Data;
 
       this.tableData.forEach((item) => {
+        //只更新数据和显性字段
         let edbData = EdbInfoList.find(_ => _.EdbInfoId===item.EdbInfoId);
         item.DataList = edbData.DataList;
-        //更新起始时间和最近更新时间
+        
         item.StartDate = edbData.StartDate;
         item.ModifyTime = edbData.ModifyTime;
-        
-        if(edbData.EdbInfoCategoryType===1) item.MoveLatestDate = edbData.MoveLatestDate;
+        item.MoveLatestDate = edbData.MoveLatestDate;
+        item.LatestDate = edbData.LatestDate;
+        item.LatestValue = edbData.LatestValue;
       });
     },
 

+ 2 - 3
src/views/ppt_manage/mixins/pptMixins.js

@@ -359,7 +359,7 @@ export default {
           x_max: res.Data.ChartInfo.XMax?Number(res.Data.ChartInfo.XMax):Number(res.Data.DataResp.XMaxValue),
         }
         this.setCrossVarietyChart();
-        this.changeRelevanceOptions();//更改英文一样
+        this.changeRelevanceOptions(currentLang);//更改英文一样
       }
 
       //根据图表数据获取配置项
@@ -777,11 +777,10 @@ export default {
           chart: {
             ...defaultOpts.chart,
 					  ...chartTheme&&chartTheme.drawOption,
-            spacing: chartTheme.legendOptions.verticalAlign==='bottom' ? [23,10,2,10] : [2,10,2,10],//图例在底部顶部空间留大点给单位
+            spacing: chartTheme.legendOptions.verticalAlign==='bottom' ? [25,10,2,10] : [2,10,2,10],//图例在底部顶部空间留大点给单位
             animation: false,
             backgroundColor: "rgba(0,0,0,0)",
             renderTo:$(`#${refName}`)[0],
-            ...options.chart||{},
           },
           legend: {
             ...defaultOpts.legend,

+ 29 - 5
src/views/ppt_manage/newVersion/pptCatalog.vue

@@ -237,7 +237,7 @@
                         <span>{{item.Title}}</span>
                 </div>
                 <div class="item-opt">
-                    <span v-for="optItem in setListTool()" :key="optItem.key" @click.stop="handleListToolClick(optItem,item)">
+                    <span v-for="optItem in setListTool(item)" :key="optItem.key" @click.stop="handleListToolClick(optItem,item)">
                         {{ getListMenuOptText(optItem.label) }}
                     </span>
                 </div>
@@ -469,7 +469,6 @@ export default {
         if(e==='演示') return this.$t('Slides.list_ppt_item_preview')
         if(e==='下载') return this.$t('Slides.list_ppt_item_download')
         if(e==='编辑') return this.$t('Slides.list_ppt_item_edit')
-
     },
     //ppt详情操作栏
     getContentMenuOptText(e){
@@ -599,7 +598,7 @@ export default {
       }
     },
     //设置列表的操作按钮
-    setListTool(){
+    setListTool(itemData){
       let list = []
       const {checkPermissionBtn,pptPermission} = this.permissionBtn
       const authMap = {
@@ -818,12 +817,29 @@ export default {
       })
     },
     //点击列表操作栏事件处理
-    handleListToolClick(item,{PptId,PptxUrl,Title}){
-        const urlMap = {
+    async handleListToolClick(item,{PptId,PptxUrl,Title,Editor}){
+      if(item.key==='edit'&&Editor.IsEditing&&Editor.AdminId!==Number(localStorage.getItem('AdminId'))){
+        this.$message.warning(`${Editor.Editor}${this.$t('Slides.editing_progress_msg') }...`)
+        return
+      }
+      const urlMap = {
         edit:`/ppteditor?id=${PptId}`,
         publish:`/pptpublish?id=${PptId}`,
         present:`/pptpresent?id=${PptId}`
       }
+      if(item.key==='edit'){
+        //判断能否编辑
+        const editRes=await pptInterface.pptEditLock({PptId:Number(PptId),Status:0})
+        if(editRes.Ret!==200) return
+        if(editRes.Data&&editRes.Data.IsEditing&&editRes.Data.AdminId!==Number(localStorage.getItem('AdminId'))){
+          Editor=editRes.Data
+          this.$message.warning(`${editRes.Data.Editor}${this.$t('Slides.editing_progress_msg') }...`)
+          return
+        }
+        //调接口加锁然后跳转
+        const res = await pptInterface.pptEditLock({PptId:Number(PptId),Status:1})
+        if(res.Ret!==200) return
+      }
       if(urlMap[item.key]){
         window.open(urlMap[item.key],'_blank')
         return 
@@ -849,6 +865,14 @@ export default {
                     this.$message.warning(this.$t('Slides.no_duplicated_edit_msg') )
                     return
                 }
+                //判断能否编辑
+                const editRes=await pptInterface.pptEditLock({PptId:Number(this.pptItem.PptId),Status:0})
+                if(editRes.Ret!==200) return
+                if(editRes.Data&&editRes.Data.IsEditing&&editRes.Data.AdminId!==Number(localStorage.getItem('AdminId'))){
+                  this.setToolList({Editor:{...editRes.Data}})
+                  this.$message.warning(`${editRes.Data.Editor}${this.$t('Slides.editing_progress_msg') }...`)
+                  return
+                }
                 //调接口加锁然后跳转
                 const res = await pptInterface.pptEditLock({PptId:Number(this.pptItem.PptId),Status:1})
                 if(res.Ret!==200) return

+ 31 - 4
src/views/ppt_manage/newVersion/pptEnCatalog.vue

@@ -232,7 +232,7 @@
                         <span>{{item.Title}}</span>
                 </div>
                 <div class="item-opt">
-                    <span v-for="optItem in setListTool()" :key="optItem.key" @click.stop="handleListToolClick(optItem,item)">
+                    <span v-for="optItem in setListTool(item)" :key="optItem.key" @click.stop="handleListToolClick(optItem,item)">
                         {{ getListMenuOptText(optItem.label) }}
                     </span>
                 </div>
@@ -571,7 +571,7 @@ export default {
       }
     },
     //设置列表的操作按钮
-    setListTool(){
+    setListTool(itemData){
       let list = []
       const {checkPermissionBtn,pptPermission} = this.permissionBtn
       const authMap = {
@@ -782,12 +782,31 @@ export default {
       })
     },
     //点击列表操作栏事件处理
-    handleListToolClick(item,{PptId,PptxUrl,Title}){
-        const urlMap = {
+    async handleListToolClick(item,{PptId,PptxUrl,Title,Editor}){
+      if(item.key==='edit'&&Editor.IsEditing&&Editor.AdminId!==Number(localStorage.getItem('AdminId'))){
+        this.$message.warning(`${Editor.Editor}${this.$t('Slides.editing_progress_msg') }...`)
+        return
+      }
+      const urlMap = {
         edit:`/ppteneditor?id=${PptId}`,
         publish:`/pptenpublish?id=${PptId}`,
         present:`/pptenpresent?id=${PptId}`
       }
+      if(item.key==='edit'){
+         //判断能否编辑
+        const editRes=await pptEnInterface.pptEditLock({PptId:Number(PptId),Status:0})
+        if(editRes.Ret!==200) return
+        if(editRes.Data&&editRes.Data.IsEditing&&editRes.Data.AdminId!==Number(localStorage.getItem('AdminId'))){
+          Editor=editRes.Data
+          this.$message.warning(`${editRes.Data.Editor}${this.$t('Slides.editing_progress_msg') }...`)
+          return
+        }
+        //调接口加锁然后跳转
+        const res = await pptEnInterface.pptEditLock({PptId:Number(PptId),Status:1})
+        if(res.Ret!==200) return
+      }
+      
+
       if(urlMap[item.key]){
         window.open(urlMap[item.key],'_blank')
         return 
@@ -812,6 +831,14 @@ export default {
                     this.$message.warning(this.$t('Slides.no_duplicated_edit_msg') )
                     return
                 }
+                //判断能否编辑
+                const editRes=await pptEnInterface.pptEditLock({PptId:Number(this.pptItem.PptId),Status:0})
+                if(editRes.Ret!==200) return
+                if(editRes.Data&&editRes.Data.IsEditing&&editRes.Data.AdminId!==Number(localStorage.getItem('AdminId'))){
+                  this.setToolList({Editor:{...editRes.Data}})
+                  this.$message.warning(`${editRes.Data.Editor}${this.$t('Slides.editing_progress_msg') }...`)
+                  return
+                }
                 //调接口加锁然后跳转
                 const res = await pptEnInterface.pptEditLock({PptId:Number(this.pptItem.PptId),Status:1})
                 if(res.Ret!==200) return

+ 1 - 1
src/views/system_manage/components/addUserDialog.vue

@@ -30,7 +30,7 @@
                         :label="item.Name" :value="item.Value" />
                 </el-select>
             </el-form-item>
-            <el-form-item label="用户类型" prop="IsLdap">
+            <el-form-item label="用户类型" prop="IsLdap" v-permission="permissionBtn.sysDepartPermission.sysDepart_userType">
                 <el-select v-model="userForm.IsLdap" placeholder="请选择用户类型">
                     <el-option label="系统用户" :value="0"></el-option>
                     <el-option label="域用户" :value="1"></el-option>

+ 0 - 212
src/views/system_manage/components/authSetDialog.vue

@@ -1,212 +0,0 @@
-<template>
-  <el-dialog
-		:visible.sync="isShow"
-		:close-on-click-modal="false"
-		:modal-append-to-body="false"
-		@close="cancelHandle"
-		custom-class="auth-set-dialog"
-		center
-		width="850px"
-		top="5vh"
-		v-dialogDrag
-    :title="edbForm.title"
-	>
-    <div class="cont">
-      <div class="header">
-        <span>{{$t('SystemManage.OperateAuth.invisible_users')}}</span>
-        <el-cascader
-          v-model="filterUsers"
-          :options="userList"
-          :props="{
-            value: 'AdminId',
-            label: 'RealName',
-            children: 'ChildrenList',
-            emitPath: false,
-            multiple: true,
-            disabled: 'Creater'
-          }"
-          collapse-tags
-          :show-all-levels="false"
-          clearable
-          filterable
-          :placeholder="$t('SystemManage.OperateAuth.placeholder04')" 
-          style="margin: 0 20px"
-        />
-        <el-button type="primary" @click="setAuthHandle">{{$t('Dialog.set_btn')}}</el-button>
-      </div>
-      <template v-if="edbForm.title===$t('SystemManage.OperateAuth.permission_title01')">
-        <el-table
-          :data="filterTable"
-          border
-          style="margin: 20px 0"
-        >
-          <el-table-column v-for="item in tableColums" :key="item.key" align="center" :label="item.label">
-            <template slot-scope="{row}">
-              <span>{{ row[item.key] }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column align="center" :label="$t('Table.column_operations')">
-            <template slot-scope="{row}" >
-              <el-popconfirm
-                :title="$t('SystemManage.OperateAuth.permission_confirm_msg')"
-                @onConfirm="removeUser(row)"
-              >
-                <span slot="reference" class="deletesty">{{$t('Table.delete_btn')}}</span>
-              </el-popconfirm>
-            </template>
-          </el-table-column>
-        </el-table>
-        <el-col :span="24" style="height:100px">
-          <m-page
-            :page_no="pageNo"
-            :pageSize="pageSize"
-            :total="total"
-            @handleCurrentChange="pageChange"
-          />
-        </el-col>
-      </template>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { operateAuthInterface } from '@/api/modules/setApi';
-import mPage from '@/components/mPage';
-export default {
-  props: {
-    isShow: {
-      type: Boolean
-    },
-    users: {
-      type: Array
-    },
-    edbForm: {
-      type: Object
-    }
-  },
-  components: { mPage },
-  watch: {
-    isShow(nval) {
-      if(!nval) return
-      
-      let uers_arr = _.cloneDeep(this.users);
-      this.disableCreaterHandle(uers_arr);
-      this.userList = uers_arr;
-      this.edbForm.title===this.$t('SystemManage.OperateAuth.permission_title01') && this.getTableList()
-    }
-  },
-  computed:{
-    tableColums(){
-      return [
-        { label:this.$t('SystemManage.DepartManage.user_table_name'),key: 'RealName' },
-        { label:this.$t('SystemManage.DepartManage.user_table_role'),key: 'RoleName' },
-        { label:this.$t('SystemManage.DepartManage.user_table_depart'),key: 'DepartmentGroup' },
-      ]
-    }
-  },
-  data() {
-    return {
-      userList: [],
-      filterUsers: [],
-
-      tableData: [],
-      filterTable: [],
-      // tableColums:[
-      //   { label:'姓名',key: 'RealName' },
-      //   { label:'角色',key: 'RoleName' },
-      //   { label:'部门/分组',key: 'DepartmentGroup' },
-      // ],
-      pageNo:1,
-      pageSize: 10,
-      total: 0,
-    }
-  },
-  methods: {
-
-    /* 数据列表 */
-    getTableList() {
-      operateAuthInterface.getEdbNoAuthList({
-        EdbInfoId: this.edbForm.ids[0]
-      }).then(res => {
-        if(res.Ret !== 200) return
-        this.tableData = res.Data.List || [];
-        this.total = this.tableData.length;
-        this.filterTable = this.tableData.slice(0,this.pageSize*this.pageNo);
-        // this.filterUsers = this.tableData.length ? this.tableData.map(_ => _.AdminId) : [];
-
-      })
-    },
-
-    disableCreaterHandle(arr) {
-      // let filter_arr = arr.form
-      arr.forEach(item => {
-        item.ChildrenList && item.ChildrenList.length && this.disableCreaterHandle(item.ChildrenList);
-        if( Number(item.AdminId) === this.edbForm.createId) {
-          item.Creater = true;
-        }
-      })
-    },
-
-    pageChange(page) {
-      this.pageNo = page;
-      this.filterTable = this.tableData.slice(this.pageSize*(this.pageNo-1),this.pageSize*this.pageNo);
-    },
-
-
-    cancelHandle() {
-      this.pageNo = 1;
-      this.filterUsers = [];
-      this.filterTable = [];
-      this.$emit('update:isShow',false)
-    },
-
-    /* 删除 */
-    removeUser({AdminId}) {
-          operateAuthInterface.edbNoAuthDel({
-            EdbInfoId: Number(this.edbForm.ids[0]),
-            AdminId
-          }).then(res => {
-            if(res.Ret !== 200) return 
-            this.$message.success(this.$t('MsgPrompt.delete_msg'));
-            this.getTableList();
-          })
-    },
-
-    /* 设置权限 */
-    async setAuthHandle() {
-      if(!this.filterUsers.length) return this.$message.warning(this.$t('SystemManage.OperateAuth.placeholder04'))
-      // let res = this.edbForm.title === '权限设置' 
-      //   ? await operateAuthInterface.edbNoAuthSet({
-      //       EdbInfoId: Number(this.edbForm.ids[0]),
-      //       AdminIdList: this.filterUsers.map(_ => Number(_))
-      //   })
-      //   : 
-      let res = await operateAuthInterface.edbNoAuthBatchSet({
-          EdbInfoIdList: this.edbForm.ids.map(_ => Number(_)),
-          AdminIdList: this.filterUsers.map(_ => Number(_))
-        })
-
-      if(res.Ret !== 200) return 
-      this.$message.success(this.$t('SystemManage.OperateAuth.set_success'))
-      if(this.edbForm.title === this.$t('SystemManage.OperateAuth.permission_title01')) {
-        this.filterUsers=[]
-        this.getTableList()
-      }else {
-        this.$emit('setSuccess');
-        this.cancelHandle()
-      }
-    }
-  }
-}
-</script>
-
-<style lang="scss" soped>
-.cont {
-  min-height: 250px;
-}
-</style>
-<style lang='scss'>
-.auth-set-dialog {
-  .el-cascader .el-input {width: 100%;}
-}
-</style>

+ 14 - 7
src/views/system_manage/dataOperaAuth.vue

@@ -470,17 +470,24 @@ export default {
       if (res.Ret !== 200) return
     
       this.userList = res.Data || []
-      this.filterTreeEmpty(this.userList)
+      this.filterTreeEmpty({Children:this.userList})
     },
 
     // 递归处理数组
     filterTreeEmpty(arr) {
-      arr.length && arr.forEach(item => {
-        item.Children && item.Children.length && this.filterTreeEmpty(item.Children)
-        if (!item.Children || !item.Children.length) {
-          delete item.Children
-        }
-      })
+      function dfs(node) {
+          if (Array.isArray(node.Children)) {
+              for (let child of node.Children) {
+                  dfs(child);
+              }
+              if(node.Children.length===0) delete node.Children
+          }
+          //若为叶子节点,且不为用户,禁止选中
+          if(!node.Children||!Array.isArray(node.Children)){
+              if(node.NodeType!==3) node.disabled = true
+          }
+      }
+      dfs(arr); 
     },
 
     /* 获取用户的资产数量 */

+ 7 - 1
src/views/system_manage/etaBaseConfig.vue

@@ -287,7 +287,7 @@
                         <el-form-item :label="$t('SystemManage.BaseConfig.report_share_title_zh')" prop="H5ShareName">
                             <el-input type="text" v-model="formData.H5ShareName" :placeholder="$t('SystemManage.BaseConfig.report_share_title_zh_placeholder')" />
                         </el-form-item>
-                        <el-form-item :label="$t('SystemManage.BaseConfig.report_share_title_en')" prop="H5ShareEnName">
+                        <el-form-item :label="$t('SystemManage.BaseConfig.report_share_title_en')" prop="H5ShareEnName" v-if="isShowReportEnShare">
                             <el-input type="text" v-model="formData.H5ShareEnName" :placeholder="$t('SystemManage.BaseConfig.report_share_title_en_placeholder')" />
                         </el-form-item>
                         <el-form-item :label="$t('SystemManage.BaseConfig.connect_wx')" prop="WxAppId">
@@ -724,6 +724,12 @@ export default {
                 this.permissionBtn.baseConfigPermission.etaBaseConfig_source_see
             )
         },
+
+        isShowReportEnShare(){
+            return this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.baseConfigPermission.etaBaseConfig_watermark_ybEnShare
+            )
+        },
     },
     watch: {
         'isShowLoginConfig':{

+ 0 - 481
src/views/system_manage/operateAuthManage.vue

@@ -1,481 +0,0 @@
-<template>
-  <div class="container">
-    <div class="top">
-      <ul class="tab-ul">
-        <li :class="['tab-li',{act: default_tab===item.key}]" v-for="item in authTabs" :key="item.key" @click="changeTab(item)">{{item.label}}</li>
-      </ul>
-    </div>
-
-    <div class="top">
-        <div v-if="authTabs.length">
-            <el-input 
-            v-model="searchForm.key_word" 
-            :placeholder="default_tab === 5 ? this.$t('SystemManage.OperateAuth.placeholder01') : this.$t('SystemManage.OperateAuth.placeholder02')" 
-            style="width: 300px;margin-right:20px;"
-            @change="changeUser"
-            clearable
-            >
-            <i slot="prefix" class="el-input__icon el-icon-search"/>
-            </el-input>
-        </div>
-        <div v-if="authTabs.length" style="margin-right:auto;">
-          <el-cascader
-            v-model="searchForm.classification"
-            :options="classificationList"
-            :props="{
-              value: 'ClassifyId',
-              label: 'ClassifyName',
-              children: 'Child',
-              emitPath: false,
-              multiple:true
-            }"
-            collapse-tags
-            :show-all-levels="false"
-            :key="default_tab"
-            clearable
-            filterable
-            @change="changeUser"
-            :placeholder="this.$t('SystemManage.OperateAuth.placeholder03')" 
-            style="width: 250px;"
-          />
-          <el-cascader
-            v-model="searchForm.user"
-            :options="userList"
-            :props="{
-              value: 'AdminId',
-              label: 'RealName',
-              children: 'ChildrenList',
-              emitPath: false
-            }"
-            collapse-tags
-            :show-all-levels="false"
-            clearable
-            @change="changeUser"
-            filterable
-            :placeholder="this.$t('SystemManage.OperateAuth.placeholder04')" 
-            style="margin: 0 20px"
-          />
-        </div>
-        <div>
-          <el-button type="primary" @click="editAuthHandle({},'multiple')" 
-          v-if="[3,4].includes(default_tab)?authBtn('edit'):authTabs.length">{{$t('SystemManage.OperateAuth.btn_text01')}}</el-button>
-          <el-button type="primary" @click="edbAuthSetHandle({},'multiple')" v-if="[3,4].includes(default_tab
-        )&&authBtn('auth')">{{$t('SystemManage.OperateAuth.btn_text02')}}</el-button>
-        </div>
-    </div>
-     <el-table
-        :data="tableData"
-        ref="table"
-        element-loading-text="加载中..."
-        v-loading="tableLoading"
-        border
-        style="margin:30px 0"
-        @selection-change="selectionChange"
-      >
-        <el-table-column
-          type="selection"
-          width="55"
-        />
-        <el-table-column
-          v-for="item in tableColums"
-          :key="item.label"
-          :label="item.label"
-          :prop="item.key"
-          :width="item.widthsty"
-          :min-width="item.minwidthsty"
-          align="center"
-        >
-          <template slot-scope="{row}">
-            <template v-if="item.key==='handle'">
-              <span class="editsty" @click="edbAuthSetHandle(row)" v-if="[3,4].includes(default_tab
-        )&&authBtn('auth')">{{$t('SystemManage.OperateAuth.btn_text02')}}</span>
-              <span class="editsty" @click="editAuthHandle(row)" v-if="[3,4].includes(default_tab)?authBtn('edit'):authTabs.length">{{$t('Dialog.title_prefix_edit')}}</span>
-            </template>
-
-            <span v-else>{{ row[item.key] }}</span>
-          </template>
-        </el-table-column>
-        
-        <div slot="empty" style="padding: 100px 0">
-          <tableNoData :text="$t('Table.prompt_slogan')" size="mini"/>
-				</div>
-    </el-table>
-    <el-col :span="24" style="height:35px;text-align: right;float: none;">
-      <m-page
-        :page_no="page_no"
-        :pageSize="pageSize"
-        :total="total"
-        @handleCurrentChange="pageChange"
-      />
-    </el-col>
-
-     <!-- 编辑弹窗 -->
-    <m-dialog
-      :show.sync="isOpenDialog"
-      width="650px"
-      :title="dialogForm.title"
-      @close="isOpenDialog = false"
-    >
-      <div class="dialog-cont operateauth-dialog-cont">
-        <el-form
-          ref="formRef"
-          label-position="left"
-          hide-required-asterisk
-          label-width="80px"
-          :model="dialogForm"
-          :rules="dialogFormRules"
-          @close="cancelDialogHandle"
-        >
-          <el-form-item :label="$t('SystemManage.OperateAuth.original_creator')">
-            <span>{{ dialogForm.old_user_name }}</span>
-          </el-form-item>
-          <el-form-item :label="$t('SystemManage.OperateAuth.new_creator')" prop="new_user">
-            <el-cascader
-              v-model="dialogForm.new_user"
-              :options="userList"
-              :props="{
-                value: 'AdminId',
-                label: 'RealName',
-                children: 'ChildrenList',
-                emitPath: false
-              }"
-              collapse-tags
-              :show-all-levels="false"
-              clearable
-              filterable
-              :placeholder="$t('SystemManage.OperateAuth.placeholder04')" 
-              style="width: 250px"
-            />
-          </el-form-item>
-        </el-form>
-      </div>
-      <div class="dia-bot">
-        <el-button
-          type="primary"
-          style="margin-right: 60px"
-          @click="saveHandle"
-          >{{$t('Dialog.confirm_save_btn')}}</el-button
-        >
-        <el-button type="primary" plain @click="cancelDialogHandle"
-          >{{$t('Dialog.cancel_btn')}}</el-button
-        >
-      </div>
-    </m-dialog>
-
-    <!-- 指标权限弹窗 -->
-    <edbSetDialog
-      :isShow.sync="isEdbSetDialog"
-      :edbForm="edbForm"
-      :users="userList"
-      @setSuccess="()=>{$refs.table.clearSelection();selectedArr=[]}"
-    />
-  </div>
-</template>
-
-<script>
-import { operateAuthInterface } from '@/api/modules/setApi';
-// import { customInterence } from '@/api/modules/crmApi';
-import {dataBaseInterface} from '@/api/modules/chartApi'
-import mPage from '@/components/mPage';
-import mDialog from '@/components/mDialog';
-import edbSetDialog from './components/authSetDialog.vue';
-export default {
-  components: { mPage,mDialog,edbSetDialog },
-  computed: {
-    tableColums() {
-      return this.default_tab === 5 ? [
-        { label: this.$t('SystemManage.OperateAuth.table_col_name01'),key: 'Name' },
-        { label: this.$t('SystemManage.OperateAuth.table_col_name02'),key: 'ClassifyName' },
-        { label: this.$t('SystemManage.OperateAuth.table_col_name03'),key: 'CreateUserName' },
-        { label: this.$t('Table.column_operations'),key: 'handle' },
-      ] : [
-        { label: this.$t('SystemManage.OperateAuth.table_col_name04'),key: 'Code' },
-        { label: this.$t('SystemManage.OperateAuth.table_col_name05'),key: 'Name' },
-        { label: this.$t('SystemManage.OperateAuth.table_col_name03'),key: 'CreateUserName' },
-        { label: this.$t('Table.column_operations'),key: 'handle' },
-      ]
-    },
-    //权限配置化后的tabs
-    authTabs(){
-        const {operateAuthPermission,checkPermissionBtn} = this.permissionBtn
-        const operaMap = {
-            1:checkPermissionBtn(operateAuthPermission.operateAuth_manual),
-            2:checkPermissionBtn(operateAuthPermission.operateAuth_mysteel),
-            3:checkPermissionBtn(operateAuthPermission.operateAuth_etaLib),
-            4:checkPermissionBtn(operateAuthPermission.operateAuth_etaPredictLib),
-            5:checkPermissionBtn(operateAuthPermission.operateAuth_chartLib),
-        }
-        let temp = []
-        for(const k in operaMap){
-            console.log('k',k,operaMap[k])
-            if(operaMap[k]){
-                temp.push(this.tabs[k-1])
-            }
-        }
-        return temp
-    },
-    tabs(){
-      return [
-        { label: this.$t('SystemManage.OperateAuth.tab01'), key: 1 },
-        { label: this.$t('SystemManage.OperateAuth.tab02'), key: 2 },
-        { label: this.$t('SystemManage.OperateAuth.tab03'), key: 3 },
-        { label: this.$t('SystemManage.OperateAuth.tab04'), key: 4 },
-        { label: this.$t('SystemManage.OperateAuth.tab05'), key: 5 }
-      ]
-    }
-  },
-  data() {
-    return {
-      default_tab: 1,
-      // tabs:[
-      //   { label: '手工数据指标', key: 1 },
-      //   { label: '钢联化工数据库', key: 2 },
-      //   { label: 'ETA指标库', key: 3 },
-      //   { label: 'ETA预测指标', key: 4 },
-      //   { label: '图库', key: 5 }
-      // ],
-      selectedArr: [],//多选数组
-      tableLoading: false,
-      tableData:[],
-      page_no: 1,
-      total: 0,
-      pageSize: 10,
-
-      userList: [],
-      classificationList:[],
-      searchForm: {
-        classification:[],
-        user: '',
-        key_word: ''
-      },
-
-      isOpenDialog: false,
-      dialogForm: {
-        title: '',
-        old_user_name: '',
-        ids:'',
-        new_user: '',
-      },
-      dialogFormRules: {
-        new_user: [
-          { required: true, message: this.$t('SystemManage.OperateAuth.placeholder05'), trigger: 'change' }
-        ]
-      },
-
-      /* 指标权限设置 */
-      isEdbSetDialog: false,
-      edbForm: {}
-    }
-  },
-  methods: {
-
-    getTableData() {
-      this.tableLoading = true;
-      let params = {
-        Source: this.default_tab,
-        UserId: this.searchForm.user || '',
-        CurrentIndex: this.page_no,
-        PageSize: this.pageSize,
-        Keyword: this.searchForm.key_word,
-        Classify:this.searchForm.classification.join(',')
-      }
-			operateAuthInterface.list(params).then(res => {
-        this.tableLoading = false;
-        if( res.Ret!==200 )return
-
-        const { Data } = res;
-        Data.List && Data.List.forEach(_ => {
-          _.ModifyTime = _.ModifyTime ? this.$moment(_.ModifyTime).format('YYYY-MM-DD HH:mm:ss') : ''
-          _.PublishTime = _.PublishTime ? this.$moment(_.PublishTime).format('YYYY-MM-DD HH:mm:ss') : ''
-        })
-        this.tableData = Data.List || [];
-        this.total=parseInt(Data.Paging.Totals);
-			});
-    },
-    /* 获取用户列表 */
-    getUserList() {
-      // customInterence.getSale({Status: 0,AllEnabled: true}).then(res => {
-      dataBaseInterface.getEdbChartAdminList({Source: this.default_tab}).then(res=>{
-        if(res.Ret !== 200) return
-
-        this.userList = res.Data || [];
-      })
-    },
-    /* 获取分类列表 */
-    getClassificationList() {
-      operateAuthInterface.getClassificationBySource({Source: this.default_tab}).then(res => {
-        if(res.Ret == 200){
-          this.classificationList = res.Data.List || []
-          //如果是三级分类,去掉最后一级分类的child
-          if([3,4,5].includes(this.default_tab)){
-            this.filterNodes(this.classificationList)
-          }
-        }
-      })
-    },
-    filterNodes(arr) {
-        arr.length && arr.forEach(item => {
-            item.Child && item.Child.length && this.filterNodes(item.Child)
-            if(item.Child && !item.Child.length) {
-                delete item.Child
-            }
-        })
-    },
-    
-    changeTab({key}) {
-      this.default_tab = key;
-      this.searchForm.classification=[]
-      this.searchForm.user=''
-      this.page_no = 1;
-      this.getClassificationList()
-      this.getUserList()
-      this.getTableData();
-    },
-
-    pageChange(page) {
-      this.page_no = page;
-      this.getTableData()
-    },
-
-    changeUser() {
-      this.page_no = 1;
-      this.getTableData();
-    },
-
-    /* 复选框选择 */
-    selectionChange(val) {
-      console.log(val)
-      this.selectedArr = val || [];
-    },
-
-    /* 编辑 */
-    editAuthHandle({DataId,CreateUserName,},type='single') {
-      if(type === 'multiple' && !this.selectedArr.length) return this.$message.warning(this.$t('SystemManage.OperateAuth.msg01'))
-
-      this.dialogForm = {
-        title: type === 'multiple' ? this.$t('SystemManage.OperateAuth.edit_title02') : this.$t('SystemManage.OperateAuth.edit_title01'),
-        old_user_name: type === 'multiple' ? this.selectedArr[0].CreateUserName : CreateUserName,
-        ids: type === 'multiple' ? this.selectedArr.map(_ => _.DataId) : [DataId],
-        new_user: ''
-      }
-      this.isOpenDialog = true;
-    },
-
-    async saveHandle() {
-      await this.$refs.formRef.validate()
-
-      const res = await operateAuthInterface.authEdit({
-        Source: this.default_tab,
-        DataIdList: this.dialogForm.ids,
-        NewUserId: Number(this.dialogForm.new_user)
-      })
-
-      if(res.Ret !== 200) return
-      this.$message.success(res.Msg);
-      this.cancelDialogHandle();
-      this.getTableData();
-    },
-
-    /* 指标权限配置 */
-    edbAuthSetHandle({DataId,CreateUserId},type='') {
-      if(type === 'multiple' && !this.selectedArr.length) return this.$message.warning(this.$t('SystemManage.OperateAuth.msg01'))
-      if(type === 'multiple' && this.selectedArr.some(_ => this.selectedArr[0].CreateUserId!==_.CreateUserId)) return this.$message.warning('所选指标创建人不是同一用户,请重新选择!')
-
-      this.edbForm = {
-        title: type === 'multiple' ? this.$t('SystemManage.OperateAuth.permission_title02') : this.$t('SystemManage.OperateAuth.permission_title01'),
-        createId: type === 'multiple' ? this.selectedArr[0].CreateUserId : CreateUserId,
-        ids: type === 'multiple' ? this.selectedArr.map(_ => _.DataId) : [DataId],
-      }
-      this.isEdbSetDialog = true;
-      
-    },
-
-    cancelDialogHandle() {
-      this.$refs.formRef.resetFields();
-      this.isOpenDialog = false
-    },
-    authBtn(type){
-        const {operateAuthPermission,checkPermissionBtn} = this.permissionBtn
-        const authMap = {
-            3:operateAuthPermission.operateAuth_etaLib_authSetting,
-            4:operateAuthPermission.operateAuth_etaPredictLib_authSetting,
-        }
-        const editMap = {
-            3:operateAuthPermission.operateAuth_etaLib_edit,
-            4:operateAuthPermission.operateAuth_etaPredictLib_edit,
-        }
-        if(type==='auth'){
-            return checkPermissionBtn(authMap[this.default_tab])
-        }else{
-            return checkPermissionBtn(editMap[this.default_tab])
-        }
-    }
-  },
-  mounted() {
-    if(this.authTabs.length){
-        this.getUserList();
-    }
-  },
-  created(){
-    if(this.authTabs.length){
-        this.default_tab = this.authTabs[0].key
-        this.getClassificationList()
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-@import "~@/styles/theme-vars.scss";
-.container {
-  box-sizing: border-box;
-  min-height: calc(100vh - 120px);
-  padding: 20px 30px;
-  background: #fff;
-  position: relative;
-  border: 1px solid #ECECEC;
-  border-radius: 4px;
-  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
-  .top {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    flex-wrap: wrap;
-    margin-top: 15px;
-    .tab-ul,.right-side {
-      display: flex;
-      margin: 5px 0;
-      .tab-li {
-        margin-right: 20px;
-        min-width: 120px;
-        padding: 12px 0;
-        text-align: center;
-        color: $theme-color;
-        border: 1px solid $theme-color;
-        background: #e6eefb;
-        border-radius: 4px;
-        cursor: pointer;
-        &.act {
-          color: #fff;
-          border: 1px solid $theme-color;
-          background: $theme-color;
-        }
-      }
-    }
-  }
-
-}
-.dialog-cont {
-  padding-left: 110px;
-}
-.dia-bot {
-  display: flex;
-  justify-content: center;
-  margin-top: 50px;
-}
-</style>
-<style lang="scss">
-.operateauth-dialog-cont .el-input {
-  width: 100%;
-}
-</style>

File diff suppressed because it is too large
+ 0 - 0
vendor-manifest.json


Some files were not shown because too many files changed in this diff