Explorar o código

专利运营更新

guhongwei %!s(int64=3) %!d(string=hai) anos
pai
achega
981d723ac2

+ 55 - 0
src/router/index.js

@@ -51,6 +51,61 @@ const web = [
         meta: { title: '平台用户详情' },
         component: () => import('../views/adminCenter/user/detail.vue'),
       },
+      {
+        path: '/adminCenter/product/index',
+        meta: { title: '审核管理' },
+        component: () => import('../views/adminCenter/product/index.vue'),
+      },
+      {
+        path: '/adminCenter/product/detail',
+        meta: { title: '信息管理' },
+        component: () => import('../views/adminCenter/product/detail.vue'),
+      },
+      {
+        path: '/adminCenter/news/index',
+        meta: { title: '技术新闻' },
+        component: () => import('../views/adminCenter/news/index.vue'),
+      },
+      {
+        path: '/adminCenter/news/detail',
+        meta: { title: '信息管理' },
+        component: () => import('../views/adminCenter/news/detail.vue'),
+      },
+      {
+        path: '/adminCenter/viewPoint/index',
+        meta: { title: '智库视点' },
+        component: () => import('../views/adminCenter/viewPoint/index.vue'),
+      },
+      {
+        path: '/adminCenter/viewPoint/detail',
+        meta: { title: '信息管理' },
+        component: () => import('../views/adminCenter/viewPoint/detail.vue'),
+      },
+      {
+        path: '/adminCenter/dimension/index',
+        meta: { title: '研究报告' },
+        component: () => import('../views/adminCenter/dimension/index.vue'),
+      },
+      {
+        path: '/adminCenter/dimension/detail',
+        meta: { title: '信息管理' },
+        component: () => import('../views/adminCenter/dimension/detail.vue'),
+      },
+      {
+        path: '/adminCenter/patentnav/index',
+        meta: { title: '专利导航' },
+        component: () => import('../views/adminCenter/patentnav/index.vue'),
+      },
+      {
+        path: '/adminCenter/patentnav/detail',
+        meta: { title: '信息管理' },
+        component: () => import('../views/adminCenter/patentnav/detail.vue'),
+      },
+      {
+        path: '/adminCenter/updatePwd/index',
+        meta: { title: '修改密码' },
+        component: () => import('../views/adminCenter/updatePwd/index.vue'),
+      },
     ],
   },
   {

+ 16 - 0
src/store/index.js

@@ -19,6 +19,15 @@ import mission from '@common/src/store/mission';
 import patent from '@common/src/store/patent';
 import purchase from '@common/src/store/patent/purchase';
 import sell from '@common/src/store/patent/sell';
+// 产品
+import product from '@common/src/store/product';
+// 技术新闻
+import column from '@common/src/store/column';
+import news from '@common/src/store/news';
+import universal from '@common/src/store/universal';
+import viewPoint from '@common/src/store/viewPoint';
+import dimension from '@common/src/store/dimension';
+import patentnav from '@common/src/store/patentnav';
 Vue.use(Vuex);
 
 export default new Vuex.Store({
@@ -38,5 +47,12 @@ export default new Vuex.Store({
     patent,
     purchase,
     sell,
+    product,
+    column,
+    news,
+    universal,
+    viewPoint,
+    dimension,
+    patentnav,
   },
 });

+ 134 - 0
src/views/adminCenter/dimension/detail.vue

@@ -0,0 +1,134 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-button type="primary" size="mini" @click="back">返回</el-button>
+        </el-col>
+        <el-col :span="24" class="down" v-loading="loading">
+          <data-form :data="form" :fields="fields" :rules="{}" @save="toSave" v-if="!loading" :useEnter="false">
+            <template #custom="{ item, form }">
+              <template v-if="item.model == 'filepath'">
+                <upload
+                  :limit="1"
+                  :data="form.filepath"
+                  listType=""
+                  type="filepath"
+                  :url="'/files/filepath/upload'"
+                  @upload="uploadSuccess"
+                  @delete="uploadDelete"
+                ></upload>
+              </template>
+              <template v-else-if="item.model == 'is_show'">
+                <el-switch v-model="form.is_show" active-color="#13ce66" inactive-color="#ff4949" active-text="展示" inactive-text="不展示"> </el-switch>
+              </template>
+            </template>
+            <template #radios="{ item }">
+              <template v-if="item.model === 'is_show'">
+                <el-radio :label="false">不展示</el-radio>
+                <el-radio :label="true">展示</el-radio>
+              </template>
+            </template>
+          </data-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataForm from '@common/src/components/frame/form.vue';
+import upload from '@common/src/components/frame/upload.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mapdimension } = createNamespacedHelpers('dimension');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'detail',
+  props: {},
+  components: { dataForm, upload },
+  data: function () {
+    return {
+      fields: [
+        { label: '是否展示', model: 'is_show', type: 'radio' },
+        { label: '信息标题', model: 'title' },
+        { label: '发布时间', model: 'publish_time', type: 'date' },
+        { label: '信息来源', model: 'origin' },
+        { label: '信息简介', model: 'brief', type: 'textarea' },
+        { label: '内容', model: 'content', type: 'editor' },
+        { label: '附件文件', model: 'filepath', custom: true },
+      ],
+      form: {},
+      loading: false,
+    };
+  },
+  async created() {
+    if (this.id) {
+      await this.search();
+    }
+  },
+  methods: {
+    ...mapdimension(['fetch', 'update', 'create']),
+    async search() {
+      this.loading = true;
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+        this.loading = false;
+      }
+    },
+    async toSave({ data }) {
+      if (data.id) {
+        let res = await this.update(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息修改成功',
+            type: 'success',
+          });
+          this.back();
+        }
+      } else {
+        data.user_id = this.user.id;
+        let res = await this.create(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息创建成功',
+            type: 'success',
+          });
+          this.back();
+        }
+      }
+    },
+
+    // 返回列表
+    back() {
+      this.$router.push({ path: '/adminCenter/dimension/index' });
+    },
+    // 图片上传
+    uploadSuccess({ type, data }) {
+      this.$set(this.form, `${type}`, { url: data.uri, name: data.name });
+    },
+    // 删除图片
+    uploadDelete(data) {
+      this.$set(this.form, `${data.type}`, {});
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 102 - 0
src/views/adminCenter/dimension/index.vue

@@ -0,0 +1,102 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-button type="primary" size="mini" @click="add">添加</el-button>
+        </el-col>
+        <el-col :span="24" class="down">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @edit="toEdit" @delete="toDelete"></data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mapdimension } = createNamespacedHelpers('dimension');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: { dataTable },
+  data: function () {
+    return {
+      opera: [
+        {
+          label: '编辑',
+          method: 'edit',
+        },
+        {
+          label: '删除',
+          method: 'delete',
+        },
+      ],
+      fields: [
+        { label: '信息标题', prop: 'title' },
+        { label: '信息来源', prop: 'origin' },
+        { label: '发布时间', prop: 'publish_time' },
+        {
+          label: '是否展示',
+          prop: 'is_show',
+          format: (item) => {
+            return item === true ? '展示' : '不展示';
+          },
+        },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapdimension(['query', 'fetch', 'create', 'update', 'delete']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      info.user_id = this.user.id;
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 修改
+    toEdit({ data }) {
+      this.$router.push({ path: '/adminCenter/dimension/detail', query: { id: data.id } });
+    },
+    // 删除
+    async toDelete({ data }) {
+      let res = await this.delete(data.id);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息删除成功',
+          type: 'success',
+        });
+        this.search();
+      }
+    },
+    // 添加数据
+    add() {
+      this.$router.push({ path: '/adminCenter/dimension/detail' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 170 - 0
src/views/adminCenter/news/detail.vue

@@ -0,0 +1,170 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-button type="primary" size="mini" @click="back">返回</el-button>
+        </el-col>
+        <el-col :span="24" class="down" v-loading="loading" style="min-height: 600px">
+          <data-form :data="form" :fields="fields" :rules="{}" @save="toSave" v-if="!loading" :useEnter="false">
+            <template #custom="{ item, form }">
+              <template v-if="item.model === 'column_id'">
+                <el-select v-model="form.column_id" placeholder="请选择所属栏目" @change="changeColumn">
+                  <el-option v-for="(i, index) in columnList" :key="index" :label="i.name" :value="i.id"></el-option>
+                </el-select>
+              </template>
+              <template v-else-if="item.model == 'type'">
+                <el-radio-group v-model="form.type" :disabled="form.site == 'kjzx' ? false : true">
+                  <el-radio label="国家"></el-radio>
+                  <el-radio label="科学院"></el-radio>
+                </el-radio-group>
+              </template>
+              <template v-else-if="item.model == 'picture'">
+                <upload :limit="1" :data="form.picture" type="picture" :url="'/files/picture/upload'" @upload="uploadSuccess" @delete="uploadDelete"></upload>
+              </template>
+              <template v-else-if="item.model == 'video'">
+                <upload
+                  :limit="1"
+                  :data="form.video"
+                  listType=""
+                  type="video"
+                  :url="'/files/video/upload'"
+                  @upload="uploadSuccess"
+                  @delete="uploadDelete"
+                ></upload>
+              </template>
+              <template v-else-if="item.model == 'filepath'">
+                <upload
+                  :limit="1"
+                  :data="form.filepath"
+                  listType=""
+                  type="filepath"
+                  :url="'/files/filepath/upload'"
+                  @upload="uploadSuccess"
+                  @delete="uploadDelete"
+                ></upload>
+              </template>
+            </template>
+          </data-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataForm from '@common/src/components/frame/form.vue';
+import upload from '@common/src/components/frame/upload.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: column } = createNamespacedHelpers('column');
+const { mapActions: news } = createNamespacedHelpers('news');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'detail',
+  props: {},
+  components: { dataForm, upload },
+  data: function () {
+    return {
+      fields: [
+        { label: '所属栏目', model: 'column_id', custom: true },
+        { label: '信息标题', model: 'title' },
+        { label: '信息类型', model: 'type', custom: true },
+        { label: '发布时间', model: 'publish_time', type: 'date' },
+        { label: '信息来源', model: 'origin' },
+        { label: '信息简介', model: 'brief', type: 'textarea' },
+        { label: '图片文件', model: 'picture', custom: true },
+        { label: '视频文件', model: 'video', custom: true },
+        { label: '附件文件', model: 'filepath', custom: true },
+        { label: '内容', model: 'content', type: 'editor' },
+      ],
+      form: {},
+      // 栏目列表
+      columnList: [],
+      loading: false,
+    };
+  },
+  async created() {
+    await this.searchColumn();
+    if (this.id) {
+      await this.search();
+    }
+  },
+  methods: {
+    ...column({ columnQuery: 'query' }),
+    ...news(['fetch', 'update', 'create']),
+    async search() {
+      this.loading = true;
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+        console.log(this.form);
+        this.loading = false;
+      }
+    },
+    async toSave({ data }) {
+      if (data.id) {
+        let res = await this.update(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息修改成功',
+            type: 'success',
+          });
+          this.back();
+        }
+      } else {
+        let res = await this.create(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息创建成功',
+            type: 'success',
+          });
+          this.back();
+        }
+      }
+    },
+    // 选择栏目
+    changeColumn(index) {
+      let column = this.columnList.find((i) => i.id == index);
+      if (column) this.$set(this.form, `column_name`, column.name);
+      this.$set(this.form, `site`, column.site);
+    },
+    // 返回列表
+    back() {
+      this.$router.push({ path: '/adminCenter/news/index' });
+    },
+    // 查询栏目
+    async searchColumn() {
+      let res = await this.columnQuery();
+      if (this.$checkRes(res)) {
+        this.$set(this, `columnList`, res.data);
+      }
+    },
+    // 图片上传
+    uploadSuccess({ type, data }) {
+      this.$set(this.form, `${type}`, { url: data.uri, name: data.name });
+    },
+    // 删除图片
+    uploadDelete(data) {
+      this.$set(this.form, `${data.type}`, {});
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 272 - 0
src/views/adminCenter/news/index.vue

@@ -0,0 +1,272 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="6" class="left">
+          <el-col :span="24" class="top">
+            <el-col :span="18" class="title"> 栏目信息 </el-col>
+            <el-col :span="6" class="btn">
+              <el-button type="primary" size="mini" @click="dialog = true">添加栏目</el-button>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="down">
+            <data-table
+              :fields="fields"
+              :opera="opera"
+              :data="columnList"
+              :usePage="false"
+              @query="search"
+              @views="toViews"
+              @edit="toEdit"
+              @delete="toDelete"
+            ></data-table>
+          </el-col>
+        </el-col>
+        <el-col :span="18" class="right">
+          <el-col :span="24" class="top">
+            <el-col :span="18" class="title"> 新闻信息 </el-col>
+            <el-col :span="6" class="btn">
+              <el-button type="primary" size="mini" @click="$router.push({ path: '/adminCenter/news/detail' })">添加信息</el-button>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="down">
+            <data-table
+              :fields="newsfields"
+              :opera="newsopera"
+              :data="list"
+              :total="total"
+              @query="newsSearch"
+              @edit="newsEdit"
+              @delete="newsDelete"
+            ></data-table>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+    <el-dialog title="栏目信息管理" width="40%" :visible.sync="dialog" @closed="handleClose" :destroy-on-close="true">
+      <data-form :data="form" :fields="fields" :rules="{}" @save="toSave">
+        <template #options="{ item }">
+          <template v-if="item.model === 'site'">
+            <el-option v-for="(i, index) in siteList" :key="index" :label="i.name" :value="i.site"></el-option>
+          </template>
+        </template>
+      </data-form>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import dataForm from '@common/src/components/frame/form.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: column } = createNamespacedHelpers('column');
+const { mapActions: news } = createNamespacedHelpers('news');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: { dataTable, dataForm },
+  data: function () {
+    return {
+      // 栏目列表
+      opera: [
+        {
+          label: '查看信息',
+          method: 'views',
+        },
+        {
+          label: '编辑',
+          method: 'edit',
+        },
+        {
+          label: '删除',
+          method: 'delete',
+        },
+      ],
+      fields: [
+        { label: '栏目名称', prop: 'name', model: 'name' },
+        { label: '栏目位置', prop: 'site', model: 'site', type: 'select' },
+      ],
+      columnList: [],
+      dialog: false,
+      form: {},
+      // 位置信息
+      siteList: [
+        { name: '咨询服务', site: 'zxfw' },
+        { name: '科企观察', site: 'kqgc' },
+        { name: '政策信息', site: 'zcxx' },
+        { name: '医药资讯', site: 'yyzx' },
+        { name: '学术交流', site: 'xsjl' },
+        { name: '院地合作', site: 'ydhz' },
+        { name: '科研动态', site: 'kydt' },
+        { name: '科技培训', site: 'kjpx' },
+        { name: '政策解读', site: 'zcjd' },
+        { name: '技术前沿', site: 'jsqy' },
+        { name: '通知通告', site: 'tgtg' },
+        { name: '工作动态', site: 'gzdt' },
+        { name: '科技咨讯', site: 'kjzx' },
+        { name: '行业研究', site: 'hyyj' },
+        { name: '问卷调查', site: 'wjdc' },
+        { name: '法律法规', site: 'flfg' },
+        // { name: '热点事件', site: 'rdsj' },
+        // { name: '省内动态', site: 'sndt' },
+      ],
+      // 信息列表
+      newsopera: [
+        {
+          label: '编辑',
+          method: 'edit',
+        },
+        {
+          label: '删除',
+          method: 'delete',
+        },
+      ],
+      newsfields: [
+        { label: '所属栏目', prop: 'column_name' },
+        { label: '信息标题', prop: 'title' },
+        { label: '信息来源', prop: 'origin' },
+        { label: '发布时间', prop: 'publish_time' },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  async created() {
+    await this.search();
+    await this.newsSearch();
+  },
+  methods: {
+    ...column({ columnQuery: 'query', columnFetch: 'fetch', columnCreate: 'create', columnUpdate: 'update', columnDelete: 'delete' }),
+    ...news(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询栏目数据
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.columnQuery({ skip, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `columnList`, res.data);
+      }
+    },
+    // 修改栏目数据
+    toEdit({ data }) {
+      this.$set(this, `form`, data);
+      this.dialog = true;
+    },
+    // 删除栏目数据
+    async toDelete({ data }) {
+      let res = await this.columnDelete(data.id);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息删除成功',
+          type: 'success',
+        });
+        this.search();
+      }
+    },
+    // 保存栏目数据
+    async toSave({ data }) {
+      if (data.id) {
+        let res = await this.columnUpdate(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息修改成功',
+            type: 'success',
+          });
+          this.handleClose();
+        }
+      } else {
+        let res = await this.columnCreate(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息创建成功',
+            type: 'success',
+          });
+          this.handleClose();
+        }
+      }
+    },
+    // 取消栏目数据
+    handleClose() {
+      this.form = {};
+      this.dialog = false;
+      this.search();
+    },
+    // 查看信息
+    toViews({ data }) {
+      this.newsSearch({ column_id: data.id });
+    },
+    // 新闻信息列表
+    async newsSearch({ skip = 0, limit = 10, column_id, ...info } = {}) {
+      if (column_id) info.column_id = column_id;
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 修改
+    newsEdit({ data }) {
+      this.$router.push({ path: '/adminCenter/news/detail', query: { id: data.id } });
+    },
+    // 删除
+    async newsDelete({ data }) {
+      let res = await this.delete(data.id);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息删除成功',
+          type: 'success',
+        });
+        this.newsSearch();
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .left {
+    border: 1px solid #ccc;
+    .top {
+      height: 50px;
+      padding: 10px;
+      border-bottom: 1px solid #ccc;
+      .title {
+        padding: 2px 0;
+        font-size: 18px;
+        font-weight: bold;
+      }
+      .btn {
+        text-align: right;
+      }
+    }
+    .down {
+      min-height: 670px;
+    }
+  }
+  .right {
+    border: 1px solid #ccc;
+    .top {
+      height: 50px;
+      padding: 10px;
+      border-bottom: 1px solid #ccc;
+      .title {
+        padding: 2px 0;
+        font-size: 18px;
+        font-weight: bold;
+      }
+      .btn {
+        text-align: right;
+      }
+    }
+    .down {
+      min-height: 670px;
+    }
+  }
+}
+</style>

