chunk-1443f320.199d3f65.js 6.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1443f320"],{"0270":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"e",(function(){return i})),n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return l}));var o=n("b775");function r(e){return Object(o["a"])({url:"/sis/group",method:"post",data:e})}function a(e){return Object(o["a"])({url:"/sis/group/"+e,method:"delete"})}function i(e){return Object(o["a"])({url:"/sis/group",method:"put",data:e})}function s(e){return Object(o["a"])({url:"/sis/group/selectSisDeviceGroupListPage",method:"get",params:e})}function l(){return Object(o["a"])({url:"/sis/group/selectSisDeviceGroupList",method:"get"})}},"17fd":function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-container"},[n("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0}},[n("el-form-item",{attrs:{label:"分组名称",prop:"groupName"}},[n("el-input",{attrs:{placeholder:"请输入分组名称",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.groupName,callback:function(t){e.$set(e.queryParams,"groupName",t)},expression:"queryParams.groupName"}})],1),n("el-form-item",[n("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),n("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),n("el-row",{staticClass:"mb8",attrs:{gutter:10}},[n("el-col",{attrs:{span:1.5}},[n("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增 ")])],1),n("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),e.refreshTable?n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.groupList,width:"120"}},[n("el-table-column",{attrs:{label:"序号",align:"center",type:"index",width:"50px"}}),n("el-table-column",{attrs:{label:"分组名称",align:"center",prop:"groupName"}}),n("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(n){return e.handleUpdate(t.row)}}},[e._v("编辑 ")]),n("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(n){return e.handleDelete(t.row)}}},[e._v("删除 ")])]}}],null,!1,2696285274)})],1):e._e(),n("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),n("el-dialog",{attrs:{title:e.title,visible:e.open,width:"600px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[n("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[n("el-form-item",{attrs:{label:"分组名称",prop:"groupName"}},[n("el-input",{attrs:{placeholder:"请输入",maxlength:"50"},model:{value:e.form.groupName,callback:function(t){e.$set(e.form,"groupName",t)},expression:"form.groupName"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),n("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},r=[],a=(n("4de4"),n("e9c4"),n("b64b"),n("d3b7"),n("0270")),i={name:"cameraEquipmentMGT",dicts:["sys_normal_disable","sys_yes_no"],data:function(){return{loading:!0,showSearch:!0,groupList:[],total:0,title:"",open:!1,refreshTable:!0,queryParams:{pageNum:1,pageSize:10,id:void 0,groupName:void 0},form:{},rules:{groupName:[{required:!0,message:"分组名称不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,Object(a["d"])(this.queryParams).then((function(t){e.groupList=t.rows.filter((function(e){return"未分组"!==e.groupName})),e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={deptId:void 0,parentId:void 0,deptName:void 0,orderNum:void 0,leader:void 0,phone:void 0,email:void 0,status:"0"},this.resetForm("form")},handleQuery:function(){this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleAdd:function(){this.reset(),this.open=!0,this.title="添加分组"},handleUpdate:function(e){this.reset(),this.form=JSON.parse(JSON.stringify(e)),this.open=!0,this.title="修改分组"},handleStatusChange:function(e){var t=this,n="0"===e.status?"启用":"停用";this.$modal.confirm('确认要"'+n+'"吗?').then((function(){return Object(a["e"])({id:e.id,status:e.status})})).then((function(){t.$modal.msgSuccess(n+"成功")})).catch((function(){e.status="0"===e.status?"1":"0"}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(e.$modal.loading("正在加载,请稍候!"),void 0!=e.form.id?Object(a["e"])(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.$modal.closeLoading(),e.getList()})).catch((function(){e.$modal.msgError("修改失败"),e.$modal.closeLoading()})):Object(a["a"])(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.$modal.closeLoading(),e.getList()})).catch((function(){e.$modal.msgError("新增失败"),e.$modal.closeLoading()})))}))},handleDelete:function(e){var t=this;this.$modal.confirm('是否确认删除名称为"'+e.groupName+'"的数据项?').then((function(){return Object(a["c"])(e.id)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))}}},s=i,l=n("2877"),u=Object(l["a"])(s,o,r,!1,null,null,null);t["default"]=u.exports}}]);