1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6f1dd28d"],{"0949":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"scene-list"},[n("el-card",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],staticClass:"tools-wrap",staticStyle:{"margin-bottom":"15px",width:"100%"}},[n("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",staticStyle:{"margin-bottom":"-18px",padding:"3px 0 0 0"},attrs:{model:e.queryParams,inline:!0,"label-width":"78px"}},[n("el-form-item",{attrs:{prop:"deptId"}},[n("treeselect",{attrs:{options:e.deptOptions,clearable:!0,appendToBody:!0,searchable:!0,placeholder:e.$t("scene.list.index.079839-14")},model:{value:e.queryParams.deptId,callback:function(t){e.$set(e.queryParams,"deptId",t)},expression:"queryParams.deptId"}})],1),n("el-form-item",{attrs:{prop:"status"}},[n("el-select",{attrs:{placeholder:e.$t("scene.list.index.079839-1"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.status,callback:function(t){e.$set(e.queryParams,"status",t)},expression:"queryParams.status"}},[n("el-option",{attrs:{label:e.$t("scene.list.index.079839-2"),value:0}}),n("el-option",{attrs:{label:e.$t("scene.edit.202832-18"),value:1}})],1)],1),n("el-form-item",{attrs:{prop:"sceneModelName"}},[n("el-input",{attrs:{placeholder:e.$t("scene.edit.202832-5"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.sceneModelName,callback:function(t){e.$set(e.queryParams,"sceneModelName",t)},expression:"queryParams.sceneModelName"}})],1),n("div",{staticStyle:{float:"right"}},[n("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("search")))]),n("el-button",{attrs:{icon:"el-icon-refresh"},on:{click:e.handleResetQuery}},[e._v(e._s(e.$t("reset")))])],1)],1)],1),n("el-card",[n("el-row",{staticStyle:{"margin-bottom":"16px"},attrs:{gutter:10}},[n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["scene:model:add"],expression:"['scene:model:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"small"},on:{click:e.handleAdd}},[e._v(e._s(e.$t("add")))])],1),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["scene:model:edit"],expression:"['scene:model:edit']"}],attrs:{plain:"",icon:"el-icon-edit",size:"small",disabled:e.single},on:{click:e.handleUpdate}},[e._v(e._s(e.$t("update")))])],1),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["scene:model:remove"],expression:"['scene:model:remove']"}],attrs:{plain:"",icon:"el-icon-delete",size:"small",disabled:e.multiple},on:{click:e.handleDelete}},[e._v(e._s(e.$t("del")))])],1),n("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getSceneListDatas}})],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.sceneList,border:!1},on:{"selection-change":e.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",align:"center",width:"55"}}),n("el-table-column",{attrs:{label:e.$t("scene.edit.202832-1"),align:"left",prop:"sceneModelName",width:"200"}}),n("el-table-column",{attrs:{label:e.$t("scene.index.670805-8"),align:"center",prop:"status",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-tag",{attrs:{type:0===t.row.status?"danger":"success"}},[e._v(e._s(0===t.row.status?e.$t("scene.list.index.079839-2"):e.$t("scene.edit.202832-18")))])]}}])}),n("el-table-column",{attrs:{label:e.$t("scene.edit.202832-2"),align:"center",prop:"deptName",width:"200"}}),n("el-table-column",{attrs:{label:e.$t("scene.list.index.079839-3"),align:"center",prop:"deviceTotal",width:"100"}}),n("el-table-column",{attrs:{label:e.$t("scene.list.index.079839-4"),align:"left",prop:"desc",width:"210"}}),n("el-table-column",{attrs:{label:e.$t("scene.list.index.079839-5"),align:"center",prop:"createBy",width:"110"}}),n("el-table-column",{attrs:{label:e.$t("scene.list.index.079839-6"),align:"center",prop:"updateTime",width:"160"}}),n("el-table-column",{attrs:{fixed:"right",label:e.$t("opation"),align:"center","class-name":"small-padding fixed-width",width:"345"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["scene:model:query"],expression:"['scene:model:query']"}],attrs:{type:"text",size:"small",icon:"el-icon-view"},on:{click:function(n){return e.handleDetail(t.row)}}},[e._v(e._s(e.$t("look")))]),n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["scene:model:edit"],expression:"['scene:model:edit']"}],attrs:{size:"small",type:"text",icon:"el-icon-edit-outline"},on:{click:function(n){return e.handleEdit(t.row)}}},[e._v(e._s(e.$t("edit")))]),1==e.isShowScada?n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["scene:model:scada:design"],expression:"['scene:model:scada:design']"}],attrs:{size:"small",type:"text",icon:"el-icon-box"},on:{click:function(n){return e.handleScadaDesign(t.row)}}},[e._v(" "+e._s(e.$t("scene.list.index.079839-7"))+" ")]):e._e(),1==e.isShowScada?n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["scene:model:scada:run"],expression:"['scene:model:scada:run']"}],attrs:{size:"small",type:"text",icon:"el-icon-thumb"},on:{click:function(n){return e.handleScadaRun(t.row)}}},[e._v(" "+e._s(e.$t("scene.list.index.079839-8"))+" ")]):e._e(),n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["scene:model:remove"],expression:"['scene:model:remove']"}],attrs:{size:"small",type:"text",icon:"el-icon-delete"},on:{click:function(n){return e.handleDelete(t.row)}}},[e._v(e._s(e.$t("del")))])]}}])})],1),n("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],staticStyle:{"margin-bottom":"20px"},attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getSceneListDatas}})],1)],1),n("el-dialog",{staticClass:"scene-add-dialog",attrs:{title:e.dialog.title,visible:e.dialog.open,width:"600px","append-to-body":""},on:{"update:visible":function(t){return e.$set(e.dialog,"open",t)}}},[n("el-form",{ref:"dialogForm",attrs:{model:e.dialog.form,rules:e.dialog.rules,"label-width":"100px"}},[n("el-form-item",{attrs:{label:e.$t("scene.edit.202832-1"),prop:"sceneModelName"}},[n("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:e.$t("scene.edit.202832-5"),clearable:""},model:{value:e.dialog.form.sceneModelName,callback:function(t){e.$set(e.dialog.form,"sceneModelName",t)},expression:"dialog.form.sceneModelName"}})],1),n("el-form-item",{attrs:{label:e.$t("scene.edit.202832-2"),prop:"deptId"}},[n("treeselect",{staticStyle:{width:"400px"},attrs:{options:e.deptOptions,clearable:!0,searchable:!0,placeholder:e.$t("scene.edit.202832-6")},on:{input:e.handleTreeselectInput},model:{value:e.dialog.form.deptId,callback:function(t){e.$set(e.dialog.form,"deptId",t)},expression:"dialog.form.deptId"}})],1),n("el-form-item",{attrs:{label:e.$t("scene.edit.202832-4"),prop:"desc"}},[n("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:e.$t("scene.edit.202832-7"),clearable:""},model:{value:e.dialog.form.desc,callback:function(t){e.$set(e.dialog.form,"desc",t)},expression:"dialog.form.desc"}})],1),n("el-form-item",{attrs:{label:e.$t("scene.list.index.079839-9"),prop:"imgUrl"}},[n("image-upload",{class:{disable:e.uploadDisabled},attrs:{multiple:!1},model:{value:e.dialog.form.imgUrl,callback:function(t){e.$set(e.dialog.form,"imgUrl",t)},expression:"dialog.form.imgUrl"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{type:"primary"},on:{click:e.handleDialogSubmit}},[e._v(e._s(e.$t("confirm")))]),n("el-button",{on:{click:e.handleDialogCancel}},[e._v(e._s(e.$t("cancel")))])],1)],1)],1)},r=[],s=(n("d81d"),n("14d9"),n("ca17")),o=n.n(s),i=(n("542c"),n("c0c7")),l=n("7a7d"),d=n("83d6"),c={name:"sceneList",components:{Treeselect:o.a},computed:{uploadDisabled:function(){return""!==this.dialog.form.imgUrl}},data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,deptOptions:[],isShowScada:d["a"].isShowScada,queryParams:{deptId:null,status:null,sceneModelName:"",pageNum:1,pageSize:10},sceneList:[],total:0,dialog:{open:!1,title:"",form:{imgUrl:"",sceneModelName:"",deptId:null,desc:""},rules:{sceneModelName:[{required:!0,message:this.$t("scene.edit.202832-5"),trigger:"blur"}],deptId:[{required:!0,message:this.$t("scene.edit.202832-6"),trigger:"change"}]}}}},mounted:function(){this.getDeptTree(),this.getSceneListDatas()},methods:{getDeptTree:function(){var e=this;Object(i["d"])().then((function(t){200===t.code?e.deptOptions=t.data:e.$message.error(t.msg)}))},getSceneListDatas:function(){var e=this;this.loading=!0,Object(l["m"])(this.queryParams).then((function(t){200===t.code?(e.sceneList=t.rows,e.total=t.total):e.$message.error(t.msg),e.loading=!1}))},handleQuery:function(){this.queryParams.pageNum=1,this.getSceneListDatas()},handleResetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleAdd:function(){this.reset(),this.dialog.open=!0,this.dialog.title=this.$t("scene.list.index.079839-10")},reset:function(){this.dialog.form={imgUrl:"",sceneModelName:"",deptId:null,desc:""},this.resetForm("dialogForm")},handleTreeselectInput:function(e){e&&this.$refs.dialogForm.clearValidate("deptId")},handleDialogSubmit:function(){var e=this;this.$refs["dialogForm"].validate((function(t){t&&(null!=e.dialog.form.sceneModelId?Object(l["q"])(e.dialog.form).then((function(t){200===t.code?(e.$modal.msgSuccess(e.$t("updateSuccess")),e.dialog.open=!1,e.getSceneListDatas()):e.$message.error(t.msg)})):Object(l["b"])(e.dialog.form).then((function(t){200===t.code?(e.$modal.msgSuccess(e.$t("addSuccess")),e.dialog.open=!1,e.getSceneListDatas()):e.$message.error(t.msg)})))}))},handleDialogCancel:function(){this.dialog.open=!1},handleUpdate:function(){var e=this;this.dialog.title=this.$t("scene.list.index.079839-11");var t=this.ids;Object(l["k"])(t).then((function(t){200===t.code?(e.dialog.form=t.data,e.dialog.open=!0):e.$message.error(t.msg)}))},handleDelete:function(e){var t=this,n=e.sceneModelId||this.ids;this.$modal.confirm(this.$t("scene.list.index.079839-12",[n])).then((function(){return Object(l["e"])(n)})).then((function(){t.getSceneListDatas(),Array.isArray(n)&&(t.ids=[]),t.$modal.msgSuccess(t.$t("delSuccess"))})).catch((function(){}))},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.sceneModelId})),this.single=1!==e.length,this.multiple=!e.length},handleDetail:function(e){this.$router.push({path:"/scene/list/detail",query:{sceneModelId:e.sceneModelId}})},handleEdit:function(e){this.$router.push({path:"/scene/list/edit",query:{id:e.sceneModelId}})},handleScadaDesign:function(e){var t=e.scadaId,n=e.guid,a=e.sceneModelId;if(n){var r=this.$router.resolve({path:"/scada/topo/editor",query:{id:t,guid:n,type:2,sceneModelId:a}});window.open(r.href,"_blank")}else this.$router.push({path:"/scada/center/scene",query:{sceneModelId:e.sceneModelId}})},handleScadaRun:function(e){if(e.guid){var t=this.$router.resolve({path:"/scada/topo/fullscreen",query:{guid:e.guid,type:2,sceneModelId:e.sceneModelId}});window.open(t.href,"_blank")}else this.$message({message:this.$t("scene.list.index.079839-13"),type:"warning"})}}},u=c,m=(n("b4b9"),n("2877")),p=Object(m["a"])(u,a,r,!1,null,"9a7002fe",null);t["default"]=p.exports},"23ae":function(e,t,n){},"7a7d":function(e,t,n){"use strict";n.d(t,"m",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"q",(function(){return o})),n.d(t,"e",(function(){return i})),n.d(t,"k",(function(){return l})),n.d(t,"i",(function(){return d})),n.d(t,"l",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return m})),n.d(t,"p",(function(){return p})),n.d(t,"j",(function(){return h})),n.d(t,"h",(function(){return f})),n.d(t,"g",(function(){return g})),n.d(t,"o",(function(){return b})),n.d(t,"c",(function(){return v})),n.d(t,"r",(function(){return y})),n.d(t,"f",(function(){return w})),n.d(t,"n",(function(){return $}));var a=n("b775");function r(e){return Object(a["a"])({url:"/scene/model/list",method:"get",params:e})}function s(e){return Object(a["a"])({url:"/scene/model",method:"post",data:e})}function o(e){return Object(a["a"])({url:"/scene/model",method:"put",data:e})}function i(e){return Object(a["a"])({url:"/scene/model/"+e,method:"delete"})}function l(e){return Object(a["a"])({url:"/scene/model/"+e,method:"get"})}function d(e){return Object(a["a"])({url:"/scene/modelData/list",method:"get",params:e})}function c(e){return Object(a["a"])({url:"/scene/modelDevice/list",method:"get",params:e})}function u(e){return Object(a["a"])({url:"/scene/modelDevice",method:"post",data:e})}function m(e){return Object(a["a"])({url:"/scene/modelDevice/"+e,method:"delete"})}function p(e){return Object(a["a"])({url:"/scene/modelDevice",method:"put",data:e})}function h(e){return Object(a["a"])({url:"/scene/modelData/listByType",method:"get",params:e})}function f(e){return Object(a["a"])({url:"/scene/modelDevice/editEnable",method:"post",data:e})}function g(e){return Object(a["a"])({url:"/scene/modelData/editEnable",method:"post",data:e})}function b(e){return Object(a["a"])({url:"/scene/modelTag/list",method:"get",params:e})}function v(e){return Object(a["a"])({url:"/scene/modelTag",method:"post",data:e})}function y(e){return Object(a["a"])({url:"/scene/modelTag",method:"put",data:e})}function w(e){return Object(a["a"])({url:"/scene/modelTag/"+e,method:"delete"})}function $(e){return Object(a["a"])({url:"/scene/modelTag/"+e,method:"get"})}},b4b9:function(e,t,n){"use strict";n("23ae")},c0c7:function(e,t,n){"use strict";n.d(t,"l",(function(){return s})),n.d(t,"o",(function(){return o})),n.d(t,"j",(function(){return i})),n.d(t,"i",(function(){return l})),n.d(t,"a",(function(){return d})),n.d(t,"q",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"m",(function(){return m})),n.d(t,"b",(function(){return p})),n.d(t,"h",(function(){return h})),n.d(t,"n",(function(){return f})),n.d(t,"k",(function(){return g})),n.d(t,"r",(function(){return b})),n.d(t,"s",(function(){return v})),n.d(t,"t",(function(){return y})),n.d(t,"f",(function(){return w})),n.d(t,"p",(function(){return $})),n.d(t,"d",(function(){return x})),n.d(t,"e",(function(){return O})),n.d(t,"g",(function(){return S}));var a=n("b775"),r=n("c38a");function s(e){return Object(a["a"])({url:"/system/user/list",method:"get",params:e})}function o(e){return Object(a["a"])({url:"/system/user/listTerminal",method:"get",params:e})}function i(e){return Object(a["a"])({url:"/system/user/"+Object(r["f"])(e),method:"get"})}function l(e){return Object(a["a"])({url:"/system/dept/getRole?deptId="+e,method:"get"})}function d(e){return Object(a["a"])({url:"/system/user",method:"post",data:e})}function c(e){return Object(a["a"])({url:"/system/user",method:"put",data:e})}function u(e){return Object(a["a"])({url:"/system/user/"+e,method:"delete"})}function m(e,t){var n={userId:e,password:t};return Object(a["a"])({url:"/system/user/resetPwd",method:"put",data:n})}function p(e,t){var n={userId:e,status:t};return Object(a["a"])({url:"/system/user/changeStatus",method:"put",data:n})}function h(){return Object(a["a"])({url:"/wechat/getWxBindQr",method:"get"})}function f(e){return Object(a["a"])({url:"/wechat/cancelBind",method:"post",data:e})}function g(){return Object(a["a"])({url:"/system/user/profile",method:"get"})}function b(e){return Object(a["a"])({url:"/system/user/profile",method:"put",data:e})}function v(e,t){var n={oldPassword:e,newPassword:t};return Object(a["a"])({url:"/system/user/profile/updatePwd",method:"put",params:n})}function y(e){return Object(a["a"])({url:"/system/user/profile/avatar",method:"post",data:e})}function w(e){return Object(a["a"])({url:"/system/user/authRole/"+e,method:"get"})}function $(e){return Object(a["a"])({url:"/system/user/authRole",method:"put",params:e})}function x(){return Object(a["a"])({url:"/system/user/deptTree",method:"get"})}function O(e){return Object(a["a"])({url:"/system/user/deptTree?showOwner="+e,method:"get"})}function S(e){return Object(a["a"])({url:"/system/user/getByDeptId",method:"get",params:e})}}}]); |