| | |
| | | this.setData({ |
| | | pageDetail: pageList |
| | | }) |
| | | |
| | | |
| | | console.log(this.pageDetail); |
| | | }, |
| | | changeSwiper(evt) { |
| | |
| | | class_id: class_id, |
| | | ui_style_id: style_id, |
| | | }; |
| | | this.$store.dispatch('UIStyleGetInfo', dataInfo).then(ret => { |
| | | this.$store.dispatch('UIStyleGetInfo', dataInfo).then(async (ret) => { |
| | | // console.log(ret); |
| | | if (ret.err_code == 0) { |
| | | var styledef = ""; |
| | |
| | | } |
| | | const styledefHead = styledef ? JSON.parse(styledef) : {}; |
| | | |
| | | styledefHead.form.items.forEach(async (ele) => { |
| | | for (let i in styledefHead.form.items) { |
| | | const ele = styledefHead.form.items[i] |
| | | if (ele.name != "Layout") { |
| | | if (ele?.useDict) { |
| | | //判断useDict是否使用字典 |
| | |
| | | } |
| | | } |
| | | } else { |
| | | ele.setting.colList.forEach(async (col) => { |
| | | for (let j in ele.setting.colList) { |
| | | const col = ele.setting.colList[j] |
| | | if (col?.useDict) { |
| | | //判断useDict是否使用字典 |
| | | await this.DictGetInfo(col.bind |
| | |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | this.setData({ |
| | | head_styledef: styledefHead |
| | | }) |
| | |
| | | class_id: class_id, |
| | | ui_style_id: style_id, |
| | | }; |
| | | this.$store.dispatch('UIStyleGetInfo', dataInfo).then(ret => { |
| | | this.$store.dispatch('UIStyleGetInfo', dataInfo).then(async (ret) => { |
| | | // console.log(ret); |
| | | if (ret.err_code == 0) { |
| | | var styledef = ""; |
| | |
| | | const detailstyledef = ret.result.style_def ? JSON.parse( |
| | | styledef) : {}; |
| | | detailstyledef.SelBut_Checked = true; |
| | | detailstyledef.form.items.forEach(async (ele, index) => { |
| | | for (let index in styledefHead.form.items) { |
| | | const ele = styledefHead.form.items[index] |
| | | |
| | | if (ele.name != "Layout") { |
| | | if (ele.useDict == true) { //判断useDict是否使用字典 |
| | |
| | | .model, ele); |
| | | } |
| | | } else { |
| | | ele.setting.colList.forEach(async (col) => { |
| | | for (let j in ele.setting.colList) { |
| | | const col = ele.setting.colList[j] |
| | | if (col?.useDict == true) { |
| | | await this.DictGetInfo(col |
| | | .bind.dict, |
| | | detailstyledef.form |
| | | .model, col); |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | console.log("Detail_UIstyleGetInfo", detailstyledef); |
| | | return detailstyledef |
| | | } else { |
| | |
| | | dict_id: dict.id, |
| | | dict_name: dict.name |
| | | }; |
| | | // console.log(dataInfo); |
| | | this.$store.dispatch('DictGetInfo', dataInfo).then(async (success) => { |
| | | console.log(success); |
| | | if (success.err_code == 0) { |
| | | var list = []; |
| | | var itemName = ''; |
| | | success.result.dict_item_list.forEach((item) => { |
| | | if (item.is_default == '1') |
| | | itemName = item.name; |
| | | list.push({ |
| | | text: item.value, |
| | | value: item.name, |
| | | }); |
| | | try { |
| | | const res = await this.getDictInfo(dataInfo) |
| | | var list = []; |
| | | var itemName = ''; |
| | | res.result.dict_item_list.forEach((item) => { |
| | | if (item.is_default == '1') |
| | | itemName = item.name; |
| | | list.push({ |
| | | text: item.value, |
| | | value: item.name, |
| | | }); |
| | | if (itemName) { |
| | | formItem.value = itemName; |
| | | formModel[formItem.fieldId] = itemName; |
| | | } |
| | | formItem.dict = list; |
| | | } else { |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + "3.1", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | }); |
| | | //有默认值,显示默认值 |
| | | if (itemName) { |
| | | formItem.value = itemName; |
| | | formModel[formItem.fieldId] = itemName; |
| | | } |
| | | }).catch(ex => { |
| | | formItem.dict = list; |
| | | |
| | | // $this.head_styledef.form.items[index].dictitem=success.result; |
| | | // this.$store.commit("classAttrList", $this.$data.classAttrList); |
| | | } catch (ex) { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + "3", |
| | |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | getDictInfo(info) { //Mobox3得到得到字典信息字典项列表 |
| | | const loginInfo = this.$store.getters.loginid |
| | | const mobxoSApi = this.$store.getters.getMobxoSApi |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: mobxoSApi + 'api/dict/GetInfo2?sessionid=' + loginInfo.result.session_id, |
| | | data: info, |
| | | method: 'POST', |
| | | dataType: "json", |
| | | success: (_res) => { |
| | | // console.log(_res); |
| | | const ret = _res.data |
| | | if (ret.err_code == 0) { |
| | | resolve(ret); |
| | | } else { |
| | | reject({ |
| | | "errMsg": ret.err_msg |
| | | }); |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | // console.log(err); |
| | | reject(err); |
| | | } |
| | | }) |
| | | |
| | | }) |
| | | |
| | | }, |
| | | |
| | | onClick(item) { |
| | | this.focusFieldId = item.fieldId |
| | | }, |
| | |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata; |
| | | var $this = this; |
| | | if (item.oldvalue != item.value) { |
| | | if (item.oldvalue != item.value&& item.value.trim() != "") { |
| | | item.oldvalue = item.value; |
| | | var attr = item.fieldId; |
| | | this.head_styledef.form.model[attr] = item.value; |
| | |
| | | |
| | | onEnterChange(item) { //回车,点击按钮,取消节点事件 |
| | | console.log(item); |
| | | if (item.oldvalue != item.value) { |
| | | if (item.oldvalue != item.value&& item.value.trim() != "") { |
| | | item.oldvalue = item.value; |
| | | var attr = item.fieldId; |
| | | this.head_styledef.form.model[attr] = item.value; |
| | |
| | | ele2 |
| | | .attr |
| | | ) { |
| | | if (ele.name == |
| | | 'Select' && |
| | | ele2 |
| | | .choice_list |
| | | ) { |
| | | const |
| | | dictItemList = []; |
| | | const |
| | | choiceList = |
| | | ele2 |
| | | .choice_list || |
| | | []; |
| | | for (let d in |
| | | choiceList) { |
| | | const |
| | | val = |
| | | choiceList[ |
| | | d |
| | | ]; |
| | | dictItemList |
| | | .push({ |
| | | text: val, |
| | | value: val |
| | | }); |
| | | } |
| | | ele.dict = |
| | | dictItemList; |
| | | } |
| | | |
| | | ele.value = |
| | | ele2 |
| | | .value; |
| | |
| | | ele2 |
| | | .attr |
| | | ) { |
| | | if (col |
| | | .name == |
| | | 'Select' && |
| | | ele2 |
| | | .choice_list |
| | | ) { |
| | | const |
| | | dictItemList = []; |
| | | const |
| | | choiceList = |
| | | ele2 |
| | | .choice_list || |
| | | []; |
| | | for ( |
| | | let d in |
| | | choiceList |
| | | ) { |
| | | const |
| | | val = |
| | | choiceList[ |
| | | d |
| | | ]; |
| | | dictItemList |
| | | .push({ |
| | | text: val, |
| | | value: val |
| | | }); |
| | | } |
| | | col.dict = |
| | | dictItemList; |
| | | } |
| | | |
| | | col.value = |
| | | ele2 |
| | | .value; |