+zyV.2ac4e62a.js 8.0 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["+zyV"],{"+zyV":function(e,t,r){"use strict";r.r(t);var a=r("QbLZ"),o=r.n(a),n=r("t3Un");var i={data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,total:0,kouzhaoInfoList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,userId:void 0,numberOrder:void 0,name:void 0,phone:void 0,shejiUrl:void 0,lituUrl:void 0,gmtUpdate:void 0,gmtCreate:void 0},form:{},rules:{userId:[{required:!0,message:"不能为空",trigger:"blur"}],gmtUpdate:[{required:!0,message:"不能为空",trigger:"blur"}],gmtCreate:[{required:!0,message:"不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,function(e){return Object(n.a)({method:"get",params:o()({_gp:"admin.kouzhao.kouzhaoInfo",_mt:"list"},e)})}(this.queryParams).then(function(t){e.kouzhaoInfoList=t.data.data.items,e.total=t.data.data.count,e.loading=!1})},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:void 0,userId:void 0,numberOrder:void 0,name:void 0,phone:void 0,shejiUrl:void 0,lituUrl:void 0,gmtUpdate:void 0,gmtCreate:void 0},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map(function(e){return e.id}),this.single=1!=e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加口罩信息"},handleUpdate:function(e){var t=this;this.reset(),function(e){return Object(n.a)({method:"get",params:{_gp:"admin.kouzhao.kouzhaoInfo",_mt:"get",id:e}})}(e.id||this.ids.join(",")).then(function(e){t.form=e.data.data,t.open=!0,t.title="修改口罩信息"})},submitForm:function(){var e=this;this.$refs.form.validate(function(t){t&&(void 0!=e.form.id?function(e){return Object(n.a)({method:"post",params:{_gp:"admin.kouzhao.kouzhaoInfo",_mt:"update",kouzhaoInfo:e}})}(e.form).then(function(t){t.data?(e.msgSuccess("修改成功"),e.open=!1,e.getList()):e.msgError(t.msg)}):function(e){return Object(n.a)({method:"post",params:{_gp:"admin.kouzhao.kouzhaoInfo",_mt:"add",kouzhaoInfo:e}})}(e.form).then(function(t){t.data?(e.msgSuccess("新增成功"),e.open=!1,e.getList()):e.msgError(t.msg)}))})},handleDelete:function(e){var t=this,r=e.id||this.ids.join(",");this.$confirm('是否确认删除口罩信息编号为"'+r+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return function(e){return Object(n.a)({method:"post",params:{_gp:"admin.kouzhao.kouzhaoInfo",_mt:"delete",id:e}})}(r)}).then(function(){t.getList(),t.msgSuccess("删除成功")}).catch(function(){})},handleExport:function(){var e=this,t=this.queryParams;this.$confirm("是否确认导出所有口罩信息数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return function(e){return Object(n.a)({method:"get",params:o()({_gp:"admin.kouzhao.kouzhaoInfo",_mt:"export"},e)})}(t)}).then(function(t){e.download(t.data.data)}).catch(function(){})}}},l=r("KHd+"),s=Object(l.a)(i,function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[r("el-form-item",{attrs:{label:"编号",prop:"numberOrder"}},[r("el-input",{attrs:{placeholder:"请输入编号",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.numberOrder,callback:function(t){e.$set(e.queryParams,"numberOrder",t)},expression:"queryParams.numberOrder"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),r("el-row",{staticClass:"mb8",attrs:{gutter:10}},[r("el-col",{attrs:{span:1.5}})],1),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.kouzhaoInfoList},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{label:"编号",align:"center",prop:"numberOrder"}}),e._v(" "),r("el-table-column",{attrs:{label:"设计图地址",align:"center",prop:"shejiUrl"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("a",{attrs:{href:t.row.shejiUrl,target:"_blank"}},[e._v("下载设计图")])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"例图地址",align:"center",prop:"lituUrl"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("a",{attrs:{href:t.row.lituUrl,target:"_blank"}},[e._v("下载例图")])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["kouzhao:kouzhaoInfo:remove"],expression:"['kouzhao:kouzhaoInfo:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(r){e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),r("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){e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),e._v(" "),r("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px"},on:{"update:visible":function(t){e.open=t}}},[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"",prop:"userId"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.form.userId,callback:function(t){e.$set(e.form,"userId",t)},expression:"form.userId"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"编号",prop:"numberOrder"}},[r("el-input",{attrs:{placeholder:"请输入编号"},model:{value:e.form.numberOrder,callback:function(t){e.$set(e.form,"numberOrder",t)},expression:"form.numberOrder"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"昵称",prop:"name"}},[r("el-input",{attrs:{placeholder:"请输入昵称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"电话",prop:"phone"}},[r("el-input",{attrs:{placeholder:"请输入电话"},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",t)},expression:"form.phone"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"设计图地址",prop:"shejiUrl"}},[r("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.shejiUrl,callback:function(t){e.$set(e.form,"shejiUrl",t)},expression:"form.shejiUrl"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"例图地址",prop:"lituUrl"}},[r("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.lituUrl,callback:function(t){e.$set(e.form,"lituUrl",t)},expression:"form.lituUrl"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"",prop:"gmtUpdate"}},[r("el-date-picker",{staticStyle:{width:"200px"},attrs:{clearable:"",size:"small",type:"date","value-format":"yyyy-MM-dd",placeholder:"选择"},model:{value:e.form.gmtUpdate,callback:function(t){e.$set(e.form,"gmtUpdate",t)},expression:"form.gmtUpdate"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"",prop:"gmtCreate"}},[r("el-date-picker",{staticStyle:{width:"200px"},attrs:{clearable:"",size:"small",type:"date","value-format":"yyyy-MM-dd",placeholder:"选择"},model:{value:e.form.gmtCreate,callback:function(t){e.$set(e.form,"gmtCreate",t)},expression:"form.gmtCreate"}})],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),e._v(" "),r("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},[],!1,null,null,null);s.options.__file="index.vue";t.default=s.exports}}]);