| | |
| | | <image class="divX" src="../../images/msg_50_new.png"></image>--> |
| | | <input |
| | | :type="attr.Type=='整数' || attr.Type=='浮点数' || attr.Type=='int' || attr.Type=='float'?'number':'text'" |
| | | :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" |
| | | :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | :disabled="attr.edit?false:true"> |
| | | :value="attr.Value" :focus="focusField ==`${index}-${iindex}`" @focus="ontap" |
| | | @click="onClick(index,iindex)" @blur="onevent" |
| | | v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" |
| | | :style="{'width':attr.Width}" :disabled="attr.edit?false:true"> |
| | | <!-- =='flase'?true:false --> |
| | | <textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" |
| | | :data-index="index" :data-iindex="iindex" style="height:60px;" |
| | | :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> |
| | | <textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" |
| | | :data-index="index" :data-iindex="iindex" style="height:90px;" |
| | | :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> |
| | | <textarea :value="attr.Value" :focus="focusField == `${index}-${iindex}`" @focus="ontap" |
| | | @click="onClick(index,iindex)" @blur="onevent" |
| | | v-else-if="attr.Height=='2'" :data-index="index" :data-iindex="iindex" |
| | | style="height:60px;" :style="{'width':attr.Width}" |
| | | :disabled="attr.edit?false:true"></textarea> |
| | | <textarea :value="attr.Value" :focus="focusField == `${index}-${iindex}`" @focus="ontap" |
| | | @click="onClick(index,iindex)" @blur="onevent" |
| | | v-else-if="attr.Height=='3'" :data-index="index" :data-iindex="iindex" |
| | | style="height:90px;" :style="{'width':attr.Width}" |
| | | :disabled="attr.edit?false:true"></textarea> |
| | | <!-- </div> --> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | |
| | | <image class="divX" src="../../images/msg_50_new.png"></image> --> |
| | | <input |
| | | :type="attr.Type=='整数' || attr.Type=='浮点数' || attr.Type=='int' || attr.Type=='float' ?'number':'text'" |
| | | class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" |
| | | v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" |
| | | class="attr_field" :value="attr.Value" :focus="focusField ==`${index}-${iindex}`" |
| | | @focus="ontap" @blur="onevent" @click="onClick(index,iindex)" v-if="attr.Height=='1'" |
| | | :data-index="index" :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" |
| | | :disabled="attr.edit?false:true"> |
| | | <textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" |
| | | <textarea class="attr_field" :value="attr.Value" :focus="focusField == `${index}-${iindex}`" |
| | | @focus="ontap" @blur="onevent" @click="onClick(index,iindex)" |
| | | v-else-if="attr.Height=='2'" :data-index="index" :data-iindex="iindex" |
| | | style="height:60px;" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" |
| | | :disabled="attr.edit?false:true"></textarea> |
| | | <textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" |
| | | <textarea class="attr_field" :value="attr.Value" :focus="focusField == `${index}-${iindex}`" |
| | | @focus="ontap" @blur="onevent" @click="onClick(index,iindex)" |
| | | v-else-if="attr.Height=='3'" :data-index="index" :data-iindex="iindex" |
| | | style="height:90px;" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" |
| | |
| | | <a class="class_attr_add_ref"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | disabled="true"> |
| | | disabled="true" :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </p> |
| | | <input type="text" class="attr_field" :data-index="index" :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" |
| | | disabled="true"> |
| | | disabled="true" :maxlength="-1"> |
| | | <div class="text-right2" v-if="attr.Type=='引用对象(单个)'|| attr.Type=='obj-ref'"> |
| | | <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]" |
| | | :data-classname="attr.RelCls.split('|')[1]"><i |
| | |
| | | <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true"> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" |
| | | :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </p> |
| | | <input type="text" class="attr_field" :value="attr.Value" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" |
| | | disabled="true"> |
| | | disabled="true" :maxlength="-1"> |
| | | <div class="text-right2"> |
| | | <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | |
| | | <a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true"> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" |
| | | :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </p> |
| | | <input type="text" class="attr_field" :value="attr.Value" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true ?10:5) - 9 +'%'}" |
| | | disabled="true"> |
| | | disabled="true" :maxlength="-1"> |
| | | <div class="text-right2"> |
| | | <a class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | |
| | | :style="{'font-family':classattr.Font.Name?classattr.Font.Name:'initial','font-size':classattr.Font.Size?classattr.Font.Size:'initial','font-weight':classattr.Font.Bold?'bold':'initial','font-style':classattr.Font.Tilt?'italic':'initial','text-decoration':classattr.Font.Underline?'underline':'initial','background-color':classattr.Font.Bk_Color,'color':classattr.Font.Text_Color,'width':classattr.title_p_wdith+'%'}"><i |
| | | class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text> |
| | | <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | :disabled="attr.edit?false:true"> |
| | | :disabled="attr.edit?false:true" :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </p> |
| | | <input type="text" class="attr_field" :data-index="index" :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true ?10:5) +'%'}" |
| | | :disabled="attr.edit?false:true"> |
| | | :disabled="attr.edit?false:true" :maxlength="-1"> |
| | | <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- 左右布局 --> |
| | | <p class="tx_title2">{{param.Scan_Code.Name}}:</p> |
| | | <input type="text" class="attr_field" :value="scanCodeVal" @focus="scan_ontap" @blur="scan_onevent" |
| | | :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'"> |
| | | :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'" |
| | | :maxlength="-1"> |
| | | <div class="text-right2" v-if="param.Scan_Code.Have_Select_Button==true"> |
| | | <a @tap="scan_classAttr_extButton()"><i class="ace-icon fa" |
| | | :class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a> |
| | |
| | | return { |
| | | title: '新增', |
| | | param: {}, |
| | | focusField: "", |
| | | focusOldField: "", |
| | | classAttrList: [], |
| | | classGridStyle: [], |
| | | edit_inital_event: "", //弹窗初始化事件ID |
| | |
| | | this.subClass_attr_init(); |
| | | |
| | | } catch (ex) { |
| | | console.log(ex) |
| | | uni.showModal({ |
| | | title: "错误1", |
| | | content: ex.errMsg, |
| | |
| | | class_id: clsid, |
| | | }; |
| | | const result = await classAttrList(dataInfo) || [] |
| | | console.log("classAttrGetList", result) |
| | | return result |
| | | } catch (ex) { |
| | | // console.log(ex); |
| | |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + " 1.1", |
| | | title: "错误1.1", |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | confirmText: "取消" |
| | | }); |
| | | return [] |
| | | }; |
| | |
| | | type: '2' |
| | | }; |
| | | const result = await classGridStyleInfo(gridstyleInfo) |
| | | result.style_def = JSON.parse(styledef); |
| | | result.StyleDef = JSON.parse(result.StyleDef); |
| | | return result |
| | | |
| | | } catch (ex) { |
| | |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + " 1.2", |
| | | title: "错误1.2", |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | confirmText: "取消" |
| | | }); |
| | | return {} |
| | | }; |
| | | }, |
| | | |
| | | |
| | | onClick(index, iindex) { |
| | | this.focusField = `${index}-${iindex}` |
| | | console.log("onClick", this.focusField) |
| | | }, |
| | | |
| | | ontap(e) { //扫码功能 |
| | | //console.log(e.target) |
| | | this.focusOldField = `${e.target.dataset['index']}-${e.target.dataset['iindex']}` |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | var isVal = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | |
| | | // } |
| | | //主数据类扫码查询数据 |
| | | if (isVal != result.decodedata) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .Value = result.decodedata; |
| | | uni.hideKeyboard(); |
| | | //子数据类扫码区事件脚本 |
| | |
| | | |
| | | this.scan_DataObjRunCustomEvent(info, ""); |
| | | } |
| | | if (result.decodedata) { //第一个输入框不为空 |
| | | //初始化,下个输入框focus属性 |
| | | const attrs = this.$data.classAttrList[e.target.dataset['index']].Attr || [] |
| | | var findd = false |
| | | for (let i = e.target.dataset['iindex'] + 1; i < attrs.length; i++) { |
| | | const ele = attrs[i] |
| | | |
| | | if (ele.hidden != true) { |
| | | if (utils.classUtils.attrTypeIsString(ele.Type) || utils.classUtils |
| | | .attrTypeIsInt(ele.Type)) { |
| | | const field = `${e.target.dataset['index']}-${i}` |
| | | if (this |
| | | .focusOldField == |
| | | field) { |
| | | this.setData({ |
| | | focusField: "" |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | focusField: this |
| | | .focusOldField |
| | | }) |
| | | } |
| | | this.$nextTick(() => { |
| | | this.setData({ |
| | | focusField: field |
| | | }) |
| | | }); |
| | | findd = true |
| | | break |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | if (findd) { |
| | | return |
| | | } |
| | | for (let i = e.target.dataset['index'] + 1; i < this.classAttrList.length; i++) { |
| | | const attrs2 = this.classAttrList[i].Attr || [] |
| | | for (let ii in attrs2) { |
| | | const ele = attrs2[ii] |
| | | if (ele.hidden != true) { |
| | | if (utils.classUtils.attrTypeIsString(ele.Type) || utils.classUtils |
| | | .attrTypeIsInt(ele.Type)) { |
| | | const field = `${i}-${ii}` |
| | | if (this |
| | | .focusOldField == |
| | | field) { |
| | | this.setData({ |
| | | focusField: "" |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | focusField: this |
| | | .focusOldField |
| | | }) |
| | | } |
| | | this.$nextTick(() => { |
| | | this.setData({ |
| | | focusField: field |
| | | }) |
| | | }); |
| | | break |
| | | } |
| | | } |
| | | } |
| | | if (findd) { |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | subontap(e) { //扫码功能 |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | var isVal = this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']].Value; |
| | | var isVal = this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target |
| | | .dataset[ |
| | | 'iindex']].Value; |
| | | //主数据类扫码查询数据 |
| | | if (isVal != result.decodedata) { |
| | | this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .Value = result.decodedata; |
| | | uni.hideKeyboard(); |
| | | //子数据类扫码区事件脚本 |
| | |
| | | }, |
| | | onarrow(index, open) { |
| | | // console.log(index+'--'+open); |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Open; |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']].Open; |
| | | if (!data_attr) { |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e |
| | | .target.dataset['iindex']].Value = open == true ? false : true; |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | .Attr[e |
| | | .target.dataset['iindex']].Value = open == true ? false : true; |
| | | return; |
| | | } |
| | | this.$data.classAttrList[e.target.dataset['iiindex']].subClassAttr[index].Open = open == true ? false : |
| | | this.$data.classAttrList[e.target.dataset['iiindex']].subClassAttr[index].Open = open == true ? |
| | | false : |
| | | true; |
| | | }, |
| | | ondateTime(e) { |
| | | //console.log(e.target) |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value; |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']].Value; |
| | | if (!data_attr) { |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e |
| | | .target.dataset['iindex']].Value = e.target.value; |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | .Attr[e |
| | | .target.dataset['iindex']].Value = e.target.value; |
| | | return; |
| | | } |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.target |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e |
| | | .target |
| | | .value; |
| | | |
| | | }, |
| | | onchange(e) { |
| | | console.log(e.target); |
| | | var value = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].dictitem[e |
| | | .target.value]; |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]; |
| | | var value = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | .dictitem[e |
| | | .target.value]; |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']]; |
| | | console.log(data_attr); |
| | | if (value.Name != data_attr.Value) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = value |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = |
| | | value |
| | | .Name; |
| | | console.log(this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | console.log(this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .Value); |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | |
| | | }, |
| | | sub_onchange(e) { |
| | | console.log(e.target); |
| | | var value = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | var value = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[ |
| | | 'index']] |
| | | .Attr[e.target.dataset['iindex']].dictitem[e.target.value]; |
| | | var data_attr = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[ |
| | | 'index']].Attr[e.target.dataset['iindex']]; |
| | | console.log(data_attr); |
| | | if (value.Name != data_attr.Value) { |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e |
| | | .target.dataset['iindex']].Value = value.Name; |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | .Attr[e |
| | | .target.dataset['iindex']].Value = value.Name; |
| | | console.log(this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[ |
| | | 'index']].Attr[e.target.dataset['iindex']].Value); |
| | | var eventid = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[ |
| | | 'index']].Attr[e.target.dataset['iindex']].action; |
| | | var eventid = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target |
| | | .dataset[ |
| | | 'index']].Attr[e.target.dataset['iindex']].action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | | var req = []; |
| | |
| | | }, |
| | | onevent(e) { |
| | | // console.log(e.target); |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]; |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']]; |
| | | if (!data_attr) { |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e |
| | | .target.dataset['iindex']].Value = e.target.value; |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | .Attr[e |
| | | .target.dataset['iindex']].Value = e.target.value; |
| | | return; |
| | | } |
| | | // console.log(data_attr); |
| | | if (e.target.value != data_attr.Value) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.target |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e |
| | | .target |
| | | .value; |
| | | // var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action; |
| | | //子数据类扫码区事件脚本 |
| | |
| | | oncheck(e) { |
| | | // console.log(e.target); |
| | | var ischecked = e.target.dataset.ischeck ? false : true; |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]; |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']]; |
| | | if (!data_attr) { |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e |
| | | .target.dataset['iindex']].Value = ischecked; |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | .Attr[e |
| | | .target.dataset['iindex']].Value = ischecked; |
| | | return; |
| | | } |
| | | // console.log(data_attr); |
| | | if (ischecked != data_attr.Value) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = ischecked; |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = |
| | | ischecked; |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | |
| | | addresschange(e) { |
| | | // console.log(e.target); |
| | | console.log(e.data.join(';')) |
| | | this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.data |
| | | this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e |
| | | .data |
| | | .join(';'); |
| | | }, |
| | | classAttr_extButton(index, iindex) { |
| | |
| | | // console.log(param); |
| | | console.log(data); |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].Value = data[0].Name; |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].Login + ';' + |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0] |
| | | .Login + ';' + |
| | | data[0].Name; |
| | | |
| | | var eventid = $this.$data.classAttrList[param.index].Attr[param.iindex].action; |
| | |
| | | // console.log(param); |
| | | // console.log(data); |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].Value = data[0].Name; |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].ID + ';' + |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].ID + |
| | | ';' + |
| | | data[0].Name; |
| | | |
| | | var eventid = $this.$data.classAttrList[param.index].Attr[param.iindex].action; |
| | |
| | | // "{"ret":0, "result_type":0, "result":"创建成功123123123","info":""}" |
| | | } |
| | | //刷新 |
| | | // uni.redirectTo({ |
| | | // url: '../modal/ms_classAttr?param=' + JSON.stringify(this.$data.param) + |
| | | // "&titlename=" + this.$data.title |
| | | // }); |
| | | uni.redirectTo({ |
| | | url: '../modal/ms_classAttr?param=' + JSON.stringify(this.$data.param) + |
| | | "&titlename=" + this.$data.title |
| | | }); |
| | | // // this.class_attr_init(); |
| | | |
| | | }).catch(ex => { |
| | |
| | | class_attr_init() { |
| | | const attrlist = this.$data.classGridStyle.StyleDef?.show_style || [] |
| | | var newattrlist = []; |
| | | |
| | | if (this.$data.classAttrList.length > 0) { |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var open = attrlist[i].open; |
| | | var name = attrlist[i].attrgroup_name; |
| | | var attrs = attrlist[i].attrs; |
| | | |
| | | for (var s = 0; s < this.$data.classAttrList.length; s++) { |
| | | var clsattr = this.$data.classAttrList[s]; |
| | | |
| | | if (name == clsattr.Name) { |
| | | var attr = []; |
| | | for (var j = 0; j < attrs.length; j++) { |
| | |
| | | month: nowDate.getMonth() + 1, |
| | | day: nowDate.getDate() |
| | | } |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date.day); |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + |
| | | date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date |
| | | .day); |
| | | } |
| | | if (utils.classUtils.attrTypeIsObjRefMulti(ca.Type)) { |
| | | var relClsList = []; |
| | |
| | | ca.Value = '请选择'; |
| | | if (utils.classUtils.attrTypeIsBool(ca.Type)) |
| | | ca.Value = false; |
| | | |
| | | if (ca.hidden != true) { |
| | | if (utils.classUtils.attrTypeIsString(ca.Type) || utils.classUtils |
| | | .attrTypeIsInt(ca.Type) || utils.classUtils.attrTypeIsFloat(ca |
| | | .Type)) { |
| | | if (this.focusField == "") { |
| | | this.setData({ |
| | | focusField: `${newattrlist.length}-${attr.length}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | attr.push(ca); |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | newattrlist.push({ |
| | | BkColor: clsattr.BkColor, |
| | | HasAce: clsattr.HasAce, |
| | |
| | | Attr: attr, |
| | | control_style: this.$data.classGridStyle.StyleDef.control_style, |
| | | title_p_wdith: this.$data.classGridStyle.StyleDef.title_p_wdith, |
| | | Font: this.$data.classGridStyle.StyleDef.Font ? this.$data.classGridStyle |
| | | Font: this.$data.classGridStyle.StyleDef.Font ? this.$data |
| | | .classGridStyle |
| | | .StyleDef.Font : {}, |
| | | Bk_Color: this.$data.classGridStyle.StyleDef.Bk_Color ? this.$data |
| | | .classGridStyle.StyleDef.Bk_Color : '#FFFFFF', |
| | |
| | | } |
| | | this.ini_DataObjRunCustomEvent(info); |
| | | } |
| | | console.log(this.$data.classGridStyle); |
| | | console.log(this.$data.classAttrList); |
| | | // console.log(this.$data.classGridStyle); |
| | | // console.log(this.$data.classAttrList); |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | |
| | | } |
| | | }, |
| | | subClass_attr_init() { |
| | | var attrlist = this.$data.subClassGridStyle.StyleDef.show_style |
| | | var attrlist = this.$data.subClassGridStyle.StyleDef.show_style || [] |
| | | var newattrlist = []; |
| | | if (this.$data.subClassAttrList.length > 0) { |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | |
| | | month: nowDate.getMonth() + 1, |
| | | day: nowDate.getDate() |
| | | } |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date.day); |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + |
| | | date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date |
| | | .day); |
| | | } |
| | | if (utils.classUtils.attrTypeIsObjRefMulti(ca.Type)) { |
| | | var relClsList = []; |
| | |
| | | Attr: attr, |
| | | control_style: this.$data.subClassGridStyle.StyleDef.control_style, |
| | | title_p_wdith: this.$data.subClassGridStyle.StyleDef.title_p_wdith, |
| | | Font: this.$data.subClassGridStyle.StyleDef.Font ? this.$data.subClassGridStyle |
| | | Font: this.$data.subClassGridStyle.StyleDef.Font ? this.$data |
| | | .subClassGridStyle |
| | | .StyleDef.Font : {}, |
| | | Bk_Color: this.$data.subClassGridStyle.StyleDef.Bk_Color ? this.$data |
| | | .subClassGridStyle.StyleDef.Bk_Color : '#FFFFFF', |
| | | Text_Color: this.$data.subClassGridStyle.StyleDef.Text_Color ? this.$data |
| | | Text_Color: this.$data.subClassGridStyle.StyleDef.Text_Color ? this |
| | | .$data |
| | | .subClassGridStyle.StyleDef.Text_Color : '#000000' |
| | | }) |
| | | } |
| | |
| | | this.$data.subClassAttrList = newattrlist; |
| | | } |
| | | var req = []; |
| | | if (this.$data.subClassGridStyle.StyleDef) { |
| | | if (this.$data.subClassGridStyle.StyleDef.show_style.length > 0) { |
| | | var attrlist = this.$data.subClassGridStyle.StyleDef.show_style |
| | | // $el.find('.attr_field').prop('readonly', true); |
| | | // $el.find('.attr_field').prop('disabled', true); |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].attrs |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | req.push({ |
| | | attr: ar.attr, |
| | | value: ar.value ? ar.value : '' |
| | | }); |
| | | } |
| | | if (attrlist.length > 0) { |
| | | |
| | | // $el.find('.attr_field').prop('readonly', true); |
| | | // $el.find('.attr_field').prop('disabled', true); |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].attrs |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | req.push({ |
| | | attr: ar.attr, |
| | | value: ar.value ? ar.value : '' |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | var eventlist = this.$data.subClassGridStyle.StyleDef.event; |
| | | if (eventlist) { |
| | | if (eventlist.length > 0) { |
| | |
| | | console.log(val); |
| | | for (var i = 0; i < val.length; i++) { |
| | | for (var a = 0; a < this.$data.classAttrList.length; a++) { |
| | | for (var l = 0; l < this.$data.classAttrList[a].Attr.length; l++) { |
| | | for (var l = 0; l < this.$data.classAttrList[a].Attr |
| | | .length; l++) { |
| | | var ca = this.$data.classAttrList[a].Attr[l]; |
| | | if (val[i].attr == ca.Name) { |
| | | if (utils.classUtils.attrTypeIsDict(ca.Type)) { |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (action_type == 'open_select_userdlg') { |
| | | } else if (action_type == 'open_select_userdlg') { |
| | | uni.showModal({ |
| | | title: "错误2.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | |
| | | |
| | | if (action.action_type == 'open_panel') { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | |
| | | AddPer(data, param) { |
| | | // console.log(param); |
| | | console.log(data); |
| | | var callback_eventid = param.button_callback.trim(); |
| | | var callback_eventid = param.button_callback |
| | | .trim(); |
| | | var info = { |
| | | eventid: callback_eventid, |
| | | edtype: "0", |
| | |
| | | } else if (action.action_type == 'open_common_dlg') { |
| | | var value = action.value; |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | |
| | | req: req |
| | | } |
| | | uni.navigateTo({ |
| | | url: '../selPrj/index?relation=' + priRel + '¶m=' + JSON |
| | | url: '../selPrj/index?relation=' + priRel + '¶m=' + |
| | | JSON |
| | | .stringify(param_), |
| | | events: { |
| | | AddPer(data, param) { |
| | |
| | | $this.$data.classAttrList[param.index].Attr[param |
| | | .iindex].ValID = data[0].ID + ';' + data[0] |
| | | .Name; |
| | | var callback_eventid = param.button_callback.trim(); |
| | | var callback_eventid = param.button_callback |
| | | .trim(); |
| | | if (callback_eventid) { |
| | | var info = { |
| | | eventid: callback_eventid, |
| | |
| | | }); |
| | | } else { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (action_type == 'open_select_userdlg') { |
| | | } else if (action_type == 'open_select_userdlg') { |
| | | uni.showModal({ |
| | | title: "错误6.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | |
| | | for (var i = 0; i < result.length; i++) { |
| | | if (result[i].choice_list) { |
| | | for (var s = 0; s < $this.$data.subPanelList.length; s++) { |
| | | for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList |
| | | for (var c = 0; c < $this.$data.subPanelList[s] |
| | | .subClassAttrList |
| | | .length; c++) { |
| | | var attr = $this.$data.subPanelList[s].subClassAttrList[c] |
| | | .Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | if (attr[j].Name == result[i].attr) { |
| | | if (utils.classUtils.attrTypeIsDict(attr[j].Type)) { |
| | | if (utils.classUtils.attrTypeIsDict(attr[j] |
| | | .Type)) { |
| | | var dictItemList = []; |
| | | for (var d in result[i].choice_list) { |
| | | var val = result[i].choice_list[d]; |
| | |
| | | for (var s = 0; s < $this.$data.subPanelList.length; s++) { |
| | | for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList |
| | | .length; c++) { |
| | | var attr = $this.$data.subPanelList[s].subClassAttrList[c].Attr; |
| | | var attr = $this.$data.subPanelList[s].subClassAttrList[c] |
| | | .Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | console.log(attr[j].Name + '==' + result[i].attr); |
| | | if (attr[j].Name == result[i].attr) { |
| | |
| | | var result = data.result; |
| | | if (eventID != $this.$data.param.After_OK_Event.ID) |
| | | $this.scan_OKDataObjRunCustomEvent($this.$data.param.After_OK_Event.ID); |
| | | // else { |
| | | // //刷新 |
| | | // uni.redirectTo({ |
| | | // url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) + |
| | | // "&titlename=" + $this.$data.title |
| | | // }); |
| | | // } |
| | | else { |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) + |
| | | "&titlename=" + $this.$data.title |
| | | }); |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | |
| | | var result = data.result; |
| | | if (eventID != $this.$data.param.After_Trigger_Event.ID) |
| | | $this.scan_TriggerDataObjRunCustomEvent($this.$data.param.After_Trigger_Event.ID); |
| | | // else { |
| | | // //刷新 |
| | | // uni.redirectTo({ |
| | | // url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) + |
| | | // "&titlename=" + $this.$data.title |
| | | // }); |
| | | // } |
| | | else { |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) + |
| | | "&titlename=" + $this.$data.title |
| | | }); |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | |
| | | margin-top: 50rpx; |
| | | padding: 20rpx; |
| | | line-height: 1.5; |
| | | background: #27A6E1; |
| | | border: none; |
| | | color: #fff; |
| | | /* background: #27A6E1; */ |
| | | /* border: none; */ |
| | | background: #fff; |
| | | color: #000; |
| | | font-size: 38rpx; |
| | | font-weight: bold; |
| | | float: left; |
| | |
| | | .popup-footer { |
| | | float: right; |
| | | position: absolute; |
| | | bottom: 0; |
| | | bottom: 10rpx; |
| | | right: 20rpx; |
| | | } |
| | | |