|
|
@@ -51,26 +51,15 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState } from 'vuex';
|
|
|
-import pageableTable from '../../mixins/pageableTable';
|
|
|
+import list from '../../mixins/list';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- id: 1104,
|
|
|
- name: '1',
|
|
|
- phone: '1',
|
|
|
- region: '1',
|
|
|
- price: 1,
|
|
|
- time: '12:20',
|
|
|
- status: '交易中',
|
|
|
- address: '1 1518 弄'
|
|
|
- }
|
|
|
- ],
|
|
|
+ tableData: [],
|
|
|
typeList: [
|
|
|
{
|
|
|
label: '全部',
|
|
|
- value: ''
|
|
|
+ value: 'PROCESSING,FINISH'
|
|
|
},
|
|
|
{
|
|
|
label: '交易中',
|
|
|
@@ -81,19 +70,58 @@ export default {
|
|
|
value: 'FINISH'
|
|
|
}
|
|
|
],
|
|
|
- list: [],
|
|
|
+ type: 'PROCESSING,FINISH',
|
|
|
+ url: '/order/all',
|
|
|
search: '',
|
|
|
- type: ''
|
|
|
+ list: []
|
|
|
};
|
|
|
},
|
|
|
- mixins: [pageableTable],
|
|
|
+ mixins: [list],
|
|
|
|
|
|
computed: {
|
|
|
...mapState(['userInfo'])
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ watch: {
|
|
|
+ type() {
|
|
|
+ this.$router
|
|
|
+ .replace({
|
|
|
+ search: this.search,
|
|
|
+ query: {
|
|
|
+ userId: this.userInfo.id,
|
|
|
+ type: this.type
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ this.getData();
|
|
|
+ this.tableData = this.list;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getData();
|
|
|
+ this.tableData = this.list;
|
|
|
+ },
|
|
|
methods: {
|
|
|
- handleClick() {}
|
|
|
+ beforeData() {
|
|
|
+ return {
|
|
|
+ search: this.search,
|
|
|
+ query: {
|
|
|
+ userId: this.userInfo.id,
|
|
|
+ status: this.type
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ handleClick(row) {
|
|
|
+ this.$confirm('确定删除该订单吗?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '退出',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$http.get('/order/del' + row.id).then(() => {
|
|
|
+ this.getData();
|
|
|
+ console.log('删除成功');
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
@@ -108,6 +136,9 @@ export default {
|
|
|
color: #ffffff;
|
|
|
}
|
|
|
}
|
|
|
+/deep/ .el-table__empty-block {
|
|
|
+ background: #1c1e26 !important;
|
|
|
+}
|
|
|
.search {
|
|
|
background: #1a1a1a;
|
|
|
width: 280px;
|