+ 134 - 0
src/views/adminCenter/patentnav/detail.vue

@@ -0,0 +1,134 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-button type="primary" size="mini" @click="back">返回</el-button>
+        </el-col>
+        <el-col :span="24" class="down" v-loading="loading">
+          <data-form :data="form" :fields="fields" :rules="{}" @save="toSave" v-if="!loading" :useEnter="false">
+            <template #custom="{ item, form }">
+              <template v-if="item.model == 'filepath'">
+                <upload
+                  :limit="1"
+                  :data="form.filepath"
+                  listType=""
+                  type="filepath"
+                  :url="'/files/filepath/upload'"
+                  @upload="uploadSuccess"
+                  @delete="uploadDelete"
+                ></upload>
+              </template>
+              <template v-else-if="item.model == 'is_show'">
+                <el-switch v-model="form.is_show" active-color="#13ce66" inactive-color="#ff4949" active-text="展示" inactive-text="不展示"> </el-switch>
+              </template>
+            </template>
+            <template #radios="{ item }">
+              <template v-if="item.model === 'is_show'">
+                <el-radio :label="false">不展示</el-radio>
+                <el-radio :label="true">展示</el-radio>
+              </template>
+            </template>
+          </data-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataForm from '@common/src/components/frame/form.vue';
+import upload from '@common/src/components/frame/upload.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mappatentnav } = createNamespacedHelpers('patentnav');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'detail',
+  props: {},
+  components: { dataForm, upload },
+  data: function () {
+    return {
+      fields: [
+        { label: '是否展示', model: 'is_show', type: 'radio' },
+        { label: '信息标题', model: 'title' },
+        { label: '发布时间', model: 'publish_time', type: 'date' },
+        { label: '信息来源', model: 'origin' },
+        { label: '信息简介', model: 'brief', type: 'textarea' },
+        { label: '内容', model: 'content', type: 'editor' },
+        { label: '附件文件', model: 'filepath', custom: true },
+      ],
+      form: {},
+      loading: false,
+    };
+  },
+  async created() {
+    if (this.id) {
+      await this.search();
+    }
+  },
+  methods: {
+    ...mappatentnav(['fetch', 'update', 'create']),
+    async search() {
+      this.loading = true;
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+        this.loading = false;
+      }
+    },
+    async toSave({ data }) {
+      if (data.id) {
+        let res = await this.update(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息修改成功',
+            type: 'success',
+          });
+          this.back();
+        }
+      } else {
+        data.user_id = this.user.id;
+        let res = await this.create(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息创建成功',
+            type: 'success',
+          });
+          this.back();
+        }
+      }
+    },
+
+    // 返回列表
+    back() {
+      this.$router.push({ path: '/adminCenter/patentnav/index' });
+    },
+    // 图片上传
+    uploadSuccess({ type, data }) {
+      this.$set(this.form, `${type}`, { url: data.uri, name: data.name });
+    },
+    // 删除图片
+    uploadDelete(data) {
+      this.$set(this.form, `${data.type}`, {});
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 102 - 0
src/views/adminCenter/patentnav/index.vue

@@ -0,0 +1,102 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-button type="primary" size="mini" @click="add">添加</el-button>
+        </el-col>
+        <el-col :span="24" class="down">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @edit="toEdit" @delete="toDelete"></data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mappatentnav } = createNamespacedHelpers('patentnav');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: { dataTable },
+  data: function () {
+    return {
+      opera: [
+        {
+          label: '编辑',
+          method: 'edit',
+        },
+        {
+          label: '删除',
+          method: 'delete',
+        },
+      ],
+      fields: [
+        { label: '信息标题', prop: 'title' },
+        { label: '信息来源', prop: 'origin' },
+        { label: '发布时间', prop: 'publish_time' },
+        {
+          label: '是否展示',
+          prop: 'is_show',
+          format: (item) => {
+            return item === true ? '展示' : '不展示';
+          },
+        },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mappatentnav(['query', 'fetch', 'create', 'update', 'delete']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      info.user_id = this.user.id;
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 修改
+    toEdit({ data }) {
+      this.$router.push({ path: '/adminCenter/patentnav/detail', query: { id: data.id } });
+    },
+    // 删除
+    async toDelete({ data }) {
+      let res = await this.delete(data.id);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息删除成功',
+          type: 'success',
+        });
+        this.search();
+      }
+    },
+    // 添加数据
+    add() {
+      this.$router.push({ path: '/adminCenter/patentnav/detail' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 95 - 0
src/views/adminCenter/product/detail.vue

@@ -0,0 +1,95 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-button type="primary" size="mini" @click="back">返回</el-button>
+        </el-col>
+        <el-col :span="24" class="info">
+          <el-tabs v-model="type" type="card">
+            <el-tab-pane label="科技需求" name="0">
+              <oneDetail :form="form" @onSubmit="onSubmit"></oneDetail>
+            </el-tab-pane>
+            <el-tab-pane label="技术成果" name="1">
+              <twoDetail :form="form" @onSubmit="onSubmit"></twoDetail>
+            </el-tab-pane>
+            <el-tab-pane label="商务服务" name="2">
+              <thrDetail :form="form" @onSubmit="onSubmit"></thrDetail>
+            </el-tab-pane>
+          </el-tabs>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import oneDetail from './parts/oneDetail.vue';
+import twoDetail from './parts/twoDetail.vue';
+import thrDetail from './parts/thrDetail.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: product } = createNamespacedHelpers('product');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'detail',
+  props: {},
+  components: { oneDetail, twoDetail, thrDetail },
+  data: function () {
+    return {
+      form: {},
+    };
+  },
+  async created() {
+    if (this.id) {
+      await this.search();
+    }
+  },
+  methods: {
+    ...product(['fetch', 'update']),
+    // 查询详情
+    async search() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+      }
+    },
+    // 提交审核
+    async onSubmit({ data }) {
+      let res = await this.update(data);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息修改成功',
+          type: 'success',
+        });
+        this.back();
+      }
+    },
+    // 返回
+    back() {
+      this.form = {};
+      this.$router.push({ path: '/adminCenter/product/index' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+    type() {
+      return this.$route.query.type || '0';
+    },
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 120 - 0
src/views/adminCenter/product/index.vue

@@ -0,0 +1,120 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        <el-tabs v-model="active" type="card">
+          <el-tab-pane label="待审核" name="first">
+            <data-table :opera="opera" :fields="fields" :data="oneList" :total="oneTotal" @query="search" @edit="toEdit" @delete="toDelete"></data-table>
+          </el-tab-pane>
+          <el-tab-pane label="审核通过" name="second">
+            <data-table :opera="opera" :fields="fields" :data="twoList" :total="twoTotal" @query="search" @edit="toEdit" @delete="toDelete"></data-table>
+          </el-tab-pane>
+          <el-tab-pane label="审核失败" name="third">
+            <data-table :opera="opera" :fields="fields" :data="thrList" :total="thrTotal" @query="search" @edit="toEdit" @delete="toDelete"></data-table>
+          </el-tab-pane>
+        </el-tabs>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: product } = createNamespacedHelpers('product');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: {
+    dataTable,
+  },
+  data: function () {
+    return {
+      active: 'first',
+      opera: [
+        {
+          label: '审核&查看',
+          method: 'edit',
+        },
+        {
+          label: '删除',
+          method: 'delete',
+        },
+      ],
+      // 科技需求
+      fields: [
+        { label: '名称', prop: 'name', showTip: true },
+        {
+          label: '信息类型',
+          prop: 'type',
+          format: (item) => {
+            return item === '0' ? '科技需求' : item === '1' ? '技术成果' : '商务服务';
+          },
+        },
+        { label: '联系电话', prop: 'phone' },
+        { label: '时间', prop: 'create_time', showTip: true },
+        {
+          label: '状态',
+          prop: 'status',
+          format: (item) => {
+            return item === '0' ? '草稿' : item === '1' ? '审核中' : item === '2' ? '审核通过' : '审核失败';
+          },
+        },
+      ],
+      oneList: [],
+      oneTotal: 0,
+      twoList: [],
+      twoTotal: 0,
+      thrList: [],
+      thrTotal: 0,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...product(['query', 'delete']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let user = this.user;
+      if (user.code) info.code = user.code;
+      let res = await this.query({ skip, limit, status: '1', ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `oneList`, res.data);
+        this.$set(this, `oneTotal`, res.total);
+      }
+      res = await this.query({ skip, limit, status: '2', ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `twoList`, res.data);
+        this.$set(this, `twoTotal`, res.total);
+      }
+      res = await this.query({ skip, limit, status: '3', ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `thrList`, res.data);
+        this.$set(this, `thrTotal`, res.total);
+      }
+    },
+    toEdit({ data }) {
+      this.$router.push({ path: '/adminCenter/product/detail', query: { id: data.id, type: data.type } });
+    },
+    async toDelete({ data }) {
+      let res = await this.delete(data.id);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息删除成功',
+          type: 'success',
+        });
+        this.search();
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped></style>

+ 325 - 0
src/views/adminCenter/product/parts/oneDetail.vue

@@ -0,0 +1,325 @@
+<template>
+  <div id="oneDetail">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-form ref="form" :model="form" :rules="{}" label-width="140px">
+          <el-col :span="24" class="form">
+            <el-col :span="24">
+              <el-form-item prop="company">
+                <el-col :span="21" slot="label">
+                  企业名称
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.company" placeholder="请输入企业名称" disabled></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="phone">
+                <el-col :span="21" slot="label">
+                  联系电话
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.phone" placeholder="请输入联系电话" disabled></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="email">
+                <el-col :span="21" slot="label">
+                  电子邮箱
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.email" placeholder="请输入电子邮箱" disabled></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="contacts">
+                <el-col :span="21" slot="label">
+                  联系人
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.contacts" placeholder="请输入联系人"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="qqwx">
+                <el-col :span="21" slot="label">
+                  QQ/微信
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.qqwx" placeholder="请输入QQ/微信"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item prop="name">
+                <el-col :span="21" slot="label">
+                  需求名称
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.name" placeholder="请输入需求名称"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="langSelect">
+              <el-form-item prop="degreeurgency">
+                <el-col :span="21" slot="label">
+                  需求紧急程度
+                </el-col>
+                <el-col :span="24">
+                  <el-select v-model="form.degreeurgency" placeholder="请选择需求紧急程度" clearable>
+                    <el-option label="特急" value="特急"></el-option>
+                    <el-option label="一般" value="一般"></el-option>
+                    <el-option label="长期" value="长期"></el-option>
+                  </el-select>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="langSelect">
+              <el-form-item prop="field">
+                <el-col :span="21" slot="label">
+                  所属领域
+                </el-col>
+                <el-col :span="24">
+                  <el-select v-model="form.field" filterable clearable>
+                    <el-option v-for="(item, index) in fieldList" :key="index" :value="item.name" :label="item.name"></el-option>
+                  </el-select>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="budget">
+                <el-col :span="21" slot="label">
+                  投资预算
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.budget" placeholder="请输入投资预算"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="langSelect">
+              <el-form-item prop="cooperation">
+                <el-col :span="21" slot="label">
+                  合作方式
+                </el-col>
+                <el-col :span="24">
+                  <el-select v-model="form.cooperation" filterable clearable>
+                    <el-option v-for="(item, index) in cooperationList" :key="index" :value="item.name" :label="item.name"></el-option>
+                  </el-select>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="requirementdesc">
+                <el-col :span="21" slot="label">
+                  技术说明
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.requirementdesc"
+                    type="textarea"
+                    maxlength="500"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入技术说明"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="expect">
+                <el-col :span="21" slot="label">
+                  预期目标
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.expect"
+                    type="textarea"
+                    maxlength="500"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入预期目标"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="present">
+                <el-col :span="21" slot="label">
+                  需求现状
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.present"
+                    type="textarea"
+                    maxlength="500"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入需求现状"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="condition">
+                <el-col :span="21" slot="label">
+                  合作条件及要求
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.condition"
+                    type="textarea"
+                    maxlength="500"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入合作条件及要求"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfoImage">
+              <el-form-item prop="image">
+                <el-col :span="21" slot="label">
+                  产品图片(6)
+                </el-col>
+                <el-col :span="24">
+                  <uploadArray
+                    :limit="6"
+                    :data="form.image"
+                    :uploadBtn="true"
+                    type="image"
+                    :url="`/files/image/upload`"
+                    @upload="uploadSuccess"
+                    @delete="uploadDelete"
+                  ></uploadArray>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item prop="status">
+                <el-col :span="21" slot="label">
+                  信息状态
+                </el-col>
+                <el-col :span="24">
+                  <el-radio-group v-model="form.status" style="width:97%">
+                    <el-radio label="1" disabled>待审核</el-radio>
+                    <el-radio label="2">审核通过</el-radio>
+                    <el-radio label="3">审核拒绝</el-radio>
+                  </el-radio-group>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="btn">
+              <el-button type="primary" size="mini" @click="onSubmit">提交审核</el-button>
+            </el-col>
+          </el-col>
+        </el-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import uploadArray from '@common/src/components/upload/uploadArray.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: code } = createNamespacedHelpers('code');
+export default {
+  name: 'oneDetail',
+  props: {
+    form: { type: Object },
+  },
+  components: { uploadArray },
+  data: function() {
+    return {
+      rules: {},
+      fieldList: [],
+      cooperationList: [],
+    };
+  },
+  async created() {
+    await this.searchType();
+  },
+  methods: {
+    ...code({ codeQuery: 'query' }),
+    // 查询字典表
+    async searchType() {
+      // 所属领域;
+      let res = await this.codeQuery({ category: '01' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `fieldList`, res.data);
+      }
+      // 合作方式;
+      res = await this.codeQuery({ category: '03' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `cooperationList`, res.data);
+      }
+    },
+    // 图片
+    uploadSuccess({ type, data }) {
+      let arr = _.get(this.form, type);
+      if (_.isArray(arr)) {
+        let datas = { name: data.name, url: data.uri };
+        this.form[type].push({ name: data.name, url: data.uri });
+      } else {
+        let newArr = [{ name: data.name, url: data.uri }];
+        this.$set(this.form, `${type}`, newArr);
+      }
+    },
+    // 删除图片
+    uploadDelete(index) {
+      this.form.image.splice(index, 1);
+    },
+    // 提交保存
+    onSubmit() {
+      this.$emit('onSubmit', { data: this.form });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.info {
+  .form {
+    /deep/.el-form-item {
+      margin-bottom: 0px;
+    }
+    /deep/.el-form-item__label {
+      border: 1px solid #dcdfe6;
+      line-height: 40px;
+    }
+    /deep/.el-input__inner {
+      border-radius: 0;
+      height: 42px;
+      line-height: 42px;
+    }
+    /deep/.el-radio-group {
+      border: 1px solid #ccc;
+      padding: 12px 20px;
+      width: 268px;
+    }
+    /deep/.langInfo .el-form-item__label {
+      padding: 37px 0;
+    }
+    /deep/.langInfo .el-textarea__inner {
+      height: 117px !important;
+    }
+    /deep/.langSelect .el-select {
+      width: 100%;
+    }
+    /deep/.langInfoImage .el-form-item__label {
+      padding: 53px 0;
+    }
+    .btn {
+      text-align: center;
+      padding: 10px 0;
+    }
+  }
+}
+</style>

+ 252 - 0
src/views/adminCenter/product/parts/thrDetail.vue

@@ -0,0 +1,252 @@
+<template>
+  <div id="thrDetail">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-form ref="form" :model="form" :rules="{}" label-width="140px">
+          <el-col :span="24" class="form">
+            <el-col :span="24">
+              <el-form-item prop="company">
+                <el-col :span="21" slot="label">
+                  企业名称
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.company" placeholder="请输入企业名称" disabled></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="phone">
+                <el-col :span="21" slot="label">
+                  联系电话
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.phone" placeholder="请输入联系电话" disabled></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="email">
+                <el-col :span="21" slot="label">
+                  电子邮箱
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.email" placeholder="请输入电子邮箱" disabled></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="contacts">
+                <el-col :span="21" slot="label">
+                  联系人
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.contacts" placeholder="请输入联系人"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="qqwx">
+                <el-col :span="21" slot="label">
+                  QQ/微信
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.qqwx" placeholder="请输入QQ/微信"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item prop="name">
+                <el-col :span="21" slot="label">
+                  信息名称
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.name" placeholder="请输入信息名称"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="messattribute">
+                <el-col :span="21" slot="label">
+                  信息属性
+                </el-col>
+                <el-col :span="24">
+                  <el-radio-group v-model="form.messattribute">
+                    <el-radio label="提供方"></el-radio>
+                    <el-radio label="需求方"></el-radio>
+                  </el-radio-group>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="demand">
+                <el-col :span="21" slot="label">
+                  需求程度
+                </el-col>
+                <el-col :span="24">
+                  <el-radio-group v-model="form.demand">
+                    <el-radio label="特急"></el-radio>
+                    <el-radio label="一般"></el-radio>
+                    <el-radio label="长期"></el-radio>
+                  </el-radio-group>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="informationdesc">
+                <el-col :span="21" slot="label">
+                  信息描述
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.informationdesc"
+                    type="textarea"
+                    maxlength="300"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入信息描述"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="coreelements">
+                <el-col :span="21" slot="label">
+                  核心要素
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.coreelements"
+                    type="textarea"
+                    maxlength="200"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入核心要素"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="priceinfo">
+                <el-col :span="21" slot="label">
+                  价格信息
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.priceinfo"
+                    type="textarea"
+                    maxlength="100"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入价格信息"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="businessexpect">
+                <el-col :span="21" slot="label">
+                  商务预期
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.expect"
+                    type="textarea"
+                    maxlength="200"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入商务预期"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item prop="status">
+                <el-col :span="21" slot="label">
+                  信息状态
+                </el-col>
+                <el-col :span="24">
+                  <el-radio-group v-model="form.status" style="width:97%">
+                    <el-radio label="1" disabled>待审核</el-radio>
+                    <el-radio label="2">审核通过</el-radio>
+                    <el-radio label="3">审核拒绝</el-radio>
+                  </el-radio-group>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="btn">
+              <el-button type="primary" size="mini" @click="onSubmit">提交审核</el-button>
+            </el-col>
+          </el-col>
+        </el-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'thrDetail',
+  props: { form: { type: Object } },
+  components: {},
+  data: function() {
+    return {
+      rules: {},
+    };
+  },
+  created() {},
+  methods: {
+    // 提交保存
+    onSubmit() {
+      this.$emit('onSubmit', { data: this.form });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.info {
+  .form {
+    /deep/.el-form-item {
+      margin-bottom: 0px;
+    }
+    /deep/.el-form-item__label {
+      border: 1px solid #dcdfe6;
+      line-height: 40px;
+    }
+    /deep/.el-input__inner {
+      border-radius: 0;
+      height: 42px;
+      line-height: 42px;
+    }
+    /deep/.el-radio-group {
+      border: 1px solid #ccc;
+      padding: 12px 20px;
+      width: 93.8%;
+    }
+    /deep/.langInfo .el-form-item__label {
+      padding: 37px 0;
+    }
+    /deep/.langInfo .el-textarea__inner {
+      height: 117px !important;
+    }
+    /deep/.langSelect .el-select {
+      width: 100%;
+    }
+    /deep/.langInfoImage .el-form-item__label {
+      padding: 53px 0;
+    }
+    .btn {
+      text-align: center;
+      padding: 10px 0;
+    }
+  }
+}
+</style>

+ 460 - 0
src/views/adminCenter/product/parts/twoDetail.vue

@@ -0,0 +1,460 @@
+<template>
+  <div id="twoDetail">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-form ref="form" :model="form" :rules="{}" label-width="140px">
+          <el-col :span="24" class="form">
+            <el-col :span="24">
+              <el-form-item prop="company">
+                <el-col :span="21" slot="label">
+                  企业名称
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.company" placeholder="请输入企业名称" disabled></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="phone">
+                <el-col :span="21" slot="label">
+                  联系电话
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.phone" placeholder="请输入联系电话" disabled></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="email">
+                <el-col :span="21" slot="label">
+                  电子邮箱
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.email" placeholder="请输入电子邮箱" disabled></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="contacts">
+                <el-col :span="21" slot="label">
+                  联系人
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.contacts" placeholder="请输入联系人"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="qqwx">
+                <el-col :span="21" slot="label">
+                  QQ/微信
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.qqwx" placeholder="请输入QQ/微信"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item prop="name">
+                <el-col :span="21" slot="label">
+                  成果名称
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.name" placeholder="请输入成果名称"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="langSelect">
+              <el-form-item prop="field">
+                <el-col :span="21" slot="label">
+                  所属领域
+                </el-col>
+                <el-col :span="24">
+                  <el-select v-model="form.field" filterable clearable>
+                    <el-option v-for="(item, index) in fieldList" :key="index" :value="item.name" :label="item.name"></el-option>
+                  </el-select>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="langSelect">
+              <el-form-item prop="cooperation">
+                <el-col :span="21" slot="label">
+                  合作方式
+                </el-col>
+                <el-col :span="24">
+                  <el-select v-model="form.cooperation" filterable clearable>
+                    <el-option v-for="(item, index) in cooperationList" :key="index" :value="item.name" :label="item.name"></el-option>
+                  </el-select>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="langSelect">
+              <el-form-item prop="achievestatus">
+                <el-col :span="21" slot="label">
+                  成果状态
+                </el-col>
+                <el-col :span="24">
+                  <el-select v-model="form.achievestatus" filterable>
+                    <el-option v-for="(item, index) in achievestatusList" :key="index" :value="item.name" :label="item.name"></el-option>
+                  </el-select>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="achieveown">
+                <el-col :span="21" slot="label">
+                  成果权属
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.achieveown" placeholder="请输入成果权属"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="langSelect">
+              <el-form-item prop="achievesource">
+                <el-col :span="21" slot="label">
+                  成果来源
+                </el-col>
+                <el-col :span="24">
+                  <el-select v-model="form.achievesource" placeholder="请选择成果来源">
+                    <el-option label="国家项目" value="国家项目"></el-option>
+                    <el-option label="省级项目" value="省级项目"></el-option>
+                    <el-option label="市级项目" value="市级项目"></el-option>
+                    <el-option label="自选项目" value="自选项目"></el-option>
+                  </el-select>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="intentionprice">
+                <el-col :span="21" slot="label">
+                  意向价格
+                </el-col>
+                <el-col :span="24">
+                  <el-input v-model="form.intentionprice" placeholder="请输入意向价格"></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item prop="patentinfo">
+                <el-col :span="21" slot="label">
+                  专利信息
+                </el-col>
+                <el-col :span="24" style="border:1px solid #ccc;padding:4px 10px;">
+                  <el-button type="primary" size="mini" @click="viewpatent()">查看信息</el-button>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="roadshow">
+              <el-form-item prop="roadshow">
+                <el-col :span="21" slot="label">
+                  项目路演
+                </el-col>
+                <el-col :span="24" style="padding:0 10px">
+                  <upload
+                    :limit="1"
+                    :data="form.roadshow"
+                    listType=""
+                    type="roadshow"
+                    :url="'/files/roadshow/upload'"
+                    @upload="roadshowSuccess"
+                    @delete="roadshowDelete"
+                  ></upload>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="achievebrief">
+                <el-col :span="21" slot="label">
+                  成果简介
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.achievebrief"
+                    type="textarea"
+                    maxlength="500"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入成果简介"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="features">
+                <el-col :span="21" slot="label">
+                  技术特点
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.features"
+                    type="textarea"
+                    maxlength="500"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入技术特点"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="team">
+                <el-col :span="21" slot="label">
+                  技术团队
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.team"
+                    type="textarea"
+                    maxlength="500"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入技术团队"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="expectations">
+                <el-col :span="21" slot="label">
+                  商业预期
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.expect"
+                    type="textarea"
+                    maxlength="500"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入商业预期"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfo">
+              <el-form-item prop="condition">
+                <el-col :span="21" slot="label">
+                  合作条件及要求
+                </el-col>
+                <el-col :span="24">
+                  <el-input
+                    v-model="form.condition"
+                    type="textarea"
+                    maxlength="500"
+                    show-word-limit
+                    :autosize="{ minRows: 4, maxRows: 5 }"
+                    placeholder="请输入合作条件及要求"
+                  ></el-input>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="langInfoImage">
+              <el-form-item prop="image">
+                <el-col :span="21" slot="label">
+                  产品图片(6)
+                </el-col>
+                <el-col :span="24">
+                  <uploadArray
+                    :limit="6"
+                    :data="form.image"
+                    :uploadBtn="true"
+                    type="image"
+                    :url="`/files/image/upload`"
+                    @upload="uploadSuccess"
+                    @delete="uploadDelete"
+                  ></uploadArray>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item prop="status">
+                <el-col :span="21" slot="label">
+                  信息状态
+                </el-col>
+                <el-col :span="24">
+                  <el-radio-group v-model="form.status" style="width:97%">
+                    <el-radio label="1" disabled>待审核</el-radio>
+                    <el-radio label="2">审核通过</el-radio>
+                    <el-radio label="3">审核拒绝</el-radio>
+                  </el-radio-group>
+                </el-col>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="btn">
+              <el-button type="primary" size="mini" @click="onSubmit">提交审核</el-button>
+            </el-col>
+          </el-col>
+        </el-form>
+      </el-col>
+    </el-row>
+    <el-dialog title="查看专利信息" :visible.sync="viewpatentdialog" width="40%" :before-close="patentdialogclose">
+      <el-table :data="patent" style="width: 100%" border>
+        <el-table-column prop="patentinfo" label="专利信息" align="center"> </el-table-column>
+        <el-table-column prop="patentstatus" label="专利状态" align="center"> </el-table-column>
+        <el-table-column label="操作" align="center">
+          <template v-slot="scoped">
+            <el-button type="text" @click="delAttend(scoped.$index, scoped.row)" size="small">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import upload from '@common/src/components/frame/upload.vue';
+import uploadArray from '@common/src/components/upload/uploadArray.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: code } = createNamespacedHelpers('code');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'twoDetail',
+  props: { form: { type: Object } },
+  components: { upload, uploadArray },
+  data: function() {
+    return {
+      rules: {},
+      fieldList: [],
+      cooperationList: [],
+      achievestatusList: [],
+      // 专利信息
+      addpatentform: {},
+      patent: [],
+      viewpatentdialog: false,
+    };
+  },
+  async created() {
+    await this.searchType();
+  },
+  methods: {
+    ...code({ codeQuery: 'query' }),
+    // 查询字典表
+    async searchType() {
+      // 所属领域;
+      let res = await this.codeQuery({ category: '01' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `fieldList`, res.data);
+      }
+      // 合作方式;
+      res = await this.codeQuery({ category: '03' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `cooperationList`, res.data);
+      }
+      // 成果状态
+      res = await this.codeQuery({ category: '02' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `achievestatusList`, res.data);
+      }
+    },
+    // 图片
+    uploadSuccess({ type, data }) {
+      let arr = _.get(this.form, type);
+      if (_.isArray(arr)) {
+        let datas = { name: data.name, url: data.uri };
+        this.form[type].push({ name: data.name, url: data.uri });
+      } else {
+        let newArr = [{ name: data.name, url: data.uri }];
+        this.$set(this.form, `${type}`, newArr);
+      }
+    },
+    // 删除图片
+    uploadDelete(index) {
+      this.form.image.splice(index, 1);
+    },
+    // 项目路演文件上传
+    roadshowSuccess({ type, data }) {
+      this.$set(this.form, `${type}`, data.uri);
+    },
+    // 项目路演文件删除
+    roadshowDelete(data) {
+      this.$set(this.form, `${data.type}`, null);
+    },
+    // 查看专利信息
+    viewpatent() {
+      this.viewpatentdialog = true;
+    },
+    // 删除
+    delAttend(index, val) {
+      this.patent.splice(index, 1);
+      this.$message({
+        message: '删除专利信息成功',
+        type: 'success',
+      });
+      this.patentdialogclose();
+    },
+    // 取消
+    patentdialogclose() {
+      this.addpatentform = {};
+      this.addpatentdialog = false;
+      this.viewpatentdialog = false;
+    },
+    // 提交保存
+    onSubmit() {
+      this.form.patent = this.patent;
+      this.$emit('onSubmit', { data: this.form });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {
+    form: {
+      handler() {
+        if (this.form.patent) this.$set(this, `patent`, this.form.patent);
+      },
+      immediate: true,
+      deep: true,
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.info {
+  .form {
+    /deep/.el-form-item {
+      margin-bottom: 0px;
+    }
+    /deep/.el-form-item__label {
+      border: 1px solid #dcdfe6;
+      line-height: 40px;
+    }
+    /deep/.el-input__inner {
+      border-radius: 0;
+      height: 42px;
+      line-height: 42px;
+    }
+    /deep/.el-radio-group {
+      border: 1px solid #ccc;
+      padding: 12px 20px;
+      width: 268px;
+    }
+    /deep/.langInfo .el-form-item__label {
+      padding: 37px 0;
+    }
+    /deep/.langInfo .el-textarea__inner {
+      height: 117px !important;
+    }
+    /deep/.langSelect .el-select {
+      width: 100%;
+    }
+    /deep/.langInfoImage .el-form-item__label {
+      padding: 53px 0;
+    }
+    .btn {
+      text-align: center;
+      padding: 10px 0;
+    }
+  }
+}
+.roadshow {
+  height: 90px;
+  border: 1px solid #ccc;
+  /deep/.el-form-item__label {
+    height: 90px;
+    line-height: 90px;
+  }
+}
+</style>

+ 54 - 0
src/views/adminCenter/updatePwd/index.vue

@@ -0,0 +1,54 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <data-form :data="form" :fields="formFields" :rules="rules" @save="toSave"> </data-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataForm from '@common/src/components/frame/form.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: adminLogin } = createNamespacedHelpers('adminLogin');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: { dataForm },
+  data: function() {
+    return {
+      formFields: [{ label: '新密码', model: 'passwd' }],
+      form: {},
+      rules: {
+        passwd: [{ required: true, message: '请输入密码' }],
+      },
+    };
+  },
+  created() {},
+  methods: {
+    ...adminLogin(['updatePwd']),
+    async toSave({ data }) {
+      data.id = this.user.id;
+      let res = await this.updatePwd(data);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '密码修改成功',
+          type: 'success',
+        });
+        localStorage.removeItem('token');
+        this.$router.push('/login');
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped></style>

+ 168 - 0
src/views/adminCenter/viewPoint/detail.vue

@@ -0,0 +1,168 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-button type="primary" size="mini" @click="back">返回</el-button>
+        </el-col>
+        <el-col :span="24" class="down" v-loading="loading">
+          <data-form :data="form" :fields="fields" :rules="{}" @save="toSave" v-if="!loading" :useEnter="false">
+            <template #custom="{ item, form }">
+              <template v-if="item.model == 'picture'">
+                <upload :limit="1" :data="form.picture" type="picture" :url="'/files/picture/upload'" @upload="uploadSuccess" @delete="uploadDelete"></upload>
+              </template>
+              <template v-else-if="item.model == 'video'">
+                <upload
+                  :limit="1"
+                  :data="form.video"
+                  listType=""
+                  type="video"
+                  :url="'/files/video/upload'"
+                  @upload="uploadSuccess"
+                  @delete="uploadDelete"
+                ></upload>
+              </template>
+              <template v-else-if="item.model == 'filepath'">
+                <upload
+                  :limit="1"
+                  :data="form.filepath"
+                  listType=""
+                  type="filepath"
+                  :url="'/files/filepath/upload'"
+                  @upload="uploadSuccess"
+                  @delete="uploadDelete"
+                ></upload>
+              </template>
+              <template v-else-if="item.model == 'is_money'">
+                <el-switch v-model="form.is_money" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
+              </template>
+              <template v-else-if="item.model == 'money_url'">
+                <upload
+                  :limit="1"
+                  :data="form.money_url"
+                  type="money_url"
+                  :url="'/files/moneyurl/upload'"
+                  @upload="uploadMoney"
+                  @delete="uploadDelMoney"
+                  v-if="form.is_money"
+                ></upload>
+              </template>
+            </template>
+          </data-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataForm from '@common/src/components/frame/form.vue';
+import upload from '@common/src/components/frame/upload.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mapViewPoint } = createNamespacedHelpers('viewPoint');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'detail',
+  props: {},
+  components: { dataForm, upload },
+  data: function () {
+    return {
+      fields: [
+        { label: '信息标题', model: 'title' },
+        { label: '发布时间', model: 'publish_time', type: 'date' },
+        { label: '信息来源', model: 'origin' },
+        { label: '信息简介', model: 'brief', type: 'textarea' },
+        { label: '是否收费', model: 'is_money', custom: true },
+        { label: '上传收款图片', model: 'money_url', custom: true },
+        { label: '图片文件', model: 'picture', custom: true },
+        { label: '视频文件', model: 'video', custom: true },
+        { label: '附件文件', model: 'filepath', custom: true },
+        { label: '内容', model: 'content', type: 'editor' },
+      ],
+      form: {},
+      loading: false,
+    };
+  },
+  async created() {
+    if (this.id) {
+      await this.search();
+    }
+  },
+  methods: {
+    ...mapViewPoint(['fetch', 'update', 'create']),
+    async search() {
+      this.loading = true;
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+        this.loading = false;
+      }
+    },
+    async toSave({ data }) {
+      if (data.id) {
+        let res = await this.update(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息修改成功',
+            type: 'success',
+          });
+          this.back();
+        }
+      } else {
+        data.user_id = this.user.id;
+        let res = await this.create(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息创建成功',
+            type: 'success',
+          });
+          this.back();
+        }
+      }
+    },
+
+    // 返回列表
+    back() {
+      this.$router.push({ path: '/adminCenter/viewPoint/index' });
+    },
+    // 钱图片上传
+    uploadMoney({ type, data }) {
+      this.$set(this.form, `${type}`, data.uri);
+    },
+    // 钱图片删除
+    uploadDelMoney(data) {
+      this.$set(this.form, `${data.type}`, null);
+    },
+    // 图片上传
+    uploadSuccess({ type, data }) {
+      this.$set(this.form, `${type}`, { url: data.uri, name: data.name });
+    },
+    // 删除图片
+    uploadDelete(data) {
+      this.$set(this.form, `${data.type}`, {});
+    },
+    number() {
+      this.form.money = this.form.money.replace(/[^\.\d]/g, '');
+      this.form.money = this.form.money.replace('.', '');
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 95 - 0
src/views/adminCenter/viewPoint/index.vue

@@ -0,0 +1,95 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-button type="primary" size="mini" @click="add">添加</el-button>
+        </el-col>
+        <el-col :span="24" class="down">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @edit="toEdit" @delete="toDelete"></data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mapViewPoint } = createNamespacedHelpers('viewPoint');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: { dataTable },
+  data: function () {
+    return {
+      opera: [
+        {
+          label: '编辑',
+          method: 'edit',
+        },
+        {
+          label: '删除',
+          method: 'delete',
+        },
+      ],
+      fields: [
+        { label: '信息标题', prop: 'title' },
+        { label: '信息来源', prop: 'origin' },
+        { label: '发布时间', prop: 'publish_time' },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapViewPoint(['query', 'fetch', 'create', 'update', 'delete']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      info.user_id = this.user.id;
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 修改
+    toEdit({ data }) {
+      this.$router.push({ path: '/adminCenter/viewPoint/detail', query: { id: data.id } });
+    },
+    // 删除
+    async toDelete({ data }) {
+      let res = await this.delete(data.id);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '信息删除成功',
+          type: 'success',
+        });
+        this.search();
+      }
+    },
+    // 添加数据
+    add() {
+      this.$router.push({ path: '/adminCenter/viewPoint/detail' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+}
+</style>