| components/oi-form/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/modal/3018_2.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/modal/3037_2.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/modal/3200.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/modal/3202.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/modal/5600.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/modal/5601.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/modal/5602.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
components/oi-form/index.vue
@@ -82,6 +82,7 @@ this.form.model[attr] = item.value; this.$emit("on-change", item) }, onClick(item) { this.$emit("on-click", item) }, pages/modal/3018_2.vue
@@ -219,27 +219,30 @@ await this.Head_UIStyleGetInfo(this.param.DataCls?.id, this.param.UI_Style?.ID); //传入参数值 if (paramValue) { const attrs = paramValue.attrs || []; (this.head_styledef?.form?.items || []).forEach(async (ele, index) => { if (ele.name != "Layout") { attrs.forEach(async (ele2, index2) => { if (ele.fieldId == ele2.name) { ele.value = ele2.value; } }); } else { ele.setting.colList.forEach(async (col) => { if (col) { attrs.forEach(async (ele2, index2) => { if (col.fieldId == ele2.name) { col.value = ele2.value; } }); } }); } }) this.setFormValues(paramValue) // const attrs = paramValue.attrs || []; // (this.head_styledef?.form?.items || []).forEach(async (ele, index) => { // if (ele.name != "Layout") { // attrs.forEach(async (ele2, index2) => { // if (ele.fieldId == ele2.name) { // ele.value = ele2.value; // } // }); // } else { // ele.setting.colList.forEach(async (col) => { // if (col) { // attrs.forEach(async (ele2, // index2) => { // if (col.fieldId == ele2.name) { // col.value = ele2.value; // } // }); // } // }); // } // }) } @@ -1563,6 +1566,10 @@ setFormValues(data) { const $this = this const head_styledef = this.head_styledef if( !Array.isArray(data)) { return } for (var i = 0; i < data.length; i++) { const attr = data[i] if (attr.choice_list) { pages/modal/3037_2.vue
@@ -207,28 +207,29 @@ await this.Head_UIStyleGetInfo(this.param.Master_Cls?.ID, this.param.Master_Cls?.UI_Style?.ID); //传入参数值 if (paramValue) { const attrs = paramValue.attrs || []; this.setFormItemVisible(this.head_styledef,paramValue) // const attrs = paramValue.attrs || []; // (this.head_styledef?.form?.items || []).forEach(async (ele, index) => { // if (ele.name != "Layout") { // attrs.forEach(async (ele2, index2) => { // if (ele.fieldId == ele2.name) { // ele.value = ele2.value; // } // }); // } else { // ele.setting.colList.forEach(async (col) => { // if (col) { // attrs.forEach(async (ele2, // index2) => { // if (col.fieldId == ele2.name) { // col.value = ele2.value; // } // }); // } // }); // } // }) (this.head_styledef?.form?.items || []).forEach(async (ele, index) => { if (ele.name != "Layout") { attrs.forEach(async (ele2, index2) => { if (ele.fieldId == ele2.name) { ele.value = ele2.value; } }); } else { ele.setting.colList.forEach(async (col) => { if (col) { attrs.forEach(async (ele2, index2) => { if (col.fieldId == ele2.name) { col.value = ele2.value; } }); } }); } }) } await this.Detail1_UIstyleGetInfo(this.param.Sub_Cls?.ID, this.param.Sub_Cls?.UI_Style?.ID); @@ -491,84 +492,8 @@ var action = actionlist[i]; if (action.action_type == 'set_dlg_attr') { var result = action.value; for (var i = 0; i < result.length; i++) { if (result[i].choice_list) { for (var c = 0; c < styledef.form.items.length; c++) { var attr = styledef.form.items[c]; if (attr.name != 'Layout') { if (attr.fieldId == result[i].attr) { var dictItemList = []; for (var d in result[i].choice_list) { var val = result[i].choice_list[d]; dictItemList.push({ "CN_S_NAME": val, "CN_S_VALUE": val, "text": val, "value": val }); } attr.dict = dictItemList; } } else if (attr.name == 'Layout') { attr.setting.colList.forEach(col => { if (col) { if (col.fieldId == result[i].attr) { var dictItemList = []; for (var d in result[i] .choice_list) { var val = result[i] .choice_list[d]; dictItemList.push({ "CN_S_NAME": val, "CN_S_VALUE": val, "text": val, "value": val }); } col.dict = dictItemList; } } }); } $this.setFormValues(styledef, result) } } for (var c = 0; c < styledef.form.items.length; c++) { var attr = styledef.form.items[c]; // console.log(attr[j].Name+'=='+result[i].attr); //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据 if ($this.head_styledef.form.model[result[i].attr] == undefined) { $this.head_styledef.form.model[result[i].attr] = result[i] .value; } //判断是否是栅格表单 if (attr.name != 'Layout') { if (attr.fieldId == result[i].attr) { attr.value = ''; attr.oldvalue = ''; attr.value = result[i].value; attr.oldvalue = result[i].value; $this.head_styledef.form.model[attr.fieldId] = result[ i].value; } } else if (attr.name == 'Layout') { attr.setting.colList.forEach(col => { if (col) { if (col.fieldId == result[i].attr) { col.value = ''; col.oldvalue = ''; col.value = result[i].value; col.oldvalue = result[i].value; $this.head_styledef.form.model[col .fieldId] = result[i].value; } } }); } } } } else if (data.action[i].action_type == 'set_dlg_attr_show') { var result = action.value; if (type == 'head') { @@ -1648,75 +1573,7 @@ var action = actionlist[i]; if (action.action_type == 'set_dlg_attr') { var result = action.value; for (var i = 0; i < result.length; i++) { if (result[i].choice_list) { for (var c = 0; c < $this.head_styledef.form.items.length; c++) { var attr = $this.head_styledef.form.items[c]; if (attr.name != 'Layout') { if (attr.fieldId == result[i].attr) { var dictItemList = []; for (var d in result[i].choice_list) { var val = result[i].choice_list[d]; dictItemList.push({ "CN_S_NAME": val, "CN_S_VALUE": val, "text": val, "value": val }); } attr.dict = dictItemList; } } else if (attr.name == 'Layout') { attr.setting.colList.forEach(col => { if (col) { if (col.fieldId == result[i].attr) { var dictItemList = []; for (var d in result[i].choice_list) { var val = result[i].choice_list[d]; dictItemList.push({ "CN_S_NAME": val, "CN_S_VALUE": val, "text": val, "value": val }); } col.dict = dictItemList; } } }); } } } for (var c = 0; c < $this.head_styledef.form.items.length; c++) { var attr = $this.head_styledef.form.items[c]; // console.log(attr[j].Name+'=='+result[i].attr); if (attr.name != 'Layout') { if (attr.fieldId == result[i].attr) { attr.value = ''; attr.oldvalue = ''; attr.value = result[i].value; attr.oldvalue = result[i].value; $this.head_styledef.form.model[attr.fieldId] = result[i] .value; } } else if (attr.name == 'Layout') { attr.setting.colList.forEach(col => { if (col) { if (col.fieldId == result[i].attr) { col.value = ''; col.oldvalue = ''; col.value = result[i].value; col.oldvalue = result[i].value; $this.head_styledef.form.model[col .fieldId] = result[i].value; } } }); } } } $this.setFormValues($this.head_styledef, result) } else if (action.action_type == 'set_dlg_attr_show') { var data = action.value; $this.setFormItemVisible(data) @@ -1753,6 +1610,89 @@ }); }); }, setFormValues(styledef, attrs) { if (!Array.isArray(attrs)) { return } for (var i = 0; i < attrs.length; i++) { if (attrs[i].choice_list) { for (var c = 0; c < styledef.form.items.length; c++) { var attr = styledef.form.items[c]; if (attr.name != 'Layout') { if (attr.fieldId == attrs[i].attr) { var dictItemList = []; for (var d in attrs[i].choice_list) { var val = attrs[i].choice_list[d]; dictItemList.push({ "CN_S_NAME": val, "CN_S_VALUE": val, "text": val, "value": val }); } attr.dict = dictItemList; } } else if (attr.name == 'Layout') { attr.setting.colList.forEach(col => { if (col) { if (col.fieldId == attrs[i].attr) { var dictItemList = []; for (var d in attrs[i] .choice_list) { var val = attrs[i] .choice_list[d]; dictItemList.push({ "CN_S_NAME": val, "CN_S_VALUE": val, "text": val, "value": val }); } col.dict = dictItemList; } } }); } } } for (var c = 0; c < styledef.form.items.length; c++) { var attr = styledef.form.items[c]; // console.log(attr[j].Name+'=='+attrs[i].attr); //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据 if (styledef.form.model[attrs[i].attr] == undefined) { styledef.form.model[attrs[i].attr] = attrs[i] .value; } //判断是否是栅格表单 if (attr.name != 'Layout') { if (attr.fieldId == attrs[i].attr) { attr.value = ''; attr.oldvalue = ''; attr.value = attrs[i].value; attr.oldvalue = attrs[i].value; styledef.form.model[attr.fieldId] = attrs[ i].value; } } else if (attr.name == 'Layout') { attr.setting.colList.forEach(col => { if (col) { if (col.fieldId == attrs[i].attr) { col.value = ''; col.oldvalue = ''; col.value = attrs[i].value; col.oldvalue = attrs[i].value; styledef.form.model[col .fieldId] = attrs[i].value; } } }); } } } }, setFormItemVisible(attrs) { if (!Array.isArray(attrs)) { return pages/modal/3200.vue
@@ -178,16 +178,17 @@ this.active_id = ''; this.activeItem = {}; //this.activelist = []; const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined if (this.param.ListPage.ListItem_UIDef?.ui_type == "HTML页面") { // HTML页面 //获取数据类的HTML页面 await this.Html_UIstyleGetInfo(this.param.DataCls.id, this.param.ListPage.ListItem_UIDef.id, options .paramValue); await this.Html_UIstyleGetInfo(this.param.DataCls.id, this.param.ListPage.ListItem_UIDef.id, paramValue); } else { await this.Detail1_UIstyleGetInfo(this.param.DataCls.id, this.param.ListPage.ListItem_UIDef.id); await this.initial(options.paramValue); await this.initial(paramValue); } // this.isFilter=true; // if(this.param.ShowFilter) @@ -252,27 +253,7 @@ await this.Head_UIStyleGetInfo(this.param.DataCls.id, this.param.Query_Panel.id); //传入参数值 if (paramValue) { const attrs = paramValue.attrs || []; (this.head_styledef?.form?.items || []).forEach(async (ele, index) => { if (ele.name != "Layout") { attrs.forEach(async (ele2, index2) => { if (ele.fieldId == ele2.name) { ele.value = ele2.value; } }); } else { ele.setting.colList.forEach(async (col) => { if (col) { attrs.forEach(async (ele2, index2) => { if (col.fieldId == ele2.name) { col.value = ele2.value; } }); } }); } }) this.setFormValues(paramValue) } } this.orderby = this.param.Order ? this.param.Order : 'T_CREATE Desc'; @@ -1125,6 +1106,7 @@ defCode == "3037" || defCode == "3200" || defCode == "3201" || defCode == "3202" || defCode == "5600" || defCode == "5601" || defCode == "5602" @@ -1136,7 +1118,7 @@ var json = { app_id: [btn.Related_Function.ID], }; console.log("RelatedFunction2", json); const result = await appGetInfo(json) if ((result || []).length > 0) { var app = result[0]; @@ -1162,14 +1144,31 @@ }); return; } const attrValues = [] style.form.items.forEach(item => { if (item.name == "Layout") { //判断是否是栅栏格式 item.setting.colList.forEach(col => { if (col != null) { attrValues.push({ attr: col.fieldId, value: col.value || "" }) } }); } else attrValues.push({ attr: item.fieldId, value: item.value || "" }) }); uni.navigateTo({ url: '../modal/' + name + '?param=' + param + "&titlename=" + appName + "&type=relatedFunction¶mValue=" + JSON.stringify(style .form), JSON.stringify(attrValues), events: { relatedFunction: function(data) { console.log(data); @@ -1499,8 +1498,8 @@ }, setFormValues(attrs) { const head_styledef = this.head_styledef if (JSON.stringify(attrs) == '{}') { return; if (!Array.isArray(attrs)) { return } attrs.forEach(async (attr, key) => { if (attr.choice_list) { pages/modal/3202.vue
@@ -18,7 +18,7 @@ <button size="mini" v-for="(btn,btnIndex) in rowButtons" :key="btnIndex" type="primary" @click="onRowBtnClick(btn, ii)"> <text v-if="btn.Style == 'img' || btn.Style == 'img_text'" class="img"></text> {{btn.ShowName}} {{btn.ShowName || ""}} </button> </div> </div> @@ -111,6 +111,7 @@ }); //设置顶部标题 this.title = options.titlename; this.param = JSON.parse(options.param); const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined this.styledef = {}; this.head_styledef = { form: { @@ -126,7 +127,7 @@ if (this.param?.ClickItem_Event?.id) this.click_item_view = true await this.Detail1_UIstyleGetInfo(this.param.ClsID, this.param.ListItem_Panel.id); this.initial() this.initial(paramValue) }, methods: { @@ -153,7 +154,7 @@ }); }, //初始化 async initial() { async initial(paramValue) { this.refreshing = true await this.Head_UIStyleGetInfo(this.param.ClsID, this.param.Input_Panel.id); this.wheres = ''; @@ -162,6 +163,10 @@ this.query_id = ""; this.detail1StyleDefList = []; this.refreshing = false if (paramValue) { this.setFormValues(paramValue) } }, @@ -821,6 +826,7 @@ defCode == "3037" || defCode == "3200" || defCode == "3201" || defCode == "3202" || defCode == "5600" || defCode == "5601" || defCode == "5602" @@ -857,19 +863,33 @@ }); return; } const attrValues = [] style.form.items.forEach(item => { if (item.name == "Layout") { //判断是否是栅栏格式 item.setting.colList.forEach(col => { if (col != null) { attrValues.push({ attr: col.fieldId, value: col.value || "" }) } }); } else attrValues.push({ attr: item.fieldId, value: item.value || "" }) }); uni.navigateTo({ url: '../modal/' + name + '?param=' + param + "&titlename=" + appName + "&type=relatedFunction¶mValue=" + JSON.stringify(style .form), JSON.stringify(attrValues), events: { relatedFunction: function(data) { console.log(data); $this.Refresh(); }, } }); } else { @@ -1162,8 +1182,8 @@ }, 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) => { pages/modal/5600.vue
@@ -301,27 +301,7 @@ await this.Head_UIStyleGetInfo(this.ClsID, this.param.Input_UI_Style.ID); //传入参数值 if (paramValue) { const attrs = paramValue.attrs || []; (this.head_styledef?.form?.items || []).forEach(async (ele, index) => { if (ele.name != "Layout") { attrs.forEach(async (ele2, index2) => { if (ele.fieldId == ele2.name) { ele.value = ele2.value; } }); } else { ele.setting.colList.forEach(async (col) => { if (col) { attrs.forEach(async (ele2, index2) => { if (col.fieldId == ele2.name) { col.value = ele2.value; } }); } }); } }) this.setFormValues(paramValue) } //加载初始界面 @@ -1114,6 +1094,74 @@ return 0; } }, setFormValues(attrs) { const head_styledef = this.head_styledef if (JSON.stringify(attrs) == '{}') { return; } console.log(attrs) attrs.forEach(async (attr, key) => { if (attr.choice_list) { var dictItemList = []; attr.choice_list.forEach(async (val, index) => { dictItemList.push({ text: val, value: val }); }); head_styledef.form.items.forEach(async (attr_item, index) => { if (attr_item.name != "Layout") { if (attr_item.fieldId == attr.attr) { if (attr_item.useDict) { attr_item.dict = dictItemList; } else { attr_item.selections = dictItemList; } } } else if (attr_item.name == "Layout") { attr_item.setting.colList.forEach((col) => { if (col) { if (col.fieldId == attr.attr) { if (col.useDict) { col.dict = dictItemList; } else { col.selections = dictItemList; } } } }); } }); } if (!head_styledef.form.model[attr.attr]) { head_styledef.form.model[attr.attr] = attr.value; } head_styledef.form.items.forEach(async (ele) => { if (ele.name != "Layout") { if (ele.fieldId == attr.attr) { ele.value = attr.value; ele.oldvalue = attr.value; } } else if (ele.name == "Layout") { ele.setting.colList.forEach((col) => { if (col) { if (col.fieldId == attr.attr) { col.value = attr.value; col.oldvalue = attr.value; } } }); } }) //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据 }) console.log(head_styledef) this.setData({ head_styledef: head_styledef }) }, //更新分页签中的列表项内容 //更新分页签中的列表项内容 viewActionSetRow(value) { @@ -2207,7 +2255,6 @@ }); }); }, //确定 ok() { pages/modal/5601.vue
@@ -44,8 +44,8 @@ :class="btn.FunCode == 'Delete' ? 'btn-warn' : 'btn-primary'" @click="onRowBtnClick(btn, pageData,ii)"> <text v-if="btn.Style == 'img' || btn.Style == 'img_text'" class="Img"></text> {{(btn.Style == 'text'|| btn.Style == 'img_text') ? btn.ShowName :""}} class="img"></text> {{btn.ShowName ||"" }} </button> </div> @@ -60,8 +60,8 @@ 'btn-left':(btnIndex < pageData.Button.length - 1), 'btn-right': btnIndex > 0 && btnIndex == pageData.Button.length - 1 , 'width-50':(pageData.Button.length == 2),'width-32':(pageData.Button.length == 3),'width-30':(pageData.DropDownButton.length> 0)}" @click="onBtnClick(btn, pageData)"> <text v-if="btn.Style == 'img' || btn.Style == 'img_text'" class="Img"></text> {{(btn.Style == 'text'|| btn.Style == 'img_text') ? btn.ShowName :""}} <text v-if="btn.Style == 'img' || btn.Style == 'img_text'" class="img"></text> {{btn.ShowName ||""}} </button> <view class="btn-right" v-if="pageData.DropDownButton.length >0 "> <a @click="clickDropdownBtns(pageData)"> @@ -117,7 +117,8 @@ Base64 } from '@/js/Base64.js'; import { dictGetInfo dictGetInfo, appGetInfo, } from "@/api/mobox.js" import { getUIStyleInfo, @@ -227,27 +228,7 @@ //传入参数值 console.log(paramValue) if (paramValue) { const attrs = paramValue.attrs || []; (this.head_styledef?.form?.items || []).forEach(async (ele, index) => { if (ele.name != "Layout") { attrs.forEach(async (ele2, index2) => { if (ele.fieldId == ele2.name) { ele.value = ele2.value; } }); } else { ele.setting.colList.forEach(async (col) => { if (col) { attrs.forEach(async (ele2, index2) => { if (col.fieldId == ele2.name) { col.value = ele2.value; } }); } }); } }) this.setFormValues(paramValue) } //加载初始界面 if (this.param.Show_Welcom_Page) { @@ -2710,10 +2691,121 @@ } } } else if (btn.FunCode == "RelatedFunction") { if (index > -1) { const style = pageData.DefList[index]; this.relatedFunction(btn, style, enviroment, pageData); } } else { this.$Message.warning(this.$t("sys.unrealized")); } }, async relatedFunction(btn, style, enviroment, pageData) { //跳转功能点 try { const defCode = btn.Related_Function?.Def_Code var $this = this; if ( defCode == "3018" || defCode == "3037" || defCode == "3200" || defCode == "3201" || defCode == "3202" || defCode == "5600" || defCode == "5601" || defCode == "5602" ) { let name = defCode if (defCode == "3018" || defCode == "3037") name = defCode + "_2" var json = { app_id: [btn.Related_Function.ID], }; const result = await appGetInfo(json) if ((result || []).length > 0) { var app = result[0]; var param = ""; var appName = app.list_name || app.name .Name; var paramStr = app.param if (paramStr) { //mobox2的param是json字符串 param = paramStr.replace(/\\/g, ""); //mobox3的param是base64字符串 if (!paramStr.includes('"')) param = Base64.decode( paramStr); } if (!param) { uni.showModal({ title: this.translateSys("tip"), content: this.translate( 'tip_no_app_param'), showCancel: false, confirmText: this.translateSys( 'close') }); return; } const attrValues = [] style.form.items.forEach(item => { if (item.name == "Layout") { //判断是否是栅栏格式 item.setting.colList.forEach(col => { if (col != null) { attrValues.push({ attr: col.fieldId, value: col.value || "" }) } }); } else attrValues.push({ attr: item.fieldId, value: item.value || "" }) }); uni.navigateTo({ url: '../modal/' + name + '?param=' + param + "&titlename=" + appName + "&type=relatedFunction¶mValue=" + JSON.stringify(attrValues), }); } else { uni.showModal({ title: this.translateSys("error"), content: this.translate( "function_not_exist"), showCancel: false, confirmText: this.translateSys('close') }); } } else { uni.showModal({ title: this.translateSys("error"), content: this.translate("cannot_related_function"), showCancel: false, confirmText: this.translateSys('close') }); } } catch (ex) { console.log(ex); let exStr = JSON.stringify(ex) if (exStr == "{}") exStr = ex let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr uni.showModal({ title: this.translateSys("error"), content: tip, showCancel: false, confirmText: this.translateSys('close') }); return undefined } }, //修改小窗口数据 showSmallDialog(btn, row, enviroment, pageData) { var data = { pages/modal/5602.vue
@@ -290,27 +290,7 @@ await this.Head_UIStyleGetInfo(this.ClsID, this.param.Input_UI_Style.ID); //传入参数值 if (paramValue) { const attrs = paramValue.attrs || []; (this.head_styledef?.form?.items || []).forEach(async (ele, index) => { if (ele.name != "Layout") { attrs.forEach(async (ele2, index2) => { if (ele.fieldId == ele2.name) { ele.value = ele2.value; } }); } else { ele.setting.colList.forEach(async (col) => { if (col) { attrs.forEach(async (ele2, index2) => { if (col.fieldId == ele2.name) { col.value = ele2.value; } }); } }); } }) this.setFormValues(paramValue) } //加载初始界面