Blame view

src/views/jrqygl/index.vue 3.56 KB
任超 committed
1
<template>
任超 committed
2 3 4
  <!-- 接入区域管理 -->
  <div class="from-clues">
    <!-- 头部搜索 -->
任超 committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    <div class="from-clues-header">
      <el-form ref="ruleForm" :model="form" label-width="100px">
        <el-row>
          <el-col :span="6">
            <el-form-item label="负责人" label-width="60px" prop="fzr">
              <el-input v-model="form.fzr" placeholder="负责人"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="接入点名称" prop="jrdmc">
              <el-select v-model="form.jrdmc" 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>
任超 committed
21
          <!-- 操作按钮 -->
任超 committed
22 23
          <el-col :span="12" class="btnColRight">
            <el-form-item>
任超 committed
24
              <el-button type="primary">删除</el-button>
任超 committed
25
              <el-button @click="resetForm('ruleForm')">重置</el-button>
任超 committed
26
              <el-button type="primary">新增</el-button>
任超 committed
27 28 29 30 31 32
              <el-button type="primary" @click="handleSubmit">查询结果</el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
任超 committed
33
    <!-- 列表数据 -->
任超 committed
34 35 36 37 38 39
    <div class="from-clues-content">
      <lb-table ref="table" @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>
任超 committed
40 41
    <!-- 修改弹框 -->
    <detailDialog v-model="isShow" />
任超 committed
42 43 44
  </div>
</template>
<script>
任超 committed
45 46
// 接入区域管理
// 引入table数据
任超 committed
47
import data from "./data"
任超 committed
48
// 引入混入方法
任超 committed
49
import tableMixin from '@/mixins/tableMixin.js'
任超 committed
50 51
// 引入修改弹框
import detailDialog from './components/detailDialog'
任超 committed
52
export default {
任超 committed
53
  name: "jrqygl",
任超 committed
54
  mixins: [tableMixin],
任超 committed
55 56 57 58
  // 注册组件
  components: {
    detailDialog
  },
任超 committed
59 60
  data () {
    return {
任超 committed
61 62
      isShow: false,
      // 搜索表单
任超 committed
63 64 65 66 67
      form: {
        fzr: '',
        jrdmc: '',
        currentPage: 1
      },
任超 committed
68
      // 表单校验
任超 committed
69 70 71 72 73 74 75 76
      rules: {
        fzr: [
          { required: true, message: '负责人', trigger: 'change' }
        ],
        jrdmc: [
          { required: true, message: '接入点名称', trigger: 'change' }
        ]
      },
任超 committed
77
      // 列表数据
任超 committed
78
      tableData: {
任超 committed
79
        // 列表头部
任超 committed
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
        columns: data.columns().concat([
          {
            label: "操作",
            width: '80',
            render: (h, scope) => {
              return (
                <div>
                  <el-button
                    type="text"
                    size="mini"
                    onClick={() => { this.handleEdit(scope.row) }}
                  >
                    修改
                  </el-button>
                </div>
              )
            }
          }
        ]),
任超 committed
99
        // 列表数据
任超 committed
100 101
        data: [{}]
      },
任超 committed
102
      // 分页
任超 committed
103 104 105
      pageData: {
        total: 0,
        pageSize: 15,
任超 committed
106
      }
任超 committed
107 108 109
    }
  },
  methods: {
任超 committed
110
    // 多选
任超 committed
111 112
    handleSelectionChange (val) {
    },
任超 committed
113
    // 重置表单
任超 committed
114 115 116
    resetForm () {
      this.$refs.ruleForm.resetFields();
    },
任超 committed
117
    // 初始化数据
任超 committed
118 119
    async featchData () {
    },
任超 committed
120
    // 修改
任超 committed
121
    handleEdit (row) {
任超 committed
122
      this.isShow = true
任超 committed
123 124 125 126 127 128 129 130 131
    }
  }
}
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
@import "./index.scss";
</style>