You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
5.4 KiB
1 lines
5.4 KiB
webpackJsonp([58],{TqxL:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("Xxa5"),n=a.n(r),i=a("exGp"),s=a.n(i),o=a("PJh5"),l=a.n(o),c={data:function(){return{loading:!1,searchForm:{page:1,limit:10,title:""},tableData:[],total:0,count:{}}},activated:function(){this.getTableDataList(1)},methods:{resetForm:function(t){this.$refs[t].resetFields(),this.getTableDataList(1)},handleSizeChange:function(t){this.searchForm.limit=t,this.handleCurrentChange(1)},handleCurrentChange:function(t){this.searchForm.page=t,this.getTableDataList()},toChange:function(t){var e=this;return s()(n.a.mark(function a(){return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:e.searchForm.status=t,e.getTableDataList(1);case 2:case"end":return a.stop()}},a,e)}))()},getTableDataList:function(t){var e=this;return s()(n.a.mark(function a(){var r,i,s;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t&&(e.searchForm.page=1),e.tableData=[],e.loading=!0,a.next=5,e.$api.store.storeList(e.searchForm);case 5:if(r=a.sent,i=r.code,s=r.data,e.loading=!1,200===i){a.next=11;break}return a.abrupt("return");case 11:e.tableData=s.data,e.total=s.total;case 13:case"end":return a.stop()}},a,e)}))()},confirmDel:function(t){var e=this;this.$confirm(this.$t("tips.confirmDelete"),this.$t("tips.reminder"),{confirmButtonText:this.$t("action.comfirm"),cancelButtonText:this.$t("action.cancel"),type:"warning"}).then(function(){e.updateItem(t,-1)}).catch(function(){})},updateItem:function(t,e){var a=this;return s()(n.a.mark(function r(){return n.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:a.$api.store.storeUpdate({id:t,status:e}).then(function(t){if(200===t.code)a.$message.success(a.$t(-1===e?"tips.successDel":"tips.successOper")),-1===e&&(a.searchForm.page=a.searchForm.page<Math.ceil((a.total-1)/a.searchForm.limit)?a.searchForm.page:Math.ceil((a.total-1)/a.searchForm.limit),a.getTableDataList());else{if(-1===e)return;a.getTableDataList()}});case 1:case"end":return r.stop()}},r,a)}))()}},filters:{handleTime:function(t,e){return 1===e?l()(1e3*t).format("YYYY-MM-DD"):2===e?l()(1e3*t).format("HH:mm:ss"):l()(1e3*t).format("YYYY-MM-DD HH:mm:ss")}}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"lb-store-manage"},[a("top-nav"),t._v(" "),a("div",{staticClass:"page-main"},[a("el-row",{staticClass:"page-search-form"},[a("el-form",{ref:"searchForm",attrs:{inline:!0,model:t.searchForm},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"输入查询",prop:"title"}},[a("el-input",{attrs:{placeholder:"请输入门店名称"},model:{value:t.searchForm.title,callback:function(e){t.$set(t.searchForm,"title",e)},expression:"searchForm.title"}})],1),t._v(" "),a("el-form-item",[a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",type:"primary",icon:"el-icon-search"},on:{click:function(e){return t.getTableDataList(1)}}},[t._v(t._s(t.$t("action.search")))]),t._v(" "),a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",icon:"el-icon-refresh-left"},on:{click:function(e){return t.resetForm("searchForm")}}},[t._v(t._s(t.$t("action.reset")))])],1)],1)],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,"header-cell-style":{background:"#f5f7fa",color:"#606266"}}},[a("el-table-column",{attrs:{prop:"id",label:"ID"}}),t._v(" "),a("el-table-column",{attrs:{prop:"cover",label:"门店头像","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("lb-image",{attrs:{src:t.row.cover}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"title",label:"门店名称","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"attestation",label:"门店认证名称","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"address",label:"门店地址","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"status",label:"是否上架"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{disabled:!t.$route.meta.pagePermission[0].auth.includes("edit"),"active-value":1,"inactive-value":0},on:{change:function(a){return t.updateItem(e.row.id,e.row.status)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("p",[t._v(t._s(t._f("handleTime")(e.row.create_time,1)))]),t._v(" "),a("p",[t._v(t._s(t._f("handleTime")(e.row.create_time,2)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"table-operate"},[a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:t.$route.name+"-edit",expression:"`${$route.name}-edit`"}],attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(a){return t.$router.push("/store/list/edit?id="+e.row.id)}}},[t._v(t._s(t.$t("action.edit")))])],1)]}}])})],1),t._v(" "),a("lb-page",{attrs:{batch:!1,page:t.searchForm.page,pageSize:t.searchForm.limit,total:t.total},on:{handleSizeChange:t.handleSizeChange,handleCurrentChange:t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var m=a("VU/8")(c,u,!1,function(t){a("hv9T")},"data-v-662ac2bc",null);e.default=m.exports},hv9T:function(t,e){}}); |