odc.xiaohui
2023-03-18 b4d6e0923d825f3a6cbb12c29b5a522d56362ff8
src/views/operate/disposal/casepool/escalation/index.vue
@@ -1,60 +1,40 @@
<template>
  <div class="userList">
    <header>
      <div class="headerContent">
        <div class="search">
          <span>来源查询:</span>
          <div class="option">
            <el-select
              v-model="mystatus"
              placeholder="违规"
              @change="setMystatus"
            >
              <el-option
                v-for="item in typeList"
                :key="item.label"
                :label="item.name"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
          <div class="findBtn">
            <el-button type="primary" @click="getUserList">查询</el-button>
          </div>
        </div>
        <!-- <div class="addUser">
                    <el-button class="addBtn" type="primary" @click="dialogCreate = true">添加</el-button>
                    <el-dialog :before-close="handleClose" :visible.sync="dialogCreate" title="请选择上报事件类型" width="45%"
                        v-if="dialogCreate">
                        <createUser @getPageProp=setDialog />
                    </el-dialog>
                    <el-dialog :before-close="handleClose" :visible.sync="dialogNewAdd"
                        :title="newAddType === 0 ? '违规事件登记' : '违建事件登记' " width="60%" v-if="dialogNewAdd">
                        <MyIll v-if="newAddType === 1" :mytype=newAddType @changeDialog=changeDialog />
                        <myVio v-else :mytype=newAddType @changeDialog=changeDialog />
                    </el-dialog>
                </div> -->
      </div>
      <MyHeader @getUserList ="getUserList"></MyHeader>
<!--      <div class="headerContent">-->
<!--        <div class="search">-->
<!--          <span>来源查询:</span>-->
<!--          <div class="option">-->
<!--            <el-select-->
<!--              v-model="mystatus"-->
<!--              placeholder="违规"-->
<!--            >-->
<!--              <el-option-->
<!--                v-for="item in resourceOptions"-->
<!--                :key="item.label"-->
<!--                :label="item.label"-->
<!--                :value="item.value"-->
<!--              >-->
<!--              </el-option>-->
<!--            </el-select>-->
<!--          </div>-->
<!--          <div class="findBtn">-->
<!--            <el-button type="primary" @click="getUserList">查询</el-button>-->
<!--          </div>-->
<!--        </div>-->
<!--      </div>-->
    </header>
    <main>
      <div class="mainContent">
        <!-- 导航状态标签 -->
        <!-- <div class="nav">
                    <div @click="changeNavChecked(index)" :class="[item.checked ? 'is-active':'','nav-item']"
                        v-for="(item,index) in tagList" :key="item.name">{{item.name}}</div>
                </div>
                <div class="type-nav">
                    <div @click="changeTypeChecked(index)" v-for="(item,index) in typeList" :key="item.name"
                        :class="[item.checked ? 'is-active':'','type-item']">{{item.name}}</div>
                </div> -->
        <!-- 数据展示 -->
        <el-table
            border
            stripe
          ref="multipleTable"
          :header-cell-style="{
            background: '#06122c',
            'font-size': '12px',
            color: '#4b9bb7',
           'background':'#F5F5F5',
            'font-weight': '650',
            'line-height': '45px',
          }"
@@ -90,24 +70,11 @@
          </el-table-column>
          <el-table-column prop="continueTime" label="持续时间" min-width="10">
          </el-table-column>
          <!--  <el-table-column prop="operation" label="操作" min-width="20">
            <template slot-scope="scope">
              <div class="operation">
                                <span @click="handleFind(scope.row)">上报</span>
                                <span class="line">|</span>
                                <span @click="handleDelete(scope.row)">调度</span>
                                <span class="line">|</span>
                                <span @click="handleDelete(scope.row)">在学习</span>
                                <span class="line">|</span>
                                <span @click="handleDelete(scope.row)">暂不处理</span>
                            </div>
            </template>
          </el-table-column>-->
        </el-table>
        <!-- 详情页展示 -->
        <el-dialog
          :visible.sync="dialogView"
          width="80%"
          width="60%"
          title="基础信息(人工)"
          v-if="dialogView"
          :before-close="handleClose"
