Browse Source

更新科技政策

guhongwei 5 years ago
parent
commit
4e69a1ad20

+ 0 - 114
src/components/HelloWorld.vue

@@ -1,114 +0,0 @@
-<template>
-  <div class="hello">
-    <h1>{{ msg }}</h1>
-    <p>
-      For a guide and recipes on how to configure / customize this project,<br />
-      check out the
-      <a href="https://cli.vuejs.org" target="_blank" rel="noopener"
-        >vue-cli documentation</a
-      >.
-    </p>
-    <h3>Installed CLI Plugins</h3>
-    <ul>
-      <li>
-        <a
-          href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel"
-          target="_blank"
-          rel="noopener"
-          >babel</a
-        >
-      </li>
-      <li>
-        <a
-          href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint"
-          target="_blank"
-          rel="noopener"
-          >eslint</a
-        >
-      </li>
-    </ul>
-    <h3>Essential Links</h3>
-    <ul>
-      <li>
-        <a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a>
-      </li>
-      <li>
-        <a href="https://forum.vuejs.org" target="_blank" rel="noopener"
-          >Forum</a
-        >
-      </li>
-      <li>
-        <a href="https://chat.vuejs.org" target="_blank" rel="noopener"
-          >Community Chat</a
-        >
-      </li>
-      <li>
-        <a href="https://twitter.com/vuejs" target="_blank" rel="noopener"
-          >Twitter</a
-        >
-      </li>
-      <li>
-        <a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a>
-      </li>
-    </ul>
-    <h3>Ecosystem</h3>
-    <ul>
-      <li>
-        <a href="https://router.vuejs.org" target="_blank" rel="noopener"
-          >vue-router</a
-        >
-      </li>
-      <li>
-        <a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a>
-      </li>
-      <li>
-        <a
-          href="https://github.com/vuejs/vue-devtools#vue-devtools"
-          target="_blank"
-          rel="noopener"
-          >vue-devtools</a
-        >
-      </li>
-      <li>
-        <a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener"
-          >vue-loader</a
-        >
-      </li>
-      <li>
-        <a
-          href="https://github.com/vuejs/awesome-vue"
-          target="_blank"
-          rel="noopener"
-          >awesome-vue</a
-        >
-      </li>
-    </ul>
-  </div>
-</template>
-
-<script>
-export default {
-  name: "HelloWorld",
-  props: {
-    msg: String
-  }
-};
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style scoped lang="less">
-h3 {
-  margin: 40px 0 0;
-}
-ul {
-  list-style-type: none;
-  padding: 0;
-}
-li {
-  display: inline-block;
-  margin: 0 10px;
-}
-a {
-  color: #42b983;
-}
-</style>

+ 75 - 0
src/layout/policy/column.vue

