From 8c6cf205affbbc8ada74f00a7ca25ebca867e9ed Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 27 Sep 2021 11:44:44 +0800
Subject: [PATCH] 图表颜色
---
src/views/dispatch/dispatchChildoperable.vue | 49 +++++++++++++++++++++++++++++++++----------------
1 files changed, 33 insertions(+), 16 deletions(-)
diff --git a/src/views/dispatch/dispatchChildoperable.vue b/src/views/dispatch/dispatchChildoperable.vue
index 175a1aa..0d8db0c 100644
--- a/src/views/dispatch/dispatchChildoperable.vue
+++ b/src/views/dispatch/dispatchChildoperable.vue
@@ -275,19 +275,33 @@
},
],
},
+ useifid: 266,
};
},
created() {
+ var that = this;
if (this.userInfo.role_name == "保安公司管理员") {
console.log("保安公司管理员登入");
const deptColumn = this.findObject(this.option1.column, "deptId");
deptColumn.search = false;
+ deptColumn.hide = true;
+ this.useifid = this.userInfo.dept_id;
} else {
const deptColumn = this.findObject(
this.option1.column,
"dispatcherUnitId"
);
deptColumn.search = false;
+ }
+
+ //公安局进入
+ if (this.userInfo.role_name == "公安管理员") {
+ that.option1.column[1].dicUrl =
+ "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697&jurisdiction=" +
+ that.userInfo.jurisdiction;
+ } else {
+ that.option1.column[1].dicUrl =
+ "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
}
},
computed: {
@@ -338,7 +352,9 @@
// const userColumn = this.findObject(this.option1.column, "userIds");
// userColumn.dicUrl = "/api/blade-user/page-security-units?deptId="+this.userInfo.dept_id;
// }
-
+ if (this.useifid != 266) {
+ form["deptId"] = this.useifid;
+ }
adddata1(form).then(
(res) => {
this.onLoad1(this.page1);
@@ -370,6 +386,9 @@
// const userColumn = this.findObject(this.option1.column, "userIds");
// userColumn.dicUrl = "/api/blade-user/page-security-units?deptId="+this.userInfo.dept_id;
// }
+ if (this.useifid != 266) {
+ row["deptId"] = this.useifid;
+ }
update1(row).then(
() => {
this.onLoad1(this.page1);
@@ -434,19 +453,10 @@
this.onLoad1(this.page1, this.query1);
},
- // beforeOpen(done, type) {
- // var that = this;
- // if (["add", "edit", "view"].includes(type)) {
- // if (this.userInfo.role_name == "保安公司管理员") {
- // getListByDeptId(that.userInfo.dept_id).then((res) => {
- // const userColumn = that.findObject(this.option1.column, "userIds");
- // userColumn.dicData = res.data.data;
- // });
- // }
- // }
- // this.initFlag = true;
- // done();
- // },
+ beforeOpen(done, type) {
+ this.initFlag = true;
+ done();
+ },
getStartTime() {
if (
@@ -499,6 +509,13 @@
} else {
this.initData(1);
}
+ if (this.useifid != 266) {
+ values["deptId"] = this.useifid;
+ }
+ //公安局进入
+ if (this.userInfo.role_name == "公安管理员") {
+ params["jurisdiction"] = this.userInfo.jurisdiction;
+ }
getdata1(
page.currentPage,
@@ -522,7 +539,7 @@
this.option1.column,
"dispatcherUnitId"
);
- console.log(res.data.data, 111);
+ // console.log(res.data.data, 111);
dispatcherUnitIdColumn.dicData = res.data.data;
});
}
@@ -534,7 +551,7 @@
);
dispatcherUnitIdColumn.dicData = res.data.data;
});
- getListByDeptId(that.userInfo.dept_id,1).then((res) => {
+ getListByDeptId(that.userInfo.dept_id, 1).then((res) => {
const userIdsColumn = that.findObject(this.option1.column, "userIds");
userIdsColumn.dicData = res.data.data;
});
--
Gitblit v1.9.3