2 lines
18 KiB
2 lines
18 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f2eda934"],{a8d0:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"main-content"},[t._m(0),e("div",{staticClass:"content"},[e("div",{staticClass:"content-btn"},[e("el-button",{staticClass:"init-button",attrs:{icon:"el-icon-plus"},on:{click:function(e){return t.add()}}},[t._v("新增路线")])],1),e("div",{},[e("VueTable",{ref:"table",attrs:{config:t.config},on:{tableCheck:t.tableCheck}},[e("template",{slot:"footer"},[e("div",{staticClass:"table-footer"},[e("button",{on:{click:function(e){return t.isEnable(t.table_row)}}},[t._v(" 启用/停用 ")]),e("button",{on:{click:function(e){return t.edit(t.table_row)}}},[t._v("编辑")]),e("button",{on:{click:function(e){return t.del(t.table_row)}}},[t._v("删除")])])])],2)],1),e("Drawer",{attrs:{drawerTitle:"新增路线",drawerVrisible:t.add_vrisible},on:{drawerClose:t.addClose}},[e("div",{staticStyle:{padding:"30px"}},[e("FromCard",[e("template",{slot:"title"},[t._v("路线信息")]),[e("VueForm",{ref:"addForm",attrs:{formObj:t.addForm},scopedSlots:t._u([{key:"inspectionPonitId",fn:function(){return[e("el-button",{attrs:{size:"mini"},on:{click:t.addInt}},[t._v("添加")]),t._l(t.inspectionArr,(function(n,r){return e("div",{key:r},[e("el-select",{staticStyle:{width:"240px"},attrs:{"remote-method":t.remoteMethod,loading:t.loading,remote:"",filterable:"",placeholder:"请选择"},on:{change:t.change,focus:t.sefocus},model:{value:n.inspectionPointId,callback:function(e){t.$set(n,"inspectionPointId",e)},expression:"item.inspectionPointId"}},t._l(t.options,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),e("el-button",{attrs:{size:"mini"},on:{click:function(e){return t.delRow(r)}}},[t._v("删除")])],1)}))]},proxy:!0}])})]],2)],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("button",{staticClass:"btn-orange",on:{click:function(e){return t.addSubmit()}}},[e("span",[e("i",{staticClass:"el-icon-circle-check"}),t._v("提交")])]),e("button",{staticClass:"btn-gray",on:{click:t.addClose}},[e("span",[t._v("取消")])])])]),e("Drawer",{attrs:{drawerTitle:"修改路线",drawerVrisible:t.edit_vrisible},on:{drawerClose:t.editClose}},[e("div",{staticStyle:{padding:"30px"}},[e("FromCard",[e("template",{slot:"title"},[t._v("路线信息")]),[e("VueForm",{ref:"editForm",attrs:{formObj:t.editForm},scopedSlots:t._u([{key:"inspectionPonitId",fn:function(){return[e("el-button",{attrs:{type:"success",size:"mini"},on:{click:t.addInt}},[t._v("添加")]),t._l(t.inspectionArr,(function(n,r){return e("div",{key:r},[e("el-select",{staticStyle:{width:"240px"},attrs:{"remote-method":t.remoteMethod,loading:t.loading,remote:"",filterable:"",placeholder:"请选择"},on:{change:t.change,focus:t.sefocus},model:{value:n.inspectionPointId,callback:function(e){t.$set(n,"inspectionPointId",e)},expression:"item.inspectionPointId"}},t._l(t.options,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),e("el-button",{attrs:{size:"mini"},on:{click:function(e){return t.delRow(r)}}},[t._v("删除")])],1)}))]},proxy:!0}])})]],2)],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("button",{staticClass:"btn-orange",on:{click:function(e){return t.editSubmit()}}},[e("span",[e("i",{staticClass:"el-icon-circle-check"}),t._v("提交")])]),e("button",{staticClass:"btn-gray",on:{click:t.editClose}},[e("span",[t._v("取消")])])])])],1)])])},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-titel"},[e("span",[t._v("巡检路线")])])}],o=n("d63a"),a={data(){return{inspectionArr:[],options:[],add_vrisible:!1,edit_vrisible:!1,addDate:null,addForm:{ruleForm:{name:null},form_item:[{type:"Input",label:"巡检路线编号",width:"50%",prop:"code",disabled:!0},{type:"Input",label:"路线名称",placeholder:"请输入",width:"50%",prop:"name"},{type:"textarea",label:"描述",placeholder:"请输入",width:"100%",prop:"describes"},{type:"Select",label:"状态",placeholder:"请选择",width:"100%",options:[{label:"启用",value:"1"},{label:"停用",value:"2"}],prop:"status"},{type:"Input",label:"持续时间(分钟)",placeholder:"请输入",width:"100%",prop:"spaceTime"},{type:"Slot",label:"巡检点",placeholder:"请输入",width:"50%",prop:"pointRouteList",slotName:"inspectionPonitId"}]},editForm:{ruleForm:{name:null,spaceTime:null,describes:null},form_item:[{type:"Input",label:"路线名称",placeholder:"请输入",width:"50%",prop:"name"},{type:"textarea",label:"描述",placeholder:"请输入",width:"100%",prop:"describes"},{type:"Int",label:"持续时间(分钟)",placeholder:"请输入",width:"100%",prop:"spaceTime"},{type:"Slot",label:"巡检点",placeholder:"请输入",width:"100%",prop:"pointRouteList",slotName:"inspectionPonitId"}]},table_row:[],activeName:"0",config:{thead:[{label:"序号",type:"index",width:"80"},{label:"编号",prop:"code",width:"auto"},{label:"名称",prop:"name",width:"auto"},{label:"持续时间(分钟)",prop:"spaceTime",width:"auto"},{label:"创建时间",prop:"createDate",width:"auto"},{label:"状态",prop:"status",width:"auto",type:"function",callback(t,e){switch(t.status){case 1:return"启用";case 2:return"停用"}}}],table_data:[],url:"inspectionRouteList",search_item:[{type:"Input",label:"编号",placeholder:"请输入",prop:"code"},{type:"Input",label:"名称",placeholder:"请输入",prop:"name"}],data:{pageNum:1,size:10}}}},created(){this.getUserList()},methods:{delRow(t){console.log(t),this.inspectionArr.splice(t,1)},addInt(){this.inspectionArr.push({inspectionPointId:null})},getUserList(t){let e={pageNum:1,size:20,name:t};this.loading=!0,Object(o["H"])(e).then(t=>{console.log(t),this.options=t.tableList,this.loading=!1}),console.log(this.inspectionArr)},remoteMethod(t){this.getUserList(t)},sefocus(){this.getUserList()},change(t){console.log(t)},add(){this.add_vrisible=!0;let t=Math.floor(1e8*Math.random());this.addForm.ruleForm.code=t},addClose(){this.$refs.addForm.reset(),this.add_vrisible=!1,this.inspectionArr=[]},addSubmit(){for(let e=0;e<this.inspectionArr.length;e++)if(null==this.inspectionArr[e].inspectionPointId)return void this.$message({type:"error",message:"巡检点不能为空"});let t={...this.addForm.ruleForm,pointRouteList:this.inspectionArr};Object(o["K"])(t).then(t=>{t.status&&(this.$message({message:t.message,type:"success"}),this.$refs.table.loadData(),this.addClose())})},edit(t){1!=t.length?this.$message({message:"只能编辑一条数据",type:"error"}):(this.edit_vrisible=!0,console.log(t[0].id),this.editForm.ruleForm.id=t[0].id,Object(o["J"])({id:t[0].id}).then(t=>{console.log(t.data),this.editForm.ruleForm.describes=t.data.describes,this.editForm.ruleForm.name=t.data.name,this.editForm.ruleForm.spaceTime=t.data.spaceTime;let e=t.data.voRoutePointList;for(let n=0;n<e.length;n++)this.inspectionArr.push({inspectionPointId:null}),this.$set(this.inspectionArr[n],"inspectionPointId",e[n].id)}))},editClose(){this.$refs.editForm.reset(),this.edit_vrisible=!1,this.inspectionArr=[]},editSubmit(){for(let e=0;e<this.inspectionArr.length;e++)if(null==this.inspectionArr[e].inspectionPointId)return void this.$message({type:"error",message:"巡检点不能为空"});let t={code:this.editForm.ruleForm.code,name:this.editForm.ruleForm.name,id:this.editForm.ruleForm.id,spaceTime:this.editForm.ruleForm.spaceTime,pointRouteList:this.inspectionArr};Object(o["N"])(t).then(t=>{t.status&&(this.$message({message:t.message,type:"success"}),this.$refs.table.loadData(),this.editClose())})},dateTimeChange(t){this.addForm.ruleForm.openStartDate=t[0],this.addForm.ruleForm.openEndDate=t[1]},tableCheck(t){this.table_row=t},del(t){if(t.length){let t=[];for(let e=0;e<this.table_row.length;e++)t.push(this.table_row[e].id);this.$confirm("是否确认删除?删除不可恢复","删除",{confirmButtonText:"确定",cancelButtonText:"取消",confirmButtonClass:"confirmButton",cancelButtonClass:"cancelButton"}).then(()=>{this.$refs.table.tableDelete(t)}).catch(t=>{})}else this.$message.error("请选中需要删除的数据")},isEnable(t){console.log(t[0].id),t.length>1?this.$message.error("只能操作一条数据"):t.length?Object(o["L"])({id:t[0].id}).then(t=>{console.log(t),t.status&&(this.$message({message:t.message,type:"success"}),this.$refs.table.loadData(),this.addClose())}):this.$message.error("请选择")}}},u=a,s=n("2877"),d=Object(s["a"])(u,r,i,!1,null,null,null);e["default"]=d.exports},d63a:function(t,e,n){"use strict";n.d(e,"n",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"qb",(function(){return a})),n.d(e,"rb",(function(){return u})),n.d(e,"q",(function(){return s})),n.d(e,"r",(function(){return d})),n.d(e,"s",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"o",(function(){return m})),n.d(e,"p",(function(){return f})),n.d(e,"l",(function(){return p})),n.d(e,"k",(function(){return h})),n.d(e,"j",(function(){return b})),n.d(e,"m",(function(){return g})),n.d(e,"f",(function(){return T})),n.d(e,"i",(function(){return q})),n.d(e,"g",(function(){return y})),n.d(e,"vb",(function(){return P})),n.d(e,"ub",(function(){return S})),n.d(e,"bb",(function(){return v})),n.d(e,"cb",(function(){return O})),n.d(e,"ab",(function(){return w})),n.d(e,"G",(function(){return I})),n.d(e,"I",(function(){return _})),n.d(e,"F",(function(){return C})),n.d(e,"D",(function(){return k})),n.d(e,"K",(function(){return F})),n.d(e,"N",(function(){return E})),n.d(e,"J",(function(){return G})),n.d(e,"M",(function(){return A})),n.d(e,"H",(function(){return B})),n.d(e,"sb",(function(){return M})),n.d(e,"tb",(function(){return R})),n.d(e,"L",(function(){return $})),n.d(e,"E",(function(){return x})),n.d(e,"W",(function(){return D})),n.d(e,"X",(function(){return L})),n.d(e,"T",(function(){return j})),n.d(e,"Z",(function(){return N})),n.d(e,"Y",(function(){return z})),n.d(e,"V",(function(){return U})),n.d(e,"U",(function(){return V})),n.d(e,"R",(function(){return J})),n.d(e,"P",(function(){return H})),n.d(e,"Q",(function(){return K})),n.d(e,"S",(function(){return Q})),n.d(e,"eb",(function(){return W})),n.d(e,"db",(function(){return X})),n.d(e,"fb",(function(){return Y})),n.d(e,"O",(function(){return Z})),n.d(e,"u",(function(){return tt})),n.d(e,"v",(function(){return et})),n.d(e,"x",(function(){return nt})),n.d(e,"t",(function(){return rt})),n.d(e,"w",(function(){return it})),n.d(e,"z",(function(){return ot})),n.d(e,"A",(function(){return at})),n.d(e,"C",(function(){return ut})),n.d(e,"y",(function(){return st})),n.d(e,"B",(function(){return dt})),n.d(e,"hb",(function(){return lt})),n.d(e,"ib",(function(){return ct})),n.d(e,"gb",(function(){return mt})),n.d(e,"jb",(function(){return ft})),n.d(e,"ob",(function(){return pt})),n.d(e,"pb",(function(){return ht})),n.d(e,"nb",(function(){return bt})),n.d(e,"c",(function(){return gt})),n.d(e,"d",(function(){return Tt})),n.d(e,"a",(function(){return qt})),n.d(e,"b",(function(){return yt})),n.d(e,"kb",(function(){return Pt})),n.d(e,"mb",(function(){return St})),n.d(e,"lb",(function(){return vt})),n.d(e,"wb",(function(){return Ot}));var r=n("b775");n("2c37");function i(t){return r["a"].request({method:"POST",url:"/facilitiesManage/insert",data:t})}function o(t){return r["a"].request({method:"POST",url:"facilitiesAppointment/update",data:t})}function a(t){return r["a"].request({method:"POST",url:"sysOperations/insert",data:t})}function u(t){return r["a"].request({method:"POST",url:"sysOperations/update",data:t})}function s(t){return r["a"].request({method:"POST",url:"facilitiesPlan/insert",data:t})}function d(t){return r["a"].request({method:"POST",url:"facilitiesPlan/open",data:t})}function l(t){return r["a"].request({method:"POST",url:"facilitiesPlan/stop",data:t})}function c(t){return r["a"].request({method:"GET",url:"/facilitiesCategory/list",params:t})}function m(t){return r["a"].request({method:"GET",url:"/facilitiesManage/list",params:t})}function f(t){return r["a"].request({method:"POST",url:"/facilitiesManage/update",data:t})}function p(t){return r["a"].request({method:"GET",url:"/facilitiesMaintenanceRecord/list",params:t})}function h(t){return r["a"].request({method:"POST",url:"/facilitiesMaintenanceRecord/insert",data:t})}function b(t){return r["a"].request({method:"POST",url:"/facilitiesMaintenanceRecord/delete",data:t})}function g(t){return r["a"].request({method:"GET",url:"/facilitiesManage/findDetailById",params:t})}function T(t){return r["a"].request({method:"GET",url:"/facilitiesCategory/findDetailById",params:t})}function q(t){return r["a"].request({method:"POST",url:"/facilitiesCategory/update",data:t})}function y(t){return r["a"].request({method:"POST",url:"/facilitiesCategory/insert",data:t})}function P(t){return r["a"].request({method:"POST",url:"/userDecorationNew/examine",data:t})}function S(t){return r["a"].request({method:"POST",url:"/userDecorationNew/assign",data:t})}function v(t){return r["a"].request({method:"POST",url:"/ownersCommittee/insert",data:t})}function O(t){return r["a"].request({method:"POST",url:"/ownersCommittee/update",data:t})}function w(t){return r["a"].request({method:"GET",url:"/ownersCommittee/findById",params:t})}function I(t){return r["a"].request({method:"POST",url:"/inspectionPoint/insert",data:t})}function _(t){return r["a"].request({method:"POST",url:"/inspectionPoint/update",data:t})}function C(t){return r["a"].request({method:"GET",url:"/inspectionPoint/findById",params:t})}function k(t){return r["a"].request({method:"POST",url:"/inspectionPlan/insert",data:t})}function F(t){return r["a"].request({method:"POST",url:"/inspectionRoute/insert",data:t})}function E(t){return r["a"].request({method:"POST",url:"/inspectionRoute/update",data:t})}function G(t){return r["a"].request({method:"GET",url:"/inspectionRoute/findById",params:t})}function A(t){return r["a"].request({method:"GET",url:"/inspectionRoute/list",params:t})}function B(t){return r["a"].request({method:"GET",url:"/inspectionPoint/list",params:t})}function M(t){return r["a"].request({method:"GET",url:"/sysOrganization/findAllDepartment",params:t})}function R(t){return r["a"].request({method:"GET",url:"/sysUser/list",params:t})}function $(t){return r["a"].request({method:"GET",url:"/inspectionRoute/isEnable",params:t})}function x(t){return r["a"].request({method:"GET",url:"/inspectionPlan/isEnable",params:t})}function D(t){return r["a"].request({method:"GET",url:"/material/list",params:t})}function L(t){return r["a"].request({method:"GET",url:"/materialRecord/findById",params:t})}function j(t){return r["a"].request({method:"POST",url:"/material/insert",data:t})}function N(t){return r["a"].request({method:"POST",url:"/material/update",data:t})}function z(t){return r["a"].request({method:"POST",url:"/materialRecord/insert",data:t})}function U(t){return r["a"].request({method:"POST",url:"/materialInventory/insert",data:t})}function V(t){return r["a"].request({method:"GET",url:"/materialInventory/findById",params:t})}function J(t){return r["a"].request({method:"POST",url:"/keyManagement/insert",data:t})}function H(t){return r["a"].request({method:"POST",url:"/keyBorrow/examine",data:t})}function K(t){return r["a"].request({method:"GET",url:"/keyManagement/findById",params:t})}function Q(t){return r["a"].request({method:"POST",url:"/keyManagement/update",data:t})}function W(t){return r["a"].request({method:"POST",url:"/packageCollection/insert",data:t})}function X(t){return r["a"].request({method:"GET",url:"/packageCollection/findById",params:t})}function Y(t){return r["a"].request({method:"POST",url:"/packageCollection/update",data:t})}function Z(t){return r["a"].request({method:"POST",url:"/interview/insert",data:t})}function tt(t){return r["a"].request({method:"POST",url:"/greenArea/insert",data:t})}function et(t){return r["a"].request({method:"GET",url:"/greenArea/list",params:t})}function nt(t){return r["a"].request({method:"POST",url:"/greenTask/insert",data:t})}function rt(t){return r["a"].request({method:"GET",url:"/greenArea/findById",params:t})}function it(t){return r["a"].request({method:"POST",url:"/greenArea/update",data:t})}function ot(t){return r["a"].request({method:"POST",url:"/hygieneArea/insert",data:t})}function at(t){return r["a"].request({method:"GET",url:"/hygieneArea/list",params:t})}function ut(t){return r["a"].request({method:"POST",url:"/hygieneTask/insert",data:t})}function st(t){return r["a"].request({method:"GET",url:"/hygieneArea/findById",params:t})}function dt(t){return r["a"].request({method:"POST",url:"/hygieneArea/update",data:t})}function lt(t){return r["a"].request({method:"POST",url:"/regulationManagement/insert",data:t})}function ct(t){return r["a"].request({method:"GET",url:"/regulationManagement/release",params:t})}function mt(t){return r["a"].request({method:"GET",url:"/regulationManagement/findById",params:t})}function ft(t){return r["a"].request({method:"POST",url:"/regulationManagement/update",data:t})}function pt(t){return r["a"].request({method:"POST",url:"/serviceBrowsing/insert",data:t})}function ht(t){return r["a"].request({method:"POST",url:"/serviceBrowsing/update",data:t})}function bt(t){return r["a"].request({method:"GET",url:"/serviceBrowsing/findById",params:t})}function gt(t){return r["a"].request({method:"POST",url:"/communityIntroduction/insert",data:t})}function Tt(t){return r["a"].request({method:"POST",url:"/communityIntroduction/update",data:t})}function qt(t){return r["a"].request({method:"GET",url:"/communityIntroduction/enable",params:t})}function yt(t){return r["a"].request({method:"GET",url:"/communityIntroduction/findById",params:t})}function Pt(t){return r["a"].request({method:"POST",url:"/securityManagement/insert",data:t})}function St(t){return r["a"].request({method:"POST",url:"/securityManagement/update",data:t})}function vt(t){return r["a"].request({method:"GET",url:"/securityManagement/list",params:t})}function Ot(t){return r["a"].request({method:"GET",url:"/userDecorationNew/list",params:t})}}}]);
|
|
//# sourceMappingURL=chunk-f2eda934.7d4d1b36.js.map
|