From 67a655318d9c68e7283256e323619e3268aac017 Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期五, 16 六月 2023 17:42:30 +0800
Subject: [PATCH] 1、将以前留的空缺的代码进行确认修改
---
Source/UBCS-WEB/src/components/Crud/Crud.vue | 54 ++++++++++++++++++++++++++++++++++--------------------
1 files changed, 34 insertions(+), 20 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Crud/Crud.vue b/Source/UBCS-WEB/src/components/Crud/Crud.vue
index c0be479..7d7b595 100644
--- a/Source/UBCS-WEB/src/components/Crud/Crud.vue
+++ b/Source/UBCS-WEB/src/components/Crud/Crud.vue
@@ -6,7 +6,7 @@
<FormTemplateDialog
:visible.sync="addvisible"
:type="add"
- :templateOid="this.templateOid"
+ :templateOid="templateOid"
:codeClassifyOid="this.codeClassifyOid"
:codeRuleOid="this.codeRuleOid"
:disabledProp="disabledProp"
@@ -16,7 +16,7 @@
<FormTemplateDialog
:visible.sync="editvisible"
:type="edit"
- :templateOid="this.templateOids"
+ :templateOid="templateOid"
:codeClassifyOid="this.codeClassifyOid"
:codeRuleOid="this.codeRuleOid"
:disabledProp="disabledProp"
@@ -30,20 +30,20 @@
<el-button size="small" type="primary" plain>鍒犻櫎</el-button>
<el-button size="small" type="primary" plain>鍙戝竷</el-button>
<el-button size="small" type="primary" plain>鏁版嵁鏇存敼</el-button>
- <el-button size="small" type="primary" plain>鍥炴敹</el-button>
+ <el-button size="small" type="primary" plain @click="huishouHandler">鍥炴敹</el-button>
<el-button size="small" type="primary" plain @click="openD">瀵煎嚭
<integration-transfer :visible.sync="dialogPush" :data="transferData"
:props="transferProps" @save="handelTransferSave"></integration-transfer>
</el-button>
<el-button size="small" type="primary" plain @click="findvisible=true">鏌ヨ
- <advancedQuery :visible.sync="findvisible" :options="this.options"></advancedQuery>
+ <advanced-query :visible.sync="findvisible" :options="this.options"></advanced-query>
</el-button>
<el-button size="small" type="primary" plain>鐩镐技椤规煡璇�</el-button>
<el-button size="small" type="primary" plain style="margin-left: 1px;margin-top:10px">鍒锋柊</el-button>
<el-input placeholder="璇疯緭鍏ュ叧閿瓧鎸夊洖杞︽煡璇�" style="width: 180px;margin-left: 5px;margin-top:10px" size="small"></el-input>
</div>
<el-row style="height: 700px;width: 100%">
- <el-table :data="tableData" style="" @cell-click="handleCellClick" max-height="700" @selection-change="handleSelectionChange" @sort-change="sortChange">
+ <el-table :data="tableData" style="" @cell-click="handleCellClick" max-height="700" v-loading="isLoading" @selection-change="handleSelectionChange" @sort-change="sortChange">
<el-table-column
type="selection"
fixed
@@ -113,15 +113,20 @@
},
tableDataArray:{
type:Array,
- default:[]
},
total:{
type:String,
default:""
},
+ templateOid:{
+ type:String,
+ },
tableHeadDataFateher:{
type:Array,
- default:[]
+ },
+ isLoading:{
+ type:Boolean,
+ default:false
}
},
data() {
@@ -141,9 +146,8 @@
editingRow:null,
editShow: "",
editAttr:"",
- loading: false,
data: [],
- options:{},
+ options:[],
option: {
column: []
},
@@ -157,7 +161,6 @@
},
tableData:[],
tableHeadData:[],
- tableHeadDataFateher:[],
items:{},
seniorQueryColumns:[]
}
@@ -193,13 +196,30 @@
this.page.total=newval;
}
},
- tableHeadData:{
+ tableHeadDataFateher:{
handler(newval,oldval){
- this.tableHeadDataFateher=newval
+ let List=newval.tableDefineVO.cols[0];
+ List.forEach(item=>{
+ let columnItem = {
+ label: item.title,
+ prop: item.field,
+ type: this.columnType[item.type],
+ sortable: item.sort,
+ width: item.minWidth
+ };
+ this.option.column.push(columnItem);
+ this.option.column=this.tableHeadData;
+ })
}
}
},
methods: {
+ huishouHandler(){
+ console.log('tem',this.templateOid)
+ console.log('table',this.tableData)
+ console.log('tabheadle',this.tableHeadData)
+ console.log('tableFather',this.tableHeadDataFateher)
+ },
openD(){
this.dialogPush=true;
this.getListCodeByClassId()
@@ -219,25 +239,20 @@
this.page.pageSize=val
this.$emit('pageSize',val)
this.CrudRend()
- console.log(this.tableData)
},
handleCurrentChange(val){
this.page.currentPage=val
this.$emit('currentPage',val)
this.CrudRend()
- console.log(val)
- console.log(this.tableData)
},
// 鐩戝惉鍗曞厓鏍肩偣鍑讳簨浠跺苟瀛樺偍姝e湪缂栬緫鐨勮
handleCellClick(row, column) {
this.editingRow = row;
this.editShow = column.property;
- console.log(row)
this.rowOid=row.oid
},
//鍒犻櫎
enumDeleteRow(row) {
- console.log(row)
this.tableData.splice(row, 1)
},
// 灏嗘鍦ㄧ紪杈戠殑琛岀殑鐘舵�佸彉涓� null 锛屽嵆閫�鍑虹紪杈戠姸鎬�
@@ -285,7 +300,6 @@
this.option.column=this.tableHeadData;
this.templateOid=res.data.tableDefineVO.oid
this.$emit('templateOid',this.templateOid)
- console.log(this.templateOid)
})
})
}
@@ -305,7 +319,7 @@
},
// 鎺掑簭
sortChange(val) {
- this.loading = true;
+ this.isLoading = true;
let order = ""
if (val.order == "ascending") {
order = "asc";
@@ -322,7 +336,7 @@
}).then(res => {
setTimeout(() => {
this.data = res.data.data;
- this.loading = false;
+ this.isLoading = false;
}, 100);
})
},
--
Gitblit v1.9.3