123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- <template>
- <div id="newsInfo">
- <el-row>
- <el-col :span="24">
- <template>
- <el-tabs v-model="activeName" @tab-click="handleClicks">
- <el-tab-pane label="未发布" name="first">
- <el-col :span="24" class="info">
- <el-col :span="10" class="input">
- <el-input placeholder="请输入产品名称" v-model="input"> </el-input>
- </el-col>
- <el-col :span="2" class="btn">
- <el-button type="primary" icon="el-icon-search" circle></el-button>
- </el-col>
- </el-col>
- <el-table ref="debtTable" :data="debtTable" style="width: 100%" border>
- <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
- <el-table-column property="name" label="产品名称" align="center"> </el-table-column>
- <el-table-column label="图片" align="center">
- <template slot-scope="scope">
- <span style="margin-left: 10px"> <el-image :src="scope.row.pic"></el-image></span>
- </template>
- </el-table-column>
- <el-table-column label="状态" align="center">
- <template slot-scope="scope">
- <span style="margin-left: 10px">{{ 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="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
- <el-button @click="clickRest(scope.row)" type="text"><i class="el-icon-refresh"></i></el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-col class="page" :span="24">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- layout="total, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </el-col>
- </el-tab-pane>
- <el-tab-pane label="发布" name="second">
- <el-col :span="24" class="info">
- <el-col :span="10" class="input">
- <el-input placeholder="请输入产品名称" v-model="input"> </el-input>
- </el-col>
- <el-col :span="2" class="btn">
- <el-button type="primary" icon="el-icon-search" circle></el-button>
- </el-col>
- </el-col>
- <el-table ref="shenheTable" :data="shenheTable" style="width: 100%" border>
- <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
- <el-table-column property="name" label="产品名称" align="center"> </el-table-column>
- <el-table-column label="图片" align="center">
- <template slot-scope="scope">
- <span style="margin-left: 10px"> <el-image :src="scope.row.pic"></el-image></span>
- </template>
- </el-table-column>
- <el-table-column label="状态" align="center">
- <template slot-scope="scope">
- <span style="margin-left: 10px">{{ 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="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
- <el-button @click="clickRest(scope.row)" type="text"><i class="el-icon-refresh"></i></el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-col class="page" :span="24">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- layout="total, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </el-col>
- </el-tab-pane>
- <el-tab-pane label="下架" name="third">
- <el-col :span="24" class="info">
- <el-col :span="10" class="input">
- <el-input placeholder="请输入产品名称" v-model="input"> </el-input>
- </el-col>
- <el-col :span="2" class="btn">
- <el-button type="primary" icon="el-icon-search" circle></el-button>
- </el-col>
- </el-col>
- <el-table ref="noshenhetable" :data="noshenhetable" style="width: 100%" border>
- <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
- <el-table-column property="name" label="产品名称" align="center"> </el-table-column>
- <el-table-column label="图片" align="center">
- <template slot-scope="scope">
- <span style="margin-left: 10px"> <el-image :src="scope.row.pic"></el-image></span>
- </template>
- </el-table-column>
- <el-table-column label="状态" align="center">
- <template slot-scope="scope">
- <span style="margin-left: 10px">{{ 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="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-col class="page" :span="24">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- layout="total, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </el-col>
- </el-tab-pane>
- </el-tabs>
- </template>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- export default {
- name: 'newsInfo',
- props: {
- debtTable: null,
- shenheTable: null,
- noshenhetable: null,
- total: null,
- },
- components: {},
- data: () => ({
- currentPage: 1,
- activeName: 'first',
- input: '',
- }),
- created() {},
- computed: {
- status() {
- return this.$route.params.status;
- },
- },
- methods: {
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- },
- handleCurrentChange(val) {
- console.log(`当前页: ${val}`);
- },
- handleClicks(tab, event) {
- console.log(tab, event);
- },
- handleClick(id) {
- let newid = id.id;
- this.$emit('handleClick', newid);
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .info {
- padding: 15px 0;
- }
- .info .input {
- padding: 6px 0;
- }
- .info .btn {
- text-align: center;
- }
- /deep/.el-input__inner {
- height: 30px;
- line-height: 30px;
- }
- </style>
|