| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <template>
- <div>
- <TabGridEdit ref="windowGridEdit" :window-no="windowNo" />
- </div>
- </template>
- <script>
- import Common from '../common/Common.js';
- import TabGridEdit from './tabGridView/TabGridEdit.vue';
- import WindowServerUtil from '../resource/dictionary/WindowServerUtil.js';
- import { Notify, Uuid } from 'pc-component-v3';
- export default {
- components: {
- TabGridEdit,
- },
- /**
- * 在离开路由之前,判断数据是否已保存
- */
- beforeRouteLeave: function (to, from, next) {
- var _self = this;
- if (_self.$refs.windowGridEdit != undefined && _self.$refs.windowGridEdit.hasDataChanged() == true) {
- Notify.notice(_self.$t('lang.window.dataNotSaved'), _self.$t('lang.window.describe1'), false);
- next(false);
- } else {
- next();
- }
- },
- data: function () {
- return {
- 'windowNo': '',
- };
- },
- watch: {
- '$route': function (to, from) {
- this.initView();
- },
- },
- mounted: function () {
- this.initView();
- },
- methods: {
- initView: function () {
- var _self = this;
- this.windowNo = this.$route.params.windowNo;
- },
- },
- };
- </script>
- <style>
- </style>
|