From 9cfcfd0dc423a60306e61b6ec68dc049657e482c Mon Sep 17 00:00:00 2001 From: FLYPHT <1035748121@qq.com> Date: Tue, 26 Jul 2022 15:07:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E:=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AD=97=E5=85=B8js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/event/bpm/sys/base/dict/dict.js | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 smtweb-framework/bpm/src/main/resources/static/event/bpm/sys/base/dict/dict.js diff --git a/smtweb-framework/bpm/src/main/resources/static/event/bpm/sys/base/dict/dict.js b/smtweb-framework/bpm/src/main/resources/static/event/bpm/sys/base/dict/dict.js new file mode 100644 index 0000000..fa3c318 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/event/bpm/sys/base/dict/dict.js @@ -0,0 +1,36 @@ +/** + * Created by 1 at 2022-07-26 11:11:24 + * 注册事件类【数据字典管理】,参看event.defaultEvent.js +*/ +window.$swEvent.setup("bpm.sys.base.dict.dict", { + setup(page){ + const { $params,$refs, $widgets, $model, $utils, $tabRouter, $api,$lifecycle } = page || {}; + const { $$message, $$http } = $utils || {}; + // 数据字典类型表格行点击事件 + const dictTypeRowClick = (row) => { + // 缓存变量 + $model.temp?.setFormVal("dict_type_id",row.sdct_id); + // 调用字典加载 + $api.loadOne("dictList"); + }; + // 数据字典新增初始化 + const afterAddDict = () => { + // 设置字典类型 + $model.dictEdit?.setFormVal("sdc_type", $model.temp?.getFormVal("dict_type_id")); + }; + // 删除类型之后 + const afterDelDictType = () => { + $api.loadOne("dictTypeList"); + }; + // 删除字典之后 + const afterDelDict = () => { + $api.loadOne("dictList"); + }; + return { + dictTypeRowClick, + afterAddDict, + afterDelDictType, + afterDelDict, + } + } +});