|
@@ -18,17 +18,17 @@
|
|
disabled
|
|
disabled
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="考勤方式" prop="authType" class="form-item" v-if="form.isSignId">
|
|
|
|
- <el-select v-model="form.authType" clearable >
|
|
|
|
|
|
+ <el-form-item label="考勤方式" prop="authType" class="form-item" v-if="form.isSignId">
|
|
|
|
+ <el-select v-model="form.authType" clearable>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in verifyWayList"
|
|
v-for="item in verifyWayList"
|
|
- :key="item.dictValue"
|
|
|
|
- :label="item.dictLabel"
|
|
|
|
- :value="item.dictValue">
|
|
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.authType"
|
|
|
|
+ :value="item.id">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="考勤密码:" prop="authPwd" class="form-item" v-if="form.isSignId">
|
|
|
|
|
|
+ <el-form-item label="考勤密码:" prop="authPwd" class="form-item" v-if="form.isSignId">
|
|
<el-input
|
|
<el-input
|
|
maxlength="16"
|
|
maxlength="16"
|
|
v-model="form.authPwd"
|
|
v-model="form.authPwd"
|
|
@@ -43,250 +43,228 @@
|
|
<p class="title-p">准入信息配置</p>
|
|
<p class="title-p">准入信息配置</p>
|
|
</div>
|
|
</div>
|
|
<div class="max-for-box">
|
|
<div class="max-for-box">
|
|
- <div class="for-box" v-for="(item,index) in listStudent" :key="index" :class="item.checkType?'for-border-two':'for-border-one'" @click="forListClick(item)">
|
|
|
|
|
|
+ <div class="for-box" v-for="(item,index) in listStudent" :key="index"
|
|
|
|
+ :class="item.selected?'for-border-two':'for-border-one'" @click="forListClick(item)">
|
|
<div><span>{{item.materialName}}</span><span>{{item.materialDescribe}}</span></div>
|
|
<div><span>{{item.materialName}}</span><span>{{item.materialDescribe}}</span></div>
|
|
- <img class="position-img" v-if="item.checkType" src="@/assets/ZDimages/integratedManagement/icon_30.png" alt="">
|
|
|
|
|
|
+ <img class="position-img" v-if="item.selected" src="@/assets/ZDimages/integratedManagement/icon_30.png" alt="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <p class="page-submit-common-style-button button-p" @click="upDataButton">{{newUpDataType?'提交':'修改'}}</p>
|
|
|
|
|
|
+ <p class="page-submit-common-style-button button-p" @click="upDataButton">提交</p>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { listTemplate, subjectmaterial, addlist } from "@/apiDemo/laboratory/admissionConfiguration";
|
|
|
|
-import {
|
|
|
|
- getSignTypeList
|
|
|
|
-} from '@/apiDemo/laboratory/subject'
|
|
|
|
-import { infoConfigAdd, infoConfigPut } from '@/apiDemo/laboratory/safetyInfo'
|
|
|
|
-// V3
|
|
|
|
-import { laboratorySubMaterialListData,laboratoryMaterialDataListTemplate } from '@/api/integratedManagement/index'
|
|
|
|
-
|
|
|
|
-export default {
|
|
|
|
- name: "admissionConfiguration",
|
|
|
|
- props:{
|
|
|
|
- subjectData:{},
|
|
|
|
- },
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- //学生模板
|
|
|
|
- listStudent:[],
|
|
|
|
- newUpDataType:false,
|
|
|
|
- form:{
|
|
|
|
- authType:'2',
|
|
|
|
- authPwd:'',
|
|
|
|
- isSignId:'',
|
|
|
|
- },
|
|
|
|
- verifyWayList:[],
|
|
|
|
|
|
+ // V3
|
|
|
|
+ import {
|
|
|
|
+ laboratorySubMaterialListData,
|
|
|
|
+ laboratorySubMaterialAdd,
|
|
|
|
+ laboratoryUserAuthAuthTypeList
|
|
|
|
+ } from '@/api/integratedManagement/index'
|
|
|
|
+ export default {
|
|
|
|
+ name: 'admissionConfiguration',
|
|
|
|
+ props: {
|
|
|
|
+ subjectData: {}
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ //学生模板
|
|
|
|
+ listStudent: [],
|
|
|
|
+ form: {
|
|
|
|
+ authType: '2',
|
|
|
|
+ authPwd: '',
|
|
|
|
+ isSignId: ''
|
|
|
|
+ },
|
|
|
|
+ verifyWayList: [],
|
|
|
|
|
|
- // 表单校验
|
|
|
|
- rules: {
|
|
|
|
- authType: [
|
|
|
|
- { required: true, message: "请选择考勤方式", trigger: "blur" },
|
|
|
|
- ],
|
|
|
|
- authPwd: [
|
|
|
|
- { required: true, message: "考勤密码最少8位 最多16位,必须同时包含字母和数字", trigger: "blur" },
|
|
|
|
- { pattern:/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/, message: "考勤密码最少8位 最多16位,必须同时包含字母和数字", trigger: "blur" }
|
|
|
|
- ],
|
|
|
|
|
|
+ // 表单校验
|
|
|
|
+ rules: {
|
|
|
|
+ authType: [
|
|
|
|
+ { required: true, message: '请选择考勤方式', trigger: 'blur' }
|
|
|
|
+ ],
|
|
|
|
+ authPwd: [
|
|
|
|
+ { required: true, message: '考勤密码最少8位 最多16位,必须同时包含字母和数字', trigger: 'blur' },
|
|
|
|
+ {
|
|
|
|
+ pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/,
|
|
|
|
+ message: '考勤密码最少8位 最多16位,必须同时包含字母和数字',
|
|
|
|
+ trigger: 'blur'
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- },
|
|
|
|
- created() {
|
|
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
|
|
- },
|
|
|
|
- mounted(){
|
|
|
|
- this.laboratorySubMaterialListData();
|
|
|
|
- this.getSignTypeList();
|
|
|
|
- },
|
|
|
|
- methods:{
|
|
|
|
- /** 查询门禁授权类型 */
|
|
|
|
- getSignTypeList(){
|
|
|
|
- getSignTypeList().then(response => {
|
|
|
|
- if(response.code==200){
|
|
|
|
- this.verifyWayList=response.rows
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
},
|
|
},
|
|
- //获取当前实验室准入配置
|
|
|
|
- laboratoryMaterialDataListTemplate(){
|
|
|
|
- let self = this;
|
|
|
|
- laboratoryMaterialDataListTemplate({subId:this.subjectData.subId}).then( response => {
|
|
|
|
- for(let i=0;i<response.data.listStudent.length;i++){
|
|
|
|
- for(let o=0;o<self.listStudent.length;o++){
|
|
|
|
- if(response.data.listStudent[i].id == self.listStudent[o].id){
|
|
|
|
- self.listStudent[o].checkType = true;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if(!response.data.listStudent[0]){
|
|
|
|
- this.newUpDataType = true;
|
|
|
|
- }else{
|
|
|
|
- this.newUpDataType = false;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ this.laboratorySubMaterialListData()
|
|
|
|
+ this.laboratoryUserAuthAuthTypeList()
|
|
},
|
|
},
|
|
- //提交接口
|
|
|
|
- upDataButton(){
|
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
|
- if (valid) {
|
|
|
|
- let self = this;
|
|
|
|
- let num = 0;
|
|
|
|
- let newData = {
|
|
|
|
- labSubjectList:[],
|
|
|
|
- studentList:[],
|
|
|
|
- };
|
|
|
|
- newData.labSubjectList.push({id:this.subjectData.id});
|
|
|
|
- newData.authType=this.form.authType
|
|
|
|
- newData.authPwd=this.form.authPwd
|
|
|
|
- for(let i=0;i<self.listStudent.length;i++){
|
|
|
|
- if(self.listStudent[i].checkType){
|
|
|
|
- let obj = {
|
|
|
|
- materialId:self.listStudent[i].id,
|
|
|
|
- materialType:self.listStudent[i].materialSuit
|
|
|
|
- };
|
|
|
|
- newData.studentList.push(obj);
|
|
|
|
- num++
|
|
|
|
- }
|
|
|
|
|
|
+ methods: {
|
|
|
|
+ /** 查询门禁授权类型 */
|
|
|
|
+ laboratoryUserAuthAuthTypeList() {
|
|
|
|
+ laboratoryUserAuthAuthTypeList().then(response => {
|
|
|
|
+ if (response.code == 200) {
|
|
|
|
+ this.verifyWayList = response.rows
|
|
}
|
|
}
|
|
- if(num == 0){
|
|
|
|
- this.msgError("请选择准入条件");
|
|
|
|
- return
|
|
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //提交接口
|
|
|
|
+ upDataButton() {
|
|
|
|
+ this.$refs['form'].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ let self = this
|
|
|
|
+ let num = 0
|
|
|
|
+ let newData = {
|
|
|
|
+ subjectModelList: [{ subId: this.subjectData.subId }],
|
|
|
|
+ studentList: [],
|
|
|
|
+ authType: this.form.authType,
|
|
|
|
+ authPwd: this.form.authPwd
|
|
|
|
+ }
|
|
|
|
+ for (let i = 0; i < self.listStudent.length; i++) {
|
|
|
|
+ if (self.listStudent[i].selected) {
|
|
|
|
+ let obj = {
|
|
|
|
+ materialId: self.listStudent[i].materialId,
|
|
|
|
+ materialType: self.listStudent[i].materialSuit
|
|
|
|
+ }
|
|
|
|
+ newData.studentList.push(obj)
|
|
|
|
+ num++
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (num == 0) {
|
|
|
|
+ this.msgError('请选择准入条件')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ laboratorySubMaterialAdd(newData).then(response => {
|
|
|
|
+ this.msgSuccess(response.message)
|
|
|
|
+ this.$parent.clickPage(1)
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- addlist(newData).then( response => {
|
|
|
|
- this.msgSuccess(this.newUpDataType?"提交成功":"修改成功");
|
|
|
|
- this.$parent.clickPage(1);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- //点击事件
|
|
|
|
- forListClick(item){
|
|
|
|
- item.checkType = !item.checkType;
|
|
|
|
- },
|
|
|
|
- //获取准入模板
|
|
|
|
- laboratorySubMaterialListData(){
|
|
|
|
- this.loading = true;
|
|
|
|
- laboratorySubMaterialListData({subId:this.subjectData.subId}).then( response => {
|
|
|
|
- for(let i=0;i<response.data.listStudent.length;i++){
|
|
|
|
- response.data.listStudent[i].checkType = false;
|
|
|
|
- }
|
|
|
|
- this.$set(this,'listStudent',response.data.listStudent);
|
|
|
|
- this.$set(this.form,'isSignId',response.data.cardInfo.id);
|
|
|
|
- this.form.authType=response.data.cardInfo.authType?response.data.cardInfo.authType+'':'2';
|
|
|
|
- this.form.authPwd=response.data.cardInfo.authPwd;
|
|
|
|
- this.laboratoryMaterialDataListTemplate();
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- //返回按钮
|
|
|
|
- backPage(){
|
|
|
|
- this.$parent.clickPage(1);
|
|
|
|
- },
|
|
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //点击事件
|
|
|
|
+ forListClick(item) {
|
|
|
|
+ item.selected = !item.selected
|
|
|
|
+ },
|
|
|
|
+ //获取准入模板
|
|
|
|
+ laboratorySubMaterialListData() {
|
|
|
|
+ this.loading = true
|
|
|
|
+ laboratorySubMaterialListData({ subId: this.subjectData.subId }).then(response => {
|
|
|
|
+ this.$set(this, 'listStudent', response.data.listStudent)
|
|
|
|
+ this.$set(this.form, 'isSignId', response.data.infoBoard.boardId)
|
|
|
|
+ this.$set(this.form, 'authType', response.data.infoBoard.authType)
|
|
|
|
+ this.$set(this.form, 'authPwd', response.data.infoBoard.authPwd)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //返回按钮
|
|
|
|
+ backPage() {
|
|
|
|
+ this.$parent.clickPage(1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-}
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
-.admissionConfiguration{
|
|
|
|
- flex:1;
|
|
|
|
- overflow-y: scroll;
|
|
|
|
- position: relative;
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- border-radius:10px!important;
|
|
|
|
- margin:5px 20px 20px 10px!important;
|
|
|
|
- box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
|
|
|
|
- .form-item{
|
|
|
|
- display: inline-block;
|
|
|
|
- margin-top: 40px;
|
|
|
|
- }
|
|
|
|
- .basics{
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: flex-start;
|
|
|
|
- align-items: center;
|
|
|
|
- .tip{
|
|
|
|
- width: 14px;
|
|
|
|
- height: 14px;
|
|
|
|
- margin-left: 14px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .top-title-box{
|
|
|
|
|
|
+ .admissionConfiguration {
|
|
|
|
+ flex: 1;
|
|
|
|
+ overflow-y: scroll;
|
|
|
|
+ position: relative;
|
|
display: flex;
|
|
display: flex;
|
|
- border-bottom:1px solid #E0E0E0;
|
|
|
|
- margin:0 20px;
|
|
|
|
- p{
|
|
|
|
- margin:20px 0;
|
|
|
|
- line-height: 40px;
|
|
|
|
- }
|
|
|
|
- .title-p{
|
|
|
|
- font-size:18px;
|
|
|
|
- flex:1;
|
|
|
|
- color:#0045AF;
|
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ border-radius: 10px !important;
|
|
|
|
+ margin: 5px 20px 20px 10px !important;
|
|
|
|
+ box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
|
|
|
|
+ .form-item {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin-top: 40px;
|
|
}
|
|
}
|
|
- .right-icon{
|
|
|
|
- width:40px;
|
|
|
|
- text-align: center;
|
|
|
|
|
|
+ .basics {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
+ align-items: center;
|
|
|
|
+ .tip {
|
|
|
|
+ width: 14px;
|
|
|
|
+ height: 14px;
|
|
|
|
+ margin-left: 14px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- .right-icon:hover{
|
|
|
|
- cursor: pointer;
|
|
|
|
- background: rgba(0,0,0,0.1);
|
|
|
|
- -webkit-border-radius: 50%;
|
|
|
|
- -moz-border-radius: 50%;
|
|
|
|
- border-radius: 50%;
|
|
|
|
|
|
+ .top-title-box {
|
|
|
|
+ display: flex;
|
|
|
|
+ border-bottom: 1px solid #E0E0E0;
|
|
|
|
+ margin: 0 20px;
|
|
|
|
+ p {
|
|
|
|
+ margin: 20px 0;
|
|
|
|
+ line-height: 40px;
|
|
|
|
+ }
|
|
|
|
+ .title-p {
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ flex: 1;
|
|
|
|
+ color: #0045AF;
|
|
|
|
+ }
|
|
|
|
+ .right-icon {
|
|
|
|
+ width: 40px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ .right-icon:hover {
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ background: rgba(0, 0, 0, 0.1);
|
|
|
|
+ -webkit-border-radius: 50%;
|
|
|
|
+ -moz-border-radius: 50%;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- .name-box{
|
|
|
|
- margin:32px 0 0 35px;
|
|
|
|
- font-size:16px;
|
|
|
|
- p{
|
|
|
|
- margin:0;
|
|
|
|
|
|
+ .name-box {
|
|
|
|
+ margin: 32px 0 0 35px;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ p {
|
|
|
|
+ margin: 0;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
- .max-for-box{
|
|
|
|
- .for-box{
|
|
|
|
- display: inline-block;
|
|
|
|
- width:400px;
|
|
|
|
- height:60px;
|
|
|
|
- margin:32px 0 0 40px;
|
|
|
|
- cursor: pointer;
|
|
|
|
- border-radius:10px;
|
|
|
|
- overflow: hidden;
|
|
|
|
- position: relative;
|
|
|
|
- div{
|
|
|
|
- display: flex;
|
|
|
|
- line-height:60px;
|
|
|
|
- span:nth-child(1){
|
|
|
|
- margin:0 18px 0 18px;
|
|
|
|
- font-size:16px;
|
|
|
|
- color:#333;
|
|
|
|
- overflow:hidden;
|
|
|
|
- text-overflow:ellipsis;
|
|
|
|
- white-space:nowrap;
|
|
|
|
|
|
+ .max-for-box {
|
|
|
|
+ .for-box {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 400px;
|
|
|
|
+ height: 60px;
|
|
|
|
+ margin: 32px 0 0 40px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ position: relative;
|
|
|
|
+ div {
|
|
|
|
+ display: flex;
|
|
|
|
+ line-height: 60px;
|
|
|
|
+ span:nth-child(1) {
|
|
|
|
+ margin: 0 18px 0 18px;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ color: #333;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ }
|
|
|
|
+ span:nth-child(2) {
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ color: #999999;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- span:nth-child(2){
|
|
|
|
- font-size:14px;
|
|
|
|
- color:#999999;
|
|
|
|
- overflow:hidden;
|
|
|
|
- text-overflow:ellipsis;
|
|
|
|
- white-space:nowrap;
|
|
|
|
|
|
+ .position-img {
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 0;
|
|
|
|
+ bottom: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .position-img{
|
|
|
|
- position: absolute;
|
|
|
|
- right:0;
|
|
|
|
- bottom:0;
|
|
|
|
|
|
+ .for-border-one {
|
|
|
|
+ border: 1px solid #E0E0E0;
|
|
|
|
+ }
|
|
|
|
+ .for-border-two {
|
|
|
|
+ border: 1px solid #349cfb;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .for-border-one{
|
|
|
|
- border:1px solid #E0E0E0;
|
|
|
|
- }
|
|
|
|
- .for-border-two{
|
|
|
|
- border:1px solid #349cfb;
|
|
|
|
|
|
+ .button-p {
|
|
|
|
+ width: 80px;
|
|
|
|
+ margin: 40px auto;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .button-p{
|
|
|
|
- width:80px;
|
|
|
|
- margin:40px auto;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
</style>
|
|
</style>
|