|
@@ -10,19 +10,13 @@ |
|
|
<div class="lr-layout-tool-item"> |
|
|
<div class="lr-layout-tool-item"> |
|
|
<div id="datesearch" style="min-width:150px"></div> |
|
|
<div id="datesearch" style="min-width:150px"></div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="lr-layout-tool-item"> |
|
|
|
|
|
<div id="weeks" style="min-width:150px"></div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="lr-layout-tool-item"> |
|
|
|
|
|
<div id="DeptNo" style="min-width:200px"></div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="lr-layout-tool-item"> |
|
|
|
|
|
<div id="status" style="min-width:150px"></div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="lr-layout-tool-item"> |
|
|
<div class="lr-layout-tool-item"> |
|
|
<div class=" btn-group btn-group-sm"> |
|
|
<div class=" btn-group btn-group-sm"> |
|
|
|
|
|
<script src="~/Content/vue/vue.js"></script> |
|
|
|
|
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> |
|
|
|
|
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script> |
|
|
<div id="app"> |
|
|
<div id="app"> |
|
|
<a class="btn btn-default" v-on:click="nocludesVisible = true">时间段排除</a> |
|
|
|
|
|
|
|
|
<a id="timeNoCludes" class="btn btn-default" v-on:click="nocludesVisible = true">时间段排除</a> |
|
|
<el-dialog title="时间段排除" |
|
|
<el-dialog title="时间段排除" |
|
|
:visible.sync="nocludesVisible" |
|
|
:visible.sync="nocludesVisible" |
|
|
width="500px" |
|
|
width="500px" |
|
@@ -39,8 +33,7 @@ |
|
|
end-placeholder="结束日期" |
|
|
end-placeholder="结束日期" |
|
|
align="right"> |
|
|
align="right"> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
<el-button |
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
|
<el-button size="small" |
|
|
type="warning" |
|
|
type="warning" |
|
|
plain |
|
|
plain |
|
|
class="el-icon-delete" |
|
|
class="el-icon-delete" |
|
@@ -48,65 +41,73 @@ |
|
|
</el-button> |
|
|
</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
<el-button size="small" type="primary" plain v-on:click="addNoCludes">新增</el-button> |
|
|
|
|
|
|
|
|
<el-button size="small" type="primary" plain v-on:click="addNoCludes">新 增</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button size="small" type="primary" v-on:click="nocludesVisible = false">确 定</el-button> |
|
|
|
|
|
|
|
|
<el-button size="small" type="primary" v-on:click="handleClose">确 定</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
<script src="~/Content/vue/vue.js"></script> |
|
|
|
|
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> |
|
|
|
|
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script> |
|
|
|
|
|
<script> |
|
|
<script> |
|
|
new Vue({ |
|
|
new Vue({ |
|
|
el: "#app", |
|
|
el: "#app", |
|
|
data: { |
|
|
data: { |
|
|
searchNoIncludes: [{value:null}], |
|
|
|
|
|
|
|
|
searchNoIncludes: [{ value: null }], |
|
|
nocludesVisible: false, |
|
|
nocludesVisible: false, |
|
|
pickerOptions: { |
|
|
|
|
|
shortcuts: [{ |
|
|
|
|
|
text: '最近一周', |
|
|
|
|
|
onClick(picker) { |
|
|
|
|
|
const end = new Date(); |
|
|
|
|
|
const start = new Date(); |
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); |
|
|
|
|
|
picker.$emit('pick', [start, end]); |
|
|
|
|
|
} |
|
|
|
|
|
}, { |
|
|
|
|
|
text: '最近一个月', |
|
|
|
|
|
onClick(picker) { |
|
|
|
|
|
const end = new Date(); |
|
|
|
|
|
const start = new Date(); |
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
|
|
|
|
|
picker.$emit('pick', [start, end]); |
|
|
|
|
|
} |
|
|
|
|
|
}, { |
|
|
|
|
|
text: '最近三个月', |
|
|
|
|
|
onClick(picker) { |
|
|
|
|
|
const end = new Date(); |
|
|
|
|
|
const start = new Date(); |
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); |
|
|
|
|
|
picker.$emit('pick', [start, end]); |
|
|
|
|
|
} |
|
|
|
|
|
}] |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
pickerOptions: {}, |
|
|
|
|
|
begin: '', |
|
|
|
|
|
end: '', |
|
|
|
|
|
}, |
|
|
|
|
|
mounted() { |
|
|
|
|
|
window.datesearchChange = this.datesearchChange |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
datesearchChange() { |
|
|
|
|
|
this.begin = $('#datesearch').attr('starttime') |
|
|
|
|
|
this.end = $('#datesearch').attr('endtime') |
|
|
|
|
|
this.pickerOptions = { |
|
|
|
|
|
disabledDate: (e)=> { |
|
|
|
|
|
let datetime = e.valueOf() |
|
|
|
|
|
if (datetime >= new Date(this.begin).valueOf() && datetime < new Date(this.end).valueOf()+1000) { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
return true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.searchNoIncludes = [{ value: null }] |
|
|
|
|
|
this.setDataNoIncludes() |
|
|
|
|
|
}, |
|
|
handleClose() { |
|
|
handleClose() { |
|
|
|
|
|
this.setDataNoIncludes() |
|
|
this.nocludesVisible = false |
|
|
this.nocludesVisible = false |
|
|
}, |
|
|
}, |
|
|
addNoCludes() { |
|
|
addNoCludes() { |
|
|
this.searchNoIncludes.push({ value: null }) |
|
|
this.searchNoIncludes.push({ value: null }) |
|
|
}, |
|
|
}, |
|
|
delNoIcludes(index) { |
|
|
delNoIcludes(index) { |
|
|
this.searchNoIncludes.splice(index,1) |
|
|
|
|
|
|
|
|
this.searchNoIncludes.splice(index, 1) |
|
|
|
|
|
}, |
|
|
|
|
|
setDataNoIncludes() { |
|
|
|
|
|
let arr = this.searchNoIncludes.filter(e => { |
|
|
|
|
|
return e.value && e.value.length |
|
|
|
|
|
}) |
|
|
|
|
|
let data = arr.map(e => e.value.toString()) |
|
|
|
|
|
$('#timeNoCludes').attr("timeNoCludes", data.join("&")) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="lr-layout-tool-item"> |
|
|
|
|
|
<div id="weeks" style="min-width:150px"></div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="lr-layout-tool-item"> |
|
|
|
|
|
<div id="DeptNo" style="min-width:200px"></div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="lr-layout-tool-item"> |
|
|
|
|
|
<div id="status" style="min-width:150px"></div> |
|
|
|
|
|
</div> |
|
|
<div class="lr-layout-tool-item"> |
|
|
<div class="lr-layout-tool-item"> |
|
|
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> |
|
|
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> |
|
|
</div> |
|
|
</div> |
|
|