1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
harveyshao 2022-03-23 10:17:54 +08:00
parent 337f4dbf8a
commit f33ba0c897
4 changed files with 10 additions and 8 deletions

View File

@ -9,9 +9,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
can.base.isFunc(cb) && cb(msg)
},
_content: function(can, msg, head, list, key, get, set) {
var hash = {}; msg.Table(function(value, index) {
var k = key(can.base.Date(value.begin_time)); hash[k] = (hash[k]||[]).concat([value])
})
var hash = {}; msg.Table(function(value, index) { var k = key(can.base.Date(value.begin_time)); hash[k] = (hash[k]||[]).concat([value]) })
can.sup.task && (can.sup.task._target = null)
var begin_time = can.base.Date(can.Option("begin_time"))
@ -22,6 +20,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
return can.onimport._task(can, msg, get(begin_time, col, row, hash), set(begin_time, col, row))
})}
}) }])
if (msg.Length() == 0) { return }
can.core.Timer(10, function() { if (!can.sup.task) { return }
var target = can.sup.task._target||can.task._target
can.sup.task = null, target.click()

View File

@ -74,11 +74,14 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, conf,
})
Volcanos("onaction", {help: "交互操作", list: [
"共享工具", "切换全屏", "打开链接", "生成链接", "生成图片", "生成脚本", "刷新数据", "刷新页面", [
"其它", "清空参数", "复制数据", "下载数据", "清空数据", "删除工具", "打包页面", "摄像头",
"其它", "清空参数", "复制数据", "下载数据", "清空数据", "删除工具", "打包页面", "摄像头", "扩展参数",
],
], _init: function(can, msg, list, cb, target) {},
_engine: function(event, can, button) { can.Update(event, [ctx.ACTION, button].concat(can.Input([], true))) },
"扩展参数": function(event, can) {
can.onmotion.toggle(can, can._action)
},
"共享工具": function(event, can) { var meta = can.Conf()
can.onmotion.share(event, can, [{name: chat.TITLE, value: meta.name}, {name: chat.TOPIC, values: [cli.WHITE, cli.BLACK]}], [
mdb.NAME, meta.index, mdb.TEXT, JSON.stringify(can.Input([], true)),

View File

@ -58,8 +58,8 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
return tree.meta&&tree.meta.color || (tree.list == 0? cli.PURPLE: cli.YELLOW)
},
}, [""])
Volcanos("onaction", {help: "用户操作", list: ["编辑", [ice.VIEW, "横向", "纵向"], "生成图片"],
"编辑": function(event, can) {
Volcanos("onaction", {help: "用户操作", list: ["edit", [ice.VIEW, "横向", "纵向"], "生成图片"],
"edit": function(event, can) {
can.onmotion.toggle(can, can._action)
can.onmotion.toggle(can, can._status)
},

View File

@ -40,8 +40,8 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
can.Status({"from": begin, "commit": count, "total": add+del, "max": max})
},
}, [""])
Volcanos("onaction", {help: "组件菜单", list: ["编辑", ["view", "趋势图", "柱状图", "数据源"], ["height", "100", "200", "400", "600", "800", "max"], ["speed", "10", "20", "50", "100"]],
"编辑": function(event, can) {
Volcanos("onaction", {help: "组件菜单", list: ["edit", ["view", "趋势图", "柱状图", "数据源"], ["height", "100", "200", "400", "600", "800", "max"], ["speed", "10", "20", "50", "100"]],
"edit": function(event, can) {
can.onmotion.toggle(can, can._action)
can.onmotion.toggle(can, can._status)
},