|
@@ -4,7 +4,7 @@
|
|
|
<div class="top-title-box">
|
|
|
<p>{{titleName}}</p>
|
|
|
</div>
|
|
|
- <el-form :model="form" class="top-info-box" ref="form" :inline="true" :rules="rules" label-width="120px">
|
|
|
+ <el-form :model="form" class="top-info-box" ref="form" :inline="true" :rules="rules" label-width="180px">
|
|
|
<div class="left-info-box">
|
|
|
<img :src="form.avatar" v-if="form.avatar">
|
|
|
<img src="@/assets/ZDimages/tx_cion.png" v-if="!form.avatar">
|
|
@@ -78,11 +78,26 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <!--<el-form-item label="角色:" prop="roleIds">-->
|
|
|
+ <!--<el-select-->
|
|
|
+ <!--:disabled="editType"-->
|
|
|
+ <!--v-model="form.roleIds"-->
|
|
|
+ <!--multiple-->
|
|
|
+ <!--collapse-tags-->
|
|
|
+ <!--placeholder="请选择角色">-->
|
|
|
+ <!--<el-option-->
|
|
|
+ <!--v-for="item in roleOptionselectOptions"-->
|
|
|
+ <!--:key="item.roleId"-->
|
|
|
+ <!--:label="item.roleName"-->
|
|
|
+ <!--:value="item.roleId">-->
|
|
|
+ <!--</el-option>-->
|
|
|
+ <!--</el-select>-->
|
|
|
+ <!--</el-form-item>-->
|
|
|
<el-form-item label="手机号码:" prop="phonenumber">
|
|
|
<el-input
|
|
|
:disabled="editType"
|
|
|
style="width:218px;"
|
|
|
- maxlength="25"
|
|
|
+ maxlength="11"
|
|
|
onkeyup="this.value=this.value.replace(/[^\d.]/g,'')"
|
|
|
v-model="form.phonenumber"
|
|
|
placeholder="请输入手机号码"
|
|
@@ -100,7 +115,7 @@
|
|
|
reserve-keyword
|
|
|
@change="categorySelectClick"
|
|
|
@clear="categoryClearClick"
|
|
|
- placeholder="请选择身份"
|
|
|
+ placeholder="请选择职称"
|
|
|
:remote-method="categorySelect">
|
|
|
<el-option
|
|
|
v-for="item in categoryOptions"
|
|
@@ -143,7 +158,7 @@
|
|
|
reserve-keyword
|
|
|
@change="educationSelectClick"
|
|
|
@clear="educationClearClick"
|
|
|
- placeholder="请选择身份"
|
|
|
+ placeholder="请选择文化程度"
|
|
|
:remote-method="educationSelect">
|
|
|
<el-option
|
|
|
v-for="item in educationOptions"
|
|
@@ -161,235 +176,9 @@
|
|
|
placeholder="请选择出生日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="在职状态:" prop="nature">
|
|
|
- <el-switch
|
|
|
- v-if="!editType"
|
|
|
- @click.native="natureCaptcha"
|
|
|
- class="switch captcha-img"
|
|
|
- active-value="0"
|
|
|
- inactive-value="1"
|
|
|
- active-color="#29B24D"
|
|
|
- inactive-color="#999"
|
|
|
- v-model="form.nature"
|
|
|
- active-text="在职"
|
|
|
- inactive-text="离职"
|
|
|
- disabled
|
|
|
- ></el-switch>
|
|
|
- <p v-if="editType" style="line-height:40px;color:#999;width:180px;padding-left:40px;">{{form.nature==0?'在职':'离职'}}</p>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="安全检查人员:" prop="isCheck" v-if="versionField() != 'xiBeiNongLinDaXue'">
|
|
|
- <el-switch
|
|
|
- v-if="!editType"
|
|
|
- @click.native="isCheckCaptcha"
|
|
|
- class="switch captcha-img"
|
|
|
- :active-value="1"
|
|
|
- :inactive-value="0"
|
|
|
- active-color="#0183FA"
|
|
|
- inactive-color="#999"
|
|
|
- v-model="form.isCheck"
|
|
|
- active-text="是"
|
|
|
- inactive-text="否"
|
|
|
- disabled
|
|
|
- ></el-switch>
|
|
|
- <p v-if="editType" style="line-height:40px;color:#999;width:180px;padding-left:40px;">{{form.isCheck==0?'否':'是'}}</p>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="账号状态:" prop="status" v-if="form.nature == 0">
|
|
|
- <el-switch
|
|
|
- v-if="!editType"
|
|
|
- @click.native="statusCaptcha"
|
|
|
- class="switch captcha-img"
|
|
|
- active-value="0"
|
|
|
- inactive-value="1"
|
|
|
- active-color="#0183FA"
|
|
|
- inactive-color="#999"
|
|
|
- v-model="form.status"
|
|
|
- active-text="启用"
|
|
|
- inactive-text="停用"
|
|
|
- disabled
|
|
|
- ></el-switch>
|
|
|
- <p v-if="editType" style="line-height:40px;color:#999;width:180px;padding-left:40px;">{{form.status==0?'启用':'停用'}}</p>
|
|
|
- </el-form-item>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
- <div class="top-title-one" v-if="!editType && form.status == 0">
|
|
|
- <p class="title-p">权限配置</p>
|
|
|
- <p class="el-icon-question img-p" @mouseenter="showText" @mouseout="hideText"></p>
|
|
|
- <div class="position-box" v-if="textType">
|
|
|
- <p>1、权限快捷模板:列出所有已创建的快捷模板,可选择快捷导入模板;导入后可修改或清空。</p>
|
|
|
- <p>2、模块菜单:选中父级,联动子级全部选中,可对子级单独勾选;子级选中,父级联动选中。</p>
|
|
|
- <p>3、数据范围:数据查看范围选择,默认展示所有数据。</p>
|
|
|
- <p>4、管理权限:功能操作权限,包含增删改查、启用、停用,以及导出等操作功能。</p>
|
|
|
- <p>5、详细配置:对底层菜单的功能操作进行细分权限勾选,功能操作按所属菜单页面现有的功能操作进行展示,可单选、全选。</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="for-button-list" v-if="!editType && form.status == 0">
|
|
|
- <p class="for-title-p">权限快捷模板:</p>
|
|
|
- <div class="for-button-max-box">
|
|
|
- <div class="for-button-min-box" v-for="(item,index) in templateList" :key="index"
|
|
|
- :class="templateKey == item.id?'colorAA':'colorBB'" @click="templateClick(item.id)">
|
|
|
- <i class="el-icon-success" v-if="templateKey == item.id"></i>
|
|
|
- <span>{{item.name}}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="template-name-box" v-if="!editType && form.status == 0">
|
|
|
- <p class="template-name-p">当前导入模板:{{templateName?templateName:'无'}}</p>
|
|
|
- <p class="reset-button-one template-name-button" @click="templateDel">清除</p>
|
|
|
- <p class="template-name-button-one" @click="importUser">导入其他账号权限</p>
|
|
|
- </div>
|
|
|
- <div class="table-for-max-box" v-if="!editType && form.status == 0">
|
|
|
- <div class="table-title-box">
|
|
|
- <p>模块菜单</p>
|
|
|
- <p>权限</p>
|
|
|
- </div>
|
|
|
- <div class="table-for-big-box" v-for="(maxItem,maxIndex) in menuList" :key="maxIndex">
|
|
|
- <div class="max-title-box" :class="!maxItem.children?'max-title-box-null':''">
|
|
|
- <p><el-checkbox :disabled="maxItem.isRequired == 1" v-model="maxItem.checkType" @change="(type)=>itemCheckClick(1,type,maxItem)">{{maxItem.menuName}}</el-checkbox></p>
|
|
|
- </div>
|
|
|
- <div class="max-right-box">
|
|
|
- <div class="big-box" v-for="(bigItem,bigIndex) in maxItem.children" :key="bigIndex">
|
|
|
- <div class="big-title-box" :class="bigItem.menuType == 'C'?'big-title-box-null':''">
|
|
|
- <p><el-checkbox :disabled="bigItem.isRequired == 1" v-model="bigItem.checkType" @change="(type)=>itemCheckClick(2,type,bigItem,maxItem)">{{bigItem.menuName}}</el-checkbox></p>
|
|
|
- </div>
|
|
|
- <div class="big-right-box" v-if="bigItem.menuType !='C'">
|
|
|
- <div class="min-box" v-for="(minItem,minIndex) in bigItem.children" :key="minIndex">
|
|
|
- <div class="min-title-box">
|
|
|
- <p><el-checkbox :disabled="minItem.isRequired == 1" v-model="minItem.checkType" @change="(type)=>itemCheckClick(3,type,minItem,bigItem,maxItem)">{{minItem.menuName}}</el-checkbox></p>
|
|
|
- </div>
|
|
|
- <div class="min-right-box" v-if="minItem.checkType">
|
|
|
- <div class="scope-box">
|
|
|
- <p>
|
|
|
- <el-checkbox v-model="minItem.scopeCheckType" @change="(type)=>itemCheckClick(4,type,minItem)" style="margin-right:40px;">数据范围</el-checkbox>
|
|
|
- <el-select v-model="minItem.dataScope" :disabled="!minItem.scopeCheckType" v-if="minItem.isRequired == 1"
|
|
|
- placeholder="请选择1" @visible-change="(type)=>visibleChange(type,minItem,maxIndex,bigIndex,minIndex)">
|
|
|
- <el-option v-for="dist in optionsDataListOne" :key="dist.type" :label="dist.value" :value="dist.type" @click.native="(type)=>optionChange(dist.type,minItem,maxIndex,bigIndex,minIndex)"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-select v-model="minItem.dataScope" :disabled="!minItem.scopeCheckType" v-if="minItem.isRequired != 1"
|
|
|
- placeholder="请选择" @visible-change="(type)=>visibleChange(type,minItem,maxIndex,bigIndex,minIndex)">
|
|
|
- <el-option v-for="dist in optionsDataList" :key="dist.type" :label="dist.value" :value="dist.type" @click.native="(type)=>optionChange(dist.type,minItem,maxIndex,bigIndex,minIndex)"></el-option>
|
|
|
- </el-select>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div class="permission-box" v-if="minItem.children">
|
|
|
- <p class="check-left-p"><el-checkbox v-model="minItem.permissionCheckType" @change="(type)=>itemCheckClick(5,type,minItem)">管理权限</el-checkbox></p>
|
|
|
- <div class="check-button-box" @click="permissionDetails(minItem,maxIndex,bigIndex,minIndex)"
|
|
|
- :class="minItem.permissionCheckType?'check-button-box-colorA':'check-button-box-colorB'">
|
|
|
- <img v-if="!minItem.permissionCheckType" src="@/assets/ZDimages/personnelManagement/icon_xzqx_zc.png">
|
|
|
- <img v-if="minItem.permissionCheckType" src="@/assets/ZDimages/personnelManagement/icon_xzqx_xz.png">
|
|
|
- <p>详细配置</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="big-right-box-null" v-if="bigItem.menuType == 'C'&&bigItem.checkType">
|
|
|
- <div class="scope-box">
|
|
|
- <p>
|
|
|
- <el-checkbox v-model="bigItem.scopeCheckType" style="margin-right:40px;" @change="(type)=>itemCheckClick(4,type,bigItem)">数据范围</el-checkbox>
|
|
|
- <el-select v-model="bigItem.dataScope" :disabled="!bigItem.scopeCheckType" v-if="bigItem.isRequired == 1"
|
|
|
- placeholder="请选择" @visible-change="(type)=>visibleChange(type,bigItem,maxIndex,bigIndex)">
|
|
|
- <el-option v-for="dist in optionsDataListOne" :key="dist.type" :label="dist.value" :value="dist.type" @click.native="(type)=>optionChange(dist.type,bigItem,maxIndex,bigIndex)"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-select v-model="bigItem.dataScope" :disabled="!bigItem.scopeCheckType" v-if="bigItem.isRequired != 1"
|
|
|
- placeholder="请选择" @visible-change="(type)=>visibleChange(type,bigItem,maxIndex,bigIndex)">
|
|
|
- <el-option v-for="dist in optionsDataList" :key="dist.type" :label="dist.value" :value="dist.type" @click.native="(type)=>optionChange(dist.type,bigItem,maxIndex,bigIndex)"></el-option>
|
|
|
- </el-select>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div class="permission-box" v-if="bigItem.children">
|
|
|
- <p class="check-left-p"><el-checkbox v-model="bigItem.permissionCheckType" @change="(type)=>itemCheckClick(5,type,bigItem)">管理权限</el-checkbox></p>
|
|
|
- <div class="check-button-box" @click="permissionDetails(bigItem,maxIndex,bigIndex)"
|
|
|
- :class="bigItem.permissionCheckType?'check-button-box-colorA':'check-button-box-colorB'">
|
|
|
- <img v-if="!bigItem.permissionCheckType" src="@/assets/ZDimages/personnelManagement/icon_xzqx_zc.png">
|
|
|
- <img v-if="bigItem.permissionCheckType" src="@/assets/ZDimages/personnelManagement/icon_xzqx_xz.png">
|
|
|
- <p>详细配置</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <p class="big-box-null" v-if="!maxItem.children&&maxItem.menuName == '数据可视化'">数据可视化大屏查看权限</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
<user-list-one ref="userOpen"></user-list-one>
|
|
|
- <el-dialog :title="permissionCheckData.menuName+'模块'" :visible.sync="permissionOpen" width="900px"
|
|
|
- :close-on-click-modal="false" append-to-body class="managePermissionTemplates-permission-dialog-box">
|
|
|
- <p class="title-p">{{permissionCheckData.menuName}}权限详细配置</p>
|
|
|
- <div class="managePermissionTemplates-permission-dialog-form-box">
|
|
|
- <div class="title-box">
|
|
|
- <p class="left-title-p">功能菜单</p>
|
|
|
- <div class="right-box">
|
|
|
- <el-checkbox v-model="allCheckType" class="right-box-min" @change="(type)=>permissionCheckClick('1',type)">功能操作</el-checkbox>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="check-box">
|
|
|
- <div class="left-title-box">
|
|
|
- <p class="left-title-p">{{permissionCheckData.menuName}}</p>
|
|
|
- </div>
|
|
|
- <div class="right-box">
|
|
|
- <el-checkbox class="for-check-box" @change="(type)=>permissionCheckClick('2',type)"
|
|
|
- v-for="(item,index) in permissionCheckData.children" :key="index" v-model="item.checkType">
|
|
|
- {{item.menuName}}
|
|
|
- </el-checkbox>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div slot="footer" class="managePermissionTemplates-permission-dialog-button-box">
|
|
|
- <p class="reset-button-one" @click="permissionOpenOff">取消</p>
|
|
|
- <p class="inquire-button-one" @click="surePermissionOpen">确定</p>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <el-dialog title="选择指定部门(可多选)" @close="deptCancel" :visible.sync="deptOpen" :close-on-click-modal="false"
|
|
|
- v-if="deptOpen" width="500px" append-to-body class="managePermissionTemplates-dept-dialog-box">
|
|
|
- <el-form :model="deptForm" ref="deptForm" :inline="true" :rules="rules" class="addCheckPage-min">
|
|
|
- <el-form-item label="指定部门" prop="deptIds" label-width="90px" class="el-form-item-bottom">
|
|
|
- <el-cascader
|
|
|
- style="width:300px;"
|
|
|
- :options="treeselectList"
|
|
|
- :props="{multiple: true,value: 'id', label: 'label'}"
|
|
|
- v-model="deptForm.deptIds"
|
|
|
- clearable>
|
|
|
- </el-cascader>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="managePermissionTemplates-dept-dialog-button-box">
|
|
|
- <p class="reset-button-one" @click="deptCancel">取消</p>
|
|
|
- <p class="inquire-button-one" @click="deptSure">确定</p>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!--另存-->
|
|
|
- <el-dialog title="另存为权限模板" :visible.sync="saveOpen" width="600px" :close-on-click-modal="false" append-to-body class="teacher-revise-dialog-box">
|
|
|
- <el-form :model="saveForm" ref="saveForm" :inline="true" :rules="rules" class="addCheckPage-min">
|
|
|
- <el-form-item label="模板名称" prop="name" label-width="110px" >
|
|
|
- <el-input v-model="saveForm.name" clearable maxlength="12" style="width:420px;" placeholder="请输入模板名称"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="是否为学生模板" prop="type" style="width:420px;">
|
|
|
- <el-radio-group v-model="saveForm.type">
|
|
|
- <el-radio :label="1" style="width:80px;margin-left:20px;">是</el-radio>
|
|
|
- <el-radio :label="0">否</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="权限模板说明" prop="newPassword" label-width="110px">
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- style="width:420px;"
|
|
|
- maxlength="100"
|
|
|
- resize="none"
|
|
|
- show-word-limit
|
|
|
- :autosize="{ minRows: 6, maxRows: 6}"
|
|
|
- placeholder="请输入权限模板说明"
|
|
|
- v-model="saveForm.text">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <!--<p class="teacher-text-p">确定要重置该账号的密码吗?</p>-->
|
|
|
- <!--<p class="teacher-text-p">确定操作后,该账号密码将重置为系统初始密码。</p>-->
|
|
|
- <div slot="footer" class="teacher-revise-dialog-button-box">
|
|
|
- <p class="reset-button-one" @click="saveOpenOff">取消</p>
|
|
|
- <p class="inquire-button-one" @click="saveUpData">确定</p>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
<div class="bottom-button-box" v-if="editType">
|
|
|
<p class="null-p"></p>
|
|
@@ -401,9 +190,7 @@
|
|
|
<p class="button-p-1 reset-button-one" @click="outPageButton">返回</p>
|
|
|
<addPageSubPageSZDX class="button-p-2" v-if="versionField() === 'suZhouDaXue'"></addPageSubPageSZDX>
|
|
|
<addPageSubPagePublic class="button-p-2" v-else></addPageSubPagePublic>
|
|
|
- <!--<p class="inquire-button-one" @click="upDataButton">提交</p>-->
|
|
|
- <p class="button-p-3 add-button-one-150" v-if="form.status == 0 && form.nature == 0" @click="saveDataButton">另存为权限模板</p>
|
|
|
- <p class="null-p"></p>
|
|
|
+ <p class="null-p"></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -413,7 +200,7 @@ import userListOne from "./userListOne.vue"
|
|
|
import { listMenuAll} from "@/api/system/menu";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import { treeselect } from "@/api/system/dept";
|
|
|
-import { optionselect, getVaguet, userPermit, addUserTeacher, putUserTeacherNew } from "@/api/system/user_teacher";
|
|
|
+import { optionselect, noAuthOptionselect, getVaguet, userPermit, addUserTeacher, putUserTeacherNew } from "@/api/system/user_teacher";
|
|
|
import { getPermitOptionList, getPermitInfo } from "@/api/laboratory/managePermissionTemplates";
|
|
|
import { addSystemPermit } from "@/api/laboratory/managePermissionTemplates";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
@@ -448,6 +235,7 @@ export default {
|
|
|
userName:"", //工号
|
|
|
deptId:"", //所在部门
|
|
|
position:"", //身份
|
|
|
+ roleIds:[], //角色
|
|
|
category:"", //职称
|
|
|
phonenumber:"", //联系方式
|
|
|
cardNum:"", //校园卡号
|
|
@@ -466,7 +254,7 @@ export default {
|
|
|
userName: [{ required: true, message: "请输入工号", trigger: "blur" },
|
|
|
{ required: true, message: "请输入工号", validator: this.spaceJudgment, trigger: "blur" }],
|
|
|
deptId: [{ required: true, message: "请选择部门", trigger: "blur" }],
|
|
|
- position: [{ required: true, message: "请选择身份", trigger: "blur" }],
|
|
|
+ // position: [{ required: true, message: "请选择身份", trigger: "blur" }],
|
|
|
name: [{ required: true, message: "请输入模板名称", trigger: "blur" },
|
|
|
{ required: true, message: "请输入模板名称", validator: this.spaceJudgment, trigger: "blur" }],
|
|
|
deptIds: [{ required: true, message: "请选择指定部门", trigger: "blur" }],
|
|
@@ -527,9 +315,12 @@ export default {
|
|
|
type:0,
|
|
|
text:"",
|
|
|
},
|
|
|
+ //角色列表
|
|
|
+ roleOptionselectOptions:[],
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
|
+ let self = this;
|
|
|
if(this.propsData.userId){
|
|
|
if(this.propsData.avatar){
|
|
|
this.form.avatar = this.propsData.avatar;
|
|
@@ -616,10 +407,26 @@ export default {
|
|
|
}else{
|
|
|
this.form.status = '';
|
|
|
}
|
|
|
+ if(this.propsData.roleIds){
|
|
|
+ this.form.roleIds = this.propsData.roleIds;
|
|
|
+ }else{
|
|
|
+ this.form.roleIds = [];
|
|
|
+ }
|
|
|
if(!this.editType){
|
|
|
this.getPermitOptionList();
|
|
|
this.getMenuOne();
|
|
|
}
|
|
|
+ // if(this.propsData.position === '未定'){
|
|
|
+ // this.form.position = null;
|
|
|
+ // }
|
|
|
+ // if(this.propsData.position){
|
|
|
+ // this.form.position = this.propsData.position.split(',');
|
|
|
+ // for(let i=0;i<self.form.position.length;i++){
|
|
|
+ // self.form.position[i] = parseInt(self.form.position[i]);//字符串转数字
|
|
|
+ // }
|
|
|
+ // }else{
|
|
|
+ // this.form.position = [];
|
|
|
+ // }
|
|
|
}else{
|
|
|
this.getPermitOptionList();
|
|
|
this.getMenu();
|
|
@@ -692,6 +499,8 @@ export default {
|
|
|
},
|
|
|
//提交按钮
|
|
|
upDataButton(){
|
|
|
+ let self = this;
|
|
|
+ console.log('1231111');
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
if(this.form.email){
|
|
@@ -703,6 +512,8 @@ export default {
|
|
|
}
|
|
|
let list = this.toArray();
|
|
|
let obj = JSON.parse(JSON.stringify(this.form));
|
|
|
+ obj.roleIds = self.form.position?self.form.roleIds:[];
|
|
|
+ // obj.position = obj.position+'';
|
|
|
obj.permitMenus = [];
|
|
|
if(obj.status == 0){
|
|
|
for(let i=0;i<list.length;i++){
|
|
@@ -733,6 +544,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
putUserTeacherNew(obj){
|
|
|
+ let self = this;
|
|
|
putUserTeacherNew(obj).then(response => {
|
|
|
if(response.code == 200){
|
|
|
this.msgSuccess(response.msg);
|
|
@@ -744,10 +556,10 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
// 确定
|
|
|
- this.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization' });
|
|
|
+ self.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization' });
|
|
|
}).catch(function() {
|
|
|
// 取消
|
|
|
- this.outPageButton();
|
|
|
+ self.outPageButton();
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -805,7 +617,17 @@ export default {
|
|
|
getAll(){
|
|
|
//身份
|
|
|
optionselect({postName:""}).then(response => {
|
|
|
- this.positionOptions = response.data;
|
|
|
+ let list = [];
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ if(response.data[i].roleIds){
|
|
|
+ list.push(response.data[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this,'positionOptions',list)
|
|
|
+ });
|
|
|
+ //查询角色
|
|
|
+ noAuthOptionselect().then(response => {
|
|
|
+ this.roleOptionselectOptions = response.data;
|
|
|
});
|
|
|
//职称
|
|
|
getVaguet({dictType:"professional",dictLabel:""}).then(response => {
|
|
@@ -829,31 +651,74 @@ export default {
|
|
|
postName:query,
|
|
|
};
|
|
|
optionselect(obj).then(response => {
|
|
|
- this.positionOptions = response.data;
|
|
|
+ let list = [];
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ if(response.data[i].roleIds){
|
|
|
+ list.push(response.data[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this,'positionOptions',list)
|
|
|
});
|
|
|
} else {
|
|
|
- this.positionOptions = [];
|
|
|
+ optionselect({postName:""}).then(response => {
|
|
|
+ let list = [];
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ if(response.data[i].roleIds){
|
|
|
+ list.push(response.data[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this,'positionOptions',list)
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
positionSelectClick(){
|
|
|
-
|
|
|
+ //选中
|
|
|
+ let self = this;
|
|
|
+ if(this.form.position){
|
|
|
+ let num = 0;
|
|
|
+ for(let i=0;i<self.positionOptions.length;i++){
|
|
|
+ if(self.form.position == self.positionOptions[i].postId && self.positionOptions[i].roleIds){
|
|
|
+ let list = self.positionOptions[i].roleIds.split(',')
|
|
|
+ let newList = [];
|
|
|
+ for(let o=0;o<list.length;o++){
|
|
|
+ for(let s=0;s<self.roleOptionselectOptions.length;s++){
|
|
|
+ if(list[o] == self.roleOptionselectOptions[s].roleId){
|
|
|
+ newList.push(parseInt(list[o]));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ self.$set(self.form,'roleIds',newList);
|
|
|
+ num++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(num == 0){
|
|
|
+ self.$set(self.form,'roleIds',[]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$forceUpdate();
|
|
|
},
|
|
|
positionClearClick(){
|
|
|
-
|
|
|
+ //清空
|
|
|
+ // this.$set(this.form,'roleIds',[])
|
|
|
+ optionselect({postName:""}).then(response => {
|
|
|
+ let list = [];
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ if(response.data[i].roleIds){
|
|
|
+ list.push(response.data[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this,'positionOptions',list)
|
|
|
+ });
|
|
|
},
|
|
|
//查询职称列表
|
|
|
categorySelect(query){
|
|
|
- if (query !== '') {
|
|
|
- let obj = {
|
|
|
- dictType:"professional",
|
|
|
- dictLabel:query
|
|
|
- };
|
|
|
- getVaguet(obj).then(response => {
|
|
|
- this.categoryOptions = response.data;
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.categoryOptions = [];
|
|
|
- }
|
|
|
+ let obj = {
|
|
|
+ dictType:"professional",
|
|
|
+ dictLabel:query
|
|
|
+ };
|
|
|
+ getVaguet(obj).then(response => {
|
|
|
+ this.categoryOptions = response.data;
|
|
|
+ });
|
|
|
},
|
|
|
categorySelectClick(){
|
|
|
|
|
@@ -1181,7 +1046,9 @@ export default {
|
|
|
response.data[a].checkType = true;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if(this.propsData.userId){
|
|
|
+ console.log(this.propsData)
|
|
|
let newList = JSON.parse(JSON.stringify(response.data));
|
|
|
this.form.name = this.propsData.name;
|
|
|
this.form.type = this.propsData.type;
|
|
@@ -1694,22 +1561,22 @@ export default {
|
|
|
height:70px;
|
|
|
}
|
|
|
.el-input--small{
|
|
|
- width:180px!important;
|
|
|
+ width:250px!important;
|
|
|
}
|
|
|
.el-select{
|
|
|
- width:180px!important;
|
|
|
+ width:250px!important;
|
|
|
}
|
|
|
.el-input{
|
|
|
- width:180px!important;
|
|
|
+ width:250px!important;
|
|
|
}
|
|
|
.el-input__inner{
|
|
|
- width:180px!important;
|
|
|
+ width:250px!important;
|
|
|
}
|
|
|
.el-radio-group{
|
|
|
- width:180px!important;
|
|
|
+ width:250px!important;
|
|
|
}
|
|
|
.is-disabled{
|
|
|
- width:180px!important;
|
|
|
+ width:250px!important;
|
|
|
}
|
|
|
|
|
|
.switch .el-switch__label {
|