|
@@ -1,74 +1,102 @@
|
|
|
<template>
|
|
|
- <article>
|
|
|
+ <article ref="calender-list">
|
|
|
<div class="table-top">
|
|
|
- <el-radio-group v-model="busy" size="small">
|
|
|
- <el-radio-button :label="Number(0)">忙碌</el-radio-button>
|
|
|
- <el-radio-button :label="Number(1)">空闲</el-radio-button>
|
|
|
+ <el-radio-group v-model="busy" size="small" @change="queryWorkList">
|
|
|
+ <el-radio-button :label="1">忙碌</el-radio-button>
|
|
|
+ <el-radio-button :label="0">空闲</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
- <el-select v-model="form.searchScheduleInfo.status" placeholder="请选择" size="small" class="status" @change="queryWorkList">
|
|
|
- <el-option
|
|
|
- v-for="item in statusOptions"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
+ <template v-if="busy === 1">
|
|
|
+ <el-select v-model="form_busy_1.searchScheduleInfo.status" placeholder="请选择" size="small" class="status" @change="queryWorkList">
|
|
|
+ <el-option
|
|
|
+ v-for="item in statusOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <el-checkbox-group v-model="form_busy_1.searchScheduleInfo.origin" class="origin">
|
|
|
+ <el-checkbox :label="Number(0)" @change="queryWorkList">任务排期</el-checkbox>
|
|
|
+ <el-checkbox :label="Number(1)" @change="queryWorkList">日程</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </template>
|
|
|
+ <template v-if="busy === 0">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="rangeTime"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ value-format="yyyy.MM.dd"
|
|
|
+ size="small"
|
|
|
+ class="range-time"
|
|
|
/>
|
|
|
- </el-select>
|
|
|
- <el-checkbox-group v-model="form.searchScheduleInfo.origin" class="origin">
|
|
|
- <el-checkbox :label="Number(0)" @change="queryWorkList">任务排期</el-checkbox>
|
|
|
- <el-checkbox :label="Number(1)" @change="queryWorkList">日程</el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
+ </template>
|
|
|
<el-button type="primary" size="small" class="add" @click="add()">添加日程</el-button>
|
|
|
</div>
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
style="width: 100%"
|
|
|
- row-key="id"
|
|
|
:header-cell-style="{ backgroundColor: 'rgba(240,242,244,0.7)' ,color: '#333B4A', fontSize: '14px', fontWeight: '550', textAlign: 'center' }"
|
|
|
show-overflow-tooltip="true"
|
|
|
:header-row-style="{height: '61px'}"
|
|
|
>
|
|
|
<el-table-column label="日程名称" prop="name" width="250" align="center" show-overflow-tooltip />
|
|
|
- <el-table-column label="日期" width="250" align="center" prop="seperateDaysHasHoliday" />
|
|
|
- <el-table-column label="参与人" align="center" width="120">
|
|
|
+ <el-table-column label="日期" width="250" align="center" prop="seperateDaysHasHoliday" show-overflow-tooltip />
|
|
|
+ <el-table-column label="参与人" align="center" width="120" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.peopleObjectList | peopleListHandler }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="业务线" align="center" width="120">
|
|
|
+ <el-table-column label="业务线" align="center" width="120" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.bizName }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="使用/工作日/全部" align="center" width="150">
|
|
|
+ <el-table-column label="使用/工作日/全部" align="center" width="150" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.needDays }}/
|
|
|
{{ scope.row.legalDays }}/
|
|
|
{{ scope.row.allDays }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="是否同步团队日程" align="center" width="150">
|
|
|
+ <el-table-column label="是否同步团队日程" align="center" width="150" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.syncTeam === 1?'是':'否' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="操作" min-width="150">
|
|
|
+ <el-table-column align="center" label="操作" min-width="150" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
- @click="handleEdit(scope.row)"
|
|
|
+ @click="control.update=scope.row"
|
|
|
>编辑</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="danger"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
+ @click="control.delete=scope.row"
|
|
|
>删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <el-col :span="24">
|
|
|
+ <div align="right">
|
|
|
+ <el-pagination
|
|
|
+ :page-sizes="[10, 20, 30, total]"
|
|
|
+ :current-page="pages.curIndex"
|
|
|
+ :page-size="pages.pageSize"
|
|
|
+ background
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
</article>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { queryWorkList } from '@/api/workSchedule.js'
|
|
|
+import moment from 'moment'
|
|
|
+import { queryWorkList, queryIdleList } from '@/api/workSchedule.js'
|
|
|
export default {
|
|
|
filters: {
|
|
|
peopleListHandler(val) {
|
|
@@ -79,19 +107,34 @@ export default {
|
|
|
return newArr.join(',')
|
|
|
}
|
|
|
},
|
|
|
+ inject: {
|
|
|
+ control: {
|
|
|
+ default: () => ({})
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
+ total: 0,
|
|
|
+ pages: {
|
|
|
+ curIndex: 1,
|
|
|
+ pageSize: 10
|
|
|
+ },
|
|
|
form_busy_1: {
|
|
|
searchScheduleInfo: {
|
|
|
status: 0, // 进行中 0、未开始 1、过去的 2
|
|
|
origin: [0, 1]// 任务排期 0、个人日程1
|
|
|
},
|
|
|
teamSearchInfo: { bizId: localStorage.getItem('bizId') || null },
|
|
|
- pageInfoDO: {
|
|
|
- curIndex: 1,
|
|
|
- pageSize: 10
|
|
|
- }
|
|
|
+ pageInfoDO: null
|
|
|
},
|
|
|
+ form_busy_0: {
|
|
|
+ timeInfo: {
|
|
|
+ startTime: moment().startOf('year').format('YYYY.MM.DD'),
|
|
|
+ endTime: moment().endOf('year').format('YYYY.MM.DD')
|
|
|
+ },
|
|
|
+ pageInfoDO: null
|
|
|
+ },
|
|
|
+ rangeTime: [],
|
|
|
statusOptions: [{
|
|
|
value: 0,
|
|
|
label: '进行中'
|
|
@@ -102,29 +145,59 @@ export default {
|
|
|
value: 2,
|
|
|
label: '过去的'
|
|
|
}],
|
|
|
- busy: 0,
|
|
|
+ busy: 1,
|
|
|
tableData: []
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ control: {
|
|
|
+ handler(newV, oldV) {
|
|
|
+ this.queryWorkList()
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
+ },
|
|
|
+ rangeTime: {
|
|
|
+ handler(newV, oldV) {
|
|
|
+ this.form_busy_0.timeInfo = {
|
|
|
+ startTime: newV[0],
|
|
|
+ endTime: newV[1]
|
|
|
+ }
|
|
|
+ this.queryWorkList()
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
+ }
|
|
|
+ },
|
|
|
created() {
|
|
|
this.queryWorkList()
|
|
|
},
|
|
|
methods: {
|
|
|
- async queryWorkList() {
|
|
|
+ handleSizeChange(e) {
|
|
|
+ this.pageSize = e
|
|
|
+ this.queryWorkList()
|
|
|
+ },
|
|
|
+ handleCurrentChange(e) {
|
|
|
+ this.curIndex = e
|
|
|
+ this.queryWorkList()
|
|
|
+ },
|
|
|
+ async queryWorkList() { // 获取列表
|
|
|
if (this.busy === 1) {
|
|
|
- const res = await queryWorkList(this.form)
|
|
|
+ this.form_busy_1.pageInfoDO = this.pages
|
|
|
+ const res = await queryWorkList(this.form_busy_1)
|
|
|
if (res.code === 200) {
|
|
|
this.tableData = res.data.list
|
|
|
+ this.total = res.data.total
|
|
|
}
|
|
|
} else {
|
|
|
-
|
|
|
+ this.form_busy_0.pageInfoDO = this.pages
|
|
|
+ const res = await queryIdleList(this.form_busy_0)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.tableData = res.data.list
|
|
|
+ this.total = res.data.total
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
- handleEdit() {
|
|
|
-
|
|
|
- },
|
|
|
- handleDelete() {
|
|
|
-
|
|
|
+ add() {
|
|
|
+ this.$emit('add')
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -144,7 +217,7 @@ article{
|
|
|
right: 0;
|
|
|
transform: translateY(-50%);
|
|
|
}
|
|
|
- .origin {
|
|
|
+ .origin,.range-time {
|
|
|
margin-left: 20px;
|
|
|
}
|
|
|
.status {
|