guhongwei 3 years ago
parent
commit
f69dbc6f37

+ 0 - 70
src/router/index.js

@@ -31,16 +31,6 @@ const web = [
         meta: { title: '首页' },
         component: () => import('../views/adminCenter/homeIndex/index.vue'),
       },
-      {
-        path: '/adminCenter/test/index',
-        meta: { title: '测试菜单' },
-        component: () => import('../views/adminCenter/test/index.vue'),
-      },
-      {
-        path: '/adminCenter/test/detail',
-        meta: { title: '测试菜单-信息管理' },
-        component: () => import('../views/adminCenter/test/detail.vue'),
-      },
       {
         path: '/adminCenter/mechanism/index',
         meta: { title: '机构用户管理' },
@@ -61,36 +51,6 @@ const web = [
         meta: { title: '平台用户详情' },
         component: () => import('../views/adminCenter/user/detail.vue'),
       },
-      {
-        path: '/adminCenter/disclosure/index',
-        meta: { title: '申请管理' },
-        component: () => import('../views/adminCenter/disclosure/index.vue'),
-      },
-      {
-        path: '/adminCenter/disclosure/evaluate',
-        meta: { title: '预评估' },
-        component: () => import('../views/adminCenter/disclosure/evaluate.vue'),
-      },
-      {
-        path: '/adminCenter/message/index',
-        meta: { title: '消息管理' },
-        component: () => import('../views/adminCenter/message/index.vue'),
-      },
-      {
-        path: '/adminCenter/patent/index',
-        meta: { title: '专利管理' },
-        component: () => import('../views/adminCenter/patent/index.vue'),
-      },
-      {
-        path: '/adminCenter/patent/result',
-        meta: { title: '专利-导出查看' },
-        component: () => import('../views/adminCenter/patent/export_result.vue'),
-      },
-      {
-        path: '/adminCenter/trade/index',
-        meta: { title: '交易管理' },
-        component: () => import('../views/adminCenter/trade/index.vue'),
-      },
     ],
   },
   {
@@ -114,36 +74,6 @@ const web = [
         meta: { title: '平台用户详情' },
         component: () => import('../views/jg/user/detail.vue'),
       },
-      {
-        path: '/jg/disclosure/index',
-        meta: { title: '申请管理' },
-        component: () => import('../views/jg/disclosure/index.vue'),
-      },
-      {
-        path: '/jg/patent/index',
-        meta: { title: '专利管理' },
-        component: () => import('../views/jg/patent/index.vue'),
-      },
-      {
-        path: '/jg/message/index',
-        meta: { title: '我的消息' },
-        component: () => import('../views/jg/message/index.vue'),
-      },
-      {
-        path: '/jg/trade/index',
-        meta: { title: '交易管理' },
-        component: () => import('../views/jg/trade/index.vue'),
-      },
-      {
-        path: '/jg/statistics/index',
-        meta: { title: '统计管理' },
-        component: () => import('../views/jg/statistics/index.vue'),
-      },
-      {
-        path: '/jg/patent/result',
-        meta: { title: '专利-导出查看' },
-        component: () => import('../views/jg/patent/export_result.vue'),
-      },
     ],
   },
 ];

+ 0 - 93
src/views/adminCenter/disclosure/detail.vue

