taskPreview.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. <template>
  2. <div class="set-background">
  3. <div style="width:96%">
  4. <div class="block">
  5. <div class="operate-flex">
  6. <div style="width:100%">
  7. <span>状态</span>
  8. <el-select v-model="form.status" size="medium" style="width:30%;margin-right: 15px;" clearable placeholder="状态" @change="updateaddTaskData(form)">
  9. <el-option v-for="item in processStatusEnumList" :key="item.code" :label="item.name" :value="item.code" />
  10. </el-select>
  11. <span>优先级</span>
  12. <el-select v-model="form.priority" size="medium" style="width:30%;margin-right: 15px;" clearable placeholder="优先级" @change="updateaddTaskData(form)">
  13. <el-option v-for="item in bugLevelStr" :key="item.code" :label="item.name" :value="item.code" />
  14. </el-select>
  15. </div>
  16. <div style="display:flex">
  17. <el-button type="primary" plain size="medium" @click="createReport(1, form)">新建提测报告</el-button>
  18. <el-button type="primary" plain size="medium" @click="createReport(2, form)">新建日报报告</el-button>
  19. <el-button type="primary" plain size="medium" @click="createReport(3, form)">新建准出报告</el-button>
  20. <el-button type="primary" plain size="medium" @click="createReport(4, form)">新建bug</el-button>
  21. <el-button type="primary" plain size="medium" @click="projectShowData(form.id)">编辑</el-button>
  22. </div>
  23. </div>
  24. <div class="display-messege">
  25. <span style="font-weight:bold;">任务名称 :</span>&nbsp;&nbsp;&nbsp;{{ form.name }}
  26. </div>
  27. <div class="display-messege">
  28. <div class="divide-fourparts"><span style="font-weight:bold;">业务线 :</span>&nbsp;&nbsp;&nbsp;{{ form.bizIdString }}</div>
  29. <div class="divide-fourparts"><span style="font-weight:bold;">任务类型 :</span>&nbsp;&nbsp;&nbsp;{{ form.taskType }}</div>
  30. <div class="divide-fourparts"><span style="font-weight:bold;">产品 :</span>&nbsp;&nbsp;&nbsp;{{ form.pm }}</div>
  31. <div class="divide-fourparts"><span style="font-weight:bold;">分组 :</span>&nbsp;&nbsp;&nbsp;{{ form.group }}</div>
  32. </div>
  33. <div class="display-messege">
  34. <div class="divide-fourparts"><span style="font-weight:bold;">平台类型 :</span>&nbsp;&nbsp;&nbsp;{{ form.typeString }}</div>
  35. <div class="divide-fourparts"><span style="font-weight:bold;">是否免测 :</span>&nbsp;&nbsp;&nbsp;{{ form.noTestString }}</div>
  36. <div class="divide-fourparts"><span style="font-weight:bold;">测试 :</span>&nbsp;&nbsp;&nbsp;{{ form.qa }}</div>
  37. <div class="divide-fourparts"><span style="font-weight:bold;">标签 :</span>&nbsp;&nbsp;&nbsp;{{ form.tag }}</div>
  38. </div>
  39. <div class="display-messege">
  40. <div class="divide-fourparts"><span style="font-weight:bold;">业务模块 :</span>&nbsp;&nbsp;&nbsp;{{ form.clientTypeString }}</div>
  41. <div class="divide-fourparts"><span style="font-weight:bold;">打回次数 :</span>&nbsp;&nbsp;&nbsp;{{ form.reopen }}</div>
  42. <div class="divide-fourparts"><span style="font-weight:bold;">开发 :</span>&nbsp;&nbsp;&nbsp;{{ form.rd }}</div>
  43. </div>
  44. <div class="display-messege-end-one">
  45. <div class="divide-fullparts"><span style="font-weight:bold;">描述 :</span>&nbsp;&nbsp;&nbsp;{{ form.description }}</div>
  46. </div>
  47. <div class="display-messege-end">
  48. <div class="divide-fullparts"><span style="font-weight:bold;">技术文档 :</span>&nbsp;&nbsp;&nbsp;{{ form.devUrl }}</div>
  49. </div>
  50. <div class="display-messege-end">
  51. <div class="divide-fullparts"><span style="font-weight:bold;">需求文档 :</span>&nbsp;&nbsp;&nbsp;{{ form.mrdUrl }}</div>
  52. </div>
  53. </div>
  54. <div class="block">
  55. <el-tabs v-model="activeName">
  56. <el-tab-pane label="提测报告" name="first">
  57. <el-table
  58. :data="listTaskDatas"
  59. height="215"
  60. border
  61. style="width: 100%"
  62. size="medium"
  63. >
  64. <el-table-column
  65. prop="id"
  66. label="ID"
  67. align="center"
  68. width="80"
  69. />
  70. <el-table-column
  71. prop="name"
  72. label="标题名称"
  73. align="center"
  74. >
  75. <template slot-scope="scope">
  76. <el-link style="font-weight: 400;" type="primary" :underline="false" @click="JumpDetection(scope.row.id)">{{ scope.row.name }}</el-link>
  77. </template>
  78. </el-table-column>
  79. <el-table-column
  80. label="状态"
  81. align="center"
  82. width="130"
  83. >
  84. <template slot-scope="scope">
  85. <el-tag
  86. :type="scope.row.statusString === '打回' ? 'danger' : 'success'"
  87. disable-transitions
  88. >{{ scope.row.statusString }}</el-tag>
  89. </template>
  90. </el-table-column>
  91. <el-table-column
  92. prop="gmtCreate"
  93. label="创建时间"
  94. align="center"
  95. />
  96. <el-table-column
  97. label="操作"
  98. align="center"
  99. width="300"
  100. >
  101. <template slot-scope="scope">
  102. <div>
  103. <el-button size="mini" type="primary" plain @click="pass(1,scope.row.id)">通过</el-button>
  104. <el-button size="mini" type="danger" plain @click="back(2,scope.row.id)">打回</el-button>
  105. <el-dialog
  106. title="打回原因"
  107. :visible.sync="centerDialogVisible"
  108. width="30%"
  109. >
  110. <el-input v-model="CallBackTheReason" type="textarea" :rows="3" />
  111. <span slot="footer" class="dialog-footer">
  112. <el-button type="primary" size="mini" @click="passOrBackSend()">确 定</el-button>
  113. <el-button type="danger" size="mini" @click="centerDialogVisible = false">取 消</el-button>
  114. </span>
  115. </el-dialog>
  116. </div>
  117. </template>
  118. </el-table-column>
  119. </el-table>
  120. </el-tab-pane>
  121. <el-tab-pane label="日报报告" name="second">
  122. <el-table
  123. :data="dailyTestReports"
  124. height="215"
  125. border
  126. style="width: 100%"
  127. size="medium"
  128. >
  129. <el-table-column
  130. prop="id"
  131. label="ID"
  132. align="center"
  133. width="80"
  134. />
  135. <el-table-column
  136. prop="reportName"
  137. label="标题名称"
  138. align="center"
  139. >
  140. <template slot-scope="scope">
  141. <el-link style="font-weight: 400;" type="primary" :underline="false" @click="JumpDaily(scope.row.id)">{{ scope.row.reportName }}</el-link>
  142. </template>
  143. </el-table-column>
  144. <el-table-column
  145. prop="gmtCreate"
  146. label="创建时间"
  147. align="center"
  148. />
  149. </el-table>
  150. </el-tab-pane>
  151. <el-tab-pane label="准出报告" name="third">
  152. <el-table
  153. :data="projectTestReports"
  154. height="215"
  155. border
  156. style="width: 100%"
  157. size="medium"
  158. >
  159. <el-table-column
  160. prop="id"
  161. label="ID"
  162. align="center"
  163. width="80"
  164. />
  165. <el-table-column
  166. prop="reportName"
  167. label="标题名称"
  168. align="center"
  169. >
  170. <template slot-scope="scope">
  171. <el-link style="font-weight: 400;" type="primary" :underline="false" @click="JumpOut(scope.row.id)">{{ scope.row.reportName }}</el-link>
  172. </template>
  173. </el-table-column>
  174. <el-table-column
  175. label="状态"
  176. align="center"
  177. width="130"
  178. >
  179. <template slot-scope="scope">
  180. <el-tag
  181. :type="scope.row.statusString === '打回' ? 'danger' : 'success'"
  182. disable-transitions
  183. >{{ scope.row.statusString }}</el-tag>
  184. </template>
  185. </el-table-column>
  186. <el-table-column
  187. prop="gmtCreate"
  188. label="创建时间"
  189. align="center"
  190. />
  191. </el-table>
  192. </el-tab-pane>
  193. <el-tab-pane label="Bug报告" name="forth">
  194. <el-table
  195. :data="projectBug"
  196. height="215"
  197. border
  198. style="width: 100%"
  199. size="medium"
  200. >
  201. <el-table-column
  202. prop="id"
  203. label="ID"
  204. align="center"
  205. width="80"
  206. />
  207. <el-table-column
  208. prop="bugName"
  209. label="标题名称"
  210. align="center"
  211. >
  212. <template slot-scope="scope">
  213. <el-link style="font-weight: 400;" type="primary" :underline="false" @click="turnToBugCreate(scope.row.id)">{{ scope.row.bugName }}</el-link>
  214. </template>
  215. </el-table-column>
  216. <el-table-column
  217. label="状态"
  218. align="center"
  219. width="130"
  220. >
  221. <template slot-scope="scope">
  222. <el-tag
  223. :type="scope.row.bugStatusName === '打回' ? 'danger' : 'success'"
  224. disable-transitions
  225. >{{ scope.row.bugStatusName }}</el-tag>
  226. </template>
  227. </el-table-column>
  228. <el-table-column
  229. prop="gmtCreate"
  230. label="创建时间"
  231. align="center"
  232. />
  233. <el-table-column
  234. prop="currentHandler"
  235. label="当前处理人"
  236. align="center"
  237. />
  238. </el-table>
  239. </el-tab-pane>
  240. </el-tabs>
  241. </div>
  242. <div class="block-end">
  243. <div class="display-messege">
  244. <div class="divide-twoparts"><span style="font-weight:bold;">需求评审时间 :</span>&nbsp;&nbsp;&nbsp;{{ form.mrdTime }}</div>
  245. <div class="divide-twoparts"><span style="font-weight:bold;">计划提测时间 :</span>&nbsp;&nbsp;&nbsp;{{ form.launchTestPlanTime }}</div>
  246. </div>
  247. <div class="display-messege">
  248. <div class="divide-twoparts"><span style="font-weight:bold;">计划开始开发时间 :</span>&nbsp;&nbsp;&nbsp;{{ form.startDevPlanTime }}</div>
  249. <div class="divide-twoparts"><span style="font-weight:bold;">计划测试完成时间 :</span>&nbsp;&nbsp;&nbsp;{{ form.testFinishPlanTime }}</div>
  250. </div>
  251. <div class="display-messege">
  252. <div class="divide-twoparts"><span style="font-weight:bold;">计划上线时间 :</span>&nbsp;&nbsp;&nbsp;{{ form.onlinePlanTime }}</div>
  253. <div class="divide-twoparts"><span style="font-weight:bold;">冒烟测试完成时间 :</span>&nbsp;&nbsp;&nbsp;{{ form.smokeTestFinishTime }}</div>
  254. </div>
  255. <div class="display-messege">
  256. <div class="divide-twoparts"><span style="font-weight:bold;">实际提测时间 :</span>&nbsp;&nbsp;&nbsp;{{ form.launchTestRealTime }}</div>
  257. <div class="divide-twoparts"><span style="font-weight:bold;">实际上线时间 :</span>&nbsp;&nbsp;&nbsp;{{ form.onlineRealTime }}</div>
  258. </div>
  259. <div class="display-messege">
  260. <div class="divide-twoparts"><span style="font-weight:bold;">实际开始开发时间 :</span>&nbsp;&nbsp;&nbsp;{{ form.startDevRealTime }}</div>
  261. <div class="divide-twoparts"><span style="font-weight:bold;">实际测试完成时间 :</span>&nbsp;&nbsp;&nbsp;{{ form.testFinishRealTime }}</div>
  262. </div>
  263. <div class="display-messege">
  264. <div class="divide-fullparts"><span style="font-weight:bold;">备注 :</span>&nbsp;&nbsp;&nbsp;{{ form.remark }}</div>
  265. </div>
  266. </div>
  267. </div>
  268. </div>
  269. </template>
  270. <script>
  271. import { getTaskData, launchTestUpdate, updateTaskList } from '@/api/projectPage.js'
  272. import { bugGetEnum } from '@/api/defectManage' // 下拉菜单data
  273. export default {
  274. data() {
  275. return {
  276. form: {},
  277. CallBackTheReason: '',
  278. userInformation: localStorage.getItem('username'),
  279. userNames: localStorage.getItem('realname'),
  280. bizJson: localStorage.getItem('key'),
  281. listTaskDatas: [], // 提测报告table
  282. dailyTestReports: [], // 日报报告table
  283. projectTestReports: [], // 准出报告table
  284. projectBug: [], // bug报告table
  285. CallBackStatus: '',
  286. CallBackId: '',
  287. centerDialogVisible: false,
  288. processStatusEnumList: [],
  289. bugLevelStr: [],
  290. activeName: 'first'
  291. }
  292. },
  293. created() {
  294. this.bugListSelect()
  295. this.getList()
  296. },
  297. methods: {
  298. // id get
  299. getList() {
  300. getTaskData(this.$route.query.id).then(res => {
  301. this.form = res.data
  302. this.listTaskDatas = res.data.launchTestInfoList
  303. // this.listTaskDatas.statusString = this.form.statusString
  304. this.projectTestReports = res.data.projectTestReports
  305. // this.projectTestReports.statusString = this.form.statusString
  306. this.dailyTestReports = res.data.dailyTestReports
  307. this.projectBug = res.data.bugBaseInfoDOS
  308. })
  309. },
  310. // 打回
  311. back(e, ele) {
  312. this.centerDialogVisible = true
  313. this.CallBackStatus = e
  314. this.CallBackId = ele
  315. },
  316. // 通过
  317. pass(e, ele) {
  318. this.CallBackStatus = e
  319. this.CallBackId = ele
  320. this.passOrBackSend()
  321. },
  322. // 查看页面更改状态 优先级
  323. updateaddTaskData(vel) {
  324. this.formTask = vel
  325. this.userData = { id: '', ename: this.userInformation, name: this.userNames }
  326. this.objData = { taskInfo: this.formTask, user: this.userData }
  327. updateTaskList(this.objData).then(response => {
  328. if (response.code === 200) {
  329. this.getList()
  330. this.successFun('modify')
  331. } else {
  332. this.errorFun(response.msg)
  333. }
  334. })
  335. },
  336. passOrBackSend() {
  337. this.centerDialogVisible = false
  338. const tt = { status: this.CallBackStatus, id: this.CallBackId }
  339. this.userData = { id: '', ename: this.userInformation, name: this.userNames }
  340. this.objData = { launchTestInfo: tt, user: this.userData }
  341. launchTestUpdate(this.objData).then(res => {
  342. res.code === 200 ? this.successFun('operate') : this.errorFun(res.msg)
  343. this.getList()
  344. })
  345. },
  346. // 所有下拉菜单数据
  347. bugListSelect() {
  348. bugGetEnum().then(res => {
  349. this.bugLevelStr = res.data.priorityEnumList
  350. this.processStatusEnumList = res.data.processStatusEnumList
  351. })
  352. },
  353. // 创建日报 提测 准出 Bug报告跳转
  354. createReport(e, ele) {
  355. if (ele.typeString !== '服务端') {
  356. switch (e) {
  357. case 1:
  358. this.$router.push({ path: '/Platform/presentation/PresentReport', query: { task: ele }}) // 客户端提测
  359. break
  360. case 2:
  361. this.$router.push({ path: '/Platform/presentation/DailyNewsAdded', query: { task: ele }}) // 客户端日报
  362. break
  363. case 3:
  364. this.$router.push({ path: '/Platform/presentation/ClientAcceptance', query: { task: ele }}) // 客户端准出
  365. break
  366. case 4:
  367. this.$router.push({ name: '新建Bug', query: { id: ele.id }}) // 缺陷报告
  368. break
  369. }
  370. } else {
  371. switch (e) {
  372. case 1:
  373. this.$router.push({ path: '/Platform/presentation/presentationReport', query: { task: ele }}) // 服务端提测
  374. break
  375. case 2:
  376. this.$router.push({ path: '/Platform/presentation/DailyNewsAdded', query: { task: ele }}) // 服务端日报
  377. break
  378. case 3:
  379. this.$router.push({ path: '/Platform/presentation/Acceptance', query: { task: ele }}) // 服务端准出
  380. break
  381. case 4:
  382. this.$router.push({ name: '新建Bug', query: { id: ele.id }}) // 缺陷报告
  383. break
  384. }
  385. }
  386. },
  387. projectShowData(e) {
  388. this.$router.push({ name: '任务更新', query: { id: e }})
  389. },
  390. // 日报预览跳转
  391. JumpDaily(val) {
  392. this.$router.push({ path: '/Platform/presentation/testPresenyL', query: { id: val }})
  393. },
  394. // 提测预览跳转
  395. JumpDetection(val) {
  396. this.$router.push({ path: '/Platform/presentation/acceptTheReport', query: { id: val }})
  397. },
  398. // 准出预览跳转
  399. JumpOut(val) {
  400. this.$router.push({ path: '/Platform/presentation/ResultPageyL', query: { id: val }})
  401. },
  402. // bug报告跳转
  403. turnToBugCreate(e) {
  404. this.$router.push({ name: '查看Bug', query: { id: e }}) // 缺陷报告
  405. },
  406. successFun(successText) {
  407. this.$notify({ title: 'Success', message: `${successText} Successfully`, type: 'success', duration: 2000 })
  408. },
  409. errorFun(errorText) {
  410. this.$notify({ title: 'Failed', message: errorText, type: 'error', duration: 2000 })
  411. }
  412. }
  413. }
  414. </script>
  415. <style lang="stylus" scoped>
  416. .set-background
  417. background-color #F2F3F6
  418. display flex
  419. justify-content center
  420. min-width 1000px
  421. .block
  422. background-color rgba(255,255,255,1)
  423. box-shadow 0px 0px 11px 0px rgba(238,240,245,1)
  424. border-radius 7px
  425. width 100%
  426. margin 20px 0
  427. padding 10px 30px
  428. .block >>> .el-tabs__nav-wrap::after
  429. background-color white
  430. .block >>> th
  431. background-color #F0F2F4 !important
  432. .block >>> .el-dialog__header
  433. padding 20px 20px 0px 20px
  434. display flex
  435. .block-end
  436. background-color rgba(255,255,255,1)
  437. box-shadow 0px 0px 11px 0px rgba(238,240,245,1)
  438. border-radius 7px
  439. width 100%
  440. margin 20px 0
  441. padding 15px 30px 1px 30px
  442. .operate-flex
  443. height 50px
  444. margin-bottom 25px
  445. display flex
  446. justify-content space-between
  447. align-items center
  448. .operate-flex span
  449. margin-right 10px
  450. .display-messege
  451. font-size 14px
  452. font-family PingFangSC-Regular,PingFangSC
  453. font-weight 400
  454. color rgba(51,59,74,1)
  455. display flex
  456. width 100%
  457. margin-bottom 15px
  458. .display-messege-end-one
  459. font-size 14px
  460. font-family PingFangSC-Regular,PingFangSC
  461. font-weight 400
  462. color rgba(51,59,74,1)
  463. display flex
  464. width 100%
  465. margin 30px 0 15px 0
  466. .display-messege-end
  467. font-size 14px
  468. font-family PingFangSC-Regular,PingFangSC
  469. font-weight 400
  470. color rgba(51,59,74,1)
  471. display flex
  472. width 100%
  473. margin-bottom 15px
  474. .divide-fourparts
  475. width 25%
  476. white-space pre-wrap
  477. word-wrap break-word
  478. padding-right 30px
  479. span
  480. white-space nowrap
  481. .divide-twoparts
  482. width 50%
  483. white-space pre-wrap
  484. word-wrap break-word
  485. padding-right 30px
  486. span
  487. white-space nowrap
  488. .divide-fullparts
  489. width 100%
  490. white-space pre-wrap
  491. word-wrap break-word
  492. padding-right 30px
  493. span
  494. white-space nowrap
  495. </style>