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

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

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

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

@ -18,6 +18,7 @@
<span v-if="rowData.protocol == '65284'"> </span>
<span v-if="rowData.protocol == '65285'"> </span>
<span v-if="rowData.protocol == '65286'"> </span>
<span v-if="rowData.protocol == '65290'"> v2020 </span>
</span>
</div>
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
@ -697,6 +698,43 @@
>
</div>
</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>
<div slot="footer" class="dialog-footer">
<el-button @click="isShow = false"> </el-button>
@ -710,6 +748,7 @@ import {
setTermCamera,
getTermCameraRequest,
getChannelListJoggle,
listApk,
} from "@/utils/api/index";
import imageCapture from "./imageCapture.vue";
@ -857,6 +896,18 @@ export default {
i: 0,
tabName: "装置时间",
roleUser: "",
//
ugradLoading: false,
upgradationform: {
upVal: "",
},
selectUpObj: {},
upgradationRules: {
upVal: [
{ required: true, message: "请选择升级文件", trigger: "change" },
],
},
upOptions: [],
};
},
mounted() {},
@ -886,6 +937,8 @@ export default {
console.log("视频采集参数");
this.$refs.videoCaptureref.getSingleAccess(this.rowData);
this.$refs.videoCaptureref.getRatio(this.rowData);
} else if (tab.label == "升级") {
this.getUpgradeList();
}
this.tabName = tab.label;
},
@ -1558,6 +1611,7 @@ export default {
this.waterSetLoading = false;
this.osdLoading = false;
this.osdSetLoading = false;
this.ugradLoading = false;
console.log("终止轮询");
// && res.data.result == 255
console.log(JSON.parse(res.data.data));
@ -1629,6 +1683,7 @@ export default {
this.waterSetLoading = false;
this.osdLoading = false;
this.osdSetLoading = false;
this.ugradLoading = false;
}
})
.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) {
this.isShow = true;
this.rowData = val;
@ -1727,6 +1822,7 @@ export default {
this.statusLoading = false;
this.waterLoading = false;
this.waterSetLoading = false;
this.ugradLoading = false;
},
},
destroyed() {
@ -1796,6 +1892,19 @@ export default {
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 {
color: #666;
}
@ -1834,4 +1943,11 @@ export default {
}
}
}
.el-select-dropdown__item {
i {
margin-left: 8px;
font-size: 12px;
font-style: normal;
}
}
</style>

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

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

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

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

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

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

Loading…
Cancel
Save