@@ -117,7 +84,7 @@
        <!-- tools -->
        <div class="tools">
          <div class="funs">
            <div class="funsItem funs-sp">
            <div class="funsItem funs-sp funs-first">
              <el-checkbox v-model="all" @change="selectAll()"
                >全选</el-checkbox
              >
@@ -127,7 +94,7 @@
                >反选</el-checkbox
              >
            </div>
            <div class="funsItem">
            <!-- <div class="funsItem">
              <el-select
                v-model="myIdx"
                placeholder="批量操作"
@@ -142,7 +109,7 @@
                >
                </el-option>
              </el-select>
            </div>
            </div> -->
          </div>
          <div class="pagination">
            <el-pagination
@@ -163,31 +130,19 @@
  </div>
</template>
<script>
import { CATEGOTY, EVENT_SOURCE } from "@/utils/helper";
// import updateUser from "./updateUser"
import { RESOURCE_OPTIONS, EVENT_SOURCE } from "@/utils/helper";
import MyDetail from "@/components/detail";
// import createUser from "./createUser"
// import MyIll from './createUser/ill'
// import MyVio from './createUser/vio'
import basecase from "@/api/operate/basecase";
import MyHeader from "@/components/seachHeader/index"
export default {
  components: {
    MyDetail,
    MyHeader
  },
  data() {
    return {
      tableData: [
        // {
        //     code:1,
        //     eventSource:1,
        //     category:1,
        //     type:1,
        //     actionCause:'案由1111',
        //     site:'你好',
        //     streetId:1,
        //     alarmTime:'2022-21-20',
        //     continueTime:'8小时',
        // }
      ],
      tableData: [],
      context: "",
      dialogCreate: false,
      dialogView: false,
@@ -262,6 +217,8 @@
      ],
      mystatus: "",
      statusArr: [],
      resource: null,
      resourceOptions: RESOURCE_OPTIONS
    };
  },
  created() {
@@ -278,11 +235,6 @@
    this.getUserList();
  },
  methods: {
    setMystatus(value) {
      this.statusArr[1] = value;
      this.changeTypeChecked(value - 1);
      this.getUserList();
    },
    setDialog({ flag, type }) {
      this.dialogCreate = flag;
      this.dialogNewAdd = true;
@@ -339,11 +291,7 @@
      list.forEach((item) => {
        this.tempList.push(item.code);
      });
      if (list.length === this.tableData.length) {
        this.all = true;
      } else {
        this.all = false;
      }
      this.all = list.length === this.tableData.length;
    },
    // 全选
    selectAll() {
@@ -356,24 +304,49 @@
      });
    },
    // 获取用户列表
    getUserList() {
      const { currentPage, pageSize, context, statusArr } = this;
      this.$axios({
        method: "get",
        url: `sccg/base_case/query?state=${statusArr[0]}&current=${currentPage}&size=${pageSize}&resource=2&type=${statusArr[1]}`,
      }).then((res) => {
        this.totalNum = res.data.total;
        this.tableData = res.data.records;
      });
    getUserList(seachData) {
      // console.log(seachData.seachData.resource)
      let params
      if (seachData){
        params = {
          current: this.currentPage,
          state: this.statusArr[0] ?? null,
          size: this.pageSize,
          resource: seachData.seachData.resource ==undefined ?null:seachData.seachData.resource,
          region:seachData.seachData.region ==undefined?null:seachData.seachData.region,
          type: this.statusArr[1] ?? null,
          code:seachData.seachData.code ==undefined?null:seachData.seachData.code,
          categoryBig:seachData.seachData.categoryBig ==undefined?null:seachData.seachData.categoryBig,
          categorySmall:seachData.seachData.categorySmall ==undefined?null:seachData.seachData.categorySmall,
          site:seachData.seachData.site ==undefined?null:seachData.seachData.site,
          street:seachData.seachData.street ==undefined?null:seachData.seachData.street,
          alarmTime:seachData.seachData.alarmTime ==undefined?null:seachData.seachData.alarmTime,
        };
      }else {
        params = {
          current: this.currentPage,
          state: this.statusArr[0] ?? null,
          size: this.pageSize,
          type: this.statusArr[1] ?? null,
        };
      }
      basecase
          .baseCasePoolList(params)
          .then(({ records, total }) => {
            this.tableData = records;
            this.totalNum = total;
          })
          .catch((err) => this.$message.error(err));
    },
    // 设置表格斑马纹
    tableRowClassName({ row, rowIndex }) {
      if ((rowIndex + 1) % 2 == 0) {
      if ((rowIndex + 1) % 2 === 0) {
        return "warning-row";
      } else {
        return "success-row";
      }
      return "";
    },
    // 查看用户信息(不可修改)
    handleFind(rowData) {
@@ -453,14 +426,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: #09152f;
    background-color: white;
    .headerContent {
      padding: 0 40px;
      padding: 0;
      display: flex;
      line-height: 100px;
      justify-content: space-between;
@@ -504,7 +477,7 @@
        .el-button {
          padding: 12px 25px;
          border-radius: 20px;
          //border-radius: 20px;
        }
      }
@@ -518,12 +491,12 @@
  }
  &::v-deep .el-input__inner {
    background-color: #09152f;
    border: 1px solid #17324c;
    // background-color: #09152f;
    //border: 1px solid #17324c;
  }
  main {
    background-color: #09152f;
    // background-color: #09152f;
    margin-top: 20px;
    padding-bottom: 50px;
@@ -547,8 +520,9 @@
      }
      .is-active {
        background-color: #070f22;
        color: #fff;
        // background-color: #070f22;
        color: #333;
        font-size: 500;
      }
    }
@@ -568,9 +542,10 @@
      }
      .is-active {
        background-color: #070f22;
        // background-color: #070f22;
        border-radius: 4px;
        color: #fff;
          color: #333;
        font-size: 500;
      }
    }
@@ -578,12 +553,15 @@
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 20px;
      //padding: 0 20px;
      .funs {
        display: flex;
        .funs-first{
          margin-left: 0!important;
        }
        .funs-sp {
          border: 1px solid #17324c;
          border: 1px solid #DCDFE6;
        }
        .funsItem {
          line-height: 28px;
@@ -604,7 +582,7 @@
          &::v-deep .el-input__inner {
            border: none;
            background-color: #09152f;
            // background-color: #09152f;
          }
          &:hover {
@@ -627,7 +605,7 @@
          &::v-deep li,
          &::v-deep .btn-prev,
          &::v-deep .btn-next {
            background-color: #071f39;
            // background-color: #071f39;
            color: #4b9bb7;
          }
@@ -640,9 +618,9 @@
    }
    .el-table {
      color: #4b9bb7;
      font-size: 10px;
      margin-top: 10px;
      // color: #4b9bb7;
      // font-size: 10px;
      // margin-top: 10px;
      &::v-deep .cell {
        text-overflow: ellipsis;
@@ -651,7 +629,7 @@
      }
      &::v-deep .el-table__empty-block {
        background-color: #09152f;
        // background-color: #09152f;
      }
      &::v-deep .el-table__empty-block {
@@ -660,7 +638,7 @@
      .operation {
        display: flex;
        color: var(--operation-color);
        .line {
          padding: 0 5px;
        }
@@ -672,17 +650,17 @@
    }
    .el-table::v-deep .warning-row {
      background: #06122c;
      // background: #06122c;
    }
    .el-table::v-deep .success-row {
      background: #071f39;
      // background: #071f39;
    }
  }
  &::v-deep .el-dialog__header,
  &::v-deep .el-dialog__body {
    background-color: #06122c;
    // background-color: #06122c;
  }
  &::v-deep .el-dialog__header {
@@ -707,4 +685,4 @@
    padding: 0;
  }
}
</style>
</style>