From b7de729e7ae27044dcfa8e996218ff2b7ec1fae5 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期三, 05 七月 2023 18:39:02 +0800 Subject: [PATCH] bug修改提交 --- Source/UBCS-WEB/src/components/Tree/attrCrud.vue | 74 ++++++++++++++++++------------------ 1 files changed, 37 insertions(+), 37 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue index 68cdd6c..99a82dc 100644 --- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue +++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue @@ -1,9 +1,6 @@ <template> - - <!-- <avue-crud :data="ProData" :option="option" @sort-change="sortChange" @row-update="addUpdate"--> - <!-- @cell-click="handleRowClick" @select="selectHandle" @row-del="CrudRowDel">--> <div> - <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArray.length>=1"> + <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag"> <!--鏂板--> <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary" @click="busineHandle">锛� 娣诲姞 {{ msg }} @@ -33,11 +30,10 @@ <!-- 閲嶇疆--> <el-button size="small" @click="reset">閲嶇疆</el-button> <!-- 鍚屾鍒板叾浠栨ā鏉�--> - <el-button size="small"@click="syncHandle">鍚屾鍒板叾浠栨ā鏉�</el-button> + <el-button size="small" @click="syncHandle">鍚屾鍒板叾浠栨ā鏉�</el-button> <!-- 缂栫爜鐢宠棰勮--> <el-button size="small" @click="applicationHandle" style="">缂栫爜鐢宠棰勮</el-button> <!-- 楠岃瘉瑙勫垯--> - </div> <!-- 寮圭獥--> <div> @@ -203,7 +199,7 @@ </el-dialog> <!-- 鍏ㄥ睆缂栬緫--> <el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true"> - <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag"></attrCrud> + <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud> </el-dialog> <!-- 缁勫悎瑙勫垯--> <formula-editor :systemVariableTableData="systemVariableTableData" @@ -236,8 +232,7 @@ style="width: 100%" @cell-click="handleCellClicks" @select="selectHandle" - v-if="this.crudArray.length>=1" - + v-if="this.crudArrayFlag" > <el-table-column type="selection" @@ -286,7 +281,6 @@ export default { name: "attrCrud .vue", - // props: ['ProData','crudOid','crudArray','Formlist','codeClassifyOid'], props: { ProData: { type: Array, @@ -309,10 +303,29 @@ type: Boolean, default: false }, - + crudArrayFlag:{ + type: Boolean, + default: false + } + }, + watch:{ + crudArray:{ + handler(newval,oldval){ + if(newval != undefined){ + if(newval.length>=1){ + this.crudArrayFlag=true + }else{ + this.crudArrayFlag=false + } + } + }, + deep:true, + immediate:true + } }, data() { return { + crudArrayFlag:false, editingRows: null, editShows:"", attrFlag: false, @@ -1169,21 +1182,9 @@ methods: { formAttr(row, column) { console.log(row,column) - // if (column.property === "keyAttrFlag" - // ||column.property === "queryAttrFlag" - // ||column.property === "seniorQueryAttrFlag" - // ||column.property === "sameRepeatAttrFlag" - // ||column.property === "requireFlag" - // ||column.property === "formDisplayFlag" - // ||column.property === "tableDisplayFlag" - // ||column.property === "sortAttrFlag") { - // return row[column.property] =='true'? "鏄�" : "鍚�"; - // } - // return row[column.property]; }, //灞炴�у垎缁勬寜閽� attrVisibleHandle() { - this.formatBoolean() if (this.CrudSelect.length > 1) { this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉垮睘鎬�') } else if (this.CrudSelect < 1) { @@ -1214,14 +1215,10 @@ }, //涓氬姟绫诲瀷淇濆瓨 busineAddHandle() { - if (this.busineSelectList.length > 1) { - this.$message.warning('璇烽�夋嫨涓�鏉′笟鍔$被鍨嬫暟鎹�') - } else { - this.$set(this.busineAddList, 'classifytemplateoid', this.crudOid) - this.$set(this.busineAddList, 'oid', '') - this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList))) - this.addVisible = false; - } + this.$set(this.busineAddList, 'classifytemplateoid', this.crudOid) + this.$set(this.busineAddList, 'oid', '') + this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList))) + this.addVisible = false; }, //涓氬姟绫诲瀷鍗曢�� businessSelect(selection, row) { @@ -1230,14 +1227,10 @@ }, // 浠庝笟鍔$被鍨嬩腑閫夋嫨鏁版嵁 busineHandle() { - if (this.crudArray.length < 1) { - this.$message.error('璇烽�夋嫨涓�鏉℃ā鏉�') - } else { this.addVisible = true; AttrByBtm({'conditionMap[oid]': this.crudOid}).then(res => { this.businessData = res.data.data; }) - } }, // 绾ц仈灞炴�ф寜閽� CascadeHandle() { @@ -1264,7 +1257,7 @@ }, //淇濆瓨 addsHandler() { - batchAddSave(JSON.parse(JSON.stringify(this.ProData).replace(/classifyTemplateOid/g,"classifytemplateoid"))).then(res => { + batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => { this.$message.success('淇濆瓨鎴愬姛') }) }, @@ -1366,7 +1359,14 @@ }, //鍒嗙被娉ㄥ叆淇濆瓨 injectAddHandle() { - this.$set(this.attrRow, 'classifyInvokeLevel', this.injectOption); + let data = { + "娉ㄥ叆绫诲瀷": this.injectOption.type, + "娉ㄥ叆绫诲瀷鍚嶇О": this.injectOption.set, + "灞傜骇璁剧疆": this.injectOption.injectNum, + "鏄惁鍙慨鏀�": this.injectOption.change + } + console.log(this.injectOption) + this.$set(this.attrRow, 'classifyInvokeLevel', data); this.injectVisible = false }, //鍒嗙被娉ㄥ叆娓呯┖ -- Gitblit v1.9.3