bug 修改
新增错误消息弹窗显示
This commit is contained in:
		
							parent
							
								
									6cf0883b0a
								
							
						
					
					
						commit
						fa04054986
					
				|  | @ -3,10 +3,10 @@ | ||||||
|     <header-notice class="action" /> |     <header-notice class="action" /> | ||||||
|     <a-dropdown> |     <a-dropdown> | ||||||
|       <span class="action action-full ant-dropdown-link user-dropdown-menu"> |       <span class="action action-full ant-dropdown-link user-dropdown-menu"> | ||||||
|         <img src="@/assets/images/header/avatar.png" alt=""> |         <img src="@/assets/images/header/avatar.png" alt="" /> | ||||||
|       </span> |       </span> | ||||||
|       <a-menu slot="overlay" class="user-dropdown-menu-wrapper"> |       <a-menu slot="overlay" class="user-dropdown-menu-wrapper"> | ||||||
|         <a-menu-item key="0"> |         <!-- <a-menu-item key="0"> | ||||||
|           <router-link :to="{ name: 'account-center' }"> |           <router-link :to="{ name: 'account-center' }"> | ||||||
|             <a-icon type="user"/> |             <a-icon type="user"/> | ||||||
|             <span>个人中心</span> |             <span>个人中心</span> | ||||||
|  | @ -21,24 +21,24 @@ | ||||||
|         <a-menu-item key="3"  @click="systemSetting"> |         <a-menu-item key="3"  @click="systemSetting"> | ||||||
|            <a-icon type="tool"/> |            <a-icon type="tool"/> | ||||||
|            <span>系统设置</span> |            <span>系统设置</span> | ||||||
|         </a-menu-item> |         </a-menu-item> --> | ||||||
|         <a-menu-item key="4" @click="updatePassword"> |         <a-menu-item key="4" @click="updatePassword"> | ||||||
|           <a-icon type="setting" /> |           <a-icon type="setting" /> | ||||||
|           <span>密码修改</span> |           <span>Change Password</span> | ||||||
|         </a-menu-item> |         </a-menu-item> | ||||||
|         <a-menu-item key="5" @click="updateCurrentDepart"> |         <!-- <a-menu-item key="5" @click="updateCurrentDepart"> | ||||||
|           <a-icon type="cluster"/> |           <a-icon type="cluster"/> | ||||||
|           <span>切换部门</span> |           <span>切换部门</span> | ||||||
|         </a-menu-item> |         </a-menu-item> | ||||||
|         <a-menu-item key="6" @click="clearCache"> |         <a-menu-item key="6" @click="clearCache"> | ||||||
|           <a-icon type="sync"/> |           <a-icon type="sync"/> | ||||||
|           <span>清理缓存</span> |           <span>清理缓存</span> | ||||||
|         </a-menu-item> |         </a-menu-item> --> | ||||||
|       </a-menu> |       </a-menu> | ||||||
|     </a-dropdown> |     </a-dropdown> | ||||||
|     <span class="action"> |     <span class="action"> | ||||||
|       <a class="logout_title" href="javascript:;" @click="handleLogout"> |       <a class="logout_title" href="javascript:;" @click="handleLogout"> | ||||||
|         <img src="@/assets/images/header/close.png" alt=""> |         <img src="@/assets/images/header/close.png" alt="" /> | ||||||
|       </a> |       </a> | ||||||
|     </span> |     </span> | ||||||
|     <user-password ref="userPassword"></user-password> |     <user-password ref="userPassword"></user-password> | ||||||
|  | @ -50,16 +50,16 @@ | ||||||
| <script> | <script> | ||||||
| import HeaderNotice from './HeaderNotice' | import HeaderNotice from './HeaderNotice' | ||||||
| import UserPassword from './UserPassword' | import UserPassword from './UserPassword' | ||||||
|   import SettingDrawer from "@/components/setting/SettingDrawer"; | import SettingDrawer from '@/components/setting/SettingDrawer' | ||||||
| import DepartSelect from './DepartSelect' | import DepartSelect from './DepartSelect' | ||||||
| import { mapActions, mapGetters, mapState } from 'vuex' | import { mapActions, mapGetters, mapState } from 'vuex' | ||||||
| import { mixinDevice } from '@/utils/mixin.js' | import { mixinDevice } from '@/utils/mixin.js' | ||||||
|   import { getFileAccessHttpUrl,getAction } from "@/api/manage" | import { getFileAccessHttpUrl, getAction } from '@/api/manage' | ||||||
| import Vue from 'vue' | import Vue from 'vue' | ||||||
|   import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types" | import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types' | ||||||
| 
 | 
 | ||||||
