weeklyRecords.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. <template>
  2. <div class="app-container">
  3. <div style="display: flex;justify-content: space-between;margin-bottom: 8px">
  4. <div style="font-size: 24px">{{ m.meetingName }}</div>
  5. <div>
  6. <el-button @click="jumpPage" size="mini">返回</el-button>
  7. <el-button v-if="m.status===1" size="mini" type="primary" @click="endMeetingClick(m)">结束会议
  8. </el-button>
  9. <el-button size="mini" @click="meetingResultConfirm" v-if="meetingResultConfirmVisible" type="primary">会议结果确认</el-button>
  10. <el-button size="mini" @click="exportPdf" type="success" style="margin-right: 20px" v-if="workScoreVisible">导出</el-button>
  11. </div>
  12. </div>
  13. <el-descriptions title="" :column="2" :size="size" border>
  14. <el-descriptions-item>
  15. <template slot="label">
  16. <i class="el-icon-user"></i>
  17. 会议时间
  18. </template>
  19. {{ m.beginTime }}至{{ m.endTime }}
  20. </el-descriptions-item>
  21. <el-descriptions-item>
  22. <template slot="label">
  23. <i class="el-icon-user"></i>
  24. 会议主持人
  25. </template>
  26. {{ m.emcee }}
  27. </el-descriptions-item>
  28. <el-descriptions-item>
  29. <template slot="label">
  30. <i class="el-icon-location-outline"></i>
  31. 会议地点
  32. </template>
  33. {{ m.meetingPlace }}
  34. </el-descriptions-item>
  35. <el-descriptions-item>
  36. <template slot="label">
  37. <i class="el-icon-user"></i>
  38. 会议记录人
  39. </template>
  40. {{ m.recorder }}
  41. </el-descriptions-item>
  42. <el-descriptions-item >
  43. <template slot="label">
  44. <i class="el-icon-user"></i>
  45. 参会人员
  46. </template>
  47. <span v-if="m.innerAttendees!=''" v-for="(item,index) in JSON.parse(m.innerAttendees)">
  48. <el-badge is-dot v-if="item.flag==='1'" type="success">
  49. &nbsp;&nbsp;&nbsp; {{ item.name }}
  50. </el-badge>
  51. <el-badge is-dot v-else type="danger">
  52. &nbsp;&nbsp;&nbsp; {{ item.name }}
  53. </el-badge>
  54. </span>
  55. </el-descriptions-item>
  56. <el-descriptions-item >
  57. <template slot="label">
  58. <i class="el-icon-user"></i>
  59. 参会时长
  60. </template>
  61. <el-input-number size="small" :disabled="workRemarkReadOnly" v-model="m.duration" @change="workMeetingsUpdate(m)"></el-input-number> 分钟
  62. </el-descriptions-item>
  63. <el-descriptions-item :span="2">
  64. <template slot="label">
  65. <i class="el-icon-office-building"></i>
  66. 参会情况
  67. </template>
  68. <el-input :readonly="workRemarkReadOnly" type="textarea" v-model="m.remark" :rows="3" @change="workMeetingsUpdate(m)"></el-input>
  69. </el-descriptions-item>
  70. </el-descriptions>
  71. <el-table
  72. style="width: 100%" border stripe :data="tableData" :highlight-current-row="true"
  73. :span-method="objectSpanMethod" @cell-click="addWorkPlanWin">
  74. <el-table-column prop="group" label="序号" width="60" align="center">
  75. </el-table-column>
  76. <el-table-column
  77. prop="userName"
  78. label="姓名" align="center"
  79. width="120">
  80. <template slot-scope="scope">
  81. {{scope.row.userName}}({{scope.row.weekCostWorkTime}})
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="本周工作总结" min-width="450">
  85. <el-table-column label="工作内容" prop="taskName">
  86. <template slot-scope="scope">
  87. <div class="underline-on-hover" @click="getTaskScheduleRemarks(scope.row)">
  88. <div v-if="scope.row.taskId!==undefined && scope.row.taskId!=null">
  89. {{scope.row.taskId}}、 {{ scope.row.taskName }}
  90. ({{scope.row.projectName}})&nbsp;&nbsp;&nbsp;&nbsp;花费工时:({{scope.row.taskCostWorkTime}})
  91. </div>
  92. <div v-else>
  93. 1、 {{ scope.row.taskName }}
  94. </div>
  95. </div>
  96. </template>
  97. </el-table-column>
  98. <el-table-column label="任务详情" prop="descriptions">
  99. <template slot-scope="scope">
  100. <div style="color: blue;float: right;display: inline-block" v-if="false" class="underline-on-hover" >任务详情</div>
  101. <div v-html="scope.row.description"> </div>
  102. </template>
  103. </el-table-column>
  104. <!-- <el-table-column label="是否上周遗留" width="100" prop="lastWeekFlag" v-show="false">
  105. <template slot-scope="scope">
  106. <div v-if="scope.row.lastWeekFlag==='0'" style="color: darkred">是</div>
  107. <div v-else="scope.row.lastWeekFlag==='1'">否</div>
  108. </template>
  109. </el-table-column>-->
  110. <el-table-column label="完成情况说明" prop="progressValue" width="100">
  111. <template slot-scope="scope">
  112. <div style="color: darkgreen;">{{ scope.row.progressValue }}%
  113. </div>
  114. </template>
  115. </el-table-column>
  116. </el-table-column>
  117. <el-table-column prop="workplan" label="下周工作计划">
  118. <el-table-column label="工作内容与完成时间" prop="planContent">
  119. <template slot-scope="scope">
  120. <div v-html="scope.row.planContent" >
  121. </div>
  122. </template>
  123. </el-table-column>
  124. </el-table-column>
  125. <!-- <el-table-column prop="scores" label="评分" width="150" align="center" v-if="workScoreVisible">-->
  126. <!-- <template slot-scope="scope">-->
  127. <!-- <el-input-number size="mini" :precision="2" :step="0.1" :max="10" :min="0" v-model="scope.row.score" :value="0"-->
  128. <!-- @change="workComment(scope.row)">-->
  129. <!-- {{ scope.row.score }}-->
  130. <!-- </el-input-number>-->
  131. <!-- </template>-->
  132. <!-- </el-table-column>-->
  133. <el-table-column prop="remarks" label="备注">
  134. <template slot-scope="scope">
  135. <el-input v-model="scope.row.remark" :readonly="workRemarkReadOnly" type="textarea" :autosize="{ minRows: 4}" @change="workComment(scope.row)">
  136. </el-input>
  137. </template>
  138. </el-table-column>
  139. <!-- <el-table-column prop="workComments" label="工作评论" v-if="workScoreVisible">
  140. <template slot-scope="scope">
  141. <el-input v-model="scope.row.workComment" type="textarea" :autosize="{ minRows: 4}" @change="workComment(scope.row)"></el-input>
  142. </template>
  143. </el-table-column>-->
  144. </el-table>
  145. <el-dialog
  146. :title="taskFeedbackTitle"
  147. :visible.sync="taskFeedbackVisible"
  148. width="30%"
  149. :close-on-click-modal="false">
  150. <div v-html="taskFeedbackContent"></div>
  151. <span slot="footer" class="dialog-footer">
  152. <el-button @click="taskFeedbackVisible = false" size="mini">取 消</el-button>
  153. <el-button type="primary" @click="taskFeedbackVisible = false" size="mini">确 定</el-button>
  154. </span>
  155. </el-dialog>
  156. <el-dialog :title="workPlanTitle" :visible.sync="workPlanVisible" width="60%" center @close="closeWorkPlanWin">
  157. <el-button type="primary" size="mini" @click="addWorkPlan">添加</el-button>
  158. <el-table :data="workPlanDatas" stripe style="width: 100%;margin-top: 5px;" size="mini">
  159. <el-table-column type="index" label="序号" width="60"></el-table-column>
  160. <el-table-column prop="planContent" label="任务名称" min-width="180" >
  161. <template slot-scope="scope">
  162. <el-input v-model="scope.row.planContent" placeholder="请输入任务名称" size="mini"></el-input>
  163. </template>
  164. </el-table-column>
  165. <el-table-column label="优先级" prop="priority" width="180">
  166. <template slot-scope="scope">
  167. <el-select
  168. v-model="scope.row.priority"
  169. placeholder="事项优先级">
  170. <el-option
  171. v-for="dict in dict.type.task_priority"
  172. :key="dict.value"
  173. :label="dict.label"
  174. :value="dict.value">
  175. {{ dict.label }}
  176. </el-option>
  177. </el-select>
  178. </template>
  179. </el-table-column>
  180. <el-table-column prop="projectId" label="所属项目" width="150">
  181. <template slot-scope="scope">
  182. <el-select v-model="scope.row.projectId" placeholder="请选择" size="mini">
  183. <el-option
  184. v-for="item in projects"
  185. :key="item.id"
  186. :label="item.projectName"
  187. :value="item.id">
  188. </el-option>
  189. </el-select>
  190. </template>
  191. </el-table-column>
  192. <el-table-column prop="completionTime" label="开始日期" width="150">
  193. <template slot-scope="scope">
  194. <el-date-picker
  195. v-model="scope.row.beginDate"
  196. type="date"
  197. size="mini"
  198. value-format="yyyy-MM-dd"
  199. format="yyyy-MM-dd"
  200. placeholder="选择日期" style="width: 140px">
  201. </el-date-picker>
  202. </template>
  203. </el-table-column>
  204. <el-table-column prop="completionTime" label="截止日期" width="150">
  205. <template slot-scope="scope">
  206. <el-date-picker
  207. v-model="scope.row.completionTime"
  208. type="date"
  209. size="mini"
  210. value-format="yyyy-MM-dd"
  211. format="yyyy-MM-dd"
  212. placeholder="选择日期" style="width: 140px">
  213. </el-date-picker>
  214. </template>
  215. </el-table-column>
  216. <el-table-column prop="op" label="操作" width="180">
  217. <template slot-scope="scope">
  218. <el-button type="primary" v-if="(scope.row.taskId===undefined || scope.row.taskId===null) && scope.row.id!==null" size="mini" @click="updateWorkPlan(scope.row)">修改</el-button>
  219. <el-button type="primary" v-if="(scope.row.taskId===undefined || scope.row.taskId===null) && scope.row.id===null" size="mini" @click="addWorkPlanData(scope.row)">新增</el-button>
  220. <el-button type="danger" v-if="(scope.row.taskId===undefined || scope.row.taskId===null) && scope.row.id!==null" size="mini" @click="deleteWorkPlanByIds(scope.row)">删除</el-button>
  221. <el-button type="danger" v-if="(scope.row.taskId===undefined || scope.row.taskId===null) && scope.row.id===null" size="mini" @click="deleteRow(scope.$index, scope.row)">移除</el-button>
  222. </template>
  223. </el-table-column>
  224. </el-table>
  225. </el-dialog>
  226. </div>
  227. </template>
  228. <script>
  229. import {
  230. endMeeting,
  231. getMeetingByWeekss,
  232. getTaskScheduleRemark,
  233. getWeeksRecordsByWeeks, meetingAuthById, weekMeetingConfirms,
  234. workComments,
  235. workMeetingsUpdates
  236. } from '@/api/meeting/meeting'
  237. import {downloadPdf} from "@/api/meeting/meeting";
  238. import {
  239. addWorkPlan,
  240. deleteWorkPlanById,
  241. getProjects,
  242. getWorkPlanByWeeks,
  243. getWorkPlanConfirmFlags,
  244. updateWorkPlan
  245. } from '@/api/meeting/work'
  246. import { editEnforceRemind } from '@/api/meeting/enforceRemind'
  247. export default {
  248. name: 'weeklyRecords',
  249. dicts: [ 'task_priority'],
  250. data() {
  251. return {
  252. taskFeedbackTitle: '',
  253. taskFeedbackVisible: false,
  254. taskFeedbackContent: '',
  255. meetingResultConfirmVisible:false,
  256. title: '技术部周会',
  257. size: '',
  258. tableData: [],
  259. meetingId: null,
  260. weeks: null,
  261. m: {
  262. id: null,
  263. meetingName: '',
  264. external: 0,
  265. meetingType: 1,
  266. meetingPlace: null,
  267. beginTime: null,
  268. endTime: null,
  269. outAttendees: null,
  270. innerAttendees: '',
  271. emcee: null,
  272. recorder: null,
  273. createUserId: 1,
  274. createTime: null,
  275. status: 1,
  276. weeks: 46,
  277. duration:1
  278. },
  279. workContents: {
  280. col: 0,
  281. row: 0
  282. },
  283. mergeObj: {}, // 用来记录需要合并行的下标
  284. mergeArr: ['group', 'userName', 'planContent', 'scores', 'remarks', 'workComments'], // 表格中的列名
  285. workPlanDatas:[],
  286. workPlanTitle:'',
  287. workPlanVisible:false,
  288. projects:[],
  289. row:null,
  290. workScoreVisible:false,
  291. meetingConfirms:[],
  292. permissions:null,
  293. workRemarkReadOnly:true,
  294. meetingRemarkReadOnly:true
  295. }
  296. },
  297. created() {
  298. },
  299. mounted() {
  300. this.meetingId = this.$route.query.meetingId;
  301. this.weeks = this.$route.query.weeks;
  302. this.getData()
  303. },
  304. methods: {
  305. async executeCreate(){
  306. await this.getData()
  307. this.setPermissions()
  308. },
  309. setPermissions(){
  310. let loginUserId=this.$store.getters.userId
  311. //获取工作评分与工作评论权限
  312. let permissions= this.$store.getters.permissions;
  313. for(let i=0;i<permissions.length;i++){
  314. if(permissions[i]==='weekly:weekly:score'){
  315. this.workScoreVisible=true
  316. break;
  317. }
  318. }
  319. let meeting=this.m;
  320. let meetingStatus=meeting.status
  321. let workScoreVisible=this.workScoreVisible
  322. if(meetingStatus===2 && workScoreVisible===true){
  323. this.workScoreVisible=true
  324. }else{
  325. this.workScoreVisible=false
  326. }
  327. let innerAttendess=JSON.parse(meeting.innerAttendees)
  328. for(let i=0;i<innerAttendess.length;i++){
  329. let user=innerAttendess[i]
  330. if(Number(user.id)===Number(loginUserId)){
  331. if(user.flag==='0' && meetingStatus===2){
  332. this.meetingResultConfirmVisible=true
  333. break
  334. }
  335. }
  336. }
  337. let userName=this.$store.getters.name
  338. if((userName===meeting.recorder || userName===meeting.emcee) && meeting.status!==2 ){
  339. this.workRemarkReadOnly=false
  340. }
  341. },
  342. getData() {
  343. let loginUserId=this.$store.getters.userId
  344. let meetingId = this.meetingId
  345. let weeks = this.weeks
  346. if (meetingId != null && weeks != null) {
  347. getWeeksRecordsByWeeks(meetingId, weeks).then(res => {
  348. this.tableData = res.data.workContent
  349. this.getSpanArr(this.tableData);
  350. this.m = res.data.meeting
  351. let permissions=this.permissions;
  352. if(permissions===null){
  353. this.setPermissions();
  354. this.permissions=1
  355. }
  356. })
  357. } else {
  358. //获取当前周会会议id与所属周数
  359. getMeetingByWeekss().then(res => {
  360. let data = res.data;
  361. if(data===null || data.id===undefined){
  362. this.$message.warning('暂无属于你的周会会议!')
  363. return
  364. }
  365. if (data != null) {
  366. this.meetingId = data.id
  367. this.weeks = data.weeks
  368. getWeeksRecordsByWeeks(this.meetingId, this.weeks).then(res => {
  369. this.tableData = res.data.workContent
  370. this.getSpanArr(this.tableData);
  371. this.m = res.data.meeting
  372. })
  373. } else {
  374. this.tableData = []
  375. }
  376. })
  377. }
  378. },
  379. objectSpanMethod({row, column, rowIndex, columnIndex}) {
  380. if (this.mergeArr.indexOf(column.property) !== -1) {
  381. // 判断其值是不是为0
  382. if (this.mergeObj[column.property][rowIndex]) {
  383. return [this.mergeObj[column.property][rowIndex], 1]
  384. } else {
  385. // 如果为0则为需要合并的行
  386. return [0, 0];
  387. }
  388. }
  389. },
  390. getSpanArr(data) {
  391. this.mergeArr.forEach((key, index1) => {
  392. let count = 0; // 用来记录需要合并行的起始位置
  393. this.mergeObj[key] = []; // 记录每一列的合并信息
  394. data.forEach((item, index) => {
  395. // index == 0表示数据为第一行,直接 push 一个 1
  396. if (index === 0) {
  397. this.mergeObj[key].push(1);
  398. //item.group=index;
  399. } else {
  400. // 判断当前行是否与上一行其值相等 如果相等 在 count 记录的位置其值 +1 表示当前行需要合并 并push 一个 0 作为占位
  401. if (item[key] === data[index - 1][key]) {
  402. this.mergeObj[key][count] += 1;
  403. this.mergeObj[key].push(0);
  404. //item.group = this.tableData[index - 1].group;
  405. } else {
  406. // 如果当前行和上一行其值不相等
  407. count = index; // 记录当前位置
  408. this.mergeObj[key].push(1); // 重新push 一个 1
  409. // item.group = this.tableData[index - 1].group + 1; //如果不一样 将组号设置为上一个数据的组号加1
  410. }
  411. }
  412. })
  413. })
  414. },
  415. workComment(row) {
  416. let planContent=row.planContent;
  417. if(planContent.includes('下周暂无工作安排')){
  418. let userName=row.userName;
  419. let msg=userName+"下周工作计划未填写,请填写完后在评论评分!"
  420. this.$message({
  421. message: msg,
  422. type: 'warning'
  423. });
  424. return
  425. }
  426. let scoreId = row.scoreId
  427. let score = row.score
  428. let remark = row.remark
  429. let meetingId = row.meetingId
  430. let weeks = row.weeks;
  431. let userId = row.executor
  432. let workComment = row.workComment
  433. if (scoreId === meetingId) {
  434. scoreId = null
  435. }
  436. let data = {
  437. id: scoreId,
  438. score: score,
  439. remark: remark,
  440. weeks: weeks,
  441. userId: userId,
  442. workComment: workComment,
  443. meetingId:meetingId
  444. }
  445. workComments(data).then(res => {
  446. this.$message({
  447. message: '操作成功!',
  448. type: 'success'
  449. });
  450. this.getData()
  451. });
  452. },
  453. workMeetingsUpdate(m){
  454. let status=m.status
  455. if(status===2){
  456. this.$message.error("会议已经结束,不能更改会议相关信息!")
  457. return
  458. }
  459. workMeetingsUpdates(m).then(res => {
  460. this.$message({
  461. message: '操作成功!',
  462. type: 'success'
  463. });
  464. this.getData()
  465. })
  466. },
  467. getTaskScheduleRemarks(row) {
  468. if(row.taskId===undefined || row.taskId===null){
  469. this.taskFeedbackTitle=row.userName+''
  470. this.taskFeedbackContent='暂无反馈'
  471. this.taskFeedbackVisible = true
  472. }else {
  473. this.taskFeedbackTitle = row.userName + ":" + row.taskName
  474. getTaskScheduleRemark(row.taskId).then(res => {
  475. let content = res.data;
  476. let feedbackContent = '';
  477. let j = 1;
  478. for (let i = 0; i < content.length; i++) {
  479. feedbackContent += j + ":" + content[i].description + "&nbsp;&nbsp;&nbsp;&nbsp;" + content[i].value + "%" + "&nbsp;&nbsp;&nbsp" + '</br>'
  480. j++;
  481. }
  482. if (content.length === 0) {
  483. feedbackContent = '暂无反馈'
  484. }
  485. this.taskFeedbackContent = feedbackContent
  486. });
  487. }
  488. this.taskFeedbackVisible = true
  489. },
  490. exportPdf() {
  491. downloadPdf(this.meetingId, this.weeks)
  492. },
  493. meetingResultConfirm(){
  494. let m=this.m;
  495. if(m.status!==2){
  496. this.$message.warning("会议暂未结束,请结束后在确认会议结果!")
  497. return
  498. }
  499. weekMeetingConfirms(this.meetingId, this.weeks).then(res=>{
  500. let code=res.code;
  501. if(code==='2000'){
  502. this.$message({
  503. message: '操作成功!',
  504. type: 'success'
  505. });
  506. this.meetingResultConfirmVisible=false;
  507. this.getData()
  508. }else{
  509. this.$message({
  510. message: res.data,
  511. type: 'warning'
  512. });
  513. }
  514. })
  515. },
  516. addWorkPlanWin(row, column, cell, event){
  517. let label=column.label
  518. if(label==='工作内容与完成时间'){
  519. //已经确认的工作不能继续编辑工作计划,临时增加就去任务系统手动添加
  520. let meetingId=this.meetingId
  521. let data={
  522. weeks:this.weeks,
  523. userId:row.executor,
  524. meetingId:meetingId
  525. }
  526. getWorkPlanConfirmFlags(data).then(res=>{
  527. if(res.success!==true){
  528. this.$message.warning(res.data)
  529. }else{
  530. meetingAuthById(meetingId).then(res=> {
  531. if (res.success === false) {
  532. this.$message.error(res.data)
  533. }else{
  534. getProjects().then(res=>{
  535. this.projects=res.data
  536. });
  537. let weeks=this.weeks
  538. let userId=row.executor
  539. let meetingId=this.meetingId
  540. this.workPlanTitle=row.userName+'下周工作计划'
  541. getWorkPlanByWeeks(weeks,userId,meetingId).then(res=>{
  542. let datas=[]
  543. let data=res.data
  544. if(data.length>0){
  545. for(let i=0;i<data.length;i++){
  546. if(data[i].taskId!==undefined && data[i].taskId!==null){
  547. continue
  548. }
  549. datas.push(data[i])
  550. }
  551. }
  552. this.workPlanDatas=datas;
  553. })
  554. this.row=row
  555. this.workPlanVisible=true
  556. }
  557. });
  558. }
  559. })
  560. }
  561. },
  562. addWorkPlan(){
  563. let row={
  564. planContent: '',
  565. id: null,
  566. meetingId: null,
  567. completionTimes: null,
  568. completionTime: null,
  569. projectId: null,
  570. userId:null,
  571. taskId:null,
  572. beginDate:null,
  573. priority:'4'
  574. }
  575. this.workPlanDatas.push(row)
  576. },
  577. deleteRow(index, row){
  578. this.workPlanDatas.splice(index, 1)
  579. },
  580. addWorkPlanData(row){
  581. let content=row.planContent;
  582. if(content===null || content===''){
  583. this.$message.warning("请输入工作内容!")
  584. return
  585. }
  586. let beginDate=row.beginDate
  587. if(beginDate===null || beginDate===''){
  588. this.$message.warning("请选择开始日期!")
  589. return
  590. }
  591. let completionTime=row.completionTime
  592. if(completionTime===null || completionTime===''){
  593. this.$message.warning("请选择截止日期!")
  594. return
  595. }
  596. let userId=this.row.executor
  597. let weeks=this.weeks
  598. let data={
  599. planContent:row.planContent,
  600. projectId:row.projectId,
  601. completionTime:new Date(completionTime).getTime(),
  602. meetingId:this.meetingId,
  603. userId:userId,
  604. weeks:weeks,
  605. beginDate:new Date(beginDate).getTime(),
  606. priority:row.priority
  607. }
  608. addWorkPlan(data).then(res=>{
  609. this.$message.success("操作成功!")
  610. getWorkPlanByWeeks(weeks,userId,this.meetingId).then(res=>{
  611. let datas=[]
  612. let data=res.data
  613. if(data.length>0){
  614. for(let i=0;i<data.length;i++){
  615. if(data[i].taskId!==undefined && data[i].taskId!==null){
  616. continue
  617. }
  618. datas.push(data[i])
  619. }
  620. }
  621. this.workPlanDatas=datas
  622. })
  623. })
  624. },
  625. updateWorkPlan(row){
  626. let id=row.id;
  627. let beginDate=row.beginDate
  628. if(beginDate===null || beginDate===''){
  629. this.$message.warning("请选择开始日期!")
  630. return
  631. }
  632. let completionTime=row.completionTime
  633. if(completionTime===null || completionTime===''){
  634. this.$message.warning("请选择截止时间!")
  635. return
  636. }
  637. let data={
  638. id:id,
  639. planContent:row.planContent,
  640. projectId:row.projectId,
  641. completionTime:new Date(completionTime).getTime(),
  642. beginDate:new Date(beginDate).getTime(),
  643. priority:row.priority
  644. }
  645. updateWorkPlan(data).then(res=>{
  646. this.$message.success("操作成功!")
  647. })
  648. },
  649. deleteWorkPlanByIds(row){
  650. let id=row.id
  651. let userId=row.userId
  652. let weeks=row.weeks
  653. deleteWorkPlanById(id).then(res=>{
  654. this.$message.success("操作成功!")
  655. getWorkPlanByWeeks(weeks,userId,this.meetingId).then(res=>{
  656. let datas=[]
  657. let data=res.data
  658. if(data.length>0){
  659. for(let i=0;i<data.length;i++){
  660. if(data[i].taskId!==undefined && data[i].taskId!==null){
  661. continue
  662. }
  663. datas.push(data[i])
  664. }
  665. }
  666. this.workPlanDatas=datas
  667. })
  668. })
  669. },
  670. closeWorkPlanWin(){
  671. this.getData()
  672. },
  673. endMeetingClick(row) {
  674. let id = row.id;
  675. let remark=row.remark
  676. meetingAuthById(id).then(res => {
  677. if (res.success === false) {
  678. this.$message.error(res.data)
  679. } else {
  680. if(remark===undefined || remark===null || remark==='' || remark.replace(/\s+/g, "")===''){
  681. this.$message.error("请将参会情况填写完整!")
  682. }else{
  683. endMeeting(id).then(res => {
  684. this.$message({
  685. message: '操作成功!',
  686. type: 'success'
  687. });
  688. this.m.status=2
  689. this.setPermissions()
  690. this.getData();
  691. this.workRemarkReadOnly=false
  692. })
  693. }
  694. }
  695. })
  696. },
  697. jumpPage(){
  698. this.$router.go(-1);
  699. }
  700. }
  701. }
  702. </script>
  703. <style scoped lang="scss">
  704. .underline-on-hover {
  705. cursor: pointer;
  706. text-decoration: none; /* 默认情况下不显示下划线 */
  707. }
  708. .underline-on-hover:hover {
  709. text-decoration: underline; /* 鼠标移入时显示下划线 */
  710. }
  711. </style>