|
@@ -1,329 +1,367 @@
|
|
|
<template>
|
|
|
- <el-container direction="vertical" class="workbench_team">
|
|
|
- <el-main class="layout_main">
|
|
|
- <div>
|
|
|
- <div style="display: inline-block">团队</div>
|
|
|
- <el-select
|
|
|
- v-model="searchForm.teamId"
|
|
|
- style="margin-left: 20px"
|
|
|
- @change="queryTeamWorkList()"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in searchEnum.teams"
|
|
|
- :key="item.teamId"
|
|
|
- :label="item.teamName"
|
|
|
- :value="item.teamId"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- <div style="display: inline-block;margin-left: 20px">业务线</div>
|
|
|
- <el-select
|
|
|
- v-model="searchForm.bizId"
|
|
|
- style="margin-left: 20px"
|
|
|
- @change="queryTeamWorkList()"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in searchEnum.businesslines"
|
|
|
- :key="item.code"
|
|
|
- :label="item.name"
|
|
|
- :value="item.code"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
+ <el-container class="bg-team">
|
|
|
+ <!-- 顶部导航栏 -->
|
|
|
+ <el-header class="main-header">
|
|
|
+ <div class="select-group">
|
|
|
+ <el-dropdown size="small" @command="handleTeams">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ 团队<i class="el-icon-arrow-down el-icon--right" />
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item
|
|
|
+ v-for="item in searchEnum.teams"
|
|
|
+ :key="item.teamId"
|
|
|
+ :command="item.teamId"
|
|
|
+ >{{ item.teamName }}</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ <el-dropdown size="small" style="margin-left: 20px" @command="handleBizId">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ 业务线<i class="el-icon-arrow-down el-icon--right" />
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item
|
|
|
+ v-for="item in searchEnum.businesslines"
|
|
|
+ :key="item.code"
|
|
|
+ :command="item.code"
|
|
|
+ >{{ item.name }}</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
</div>
|
|
|
- </el-main>
|
|
|
- <el-main class="layout_main" style="margin-top: 10px">
|
|
|
- <div class="module_title">
|
|
|
- <div class="module_title__sign" />
|
|
|
- <div class="module_title__caption">团队日程</div>
|
|
|
+ <div class="top-tabs">
|
|
|
+ <el-tabs v-model="activeName">
|
|
|
+ <el-tab-pane label="团队日程" name="1" />
|
|
|
+ <el-tab-pane label="概览" name="2" />
|
|
|
+ <el-tab-pane label="需求" name="3" />
|
|
|
+ <el-tab-pane label="任务" name="4" />
|
|
|
+ <el-tab-pane label="缺陷" name="5" />
|
|
|
+ </el-tabs>
|
|
|
</div>
|
|
|
- <el-row style="margin-bottom: 20px" class="gantt-view-header">
|
|
|
- <el-col :span="12">
|
|
|
- <el-radio-group v-model="radio1" size="small" @change="radioChange">
|
|
|
- <el-radio-button label="忙碌" />
|
|
|
- <el-radio-button label="空闲" />
|
|
|
- </el-radio-group>
|
|
|
- <div v-if="radio1 === '空闲'" style="display: inline-block">
|
|
|
- <div style="display: inline-block;margin-left: 20px">选择时间:</div>
|
|
|
- <el-date-picker
|
|
|
- v-model="timeSelectVal"
|
|
|
- type="daterange"
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- :picker-options="pickerOptions"
|
|
|
- :clearable="false"
|
|
|
- @change="queryTeamIdleList()"
|
|
|
- />
|
|
|
+ </el-header>
|
|
|
+ <!-- 顶部导航栏 -->
|
|
|
+ <el-container v-show="activeName === '1'">
|
|
|
+ <section class="main-section">
|
|
|
+ <el-tabs v-model="activeSchedule" class="tabs-change">
|
|
|
+ <el-tab-pane label="日历视图" name="1" />
|
|
|
+ <el-tab-pane label="甘特图" name="2" />
|
|
|
+ </el-tabs>
|
|
|
+ <div class="detail-info">
|
|
|
+ <div class="member-list">
|
|
|
+ <el-checkbox v-model="checkAllMember" style="margin: 0 20px 0 5px" @change="checkAllChange">全选</el-checkbox>
|
|
|
+ <el-checkbox-group v-model="checkedMembers" @change="membersChange">
|
|
|
+ <el-checkbox v-for="item in memberList" :key="item.idap" :label="item.idap">{{ item.name }}</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12" style="text-align: right">
|
|
|
- <div style="display: inline-block" @click="radio2 = ''">
|
|
|
- <el-radio-group v-model="radio2" size="small" @change="radioChange">
|
|
|
- <el-radio-button label="今天" />
|
|
|
- </el-radio-group>
|
|
|
- </div>
|
|
|
- <el-radio-group v-model="radio3" size="small" style="margin-left: 20px" @change="radioChange">
|
|
|
- <el-radio-button label="日" />
|
|
|
- <el-radio-button label="周" />
|
|
|
- <el-radio-button label="月" />
|
|
|
- </el-radio-group>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <gantt-elastic
|
|
|
- v-if="ganttShow"
|
|
|
- ref="ganttElastic"
|
|
|
- :tasks="tasks"
|
|
|
- :options="options"
|
|
|
- >
|
|
|
- <gantt-elastic-header v-show="false" slot="header" ref="ganttHeader" />
|
|
|
- </gantt-elastic>
|
|
|
- </el-main>
|
|
|
+ <MyFullCalendar
|
|
|
+ v-show="activeSchedule === '1'"
|
|
|
+ :events="calendarEvents"
|
|
|
+ :add-button="false"
|
|
|
+ @change="queryTeamWorkListByTime"
|
|
|
+ @dateClick="dateClick"
|
|
|
+ @eventClick="showSchedule"
|
|
|
+ @select="select"
|
|
|
+ >
|
|
|
+ <el-checkbox-group v-model="origin" class="origin">
|
|
|
+ <el-checkbox :label="0" @change="queryTeamWorkListByTime">任务排期</el-checkbox>
|
|
|
+ <el-checkbox :label="1" @change="queryTeamWorkListByTime">日程</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </MyFullCalendar>
|
|
|
+ <calender-detail
|
|
|
+ :show.sync="showDetail"
|
|
|
+ :data="nowDetailData"
|
|
|
+ :position="detailXY"
|
|
|
+ @edit="editSchedule"
|
|
|
+ @delete="deleteSchedule"
|
|
|
+ />
|
|
|
+ <gannt-views v-show="activeSchedule === '2'" ref="gannt-views" />
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </el-container>
|
|
|
+ <!-- 日程 -->
|
|
|
+ <!-- 日程操作弹框 -->
|
|
|
+ <calendar-dialog
|
|
|
+ :title="'编辑日程'"
|
|
|
+ :visible.sync="updateSchedule.visible"
|
|
|
+ :data="updateSchedule.data"
|
|
|
+ @confirm="queryTeamWorkListByTime(calendarView)"
|
|
|
+ />
|
|
|
+ <calendar-dialog
|
|
|
+ :title="'新建日程'"
|
|
|
+ :visible.sync="createSchedule.visible"
|
|
|
+ :data="createSchedule.data"
|
|
|
+ @confirm="queryTeamWorkListByTime(calendarView)"
|
|
|
+ />
|
|
|
+ <!-- 日程操作弹框 -->
|
|
|
+ <!-- 排期操作弹框 -->
|
|
|
+ <modify-schedule
|
|
|
+ v-if="visibleSchedule"
|
|
|
+ :visible.sync="visibleSchedule"
|
|
|
+ :detail-data="updateSchedule.data"
|
|
|
+ :title="'修改排期'"
|
|
|
+ @update="queryTeamWorkListByTime(calendarView)"
|
|
|
+ />
|
|
|
+ <!-- 排期操作弹框 -->
|
|
|
</el-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import workbenchApi from '@/api/workbench.js'
|
|
|
-import { settingGetBizList } from '@/api/defectManage'
|
|
|
-import { queryTeamIdleList, queryTeamWorkList } from '@/api/workSchedule'
|
|
|
-import GanttElastic from 'gantt-elastic'
|
|
|
-import GanttHeader from 'gantt-elastic-header'
|
|
|
import moment from 'moment'
|
|
|
-import teamGanttOptions from '@/views/workbench/ganttOptions/teamGantt'
|
|
|
+import { settingGetBizList } from '@/api/defectManage'
|
|
|
+import { queryTeamInfoList, queryTeamWorkListByTime, deleteSelfSchedule, queryTeamMember } from '@/api/workSchedule'
|
|
|
+import { scheduleDelete } from '@/api/projectViewDetails'
|
|
|
+import modifySchedule from '@/views/projectManage/projectList/components/modifySchedule'
|
|
|
+import ganntViews from './components/ganntViews'
|
|
|
+import MyFullCalendar from '@/views/workbench/person/components/myFullCalendar'
|
|
|
+import calenderDetail from '@/views/workbench/person/components/calenderDetail'
|
|
|
+import calendarDialog from '@/views/workbench/person/components/calendarFormDialog'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- ganttElasticHeader: GanttHeader,
|
|
|
- ganttElastic: GanttElastic
|
|
|
+ ganntViews,
|
|
|
+ MyFullCalendar,
|
|
|
+ calenderDetail,
|
|
|
+ calendarDialog,
|
|
|
+ modifySchedule
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- timeSelectVal: [new Date(), moment(new Date()).add(29, 'day')],
|
|
|
- pickerOptions: {
|
|
|
- disabledDate(time) {
|
|
|
- return time.getTime() < Date.now() - 24 * 60 * 60 * 1000
|
|
|
- }
|
|
|
- },
|
|
|
- tasks: [], // 甘特图任务
|
|
|
- options: teamGanttOptions,
|
|
|
- radio1: '忙碌',
|
|
|
- radio2: '今天',
|
|
|
- radio3: '日',
|
|
|
+ activeName: '1', // 顶部导航栏
|
|
|
+ activeSchedule: '1', // 日历和甘特图切换
|
|
|
searchForm: {
|
|
|
teamId: null,
|
|
|
bizId: null
|
|
|
},
|
|
|
- idleSearchForm: {
|
|
|
- startTime: null,
|
|
|
- endTime: null
|
|
|
- },
|
|
|
searchEnum: {
|
|
|
teams: [],
|
|
|
businesslines: []
|
|
|
},
|
|
|
- username: localStorage.getItem('username'),
|
|
|
- ganttShow: false
|
|
|
+ memberList: [], // 团队成员列表
|
|
|
+ checkAllMember: false, // 选择全部成员
|
|
|
+ checkedMembers: [], // 被选中的成员列表
|
|
|
+ calendarEvents: [
|
|
|
+ // 日程图标数据
|
|
|
+ { title: 'Event Now', start: new Date(), end: new Date().setDate(16) }
|
|
|
+ ],
|
|
|
+ calendarView: null, // 日程图表数据
|
|
|
+ showDetail: false, // 显示详情弹框
|
|
|
+ nowDetailData: {}, // 当前选中日程的数据
|
|
|
+ detailXY: [0, 0], // 详情弹框位置
|
|
|
+ origin: [0, 1],
|
|
|
+ createSchedule: { // 新建日程
|
|
|
+ visible: false,
|
|
|
+ data: null
|
|
|
+ },
|
|
|
+ updateSchedule: { // 更新日程
|
|
|
+ visible: false,
|
|
|
+ data: null
|
|
|
+ },
|
|
|
+ visibleSchedule: false // 排期任务弹框
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.queryTeamInfoList(0)
|
|
|
this.settingGetBizList()
|
|
|
- this.queryTeamWorkList()
|
|
|
+ this.queryTeamInfoList()
|
|
|
+ this.queryTeamMember()
|
|
|
},
|
|
|
methods: {
|
|
|
- tasksUpdate(tasks) {
|
|
|
- this.tasks = tasks
|
|
|
- },
|
|
|
- optionsUpdate(options) {
|
|
|
- this.options = options
|
|
|
- },
|
|
|
- styleUpdate(style) {
|
|
|
- this.dynamicStyle = style
|
|
|
+ async settingGetBizList() { // 获取业务线
|
|
|
+ const res = await settingGetBizList({})
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+ this.searchEnum.businesslines = res.data
|
|
|
+ this.searchEnum.businesslines.unshift({ code: null, name: '全部' })
|
|
|
+ }
|
|
|
},
|
|
|
- radioChange(val) {
|
|
|
- if (val === '忙碌') {
|
|
|
- this.queryTeamWorkList()
|
|
|
- } else if (val === '空闲') {
|
|
|
- this.queryTeamIdleList()
|
|
|
- } else if (val === '今天') {
|
|
|
- this.$refs.ganttHeader.recenterPosition()
|
|
|
+ async queryTeamInfoList() { // 获取用户团队列表
|
|
|
+ const res = await queryTeamInfoList({ curIndex: 1, pageSize: 9999 })
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+ this.searchEnum.teams = res.data.list
|
|
|
+ this.searchEnum.teams.unshift({ teamId: null, teamName: '全部' })
|
|
|
}
|
|
|
- this.changeDateLength(val)
|
|
|
},
|
|
|
- changeDateLength(val) {
|
|
|
- if (val === '月') {
|
|
|
- this.$refs.ganttHeader.scale = 21
|
|
|
- } else if (val === '周') {
|
|
|
- this.$refs.ganttHeader.scale = 19
|
|
|
- } else if (val === '日') {
|
|
|
- this.$refs.ganttHeader.scale = 17
|
|
|
+ async queryTeamMember() { // 获取团队人员
|
|
|
+ const params = this.searchForm.teamId ? { teamId: this.searchForm.teamId } : {}
|
|
|
+ const res = await queryTeamMember(params)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.memberList = this.handleMember(res.data)
|
|
|
+ console.log(this.memberList)
|
|
|
}
|
|
|
},
|
|
|
- queryTeamInfoList(type) {
|
|
|
- const data = { type: type, curIndex: 1, pageSize: 9999 }
|
|
|
- workbenchApi.queryTeamInfoList(data).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.searchEnum.teams = res.data.list
|
|
|
- this.searchEnum.teams.unshift({
|
|
|
- teamId: null,
|
|
|
- teamName: '全部'
|
|
|
- })
|
|
|
+ handleMember(arr) {
|
|
|
+ const newMap = new Map()
|
|
|
+ return arr.filter(item => {
|
|
|
+ if (!newMap.has(item.idap)) {
|
|
|
+ newMap.set(item.idap, item)
|
|
|
+ return item
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- settingGetBizList() {
|
|
|
- settingGetBizList({}).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.searchEnum.businesslines = res.data
|
|
|
- this.searchEnum.businesslines.unshift({
|
|
|
- code: null,
|
|
|
- name: '全部'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ checkAllChange(val) { // 成员全部选择
|
|
|
+ this.checkedMembers = val ? this.memberList.map(item => item.idap) : []
|
|
|
+ this.membersChange()
|
|
|
},
|
|
|
- async queryTeamWorkList() { // 获取忙碌日程
|
|
|
- const params = {
|
|
|
- teamSearchInfo: this.searchForm,
|
|
|
- searchScheduleInfo: { origin: [1] }
|
|
|
+ membersChange() { // 成员变动
|
|
|
+ this.queryTeamWorkListByTime(this.calendarView)
|
|
|
+ },
|
|
|
+ handleTeams(e) { // 团队变动
|
|
|
+ this.searchForm.teamId = e
|
|
|
+ this.updateGannt()
|
|
|
+ },
|
|
|
+ handleBizId(e) { // 业务线变动
|
|
|
+ this.searchForm.bizId = e
|
|
|
+ this.updateGannt()
|
|
|
+ },
|
|
|
+ updateGannt() { // 更新子组件甘特图
|
|
|
+ this.$refs['gannt-views'].updateGannt(this.searchForm)
|
|
|
+ },
|
|
|
+ showSchedule(e) { // 查看日程详情
|
|
|
+ const res = this.calendarEvents.find(item => item.id === Number(e.event.id))
|
|
|
+ this.nowDetailData = res.detailData
|
|
|
+ this.showDetail = true
|
|
|
+ this.detailXY = [`${e.jsEvent.clientX - 200}px`, `${e.jsEvent.clientY + 20}px`]
|
|
|
+ },
|
|
|
+ dateClick(arg) { // 新建日程弹框
|
|
|
+ this.createSchedule.data = arg
|
|
|
+ this.createSchedule.visible = true
|
|
|
+ },
|
|
|
+ select(selectionInfo) { // 多选日期新建日程弹框
|
|
|
+ this.createSchedule.data = {
|
|
|
+ startStr: selectionInfo.startStr,
|
|
|
+ endStr: moment(selectionInfo.endStr).subtract(1, 'day').format('YYYY-MM-DD')
|
|
|
}
|
|
|
- const res = await queryTeamWorkList(params)
|
|
|
- if (res.code === 200 && res.data) {
|
|
|
- this.createTasks(res, '忙碌')
|
|
|
- this.changeDateLength(this.radio3)
|
|
|
+ this.createSchedule.visible = true
|
|
|
+ },
|
|
|
+ editSchedule(data) { // 编辑日程弹框
|
|
|
+ if (data) {
|
|
|
+ this.nowDetailData = data
|
|
|
+ }
|
|
|
+ const dayArr = this.nowDetailData.theDays.split(',')
|
|
|
+ const form = {
|
|
|
+ detailDayList: dayArr,
|
|
|
+ id: this.nowDetailData.id,
|
|
|
+ name: this.nowDetailData.name,
|
|
|
+ dayList: Array.from(new Set([dayArr[0], dayArr[dayArr.length - 1]])),
|
|
|
+ isJoin: this.nowDetailData.bizId !== null ? 1 : 0, // 是否关联业务线
|
|
|
+ syncTeam: this.nowDetailData.syncTeam, // 是否同步 0 不同步 1同步
|
|
|
+ bizId: this.nowDetailData.bizId || null,
|
|
|
+ desc: this.nowDetailData.desc,
|
|
|
+ people: this.nowDetailData.peopleObject.name,
|
|
|
+ schedule: this.nowDetailData.seperateDaysHasHoliday
|
|
|
+ }
|
|
|
+ this.updateSchedule.data = form
|
|
|
+ if (this.nowDetailData.origin === 1) {
|
|
|
+ this.updateSchedule.visible = true
|
|
|
+ } else if (this.nowDetailData.origin === 0) {
|
|
|
+ this.visibleSchedule = true
|
|
|
}
|
|
|
},
|
|
|
- async queryTeamIdleList() { // 获取空闲日程
|
|
|
- this.idleSearchForm.startTime = moment(this.timeSelectVal[0]).format('YYYY.MM.DD')
|
|
|
- this.idleSearchForm.endTime = moment(this.timeSelectVal[1]).format('YYYY.MM.DD')
|
|
|
- const res = await queryTeamIdleList({
|
|
|
- timeInfo: this.idleSearchForm,
|
|
|
- teamSearchInfo: this.searchForm
|
|
|
- })
|
|
|
- if (res.code === 200 && res.data) {
|
|
|
- this.createTasks(res, '空闲')
|
|
|
- this.changeDateLength(this.radio3)
|
|
|
+ deleteSchedule(data) { // 确认删除日程或者排期任务
|
|
|
+ if (data) {
|
|
|
+ this.nowDetailData = data
|
|
|
}
|
|
|
+ this.$confirm('是否删除此日程', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.nowDetailData.origin === 0 ? this.deleteSchedule_0() : this.deleteSchedule_1()
|
|
|
+ }).catch(() => {})
|
|
|
},
|
|
|
- createTasks(res, mode) {
|
|
|
- const today = new Date()
|
|
|
- const colorlist = ['#A1DEFF', '#FAB5B5', '#BCED86', '#FFA87F', '#8E44AD', '#1EBC61', '#0287D0']
|
|
|
- this.ganttShow = false
|
|
|
- this.tasks = []
|
|
|
- let count = 0
|
|
|
- for (const i in res.data) {
|
|
|
- let label = ''
|
|
|
- if (mode === '忙碌') {
|
|
|
- label = res.data[i].workNum.taskWorkNum + '个任务、' + res.data[i].workNum.selfWorkNum + '个日程'
|
|
|
- } else {
|
|
|
- label = res.data[i].workNum.taskWorkNum + '个空闲时段'
|
|
|
- }
|
|
|
- const color = colorlist[count % colorlist.length]
|
|
|
- const parentItem = {
|
|
|
- id: count++,
|
|
|
- labelName: label,
|
|
|
- label: res.data[i].workNum.startTime && res.data[i].workNum.endTime ? label : '',
|
|
|
- user: res.data[i].userInfo.ldapName,
|
|
|
- collapsed: true,
|
|
|
- progress: 0,
|
|
|
- needLegalAllDays: res.data[i].workNum.needDays + '/' + res.data[i].workNum.legalDays + '/' + res.data[i].workNum.allDays,
|
|
|
- start: res.data[i].workNum.startTime ? moment(res.data[i].workNum.startTime).toDate().getTime() : today.getTime(),
|
|
|
- duration: res.data[i].workNum.endTime ? moment(res.data[i].workNum.endTime).toDate().getTime() - moment(res.data[i].workNum.startTime).toDate().getTime() : 0,
|
|
|
- startDate: res.data[i].workNum.startTime ? moment(res.data[i].workNum.startTime).format('YYYY-MM-DD') : '',
|
|
|
- endDate: res.data[i].workNum.endTime ? moment(res.data[i].workNum.endTime).format('YYYY-MM-DD') : '',
|
|
|
- type: 'task',
|
|
|
- style: {
|
|
|
- base: {
|
|
|
- fill: color
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.tasks.push(parentItem)
|
|
|
- for (const j in res.data[i].workData) {
|
|
|
- const labelNameType = res.data[i].workData[j].origin ? '日程' : '任务'
|
|
|
- let labelName = '【' + labelNameType + '】' + res.data[i].workData[j].name
|
|
|
- if (res.data[i].workData[j].type) {
|
|
|
- labelName = labelName + '-' + res.data[i].workData[j].type
|
|
|
- }
|
|
|
- if (res.data[i].workData[j].desc) {
|
|
|
- labelName = labelName + '-' + res.data[i].workData[j].desc
|
|
|
- }
|
|
|
- const item = {
|
|
|
- id: count++,
|
|
|
- parentId: parentItem.id,
|
|
|
- labelName: labelName,
|
|
|
- label: res.data[i].workData[j].name,
|
|
|
- user: parentItem.user,
|
|
|
- progress: 0,
|
|
|
- needLegalAllDays: res.data[i].workData[j].needDays + '/' + res.data[i].workData[j].legalDays + '/' + res.data[i].workData[j].allDays,
|
|
|
- start: moment(res.data[i].workData[j].startTime).toDate().getTime(),
|
|
|
- duration: moment(res.data[i].workData[j].endTime).toDate().getTime() - moment(res.data[i].workData[j].startTime).toDate().getTime(),
|
|
|
- startDate: moment(res.data[i].workData[j].startTime).format('YYYY-MM-DD'),
|
|
|
- endDate: moment(res.data[i].workData[j].endTime).format('YYYY-MM-DD'),
|
|
|
- type: 'task',
|
|
|
- style: {
|
|
|
- base: {
|
|
|
- fill: color
|
|
|
- }
|
|
|
- }
|
|
|
+ async deleteSchedule_1() { // 删除日程
|
|
|
+ const res = await deleteSelfSchedule(this.nowDetailData.id)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.showDetail = false
|
|
|
+ this.queryTeamWorkListByTime(this.calendarView)
|
|
|
+ this.$message({ type: 'success', message: '删除成功!' })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async deleteSchedule_0() { // 删除排期
|
|
|
+ const res = await scheduleDelete(this.nowDetailData.id)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.showDetail = false
|
|
|
+ this.queryTeamWorkListByTime(this.calendarView)
|
|
|
+ this.$message({ type: 'success', message: '删除成功!' })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async queryTeamWorkListByTime(view) { // 获取指定时间段团队日程信息
|
|
|
+ this.calendarView = view
|
|
|
+ const params = {
|
|
|
+ timeInfo: {
|
|
|
+ startTime: moment(view.activeStart || null).subtract(1, 'month').format('YYYY.MM.DD'),
|
|
|
+ endTime: moment(view.activeEnd || null).add(1, 'month').format('YYYY.MM.DD')
|
|
|
+ },
|
|
|
+ teamSearchInfo: { bizId: localStorage.getItem('bizId') || null },
|
|
|
+ searchScheduleInfo: { origin: this.origin }
|
|
|
+ }
|
|
|
+ if (this.checkedMembers.length > 0) {
|
|
|
+ params.peoples = this.checkedMembers
|
|
|
+ }
|
|
|
+ const res = await queryTeamWorkListByTime(params)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.calendarEvents = res.data.map(item => {
|
|
|
+ return {
|
|
|
+ id: item.id,
|
|
|
+ cssClass: ['el-icon-s-order'],
|
|
|
+ title: `${item.peopleObject.name}:${item.name}`,
|
|
|
+ start: moment(item.startTime).toDate(),
|
|
|
+ end: moment(item.endTime).add(1, 'day').toDate(),
|
|
|
+ detailData: item
|
|
|
}
|
|
|
- this.tasks.push(item)
|
|
|
- }
|
|
|
- this.ganttShow = true
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
-.gantt-view-header .el-date-editor {
|
|
|
- padding-top: 0;
|
|
|
- padding-bottom: 0;
|
|
|
- height: 35px;
|
|
|
- width: 240px;
|
|
|
+// 布局
|
|
|
+<style scoped lang="scss">
|
|
|
+@import '@/styles/detail-pages.scss';
|
|
|
+.el-container{
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
-.gantt-view-header .el-date-editor input {
|
|
|
- height: 32px;
|
|
|
- width: 90px;
|
|
|
+.hideSidebar .main-header {
|
|
|
+ width: calc(100% - 54px);
|
|
|
}
|
|
|
-.gantt-view-header .el-date-editor .el-range__close-icon {
|
|
|
- display: none;
|
|
|
+.openSidebar .main-header {
|
|
|
+ width: calc(100% - 210px);
|
|
|
}
|
|
|
-</style>
|
|
|
-
|
|
|
-// 布局
|
|
|
-<style scoped>
|
|
|
-.workbench_team {
|
|
|
- background-color: #f2f3f6;
|
|
|
- padding: 10px;
|
|
|
+.bg-team {
|
|
|
+ @include bg-project;
|
|
|
+}
|
|
|
+.main-header {
|
|
|
+ @include main-header;
|
|
|
+ .top-tabs {
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, 0);
|
|
|
+ }
|
|
|
}
|
|
|
-.workbench_team .layout_main,
|
|
|
-.layout_aside {
|
|
|
- border-radius: 4px;
|
|
|
- background-color: #ffffff;
|
|
|
+.main-header::after {
|
|
|
+ @include main-header-after;
|
|
|
}
|
|
|
-</style>
|
|
|
-
|
|
|
-// 公共部分
|
|
|
-<style scoped>
|
|
|
-.module_title {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- margin-bottom: 20px;
|
|
|
+.main-section {
|
|
|
+ @include main-section;
|
|
|
+ .title-name {
|
|
|
+ font-size:20px;
|
|
|
+ font-family:PingFangSC-Medium;
|
|
|
+ color:rgba(51,59,74,1);
|
|
|
+ }
|
|
|
+ .detail-info {
|
|
|
+ padding: 0 30px 20px 30px;
|
|
|
+ }
|
|
|
+ .member-list {
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+ .tabs-change {
|
|
|
+ margin: 10px 35px 0 35px;
|
|
|
+ }
|
|
|
}
|
|
|
-.module_title__sign {
|
|
|
- width: 4px;
|
|
|
- height: 15px;
|
|
|
- background: #409eff;
|
|
|
- border-radius: 1px;
|
|
|
+.el-dropdown-link {
|
|
|
+ color: #333B4A;
|
|
|
+ font-weight: 600;
|
|
|
}
|
|
|
-.module_title__caption {
|
|
|
- width: 83px;
|
|
|
- height: 18px;
|
|
|
- font-size: 16px;
|
|
|
- font-family: MicrosoftYaHei;
|
|
|
- color: rgba(51, 59, 74, 1);
|
|
|
- margin-left: 6px;
|
|
|
- font-weight: 500;
|
|
|
+>>>.el-dropdown-menu__item {
|
|
|
+ max-width: 20vw;
|
|
|
+ overflow: scroll;
|
|
|
}
|
|
|
</style>
|