You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
2.3 KiB
JavaScript
1 line
2.3 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-34c17386"],{"19db":function(t,e,n){"use strict";var a=n("a6f1"),i=n.n(a);i.a},7433:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("a-table",{attrs:{columns:t.columns,"row-key":function(t){return t.id},"data-source":t.data,pagination:t.pagination},on:{change:t.handleGetCameraIoList},scopedSlots:t._u([{key:"status",fn:function(e){return n("span",{},[t._v(" "+t._s(e=0==e?"连接异常":"没有PLC连接异常")+" ")])}},{key:"action",fn:function(e,a){return n("span",{},[n("a",{on:{click:function(e){return t.reconnection(a)}}},[t._v("重新连接")])])}}])})],1)},i=[],o=(n("4160"),n("159b"),n("5530")),s=[{title:"序号",customRender:function(t,e,n){return 0+n+1}},{title:"PLCID",dataIndex:"plcId"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"异常时间",dataIndex:"time"},{title:"操作",dataIndex:"action",scopedSlots:{customRender:"action"}}],c={data:function(){var t=this;return{pageNum:1,pageSize:10,data:[],pagination:{total:0,current:1,defaultPageSize:10,showTotal:function(t){return"共 ".concat(t," 条数据")},showSizeChanger:!0,pageSizeOptions:["10","20","30"],onShowSizeChange:function(e,n){return t.pageSize=n}},loading:!1,columns:s,visible:!1,modelType:"",modelData:[]}},computed:{},mounted:function(){this.handleGetCameraIoList()},methods:{handleGetCameraIoList:function(t){console.log(t),t&&(this.pagination.current=t.current,this.pagination.pageSize=t.pageSize,this.pageNum=t.current,this.pageSize=t.pageSize),this.request()},request:function(){var t=this;this.$api.httpApi.disPlcList({data:{page:this.pageNum,size:this.pageSize}}).then((function(e){var n=Object(o["a"])({},t.pagination);n.total=e.data.total,t.data=e.data,t.pagination=n,e.data.list.forEach((function(e,n){e.pageNumber=t.pagination.current}))})).catch((function(t){}))},reconnection:function(t){var e=this;console.log(t.streetId);var n=t.streetId;this.$axios.get("/plc/tcp",{params:{id:n}}).then((function(t){200==t.code?(e.$message.success("连接成功"),e.handleGetStreetList()):e.$message.error("连接失败")})).catch((function(t){}))}},components:{}},r=c,u=(n("19db"),n("2877")),d=Object(u["a"])(r,a,i,!1,null,"295d4a8d",null);e["default"]=d.exports},a6f1:function(t,e,n){}}]); |