|
|
|
@ -847,6 +847,96 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- 装置详细信息 -->
|
|
|
|
|
<rowMsgDialog ref="rowMsgDialogref"></rowMsgDialog>
|
|
|
|
|
<!-- 删除文件 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="删除文件"
|
|
|
|
|
:visible.sync="deleteFileVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
width="30%"
|
|
|
|
|
>
|
|
|
|
|
<el-form
|
|
|
|
|
:model="delFileForm"
|
|
|
|
|
ref="delFileFormref"
|
|
|
|
|
:rules="delFileRules"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="删除文件路径:" prop="delFile">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="delFileForm.delFile"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="deleteFileVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="handleDelete">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 下载文件 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="上传文件"
|
|
|
|
|
:visible.sync="pullFileVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
width="30%"
|
|
|
|
|
>
|
|
|
|
|
<el-form
|
|
|
|
|
:model="pullFileForm"
|
|
|
|
|
ref="pullFileFormref"
|
|
|
|
|
:rules="pullFileRules"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="文件路径:" prop="pullFile">
|
|
|
|
|
<el-input
|
|
|
|
|
type="textarea"
|
|
|
|
|
:autosize="{ minRows: 2, maxRows: 4}"
|
|
|
|
|
v-model="pullFileForm.pullFile"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="pullFileVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="handlePull">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 上传文件base64 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
class="pushBoxDialog"
|
|
|
|
|
title="下发文件"
|
|
|
|
|
:visible.sync="pushFileVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
width="454px"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<el-form
|
|
|
|
|
:model="pushFileForm"
|
|
|
|
|
ref="pushFileFormref"
|
|
|
|
|
:rules="pushFileRules"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="文件路径:" prop="name">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="pushFileForm.name"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="文件上传:" >
|
|
|
|
|
<el-upload
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
ref="upload"
|
|
|
|
|
action="#"
|
|
|
|
|
:limit="1"
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
:before-upload="beforeUpload"
|
|
|
|
|
:auto-upload="false"
|
|
|
|
|
>
|
|
|
|
|
<el-button slot="trigger" size="small" type="primary"
|
|
|
|
|
>选取文件</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="pullFileVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="handlePush">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -912,6 +1002,9 @@ export default {
|
|
|
|
|
yw_cmd_start_frpc: "开启frpc",
|
|
|
|
|
yw_cmd_stop_frpc: "停止frpc",
|
|
|
|
|
i1_cmd_stop_aging_test: "停止老化测试",
|
|
|
|
|
del_file: "删除文件",
|
|
|
|
|
upload_file: "上传文件",
|
|
|
|
|
download_file: "下发文件",
|
|
|
|
|
},
|
|
|
|
|
taskdrawer: false,
|
|
|
|
|
drawer: false,
|
|
|
|
@ -958,7 +1051,9 @@ export default {
|
|
|
|
|
notecheck: false,
|
|
|
|
|
lastIpcheck: false,
|
|
|
|
|
//运维操作列表
|
|
|
|
|
operateOptions:[],
|
|
|
|
|
operateOptions:[
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
formIssue: {
|
|
|
|
|
operate: "",
|
|
|
|
@ -1106,6 +1201,52 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
newupdatatime: null,
|
|
|
|
|
cellIndex: null,
|
|
|
|
|
|
|
|
|
|
//设置删除文件
|
|
|
|
|
deleteFileVisible: false,
|
|
|
|
|
delFileForm: {
|
|
|
|
|
delFile: "",
|
|
|
|
|
},
|
|
|
|
|
delFileRules: {
|
|
|
|
|
delFile: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请输入文件路径",
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
//下载文件
|
|
|
|
|
pullFileVisible: false,
|
|
|
|
|
pullFileForm: {
|
|
|
|
|
pullFile: "",
|
|
|
|
|
},
|
|
|
|
|
pullFileRules: {
|
|
|
|
|
pullFile: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请输入文件路径",
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
//上传文件base64
|
|
|
|
|
pushFileVisible:false,
|
|
|
|
|
fileList: [],
|
|
|
|
|
pushFileForm:{
|
|
|
|
|
name:"",
|
|
|
|
|
fileData:"",
|
|
|
|
|
},
|
|
|
|
|
pushFileRules: {
|
|
|
|
|
name: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请输入文件路径",
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -1145,6 +1286,7 @@ export default {
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.operateOptions = res.data
|
|
|
|
|
//this.operateOptions = this.operateOptions.concat(res.data);
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
@ -1551,6 +1693,18 @@ export default {
|
|
|
|
|
this.upgradationVisibleOta = true;
|
|
|
|
|
this.getUpgradeOtaList();
|
|
|
|
|
return;
|
|
|
|
|
case 12:
|
|
|
|
|
console.log("删除文件");
|
|
|
|
|
this.deleteFileVisible = true;
|
|
|
|
|
return;
|
|
|
|
|
case 13:
|
|
|
|
|
console.log("上传文件base64");
|
|
|
|
|
this.pullFileVisible = true;
|
|
|
|
|
return;
|
|
|
|
|
case 14:
|
|
|
|
|
console.log("下载文件base64");
|
|
|
|
|
this.pushFileVisible = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//执行操作
|
|
|
|
@ -1714,6 +1868,84 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//删除文件
|
|
|
|
|
handleDelete(){
|
|
|
|
|
console.log(this.$refs.delFileFormref);
|
|
|
|
|
this.$refs.delFileFormref.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
var params = {
|
|
|
|
|
action:"del_file",
|
|
|
|
|
path: this.delFileForm.delFile,
|
|
|
|
|
termIds: this.idArray,
|
|
|
|
|
};
|
|
|
|
|
console.log(params)
|
|
|
|
|
this.changeIssue(params);
|
|
|
|
|
this.deleteFileVisible = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//下载文件
|
|
|
|
|
handlePull(){
|
|
|
|
|
console.log(this.$refs.pullFileFormref);
|
|
|
|
|
this.$refs.pullFileFormref.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
var params = {
|
|
|
|
|
action:"upload_file",
|
|
|
|
|
path: this.pullFileForm.pullFile,
|
|
|
|
|
termIds: this.idArray,
|
|
|
|
|
};
|
|
|
|
|
console.log(params)
|
|
|
|
|
this.changeIssue(params);
|
|
|
|
|
this.pullFileVisible = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//上传文件
|
|
|
|
|
beforeUpload(file) {
|
|
|
|
|
console.log(file)
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
const reader = new FileReader();
|
|
|
|
|
reader.readAsDataURL(file);
|
|
|
|
|
reader.onload = (e) => {
|
|
|
|
|
console.log("asdasdad",e)
|
|
|
|
|
this.pushFileForm.fileData = e.target.result; // Base64 编码的数据
|
|
|
|
|
const base64Index = this.pushFileForm.fileData.indexOf('base64,');
|
|
|
|
|
if (base64Index > 0) {
|
|
|
|
|
// 提取base64编码部分
|
|
|
|
|
const base64Data = this.pushFileForm.fileData.substring(base64Index + 7); // 7 是 "base64," 的长度
|
|
|
|
|
this.pushFileForm.fileData = base64Data; // 保存Base64编码部分
|
|
|
|
|
this.sendToBackend(this.pushFileForm.fileData);
|
|
|
|
|
resolve(true);
|
|
|
|
|
} else {
|
|
|
|
|
// 如果找不到"base64,",则可能不是预期的格式
|
|
|
|
|
reject(new Error('Invalid data URL format'));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
reader.onerror = error => {
|
|
|
|
|
reject(error);
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
sendToBackend(base64Data){
|
|
|
|
|
this.$refs.pushFileFormref.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
var params = {
|
|
|
|
|
action:"download_file",
|
|
|
|
|
path: this.pushFileForm.name,
|
|
|
|
|
content:base64Data,
|
|
|
|
|
termIds: this.idArray,
|
|
|
|
|
};
|
|
|
|
|
console.log(params)
|
|
|
|
|
this.changeIssue(params);
|
|
|
|
|
this.pushFileVisible = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handlePush(){
|
|
|
|
|
this.$refs.upload.submit();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
saveLocalStorage() {
|
|
|
|
|
localStorage.setItem("gycheck", this.gycheck);
|
|
|
|
|
localStorage.setItem("dccheck", this.dccheck);
|
|
|
|
@ -2203,6 +2435,42 @@ export default {
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.pushBoxDialog{
|
|
|
|
|
.el-dialog__body{
|
|
|
|
|
height: 172px;
|
|
|
|
|
}
|
|
|
|
|
.upload-demo {
|
|
|
|
|
position: absolute;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
|
margin-right: 65px;
|
|
|
|
|
top: 36px;
|
|
|
|
|
.el-upload-list {
|
|
|
|
|
width: 320px;
|
|
|
|
|
height: 32px;
|
|
|
|
|
line-height: 32px;
|
|
|
|
|
border: 1px solid #ddd;
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
.el-upload-list__item {
|
|
|
|
|
transition: none;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #606266;
|
|
|
|
|
position: relative;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 32px;
|
|
|
|
|
line-height: 32px;
|
|
|
|
|
margin-top: 0px !important;
|
|
|
|
|
.el-icon-close {
|
|
|
|
|
top: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.contenBoxMsg {
|
|
|
|
|
p {
|
|
|
|
@ -2217,5 +2485,6 @@ export default {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-style: normal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|