taskViewDetails.vue 55 KB

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