testPresentation.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. <template>
  2. <div class="eleStyle">
  3. <el-container class="header_sty">
  4. <el-header class="public_header">
  5. <el-tabs v-model="activeName" @tab-click="handleClick">
  6. <el-tab-pane label="测试日报" name="first" />
  7. <el-tab-pane label="准出报告" name="second" />
  8. <el-tab-pane label="提测报告" name="third" />
  9. </el-tabs>
  10. </el-header>
  11. <el-main class="public_main report-Layout">
  12. <div class="Layout_space_between distance">
  13. <div class="Layout_space_between">
  14. <span style="width: 100px;">{{ title }}</span>
  15. <el-input v-if="history" v-model="state" size="medium" filterable placeholder="报告名称搜索" style="width:100%;" @change="getList(state)" />
  16. <el-input v-if="!history" v-model="state" size="medium" filterable placeholder="报告名称搜索" style="width:100%;" @change="gethistoryData(state)" />
  17. </div>
  18. <div class="Layout_space_between">
  19. <el-button v-if="!history" type="primary" size="medium" @click="returnNewest">返回最新</el-button>
  20. <el-button v-if="history" type="text" @click="gethistoryData">查看老数据</el-button>
  21. <el-button v-if="history" type="primary" size="medium" @click="getQueryData">新建{{ title }}</el-button>
  22. </div>
  23. </div>
  24. <el-table v-loading="loading" :data="tableData" size="medium" :header-cell-style="{ background: '#F2F3F6', color: '#333' }" border style="width: 100%" :show-overflow-tooltip="true">
  25. <el-table-column label="报告名称" min-width="280" show-overflow-tooltip>
  26. <template slot-scope="scope">
  27. <a v-if="title === '测试日报' || title === '准出报告'" href="javascript:void(0)" style="color:#20a0ff" @click="history ? toReportView(scope.row) : OldDaily(scope.row)">{{ scope.row.reportName }}</a>
  28. <div v-if="title === '准出报告' && scope.row.passStatus === 1" class="passStatus1">不通过</div>
  29. <a v-if="title === '提测报告'" href="javascript:void(0)" style="color:#20a0ff" @click="history ? toReportView(scope.row) : OldDaily(scope.row)">{{ history ? scope.row.reportName : scope.row.name }}</a>
  30. <div v-if="title === '提测报告' && scope.row.returnReason" style="color: red;" class="breakText1">打回报告:{{ scope.row.returnReason }}</div>
  31. </template>
  32. </el-table-column>
  33. <el-table-column label="状态" min-width="150">
  34. <template slot-scope="scope">{{ scope.row.statusString }}</template>
  35. </el-table-column>
  36. <el-table-column label="报告人" min-width="180">
  37. <template slot-scope="scope">
  38. <div v-if="history">
  39. <div v-if="title === '测试日报' || title === '准出报告'">{{ scope.row.reportorObject.name ===null ? '' : scope.row.reportorObject.name }}</div>
  40. <div v-if="title === '提测报告'">{{ scope.row.reportorObject.name }}</div>
  41. </div>
  42. <div v-if="!history">
  43. <div v-if="title === '测试日报' || title === '准出报告'">{{ scope.row.ownner }}</div>
  44. <div v-if="title === '提测报告'">{{ scope.row.submitter }}</div>
  45. </div>
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="创建时间" min-width="280">
  49. <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
  50. </el-table-column>
  51. <el-table-column v-if="history" label="操作" align="center" fixed="right" min-width="230">
  52. <template slot-scope="scope">
  53. <div v-if="title === '测试日报'">
  54. <span v-if="scope.row.status === 0 ? true : false" class="didi-hover" @click="dailyButtom(3,scope.row)">发送</span>
  55. <span v-if="scope.row.status === 0 ? true : false" style="margin: 0 30px;" class="didi-hover" @click="dailyButtom(2,scope.row)">编辑</span>
  56. <span v-if="scope.row.status === 0 ? true : false" class="didi-hover" @click="report_click(4,scope.row )">删除</span>
  57. <span v-if="scope.row.status === 3 ? true : false" class="didi-hover" @click="dailyButtom(4,scope.row)">复制</span>
  58. </div>
  59. <div v-if="title === '准出报告'">
  60. <div v-if="scope.row.status === 3 ? false : true">
  61. <span v-if="scope.row.status === 0 ? true : false" class="didi-hover" @click="clientButtom(3,scope.row)">发送</span>
  62. <span v-if="scope.row.status === 0 ? true : false" style="margin: 0 30px;" class="didi-hover" @click="clientButtom(2, scope.row)">编辑</span>
  63. <span v-if="scope.row.status === 0 ? true : false" class="didi-hover" @click="report_click(4,scope.row )">删除</span>
  64. </div>
  65. </div>
  66. <div v-if="title === '提测报告'">
  67. <div v-if="scope.row.status === 1 ? false : true">
  68. <span v-if="scope.row.status === 3 ? true : false" class="didi-hover" @click="report_click(1,scope.row)">通过</span>
  69. <span v-if="scope.row.status === 3 ? true : false" style="margin-left: 30px;" class="didi-hover" @click="report_click(2,scope.row)">打回</span>
  70. <span v-if="scope.row.status === 0 ? true : false" class="didi-hover" @click="report_click(5,scope.row)">发送</span>
  71. <span v-if="scope.row.status === 0 ? true : false" style="margin: 0 30px;" class="didi-hover" @click="report_click(6,scope.row)">编辑</span>
  72. <span v-if="scope.row.status === 0 ? true : false" class="didi-hover" @click="report_click(4,scope.row )">删除</span>
  73. <span v-if="scope.row.status === 2 ? true : false" class="didi-hover" @click="report_click(3,scope.row)">重新提测</span>
  74. </div>
  75. </div>
  76. </template>
  77. </el-table-column>
  78. </el-table>
  79. </el-main>
  80. <el-footer class="public_footer">
  81. <el-pagination v-if="history" style="margin-top:30px;" align="center" :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
  82. <el-pagination v-if="!history" style="margin-top:30px;" align="center" :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange1" @current-change="handleCurrentChange1" />
  83. </el-footer>
  84. </el-container>
  85. <!-- 日报/准出/提测选择任务 -->
  86. <el-dialog title="选择任务" :visible.sync="centerDialogVisible" width="30%" center>
  87. <div class="Layout_space_between">
  88. <div style="width:100px;">选择任务 :</div>
  89. <el-select
  90. v-model="queryData.code"
  91. filterable
  92. :remote="true"
  93. :remote-method="debounceQuery"
  94. placeholder="请选择任务"
  95. size="mini"
  96. style="width:100%;"
  97. >
  98. <el-option v-for="item in restaurants" :key="item.id" :label="item.name" :value="item.id">
  99. <div class="belong-task">
  100. <div class="task-id">{{ item.taskId }}</div>
  101. <div class="modules-name">
  102. <span class="name">{{ item.name }}</span>
  103. <span v-if="item.moduleInfoName" class="modules">{{ item.moduleInfoName }}</span>
  104. </div>
  105. </div>
  106. </el-option>
  107. </el-select>
  108. </div>
  109. <div class="tips-report">
  110. <i class="el-icon-warning-outline" /> 创建日报或准出报告,任务的状态必须是【测试中】!<br>
  111. <i class="el-icon-warning-outline" /> 创建提测报告,任务的状态必须是【开发中】!
  112. </div>
  113. <span slot="footer" class="dialog-footer">
  114. <el-button type="primary" size="mini" @click="createPresentation(queryData.code)">创建</el-button>
  115. </span>
  116. </el-dialog>
  117. <el-dialog :title="report_from.titName" :visible.sync="dialog_testData" width="30%" :close-on-click-modal="false">
  118. <div style="position: absolute; top: 23px; left: 12px;width:4px;height:17px;background:#409EFF;border-radius:1px;" />
  119. <div align="center">
  120. <div v-if="title === '提测报告'">是否{{ report_from.statusString }}以下提测?</div>
  121. <div v-if="title === '测试日报'">是否{{ report_from.statusString }}以下测试日报?</div>
  122. <div v-if="title === '准出报告'">是否{{ report_from.statusString }}以下准出报告?</div>
  123. <div style="color: #f79232;">{{ report_from.name }}</div>
  124. </div>
  125. <el-input v-show="report_from.statusString === '打回'" v-model="report_from.reason" type="textarea" placeholder="请输入打回原因..." :rows="3" />
  126. <span slot="footer" class="dialog-footer">
  127. <el-button type="primary" size="mini" @click="passOrBackSend()">确 定</el-button>
  128. <el-button type="danger" size="mini" @click="endDialog">取 消</el-button>
  129. </span>
  130. </el-dialog>
  131. <TestingReport v-if="dialogVisible1" ref="TestReport" @getList="getList" />
  132. <DailyReport v-if="dialogDaily" ref="DailyReport" @getList="getList" />
  133. <ReleaseReport v-if="dialogClient" ref="ClientReport" @getList="getList" />
  134. <el-dialog :title="title" :visible.sync="reportDaily" class="public_task" width="70%" :close-on-click-modal="false">
  135. <div class="blueStripe" />
  136. <div v-if="title === '测试日报'" style=" margin-bottom: 2%; height: 600px; overflow:scroll; overflow-x: hidden">
  137. <testPresenyL v-if="testPresenyL" :message="message" />
  138. </div>
  139. <div v-if="title === '准出报告'" style=" margin-bottom: 2%; height: 600px; overflow:scroll; overflow-x: hidden">
  140. <ResultPageyL v-if="ResultPageyL" :message="message" />
  141. </div>
  142. <div v-if="title === '提测报告'" style=" margin-bottom: 2%; height: 600px; overflow:scroll; overflow-x: hidden">
  143. <acceptTheReport v-if="acceptTheReport" :message="message" />
  144. </div>
  145. </el-dialog>
  146. <checkListStopConfirm
  147. :visible="checklistStopVisible"
  148. @confirm="checklistConfirm"
  149. @cancel="checklistCancel"
  150. />
  151. </div>
  152. </template>
  153. <script>
  154. const _ = require('lodash')
  155. import { EncryptId } from '@/utils/crypto-js.js'
  156. import { mapGetters } from 'vuex'
  157. import '@/styles/PublicStyle/index.scss'
  158. import checkListStopConfirm from '@/components/checkListStopConfirm'
  159. import { dailyReportDelete } from '@/api/testPresentetion' // 日报
  160. import { projectTestReportList } from '@/api/ResultPage' // 准出
  161. import { launchTestList } from '@/api/InterfaceReport' // 提测
  162. import { taskListCreate } from '@/api/defectManage'
  163. import TestingReport from '@/views/reportManagement/components/TestingReport' // 提测
  164. import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
  165. import ReleaseReport from '@/views/reportManagement/components/ReleaseReport' // 准出
  166. import { dailyReportList, dailyReportListV2, reportreleaseList, reportdelivertestList, reportreleaseDelete, reportdelivertestDelete, reportdelivertestUpdate, dailyReportCheckStatus, reportreleaseCheckStatus, reportdelivertestCheckStatus, reportdelivertestGetReportById } from '@/api/reportTemplate'
  167. import testPresenyL from '@/views/reportManagement/daily/components/testPresenyL.vue' // 老日报数据
  168. import ResultPageyL from '@/views/reportManagement/ReleaseReport/components/ResultPageyL.vue' // 老准出报告
  169. import acceptTheReport from '@/views/reportManagement/Testing/components/acceptTheReport.vue' // 老提测报告
  170. export default {
  171. name: 'TestPresentation',
  172. components: {
  173. TestingReport,
  174. DailyReport,
  175. ReleaseReport,
  176. testPresenyL,
  177. ResultPageyL,
  178. acceptTheReport,
  179. checkListStopConfirm
  180. },
  181. data() {
  182. return {
  183. activeName: 'first',
  184. title: '测试日报', // 报告title
  185. history: true, // 新老数据
  186. userInformation: localStorage.getItem('username'),
  187. userNames: localStorage.getItem('realname'),
  188. message: {}, // 老日报数据
  189. reportDaily: false,
  190. testPresenyL: false, // 老日报数据
  191. ResultPageyL: false, // 老准出报告
  192. acceptTheReport: false, // 老提测报告
  193. centerDialogVisible: false, // 新建报告选择任务
  194. dialog_testData: false, // 操作弹窗
  195. report_data: {}, // 当前点击数据
  196. userData: { id: '', ename: this.userInformation, name: this.userNames },
  197. loading: true,
  198. pageSize: 10,
  199. curIndex: 1,
  200. total: 0,
  201. state: '',
  202. restaurants: [],
  203. queryData: {}, // 选择的任务code为id
  204. report_from: {
  205. name: '',
  206. titName: '',
  207. statusString: ''
  208. },
  209. tableData: [],
  210. restaurants2: [],
  211. dialogVisible1: false, // 提测弹窗
  212. dialogDaily: false,
  213. dialogClient: false,
  214. indexPage: {
  215. pageSize: 10,
  216. curIndex: 1
  217. },
  218. goDataReport: -1,
  219. checklistStopVisible: false, // checklist拦截弹窗是否显示
  220. firstChecklistTaskId: -1
  221. }
  222. },
  223. computed: {
  224. ...mapGetters(['bizId'])
  225. },
  226. watch: {
  227. bizId: {
  228. handler(newV) {
  229. if (newV === -1) return
  230. this.getList()
  231. },
  232. immediate: true
  233. }
  234. },
  235. created() {
  236. this.$store.state.data.status = true
  237. },
  238. destroyed() {
  239. this.$store.state.data.status = false
  240. },
  241. methods: {
  242. logHandle(d) {
  243. window.log({ c: 'report', d })
  244. },
  245. handleClick(tab, event) {
  246. this.curIndex = 1
  247. this.loading = true
  248. switch (Number(tab.index)) {
  249. case 0:
  250. this.title = '测试日报'
  251. this.history ? this.getList() : this.gethistoryData()
  252. break
  253. case 1:
  254. this.title = '准出报告'
  255. this.history ? this.getList() : this.gethistoryData()
  256. break
  257. case 2:
  258. this.title = '提测报告'
  259. this.history ? this.getList() : this.gethistoryData()
  260. break
  261. }
  262. },
  263. async getList(e) { // 报告list
  264. this.loading = true
  265. this.history = true
  266. const indexPage = { bizId: this.bizId, pageSize: this.pageSize, curIndex: this.curIndex }
  267. e ? indexPage.reportName = this.state : ''
  268. if (this.title === '测试日报') {
  269. const res = await dailyReportListV2(indexPage)
  270. if (res.code === 200) {
  271. this.tableData = res.data
  272. this.total = res.total
  273. this.logHandle('get_report_daily')
  274. }
  275. }
  276. if (this.title === '准出报告') {
  277. const res = await reportreleaseList(indexPage)
  278. if (res.code === 200) {
  279. this.tableData = res.data.list || []
  280. this.total = res.data.total
  281. this.logHandle('get_report_release')
  282. }
  283. }
  284. if (this.title === '提测报告') {
  285. const data = { bizId: this.bizId, pageSize: this.pageSize, curIndex: this.curIndex }
  286. e ? data.reportName = this.state : ''
  287. const res = await reportdelivertestList(data)
  288. if (res.code === 200) {
  289. this.tableData = res.data.list || []
  290. this.total = res.data.total
  291. this.logHandle('get_report_deliver')
  292. }
  293. }
  294. this.loading = false
  295. },
  296. returnNewest() { // 返回最新
  297. this.pageSize = 10
  298. this.curIndex = 1
  299. this.state = ''
  300. this.getList()
  301. },
  302. async passOrBackSend() { // 提测打回
  303. this.dialog_testData = false
  304. if (this.report_from.statusString === '通过' || this.report_from.statusString === '打回') {
  305. const data = {
  306. id: this.report_data.id,
  307. moduleId: this.report_data.moduleId,
  308. bizId: this.report_data.bizId,
  309. taskIds: this.report_data.taskIds,
  310. reportName: this.report_data.reportName,
  311. returnReason: this.report_from.reason,
  312. status: this.report_from.statusString === '打回' ? 2 : this.report_from.statusString === '通过' ? 1 : ''
  313. }
  314. const res = await reportdelivertestUpdate(data)
  315. if (res.code === 200) {
  316. this.getList()
  317. this.$message({ message: res.msg, type: 'success', offset: 150 })
  318. }
  319. } else if (this.report_from.statusString === '删除') {
  320. switch (this.title) {
  321. case '测试日报':
  322. dailyReportDelete(this.userData, this.report_data.id).then(res => {
  323. if (res.code === 200) {
  324. this.$message({ type: 'success', message: '删除成功' })
  325. this.getList()
  326. }
  327. })
  328. break
  329. case '准出报告':
  330. reportreleaseDelete(this.userData, this.report_data.id).then(res => {
  331. if (res.code === 200) {
  332. this.$message({ type: 'success', message: '删除成功' })
  333. this.getList()
  334. }
  335. })
  336. break
  337. case '提测报告':
  338. reportdelivertestDelete({}, this.report_data.id).then(res => {
  339. if (res.code === 200) {
  340. this.$message({ type: 'success', message: '删除成功' })
  341. this.getList()
  342. }
  343. })
  344. break
  345. }
  346. }
  347. },
  348. dailyButtom(e, data) { // 测试报告
  349. this.report_data = data
  350. this.dialogDaily = true
  351. this.$nextTick(() => {
  352. this.$refs.DailyReport.init(e, data)
  353. })
  354. },
  355. clientButtom(e, data) { // 准出报告
  356. this.report_data = data
  357. this.dialogClient = true
  358. this.$nextTick(() => {
  359. this.$refs.ClientReport.init(e, data)
  360. })
  361. },
  362. async report_click(e, data) { // 提测报告
  363. this.report_from.name = data.name || data.reportName
  364. this.report_data = data
  365. switch (e) {
  366. case 1:
  367. this.dialog_testData = true
  368. this.report_from.titName = '提测确认'
  369. this.report_from.statusString = '通过'
  370. break
  371. case 2:
  372. this.dialog_testData = true
  373. this.report_from.titName = '提测确认'
  374. this.report_from.statusString = '打回'
  375. break
  376. case 3:
  377. reportdelivertestGetReportById(data.id).then(res => {
  378. if (res.code === 200) {
  379. const data = res.data
  380. reportdelivertestCheckStatus(data.taskIds).then(response => {
  381. if (response.code === 200) {
  382. if (response.data) {
  383. this.checklistStopVisible = true
  384. this.firstChecklistTaskId = response.data
  385. this.goDataReport = data
  386. return
  387. }
  388. this.dialogVisible1 = true
  389. this.$nextTick(() => {
  390. this.$refs.TestReport.init(4, data)
  391. })
  392. }
  393. })
  394. }
  395. })
  396. break
  397. case 4:
  398. this.dialog_testData = true
  399. this.report_from.titName = '删除确认'
  400. this.report_from.statusString = '删除'
  401. break
  402. case 5:
  403. this.dialogVisible1 = true
  404. this.$nextTick(() => {
  405. this.$refs.TestReport.init(3, data)
  406. })
  407. break
  408. case 6:
  409. this.dialogVisible1 = true
  410. this.$nextTick(() => {
  411. this.$refs.TestReport.init(2, data)
  412. })
  413. break
  414. }
  415. },
  416. // 获取任务数据
  417. async getQueryData() { // 获取任务数据
  418. this.centerDialogVisible = true
  419. this.$set(this.queryData, 'code', '')
  420. this.getTaskList()
  421. },
  422. // 远程搜索任务
  423. async getTaskList(val) {
  424. const params = {
  425. bizId: this.bizId
  426. }
  427. if (val) { params.name = val }
  428. const res = await taskListCreate(params)
  429. if (res.code === 200) {
  430. this.restaurants = res.data || []
  431. }
  432. },
  433. debounceQuery: _.debounce(function() {
  434. this.getTaskList(...arguments)
  435. }, 500),
  436. async createPresentation(vel) {
  437. if (vel !== '') {
  438. if (this.title === '测试日报') {
  439. const res = await dailyReportCheckStatus([vel])
  440. if (res.code === 200) {
  441. this.centerDialogVisible = false
  442. this.dialogDaily = true
  443. this.$nextTick(() => {
  444. this.$refs.DailyReport.init(7, [vel])
  445. })
  446. } else {
  447. this.centerDialogVisible = true
  448. }
  449. }
  450. if (this.title === '准出报告') {
  451. const res = await reportreleaseCheckStatus([vel])
  452. if (res.code === 200) {
  453. this.centerDialogVisible = false
  454. this.dialogClient = true
  455. this.$nextTick(() => {
  456. this.$refs.ClientReport.init(7, [vel])
  457. })
  458. } else {
  459. this.centerDialogVisible = true
  460. }
  461. }
  462. if (this.title === '提测报告') {
  463. const res = await reportdelivertestCheckStatus([vel])
  464. if (res.code === 200) {
  465. this.centerDialogVisible = false
  466. if (res.data) {
  467. this.checklistStopVisible = true
  468. this.firstChecklistTaskId = res.data
  469. this.goDataReport = vel
  470. return
  471. }
  472. this.dialogVisible1 = true
  473. this.$nextTick(() => {
  474. this.$refs.TestReport.init(7, [vel])
  475. })
  476. } else {
  477. this.centerDialogVisible = true
  478. }
  479. }
  480. } else {
  481. this.$message({ message: '提示,请选择要添加的任务ID', type: 'warning' })
  482. }
  483. },
  484. createFilter(queryString) {
  485. return (restaurant) => {
  486. return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
  487. }
  488. },
  489. // 日报/准出/提测
  490. toReportView(ele) {
  491. const bizId_id = EncryptId(`${this.bizId}_${ele.id}`)
  492. switch (this.title) {
  493. case '测试日报':
  494. this.$router.push({ name: '日报详情', query: { bizId_id: bizId_id }})
  495. break
  496. case '准出报告':
  497. this.$router.push({ name: '准出详情', query: { bizId_id: bizId_id }})
  498. break
  499. case '提测报告':
  500. this.$router.push({ name: '提测详情', query: { bizId_id: bizId_id }})
  501. break
  502. }
  503. },
  504. async gethistoryData(e) { // 查看所有老日报列表
  505. this.loading = true
  506. this.history = false
  507. const indexPage = { bizId: this.bizId, pageSize: this.pageSize, curIndex: this.curIndex }
  508. e ? indexPage.reportName = this.state : ''
  509. if (this.title === '测试日报') {
  510. const res = await dailyReportList(indexPage)
  511. if (res.code === 200) {
  512. this.tableData = res.data
  513. this.total = res.total
  514. }
  515. }
  516. if (this.title === '准出报告') {
  517. const res = await projectTestReportList(indexPage)
  518. if (res.code === 200) {
  519. this.tableData = res.data
  520. this.total = res.total
  521. }
  522. }
  523. if (this.title === '提测报告') {
  524. const data = { bizId: this.bizId, pageSize: this.pageSize, curIndex: this.curIndex }
  525. e ? data.name = this.state : ''
  526. const res = await launchTestList(data)
  527. if (res.code === 200) {
  528. this.tableData = res.data
  529. this.total = res.total
  530. }
  531. }
  532. this.loading = false
  533. },
  534. OldDaily(val) {
  535. this.reportDaily = true
  536. if (this.title === '测试日报') {
  537. this.testPresenyL = true
  538. this.message = val
  539. }
  540. if (this.title === '准出报告') {
  541. this.ResultPageyL = true
  542. this.message = val
  543. }
  544. if (this.title === '提测报告') {
  545. this.acceptTheReport = true
  546. this.message = val
  547. }
  548. },
  549. endDialog() { // 结束对话框
  550. this.dialog_testData = false
  551. this.$message({ type: 'warning', message: '已取消' })
  552. },
  553. handleSizeChange(size) { // 分页
  554. this.pageSize = size
  555. this.getList()
  556. },
  557. handleCurrentChange(curIndex) { // 分页
  558. this.curIndex = curIndex
  559. this.getList()
  560. },
  561. handleSizeChange1(size) { // used 分页
  562. this.pageSize = size
  563. this.gethistoryData()
  564. },
  565. handleCurrentChange1(curIndex) { // used 分页
  566. this.curIndex = curIndex
  567. this.gethistoryData()
  568. },
  569. checklistConfirm() {
  570. this.checklistStopVisible = false
  571. const { bizId = null } = this.$store.state.global || {}
  572. const bizId_id = EncryptId(`${bizId}_${this.firstChecklistTaskId}`)
  573. const newTab = this.$router.resolve({ name: '任务详情', query: { bizId_id: bizId_id, page: 6 }})
  574. window.open(newTab.href, '_blank')
  575. },
  576. checklistCancel() {
  577. this.checklistStopVisible = false
  578. this.dialogVisible1 = true
  579. if (this.goDataReport.taskIds) {
  580. this.$nextTick(() => {
  581. this.$refs.TestReport.init(4, this.goDataReport)
  582. })
  583. } else {
  584. this.$nextTick(() => {
  585. this.$refs.TestReport.init(7, [this.goDataReport])
  586. })
  587. }
  588. }
  589. }
  590. }
  591. </script>
  592. <style lang="scss" scoped>
  593. .breakText1 {
  594. word-break: break-all;
  595. overflow: hidden;
  596. text-overflow: ellipsis;
  597. white-space: nowrap;
  598. }
  599. .eleStyle {
  600. width: 100%;
  601. height:100%;
  602. background:#F2F3F6;
  603. display: inline-block;
  604. }
  605. .header_sty {
  606. font-size: 14px;
  607. background:#ffffff;
  608. margin: 0 10px 10px;
  609. border-radius: 4px;
  610. overflow: hidden;
  611. }
  612. .distance {
  613. margin-bottom: 20px;
  614. }
  615. .report-Layout {
  616. min-height: calc(100vh - 164px)
  617. }
  618. .tips-report {
  619. font-size: 12px;
  620. color: #E6A23C;
  621. margin-top: 10px;
  622. }
  623. .belong-task {
  624. max-width: 500px;
  625. display: flex;
  626. .modules-name {
  627. width: calc(100% - 100px);
  628. overflow: hidden;
  629. text-overflow: ellipsis;
  630. white-space: nowrap;
  631. }
  632. .modules {
  633. color: #999999;
  634. }
  635. .task-id {
  636. color: #999999;
  637. width: 80px;
  638. margin-right: 20px;
  639. }
  640. .name {
  641. color: #333333;
  642. margin-right: 20px;
  643. }
  644. }
  645. .passStatus1 {
  646. color:red;
  647. }
  648. </style>
  649. <style lang="stylus">
  650. .el-tabs__nav-wrap::after {
  651. background-color: #FFF !important;
  652. }
  653. </style>