update
This commit is contained in:
@@ -65,7 +65,6 @@ export default {
|
||||
* Filter the column send_by
|
||||
*/
|
||||
filterOptions() {
|
||||
debugger;
|
||||
this.options.columns = this.options.columns.filter(function(item) {
|
||||
return item !== "send_by";
|
||||
});
|
||||
|
||||
@@ -1,43 +1,29 @@
|
||||
<template>
|
||||
<div class="pm-vue-list-view" :height="height">
|
||||
<div class="pm-vue-list-view-container">
|
||||
<div
|
||||
class="pm-vue-list-view-body"
|
||||
:style="{height: height + 'px'}"
|
||||
>
|
||||
<vue-list v-for="item in data" :key="item.id" :item="item" :options="options">
|
||||
<div class="pm-vue-list-view-body" :style="{ height: height + 'px' }">
|
||||
<vue-list
|
||||
v-for="item in data"
|
||||
:key="item.id"
|
||||
:item="item"
|
||||
:options="options"
|
||||
>
|
||||
<b-row>
|
||||
<b-col sm="5">
|
||||
<slot
|
||||
v-for="column in chunkColumns[0]"
|
||||
:name="column"
|
||||
:item="item"
|
||||
:column="column"
|
||||
:headings="options.headings"
|
||||
ref="containerList"
|
||||
></slot>
|
||||
</b-col>
|
||||
<b-col sm="5">
|
||||
<!-- <slot
|
||||
name="send_by"
|
||||
:item="item"
|
||||
column="send_by"
|
||||
:headings="options.headings"
|
||||
></slot> -->
|
||||
<slot
|
||||
v-for="column in chunkColumns[1]"
|
||||
:name="column"
|
||||
:item="item"
|
||||
:column="column"
|
||||
:headings="options.headings"
|
||||
ref="containerList"
|
||||
></slot>
|
||||
<b-col sm="10">
|
||||
<b-row>
|
||||
<b-col sm="5" v-for="column in options.columns" :key="column">
|
||||
<slot
|
||||
:name="column"
|
||||
:item="item"
|
||||
:column="column"
|
||||
:headings="options.headings"
|
||||
>
|
||||
</slot>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-col>
|
||||
<b-col sm="2">
|
||||
<slot
|
||||
name="actions"
|
||||
:item="item"
|
||||
></slot>
|
||||
<slot name="actions" :item="item"></slot>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</vue-list>
|
||||
@@ -63,22 +49,11 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loadMore: this.$t("ID_LOAD_MORE"),
|
||||
chunkColumns: []
|
||||
chunkColumns: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.chunkColumns = this.chunkArray(this.options.columns, 2);
|
||||
debugger
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
chunkArray(array, size) {
|
||||
let result = [],
|
||||
arrayCopy = [...array];
|
||||
while (arrayCopy.length > 0) {
|
||||
result.push(arrayCopy.splice(0, size));
|
||||
}
|
||||
return result;
|
||||
},
|
||||
classBtn(cls) {
|
||||
return "btn btn-slim btn-force-radius v-btn-header " + cls;
|
||||
},
|
||||
@@ -86,10 +61,10 @@ export default {
|
||||
* Filter the column send_by
|
||||
*/
|
||||
filterOptions() {
|
||||
this.options.columns = this.options.columns.filter(function(item) {
|
||||
this.options.columns = this.options.columns.filter(function (item) {
|
||||
return item !== "send_by";
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="data.length" class="grouped-cell">
|
||||
<div v-for="(item, index) in data" v-bind:key="item.TITLE" class="d-flex mb-3">
|
||||
<div v-for="(item, index) in data" v-bind:key="item.TITLE" class="d-flex">
|
||||
<div class="avatar" :id="id + index">
|
||||
<b-avatar
|
||||
variant="info"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div
|
||||
v-for="(item, index) in data"
|
||||
v-bind:key = index
|
||||
class="d-flex mb-3">
|
||||
class="d-flex">
|
||||
<div
|
||||
v-bind:style="{ color: activeColor(item.CODE_COLOR) }"
|
||||
:id="statusId + index"
|
||||
|
||||
@@ -747,7 +747,6 @@ export default {
|
||||
that.filterItems = newItems;
|
||||
dt = that.formatDataResponse(response.data.data);
|
||||
that.cardColumns = columns;
|
||||
debugger;
|
||||
if (that.isFistTime) {
|
||||
that.filters = that.data.settings && that.data.settings.filters ? that.data.settings.filters : {};
|
||||
that.columns = that.data.settings && that.data.settings.columns ? that.data.settings.columns : that.getTableColumns(columns);
|
||||
|
||||
Reference in New Issue
Block a user