loulijun2021
2022-06-24 3d14449abab5055e2f370be4fa1a31c15c715453
src/views/jcsz/wldw.vue
@@ -1,7 +1,7 @@
<template>
  <div>
    <div class="body" style="background-color: #ffffff;  padding: 20px 10px 0 20px;" :style="{height:mainHeight+'px'}">
      <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
        <el-form
          ref="form"
          :model="form"
@@ -36,12 +36,13 @@
          </div>
        </el-form>
      </div>
      <div style="margin-bottom: 20px;display: flex;z-index: 2">
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button type="primary" icon="el-icon-upload2">导入</el-button>
      </div>
      <!--      :style="{width: 100+'%',height:isCompatible?(tableHeight+'px'):'800px'}"-->
      <div style="display: flex;border: 1px solid #eee">
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          border
@@ -140,7 +141,7 @@
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">修改</el-button>
                <el-button type="text" @click="del(row.id)">删除</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
              </div>
            </template>
          </el-table-column>
@@ -226,7 +227,6 @@
      }
    }
    return {
      isCompatible: false, // 是否兼容
      mainHeight: 0,
      tableHeight: 0,
      form: {
@@ -369,13 +369,13 @@
      })
    },
    // 删除按钮
    async del(id) {
    async del(row) {
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        DeleteCurrentUnit({ unitid: id }).then(res => {
        DeleteCurrentUnit({ unitcode: row.code }).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            this.getCurrentUnitSearch()
@@ -579,10 +579,14 @@
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
}
.elForm {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  flex-wrap: wrap;
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
::v-deep .el-form-item {
  margin-bottom: 0;
}
</style>