role1.0
fanluyan 1 year ago
parent 8c5ce46d94
commit ee82d0fc81

@ -877,13 +877,24 @@ export function uploadApk(data) {
url: "/xymanager/uploadApk", url: "/xymanager/uploadApk",
method: "post", method: "post",
data, data,
headers: {
"Content-Type": "multipart/form-data", // set the content type to multipart/form-data
},
}); });
} }
//下发apk //修改apk
export function issueApk(data) { export function updateApkApi(data) {
return request({
url: "/xymanager/updateApk",
method: "post",
data,
});
}
//删除apk
export function deleteApkApi(data) {
return request({ return request({
url: "/xymanager/issueApk", url: "/xymanager/deleteApk",
method: "post", method: "post",
data, data,
}); });

@ -421,8 +421,9 @@ export default {
}); });
}); });
} else { } else {
console.log(this.formInfo); if (this.formInfo.list[0].id == "") {
this.$set(this.formInfo, "list", []);
}
updateTerminalJoggle(this.formInfo) updateTerminalJoggle(this.formInfo)
.then((res) => { .then((res) => {
this.isShow = false; this.isShow = false;

@ -61,25 +61,30 @@
<el-table-column prop="updateTimeStr" label="采集时间" min-width="140"> <el-table-column prop="updateTimeStr" label="采集时间" min-width="140">
</el-table-column> </el-table-column>
<el-table-column label="装置型号" show-overflow-tooltip> <el-table-column prop="equip_name" label="装置名称" min-width="140">
<span>MSRDT-1-WP</span>
</el-table-column> </el-table-column>
<el-table-column prop="model" label="装置型号" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="bsId"
label="出厂编号"
show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
prop="version" prop="version"
label="版本号" label="基本信息版本号"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column prop="name" label="生产厂家">
<span>上海欣影</span>
</el-table-column>
<el-table-column <el-table-column
prop="name" prop="protocolVersion"
label="生产日期" label="通信协议版本号"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column prop="bsManu" label="生产厂家"> </el-table-column>
<el-table-column <el-table-column
prop="bsId" prop="productionDate"
label="出厂编号" label="生产日期"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
</el-table> </el-table>

@ -18,6 +18,7 @@
<span v-if="rowData.protocol == '65284'"> </span> <span v-if="rowData.protocol == '65284'"> </span>
<span v-if="rowData.protocol == '65285'"> </span> <span v-if="rowData.protocol == '65285'"> </span>
<span v-if="rowData.protocol == '65286'"> </span> <span v-if="rowData.protocol == '65286'"> </span>
<span v-if="rowData.protocol == '65290'"> v2020 </span>
</span> </span>
</div> </div>
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
@ -697,6 +698,43 @@
> >
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="升级" name="12">
<div class="tabsBox">
<div class="queryParam upgradBox">
<el-form
:model="upgradationform"
:rules="upgradationRules"
ref="upgradationRuleForm"
>
<el-form-item label="文件名称" prop="upVal">
<el-select
v-model="upgradationform.upVal"
placeholder="请选择升级文件"
@change="selectChanged"
>
<el-option
v-for="item in upOptions"
:key="item.id"
:label="item.name"
:value="item.path"
:title="item.title"
>
{{ item.name }}
<i class="title">{{ item.title }}</i
><i class="time">{{ item.uploadDate }}</i>
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-button
type="primary"
:loading="ugradLoading"
@click="handleupgradation"
> </el-button
>
</div>
</div>
</el-tab-pane>
</el-tabs> </el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="isShow = false"> </el-button> <el-button @click="isShow = false"> </el-button>
@ -710,6 +748,7 @@ import {
setTermCamera, setTermCamera,
getTermCameraRequest, getTermCameraRequest,
getChannelListJoggle, getChannelListJoggle,
listApk,
} from "@/utils/api/index"; } from "@/utils/api/index";
import imageCapture from "./imageCapture.vue"; import imageCapture from "./imageCapture.vue";
@ -857,6 +896,18 @@ export default {
i: 0, i: 0,
tabName: "装置时间", tabName: "装置时间",
roleUser: "", roleUser: "",
//
ugradLoading: false,
upgradationform: {
upVal: "",
},
selectUpObj: {},
upgradationRules: {
upVal: [
{ required: true, message: "请选择升级文件", trigger: "change" },
],
},
upOptions: [],
}; };
}, },
mounted() {}, mounted() {},
@ -886,6 +937,8 @@ export default {
console.log("视频采集参数"); console.log("视频采集参数");
this.$refs.videoCaptureref.getSingleAccess(this.rowData); this.$refs.videoCaptureref.getSingleAccess(this.rowData);
this.$refs.videoCaptureref.getRatio(this.rowData); this.$refs.videoCaptureref.getRatio(this.rowData);
} else if (tab.label == "升级") {
this.getUpgradeList();
} }
this.tabName = tab.label; this.tabName = tab.label;
}, },
@ -1558,6 +1611,7 @@ export default {
this.waterSetLoading = false; this.waterSetLoading = false;
this.osdLoading = false; this.osdLoading = false;
this.osdSetLoading = false; this.osdSetLoading = false;
this.ugradLoading = false;
console.log("终止轮询"); console.log("终止轮询");
// && res.data.result == 255 // && res.data.result == 255
console.log(JSON.parse(res.data.data)); console.log(JSON.parse(res.data.data));
@ -1629,6 +1683,7 @@ export default {
this.waterSetLoading = false; this.waterSetLoading = false;
this.osdLoading = false; this.osdLoading = false;
this.osdSetLoading = false; this.osdSetLoading = false;
this.ugradLoading = false;
} }
}) })
.catch((err) => {}); .catch((err) => {});
@ -1690,6 +1745,46 @@ export default {
// }); // });
}); });
}, },
//apkList
getUpgradeList() {
listApk({
pageindex: 1,
pagesize: 2000,
})
.then((res) => {
console.log(res);
this.upOptions = res.data.list;
})
.catch((err) => {});
},
selectChanged(val) {
console.log(val);
// object
this.selectUpObj = this.upOptions.find((item) => {
return item["path"] === val;
});
console.log(this.selectUpObj);
},
//
handleupgradation() {
console.log(this.upgradationform.upVal);
this.$refs.upgradationRuleForm.validate((valid) => {
if (valid) {
this.ugradLoading = true;
let params = [
{
name: "act",
value: "upgrade",
},
{
name: "file",
value: this.upgradationform.upVal,
},
];
this.setTermFn(params);
}
});
},
display(val) { display(val) {
this.isShow = true; this.isShow = true;
this.rowData = val; this.rowData = val;
@ -1727,6 +1822,7 @@ export default {
this.statusLoading = false; this.statusLoading = false;
this.waterLoading = false; this.waterLoading = false;
this.waterSetLoading = false; this.waterSetLoading = false;
this.ugradLoading = false;
}, },
}, },
destroyed() { destroyed() {
@ -1796,6 +1892,19 @@ export default {
background-color: #169e8c; background-color: #169e8c;
} }
} }
.upgradBox {
// display: flex;
// flex-direction: column;
// align-items: center;
.el-select {
.el-input {
width: 316px;
}
}
.el-button--primary {
margin-left: 76px;
}
}
.el-input.is-disabled .el-input__inner { .el-input.is-disabled .el-input__inner {
color: #666; color: #666;
} }
@ -1834,4 +1943,11 @@ export default {
} }
} }
} }
.el-select-dropdown__item {
i {
margin-left: 8px;
font-size: 12px;
font-style: normal;
}
}
</style> </style>