| export default { | export default { | ||||||
|     name: "UserMenu", |   name: 'UserMenu', | ||||||
|   mixins: [mixinDevice], |   mixins: [mixinDevice], | ||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
|  | @ -74,14 +74,14 @@ | ||||||
|     HeaderNotice, |     HeaderNotice, | ||||||
|     UserPassword, |     UserPassword, | ||||||
|     DepartSelect, |     DepartSelect, | ||||||
|       SettingDrawer |     SettingDrawer, | ||||||
|   }, |   }, | ||||||
|   props: { |   props: { | ||||||
|     theme: { |     theme: { | ||||||
|       type: String, |       type: String, | ||||||
|       required: false, |       required: false, | ||||||
|         default: 'dark' |       default: 'dark', | ||||||
|       } |     }, | ||||||
|   }, |   }, | ||||||
|   /* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ |   /* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ | ||||||
|   created() { |   created() { | ||||||
|  | @ -101,9 +101,8 @@ | ||||||
|   computed: { |   computed: { | ||||||
|     ...mapState({ |     ...mapState({ | ||||||
|       // 后台菜单 |       // 后台菜单 | ||||||
|         permissionMenuList: state => state.user.permissionList |       permissionMenuList: (state) => state.user.permissionList, | ||||||
| 
 |     }), | ||||||
|       }) |  | ||||||
|   }, |   }, | ||||||
|   /* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ |   /* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ | ||||||
|   watch: { |   watch: { | ||||||
|  | @ -126,8 +125,8 @@ | ||||||
|       this.shows = false |       this.shows = false | ||||||
|     }, |     }, | ||||||
|     /* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ |     /* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ | ||||||
|       ...mapActions(["Logout"]), |     ...mapActions(['Logout']), | ||||||
|       ...mapGetters(["nickname", "avatar","userInfo"]), |     ...mapGetters(['nickname', 'avatar', 'userInfo']), | ||||||
|     getAvatar() { |     getAvatar() { | ||||||
|       return getFileAccessHttpUrl(this.avatar()) |       return getFileAccessHttpUrl(this.avatar()) | ||||||
|     }, |     }, | ||||||
|  | @ -139,25 +138,27 @@ | ||||||
|         content: 'Ensure Log Out?', |         content: 'Ensure Log Out?', | ||||||
|         cancelButtonProps: { |         cancelButtonProps: { | ||||||
|           props: { |           props: { | ||||||
|               type: 'warn' |             type: 'warn', | ||||||
|             } |           }, | ||||||
|         }, |         }, | ||||||
|         onOk() { |         onOk() { | ||||||
|             return that.Logout({}).then(() => { |           return that | ||||||
|  |             .Logout({}) | ||||||
|  |             .then(() => { | ||||||
|               // update-begin author:scott date:20211223 for:【JTC-198】退出登录体验不好 |               // update-begin author:scott date:20211223 for:【JTC-198】退出登录体验不好 | ||||||
|               //that.$router.push({ path: '/user/login' }); |               //that.$router.push({ path: '/user/login' }); | ||||||
|               window.location.reload() |               window.location.reload() | ||||||
|               // update-end author:scott date:20211223 for:【JTC-198】退出登录体验不好 |               // update-end author:scott date:20211223 for:【JTC-198】退出登录体验不好 | ||||||
|             }).catch(err => { |             }) | ||||||
|  |             .catch((err) => { | ||||||
|               that.$message.error({ |               that.$message.error({ | ||||||
|                 title: 'Error', |                 title: 'Error', | ||||||
|                 description: err.message |                 description: err.message, | ||||||
|               }) |               }) | ||||||
|             }) |             }) | ||||||
|         }, |         }, | ||||||
|           onCancel() { |         onCancel() {}, | ||||||
|           }, |       }) | ||||||
|         }); |  | ||||||
|     }, |     }, | ||||||
|     updatePassword() { |     updatePassword() { | ||||||
|       let username = this.userInfo().username |       let username = this.userInfo().username | ||||||
|  | @ -172,7 +173,7 @@ | ||||||
|     /* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ |     /* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ | ||||||
|     searchMenus(arr, menus) { |     searchMenus(arr, menus) { | ||||||
|       for (let i of menus) { |       for (let i of menus) { | ||||||
|           if(!i.hidden && "layouts/RouteView"!==i.component){ |         if (!i.hidden && 'layouts/RouteView' !== i.component) { | ||||||
|           arr.push(i) |           arr.push(i) | ||||||
|         } |         } | ||||||
|         if (i.children && i.children.length > 0) { |         if (i.children && i.children.length > 0) { | ||||||
|  | @ -185,7 +186,7 @@ | ||||||
|     }, |     }, | ||||||
|     // update_begin author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题 |     // update_begin author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题 | ||||||
|     searchMethods(value) { |     searchMethods(value) { | ||||||
|         let route = this.searchMenuOptions.filter(item => item.id === value)[0] |       let route = this.searchMenuOptions.filter((item) => item.id === value)[0] | ||||||
|       //update-begin-author:sunjianlei date:20220111 for: 【JTC-702】【菜单搜索】菜单搜索里点击跳转的菜单,无法将Token信息传递过去 |       //update-begin-author:sunjianlei date:20220111 for: 【JTC-702】【菜单搜索】菜单搜索里点击跳转的菜单,无法将Token信息传递过去 | ||||||
|       if (route.component.includes('layouts/IframePageView')) { |       if (route.component.includes('layouts/IframePageView')) { | ||||||
|         this.$router.push(route) |         this.$router.push(route) | ||||||
|  | @ -199,24 +200,26 @@ | ||||||
|     /*update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ |     /*update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ | ||||||
|     /*update_begin author:liushaoqian date:20200507 for: 刷新缓存*/ |     /*update_begin author:liushaoqian date:20200507 for: 刷新缓存*/ | ||||||
|     clearCache() { |     clearCache() { | ||||||
|         getAction("sys/dict/refleshCache").then((res) => { |       getAction('sys/dict/refleshCache') | ||||||
|  |         .then((res) => { | ||||||
|           if (res.success) { |           if (res.success) { | ||||||
|             //重新加载缓存 |             //重新加载缓存 | ||||||
|             getAction("sys/dict/queryAllDictItems").then((res) => { |             getAction('sys/dict/queryAllDictItems').then((res) => { | ||||||
|               if (res.success) { |               if (res.success) { | ||||||
|                 Vue.ls.remove(UI_CACHE_DB_DICT_DATA) |                 Vue.ls.remove(UI_CACHE_DB_DICT_DATA) | ||||||
|                 Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000) |                 Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000) | ||||||
|               } |               } | ||||||
|             }) |             }) | ||||||
|             this.$message.success("刷新缓存完成!"); |             this.$message.success('刷新缓存完成!') | ||||||
|           } |           } | ||||||
|         }).catch(e=>{ |  | ||||||
|           this.$message.warn("刷新缓存失败!"); |  | ||||||
|           console.log("刷新失败",e) |  | ||||||
|         }) |         }) | ||||||
|       } |         .catch((e) => { | ||||||
|  |           this.$message.warn('刷新缓存失败!') | ||||||
|  |           console.log('刷新失败', e) | ||||||
|  |         }) | ||||||
|  |     }, | ||||||
|     /*update_end author:liushaoqian date:20200507 for: 刷新缓存*/ |     /*update_end author:liushaoqian date:20200507 for: 刷新缓存*/ | ||||||
|     } |   }, | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
|  | @ -231,7 +234,8 @@ | ||||||
|     background-color: inherit; |     background-color: inherit; | ||||||
|     border: 0; |     border: 0; | ||||||
|     border-bottom: 1px solid white; |     border-bottom: 1px solid white; | ||||||
|       &__placeholder, &__field__placeholder { |     &__placeholder, | ||||||
|  |     &__field__placeholder { | ||||||
|       color: inherit; |       color: inherit; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | @ -75,8 +75,16 @@ export default { | ||||||
|   mounted() { |   mounted() { | ||||||
|     this.getDbList() |     this.getDbList() | ||||||
|   }, |   }, | ||||||
|   activated() { |   watch: { | ||||||
|  |     $route: { | ||||||
|  |       handler: function (val, oldVal) { | ||||||
|  |         if (val.query && val.query.id) { | ||||||
|           this.getDbList() |           this.getDbList() | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       deep: true, | ||||||
|  |       immediate: true, | ||||||
|  |     }, | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     getBeforeHours(num) { |     getBeforeHours(num) { | ||||||
|  |  | ||||||
|  | @ -239,10 +239,19 @@ export default { | ||||||
|   mounted() { |   mounted() { | ||||||
|     this.getEmailList() |     this.getEmailList() | ||||||
|   }, |   }, | ||||||
|   activated() { |   // activated() { | ||||||
|     this.getEmailList() |   //   this.getEmailList() | ||||||
|   }, |   // }, | ||||||
|   watch: { |   watch: { | ||||||
|  |     $route: { | ||||||
|  |       handler: function (val, oldVal) { | ||||||
|  |         if (val.query && val.query.emailId) { | ||||||
|  |           this.getEmailList() | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       deep: true, | ||||||
|  |       immediate: true, | ||||||
|  |     }, | ||||||
|     emailId(newValue, oldValue) { |     emailId(newValue, oldValue) { | ||||||
|       this.currId = newValue |       this.currId = newValue | ||||||
|       this.getEmailStatus() |       this.getEmailStatus() | ||||||
|  |  | ||||||
|  | @ -237,8 +237,16 @@ export default { | ||||||
|   mounted() { |   mounted() { | ||||||
|     this.getServerList() |     this.getServerList() | ||||||
|   }, |   }, | ||||||
|   activated() { |   watch: { | ||||||
|  |     $route: { | ||||||
|  |       handler: function (val, oldVal) { | ||||||
|  |         if (val.query && val.query.serverId) { | ||||||
|           this.getServerList() |           this.getServerList() | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       deep: true, | ||||||
|  |       immediate: true, | ||||||
|  |     }, | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     handleRefresh() { |     handleRefresh() { | ||||||
|  |  | ||||||
|  | @ -280,6 +280,7 @@ | ||||||
|           <BoxTitle title="Alarm information"></BoxTitle> |           <BoxTitle title="Alarm information"></BoxTitle> | ||||||
|           <div |           <div | ||||||
|             class="alarm-info-list" |             class="alarm-info-list" | ||||||
|  |             style="margin-bottom: 15px" | ||||||
|             v-infinite-scroll="handleInfiniteAlarmInfo" |             v-infinite-scroll="handleInfiniteAlarmInfo" | ||||||
|             :infinite-scroll-disabled="busy_alarm_info" |             :infinite-scroll-disabled="busy_alarm_info" | ||||||
|             :infinite-scroll-distance="10" |             :infinite-scroll-distance="10" | ||||||
|  | @ -451,84 +452,58 @@ export default { | ||||||
|       }, |       }, | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|  |   watch: { | ||||||
|  |     $route: { | ||||||
|  |       handler: function (val, oldVal) { | ||||||
|  |         if (val.query && val.query.serverId) { | ||||||
|  |           this.getData() | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       deep: true, | ||||||
|  |       immediate: true, | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|   mounted() { |   mounted() { | ||||||
|     this.getSysServer((res) => { |     this.getData() | ||||||
|       this.loading = false |  | ||||||
|       if (res.success) { |  | ||||||
|         this.ipagination.total = res.result.total |  | ||||||
|         this.dataSource = res.result.records |  | ||||||
|         if (this.$route.query.serverId) { |  | ||||||
|           this.serverId = this.$route.query.serverId |  | ||||||
|           this.currIndex = this.dataSource.findIndex((item) => item.sourceId === this.serverId) |  | ||||||
|           this.currHostId = this.dataSource.find((item) => item.sourceId === this.serverId).hostId |  | ||||||
|           this.currSourceId = this.dataSource.find((item) => item.sourceId === this.serverId).sourceId |  | ||||||
|           this.currItemId = this.dataSource.find((item) => item.sourceId === this.serverId).cpuUsedItemId |  | ||||||
|         } else { |  | ||||||
|           this.currHostId = this.dataSource[0].hostId |  | ||||||
|           this.currSourceId = this.dataSource[0].sourceId |  | ||||||
|           this.currItemId = this.dataSource[0].cpuUsedItemId |  | ||||||
|           this.currIndex = 0 |  | ||||||
|         } |  | ||||||
|         this.getBasiclnfo(this.currHostId) |  | ||||||
|         this.getCpuUtilizationData() |  | ||||||
|         this.getTimeLineData() |  | ||||||
|         // this.EchartsTimeline() |  | ||||||
|         this.getDetailsAlarmInfo((res) => { |  | ||||||
|           this.loading_alarm_info = false |  | ||||||
|           if (res.success) { |  | ||||||
|             this.ipagination_alarm_info.total = res.result.total |  | ||||||
|             this.dataSource_alarm_info = res.result.records |  | ||||||
|           } else { |  | ||||||
|             this.$message.warning('This operation fails. Contact your system administrator') |  | ||||||
|           } |  | ||||||
|         }) |  | ||||||
|       } else { |  | ||||||
|         this.$message.warning('This operation fails. Contact your system administrator') |  | ||||||
|       } |  | ||||||
|     }) |  | ||||||
|     // this.$nextTick(() => { |  | ||||||
|     //   setTimeout(() => { |  | ||||||
|     //     this.drawGuageLoads() |  | ||||||
|     //   }, 0) |  | ||||||
|     // }) |  | ||||||
|   }, |  | ||||||
|   activated() { |  | ||||||
|     this.getSysServer((res) => { |  | ||||||
|       this.loading = false |  | ||||||
|       if (res.success) { |  | ||||||
|         this.ipagination.total = res.result.total |  | ||||||
|         this.dataSource = res.result.records |  | ||||||
|         if (this.$route.query.serverId) { |  | ||||||
|           this.serverId = this.$route.query.serverId |  | ||||||
|           this.currIndex = this.dataSource.findIndex((item) => item.sourceId === this.serverId) |  | ||||||
|           this.currHostId = this.dataSource.find((item) => item.sourceId === this.serverId).hostId |  | ||||||
|           this.currSourceId = this.dataSource.find((item) => item.sourceId === this.serverId).sourceId |  | ||||||
|           this.currItemId = this.dataSource.find((item) => item.sourceId === this.serverId).cpuUsedItemId |  | ||||||
|         } else { |  | ||||||
|           this.currHostId = this.dataSource[0].hostId |  | ||||||
|           this.currSourceId = this.dataSource[0].sourceId |  | ||||||
|           this.currItemId = this.dataSource[0].cpuUsedItemId |  | ||||||
|           this.currIndex = 0 |  | ||||||
|         } |  | ||||||
|         this.getBasiclnfo(this.currHostId) |  | ||||||
|         this.getCpuUtilizationData() |  | ||||||
|         this.getTimeLineData() |  | ||||||
|         // this.EchartsTimeline() |  | ||||||
|         this.getDetailsAlarmInfo((res) => { |  | ||||||
|           this.loading_alarm_info = false |  | ||||||
|           if (res.success) { |  | ||||||
|             this.ipagination_alarm_info.total = res.result.total |  | ||||||
|             this.dataSource_alarm_info = res.result.records |  | ||||||
|           } else { |  | ||||||
|             this.$message.warning('This operation fails. Contact your system administrator') |  | ||||||
|           } |  | ||||||
|         }) |  | ||||||
|       } else { |  | ||||||
|         this.$message.warning('This operation fails. Contact your system administrator') |  | ||||||
|       } |  | ||||||
|     }) |  | ||||||
|   }, |   }, | ||||||
|  |   // activated() {}, | ||||||
|   methods: { |   methods: { | ||||||
|  |     getData() { | ||||||
|  |       this.getSysServer((res) => { | ||||||
|  |         this.loading = false | ||||||
|  |         if (res.success) { | ||||||
|  |           this.ipagination.total = res.result.total | ||||||
|  |           this.dataSource = res.result.records | ||||||
|  |           if (this.$route.query.serverId) { | ||||||
|  |             this.serverId = this.$route.query.serverId | ||||||
|  |             this.currIndex = this.dataSource.findIndex((item) => item.sourceId === this.serverId) | ||||||
|  |             this.currHostId = this.dataSource.find((item) => item.sourceId === this.serverId).hostId | ||||||
|  |             this.currSourceId = this.dataSource.find((item) => item.sourceId === this.serverId).sourceId | ||||||
|  |             this.currItemId = this.dataSource.find((item) => item.sourceId === this.serverId).cpuUsedItemId | ||||||
|  |           } else { | ||||||
|  |             this.currHostId = this.dataSource[0].hostId | ||||||
|  |             this.currSourceId = this.dataSource[0].sourceId | ||||||
|  |             this.currItemId = this.dataSource[0].cpuUsedItemId | ||||||
|  |             this.currIndex = 0 | ||||||
|  |           } | ||||||
|  |           this.getBasiclnfo(this.currHostId) | ||||||
|  |           this.getCpuUtilizationData() | ||||||
|  |           this.getTimeLineData() | ||||||
|  |           // this.EchartsTimeline() | ||||||
|  |           this.getDetailsAlarmInfo((res) => { | ||||||
|  |             this.loading_alarm_info = false | ||||||
|  |             if (res.success) { | ||||||
|  |               this.ipagination_alarm_info.total = res.result.total | ||||||
|  |               this.dataSource_alarm_info = res.result.records | ||||||
|  |             } else { | ||||||
|  |               this.$message.warning('This operation fails. Contact your system administrator') | ||||||
|  |             } | ||||||
|  |           }) | ||||||
|  |         } else { | ||||||
|  |           this.$message.warning('This operation fails. Contact your system administrator') | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|     moment, |     moment, | ||||||
|     // Basic lnformation |     // Basic lnformation | ||||||
|     getBasiclnfo(sourceId) { |     getBasiclnfo(sourceId) { | ||||||
|  |  | ||||||
|  | @ -166,8 +166,16 @@ export default { | ||||||
|   mounted() { |   mounted() { | ||||||
|     this.getServerList() |     this.getServerList() | ||||||
|   }, |   }, | ||||||
|   activated() { |   watch: { | ||||||
|  |     $route: { | ||||||
|  |       handler: function (val, oldVal) { | ||||||
|  |         if (val.query && val.query.serverId) { | ||||||
|           this.getServerList() |           this.getServerList() | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       deep: true, | ||||||
|  |       immediate: true, | ||||||
|  |     }, | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     handleRefresh() { |     handleRefresh() { | ||||||
|  |  | ||||||
|  | @ -286,8 +286,16 @@ export default { | ||||||
|       setTimeout(() => {}, 0) |       setTimeout(() => {}, 0) | ||||||
|     }) |     }) | ||||||
|   }, |   }, | ||||||
|   activated() { |   watch: { | ||||||
|  |     $route: { | ||||||
|  |       handler: function (val, oldVal) { | ||||||
|  |         if (val.query && val.query.serverId) { | ||||||
|           this.getServerList() |           this.getServerList() | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       deep: true, | ||||||
|  |       immediate: true, | ||||||
|  |     }, | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     handleRefresh() { |     handleRefresh() { | ||||||
|  |  | ||||||
|  | @ -28,6 +28,10 @@ | ||||||
|         {{ index + 1 }} |         {{ index + 1 }} | ||||||
|       </template> |       </template> | ||||||
|     </custom-table> |     </custom-table> | ||||||
|  |     <!-- 日志列表结束 --> | ||||||
|  |     <custom-modal title="List Of File Deletion Failures" :width="950" v-model="visibleInfo" :footer="null"> | ||||||
|  |       <a-table :columns="columnsModal" :data-source="dataInfo" :pagination="false"> </a-table> | ||||||
|  |     </custom-modal> | ||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
|  | @ -163,11 +167,24 @@ const columns = [ | ||||||
|     dataIndex: 'status', |     dataIndex: 'status', | ||||||
|   }, |   }, | ||||||
| ] | ] | ||||||
|  | const columnsModal = [ | ||||||
|  |   { | ||||||
|  |     title: 'Index', | ||||||
|  |     dataIndex: 'rowCount', | ||||||
|  |     align: 'center', | ||||||
|  |   }, | ||||||
|  |   { | ||||||
|  |     title: 'Information', | ||||||
|  |     dataIndex: 'info', | ||||||
|  |     align: 'left', | ||||||
|  |   }, | ||||||
|  | ] | ||||||
| 
 | 
 | ||||||
| export default { | export default { | ||||||
|   mixins: [JeecgListMixin], |   mixins: [JeecgListMixin], | ||||||
|   data() { |   data() { | ||||||
|     this.columns = columns |     this.columns = columns | ||||||
|  |     this.columnsModal = columnsModal | ||||||
|     return { |     return { | ||||||
|       queryParam: { |       queryParam: { | ||||||
|         collectStart: this.getBeforeDate(6), |         collectStart: this.getBeforeDate(6), | ||||||
|  | @ -183,6 +200,8 @@ export default { | ||||||
|       }, |       }, | ||||||
|       stationList: [], |       stationList: [], | ||||||
|       detectorList: [], |       detectorList: [], | ||||||
|  |       visibleInfo: false, | ||||||
|  |       dataInfo: [], | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   created() { |   created() { | ||||||
|  | @ -264,7 +283,7 @@ export default { | ||||||
|           cancelText: 'Cancel', |           cancelText: 'Cancel', | ||||||
|           onOk: async () => { |           onOk: async () => { | ||||||
|             try { |             try { | ||||||
|               const { success, message } = await deleteAction('/gardsSampleData/deleteById', { |               const { success, message, result } = await deleteAction('/gardsSampleData/deleteById', { | ||||||
|                 sampleId: this.selectedRowKeys[0], |                 sampleId: this.selectedRowKeys[0], | ||||||
|                 ...this.delParams, |                 ...this.delParams, | ||||||
|               }) |               }) | ||||||
|  | @ -273,6 +292,13 @@ export default { | ||||||
|                 that.loadData() |                 that.loadData() | ||||||
|               } else { |               } else { | ||||||
|                 this.$message.error(message) |                 this.$message.error(message) | ||||||
|  |                 this.visibleInfo = true | ||||||
|  |                 this.dataInfo = result.map((item, index) => { | ||||||
|  |                   return { | ||||||
|  |                     rowCount: `${index + 1}`, | ||||||
|  |                     info: item, | ||||||
|  |                   } | ||||||
|  |                 }) | ||||||
|               } |               } | ||||||
|             } catch (error) { |             } catch (error) { | ||||||
|               console.error(error) |               console.error(error) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user