|
@@ -2,7 +2,7 @@
|
|
|
<div id="technologyList">
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="info">
|
|
|
- <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <!-- <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
<el-col :span="19" class="messag">
|
|
|
<p>
|
|
|
<span class="textOver" @click="$router.push({ path: '/userCenter/myProduct/detailinfo', query: { id: item.id } })">{{ item.name }}</span>
|
|
@@ -25,6 +25,60 @@
|
|
|
<el-button type="success" size="mini" v-if="item.status == '3'" @click="releaseBtn(item)">发布</el-button>
|
|
|
<el-button type="danger" size="mini" @click="deleteBtn(item.id)">删除</el-button>
|
|
|
</el-col>
|
|
|
+ </el-col> -->
|
|
|
+ <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <span class="textOver">{{ item.name }}</span>
|
|
|
+ <span>{{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="down">
|
|
|
+ <el-col :span="3" class="image">
|
|
|
+ <span v-if="item.image.length > 0">
|
|
|
+ <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
|
|
|
+ <template v-if="index === 0">
|
|
|
+ <vant-image style="width:100%;height:100px" :src="acm.url"></vant-image>
|
|
|
+ </template>
|
|
|
+ </el-col>
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <el-col :span="24" style="width: 100%;height: 100px;text-align: center;line-height: 100px;font-size: 20px;">
|
|
|
+ <span>暂无图片</span>
|
|
|
+ </el-col>
|
|
|
+ </span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="product">
|
|
|
+ <p>类型:{{ item.type === '0' ? '技术' : item.type === '1' ? '产品' : item.type === '2' ? '服务' : 'underdind' }}</p>
|
|
|
+ <span v-if="item.type === '0' || item.type === '1'">
|
|
|
+ <p>所属领域:{{ item.field }}</p>
|
|
|
+ <p>合作方式:{{ item.cooperation }}</p>
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <p>信息属性:{{ item.messattribute }}</p>
|
|
|
+ <p>需求程度:{{ item.demand }}</p>
|
|
|
+ </span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="9" class="intro">
|
|
|
+ <span v-if="item.type == '0'">
|
|
|
+ <p>技术难题&需求说明:</p>
|
|
|
+ <p>{{ item.requirementdesc }}</p>
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.type == '1'">
|
|
|
+ <p>产品简介:</p>
|
|
|
+ <p>{{ item.achievebrief }}</p>
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <p>信息描述:</p>
|
|
|
+ <p>{{ item.informationdesc }}</p>
|
|
|
+ </span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="status">
|
|
|
+ <p>状态:{{ item.status === '2' ? '审核拒绝' : item.status === '3' ? '草稿' : '未识别' }}</p>
|
|
|
+ <van-button type="primary" size="mini" @click="previewBtn(item)" v-if="item.status == '3'">预览</van-button>
|
|
|
+ <van-button type="info" size="mini" @click="editBtn(item)" v-if="item.status == '3'">编辑</van-button>
|
|
|
+ <van-button type="success" size="mini" @click="releaseBtn(item)" v-if="item.status == '3'">发布</van-button>
|
|
|
+ <van-button type="danger" size="mini" @click="deleteBtn(item.id)">删除</van-button>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -33,7 +87,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions: mapMarketproduct } = createNamespacedHelpers('marketproduct');
|
|
|
+const { mapActions: product } = createNamespacedHelpers('product');
|
|
|
export default {
|
|
|
name: 'technologyList',
|
|
|
props: {},
|
|
@@ -47,37 +101,97 @@ export default {
|
|
|
this.searchInfo();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapMarketproduct({ productList: 'query', columnInfo: 'fetch', marketcerate: 'create', productdeltet: 'delete', upup: 'update' }),
|
|
|
- async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
|
|
|
+ // ...mapMarketproduct({ productList: 'query', columnInfo: 'fetch', marketcerate: 'create', productdeltet: 'delete', upup: 'update' }),
|
|
|
+ // async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
|
|
|
+ // let userid = this.user.uid;
|
|
|
+ // const res = await this.productList({ skip, limit, status: 2, userid, ...info });
|
|
|
+ // const resTwo = await this.productList({ skip, limit, status: 3, userid, ...info });
|
|
|
+ // var newData = res.data.concat(resTwo.data);
|
|
|
+ // if (newData.length != 0) {
|
|
|
+ // this.$set(this, `list`, newData);
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // async releaseBtn(data) {
|
|
|
+ // data.status = 0;
|
|
|
+ // const res = await this.upup(data);
|
|
|
+ // if (this.$checkRes(res)) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '信息发布成功',
|
|
|
+ // type: 'success',
|
|
|
+ // });
|
|
|
+ // this.searchInfo();
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // async deleteBtn(id) {
|
|
|
+ // const res = await this.productdeltet(id);
|
|
|
+ // if (this.$checkRes(res)) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '删除信息成功',
|
|
|
+ // type: 'success',
|
|
|
+ // });
|
|
|
+ // this.searchInfo();
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ ...product({ productList: 'query', columnInfo: 'fetch', marketcerate: 'create', productdeltet: 'delete', upup: 'update' }),
|
|
|
+ // 查询列表
|
|
|
+ async searchInfo({ skip = 0, limit = 6, ...info } = {}) {
|
|
|
+ skip = this.skip;
|
|
|
let userid = this.user.uid;
|
|
|
- const res = await this.productList({ skip, limit, status: 2, userid, ...info });
|
|
|
- const resTwo = await this.productList({ skip, limit, status: 3, userid, ...info });
|
|
|
- var newData = res.data.concat(resTwo.data);
|
|
|
- if (newData.length != 0) {
|
|
|
- this.$set(this, `list`, newData);
|
|
|
- }
|
|
|
- },
|
|
|
- async releaseBtn(data) {
|
|
|
- data.status = 0;
|
|
|
- const res = await this.upup(data);
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$message({
|
|
|
- message: '信息发布成功',
|
|
|
- type: 'success',
|
|
|
- });
|
|
|
- this.searchInfo();
|
|
|
- }
|
|
|
- },
|
|
|
- async deleteBtn(id) {
|
|
|
- const res = await this.productdeltet(id);
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$message({
|
|
|
- message: '删除信息成功',
|
|
|
- type: 'success',
|
|
|
- });
|
|
|
- this.searchInfo();
|
|
|
- }
|
|
|
+ const res = await this.productList({ skip, status: 2, userid, ...info });
|
|
|
+ // console.log(res);
|
|
|
+ const resTwo = await this.productList({ skip, status: 3, userid, ...info });
|
|
|
+ // var newData = res.data.concat(resTwo.data);
|
|
|
+ // if (newData.length != 0) {
|
|
|
+ // this.$set(this, `newDataList`, newData);
|
|
|
+ // this.$set(this, `total`, newData.length);
|
|
|
+ // }
|
|
|
},
|
|
|
+ // // 预览
|
|
|
+ // previewBtn(item) {
|
|
|
+ // this.$set(this, `type`, item.type);
|
|
|
+ // this.dialogVisible = true;
|
|
|
+ // this.$set(this, `detailInfo`, item);
|
|
|
+ // },
|
|
|
+ // handleClose() {
|
|
|
+ // this.dialogVisible = false;
|
|
|
+ // },
|
|
|
+ // // 修改
|
|
|
+ // editBtn(item) {
|
|
|
+ // this.$emit('editBtn', item);
|
|
|
+ // },
|
|
|
+ // // 信息发布
|
|
|
+ // async releaseBtn(data) {
|
|
|
+ // data.status = '0';
|
|
|
+ // let res = await this.upup(data);
|
|
|
+ // if (this.$checkRes(res)) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '信息发布成功',
|
|
|
+ // type: 'success',
|
|
|
+ // });
|
|
|
+ // this.searchInfo();
|
|
|
+ // } else {
|
|
|
+ // this.$message.error('信息发布失败');
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // // 删除信息
|
|
|
+ // async deleteBtn(id) {
|
|
|
+ // let res = await this.productdeltet(id);
|
|
|
+ // if (this.$checkRes(res)) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '信息删除成功',
|
|
|
+ // type: 'success',
|
|
|
+ // });
|
|
|
+ // this.searchInfo();
|
|
|
+ // } else {
|
|
|
+ // this.$message.error('信息删除失败');
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // search(page = 1) {
|
|
|
+ // this.$set(this, `list`, this.origin[page - 1]);
|
|
|
+ // },
|
|
|
+ // handleCurrentChange(currentPage) {
|
|
|
+ // this.search(currentPage);
|
|
|
+ // },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|