This commit is contained in:
2019-12-10 00:48:31 +00:00
parent ad52782b21
commit 2ea738d42d
3 changed files with 83 additions and 41 deletions

View File

@@ -29,9 +29,9 @@ export default {
if (res.error) {
throw res.error;
}
window.$gz.store.commit("addFormCustomTemplateItem", {
formKey: formKey,
concurrencyToken: res.data.concurrencyToken,
value: addDataKeyNames(JSON.parse(res.data.template))
});
@@ -61,5 +61,16 @@ export default {
var templateItem = window.$gz._.find(template, ["fld", fieldKey]);
return templateItem;
},
getTemplateConcurrencyToken(formKey) {
var tok =
window.$gz.store.state.formCustomTemplate[formKey + "_concurrencyToken"];
if (tok === undefined) {
throw "ERROR form-custom-template::getTemplateConcurrencyToken -> Store is missing concurrency token for [" +
formKey +
"]";
}
return tok;
}
};