e36fd0bd by 任超

feat:接收规则管理

1 parent 0c17b529
1 <template>
2 <!-- 编辑 -->
3 <dialogBox title="编辑" @closeDialog="closeDialog" @submitForm="handleSubmit" v-model="myValue">
4 <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
5 <el-row>
6 <el-col :span="6">
7 <el-form-item label="规则编码" prop="gzbm">
8 <el-input v-model="ruleForm.gzbm" placeholder="规则编码"></el-input>
9 </el-form-item>
10 </el-col>
11 <el-col :span="6">
12 <el-form-item label="规则名称" prop="gzmc">
13 <el-input v-model="ruleForm.gzmc" placeholder="规则名称"></el-input>
14 </el-form-item>
15 </el-col>
16 <el-col :span="6">
17 <el-form-item label="是否启用" prop="isqy">
18 <el-radio-group v-model="ruleForm.isqy">
19 <el-radio :label="1"></el-radio>
20 <el-radio :label="2"></el-radio>
21 </el-radio-group>
22 </el-form-item>
23 </el-col>
24 </el-row>
25 </el-form>
26 </dialogBox>
27 </template>
28
29 <script>
30 export default {
31 props: {
32 value: { type: Boolean, default: false },
33 },
34 data () {
35 return {
36 myValue: this.value,
37 ruleForm: {
38 gzbm: '',
39 xzqmc: '',
40 isqy: 1
41 },
42 rules: {
43 gzbm: [
44 { required: true, message: '规则编码', trigger: 'blur' }
45 ],
46 gzmc: [
47 { required: true, message: '规则名称', trigger: 'blur' }
48 ]
49 }
50 }
51 },
52 watch: {
53 value (val) {
54 this.myValue = val
55 }
56 },
57 methods: {
58 closeDialog () {
59 this.$emit('input', false)
60 },
61 handleSubmit () {
62 this.$emit('input', false)
63 }
64 }
65 }
66 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <template> 1 <template>
2 <!-- 接收规则管理 -->
2 <div class="jsgzgl from-clues"> 3 <div class="jsgzgl from-clues">
3 <lb-table ref="table" :heightNum="195" :total="pageData.total" :page-size="pageData.size" 4 <lb-table ref="table" :heightNum="195" :total="pageData.total" :page-size="pageData.size"
4 :current-page.sync="pageData.current" @size-change="handleSizeChange" @p-current-change="handleCurrentChange" 5 :current-page.sync="pageData.current" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
5 :column="tableData.columns" :data="tableData.data"> 6 :column="tableData.columns" :data="tableData.data">
6 </lb-table> 7 </lb-table>
8 <detailDialog v-model="isShow" />
7 </div> 9 </div>
8 </template> 10 </template>
9
10 <script> 11 <script>
12 // 引入表格数据
11 import data from "./data" 13 import data from "./data"
14 // 引入表格混入方法
12 import tableMixin from '@/mixins/tableMixin.js' 15 import tableMixin from '@/mixins/tableMixin.js'
16 import detailDialog from './components/detailDialog'
13 export default { 17 export default {
14 name: "jsgzgl", 18 name: "jsgzgl",
15 mixins: [tableMixin], 19 mixins: [tableMixin],
20 components: {
21 detailDialog
22 },
16 data () { 23 data () {
17 return { 24 return {
25 isShow: false,
26 form: {
27 currentPage: 1
28 },
29 // 列表数据
18 tableData: { 30 tableData: {
31 // 列表头部
19 columns: [{ 32 columns: [{
20 label: '序号', 33 label: '序号',
21 type: 'index', 34 type: 'index',
...@@ -31,8 +44,6 @@ export default { ...@@ -31,8 +44,6 @@ export default {
31 <el-button 44 <el-button
32 type="text" 45 type="text"
33 size="mini" 46 size="mini"
34 icon="el-icon-edit"
35 style="margin-left: 10px"
36 onClick={() => { this.handleEdit(scope.row) }} 47 onClick={() => { this.handleEdit(scope.row) }}
37 > 48 >
38 修改 49 修改
...@@ -42,23 +53,27 @@ export default { ...@@ -42,23 +53,27 @@ export default {
42 } 53 }
43 } 54 }
44 ]), 55 ]),
56 // 列表数据
45 data: [{}] 57 data: [{}]
46 }, 58 },
59 // 分页
47 pageData: { 60 pageData: {
48 total: 0, 61 total: 0,
49 pageSize: 15, 62 pageSize: 15,
50 current: 1, 63 current: 1,
51 }, 64 }
52 } 65 }
53 }, 66 },
54 methods: { 67 methods: {
68 // 重置表单
55 resetForm () { 69 resetForm () {
56 this.$refs.ruleForm.resetFields(); 70 this.$refs.ruleForm.resetFields();
57 }, 71 },
58 async featchData () { 72 async featchData () {
59 }, 73 },
74 // 修改
60 handleEdit (row) { 75 handleEdit (row) {
61 76 this.isShow = true
62 } 77 }
63 } 78 }
64 } 79 }
......