diff --git a/src/mixins/estate/index.js b/src/mixins/estate/index.js new file mode 100644 index 0000000..0aaabc8 --- /dev/null +++ b/src/mixins/estate/index.js @@ -0,0 +1,33 @@ +export default { + data() { + return { + tabs: ['产业光源概况', '大事记', '机构设置', '地理位置'], + } + }, + methods: { + // 获取文章详情 + getInfo() { + // 预览/详情 + this.$post(`${this.api[this.preview ? 'getRedisCache' : 'findPage']}?columnId=${this.id}`).then(({ data }) => { + if (data.length) { + // state:已发布(1)则取theEditedJson,草稿(0)则取jsonBeforeEditing + const json = JSON.parse(this.preview ? + data : + data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing']) + this.modules = json + console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json) + } + }).catch(err => {}) + }, + // tab回调 + tabChange(i) { + this.active = i + // 跳转到固定的长页,这里的id不能变 + let path = '/overviewIntro?id=220' + if (i == 1) path = '/overviewDevHistory?id=214' + if (i == 2) path = '/overviewTrailer?id=215' + if (i == 3) path = '/overviewLocation?id=216' + this.$router.push(path + '&siteId=3') + }, + } +}; \ No newline at end of file diff --git a/src/pages/estate/event/index.vue b/src/pages/estate/event/index.vue new file mode 100644 index 0000000..74cb592 --- /dev/null +++ b/src/pages/estate/event/index.vue @@ -0,0 +1,197 @@ + + + + + \ No newline at end of file diff --git a/src/pages/estate/index/index.vue b/src/pages/estate/index/index.vue new file mode 100644 index 0000000..b339e90 --- /dev/null +++ b/src/pages/estate/index/index.vue @@ -0,0 +1,713 @@ + + + + + \ No newline at end of file diff --git a/src/pages/estate/location/index.vue b/src/pages/estate/location/index.vue new file mode 100644 index 0000000..ce8a86e --- /dev/null +++ b/src/pages/estate/location/index.vue @@ -0,0 +1,168 @@ + + + + + \ No newline at end of file diff --git a/src/pages/estate/orgSetup/index.vue b/src/pages/estate/orgSetup/index.vue new file mode 100644 index 0000000..9f072c4 --- /dev/null +++ b/src/pages/estate/orgSetup/index.vue @@ -0,0 +1,133 @@ + + + + + \ No newline at end of file diff --git a/src/pages/estate/survey/index.vue b/src/pages/estate/survey/index.vue new file mode 100644 index 0000000..40c256c --- /dev/null +++ b/src/pages/estate/survey/index.vue @@ -0,0 +1,130 @@ + + + + + \ No newline at end of file diff --git a/src/router/modules/estate.js b/src/router/modules/estate.js new file mode 100644 index 0000000..f5a8987 --- /dev/null +++ b/src/router/modules/estate.js @@ -0,0 +1,28 @@ +import BasicLayout from '@/layouts/home' +const name = 'estate' +export default { + path: `/${name}`, + component: BasicLayout, + children: [ + { + path: `index`, + component: () => import(`@/pages/${name}/index`), + }, + { + path: `event`, + component: () => import(`@/pages/${name}/event`), + }, + { + path: `orgSetup`, + component: () => import(`@/pages/${name}/orgSetup`), + }, + { + path: `survey`, + component: () => import(`@/pages/${name}/survey`), + }, + { + path: `location`, + component: () => import(`@/pages/${name}/location`), + }, + ] +};