From d2f2b39ef2c54839f5517d5cd1986f194dd56810 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 14 七月 2023 18:59:23 +0800
Subject: [PATCH] 展示流程业务数据

---
 Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue |    2 +-
 Source/UBCS-WEB/src/components/work/BusinessWork.vue  |   38 +++++++++++++++++++++++++-------------
 2 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
index 20d1b8b..26286f1 100644
--- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -38,7 +38,7 @@
               <el-input v-model="WupinFindValue" placeholder="璇疯緭鍏ュ叧閿瓧鎸夊洖杞︽煡璇�"
                         size="small" style="width: 180px; margin-left: 5px; margin-top: 10px"></el-input>
             </div>
-            <el-table v-if="tableData.length != 0" v-loading="isLoading" :data="tableData" :height="tableHeight" style="min-height: 300px" ref="dataTable"
+            <el-table v-if="tableData.length != 0" v-loading="isLoading" :data="tableData" :height="tableHeight" ref="dataTable"
                       @cell-click="handleCellClick" @row-click="handleRowClick" @select="handleSelection" @select-all="handleSelectionAll" @selection-change="handleSelectionChange" @sort-change="sortChange">
               <el-table-column fixed type="selection" width="55"></el-table-column>
               <el-table-column fixed label="搴忓彿" type="index" width="55">
diff --git a/Source/UBCS-WEB/src/components/work/BusinessWork.vue b/Source/UBCS-WEB/src/components/work/BusinessWork.vue
index 783f534..ff955e8 100644
--- a/Source/UBCS-WEB/src/components/work/BusinessWork.vue
+++ b/Source/UBCS-WEB/src/components/work/BusinessWork.vue
@@ -22,17 +22,25 @@
       :show-overflow-tooltip="true"
       align="center"
     >
-      <!-- 缂栬緫鍜屽睍绀洪�昏緫 -->
-      <!--              <template slot-scope="{ row }">-->
-      <!--                <el-input v-if="editingRow === row && editShow== item.prop" v-model="row[item.prop]" @blur="saveRow"></el-input>-->
-      <!--                <span v-else>{{row[item.prop]}}</span>-->
-      <!--                <el-switch-->
-      <!--                  v-if="editShow === 'true'"-->
-      <!--                  v-model="row[item.prop]"-->
-      <!--                  active-color="#13ce66"-->
-      <!--                  inactive-color="#ff4949">-->
-      <!--                </el-switch>-->
-      <!--              </template>-->
+      <template slot-scope="{ row }">
+        <el-input v-if="editingRow === row && editShow== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text'  ||item.edit == 'refer' )" v-model="row[item.prop]"
+                  @blur="editingRows=null"></el-input>
+        <el-input-number size="small" controls-position="right" v-if="editingRow === row && editShow== item.prop && item.edit == 'number'" v-model="row[item.prop]"
+                         @blur="editingRows=null" :style="{width:(item.width-10)+'px'}"></el-input-number>
+        <el-select v-model="row[item.prop]" filterable  allow-create  default-first-option slot="prepend" v-if="editingRow === row && editShow== item.prop && item.edit == 'select' " @blur="editingRows=null">
+          <el-option
+            v-for="optionItem in item.data"
+            :key="optionItem.dictValue"
+            :label="optionItem.dictValue"
+            :value="optionItem.dictValue">
+          </el-option>
+        </el-select>
+        <el-switch
+          v-if="item.edit === 'switch' || item.edit === 'truefalse'" v-model="row[item.prop]" active-value="true"
+          inactive-value="false">
+        </el-switch>
+        <span v-else>{{ row[item.prop] }}</span>
+      </template>
     </el-table-column>
   </el-table>
 </div>
@@ -117,8 +125,12 @@
                   return row[column.property] == 'true' || row[column.property] == '1' ? '鏄�' : '鍚�'
                 }
               }
+              if (item.edit == 'select') {
+                //闇�瑕佽幏鍙栦笅鎷夋鏁版嵁
+                columnItem.data=[]
+              }
             }
-            this.tableHeadData.push(columnItem)
+            this.tableHeadData.push(Object.assign(item, columnItem))
           });
         });
       }
@@ -133,7 +145,7 @@
       })
     },
     // 鐩戝惉鍗曞厓鏍肩偣鍑讳簨浠跺苟瀛樺偍姝e湪缂栬緫鐨勮
-    handleCellClick(row, column) {
+    handleCellClick(row, column, cell, event) {
       this.editingRow = row;
       this.editShow = column.property;
     },

--
Gitblit v1.9.3