Browse Source

Merge branch 'master' into fix_smartReport

jwyu 1 year ago
parent
commit
8ab09983e0

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

@@ -1209,9 +1209,23 @@ export default {
 					EdbInfoId: data.EdbInfoId
 				}).then(res => {
 					if(res.Ret === 200) {
-						this.setComputedDialogForm(data.Source,node,data,res.Data);
-						this.computed_type = [23,24].includes(data.Source) ? 'joint' : data.Source;
-						this.computed_type = [72,73].includes(data.Source)? 'alpha': data.Source;
+						this.setComputedDialogForm(data.Source,res.Data);
+						
+						switch (data.Source) {
+							case 23: 
+							case 24: 
+								this.computed_type = 'joint';
+								break
+							case 72:
+							case 73:
+								this.computed_type = 'alpha';
+								break
+							default:
+								this.computed_type = data.Source;
+								break
+						}
+						// this.computed_type = [23,24].includes(data.Source) ? 'joint' : data.Source;
+						// this.computed_type = [72,73].includes(data.Source)? 'alpha': data.Source;
 					}
 				})
 
@@ -1609,14 +1623,25 @@ export default {
 				EdbInfoId,
 			}).then(res => {
 				if(res.Ret !== 200) return
-				this.setComputedDialogForm(Source,node,data,res.Data,true);
-				this.computed_type = [23,24].includes(Source) ? 'joint' : Source;
-				this.computed_type = [72,73].includes(data.Source)? 'alpha': data.Source;
+				this.setComputedDialogForm(Source,res.Data,true);
+				switch (data.Source) {
+					case 23: 
+					case 24: 
+						this.computed_type = 'joint';
+						break
+					case 72:
+					case 73:
+						this.computed_type = 'alpha';
+						break
+					default:
+						this.computed_type = data.Source;
+						break
+				}
 			})
 		},
 
 		/* 设置回显计算指标的表单 */
-		setComputedDialogForm(type,node,data,res,view=false) {
+		setComputedDialogForm(type,res,view=false) {
 			//指标运算 or 其他计算类型指标
 
 			// 处理所在目录

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

@@ -30,7 +30,7 @@
                 >下载</span
               >
               <span
-                v-if="$parent.isSheetBtnShow('del')"
+                v-if="($parent.sheetDetailInfo.Button && $parent.sheetDetailInfo.Button.DeleteButton && $parent.isSheetBtnShow('del'))"
                 class="deletesty"
                 @click="$emit('delSheetHandle',{cell, type:'del-list'})"
                 >删除</span

+ 2 - 6
src/views/datasheet_manage/customAnalysis/list.vue

@@ -176,8 +176,7 @@
                 <li
                   class="editsty"
                   @click="goEdit"
-                  v-if="isCreator || 
-                  (sheetDetailInfo.Button && sheetDetailInfo.Button.OpButton&&isSheetBtnShow('edit'))"
+                  v-if="(sheetDetailInfo.Button && sheetDetailInfo.Button.OpButton&&isSheetBtnShow('edit'))"
                 >
                   <img src="~@/assets/img/icons/edit_blue_new.png" v-if="!editButtonText"/>
                   <span>{{ editButtonText?editButtonText:'编辑' }}</span> 
@@ -197,7 +196,7 @@
                 </li>
                 <li
                   class="deletesty"
-                  v-if="isCreator || (isSheetBtnShow('del')&&sheetDetailInfo.Button&&sheetDetailInfo.Button.DeleteButton)"
+                  v-if="(isSheetBtnShow('del')&&sheetDetailInfo.Button&&sheetDetailInfo.Button.DeleteButton)"
                   @click="delSheetHandle({cell:sheetDetailInfo, type:'del'})"
                 >
                   <img src="~@/assets/img/icons/delete-red.png"/>
@@ -325,9 +324,6 @@ export default {
       }));
 
       return options;
