|
@@ -5,14 +5,74 @@
|
|
|
<el-col :span="24" class="leftTop"> <span>|</span> <span>申请管理</span> </el-col>
|
|
|
<el-col :span="24" class="info">
|
|
|
<span v-if="display == 'list'">
|
|
|
- <data-table :fields="fields" :opera="opera" :data="list" :total="total" @edit="toEdit" @query="search"></data-table>
|
|
|
+ <el-table :data="list" border style="width: 100%">
|
|
|
+ <el-table-column prop="user_name" label="姓名" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column prop="contact_tel" label="电话" align="center"> </el-table-column>
|
|
|
+ <el-table-column prop="apply_time" label="申请时间" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column label="用户类型" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.role == '4' ? '个人' : scope.row.role == '5' ? '机构' : '专家' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="用户状态" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.status == '0' ? '待审核' : scope.row.status == '1' ? '通过' : '拒绝' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="toEdit(scope.row)" type="text" size="small">审核</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-col :span="24" class="page">
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ :page-size="pageSize"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </el-col>
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
<el-col :span="24" style="text-align:right;">
|
|
|
<el-button type="primary" size="mini" @click="display = 'list'">返回</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <data-table :fields="goodsfields" :opera="goodsopera" :data="goodsList" :total="goodsTotal" @check="toCheck" @query="search"></data-table>
|
|
|
+ <el-table :data="goodsList" border style="width: 100%">
|
|
|
+ <el-table-column prop="name" label="产品名称" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column label="类型" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.type == '0' ? '技术' : scope.row.type == '1' ? '产品' : '商务' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="contacts" label="联系人" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column prop="phone" label="电话" align="center"> </el-table-column>
|
|
|
+ <el-table-column prop="field" label="所属领域" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column prop="cooperation" label="合作方式" align="center"> </el-table-column>
|
|
|
+ <el-table-column label="用户状态" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.dockStatus == '0' ? '待审核' : scope.row.dockStatus == '1' ? '通过' : '拒绝' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="toCheck(scope.row)" type="text" size="small">审核</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-col :span="24" class="page">
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange1"
|
|
|
+ :current-page="currentPage1"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="goodsTotal"
|
|
|
+ :page-size="pageSize"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</span>
|
|
|
</el-col>
|
|
@@ -341,73 +401,26 @@ export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
|
components: {
|
|
|
- dataTable,
|
|
|
+ // dataTable,
|
|
|
upload,
|
|
|
},
|
|
|
data: function() {
|
|
|
return {
|
|
|
display: 'list',
|
|
|
- opera: [
|
|
|
- {
|
|
|
- label: '审核',
|
|
|
- icon: 'el-icon-view',
|
|
|
- method: 'edit',
|
|
|
- },
|
|
|
- ],
|
|
|
- fields: [
|
|
|
- { label: '姓名', prop: 'user_name', filter: 'input' },
|
|
|
- { label: '电话', prop: 'contact_tel' },
|
|
|
- { label: '申请时间', prop: 'apply_time' },
|
|
|
- {
|
|
|
- label: '用户类别',
|
|
|
- prop: 'role',
|
|
|
- format: item => {
|
|
|
- return item === '4' ? '个人' : item === '5' ? '机构' : item === '6' ? '专家' : '';
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- label: '用户状态',
|
|
|
- prop: 'status',
|
|
|
- format: item => {
|
|
|
- return item === '0' ? '待审核' : item === '1' ? '通过' : item === '2' ? '拒绝' : '';
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ origin: [],
|
|
|
list: [],
|
|
|
+ applylist: [],
|
|
|
total: 0,
|
|
|
// 对接会id
|
|
|
dock_id: '',
|
|
|
// 审核产品列表
|
|
|
- goodsopera: [
|
|
|
- {
|
|
|
- label: '审核',
|
|
|
- icon: 'el-icon-check',
|
|
|
- method: 'check',
|
|
|
- },
|
|
|
- ],
|
|
|
- goodsfields: [
|
|
|
- { label: '产品名称', prop: 'name', filter: 'input' },
|
|
|
- {
|
|
|
- label: '产品类别',
|
|
|
- prop: 'type',
|
|
|
- format: item => {
|
|
|
- return item === '0' ? '技术' : item === '1' ? '产品' : item === '2' ? '商务' : '';
|
|
|
- },
|
|
|
- },
|
|
|
- { label: '联系人', prop: 'contacts' },
|
|
|
- { label: '联系电话', prop: 'phone' },
|
|
|
- { label: '所属领域', prop: 'field' },
|
|
|
- { label: '合作方式', prop: 'cooperation' },
|
|
|
- {
|
|
|
- label: '申请产品状态',
|
|
|
- prop: 'dockStatus',
|
|
|
- format: item => {
|
|
|
- return item === '0' ? '待审核' : item === '1' ? '通过' : item === '2' ? '拒绝' : '';
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
goodsList: [],
|
|
|
goodsTotal: 0,
|
|
|
+ currentPage1: 1,
|
|
|
+ origin1: [],
|
|
|
+ good: [],
|
|
|
// 审核产品
|
|
|
dialogVisible: false,
|
|
|
// 产品详情
|
|
@@ -420,9 +433,9 @@ export default {
|
|
|
cooperationList: [],
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
- this.search();
|
|
|
- this.searchtype();
|
|
|
+ async created() {
|
|
|
+ await this.searchtype();
|
|
|
+ await this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
...dock(['fetch', 'query', 'delete', 'update', 'delete', 'updateGood']),
|
|
@@ -431,7 +444,7 @@ export default {
|
|
|
async search() {
|
|
|
let res = await this.fetch(this.user.uid);
|
|
|
if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `list`, res.data.apply);
|
|
|
+ this.$set(this, `applylist`, res.data.apply);
|
|
|
this.$set(this, `dock_id`, res.data.id);
|
|
|
this.$set(this, `total`, res.data.apply.length);
|
|
|
}
|
|
@@ -455,13 +468,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 审核
|
|
|
- toEdit({ data }) {
|
|
|
- this.$set(this, `goodsList`, data.goodsList);
|
|
|
+ toEdit(data) {
|
|
|
+ this.$set(this, `good`, data.goodsList);
|
|
|
this.$set(this, `goodsTotal`, data.goodsList.length);
|
|
|
this.display = 'view';
|
|
|
},
|
|
|
// 审核产品
|
|
|
- toCheck({ data }) {
|
|
|
+ toCheck(data) {
|
|
|
this.$set(this, `form`, data);
|
|
|
this.dialogVisible = true;
|
|
|
},
|
|
@@ -492,17 +505,38 @@ export default {
|
|
|
uploadDelete(index) {
|
|
|
this.form.image.splice(index, 1);
|
|
|
},
|
|
|
- updataApply() {
|
|
|
- let data = this.list.goodsList;
|
|
|
- console.log(data);
|
|
|
+ // 分页
|
|
|
+ searchpage(page = 1) {
|
|
|
+ this.$set(this, `list`, this.origin[page - 1]);
|
|
|
+ },
|
|
|
+ handleCurrentChange(currentPage) {
|
|
|
+ this.searchpage(currentPage);
|
|
|
+ },
|
|
|
+ // 产品分页
|
|
|
+ // 分页
|
|
|
+ searchpage1(page = 1) {
|
|
|
+ this.$set(this, `goodsList`, this.origin1[page - 1]);
|
|
|
+ },
|
|
|
+ handleCurrentChange1(currentPage1) {
|
|
|
+ this.searchpage1(currentPage1);
|
|
|
},
|
|
|
},
|
|
|
watch: {
|
|
|
- list: {
|
|
|
+ applylist: {
|
|
|
+ immediate: true,
|
|
|
+ deep: true,
|
|
|
handler(val) {
|
|
|
- this.updataApply();
|
|
|
+ if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
|
|
|
+ this.searchpage();
|
|
|
},
|
|
|
+ },
|
|
|
+ good: {
|
|
|
immediate: true,
|
|
|
+ deep: true,
|
|
|
+ handler(val) {
|
|
|
+ if (val && val.length > 0) this.$set(this, `origin1`, _.chunk(val, this.pageSize));
|
|
|
+ this.searchpage1();
|
|
|
+ },
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
@@ -534,7 +568,7 @@ export default {
|
|
|
padding: 0 40px 0 10px;
|
|
|
}
|
|
|
.page {
|
|
|
- text-align: right;
|
|
|
+ text-align: center;
|
|
|
padding: 10px 0;
|
|
|
}
|
|
|
</style>
|