From a71912cb7ecbe4e00a588c9d0e193e70c799d502 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 04 Dec 2021 14:12:36 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises_ys
---
src/views/applyexam/index.vue | 55 ++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 38 insertions(+), 17 deletions(-)
diff --git a/src/views/applyexam/index.vue b/src/views/applyexam/index.vue
index ca1296b..a97f6a1 100644
--- a/src/views/applyexam/index.vue
+++ b/src/views/applyexam/index.vue
@@ -1,8 +1,8 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-19 19:39:45
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-11-30 14:38:55
* menu-name 报名考试
*/
<template>
@@ -27,6 +27,7 @@
@size-change="questionBankSizeChange"
@row-save="questionBankRowSave"
@row-del="questionBankRowDel"
+ :before-open="beforeOpen"
>
<!-- 自定义按钮 -->
<!-- <template slot="menuLeft">
@@ -181,7 +182,7 @@
import { mapState } from "vuex";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
-import { getUserDetails } from "@/api/experience/experience"
+import { getUserDetails } from "@/api/experience/experience";
var DIC = {
applyStatus: [
{
@@ -198,8 +199,9 @@
export default {
data() {
return {
- obj:{
- userId:''
+ obj: {
+ userId: "",
+ deptId: "",
},
dialogFormVisible: false,
dialogExamFormVisible: false,
@@ -485,8 +487,8 @@
prop: "deptId",
type: "tree",
hide: true,
- viewDisabled:false,
- viewDisplay:false,
+ viewDisabled: false,
+ viewDisplay: false,
dicUrl:
"/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
props: {
@@ -503,7 +505,7 @@
prop: "userId",
type: "tree",
dicUrl:
- "/api/blade-user/security-apply-tree?examType=1&deptId={{key}}",
+ "/api/blade-user/page-security-units?status=1&deptId={{key}}",
hide: true,
slot: true,
searchSpan: 4,
@@ -522,7 +524,7 @@
// 表单编辑时是否为查看模式
editDetail: false,
props: {
- label: "name",
+ label: "realName",
value: "id",
},
rules: [
@@ -609,7 +611,7 @@
addDisabled: true,
// 表单新增时是否可见
addDisplay: true,
- hide:true,
+ hide: true,
rules: [
{
required: true,
@@ -816,15 +818,15 @@
"obj.userId": {
// form是表单或者表格绑定的数据集,v-model='form'
handler(val) {
- if(val){
+ if (val) {
//查询用户信息
- getUserDetails(this.userId).then((res)=>{
+ getUserDetails(this.userId).then((res) => {
var data = res.data.data;
this.obj.cardid = data.cardid;
this.obj.age = data.age;
this.obj.nativeplace = data.nativeplace;
this.obj.phone = data.phone;
- })
+ });
}
},
immediate: true,
@@ -863,11 +865,30 @@
return ids.join(",");
},
userId() {
- var d = this.obj.userId + "";
- return d;
+ var d = this.obj.userId + "";
+ return d;
},
},
methods: {
+ beforeOpen(done, type) {
+ // :before-open="beforeOpen"
+ if (this.userInfo.role_name == "保安公司管理员") {
+ // console.log("保安公司管理员登入");
+ const deptColumn = this.findObject(
+ this.questionBankOption.column,
+ "deptId"
+ );
+ deptColumn.disabled = true;
+ this.obj["deptId"] = this.userInfo.dept_id;
+ } else {
+ // const deptColumn = this.findObject(
+ // this.questionBankOption.column,
+ // "dispatcherUnitId"
+ // );
+ // deptColumn.search = false;
+ }
+ done();
+ },
//准考证查看
handlePrint(row) {
var obj = row;
@@ -943,7 +964,7 @@
},
questionBankSearchReset() {
this.questionBankQuery = {
- applyStatus:1,
+ applyStatus: 1,
};
this.questionBankOnLoad(this.questionBankPage);
},
@@ -957,7 +978,7 @@
// 新增
questionBankRowSave(row, done, loading) {
// debugger;
- console.log(row,11111);
+ console.log(row, 11111);
addApply(row).then(
(res) => {
this.questionBankOnLoad(this.questionBankPage);
--
Gitblit v1.9.3