taskViewDetails.vue 56 KB

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