From 222c109727ed1da438f3371a2b0934d6cef85ee5 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期六, 05 八月 2023 21:26:45 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/components/template/FlowPath.vue | 41 +++++++++++++++++++++++++++-------------- 1 files changed, 27 insertions(+), 14 deletions(-) diff --git a/Source/UBCS-WEB/src/components/template/FlowPath.vue b/Source/UBCS-WEB/src/components/template/FlowPath.vue index 5bb9834..72d9567 100644 --- a/Source/UBCS-WEB/src/components/template/FlowPath.vue +++ b/Source/UBCS-WEB/src/components/template/FlowPath.vue @@ -2,7 +2,7 @@ <avue-crud ref="crud" :table-loading="loading" :data="data" v-model="form" :option="option" :page.sync="page" :search.sync="search" @on-load="getDataList" @row-save="handleSave" @row-del="handleDelete" @row-update="handleEdit" @refresh-change="handleRefresh" @size-change="handleSizePage" - @current-change="handleCurrentPage"> + @current-change="handleCurrentPage" v-if="Formlist.length>0"> </avue-crud> </template> @@ -23,6 +23,10 @@ typeof: String, required: true, default: "" + }, + Formlist:{ + type:Array, + default:[] } }, data() { @@ -39,13 +43,15 @@ startData: [], form: {}, option: { - height: "auto", + height: 340, border: true, align: 'center', + menu:!this.checkStatus || this.crudLCStatus == 'Editing', menuAlign: 'center', index: true, searchMenuSpan: 8, searchBtn: false, + refreshBtn:false, emptyBtn: false, columnBtn: false, editBtn:!this.checkStatus || this.crudLCStatus == 'Editing', @@ -157,23 +163,27 @@ this.data = data.records this.page.total = data.total } else this.loading = false + }else { + this.data=[] } }, // 鏂板 async handleSave(row, done, loading) { console.log(row) - const response = await flowpathSave({ ...row, ...{ templateId: this.code } }) - if (response.status === 200) { - loading() + await flowpathSave({ ...row, ...{ templateId: this.code } }).then(response=>{ + if (response.status === 200) { console.log(response) this.$message({ - type: 'success', - message: '鏂板鏁版嵁鎴愬姛锛�' + type: 'success', + message: '鏂板鏁版嵁鎴愬姛锛�' }) done() this.getDataList() - } + } + }).catch(res=>{ + loading() + }) }, // 缂栬緫 @@ -181,16 +191,19 @@ console.log(row) const { modelName, modelKey, buttonTypeKey, id ,description} = row let param = { modelName, modelKey, buttonTypeKey, id,description } - const response = await flowpathSave({ ...param, ...{ templateId: this.code } }) - if (response.status === 200) { - loading() + await flowpathSave({ ...param, ...{ templateId: this.code } }).then(response=>{ + if (response.status === 200) { this.$message({ - type: 'success', - message: '淇敼鏁版嵁鎴愬姛锛�' + type: 'success', + message: '淇敼鏁版嵁鎴愬姛锛�' }) done() this.getDataList() - } + } + }).catch(()=>{ + //loading鎺у埗绂佺敤 榛樿鏄紑鍚� + loading() + }) }, // 鍒犻櫎鍗曟潯 -- Gitblit v1.9.3