1 line
5.6 KiB
JavaScript
1 line
5.6 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-823020a0"],{cec4:function(t,e,a){"use strict";a.d(e,"e",(function(){return r})),a.d(e,"d",(function(){return n})),a.d(e,"a",(function(){return o})),a.d(e,"f",(function(){return i})),a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return u}));var l=a("b775");function r(t){return Object(l["a"])({url:"/iot/template/list",method:"get",params:t})}function n(t){return Object(l["a"])({url:"/iot/template/"+t,method:"get"})}function o(t){return Object(l["a"])({url:"/iot/template",method:"post",data:t})}function i(t){return Object(l["a"])({url:"/iot/template",method:"put",data:t})}function s(t){return Object(l["a"])({url:"/iot/template/"+t,method:"delete"})}function u(t){return Object(l["a"])({url:"/iot/template/getPoints",method:"get",params:t})}},dbf4:function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"product-select-template",attrs:{model:t.queryParams,inline:!0,"label-width":"48px"}},[a("el-form-item",{attrs:{prop:"templateName"}},[a("el-input",{attrs:{placeholder:t.$t("product.product-select-template.318012-1"),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.templateName,callback:function(e){t.$set(t.queryParams,"templateName",e)},expression:"queryParams.templateName"}})],1),a("el-form-item",{attrs:{prop:"type"}},[a("el-select",{attrs:{placeholder:t.$t("product.product-select-template.318012-3"),clearable:"",size:"small"},model:{value:t.queryParams.type,callback:function(e){t.$set(t.queryParams,"type",e)},expression:"queryParams.type"}},t._l(t.dict.type.iot_things_type,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"small"},on:{click:t.handleQuery}},[t._v(t._s(t.$t("product.product-select-template.318012-4")))]),a("el-button",{attrs:{icon:"el-icon-refresh",size:"small"},on:{click:t.resetQuery}},[t._v(t._s(t.$t("product.product-select-template.318012-5")))])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"selectTemplateTable",attrs:{data:t.templateList,size:"small","row-key":t.getRowKeys,border:!1},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center","reserve-selection":!0}}),a("el-table-column",{attrs:{label:t.$t("product.product-select-template.318012-0"),align:"left",prop:"templateName","min-width":"160"}}),a("el-table-column",{attrs:{label:t.$t("product.product-select-template.318012-6"),align:"left",prop:"identifier","min-width":"120"}}),a("el-table-column",{attrs:{label:t.$t("product.product-select-template.318012-7"),align:"center",prop:"type","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("dict-tag",{attrs:{options:t.dict.type.iot_things_type,value:e.row.type}})]}}])}),a("el-table-column",{attrs:{label:t.$t("product.product-things-model.142341-12"),align:"center",prop:"isChart",width:"75"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("dict-tag",{attrs:{options:t.dict.type.iot_yes_no,value:e.row.isChart}})]}}])}),a("el-table-column",{attrs:{label:t.$t("product.product-select-template.318012-9"),align:"center",prop:"isMonitor",width:"75"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("dict-tag",{attrs:{options:t.dict.type.iot_yes_no,value:e.row.isMonitor}})]}}])}),a("el-table-column",{attrs:{label:t.$t("product.product-select-template.318012-10"),align:"center",prop:"isReadonly",width:"75"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("dict-tag",{attrs:{options:t.dict.type.iot_yes_no,value:e.row.isReadonly}})]}}])}),a("el-table-column",{attrs:{label:t.$t("product.product-select-template.318012-11"),align:"center",prop:"isHistory",width:"75"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("dict-tag",{attrs:{options:t.dict.type.iot_yes_no,value:e.row.isHistory}})]}}])}),a("el-table-column",{attrs:{label:t.$t("product.product-select-template.318012-12"),align:"center",prop:"datatype","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("dict-tag",{attrs:{options:t.dict.type.iot_data_type,value:e.row.datatype}})]}}])})],1),a("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}})],1)},r=[],n=(a("d81d"),a("cec4")),o={name:"product-select-template",dicts:["iot_things_type","iot_data_type","iot_yes_no"],data:function(){return{ids:[],single:!0,multiple:!0,total:0,templateList:[],queryParams:{pageNum:1,pageSize:10,templateName:null,type:null}}},created:function(){this.getList(),this.ids=[]},methods:{getList:function(){var t=this;this.loading=!0,Object(n["e"])(this.queryParams).then((function(e){t.templateList=e.rows,t.total=e.total,t.loading=!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.templateId})),this.single=1!==t.length,this.multiple=!t.length,this.$emit("idsToParentEvent",this.ids)},getRowKeys:function(t){return t.templateId}}},i=o,s=a("2877"),u=Object(s["a"])(i,l,r,!1,null,null,null);e["default"]=u.exports}}]); |