@ -10,6 +10,7 @@
<span v-if="protocolInfo == '65284'"> </span> <span v-if="protocolInfo == '65284'"> </span>
<span v-if="protocolInfo == '65285'"> </span> <span v-if="protocolInfo == '65285'"> </span>
<span v-if="protocolInfo == '65286'"> </span> <span v-if="protocolInfo == '65286'"> </span>
<span v-if="protocolInfo == '65290'"> v2020 </span>
<!-- <span>({{ terminalPhoto.length }})</span> --> <!-- <span>({{ terminalPhoto.length }})</span> -->
</div> </div>
<div class="topPic"> <div class="topPic">

@ -18,7 +18,6 @@
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
format="yyyy 年 MM 月 dd 日" format="yyyy 年 MM 月 dd 日"
value-format="timestamp"
:picker-options="pickerOptions" :picker-options="pickerOptions"
@change="changedate" @change="changedate"
@focus="handleDateFocus" @focus="handleDateFocus"
@ -292,7 +291,7 @@ export default {
}, },
// //
changedate() { changedate() {
console.log(this.dateValue); console.log(this.dateValue.getTime());
this.$parent.getPhotoList( this.$parent.getPhotoList(
this.selectChannelValue, this.selectChannelValue,
this.dateValue, this.dateValue,
@ -311,7 +310,7 @@ export default {
this.channelListOption = this.channelListOption.concat(res.data.list); this.channelListOption = this.channelListOption.concat(res.data.list);
console.log(this.channelListOption); console.log(this.channelListOption);
this.channelfocalOpyion = res.data.list; // this.channelfocalOpyion = res.data.list; //
this.channelarrValue = this.channelfocalOpyion[0].channelid;
this.selectChannelValue = this.channelListOption[0].channelid; //; this.selectChannelValue = this.channelListOption[0].channelid; //;
this.$store.commit("channelId", this.selectChannelValue); //vuex this.$store.commit("channelId", this.selectChannelValue); //vuex
this.$store.commit("channelIdList", res.data.list); //vuex this.$store.commit("channelIdList", res.data.list); //vuex
@ -323,6 +322,12 @@ export default {
this.selectDyId = res.data.dyId; this.selectDyId = res.data.dyId;
this.selectLineId = res.data.lineId; this.selectLineId = res.data.lineId;
//this.selectTowerId = res.data.towerId; //this.selectTowerId = res.data.towerId;
if (res.data.list.length == 0) {
this.channelarrValue = null;
return;
} else {
this.channelarrValue = this.channelfocalOpyion[0].channelid;
}
}) })
.catch((err) => { .catch((err) => {
console.log(err); // console.log(err); //

@ -61,6 +61,9 @@
><i class="el-icon-refresh"></i>刷新装置时间表</el-button ><i class="el-icon-refresh"></i>刷新装置时间表</el-button
></span ></span
> >
<el-button v-else type="primary" @click="deviceTimeClick"
>装置时间表</el-button
>
</h3> </h3>
<div class="tagsBox" v-if="deviceTimeList.length !== 0"> <div class="tagsBox" v-if="deviceTimeList.length !== 0">
<el-tag v-for="(item, index) in deviceTimeList" :key="index">{{ <el-tag v-for="(item, index) in deviceTimeList" :key="index">{{
@ -68,11 +71,7 @@
}}</el-tag> }}</el-tag>
</div> </div>
<div class="nodata" v-else> <div class="nodata" v-else>
<el-empty description="暂无数据"> <el-empty description="暂无数据"> </el-empty>
<el-button type="primary" @click="deviceTimeClick"
>装置时间表</el-button
>
</el-empty>
</div> </div>
</div> </div>
</div> </div>
@ -870,10 +869,12 @@ export default {
// //
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val; this.page = val;
this.getruleList();
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val; this.pageSize = val;
this.getruleList();
}, },
}, },
}; };

@ -88,7 +88,7 @@
>{{ node.label }} >{{ node.label }}
<span class="num" v-if="node.level === 2 && data.bsManufacturer" <span class="num" v-if="node.level === 2 && data.bsManufacturer"
>({{ data.list.length }}) >({{ data.list.length }} )
</span> </span>
</span> </span>
</span> </span>

@ -6,14 +6,12 @@
<el-upload <el-upload
class="upload-demo" class="upload-demo"
ref="upload" ref="upload"
action="/web/api/uploadFile.php" action="#"
:http-request="customUpload"
:limit="1" :limit="1"
:file-list="fileList" :file-list="fileList"
:data="reportData" :data="reportData"
:on-progress="handleProgress"
:auto-upload="false" :auto-upload="false"
:on-success="handleAvatarSuccess"
@before-upload="beforeAvatarUpload"
> >
<el-button slot="trigger" size="small" type="primary" <el-button slot="trigger" size="small" type="primary"
>选取文件</el-button >选取文件</el-button
@ -53,7 +51,7 @@
<el-table-column type="index" width="50" label="序号"> <el-table-column type="index" width="50" label="序号">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="uploadDate"
label="创建时间" label="创建时间"
width="180" width="180"
></el-table-column> ></el-table-column>
@ -124,7 +122,12 @@
</div> </div>
</template> </template>
<script> <script>
import { listApk } from "@/utils/api/index"; import {
listApk,
uploadApk,
updateApkApi,
deleteApkApi,
} from "@/utils/api/index";
export default { export default {
name: "deviceUpgrade", name: "deviceUpgrade",
@ -184,38 +187,82 @@ export default {
} else { } else {
this.progress = Math.round(event.percent); this.progress = Math.round(event.percent);
} }
// //
console.log(this.progress); // 使使 console.log(this.progress); // 使使
}, },
// // //
beforeAvatarUpload(file) { // beforeAvatarUpload(file) {
console.log(this.reportData.title); // console.log(this.reportData.title);
console.log(file); // console.log(file);
}, // },
//apk //apk
submitUpload() { submitUpload() {
//console.log(); //console.log();
this.$refs.upload.submit(); this.$refs.upload.submit();
}, },
handleAvatarSuccess(res, file) { customUpload(options) {
this.progressLoading = false; console.log(options);
console.log(res); const formData = new FormData();
this.$message({ formData.append("file", options.file);
duration: 1500, formData.append("title", this.reportData.title); //
showClose: true, console.log(formData);
message: "文件上传成功", uploadApk(formData)
type: "success", .then((res) => {
}); console.log(res);
this.reportData.title = ""; // this.progressLoading = true;
this.$refs.upload.clearFiles(); if (res.code == 200) {
this.getUpgradeList(); this.$message({
duration: 1500,
showClose: true,
message: "文件上传成功",
type: "success",
});
this.reportData.title = "";
this.$refs.upload.clearFiles();
this.getUpgradeList();
// this.progressLoading = false;
} else {
this.$message({
duration: 1500,
showClose: true,
message: res.msg,
type: "error",
});
this.reportData.title = "";
this.$refs.upload.clearFiles();
}
})
.catch((error) => {});
}, },
// handleAvatarSuccess(res, file) {
// this.progressLoading = false;
// console.log(res);
// if (res.code == 200) {
// this.$message({
// duration: 1500,
// showClose: true,
// message: "",
// type: "success",
// });
// this.reportData.title = "";
// this.$refs.upload.clearFiles();
// this.getUpgradeList();
// } else {
// this.$message({
// duration: 1500,
// showClose: true,
// message: res.msg,
// type: "error",
// });
// this.reportData.title = "";
// this.$refs.upload.clearFiles();
// }
// },
getUpgradeList() { getUpgradeList() {
this.fileloading = true; this.fileloading = true;
listApk({ listApk({
pageindex: 1, pageindex: 1,
pagesize: 20, pagesize: 2000,
}) })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
@ -225,8 +272,7 @@ export default {
.catch((err) => {}); .catch((err) => {});
}, },
handleDeleteClick(row) { handleDeleteClick(row) {
getupdUpgradeApi({ deleteApkApi({
act: "del",
id: row.id, id: row.id,
}) })
.then((res) => { .then((res) => {
@ -259,8 +305,7 @@ export default {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
console.log(this.ruleForm.notesNewVal); console.log(this.ruleForm.notesNewVal);
getupdUpgradeApi({ updateApkApi({
act: "edt",
id: this.rowData.id, id: this.rowData.id,
title: this.ruleForm.notesNewVal, title: this.ruleForm.notesNewVal,
}) })
@ -350,6 +395,12 @@ export default {
.uploadBtn { .uploadBtn {
margin-left: 12px; margin-left: 12px;
} }
.uploadForm {
.el-button--default,
.el-button--primary {
width: auto;
}
}
.uploadList { .uploadList {
margin-top: 20px; margin-top: 20px;
height: calc(100% - 100px); height: calc(100% - 100px);
@ -383,9 +434,9 @@ export default {
height: 100%; height: 100%;
} }
} }
.el-button--default,
.el-button--primary { .el-table::before {
width: auto; height: 1px !important;
} }
} }
.el-dialog__headerbtn { .el-dialog__headerbtn {

@ -22,12 +22,12 @@ module.exports = defineConfig({
"/api": { "/api": {
//表示拦截以/api开头的请求路径 //表示拦截以/api开头的请求路径
//target: "http://47.96.238.157:8093", //阿里云服务器环境 //target: "http://47.96.238.157:8093", //阿里云服务器环境
//target: "http://180.166.218.222:40080", //dell target: "http://180.166.218.222:40080", //dell
target: "http://192.168.50.7:8094", //liu 本机ip //target: "http://192.168.50.7:8094", //liu 本机ip
// target: "http://192.168.50.42:81", //东视 // target: "http://192.168.50.42:81", //东视
changOrigin: true, //是否开启跨域 changOrigin: true, //是否开启跨域
pathRewrite: { pathRewrite: {
"^/api": "", //重写api把api变成空字符因为我们真正请求的路径是没有api的 "^/api": "/api", //重写api把api变成空字符因为我们真正请求的路径是没有api的
}, },
}, },
}, },

Loading…
Cancel
Save