|
@@ -161,31 +161,45 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<!--设置时长样式内容-->
|
|
|
- <p style="margin-left:10px;color:#666;">填报提醒时间设置</p>
|
|
|
+ <p style="margin-left:10px;color:#666;">填报提醒设置</p>
|
|
|
<el-row :gutter="20" style="padding-top:10px;width:100%;margin:0 auto;padding-left:10px;padding-right:10px;">
|
|
|
- <el-col :span="24" >
|
|
|
- <div class="panel" style="height:60px;">
|
|
|
- <el-form :inline="true" :model="timeType" style="margin-top:10px;">
|
|
|
-
|
|
|
- <el-form-item label="未填报提醒时间 " prop="alertTime">
|
|
|
- <el-time-picker
|
|
|
- v-model="timeType.alertTime"
|
|
|
- placeholder="提醒时间"
|
|
|
- style="width:120px;"
|
|
|
- format="HH:mm"
|
|
|
- value-format="HH:mm"
|
|
|
- :picker-options="{
|
|
|
- start: '08:00',
|
|
|
- end: '23:30'
|
|
|
- }">
|
|
|
- </el-time-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="提醒文本" prop="alertMsg" style="width: 50%;margin-left:10px;">
|
|
|
- <el-input placeholder="请输入提醒文本" v-model="timeType.alertMsg" clearable class="apu" maxlength="20"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
+ <el-col :span="24" >
|
|
|
+ <div class="panel" style="height:200px;">
|
|
|
+ <el-form :inline="true" :model="timeType" style="margin-top:10px;">
|
|
|
+ <el-form-item label="提醒时间 " prop="alertTime">
|
|
|
+ <el-time-picker
|
|
|
+ v-model="timeType.alertTime"
|
|
|
+ placeholder="提醒时间"
|
|
|
+ style="width:120px;"
|
|
|
+ format="HH:mm"
|
|
|
+ value-format="HH:mm"
|
|
|
+ :picker-options="{
|
|
|
+ start: '08:00',
|
|
|
+ end: '23:30'
|
|
|
+ }">
|
|
|
+ </el-time-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="alertType" style="margin-left:10px">
|
|
|
+ <el-select v-model="timeType.alertType" placeholder="请选择提醒方式">
|
|
|
+ <el-option label="每日提醒当天漏填" :value="0"></el-option>
|
|
|
+ <el-option label="每日提醒昨天漏填" :value="1"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="提醒文本" prop="alertMsg" style="width: 50%;margin-left:10px;">
|
|
|
+ <el-input placeholder="请输入提醒文本" v-model="timeType.alertMsg" clearable class="apu" maxlength="20"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="underpanel">
|
|
|
+ <div class="whiteList_head">
|
|
|
+ <span style="float:left;">不提醒人员设置</span>
|
|
|
+ <el-link type="primary" style="float:left;margin-left:15px" :underline="false" @click="addWhite">添加</el-link>
|
|
|
+ </div>
|
|
|
+ <div class="whiteList_content">
|
|
|
+ <el-tag style="margin:10px 0 0 10px" v-for="item in whiteList" :key="item.id" closable @close="whiteDelete(item)">{{item.label}}</el-tag>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<!-- 设置员工可补填的时间 -->
|
|
|
<p style="margin-left:10px;color:#666;">普通员工补填日报时间限制</p>
|
|
@@ -346,6 +360,26 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 日报提醒白名单 -->
|
|
|
+ <el-dialog title="选择人员" v-if="whiteListDialog" :visible.sync="whiteListDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
+ <div class="tree" style="height:400px">
|
|
|
+ <el-scrollbar style="height:100%">
|
|
|
+ <el-input
|
|
|
+ placeholder="输入关键字进行过滤"
|
|
|
+ v-model="filterText">
|
|
|
+ </el-input>
|
|
|
+ <el-tree :data="whiteListAll" show-checkbox :props="defaultProps" node-key="id"
|
|
|
+ ref="whiteListTree"
|
|
|
+ highlight-current :filter-node-method="filterNode"></el-tree>
|
|
|
+ </el-scrollbar>
|
|
|
+ </div>
|
|
|
+ <!-- <div>已选中 {{chosenMembCount}} 人</div> :default-checked-keys="alreadyPartArray" @check-change="onTreeItemChange" -->
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="whiteListDialog = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="setWhiteList()">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -398,9 +432,24 @@
|
|
|
endTime: null
|
|
|
},
|
|
|
restList: [],
|
|
|
- setupItemId: null
|
|
|
+ setupItemId: null,
|
|
|
+
|
|
|
+
|
|
|
+ whiteListDialog: false,
|
|
|
+ whiteListAll: [],
|
|
|
+ whiteList: [],
|
|
|
+ filterText: '',
|
|
|
+ defaultProps: {
|
|
|
+ children: 'children',
|
|
|
+ label: 'label'
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ filterText(val) {
|
|
|
+ this.$refs.whiteListTree.filter(val);
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
setupRest(){
|
|
|
// this.getRestList()
|
|
@@ -661,6 +710,121 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ getWhiteListAll(){
|
|
|
+ this.http.post('/department/listAllMemb',{
|
|
|
+ },res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ let list = res.data
|
|
|
+ this.haveUsersList(list)
|
|
|
+ this.whiteListAll = JSON.parse(JSON.stringify(list))
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ haveUsersList(list){
|
|
|
+ for (var i in list) {
|
|
|
+ if (list[i].children != null) {
|
|
|
+ this.haveUsersList(list[i].children);
|
|
|
+ }
|
|
|
+ if (list[i].userList != null) {
|
|
|
+ if (list[i].children == null) {
|
|
|
+ list[i].children = [];
|
|
|
+ }
|
|
|
+ list[i].userList.forEach(element => {
|
|
|
+ var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
|
|
|
+ list[i].children.push(obj);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ filterNode(value, data) {
|
|
|
+ if (!value) return true;
|
|
|
+ return data.label.indexOf(value) !== -1;
|
|
|
+ },
|
|
|
+ // onTreeItemChange() {
|
|
|
+ // var chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
|
|
|
+ // var list = chosenList.filter(item=>item.isUser == 1);
|
|
|
+ // // this.chosenMembCount = list.length;
|
|
|
+ // },
|
|
|
+ addWhite(){
|
|
|
+ this.whiteListDialog = true
|
|
|
+ this.filterText = ''
|
|
|
+ this.getWhiteListAll()
|
|
|
+ },
|
|
|
+ whiteDelete(item){
|
|
|
+
|
|
|
+ this.whiteList.splice(this.whiteList.indexOf(item),1)
|
|
|
+ console.log(this.whiteList);
|
|
|
+ this.http.post('/time-type/changeUserReportType',{
|
|
|
+ id: item.id
|
|
|
+ },res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.$message({
|
|
|
+ message: '删除成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },err => {
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setWhiteList(){
|
|
|
+ let chosenList = this.$refs.whiteListTree.getCheckedNodes();
|
|
|
+ let chose2 = chosenList.filter(item=>item.isUser == 1)
|
|
|
+ let chose3 = ''
|
|
|
+ for(let i=0;i<chose2.length;i++){chose3 += chose2[i].id + ','}
|
|
|
+ chose3 = chose3.substring(0,chose3.length - 1)
|
|
|
+
|
|
|
+ for(let i in chose2){
|
|
|
+ let isrepeat = false
|
|
|
+ for(let n in this.whiteList){
|
|
|
+ if(chose2[i].id == this.whiteList[n].id){
|
|
|
+ isrepeat = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!isrepeat){
|
|
|
+ this.whiteList.push(chose2[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.http.post('/time-type/changeUserReportTypeList',{
|
|
|
+ ids: chose3
|
|
|
+ },res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.$message({
|
|
|
+ message: '添加成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.whiteListDialog = false
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
submitInsert() {
|
|
|
this.$refs.form1.validate(valid => {
|
|
|
if (valid) {
|
|
@@ -765,10 +929,18 @@
|
|
|
res => {
|
|
|
this.listLoading = false;
|
|
|
if (res.code == "ok") {
|
|
|
- this.timeType = res.data;
|
|
|
+ this.timeType = res.data.result;
|
|
|
this.timeType.fillOvertime = this.timeType.fillOvertime ? true : false
|
|
|
this.timeType.lockWorktime = this.timeType.lockWorktime ? true : false
|
|
|
this.timeChange();
|
|
|
+ let userlist = res.data.userList
|
|
|
+ this.whiteList = []
|
|
|
+ for(let i in userlist){
|
|
|
+ this.whiteList[i] = {
|
|
|
+ id: userlist[i].id,
|
|
|
+ label: userlist[i].name
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -837,6 +1009,22 @@
|
|
|
.panel {
|
|
|
padding:15px;height:300px;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)
|
|
|
}
|
|
|
+.underpanel{
|
|
|
+ width: 900px;
|
|
|
+ height: 140px;
|
|
|
+ border-top: 1px solid #eee;
|
|
|
+ position: relative;
|
|
|
+ top: -12px;
|
|
|
+}
|
|
|
+.underpanel .whiteList_head{
|
|
|
+ padding: 5px 0 0 5px;
|
|
|
+ height: 24px;
|
|
|
+}
|
|
|
+.underpanel .whiteList_content{
|
|
|
+ margin: 10px 10px 0 10px;
|
|
|
+ border: 1px solid #eee;
|
|
|
+ height: 90px;
|
|
|
+}
|
|
|
.sample {
|
|
|
margin-top:22px;
|
|
|
color: #999;
|