|
|
@ -785,6 +785,44 @@
|
|
|
|
<el-button @click="upgradationVisible = false">取 消</el-button>
|
|
|
|
<el-button @click="upgradationVisible = false">取 消</el-button>
|
|
|
|
<el-button type="primary" @click="handleupgradation">确 定</el-button>
|
|
|
|
<el-button type="primary" @click="handleupgradation">确 定</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<!-- 升级 -->
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
|
|
class="upDialogBox"
|
|
|
|
|
|
|
|
title="请选择OTA升级文件"
|
|
|
|
|
|
|
|
:visible.sync="upgradationVisibleOta"
|
|
|
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
|
|
|
width="30%"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
|
|
:model="upgradationformOta"
|
|
|
|
|
|
|
|
:rules="upgradationRulesOta"
|
|
|
|
|
|
|
|
ref="upgradationRuleFormOta"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-form-item label="文件名称" prop="upVal">
|
|
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="upgradationformOta.upVal"
|
|
|
|
|
|
|
|
placeholder="请选择升级文件"
|
|
|
|
|
|
|
|
@change="selectChangedOta"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in upOptionsOta"
|
|
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
|
|
:label="item.fileName"
|
|
|
|
|
|
|
|
:value="item.path"
|
|
|
|
|
|
|
|
:title="item.title"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{{ item.fileName }}
|
|
|
|
|
|
|
|
<i class="title">({{ item.title }}</i
|
|
|
|
|
|
|
|
><i class="time">{{ item.createTime }})</i>
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button @click="upgradationVisibleOta = false">取 消</el-button>
|
|
|
|
|
|
|
|
<el-button type="primary" @click="handleupgradationOta">确 定</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
<!-- 开启frpc服务器 -->
|
|
|
|
<!-- 开启frpc服务器 -->
|
|
|
|
<el-dialog
|
|
|
|
<el-dialog
|
|
|
@ -919,6 +957,7 @@ export default {
|
|
|
|
i1_cmd_set_i1_heart_beat_time: "设置心跳周期",
|
|
|
|
i1_cmd_set_i1_heart_beat_time: "设置心跳周期",
|
|
|
|
yw_cmd_upload_i1_zip_log: "上传日志",
|
|
|
|
yw_cmd_upload_i1_zip_log: "上传日志",
|
|
|
|
upgrade: "升级",
|
|
|
|
upgrade: "升级",
|
|
|
|
|
|
|
|
updOta: "Ota升级",
|
|
|
|
yw_cmd_start_frpc: "开启frpc",
|
|
|
|
yw_cmd_start_frpc: "开启frpc",
|
|
|
|
yw_cmd_stop_frpc: "停止frpc",
|
|
|
|
yw_cmd_stop_frpc: "停止frpc",
|
|
|
|
i1_cmd_stop_aging_test: "停止老化测试",
|
|
|
|
i1_cmd_stop_aging_test: "停止老化测试",
|
|
|
@ -974,6 +1013,7 @@ export default {
|
|
|
|
{ id: 5, name: "设置心跳周期" },
|
|
|
|
{ id: 5, name: "设置心跳周期" },
|
|
|
|
{ id: 6, name: "上传日志" },
|
|
|
|
{ id: 6, name: "上传日志" },
|
|
|
|
{ id: 7, name: "升级" },
|
|
|
|
{ id: 7, name: "升级" },
|
|
|
|
|
|
|
|
{ id: 11, name: "OTA升级" },
|
|
|
|
{ id: 8, name: "开启frpc" },
|
|
|
|
{ id: 8, name: "开启frpc" },
|
|
|
|
{ id: 9, name: "停止frpc" },
|
|
|
|
{ id: 9, name: "停止frpc" },
|
|
|
|
{ id: 10, name: "停止老化测试" },
|
|
|
|
{ id: 10, name: "停止老化测试" },
|
|
|
@ -1037,6 +1077,7 @@ export default {
|
|
|
|
upgradationform: {
|
|
|
|
upgradationform: {
|
|
|
|
upVal: "",
|
|
|
|
upVal: "",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
selectUpObj: {},
|
|
|
|
selectUpObj: {},
|
|
|
|
upgradationRules: {
|
|
|
|
upgradationRules: {
|
|
|
|
upVal: [
|
|
|
|
upVal: [
|
|
|
@ -1044,6 +1085,18 @@ export default {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
upOptions: [],
|
|
|
|
upOptions: [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
upgradationVisibleOta: false,
|
|
|
|
|
|
|
|
upgradationformOta: {
|
|
|
|
|
|
|
|
upVal: "",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
upgradationRulesOta: {
|
|
|
|
|
|
|
|
upVal: [
|
|
|
|
|
|
|
|
{ required: true, message: "请选择升级文件", trigger: "change" },
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
selectUpObjOta: {},
|
|
|
|
|
|
|
|
upOptionsOta: [],
|
|
|
|
//设置frpc服务器
|
|
|
|
//设置frpc服务器
|
|
|
|
frpcVisible: false,
|
|
|
|
frpcVisible: false,
|
|
|
|
frpcform: {
|
|
|
|
frpcform: {
|
|
|
@ -1592,6 +1645,11 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.changeIssue(params);
|
|
|
|
this.changeIssue(params);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case 11:
|
|
|
|
|
|
|
|
console.log("升级Ota");
|
|
|
|
|
|
|
|
this.upgradationVisibleOta = true;
|
|
|
|
|
|
|
|
this.getUpgradeOtaList();
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//执行操作
|
|
|
|
//执行操作
|
|
|
@ -1657,10 +1715,20 @@ export default {
|
|
|
|
getqueryUpgradesApi()
|
|
|
|
getqueryUpgradesApi()
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
console.log(res);
|
|
|
|
console.log(res);
|
|
|
|
this.upOptions = res.data;
|
|
|
|
this.upOptions = res.data.filter(item => item.type === "0");
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch((err) => {});
|
|
|
|
.catch((err) => {});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
//获取Ota升级apkList
|
|
|
|
|
|
|
|
getUpgradeOtaList() {
|
|
|
|
|
|
|
|
getqueryUpgradesApi()
|
|
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
this.upOptionsOta = res.data.filter(item => item.type === "1");
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
selectChanged(val) {
|
|
|
|
selectChanged(val) {
|
|
|
|
console.log(val);
|
|
|
|
console.log(val);
|
|
|
|
// 找到选中项的整个object对象
|
|
|
|
// 找到选中项的整个object对象
|
|
|
@ -1669,6 +1737,14 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
console.log(this.selectUpObj);
|
|
|
|
console.log(this.selectUpObj);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
selectChangedOta(val) {
|
|
|
|
|
|
|
|
console.log(val);
|
|
|
|
|
|
|
|
// 找到选中项的整个object对象
|
|
|
|
|
|
|
|
this.selectUpObjOta = this.upOptionsOta.find((item) => {
|
|
|
|
|
|
|
|
return item["path"] === val;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
console.log(this.selectUpObj);
|
|
|
|
|
|
|
|
},
|
|
|
|
//升级确定阿
|
|
|
|
//升级确定阿
|
|
|
|
handleupgradation() {
|
|
|
|
handleupgradation() {
|
|
|
|
this.$refs.upgradationRuleForm.validate((valid) => {
|
|
|
|
this.$refs.upgradationRuleForm.validate((valid) => {
|
|
|
@ -1684,6 +1760,22 @@ export default {
|
|
|
|
this.upgradationVisible = false;
|
|
|
|
this.upgradationVisible = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//升级OTa确定阿
|
|
|
|
|
|
|
|
handleupgradationOta() {
|
|
|
|
|
|
|
|
this.$refs.upgradationRuleFormOta.validate((valid) => {
|
|
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
var params = {
|
|
|
|
|
|
|
|
act: "upd-ota",
|
|
|
|
|
|
|
|
url: this.upgradationformOta.upVal,
|
|
|
|
|
|
|
|
md5: this.selectUpObjOta.md5,
|
|
|
|
|
|
|
|
fn: this.selectUpObjOta.fileName,
|
|
|
|
|
|
|
|
termIds: this.idArray.join("-"),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.changeIssue(params);
|
|
|
|
|
|
|
|
this.upgradationVisibleOta = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//点击模板
|
|
|
|
//点击模板
|
|
|
|
handleModelForm() {
|
|
|
|
handleModelForm() {
|
|
|
|