|
@@ -279,6 +279,7 @@
|
|
<el-button size="small" type="primary" @click="handJue">{{ $t('modifyingRoles') }}</el-button>
|
|
<el-button size="small" type="primary" @click="handJue">{{ $t('modifyingRoles') }}</el-button>
|
|
<el-button size="small" type="primary" @click="workingHoursDialogClick()">{{ $t('xiuZhengGongShiSuoShuBuMen') }}</el-button>
|
|
<el-button size="small" type="primary" @click="workingHoursDialogClick()">{{ $t('xiuZhengGongShiSuoShuBuMen') }}</el-button>
|
|
<el-button size="small" type="primary" @click="handleSelectionUser()">{{ $t('piLiangQiYongYuanGong') }}</el-button>
|
|
<el-button size="small" type="primary" @click="handleSelectionUser()">{{ $t('piLiangQiYongYuanGong') }}</el-button>
|
|
|
|
+ <el-button size="small" type="primary" @click="showUserGroupVisable()">批量修改分组</el-button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -348,6 +349,21 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
+ <!-- 批量修改用户分组 -->
|
|
|
|
+ <el-dialog :title="$t('changes')" :visible.sync="userGroupVisable" v-if="userGroupVisable" width="600px">
|
|
|
|
+ <el-form model="" label-width="20%">
|
|
|
|
+ <el-form-item label="用户分组">
|
|
|
|
+ <el-select v-model="userGroupId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%">
|
|
|
|
+ <el-option v-for="(item, index) in userGroupList" :key="index" :label="item.groupName" :value="item.id"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="userGroupVisable = false">{{ $t('btn.cancel') }}</el-button>
|
|
|
|
+ <el-button type="primary" :disabled="!userGroupId" :loading="userGroupLoading" @click="editUserGroup()">{{ $t('btn.determine') }}</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<!-- 新增部门 -->
|
|
<!-- 新增部门 -->
|
|
<el-dialog :title="depTitle" :visible.sync="departmentVisible" width="500px" >
|
|
<el-dialog :title="depTitle" :visible.sync="departmentVisible" width="500px" >
|
|
<el-form ref="depForm" :model="depForm" :rules="depRules" label-width="100px">
|
|
<el-form ref="depForm" :model="depForm" :rules="depRules" label-width="100px">
|
|
@@ -478,6 +494,11 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="用户分组" prop="groupId" v-if="permissions.userGroupManage">
|
|
|
|
+ <el-select v-model="insertForm.groupId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%">
|
|
|
|
+ <el-option v-for="item in userGroupList" :label="item.groupName" :value="item.id" :key="item.id"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item :label="item.name" v-for="item,index in userCustomConfig" :key="item.id">
|
|
<el-form-item :label="item.name" v-for="item,index in userCustomConfig" :key="item.id">
|
|
<el-select v-if="item.type == 0" v-model="insertForm[suoying[index]]" :placeholder="$t('defaultText.pleaseChoose')" clearable style="width: 100%">
|
|
<el-select v-if="item.type == 0" v-model="insertForm[suoying[index]]" :placeholder="$t('defaultText.pleaseChoose')" clearable style="width: 100%">
|
|
<el-option v-for="option in item.itemList" :label="option.name" :value="option.name" :key="option.id">
|
|
<el-option v-for="option in item.itemList" :label="option.name" :value="option.name" :key="option.id">
|
|
@@ -1170,6 +1191,12 @@ export default {
|
|
whiteListAll: [],
|
|
whiteListAll: [],
|
|
whiteListAllTwo: [],
|
|
whiteListAllTwo: [],
|
|
specialHolidaysDialog: false,
|
|
specialHolidaysDialog: false,
|
|
|
|
+
|
|
|
|
+ // 用户分组
|
|
|
|
+ userGroupList: [],
|
|
|
|
+ userGroupId: '',
|
|
|
|
+ userGroupVisable: false,
|
|
|
|
+ userGroupLoading: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -2861,7 +2888,8 @@ export default {
|
|
plate5: res.data.plate5,
|
|
plate5: res.data.plate5,
|
|
jobNumber: res.data.jobNumber,
|
|
jobNumber: res.data.jobNumber,
|
|
onlyAuditOnce: res.data.onlyAuditOnce,
|
|
onlyAuditOnce: res.data.onlyAuditOnce,
|
|
- reportDeptIdsList: res.data.userReportDeptList || []
|
|
|
|
|
|
+ reportDeptIdsList: res.data.userReportDeptList || [],
|
|
|
|
+ groupId: res.data.userGroupId || ''
|
|
};
|
|
};
|
|
this.$set(this.insertForm, 'inductionDate', res.data.inductionDate)
|
|
this.$set(this.insertForm, 'inductionDate', res.data.inductionDate)
|
|
this.getUserCustomConfig(1);
|
|
this.getUserCustomConfig(1);
|
|
@@ -2977,6 +3005,9 @@ export default {
|
|
// }
|
|
// }
|
|
|
|
|
|
// console.log(form, 'form')
|
|
// console.log(form, 'form')
|
|
|
|
+ if(this.permissions.userGroupManage) {
|
|
|
|
+ form.groupId = this.insertForm.groupId;
|
|
|
|
+ }
|
|
|
|
|
|
if (this.insertForm.id != null) {
|
|
if (this.insertForm.id != null) {
|
|
form.id = this.insertForm.id;
|
|
form.id = this.insertForm.id;
|
|
@@ -3867,6 +3898,15 @@ export default {
|
|
}
|
|
}
|
|
},error => {})
|
|
},error => {})
|
|
},
|
|
},
|
|
|
|
+ getUserGrpupList() {
|
|
|
|
+ this.http.post('/user-group/list',{
|
|
|
|
+ },res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ let list = res.data
|
|
|
|
+ this.userGroupList = list
|
|
|
|
+ }
|
|
|
|
+ },error => {})
|
|
|
|
+ },
|
|
// 企业微信选人搜索
|
|
// 企业微信选人搜索
|
|
echartDepartment() {
|
|
echartDepartment() {
|
|
if(this.wxFilterText != '') {
|
|
if(this.wxFilterText != '') {
|
|
@@ -3932,6 +3972,34 @@ export default {
|
|
if (!value) return true;
|
|
if (!value) return true;
|
|
return data.label.indexOf(value) !== -1;
|
|
return data.label.indexOf(value) !== -1;
|
|
},
|
|
},
|
|
|
|
+ showUserGroupVisable() {
|
|
|
|
+ if (this.handleSelectionZzjgDate.length == 0) {
|
|
|
|
+ this.$message(this.$t('pleaseselectpersonnel'));
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.userGroupId = ''
|
|
|
|
+ this.userGroupVisable = true
|
|
|
|
+ },
|
|
|
|
+ editUserGroup() {
|
|
|
|
+ this.userGroupLoading = true
|
|
|
|
+ let ids = this.handleSelectionZzjgDate.map(item => item.id).join(',')
|
|
|
|
+ this.http.post("/user/batchSetUserGroup", {
|
|
|
|
+ userIds: ids,
|
|
|
|
+ groupId: this.userGroupId
|
|
|
|
+ },
|
|
|
|
+ res => {
|
|
|
|
+ this.userGroupLoading = false
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: this.$t('caoZuoChengGong'),
|
|
|
|
+ type: "success"
|
|
|
|
+ });
|
|
|
|
+ this.userGroupVisable = false
|
|
|
|
+ this.getUser()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => { this.userGroupLoading = false });
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.deactiveDate = util.formatDate.format(new Date(), "yyyy-MM-dd");
|
|
this.deactiveDate = util.formatDate.format(new Date(), "yyyy-MM-dd");
|
|
@@ -3951,6 +4019,9 @@ export default {
|
|
}
|
|
}
|
|
this.statesPush();
|
|
this.statesPush();
|
|
this.getWhiteListAll()
|
|
this.getWhiteListAll()
|
|
|
|
+ if(this.permissions.userGroupManage) {
|
|
|
|
+ this.getUserGrpupList()
|
|
|
|
+ }
|
|
// 获取企业微信的参数
|
|
// 获取企业微信的参数
|
|
// if(this.user.companyId == '1081' || this.user.companyId == '7') {
|
|
// if(this.user.companyId == '1081' || this.user.companyId == '7') {
|
|
// this.agentConfig()
|
|
// this.agentConfig()
|