e36fd0bd by 任超

feat:接收规则管理

1 parent 0c17b529
<template>
<!-- 编辑 -->
<dialogBox title="编辑" @closeDialog="closeDialog" @submitForm="handleSubmit" v-model="myValue">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
<el-row>
<el-col :span="6">
<el-form-item label="规则编码" prop="gzbm">
<el-input v-model="ruleForm.gzbm" placeholder="规则编码"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="规则名称" prop="gzmc">
<el-input v-model="ruleForm.gzmc" placeholder="规则名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否启用" prop="isqy">
<el-radio-group v-model="ruleForm.isqy">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
</dialogBox>
</template>
<script>
export default {
props: {
value: { type: Boolean, default: false },
},
data () {
return {
myValue: this.value,
ruleForm: {
gzbm: '',
xzqmc: '',
isqy: 1
},
rules: {
gzbm: [
{ required: true, message: '规则编码', trigger: 'blur' }
],
gzmc: [
{ required: true, message: '规则名称', trigger: 'blur' }
]
}
}
},
watch: {
value (val) {
this.myValue = val
}
},
methods: {
closeDialog () {
this.$emit('input', false)
},
handleSubmit () {
this.$emit('input', false)
}
}
}
</script>
\ No newline at end of file
<template>
<!-- 接收规则管理 -->
<div class="jsgzgl from-clues">
<lb-table ref="table" :heightNum="195" :total="pageData.total" :page-size="pageData.size"
:current-page.sync="pageData.current" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
:column="tableData.columns" :data="tableData.data">
</lb-table>
<detailDialog v-model="isShow" />
</div>
</template>
<script>
// 引入表格数据
import data from "./data"
// 引入表格混入方法
import tableMixin from '@/mixins/tableMixin.js'
import detailDialog from './components/detailDialog'
export default {
name: "jsgzgl",
mixins: [tableMixin],
components: {
detailDialog
},
data () {
return {
isShow: false,
form: {
currentPage: 1
},
// 列表数据
tableData: {
// 列表头部
columns: [{
label: '序号',
type: 'index',
......@@ -31,8 +44,6 @@ export default {
<el-button
type="text"
size="mini"
icon="el-icon-edit"
style="margin-left: 10px"
onClick={() => { this.handleEdit(scope.row) }}
>
修改
......@@ -42,23 +53,27 @@ export default {
}
}
]),
// 列表数据
data: [{}]
},
// 分页
pageData: {
total: 0,
pageSize: 15,
current: 1,
},
}
}
},
methods: {
// 重置表单
resetForm () {
this.$refs.ruleForm.resetFields();
},
async featchData () {
},
// 修改
handleEdit (row) {
this.isShow = true
}
}
}
......