1 line
5.1 KiB
JavaScript
1 line
5.1 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-06d82310"],{"01ca":function(t,e,i){"use strict";i.d(e,"h",(function(){return o})),i.d(e,"d",(function(){return r})),i.d(e,"i",(function(){return l})),i.d(e,"a",(function(){return a})),i.d(e,"g",(function(){return u})),i.d(e,"k",(function(){return s})),i.d(e,"c",(function(){return c})),i.d(e,"b",(function(){return d})),i.d(e,"f",(function(){return m})),i.d(e,"e",(function(){return p})),i.d(e,"j",(function(){return h}));var n=i("b775");function o(t){return Object(n["a"])({url:"/iot/model/list",method:"get",params:t})}function r(t){return Object(n["a"])({url:"/iot/model/"+t,method:"get"})}function l(t){return Object(n["a"])({url:"/iot/model/permList/"+t,method:"get"})}function a(t){return Object(n["a"])({url:"/iot/model",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/iot/model/import",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/iot/model",method:"put",data:t})}function c(t){return Object(n["a"])({url:"/iot/model/"+t,method:"delete"})}function d(t){return Object(n["a"])({url:"/iot/model/cache/"+t,method:"get"})}function m(t){return Object(n["a"])({url:"/iot/model/listModbus",method:"get",params:t})}function p(t){return Object(n["a"])({url:"/iot/model/write",method:"get",params:t})}function h(t){return Object(n["a"])({url:"/iot/model/refresh?productId="+t,method:"post"})}},cc6f:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:t.$t("product.thimgs-mopdel-list.738493-0"),visible:t.open,width:"700px"},on:{"update:visible":function(e){t.open=e}}},[i("el-form",{ref:"queryForm",attrs:{model:t.queryParams,inline:!0,"label-width":"68px"}},[i("el-form-item",{attrs:{prop:"productName"}},[i("el-input",{attrs:{placeholder:t.$t("product.thimgs-mopdel-list.738493-2"),clearable:"",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleQuery(e)}},model:{value:t.queryParams.modelName,callback:function(e){t.$set(t.queryParams,"modelName",e)},expression:"queryParams.modelName"}})],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"small"},on:{click:t.handleQuery}},[t._v(t._s(t.$t("product.thimgs-mopdel-list.738493-3")))]),i("el-button",{attrs:{icon:"el-icon-refresh",size:"small"},on:{click:t.resetQuery}},[t._v(t._s(t.$t("product.thimgs-mopdel-list.738493-4")))])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"thingsModelTable",attrs:{data:t.modelList,"highlight-current-row":"",height:"50vh",size:"small",border:!1},on:{"selection-change":t.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center",selectable:t.selectable}}),i("el-table-column",{attrs:{label:t.$t("product.thimgs-mopdel-list.738493-5"),align:"left",prop:"modelName","min-width":"160"}}),i("el-table-column",{attrs:{label:t.$t("product.thimgs-mopdel-list.738493-6"),align:"left",prop:"identifier","min-width":"120"}})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],attrs:{layout:"prev, pager, next",total:t.total,page:t.queryParams.pageNum,limit:t.queryParams.pageSize},on:{"update:page":function(e){return t.$set(t.queryParams,"pageNum",e)},"update:limit":function(e){return t.$set(t.queryParams,"pageSize",e)},pagination:t.getList}}),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:t.confirmSelectProduct}},[t._v(t._s(t.$t("product.thimgs-mopdel-list.738493-7")))]),i("el-button",{attrs:{type:"info"},on:{click:t.closeDialog}},[t._v(t._s(t.$t("product.thimgs-mopdel-list.738493-8")))])],1)],1)},o=[],r=(i("c740"),i("d81d"),i("a9e3"),i("d3b7"),i("159b"),i("01ca")),l={name:"ThingsModelList",props:{productId:{type:Number,default:0},justiceSelect:{type:String,default:"isSelectData"}},data:function(){return{loading:!1,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,modelList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:20},form:{},selectedList:[]}},methods:{getList:function(){var t=this;this.loading=!0,this.queryParams.productId=this.productId,Object(r["f"])(this.queryParams).then((function(e){t.modelList=e.rows,t.total=e.total,t.loading=!1,t.$nextTick((function(){t.selectedList.forEach((function(e){var i=t.modelList.findIndex((function(t){return t.identifier==e.identifier}));if(-1!=i){var n=t.modelList[i];n.isSelectData=!1,n.isSelectIo=!1,t.$refs.thingsModelTable.toggleRowSelection(n,!0)}}))}))}))},cancel:function(){this.open=!1},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(t){this.ids=t.map((function(t){return t.identifier})),this.single=1!==t.length,this.multiple=!t.length},confirmSelectProduct:function(){this.$emit("productEvent",this.ids),this.open=!1},closeDialog:function(){this.open=!1},selectable:function(t){return t[this.justiceSelect]}}},a=l,u=i("2877"),s=Object(u["a"])(a,n,o,!1,null,null,null);e["default"]=s.exports}}]); |