Karsa 11 ماه پیش
والد
کامیت
ffd938ce79

+ 9 - 0
src/api/modules/setApi.js

@@ -623,6 +623,15 @@ const operateAuthInterface = {
 	 */
 	getSecretClassify: params => {
 		return http.get('/datamanage/edb_chart/classify/secret',params)
+	},
+
+	/**
+	 * 消息通知 所有未读
+	 * @param {*} params 
+	 * @returns 
+	 */
+	getAllUnread: params => {
+		return http.get('/message/unread/num')
 	}
 }
 

+ 22 - 4
src/components/notificationMsg.vue

@@ -38,7 +38,7 @@
                 <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                     <path d="M16.7344 15.4904L15.2941 12.9564V7.84847C15.2941 5.89142 13.8231 3.77337 11.6786 2.99732C11.5741 1.96012 10.8811 1.20374 9.97287 1.20374C9.06595 1.20374 8.37036 1.96014 8.26717 2.99732C6.12392 3.77337 4.65292 5.8914 4.65292 7.84847V12.9564L3.14258 15.6146C3.04183 15.7903 3.04429 16.0054 3.14504 16.1799C3.24581 16.3544 3.43263 16.4601 3.63415 16.4601H7.22871C7.49293 17.7357 8.62233 18.6967 9.97289 18.6967C11.3247 18.6967 12.4541 17.7357 12.7171 16.4601H16.3116C16.3215 16.4601 16.3288 16.4601 16.3374 16.4601C16.6508 16.4601 16.904 16.2082 16.904 15.8948C16.904 15.7362 16.8401 15.5925 16.7344 15.4904ZM9.97287 2.33803C10.1769 2.33803 10.3415 2.49286 10.4472 2.7239C10.2899 2.70792 10.1375 2.67106 9.97287 2.67106C9.8082 2.67106 9.65583 2.70792 9.49851 2.7239C9.60422 2.49284 9.76889 2.33803 9.97287 2.33803ZM9.97287 17.5636C9.25396 17.5636 8.65303 17.1016 8.41951 16.4601H11.5262C11.2927 17.1015 10.693 17.5636 9.97287 17.5636ZM4.60745 15.3282L5.71102 13.3853C5.76015 13.3017 5.78719 13.2034 5.78719 13.1051V7.84847C5.78719 5.93934 7.57648 3.80413 9.97287 3.80413C12.3692 3.80413 14.161 5.93934 14.161 7.84847V13.1051C14.161 13.2034 14.1868 13.3017 14.2347 13.3853L15.3395 15.3282H4.60745Z" fill="currentColor"/>
                 </svg>
-                <div class="unread" v-if="UnreadTotal">{{UnreadTotal>99?'99+':UnreadTotal}}</div>
+                <div class="unread" v-if="allUnreadTotal">{{allUnreadTotal>99?'99+':allUnreadTotal}}</div>
             </span>
         </el-popover>
         
@@ -129,6 +129,8 @@ export default {
             msgList:[],
             UnreadTotal:0,
 
+            allUnreadTotal: 0,
+
             //详情弹窗
             isOpenAuthDia: false,
             tableData: [],
@@ -204,13 +206,14 @@ export default {
             const {ApproveState,ReportApproveId,Id,DataPermissionMessageId} = msg
             
             const res = this.activeName === 'first' 
-                ? approveInterence.readApproveMsg({
+                ? await approveInterence.readApproveMsg({
                     MessageId:Id
                   })
-                : operateAuthInterface.redMessage({ MessageId: DataPermissionMessageId })
+                : await operateAuthInterface.redMessage({ MessageId: DataPermissionMessageId })
 
             if(res.Ret!==200) return 
             this.getMsgList()
+            this.getUnreadNum()
 
             if(this.activeName === 'first' ) {
                 const type = ApproveState===1?'approve':ApproveState===4?'detail':'myself'
@@ -229,13 +232,24 @@ export default {
                     CurrentIndex:1,
                     PageSize:1000
                 })
-                : await operateAuthInterface.getNoticeList()
+                : await operateAuthInterface.getNoticeList({
+                    CurrentIndex:1,
+                    PageSize:1000
+                })
 
             if(res.Ret!==200) return 
             this.msgList = res.Data.List||[]
             this.UnreadTotal = res.Data.UnreadTotal||0
         },
 
+        async getUnreadNum() {
+            const res = await operateAuthInterface.getAllUnread()
+
+            if(res.Ret !== 200) return
+            
+            this.allUnreadTotal = res.Data
+        },
+
         openAuthDetail(item) {
             this.detailInfo.MessageId = item.DataPermissionMessageId;
             this.detailInfo.isAuthSet = [3,4].includes(item.OpType);
@@ -281,6 +295,10 @@ export default {
                 this.getAuthMsgDetail();
             }
         },300),
+    },
+
+    mounted() {
+        this.getUnreadNum()
     }
 };
 </script>