@@ -1,93 +0,0 @@
-<template>
-  <div id="detail">
-    <data-form v-model="form" @save="toSave" :fields="fields" submitText="审核" :needSave="false" labelWidth="180px">
-      <template #status>
-        <el-radio v-for="(i, index) in statusList" :key="`status-${index}`" :label="i.value"> {{ i.label }}</el-radio>
-      </template>
-    </data-form>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-import quests from '@common/dict/patent/quests';
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'detail',
-  props: {
-    form: { type: Object, default: () => {} },
-  },
-  model: {
-    prop: 'form',
-    event: 'change',
-  },
-  components: {},
-  data: function () {
-    return {
-      fields: [
-        { label: '发明名称', model: 'name', type: 'text', required: true },
-        { label: '申请人', model: 'apply_name', required: true, type: 'text' },
-        { label: '申请类型', model: 'type', type: 'text', required: true },
-        { label: '发明人', model: 'inventor', type: 'text', required: true },
-        { label: '技术联系人', model: 'contact', type: 'text', required: true },
-        { label: '联系人电话', model: 'phone', type: 'text', required: true },
-        { label: '联系人邮箱', model: 'email', type: 'text', required: true },
-        { label: '特殊情况说明', model: 'desc', type: 'text', required: true },
-      ],
-      typeList: [{ label: '国家发明' }, { label: '国防专利' }, { label: '实用新型' }, { label: '外观' }],
-      statusList: [
-        { label: '通过', value: '1' },
-        { label: '拒绝', value: '-1' },
-      ],
-    };
-  },
-  created() {
-    this.setQuest();
-  },
-  methods: {
-    async toSave({ data }) {
-      this.$emit('submit', data);
-    },
-    setQuest() {
-      let fields = _.cloneDeep(this.fields);
-      let qs = _.cloneDeep(quests);
-      qs = qs.map((i) => {
-        i.type = 'text';
-        return i;
-      });
-      fields.push(...qs);
-      fields = fields.map((i) => {
-        delete i.required;
-        return i;
-      });
-      // 添加审核
-      // const checkField = [
-      //   {
-      //     label: '预估结果',
-      //     model: 'status',
-      //     type: 'radio',
-      //     required: true,
-      //   },
-      //   {
-      //     label: '意见&建议',
-      //     model: 'remark',
-      //     type: 'textarea',
-      //   },
-      // ];
-      // fields.push(...checkField);
-      this.$set(this, `fields`, fields);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 70
src/views/adminCenter/disclosure/evaluate.vue

@@ -1,70 +0,0 @@
-<template>
-  <div id="evaluate">
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @check="toCheck"> </data-table>
-    <el-dialog title="评估" width="80vw" center :visible.sync="dialog" :close-on-click-modal="false">
-      <el-row :gutter="20">
-        <el-col :span="12">
-          <info v-model="form"></info>
-        </el-col>
-        <el-col :span="12"> <propose></propose></el-col>
-      </el-row>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import info from './detail.vue';
-import propose from './propose.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: disclosure } = createNamespacedHelpers('disclosure');
-export default {
-  name: 'evaluate',
-  props: {},
-  components: { info, propose },
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      dialog: false,
-      form: {},
-      fields: [
-        { label: '发明名称', model: 'name', filter: true },
-        { label: '申请人', model: 'apply_name' },
-        { label: '申请类型', model: 'type' },
-        { label: '技术联系人', model: 'contact' },
-        { label: '联系人电话', model: 'phone' },
-        { label: '联系人邮箱', model: 'email' },
-      ],
-      opera: [{ label: '评估报告', method: 'check' }],
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...disclosure(['query', 'check']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-    async toCheck({ data }) {
-      this.$set(this, `form`, data);
-      this.dialog = true;
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 180
src/views/adminCenter/disclosure/index.vue

@@ -1,180 +0,0 @@
-<template>
-  <div id="index">
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView" @check="toCheck" @up="toUp"> </data-table>
-    <el-dialog :title="dtitle" width="80vw" center :visible.sync="dialog" :close-on-click-modal="dspan === 24" :destroy-on-close="true">
-      <el-row :gutter="20">
-        <el-col :span="dspan">
-          <info v-model="form"></info>
-        </el-col>
-        <el-col :span="12" v-if="dspan === 12">
-          <el-input v-model="form.remark" placeholder="请输入您的意见" type="textarea" :autosize="{ minRows: 5, maxRows: 10 }"></el-input>
-          <div style="width: 100%; margin: 16px; text-align: center">
-            <el-button type="success" style="width: 25%" @click="toReport('3')">通过</el-button>
-            <el-button type="danger" style="width: 25%" @click="toReport('-2')">拒绝</el-button>
-            <el-button style="width: 25%" @click="dialog = false">返回</el-button>
-          </div>
-        </el-col>
-      </el-row>
-    </el-dialog>
-    <el-dialog title="评估报告" center :visible.sync="d2" :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false">
-      <el-input v-model="report.content" placeholder="请输入评估报告内容" type="textarea" :autosize="{ minRows: 5, maxRows: 10 }"></el-input>
-      <div style="width: 100%; margin: 16px; text-align: center">
-        <el-button type="success" style="width: 80%" @click="makeReport()">评估</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-import info from './detail.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: disclosure } = createNamespacedHelpers('disclosure');
-const { mapActions: report } = createNamespacedHelpers('report');
-export default {
-  name: 'index',
-  props: {},
-  components: { info },
-  data: function () {
-    return {
-      list: [{ status: '2' }],
-      total: 0,
-      dialog: false,
-      d2: false,
-      dtitle: '查看',
-      dspan: 24,
-      form: {},
-      report: {},
-      fields: [
-        { label: '发明名称', model: 'name', filter: true },
-        { label: '申请人', model: 'apply_name' },
-        { label: '申请类型', model: 'type' },
-        { label: '技术联系人', model: 'contact' },
-        { label: '联系人电话', model: 'phone' },
-        { label: '联系人邮箱', model: 'email' },
-        { label: '申请进度', model: 'status', format: (i) => this.statusWord(i) },
-      ],
-      opera: [
-        { label: '查看', method: 'view' },
-        { label: '评估', method: 'check', display: (i) => i.status === '2' },
-        { label: '上传', method: 'up', display: (i) => i.status === '3' },
-      ],
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...disclosure(['query', 'check']),
-    ...report(['create']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info, admin_id: this.user._id });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-    //查看
-    async toView({ data }) {
-      this.$set(this, `form`, data);
-      this.dtitle = '查看';
-      this.dspan = 24;
-      this.dialog = true;
-    },
-    //去评估
-    async toCheck({ data }) {
-      this.$set(this, `form`, data);
-      this.dtitle = '评估';
-      this.dspan = 12;
-      this.dialog = true;
-    },
-    //去上传
-    async toUp({ data }) {
-      this.$confirm(`${data.name} 已经上传到国家专利库中?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          this.$set(this, `form`, data);
-          this.toStatus('4');
-        })
-        .catch(() => {});
-    },
-    // 评估
-    async toReport(status) {
-      const { _id: disclosure_id } = _.cloneDeep(this.form);
-      this.report.disclosure_id = disclosure_id;
-      await this.toStatus(status);
-      this.$confirm(`是否生成评估报告`, '提示', {
-        confirmButtonText: '填写报告',
-        cancelButtonText: '否',
-        type: 'warning',
-      })
-        .then(() => {
-          this.d2 = true;
-        })
-        .catch(() => {});
-    },
-    // 申请状态修改
-    async toStatus(status) {
-      const { id, remark } = this.form;
-      const obj = { id, status, remark };
-      const res = await this.check(obj);
-      if (this.$checkRes(res, '操作成功', res.errmsg || '操作失败')) {
-        console.log(res);
-        // this.dialog = false;
-        // this.search();
-      }
-    },
-    async makeReport() {
-      const res = await this.create(this.report);
-      if (this.$checkRes(res, '评估报告已生成', res.errmsg || '评估报告生成失败')) {
-        this.d2 = false;
-        this.report = {};
-      }
-    },
-    // 状态词
-    statusWord(status) {
-      let word = '';
-      switch (status) {
-        case '0':
-          word = '已申请';
-          break;
-        case '1':
-          word = '机构审核';
-          break;
-        case '-1':
-          word = '机构审核未通过';
-          break;
-        case '2':
-          word = '管理员评估';
-          break;
-        case '-2':
-          word = '管理员评估未通过';
-          break;
-        case '3':
-          word = '管理员评估通过,等待上传至国家库';
-          break;
-        case '4':
-          word = '上传完成';
-          break;
-        default:
-          break;
-      }
-      return word;
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 38
src/views/adminCenter/disclosure/propose.vue

@@ -1,38 +0,0 @@
-<template>
-  <div id="propose">
-    <data-form v-model="form" :fields="fields" @save="toSave"></data-form>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'propose',
-  props: {
-    form: { type: Object, default: () => {} },
-  },
-  components: {},
-  data: function () {
-    return {
-      fields: [{ label: '整体意见', model: 'remark', type: 'textarea' }],
-    };
-  },
-  created() {},
-  methods: {
-    async toSave({ data }) {
-      console.log(data);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 58
src/views/adminCenter/message/index.vue

@@ -1,58 +0,0 @@
-<template>
-  <div id="index">
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @off="toOff"> </data-table>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: notice } = createNamespacedHelpers('notice');
-export default {
-  name: 'index',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      fields: [
-        { label: '消息内容', model: 'content' },
-        { label: '发送时间', model: 'create_time', width: '150px' },
-        { label: '是否已读', model: 'is_read', format: (i) => (i ? '已读' : '未读'), width: '150px' },
-      ],
-      opera: [{ label: '取消提醒', method: 'off', display: (i) => !i.is_read }],
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...notice(['query', 'update']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info, to: this.user._id });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-    async toOff({ data }) {
-      data.is_read = true;
-      const res = await this.update(data);
-      if (this.$checkRes(res, '消息已读', res.errmsg || '操作失败')) {
-        this.search();
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 66
src/views/adminCenter/patent/account.vue

@@ -1,66 +0,0 @@
-<template>
-  <div id="account">
-    <el-table border stripe :data="list" size="mini">
-      <el-table-column align="center" label="姓名" prop="name"></el-table-column>
-      <el-table-column align="center" label="电话" prop="phone"></el-table-column>
-      <el-table-column align="center" label="邮箱" prop="email"></el-table-column>
-      <el-table-column align="center" label="账户类型">
-        <template v-slot="account">
-          {{ checkType(account) }}
-        </template>
-      </el-table-column>
-      <el-table-column align="center" label="选择">
-        <template v-slot="{ $index }">
-          <el-link type="primary" :underline="false" @click="accountSelect($index)" v-if="!checkSelect($index)">选择</el-link>
-        </template>
-      </el-table-column>
-    </el-table>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'account',
-  props: {
-    list: { type: Array },
-  },
-  model: {
-    prop: 'list',
-    event: 'change',
-  },
-  components: {},
-  data: function () {
-    return {};
-  },
-  created() {},
-  methods: {
-    checkType({ row }) {
-      const keys = Object.keys(row);
-      const str = keys.find((f) => f === 'is_expert');
-      if (str) return '个人用户';
-      else return '企业用户';
-    },
-    checkSelect(index) {
-      const is_select = this.list[index].is_select;
-      if (is_select === true) return true;
-      else return false;
-    },
-    accountSelect(index) {
-      this.$emit('select', index);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 88
src/views/adminCenter/patent/export_result.vue

@@ -1,88 +0,0 @@
-<template>
-  <div id="result">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="top">
-          <el-button type="primary" size="mini" @click="$router.push('/adminCenter/patent/index')">返回</el-button>
-        </el-col>
-        <el-col :span="24" class="down">
-          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @download="toDownload"></data-table>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-const moment = require('moment');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: mission } = createNamespacedHelpers('mission');
-
-export default {
-  name: 'result',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      opera: [
-        {
-          label: '下载',
-          method: 'download',
-          display: (i) => i.status === '2',
-        },
-      ],
-      fields: [
-        { label: '标题', model: 'title' },
-        { label: '导出数据时间', model: 'meta.createdAt', format: (i) => this.getTime(i) },
-        {
-          label: '状态',
-          model: 'status',
-          format: (i) => (i == '0' ? '未开始' : i == '1' ? '进行中' : i == '2' ? '导出完成' : i == '3' ? '导出失败' : '未知状态'),
-        },
-        { label: '进度', model: 'progress' },
-        { label: '备注', model: 'remark' },
-      ],
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...mission(['query']),
-    async search({ skip = 0, limit = 10 } = {}) {
-      const res = await this.query({ skip, limit });
-      if (this.$checkRes(res)) {
-        this.$set(this, 'list', res.data);
-        this.$set(this, 'total', res.total);
-      }
-    },
-    toDownload({ data }) {
-      window.open(`http://broadcast.waityou24.cn/${data.uri}`);
-    },
-    getTime(i) {
-      return moment(i).format('YYYY-MM-DD HH:mm:ss');
-    },
-  },
-  computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.main {
-  .top {
-    text-align: right;
-    margin: 0 0 10px 0;
-  }
-}
-</style>

+ 0 - 84
src/views/adminCenter/patent/filter_bar.vue

@@ -1,84 +0,0 @@
-<template>
-  <div id="filter_bar" style="margin: 10px">
-    <el-row v-for="(l, rowIndex) in fields" :key="`row-${rowIndex}`">
-      <el-col :span="24">
-        <span>{{ l.label }}</span>
-        <span>:</span>
-        <template v-if="l.type === 'radio'">
-          <el-radio-group v-model="form[l.model]">
-            <el-radio :label="undefined">全部</el-radio>
-            <el-radio v-for="(i, index) in getList(rowIndex)" :key="`radio-${l.model}-${index}`" :label="i.value ? i.value : i.label">{{ i.label }}</el-radio>
-          </el-radio-group>
-        </template>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="24">
-        <el-button type="primary" size="small" @click="search()">查询</el-button>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-/**
- * fields:
- * label:字段中文
- * type:选择方式
- * model:字段
- * list:选择的选项,可以写死,可以请求:请求是以 ${model}List 形式命名传入组件,无需prop接收,直接使用$attrs即可;
- */
-const _ = require('lodash');
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'filter_bar',
-  props: {
-    form: {
-      type: Object,
-      default: () => {
-        return {};
-      },
-    },
-  },
-  model: {
-    prop: 'form',
-    event: 'change',
-  },
-  components: {},
-  data: function () {
-    return {
-      fields: [{ label: '申请类型', type: 'radio', model: 'type', list: [{ label: '发明' }, { label: '实用新型' }, { label: '其他', value: 'else' }] }],
-    };
-  },
-  created() {},
-  methods: {
-    getList(index) {
-      const field = this.fields[index];
-      let list = _.get(field, 'list');
-      if (list) return list;
-      const { model } = field;
-      list = _.get(this.$attrs, `${model}List`, []);
-      return list;
-    },
-    search() {
-      let data = _.cloneDeep(this.form);
-      let obj = {};
-      for (const key in data) {
-        if (data[key]) obj[key] = data[key];
-      }
-      this.$emit('search', obj);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 208
src/views/adminCenter/patent/index.vue

@@ -1,208 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24" style="text-align: right">
-        <el-popover placement="bottom" width="370" trigger="click" style="margin-right: 10px">
-          <template #reference>
-            <el-button type="primary" size="mini">导入</el-button>
-          </template>
-          <el-upload
-            class="upload-demo"
-            drag
-            action="/files/platform/patent_cms_import/upload"
-            multiple
-            :on-success="uSuccess"
-            :on-error="uError"
-            :before-upload="uBefore"
-            :show-file-list="false"
-          >
-            <i class="el-icon-upload"></i>
-            <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-          </el-upload>
-        </el-popover>
-        <el-button type="primary" size="mini" @click="getTemplate">下载导入模板</el-button>
-        <el-button type="primary" size="mini" @click="exportView">导出</el-button>
-        <el-button type="primary" size="mini" @click="toResult">查看导出结果</el-button>
-      </el-col>
-    </el-row>
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView">
-      <template #filter>
-        <filter-bar v-model="filter" @search="search"></filter-bar>
-      </template>
-    </data-table>
-    <el-dialog title="错误记录" center :visible.sync="dialog" :destroy-on-close="true">
-      <el-table border stripe :data="errorList" v-if="errcode === '1'">
-        <el-table-column align="center" label="错误记录">
-          <template v-slot="{ row }">{{ row }}</template>
-        </el-table-column>
-      </el-table>
-      <el-table border stripe :data="errorList" v-if="errcode === '2'">
-        <el-table-column align="center" label="发明名称" prop="name"></el-table-column>
-        <el-table-column align="center" label="发明人" prop="inventor"></el-table-column>
-        <el-table-column align="center" label="选择状态">
-          <template v-slot="{ row }">
-            {{ checkSelect(row) }}
-          </template>
-        </el-table-column>
-        <el-table-column align="center" label="选择">
-          <template v-slot="{ row, $index }">
-            <el-link type="primary" :underline="false" @click="toSelectUser(row, $index)">选择用户</el-link>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div style="margin: 16px; width: 100%; text-align: center">
-        <el-button type="primary" style="width: 60%" @click="toContinue">继续导入</el-button>
-      </div>
-      <el-dialog title="选择用户" :visible.sync="innerDialog" append-to-body :destroy-on-close="true">
-        <account v-model="nameList" @select="selectUser"></account>
-      </el-dialog>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import filterBar from './filter_bar.vue';
-import account from './account.vue';
-const _ = require('lodash');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: disclosure } = createNamespacedHelpers('disclosure');
-const { mapActions: patent } = createNamespacedHelpers('patent');
-export default {
-  name: 'index',
-  props: {},
-  components: { account, filterBar },
-  data: function () {
-    return {
-      filter: {},
-      list: [],
-      total: 0,
-      fields: [
-        { label: '申请号', model: 'create_number' },
-        { label: '申请日', model: 'create_date' },
-        { label: '标题', model: 'name' },
-        { label: '发明人', model: 'inventor' },
-        { label: '专利类型', model: 'type' },
-      ],
-      opera: [{ label: '查看', method: 'view' }],
-      dialog: false,
-      //错误
-      errcode: undefined,
-      temp_id: undefined,
-      errorList: [],
-      //选人
-      innerDialog: false,
-      nameList: [],
-      listIndex: undefined,
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...disclosure(['import', 'cacheImport', 'toExport']),
-    ...patent(['query']),
-    async search({ skip = 0, limit = 10 } = {}) {
-      const info = _.cloneDeep(this.filter);
-      const res = await this.query({ skip, limit, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-    toView({ data }) {
-      // TODO查看
-    },
-    // 导入
-    async toImport(uri) {
-      const res = await this.import({ uri });
-      const { data } = res;
-      if (data) {
-        this.$message.error('导入失败');
-        const { data: errorList, errcode, temp_id } = data;
-        this.$set(this, 'errorList', errorList);
-        this.$set(this, 'errcode', errcode);
-        this.$set(this, 'temp_id', temp_id);
-        this.dialog = true;
-      } else {
-        this.$set(this, 'errorList', []);
-        this.$set(this, 'errcode', undefined);
-        this.$set(this, 'temp_id', undefined);
-        this.$message.success('导入成功');
-      }
-    },
-    // 上传成功
-    uSuccess(response, file, fileList) {
-      const { uri } = response;
-      this.$checkRes(response, '上传成功!正在导入,请稍后...');
-      this.toImport(uri);
-    },
-    // 上传失败
-    uError(err, file, fileList) {
-      this.$message.error('上传失败');
-    },
-    // 正在上传
-    uBefore() {
-      this.$message('正在上传');
-    },
-    // 去选择用户
-    toSelectUser(data, index) {
-      this.$set(this, `nameList`, data.nameList);
-      this.$set(this, `listIndex`, index);
-      this.innerDialog = true;
-    },
-    // 选择用户
-    selectUser(index) {
-      let list = _.cloneDeep(this.nameList);
-      list = list.map((i) => {
-        i.is_select = false;
-        return i;
-      });
-      list[index].is_select = true;
-      this.$set(this.errorList[this.listIndex], 'nameList', list);
-      this.innerDialog = false;
-    },
-    // 检查是否选择用户
-    checkSelect(row) {
-      const r = row.nameList.find((f) => f.is_select);
-      return r ? '已选择' : '未选择';
-    },
-    // 继续导入
-    async toContinue() {
-      const r = this.errorList.find((f) => !f.nameList.find((f) => f.is_select));
-      if (r) {
-        this.$message.error('有未选择用户的数据,请重新检查');
-        return;
-      }
-      const obj = { data: _.cloneDeep(this.errorList), temp_id: this.temp_id };
-      const res = await this.cacheImport(obj);
-      if (this.$checkRes(res, '操作成功', res.errmsg || '操作失败')) {
-        this.dialog = false;
-      }
-    },
-    async exportView() {
-      const res = await this.toExport({ ...this.filter });
-      if (this.$checkRes(res, '正在导出,请稍后')) {
-      }
-    },
-    // 查看导出结果
-    async toResult() {
-      this.$router.push({ path: '/adminCenter/patent/result' });
-    },
-    // 下载模板
-    getTemplate() {
-      window.open('../../数据模板.xlsx');
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 30
src/views/adminCenter/statistics/index.vue

@@ -1,30 +0,0 @@
-<template>
-  <div id="index">
-    <p>statistics</p>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'index',
-  props: {},
-  components: {},
-  data: function () {
-    return {};
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 81
src/views/adminCenter/test/detail.vue

@@ -1,81 +0,0 @@
-<template>
-  <div id="detail">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="one">
-          <data-form :fields="fields" :data="form" @save="toSave" returns="/adminCenter/test/index">
-            <template #custom="{ item, form }">
-              <template v-if="item.model == 'img_url'">
-                <e-upload :limit="1" url="/files/study/test_imgurl/upload" type="img_url" v-model="form[item.model]"></e-upload>
-              </template>
-            </template>
-          </data-form>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: maptest } = createNamespacedHelpers('test');
-export default {
-  name: 'detail',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {
-        img_url: [],
-      },
-      fields: [
-        { label: '标题', model: 'title' },
-        { label: '图片文件', model: 'img_url', custom: true },
-        { label: '内容', model: 'content', type: 'editor', url: '/files/study/news_editor/upload' },
-      ],
-    };
-  },
-  created() {
-    if (this.id) this.search();
-  },
-  methods: {
-    ...maptest(['fetch', 'create', 'update']),
-    async search() {
-      let res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
-      }
-    },
-    async toSave({ data }) {
-      let dup = _.cloneDeep(data);
-      let res;
-      if (_.get(dup, 'id')) {
-        res = await this.update(dup);
-      } else {
-        res = await this.create(dup);
-      }
-      if (this.$checkRes(res, '保存成功', '保存失败')) {
-        if (this.$dev_mode) this.$router.push('/adminCenter/test/index');
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    id() {
-      return this.$route.query.id;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    test: {
-      deep: true,
-      immediate: true,
-      handler(val) {},
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 82
src/views/adminCenter/test/index.vue

@@ -1,82 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="one">
-          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @edit="toEdit" @delete="toDelete">
-            <template #selfbtn>
-              <el-button type="primary" size="mini" @click="toAdd">添加</el-button>
-            </template>
-          </data-table>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: maptest } = createNamespacedHelpers('test');
-export default {
-  name: 'index',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      opera: [
-        { label: '修改', method: 'edit' },
-        { label: '删除', method: 'delete', type: 'danger' },
-      ],
-      fields: [
-        { label: '标题', prop: 'title', filter: 'input' },
-        { label: '信息', prop: 'content' },
-      ],
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...maptest(['query', 'delete']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      let res = await this.query({ skip, limit, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-    // 添加
-    toAdd() {
-      this.$router.push({ path: '/adminCenter/test/detail' });
-    },
-    // 修改
-    toEdit({ data }) {
-      this.$router.push({ path: '/adminCenter/test/detail', query: { id: data.id } });
-    },
-    // 删除
-    async toDelete({ data }) {
-      const res = await this.delete(data._id);
-      if (this.$checkRes(res, '删除成功', '删除失败')) {
-        this.search();
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    test: {
-      deep: true,
-      immediate: true,
-      handler(val) {},
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 41
src/views/adminCenter/trade/index.vue

@@ -1,41 +0,0 @@
-<template>
-  <div id="index">
-    <el-tabs v-model="active" type="card">
-      <el-tab-pane label="交易" name="first">
-        <sell></sell>
-      </el-tab-pane>
-      <el-tab-pane label="求购" name="second">
-        <purchase></purchase>
-      </el-tab-pane>
-    </el-tabs>
-  </div>
-</template>
-
-<script>
-import sell from './sell.vue';
-import purchase from './purchase.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'index',
-  props: {},
-  components: { sell, purchase },
-  data: function () {
-    return {
-      active: 'first',
-    };
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 130
src/views/adminCenter/trade/parts/filter_bar.vue

@@ -1,130 +0,0 @@
-<template>
-  <div id="sell_filter_bar" style="margin: 10px">
-    <el-row v-for="(l, rowIndex) in fields" :key="`row-${rowIndex}`">
-      <el-col :span="24">
-        <span>{{ l.label }}</span>
-        <span>:</span>
-        <template v-if="l.type === 'radio'">
-          <el-radio-group v-model="form[l.model]">
-            <el-radio :label="undefined">全部</el-radio>
-            <el-radio v-for="(i, index) in getList(rowIndex)" :key="`radio-${l.model}-${index}`" :label="i.value ? i.value : i.label">{{ i.label }}</el-radio>
-          </el-radio-group>
-        </template>
-        <template v-if="l.type === 'range'">
-          <el-select v-model="form[l.model]" size="mini" @change="toClearWrite">
-            <template v-for="(i, index) in l.list">
-              <el-option :key="`options-${index}`" :label="`${i.start}-${i.end}元`" :value="`${i.start}-${i.end}`"></el-option>
-            </template>
-          </el-select>
-          <el-input style="width: 100px" size="mini" v-model.number="form[`${l.model}@start`]" placeholder="最小金额" @input="toClearSelect"></el-input> -
-          <el-input style="width: 100px" size="mini" v-model.number="form[`${l.model}@end`]" placeholder="最大金额" @input="toClearSelect"></el-input>
-        </template>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="24">
-        <el-button type="primary" size="small" @click="search()">查询</el-button>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-/**
- * fields:
- * label:字段中文
- * type:选择方式
- * model:字段
- * list:选择的选项,可以写死,可以请求:请求是以 ${model}List 形式命名传入组件,无需prop接收,直接使用$attrs即可;
- */
-const _ = require('lodash');
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'sell_filter_bar',
-  props: {
-    form: {
-      type: Object,
-      default: () => {
-        return {};
-      },
-    },
-    type: { type: String, default: 'sell' },
-  },
-  model: {
-    prop: 'form',
-    event: 'change',
-  },
-  components: {},
-  data: function () {
-    return {
-      fields: [
-        { label: '专利类型', type: 'radio', model: 'type', list: [{ label: '发明' }, { label: '实用新型' }] },
-        {
-          label: '交易类型',
-          type: 'radio',
-          model: this.type === 'sell' ? 'sell_type' : 'purchase_type',
-          list: [{ label: '许可' }, { label: '转移' }, { label: '质押' }],
-        },
-        {
-          label: this.type === 'sell' ? '预算价格' : '预算金额',
-          type: 'range',
-          model: this.type === 'sell' ? 'sell_money' : 'money',
-          list: [
-            { start: 1000, end: 2000 },
-            { start: 2000, end: 3000 },
-          ],
-        },
-      ],
-    };
-  },
-  created() {},
-  methods: {
-    getList(index) {
-      const field = this.fields[index];
-      let list = _.get(field, 'list');
-      if (list) return list;
-      const { model } = field;
-      list = _.get(this.$attrs, `${model}List`, []);
-      return list;
-    },
-    search() {
-      let data = _.cloneDeep(this.form);
-      let obj = {};
-      for (const key in data) {
-        if (data[key]) obj[key] = data[key];
-      }
-      if (obj.sell_money) {
-        const arr = obj.sell_money.split('-');
-        obj[`sell_money@start`] = parseInt(arr[0]);
-        obj[`sell_money@end`] = parseInt(arr[1]);
-        delete obj.sell_money;
-      }
-      if (obj['sell_money@start'] && obj['sell_money@end']) {
-        if (obj['sell_money@end'] < obj['sell_money@start']) {
-          this.$message.error('最大金额 小于 最小金额,请重新输入预算价格');
-          return;
-        }
-      }
-      this.$emit('search', obj);
-    },
-    toClearWrite() {
-      delete this.form[`sell_money@start`];
-      delete this.form[`sell_money@end`];
-    },
-    toClearSelect() {
-      delete this.form[`sell_money`];
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 62
src/views/adminCenter/trade/purchase.vue

@@ -1,62 +0,0 @@
-<template>
-  <div id="purchase">
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search">
-      <template #filter>
-        <filter-bar v-model="filter" @search="search" type="purchase"></filter-bar>
-      </template>
-    </data-table>
-  </div>
-</template>
-
-<script>
-import filterBar from './parts/filter_bar.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: purchase } = createNamespacedHelpers('purchase');
-export default {
-  name: 'purchase',
-  props: {},
-  components: { filterBar },
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      fields: [
-        { label: '求购专利要求', model: 'demand' },
-        { label: '专利类型', model: 'type' },
-        { label: '求购类型', model: 'purchase_type' },
-        { label: '预算金额', model: 'money' },
-        { label: '联系人', model: 'contacts' },
-        { label: '手机号', model: 'phone' },
-        { label: '邮箱', model: 'email' },
-        { label: '状态', model: 'status' },
-      ],
-      opera: [{ label: '提醒到期' }],
-      filter: {},
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...purchase(['query']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info, ...this.filter });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 64
src/views/adminCenter/trade/sell.vue

@@ -1,64 +0,0 @@
-<template>
-  <div id="sell">
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search">
-      <template #filter>
-        <filter-bar v-model="filter" @search="search"></filter-bar>
-      </template>
-    </data-table>
-  </div>
-</template>
-
-<script>
-import filterBar from './parts/filter_bar.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: sell } = createNamespacedHelpers('sell');
-export default {
-  name: 'sell',
-  props: {},
-  components: { filterBar },
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      fields: [
-        { label: '申请号', model: 'create_number' },
-        { label: '专利名称', model: 'name' },
-        { label: '权利人', model: 'inventor' },
-        { label: '申请类型', model: 'type' },
-        { label: '交易类型', model: 'sell_type' },
-        { label: '交易金额', model: 'sell_money' },
-        { label: '联系人', model: 'contacts' },
-        { label: '手机号', model: 'phone' },
-        { label: '邮箱', model: 'email' },
-        { label: '状态', model: 'status' },
-      ],
-      opera: [{ label: '提醒到期' }],
-      filter: {},
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...sell(['query']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info, ...this.filter });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 1 - 2
src/views/adminCenter/user/parts/perUser.vue

@@ -127,8 +127,7 @@ export default {
     // 查询列表
     async search({ skip = 0, limit = 10, ...info } = {}) {
       let user = this.user;
-      console.log(user);
-      if (user.role != '0') info.code = 'JLKJQYJD';
+      if (user.role != '0') info.code = user.code;
       let one = await this.query({ skip, limit, status: '0', ...info });
       let two = await this.query({ skip, limit, status: '1', ...info });
       let thr = await this.query({ skip, limit, status: '2', ...info });

+ 0 - 93
src/views/jg/disclosure/detail.vue

@@ -1,93 +0,0 @@
-<template>
-  <div id="detail">
-    <data-form v-model="form" @save="toSave" :fields="fields" submitText="审核" :needSave="false">
-      <template #status>
-        <el-radio v-for="(i, index) in statusList" :key="`status-${index}`" :label="i.value"> {{ i.label }}</el-radio>
-      </template>
-    </data-form>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-import quests from '@common/dict/patent/quests';
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'detail',
-  props: {
-    form: { type: Object, default: () => {} },
-  },
-  model: {
-    prop: 'form',
-    event: 'change',
-  },
-  components: {},
-  data: function () {
-    return {
-      fields: [
-        { label: '发明名称', model: 'name', type: 'text', required: true },
-        { label: '申请人', model: 'apply_name', required: true, type: 'text' },
-        { label: '申请类型', model: 'type', type: 'text', required: true },
-        { label: '发明人', model: 'inventor', type: 'text', required: true },
-        { label: '技术联系人', model: 'contact', type: 'text', required: true },
-        { label: '联系人电话', model: 'phone', type: 'text', required: true },
-        { label: '联系人邮箱', model: 'email', type: 'text', required: true },
-        { label: '特殊情况说明', model: 'desc', type: 'text', required: true },
-      ],
-      typeList: [{ label: '国家发明' }, { label: '国防专利' }, { label: '实用新型' }, { label: '外观' }],
-      statusList: [
-        { label: '通过', value: '1' },
-        { label: '拒绝', value: '-1' },
-      ],
-    };
-  },
-  created() {
-    this.setQuest();
-  },
-  methods: {
-    async toSave({ data }) {
-      this.$emit('submit', data);
-    },
-    setQuest() {
-      let fields = _.cloneDeep(this.fields);
-      let qs = _.cloneDeep(quests);
-      qs = qs.map((i) => {
-        i.type = 'text';
-        return i;
-      });
-      fields.push(...qs);
-      fields = fields.map((i) => {
-        delete i.required;
-        return i;
-      });
-      // 添加审核
-      // const checkField = [
-      //   {
-      //     label: '预估结果',
-      //     model: 'status',
-      //     type: 'radio',
-      //     required: true,
-      //   },
-      //   {
-      //     label: '意见&建议',
-      //     model: 'remark',
-      //     type: 'textarea',
-      //   },
-      // ];
-      // fields.push(...checkField);
-      this.$set(this, `fields`, fields);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 93
src/views/jg/disclosure/index.vue

@@ -1,93 +0,0 @@
-<template>
-  <div id="index">
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @check="toCheck"> </data-table>
-    <el-dialog title="审核" width="80vw" center :visible.sync="dialog" :destroy-on-close="true">
-      <el-row :gutter="20">
-        <el-col :span="12">
-          <info v-model="form"></info>
-        </el-col>
-        <el-col :span="12">
-          <el-input v-model="form.remark" placeholder="请输入您的意见" type="textarea" :autosize="{ minRows: 5, maxRows: 10 }"></el-input>
-          <div style="width: 100%; margin: 16px; text-align: center">
-            <el-button type="success" style="width: 25%" @click="toStatus('2')">通过</el-button>
-            <el-button type="danger" style="width: 25%" @click="toStatus('-1')">拒绝</el-button>
-            <el-button style="width: 25%" @click="dialog = false">返回</el-button>
-          </div>
-        </el-col>
-      </el-row>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import info from './detail.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: disclosure } = createNamespacedHelpers('disclosure');
-export default {
-  name: 'index',
-  props: {},
-  components: { info },
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      dialog: false,
-      form: {},
-      fields: [
-        { label: '发明名称', model: 'name', filter: true },
-        { label: '申请人', model: 'apply_name' },
-        { label: '申请类型', model: 'type' },
-        { label: '技术联系人', model: 'contact' },
-        { label: '联系人电话', model: 'phone' },
-        { label: '联系人邮箱', model: 'email' },
-      ],
-      opera: [{ label: '审核', method: 'check' }],
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...disclosure(['query', 'check']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info, mechanism_id: this.user._id, status: '1' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-    async toCheck({ data }) {
-      this.$set(this, `form`, data);
-      this.dialog = true;
-    },
-    // 申请状态修改
-    async toStatus(status) {
-      const { id, remark } = this.form;
-      const obj = { id, status, remark };
-      const res = await this.check(obj);
-      if (this.$checkRes(res, '操作成功', res.errmsg || '操作失败')) {
-        this.dialog = false;
-        this.search();
-      }
-    },
-    async statusCheck(data) {
-      const res = await this.check(data);
-      if (this.$checkRes(res, '审核成功', res.errmsg || '审核失败')) {
-        this.search();
-        this.dialog = false;
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 58
src/views/jg/message/index.vue

@@ -1,58 +0,0 @@
-<template>
-  <div id="index">
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @off="toOff"> </data-table>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: notice } = createNamespacedHelpers('notice');
-export default {
-  name: 'index',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      fields: [
-        { label: '消息内容', model: 'content' },
-        { label: '发送时间', model: 'create_time', width: '150px' },
-        { label: '是否已读', model: 'is_read', format: (i) => (i ? '已读' : '未读'), width: '150px' },
-      ],
-      opera: [{ label: '取消提醒', method: 'off', display: (i) => !i.is_read }],
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...notice(['query', 'update']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info, to: this.user._id });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-    async toOff({ data }) {
-      data.is_read = true;
-      const res = await this.update(data);
-      if (this.$checkRes(res, '消息已读', res.errmsg || '操作失败')) {
-        this.search();
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 66
src/views/jg/patent/account.vue

@@ -1,66 +0,0 @@
-<template>
-  <div id="account">
-    <el-table border stripe :data="list" size="mini">
-      <el-table-column align="center" label="姓名" prop="name"></el-table-column>
-      <el-table-column align="center" label="电话" prop="phone"></el-table-column>
-      <el-table-column align="center" label="邮箱" prop="email"></el-table-column>
-      <el-table-column align="center" label="账户类型">
-        <template v-slot="account">
-          {{ checkType(account) }}
-        </template>
-      </el-table-column>
-      <el-table-column align="center" label="选择">
-        <template v-slot="{ $index }">
-          <el-link type="primary" :underline="false" @click="accountSelect($index)" v-if="!checkSelect($index)">选择</el-link>
-        </template>
-      </el-table-column>
-    </el-table>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'account',
-  props: {
-    list: { type: Array },
-  },
-  model: {
-    prop: 'list',
-    event: 'change',
-  },
-  components: {},
-  data: function () {
-    return {};
-  },
-  created() {},
-  methods: {
-    checkType({ row }) {
-      const keys = Object.keys(row);
-      const str = keys.find((f) => f === 'is_expert');
-      if (str) return '个人用户';
-      else return '企业用户';
-    },
-    checkSelect(index) {
-      const is_select = this.list[index].is_select;
-      if (is_select === true) return true;
-      else return false;
-    },
-    accountSelect(index) {
-      this.$emit('select', index);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 88
src/views/jg/patent/export_result.vue

@@ -1,88 +0,0 @@
-<template>
-  <div id="result">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="top">
-          <el-button type="primary" size="mini" @click="$router.push('/jg/patent/index')">返回</el-button>
-        </el-col>
-        <el-col :span="24" class="down">
-          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @download="toDownload"></data-table>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-const moment = require('moment');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: mission } = createNamespacedHelpers('mission');
-
-export default {
-  name: 'result',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      opera: [
-        {
-          label: '下载',
-          method: 'download',
-          display: (i) => i.status === '2',
-        },
-      ],
-      fields: [
-        { label: '标题', model: 'title' },
-        { label: '导出数据时间', model: 'meta.createdAt', format: (i) => this.getTime(i) },
-        {
-          label: '状态',
-          model: 'status',
-          format: (i) => (i == '0' ? '未开始' : i == '1' ? '进行中' : i == '2' ? '导出完成' : i == '3' ? '导出失败' : '未知状态'),
-        },
-        { label: '进度', model: 'progress' },
-        { label: '备注', model: 'remark' },
-      ],
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...mission(['query']),
-    async search({ skip = 0, limit = 10 } = {}) {
-      const res = await this.query({ skip, limit, user: this.user._id });
-      if (this.$checkRes(res)) {
-        this.$set(this, 'list', res.data);
-        this.$set(this, 'total', res.total);
-      }
-    },
-    toDownload({ data }) {
-      window.open(`http://broadcast.waityou24.cn/${data.uri}`);
-    },
-    getTime(i) {
-      return moment(i).format('YYYY-MM-DD HH:mm:ss');
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.main {
-  .top {
-    text-align: right;
-    margin: 0 0 10px 0;
-  }
-}
-</style>

+ 0 - 84
src/views/jg/patent/filter_bar.vue

@@ -1,84 +0,0 @@
-<template>
-  <div id="filter_bar" style="margin: 10px">
-    <el-row v-for="(l, rowIndex) in fields" :key="`row-${rowIndex}`">
-      <el-col :span="24">
-        <span>{{ l.label }}</span>
-        <span>:</span>
-        <template v-if="l.type === 'radio'">
-          <el-radio-group v-model="form[l.model]">
-            <el-radio :label="undefined">全部</el-radio>
-            <el-radio v-for="(i, index) in getList(rowIndex)" :key="`radio-${l.model}-${index}`" :label="i.value ? i.value : i.label">{{ i.label }}</el-radio>
-          </el-radio-group>
-        </template>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="24">
-        <el-button type="primary" size="small" @click="search()">查询</el-button>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-/**
- * fields:
- * label:字段中文
- * type:选择方式
- * model:字段
- * list:选择的选项,可以写死,可以请求:请求是以 ${model}List 形式命名传入组件,无需prop接收,直接使用$attrs即可;
- */
-const _ = require('lodash');
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'filter_bar',
-  props: {
-    form: {
-      type: Object,
-      default: () => {
-        return {};
-      },
-    },
-  },
-  model: {
-    prop: 'form',
-    event: 'change',
-  },
-  components: {},
-  data: function () {
-    return {
-      fields: [{ label: '申请类型', type: 'radio', model: 'type', list: [{ label: '发明' }, { label: '实用新型' }, { label: '其他', value: 'else' }] }],
-    };
-  },
-  created() {},
-  methods: {
-    getList(index) {
-      const field = this.fields[index];
-      let list = _.get(field, 'list');
-      if (list) return list;
-      const { model } = field;
-      list = _.get(this.$attrs, `${model}List`, []);
-      return list;
-    },
-    search() {
-      let data = _.cloneDeep(this.form);
-      let obj = {};
-      for (const key in data) {
-        if (data[key]) obj[key] = data[key];
-      }
-      this.$emit('search', obj);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 208
src/views/jg/patent/index.vue

@@ -1,208 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24" style="text-align: right">
-        <el-popover placement="bottom" width="370" trigger="click" style="margin-right: 10px">
-          <template #reference>
-            <el-button type="primary" size="mini">导入</el-button>
-          </template>
-          <el-upload
-            class="upload-demo"
-            drag
-            action="/files/platform/patent_cms_import/upload"
-            multiple
-            :on-success="uSuccess"
-            :on-error="uError"
-            :before-upload="uBefore"
-            :show-file-list="false"
-          >
-            <i class="el-icon-upload"></i>
-            <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-          </el-upload>
-        </el-popover>
-        <el-button type="primary" size="mini" @click="getTemplate">下载导入模板</el-button>
-        <el-button type="primary" size="mini" @click="exportView">导出</el-button>
-        <el-button type="primary" size="mini" @click="toResult">查看导出结果</el-button>
-      </el-col>
-    </el-row>
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView">
-      <template #filter>
-        <filter-bar v-model="filter" @search="search"></filter-bar>
-      </template>
-    </data-table>
-    <el-dialog title="错误记录" center :visible.sync="dialog" :destroy-on-close="true">
-      <el-table border stripe :data="errorList" v-if="errcode === '1'">
-        <el-table-column align="center" label="错误记录">
-          <template v-slot="{ row }">{{ row }}</template>
-        </el-table-column>
-      </el-table>
-      <el-table border stripe :data="errorList" v-if="errcode === '2'">
-        <el-table-column align="center" label="发明名称" prop="name"></el-table-column>
-        <el-table-column align="center" label="发明人" prop="inventor"></el-table-column>
-        <el-table-column align="center" label="选择状态">
-          <template v-slot="{ row }">
-            {{ checkSelect(row) }}
-          </template>
-        </el-table-column>
-        <el-table-column align="center" label="选择">
-          <template v-slot="{ row, $index }">
-            <el-link type="primary" :underline="false" @click="toSelectUser(row, $index)">选择用户</el-link>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div style="margin: 16px; width: 100%; text-align: center">
-        <el-button type="primary" style="width: 60%" @click="toContinue">继续导入</el-button>
-      </div>
-      <el-dialog title="选择用户" :visible.sync="innerDialog" append-to-body :destroy-on-close="true">
-        <account v-model="nameList" @select="selectUser"></account>
-      </el-dialog>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import filterBar from './filter_bar.vue';
-import account from './account.vue';
-const _ = require('lodash');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: disclosure } = createNamespacedHelpers('disclosure');
-const { mapActions: patent } = createNamespacedHelpers('patent');
-export default {
-  name: 'index',
-  props: {},
-  components: { account, filterBar },
-  data: function () {
-    return {
-      filter: {},
-      list: [],
-      total: 0,
-      fields: [
-        { label: '申请号', model: 'create_number' },
-        { label: '申请日', model: 'create_date' },
-        { label: '标题', model: 'name' },
-        { label: '发明人', model: 'inventor' },
-        { label: '专利类型', model: 'type' },
-      ],
-      opera: [{ label: '查看', method: 'view' }],
-      dialog: false,
-      //错误
-      errcode: undefined,
-      temp_id: undefined,
-      errorList: [],
-      //选人
-      innerDialog: false,
-      nameList: [],
-      listIndex: undefined,
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...disclosure(['import', 'cacheImport', 'toExport']),
-    ...patent(['query']),
-    async search({ skip = 0, limit = 10 } = {}) {
-      const info = _.cloneDeep(this.filter);
-      const res = await this.query({ skip, limit, ...info, code: this.user.code });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-    toView({ data }) {
-      // TODO查看
-    },
-    // 导入
-    async toImport(uri) {
-      const res = await this.import({ uri });
-      const { data } = res;
-      if (data) {
-        this.$message.error('导入失败');
-        const { data: errorList, errcode, temp_id } = data;
-        this.$set(this, 'errorList', errorList);
-        this.$set(this, 'errcode', errcode);
-        this.$set(this, 'temp_id', temp_id);
-        this.dialog = true;
-      } else {
-        this.$set(this, 'errorList', []);
-        this.$set(this, 'errcode', undefined);
-        this.$set(this, 'temp_id', undefined);
-        this.$message.success('导入成功');
-      }
-    },
-    // 上传成功
-    uSuccess(response, file, fileList) {
-      const { uri } = response;
-      this.$checkRes(response, '上传成功!正在导入,请稍后...');
-      this.toImport(uri);
-    },
-    // 上传失败
-    uError(err, file, fileList) {
-      this.$message.error('上传失败');
-    },
-    // 正在上传
-    uBefore() {
-      this.$message('正在上传');
-    },
-    // 去选择用户
-    toSelectUser(data, index) {
-      this.$set(this, `nameList`, data.nameList);
-      this.$set(this, `listIndex`, index);
-      this.innerDialog = true;
-    },
-    // 选择用户
-    selectUser(index) {
-      let list = _.cloneDeep(this.nameList);
-      list = list.map((i) => {
-        i.is_select = false;
-        return i;
-      });
-      list[index].is_select = true;
-      this.$set(this.errorList[this.listIndex], 'nameList', list);
-      this.innerDialog = false;
-    },
-    // 检查是否选择用户
-    checkSelect(row) {
-      const r = row.nameList.find((f) => f.is_select);
-      return r ? '已选择' : '未选择';
-    },
-    // 继续导入
-    async toContinue() {
-      const r = this.errorList.find((f) => !f.nameList.find((f) => f.is_select));
-      if (r) {
-        this.$message.error('有未选择用户的数据,请重新检查');
-        return;
-      }
-      const obj = { data: _.cloneDeep(this.errorList), temp_id: this.temp_id };
-      const res = await this.cacheImport(obj);
-      if (this.$checkRes(res, '操作成功', res.errmsg || '操作失败')) {
-        this.dialog = false;
-      }
-    },
-    async exportView() {
-      const res = await this.toExport({ ...this.filter, code: this.user.code, id: this.user._id });
-      if (this.$checkRes(res, '正在导出,请稍后')) {
-      }
-    },
-    // 查看导出结果
-    async toResult() {
-      this.$router.push({ path: '/jg/patent/result' });
-    },
-    // 下载模板
-    getTemplate() {
-      window.open('../../数据模板.xlsx');
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 30
src/views/jg/statistics/index.vue

@@ -1,30 +0,0 @@
-<template>
-  <div id="index">
-    <p>statistics</p>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'index',
-  props: {},
-  components: {},
-  data: function () {
-    return {};
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 41
src/views/jg/trade/index.vue

@@ -1,41 +0,0 @@
-<template>
-  <div id="index">
-    <el-tabs v-model="active" type="card">
-      <el-tab-pane label="交易" name="first">
-        <sell></sell>
-      </el-tab-pane>
-      <el-tab-pane label="求购" name="second">
-        <purchase></purchase>
-      </el-tab-pane>
-    </el-tabs>
-  </div>
-</template>
-
-<script>
-import sell from './sell.vue';
-import purchase from './purchase.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'index',
-  props: {},
-  components: { sell, purchase },
-  data: function () {
-    return {
-      active: 'first',
-    };
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 130
src/views/jg/trade/parts/filter_bar.vue

@@ -1,130 +0,0 @@
-<template>
-  <div id="sell_filter_bar" style="margin: 10px">
-    <el-row v-for="(l, rowIndex) in fields" :key="`row-${rowIndex}`">
-      <el-col :span="24">
-        <span>{{ l.label }}</span>
-        <span>:</span>
-        <template v-if="l.type === 'radio'">
-          <el-radio-group v-model="form[l.model]">
-            <el-radio :label="undefined">全部</el-radio>
-            <el-radio v-for="(i, index) in getList(rowIndex)" :key="`radio-${l.model}-${index}`" :label="i.value ? i.value : i.label">{{ i.label }}</el-radio>
-          </el-radio-group>
-        </template>
-        <template v-if="l.type === 'range'">
-          <el-select v-model="form[l.model]" size="mini" @change="toClearWrite">
-            <template v-for="(i, index) in l.list">
-              <el-option :key="`options-${index}`" :label="`${i.start}-${i.end}元`" :value="`${i.start}-${i.end}`"></el-option>
-            </template>
-          </el-select>
-          <el-input style="width: 100px" size="mini" v-model.number="form[`${l.model}@start`]" placeholder="最小金额" @input="toClearSelect"></el-input> -
-          <el-input style="width: 100px" size="mini" v-model.number="form[`${l.model}@end`]" placeholder="最大金额" @input="toClearSelect"></el-input>
-        </template>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="24">
-        <el-button type="primary" size="small" @click="search()">查询</el-button>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-/**
- * fields:
- * label:字段中文
- * type:选择方式
- * model:字段
- * list:选择的选项,可以写死,可以请求:请求是以 ${model}List 形式命名传入组件,无需prop接收,直接使用$attrs即可;
- */
-const _ = require('lodash');
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'sell_filter_bar',
-  props: {
-    form: {
-      type: Object,
-      default: () => {
-        return {};
-      },
-    },
-    type: { type: String, default: 'sell' },
-  },
-  model: {
-    prop: 'form',
-    event: 'change',
-  },
-  components: {},
-  data: function () {
-    return {
-      fields: [
-        { label: '专利类型', type: 'radio', model: 'type', list: [{ label: '发明' }, { label: '实用新型' }] },
-        {
-          label: '交易类型',
-          type: 'radio',
-          model: this.type === 'sell' ? 'sell_type' : 'purchase_type',
-          list: [{ label: '许可' }, { label: '转移' }, { label: '质押' }],
-        },
-        {
-          label: this.type === 'sell' ? '预算价格' : '预算金额',
-          type: 'range',
-          model: this.type === 'sell' ? 'sell_money' : 'money',
-          list: [
-            { start: 1000, end: 2000 },
-            { start: 2000, end: 3000 },
-          ],
-        },
-      ],
-    };
-  },
-  created() {},
-  methods: {
-    getList(index) {
-      const field = this.fields[index];
-      let list = _.get(field, 'list');
-      if (list) return list;
-      const { model } = field;
-      list = _.get(this.$attrs, `${model}List`, []);
-      return list;
-    },
-    search() {
-      let data = _.cloneDeep(this.form);
-      let obj = {};
-      for (const key in data) {
-        if (data[key]) obj[key] = data[key];
-      }
-      if (obj.sell_money) {
-        const arr = obj.sell_money.split('-');
-        obj[`sell_money@start`] = parseInt(arr[0]);
-        obj[`sell_money@end`] = parseInt(arr[1]);
-        delete obj.sell_money;
-      }
-      if (obj['sell_money@start'] && obj['sell_money@end']) {
-        if (obj['sell_money@end'] < obj['sell_money@start']) {
-          this.$message.error('最大金额 小于 最小金额,请重新输入预算价格');
-          return;
-        }
-      }
-      this.$emit('search', obj);
-    },
-    toClearWrite() {
-      delete this.form[`sell_money@start`];
-      delete this.form[`sell_money@end`];
-    },
-    toClearSelect() {
-      delete this.form[`sell_money`];
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 62
src/views/jg/trade/purchase.vue

@@ -1,62 +0,0 @@
-<template>
-  <div id="purchase">
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search">
-      <template #filter>
-        <filter-bar v-model="filter" @search="search" type="purchase"></filter-bar>
-      </template>
-    </data-table>
-  </div>
-</template>
-
-<script>
-import filterBar from './parts/filter_bar.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: purchase } = createNamespacedHelpers('purchase');
-export default {
-  name: 'purchase',
-  props: {},
-  components: { filterBar },
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      fields: [
-        { label: '求购专利要求', model: 'demand' },
-        { label: '专利类型', model: 'type' },
-        { label: '求购类型', model: 'purchase_type' },
-        { label: '预算金额', model: 'money' },
-        { label: '联系人', model: 'contacts' },
-        { label: '手机号', model: 'phone' },
-        { label: '邮箱', model: 'email' },
-        { label: '状态', model: 'status' },
-      ],
-      opera: [{ label: '提醒到期' }],
-      filter: {},
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...purchase(['query']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info, code: this.user.code, ...this.filter });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 64
src/views/jg/trade/sell.vue

@@ -1,64 +0,0 @@
-<template>
-  <div id="sell">
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search">
-      <template #filter>
-        <filter-bar v-model="filter" @search="search"></filter-bar>
-      </template>
-    </data-table>
-  </div>
-</template>
-
-<script>
-import filterBar from './parts/filter_bar.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: sell } = createNamespacedHelpers('sell');
-export default {
-  name: 'sell',
-  props: {},
-  components: { filterBar },
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      fields: [
-        { label: '申请号', model: 'create_number' },
-        { label: '专利名称', model: 'name' },
-        { label: '权利人', model: 'inventor' },
-        { label: '申请类型', model: 'type' },
-        { label: '交易类型', model: 'sell_type' },
-        { label: '交易金额', model: 'sell_money' },
-        { label: '联系人', model: 'contacts' },
-        { label: '手机号', model: 'phone' },
-        { label: '邮箱', model: 'email' },
-        { label: '状态', model: 'status' },
-      ],
-      opera: [{ label: '提醒到期' }],
-      filter: {},
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...sell(['query']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info, code: this.user.code, ...this.filter });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>