From 0c2775ca98c801a419209664befc45ae0a444356 Mon Sep 17 00:00:00 2001
From: lihang <lihang@vci-tech.com>
Date: 星期三, 05 七月 2023 16:37:53 +0800
Subject: [PATCH] 业务类型相关修正,修改了参照和枚举的保存 -- 补遗
---
Source/UBCS-WEB/src/components/Tree/attrCrud.vue | 55 +++++++++++++++++++++++++++++++++++++------------------
1 files changed, 37 insertions(+), 18 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 7649338..0f470e3 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 }}
@@ -37,7 +34,6 @@
<!-- 缂栫爜鐢宠棰勮-->
<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"
@@ -247,6 +242,7 @@
<el-table-column v-for="item in this.option.column" :key="item.id"
:label="item.label"
:prop="item.prop"
+ :formatter="formAttr"
:width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'"
:show-overflow-tooltip="true"
align="center"
@@ -254,6 +250,11 @@
<template slot-scope="{ row }">
<el-input v-if="editingRows === row && editShows== item.prop" v-model="row[item.prop]"
@blur="saveRows"></el-input>
+ <el-switch
+ v-if="item.label === 'true' || item.label === 'false'"
+ active-color="#13ce66"
+ inactive-color="#ff4949">
+ </el-switch>
<span v-else>{{ row[item.prop] }}</span>
</template>
</el-table-column>
@@ -280,7 +281,6 @@
export default {
name: "attrCrud .vue",
- // props: ['ProData','crudOid','crudArray','Formlist','codeClassifyOid'],
props: {
ProData: {
type: Array,
@@ -303,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,
@@ -1161,7 +1180,9 @@
},
methods: {
-
+ formAttr(row, column) {
+ console.log(row,column)
+ },
//灞炴�у垎缁勬寜閽�
attrVisibleHandle() {
if (this.CrudSelect.length > 1) {
@@ -1210,14 +1231,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() {
@@ -1244,7 +1261,7 @@
},
//淇濆瓨
addsHandler() {
- batchAddSave(this.ProData).then(res => {
+ batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => {
this.$message.success('淇濆瓨鎴愬姛')
})
},
@@ -1454,6 +1471,8 @@
}
</script>
-<style scoped>
-
+<style scoped lang="scss">
+/deep/ .el-button {
+ margin: 0 10px 10px 0;
+}
</style>
--
Gitblit v1.10.0