+ 6 - 2
src/views/dataEntry_manage/databaseComponents/batchComputedV2.vue

@@ -292,7 +292,7 @@
                         height="500px"
                         v-loading="listLoading"
                     >
-                        <el-table-column type="selection" min-width="50" align="center"/>
+                        <el-table-column type="selection" min-width="50" align="center" :selectable="filterEdbAuth"/>
                         <el-table-column label="指标全称" show-overflow-tooltip align="center" prop="EdbName"/>
                         <el-table-column label="最新日期" align="center" prop="EndDate" width="120px" />
                         <el-table-column label="最新值" align="center" show-overflow-tooltip prop="EndValue" width="80px"/>
@@ -658,7 +658,7 @@ export default {
             const arr=res.Data.SearchItem||[]
             const temArr=this.mergeAndDistinct(this.selectList,arr)
             // 截取数组 防止数量溢出
-            this.selectList=temArr.slice(0,this.MAXAddNUM)
+            this.selectList=temArr.filter(_ =>_.HaveOperaAuth).slice(0,this.MAXAddNUM)
         },
         mergeAndDistinct(arr1, arr2) {
             // 合并两个数组
@@ -962,6 +962,10 @@ export default {
             },50)
         },
 
+        filterEdbAuth(row) {
+            return row.HaveOperaAuth
+        }
+
 
 
     },

+ 2 - 2
src/views/dataEntry_manage/databaseComponents/dataAssociateChart.vue

@@ -15,10 +15,10 @@
                 <div class="chart-list-item" v-for="chart in list" :key="chart.ChartInfoId">
                     <div class="chart-item-top text_oneLine"><span class="text_oneLine">{{ chart.ChartName }}</span></div>
                     <div class="chart-item-img" @click="detailShowHandle(chart)"
-                        :style="chart.ChartImage?{background: `no-repeat top/cover url('${chart.ChartImage}')`}:{}"></div>
+                        :style="{background: `no-repeat top/cover url('${!chart.HaveOperaAuth ? $icons.lock_big : chart.ChartImage}')`}"></div>
                     <div class="chart-item-bottom">
                         <span>{{$t('Chart.list_chart_time')}}: {{ chart.CreateTime.slice(0,10) }}</span>
-                        <span class="join_txt" @click="addMychartHandle(chart)">
+                        <span class="join_txt" @click="addMychartHandle(chart)" v-if="chart.HaveOperaAuth">
                             <img :src="$icons.chart_join_ico"
                                 style="width: 13px; height: 12px; vertical-align: middle"/>
                             <!-- 加入我的图库 -->

+ 11 - 1
src/views/dataEntry_manage/databaseComponents/replaceDialog.vue

@@ -80,9 +80,19 @@
 						:key="item.EdbInfoId"
 						:label="$parent.currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName"
 						:value="item.EdbInfoId"
+						:disabled="!item.HaveOperaAuth"
 					>
 						<edbDetailPopover :info="item">
