|
@@ -1,87 +1,258 @@
|
|
|
<template>
|
|
|
<div class="app-container" >
|
|
|
- <h3>{{title}}</h3>
|
|
|
-
|
|
|
+ <h3>{{m.meetingName}}</h3>
|
|
|
<el-descriptions title="" :column="2" :size="size" border>
|
|
|
<el-descriptions-item>
|
|
|
<template slot="label">
|
|
|
<i class="el-icon-user"></i>
|
|
|
会议时间
|
|
|
</template>
|
|
|
- 2022-12-12 12:00:00至2022-12-12 12:00:00
|
|
|
+ {{m.beginTime}}至{{m.endTime}}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
<template slot="label">
|
|
|
- <i class="el-icon-mobile-phone"></i>
|
|
|
+ <i class="el-icon-user"></i>
|
|
|
会议主持人
|
|
|
</template>
|
|
|
- 张三
|
|
|
+ {{m.emcee}}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
<template slot="label">
|
|
|
<i class="el-icon-location-outline"></i>
|
|
|
会议地点
|
|
|
</template>
|
|
|
- 重庆柏玮熠办公室
|
|
|
+ {{m.meetingPlace}}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
<template slot="label">
|
|
|
- <i class="el-icon-tickets"></i>
|
|
|
+ <i class="el-icon-user"></i>
|
|
|
会议记录人
|
|
|
</template>
|
|
|
- <el-tag size="small">李四</el-tag>
|
|
|
+ {{m.recorder}}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item :span="2">
|
|
|
<template slot="label">
|
|
|
- <i class="el-icon-office-building"></i>
|
|
|
+ <i class="el-icon-user"></i>
|
|
|
参会人员
|
|
|
</template>
|
|
|
- 王五、张三、小七
|
|
|
+ <span v-for="(item,index) in JSON.parse(m.innerAttendees)">
|
|
|
+ {{item.name}}
|
|
|
+ </span>
|
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item :span="2">
|
|
|
+<!-- <el-descriptions-item :span="2" >
|
|
|
<template slot="label">
|
|
|
<i class="el-icon-office-building"></i>
|
|
|
参会情况
|
|
|
</template>
|
|
|
应到15人,实到12人
|
|
|
- </el-descriptions-item>
|
|
|
+ </el-descriptions-item>-->
|
|
|
</el-descriptions>
|
|
|
<el-table
|
|
|
- style="width: 100%" border stripe>
|
|
|
+ style="width: 100%" border stripe :data="tableData"
|
|
|
+ :span-method="objectSpanMethod" >
|
|
|
+ <el-table-column type="index" label="序号" width="60">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="userName"
|
|
|
label="姓名" align="center"
|
|
|
width="120">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="workzongjie" label="本周工作总结" align="center" min-width="450">
|
|
|
- <el-table-column label="工作内容" align="center">
|
|
|
+ <el-table-column label="本周工作总结" min-width="450">
|
|
|
+ <el-table-column label="工作内容" prop="taskName">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="是否上周遗留" align="center" width="120">
|
|
|
+ <el-table-column label="是否上周遗留" width="120" prop="lastWeekFlag">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.lastWeekFlag==='0'" style="color: darkred">是</div>
|
|
|
+ <div v-else="scope.row.lastWeekFlag==='1'">否</div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="完成情况说明" align="center">
|
|
|
+ <el-table-column label="完成情况说明" prop="progressValue">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.progressValue}}%
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="workplan" label="下周工作计划" align="center">
|
|
|
- <el-table-column label="工作内容" align="center">
|
|
|
+ <el-table-column prop="workplan" label="下周工作计划" >
|
|
|
+ <el-table-column label="工作内容" >
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="计划时间" align="center" width="150">
|
|
|
+ <el-table-column label="计划时间" width="150">
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="pingfen" label="评分" align="center" width="85">
|
|
|
+ <el-table-column prop="pingfen" label="评分" align="center" width="85">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="remark" label="备注" align="center">
|
|
|
+ <el-table-column prop="remark" label="备注" >
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getWeeksRecordsByWeeks } from '@/api/meeting/meeting'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'weeklyRecords',
|
|
|
data() {
|
|
|
return {
|
|
|
title : '技术部周会',
|
|
|
- size: ''
|
|
|
+ size: '',
|
|
|
+ tableData:[],
|
|
|
+ meetingId:30,
|
|
|
+ weeks:46,
|
|
|
+ m:{
|
|
|
+ id:null,
|
|
|
+ meetingName: '',
|
|
|
+ external: 0,
|
|
|
+ meetingType: 1,
|
|
|
+ meetingPlace: null,
|
|
|
+ beginTime: null,
|
|
|
+ endTime: null,
|
|
|
+ outAttendees: null,
|
|
|
+ innerAttendees: '',
|
|
|
+ emcee: null,
|
|
|
+ recorder: null,
|
|
|
+ createUserId: 1,
|
|
|
+ createTime: null,
|
|
|
+ status: 1,
|
|
|
+ weeks: 46
|
|
|
+ },
|
|
|
+ workContents:{
|
|
|
+ col:0,
|
|
|
+ row:0
|
|
|
+ },
|
|
|
+ spanArr: [], // 存合并行数据的数组
|
|
|
+ pos: 0,// 合并行数据数组下标
|
|
|
+ rowIndex: 1, // 序号
|
|
|
+ // 合并行
|
|
|
+ mergeArr: [],
|
|
|
+ // 排序号
|
|
|
+ indexNum: {},
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getData() {
|
|
|
+ getWeeksRecordsByWeeks(this.meetingId,this.weeks).then(res => {
|
|
|
+ this.tableData=res.data.workContent
|
|
|
+ // this.getSpanArr(this.tableData)
|
|
|
+ this.m=res.data.meeting
|
|
|
+ })
|
|
|
+ },
|
|
|
+ colMethod(columnArr, data){
|
|
|
+ let column = {}
|
|
|
+ let position = 0
|
|
|
+ //遍历合并的列的数据
|
|
|
+ columnArr.forEach((prop) => {
|
|
|
+ column[prop] = []
|
|
|
+ data.forEach((row,rowIndex) =>{
|
|
|
+ column[prop][rowIndex]=[1,1]
|
|
|
+ if(rowIndex===0){
|
|
|
+ position=0
|
|
|
+ }else if (row[prop] === data[rowIndex - 1][prop]) {
|
|
|
+ // 当前行数据等于上一行,根据记录的行号,计算需要合并几行。
|
|
|
+ column[prop][position][0] += 1
|
|
|
+ // 当前行 隐藏不显示
|
|
|
+ column[prop][rowIndex][0] = 0
|
|
|
+ } else {
|
|
|
+ // 不相等之后,重置记录行号
|
|
|
+ position = rowIndex
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ })
|
|
|
+ return column;
|
|
|
+ },
|
|
|
+ getList() {
|
|
|
+ const _this = this;
|
|
|
+ // 计算合并的行
|
|
|
+ this.mergeArr = this.colMethod(['id'], this.tableData)
|
|
|
+ // 浅拷贝处理数据
|
|
|
+ let dataBase = Array.from(this.tableData);
|
|
|
+ let saleIdArr = this.colMethod(['id'], dataBase)
|
|
|
+
|
|
|
+ // 先根据saleId合并第一次,将数据源根据合并下标处理为多段数据源
|
|
|
+ let newData = []
|
|
|
+ saleIdArr.saleId.forEach( (item, index) => {
|
|
|
+ if (item[0] > 0) {
|
|
|
+ let res = []
|
|
|
+ for (let i = 0; i < item[0]; i++) {
|
|
|
+ res.push(dataBase.slice(0,1)[0])
|
|
|
+ this.$delete(dataBase, 0)
|
|
|
+ }
|
|
|
+ newData.push(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ // 根据合并后的数据,分段处理time的合并行下标
|
|
|
+ let outArr = []
|
|
|
+ for (let i = 0; i < newData.length; i++) {
|
|
|
+ let obt = _this.colMethod(['time'], newData[i]);
|
|
|
+ if (obt.outboundTime.length > 0) {
|
|
|
+ outArr.push(obt.outboundTime)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 处理time合并行
|
|
|
+ let finishRes = []
|
|
|
+ outArr.forEach( item => {
|
|
|
+ if (item.length > 1) {
|
|
|
+ for (let i = 0; i < item.length; i++) {
|
|
|
+ finishRes.push(item[i])
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ finishRes.push(item[0])
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 赋值给总合并行集合
|
|
|
+ this.mergeArr.outboundTime = finishRes
|
|
|
+
|
|
|
+ //排列序号
|
|
|
+ this.indexObj()
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ getSpanArr(data){
|
|
|
+ // 重新查询后,要清空行数据数组、序号重置为1
|
|
|
+ this.spanArr = []
|
|
|
+ this.rowIndex = 1
|
|
|
+ for (let i = 0; i < data.length; i++){
|
|
|
+ let executor=data[i].executor;
|
|
|
+ if (i === 0) {
|
|
|
+ this.spanArr.push(1)
|
|
|
+ this.pos = 0
|
|
|
+ data[i].serialNo = this.rowIndex
|
|
|
+ this.rowIndex++
|
|
|
+ } else{
|
|
|
+ if(data[i].executor===data[i-1].executor){
|
|
|
+ this.spanArr.push[this.pos]+=1
|
|
|
+ this.spanArr.push(0)
|
|
|
+ }else{
|
|
|
+ this.spanArr.push(1)
|
|
|
+ this.pos=i
|
|
|
+ data[i].serialNo= this.rowIndex
|
|
|
+ this.rowIndex++
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
+ let arr = this.mergeArr[column.property] || []
|
|
|
+ if (column.type == 'index' && this.mergeArr['id'])
|
|
|
+ return this.mergeArr['id'][rowIndex]
|
|
|
+ else if (arr.length) return arr[rowIndex]
|
|
|
+ else[1, 1]
|
|
|
+ },
|
|
|
+ indexObj() {
|
|
|
+ let num = 0;
|
|
|
+ this.mergeArr['id'].forEach((item, index) => {
|
|
|
+ if (item[0] != 0) {
|
|
|
+ this.indexNum[index] = num += 1
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|