zhanghua
2025-07-16 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3
src/views/operate/fivepack/threepack/components/content.vue
@@ -6,7 +6,7 @@
          <div class="search-item">
            <span>输入查询:</span>
            <el-input
              style="flex: 1"
              style="flex: 1; margin-left: 15px"
              :placeholder="
                isStorePage() ? '店铺(门店)名称' : '请输入店铺编号'
              "
@@ -15,7 +15,11 @@
          </div>
          <div class="search-item">
            <span>店铺状态:</span>
            <el-select v-model="storeStatus" placeholder="选择店铺状态">
            <el-select
              v-model="storeStatus"
              style="margin-left: 15px"
              placeholder="选择店铺状态"
            >
              <el-option
                v-for="item in options"
                :key="item.value"
@@ -57,6 +61,7 @@
        :data="tableData"
        style="width: 100%"
        :row-class-name="tableRowClassName"
        @selection-change="tableChange"
      >
        <el-table-column type="selection" min-width="5"> </el-table-column>
        <el-table-column prop="storeNumber" label="店铺编号" min-width="10">
@@ -73,8 +78,8 @@
          min-width="10"
        >
        </el-table-column>
        <el-table-column prop="storeScore" label="店铺积分" min-width="10">
        </el-table-column>
        <!-- <el-table-column prop="storeScore" label="店铺积分" min-width="10">
        </el-table-column> -->
        <el-table-column prop="videoPoint" label="关联摄像机" min-width="10">
          <template v-if="scope.row.videoId" slot-scope="scope">
            <span>{{ scope.row.videoPoint.name }}</span>
@@ -253,18 +258,57 @@
          </el-form>
        </div>
      </el-dialog>
      <!-- 分页 -->
      <div class="pagination">
        <el-pagination
          background
          :current-page="currentPage"
          layout="prev, pager, next"
          :total="totalNum"
          :page-size="pageSize"
          @current-change="changeCurrentPage"
        >
        </el-pagination>
      <div class="tools">
        <div class="funs">
          <div class="funsItem">
            <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox>
          </div>
          <div class="funsItem">
            <el-checkbox v-model="unsame" @change="disSame(tableData)"
              >反选</el-checkbox
            >
          </div>
          <div class="funsItem">
            <el-select
              v-model="myIdx"
              placeholder="批量操作"
              @change="selectChange"
            >
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                :disabled="item.disabled"
              >
              </el-option>
            </el-select>
          </div>
        </div>
        <div class="pagination">
          <el-pagination
            background
            :current-page="currentPage"
            layout="prev, pager, next"
            :total="totalNum"
            :page-size="pageSize"
            @current-change="changeCurrentPage"
          >
          </el-pagination>
        </div>
      </div>
      <!-- 分页 -->
      <!--      <div class="pagination">-->
      <!--        <el-pagination-->
      <!--          background-->
      <!--          :current-page="currentPage"-->
      <!--          layout="prev, pager, next"-->
      <!--          :total="totalNum"-->
      <!--          :page-size="pageSize"-->
      <!--          @current-change="changeCurrentPage"-->
      <!--        >-->
      <!--        </el-pagination>-->
      <!--      </div>-->
    </main>
  </div>
</template>
@@ -297,6 +341,10 @@
      }
    };
    return {
      tempList: [],
      myIdx: 0,
      all: false,
      unsame: false,
      storeCode: null,
      storeStatus: null,
      options: [
@@ -314,6 +362,9 @@
      dialogType: "",
      isShowDialog: false,
      storeInfo: null,
      all: false,
      unsame: false,
      myIdx: null,
      storeInfoScoreView: {},
      role: {
        messageType: "",
@@ -358,6 +409,51 @@
  },
  methods: {
    // 监听表格选中状态
    tableChange(list) {
      this.tempList = list;
      this.all = list.length === this.tableData.length;
    },
    // 批量删除
    mulDelete(idArr) {
      this.$axios({
        method: "delete",
        url: "sccg/illegal_building/batch_delete?ids=" + idArr,
      }).then((res) => {
        this.getUserList();
        this.$message({
          message: res.message,
          type: res.code === 200 ? "success" : "warning",
        });
      });
    },
    // 执行下拉框操作
    selectChange(val) {
      let ids = [];
      this.tempList.forEach((item) => {
        ids.push(item.number);
      });
      if (ids.length !== 0) {
        if (val === 3) {
          this.mulDelete(ids);
        }
      } else {
        this.$message({
          type: "warning",
          message: "您还没选中任何数据",
        });
      }
    },
    // 全选
    selectAll() {
      this.$refs.multipleTable.toggleAllSelection();
    },
    // 反选
    disSame(list) {
      list.forEach((row) => {
        this.$refs.multipleTable.toggleRowSelection(row);
      });
    },
    // 新建/保存消息(1:新建,0保存消息)
    handleSubmit(mystatus) {
      this.role.body = this.$refs.edit.editor.txt.html();
@@ -426,7 +522,6 @@
      getStoreInfoList({ keyword: this.storeCode, status })
        .then(({ list, pageSize, totalPage }) => {
          this.tableData = list;
          console.log(list);
          this.pageSize = pageSize;
          this.totalNum = totalPage;
        })
@@ -623,7 +718,67 @@
    .mainTitle {
      line-height: 60px;
    }
    .tools {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 20px;
      .funs {
        display: flex;
        .funsItem {
          line-height: 28px;
          display: flex;
          align-items: center;
          border: 1px solid #ccc;
          border-radius: 4px;
          font-size: 12px;
          margin-left: 10px;
          .el-checkbox {
            width: 80px;
            padding: 0 10px;
          }
          .el-select {
            width: 120px;
          }
          &::v-deep .el-input__inner {
            border: none;
            // background-color: #09152f;
          }
          &:hover {
            border: 1px solid #4b9bb7;
          }
          &:hover .el-checkbox {
            color: #4b9bb7;
          }
        }
      }
      .pagination {
        margin-top: 50px;
        display: flex;
        line-height: 50px;
        justify-content: center;
        .el-pagination {
          &::v-deep li,
          &::v-deep .btn-prev,
          &::v-deep .btn-next {
            // background-color: #071f39;
            color: #4b9bb7;
          }
          &::v-deep .active {
            background-color: #409eff;
            color: #fff;
          }
        }
      }
    }
    .el-link {
      color: #4b9bb7;
    }