Commit c9591a4d by 彭祥礼

宽带产品增加正则验证选择

parent cdfbd68b
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="12">
<a-form-item label="正则名称"> <a-form-item label="正则名称">
<a-input placeholder="正则名称" v-model="queryParam.name" ></a-input> <a-input placeholder="正则名称" v-model="queryParam.regularName" ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;"> <span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
...@@ -39,10 +39,10 @@ ...@@ -39,10 +39,10 @@
<span> <span>
<a @click="modifyfunction(record)">编辑</a> <a @click="modifyfunction(record)">编辑</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a-popconfirm title="确定不显示吗" v-if="record.isShow == 1" @confirm="remove(record.id,0)"> <a-popconfirm title="确定不显示吗" v-if="record.isShow == 1" @confirm="remove(record.regularId,0)">
<a>隐藏</a> <a>隐藏</a>
</a-popconfirm> </a-popconfirm>
<a-popconfirm title="确定显示吗" v-if="record.isShow == 0" @confirm="remove(record.id,1)"> <a-popconfirm title="确定显示吗" v-if="record.isShow == 0" @confirm="remove(record.regularId,1)">
<a>显示</a> <a>显示</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
...@@ -51,11 +51,11 @@ ...@@ -51,11 +51,11 @@
<!----弹框--> <!----弹框-->
<a-modal :title="add ?'添加正则配置': '编辑正则配置'" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="1024px"> <a-modal :title="add ?'添加正则配置': '编辑正则配置'" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="1024px">
<a-form :form="Formtable"> <a-form :form="Formtable">
<a-form-item v-show="false" :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="id:"> <a-form-item v-show="false" :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="">
<a-input placeholder="id" v-decorator="[ 'id', {rules: [{ required: true, message: 'id' ,validator: 'click'}]} ]"></a-input> <a-input placeholder="regularId" v-decorator="[ 'regularId', {rules: [{ required: true, message: 'regularId' ,validator: 'click'}]} ]"></a-input>
</a-form-item> </a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="正则名称:"> <a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="正则名称:">
<a-input placeholder="正则名称" v-decorator="[ 'name', {rules: [{ required: true, message: '学校名称不能为空!' ,validator: 'click'}]} ]"></a-input> <a-input placeholder="正则名称" v-decorator="[ 'regularName', {rules: [{ required: true, message: '学校名称不能为空!' ,validator: 'click'}]} ]"></a-input>
</a-form-item> </a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="正则表达示:"> <a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="正则表达示:">
<a-input placeholder="正则表达示" v-decorator="[ 'regular', {rules: [{ required: true, message: '表达示不能为空!' ,validator: 'click'}]} ]"></a-input> <a-input placeholder="正则表达示" v-decorator="[ 'regular', {rules: [{ required: true, message: '表达示不能为空!' ,validator: 'click'}]} ]"></a-input>
...@@ -66,6 +66,12 @@ ...@@ -66,6 +66,12 @@
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="输入框默认值:"> <a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="输入框默认值:">
<a-input placeholder="输入框默认值" v-decorator="[ 'placeholder', {rules: [{ required: true, message: '外线方式不能为空!' ,validator: 'click'}]} ]"></a-input> <a-input placeholder="输入框默认值" v-decorator="[ 'placeholder', {rules: [{ required: true, message: '外线方式不能为空!' ,validator: 'click'}]} ]"></a-input>
</a-form-item> </a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="是否显示:">
<a-select v-decorator="[ 'isShow' ]" style="width: 330px">
<a-select-option key="1"></a-select-option>
<a-select-option key="0"></a-select-option>
</a-select>
</a-form-item>
</a-form> </a-form>
</a-modal> </a-modal>
</div> </div>
...@@ -87,32 +93,31 @@ ...@@ -87,32 +93,31 @@
modifyvisible: false, modifyvisible: false,
add: true, add: true,
queryParam: { queryParam: {
name :'', //学校 regularName :'',
}, },
modelData:{ modelData:{
id: '', regularId: '',
name:'', regularName:'',
regular:'', regular:'',
tips:'', tips:'',
placeholder:'', placeholder:'',
isShow:'' isShow: '1'
}, },
columns: [ columns: [
{dataIndex: 'id', width: 20, title: 'id',istrue: true}, {dataIndex: 'regularId', width: 20, title: 'regularId',istrue: true},
{dataIndex: 'name', width: 100, title: '正则名称'}, {dataIndex: 'regularName', width: 70, title: '正则名称'},
{dataIndex: 'regular', width: 100, title: '正则表达示 '}, {dataIndex: 'regular', width: 100, title: '正则表达示 '},
{dataIndex: 'tips', width: 100, title: '错误提示'}, {dataIndex: 'tips', width: 70, title: '错误提示'},
{dataIndex: 'placeholder', width: 100, title: '输入框默认提示 '}, {dataIndex: 'placeholder', width: 70, title: '输入框默认提示 '},
{ {
dataIndex: 'operation', dataIndex: 'operation',
width: 40, width: 26,
title: '操作', title: '操作',
scopedSlots: {customRender: 'operation'}, scopedSlots: {customRender: 'operation'},
fixed: "right" fixed: "right"
}] }]
, ,
rowdata: parameter => { rowdata: parameter => {
let params = { let params = {
pageNo: parameter.pageNo, pageNo: parameter.pageNo,
pageSize: parameter.pageSize pageSize: parameter.pageSize
...@@ -147,8 +152,8 @@ ...@@ -147,8 +152,8 @@
search() { search() {
this.$refs.table.refresh({search: true}) this.$refs.table.refresh({search: true})
}, },
remove(id,isShow) { remove(regularId,isShow) {
regularDelete({'id':id,'isShow':isShow}).then((res) => { regularDelete({'regularId':regularId,'isShow':isShow}).then((res) => {
if(res.state=="success"){ if(res.state=="success"){
this.$notification.success({message: res.data, description: '', duration: 4}) this.$notification.success({message: res.data, description: '', duration: 4})
} }
...@@ -157,11 +162,11 @@ ...@@ -157,11 +162,11 @@
}, },
modifyfunction(data){ modifyfunction(data){
if(data != undefined ){ if(data != undefined ){
this.modelData.regularId=data.regularId
setTimeout(()=>{ setTimeout(()=>{
this.modelData.id=data.uid
this.Formtable.setFieldsValue({ this.Formtable.setFieldsValue({
"id":data.id, "regularId":data.regularId,
"name":data.name, "regularName":data.regularName,
"regular":data.regular, "regular":data.regular,
"tips":data.tips, "tips":data.tips,
"placeholder":data.placeholder, "placeholder":data.placeholder,
...@@ -174,11 +179,11 @@ ...@@ -174,11 +179,11 @@
}, },
createfunctionOk(){ createfunctionOk(){
let that = this; let that = this;
that.Formtable.validateFields(['name','regular','tips','placeholder','isShow'], {force: true}, (err, values) => { that.Formtable.validateFields(['regularName','regular','tips','placeholder','isShow'], {force: true}, (err, values) => {
if (err ) { if (err ) {
return; return;
} }
that.modelData.name=values.name that.modelData.regularName=values.regularName
that.modelData.regular=values.regular that.modelData.regular=values.regular
that.modelData.tips=values.tips that.modelData.tips=values.tips
that.modelData.placeholder=values.placeholder that.modelData.placeholder=values.placeholder
...@@ -217,9 +222,9 @@ ...@@ -217,9 +222,9 @@
//清除弹窗信息 //清除弹窗信息
clearmodel() { clearmodel() {
this.add=true this.add=true
this.modelData.id='' this.modelData.regularId=''
this.Formtable.setFieldsValue({ this.Formtable.setFieldsValue({
"name":'', "regularName":'',
"regular":'', "regular":'',
"tips":'', "tips":'',
"placeholder":'', "placeholder":'',
......
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