index.vue 6.39 KB
<template>
  <!-- 上报报文查询 -->
  <div class="from-clues">
    <!-- 头部搜索 -->
    <div class="from-clues-header">
      <el-form ref="ruleForm" :model="form" label-width="100px">
        <el-row class="marginbtm5">
          <el-col :span="6">
            <el-form-item label="不动产单元号" prop="bdcdyh">
              <el-input v-model="form.bdcdyh" class="width100" placeholder="不动产单元号"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="开始日期" prop="startTime">
              <el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
                clearable v-model="form.startTime" value-format="yyyy-MM-dd"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="结束日期" prop="endTime">
              <el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd"
                clearable v-model="form.endTime" value-format="yyyy-MM-dd"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="业务名称" prop="ywmc">
              <el-select v-model="form.ywmc" class="width100" clearable placeholder="业务名称">
                <el-option v-for="item in []" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <el-form-item label="响应结果" prop="status">
              <el-select v-model="form.status" class="width100" clearable placeholder="响应结果">
                <el-option v-for="item in []" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="行政区" prop="pcode">
              <el-select v-model="form.pcode" class="width100" clearable placeholder="行政区">
                <el-option v-for="item in xzqOptions" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <!-- 操作按钮 -->
          <el-col :span="12" class="btnColRight">
            <el-button @click="resetForm('ruleForm')">重置</el-button>
            <el-button type="primary" @click="featchData">查询结果</el-button>
            <el-button type="primary" @click="handleEscalation">上报</el-button>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 列表 -->
    <div class="from-clues-content">
      <lb-table ref="table" :heightNum="300" @selection-change="handleSelectionChange" :page-size="pageData.size"
        :current-page.sync="pageData.current" :total="pageData.total" @size-change="handleSizeChange"
        @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data">
      </lb-table>
    </div>
    <!-- 引入详情组件 -->
    <!-- <detailDialog v-model="isShow" /> -->
    <!-- 编辑 -->
    <dataDetails ref="editLog" :bsmSjsb="bsmSjsb" :diaData="diaData" />
  </div>
</template>
<script>
// 上报报文查询
// 引入表头数据
import data from "./data"
// 引入表格混入方法
import tableMixin from '@/mixins/tableMixin.js'
// 引入详情弹框
import dataDetails from '@/components/dataDetails/edit-dialog'
import sbbwcx from "@/api/sbbwcx.js";
import { getQlxxDictList, getChildDictList, refreshDictCache } from "@/api/user.js"

export default {
  name: "sbbwcx",
  mixins: [tableMixin],
  // 注册组件
  components: {
    dataDetails
  },
  data () {
    return {
      bsmSjsb: '',
      diaData: {},
      isShow: false,
      // 开始结束日期限制
      pickerOptionsStart: {
        disabledDate: (time) => {
          if (this.form.endTime) {
            return (
              time.getTime() >= new Date(this.form.endTime).getTime()
            );
          }
        }
      },
      // 结束日期限制
      pickerOptionsEnd: {
        disabledDate: (time) => {
          if (this.form.startTime) {
            return (
              time.getTime() <= new Date(this.form.startTime).getTime()
            );
          }
        }
      },
      // 头部搜索
      form: {
        bdcdyh: '',
        startTime: '',
        endTime: '',
        ywmc: '',
        status: '',
        pcode: '',
        currentPage: 1
      },
      // table数据
      tableData: {
        // 表头数据
        columns: data.columns().concat([
          {
            label: "操作",
            width: '80',
            render: (h, scope) => {
              return (
                <div>
                  <el-button
                    type="text"
                    size="mini"
                    onClick={() => { this.handleDetail(scope.row) }}
                  >
                    详情
                  </el-button>
                </div>
              )
            }
          }
        ]),
        total: 0,
        data: [],
      },
      // 分页
      pageData: {
        total: 0,
        pageSize: 15,
        current: 1,
      },
      // 行政区
      xzqOptions: [
        {
          value: '632321',
          label: '同仁县'
        },
        {
          value: '632322',
          label: '尖扎县'
        },
        {
          value: '632323',
          label: '泽库县'
        },
        {
          value: '632324',
          label: '河南县'
        }
      ]
    }
  },
  methods: {
    // 重置表单
    resetForm () {
      this.$refs.ruleForm.resetFields();
    },
    // 初始化数据
    featchData () {
      sbbwcx.getDataReportPage({ ...this.form, ...this.pageData }).then(res => {
        if (res.code === 200) {
          let { total, records } = res.result
          this.tableData.total = total;
          this.tableData.data = records ? records : []
        }
      })
    },
    // 多选
    handleSelectionChange (val) {

    },
    // 上报
    handleEscalation () { },
    // 详情
    handleDetail (row) {
      // this.isShow = true
      this.$refs.editLog.isShow()
    }
  }
}
</script>
<style scoped lang="scss">
// 引入页面公共样式
@import "~@/styles/public.scss";
@import "./index.scss";
</style>