From 37c911c5ff129456da6c403539b5ba75e95f7643 Mon Sep 17 00:00:00 2001
From: dangsn <dangsn@chicecm.com>
Date: 星期五, 04 八月 2023 15:20:39 +0800
Subject: [PATCH] 新增通用生命周期变更事件
---
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 66 +++++++++++++++++++++++++++++----
1 files changed, 58 insertions(+), 8 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 5c1747a..b18084c 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag" class="app">
+ <div style="display: flex;flex-wrap: wrap; display: inline-block" v-if="this.crudArrayFlag" class="app" >
<el-button-group>
<!--鏂板-->
<el-button v-if="attrEditVisible == false && attrFlagChiledren==false && editOpenFlag && (!checkStatus || crudLCStatus=='Editing' )" size="small" type="primary" icon="el-icon-plus" plain @click="busineHandle">娣诲姞 {{ msg }}</el-button>
@@ -332,6 +332,7 @@
<script>
import {AttrByBtm, gridCodeClassifyTemplateAttr, batchAddSave, copyto,listByFlag} from '@/api/template/templateAttr'
import {getList} from "@/api/refer/table";
+import func from "@/util/func";
export default {
name: "attrCrud .vue",
@@ -1686,14 +1687,63 @@
},
//淇濆瓨
addsHandler(event) {
- batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => {
- this.$message.success('淇濆瓨鎴愬姛')
- this.editOpenFlag=false;
- // 璋冪敤鐖剁粍浠朵慨鏀规寜閽姸鎬�
- this.$emit('editCloseChildren')
- }).catch(()=>{
- this.$message.warning('淇濆瓨澶辫触锛岃鏌ョ湅鎺у埗鍙拌緭鍑猴紒')
+ this.$refs.referAttrCrud.sort("orderNum");
+ var ischeck = true;
+ console.log(this.ProData)
+ this.ProData.forEach((item,index)=>{
+ if((item.requireFlag && item.requireFlag.toString()=='true') && (item.readOnlyFlag && item.readOnlyFlag.toString()=='true')){
+ this.$message.warning(item.name+"("+item.id+")蹇呰緭鐨勫睘鎬т笉鑳芥槸鍙");
+ console.log(item)
+ ischeck=false;
+ return;
+ }
+ var num=0;
+ if(item.componentRule){
+ //缁勫悎瑙勫垯
+ num++
+ }
+ if(item.enumString || item.enumId){
+ //鏋氫妇
+ num++
+ }
+ if(item.referConfig || item.referBtmId){
+ //鍙傜収
+ num++
+ }
+ if(item.codeDateFormat){
+ //鏃堕棿鏍煎紡
+ num++
+ }
+ if(item.classifyInvokeLevel){
+ //鍒嗙被娉ㄥ叆
+ num++
+ }
+ if(num>1 && ischeck){
+ this.$message({
+ showClose: true,
+ message: item.name+"("+item.id+") 灞炴�у彧鑳芥槸缁勫悎瑙勫垯锛屾灇涓撅紝鍙傜収锛屾椂闂存牸寮忥紝鍒嗙被娉ㄥ叆涓殑涓�绉�",
+ type: 'warning'
+ });
+ ischeck=false;
+ return;
+ }
})
+ if(!ischeck){
+ return ;
+ }
+ // 鏂板嚱鏁扮敤浜庢墽琛宐atchAddSave鏂规硶
+ const executeBatchAddSave = () => {
+ batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => {
+ this.$message.success('淇濆瓨鎴愬姛')
+ this.editOpenFlag=false;
+ // 璋冪敤鐖剁粍浠朵慨鏀规寜閽姸鎬�
+ this.$emit('editCloseChildren')
+ }).catch(()=>{
+ this.$message.warning('淇濆瓨澶辫触锛岃鏌ョ湅鎺у埗鍙拌緭鍑猴紒')
+ });
+ }
+ // 鎵�鏈塱f鏉′欢鍜岄�昏緫閫氳繃鍚庤皟鐢╡xecuteBatchAddSave鍑芥暟
+ executeBatchAddSave();
},
//琛ㄦ牸琛岀紪杈�
handleCellClicks(row, column) {
--
Gitblit v1.10.0