#73有甘特图的地方加时间范围搜索
This commit is contained in:
parent
76e50e36e2
commit
ff2cb928c6
|
@ -9,6 +9,18 @@
|
|||
<el-button type="primary" @click="utaskDepuse" v-loading="isLoading"
|
||||
v-auth="'utask.assgin'">任务分解并下达</el-button>
|
||||
</div>
|
||||
<div class="'right-panel'">
|
||||
<el-date-picker
|
||||
v-model="dateValue"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="vertical-align: middle;margin-right:6px"
|
||||
/>
|
||||
<el-button type="primary" @click="utaskSearch" v-loading="isLoading">搜索</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiUtask" row-key="id" stripe :params="paramsUtask" @row-click="rowclick"
|
||||
|
@ -152,6 +164,7 @@ export default {
|
|||
tasks: {
|
||||
data: []
|
||||
},
|
||||
dateValue:'',
|
||||
apiUtask: null,
|
||||
apiObj: null,
|
||||
visibleRecord: false,
|
||||
|
@ -341,6 +354,16 @@ export default {
|
|||
handleSaveSuccess(data, mode) {
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
utaskSearch(){
|
||||
let start_date = this.dateValue[0];
|
||||
let end_date = this.dateValue[1];
|
||||
let obj = {};
|
||||
obj.start_date__gte = start_date;
|
||||
obj.end_date__lte = end_date;
|
||||
obj.belong_dept__name = '10车间';
|
||||
this.paramsUtask = obj;
|
||||
this.getGantt();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -108,10 +108,8 @@
|
|||
</GanttComponent>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
<save-dialog v-if="dialog.save" ref="saveDialog" :activeDept="currentDept.id" @success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"></save-dialog>
|
||||
<showDrawer ref="showDrawer" v-if="visibleDrawer" :utaskId="utaskId" @closed="visibleDrawer = false">
|
||||
|
@ -386,9 +384,14 @@ export default {
|
|||
this.$refs.table.refresh();
|
||||
},
|
||||
utaskSearch(){
|
||||
console.log(this.dateValue);
|
||||
let start_date = this.dateValue[0];
|
||||
let end_date = this.dateValue[1];
|
||||
let obj = {};
|
||||
obj.start_date__gte = start_date;
|
||||
obj.end_date__lte = end_date;
|
||||
obj.belong_dept__name = '6车间';
|
||||
this.paramsUtask = obj;
|
||||
this.getGantt();
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,18 @@
|
|||
<el-button type="primary" @click="utaskDepuse" v-loading="isLoading"
|
||||
v-auth="'utask.assgin'">任务分解并下达</el-button>
|
||||
</div>
|
||||
<div class="'right-panel'">
|
||||
<el-date-picker
|
||||
v-model="dateValue"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="vertical-align: middle;margin-right:6px"
|
||||
/>
|
||||
<el-button type="primary" @click="utaskSearch" v-loading="isLoading">搜索</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiUtask" row-key="id" stripe :params="paramsUtask" @row-click="rowclick"
|
||||
|
@ -151,6 +163,7 @@ export default {
|
|||
tasks: {
|
||||
data: []
|
||||
},
|
||||
dateValue:'',
|
||||
apiUtask: null,
|
||||
apiObj: null,
|
||||
visibleRecord: false,
|
||||
|
@ -331,6 +344,16 @@ export default {
|
|||
handleSaveSuccess(data, mode) {
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
utaskSearch(){
|
||||
let start_date = this.dateValue[0];
|
||||
let end_date = this.dateValue[1];
|
||||
let obj = {};
|
||||
obj.start_date__gte = start_date;
|
||||
obj.end_date__lte = end_date;
|
||||
obj.belong_dept__name = '7车间';
|
||||
this.paramsUtask = obj;
|
||||
this.getGantt();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue