chunk-2d22d262.aa1dfe99.js 8.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22d262"],{f5eb:function(a,e,t){"use strict";t.r(e);var l=function(){var a=this,e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"table-page-search-wrapper"},[t("a-form",{attrs:{layout:"inline"}},[t("a-row",{attrs:{gutter:48}},[t("a-col",{attrs:{md:8,sm:24}},[t("a-form-item",{attrs:{label:"规则编号"}},[t("a-input",{attrs:{placeholder:""},model:{value:e.queryParam.id,callback:function(a){e.$set(e.queryParam,"id",a)},expression:"queryParam.id"}})],1)],1),t("a-col",{attrs:{md:8,sm:24}},[t("a-form-item",{attrs:{label:"使用状态"}},[t("a-select",{attrs:{placeholder:"请选择","default-value":"0"},model:{value:e.queryParam.status,callback:function(a){e.$set(e.queryParam,"status",a)},expression:"queryParam.status"}},[t("a-select-option",{attrs:{value:"0"}},[e._v("全部")]),t("a-select-option",{attrs:{value:"1"}},[e._v("关闭")]),t("a-select-option",{attrs:{value:"2"}},[e._v("运行中")])],1)],1)],1),e.advanced?[t("a-col",{attrs:{md:8,sm:24}},[t("a-form-item",{attrs:{label:"调用次数"}},[t("a-input-number",{staticStyle:{width:"100%"},model:{value:e.queryParam.callNo,callback:function(a){e.$set(e.queryParam,"callNo",a)},expression:"queryParam.callNo"}})],1)],1),t("a-col",{attrs:{md:8,sm:24}},[t("a-form-item",{attrs:{label:"更新日期"}},[t("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入更新日期"},model:{value:e.queryParam.date,callback:function(a){e.$set(e.queryParam,"date",a)},expression:"queryParam.date"}})],1)],1),t("a-col",{attrs:{md:8,sm:24}},[t("a-form-item",{attrs:{label:"使用状态"}},[t("a-select",{attrs:{placeholder:"请选择","default-value":"0"},model:{value:e.queryParam.useStatus,callback:function(a){e.$set(e.queryParam,"useStatus",a)},expression:"queryParam.useStatus"}},[t("a-select-option",{attrs:{value:"0"}},[e._v("全部")]),t("a-select-option",{attrs:{value:"1"}},[e._v("关闭")]),t("a-select-option",{attrs:{value:"2"}},[e._v("运行中")])],1)],1)],1),t("a-col",{attrs:{md:8,sm:24}},[t("a-form-item",{attrs:{label:"使用状态"}},[t("a-select",{attrs:{placeholder:"请选择","default-value":"0"}},[t("a-select-option",{attrs:{value:"0"}},[e._v("全部")]),t("a-select-option",{attrs:{value:"1"}},[e._v("关闭")]),t("a-select-option",{attrs:{value:"2"}},[e._v("运行中")])],1)],1)],1)]:e._e(),t("a-col",{attrs:{md:e.advanced?24:8,sm:24}},[t("span",{staticClass:"table-page-search-submitButtons",style:e.advanced&&{float:"right",overflow:"hidden"}||{}},[t("a-button",{attrs:{type:"primary"}},[e._v("查询")]),t("a-button",{staticStyle:{"margin-left":"8px"},on:{click:e.resetSearchForm}},[e._v("重置")]),t("a",{staticStyle:{"margin-left":"8px"},on:{click:e.toggleAdvanced}},[e._v("\n "+e._s(e.advanced?"收起":"展开")+"\n "),t("a-icon",{attrs:{type:e.advanced?"up":"down"}})],1)],1)])],2)],1)],1),t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(){return a.handleModalVisible(!0)}}},[e._v("新建")]),e.selectedRowKeys.length>0?t("a-dropdown",[t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",{key:"1"},[t("a-icon",{attrs:{type:"delete"}}),e._v("删除")],1),t("a-menu-item",{key:"2"},[t("a-icon",{attrs:{type:"lock"}}),e._v("锁定")],1)],1),t("a-button",{staticStyle:{"margin-left":"8px"}},[e._v("\n 批量操作 "),t("a-icon",{attrs:{type:"down"}})],1)],1):e._e()],1),t("s-table",{ref:"table",attrs:{size:"default",columns:e.columns,data:e.loadData,showAlertInfo:!0},on:{onSelect:e.onChange},scopedSlots:e._u([{key:"action",fn:function(a,l){return t("span",{},[t("a",{on:{click:function(a){return e.handleEdit(l)}}},[e._v("编辑")]),t("a-divider",{attrs:{type:"vertical"}}),t("a-dropdown",[t("a",{staticClass:"ant-dropdown-link"},[e._v("\n 更多 "),t("a-icon",{attrs:{type:"down"}})],1),t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",[t("a",{attrs:{href:"javascript:;"}},[e._v("详情")])]),t("a-menu-item",[t("a",{attrs:{href:"javascript:;"}},[e._v("禁用")])]),t("a-menu-item",[t("a",{attrs:{href:"javascript:;"}},[e._v("删除")])])],1)],1)],1)}}])}),t("a-modal",{attrs:{title:"操作",width:800},on:{ok:e.handleOk},model:{value:e.visible,callback:function(a){e.visible=a},expression:"visible"}},[t("a-form",{attrs:{autoFormCreate:function(e){a.form=e}}},[t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"规则编号",hasFeedback:"",validateStatus:"success"}},[t("a-input",{attrs:{placeholder:"规则编号",id:"no"},model:{value:e.mdl.no,callback:function(a){e.$set(e.mdl,"no",a)},expression:"mdl.no"}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"服务调用次数",hasFeedback:"",validateStatus:"success"}},[t("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,id:"callNo"},model:{value:e.mdl.callNo,callback:function(a){e.$set(e.mdl,"callNo",a)},expression:"mdl.callNo"}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"状态",hasFeedback:"",validateStatus:"warning"}},[t("a-select",{attrs:{defaultValue:"1"},model:{value:e.mdl.status,callback:function(a){e.$set(e.mdl,"status",a)},expression:"mdl.status"}},[t("a-select-option",{attrs:{value:"1"}},[e._v("Option 1")]),t("a-select-option",{attrs:{value:"2"}},[e._v("Option 2")]),t("a-select-option",{attrs:{value:"3"}},[e._v("Option 3")])],1)],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"描述",hasFeedback:"",help:"请填写一段描述"}},[t("a-textarea",{attrs:{rows:5,placeholder:"...",id:"description"},model:{value:e.mdl.description,callback:function(a){e.$set(e.mdl,"description",a)},expression:"mdl.description"}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"更新时间",hasFeedback:"",validateStatus:"error"}},[t("a-date-picker",{staticStyle:{width:"100%"},attrs:{showTime:"",format:"YYYY-MM-DD HH:mm:ss",placeholder:"Select Time"}})],1)],1)],1),t("a-modal",{attrs:{title:"新建规则",destroyOnClose:"",visible:e.visibleCreateModal},on:{ok:e.handleCreateModalOk,cancel:e.handleCreateModalCancel}},[t("a-form",{staticStyle:{"margin-top":"8px"},attrs:{autoFormCreate:function(e){a.createForm=e}}},[t("a-form-item",{attrs:{labelCol:{span:5},wrapperCol:{span:15},label:"描述",fieldDecoratorId:"description",fieldDecoratorOptions:{rules:[{required:!0,message:"请输入至少五个字符的规则描述!",min:5}]}}},[t("a-input",{attrs:{placeholder:"请输入"}})],1)],1)],1)],1)},s=[],r=t("e8c4"),o=t("261e"),n=t("27e3"),i=t("c1df"),c=t.n(i),d=t("bc3a"),u=t.n(d),m=t("0fea"),p={name:"TableList",components:{AInput:n["a"],ATextarea:o["a"],STable:r["a"]},data:function(){var a=this;return{visibleCreateModal:!1,visible:!1,labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:12}},form:null,mdl:{},advanced:!0,queryParam:{},columns:[{title:"规则编号",dataIndex:"no"},{title:"描述",dataIndex:"description"},{title:"服务调用次数",dataIndex:"callNo",sorter:!0,needTotal:!0,customRender:function(a){return a+" 次"}},{title:"状态",dataIndex:"status",needTotal:!0},{title:"更新时间",dataIndex:"updatedAt",sorter:!0},{table:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],loadData:function(e){return Object(m["h"])(Object.assign(e,a.queryParam)).then((function(a){return a.result}))},selectedRowKeys:[],selectedRows:[]}},created:function(){Object(m["g"])({t:new Date})},methods:{handleEdit:function(a){this.mdl=Object.assign({},a),this.visible=!0},handleOk:function(){},handleModalVisible:function(a){this.visibleCreateModal=a},handleCreateModalOk:function(){var a=this;this.createForm.validateFields((function(e,t){if(!e){var l=a.createForm.getFieldValue("description");u.a.post("/saveRule",{desc:l}).then((function(e){a.createForm.resetFields(),a.visibleCreateModal=!1,a.loadRuleData()}))}}))},handleCreateModalCancel:function(){this.visibleCreateModal=!1},onChange:function(a){this.selectedRowKeys=a.selectedRowKeys,this.selectedRows=a.selectedRows},toggleAdvanced:function(){this.advanced=!this.advanced},resetSearchForm:function(){this.queryParam={date:c()(new Date)}}},watch:{}},v=p,b=t("2877"),f=Object(b["a"])(v,l,s,!1,null,null,null);e["default"]=f.exports}}]);