(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-47d4"],{"1nDX":function(e,t,a){"use strict";var n=a("m1cH"),i=a.n(n),l=a("gDS+"),r=a.n(l),s=a("QbLZ"),o=a.n(s),c=a("U/5H"),d=a.n(c),u=a("wk8/"),f={props:{defaultColumnDefs:{type:Array,default:function(){return[]}},type_id:{type:[String,Number],default:""}},data:function(){return{visible:!1,fieldList:[],pinnedArr:[{label:"不固定",value:!1},{label:"左侧固定",value:"left"},{label:"右侧固定",value:"right"}]}},computed:{hideFieldLen:function(e){return e.fieldList.filter(function(e){return e.hide}).length}},methods:{initSort:function(){var e=this,t=this.$refs.multipleTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];new d.a(t,{animation:150,onEnd:function(t){var a=e.fieldList.splice(t.oldIndex,1)[0];e.fieldList.splice(t.newIndex,0,a)}})},tableRowClassName:function(e){return e.row.hide?"hide-row-class":""},selectData:function(e,t){this.$set(t,"hide",!t.hide)},selectAll:function(e){var t=this;this.fieldList.forEach(function(a){t.$set(a,"hide",!e.length)})},dataFormat:function(e){return e.map(function(e){return o()({},e,{hide:e.hide||!1,fixed:e.fixed||!1,prop:e.prop||e.key,fixedText:{left:"左侧固定",right:"右侧固定"}[e.fixed]||"不固定"})})},load:function(e){var t=this;Array.isArray(e)&&(this.fieldList=this.dataFormat(e),this.visible=!0,this.$nextTick(function(){t.fieldList.forEach(function(e){e.hide||t.$refs.multipleTable.toggleRowSelection(e)}),t.initSort()}))},onSubmit:function(){var e=this,t=this.fieldList;t.filter(function(e){return!e.hide}).length<1?this.$message({type:"warning",message:"列表至少展示一个字段"}):Object(u.bb)({type_id:this.$route.name,content:r()(this.fieldList)}).then(function(a){200===a.data.code?(e.$message.success("修改成功"),e.$emit("success",[].concat(i()(t))),e.visible=!1):e.$message.error(a.data.msg)})},reset:function(){this.load(this.defaultColumnDefs),this.$message({message:"已恢复默认,保存后生效!",type:"success"})},onClose:function(){this.visible=!1}}},p=(a("PpT3"),a("KHd+")),h=Object(p.a)(f,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{staticClass:"table-field-cfg",attrs:{visible:e.visible,"append-to-body":""},on:{"update:visible":function(t){e.visible=t},close:e.onClose}},[a("div",{staticClass:"title-row",attrs:{slot:"title"},slot:"title"},[a("h4",{staticStyle:{margin:"0"}},[e._v("表格字段设置")]),e._v(" "),a("div",[e._v("\n (共 "+e._s(e.fieldList.length)+"个字段, 已隐藏"+e._s(e.hideFieldLen)+"个)\n ")]),e._v(" "),a("el-button",{staticClass:"reset-btn",attrs:{type:"text"},on:{click:e.reset}},[e._v("恢复默认")])],1),e._v(" "),a("div",{staticClass:"main"},[a("el-table",{ref:"multipleTable",attrs:{data:e.fieldList,"row-class-name":e.tableRowClassName,"max-height":"500","row-key":"prop"},on:{select:e.selectData,"select-all":e.selectAll}},[a("el-table-column",{attrs:{width:"40px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-rank",staticStyle:{cursor:"move"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{type:"selection"}}),e._v(" "),a("el-table-column",{attrs:{label:"序号"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.$index+1)+"\n "),t.row.hide?a("el-tag",{staticStyle:{"margin-left":"5px"},attrs:{type:"info"}},[e._v("隐藏")]):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"字段名",prop:"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"固定列",prop:"fixedText"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticStyle:{width:"108px"},attrs:{size:"mini",placeholder:"请选择固定列方式"},model:{value:t.row.fixed,callback:function(a){e.$set(t.row,"fixed",a)},expression:"scope.row.fixed"}},e._l(e.pinnedArr,function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"对齐方式"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticStyle:{width:"108px"},attrs:{size:"mini",placeholder:"对齐方式"},model:{value:t.row.align,callback:function(a){e.$set(t.row,"align",a)},expression:"scope.row.align"}},[a("el-option",{attrs:{label:"左侧对齐",value:"left"}}),e._v(" "),a("el-option",{attrs:{label:"居中",value:"center"}}),e._v(" "),a("el-option",{attrs:{label:"右侧对齐",value:"right"}})],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"宽度",prop:"width"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{attrs:{size:"mini",placeholder:"字段宽度"},model:{value:t.row.width,callback:function(a){e.$set(t.row,"width",a)},expression:"scope.row.width"}})]}}])})],1)],1),e._v(" "),a("div",{staticClass:"footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"medium"},on:{click:e.onClose}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.onSubmit}},[e._v("确 定")])],1)])},[],!1,null,"46453d70",null);h.options.__file="index.vue";t.a=h.exports},"4CEF":function(e,t,a){"use strict";a.r(t);var n=a("QbLZ"),i=a.n(n),l=a("sk9p"),r=a.n(l),s=a("5CIl"),o=a("zBnO"),c=a("1nDX"),d=a("NSWC"),u={name:"FaultFeedback",components:{LazyTree:o.a,TableFieldCfg:c.a},mixins:[d.a],data:function(){return{loading:!1,records:0,normalCount:0,searchForm:{is_all_level:1,page:1,limit:10,status:""},faultTypeList:[],searchDateBeginArr:[],tableData:[],fieldDefs:[{label:"充电桩名称",prop:"chrpannel_name",align:"center",minWidth:160},{label:"充电桩编号/插口",prop:"dev_id",align:"center",width:200},{label:"充电站",prop:"group_name",align:"center",minWidth:160},{label:"门店",prop:"admin_name",align:"center",minWidth:120},{label:"报障用户",prop:"user_name",align:"center",width:120},{label:"故障类型",prop:"fault_type",align:"center",width:140},{label:"故障图片",prop:"imgs",align:"center",width:120},{label:"描述",prop:"fault_desc",align:"center",minWidth:220},{label:"报障时间",prop:"ctime",align:"center",width:160}]}},watch:{searchDateBeginArr:function(e){this.updateSearchFormTimes(e)}},created:function(){this.queryList(),this.queryFaultTypeList(),this.queryListNormalCount()},methods:{linkToChargingStation:function(e){this.$router.push("/edit-chargingStation?id="+e.group_id)},updateSearchFormTimes:function(e){var t=e||[],a=r()(t,2),n=a[0],i=void 0===n?null:n,l=a[1],s=void 0===l?null:l;this.$set(this.searchForm,"start_time",i),this.$set(this.searchForm,"end_time",s)},changeStatus:function(){this.queryList()},handleCurrentChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.searchForm.page=e,this.queryList()},selectGroup:function(e){this.searchForm.admin_id=e.shop_id},queryFaultTypeList:function(){var e=this;Object(s.d)().then(function(t){t.succeed&&(e.faultTypeList=t.body.list||[])})},addFaultType:function(){var e=this;this.$prompt("请输入故障类型名称","新增故障类型",{confirmButtonText:"新增",cancelButtonText:"取消"}).then(function(t){var a=t.value;Object(s.a)({value:a}).then(function(t){t.succeed&&(e.$message({message:"新增成功",type:"success"}),e.queryList())})})},handleSizeChange:function(e){this.searchForm.limit=e,this.queryList()},handleFaultFeedback:function(e){var t=this,a=e.id;Object(s.b)({id:a}).then(function(e){e.succeed&&(t.$message({message:"处理成功",type:"success"}),t.queryList(),t.queryListNormalCount())})},queryList:function(){var e=this;this.loading=!0,Object(s.c)(this.searchForm).then(function(t){var a=t.data.data;e.loading=!1,t.succeed&&(e.tableData=a.list,e.records=+a.total)}).catch(function(){e.loading=!1})},queryListNormalCount:function(){var e=this;Object(s.c)(i()({},this.searchForm,{status:"NORMAL"})).then(function(t){var a=t.data.data;e.normalCount=+a.total})}}},f=a("KHd+"),p=Object(f.a)(u,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"search-container"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.searchForm,size:"mini"}},[a("el-form-item",{attrs:{label:"门店"}},[a("lazy-tree",{ref:"addTree",staticStyle:{"margin-bottom":"0",display:"flex",width:"100%"},attrs:{"input-width":"400px"},on:{handleSelectGroup:e.selectGroup}})],1),e._v(" "),a("el-form-item",[a("el-checkbox",{attrs:{"true-label":1,"false-label":0},model:{value:e.searchForm.is_all_level,callback:function(t){e.$set(e.searchForm,"is_all_level",t)},expression:"searchForm.is_all_level"}},[e._v("包含所有门店")])],1),e._v(" "),a("el-form-item",{attrs:{label:"设备"}},[a("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入设备号",clearable:""},model:{value:e.searchForm.dev_id,callback:function(t){e.$set(e.searchForm,"dev_id",t)},expression:"searchForm.dev_id"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"用户名"}},[a("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入用户名",clearable:""},model:{value:e.searchForm.username,callback:function(t){e.$set(e.searchForm,"username",t)},expression:"searchForm.username"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"手机号"}},[a("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入手机号",clearable:""},model:{value:e.searchForm.phone,callback:function(t){e.$set(e.searchForm,"phone",t)},expression:"searchForm.phone"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"故障"}},[a("el-select",{staticStyle:{width:"200px"},attrs:{filterable:"",clearable:"",placeholder:"故障类型",size:"mini"},model:{value:e.searchForm.type_id,callback:function(t){e.$set(e.searchForm,"type_id",t)},expression:"searchForm.type_id"}},e._l(e.faultTypeList,function(e){return a("el-option",{key:e.id,attrs:{label:e.value,value:e.id}})}))],1),e._v(" "),a("el-form-item",{attrs:{label:"时间"}},[a("el-date-picker",{attrs:{clearable:!0,type:"daterange",align:"right","value-format":"timestamp","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.searchDateBeginArr,callback:function(t){e.searchDateBeginArr=t},expression:"searchDateBeginArr"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:function(t){e.handleCurrentChange()}}},[e._v("查询")]),e._v(" "),a("el-button",{attrs:{type:"success",icon:"el-icon-plus",size:"mini"},on:{click:function(t){e.addFaultType()}}},[e._v("新增故障类型")])],1),e._v(" "),a("el-form-item",[a("el-tooltip",{attrs:{content:"表格字段设置",effect:"dark"}},[a("img",{staticClass:"table-cfg-icon",attrs:{src:"https://qiniu.bms16.com/menu_header_config.png"},on:{click:e.loadFieldDialog}})])],1)],1)],1),e._v(" "),a("el-tabs",{on:{"tab-click":e.changeStatus},model:{value:e.searchForm.status,callback:function(t){e.$set(e.searchForm,"status",t)},expression:"searchForm.status"}},[a("el-tab-pane",{attrs:{label:"全部故障",name:""}}),e._v(" "),a("el-tab-pane",{attrs:{label:"待处理("+e.normalCount+")",name:"NORMAL"}})],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],key:JSON.stringify(e.fieldDefsData),ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:e.tableData,border:""},on:{"header-dragend":e.onHeaderDragend}},[e._l(e.fieldDefsData,function(t,n){return a("el-table-column",e._b({key:n,scopedSlots:e._u([{key:"default",fn:function(n){return["imgs"===t.prop?a("div",[n.row.imgs?a("el-image",{staticStyle:{width:"60px",height:"60px"},attrs:{src:n.row.imgs,"preview-src-list":e.tableData.map(function(e){return e.imgs})}}):e._e()],1):"chrpannel_name"===t.prop?a("div",["PROCESSED"===n.row.status?a("div",{staticClass:"seal-tag",staticStyle:{left:"20px"}},[e._v("已处理")]):e._e(),e._v("\n "+e._s(n.row.chrpannel_name)+"\n ")]):"dev_id"===t.prop?a("div",[e._v("\n "+e._s(n.row.dev_id)+" / "+e._s(n.row.box_sn)+"\n ")]):"group_name"===t.prop?a("div",[e._v("\n "+e._s(n.row.group_name)+"\n ")]):a("div",[e._v(e._s(n.row[t.prop]))])]}}])},"el-table-column",t,!1))}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return["NORMAL"===t.row.status?a("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(a){e.handleFaultFeedback(t.row)}}},[e._v("处理")]):"PROCESSED"===t.row.status?a("div",{staticStyle:{"font-size":"12px",color:"#67C23A"}},[e._v("已处理")]):e._e()]}}])})],2),e._v(" "),a("el-pagination",{staticStyle:{"margin-top":"10px"},attrs:{"current-page":e.searchForm.page,"page-size":e.searchForm.limit,total:e.records,background:"",layout:"total, sizes, prev, pager, next, jumper"},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}}),e._v(" "),a("TableFieldCfg",{ref:"TableFieldCfg",attrs:{"default-column-defs":e.fieldDefs},on:{success:e.getTableListFieldDefs}})],1)},[],!1,null,null,null);p.options.__file="faultFeedback.vue";t.default=p.exports},"5CIl":function(e,t,a){"use strict";a.d(t,"c",function(){return i}),a.d(t,"a",function(){return l}),a.d(t,"d",function(){return r}),a.d(t,"b",function(){return s}),a.d(t,"e",function(){return o});var n=a("t3Un");function i(e){return Object(n.a)({url:"?r=chrpannel-operate/fault-feedback-list",method:"post",data:e})}function l(e){return Object(n.a)({url:"?r=chrpannel-operate/add-fault-type",method:"post",data:e})}function r(e){return Object(n.a)({url:"?r=chrpannel-operate/list-fault-type",method:"post",data:e})}function s(e){return Object(n.a)({url:"?r=chrpannel-operate/process-fault-feedback",method:"post",data:e})}function o(e){return Object(n.a)({url:"?r=chrpannel-user/list",method:"post",data:e})}},ElaR:function(e,t,a){var n=a("wlPf");"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);(0,a("SZ7m").default)("6b9594e9",n,!0,{})},NSWC:function(e,t,a){"use strict";var n=a("gDS+"),i=a.n(n),l=a("GQeE"),r=a.n(l),s=a("wk8/");t.a={data:function(){return{tableFieldDefs:[]}},mounted:function(){this.getTableListFieldDefs()},computed:{fieldDefsData:function(){return this.tableFieldDefs.filter(function(e){return!e.hide})}},methods:{getTableListFieldDefs:function(){var e=this;Object(s.qb)({type_id:this.$route.name}).then(function(t){var a=t.data.data,n=r()(a).length?a.data.content:e.fieldDefs;e.$nextTick(function(){e.tableFieldDefs=n})})},loadFieldDialog:function(){this.$refs.TableFieldCfg&&this.$refs.TableFieldCfg.load(this.tableFieldDefs)},onHeaderDragend:function(e,t,a,n){this.setColumnWidth(a,e)},setColumnWidth:function(e,t){var a=this,n=this.tableFieldDefs.map(function(n){return n.prop===e.property&&a.$set(n,"width",t),n});Object(s.bb)({type_id:this.$route.name,content:i()(n)})}}}},PpT3:function(e,t,a){"use strict";var n=a("ElaR");a.n(n).a},wlPf:function(e,t,a){(e.exports=a("I1BE")(!1)).push([e.i,"[data-v-46453d70] .el-table .hide-row-class {\n background: rgba(144, 147, 153, 0.3);\n}\n.table-field-cfg[data-v-46453d70] .el-dialog__body {\n padding: 10px 20px !important;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.table-field-cfg[data-v-46453d70] .el-dialog__footer {\n padding: 16px !important;\n}\n.table-field-cfg .title-row[data-v-46453d70] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.table-field-cfg .title-row .reset-btn[data-v-46453d70] {\n font-size: 15px;\n color: #000;\n}\n.table-field-cfg .title-row .reset-btn[data-v-46453d70]:active {\n opacity: .5;\n}\n.table-field-cfg .main[data-v-46453d70] {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 100%;\n display: block;\n}\n.table-field-cfg .footer[data-v-46453d70] {\n text-align: center;\n background: #fff;\n width: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n",""])}}]);