| | |
| | | // this.$Message.success('点击了按钮'); |
| | | // } |
| | | // }); |
| | | var btninitializeLocation = this.buttons.find(x => x.value == "initializeLocation"); |
| | | if (btninitializeLocation != null) { |
| | | btninitializeLocation.onClick = () => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("请选择数据!"); |
| | | this.http |
| | | .post("api/LocationInfo/initializeLocation?locationID="+rows[0].id, "","数据处理中...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('成功.'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | var btnEnableLocation = this.buttons.find(x => x.value == "EnableLocation"); |
| | | if (btnEnableLocation != null) { |
| | | btnEnableLocation.onClick = () => { |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //查询界面点击行事件 |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //点击编辑、新建按钮弹出框后,可以在此处写逻辑,如,从后台获取数据 |