| | |
| | | import classUtils from "@/js/utils.js" |
| | | import { |
| | | showInfo, |
| | | showError |
| | | showError, |
| | | showLoading, |
| | | hideLoading |
| | | } from "@/js/Page.js" |
| | | import { |
| | | appGetInfo, |
| | |
| | | |
| | | }, |
| | | async onLoad(options) { |
| | | // console.log(options); |
| | | uni.setNavigationBarTitle({ |
| | | title: options.titlename |
| | | }); //设置顶部标题 |
| | | this.title = options.titlename; |
| | | this.param = JSON.parse(options.param); |
| | | const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined |
| | | this.styledef = {}; |
| | | this.head_styledef = { |
| | | form: { |
| | | items: [] |
| | | } |
| | | }; |
| | | this.detail1_styledef = {}; |
| | | this.detail1StyleDefList = []; |
| | | this.items = []; |
| | | this.active_id = ''; |
| | | this.activeItem = {}; |
| | | this.click_item_view = false |
| | | if (this.param?.ClickItem_Event?.id) |
| | | this.click_item_view = true |
| | | await this.Detail1_UIstyleGetInfo(this.param.ClsID, this.param.ListItem_Panel.id); |
| | | this.initial(paramValue) |
| | | try { |
| | | showLoading("loading...") |
| | | // console.log(options); |
| | | uni.setNavigationBarTitle({ |
| | | title: options.titlename |
| | | }); //设置顶部标题 |
| | | this.title = options.titlename; |
| | | this.param = JSON.parse(options.param); |
| | | const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined |
| | | this.styledef = {}; |
| | | this.head_styledef = { |
| | | form: { |
| | | items: [] |
| | | } |
| | | }; |
| | | this.detail1_styledef = {}; |
| | | this.detail1StyleDefList = []; |
| | | this.items = []; |
| | | this.active_id = ''; |
| | | this.activeItem = {}; |
| | | this.click_item_view = false |
| | | if (this.param?.ClickItem_Event?.id) |
| | | this.click_item_view = true |
| | | await this.Detail1_UIstyleGetInfo(this.param.ClsID, this.param.ListItem_Panel.id); |
| | | this.initial(paramValue) |
| | | hideLoading() |
| | | } catch (ex) { |
| | | hideLoading() |
| | | showError(ex, this.translateSys("error")); |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | |
| | | }; |
| | | runCustomEvent(dataInfo).then(result => { |
| | | console.log(result); |
| | | |
| | | if (result.ret != 0 && result.ret != 1) { |
| | | let cls_name = result.event_info?.cls_name |
| | | let event_name = result.event_info?.event_name |
| | |
| | | if (!this.clickItemEvent.id) { |
| | | return; |
| | | } |
| | | showLoading("loading...") |
| | | const $this = this |
| | | |
| | | var obj_attr = this.head_styledef.form.model; |
| | |
| | | data_json, |
| | | }).then(result => { |
| | | // console.log(result); |
| | | hideLoading() |
| | | if (result.ret != 0 && result.ret != 1) { |
| | | let cls_name = result.event_info?.cls_name |
| | | let event_name = result.event_info?.event_name |
| | |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | hideLoading() |
| | | showError(ex, this.translateSys("error") + "8.1") |
| | | }); |
| | | }, |
| | |
| | | //执行触发事件 |
| | | async triggerEvent(btn, style, enviroment) { |
| | | const $this = this |
| | | |
| | | showLoading("loading...") |
| | | var obj_attr = this.head_styledef.form.model; |
| | | // console.log(obj_attr); |
| | | var input_param = Base64.encode( |
| | |
| | | input_param, |
| | | data_json, |
| | | }).then(result => { |
| | | hideLoading() |
| | | // console.log(result); |
| | | if (result.ret != 0 && result.ret != 1) { |
| | | let cls_name = result.event_info?.cls_name |
| | |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | hideLoading() |
| | | showError(ex, this.translateSys("error") + "8.1") |
| | | }); |
| | | }, |
| | |
| | | async onChange(event) { |
| | | try { |
| | | if (event.id) { |
| | | showLoading("loading...") |
| | | var obj_attr = this.head_styledef.form.model; |
| | | console.log(obj_attr); |
| | | var input_param = Base64.encode( |
| | |
| | | }; |
| | | runCustomEvent(dataInfo).then(result => { |
| | | console.log(result); |
| | | hideLoading() |
| | | if (result.ret != 0 && result.ret != 1) { |
| | | let cls_name = result.event_info?.cls_name |
| | | let event_name = result.event_info?.event_name |
| | |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | hideLoading() |
| | | showError(ex, this.translateSys("error") + "8.1") |
| | | }); |
| | | } |
| | | } catch (ex) { |
| | | hideLoading() |
| | | showError(ex, this.translateSys('error') + "8.2") |
| | | |
| | | } |