|
@@ -1,12 +1,12 @@
|
|
|
<template>
|
|
|
- <el-dialog class="inspectionPlan-dialog-box"
|
|
|
+ <el-dialog class="inspectionGroup-dialog-box"
|
|
|
:title="addDialogTitle" :visible.sync="addDialogType" v-if="addDialogType"
|
|
|
@close="addDialogOff" width="1303px" append-to-body>
|
|
|
<div class="add-max-box" v-if="addDialogBoxType == 1">
|
|
|
- <el-form :model="dialogForm" :rules="rules" label-width="100px">
|
|
|
+ <el-form :model="dialogForm" :rules="rules" label-width="100px" class="add-form-box">
|
|
|
<el-form-item label="是否启用:" prop="data1">
|
|
|
<el-switch
|
|
|
- :disabled="lookInfoType"
|
|
|
+ v-if="!lookInfoType"
|
|
|
@click.native="changeIsNeedCaptcha(dialogForm.data1)"
|
|
|
class="switch captcha-img"
|
|
|
:active-value="1"
|
|
@@ -17,6 +17,7 @@
|
|
|
active-text="启用"
|
|
|
inactive-text="停用"
|
|
|
></el-switch>
|
|
|
+ <p v-if="lookInfoType" :class="dialogForm.data1==1?'switchFontColor':''" style="line-height:40px;">{{dialogForm.data1==1?'启用':'停用'}}</p>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="巡查组名称:" prop="data2">
|
|
|
<el-input :disabled="lookInfoType" v-model="dialogForm.data2" placeholder="未选择指标" maxLength="10" style="width:450px;"/>
|
|
@@ -40,9 +41,26 @@
|
|
|
</div>
|
|
|
<el-table border :data="dialogTableList">
|
|
|
<el-table-column label="序号" align="center" type="index" width="140"/>
|
|
|
- <el-table-column label="工号" align="center" prop="deptName" show-overflow-tooltip/>
|
|
|
<el-table-column label="姓名" align="center" prop="deptName" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="工号" align="center" prop="deptName" show-overflow-tooltip/>
|
|
|
<el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="是否启用" align="center" prop="deptName" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch
|
|
|
+ v-if="!lookInfoType"
|
|
|
+ @click.native="changeIsNeedCaptcha(scope.row.deptName)"
|
|
|
+ class="switch captcha-img"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ active-color="#0183FA"
|
|
|
+ inactive-color="#999"
|
|
|
+ v-model="scope.row.deptName"
|
|
|
+ active-text="启用"
|
|
|
+ inactive-text="停用"
|
|
|
+ ></el-switch>
|
|
|
+ <p v-if="lookInfoType" :class="scope.row.deptName==1?'switchFontColor':''">{{scope.row.deptName==1?'启用':'停用'}}</p>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" align="center" prop="deptName" width="150" v-if="!lookInfoType">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="table-button-box">
|
|
@@ -175,7 +193,7 @@
|
|
|
//层级
|
|
|
deptSelectList:[],
|
|
|
//选中巡查人员列表
|
|
|
- dialogTableList:[{userId:1},{userId:2},{userId:3},{userId:4},{userId:5},{userId:6},{userId:7},{userId:8},{userId:9},{userId:10}],
|
|
|
+ dialogTableList:[{userId:1,deptName:1},{userId:2,deptName:2},{userId:3},{userId:4},{userId:5},{userId:6},{userId:7},{userId:8},{userId:9},{userId:10}],
|
|
|
|
|
|
//弹窗内容状态
|
|
|
userQueryParamsLeft:{
|
|
@@ -220,8 +238,13 @@
|
|
|
addDialogOpen(type,data){
|
|
|
if(type==1){
|
|
|
this.$set(this,'addDialogTitle','创建巡查计划');
|
|
|
- }else{
|
|
|
+ this.$set(this,'lookInfoType',false);
|
|
|
+ }else if(type == 2){
|
|
|
this.$set(this,'addDialogTitle','编辑巡查计划');
|
|
|
+ this.$set(this,'lookInfoType',false);
|
|
|
+ }else {
|
|
|
+ this.$set(this,'addDialogTitle','巡查计划详情');
|
|
|
+ this.$set(this,'lookInfoType',true);
|
|
|
}
|
|
|
this.$set(this,'addDialogType',true);
|
|
|
},
|
|
@@ -308,27 +331,105 @@
|
|
|
this.userNumRight = selection.length;
|
|
|
this.userIdsRight = selection.map(item => item.userId);
|
|
|
},
|
|
|
- changeIsNeedCaptcha(){
|
|
|
+ changeIsNeedCaptcha(data){
|
|
|
if(this.lookInfoType){
|
|
|
return
|
|
|
}
|
|
|
- this.dialogForm.data1 = this.dialogForm.data1 == 1?0:1;
|
|
|
- console.log("row.deviceStatus",row);
|
|
|
+ data = data == 1?0:1;
|
|
|
+ this.$forceUpdate()
|
|
|
},
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- .inspectionPlan-dialog-box{
|
|
|
+ .inspectionGroup-dialog-box{
|
|
|
.el-dialog__body{
|
|
|
padding:20px 30px 20px 30px;
|
|
|
}
|
|
|
+ .is-disabled{
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ color: #333;
|
|
|
+ border-color: #f5f5f5;
|
|
|
+ cursor:auto;
|
|
|
+ border-radius: 4px;
|
|
|
+ .el-input__icon{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .el-input__inner{
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ color: #333;
|
|
|
+ border-color: #f5f5f5;
|
|
|
+ cursor:auto!important;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+ .el-range-input{
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ color: #333;
|
|
|
+ border-color: #f5f5f5;
|
|
|
+ cursor:auto;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+ .el-textarea__inner{
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ color: #333;
|
|
|
+ border-color: #f5f5f5;
|
|
|
+ cursor:auto;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .switchFontColor{
|
|
|
+ color:#0183FA;
|
|
|
+ }
|
|
|
.add-max-box{
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
overflow: hidden;
|
|
|
height:610px;
|
|
|
+ .add-form-box{
|
|
|
+ .switch .el-switch__label {
|
|
|
+ position: absolute;
|
|
|
+ display: none;
|
|
|
+ color: #fff !important;
|
|
|
+ }
|
|
|
+ .switch .el-switch__label--right {
|
|
|
+ z-index: 1;
|
|
|
+ }
|
|
|
+ .switch .el-switch__label--right span{
|
|
|
+ margin-left: 10px;
|
|
|
+ margin-top: 8px;
|
|
|
+ }
|
|
|
+ .switch .el-switch__label--left {
|
|
|
+ z-index: 1;
|
|
|
+ }
|
|
|
+ .switch .el-switch__label--left span{
|
|
|
+ margin-top: 8px;
|
|
|
+ margin-left: 30px;
|
|
|
+ }
|
|
|
+ .switch .el-switch__label.is-active {
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .el-switch__core:after{
|
|
|
+ width:20px;
|
|
|
+ height:20px;
|
|
|
+ top:4px;
|
|
|
+ margin-left: 4px;
|
|
|
+ }
|
|
|
+ .el-switch.is-checked .el-switch__core::after{
|
|
|
+ width:20px;
|
|
|
+ height:20px;
|
|
|
+ top:4px;
|
|
|
+ margin-left: -24px;
|
|
|
+
|
|
|
+ }
|
|
|
+ .switch.el-switch .el-switch__core,
|
|
|
+ .el-switch .el-switch__label {
|
|
|
+ width: 70px !important;
|
|
|
+ height:30px !important;
|
|
|
+ border-radius: 50px 50px 50px 50px;
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
.dialog-table-box{
|
|
|
margin-top:20px;
|
|
|
display: flex;
|
|
@@ -356,6 +457,32 @@
|
|
|
margin:10px 26px;
|
|
|
}
|
|
|
}
|
|
|
+ .switch .el-switch__label {
|
|
|
+ position: absolute;
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .switch .el-switch__label--right {
|
|
|
+ z-index: 1;
|
|
|
+ color: #fff !important;
|
|
|
+ }
|
|
|
+ .switch .el-switch__label--right span{
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ .switch .el-switch__label--left {
|
|
|
+ z-index: 1;
|
|
|
+ color: #fff !important;
|
|
|
+ }
|
|
|
+ .switch .el-switch__label--left span{
|
|
|
+ margin-left: 24px;
|
|
|
+ }
|
|
|
+ .switch .el-switch__label.is-active {
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .switch.el-switch .el-switch__core,
|
|
|
+ .el-switch .el-switch__label {
|
|
|
+ width: 60px !important;
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.inspectionPlan-dialog-user-box{
|
|
@@ -442,48 +569,5 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .switch .el-switch__label {
|
|
|
- position: absolute;
|
|
|
- display: none;
|
|
|
- color: #fff !important;
|
|
|
- }
|
|
|
- .switch .el-switch__label--right {
|
|
|
- z-index: 1;
|
|
|
- }
|
|
|
- .switch .el-switch__label--right span{
|
|
|
- margin-left: 10px;
|
|
|
- margin-top: 8px;
|
|
|
- }
|
|
|
- .switch .el-switch__label--left {
|
|
|
- z-index: 1;
|
|
|
- }
|
|
|
- .switch .el-switch__label--left span{
|
|
|
- margin-top: 8px;
|
|
|
- margin-left: 30px;
|
|
|
- }
|
|
|
- .switch .el-switch__label.is-active {
|
|
|
- display: block;
|
|
|
- }
|
|
|
- .el-switch__core:after{
|
|
|
- width:20px;
|
|
|
- height:20px;
|
|
|
- top:4px;
|
|
|
- margin-left: 4px;
|
|
|
- }
|
|
|
- .el-switch.is-checked .el-switch__core::after{
|
|
|
- width:20px;
|
|
|
- height:20px;
|
|
|
- top:4px;
|
|
|
- margin-left: -24px;
|
|
|
-
|
|
|
- }
|
|
|
- .switch.el-switch .el-switch__core,
|
|
|
- .el-switch .el-switch__label {
|
|
|
- width: 70px !important;
|
|
|
- height:30px !important;
|
|
|
- border-radius: 50px 50px 50px 50px;
|
|
|
- margin: 0;
|
|
|
- }
|
|
|
}
|
|
|
</style>
|