[MOD] run task

This commit is contained in:
Andy Bunce 2020-10-26 12:22:55 +00:00
parent 9516cf0d83
commit c7090cdc74
4 changed files with 26 additions and 14 deletions

View File

@ -38,7 +38,7 @@
</field> </field>
</fields> </fields>
<views iconclass="fa fa-file"> <views iconclass="topic">
<view name="filter">name</view> <view name="filter">name</view>
</views> </views>
<data type="element(image)">collection($cfg:DB-IMAGE || "/image")/image</data> <data type="element(image)">collection($cfg:DB-IMAGE || "/image")/image</data>

View File

@ -39,8 +39,7 @@
<v-layout wrap > <v-layout wrap >
<v-flex <v-flex
v-for="item in props.items" v-for="item in props.items"
:key="item.name" :key="item.name" align-items="flex-start"
> >
<v-card :hover="true" active-class="default-class qd-active" max-width="20em" min-width="20em"> <v-card :hover="true" active-class="default-class qd-active" max-width="20em" min-width="20em">

View File

@ -70,12 +70,25 @@ function vue-rest:runtask($task)
return ( return (
query-a:run($url, $params, map{}), query-a:run($url, $params, map{}),
hlog:save($log), hlog:save($log),
let $a:=update:cache(true()) vue-rest:result()
let $r:=<json type="object">
<result>{$a[1]}</result>
<id>{$a[2]}</id>
</json>
return update:output($r)
) )
}; };
(:~ massage update:output
update:cache = (results,id)
:)
declare
%updating
function vue-rest:result(){
let $a:=update:cache(true())
let $r:=$a[1]
let $r:=typeswitch($r)
case element(json) return <result type="{$r/@type}">{$r/*}</result>
default return <result>{$r}</result>
let $r:=<json type="object">
{$r}
<id>{$a[2]}</id>
</json>
return update:output($r)
};

View File

@ -1,4 +1,4 @@
// generated 2020-10-25T12:28:22.114Z // generated 2020-10-25T22:11:28.368Z
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-autoheight.vue // src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-autoheight.vue
Vue.component('qd-autoheight',{template:` Vue.component('qd-autoheight',{template:`
@ -5914,7 +5914,7 @@ const Entity=Vue.extend({template:`
<template v-slot:default="props"> <template v-slot:default="props">
<v-layout wrap> <v-layout wrap>
<v-flex v-for="item in props.items" :key="item.name"> <v-flex v-for="item in props.items" :key="item.name" align-items="flex-start">
<v-card :hover="true" active-class="default-class qd-active" max-width="20em" min-width="20em"> <v-card :hover="true" active-class="default-class qd-active" max-width="20em" min-width="20em">