taskViewDetails.vue 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. <template>
  2. <div style="background-color:#F2F3F6;display:flex;align-items: center;justify-content: center;">
  3. <el-container>
  4. <el-header class="bgborder" style=" margin: 1%;height: 7vh;display: flex; justify-content: space-between; align-items: center;">
  5. <div style="float: left;">
  6. <el-tooltip class="item" effect="dark" content="爱啥啥" placement="bottom">
  7. <span style="font-weight: 600;"><span style="background: red;">未知</span>任务:{{ task_form.name }}</span>
  8. </el-tooltip>
  9. <el-dropdown @command="handleCommand">
  10. <el-button size="mini" type="primary" plain class="el-dropdown-link drop_down" style="cursor: pointer;">{{ task_form.statusString }}<i class="el-icon-arrow-down el-icon--right" /></el-button>
  11. <el-dropdown-menu slot="dropdown" align="center">
  12. <el-dropdown-item v-for="item in taskStatus" :key="item.value" :command="{value:item.code,label:item.msg}">{{ item.msg }}</el-dropdown-item>
  13. </el-dropdown-menu>
  14. </el-dropdown>
  15. </div>
  16. <span style="float: right;">
  17. <el-button size="mini" type="primary" plain @click="centerDialogVisible_task = true">删除任务</el-button>
  18. <el-dropdown>
  19. <el-button size="mini" type="primary" plain>新建<i class="el-icon-arrow-down el-icon--right" />
  20. </el-button>
  21. <el-dropdown-menu slot="dropdown">
  22. <el-dropdown-item @click.native="createReport(4, task_form)">新建Bug</el-dropdown-item>
  23. <el-dropdown-item @click.native="createReport(1, task_form)">新建提测报告</el-dropdown-item>
  24. <el-dropdown-item @click.native="createReport(2, task_form)">新建测试报告</el-dropdown-item>
  25. <el-dropdown-item @click.native="createReport(3, task_form)">新建准出报告</el-dropdown-item>
  26. </el-dropdown-menu>
  27. </el-dropdown>
  28. </span>
  29. </el-header>
  30. <el-container>
  31. <el-aside class="bgborder" style=" margin:0 1%;minWidth: 55%;">
  32. <div style="margin: 5% 5% 0 5%; font-weight: 600; white-space: nowrap;">
  33. <b style="color: #409EFF;margin: 0 0.5%; font-size: 20px; ">I</b>数据统计
  34. </div>
  35. <div style="display: flex; justify-content: space-between; align-items: center;">
  36. <span style="text-align: center; margin-left: 8%; border-right:1px solid #BBBBBB; padding-right: 8%;">
  37. <p style="width: 70px;">bug数量</p>
  38. <p style="font-size: 70px;">{{ totalCount }}</p>
  39. <p v-show="fixInFutureCount <= 0? false: true">
  40. <span style="color: #F56C6C; width: 100px;">以后修复{{ fixInFutureCount }}个</span>
  41. </p>
  42. </span>
  43. <div id="div1" style="width:100%;height:300px;margin-bottom: 3%;" />
  44. </div>
  45. </el-aside>
  46. <el-container>
  47. <el-main class="bgborder form_e" style="overflow: hidden;margin: 0 2.1% 0 0;min-height: 50vh;">
  48. <div style="margin: 2.5%; font-weight: 600; white-space: nowrap;">
  49. <b style="color: #409EFF;margin: 0 0.5%; font-size: 20px; ">I</b>基础信息
  50. </div>
  51. <el-form label-position="left" style="margin: 0 8%" :model="task_form">
  52. <el-row :gutter="20">
  53. <el-col :span="19">
  54. <el-form-item label="所属项目:" label-width="90px" style="word-break: break-all;">{{ task_form.projectName }}</el-form-item>
  55. </el-col>
  56. <el-col :span="1">
  57. <el-button size="mini" type="primary" @click="open_created(task_form.describe)">修 改</el-button>
  58. </el-col>
  59. </el-row>
  60. <el-form-item label="所属需求:" label-width="90px">{{ task_form.requireName }}</el-form-item>
  61. <el-form-item label="业务线/平台/模块:" label-width="150px">{{ task_form.bizIdString }} / {{ task_form.typeString }} / {{ task_form.clientTypeString }}</el-form-item>
  62. <el-form-item label="是否免测:" label-width="90px">{{ task_form.noTestString }}</el-form-item>
  63. <el-form-item label="开发负责人:" label-width="100px">{{ task_form.rdObject.name }}</el-form-item>
  64. <el-form-item label="测试负责人:" label-width="100px">{{ task_form.qaObject.name }}</el-form-item>
  65. <el-form-item label="涉及的客户端:" label-width="120px">{{ task_form.involveAppString }}</el-form-item>
  66. <el-form-item label="技术文档:" label-width="90px" style="word-break: break-all;">{{ task_form.devUrl }}</el-form-item>
  67. </el-form>
  68. </el-main>
  69. </el-container>
  70. </el-container>
  71. <el-header class="bgborder" style="margin: 1%;height: auto; padding: 0;">
  72. <div style="margin: 3%; font-weight: 600; white-space: nowrap;">
  73. <b style="color: #409EFF;margin: 0 0.5%; font-size: 20px; ">I</b>排期事件
  74. </div>
  75. <el-row :gutter="20" style="margin: 2% 3%">
  76. <el-col :span="12">
  77. <el-button size="mini" type="primary" plain icon="el-icon-plus" @click="add_Event">添加事件</el-button>
  78. </el-col>
  79. <el-col :span="12" :push="7">
  80. <el-button-group>
  81. <el-button size="mini" type="primary" plain @click="GanttChart(2)">甘特图</el-button>
  82. <el-button size="mini" type="primary" plain @click="GanttChart(1)">列 表</el-button>
  83. </el-button-group>
  84. </el-col>
  85. </el-row>
  86. <div>
  87. <div v-show="Gantt">甘特图 就是这个 还没写,怎么样,</div>
  88. <el-table v-show="table_show" :data="arr_event" style="width: 100%;" size="mini" :header-cell-style="{ background: '#6AB4FF', color: '#FFFFFF' }" show-overflow-tooltip="true">
  89. <el-table-column label="事件类型" min-width="100" align="center">
  90. <template slot-scope="scope">{{ scope.row.name }}</template>
  91. </el-table-column>
  92. <el-table-column label="描述" min-width="100" align="center">
  93. <template slot-scope="scope">{{ scope.row.desc }}</template>
  94. </el-table-column>
  95. <el-table-column label="排期" min-width="100" align="center">
  96. <template slot-scope="scope">{{ scope.row.startTime }} - {{ scope.row.endTime }}</template>
  97. </el-table-column>
  98. <el-table-column label="人员" min-width="100" align="center">
  99. <template slot-scope="scope">
  100. <div v-for="item of scope.row.peopleObject" :key="item.idapId">
  101. {{ item.name }}
  102. </div>
  103. </template>
  104. </el-table-column>
  105. <el-table-column label="操作" min-width="100" align="center">
  106. <template slot-scope="scope">
  107. <el-button size="mini" type="primary" plain @click="event_query(scope.row.id)">编辑</el-button>
  108. <el-button size="mini" type="primary" plain>删除</el-button>
  109. </template>
  110. </el-table-column>
  111. </el-table>
  112. <el-row :gutter="20" style="margin: 2% 3%; color: #333B4A; padding-bottom:2%;border-bottom:1px solid #E9E9E9;">
  113. <el-col :span="12"><div>排期汇总:{{ tiem_date.startTime }} ~ {{ tiem_date.endTime }}</div></el-col>
  114. </el-row>
  115. <el-row :gutter="20" style="margin: 2% 3%; color: #333B4A; padding-bottom:2%;border-bottom:1px solid #E9E9E9;">
  116. <el-col :span="8"><div>实际提测时间:{{ task_form.launchTestRealTime }}</div></el-col>
  117. <el-col :span="8"><div>实际准出时间:{{ task_form.testFinishRealTime }}</div></el-col>
  118. <el-col :span="8"><div>实际上线完成时间:{{ task_form.onlineRealTime }}</div></el-col>
  119. </el-row>
  120. <el-row :gutter="20" style="margin: 2% 3%; color: #333B4A; padding-bottom:2%;border-bottom:1px solid #E9E9E9; ">
  121. <el-col :span="8"><div>预计上线版本:{{ task_form.preOnlineVersion }}</div></el-col>
  122. <!-- <el-col :span="8"><div>实际上线版本:<span>{{ task_form.value }}</span></div></el-col> -->
  123. </el-row>
  124. </div>
  125. </el-header>
  126. <el-footer class="footer" style=" height: auto;">
  127. <span style="text-align: right; margin: 1% 0 -3% 0;float:right;">
  128. <el-button size="mini" type="primary" plain icon="el-icon-plus" @click="createReport(4, task_form)">提Bug</el-button>
  129. <el-dropdown>
  130. <el-button size="mini" type="primary" plain>新建<i class="el-icon-arrow-down el-icon--right" />
  131. </el-button>
  132. <el-dropdown-menu slot="dropdown">
  133. <el-dropdown-item @click.native="createReport(1, task_form)">新建提测报告</el-dropdown-item>
  134. <el-dropdown-item @click.native="createReport(2, task_form)">新建测试报告</el-dropdown-item>
  135. <el-dropdown-item @click.native="createReport(3, task_form)">新建准出报告</el-dropdown-item>
  136. </el-dropdown-menu>
  137. </el-dropdown>
  138. </span>
  139. <el-tabs tab-position="top" @tab-click="handleClick">
  140. <el-tab-pane label="Bug" style="position: relative;">
  141. <div style="padding: 1% 0;display: flex; justify-content: space-start; align-items: center;border-top: 1px solid #E9E9E9;">
  142. <span>快速筛选:</span>
  143. <span style="margin-left:2%;">全部</span>
  144. <span style="margin-left:2%;">待测试</span>
  145. <span style="margin-left:2%;">开发中</span>
  146. <span style="margin-left:2%;">待开发</span>
  147. <span style="margin-left:2%;">已完成</span>
  148. </div>
  149. <el-table :data="bugBaseInfoDOList" style="width: 100%;" size="mini" :header-cell-style="{ background: '#6AB4FF', color: '#FFFFFF' }" show-overflow-tooltip="true">
  150. <el-table-column label="标题名称" min-width="100" align="center">
  151. <template slot-scope="scope">{{ scope.row.teamName }}</template>
  152. </el-table-column>
  153. <el-table-column label="状态" min-width="100" align="center">
  154. <!-- <template slot-scope="scope"> -->
  155. <el-dropdown @command="handleCommand">
  156. <el-button size="mini" type="primary" plain class="el-dropdown-link drop_down" style="cursor: pointer;">{{ task_form.statusString }}<i class="el-icon-arrow-down el-icon--right" /></el-button>
  157. <el-dropdown-menu slot="dropdown" align="center">
  158. <el-dropdown-item v-for="item in taskStatus" :key="item.value" :command="{value:item.code,label:item.msg}">{{ item.msg }}</el-dropdown-item>
  159. </el-dropdown-menu>
  160. </el-dropdown>
  161. <!-- {{ scope.row.teamName }} -->
  162. <!-- </template> -->
  163. </el-table-column>
  164. <el-table-column label="提报人" min-width="100" align="center">
  165. <template slot-scope="scope">{{ scope.row.teamName }}</template>
  166. </el-table-column>
  167. <el-table-column label="责任人" min-width="100" align="center">
  168. <template slot-scope="scope">{{ scope.row.teamName }}</template>
  169. </el-table-column>
  170. <el-table-column label="提报日期" min-width="100" align="center">
  171. <template slot-scope="scope">{{ scope.row.teamName }}</template>
  172. </el-table-column>
  173. </el-table>
  174. <div style="display:flex;align-items: center;justify-content: flex-end;">
  175. <el-pagination background :current-page="currentPage" :page-sizes="[15, 20, 25, 30]" :page-size="100" layout="total, prev, pager, next, jumper" :total="100" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
  176. </div>
  177. </el-tab-pane>
  178. <el-tab-pane label="提测报告" style="overflow: auto;width: 100%;">
  179. <el-table :data="launchTestInfoDOS" style="width: 100%;margin:2% 0;" size="mini" :header-cell-style="{ background: '#6AB4FF', color: '#FFFFFF' }" show-overflow-tooltip="true">
  180. <el-table-column label="ID" min-width="100" align="center">
  181. <template slot-scope="scope">{{ scope.row.id }}</template>
  182. </el-table-column>
  183. <el-table-column label="标题名称" min-width="100" align="center">
  184. <template slot-scope="scope">{{ scope.row.name }}</template>
  185. </el-table-column>
  186. <el-table-column label="状态" min-width="100" align="center">
  187. <template slot-scope="scope">{{ scope.row.statusString }}</template>
  188. </el-table-column>
  189. <el-table-column label="创建日期" min-width="100" align="center">
  190. <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
  191. </el-table-column>
  192. <el-table-column label="操作" align="center" width="300">
  193. <template slot-scope="scope">
  194. <div>
  195. <el-button size="mini" type="primary" plain @click="pass(1,scope.row.id)">通过</el-button>
  196. <el-button size="mini" type="danger" plain @click="back(2,scope.row.id)">打回</el-button>
  197. <el-dialog title="打回原因" :visible.sync="dialog_launchTestInfoDOS" width="30%">
  198. <el-input v-model="CallBackTheReason" type="textarea" :rows="3" />
  199. <span slot="footer" class="dialog-footer">
  200. <el-button type="primary" size="mini" @click="passOrBackSend()">确 定</el-button>
  201. <el-button type="danger" size="mini" @click="dialog_launchTestInfoDOS = false">取 消</el-button>
  202. </span>
  203. </el-dialog>
  204. </div>
  205. </template>
  206. </el-table-column>
  207. </el-table>
  208. </el-tab-pane>
  209. <el-tab-pane label="测试报告" style="overflow: auto;width: 100%;">
  210. <el-table :data="dailyTestReports" style="width: 100%;margin:2% 0;" size="mini" :header-cell-style="{ background: '#6AB4FF', color: '#FFFFFF' }" show-overflow-tooltip="true">
  211. <el-table-column label="ID" min-width="100" align="center">
  212. <template slot-scope="scope">{{ scope.row.id }}</template>
  213. </el-table-column>
  214. <el-table-column label="标题名称" min-width="100" align="center">
  215. <template slot-scope="scope">{{ scope.row.reportName }}</template>
  216. </el-table-column>
  217. <el-table-column label="创建日期" min-width="100" align="center">
  218. <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
  219. </el-table-column>
  220. </el-table>
  221. </el-tab-pane>
  222. <el-tab-pane label="准出报告" style="overflow: auto;width: 100%;">
  223. <el-table :data="projectTestReportDOS" style="width: 100%;margin:2% 0;" size="mini" :header-cell-style="{ background: '#6AB4FF', color: '#FFFFFF' }" show-overflow-tooltip="true">
  224. <el-table-column label="ID" min-width="100" align="center">
  225. <template slot-scope="scope">{{ scope.row.id }}</template>
  226. </el-table-column>
  227. <el-table-column label="标题名称" min-width="100" align="center">
  228. <template slot-scope="scope">{{ scope.row.reportName }}</template>
  229. </el-table-column>
  230. <el-table-column label="状态" min-width="100" align="center">
  231. <template slot-scope="scope">{{ scope.row.statusString }}</template>
  232. </el-table-column>
  233. <el-table-column label="创建日期" min-width="100" align="center">
  234. <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
  235. </el-table-column>
  236. </el-table>
  237. </el-tab-pane>
  238. <el-tab-pane label="评论">
  239. <p v-show="commentShow" style="color:#9B9B9B">还没有评论,快来评论吧!</p>
  240. <div v-for="(item, value) of commentTxt" :key="value">{{ item.commentInfo.name }} &nbsp; &nbsp; <span style="color:#9B9B9B">{{ item.commentInfo.gmtCreater }}</span>
  241. <p>{{ item.commentInfo.content }}</p></div>
  242. <el-input v-model="content" rows="6" type="textarea" placeholder="请输入评论内容..." show-word-limit />
  243. <p style="text-align: right;">
  244. <el-button size="mini" type="primary" plain>取消</el-button>
  245. <el-button size="mini" type="primary" plain @click="comment(content)">发送</el-button>
  246. </p>
  247. </el-tab-pane>
  248. </el-tabs>
  249. </el-footer>
  250. </el-container>
  251. <el-dialog :visible.sync="centerDialogVisible" width="30%" center>
  252. <div align="center">确定要删除此项目吗?</div>
  253. <span slot="footer" class="dialog-footer">
  254. <el-button @click="centerDialogVisible = false">取 消</el-button>
  255. <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
  256. </span>
  257. </el-dialog>
  258. <el-dialog title="新建事件" :visible.sync="dialogFormVisible">
  259. <el-form ref="form" :model="form" :rules="form_rules" :label-width="formLabelWidth">
  260. <el-form-item label="事件类型" prop="type">
  261. <el-select v-model="form.type" :loading="loading" clearable placeholder="请选择" style="width: 100%">
  262. <el-option v-for="item in taskScheduleEvent" :key="item.code" :label="item.msg" :value="item.code" />
  263. </el-select>
  264. </el-form-item>
  265. <el-form-item label="事件描述">
  266. <el-input v-model="form.desc" autocomplete="off" placeholder="请输入描述信息" />
  267. </el-form-item>
  268. <el-form-item label="排期" prop="date_start">
  269. <el-date-picker v-model="form.date_start" type="daterange" range-separator="~" start-placeholder="请选择开始日期" end-placeholder="请选择结束日期" />
  270. <el-checkbox v-model="form.noHoliday">排除周末</el-checkbox>
  271. </el-form-item>
  272. <el-form-item label="参与人员">
  273. <el-select v-model="form.peoples" multiple filterable remote reserve-keyword placeholder="创建人" :remote-method="remoteMethod" :loading="loading" style="width: 100%">
  274. <el-option v-for="item in options" :key="item.idap" :label="item.name" :value="test2(item, 0)">
  275. <span style="float: left">{{ item.name }}</span>
  276. <span style="float: right; color: #8492a6; font-size: 13px,">{{ item.idap }}</span>
  277. </el-option>
  278. </el-select>
  279. </el-form-item>
  280. </el-form>
  281. <div slot="footer" class="dialog-footer">
  282. <el-button @click="dialogFormVisible = false">取 消</el-button>
  283. <el-button type="primary" @click="even === '新建事件'? event_created(form):event_update(form)">确 定</el-button>
  284. </div>
  285. </el-dialog>
  286. <!-- 删除 -->
  287. <el-dialog :visible.sync="centerDialogVisible_task" width="30%" center>
  288. <div align="center">确定要删除<span style="color:red;"> {{ task_form.name }} </span> 的任务吗?</div>
  289. <span slot="footer" class="dialog-footer">
  290. <el-button @click="centerDialogVisible_task = false">关 闭</el-button>
  291. <el-button type="primary" @click="task_delete(task_form.id )">确 定</el-button>
  292. </span>
  293. </el-dialog>
  294. <!-- 弹窗 -->
  295. <openDialog v-if="dialog_open" ref="task_createdUpdata" />
  296. </div>
  297. </template>
  298. <script>
  299. import { taskGet, memberQueryMemberInfoByIDAPorName, bugGetBugStatusMapInfo, configShowTaskEnum, ScheduleCreate, tasktaskDelete, taskUpdate, ScheduleUpdate, commentCreate, commentList } from '@/api/taskIndex' // ajax
  300. import openDialog from '@/views/projectManage/dialog_vue'
  301. import echarts from 'echarts'
  302. export default {
  303. components: {
  304. openDialog
  305. },
  306. data() {
  307. return {
  308. dialog_open: false,
  309. task_form: {
  310. statusString: '未开始',
  311. describe: '',
  312. qaObject: {
  313. name: ''
  314. },
  315. rdObject: {
  316. name: ''
  317. }
  318. },
  319. CallBackTheReason: '', // 打回原因
  320. content: '', // 评论
  321. comment_content: '', // 评论内容
  322. commentTxt: [],
  323. commentShow: true, // 评论为空默认显示
  324. dialog_launchTestInfoDOS: false, // 打回弹窗
  325. currentPage: 0,
  326. tiem_date: { // 排期汇总
  327. startTime: '',
  328. endTime: ''
  329. },
  330. userInformation: localStorage.getItem('username'),
  331. userNames: localStorage.getItem('realname'),
  332. form_rules: {
  333. type: [{ required: true, message: '事件类型不能为空', trigger: 'blur' }],
  334. date_start: [{ required: true, message: '排期不能为空', trigger: 'blur' }]
  335. },
  336. arr_event: [], // 事件table
  337. options: [], // 人员信息
  338. bugBaseInfoDOList: [], // bug
  339. launchTestInfoDOS: [], // 提测
  340. dailyTestReports: [], // 测试
  341. projectTestReportDOS: [], // 准出
  342. loading: false,
  343. Addition: false,
  344. Addition1: false,
  345. Addition2: false,
  346. table_show: true, // 表格(显示)
  347. Gantt: false, // 甘特图(显示)
  348. textarea: '', // 项目总目标
  349. taskScheduleEvent: [], // 事件类型
  350. total: 0,
  351. show2: true,
  352. describe: false,
  353. describe1: false,
  354. dialogFormVisible: false,
  355. centerDialogVisible: false,
  356. centerDialogVisible_task: false, // 任务dialog
  357. options1: [],
  358. even: '', // 添加事件
  359. form: {
  360. name: '',
  361. region: '',
  362. date1: '',
  363. date2: '',
  364. delivery: false,
  365. type: [],
  366. resource: '',
  367. desc: ''
  368. },
  369. formLabelWidth: '100px',
  370. project_Milepost: [
  371. {
  372. name: '第一阶段',
  373. date: '2019/12/06',
  374. code: '你丹江口市内存卡就是你的错'
  375. }
  376. ],
  377. tasktId: '',
  378. echarts_name: [], // echarts_name
  379. echarts_value: [], // echats_value
  380. fixInFutureCount: '', // 已延期
  381. totalCount: '', // bug总数
  382. test: {},
  383. taskStatus: []
  384. }
  385. },
  386. created() {
  387. this.get_list()
  388. },
  389. mounted() {
  390. this.get_echarts()
  391. },
  392. methods: {
  393. test2(item, e) { // 获取团队人员信息
  394. if (typeof this.test[item.idap] === 'undefined') {
  395. item.role = e
  396. this.test[item.idap] = item
  397. }
  398. return item.idap
  399. },
  400. get_list() {
  401. var url = window.location.href // 获取url中"?"符后的字
  402. this.taskId = url.split('?id=')
  403. configShowTaskEnum().then(res => {
  404. this.taskScheduleEvent = res.data.taskScheduleEvent
  405. this.taskStatus = res.data.taskStatus
  406. })
  407. taskGet(this.taskId[1]).then(res => {
  408. this.task_form = res.data
  409. this.total = res.total
  410. this.tiem_date.startTime = res.data.scheduleListResponse.startTime // 开始时间
  411. this.tiem_date.endTime = res.data.scheduleListResponse.endTime // 结束时间
  412. this.arr_event = res.data.scheduleListResponse.schedulDetailResponseList
  413. this.table_loading = false
  414. this.launchTestInfoDOS = res.data.launchTestInfoDOS // 提测
  415. this.dailyTestReports = res.data.dailyTestReports // 测试
  416. this.projectTestReportDOS = res.data.projectTestReportDOS // 准出
  417. this.task_form.bugBaseInfoDOList !== null ? this.bugBaseInfoDOList = res.date.bugBaseInfoDOList : this.bugBaseInfoDOList = [] // bug
  418. })
  419. commentList({ type: 3, joinId: this.taskId[1] }).then(res => {
  420. this.commentTxt = res.data
  421. this.commentTxt !== '' ? this.commentShow = false : this.commentShow = true
  422. })
  423. },
  424. open_created(e) { // 打开弹窗
  425. var url = window.location.href // 获取url中"?"符后的字串
  426. this.taskId = url.split('?id=')
  427. this.dialog_open = true
  428. this.$nextTick(() => { this.$refs.task_createdUpdata.init(3, this.taskId) })
  429. },
  430. get_echarts() {
  431. bugGetBugStatusMapInfo({ taskId: this.taskId[1] }).then(res => {
  432. this.fixInFutureCount = res.data.fixInFutureCount
  433. this.totalCount = res.data.totalCount
  434. res.data.statusInfoList.map(item => {
  435. this.echarts_name.push(item.statusString)
  436. this.echarts_value.push(item.count)
  437. })
  438. })
  439. setTimeout(() => {
  440. var myChart = echarts.init(document.getElementById('div1'))
  441. myChart.setOption({
  442. xAxis: {
  443. type: 'category',
  444. data: this.echarts_name,
  445. axisLine: { show: true, lineStyle: { type: 'dashed' }}
  446. },
  447. yAxis: [{ gridIndex: 0, axisTick: { show: false }, axisLabel: { show: false }, splitLine: { show: false }, axisLine: { show: false }}],
  448. series: [
  449. {
  450. data: this.echarts_value,
  451. type: 'bar',
  452. itemStyle: { normal: { color: '#409EFF' }},
  453. label: {
  454. show: true,
  455. position: 'inside'
  456. }
  457. }]
  458. })
  459. window.onresize = myChart.resize
  460. }, 500)
  461. },
  462. handleCommand(command) {
  463. this.task_form.statusString = command.label
  464. var taskInfoDO = this.task_form
  465. taskInfoDO.status = command.value
  466. var user = { name: this.userNames, ename: this.userInformation, id: '' }
  467. taskUpdate({ taskInfoDO, user }).then(res => {
  468. if (res.code === 200) {
  469. this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
  470. }
  471. })
  472. },
  473. event_query(e) { // 编辑事件(添加事件)
  474. var eventID = {}
  475. this.arr_event.map(item => {
  476. item.id === e ? eventID = item : ''
  477. })
  478. this.dialogFormVisible = true
  479. this.form = eventID
  480. this.$set(this.form, 'date_start', [eventID.startTime, eventID.endTime])
  481. this.form.noHoliday === 1 ? this.form.noHoliday = false : this.form.noHoliday = true
  482. console.log(this.form, 'form')
  483. },
  484. blur_describe(e) {
  485. this.describe = false
  486. this.describe1 = true
  487. this.$set(this.task_form, 'describe', e)
  488. },
  489. click_b() {
  490. console.log('v')
  491. },
  492. remoteMethod(query) { // 人员查询
  493. if (query !== '') {
  494. this.loading = true
  495. setTimeout(() => {
  496. this.loading = false
  497. memberQueryMemberInfoByIDAPorName({ memberIDAP: query }).then(res => {
  498. this.options = res.data
  499. })
  500. }, 200)
  501. } else {
  502. this.options = []
  503. }
  504. },
  505. handleClick(tab, event) {
  506. console.log(tab, event)
  507. },
  508. task_delete(e) { // 删除任务
  509. var user = { name: this.userNames, ename: this.userInformation, id: '' }
  510. tasktaskDelete(user, e).then(res => {
  511. if (res.code === 200) {
  512. this.$router.push({ name: '任务', query: {}})
  513. this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
  514. } else {
  515. this.$message({ message: res.msg + '请联系开发人员', type: 'error', duration: 1000, offset: 150 })
  516. }
  517. })
  518. },
  519. event_update(e) { // 编辑事件
  520. this.even = '编辑事件'
  521. this.$refs['form'].validate((valid) => {
  522. if (valid) {
  523. var schedule = e
  524. e.noHoliday === true ? schedule.noHoliday = 0 : schedule.noHoliday = 1
  525. schedule.startTime = e.date_start[0]
  526. schedule.endTime = e.date_start[1]
  527. schedule.taskId = Number(this.taskId[1])
  528. this.taskScheduleEvent.map(item => {
  529. item.code === e.type ? schedule.name = item.msg : ''
  530. })
  531. var user = { name: this.userNames, ename: this.userInformation, id: '' }
  532. ScheduleUpdate({ schedule, user }).then(res => {
  533. if (res.code === 200) {
  534. this.dialogFormVisible = false
  535. this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
  536. this.get_list()
  537. }
  538. })
  539. }
  540. })
  541. },
  542. event_created(e) { // 添加事件
  543. this.even = '新建事件'
  544. this.$refs['form'].validate((valid) => {
  545. if (valid) {
  546. var schedule = e
  547. e.noHoliday === true ? schedule.noHoliday = 0 : schedule.noHoliday = 1
  548. schedule.startTime = e.date_start[0]
  549. schedule.endTime = e.date_start[1]
  550. schedule.taskId = Number(this.taskId[1])
  551. this.taskScheduleEvent.map(item => {
  552. item.code === e.type ? schedule.name = item.msg : ''
  553. })
  554. var user = { name: this.userNames, ename: this.userInformation, id: '' }
  555. ScheduleCreate({ schedule, user }).then(res => {
  556. if (res.code === 200) {
  557. this.dialogFormVisible = false
  558. this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
  559. this.get_list()
  560. }
  561. })
  562. }
  563. })
  564. },
  565. comment(e) {
  566. this.content = ''
  567. this.commentShow = false
  568. var commentInfo = {
  569. joinId: this.taskId[1],
  570. content: e,
  571. type: 3,
  572. fatherId: 0,
  573. name: this.userNames,
  574. email: this.userInformation
  575. }
  576. var user = { name: this.userNames, ename: this.userInformation, id: '' }
  577. commentCreate({ commentInfo, user }).then(res => {
  578. if (res.code === 200) {
  579. this.get_list()
  580. this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
  581. }
  582. })
  583. },
  584. ImmediateAddition() { // 立即添加(编辑)
  585. setTimeout(() => { this.$refs.textarea.focus() }, 100)
  586. this.Addition = false
  587. this.Addition1 = true
  588. this.Addition2 = false
  589. },
  590. blur_textarea(e) { // 项目总目标失去焦点
  591. if (e !== '') {
  592. this.textarea = e
  593. this.Addition2 = true
  594. this.Addition1 = false
  595. this.Addition = false
  596. } else {
  597. this.Addition2 = false
  598. this.Addition1 = false
  599. this.Addition = true
  600. }
  601. },
  602. GanttChart(e) {
  603. switch (e) {
  604. case 1:
  605. this.table_show = true
  606. this.Gantt = false
  607. break
  608. case 2:
  609. this.table_show = false
  610. this.Gantt = true
  611. break
  612. }
  613. },
  614. add_Event() { // 添加事件(排期)
  615. this.dialogFormVisible = true
  616. this.form = {}
  617. this.$nextTick(() => {
  618. this.$refs['form'].clearValidate()
  619. })
  620. },
  621. // 打回
  622. back(e, ele) {
  623. this.dialog_launchTestInfoDOS = true
  624. // this.CallBackStatus = e
  625. // this.CallBackId = ele
  626. },
  627. // 通过
  628. pass(e, ele) {
  629. // this.CallBackStatus = e
  630. // this.CallBackId = ele
  631. // this.passOrBackSend()
  632. },
  633. passOrBackSend() {
  634. this.dialog_launchTestInfoDOS = false
  635. // const tt = { status: this.CallBackStatus, id: this.CallBackId }
  636. // this.userData = { id: '', ename: this.userInformation, name: this.userNames }
  637. // this.objData = { launchTestInfo: tt, user: this.userData }
  638. // launchTestUpdate(this.objData).then(res => {
  639. // res.code === 200 ? this.successFun('operate') : this.errorFun(res.msg)
  640. // this.getList()
  641. // })
  642. },
  643. handleSizeChange(size) { // 分页
  644. this.pageSize = size
  645. },
  646. handleCurrentChange(curIndex) { // 分页
  647. this.curIndex = curIndex
  648. },
  649. createReport(e, ele) {
  650. console.log(ele)
  651. if (ele.typeString !== '服务端') {
  652. switch (e) {
  653. case 1:
  654. this.$router.push({ path: '/Platform/presentation/PresentReport', query: { task: ele }}) // 客户端提测
  655. break
  656. case 2:
  657. this.$router.push({ path: '/Platform/presentation/DailyNewsAdded', query: { task: ele, taskId: ele.id }}) // 客户端日报
  658. break
  659. case 3:
  660. this.$router.push({ path: '/Platform/presentation/ClientAcceptance', query: { task: ele }}) // 客户端准出
  661. break
  662. case 4:
  663. this.$router.push({ name: '新建Bug', query: { id: ele.id }}) // 缺陷报告
  664. break
  665. }
  666. } else {
  667. switch (e) {
  668. case 1:
  669. this.$router.push({ path: '/Platform/presentation/presentationReport', query: { task: ele }}) // 服务端提测
  670. break
  671. case 2:
  672. this.$router.push({ path: '/Platform/presentation/DailyNewsAdded', query: { task: ele, taskId: ele.id }}) // 服务端日报
  673. break
  674. case 3:
  675. this.$router.push({ path: '/Platform/presentation/Acceptance', query: { task: ele }}) // 服务端准出
  676. break
  677. case 4:
  678. this.$router.push({ name: '新建Bug', query: { id: ele.id }}) // 缺陷报告
  679. break
  680. }
  681. }
  682. }
  683. }
  684. }
  685. </script>
  686. <style lang="stylus">
  687. .footer .el-tabs__nav-wrap::after {
  688. background-color: #FFFFFF !important;
  689. }
  690. .bgborder {
  691. background-color: #FFFFFF;
  692. border-radius: 8px;
  693. }
  694. .footer {
  695. margin: 1%;
  696. background-color: #FFFFFF;
  697. border-radius: 8px;
  698. }
  699. .aside {
  700. font-size: 14px;
  701. margin: 5%;
  702. cursor: pointer;
  703. }
  704. .aside:hover {
  705. color: #409EFF;
  706. }
  707. .el-main {
  708. padding: 0 !important;
  709. }
  710. .el-tooltip__popper {
  711. max-width: 200px;
  712. }
  713. .test {
  714. height: 50vh;
  715. color: #666666;
  716. font-size: 14px;
  717. display: flex;
  718. align-items: center;
  719. justify-content: center;
  720. }
  721. .time-horizontal {
  722. list-style-type: none;
  723. padding: 0px;
  724. margin: 0px;
  725. width: 100%;
  726. height: 222px;
  727. white-space: nowrap;
  728. }
  729. .dialog .el-dialog__header {
  730. padding: 0;
  731. }
  732. .time-horizontal li {
  733. display: inline-block;
  734. position: relative;
  735. text-align: center;
  736. width: 25%;
  737. padding-top: 7%;
  738. }
  739. .time-horizontal li i div {
  740. position: absolute;
  741. top: -10px;
  742. left: 50%;
  743. margin-left: -10px;
  744. width: 20px;
  745. height: 20px;
  746. }
  747. .time-horizontal li i div b {
  748. display: inline-block;
  749. cursor: pointer;
  750. border: 2px solid #61D3B8;
  751. border-radius: 50%;
  752. background: #61D3B8;
  753. color: #61D3B8;
  754. z-index: 9999;
  755. width: 20px;
  756. height: 20px;
  757. }
  758. .time-horizontal li i:before {
  759. content: '';
  760. width: 0%;
  761. text-align: center;
  762. position: absolute;
  763. top: -50%;
  764. left: 49.3%;
  765. height: 100%;
  766. border: 1px dashed #BBBBBB;
  767. }
  768. .time-horizontal li div {
  769. text-align: center;
  770. width: 100%;
  771. position: absolute;
  772. bottom: 197%;
  773. }
  774. .el-divider--horizontal {
  775. display: block;
  776. height: 1px;
  777. width: 100%;
  778. position: absolute !important;
  779. margin: 0 !important;
  780. }
  781. .form_e .el-form-item {
  782. margin-bottom: 0px;
  783. }
  784. .footer .el-tabs__header {
  785. padding: 0;
  786. position: relative;
  787. margin: 0 0 15px;
  788. width: 80%;
  789. }
  790. </style>