zhanghua
2025-07-16 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3
src/views/systemSetting/device/bayonet/index.vue
@@ -4,23 +4,35 @@
      <div class="header-content">
        <div class="search">
          <span style="padding-right: 20px">筛选条件:</span>
          <el-input v-model="context" placeholder="请输入" @change="getBayonetListData"></el-input>
          <el-input v-model="context" placeholder="请输入"></el-input>
        </div>
      </div>
    </header>
    <main>
      <div class="main-content">
        <div class="main-title">
          <el-button
            type="primary"
            icon="el-icon-search"
            @click="getBayonetListData"
            >查询
          </el-button>
          <el-button
            class="el-icon-plus button-addition"
            type="primary"
            @click="showDialog(false, null)"
            >添加</el-button
          >
          <el-button @click="handleExport">导出卡口</el-button>
          <el-button @click="handleExport" type="primary">导出卡口</el-button>
        </div>
      </div>
    </header>
    <main>
      <div class="main-content">
        <!-- 数据展示 -->
        <MyTable :tableOption="tableOption" :get-table-list="getBayonetListData" :tableData="list" :pageShow="false">
        <MyTable
          :tableOption="tableOption"
          :get-table-list="getBayonetListData"
          :tableData="list"
        >
          <template #operation="info">
            <el-link
              :underline="false"
@@ -38,6 +50,25 @@
            >
          </template>
        </MyTable>
        <div class="tools">
          <div class="funs">
            <div class="funsItem funs-sp"></div>
            <div class="funsItem funs-sp"></div>
            <div class="funsItem"></div>
          </div>
          <div class="pagination">
            <el-pagination
              background
              :current-page="current"
              layout="prev, pager, next"
              :total="total"
              :page-size="size"
              @current-change="changeCurrentPage"
            >
            </el-pagination>
          </div>
        </div>
      </div>
    </main>
    <footer>
@@ -87,6 +118,7 @@
      list: [],
      current: 1,
      size: 10,
      total: 0,
      tableOption: {
        group: [
          {
@@ -142,12 +174,18 @@
          current: this.current,
          size: this.size,
        })
        .then(({ records }) => {
        .then(({ records, total }) => {
          this.list = records;
          this.total = total;
        })
        .catch((err) => {
          this.$message({ type: "error", message: err });
        });
    },
     // 当前页改变触发事件
     changeCurrentPage(page) {
      this.current = page;
      this.getBayonetListData();
    },
    // 弹窗关闭
    handleClose(done) {
@@ -166,7 +204,7 @@
        .exportBayonetList({
          bayonetName: this.context,
          current: this.current,
          size: this.size
          size: this.size,
        })
        .then((res) => {
          downloadFile(res);
@@ -198,14 +236,14 @@
<style lang="scss" scoped>
.userList {
  text-align: left;
  margin: 10px 20px;
  color: #4b9bb7;
  padding: 10px 20px;
  // color: #4b9bb7;
  border: 1px solid #ccc;
  header {
    background-color: white;
    // background-color: white;
    .header-content {
      padding: 0 40px;
      padding: 0;
      display: flex;
      line-height: 100px;
      justify-content: space-between;
@@ -221,26 +259,26 @@
        .el-input {
          flex: 2;
          color: #1d3f57;
          // color: #1d3f57;
          &::v-deep .el-input__inner {
            background-color: #09152f;
            border: 1px solid #17324c;
          }
          // &::v-deep .el-input__inner {
          //   background-color: #09152f;
          //   border: 1px solid #17324c;
          // }
        }
      }
      .main-title {
        line-height: 60px;
        padding: 10px 0px;
      }
    }
  }
  main {
    background-color: #09152f;
    // background-color: #09152f;
    margin-top: 20px;
    padding-bottom: 50px;
    .main-title {
      line-height: 60px;
      padding: 10px 20px;
    }
    .tools {
      display: flex;
@@ -255,7 +293,7 @@
          line-height: 28px;
          display: flex;
          align-items: center;
          border: 1px solid #17324c;
          // border: 1px solid #17324c;
          border-radius: 4px;
          font-size: 12px;
          margin-left: 10px;
@@ -269,18 +307,18 @@
            width: 120px;
          }
          &::v-deep .el-input__inner {
            border: none;
            background-color: #09152f;
          }
          // &::v-deep .el-input__inner {
          //   border: none;
          //   background-color: #09152f;
          // }
          &:hover {
            border: 1px solid #4b9bb7;
          }
          // &:hover {
          //   border: 1px solid #4b9bb7;
          // }
          &:hover .el-checkbox {
            color: #4b9bb7;
          }
          // &:hover .el-checkbox {
          //   color: #4b9bb7;
          // }
        }
      }
@@ -291,24 +329,24 @@
        justify-content: center;
        .el-pagination {
          &::v-deep li,
          &::v-deep .btn-prev,
          &::v-deep .btn-next {
            background-color: #071f39;
            color: #4b9bb7;
          }
          // &::v-deep li,
          // &::v-deep .btn-prev,
          // &::v-deep .btn-next {
          //   background-color: #071f39;
          //   color: #4b9bb7;
          // }
          &::v-deep .active {
            background-color: #409eff;
            color: #fff;
          }
          // &::v-deep .active {
          //   background-color: #409eff;
          //   color: #fff;
          // }
        }
      }
    }
    .el-table {
      color: #4b9bb7;
      font-size: 10px;
      // color: #4b9bb7;
      // font-size: 10px;
      .cell {
        display: flex;
@@ -327,4 +365,4 @@
.line {
  padding: 0 5px;
}
</style>
</style>