Blame view

src/views/system/qtjfjmb/qtjfjmb.vue 2.56 KB
任超 committed
1 2 3 4 5
<template>
  <div class="from-clues">
    <!-- 表单部分 -->
    <div class="from-clues-header">
      <el-form :model="queryForm" ref="queryForm">
任超 committed
6
        <el-row :gutter="20">
任超 committed
7 8
          <el-col :span="6">
            <el-form-item label="权利类型">
任超 committed
9
              <el-select v-model="queryForm.qllx" class="width100" filterable clearable placeholder="请选择权利类型">
10
                <el-option v-for="item in dictData['A8']" :key="item.dcode" :label="item.dname" :value="item.dcode">
任超 committed
11 12 13 14 15 16
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="18" class="btnCol">
            <el-form-item>
任超 committed
17
              <el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
任超 committed
18 19 20 21 22 23 24 25
              <el-button @click="moreQueryClick()">高级查询</el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 表格 -->
    <div class="from-clues-content">
任超 committed
26 27 28
      <lb-table :page-size="pageData.size" :current-page.sync="pageData.current" :total="tableData.total"
        @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
        :data="tableData.data">
任超 committed
29 30
      </lb-table>
    </div>
任超 committed
31
    <editDialog v-model="isDialog" :details="details" />
任超 committed
32 33 34
  </div>
</template>
<script>
35
import { mapGetters } from 'vuex'
任超 committed
36
import { sysSqywmbszSearch, getSysSqywmbszDetailById } from '@/api/system'
任超 committed
37 38
import table from "@/utils/mixin/table"
import { datas, sendThis } from "./qtjfjmb"
任超 committed
39
import editDialog from "./components/editDialog.vue"
任超 committed
40 41 42
export default {
  name: "djbcx",
  components: {
任超 committed
43
    editDialog
任超 committed
44 45 46 47 48
  },
  mixins: [table],
  mounted () {
    sendThis(this);
  },
49 50 51
  computed: {
    ...mapGetters(['dictData'])
  },
任超 committed
52 53 54 55 56 57 58 59 60
  data () {
    return {
      isDialog: false,
      queryForm: {
        qllx: ""
      },
      tableData: {
        total: 0,
        columns: datas.columns(),
任超 committed
61 62 63
        data: []
      },
      details: {}
任超 committed
64 65 66 67 68
    }
  },
  methods: {
    // 初始化数据
    fetchData () {
任超 committed
69 70 71
      sysSqywmbszSearch({ ...this.pageData, ...this.queryForm }).then(res => {
        this.loading = false
        let { records, total } = res.result
任超 committed
72 73
        this.tableData.data = records ? records : []
        this.tableData.total = total ? total : 0
任超 committed
74
      })
任超 committed
75
    },
任超 committed
76 77 78
    editClick (row) {
      getSysSqywmbszDetailById(row.bsmMb).then(res => {
        this.isDialog = true
任超 committed
79 80
        let { result } = res
        this.details = result ? result : {}
任超 committed
81
      })
任超 committed
82 83 84 85 86 87 88
    }
  },
};
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
</style>