From 7662665a4f88da0f8afa804bd4a34dfbefc1fb56 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 29 八月 2025 15:17:59 +0800
Subject: [PATCH] get_pre_page_subtable_next_row
---
pages/modal/classAttr.vue | 186 +++++++++++++---------------------------------
1 files changed, 52 insertions(+), 134 deletions(-)
diff --git a/pages/modal/classAttr.vue b/pages/modal/classAttr.vue
index ecd1e62..5455fd3 100644
--- a/pages/modal/classAttr.vue
+++ b/pages/modal/classAttr.vue
@@ -1,5 +1,5 @@
<template>
- <view class="content">
+ <view class="content" :class="largeMode?'large-mode':''">
<view class="v-area" v-for="(classattr,index) in classAttrList">
<div class="class_attr_title" style="display: none;">
<div class="title_line"></div>
@@ -304,13 +304,17 @@
dataObjAdd,
dataObjRunCustomEvent
} from "@/api/index.js"
-
+ import {
+ showInfo,
+ showError
+ } from "@/js/Page.js"
export default {
components: {
pickerAddress
},
data() {
return {
+ largeMode: getApp().globalData.largeMode || false,
title: '鏂板',
param: {},
focusField: "",
@@ -360,21 +364,13 @@
this.title = param.Add_BtnName ? param.Add_BtnName : options.titlename; //璁剧疆鎸夐挳鏂囧瓧
// console.log(param);
if (!param.EditDlgMode) {
- uni.showModal({
- title: "鎻愮ず",
- content: "璇ュ姛鑳界偣鏈厤缃紪杈戠獥鍙o紝璇烽噸鏂伴厤缃紒",
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showInfo("璇ュ姛鑳界偣鏈厤缃紪杈戠獥鍙o紝璇烽噸鏂伴厤缃紒")
+
return;
}
if (!param.Edit_dlg.Name) {
- uni.showModal({
- title: "鎻愮ず",
- content: "璇ュ姛鑳界偣鏈厤缃獥鍙f牱寮忥紝璇烽噸鏂伴厤缃紒",
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showInfo("璇ュ姛鑳界偣鏈厤缃獥鍙f牱寮忥紝璇烽噸鏂伴厤缃紒")
+
return;
}
this.param = param;
@@ -428,12 +424,8 @@
this.class_attr_init();
} catch (ex) {
- uni.showModal({
- title: "閿欒1",
- content: ex.errMsg,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showError(ex, "閿欒1" )
+
}
},
classAttr_extButton(index, iindex) { //寮规灞傛樉绀�type:top bottom center left right
@@ -462,21 +454,13 @@
var before_click_button = $this.classAttrList[index].Attr[iindex].before_click_button;
var button_callback = $this.classAttrList[index].Attr[iindex].button_callback;
if (!before_click_button) {
- uni.showModal({
- title: "鎻愮ず",
- content: "before_click_button-event_id涓虹┖锛�,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showInfo( "before_click_button-event_id涓虹┖锛�)
+
return;
}
if (!button_callback) {
- uni.showModal({
- title: "鎻愮ず",
- content: "button_callback-event_id涓虹┖锛�,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showInfo( "button_callback-event_id涓虹┖锛�)
+
return;
}
this.DataObjRunCustomEvent_Return(before_click_button, data_attr, button_callback, index, iindex);
@@ -519,12 +503,8 @@
}
}
if (!$this.popupParam) {
- uni.showModal({
- title: "鎻愮ず",
- content: "popupParam涓虹┖锛�,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showInfo( "popupParam涓虹┖锛�)
+
return;
}
$this.classAttrList[$this.popupParam.index].Attr[$this.popupParam.iindex].Value = name;
@@ -559,12 +539,12 @@
//console.log(e.target)
this.focusOldField = `${e.target.dataset['index']}-${e.target.dataset['iindex']}`
getApp().onScan((result) => {
- //console.log(result.decodedata);
+ //console.log(result);
this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value =
- result.decodedata;
+ result;
uni.hideKeyboard();
- this.onevent($ele, result.decodedata);
- if (result.decodedata) { //绗竴涓緭鍏ユ涓嶄负绌�+ this.onevent($ele, result);
+ if (result) { //绗竴涓緭鍏ユ涓嶄负绌� //鍒濆鍖栵紝涓嬩釜杈撳叆妗唂ocus灞炴�
const attrs = this.classAttrList[e.target.dataset['index']].Attr || []
var findd = false
@@ -573,7 +553,7 @@
if (ele.hidden != true) {
if (utils.classUtils.attrTypeIsString(ele.Type) || utils.classUtils
- .attrTypeIsInt(ele.Type)) {
+ .attrTypeIsInt(ele.Type)) {
const field = `${e.target.dataset['index']}-${i}`
if (this
.focusOldField ==
@@ -758,13 +738,13 @@
},
- onevent(e, decodedata) {
+ onevent(e, value) {
// console.log(e.target);
var data_attr = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']];
- // console.log(decodedata);
+ // console.log(value);
if (e.detail.value != data_attr.Value) {
this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value =
- decodedata ? decodedata : e.detail.value;
+ value ? value : e.detail.value;
var eventid = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]
.action;
if (eventid) {
@@ -887,16 +867,9 @@
});
},
classAttr_AddRef(e) {
- console.log(e.target);
- uni.showModal({
- title: "鎻愮ず",
- content: "姝ゅ姛鑳借繕鏈疄鐜帮紒",
- showCancel: false,
- confirmText: "鍙栨秷"
- });
- // var value=this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].RelCls[e.detail.value];
- // this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=value;
- },
+
+ showInfo("姝ゅ姛鑳借繕鏈疄鐜帮紒")
+ },
classAttr_AddPrj(index, iindex) {
var param = {
index: index,
@@ -984,13 +957,8 @@
if (ar.notempty == true && !ar.Value) {
// if(ar.NotEmpty=='1'){
uni.hideLoading();
- // uni.showToast({title:ar.DispName+'涓嶈兘涓虹┖锛�,icon:"success",duration:3000});
- uni.showModal({
- title: "鎻愮ず",
- content: ar.DispName + '涓嶈兘涓虹┖锛�,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showInfo( ar.DispName + '涓嶈兘涓虹┖锛�);
+
return;
}
}
@@ -1028,39 +996,25 @@
console.log(action);
if (action.ret == '0') {
if (action.ret != 0) {
- uni.showModal({
- title: "鎻愮ず",
- content: '鎵ц鑴氭湰澶辫触锛� + action.result,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showError( '鎵ц鑴氭湰澶辫触锛� + action.result, "鎻愮ず")
+
return;
}
if (action.info) {
- uni.showModal({
- title: "鎻愮ず",
- content: '鎵ц鑴氭湰澶辫触锛� + action.info,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showError( '鎵ц鑴氭湰澶辫触锛� + action.info, "鎻愮ず")
+
return;
}
if (action.result_type == '0') {
- uni.showToast({
- title: action.result,
- icon: "success",
- duration: 3000
- });
+ showInfo(action.result);
+
}
// "{"ret":0, "result_type":0, "result":"鍒涘缓鎴愬姛123123123","info":""}"
}
} else
- uni.showToast({
- title: "鍒涘缓鎴愬姛锛�,
- icon: "success",
- duration: 3000
- });
+ showInfo("鍒涘缓鎴愬姛锛�);
+
//鍒锋柊
uni.redirectTo({
url: '../modal/classAttr?param=' + JSON.stringify(this.param) +
@@ -1071,12 +1025,7 @@
}).catch(ex => {
console.log(ex);
uni.hideLoading();
- uni.showModal({
- title: "鎻愮ず",
- content: ex.errMsg,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showError(ex, "鎻愮ず")
});
},
class_attr_init() {
@@ -1229,12 +1178,8 @@
console.log(this.classAttrList);
} else {
- uni.showModal({
- title: "鎻愮ず",
- content: "鏈壘鍒板彲鏄剧ず鐨勭殑灞炴�",
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showInfo( "鏈壘鍒板彲鏄剧ず鐨勭殑灞炴�")
+
}
},
ini_DataObjRunCustomEvent(info) {
@@ -1325,12 +1270,8 @@
}
}
} else if (action_type == 'open_select_userdlg') {
- uni.showModal({
- title: "閿欒2.2",
- content: "open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showInfo( "open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�)
+
}
// else if (action_type == 'tip_dlg') {
@@ -1340,12 +1281,7 @@
}).catch(ex => {
// console.log(ex);
- uni.showModal({
- title: "閿欒2.1",
- content: ex.errMsg,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showError(ex, "鎻愮ず2.1")
});
},
DataObjRunCustomEvent(info, data_attr) {
@@ -1489,12 +1425,7 @@
}).catch(ex => {
// console.log(ex);
- uni.showModal({
- title: "閿欒3.1",
- content: ex.errMsg,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showError(ex, "鎻愮ず3.1")
});
},
OKDataObjRunCustomEvent() {
@@ -1583,12 +1514,7 @@
this.add();
}).catch(ex => {
// console.log(ex);
- uni.showModal({
- title: "閿欒4.1",
- content: ex.errMsg,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showError(ex, "鎻愮ず4.1")
});
},
DataObjRunCustomEvent_Return(eventid, data_attr, button_callback, index, iindex) {
@@ -1796,22 +1722,14 @@
}
}
} else {
- uni.showModal({
- title: "鎻愮ず5.2",
- content: '璋冪敤 before_click_button 鑴氭湰杩斿洖绌猴紝event_id' + eventid,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showError('璋冪敤 before_click_button 鑴氭湰杩斿洖绌猴紝event_id' + eventid,"鎻愮ず5.2")
+
}
}).catch(ex => {
// console.log(ex);
- uni.showModal({
- title: "鎻愮ず5.1",
- content: ex.errMsg,
- showCancel: false,
- confirmText: "鍙栨秷"
- });
+ showError(ex, "鎻愮ず5.1")
+
});
},
formatAttr(attr) {
@@ -2144,7 +2062,7 @@
margin-top: 50rpx;
padding: 15rpx;
line-height: 1.5;
- /* background: #27A6E1;
+ /* background: #27A6E1;
border: none;
color: #fff; */
background: #fff;
--
Gitblit v1.9.1