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 style="height: 50px;">
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
        <el-form
          ref="form"
          :model="form"
@@ -9,15 +9,15 @@
          inline
          style="display: flex;justify-content: space-between"
        >
          <div style="display: flex;justify-content: space-around;width: 85%">
          <div class="elForm">
            <el-form-item label="单位编码" style=" display: flex;">
              <el-input v-model="form.CuntUnitCode" placeholder="请输入" style="width: calc(100%-30px)" />
              <el-input v-model="form.CuntUnitCode" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="单位名称" style=" display: flex;">
              <el-input v-model="form.CuntUnitName" placeholder="请输入" style="width: calc(100%-30px)" />
              <el-input v-model="form.CuntUnitName" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="单位属性" style=" display: flex;">
              <el-select v-model="form.UnitAttr" filterable style="width: calc(100%-30px)" placeholder="请选择">
              <el-select v-model="form.UnitAttr" filterable style="width: 200px" placeholder="请选择">
                <el-option
                  v-for="item in UnitAttrArr"
                  :key="item.value"
@@ -27,7 +27,7 @@
              </el-select>
            </el-form-item>
            <el-form-item label="创建人员" style=" display: flex;">
              <el-input v-model="form.CreateUser" style="width: calc(100%-30px)" placeholder="请输入" />
              <el-input v-model="form.CreateUser" style="width: 200px" placeholder="请输入" />
            </el-form-item>
          </div>
          <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
@@ -36,15 +36,17 @@
          </div>
        </el-form>
      </div>
      <div style="margin-bottom: 20px;display: flex">
      <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
          stripe
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
@@ -139,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>
@@ -225,7 +227,6 @@
      }
    }
    return {
      isCompatible: false, // 是否兼容
      mainHeight: 0,
      tableHeight: 0,
      form: {
@@ -368,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()
@@ -458,6 +459,8 @@
  height: 30px;
  display: flex;
  align-items: center;
  border: 1px solid $main_color;
  padding: 0 20px;
}
::v-deep .el-button--info {
@@ -465,10 +468,16 @@
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
.footerButton {
@@ -481,6 +490,7 @@
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
@@ -569,4 +579,14 @@
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
::v-deep .el-form-item {
  margin-bottom: 0;
}
</style>