-    },
-    isCreator(){
-      return this.adminId==this.excelAdminId
     }
   },
   data() {

+ 1 - 23
src/views/datasheet_manage/mixins/classifyMixin.js

@@ -290,29 +290,7 @@ export default {
 
       return canDrop;
     },
-
-    //判断右侧列表的下载按钮是否显示
-    isDownLoadShow(cell){
-        const {checkPermissionBtn,etaTablePermission} = this.permissionBtn
-        const checkMap = {
-            1:etaTablePermission.etaTable_excel_download,
-            2:etaTablePermission.etaTable_customize_data_download,
-            3:etaTablePermission.etaTable_customize_mix_download,
-            4:etaTablePermission.etaTable_analysis_download
-        }
-        return checkPermissionBtn(checkMap[cell.Source])
-    },
-    //判断右侧列表的删除按钮是否显示
-    isDeleteShow(cell){
-        const {checkPermissionBtn,etaTablePermission} = this.permissionBtn
-        const checkMap = {
-            1:etaTablePermission.etaTable_excel_del,
-            2:etaTablePermission.etaTable_customize_data_del,
-            3:etaTablePermission.etaTable_customize_mix_del,
-            4:etaTablePermission.etaTable_analysis_del,
-        }
-        return checkPermissionBtn(checkMap[cell.Source])
-    },
+    
     //判断自定义表格-编辑,另存为,刷新按钮是否显示
     isSheetBtnShow(type){
       const sheetType = {

+ 5 - 24
src/views/datasheet_manage/sheetList.vue

@@ -163,8 +163,7 @@
                 <li
                   class="editsty"
                   @click="goEditHandle"
-                  v-if="isCreator || 
-                  (sheetDetailInfo.Button && sheetDetailInfo.Button.OpButton&&isSheetBtnShow('edit'))"
+                  v-if="(sheetDetailInfo.Button && sheetDetailInfo.Button.OpButton&&isSheetBtnShow('edit'))"
                 >
                   <img src="~@/assets/img/icons/edit_blue_new.png" v-if="!editButtonText"/>
                   <span>{{ editButtonText?editButtonText:'编辑' }}</span> 
@@ -187,16 +186,15 @@
                     <span>另存为</span>
                   </li>
                 </template>
-                <li v-if="isDownLoadShow(sheetDetailInfo)"
+                <li v-if="isSheetBtnShow('download')"
                   class="editsty" @click="downloadExcel(sheetDetailInfo)">
                   <img src="~@/assets/img/icons/download_blue.png"/>
                   <span>下载</span>
                 </li>
                 <li
                   class="deletesty"
-                  v-if="
-                    isCreator || (sheetDetailInfo.Button && sheetDetailInfo.Button.DeleteButton
-                    &&isDeleteShow(sheetDetailInfo))
+                  v-if="(sheetDetailInfo.Button && sheetDetailInfo.Button.DeleteButton
+                    &&isSheetBtnShow('del'))
                   "
                   @click="delSheetHandle({cell:sheetDetailInfo, type:'del'})"
                 >
@@ -343,23 +341,6 @@ export default {
         ExcelClassifyName: _.ExcelClassifyName,
       }));
       return options;
-    },
-
-     //数据表格是否展示
-    isShowDataSheet(){
-        const cell = {Source:2}
-        return this.isSheetBtnShow(cell,'edit')||this.isSheetBtnShow(cell,'refresh')||this.isSheetBtnShow(cell,'otherSave')
-            || this.isSheetBtnShow(cell,'download')||this.isSheetBtnShow(cell,'del')
-    },
-    //混合表格是否展示
-    isShowMixSheet(){
-        const cell = {Source:3}
-        return this.isSheetBtnShow(cell,'edit')||this.isSheetBtnShow(cell,'refresh')||this.isSheetBtnShow(cell,'otherSave')
-            || this.isSheetBtnShow(cell,'download')||this.isSheetBtnShow(cell,'del')
-    },
-
-    isCreator(){
-      return this.adminId==this.excelAdminId
     }
   },
   data() {
@@ -752,7 +733,7 @@ export default {
           this.saveTime = this.$moment(this.sheetDetailInfo.ModifyTime).format('YYYY-MM-DD HH:mm:ss')||''
           this.excelAdminId = this.sheetDetailInfo.SysUserId
           this.editButtonText = this.sheetDetailInfo.CanEdit?'':`${this.sheetDetailInfo.Editor}编辑中`
-          //从nextTick里面拉出来 更多功能按钮 显示的出来
+          //从nextTick里面拉出来 更多功能按钮 显示的出来 但是删除表格,请求下一个表格详情时,表格内容不会更新。
           // this.sheetDetailInfo.Source === 1 && this.$refs.sheetRef && this.$refs.sheetRef.init();
 
           this.$nextTick(() => {

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

@@ -1093,8 +1093,23 @@ export default {
 				} else {
 					//计算指标
 					this.setComputedDialogForm(res.Data,type);
-					this.computed_type =[47,48].includes(Source)?'joint': Source;
-					this.computed_type = [72,73].includes(Source)? 'alpha': Source;
+
+					switch (Source) {
+						case 47: 
+						case 48: 
+							this.computed_type = 'joint';
+							break
+						case 72:
+						case 73:
+							this.computed_type = 'alpha';
+							break
+						default:
+							this.computed_type = Source;
+							break
+					}
+					
+					// this.computed_type =[47,48].includes(Source)?'joint': Source;
+					// this.computed_type = [72,73].includes(Source)? 'alpha': Source;
 				}
 
 			})