Compare commits

..

14 Commits

Author SHA1 Message Date
zengmingjie d5fb0c5cfa model字段限制 2025-08-30 18:27:46 +08:00
zengmingjie 7aa474db25 8.27问题更改 2025-08-27 23:32:10 +08:00
zengmingjie d4d7b467ae 预警一条数据卡顿问题O4默认入侵 2025-08-24 11:51:57 +08:00
zengmingjie 999ac04b25 增加事件类型 2025-08-22 22:05:24 +08:00
zengmingjie d244e9ef72 更改问题 2025-08-21 21:40:26 +08:00
zengmingjie a3e921b9d6 增加账号展示 2025-08-20 22:13:54 +08:00
zengmingjie 5878fb97b3 isMove 2025-07-12 23:56:28 +08:00
zengmingjie 9cb3ad6b60 设备不能添加问题 2025-07-09 09:49:42 +08:00
zengmingjie b4f8356eb5 更改问题 2025-07-08 22:33:58 +08:00
zengmingjie 4457c08192 111 2025-06-26 02:07:23 +08:00
zengmingjie d057a5df47 Merge branch 'permission' of http://101.43.201.20:3000/yanghongwei/ly-front into permission 2025-06-26 01:21:30 +08:00
zengmingjie fd809d18dc 1 2025-06-26 01:21:27 +08:00
yanghongwei e5c11edfa8 uploadUrl 2025-06-24 17:15:05 +00:00
zengmingjie 16cc80d4ce 权限更改 2025-06-22 18:18:16 +08:00
3 changed files with 50 additions and 28 deletions

View File

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

View File

@ -85,6 +85,7 @@ 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,8 +80,9 @@
</template>
<script>
"use script";
import { userList, userAdd, userUpdate, userDelete } from "@/api/user.js";
import { devPositionList } from "@/api/position.js";
export default {
name: "webDevice",
data() {
@ -126,6 +127,14 @@ export default {
key: false
}
]
},
{
label: "防区",
type: "select",
model: "positionId",
options: [],
multiple: true,
rules: [{ required: true, message: "请选择防区", trigger: "change" }]
}
],
tableData: [],
@ -137,7 +146,7 @@ export default {
},
{
label: "是否管理员",
prop: "isAdmin",
prop: "isAdminDisplay", // 使
align: "center"
},
{
@ -165,20 +174,33 @@ 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") {
@ -188,6 +210,7 @@ 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));
@ -195,25 +218,30 @@ export default {
params.pageSize = this.paginationParam.size;
userList(params).then((res) => {
if (res.code === 0) {
this.tableData = res.data.items.map((item) => {
let items = JSON.parse(JSON.stringify(res.data.items));
this.tableData = items.map((item) => {
const { ...rest } = item;
return {
...rest,
isAdmin: item.isAdmin ? "是" : "否"
isAdminDisplay: 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 = value;
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.formDrawerList[0].disabled = true;
this.formDrawerList[1].disabled = true;
this.formDrawerList[1].show = false;
@ -240,24 +268,18 @@ export default {
});
}
},
//
determine(value) {
let params = {};
params = value;
params.isAdmin = JSON.parse(params.isAdmin);
let params = JSON.parse(JSON.stringify(value));
console.log(params, "params");
// isAdmin
params.isAdmin = params.isAdmin === true || params.isAdmin === "true";
if (this.isType === "add") {
// console.log("");
userAdd(params)
.then((res) => {
if (res.code === 0) {
this.$message.success("新增成功");
this.headdenForm({}, "search");
}
})
.catch((err) => {
console.log(err);
});
userAdd(params).then((res) => {
if (res.code === 0) {
this.$message.success("新增成功");
this.headdenForm({}, "search");
}
});
} else if (this.isType === "edit") {
userUpdate(params).then((res) => {
if (res.code === 0) {
@ -269,18 +291,17 @@ 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%;