| | |
| | | }, |
| | | handlerClick: function(item) { |
| | | // 设置被激活的列表 |
| | | this.name = item.fileName; |
| | | // 给列表添加点击事件 |
| | | this.$emit('on-click', item); |
| | | if(this.name != item.fileName) { |
| | | this.name = item.fileName; |
| | | // 给列表添加点击事件 |
| | | this.$emit('on-click', item); |
| | | } |
| | | |
| | | } |
| | | }, |
| | | }); |
| | |
| | | </main>
|
| | | <footer>
|
| | | <div class="footer-inner" style="height: 50px; padding: 8px; text-align: right;">
|
| | | <i-button type="info" icon="ios-lock" disabled>保存</i-button>
|
| | | <i-button |
| | | type="info" |
| | | icon="ios-lock" |
| | | :disabled="saveState.isDisabled">保存</i-button>
|
| | | <i-button type="info" @click="routerTo">进入测试</i-button>
|
| | | </div>
|
| | | </footer>
|
| | |
| | | cycleTimes: 0, // 活化次数
|
| | | waitdisTime: 0, // 充完静置
|
| | | waitchrTime: 0, // 放完静置
|
| | | },
|
| | | saveState: {
|
| | | isDisabled: true,
|
| | | isNew: true,
|
| | | }
|
| | | },
|
| | | watch: {
|
| | | testParams: { // 监控测试数据修改保存按钮的状态
|
| | | handler: function() {
|
| | | if(this.saveState.isNew) {
|
| | | this.saveState.isNew = false;
|
| | | }else {
|
| | | this.saveState.isDisabled = false;
|
| | | }
|
| | | },
|
| | | deep: true,
|
| | | }
|
| | | },
|
| | | methods: {
|
| | | setPages: function() {
|
| | | var params = this.params;
|
| | |
| | | },
|
| | | getTestParam: function() {
|
| | | if(typeof(JSInterface) != 'undefined') {
|
| | | // 修改保存按钮的状态
|
| | | this.saveState.isNew = true;
|
| | | this.saveState.isDisabled = true;
|
| | | JSInterface.getTestParam();
|
| | | }else {
|
| | | // bui.alert('请使用手机端登陆!');
|
| | |
| | | },
|
| | | changeBatt: function(item) {
|
| | | var battName = item.fileName;
|
| | | bui.alert(battName);
|
| | | // 关闭面板
|
| | | this.uiSidebar.close();
|
| | | |
| | | |
| | | if(typeof(JSInterface) != 'undefined') {
|
| | | // 显示等待框
|
| | | this.loading.show();
|
| | | // 与后台通信
|
| | | JSInterface.changeBatt(battName);
|
| | | }else {
|
| | | bui.alert("请使用手机端登陆!");
|
| | |
| | |
|
| | | // 设置Worker线程监控
|
| | | this.getTestParamWorker.onmessage = function(res) {
|
| | | // 关闭等待框
|
| | | self.loading.hide();
|
| | | // 数据读取成功
|
| | | if(res.data.code == 1) {
|
| | | var data = res.data.data;
|
| | | self.setActive(data.battName);
|
| | |
| | |
|
| | | // 切换电池参数
|
| | | this.changeBattWorker.onmessage = function(res) {
|
| | | bui.alert(res.data);
|
| | | self.getTestParam();
|
| | | }
|
| | | // 设置高度
|
| | | //this.setTabPaneHt();
|
| | |
| | | }, |
| | | handlerClick: function(item) { |
| | | // 设置被激活的列表 |
| | | this.name = item.fileName; |
| | | // 给列表添加点击事件 |
| | | this.$emit('on-click', item); |
| | | if(this.name != item.fileName) { |
| | | this.name = item.fileName; |
| | | // 给列表添加点击事件 |
| | | this.$emit('on-click', item); |
| | | } |
| | | |
| | | } |
| | | }, |
| | | }); |
| | |
| | | </main>
|
| | | <footer>
|
| | | <div class="footer-inner" style="height: 50px; padding: 8px; text-align: right;">
|
| | | <i-button type="info" icon="ios-lock" disabled>保存</i-button>
|
| | | <i-button |
| | | type="info" |
| | | icon="ios-lock" |
| | | :disabled="saveState.isDisabled">保存</i-button>
|
| | | <i-button type="info" @click="routerTo">进入测试</i-button>
|
| | | </div>
|
| | | </footer>
|
| | |
| | | cycleTimes: 0, // 活化次数
|
| | | waitdisTime: 0, // 充完静置
|
| | | waitchrTime: 0, // 放完静置
|
| | | },
|
| | | saveState: {
|
| | | isDisabled: true,
|
| | | isNew: true,
|
| | | }
|
| | | },
|
| | | watch: {
|
| | | testParams: { // 监控测试数据修改保存按钮的状态
|
| | | handler: function() {
|
| | | if(this.saveState.isNew) {
|
| | | this.saveState.isNew = false;
|
| | | }else {
|
| | | this.saveState.isDisabled = false;
|
| | | }
|
| | | },
|
| | | deep: true,
|
| | | }
|
| | | },
|
| | | methods: {
|
| | | setPages: function() {
|
| | | var params = this.params;
|
| | |
| | | },
|
| | | getTestParam: function() {
|
| | | if(typeof(JSInterface) != 'undefined') {
|
| | | // 修改保存按钮的状态
|
| | | this.saveState.isNew = true;
|
| | | this.saveState.isDisabled = true;
|
| | | JSInterface.getTestParam();
|
| | | }else {
|
| | | // bui.alert('请使用手机端登陆!');
|
| | |
| | | },
|
| | | changeBatt: function(item) {
|
| | | var battName = item.fileName;
|
| | | bui.alert(battName);
|
| | | // 关闭面板
|
| | | this.uiSidebar.close();
|
| | | |
| | | |
| | | if(typeof(JSInterface) != 'undefined') {
|
| | | // 显示等待框
|
| | | this.loading.show();
|
| | | // 与后台通信
|
| | | JSInterface.changeBatt(battName);
|
| | | }else {
|
| | | bui.alert("请使用手机端登陆!");
|
| | |
| | |
|
| | | // 设置Worker线程监控
|
| | | this.getTestParamWorker.onmessage = function(res) {
|
| | | // 关闭等待框
|
| | | self.loading.hide();
|
| | | // 数据读取成功
|
| | | if(res.data.code == 1) {
|
| | | var data = res.data.data;
|
| | | self.setActive(data.battName);
|
| | |
| | |
|
| | | // 切换电池参数
|
| | | this.changeBattWorker.onmessage = function(res) {
|
| | | bui.alert(res.data);
|
| | | self.getTestParam();
|
| | | }
|
| | | // 设置高度
|
| | | //this.setTabPaneHt();
|