This commit is contained in:
陈鹏鹏 2023-09-27 22:26:16 +08:00
parent 894920d2dc
commit d0e932ddee
4 changed files with 159 additions and 105 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -1,5 +1,5 @@
<template>
<div>
<div class="revise">
<div class="past">
<el-text class="past_right">旧密码</el-text>
<el-input
@ -12,6 +12,7 @@
<el-text class="past_right">新密码</el-text>
<el-input
v-model="state.formState.newPassword"
show-password="true"
placeholder="请输入"
style="width: 200px"
/>
@ -21,10 +22,13 @@
<el-input
v-model="state.formState.rePassword"
placeholder="请输入"
show-password="true"
style="width: 200px"
/>
</div>
<el-button @click="onAffirm()">提交</el-button>
<div class="confirm">
<el-button type="primary" @click="onAffirm()">确定</el-button>
</div>
</div>
</template>
@ -47,13 +51,29 @@ const onAffirm = () => {
newPassword: encrypt(state.formState.newPassword),
rePassword: encrypt(state.formState.rePassword),
};
http.post(`/api/upms/admin/edit_password`,user).then((res) => {
http.post(`/api/upms/admin/edit_password`, user).then((res) => {
console.log(res);
if(res.code === 200){
ElMessage.success(res.message);
state.formState = {};
}else{
ElMessage.error(res.message);
}
});
};
</script>
<style lang="scss" scoped>
.revise {
position: absolute;
top: 40%;
left: 45%;
.confirm {
margin-top: 20px;
position: absolute;
right: 1px;
}
}
.past {
display: flex;
margin-top: 20px;

View File

@ -37,13 +37,13 @@
v-model="state.Monitoring"
title="查询条件"
width="30%"
destroy-on-close
@close="stateMonitoring"
>
<el-form
class="form"
ref="ruleFormRef"
:rules="rules"
:model="state.formState"
label-position="left"
label-width="120px"
>
<el-form-item label="在线状态">
@ -76,106 +76,111 @@
<el-button type="primary" @click="onAffirm(ruleFormRef)"
>提交</el-button
>
<el-button @click="stateMonitoring()">取消</el-button>
</div>
</el-form>
</el-dialog>
<!-- 详情 -->
<el-dialog v-model="state.channeldetails" title="查询条件" width="40%">
<el-form
class="form"
ref="ruleFormRef"
:rules="rules"
:model="state.formState"
>
<div class="information" >
<el-form-item label="设备编码:">
<el-text type="primary">{{ form.deviceCode }}</el-text>
</el-form-item>
<el-form-item label="单元类型:">
<el-text type="primary">{{ form.unitType }}</el-text>
</el-form-item>
</div>
<div class="information" >
<el-form-item label="单元序号:">
<el-text type="primary">{{ form.unitSeq }}</el-text>
</el-form-item>
<el-form-item label="通道序号:">
<el-text type="primary">{{ form.channelSeq }}</el-text>
</el-form-item>
</div>
<div class="information" >
<el-form-item label="通道编码:">
<el-text type="primary">{{ form.channelCode }}</el-text>
</el-form-item>
<el-form-item label="通道标识码:">
<el-text type="primary">{{ form.channelSn }}</el-text>
</el-form-item>
</div>
<div class="information" >
<el-form-item label="通道名称:">
<el-text type="primary">{{ form.channelName }}</el-text>
</el-form-item>
<el-form-item label="通道类型:">
<el-text type="primary">{{ form.channelType }}</el-text>
</el-form-item>
</div>
<div class="information" >
<el-form-item label="摄像头类型:">
<el-text type="primary">{{ form.cameraType }}</el-text>
</el-form-item>
<el-form-item label="所属组织编码:">
<el-text type="primary">{{ form.ownerCode }}</el-text>
</el-form-item>
</div>
<div class="information">
<el-form-item label="经度:">
<el-text type="primary">{{ form.gpsX }}</el-text>
</el-form-item>
<el-form-item label="纬度:">
<el-text type="primary">{{ form.gpsY }}</el-text>
</el-form-item>
</div>
<div class="information" >
<el-form-item label="z轴">
<el-text type="primary">{{ form.gpsZ }}</el-text>
</el-form-item>
<el-form-item label="光栅图ID">
<el-text type="primary">{{ form.mapId }}</el-text>
</el-form-item>
</div>
<div class="information" >
<el-form-item label="域ID">
<el-text type="primary">{{ form.domainId }}</el-text>
</el-form-item>
<el-form-item label="描述:">
<el-text type="primary">{{ form.memo }}</el-text>
</el-form-item>
</div>
<div class="information" >
<el-form-item label="状态:">
<el-text type="primary">{{ form.isOnline }}</el-text>
</el-form-item>
<el-form-item label="能力集:">
<el-text type="primary">{{ form.stat }}</el-text>
</el-form-item>
</div>
<div class="information" >
<el-form-item label="是否已经接入:">
<el-text type="primary">{{ form.capability }}</el-text>
</el-form-item>
<el-form-item label="能力集:">
<el-text type="primary">{{ form.access }}</el-text>
</el-form-item>
</div>
<div class="information" >
<el-form-item label="通道详情扩展信息:">
<el-text type="primary">{{ form.chExt}}</el-text>
</el-form-item>
<el-form-item label="是否是虚拟通道:">
<el-text type="primary">{{ form.isVirtual }}</el-text>
</el-form-item>
</div>
</el-form>
<div class="device">
<el-form
ref="ruleFormRef"
:rules="rules"
:model="state.formState"
label-position="left"
label-width="120px"
>
<div class="information">
<el-form-item label="设备编码:">
<el-text type="primary">{{ form.deviceCode }}</el-text>
</el-form-item>
<el-form-item label="单元类型:">
<el-text type="primary">{{ form.unitType }}</el-text>
</el-form-item>
</div>
<div class="information">
<el-form-item label="单元序号:">
<el-text type="primary">{{ form.unitSeq }}</el-text>
</el-form-item>
<el-form-item label="通道序号:">
<el-text type="primary">{{ form.channelSeq }}</el-text>
</el-form-item>
</div>
<div class="information">
<el-form-item label="通道编码:">
<el-text type="primary">{{ form.channelCode }}</el-text>
</el-form-item>
<el-form-item label="通道标识码:">
<el-text type="primary">{{ form.channelSn }}</el-text>
</el-form-item>
</div>
<div class="information">
<el-form-item label="通道名称:">
<el-text type="primary">{{ form.channelName }}</el-text>
</el-form-item>
<el-form-item label="通道类型:">
<el-text type="primary">{{ form.channelType }}</el-text>
</el-form-item>
</div>
<div class="information">
<el-form-item label="摄像头类型:">
<el-text type="primary">{{ form.cameraType }}</el-text>
</el-form-item>
<el-form-item label="所属组织编码:">
<el-text type="primary">{{ form.ownerCode }}</el-text>
</el-form-item>
</div>
<div class="information">
<el-form-item label="经度:">
<el-text type="primary">{{ form.gpsX }}</el-text>
</el-form-item>
<el-form-item label="纬度:">
<el-text type="primary">{{ form.gpsY }}</el-text>
</el-form-item>
</div>
<div class="information">
<el-form-item label="z轴">
<el-text type="primary">{{ form.gpsZ }}</el-text>
</el-form-item>
<el-form-item label="光栅图ID">
<el-text type="primary">{{ form.mapId }}</el-text>
</el-form-item>
</div>
<div class="information">
<el-form-item label="域ID">
<el-text type="primary">{{ form.domainId }}</el-text>
</el-form-item>
<el-form-item label="描述:">
<el-text type="primary">{{ form.memo }}</el-text>
</el-form-item>
</div>
<div class="information">
<el-form-item label="状态:">
<el-text type="primary">{{ form.isOnline }}</el-text>
</el-form-item>
<el-form-item label="能力集:">
<el-text type="primary">{{ form.stat }}</el-text>
</el-form-item>
</div>
<div class="information">
<el-form-item label="是否已经接入:">
<el-text type="primary">{{ form.capability }}</el-text>
</el-form-item>
<el-form-item label="能力集:">
<el-text type="primary">{{ form.access }}</el-text>
</el-form-item>
</div>
<div class="information">
<el-form-item label="通道详情扩展信息:">
<el-text type="primary">{{ form.chExt }}</el-text>
</el-form-item>
<el-form-item label="是否是虚拟通道:">
<el-text type="primary">{{ form.isVirtual }}</el-text>
</el-form-item>
</div>
</el-form>
</div>
</el-dialog>
</div>
</template>
@ -186,6 +191,8 @@ import TableBody from "@/components/TableBody/TableBody.vue";
import http from "../../utils/request";
import tools from "@/utils/tools";
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
const Router = useRouter();
const state = reactive({
Monitoring: false,
channeldetails: false,
@ -323,7 +330,7 @@ const handleTableHeader = ({ type, data }) => {
//
const handleTablePagination = (current) => {
data.pagination.current = current;
onAffirm()
onAffirm();
};
const addNew = () => {
state.Monitoring = true;
@ -335,10 +342,15 @@ const onAffirm = () => {
.post("/api/device/channel/subsystem/page", state.formState)
.then((res) => {
if (res.code == "0") {
state.Monitoring = false;
ElMessage.success(res.errMsg);
data.tableData = res.data.pageData;
data.pagination.current = res.data.currentPage;
data.pagination.pageSize = res.data.pageSize;
data.pagination.total = res.data.totalRows;
} else if (res.code === 600) {
ElMessage.error(res.message);
Router.push("/web/xgmm");
}
});
};
@ -347,6 +359,10 @@ const handleGg = (obj) => {
form.value = obj;
state.channeldetails = true;
};
const stateMonitoring = () => {
state.Monitoring = false;
state.formState = {};
};
onMounted(() => {
onAffirm();
});
@ -359,8 +375,14 @@ onMounted(() => {
width: 150px;
}
}
.information{
.information {
display: flex;
justify-content: space-around;
.el-form-item {
width: 350px;
}
}
.device {
max-height: 450px;
overflow-y: auto;
}
</style>

View File

@ -76,7 +76,7 @@
<el-form-item label="视频通道编码" prop="channelId">
<el-input v-model="state.formState.channelId" style="width: 220px" />
</el-form-item>
<el-form-item label="流通编码" prop="channelId">
<el-form-item label="流通编码" prop="type">
<el-select
v-model="state.formState.type"
placeholder="请选择"
@ -90,10 +90,10 @@
</el-select>
</el-form-item>
<div style="display: flex; justify-content: center">
<el-button @click="stateMonitoring()">取消</el-button>
<el-button type="primary" @click="onAffirm(ruleFormRef)"
>提交</el-button
>
<el-button @click="stateMonitoring()">取消</el-button>
</div>
</el-form>
</el-dialog>
@ -103,9 +103,11 @@
import { ref, reactive, onMounted } from "vue";
// import { message } from "ant-design-vue";
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
import TableBody from "@/components/TableBody/TableBody.vue";
import http from "@/utils/request";
import tools from "@/utils/tools";
const Router = useRouter();
const state = reactive({
Monitoring: false,
formState: {
@ -142,6 +144,13 @@ const rules = reactive({
trigger: "blur",
},
],
type : [
{
required: true,
message: "不能为空",
trigger: "blur",
},
],
});
const data = reactive({
@ -273,6 +282,9 @@ const get = () => {
data.pagination.current = res.data.current;
data.pagination.pageSize = res.data.size;
data.pagination.total = res.data.total;
}else if (res.code === 600){
ElMessage.error(res.message);
Router.push("/web/xgmm");
}
});
};