123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <template>
- <div id="login">
- <el-row>
- <el-col :span="24" class="style">
- <el-col :span="24" class="top">
- <top></top>
- </el-col>
- <el-col :span="24" class="menu">
- <div class="w_1200">
- <menus></menus>
- </div>
- </el-col>
- <el-col :span="24" class="main">
- <div class="w_1200">
- <el-col :span="24" class="info">
- <detail :form="form"></detail>
- </el-col>
- </div>
- </el-col>
- <el-col :span="24" class="foot">
- <div class="w_1200">
- <foot></foot>
- </div>
- </el-col>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import top from '@/layout/common/top.vue';
- import menus from '@/layout/common/menus.vue';
- import foot from '@/layout/common/foot.vue';
- import detail from '@/layout/demand/detail.vue';
- import { mapState, createNamespacedHelpers } from 'vuex';
- const { mapActions: demand } = createNamespacedHelpers('demand');
- export default {
- name: 'login',
- props: {},
- components: {
- top,
- menus,
- foot,
- detail,
- },
- data: function() {
- return {
- form: {},
- };
- },
- created() {
- this.search();
- },
- methods: {
- ...demand(['update', 'fetch', 'query', 'create', 'delete']),
- async search() {
- console.log(this.id);
- let res = await this.fetch(this.id);
- this.$set(this, `form`, res.data);
- },
- },
- computed: {
- id() {
- return this.$route.query.id;
- },
- ...mapState(['user']),
- pageTitle() {
- return `${this.$route.meta.title}`;
- },
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- };
- </script>
- <style lang="less" scoped>
- .w_1200 {
- width: 1200px;
- margin: 0 auto;
- }
- .style {
- .menu {
- height: 70px;
- margin: 0 0 10px 0;
- }
- .main {
- min-height: 600px;
- margin: 0 0 10px 0;
- }
- .info {
- background-color: #fff;
- min-height: 600px;
- }
- .foot {
- height: 135px;
- }
- }
- </style>
|