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