This commit is contained in:
parent
894920d2dc
commit
d0e932ddee
|
@ -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>
|
||||||
|
|
||||||
|
@ -49,11 +53,27 @@ const onAffirm = () => {
|
||||||
};
|
};
|
||||||
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;
|
||||||
|
|
|
@ -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,16 +76,20 @@
|
||||||
<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="设备编码:">
|
||||||
|
@ -176,6 +180,7 @@
|
||||||
</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();
|
||||||
});
|
});
|
||||||
|
@ -361,6 +377,12 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
.information {
|
.information {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
.el-form-item {
|
||||||
|
width: 350px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.device {
|
||||||
|
max-height: 450px;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -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");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue