taskViewDetails.vue 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239
  1. <template>
  2. <div>
  3. <div class="bgbugTa" style="background-color:#F2F3F6;display:flex;align-items: center;justify-content: center;">
  4. <el-container>
  5. <div v-if="isHeadShow" style="width:98%;margin:1% auto 0 auto;height:53px;background:rgba(255,255,255,1);border-radius:7px;color:#F56C6C;font-size:16px;display: flex;align-items: center;">
  6. <i class="el-icon-warning-outline" style="margin-left: 20px;" />
  7. <span style="margin-left: 4px;">请将排期事件里的排期填写完整,否则无法判断任务健康状态,健康状态会显示未知。</span>
  8. </div>
  9. <el-header class="bgborder bgborderButton" style=" margin: 1%; min-height:60px;display: flex; justify-content: space-between; align-items: center;">
  10. <div style="float: left;display: flex; justify-content: space-between; align-items: center;">
  11. <span :style="{ background: bgStyle, color:colorStyle } " class="timeStyle">
  12. {{ task_form.stageString }}
  13. <br>
  14. {{ task_form.lateMsg }}
  15. </span>
  16. <el-tooltip :disabled="task_form.name && task_form.name.length < 19 ? true : false" class="item" effect="dark" :content="task_form.name" placement="bottom">
  17. <span style="font-size:20px;font-family:MicrosoftYaHei;color:rgba(51,51,51,1);">任务 : {{ task_form.name | ellipsis }}</span>
  18. </el-tooltip>
  19. <el-dropdown trigger="click" placement="bottom" @command="handleCommand">
  20. <el-button size="mini" style="cursor: pointer;margin-left:15px">
  21. {{ task_form.statusString }}
  22. <i class="el-icon-arrow-down el-icon--right" />
  23. </el-button>
  24. <el-dropdown-menu slot="dropdown" align="center">
  25. <el-dropdown-item
  26. v-for="item in taskStatus"
  27. :key="item.value"
  28. :command="{value:item.code,label:item.msg}"
  29. :disabled="task_form.statusString === item.msg? true: false"
  30. >{{ item.msg }}</el-dropdown-item>
  31. </el-dropdown-menu>
  32. </el-dropdown>
  33. </div>
  34. <span style="float: right;">
  35. <el-button size="mini" @click="centerDialogVisible_task = true">删除任务</el-button>
  36. <el-dropdown trigger="click" placement="bottom" style="margin-left: 10px;">
  37. <el-button size="mini" type="primary">
  38. 新建
  39. <i class="el-icon-arrow-down el-icon--right" />
  40. </el-button>
  41. <el-dropdown-menu slot="dropdown">
  42. <el-dropdown-item @click.native="createReport(4, task_form)">新建Bug</el-dropdown-item>
  43. <el-dropdown-item @click.native="createReport(1, task_form)">新建提测报告</el-dropdown-item>
  44. <el-dropdown-item @click.native="createReport(2, task_form)">新建测试报告</el-dropdown-item>
  45. <el-dropdown-item @click.native="createReport(3, task_form)">新建准出报告</el-dropdown-item>
  46. </el-dropdown-menu>
  47. </el-dropdown>
  48. </span>
  49. </el-header>
  50. <el-container>
  51. <el-aside class="bgborder" style="overflow: hidden; margin:0 1%;minWidth: 55%;">
  52. <div style="display:flex;align-items: center;margin-bottom:20px;margin: 20px 0 50px 20px;">
  53. <div style="width:4px;height:17px;background:#409EFF;border-radius:1px;" />
  54. <div style="width:83px;height:20px;font-size:16px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px">数据统计</div>
  55. </div>
  56. <div style="display: flex; justify-content: space-between; align-items: center;">
  57. <span style="text-align: center; margin-left: 8%; border-right:1px solid #BBBBBB; padding-right: 8%;">
  58. <p style="width: 70px;">bug数量</p>
  59. <p style="font-size: 70px;">{{ totalCount }}</p>
  60. <p v-show="fixInFutureCount <= 0? false: true">
  61. <span style="color: #F56C6C; width: 100px;">以后修复{{ fixInFutureCount }}个</span>
  62. </p>
  63. </span>
  64. <div id="div1" style="width:100%;height:300px;margin-bottom: 3%;" />
  65. </div>
  66. </el-aside>
  67. <el-container>
  68. <el-main class="bgborder form_e special-button" style="overflow: hidden;margin: 0 2.1% 0 0;min-height: 50vh;">
  69. <div style="display:flex;align-items: center;margin-bottom:20px;margin: 20px 0 0 20px;">
  70. <div style="width:4px;height:17px;background:#409EFF;border-radius:1px;" />
  71. <div style="width:83px;height:20px;font-size:16px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px">基础信息</div>
  72. </div>
  73. <el-form label-position="left" label-width="150px" style="margin: 0 4%;font-size: 14px;color: rgb(102, 102, 102);" :model="task_form">
  74. <div style="text-align: right;">
  75. <el-button size="mini" @click="open_created(task_form.describe)">修改</el-button>
  76. </div>
  77. <el-row :gutter="20">
  78. <el-col :span="19">
  79. <el-form-item label="所属项目:" style="word-break: break-all;">
  80. <span v-show="task_form.projectName !== '无归属项目'" style="color: #409EFF;cursor: pointer;" @click="devUrl_tow(1, task_form.projectId)">{{ task_form.projectName }}</span>
  81. <span v-show="task_form.projectName === '无归属项目'">{{ task_form.projectName }}</span>
  82. </el-form-item>
  83. </el-col>
  84. </el-row>
  85. <el-form-item label="所属需求:" label-width="150px">
  86. <span v-show="task_form.requireName !== '无归属需求'" style="color: #409EFF;cursor: pointer;" @click="devUrl_tow(3, task_form.requireId)">{{ task_form.requireName }}</span>
  87. <span v-show="task_form.requireName === '无归属需求'">{{ task_form.requireName }}</span>
  88. </el-form-item>
  89. <el-form-item label="模块:">{{ task_form.moduleInfoName }}</el-form-item>
  90. <el-form-item label="是否免测:">{{ task_form.noTestString }}</el-form-item>
  91. <el-form-item label="开发负责人:">{{ task_form.rdObject === null? '' : task_form.rdObject.name }}</el-form-item>
  92. <el-form-item label="测试负责人:">{{ task_form.qaObject === null? '' : task_form.qaObject.name }}</el-form-item>
  93. <el-form-item label="涉及的客户端:">{{ task_form.involveAppString }}</el-form-item>
  94. <el-form-item label="技术文档:" style="word-break: break-all;">
  95. <span style="color: #409EFF;cursor: pointer;" @click="devUrl_tow(2, task_form.devUrl)">{{ task_form.devUrl }}</span>
  96. </el-form-item>
  97. </el-form>
  98. </el-main>
  99. </el-container>
  100. </el-container>
  101. <el-header class="bgborder" style="margin: 1%;height: auto; padding: 0;">
  102. <div style="display:flex;align-items: center;margin-bottom:20px;margin: 20px 0 20px 20px;">
  103. <div style="width:4px;height:17px;background:#409EFF;border-radius:1px;" />
  104. <div style="width:83px;height:20px;font-size:16px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px">排期事件</div>
  105. </div>
  106. <div style="margin: 2% 20px; display: flex; align-items: center; justify-content: space-between;">
  107. <el-button size="mini" type="primary" plain icon="el-icon-plus" @click="add_Event">添加事件</el-button>
  108. <el-radio-group v-model="radio" size="mini" style="margin-left: 5%">
  109. <el-radio-button label="列表" @click.native="GanttChart(1)" />
  110. <el-radio-button label="甘特图" @click.native="GanttChart(2)" />
  111. </el-radio-group>
  112. </div>
  113. <div style=" margin: 0 20px; color: #333B4A;">
  114. <div v-show="Gantt" style="padding:0 46px">
  115. <gantt v-if="ganttData" :table-data="ganttData" string-type="事件" :versions="appVersion" />
  116. </div>
  117. <el-table v-show="table_show" :data="arr_event" style="width: 100%;" size="small" :header-cell-style="{ background: '#E9E9E9', color: '#333B4A' }" show-overflow-tooltip="true">
  118. <el-table-column label="事件类型" min-width="100" align="center">
  119. <template slot-scope="scope">{{ scope.row.name }}</template>
  120. </el-table-column>
  121. <el-table-column label="描述" min-width="200" align="center">
  122. <template slot-scope="scope">{{ scope.row.desc }}</template>
  123. </el-table-column>
  124. <el-table-column label="排期" min-width="200" align="center">
  125. <template slot-scope="scope">{{ scope.row.startTime | naspOut }} - {{ scope.row.endTime | naspOut }}</template>
  126. </el-table-column>
  127. <el-table-column label="人员" min-width="200" align="center">
  128. <template slot-scope="scope">
  129. <div v-for="item of scope.row.peopleObject" :key="item.idapId">{{ item.name }}</div>
  130. </template>
  131. </el-table-column>
  132. <el-table-column label="操作" min-width="200">
  133. <template slot-scope="scope">
  134. <el-button size="mini" type="primary" plain @click="event_query(scope.row.id)">编辑</el-button>
  135. <el-button v-if="scope.row.canDelete === 1? false : true" size="mini" type="primary" plain @click="event_delete(scope.row.id)">删除</el-button>
  136. </template>
  137. </el-table-column>
  138. </el-table>
  139. <div class="dateSet">排期汇总:{{ tiem_date.startTime | naspOut }} ~ {{ tiem_date.endTime | naspOut }}</div>
  140. <div class="dateSet" style=" display: flex; justify-content: start; align-items: center;">
  141. <div style="flex:1">实际提测时间:{{ task_form.launchTestRealTime | naspOut }}</div>
  142. <div style="flex:1">实际准出时间:{{ task_form.testFinishRealTime | naspOut }}</div>
  143. <div style="flex:1">实际上线完成时间:{{ task_form.onlineRealTime | naspOut }}</div>
  144. </div>
  145. <div class="dateSet">预计上线版本:{{ task_form.preOnlineVersion }}</div>
  146. </div>
  147. </el-header>
  148. <el-footer class="footer" style=" height: auto;">
  149. <span style="text-align: right; margin: 1% 0 -3% 0;float:right;">
  150. <el-button size="mini" type="primary" plain icon="el-icon-plus" @click="createReport(4, task_form)">提Bug</el-button>
  151. <el-dropdown>
  152. <el-button size="mini" type="primary" plain>
  153. 新建
  154. <i class="el-icon-arrow-down el-icon--right" />
  155. </el-button>
  156. <el-dropdown-menu slot="dropdown">
  157. <el-dropdown-item @click.native="createReport(1, task_form)">新建提测报告</el-dropdown-item>
  158. <el-dropdown-item @click.native="createReport(2, task_form)">新建测试报告</el-dropdown-item>
  159. <el-dropdown-item @click.native="createReport(3, task_form)">新建准出报告</el-dropdown-item>
  160. </el-dropdown-menu>
  161. </el-dropdown>
  162. </span>
  163. <el-tabs tab-position="top" @tab-click="click_launchTestInfoDOS">
  164. <el-tab-pane label="Bug" style="position: relative;">
  165. <div style="padding: 1.5% 0;font-family: MicrosoftYaHei;color: rgba(51,51,51,1);font-size: 14px;align-items: center;display: flex; justify-content: space-start; align-items: center;border-top: 1px solid #E9E9E9;">
  166. <span>快速筛选:</span>
  167. <span v-for="(item, code) of bugStatus" :key="code" class="status" @click="bug_list(item.code)">
  168. <span :class="[item.code === codeCache ? 'selected' :'']">{{ item.msg }}</span>
  169. </span>
  170. </div>
  171. <el-table size="mini" :data="bugBaseInfoDOList" min-height="200" style="width: 100%; font-size: 14px; color:rgba(102,102,102,1);" show-overflow-tooltip="true" :default-sort="{prop: 'priorityCode'}" :header-cell-style="{ background: '#E9E9E9', color: '#333B4A', fontSize: '14px', fontWeight: '500',borderTop: '0.5px solid #EEF0F5'}">
  172. <el-table-column label="优先级" prop="priorityCode" sortable align="center">
  173. <template slot-scope="scope">
  174. <div class="div_priority" :style="{background: priorityColors[scope.row.priorityCode]}">{{ scope.row.priorityLevel | oneA }}</div>
  175. </template>
  176. </el-table-column>
  177. <el-table-column prop="bugName" label="缺陷标题" min-width="180" align="left" show-overflow-tooltip>
  178. <template slot-scope="scope">
  179. <span style=" color: #A7AEBC; font-size; 12px;">{{ 'BUG-' + scope.row.id }}</span><br>
  180. <span class="bugNameSty" @click.stop="click_bugName(scope.row.id)">{{ scope.row.bugName }}</span>
  181. </template>
  182. </el-table-column>
  183. <el-table-column prop="bizName" label="业务线" align="center" />
  184. <el-table-column prop="priorityName" label="缺陷等级" align="center" />
  185. <el-table-column prop="bugStatusName" label="状态" align="center">
  186. <template slot-scope="scope">
  187. <div :style="{color: statusColors[scope.row.status]}">{{ scope.row.bugStatusName }}</div>
  188. </template>
  189. </el-table-column>
  190. <el-table-column prop="creatorList" label="提报人" align="center" />
  191. <el-table-column prop="assignerList" label="责任人" align="center" />
  192. <el-table-column prop="currentHandlerList" label="修复人" align="center" />
  193. <el-table-column prop="gmtCreate" label="创建日期" align="center">
  194. <template slot-scope="scope">
  195. {{ scope.row.gmtCreate | naspOut }}
  196. </template>
  197. </el-table-column>
  198. </el-table>
  199. <div style="display:flex;align-items: center;justify-content: flex-end;">
  200. <el-pagination background :current-page="currentPage" :page-sizes="[15, 20, 25]" :page-size="15" layout="total, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
  201. </div>
  202. </el-tab-pane>
  203. <el-tab-pane label="提测报告">
  204. <el-table :data="launchTestInfoDOS" size="small" :header-cell-style="{ background: '#E9E9E9', color: '#333B4A' }" show-overflow-tooltip="true">
  205. <el-table-column label="标题名称" min-width="100" align="center">
  206. <template slot-scope="scope">
  207. <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 2)">{{ scope.row.name }}</a>
  208. </template>
  209. </el-table-column>
  210. <el-table-column label="状态" min-width="100" align="center">
  211. <template slot-scope="scope">{{ scope.row.statusString }}</template>
  212. </el-table-column>
  213. <el-table-column label="创建人" min-width="100" align="center">
  214. <template slot-scope="scope">{{ scope.row.createrObject.name }}</template>
  215. </el-table-column>
  216. <el-table-column label="创建日期" min-width="200" align="center">
  217. <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
  218. </el-table-column>
  219. <el-table-column label="操作" align="center" width="300">
  220. <template slot-scope="scope">
  221. <div>
  222. <el-button size="mini" type="primary" plain @click="pass(1,scope.row.id)">通过</el-button>
  223. <el-button size="mini" type="danger" plain @click="back(2,scope.row.id)">打回</el-button>
  224. <el-dialog title="打回原因" :visible.sync="dialog_launchTestInfoDOS" width="30%" :close-on-click-modal="false">
  225. <el-input v-model="CallBackTheReason" type="textarea" :rows="3" />
  226. <span slot="footer" class="dialog-footer">
  227. <el-button type="primary" size="mini" @click="passOrBackSend()">确 定</el-button>
  228. <el-button type="danger" size="mini" @click="dialog_launchTestInfoDOS = false">取 消</el-button>
  229. </span>
  230. </el-dialog>
  231. </div>
  232. </template>
  233. </el-table-column>
  234. </el-table>
  235. <div align="right">
  236. <el-pagination background :current-page="currentPage" :page-sizes="[15, 20, 25]" :page-size="15" layout="total, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
  237. </div>
  238. </el-tab-pane>
  239. <el-tab-pane label="测试报告">
  240. <el-table :data="dailyTestReports" size="small" :header-cell-style="{ background: '#E9E9E9', color: '#333B4A' }" show-overflow-tooltip="true">
  241. <el-table-column label="标题名称" min-width="100" align="center">
  242. <template slot-scope="scope">
  243. <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 0)">{{ scope.row.reportName }}</a>
  244. </template>
  245. </el-table-column>
  246. <el-table-column label="状态" min-width="100" align="center">
  247. <template slot-scope="scope">{{ scope.row.statusString }}</template>
  248. </el-table-column>
  249. <el-table-column label="创建人" min-width="100" align="center">
  250. <template slot-scope="scope">{{ scope.row.createrObject.name }}</template>
  251. </el-table-column>
  252. <el-table-column label="创建日期" min-width="100" align="center">
  253. <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
  254. </el-table-column>
  255. </el-table>
  256. <div align="right">
  257. <el-pagination background :current-page="currentPage" :page-sizes="[15, 20, 25]" :page-size="15" layout="total, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
  258. </div>
  259. </el-tab-pane>
  260. <el-tab-pane label="准出报告">
  261. <el-table :data="projectTestReportDOS" size="small" :header-cell-style="{ background: '#E9E9E9', color: '#333B4A' }" show-overflow-tooltip="true">
  262. <el-table-column label="标题名称" min-width="100" align="center">
  263. <template slot-scope="scope">
  264. <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 1)">{{ scope.row.reportName }}</a>
  265. </template>
  266. </el-table-column>
  267. <el-table-column label="状态" min-width="100" align="center">
  268. <template slot-scope="scope">{{ scope.row.reportStatusString }}</template>
  269. </el-table-column>
  270. <el-table-column label="创建人" min-width="100" align="center">
  271. <template slot-scope="scope">{{ scope.row.createrObject.name }}</template>
  272. </el-table-column>
  273. <el-table-column label="创建日期" min-width="100" align="center">
  274. <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
  275. </el-table-column>
  276. </el-table>
  277. <div align="right">
  278. <el-pagination background :current-page="currentPage" :page-sizes="[15]" :page-size="15" layout="total, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
  279. </div>
  280. </el-tab-pane>
  281. <el-tab-pane label="评论">
  282. <p v-show="commentShow" style="color:#9B9B9B">还没有评论,快来评论吧!</p>
  283. <div v-for="(item, value) of commentTxt" :key="value" class="animated bounceInRight">
  284. <span style="color: #333B4A; font-size:14px;margin-left:1%;">{{ item.commentInfo.name }}</span>
  285. <span style="color: #9B9B9B; font-size:12px;margin-left:1%;">{{ item.commentInfo.gmtCreater }}</span>
  286. <p style="color: #333B4A; font-size:14px;margin-left:2%;">{{ item.commentInfo.content }}</p>
  287. </div>
  288. <el-input v-model="content" rows="6" type="textarea" placeholder="请输入评论内容..." show-word-limit />
  289. <p style="text-align: right;">
  290. <el-button size="small" type="primary" @click="comment(content)">发表评论</el-button>
  291. </p>
  292. </el-tab-pane>
  293. </el-tabs>
  294. </el-footer>
  295. </el-container>
  296. <el-dialog :visible.sync="centerDialogVisible" width="30%" center :close-on-click-modal="false">
  297. <div align="center">确定要删除此项目吗?</div>
  298. <span slot="footer" class="dialog-footer">
  299. <el-button @click="centerDialogVisible = false">取 消</el-button>
  300. <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
  301. </span>
  302. </el-dialog>
  303. <el-dialog :visible.sync="dialogFormVisible" :close-on-click-modal="false">
  304. <div style="margin: 0% 7% 3% 2%; font-size: 18px; white-space: nowrap;color:rgba(51,59,74,1);">
  305. <b style="color: #409EFF;margin: 0 0.5%;font-weight: 600; ">|</b>{{ even }}
  306. </div>
  307. <el-form ref="form" :model="form" :rules="form_rules" label-width="100px">
  308. <el-form-item label="事件类型" prop="type">
  309. <el-select v-show="even === '新建事件'" v-model="form.type" :loading="loading" clearable placeholder="请选择" style="width: 100%">
  310. <el-option v-for="item in taskScheduleEvent" :key="item.code" :label="item.msg" :value="item.code" />
  311. </el-select>
  312. <el-input v-show="even === '编辑事件'" v-model="form.name" :disabled="fal_se" />
  313. </el-form-item>
  314. <el-form-item label="事件描述">
  315. <el-input v-model="form.desc" autocomplete="off" placeholder="请输入描述信息" />
  316. </el-form-item>
  317. <el-form-item label="排期" prop="date_start">
  318. <el-date-picker v-model="form.date_start" type="daterange" range-separator="~" start-placeholder="请选择开始日期" end-placeholder="请选择结束日期" />
  319. <el-checkbox v-model="form.noHoliday" style="margin-left: 10px;">排除周末</el-checkbox>
  320. </el-form-item>
  321. <el-form-item label="参与人员">
  322. <el-select v-model="form.peoples" multiple filterable remote reserve-keyword placeholder="请输入姓名或者邮箱前缀" :remote-method="remoteMethod" :loading="loading" style="width: 100%">
  323. <el-option v-for="item in options" :key="item.idap" :label="item.name" :value="test2(item, 0)">
  324. <div style="display: flex;justify-content: start;">
  325. <div style="min-width:100px;color: #8492a6; font-size: 13px; overflow:hidden">{{ item.deptName }}</div>
  326. <div style="min-width:80px">{{ item.name }}</div>
  327. <div style="min-width:100px;color: #8492a6; font-size: 13px; overflow:hidden">{{ item.idap }}</div>
  328. </div>
  329. </el-option>
  330. </el-select>
  331. </el-form-item>
  332. </el-form>
  333. <div slot="footer" class="dialog-footer">
  334. <el-button @click="dialogFormVisible = false">取 消</el-button>
  335. <el-button type="primary" @click="even === '新建事件'? event_created(form):event_update(form)">确 定</el-button>
  336. </div>
  337. </el-dialog>
  338. <el-dialog :visible.sync="centerDialogVisible_status" width="30%" center :close-on-click-modal="false">
  339. <div align="center" style="margin-bottom: 8%; font-weight: 600;">状态变更:已上线</div>
  340. <div style=" margin: 2% 3%; display: flex; justify-content: space-between; align-items: center; white-space:nowrap;">
  341. <span>实际上线时间:</span>
  342. <el-date-picker v-model="NewDate" type="date" style="width:100%;" placeholder="选择日期" format="yyyy 年 MM 月 dd 日" />
  343. </div>
  344. <span slot="footer" class="dialog-footer">
  345. <el-button size="mini" @click="centerDialogVisible_status = false">关 闭</el-button>
  346. <el-button size="mini" type="primary" @click="task_status_uptate(NewDate)">确 定</el-button>
  347. </span>
  348. </el-dialog>
  349. <!-- 删除 -->
  350. <el-dialog
  351. :visible.sync="centerDialogVisible_task"
  352. width="30%"
  353. center
  354. :close-on-click-modal="false"
  355. title="提示"
  356. top="35vh"
  357. >
  358. <div align="center">
  359. 确定要删除<span style="color:red;">{{ task_form.name }}</span> 的任务吗?
  360. </div>
  361. <span slot="footer" class="dialog-footer">
  362. <el-button @click="centerDialogVisible_task = false">关 闭</el-button>
  363. <el-button type="primary" @click="task_delete(task_form.id )">确 定</el-button>
  364. </span>
  365. </el-dialog>
  366. <!-- 弹窗 -->
  367. <openDialog v-if="dialog_open" ref="task_createdUpdata" />
  368. <createdBug v-if="modalShow" ref="createdBug" @reloadList="bug_list(codeCache)" />
  369. <TestReport v-if="dialogVisible1" ref="TestReport" />
  370. <DailyReport v-if="dialogDaily" ref="DailyReport" />
  371. <ClientReport v-if="dialogClient" ref="ClientReport" />
  372. </div>
  373. <el-drawer :visible.sync="drawerShow" :modal="false" :with-header="false" size="50%" class="bug_manage_drawer" @click.stop>
  374. <div @click.stop>
  375. <bug-details :id="bugId + ''" ref="bugDetails" :init-count="initCount + ''" :type="'drawer'" @close="drawerShow = false" @delete="drawerShow = false;bug_list(codeCache)" @update="bug_list(codeCache)" />
  376. </div>
  377. </el-drawer>
  378. </div>
  379. </template>
  380. <script>
  381. import BugDetails from '@/views/projectManage/bugList/details/index.vue'
  382. import {
  383. taskGet,
  384. memberQueryMemberInfoByIDAPorName,
  385. bugGetBugStatusMapInfo,
  386. configShowTaskEnum,
  387. ScheduleCreate,
  388. tasktaskDelete,
  389. taskUpdate,
  390. ScheduleUpdate,
  391. commentCreate,
  392. commentList,
  393. deleteEvent,
  394. projectTestReport,
  395. dailyReport,
  396. launchTest
  397. } from '@/api/taskIndex' // ajax
  398. import openDialog from '@/views/projectManage/dialog_vue'
  399. import Utils from '../../../util.js'
  400. import { launchTestUpdate } from '@/api/projectPage.js'
  401. import { bugList, bugGetEnum } from '@/api/defectManage'
  402. import echarts from 'echarts'
  403. import dayjs from 'dayjs'
  404. import { releaseScheduleList } from '@/api/teamBench'
  405. import Gantt from '@/views/gantta/gantta'
  406. import createdBug from '@/views/projectManage/bugList/file/createdBug' // bug缺陷
  407. import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
  408. import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
  409. import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
  410. export default {
  411. components: {
  412. openDialog,
  413. Gantt,
  414. createdBug,
  415. TestReport,
  416. BugDetails,
  417. DailyReport,
  418. ClientReport
  419. },
  420. filters: {
  421. ellipsis(value) {
  422. if (!value) return ''
  423. if (value.length > 20) {
  424. return value.slice(0, 20) + '...'
  425. }
  426. return value
  427. },
  428. oneA(value) {
  429. if (!value) return ''
  430. var da = value.substring(0, 1)
  431. return da
  432. },
  433. naspOut(value) {
  434. if (!value) return ''
  435. var da = value.split(/\s+/)
  436. return da[0]
  437. }
  438. },
  439. data() {
  440. return {
  441. codeCache: null,
  442. bugId: 0,
  443. initCount: 0,
  444. drawerShow: false,
  445. dialog_open: false,
  446. priorityColors: ['#F56C6C', '#FF8952', '#7ED321'],
  447. statusColors: ['#6AB4FF', '#6AB4FF', '#FFCC66', '#7ED321', '#F56C6C'],
  448. curIndex: 1,
  449. pageSize: 15,
  450. task_form: {
  451. statusString: '未开始',
  452. describe: '',
  453. qaObject: {
  454. name: ''
  455. },
  456. rdObject: {
  457. name: ''
  458. }
  459. },
  460. dialogVisible1: false, // 提测弹窗
  461. isHeadShow: false,
  462. radio: '列表',
  463. modalShow: false, // 弹窗(新建)
  464. CallBackTheReason: '', // 打回原因
  465. NewDate: new Date(),
  466. content: '', // 评论
  467. // comment_content: '', // 评论内容
  468. commentTxt: [],
  469. commentShow: true, // 评论为空默认显示
  470. dialog_launchTestInfoDOS: false, // 打回弹窗
  471. centerDialogVisible_status: false, // status
  472. currentPage: 0,
  473. tiem_date: { // 排期汇总
  474. startTime: '',
  475. endTime: ''
  476. },
  477. userInformation: localStorage.getItem('username'),
  478. userNames: localStorage.getItem('realname'),
  479. form_rules: {
  480. type: [{ required: true, message: '事件类型不能为空', trigger: 'blur' }],
  481. date_start: [{ required: true, message: '排期不能为空', trigger: 'blur' }]
  482. },
  483. fal_se: true,
  484. arr_event: [], // 事件table
  485. options: [], // 人员信息
  486. bugBaseInfoDOList: [], // bug
  487. launchTestInfoDOS: [], // 提测
  488. dailyTestReports: [], // 测试
  489. projectTestReportDOS: [], // 准出
  490. loading: false,
  491. table_show: true, // 表格(显示)
  492. Gantt: false, // 甘特图(显示)
  493. taskScheduleEvent: [], // 事件类型
  494. total: 0,
  495. show2: true,
  496. describe: false,
  497. describe1: false,
  498. dialogFormVisible: false,
  499. centerDialogVisible: false,
  500. centerDialogVisible_task: false, // 任务dialog
  501. options1: [],
  502. pauseName: '', // gantta
  503. ganttData: null,
  504. colorSty: '#6AB4FF',
  505. appVersion: {},
  506. even: '', // 添加事件
  507. form: {
  508. name: '',
  509. region: '',
  510. date1: '',
  511. date2: '',
  512. delivery: false,
  513. type: [],
  514. resource: '',
  515. desc: ''
  516. },
  517. tasktId: '',
  518. echarts_name: [], // echarts_name
  519. echarts_value: [], // echats_value
  520. fixInFutureCount: '', // 已延期
  521. totalCount: '', // bug总数
  522. bugStatus: [],
  523. test: {},
  524. taskStatus: [],
  525. CallBackStatus: '',
  526. CallBackId: '',
  527. bgStyle: '',
  528. colorStyle: '',
  529. dialogDaily: false,
  530. dialogClient: false
  531. }
  532. },
  533. computed: {
  534. clickCount() {
  535. return this.$store.state.app.clickCount
  536. }
  537. },
  538. watch: {
  539. clickCount(newVal, oldVal) {
  540. this.drawerShow = false
  541. }
  542. },
  543. created() {
  544. this.get_list()
  545. this.$store.state.data.status = true
  546. this.$store.state.data.bizId = true
  547. },
  548. mounted() {
  549. this.get_echarts()
  550. },
  551. destroyed() {
  552. this.$store.state.data.status = false
  553. this.$store.state.data.bizId = false
  554. },
  555. methods: {
  556. click_launchTestInfoDOS(e) {
  557. var url = window.location.href // 获取url中"?"符后的字
  558. this.taskId = url.split('?id=')
  559. switch (e.index) {
  560. case '1':
  561. launchTest({ taskId: this.taskId[1], curIndex: this.curIndex, pageSize: this.pageSize }).then(res => {
  562. this.launchTestInfoDOS = res.data.list // 准出
  563. this.total = res.data.total
  564. })
  565. break
  566. case '2':
  567. dailyReport({ taskId: this.taskId[1], curIndex: this.curIndex, pageSize: this.pageSize }).then(res => {
  568. this.dailyTestReports = res.data.list
  569. this.total = res.data.total
  570. })
  571. break
  572. case '3':
  573. projectTestReport({ taskId: this.taskId[1], curIndex: this.curIndex, pageSize: this.pageSize }).then(res => {
  574. this.projectTestReportDOS = res.data.list
  575. this.total = res.data.total
  576. })
  577. break
  578. }
  579. },
  580. toReportView(ele, index) {
  581. switch (index) {
  582. case 0:
  583. this.dialogDaily = true
  584. this.$nextTick(() => {
  585. this.$refs.DailyReport.init(3, ele)
  586. })
  587. break
  588. case 1:
  589. this.dialogClient = true
  590. this.$nextTick(() => {
  591. this.$refs.ClientReport.init(3, ele)
  592. })
  593. break
  594. case 2:
  595. this.dialogVisible1 = true
  596. this.$nextTick(() => {
  597. this.$refs.TestReport.init(3, ele)
  598. })
  599. break
  600. }
  601. },
  602. click_bugName(id) {
  603. this.bugId = id
  604. this.initCount++
  605. this.drawerShow = true
  606. },
  607. test2(item, e) {
  608. // 获取团队人员信息
  609. if (typeof this.test[item.idap] === 'undefined') {
  610. item.role = e
  611. this.test[item.idap] = item
  612. }
  613. return item.idap
  614. },
  615. get_list() {
  616. var url = window.location.href // 获取url中"?"符后的字
  617. this.taskId = url.split('?id=')
  618. configShowTaskEnum().then(res => {
  619. this.taskScheduleEvent = res.data.taskScheduleEvent
  620. this.taskStatus = res.data.taskStatus
  621. this.bugStatus = res.data.bugStatus
  622. this.bugStatus.unshift({ code: -1, msg: '全部' })
  623. })
  624. taskGet(this.taskId[1]).then(res => {
  625. if (res.code === 200) {
  626. if (res.data.bizId !== Number(localStorage.getItem('bizId'))) {
  627. Utils.$emit('demo', res.data.bizId)
  628. }
  629. this.pauseName = res.data.involveAppString === null ? '' : res.data.involveAppString
  630. this.task_form = res.data
  631. this.total = res.total
  632. this.tiem_date.startTime = res.data.scheduleListResponse.startTime // 开始时间
  633. this.tiem_date.endTime = res.data.scheduleListResponse.endTime // 结束时间
  634. this.arr_event = res.data.scheduleListResponse.schedulDetailResponseList
  635. this.table_loading = false
  636. this.bug_list(-1)
  637. this.task_form.bugBaseInfoDOList !== null ? (this.bugBaseInfoDOList = res.date.bugBaseInfoDOList) : (this.bugBaseInfoDOList = []) // bug
  638. const param = {
  639. appType: Number(res.data.involveApp),
  640. startTime: res.data.scheduleListResponse.startTime,
  641. endTime: res.data.scheduleListResponse.endTime
  642. }
  643. this.ganttData = this.tableDeal(
  644. res.data.scheduleListResponse.schedulDetailResponseList
  645. )
  646. releaseScheduleList(param).then(res => {
  647. if (res.code === 200) {
  648. this.appVersion = this.versionDeal(res.data)
  649. }
  650. })
  651. if (this.task_form.stageString === '未知') {
  652. this.bgStyle = '#f4f4f5'
  653. this.colorStyle = '#909399'
  654. this.isHeadShow = true
  655. }
  656. this.task_form.stageString === '正常' ? this.bgStyle = '#69B3FF' : ''
  657. this.task_form.stageString === '延期' ? this.bgStyle = '#FF8952' : ''
  658. this.task_form.stageString === '已延期' ? this.bgStyle = '#F56C6C' : ''
  659. } else {
  660. this.$message({ message: res.msg, type: 'error', offset: 150 })
  661. }
  662. })
  663. commentList({ type: 3, joinId: this.taskId[1] }).then(res => {
  664. this.commentTxt = res.data
  665. this.commentTxt !== '' ? (this.commentShow = false) : (this.commentShow = true)
  666. })
  667. },
  668. tableDeal(arr) {
  669. if (arr === null) {
  670. arr = null
  671. } else {
  672. return arr.map(eachData => ({
  673. task: { description: eachData.name || '' },
  674. schedules: [
  675. {
  676. taskName: eachData.name || '', event: eachData.desc,
  677. schedule: dayjs(eachData.startTime).format('YYYY.MM.DD') + ' - ' + dayjs(eachData.endTime).format('YYYY.MM.DD'),
  678. startDate: dayjs(eachData.startTime).format('YYYY-MM-DD'),
  679. length: (dayjs(eachData.endTime) - dayjs(eachData.startTime)) / 86400000 + 1,
  680. owners: eachData.peopleObject === null ? [] : eachData.peopleObject.map(eachMember => eachMember.name),
  681. taskId: eachData.taskId
  682. }
  683. ]
  684. }))
  685. }
  686. },
  687. versionDeal(arr) {
  688. arr === null ? arr = 0 : ''
  689. const result = {}
  690. for (let i = 0; i < arr.length; i++) {
  691. let pauseTime = dayjs(arr[i].startTime).format('YYYY-MM-DD')
  692. while (pauseTime <= dayjs(arr[i].endTime).format('YYYY-MM-DD')) {
  693. if (this.pauseName !== null && this.pauseName !== '') {
  694. result[pauseTime] = this.pauseName + arr[i].version + arr[i].name
  695. } else {
  696. result[pauseTime] = ''
  697. }
  698. // result[pauseTime] = (this.pauseName || '') + arr[i].version + arr[i].name
  699. pauseTime = dayjs(pauseTime).add(1, 'day').format('YYYY-MM-DD')
  700. }
  701. }
  702. return result
  703. },
  704. open_created(e) {
  705. // 打开弹窗
  706. var url = window.location.href // 获取url中"?"符后的字串
  707. this.taskId = url.split('?id=')
  708. this.dialog_open = true
  709. this.$nextTick(() => {
  710. this.$refs.task_createdUpdata.init(3, this.taskId)
  711. })
  712. },
  713. get_echarts() {
  714. bugGetBugStatusMapInfo({ taskId: this.taskId[1] }).then(res => {
  715. this.fixInFutureCount = res.data.fixInFutureCount
  716. this.totalCount = res.data.totalCount
  717. res.data.statusInfoList.map(item => {
  718. this.echarts_name.push(item.statusString)
  719. this.echarts_value.push(item.count)
  720. })
  721. })
  722. setTimeout(() => {
  723. var myChart = echarts.init(document.getElementById('div1'))
  724. myChart.setOption({
  725. tooltip: {
  726. trigger: 'axis',
  727. axisPointer: {
  728. type: 'shadow'
  729. }
  730. },
  731. xAxis: { type: 'category', data: this.echarts_name,
  732. axisTick: { alignWithLabel: true, show: false },
  733. axisLine: { show: true, lineStyle: { type: 'dashed' }}
  734. },
  735. yAxis: [
  736. {
  737. gridIndex: 0,
  738. axisTick: { show: false },
  739. axisLabel: { show: false },
  740. splitLine: { show: false },
  741. axisLine: { show: false }
  742. }
  743. ],
  744. series: [
  745. {
  746. data: this.echarts_value,
  747. barWidth: '60%',
  748. type: 'bar',
  749. itemStyle: { normal: { color: '#409EFF' }},
  750. label: {
  751. show: true,
  752. position: 'inside',
  753. formatter: function(params) {
  754. // 如果值大于0 正常显示,否则不显示
  755. if (params.value > 0) {
  756. return params.value
  757. } else {
  758. return ''
  759. }
  760. }
  761. }
  762. }
  763. ]
  764. })
  765. window.onresize = myChart.resize
  766. }, 500)
  767. },
  768. handleCommand(command) {
  769. if (command.label === '已上线') {
  770. this.centerDialogVisible_status = true
  771. return
  772. } else {
  773. this.task_form.statusString = command.label
  774. var taskInfoDO = this.task_form
  775. taskInfoDO.status = command.value
  776. var user = { name: this.userNames, ename: this.userInformation, id: '' }
  777. taskUpdate({ taskInfoDO, user }).then(res => {
  778. if (res.code === 200) {
  779. this.$message({ message: res.msg, type: 'success', offset: 150 })
  780. }
  781. })
  782. }
  783. },
  784. task_status_uptate(e) {
  785. this.task_form.statusString = '已上线'
  786. var resDate = e.getFullYear() + '-' + (e.getMonth() + 1) + '-' + e.getDate() + ' ' + e.getHours() + ':' + e.getMinutes() + ':' + e.getSeconds()
  787. var taskInfoDO = this.task_form
  788. taskInfoDO.status = 5
  789. taskInfoDO.onlineRealTime = resDate
  790. var user = { name: this.userNames, ename: this.userInformation, id: '' }
  791. taskUpdate({ taskInfoDO, user }).then(res => {
  792. this.centerDialogVisible_status = false
  793. if (res.code === 200) {
  794. this.centerDialogVisible_status = false
  795. }
  796. this.$message({ message: res.msg, type: 'success', offset: 150 })
  797. })
  798. },
  799. // 事件删除
  800. event_delete(id) {
  801. var user = { name: this.userNames, ename: this.userInformation, id: '' }
  802. deleteEvent(id, user).then(res => {
  803. if (res.code === 200) {
  804. this.get_list()
  805. this.$message({ message: res.msg, type: 'success', offset: 150 })
  806. } else {
  807. this.$message({ message: res.msg + '请联系开发人员', type: 'error', offset: 150 })
  808. }
  809. })
  810. },
  811. event_query(e) {
  812. // 编辑事件(添加事件)
  813. this.even = '编辑事件'
  814. var eventID = {}
  815. this.arr_event.map(item => {
  816. item.id === e ? (eventID = item) : ''
  817. })
  818. this.dialogFormVisible = true
  819. var start1 = eventID.startTime !== null ? eventID.startTime.split(/\s+/) : ''
  820. var start2 = eventID.endTime !== null ? eventID.endTime.split(/\s+/) : ''
  821. this.form = eventID
  822. if (eventID.startTime !== null) {
  823. this.$set(this.form, 'date_start', [start1[0] + 'T' + start1[1] + '.000Z', start2[0] + 'T' + start2[1] + '.000Z'])
  824. } else {
  825. this.$set(this.form, 'date_start', '')
  826. }
  827. this.options = this.form.peopleObject
  828. if (this.form.peopleObject !== null && this.form.peopleObject !== '') {
  829. const peopleArr = this.form.peopleObject.map((eachPeople) => eachPeople.idap)
  830. this.$set(this.form, 'peoples', peopleArr)
  831. }
  832. this.form.noHoliday === 1 ? (this.form.noHoliday = false) : (this.form.noHoliday = true)
  833. },
  834. blur_describe(e) {
  835. this.describe = false
  836. this.describe1 = true
  837. this.$set(this.task_form, 'describe', e)
  838. },
  839. remoteMethod(query) {
  840. // 人员查询
  841. if (query !== '') {
  842. this.loading = true
  843. setTimeout(() => {
  844. this.loading = false
  845. memberQueryMemberInfoByIDAPorName({ memberIDAP: query }).then(res => {
  846. const obj = {}
  847. this.options = res.data.reduce((cur, next) => {
  848. obj[next.idap] ? '' : obj[next.idap] = true && cur.push(next)
  849. return cur
  850. }, [])
  851. })
  852. }, 200)
  853. } else {
  854. this.options = []
  855. }
  856. },
  857. task_delete(e) {
  858. // 删除任务
  859. var user = { name: this.userNames, ename: this.userInformation, id: '' }
  860. tasktaskDelete(user, e).then(res => {
  861. if (res.code === 200) {
  862. this.$router.push({ name: '任务', query: {}})
  863. this.$message({
  864. message: res.msg,
  865. type: 'success',
  866. duration: 1000,
  867. offset: 150
  868. })
  869. } else {
  870. this.$message({
  871. message: res.msg + '请联系开发人员',
  872. type: 'error',
  873. duration: 1000,
  874. offset: 150
  875. })
  876. }
  877. })
  878. },
  879. event_update(e) {
  880. // 编辑事件
  881. this.even = '编辑事件'
  882. this.$refs['form'].validate(valid => {
  883. if (valid) {
  884. var schedule = e
  885. e.noHoliday === true ? (schedule.noHoliday = 0) : (schedule.noHoliday = 1)
  886. schedule.peopleObject = e.peoples
  887. schedule.startTime = e.date_start[0]
  888. schedule.endTime = e.date_start[1]
  889. schedule.taskId = Number(this.taskId[1])
  890. this.taskScheduleEvent.map(item => {
  891. item.code === e.type ? (schedule.name = item.msg) : ''
  892. })
  893. var user = { name: this.userNames, ename: this.userInformation, id: '' }
  894. ScheduleUpdate({ schedule, user }).then(res => {
  895. if (res.code === 200) {
  896. this.dialogFormVisible = false
  897. this.$message({
  898. message: res.msg,
  899. type: 'success',
  900. duration: 1000,
  901. offset: 150
  902. })
  903. this.get_list()
  904. }
  905. })
  906. }
  907. })
  908. },
  909. event_created(e) {
  910. // 添加事件
  911. this.even = '新建事件'
  912. this.$refs['form'].validate(valid => {
  913. if (valid) {
  914. var schedule = e
  915. e.noHoliday === true
  916. ? (schedule.noHoliday = 0)
  917. : (schedule.noHoliday = 1)
  918. schedule.startTime = e.date_start[0]
  919. schedule.endTime = e.date_start[1]
  920. schedule.taskId = Number(this.taskId[1])
  921. this.taskScheduleEvent.map(item => {
  922. item.code === e.type ? (schedule.name = item.msg) : ''
  923. })
  924. var user = {
  925. name: this.userNames,
  926. ename: this.userInformation,
  927. id: ''
  928. }
  929. ScheduleCreate({ schedule, user }).then(res => {
  930. if (res.code === 200) {
  931. this.dialogFormVisible = false
  932. this.$message({
  933. message: res.msg,
  934. type: 'success',
  935. duration: 1000,
  936. offset: 150
  937. })
  938. this.get_list()
  939. }
  940. })
  941. }
  942. })
  943. },
  944. bug_list(e) {
  945. this.codeCache = e
  946. // bug查询
  947. bugGetEnum().then(res => {
  948. this.priorityLevelEnumList = res.data.priorityLevelEnumList // 优先级
  949. })
  950. if (e === -1) {
  951. bugList({ taskId: this.taskId[1], pageSize: this.pageSize, curIndex: this.curIndex }).then(res => {
  952. if (res.code === 200) {
  953. if (res.data) {
  954. this.colorSty = '#6AB4FF'
  955. this.bugBaseInfoDOList = res.data
  956. this.total = res.total
  957. this.bugBaseInfoDOList.map(item1 => {
  958. this.priorityLevelEnumList.map(item => {
  959. item1.priorityLevel !== null ? item1.priorityLevel === item.name ? item1.priorityCode = item.code : '' : ''
  960. })
  961. })
  962. }
  963. }
  964. })
  965. } else {
  966. this.curIndex = 1
  967. bugList({ status: e, taskId: Number(this.taskId[1]), pageSize: this.pageSize, curIndex: this.curIndex }).then(res => {
  968. if (res.code === 200) {
  969. if (res.data !== null) {
  970. this.colorSty = ''
  971. this.bugBaseInfoDOList = res.data
  972. this.total = res.total
  973. this.bugBaseInfoDOList.map(item1 => {
  974. this.priorityLevelEnumList.map(item => {
  975. item1.priorityLevel !== null ? item1.priorityLevel === item.name ? item1.priorityCode = item.code : '' : ''
  976. })
  977. })
  978. } else {
  979. this.bugBaseInfoDOList = []
  980. }
  981. }
  982. })
  983. }
  984. },
  985. comment(e) {
  986. this.content = ''
  987. this.commentShow = false
  988. var commentInfo = {
  989. joinId: this.taskId[1],
  990. content: e,
  991. type: 3,
  992. fatherId: 0,
  993. name: this.userNames,
  994. email: this.userInformation
  995. }
  996. var user = { name: this.userNames, ename: this.userInformation, id: '' }
  997. commentCreate({ commentInfo, user }).then(res => {
  998. if (res.code === 200) {
  999. this.get_list()
  1000. this.$message({ message: res.msg, type: 'success', offset: 150 })
  1001. }
  1002. })
  1003. },
  1004. GanttChart(e) {
  1005. switch (e) {
  1006. case 1:
  1007. this.table_show = true
  1008. this.Gantt = false
  1009. break
  1010. case 2:
  1011. this.table_show = false
  1012. this.Gantt = true
  1013. break
  1014. }
  1015. },
  1016. add_Event() {
  1017. // 添加事件(排期)
  1018. this.even = '新建事件'
  1019. this.dialogFormVisible = true
  1020. this.form = {}
  1021. this.$nextTick(() => { this.$refs['form'].clearValidate() })
  1022. },
  1023. devUrl_tow(e, ele) {
  1024. // 技术文档
  1025. switch (e) {
  1026. case 1:
  1027. this.$router.push({ name: '项目详情', query: { id: ele }})
  1028. break
  1029. case 2:
  1030. window.open(ele, '_blank')
  1031. break
  1032. case 3:
  1033. this.$router.push({ name: '需求详情', params: { id: ele + '' }})
  1034. break
  1035. }
  1036. },
  1037. // 打回
  1038. back(e, ele) {
  1039. this.dialog_launchTestInfoDOS = true
  1040. this.CallBackStatus = e
  1041. this.CallBackId = ele
  1042. },
  1043. // 通过
  1044. pass(e, ele) {
  1045. this.CallBackStatus = e
  1046. this.CallBackId = ele
  1047. this.passOrBackSend()
  1048. },
  1049. passOrBackSend() {
  1050. this.dialog_launchTestInfoDOS = false
  1051. const tt = { status: this.CallBackStatus, id: this.CallBackId }
  1052. var userData = { id: '', ename: this.userInformation, name: this.userNames }
  1053. var objData = { launchTestInfo: tt, user: userData }
  1054. launchTestUpdate(objData).then(res => {
  1055. res.code === 200 ? this.$message({ message: res.msg, type: 'success', offset: 150 }) : this.$message({ message: res.msg, type: 'error', offset: 150 })
  1056. this.get_List()
  1057. })
  1058. },
  1059. handleSizeChange(size) { // 分页
  1060. this.pageSize = size
  1061. this.get_list()
  1062. },
  1063. handleCurrentChange(curIndex) { // 分页
  1064. this.curIndex = curIndex
  1065. this.get_list()
  1066. },
  1067. createReport(e, ele) {
  1068. switch (e) {
  1069. case 1: // 提测
  1070. if (this.task_form.statusString !== '开发中') {
  1071. this.$message({ message: '存在状态不是【开发中】的任务,请将任务状态为【开发中】才可测试,请检查!', type: 'warning' })
  1072. } else {
  1073. this.dialogVisible1 = true
  1074. this.$nextTick(() => { this.$refs.TestReport.init(1, ele) })
  1075. }
  1076. break
  1077. case 2: // 日报
  1078. if (this.task_form.statusString !== '测试中') {
  1079. this.$message({ message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可准出,请检查!', type: 'warning' })
  1080. } else {
  1081. this.dialogDaily = true
  1082. this.$nextTick(() => { this.$refs.DailyReport.init(1) })
  1083. }
  1084. break
  1085. case 3:
  1086. if (this.task_form.statusString !== '测试中') {
  1087. this.$message({ message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可准出,请检查!', type: 'warning' })
  1088. } else {
  1089. this.dialogClient = true
  1090. this.$nextTick(() => { this.$refs.ClientReport.init(1, ele) })
  1091. }
  1092. break
  1093. case 4:
  1094. this.modalShow = true
  1095. this.$nextTick(() => { this.$refs.createdBug.init(1, ele) })
  1096. break
  1097. }
  1098. }
  1099. }
  1100. }
  1101. </script>
  1102. <style lang="scss">
  1103. .footer .el-tabs__nav-wrap::after {
  1104. background-color: #FFFFFF !important;
  1105. }
  1106. .footer .el-tabs__header {
  1107. padding: 0;
  1108. position: relative;
  1109. margin: 0 0 15px;
  1110. width: 80%;
  1111. }
  1112. </style>
  1113. <style lang="stylus" scoped>
  1114. .selected {
  1115. color: rgb(106, 180, 255)
  1116. }
  1117. .bgborderButton .el-button--info.is-plain:hover {
  1118. background: #3f9eff !important;
  1119. border-color: #3f9eff !important;
  1120. }
  1121. .special-button .el-button--info.is-plain:hover {
  1122. background: #3f9eff !important;
  1123. border-color: #3f9eff !important;
  1124. }
  1125. .special-button .el-button--info.is-plain {
  1126. background: white !important;
  1127. }
  1128. .bgborder {
  1129. background-color: #FFFFFF;
  1130. border-radius: 4px;
  1131. }
  1132. .footer {
  1133. margin: 0 1% 1% 1%;
  1134. background-color: #FFFFFF;
  1135. border-radius: 4px;
  1136. }
  1137. .aside {
  1138. font-size: 14px;
  1139. margin: 5%;
  1140. cursor: pointer;
  1141. }
  1142. .aside:hover {
  1143. color: #409EFF;
  1144. }
  1145. .bgbugTa .el-main {
  1146. padding: 0 !important;
  1147. }
  1148. .el-tooltip__popper {
  1149. max-width: 200px;
  1150. }
  1151. .test {
  1152. height: 50vh;
  1153. color: #666666;
  1154. font-size: 14px;
  1155. display: flex;
  1156. align-items: center;
  1157. justify-content: center;
  1158. }
  1159. .el-dropdown-menu__item:not(.is-disabled):hover {
  1160. background-color: #f6f7fa;
  1161. color: #606266;
  1162. }
  1163. .bgbugTa .el-divider--horizontal {
  1164. display: block;
  1165. height: 1px;
  1166. width: 100%;
  1167. position: absolute !important;
  1168. margin: 0 !important;
  1169. }
  1170. .form_e .el-form-item {
  1171. margin-bottom: 0px;
  1172. }
  1173. .form_e label{
  1174. font-weight 400
  1175. }
  1176. .status {
  1177. margin-left: 2%;
  1178. cursor: pointer;
  1179. }
  1180. .status:hover {
  1181. color: #6AB4FF;
  1182. }
  1183. .timeStyle {
  1184. text-align: center;
  1185. padding: 5px;
  1186. border-radius: 4px;
  1187. min-height: 34px;
  1188. min-width: 74px;
  1189. display: flex;
  1190. justify-content: center;
  1191. align-items: center;
  1192. color: #FFF;
  1193. font-size:14px;
  1194. margin-right:20px;
  1195. font-family:MicrosoftYaHei;
  1196. color:rgba(255,255,255,1);
  1197. }
  1198. .dateSet {
  1199. font-size: 14px;
  1200. color: #333B4A;
  1201. margin: 1.5% 0;
  1202. padding-bottom:1.5%;
  1203. border-bottom:1px solid #E9E9E9;
  1204. }
  1205. .div_priority {
  1206. color: #ffffff;
  1207. width: 35px;
  1208. padding: 0 12px;
  1209. border-radius: 4px;
  1210. margin: auto;
  1211. margin-right: 46%;
  1212. }
  1213. .bgborder >>> .el-table .cell {
  1214. margin: -2px 0 -2px 0 !important
  1215. }
  1216. .drop_down {
  1217. color: #606266
  1218. }
  1219. </style>