-							<div slot="reference">{{$parent.currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName}}</div>
+							<div slot="reference">
+								<img 
+										:src="$icons.lock_ico2" 
+										width="18" 
+										height="18" 
+										style="vertical-align:middle" 
+										v-if="!item.HaveOperaAuth"
+									/>
+								{{$parent.currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName}}
+							</div>
 						</edbDetailPopover>
 					</el-option>
 				</el-select>

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

@@ -235,7 +235,7 @@
 								<span v-show="currentLang=='en'">{{ item.EdbNameEn || item.EdbName }}</span>
 							</div>
 							<div class="image" @click="detailShowHandle(item)"
-								:style="item.ChartImage?{background: `no-repeat top/cover url('${!item.HaveOperaAuth ? $icons.lock_big : item.ChartImage}')`}:{}">
+								:style="{background: `no-repeat top/cover url('${!item.HaveOperaAuth ? $icons.lock_big : item.ChartImage}')`}">
 							</div>
 							<div class="info">
 								{{$t('EtaBasePage.time_show')}}:{{item.CreateTime.substring(0,10)}}

+ 12 - 2
src/views/datasheet_manage/components/calculateEdbDia.vue

@@ -479,15 +479,25 @@ export default {
 
       if(res.Ret !== 200) return
 
-      const { EdbInfoId,EdbCode,EdbName,Frequency,Unit,StartDate,ModifyTime,SourceName,PredictDataList,DataList } = res.Data.Item;
+      const { EdbInfoId,EdbCode,EdbName,Frequency,Unit,StartDate,ModifyTime,SourceName,PredictDataList,DataList,HaveOperaAuth } = res.Data.Item;
       this.selectEdbInfo = {
-        EdbCode,EdbName,Frequency,Unit,StartDate,ModifyTime,SourceName,EdbInfoId,
+        EdbCode,
+        EdbName,
+        Frequency,
+        Unit,
+        StartDate,
+        ModifyTime,
+        SourceName,
+        EdbInfoId,
+        HaveOperaAuth,
         DataList: PredictDataList ? [...PredictDataList,...DataList].slice(0,5) : DataList.slice(0,5)
       };
     },
 
     /* 选择表格指标 */
     async selectTableEdbHandle(item) {
+      if(!item.HaveOperaAuth) return this.$message.warning(this.$t('MsgPrompt.no_edb_auth'))
+      
       const res = await dataBaseInterface.targetDetail({EdbInfoId:item.EdbInfoId})
       if(res.Ret !== 200) return
 

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

@@ -25,7 +25,7 @@
     <ul
       class="data-ul"
       ref="dataUl"
-      v-if="tableData[0]&&tableData[0].DataList.length"
+      v-if="tableData[0]&&tableData[0].DataList.length&&tableData[0].HaveOperaAuth"
     >
       <li
         class="value-item"

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

@@ -113,7 +113,7 @@
 							</span>
 							<span
 								style="display: flex; align-items: center"
-								v-if="select_node === data.UniqueCode"
+								v-if="select_node===data.UniqueCode&&data.HaveOperaAuth"
 							>
 								<img
 									src="~@/assets/img/data_m/move_ico.png"
@@ -304,7 +304,7 @@
 									<span class="text_oneLine">{{ currentLang === 'en' ? (item.EdbNameEn||item.EdbName) : item.EdbName }}</span>
 								</div>
 								<div class="chart-img" @click="detailShowHandle(item)"
-								:style="item.ChartImage?{background: `no-repeat top/cover url('${!item.HaveOperaAuth ? $icons.lock_big : item.ChartImage}')`}:{}"></div>
+								:style="{background: `no-repeat top/cover url('${!item.HaveOperaAuth ? $icons.lock_big : item.ChartImage}')`}"></div>
 								<div class="item-bottom">
 									<span>{{$t('Common.create_time')}}: {{ item.CreateTime.slice(0,10) }}</span>
 								</div>

+ 6 - 2
src/views/sandbox_manage/sandFlowNew/components/addLInkDia.vue

@@ -130,8 +130,12 @@
             </ul>
           </div>
           <div class="link-content-chartIndex" v-else-if="addLinkSearchParams.linkType==2 && this.chartInfo && this.chartInfo.ChartInfoId">
-            <div class="chart-name">{{ this.chartInfo.ChartName }}</div>
-            <Chart :options="options" :chartInfo="chartInfo" ref="chartRef" />
+            <template v-if="chartInfo.HaveOperaAuth">
+              <div class="chart-name">{{ this.chartInfo.ChartName }}</div>
+              <Chart :options="options" :chartInfo="chartInfo" ref="chartRef" />
+            </template>
+
+            <noDataAuth v-if="chartInfo.HaveOperaAuth===false" :text="$t('MsgPrompt.no_chart_auth')"/>
           </div>
           <div class="link-content-dataIndex" v-else-if="addLinkSearchParams.linkType==3 && this.reportList.length>0">
             <el-table :data="this.reportList" border style="margin-bottom: 10px;" ref="reportTable"

+ 16 - 3
src/views/system_manage/components/opearAuthSetDia.vue

@@ -122,6 +122,7 @@ export default {
   },
   data() {
     return {
+      loading: null,
       selectUserIds: [],
       selectUserList: [],
 
@@ -191,8 +192,8 @@ export default {
       })
       if(res.Ret !== 200) return
 
-      res.Data && this.$nextTick(() => {
-        this.$refs.clssifyTreeRef.setCheckedKeys(res.Data)
+      this.$nextTick(() => {
+        res.Data ? this.$refs.clssifyTreeRef.setCheckedKeys(res.Data) : this.$refs.clssifyTreeRef.setCheckedKeys([])
       })
     },
 
@@ -223,11 +224,19 @@ export default {
     },
 
     async saveHandle() {
-      if(!this.selectUserIds.length) return this.$message.warning(/* '请选择用户' */this.$t('SystemManage.OperateAuth.placeholder04'))
+      if(!this.selectUserIds.length&&this.form.type==='classify') return this.$message.warning(/* '请选择用户' */this.$t('SystemManage.OperateAuth.placeholder04'))
+
+      this.loading = this.$loading({
+          lock: true,
+          text: ``,
+          target: '.el-dialog__body',
+          background: 'rgba(255, 255, 255, 0.8)'
+      });
 
       this.form.type==='classify' 
         ? this.setClassifyAuthHandle()
         : this.setDataAuthHandle()
+        
     },
 
     //设置分类权限
@@ -244,6 +253,8 @@ export default {
 
       const res = await operateAuthInterface.setClassifyAuth(params)
 
+      this.loading.close()
+
       if(res.Ret !==200 ) return
       this.$message.success(/* '设置成功' */this.$t('SystemManage.OperateAuth.set_success'))
     },
@@ -256,6 +267,8 @@ export default {
       }
       const res = await operateAuthInterface.setDataAuth(params)
 
+      this.loading.close()
+
       if(res.Ret !==200 ) return
 
       this.$message.success(/* '设置成功' */this.$t('SystemManage.OperateAuth.set_success'))

+ 2 - 1
src/views/system_manage/dataOperaAuth.vue

@@ -466,7 +466,7 @@ export default {
         return
       }
 
-      const res = await operateAuthInterface.getUserStatistic({ UserId: this.searchForm.user })
+      const res = await operateAuthInterface.getUserStatistic({ UserId: this.searchForm.user,CountType: this.currAuthSet})
       
       if(res.Ret !== 200) return
       this.statisticCountMap = res.Data;
@@ -561,6 +561,7 @@ export default {
 
     changeSet() {
       this.changeTab({key: this.currAuthSet===1?1:3})
+      this.getUserDataCount()
     },
 
     //列表全选或全不选