| | |
| | | <!-- 页签 --> |
| | | <view class="dv-tab"> |
| | | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" |
| | | styleType="button"> |
| | | styleType="text"> |
| | | </uni-segmented-control> |
| | | </view> |
| | | <swiper class="view-tabpage" :current="current" @change="changeSwiper"> |
| | |
| | | dataObjCreate, |
| | | dataObjDel |
| | | } from "@/api/data.js" |
| | | |
| | | import {showInfo, |
| | | showError} from "@/js/Page.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | popupParam: {}, |
| | | }; |
| | | }, |
| | | onReady() { |
| | | uni.setNavigationBarTitle({ |
| | | title: this.title |
| | | }); //设置顶部标题 |
| | | }, |
| | | onLoad(options) { |
| | | // console.log(options); |
| | | uni.setNavigationBarTitle({ |
| | | title: options.titlename |
| | | }); //设置顶部标题 |
| | | |
| | | this.title = options.titlename; |
| | | this.param = JSON.parse(options.param); |
| | | // console.log(this.param); |
| | | const paramValue = options.paramValue ?JSON.parse(options.paramValue) :undefined |
| | | const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined |
| | | this.loadData(paramValue) |
| | | }, |
| | | |
| | | //页面初始化获取焦点 |
| | | methods: { |
| | | setData: function(obj) { |
| | |
| | | //传入参数值 |
| | | if (paramValue) { |
| | | this.setFormValues(paramValue) |
| | | } |
| | | } |
| | | |
| | | //加载初始界面 |
| | | if (this.param.Show_Welcom_Page) { |
| | |
| | | return 0; |
| | | } |
| | | }, |
| | | setFormValues(attrs) { |
| | | setFormValues(attrs) { |
| | | const head_styledef = this.head_styledef |
| | | if (JSON.stringify(attrs) == '{}') { |
| | | return; |
| | | if (!Array.isArray(attrs)) { |
| | | return |
| | | } |
| | | console.log(attrs) |
| | | attrs.forEach(async (attr, key) => { |
| | |
| | | head_styledef: head_styledef |
| | | }) |
| | | }, //更新分页签中的列表项内容 |
| | | |
| | | |
| | | //更新分页签中的列表项内容 |
| | | viewActionSetRow(value) { |
| | | const $this = this |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | //确定 |
| | | ok() { |
| | | this.Before_OK_Event = this.param.Sub_Page[0].Before_ok; |
| | |
| | | else if (type == "2") |
| | | this.ok2Loading = false |
| | | }).catch(ex => { |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : ex |
| | | |
| | | // var tip = typeof ex == "string" ? ex : ex.errMsg; |
| | | if (type == "1") |
| | | this.okLoading = false |
| | | else if (type == "2") |
| | | this.ok2Loading = false |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + "8.1", |
| | | content: this.translate("execute_after_ok_event_failed") + this.translateSys( |
| | | "comma") + |
| | | tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | showError(ex, this.translateSys("error") + "8.1") |
| | | |
| | | }); |
| | | }, |
| | | |