|
@@ -30,8 +30,7 @@
|
|
|
import supermarketDetail from '@/components/supermaket/supermarket.vue';
|
|
|
import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
|
|
|
const { mapActions: mapSite } = createNamespacedHelpers('site');
|
|
|
-const { mapActions: mapProduct } = createNamespacedHelpers('enterpriseproject');
|
|
|
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
+const { mapActions: user } = createNamespacedHelpers('user');
|
|
|
// 获取学校
|
|
|
import { school } from '@/util/school';
|
|
|
export default {
|
|
@@ -41,6 +40,7 @@ export default {
|
|
|
supermarketDetail,
|
|
|
},
|
|
|
data: () => ({
|
|
|
+ // 站点信息
|
|
|
info: {},
|
|
|
nativeList: [
|
|
|
{
|
|
@@ -72,6 +72,21 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
display: 'first',
|
|
|
+ // 高校院所
|
|
|
+ schoolList: school,
|
|
|
+ schoolTotal: 76,
|
|
|
+ // 科研院所
|
|
|
+ scientificList: [
|
|
|
+ {
|
|
|
+ pic: require('@/assets/fabu.jpg'),
|
|
|
+ title: '科研院所',
|
|
|
+ com: 'www.baidu.com',
|
|
|
+ type: '二级本科',
|
|
|
+ address: '吉林省长春市力旺广场B座16楼',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ scientificTotal: 1,
|
|
|
+
|
|
|
// 技术型
|
|
|
jishuList: [],
|
|
|
// 技术型分页
|
|
@@ -111,20 +126,6 @@ export default {
|
|
|
deal: '交易完成',
|
|
|
},
|
|
|
],
|
|
|
- // 高校院所
|
|
|
- schoolList: school,
|
|
|
- schoolTotal: 76,
|
|
|
- // 科研院所
|
|
|
- scientificList: [
|
|
|
- {
|
|
|
- pic: require('@/assets/fabu.jpg'),
|
|
|
- title: '科研院所',
|
|
|
- com: 'www.baidu.com',
|
|
|
- type: '二级本科',
|
|
|
- address: '吉林省长春市力旺广场B座16楼',
|
|
|
- },
|
|
|
- ],
|
|
|
- scientificTotal: 1,
|
|
|
// 科技企业
|
|
|
companyList: [
|
|
|
{
|
|
@@ -150,59 +151,29 @@ export default {
|
|
|
],
|
|
|
mechanismTotal: 1,
|
|
|
}),
|
|
|
- created() {
|
|
|
- console.log(school);
|
|
|
- this.searchSite();
|
|
|
- this.searchInfo();
|
|
|
- this.jiaoyilist();
|
|
|
+ async created() {
|
|
|
+ await this.search();
|
|
|
+ await this.searchList();
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
},
|
|
|
methods: {
|
|
|
...mapSite(['showInfo']),
|
|
|
- ...mapProduct({ ProductQuery: 'query', ProductFetch: 'fetch', ProductDelete: 'delete' }),
|
|
|
- ...transaction({ transactionQuery: 'query', ProductFetch: 'fetch', ProductDelete: 'delete' }),
|
|
|
-
|
|
|
+ ...user({ userQuery: 'query' }),
|
|
|
// 查询站点信息
|
|
|
- async searchSite() {
|
|
|
+ async search() {
|
|
|
let res = await this.showInfo();
|
|
|
let object = JSON.parse(JSON.stringify(res.data));
|
|
|
if (object) {
|
|
|
this.$set(this, `info`, res.data);
|
|
|
- } else {
|
|
|
- this.$message.error(res.errmsg ? res.errmsg : 'error');
|
|
|
- }
|
|
|
- },
|
|
|
- async searchInfo({ skip = 0, limit = 8, ...info } = {}) {
|
|
|
- const res = await this.ProductQuery({ skip, limit, ...info });
|
|
|
- for (const val of res.data) {
|
|
|
- if (val.totaltype === '0') {
|
|
|
- var arr = res.data.filter(item => item.totaltype === '0');
|
|
|
- this.$set(this, `jishuList`, arr);
|
|
|
- this.$set(this, `jishuTotal`, arr.length);
|
|
|
- } else if (val.totaltype === '1') {
|
|
|
- var arrs = res.data.filter(item => item.totaltype === '1');
|
|
|
- this.$set(this, `chanpinList`, arrs);
|
|
|
- this.$set(this, `chanpinTotal`, arrs.length);
|
|
|
- } else if (val.totaltype === '2') {
|
|
|
- var arrss = res.data.filter(item => item.totaltype === '2');
|
|
|
- this.$set(this, `serviceList`, arrss);
|
|
|
- this.$set(this, `serveTotal`, arrss.length);
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- //交易
|
|
|
- async jiaoyilist() {
|
|
|
- const res = await this.transactionQuery();
|
|
|
- this.$set(this, `tableData`, res.data);
|
|
|
- },
|
|
|
- fabu() {
|
|
|
- console.log('闹');
|
|
|
- if (this.user.role == '2' || this.user.role == '3') {
|
|
|
- this.$router.push({ path: '/enterprise/enterprisexuqiu' });
|
|
|
}
|
|
|
},
|
|
|
+ // 查询列表
|
|
|
+ searchList() {},
|
|
|
+ // 发布
|
|
|
+ fabu() {},
|
|
|
+ // 跳转
|
|
|
async nativeClick({ name }) {
|
|
|
if (name === '高校院所') {
|
|
|
this.display = 'second';
|