| | |
| | | <text>{{item.label}}</text> |
| | | </label> |
| | | </checkbox-group> |
| | | <!-- 单选框 --> |
| | | <radio-group class="check_rememberPwd" v-if="item.name=='Radio'" |
| | | :class="item.disabled?'input-disabled':''" :disabled="item.disabled" |
| | | @change="onModelValue(item)"> |
| | | <label v-for="(item2) in item.selections" :key="item2.value"> |
| | | <radio :value="item2.value" :checked="item2.value === item.value" /> |
| | | <text>{{item2.label}}</text> |
| | | </label> |
| | | </radio-group> |
| | | <!-- Switch开关 --> |
| | | <switch class="input-switch" v-if="item.name=='Switch'" |
| | | :class="item.disabled?'input-disabled':''" :disabled="item.disabled" v-model="item.value" |
| | |
| | | </view> |
| | | <!-- 复选框 --> |
| | | <checkbox-group class="check_rememberPwd" v-if="cols.name=='Checkbox'" |
| | | :class="cols.disabled?'input-disabled':''" :disabled="item.disabled" |
| | | :class="cols.disabled?'input-disabled':''" :disabled="cols.disabled" |
| | | @change="onModelValue(cols)" :data-ischeck="cols.value" |
| | | :style="{'margin-left':'10rpx'}"> |
| | | <label> |
| | |
| | | <text>{{cols.label}}</text> |
| | | </label> |
| | | </checkbox-group> |
| | | <!-- 单选框 --> |
| | | <radio-group class="check_rememberPwd" v-if="cols.name=='Radio'" |
| | | :class="cols.disabled?'input-disabled':''" :disabled="cols.disabled" |
| | | @change="onModelValue(cols)"> |
| | | <label v-for="(cols2) in cols.selections" :key="cols2.value"> |
| | | <radio :value="cols2.value" :checked="cols2.value === cols.value" /> |
| | | <text>{{cols2.label}}</text> |
| | | </label> |
| | | </radio-group> |
| | | <!-- Switch开关 --> |
| | | <switch v-if="cols.name=='Switch'" :class="cols.disabled?'input-disabled':''" |
| | | :disabled="item.disabled" v-model="cols.value" @change="onModelValue(cols)" |
| | | :disabled="cols.disabled" v-model="cols.value" @change="onModelValue(cols)" |
| | | :style="{'margin-left':'10rpx'}" /> |
| | | <!-- 日期时间 --> |
| | | <view class="input-wrapper" |
| | | v-if="(cols.name=='TimePicker' || cols.name=='DatePicker') && !cols.disabled"> |
| | | <picker mode="date" class="date_iput" :class="cols.disabled?'input-disabled':''" |
| | | :disabled="item.disabled" :value="cols.value" @change="onModelValue(cols)"> |
| | | :disabled="cols.disabled" :value="cols.value" @change="onModelValue(cols)"> |
| | | <view class="picker">{{cols.value}}</view> |
| | | </picker> |
| | | </view> |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | |
| | | setData: function(obj) { |
| | | let that = this; |
| | | let keys = []; |
| | |
| | | if (item.is_default == '1') |
| | | itemName = item.name; |
| | | list.push({ |
| | | text: item.value, |
| | | value: item.name, |
| | | text: item.name, |
| | | value: item.id, |
| | | }); |
| | | }); |
| | | //有默认值,显示默认值 |
| | |
| | | // console.log(obj_attr); |
| | | var req = Object.keys(obj_attr).map((a) => ({ |
| | | attr: a, |
| | | val: obj_attr[a] || "", |
| | | value: obj_attr[a] || "", |
| | | })); |
| | | |
| | | var info = { |
| | |
| | | // console.log(obj_attr); |
| | | var req = Object.keys(obj_attr).map((a) => ({ |
| | | attr: a, |
| | | val: obj_attr[a] || "", |
| | | value: obj_attr[a] || "", |
| | | })); |
| | | var info = { |
| | | eventid: eventid, |
| | |
| | | // console.log(obj_attr); |
| | | var req = Object.keys(obj_attr).map((a) => ({ |
| | | attr: a, |
| | | val: obj_attr[a] || "", |
| | | value: obj_attr[a] || "", |
| | | })); |
| | | var info = { |
| | | eventid: eventid, |
| | |
| | | if (!onSuffixClickCallbackEvent.id) { |
| | | uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: this.translate('icon_click_event_empty'), |
| | | content: this.translate('icon_click_callback_empty'), |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | |
| | | } |
| | | this.$data.popupType = 'right' |
| | | // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 |
| | | this.$refs.popup.open($this.popupType); |
| | | this.$refs.popup.open(this.popupType); |
| | | |
| | | this.DataObjRunCustomEvent_Return(onSuffixClickCallbackEvent.id, '', onSuffixClickEvent.id, |
| | | this.dataObjRunCustomEvent_Return(onSuffixClickCallbackEvent.id, '', onSuffixClickEvent.id, |
| | | item); |
| | | }, |
| | | popupChange(e) { |
| | |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | var fieldId = $this.$data.popupParam.item.fieldId; |
| | | $this.head_styledef.form.model[attr] = name; |
| | | for (var c = 0; c < $this.$data.head_styledef.form.items.length; c++) { |
| | | var attr = $this.$data.head_styledef.form.items[c]; |
| | | if (attr.fieldId == fieldId) { |
| | | attr.value = name; |
| | | } |
| | | if (data.length == 0) { |
| | | uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content:this.translate("tip_no_select_data"), |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | return; |
| | | } |
| | | console.log(data); |
| | | // var fieldId = $this.$data.popupParam.item.fieldId; |
| | | // $this.head_styledef.form.model[fieldId] = name; |
| | | // console.log(fieldId,$this.$data.popupParam.item); |
| | | // for (var c = 0; c < $this.$data.head_styledef.form.items.length; c++) { |
| | | // var attr = $this.$data.head_styledef.form.items[c]; |
| | | // if (attr.fieldId == fieldId) { |
| | | // attr.value = name; |
| | | // } |
| | | // } |
| | | // console.log(data); |
| | | // console.log($this.head_styledef.form); |
| | | var callback_eventid = $this.$data.popupParam.button_callback.trim(); |
| | | var info = { |
| | | eventid: callback_eventid, |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | DataObjRunCustomEvent_Return(eventid, data_attr, button_callback, item) { |
| | | dataObjRunCustomEvent_Return(eventid, data_attr, button_callback, item) { |
| | | const $this = this |
| | | var enviroment = { |
| | | 'function': '3000', // 功能点编号 |
| | | cls_id: this.$data.param.DataCls.id, // 功能点主数据类标识 |
| | | cls_id: $this.param.DataCls.id, // 功能点主数据类标识 |
| | | 'button': 'top', // top/bottom |
| | | button_name: this.translateSys('add2'), |
| | | button_name: $this.translateSys('add2'), |
| | | master: { |
| | | cls_id: this.$data.param.DataCls.id, // button=bottom时 master的cls_id |
| | | cls_id: $this.param.DataCls.id, // button=bottom时 master的cls_id |
| | | //obj_id: '' // button=bottom时 master的obj_id |
| | | } |
| | | }; |
| | | var obj_attr = this.head_styledef.form.model; |
| | | // console.log(obj_attr); |
| | | var obj_attr = $this.head_styledef.form.model; |
| | | console.log(obj_attr); |
| | | var req = Object.keys(obj_attr).map((a) => ({ |
| | | attr: a, |
| | | val: obj_attr[a] || "", |
| | | value: obj_attr[a] || "", |
| | | })); |
| | | if (this.$data.refdatastore.length > 0) { |
| | | for (var i = 0; i < this.$data.refdatastore.length; i++) { |
| | | if ($this.refdatastore.length > 0) { |
| | | for (var i = 0; i < $this.refdatastore.length; i++) { |
| | | if (!req.filter(function(s) { |
| | | return this.$data.refdatastore[i].attr == s.name |
| | | return $this.refdatastore[i].attr == s.name |
| | | }).length) { |
| | | length = 1; |
| | | req.push({ |
| | | 'attr': this.$data.refdatastore[i].attr, |
| | | 'val': this.$data.refdatastore[i].value |
| | | 'attr': $this.refdatastore[i].attr, |
| | | 'value': $this.refdatastore[i].value |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | var extinfo = enviroment; |
| | | extinfo.edit_dlg = { |
| | | type: 'small', //小窗口 |
| | | class_id: this.$data.param.DataCls.id, //当前数据类id |
| | | class_id: $this.param.DataCls.id, //当前数据类id |
| | | } |
| | | extinfo = Base64.encode(JSON.stringify(extinfo)); //将字符串转换为base64编码 |
| | | var global_attr = Base64.encode(JSON.stringify(this.$data.global_attr)); //将字符串转换为base64编码 |
| | | var global_attr = Base64.encode(JSON.stringify($this.global_attr)); //将字符串转换为base64编码 |
| | | var obj_attr = {}; |
| | | req.forEach(item => { |
| | | obj_attr[item.attr] = item.val; |
| | | req.forEach(item2 => { |
| | | obj_attr[item2.attr] = item2.value; |
| | | }); |
| | | let input_param = Base64.encode( |
| | | JSON.stringify( |
| | | Object.keys(obj_attr).map((a) => ({ |
| | | attr: a, |
| | | value: obj_attr[a] || "", |
| | | })) |
| | | ) |
| | | ); |
| | | |
| | | if (!eventid.includes('{')) eventid = '{' + eventid + '}'; |
| | | var dataInfo = { |
| | | ed_type: "0", |
| | | start_transaction: true, |
| | | class_id: this.$data.param.DataCls.id, |
| | | class_id: $this.param.DataCls.id, |
| | | class_name: '', |
| | | event_id: eventid, |
| | | event_name: '', |
| | |
| | | ref_cls_id: '', |
| | | rel_obj_id: '', |
| | | user_login: '', |
| | | data_json: '', |
| | | data_json: [], |
| | | compose_info: '', |
| | | ext_info: extinfo, |
| | | global_attr: global_attr, |
| | | input_param: '', |
| | | input_param:input_param, |
| | | }; |
| | | console.log(dataInfo); |
| | | // return; |
| | |
| | | data |
| | | .err_info.join('<br/>') : ''; |
| | | if (data.ret == 801) { |
| | | if (this.param.Only_Script_Error) { |
| | | if ($this.param.Only_Script_Error) { |
| | | let pos = tip.indexOf(":"); |
| | | if (pos > -1) tip = tip.substring(pos + 1); |
| | | } |
| | | uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | title: $this.translateSys("tip"), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | confirmText: $this.translateSys("cancel") |
| | | }); |
| | | } else uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: tip + ',' + this.translateSys('tip') + ':' + data |
| | | title: $this.translateSys("tip"), |
| | | content: tip + ',' + $this.translateSys('tip') + ':' + data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | confirmText: $this.translateSys("cancel") |
| | | }); |
| | | return false |
| | | } else { |
| | |
| | | .join( |
| | | '<br/>') : ''; |
| | | if (tip) uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | title: $this.translateSys("tip"), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | confirmText: $this.translateSys("cancel") |
| | | }); |
| | | |
| | | if (data != "") { |
| | | var actions = data.action; |
| | | console.log(actions); |
| | | if (actions) { |
| | | for (var i = 0; i < actions.length; i++) { |
| | | var action = actions[i]; |
| | | console.log(action) |
| | | var val = action.value; |
| | | var enviroment = JSON.stringify(enviroment); |
| | | |
| | | if (action.action_type == 'open_panel') { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | this.translateSys("tip"), |
| | | content: this.translateSys( |
| | | $this.translateSys("tip"), |
| | | content: $this.translateSys( |
| | | "quotation_mark_left") + |
| | | action |
| | | .action_type + this.translateSys( |
| | | "quotation_mark_right") + this |
| | | .action_type + $this.translateSys( |
| | | "quotation_mark_right") + $this |
| | | .translate( |
| | | "tip_action_unprocessed") |
| | | }); |
| | |
| | | } else if (action.action_type == 'open_select_userdlg') { |
| | | var style = val.style; |
| | | // style == 'user' ? '选择人员' : style == 'department' ? '选择部门' : style == 'role' ? '选择角色' : '' |
| | | var $this = this; |
| | | var param = { |
| | | item: item, |
| | | button_callback: button_callback, |
| | |
| | | } else if (action.action_type == 'open_data_query_dlg') { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | this.translateSys("tip"), |
| | | content: this.translateSys( |
| | | $this.translateSys("tip"), |
| | | content: $this.translateSys( |
| | | "quotation_mark_left") + |
| | | action |
| | | .action_type + this.translateSys( |
| | | "quotation_mark_right") + this |
| | | .action_type + $this.translateSys( |
| | | "quotation_mark_right") + $this |
| | | .translate( |
| | | "tip_action_unprocessed") |
| | | }); |
| | | d.show(); |
| | | } else if (action.action_type == 'open_common_dlg') { |
| | | var $this = this; |
| | | |
| | | if (val.common_dlg_id == 'check_list') { |
| | | $this.$data.check_list = val.config; |
| | | $this.setData({check_list:val.config}) |
| | | if (val.config.appear_style == 'sideslip') //判断是否是侧滑 |
| | | $this.$data.popupType = 'right'; |
| | | $this.setData({popupType:"right"}) |
| | | else |
| | | $this.$data.popupType = 'center' |
| | | $this.setData({popupType:"center"}) |
| | | // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 |
| | | $this.$refs.popup.open($this.$data.popupType); |
| | | $this.$refs.popup.open($this.popupType); |
| | | var popupParam = { |
| | | item: item, |
| | | button_callback: button_callback, |
| | | req: req, |
| | | data_attr: data_attr |
| | | } |
| | | $this.$data.popupParam = popupParam; |
| | | $this.setData({popupParam:popupParam}) |
| | | } |
| | | } else if (action.action_type == 'open_project_query_dlg') { |
| | | //console.log(action.value.select_range); |
| | |
| | | priRel = '4'; |
| | | else if (action.value.select_range == '我下属的项目') |
| | | priRel = '5'; |
| | | |
| | | var $this = this; |
| | | var param_ = { |
| | | item: item, |
| | | button_callback: button_callback, |
| | |
| | | }); |
| | | } else { |
| | | uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: this.translateSys( |
| | | title: $this.translateSys("tip"), |
| | | content: $this.translateSys( |
| | | "quotation_mark_left") + |
| | | action.action_type + this.translateSys( |
| | | "quotation_mark_right") + this |
| | | action.action_type + $this.translateSys( |
| | | "quotation_mark_right") + $this |
| | | .translate( |
| | | "tip_action_unprocessed"), |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | confirmText: $this.translateSys("cancel") |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: this.translateSys('tip') + "5.2", |
| | | content: this.translateSys("quotation_mark_left") + |
| | | "before_click_button" + this.translateSys( |
| | | "quotation_mark_right") + this.translateSys( |
| | | title: $this.translateSys('tip') + "5.2", |
| | | content: $this.translateSys("quotation_mark_left") + |
| | | "before_click_button" + $this.translateSys( |
| | | "quotation_mark_right") + $this.translateSys( |
| | | "comma") + 'event_id' + eventid, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | confirmText: $this.translateSys("cancel") |
| | | }); |
| | | } |
| | | } |
| | |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | uni.showModal({ |
| | | title: this.translateSys('tip') + "5.1", |
| | | title: $this.translateSys('tip') + "5.1", |
| | | content: exStr, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | confirmText: $this.translateSys("cancel") |
| | | }); |
| | | }); |
| | | }, |