1 line
3.1 KiB
JavaScript
1 line
3.1 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bc868e74"],{49559:function(e,t,i){"use strict";i("b8d7")},"6ecb":function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"retrieval"},[i("van-nav-bar",{attrs:{fixed:"","left-arrow":"","left-text":"返回",title:"全文检索"},on:{"click-left":function(t){return e.$router.go(-1)}}}),i("van-search",{attrs:{placeholder:"请输入搜索关键词"},on:{input:e.handleSearch},model:{value:e.searchCode,callback:function(t){e.searchCode=t},expression:"searchCode"}}),e.loading?i("van-loading",{attrs:{size:"24px",vertical:""}},[e._v("加载中...")]):i("div",{staticClass:"list"},e._l(e.list,(function(t){return i("div",{key:t.label},[i("van-row",{staticClass:"page-title"},[i("van-col",[e._v(" "+e._s(t.label)+" ")])],1),i("div",{staticClass:"list"},[t.options.length<1?i("div",{staticClass:"no-data"},[e._v("暂无"+e._s(t.label)+"数据")]):e._e(),e._l(t.options,(function(n){return i("div",{key:n.id,staticClass:"one"},[i("van-cell",{attrs:{title:n.title,center:"","is-link":""},on:{click:function(i){return e.goToDetails(t,n)}}})],1)}))],2)],1)})),0)],1)},a=[],l=(i("d81d"),i("99af"),i("ac1f"),i("5319"),i("4de4"),i("d3b7"),i("b775"));function c(e){return Object(l["a"])({url:"/admin/fullRetrieval",method:"get",params:e})}var o={name:"Retrieval",data:function(){return{searchCode:"",loading:!1,list:this.$getSession("fullRetrievalList")||[],regex:/(<([^>]+)>)/gi}},methods:{goToDetails:function(e,t){if("博客文章"===e.label)this.$router.push("/articleDetails?articleId="+t.id);else if("待办事项"===e.label)this.$router.push("/addToDo?toDoId="+t.id);else if("生活账本"===e.label){if(t.typeObject&&"3"===t.typeObject.typeDifference)return void this.$toast("抱歉,余额变更不可编辑");this.$router.push("/addRecord?recordId="+t.id)}else"日记"===e.label?this.$router.push("/addDairy?id="+t.id):"笔记"===e.label&&this.$router.push("/noteDetails?id="+t.id)},billType:function(e){return e.typeObject&&"0"===e.typeObject.typeDifference?"收入":e.typeObject&&"1"===e.typeObject.typeDifference?"支出":e.typeObject&&"2"===e.typeObject.typeDifference?"转账":e.typeObject&&"3"===e.typeObject.typeDifference?"修改余额":void 0},handleSearch:function(){var e=this;this.$debounce((function(){e.searchCode&&(e.loading=!0,c({searchCode:e.searchCode}).then((function(t){e.list=t.data,e.list.map((function(t){return"待办事项"===t.label&&t.options.map((function(e){e.title=e.content})),"生活账本"===t.label&&t.options.map((function(t){t.title="".concat(t.typeObject&&t.typeObject.typeName).concat(t.remark?"-"+t.remark:"","-").concat(t.money,"-").concat(t.accountObject&&t.accountObject.accountName,"-").concat(e.billType(t))})),"日记"===t.label&&t.options.map((function(t){t.title=t.content.replace(e.regex,"")})),"笔记"===t.label&&(t.options=t.options.filter((function(e){return Boolean(e.content)}))),t})),e.$setSession("fullRetrievalList",e.list),e.loading=!1})))}),1200)()}}},r=o,s=(i("49559"),i("2877")),d=Object(s["a"])(r,n,a,!1,null,"06b2b0a1",null);t["default"]=d.exports},b8d7:function(e,t,i){}}]); |