| | |
| | | overflow: hidden; |
| | | background: #fff; |
| | | position: relative; |
| | | box-shadow: 0 2rpx 2rpx rgba(0, 0, 0, 0.2); |
| | | margin-right: 8rpx; |
| | | /* box-shadow: 0 2rpx 2rpx rgba(0, 0, 0, 0.2); |
| | | margin-right: 8rpx; */ |
| | | } |
| | | .view-imagetext .txt-text{ |
| | | display: block; |
| | |
| | | </view> |
| | | <view class="view-content"> |
| | | <!-- 图文/文本 --> |
| | | <view class="view-imagetext" v-if="pageType=='img_msg' || pageType=='msg'"> |
| | | <div class="view-imagetext-uploadlist" :style="{'background-color':page.Bk_Color}"> |
| | | <!-- 图文 --> |
| | | <image :src="page.Img" :style="{'width':page.Width+'px','height':page.Height+'px'}" v-if="pageType=='img_msg'"></image> |
| | | |
| | | <!-- 图文/文本 --> |
| | | <view class="view-imagetext" v-if="param.Show_Welcom_Page==true"> |
| | | <div class="view-imagetext-uploadlist"> |
| | | <image :src="param.Welcome_Page.Img" |
| | | :style="{'width':param.Welcome_Page.Width+'px','height':param.Welcome_Page.Height+'px'}"></image> |
| | | <text class="txt-text" |
| | | :style="{'color':page.Txt_Color,'font-size':page.Font_Size,'font-family':page.Font}" |
| | | >{{page.Text}}</Text> |
| | | :style="{'color':param.Welcome_Page.Txt_Color,'font-size':param.Welcome_Page.Font_Size,'font-family':param.Welcome_Page.Font}" |
| | | >{{param.Welcome_Page.Text}}</Text> |
| | | </div> |
| | | </view> |
| | | <!-- 多页签数据列表 --> |
| | | <view v-if="pageType=='mulit_page_datalist'"> |
| | | <!-- 码盘界面 --> |
| | | <view v-if="param.Show_Welcom_Page==false"> |
| | | <!-- 页签 --> |
| | | <view class="dv-tab"> |
| | | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" |
| | | styleType="button"> |
| | | </uni-segmented-control> |
| | | </view> |
| | | <!-- 1#页签 --> |
| | | <!-- 码盘界面 --> |
| | | <view class="view-tabpage" v-if="current==0"> |
| | | <image class="logo" v-if="detail1StyleDefList.length==0" src="../../images/mobox_log_200x40.png"></image> |
| | | <!-- <div class="dv-panel"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="dv-panel-button"> |
| | | <checkbox-group v-if="page.Page[0].Select_Button==true"> |
| | | <checkbox-group v-if="param.Coder_Page[0].Select_Button==true"> |
| | | <label> |
| | | <checkbox :value="style.SelBut_Checked" :checked="style.SelBut_Checked" /> |
| | | <!-- <text></text> --> |
| | | </label> |
| | | </checkbox-group> |
| | | <button type="primary" @click="savaItem(ii)" v-if="page.Page[0].OK_Button==true">保存</Button> |
| | | <button type="warn" @tap="delItem(ii)" v-if="page.Page[0].Del_Button==true">删除</button> |
| | | <button type="primary" @click="savaItem(ii)" v-if="param.Coder_Page[0].OK_Button==true">保存</Button> |
| | | <button type="warn" @tap="delItem(ii)" v-if="param.Coder_Page[0].Del_Button==true">删除</button> |
| | | </div> |
| | | </div> |
| | | </view> |
| | | <!-- 2#页签 --> |
| | | <!-- 已码盘界面 --> |
| | | <view class="view-tabpage2" v-if="current==1"> |
| | | <image class="logo" v-if="detail2StyleDefList.length==0" src="../../images/mobox_log_200x40.png"></image> |
| | | <div class="dv-panel" v-for="(style,ii) in detail2StyleDefList"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="dv-panel-button"> |
| | | <checkbox-group v-if="page.Page[1].Select_Button==true"> |
| | | <checkbox-group v-if="param.Coder_Page[1].Select_Button==true"> |
| | | <label> |
| | | <checkbox :value="style.SelBut_Checked" :checked="style.SelBut_Checked" /> |
| | | <!-- <text></text> --> |
| | | </label> |
| | | </checkbox-group> |
| | | <button type="primary" @click="savaDataObj(style,ii)" v-if="page.Page[1].OK_Button==true">保存</Button> |
| | | <button type="warn" @tap="delDataObj(style,ii)" v-if="page.Page[1].Del_Button==true">删除</button> |
| | | <button type="primary" @click="savaDataObj(style,ii)" v-if="param.Coder_Page[1].OK_Button==true">保存</Button> |
| | | <button type="warn" @tap="delDataObj(style,ii)" v-if="param.Coder_Page[1].Del_Button==true">删除</button> |
| | | </div> |
| | | </div> |
| | | </view> |
| | | </view> |
| | | <!-- 单数据列表 --> |
| | | <view class="view-detalist-centen" v-if="pageType=='datalist'"> |
| | | <text class="txt-detalist">{{page.Page_Name}}</Text> |
| | | <image class="logo" v-if="detail1StyleDefList.length==0" src="../../images/mobox_log_200x40.png"></image> |
| | | <div class="dv-panel" v-for="(style,ii) in detail1StyleDefList"> |
| | | <div class="dv-panel-input"> |
| | | <div v-for="(item,index) in style.form.items"> |
| | | <!-- 普通布局 --> |
| | | <view v-if="item.name=='Input'"> |
| | | <text class="txt_title" :style="{'width':item.labelWidth+'px'}">{{item.label}}:</text> |
| | | <span class="form-item-span" v-if="item.disabled">{{item.value}}</span> |
| | | <input |
| | | class="uni-input" |
| | | v-if="!item.disabled" |
| | | :type="item.name=='InputNumber'?'number':'text'" |
| | | :value="item.value" |
| | | :disabled="item.disabled" |
| | | :placeholder="item.placeholder" |
| | | /> |
| | | </view> |
| | | <!-- 栅格布局 --> |
| | | <uni-row class="demo-uni-row" v-if="item.name=='Layout'"> |
| | | <uni-col |
| | | :span="24 / item.setting.col" |
| | | v-for="(cols,key) in item.setting.colList" |
| | | > |
| | | <view v-if="cols!=null" > |
| | | <text class="txt_title" :style="{'width':cols.labelWidth+'px'}">{{cols.label}}:</text> |
| | | <span class="form-item-span" v-if="cols.disabled">{{cols.value}}</span> |
| | | <input |
| | | class="uni-input" |
| | | v-if="!cols.disabled" |
| | | :type="cols.name=='InputNumber'?'number':'text'" |
| | | :value="cols.value" |
| | | :disabled="cols.disabled" |
| | | :placeholder="cols.placeholder" |
| | | /> |
| | | </view> |
| | | </uni-col> |
| | | </uni-row> |
| | | </div> |
| | | </div> |
| | | <div class="dv-panel-button"> |
| | | <checkbox-group v-if="page.Select_Button==true"> |
| | | <label> |
| | | <checkbox :value="style.SelBut_Checked" :checked="style.SelBut_Checked" /> |
| | | <!-- <text></text> --> |
| | | </label> |
| | | </checkbox-group> |
| | | <button type="primary" @click="savaItem(ii)" v-if="page.OK_Button==true">保存</Button> |
| | | <button type="warn" @tap="delItem(ii)" v-if="page.Del_Button==true">删除</button> |
| | | </div> |
| | | </div> |
| | | </view> |
| | | </view> |
| | | <view> |
| | |
| | | data() { |
| | | return { |
| | | title:'码盘', |
| | | ClsID:'CG_Detail', |
| | | param: {}, |
| | | focusMateria:false, |
| | | head_styledef:{ |
| | |
| | | detail2StyleDefList:[], |
| | | // 分段器数据 |
| | | current: 0, |
| | | pageType:'', |
| | | page:{}, |
| | | Before_OK_Event:{}, |
| | | After_OK_Event:{}, |
| | | items: [], |
| | |
| | | this.$data.param = JSON.parse(options.param); |
| | | // console.log(this.$data.param); |
| | | //获取数据类的自定义表单参数 |
| | | this.Head_UIStyleGetInfo(this.$data.param.Cls.ID,this.$data.param.Grid_Style.ID); |
| | | this.Head_UIStyleGetInfo(this.$data.ClsID,this.$data.param.Input_UI_Style.ID); |
| | | |
| | | var $this = this; |
| | | //加载初始界面 |
| | | this.$data.param.Page_Def.forEach(async ele=>{ |
| | | if($this.$data.param.Start_Page == ele.Name){ |
| | | if(ele.Type=="img_msg"){ //图文 |
| | | ele.Img = ele.Img.replace(/ /g,'+'); |
| | | ele.Width = parseInt(ele.Width); |
| | | ele.Height = parseInt(ele.Height); |
| | | } else if(ele.Type=="msg"){ //文本 |
| | | } else if(ele.Type=="mulit_page_datalist"){ //多页签数据列表 |
| | | $this.$data.items.push(ele.Page[0].Name); |
| | | $this.$data.items.push(ele.Page[1].Name); |
| | | await $this.Detail1_UIstyleGetInfo(ele.Page[0].Cls.ID,ele.Page[0].UI_Style.ID); |
| | | await $this.Detail2_UIstyleGetInfo(ele.Page[1].Cls.ID,ele.Page[1].UI_Style.ID); |
| | | } else if(ele.Type=="datalist"){ //单数据列表 |
| | | await $this.Detail1_UIstyleGetInfo(ele.Cls.ID,ele.UI_Style.ID); |
| | | } |
| | | $this.$data.pageType = ele.Type; |
| | | $this.$data.page = ele; |
| | | console.log(this.page); |
| | | if(this.$data.param.Show_Welcom_Page){ |
| | | this.$data.param.Welcome_Page.Img = this.$data.param.Welcome_Page.Img.replace(/ /g,'+'); |
| | | this.$data.param.Welcome_Page.Width = parseInt(this.$data.param.Welcome_Page.Width); |
| | | this.$data.param.Welcome_Page.Height = parseInt(this.$data.param.Welcome_Page.Height); |
| | | } |
| | | }); |
| | | // this.Detail1_UIstyleGetInfo('CG_Detail',this.$data.param.Detail_List_Panel1_Style.ID); |
| | | // this.Detail2_UIstyleGetInfo('CG_Detail',this.$data.param.Detail_List_Panel2_Style.ID); |
| | | //加载Tab页签 |
| | | this.$data.items.push(this.$data.param.Coder_Page[0].Name); |
| | | this.$data.items.push(this.$data.param.Coder_Page[1].Name); |
| | | this.Detail1_UIstyleGetInfo(this.ClsID,this.$data.param.Coder_Page[0].UI_Style.ID); |
| | | this.Detail2_UIstyleGetInfo(this.ClsID,this.$data.param.Coder_Page[1].UI_Style.ID); |
| | | |
| | | console.log(this.$data.param); |
| | | //页面初始化获取焦点 |
| | | // this.focusMateria=true; |
| | | }, |
| | |
| | | if(result.result_type == 0 && result.action){ |
| | | result.action.forEach(item=>{ |
| | | if(item.action_type == "insert_subtable_page_row"){ //码盘中 |
| | | $this.$data.param.Show_Welcom_Page=false; |
| | | var value = item.value; |
| | | $this.viewAceionRow(value); |
| | | } |
| | | else if(item.action_type == "set_subtable_page_content"){ //已码盘 |
| | | $this.$data.param.Show_Welcom_Page=false; |
| | | var value = item.value; |
| | | if(value.clear == true && $this.$data.detail1StyleDefList.length>0){ //判断是否清空页签内容,正在码盘是否有数据 |
| | | uni.showModal({ |
| | |
| | | $this.viewAceionContent(value); |
| | | } |
| | | } |
| | | else if(item.action_type == "show_page"){ //显示界面 |
| | | var value = item.value; |
| | | $this.$data.param.Page_Def.forEach(async ele=>{ |
| | | if(value == ele.Name){ //判断脚本指定的界面名称是否相同 |
| | | if(ele.Type=="img_msg"){ |
| | | ele.Width = parseInt(ele.Width); |
| | | ele.Height = parseInt(ele.Height); |
| | | } else if(ele.Type=="msg"){ |
| | | } else if(ele.Type=="mulit_page_datalist"){ |
| | | await $this.Detail1_UIstyleGetInfo(ele.Page[0].Cls.ID,ele.Page[0].UI_Style.ID); |
| | | await $this.Detail2_UIstyleGetInfo(ele.Page[1].Cls.ID,ele.Page[1].UI_Style.ID); |
| | | } else if(ele.Type=="datalist"){ |
| | | await $this.Detail1_UIstyleGetInfo(ele.Cls.ID,ele.UI_Style.ID); |
| | | } |
| | | $this.pageType = ele.Type; |
| | | $this.page = ele;//转载指定界面style |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }else{ |
| | | // this.detail2StyleDefList=[]; |
| | |
| | | }, |
| | | //加载已码盘内容 |
| | | viewAceionContent(data){ |
| | | var $this = this; |
| | | data.content.forEach(cont=>{ |
| | | var styleStr = JSON.stringify(this.$data.detail2_styledef); |
| | | var styleStr = JSON.stringify($this.$data.detail2_styledef); |
| | | var detailStyle = JSON.parse(styleStr); |
| | | detailStyle.form.objId = cont.id; |
| | | cont.attrs.forEach(attr=>{ |
| | |
| | | } |
| | | }); |
| | | }); |
| | | this.$data.detail2StyleDefList.push(detailStyle); |
| | | $this.$data.detail2StyleDefList.push(detailStyle); |
| | | }); |
| | | // console.log(this.detail2StyleDefList); |
| | | // console.log(this.$data.detail2StyleDefList); |
| | | }, |
| | | onClickItem(e) { //选择页签 |
| | | // console.log(e); |
| | |
| | | |
| | | //确定 |
| | | ok(){ |
| | | var $this = this; |
| | | this.$data.param.Page_Def.forEach(async ele=>{ |
| | | if($this.pageType == ele.Type){ |
| | | if(ele.Type=="img_msg"){ |
| | | } else if(ele.Type=="msg"){ |
| | | } else if(ele.Type=="mulit_page_datalist"){ |
| | | $this.Before_OK_Event = ele.Page[1].Before_ok.ID; |
| | | $this.After_OK_Event = ele.Page[1].After_OK_Event.ID; |
| | | |
| | | } else if(ele.Type=="datalist"){ |
| | | $this.Before_OK_Event = ele.Before_ok.ID; |
| | | $this.After_OK_Event = ele.After_OK_Event.ID; |
| | | } |
| | | } |
| | | }); |
| | | // console.log(this.Before_OK_Event); |
| | | // console.log(this.After_OK_Event); |
| | | if(this.$data.Before_OK_Event) //是否有确定前事件 |
| | | this.Before_OK_Event = this.param.Coder_Page[1].Before_ok; |
| | | this.After_OK_Event = this.param.Coder_Page[1].After_ok; |
| | | // console.log(this.Before_OK_Event); |
| | | // console.log(this.After_OK_Event); |
| | | if(this.$data.Before_OK_Event.ID) //是否有确定前事件 |
| | | this.sava(this.$data.Before_OK_Event); |
| | | else if(this.$data.After_OK_Event) //是否有确定后事件 |
| | | else if(this.$data.After_OK_Event.ID) //是否有确定后事件 |
| | | this.sava(this.$data.After_OK_Event); |
| | | }, |
| | | sava(event){ |
| | |
| | | }else |
| | | detail_attr[item.fieldId] = item.value; |
| | | }); |
| | | //判断类型是否为多页签数据列表/单数据列表 |
| | | if($this.pageType=='mulit_page_datalist' || $this.pageType=='datalist'){ |
| | | if($this.page.Page[0].Select_Button==true){ //判断选择按钮是否为true |
| | | if(style.SelBut_Checked==true) |
| | | detailAttrList.push(detail_attr); |
| | | } else |
| | | |
| | | if($this.param.Coder_Page[0].Select_Button==true){ //判断选择按钮是否为true |
| | | if(style.SelBut_Checked==true) |
| | | detailAttrList.push(detail_attr); |
| | | } else |
| | | detailAttrList.push(detail_attr); |
| | | detailAttrList.push(detail_attr); |
| | | }); |
| | | // console.log(detailAttrList); |
| | | //获取正在码盘里没有显示的字段 |
| | |
| | | var dataInfo={ |
| | | ed_type: 0, |
| | | start_transaction: true, |
| | | class_id: this.$data.head_styledef.form.clsId, |
| | | class_id: this.$data.ClsID, |
| | | class_name: '', |
| | | event_id: event.ID, |
| | | event_name: '', |