This commit is contained in:
2020-12-21 18:02:53 +00:00
parent 7864ba906b
commit 1153c16ffb
2 changed files with 185 additions and 14 deletions

View File

@@ -66,7 +66,11 @@
></v-checkbox>
</td>
</template>
<td v-for="c in item.columns" :key="c.key">
<td
v-for="c in item.columns"
:key="c.key"
v-bind:style="cellStyle(c)"
>
<template v-if="c.t == 1">
<!-- DATETIME -->
{{ c.v }}
@@ -242,7 +246,7 @@
<v-list-item-title>
{{ getHeaderText(c.key) }}</v-list-item-title
>
<v-list-item-subtitle>
<v-list-item-subtitle v-bind:style="cellStyle(c)">
<template v-if="c.t == 1">
<!-- DATETIME -->
{{ c.v }}
@@ -575,6 +579,16 @@ export default {
//i is the actual AyaNova index of vm record so we have all we need to open vm object
window.$gz.eventBus.$emit("openobject", { type: typeToOpen, id: i });
},
cellStyle(c) {
// :style="'style=background-color:#FFFFE0;color:black;border:1px solid #BDB76B;' + c.clr + ';'"
if (c.clr && c.clr.length > 3) {
if (c.clr[0] != "#") {
c.clr = "#" + c.clr;
}
return { border: `4px solid ${c.clr}` };
}
return null;
},
async getDataFromApi(deSelectAll) {
let vm = this;
@@ -882,6 +896,11 @@ function buildRecords(listData, columndefinitions) {
columnObject["ot"] = column.ot;
}
//rgba color to decorate field with
if (column.clr) {
columnObject["clr"] = column.clr;
}
o.columns["c" + iColumn.toString()] = columnObject;
//Is:
//Headers: [ { "text": "Name", "value": "c1" }, { "text": "Serial #", "value": "c2" },