@@ -0,0 +1,75 @@
+<template>
+  <div id="column">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <el-col :span="12" class="topTitle">
+            <span>栏目列表</span>
+          </el-col>
+          <el-col :span="12" class="topAdd">
+            <el-button type="primary" size="mini" @click="addData()"><i class="el-icon-plus"></i></el-button>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="list">
+          <template>
+            <el-table :data="columnInfo" style="width: 100%">
+              <el-table-column label="栏目名称" align="center">
+                <template slot-scope="scoped">
+                  <el-tooltip effect="dark" content="点击查询栏目" placement="left">
+                    <el-col :span="24" @click.native="handleClick(scoped.row)">{{ scoped.row.name }}</el-col>
+                  </el-tooltip>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center">
+                <template slot-scope="scoped">
+                  <el-button type="text" size="small" @click="$router.push({ path: '/policy/columnDetail', query: { id: scoped.row.id } })"
+                    ><i class="el-icon-edit"></i
+                  ></el-button>
+                  <el-button type="text" size="small" @click="handleDelete(scoped.row)"><i class="el-icon-delete"></i></el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </template>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'column',
+  props: {
+    columnInfo: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    addData() {
+      this.$router.push({ path: '/policy/columnDetail' });
+    },
+    handleDelete(item) {
+      this.$emit('delete', item);
+    },
+    handleClick(row) {
+      this.$emit('list', { data: row });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+  border-bottom: 1px solid #cccc;
+}
+.top .topTitle {
+  padding: 0 10px;
+}
+.top .topAdd {
+  padding: 0 10px 0 0;
+  text-align: right;
+}
+</style>

+ 66 - 0
src/layout/policy/columnDetail.vue

@@ -0,0 +1,66 @@
+<template>
+  <div id="columnDetail">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="top">
+          <el-col :span="12" class="topTitle">
+            添加栏目
+          </el-col>
+          <el-col :span="12" class="topBtn">
+            <el-button type="primary" size="mini" @click="returnBtn()">返回</el-button>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="messgae">
+          <el-form ref="form" :model="form" label-width="80px">
+            <el-form-item label="栏目名称">
+              <el-input v-model="form.name"></el-input>
+            </el-form-item>
+            <el-form-item label="所在位置">
+              <el-select v-model="form.site" placeholder="请选择所在位置">
+                <el-option label="综合政策指导" value="zhidao"></el-option>
+                <el-option label="科技成果转化" value="zhuanhua"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit()">提交</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'columnDetail',
+  props: {
+    form: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    onSubmit() {
+      this.$emit('submitDate', { data: this.form, id: this.form.id });
+    },
+    returnBtn() {
+      this.$router.push({ path: '/government/index' });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+}
+.top .topTitle {
+  text-align: left;
+}
+.top .topBtn {
+  text-align: right;
+  padding: 0 5px;
+}
+</style>

+ 86 - 0
src/layout/policy/messageDetail.vue

@@ -0,0 +1,86 @@
+<template>
+  <div id="messageDetail">
+    <el-row v-if="loading">
+      <el-col :span="24">
+        <el-col :span="24" class="topBtn">
+          <el-button type="primary" size="mini" @click="returnBtn()">返回</el-button>
+        </el-col>
+      </el-col>
+      <el-col>
+        <el-col :span="24" class="messgae">
+          <el-form ref="form" :model="form" label-width="80px">
+            <el-form-item label="信息标题">
+              <el-input v-model="form.title" placeholder="请输入信息标题"></el-input>
+            </el-form-item>
+            <el-form-item label="发布人">
+              <el-input v-model="form.publish" placeholder="请输入发布者"></el-input>
+            </el-form-item>
+            <el-form-item label="来源">
+              <el-input v-model="form.orgin" placeholder="请输入信息来源"></el-input>
+            </el-form-item>
+            <el-form-item label="所属栏目" placeholder="请选择所属栏目">
+              <el-select v-model="form.column_id" filterable @change="selectChild">
+                <el-option v-for="(item, index) in columnList" :key="index" :value="item.id" :label="item.name"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="信息图片" prop="picture">
+              <upload :limit="1" :data="form.picture" type="picture" :url="'/files/links/upload'" @upload="uploadSuccess"></upload>
+            </el-form-item>
+            <el-form-item label="信息内容">
+              <wang-editor v-model="form.content" placeholder="请输入信息内容"></wang-editor>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit()">提交</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import WangEditor from '@/components/wang-editor.vue';
+import upload from '@/components/upload.vue';
+export default {
+  name: 'messageDetail',
+  props: {
+    form: null,
+    columnList: null,
+    loading: null,
+  },
+  components: {
+    WangEditor,
+    upload,
+  },
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    returnBtn() {
+      this.$router.push({ path: '/policy/index' });
+    },
+    onSubmit() {
+      this.$emit('submitDate', { data: this.form, id: this.form.id });
+    },
+    selectChild(column_id) {
+      let res = this.columnList.filter(fil => fil.id === column_id);
+      if (res.length > 0) {
+        console.log(res[0].name);
+        this.$set(this.form, `column_name`, res[0].name);
+      }
+      this.$forceUpdate();
+    },
+    uploadSuccess({ type, data }) {
+      this.$set(this.form, `${type}`, data.uri);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.topBtn {
+  text-align: right;
+  padding: 15px 5px;
+}
+</style>

+ 90 - 0
src/layout/policy/messageInfo.vue

@@ -0,0 +1,90 @@
+<template>
+  <div id="messageInfo">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <el-col :span="12" class="topTitle">
+            <span>信息列表</span>
+          </el-col>
+          <el-col :span="12" class="topAdd">
+            <el-button type="primary" size="mini" @click="addData()"><i class="el-icon-plus"></i></el-button>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="list">
+          <template>
+            <el-table :data="message" style="width: 100%">
+              <el-table-column prop="title" label="标题" align="center"> </el-table-column>
+              <el-table-column prop="column_name" label="所属栏目" align="center"> </el-table-column>
+              <el-table-column label="操作" align="center">
+                <template slot-scope="scope">
+                  <el-button type="text" size="small" @click="$router.push({ path: '/policy/messageInfoDetail', query: { id: scope.row.id } })"
+                    ><i class="el-icon-edit"></i
+                  ></el-button>
+                  <el-button type="text" size="small" @click="handleDelete(scope.row)"><i class="el-icon-delete"></i></el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-col :span="24" class="page">
+              <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                layout="total, prev, pager, next, jumper"
+                :total="total"
+              >
+              </el-pagination>
+            </el-col>
+          </template>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'messageInfo',
+  props: {
+    message: null,
+    total: null,
+  },
+  components: {},
+  data: () => ({
+    currentPage: 1,
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+    },
+    addData() {
+      this.$router.push({ path: '/policy/messageInfoDetail' });
+    },
+    handleDelete(item) {
+      this.$emit('delete', item);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+  border-bottom: 1px solid #cccc;
+}
+.top .topTitle {
+  padding: 0 10px;
+}
+.top .topAdd {
+  padding: 0 10px 0 0;
+  text-align: right;
+}
+.page {
+  padding: 20px 0;
+  text-align: center;
+}
+</style>

+ 18 - 3
src/router/index.js

@@ -16,23 +16,38 @@ export default new Router({
       path: '/government/index',
       component: () => import('../views/government/index.vue'),
     },
-    // 栏目列表
+    // 科技政务-栏目列表
     {
       path: '/government/columnDetail',
       component: () => import('../views/government/columnDetail.vue'),
     },
-    // 信息列表
+    // 科技政务-信息列表
     {
       path: '/government/messageInfoDetail',
       component: () => import('../views/government/messageInfoDetail.vue'),
     },
-
+    // 科技政策
+    {
+      path: '/policy/index',
+      component: () => import('../views/policy/index.vue'),
+    },
+    // 科技政策-栏目列表
+    {
+      path: '/policy/columnDetail',
+      component: () => import('../views/policy/columnDetail.vue'),
+    },
+    // 科技政策-信息列表
+    {
+      path: '/policy/messageInfoDetail',
+      component: () => import('../views/policy/messageInfoDetail.vue'),
+    },
     // 站点信息
     {
       path: '/site/index',
       meta: { title: '网站设置' },
       component: () => import('../views/site/index.vue'),
     },
+
     // 友情链接管理
     {
       path: '/links/index',

+ 4 - 0
src/store/index.js

@@ -4,6 +4,8 @@ import link from './link';
 import site from './site';
 import news from './news';
 import column from './column';
+import policyColumn from './policyColumn';
+import policyNews from './policyNews';
 
 Vue.use(Vuex);
 
@@ -13,6 +15,8 @@ export default new Vuex.Store({
     site,
     news,
     column,
+    policyColumn,
+    policyNews,
   },
   state: {},
   mutations: {},

+ 38 - 0
src/store/policyColumn.js

@@ -0,0 +1,38 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  columnInfo: `/api/policy/column`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.columnInfo}`, { skip, limit, ...info });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.columnInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.columnInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.columnInfo}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.columnInfo}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 38 - 0
src/store/policyNews.js

@@ -0,0 +1,38 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  newsInfo: `/api/policy/news`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, column_id, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.newsInfo}`, { skip, limit, column_id, ...info });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.newsInfo}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 1 - 1
src/views/government/messageInfoDetail.vue

@@ -52,8 +52,8 @@ export default {
       if (this.$route.query.id) {
         const res = await this.fetch(this.id);
         this.$set(this, `form`, res.data);
-        this.loading = true;
       }
+      this.loading = true;
     },
     async onSubmit(form) {
       let data = this.form;

+ 76 - 0
src/views/policy/columnDetail.vue

@@ -0,0 +1,76 @@
+<template>
+  <div id="columnDetail">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <column :form="form" @submitDate="onSubmit"></column>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import column from '@/layout/policy/columnDetail.vue';
+import { createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('policyColumn');
+export default {
+  name: 'columnDetail',
+  props: {},
+  components: {
+    column,
+    topInfo,
+  },
+  data: () => ({
+    topTitle: '添加栏目',
+    form: {},
+  }),
+  created() {
+    this.search();
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+    keyWord() {
+      let meta = this.$route.meta;
+      let main = meta.title || '';
+      return main;
+    },
+  },
+  methods: {
+    ...mapActions(['fetch', 'create', 'update']),
+    async search() {
+      if (this.$route.query.id) {
+        const res = await this.fetch(this.id);
+        this.$set(this, `form`, res.data);
+      }
+    },
+    async onSubmit(form) {
+      let data = this.form;
+      console.log(data);
+      let res;
+      let msg;
+      if (data.id) {
+        res = await this.update(data);
+        msg = `${this.keyWord}修改成功`;
+      } else {
+        res = await this.create(data);
+        msg = `${this.keyWord}添加成功`;
+      }
+      if (this.$checkRes(res, msg)) this.$router.push({ path: '/policy/index' });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  padding: 20px;
+  margin: 10px 20px;
+  border: 1px solid #ccc;
+  width: 96%;
+}
+</style>

+ 99 - 0
src/views/policy/index.vue

@@ -0,0 +1,99 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <el-col :span="7" class="column">
+          <column :columnInfo="columnInfo" @delete="deleteData" @list="handleList"></column>
+        </el-col>
+        <el-col :span="17" class="message">
+          <messageInfo :message="message" :total="total" @delete="deleteMess"></messageInfo>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import column from '@/layout/policy/column.vue';
+import messageInfo from '@/layout/policy/messageInfo.vue';
+import { createNamespacedHelpers, mapGetters } from 'vuex';
+const { mapActions: mapColumn } = createNamespacedHelpers('policyColumn');
+const { mapActions: mapNews } = createNamespacedHelpers('policyNews');
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    topInfo, //头部信息
+    column, //栏目列表
+    messageInfo, //信息列表
+  },
+  data: () => ({
+    topTitle: '科技政策',
+    columnInfo: [],
+    message: [],
+    total: 0,
+    leftId: null,
+  }),
+  created() {
+    this.search();
+  },
+  computed: {},
+  methods: {
+    ...mapColumn(['query', 'delete', 'fetch']),
+    ...mapNews({ queryList: 'query', deleteList: 'delete' }),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `columnInfo`, res.data);
+      }
+    },
+    async deleteData(item) {
+      const res = await this.delete(item.id);
+      this.$checkRes(res, '删除成功', '删除失败');
+      this.search();
+    },
+    handleList({ data }) {
+      this.$set(this, `leftId`, data.id);
+      this.searchRight();
+    },
+    async searchRight({ skip = 0, limit = 10, column_id } = {}) {
+      const res = await this.queryList({ skip, limit, column_id: this.leftId });
+      for (const val of res.data) {
+        const result = await this.fetch(val.column_id);
+        val.column_name = result.data.name;
+      }
+      this.$set(this, `message`, res.data);
+      this.$set(this, `total`, res.total);
+    },
+    async deleteMess(item) {
+      const res = await this.deleteList(item.id);
+      this.$checkRes(res, '删除成功', '删除失败');
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  padding: 20px;
+  margin: 10px 20px;
+  border: 1px solid #ccc;
+  width: 96%;
+}
+.column {
+  width: 258px;
+  min-height: 500px;
+  border: 1px solid #ccc;
+  margin: 0 20px 0 0;
+}
+.message {
+  border: 1px solid #ccc;
+  min-height: 500px;
+  width: 715px;
+}
+</style>

+ 92 - 0
src/views/policy/messageInfoDetail.vue

@@ -0,0 +1,92 @@
+<template>
+  <div id="messageInfoDetail">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <message :form="form" :columnList="columnList" @submitDate="onSubmit" :loading="loading"></message>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import message from '@/layout/policy/messageDetail.vue';
+import { createNamespacedHelpers, mapGetters } from 'vuex';
+const { mapActions: mapColumn } = createNamespacedHelpers('policyColumn');
+const { mapActions: mapNews } = createNamespacedHelpers('policyNews');
+export default {
+  name: 'messageInfoDetail',
+  props: {},
+  components: {
+    message,
+    topInfo,
+  },
+  data: () => ({
+    topTitle: '添加信息',
+    form: {},
+    columnList: [],
+    loading: true,
+  }),
+  created() {
+    this.search();
+    this.searchColumn();
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+    keyWord() {
+      let meta = this.$route.meta;
+      let main = meta.title || '';
+      return main;
+    },
+  },
+  methods: {
+    ...mapNews(['fetch', 'create', 'update']),
+    ...mapColumn({ queryList: 'query' }),
+    async search() {
+      this.loading = false;
+      if (this.$route.query.id) {
+        const res = await this.fetch(this.id);
+        this.$set(this, `form`, res.data);
+      }
+      this.loading = true;
+    },
+    async onSubmit(form) {
+      let data = this.form;
+      console.log(data);
+      let res;
+      let msg;
+      if (data.id) {
+        res = await this.update(data);
+        msg = `${this.keyWord}修改成功`;
+      } else {
+        res = await this.create(data);
+        msg = `${this.keyWord}添加成功`;
+      }
+      if (this.$checkRes(res, msg)) this.$router.push({ path: '/policy/index' });
+    },
+    async searchColumn({ ...info } = {}) {
+      const res = await this.queryList({ ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `columnList`, res.data);
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 0 0 10px 0;
+}
+.main {
+  padding: 20px;
+  margin: 10px 20px;
+  border: 1px solid #ccc;
+  width: 96%;
+}
+</style>

+ 5 - 0
vue.config.js

@@ -34,6 +34,11 @@ module.exports = {
         target: 'http://10.16.9.108:9002',
         changeOrigin: true,
         ws: true,
+      },
+      '/api/policy': {
+        target: 'http://10.16.9.108:9003',
+        changeOrigin: true,
+        ws: true,
         // pathRewrite: { '^/api/affairs': '/api' },
       },
     },