|
|
@@ -36,7 +36,7 @@
|
|
|
<el-option
|
|
|
v-for="role in roleOptions"
|
|
|
:key="role.id"
|
|
|
- :label="role.name"
|
|
|
+ :label="role.roleName"
|
|
|
:value="role.id"
|
|
|
></el-option>
|
|
|
</el-select> </el-form-item
|
|
|
@@ -250,6 +250,7 @@ import { getLabel } from "@/views/commonOption.js";
|
|
|
import { getNamesByOrgId, getAllNames } from "@/api/system/role.js";
|
|
|
import orgDropDown from "@/components/orgTree/orgDropDown.vue";
|
|
|
import { arabicToChinese } from "@/utils/util.js";
|
|
|
+import {getRoles} from "@/api/system/public";
|
|
|
export default {
|
|
|
name: "safetyCheckRegister",
|
|
|
data() {
|
|
|
@@ -304,12 +305,7 @@ export default {
|
|
|
this.taskInfo.checkOrgId = this.orgId;
|
|
|
//this.taskInfo.checkRoleId = this.roleList[0].roleId;
|
|
|
this.taskInfo.signImg = this.$route.params.signImg;
|
|
|
- getAllNames().then((r) => {
|
|
|
- this.roleOptions = r.data;
|
|
|
- if (!this.roleOptions.find((op) => op.id == this.taskInfo.checkRoleId)) {
|
|
|
- this.taskInfo.checkRoleId = null;
|
|
|
- }
|
|
|
- });
|
|
|
+ this.getAllRoles();
|
|
|
},
|
|
|
methods: {
|
|
|
dayjs,
|
|
|
@@ -326,6 +322,18 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.$refs["point_baseInfo"].clearValidate(["checkOrgId"]);
|
|
|
+ // getNamesByOrgId(node.id).then((r) => {
|
|
|
+ // this.roleOptions = r.data;
|
|
|
+ // this.prevCheckOrgType = node.type;
|
|
|
+ // if (!this.roleOptions.find((op) => op.id == this.taskInfo.checkRoleId)) {
|
|
|
+ // this.taskInfo.checkRoleId = null;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ getAllRoles() {
|
|
|
+ getRoles().then((response) => {
|
|
|
+ this.roleOptions = response;
|
|
|
+ });
|
|
|
},
|
|
|
onBecheckOrgSelect(node) {
|
|
|
if (node == null) {
|