38.b80decff2b94bfec65e1.js 3.4 KB

1
  1. webpackJsonp([38],{I4pI:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("SQ4B"),s=r("b9vf"),o=r("qI5z"),n=r("vGYV"),i={name:"ResourceDetail",components:{},data:function(){return{user:{},loading:!1,type:0,code:0,resource:{name:"",photo:"",type:"",quantity:0,state:0,unit:"",description:"",standard:"",startTime:"",scene:"",remarks:"",unitWork:""}}},mounted:function(){var e=this;this.$nextTick(function(){e.init()})},methods:{init:function(){this.code=this.$route.query.id,this.loadData()},back:function(){this.$router.go(-1)},loadData:function(){var e=this;this.showLoading(),a.a.get(s.a.RESOURCE.GET_DETAIL.replace("{code}",this.code)).then(function(t){console.log(t),e.resource.name=t.data.name,e.resource.photo=t.data.photoUrl,e.resource.type=t.data.type,e.resource.state=t.data.state,e.resource.quantity=t.data.quantity,e.resource.unit=t.data.unit,e.resource.description=t.data.description,e.resource.standard=t.data.standard,e.resource.startTime=t.data.startTime,e.resource.scene=t.data.scene,e.resource.remarks=t.data.remarks,e.resource.unitWork=t.data.unitWork,e.hideLoading()}).catch(function(t){e.hideLoading(),Object(o.a)("error","打开详情失败:"+t.data)})},setUserInfo:function(){this.user=Object(n.J)("user")},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1}},watch:{resourceType:function(e){this.resourceType=e}}},c={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"create-container"},[r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"create-body"},[r("el-form",{staticClass:"demo",attrs:{model:e.resource,"label-width":"12%"}},[r("el-form-item",{attrs:{label:"资源名称",prop:"name"}},[r("span",[e._v(e._s(e.resource.name))])]),e._v(" "),r("el-form-item",{attrs:{label:"资源图标",prop:"photo"}},[r("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:e.resource.photo}})]),e._v(" "),e.description?e._e():r("el-form-item",{attrs:{label:"资源描述",prop:"description"}},[r("span",[e._v(e._s(e.resource.description))])]),e._v(" "),e.type?e._e():r("el-form-item",{attrs:{label:"类型",prop:"type"}},[r("span",[e._v(e._s(e.resource.type))])]),e._v(" "),e.scene?e._e():r("el-form-item",{attrs:{label:"使用场景",prop:"scene"}},[r("span",[e._v(e._s(e.resource.scene))])]),e._v(" "),e.standard?e._e():r("el-form-item",{attrs:{label:"收费标准",prop:"standard"}},[r("span",[e._v(e._s(e.resource.standard)+e._s(e.resource.unit))])]),e._v(" "),e.startTime?e._e():r("el-form-item",{attrs:{label:"注册日期",prop:"startTime"}},[r("span",[e._v(e._s(e.$moment(e.resource.startTime).format("YYYY-MM-DD HH:mm:ss")))])]),e._v(" "),r("el-form-item",{attrs:{label:"数量",prop:"quantity"}},[r("span",[e._v(e._s(e.resource.quantity))])]),e._v(" "),r("el-form-item",{attrs:{label:"状态",prop:"state"}},[r("span",{staticClass:"badge"},[e._v(e._s(e.resource.state))])]),e._v(" "),r("el-form-item",{attrs:{label:"单位",prop:"unit"}},[r("span",[e._v(e._s(e.resource.unitWork))])]),e._v(" "),e.remarks?e._e():r("el-form-item",{attrs:{label:"其他说明",prop:"remarks"}},[r("span",[e._v(e._s(e.resource.remarks))])]),e._v(" "),r("el-form-item",[r("div",{staticClass:"btn btn-medium",on:{click:function(t){return e.back()}}},[e._v("返回")])])],1)],1)])},staticRenderFns:[]};var u=r("VU/8")(i,c,!1,function(e){r("dhiZ")},null,null);t.default=u.exports},dhiZ:function(e,t){}});