| | |
| | | class="el-scrollbar" |
| | | v-loading="mainLoading" |
| | | > |
| | | <el-row justify="space-between"> |
| | | <div><el-text>监管计划</el-text></div> |
| | | <el-button type="warning" size="small" @click="editPlan">计划调整</el-button> |
| | | <CompMonitorPlan :task="curTask.data"></CompMonitorPlan> |
| | | </el-row> |
| | | <el-divider></el-divider> |
| | | <el-button type="primary" size="small" @click="editTask">场景调整</el-button> |
| | | <el-row justify="space-between"> |
| | | <div><el-text>监管场景</el-text></div> |
| | | <CompMonitorObj :data="curMonitorObjList" v-model:showData="showMonitorObjList"></CompMonitorObj> |
| | | <el-button type="warning" size="small" @click="editTask">场景调整</el-button> |
| | | </el-row> |
| | | <CompMonitorObj :data="curMonitorObjList"></CompMonitorObj> |
| | | <!-- <div><el-text>监管场景</el-text></div> |
| | | <div> |
| | | <el-space wrap> |
| | |
| | | <script> |
| | | import taskApi from '@/api/fysp/taskApi'; |
| | | import CompMonitorObj from './components/CompMonitorObj.vue'; |
| | | import CompMonitorPlan from './components/CompMonitorPlan.vue'; |
| | | export default { |
| | | components: { CompMonitorObj }, |
| | | beforeRouteEnter(to, from, next) { |
| | | // 在渲染该组件的对应路由被验证前调用 |
| | | // 不能获取组件实例 `this` ! |
| | | // 因为当守卫执行时,组件实例还没被创建! |
| | | next((vm) => { |
| | | if (from.name == 'monitorObjEdit' && vm.task) { |
| | | vm.chooseTask(vm.task); |
| | | } |
| | | }); |
| | | }, |
| | | components: { CompMonitorObj, CompMonitorPlan }, |
| | | data() { |
| | | return { |
| | | formSearch: { |
| | |
| | | curTask: {}, |
| | | //操作按钮 |
| | | buttons: [ |
| | | { |
| | | name: '计划调整', |
| | | color: 'success' |
| | | }, |
| | | { |
| | | name: '场景调整', |
| | | color: 'warning' |
| | | } |
| | | // { |
| | | // name: '计划调整', |
| | | // color: 'success' |
| | | // }, |
| | | // { |
| | | // name: '场景调整', |
| | | // color: 'warning' |
| | | // } |
| | | ] |
| | | }; |
| | | }, |
| | |
| | | return type; |
| | | }, |
| | | chooseTask(task) { |
| | | this.task = task; |
| | | this.sideLoading = false; |
| | | this.mainLoading = true; |
| | | taskApi |
| | |
| | | task: encodeURIComponent(JSON.stringify(this.curTask.data)) |
| | | } |
| | | }); |
| | | }, |
| | | editPlan(){ |
| | | this.$router.push({ |
| | | name: 'monitorPlanEdit', |
| | | query: { |
| | | data: encodeURIComponent(JSON.stringify(this.curMonitorObjList)), |
| | | task: encodeURIComponent(JSON.stringify(this.curTask.data)), |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | mounted() { |