wangting
2023-07-14 d2f2b39ef2c54839f5517d5cd1986f194dd56810
展示流程业务数据
已修改2个文件
40 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/work/BusinessWork.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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">
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 @@
      })
    },
    // 监听单元格点击事件并存储正在编辑的行
    handleCellClick(row, column) {
    handleCellClick(row, column, cell, event) {
      this.editingRow = row;
      this.editShow = column.property;
    },