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

View File

@ -37,13 +37,13 @@
v-model="state.Monitoring" v-model="state.Monitoring"
title="查询条件" title="查询条件"
width="30%" width="30%"
destroy-on-close @close="stateMonitoring"
> >
<el-form <el-form
class="form"
ref="ruleFormRef" ref="ruleFormRef"
:rules="rules" :rules="rules"
:model="state.formState" :model="state.formState"
label-position="left"
label-width="120px" label-width="120px"
> >
<el-form-item label="在线状态"> <el-form-item label="在线状态">
@ -76,18 +76,22 @@
<el-button type="primary" @click="onAffirm(ruleFormRef)" <el-button type="primary" @click="onAffirm(ruleFormRef)"
>提交</el-button >提交</el-button
> >
<el-button @click="stateMonitoring()">取消</el-button>
</div> </div>
</el-form> </el-form>
</el-dialog> </el-dialog>
<!-- 详情 --> <!-- 详情 -->
<el-dialog v-model="state.channeldetails" title="查询条件" width="40%"> <el-dialog v-model="state.channeldetails" title="查询条件" width="40%">
<div class="device">
<el-form <el-form
class="form"
ref="ruleFormRef" ref="ruleFormRef"
:rules="rules" :rules="rules"
:model="state.formState" :model="state.formState"
label-position="left"
label-width="120px"
> >
<div class="information" > <div class="information">
<el-form-item label="设备编码:"> <el-form-item label="设备编码:">
<el-text type="primary">{{ form.deviceCode }}</el-text> <el-text type="primary">{{ form.deviceCode }}</el-text>
</el-form-item> </el-form-item>
@ -95,7 +99,7 @@
<el-text type="primary">{{ form.unitType }}</el-text> <el-text type="primary">{{ form.unitType }}</el-text>
</el-form-item> </el-form-item>
</div> </div>
<div class="information" > <div class="information">
<el-form-item label="单元序号:"> <el-form-item label="单元序号:">
<el-text type="primary">{{ form.unitSeq }}</el-text> <el-text type="primary">{{ form.unitSeq }}</el-text>
</el-form-item> </el-form-item>
@ -103,7 +107,7 @@
<el-text type="primary">{{ form.channelSeq }}</el-text> <el-text type="primary">{{ form.channelSeq }}</el-text>
</el-form-item> </el-form-item>
</div> </div>
<div class="information" > <div class="information">
<el-form-item label="通道编码:"> <el-form-item label="通道编码:">
<el-text type="primary">{{ form.channelCode }}</el-text> <el-text type="primary">{{ form.channelCode }}</el-text>
</el-form-item> </el-form-item>
@ -111,7 +115,7 @@
<el-text type="primary">{{ form.channelSn }}</el-text> <el-text type="primary">{{ form.channelSn }}</el-text>
</el-form-item> </el-form-item>
</div> </div>
<div class="information" > <div class="information">
<el-form-item label="通道名称:"> <el-form-item label="通道名称:">
<el-text type="primary">{{ form.channelName }}</el-text> <el-text type="primary">{{ form.channelName }}</el-text>
</el-form-item> </el-form-item>
@ -119,7 +123,7 @@
<el-text type="primary">{{ form.channelType }}</el-text> <el-text type="primary">{{ form.channelType }}</el-text>
</el-form-item> </el-form-item>
</div> </div>
<div class="information" > <div class="information">
<el-form-item label="摄像头类型:"> <el-form-item label="摄像头类型:">
<el-text type="primary">{{ form.cameraType }}</el-text> <el-text type="primary">{{ form.cameraType }}</el-text>
</el-form-item> </el-form-item>
@ -135,7 +139,7 @@
<el-text type="primary">{{ form.gpsY }}</el-text> <el-text type="primary">{{ form.gpsY }}</el-text>
</el-form-item> </el-form-item>
</div> </div>
<div class="information" > <div class="information">
<el-form-item label="z轴"> <el-form-item label="z轴">
<el-text type="primary">{{ form.gpsZ }}</el-text> <el-text type="primary">{{ form.gpsZ }}</el-text>
</el-form-item> </el-form-item>
@ -143,7 +147,7 @@
<el-text type="primary">{{ form.mapId }}</el-text> <el-text type="primary">{{ form.mapId }}</el-text>
</el-form-item> </el-form-item>
</div> </div>
<div class="information" > <div class="information">
<el-form-item label="域ID"> <el-form-item label="域ID">
<el-text type="primary">{{ form.domainId }}</el-text> <el-text type="primary">{{ form.domainId }}</el-text>
</el-form-item> </el-form-item>
@ -151,7 +155,7 @@
<el-text type="primary">{{ form.memo }}</el-text> <el-text type="primary">{{ form.memo }}</el-text>
</el-form-item> </el-form-item>
</div> </div>
<div class="information" > <div class="information">
<el-form-item label="状态:"> <el-form-item label="状态:">
<el-text type="primary">{{ form.isOnline }}</el-text> <el-text type="primary">{{ form.isOnline }}</el-text>
</el-form-item> </el-form-item>
@ -159,7 +163,7 @@
<el-text type="primary">{{ form.stat }}</el-text> <el-text type="primary">{{ form.stat }}</el-text>
</el-form-item> </el-form-item>
</div> </div>
<div class="information" > <div class="information">
<el-form-item label="是否已经接入:"> <el-form-item label="是否已经接入:">
<el-text type="primary">{{ form.capability }}</el-text> <el-text type="primary">{{ form.capability }}</el-text>
</el-form-item> </el-form-item>
@ -167,15 +171,16 @@
<el-text type="primary">{{ form.access }}</el-text> <el-text type="primary">{{ form.access }}</el-text>
</el-form-item> </el-form-item>
</div> </div>
<div class="information" > <div class="information">
<el-form-item label="通道详情扩展信息:"> <el-form-item label="通道详情扩展信息:">
<el-text type="primary">{{ form.chExt}}</el-text> <el-text type="primary">{{ form.chExt }}</el-text>
</el-form-item> </el-form-item>
<el-form-item label="是否是虚拟通道:"> <el-form-item label="是否是虚拟通道:">
<el-text type="primary">{{ form.isVirtual }}</el-text> <el-text type="primary">{{ form.isVirtual }}</el-text>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -186,6 +191,8 @@ import TableBody from "@/components/TableBody/TableBody.vue";
import http from "../../utils/request"; import http from "../../utils/request";
import tools from "@/utils/tools"; import tools from "@/utils/tools";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
const Router = useRouter();
const state = reactive({ const state = reactive({
Monitoring: false, Monitoring: false,
channeldetails: false, channeldetails: false,
@ -323,7 +330,7 @@ const handleTableHeader = ({ type, data }) => {
// //
const handleTablePagination = (current) => { const handleTablePagination = (current) => {
data.pagination.current = current; data.pagination.current = current;
onAffirm() onAffirm();
}; };
const addNew = () => { const addNew = () => {
state.Monitoring = true; state.Monitoring = true;
@ -335,10 +342,15 @@ const onAffirm = () => {
.post("/api/device/channel/subsystem/page", state.formState) .post("/api/device/channel/subsystem/page", state.formState)
.then((res) => { .then((res) => {
if (res.code == "0") { if (res.code == "0") {
state.Monitoring = false;
ElMessage.success(res.errMsg);
data.tableData = res.data.pageData; data.tableData = res.data.pageData;
data.pagination.current = res.data.currentPage; data.pagination.current = res.data.currentPage;
data.pagination.pageSize = res.data.pageSize; data.pagination.pageSize = res.data.pageSize;
data.pagination.total = res.data.totalRows; 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; form.value = obj;
state.channeldetails = true; state.channeldetails = true;
}; };
const stateMonitoring = () => {
state.Monitoring = false;
state.formState = {};
};
onMounted(() => { onMounted(() => {
onAffirm(); onAffirm();
}); });
@ -359,8 +375,14 @@ onMounted(() => {
width: 150px; width: 150px;
} }
} }
.information{ .information {
display: flex; display: flex;
justify-content: space-around; .el-form-item {
width: 350px;
}
}
.device {
max-height: 450px;
overflow-y: auto;
} }
</style> </style>

View File

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