Commit 974a7d1b authored by 李苏's avatar 李苏 💬

The function of adding rules

parent 6e09b2f8
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'> <RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules"> <el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this"> <el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" /> <EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row> </el-row>
</el-form> </el-form>
</RelDialog> </RelDialog>
</template> </template>
<script> <script>
import { import {
editMixin editMixin
} from 'common' } from 'common'
...@@ -19,18 +20,25 @@ ...@@ -19,18 +20,25 @@
editColItemList: [ editColItemList: [
{ {
label: '编码', label: '执行顺序',
prop: 'code', prop: 'zxsx',
span: 12, span: 12,
type: 'input', type: 'inputNumber',
required:true,
}, },
{ {
label: '名称', "label": "规则",
prop: 'name', "prop": "gzid",
span: 12, "span": 12,
type: 'input', "type": "RelSelect",
required:true, "value": "",
"required": true,
"typeConfig": {
"src": "lxyl/ukczzgz/init/gz",
"match": {
"value": "id",
"label": "name"
},
},
}, },
{ {
label: '备注', label: '备注',
......
<template> <template>
<BasePage class="min_full" :config="config" > <BasePage class="min_full" :config="config">
<template #dialog="ctx" > <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template> </template>
<template #toolbar="ctx" > <template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> --> <!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template> </template>
</BasePage> </BasePage>
...@@ -13,57 +13,49 @@ ...@@ -13,57 +13,49 @@
<script> <script>
import Edit from './edit.vue' import Edit from './edit.vue'
export default{ export default {
data(){ data() {
return{ return {
config:{ config: {
/* 基本配置*/ /* 基本配置*/
url:'jcsj/gysfl', url: 'lxyl/ukczzgz',
tableTitle: [ tableTitle: [
{title: "编码", field: "code", fieldType:"upper", width: 140},
{title: "名称", field: "name", width: 140},
{title: "停用", field: "tybz",fieldType:"tybz"},
{title: "停用日期", field: "tyrq", fieldType:"ftDate"},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"},
],
queryParams:[[
{ {
label: '编码', title: "执行顺序",
prop: 'code', field: "zxsx",
span: 6, width: 140
type: 'input',
value:''
}, },
{ {
label: '名称', title: "规则",
prop: 'name', field: "gzid",
span: 6, width: 140,
type: 'input', "transform": {
value:'' "url": "lxyl/ukczzgz/init/gz",
"label": "name",
"value": "id"
} }
},
{
title: "维护人",
field: "whr",
width: 140
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime'
},
{
title: "备注",
field: "bz"
},
],
queryParams: [
],
/* 默认启停用 */
]],
/* 默认启停用 */
showqt:true,
// qtUrl:'',
/* 树的支持*/
// hasTree:false,
// treeTitle:'',
// treeDefaultProps: {
// children: 'children',
// label: 'name',
// fatherId: 'pid',
// sonId: 'id',
// rootName: "全部",
// rootId:'root'
// },
// treeQueryParams:{
// },
// treeUrl:''
} }
} }
}, },
...@@ -73,12 +65,11 @@ ...@@ -73,12 +65,11 @@
// } // }
}, },
components:{ components: {
Edit Edit
} }
} }
</script> </script>
<style> <style>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
label: '执行顺序', label: '执行顺序',
prop: 'zxsx', prop: 'zxsx',
span: 12, span: 12,
type: 'input', type: 'inputNumber',
}, },
{ {
"label": "规则", "label": "规则",
...@@ -33,12 +33,15 @@ ...@@ -33,12 +33,15 @@
"value": "", "value": "",
"required": true, "required": true,
"typeConfig": { "typeConfig": {
"src": "lxyl/zygz/usjgz/init/gz", "src": "lxyl/zygz/usjgz/init/gz",
"match": { "match": {
"value": "id", "value": "id",
"label": "name" "label": "name"
} },
} linkage: true,
linkParams: ['ckid'],
},
}, },
{ {
"label": "仓库", "label": "仓库",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment