Compare commits

..

9 Commits

Author SHA1 Message Date
zengmingjie 8f0e654ffa model字段限制 2025-08-30 18:26:41 +08:00
zengmingjie 6868111813 8.27问题更改 2025-08-27 23:19:23 +08:00
zengmingjie 18da5b9d48 预警数据卡顿问题、O4默认入侵 2025-08-24 11:53:14 +08:00
zengmingjie 5dc45ea340 增加事件类型 2025-08-22 22:04:46 +08:00
zengmingjie d423f16696 更改问题 2025-08-21 21:41:11 +08:00
zengmingjie b205eda476 增加账号展示 2025-08-20 22:12:45 +08:00
zengmingjie cdf6f6f5f5 1 2025-07-12 23:55:19 +08:00
zengmingjie f2a0977133 更改设备不能编辑 2025-07-09 09:50:34 +08:00
zengmingjie 837255691e 更改防区点击定位之后添加失败问题 2025-07-08 22:31:25 +08:00
3 changed files with 28 additions and 50 deletions

View File

@ -1,4 +1,3 @@
myMarsmap
<template>
<div class="ditu">
<div id="marsContainer-map" ref="marsMaps" class="mars3d-container"></div>
@ -329,6 +328,7 @@ export default {
}
},
clearDraw() {
console.log(111);
this.isinputDisabled = false;
if (this.graphicLayer) {
this.graphicLayer.clear();

View File

@ -85,7 +85,6 @@ export default {
localStorage.setItem("expires", res.data.expires); //
localStorage.setItem("userId", res.data.userid); // id
localStorage.setItem("isAdmin", res.data.isAdmin); //
localStorage.setItem("positionID", res.data.positionIds); //
// Vue 2 Pinia

View File

@ -80,9 +80,8 @@
</template>
<script>
"use script";
import { userList, userAdd, userUpdate, userDelete } from "@/api/user.js";
import { devPositionList } from "@/api/position.js";
export default {
name: "webDevice",
data() {
@ -127,14 +126,6 @@ export default {
key: false
}
]
},
{
label: "防区",
type: "select",
model: "positionId",
options: [],
multiple: true,
rules: [{ required: true, message: "请选择防区", trigger: "change" }]
}
],
tableData: [],
@ -146,7 +137,7 @@ export default {
},
{
label: "是否管理员",
prop: "isAdminDisplay", // 使
prop: "isAdmin",
align: "center"
},
{
@ -174,33 +165,20 @@ export default {
this.headdenForm({}, "search");
},
methods: {
initPosition() {
devPositionList().then((res) => {
if (res.code === 0) {
this.PositionList = res.data.items;
this.formDrawerList.forEach((item) => {
if (item.label === "防区") {
item.options = res.data.items.map((item) => {
item.label = item.name;
item.key = item.id;
return item;
});
}
});
}
});
},
getStatusStyle(value) {
return {
color: value == 0 ? "green" : "red"
};
},
//
onMountedForm() {
this.$forceUpdate();
},
//
handleClose() {
this.drawer = false;
},
//
headdenForm(value, type) {
let params = {};
if (type === "add") {
@ -210,7 +188,6 @@ export default {
this.formDrawerList[0].disabled = false;
this.formDrawerList[1].disabled = false;
this.formDrawerList[1].show = true;
this.initPosition();
this.drawer = true;
} else if (type === "search") {
params = JSON.parse(JSON.stringify(this.$refs.myForm.ruleForm));
@ -218,30 +195,25 @@ export default {
params.pageSize = this.paginationParam.size;
userList(params).then((res) => {
if (res.code === 0) {
let items = JSON.parse(JSON.stringify(res.data.items));
this.tableData = items.map((item) => {
this.tableData = res.data.items.map((item) => {
const { ...rest } = item;
return {
...rest,
isAdminDisplay: item.isAdmin ? "是" : "否", //
isAdmin: item.isAdmin //
isAdmin: item.isAdmin ? "是" : "否"
};
});
this.paginationParam.total = res.data.total;
}
});
}
console.log(value);
},
//
handleClick(value, type) {
if (type === "edit") {
this.isType = "edit";
this.title = "编辑人员";
this.fromItem = JSON.parse(JSON.stringify(value));
// isAdmin
console.log(this.fromItem, "value");
this.fromItem.isAdmin = value.isAdmin; // 使
this.fromItem.positionId = value.positionId.map((item) => String(item));
this.initPosition();
this.fromItem = value;
this.formDrawerList[0].disabled = true;
this.formDrawerList[1].disabled = true;
this.formDrawerList[1].show = false;
@ -268,17 +240,23 @@ export default {
});
}
},
//
determine(value) {
let params = JSON.parse(JSON.stringify(value));
let params = {};
params = value;
params.isAdmin = JSON.parse(params.isAdmin);
console.log(params, "params");
// isAdmin
params.isAdmin = params.isAdmin === true || params.isAdmin === "true";
if (this.isType === "add") {
userAdd(params).then((res) => {
// console.log("");
userAdd(params)
.then((res) => {
if (res.code === 0) {
this.$message.success("新增成功");
this.headdenForm({}, "search");
}
})
.catch((err) => {
console.log(err);
});
} else if (this.isType === "edit") {
userUpdate(params).then((res) => {
@ -291,17 +269,18 @@ export default {
this.drawer = false;
},
handleSizeChange(value) {
console.log(value);
this.paginationParam.size = value;
this.headdenForm({}, "search");
},
handlePageChange(value) {
console.log(value);
this.paginationParam.currentPage = value;
this.headdenForm({}, "search");
}
}
};
</script>
<style scoped lang="scss">
.user {
width: 95%;