taskViewDetail.vue 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296
  1. <template>
  2. <div class="bg-project" @click="display = false">
  3. <el-container>
  4. <el-header class="main-header">
  5. <div class="top-page-title">
  6. <div v-if="form_query.stage === 1 || form_query.stage === 2 || form_query.stage === 3" class="task-stage">
  7. <div class="task-stage-main">
  8. <img v-if="form_query.stage === 1" :src="normalImg">
  9. <img v-if="form_query.stage === 2" :src="stageImg">
  10. <img v-if="form_query.stage === 3" :src="warningImg">
  11. <el-tooltip class="item" effect="dark" :disabled="form_query.lateMsg===null" :content="form_query.stageString + ':' + form_query.lateMsg" placement="bottom">
  12. <div class="task-stage-title">
  13. <span :class="{'small-size':form_query.stage === 2}">{{ form_query.stageString }}</span>
  14. </div>
  15. </el-tooltip>
  16. </div>
  17. </div>
  18. <div class="header-title">
  19. <span class="title-id">
  20. TASK-{{ form_query.id }}
  21. <el-tooltip v-if="form_query.isDirectlyFromDpm === 0 || form_query.isDirectlyFromDpm === 1" class="item" effect="dark" :content="`【${form_query.relatedDpmTaskInfo.taskId}】【${form_query.relatedDpmTaskInfo.name}】`" placement="top">
  22. <span class="synchronize-icon">
  23. <img src="@/assets/home_images/WX20200914-141851@2x.png" @click="dpmUrl(form_query.dpmUrl)">
  24. <i v-if="form_query.isDirectlyFromDpm === 0" class="el-icon-circle-close sty-icon" @click="deleteDpl()" />
  25. </span>
  26. </el-tooltip>
  27. <el-popover v-if="form_query.isDirectlyFromDpm === -1" placement="bottom" title="关联望岳任务" width="400" trigger="click" popper-class="synchronize">
  28. <div class="blueStr" />
  29. <div class="task-object-list">
  30. <div v-for="(item, index) in dplOption" :key="index" class="task-item" @click="throttle(item.id)">
  31. <span>{{ item.moduleInfoName }}</span>
  32. <span class="item-name">{{ item.name }}</span>
  33. <span class="item-id">{{ item.taskId }}</span>
  34. </div>
  35. </div>
  36. <el-button v-if="form_query.isDirectlyFromDpm === -1" slot="reference" size="mini" type="text" @click.once="getDplList(taskId)">关联望岳</el-button>
  37. </el-popover>
  38. </span>
  39. <el-tooltip class="item" effect="dark" :content="form_query.name" placement="bottom">
  40. <span
  41. v-clipboard:copy="form_query.name"
  42. v-clipboard:success="copyName"
  43. class="title-name"
  44. >{{ form_query.name }}</span>
  45. </el-tooltip>
  46. </div>
  47. <el-button v-show="form_query.status === -2" disabled plain size="mini">Hold</el-button>
  48. <el-button v-show="form_query.status === -4" disabled plain size="mini">已关闭</el-button>
  49. <el-dropdown v-show="form_query.status !== -2 && form_query.status !== -4" placement="bottom" @command="updateStatus">
  50. <el-button size="mini" plainclass="el-dropdown-link drop_down">
  51. {{ getStatus.name }}
  52. <i class="el-icon-arrow-down el-icon--right" />
  53. </el-button>
  54. <el-dropdown-menu slot="dropdown" align="center">
  55. <el-dropdown-item
  56. v-for="item in allStatus"
  57. :key="item.name"
  58. :command="{status:item.code,label:item.name}"
  59. :disabled="form_query.status === item.code ? true : false"
  60. >{{ item.name }}</el-dropdown-item>
  61. </el-dropdown-menu>
  62. </el-dropdown>
  63. </div>
  64. <div class="top-tabs-public">
  65. <el-tabs v-model="activeName">
  66. <el-tab-pane label="概览" name="1" />
  67. <el-tab-pane label="子任务" name="2" />
  68. <el-tab-pane label="测试" name="7" />
  69. <el-tab-pane label="缺陷" name="3" />
  70. <el-tab-pane label="报告" name="4" />
  71. <el-tab-pane label="统计" name="5" />
  72. <el-tab-pane label="发布" name="6" />
  73. </el-tabs>
  74. </div>
  75. <div class="top-control">
  76. <el-dropdown placement="bottom">
  77. <i class="el-icon-circle-plus icon-add" />
  78. <el-dropdown-menu slot="dropdown">
  79. <el-dropdown-item @click.native="created_bug()">新建缺陷</el-dropdown-item>
  80. <el-dropdown-item @click.native="createChildren = true">新建子任务</el-dropdown-item>
  81. <el-dropdown-item @click.native="createReport(1, form_query)">新建提测报告</el-dropdown-item>
  82. <el-dropdown-item @click.native="createReport(2, form_query)">新建测试日报</el-dropdown-item>
  83. <el-dropdown-item @click.native="createReport(3, form_query)">新建准出报告</el-dropdown-item>
  84. </el-dropdown-menu>
  85. </el-dropdown>
  86. <div class="line" />
  87. <span style="vertical-align: bottom; cursor: pointer; color: #6F7C93;" @click.stop="setChild(), display = true"><img style="width: 20px; display: inline-block;" :src="image_url">&nbsp; {{ num }} &nbsp;</span>
  88. <div class="line" />
  89. <el-dropdown placement="bottom">
  90. <i class="el-icon-setting icon-delete" />
  91. <el-dropdown-menu slot="dropdown">
  92. <el-dropdown-item @click.native="open_created('update')">编辑任务</el-dropdown-item>
  93. <el-dropdown-item @click.native="open_created('copy')">复制任务</el-dropdown-item>
  94. </el-dropdown-menu>
  95. </el-dropdown>
  96. <div class="line" />
  97. <i class="el-icon-delete icon-delete" @click="deleteVisible = true" />
  98. </div>
  99. </el-header>
  100. <el-container v-show="activeName === '1'">
  101. <section class="main-section">
  102. <div class="Layout_space_between">
  103. <div class="el-main-title">
  104. <div class="title-left-icon" />
  105. <div class="title-left-name">工作流</div>
  106. </div>
  107. <div class="Layout_space_between">
  108. <el-button v-if="form_query.isDirectlyFromDpm === 0 || form_query.isDirectlyFromDpm === 1" class="el-btn-size" size="mini" @click="dialogVisible = true">{{ '拉取望岳状态及工作流' }}</el-button>
  109. <div v-if="form_query.isTaskClose">
  110. <el-popover v-if="form_query.status !== -2" v-model="taskVisible" placement="bottom-end" width="300px" :visible-arrow="false" trigger="manual">
  111. <el-input v-model="textarea1" type="textarea" rows="5" style="width:300px" placeholder="请输入关闭原因(选填)" />
  112. <div style="text-align: right; margin-top: 10px;">
  113. <el-button size="mini" type="text" @click="taskVisible = false">取消</el-button>
  114. <el-button type="primary" size="mini" @click="taskOpenOrClose(textarea1), taskVisible = false">确定</el-button>
  115. </div>
  116. <el-button slot="reference" :class="[closeTask === '解除关闭任务' ? 'el-btn-size' : '' ]" size="mini" @click="changeTaskClose">{{ form_query.status === -4 ? closeTask = '解除关闭任务' : closeTask = '关闭任务' }}</el-button>
  117. </el-popover>
  118. </div>
  119. <div v-if="!form_query.isTaskClose && form_query.status !== -2 && form_query.status === -4">
  120. <el-button v-if="taskCode" slot="reference" class="el-btn-size" size="mini" @click="changeTaskClose(false)">{{ form_query.status === -4 ? closeTask = '解除关闭任务' : taskCode = false }}</el-button>
  121. </div>
  122. <el-popover v-if="form_query.status !== -4" v-model="visible" placement="bottom-end" width="300px" :visible-arrow="false" trigger="manual">
  123. <el-input v-model="textarea2" type="textarea" rows="5" style="width:300px" placeholder="请输入Hold原因(选填)" />
  124. <div style="text-align: right; margin-top: 10px;">
  125. <el-button size="mini" type="text" @click="visible = false">取消</el-button>
  126. <el-button type="primary" size="mini" @click="taskHold(textarea2)">确定</el-button>
  127. </div>
  128. <el-button slot="reference" class="el-btn-size" size="mini" @click="changeBtn">{{ form_query.status === -2 ? HoldTask = '解除 Hold' : HoldTask = 'Hold 任务' }}</el-button>
  129. </el-popover>
  130. </div>
  131. </div>
  132. <timeLine :id="taskId" ref="timeLine" :name="'任务'" />
  133. </section>
  134. </el-container>
  135. <!-- 概览 -->
  136. <el-container v-show="activeName === '1'" class="is-vertical">
  137. <section class="main-section">
  138. <div class="el-main-title">
  139. <div class="title-left-icon" />
  140. <div class="title-left-name">基础信息</div>
  141. </div>
  142. <div class="detail-info">
  143. <el-form :inline="true" :model="form_query" class="demo-form-inline" label-position="left" label-width="100px">
  144. <el-form-item label="所属项目:" class="module">
  145. <div v-if="form_query.projectId !== -1" @click="jump('项目详情',form_query)">{{ form_query.projectName }}</div>
  146. <template v-else>{{ form_query.projectName }}</template>
  147. </el-form-item>
  148. <el-form-item label="所属需求:" class="module">
  149. <div v-if="form_query.requireId !== -1" @click="jumps('需求详情',form_query)">{{ form_query.requireName }}</div>
  150. <template v-else>{{ form_query.requireName }}</template>
  151. </el-form-item>
  152. <el-form-item label="所属模块:" class="module">
  153. <div>{{ form_query.moduleInfoName }}</div>
  154. </el-form-item>
  155. </el-form>
  156. <el-form :inline="true" :model="form_query" class="demo-form-inline" label-position="left" label-width="100px">
  157. <el-form-item label="开发负责人:">
  158. <search-people :value.sync="form_query.rdOwner" @change="changeArea" />
  159. </el-form-item>
  160. <el-form-item label="测试负责人:">
  161. <search-people :value.sync="form_query.qaOwner" @change="changeArea" />
  162. </el-form-item>
  163. <el-form-item label="是否跟版:">
  164. <el-select v-model="form_query.followVersion" size="small" filterable placeholder="请选择" @change="changeArea">
  165. <el-option v-for="(item,index) in dependList" :key="item.msg + index" :label="item.msg" :value="item.code" />
  166. </el-select>
  167. </el-form-item>
  168. </el-form>
  169. <el-form :inline="true" :model="form_query" class="demo-form-inline" label-position="left" label-width="100px">
  170. <el-form-item label="跟版客户端:">
  171. <el-select v-if="form_query.followVersion === 1" v-model="form_query.involveApp" size="small" filterable placeholder="请选择" @change="changeArea">
  172. <el-option v-for="(item,index) in appClient" :key="item.msg + index" :label="item.msg" :value="item.code" />
  173. </el-select>
  174. </el-form-item>
  175. <el-form-item label="任务进度:">
  176. <div class="form-progress">
  177. <el-progress :percentage="Number(form_query.rate && form_query.rate.substring(0,4)) || 0" color="#409eff" />
  178. </div>
  179. </el-form-item>
  180. <el-form-item label="标签:" class="tag-from">
  181. <Tag v-model="form_query.tags" type="TASK" @change="changeArea" />
  182. </el-form-item>
  183. </el-form>
  184. <el-form :inline="true" :model="form_query" class="demo-form-inline" style="white-space: nowrap;" label-position="left" label-width="100px">
  185. <el-form-item label="技术文档:" class="module">
  186. <span class="PRD-link">
  187. <a
  188. :href="form_query.devUrl"
  189. target="_blank"
  190. class="ellipsis"
  191. style="width: 500px"
  192. >{{ form_query.devUrl }}</a>
  193. </span>
  194. </el-form-item>
  195. </el-form>
  196. </div>
  197. </section>
  198. <section class="main-section">
  199. <div class="el-main-title">
  200. <div class="title-left-icon" />
  201. <div class="title-left-name">
  202. <div>任务计划
  203. <el-tooltip class="item" effect="dark" :content="isScheduleLocked === 1? '点击解锁排期' : '点击锁定排期'" placement="top">
  204. <span
  205. v-if="!form_query.needGrey || isScheduleLocked === 1 "
  206. class="titleStatus"
  207. :class=" isScheduleLocked === 1 ? 'el-icon-lock' : 'el-icon-unlock'"
  208. @click="changeSchedule"
  209. >
  210. {{ isScheduleLocked === 1 ? '已锁定' : '未锁定' }}
  211. </span>
  212. </el-tooltip>
  213. <span v-if="isShowLockedTime" class="tip">
  214. <i class="el-icon-timer icon" />剩余{{ autoLockScheduleCountdown }}将自动锁定
  215. </span>
  216. </div>
  217. </div>
  218. </div>
  219. <section>
  220. <div class="task-help-tips">
  221. <div class="tips-icon">
  222. <i class="el-icon-question" />
  223. <span> 帮助提示</span>
  224. </div>
  225. <div class="tips-context">
  226. <ul style="padding:0 18px">
  227. <li v-for="(item, index) in textTips" :key="index">{{ item }}</li>
  228. </ul>
  229. </div>
  230. </div>
  231. <div class="list-tips">
  232. <div class="tips">
  233. <i v-if="tips" class="el-icon-warning-outline" style="color:#e88792;" />
  234. <span v-if="tips" style="color:#e88792;">当前任务归属的需求计划排期呈锁定状态,当前任务的排期无法同步到需求计划中去,请将归属需求的排期解锁!</span>
  235. </div>
  236. <div class="schedule-control">
  237. <div v-show="BackToTheLatest === false" class="Scheduling" style="margin-right: 20px;" @click="clickBackToTheLatest"><i class="el-icon-refresh" /> 回到最新</div>
  238. <div v-show="isScheduleLocked === 0">
  239. <div v-show="BackToTheLatest === true" class="Scheduling" style="margin-right: 20px;" @click="clickAddScheduling()"><i class="el-icon-circle-plus-outline" /> 添加排期</div>
  240. </div>
  241. <div v-show="form_query.relatedDpmTaskInfo" class="Scheduling" @click="synchronizeDialog = true"><i class="el-icon-s-fold" /> 同步排期至望岳</div>
  242. <div v-show="BackToTheLatest === true" align="left" class="Scheduling" @click="scheduleHiHide"><i class="el-icon-document" /> 排期变更记录</div>
  243. <download :id="taskId" :name="'任务'" />
  244. </div>
  245. </div>
  246. </section>
  247. <el-container>
  248. <el-main style="padding: 0 10px;">
  249. <schedule-list :id="taskId" ref="taskSchedule" :showunlock="showunlock" :type-list="taskScheduleEvent" class-name="white" @updataData="getSchedule" />
  250. <div v-if="form_query.status >= 70" class="border-top">
  251. <el-divider />
  252. <el-form :inline="true" :model="form_query" class="Layout_space_start" label-position="left" label-width="110px">
  253. <el-form-item v-if="form_query.status >= 70" label="实际提测时间">
  254. <el-date-picker v-model="form_query.launchTestRealTime" type="date" :clearable="false" placeholder="请选择" format="yyyy.MM.dd" value-format="yyyy-MM-dd" style="width: 100%;" size="small" @change="setChangeArea(2)" />
  255. </el-form-item>
  256. <el-form-item v-if="form_query.status >= 90" label="实际准出时间:">
  257. <el-date-picker v-model="form_query.testFinishRealTime" type="date" :clearable="false" placeholder="请选择" format="yyyy.MM.dd" value-format="yyyy-MM-dd" style="width: 100%;" size="small" @change="setChangeArea(2)" />
  258. </el-form-item>
  259. <el-form-item v-if="form_query.status >= 100" label="实际上线时间:">
  260. <el-date-picker v-model="form_query.onlineRealTime" type="date" :clearable="false" placeholder="请选择" format="yyyy.MM.dd" value-format="yyyy-MM-dd" style="width: 100%;" size="small" @change="setChangeArea(2)" />
  261. </el-form-item>
  262. </el-form>
  263. </div>
  264. </el-main>
  265. <el-aside v-if="lockHide" class="SchedulingAside">
  266. <div v-for="(item, index) in SchedulingContent" :key="index" class="SchedulingDiv" @click="clickScheduling(item)">
  267. <i v-show="index < SchedulingContent.length - 1" />
  268. <div class="timeline">
  269. <div class="SchedulingTow" :class="{'vss' : item.id === ScheduId}">
  270. <div v-if="item.operationType === 0" class="el-icon-unlock image" />
  271. <div v-if="item.operationType === 1" class="el-icon-lock image" />
  272. </div>
  273. <div class="modifyTime">{{ item.modifyTime }}</div>
  274. <div>{{ item.operatorObject.name !== null ? item.operatorObject.name : '' }} <span class="btn">{{ item.operation }}</span></div>
  275. <div v-if="item.remarkTypeName"><span class="modifyTime">{{ '解锁原因 : ' }}</span>{{ item.remarkTypeName }}</div>
  276. <div v-if="item.remark"><span class="modifyTime">{{ '具体描述 : ' }}</span>{{ item.remark }}</div>
  277. </div>
  278. </div>
  279. <div v-if="SchedulingContent.length === 0" style="width: 270px; margin: 50% 20px; text-align: center;"> 暂无排期变更记录!</div>
  280. </el-aside>
  281. </el-container>
  282. </section>
  283. <section class="main-section">
  284. <div class="el-main-title">
  285. <div class="title-left-icon" />
  286. <div class="title-left-name">任务描述</div>
  287. </div>
  288. <div>
  289. <text-area :id="'pro-desc'" :value.sync="form_query.description" :empty-text="'点击'" :input-button="'添加描述'" @change="changeArea" />
  290. </div>
  291. </section>
  292. <section class="main-section">
  293. <div class="el-main-title">
  294. <div class="title-left-icon" />
  295. <div class="title-left-name">动态</div>
  296. </div>
  297. <el-tabs v-model="tabPosition" class="sign-tabs">
  298. <el-tab-pane label="评论" name="first">
  299. <div class="detail-info">
  300. <ul class="comment-main">
  301. <li v-for="(item,index) in comments" :key="'comment'+index">
  302. <span class="comment-name">{{ item.commentInfo.name }}</span>
  303. <span class="comment-gmtCreater">{{ item.commentInfo.gmtCreater }}</span><br>
  304. <span class="comment-content">{{ item.commentInfo.content }}</span>
  305. </li>
  306. </ul>
  307. <el-input
  308. v-model="commentContent"
  309. type="textarea"
  310. placeholder="请输入评论内容"
  311. maxlength="300"
  312. show-word-limit
  313. :autosize="{ minRows: 3, maxRows: 5}"
  314. style="margin-bottom: 20px"
  315. />
  316. <el-row>
  317. <el-col :span="2" :offset="22"><el-button type="primary" size="small" @click="addComment">发表评论</el-button></el-col>
  318. </el-row>
  319. </div>
  320. </el-tab-pane>
  321. <el-tab-pane label="变更记录" name="second">
  322. <record :id="taskId" ref="record" :name="'任务'" />
  323. </el-tab-pane>
  324. </el-tabs>
  325. </section>
  326. </el-container>
  327. <!-- 概览 -->
  328. <!-- 子任务 -->
  329. <el-container v-if="activeName === '2'" class="is-vertical">
  330. <section class="main-section contain">
  331. <children-list ref="children-list" />
  332. </section>
  333. </el-container>
  334. <!-- 子任务 -->
  335. <!-- 测试 -->
  336. <el-container v-if="activeName === '7'">
  337. <testPlan :id="form_query.id" :bizid="bizId" type="task" />
  338. </el-container>
  339. <!-- 测试 -->
  340. <!-- 缺陷 -->
  341. <el-container v-if="activeName === '3'" class="is-vertical">
  342. <section class="main-section contain">
  343. <bugTableDialog ref="bugTableDialog" :show-hide="true" no-show="taskName" :obj-id="{ taskId: taskId }" />
  344. </section>
  345. </el-container>
  346. <!-- 缺陷 -->
  347. <!-- 报告 -->
  348. <el-container v-if="activeName === '4'" class="is-vertical">
  349. <report-list />
  350. </el-container>
  351. <!-- 报告 -->
  352. <!-- 统计 -->
  353. <el-container v-if="activeName === '5'" class="is-vertical">
  354. <section class="main-section contain">
  355. <data-statistics ref="data-statistics" />
  356. </section>
  357. </el-container>
  358. <!-- 统计 -->
  359. <!-- 发布 -->
  360. <el-container v-if="activeName === '6'" class="is-vertical">
  361. <publishTask
  362. v-if="loaded"
  363. :task-id="form_query.id"
  364. :task-name="form_query.name"
  365. :user-names="userNames"
  366. :user-information="userInformation"
  367. />
  368. </el-container>
  369. <!-- 发布 -->
  370. <!-- 新建(bug) -->
  371. <createdBug v-if="bug_open" ref="createdBug" @getBugList="reloadList" />
  372. <create-children v-if="createChildren" :visible.sync="createChildren" :data="form_query" :new-add="true" @change="reloadList" />
  373. <Test-report v-if="dialogTest" ref="TestReport" />
  374. <Daily-report v-if="dialogDaily" ref="DailyReport" />
  375. <ReleaseReport v-if="dialogClient" ref="ClientReport" />
  376. <!-- 新建 -->
  377. <!-- 编辑 -->
  378. <open-dialog v-if="updateVisible" ref="task_createdUpdata" />
  379. <!-- 编辑 -->
  380. <!-- 删除 -->
  381. <el-dialog :visible.sync="deleteVisible" title="删除确认" class="public_task" width="30%" :close-on-click-modal="false">
  382. <div class="blueStripe" />
  383. <div align="center">确定要删除此 {{ form_query.name }} 任务吗?</div>
  384. <span slot="footer" class="dialog-footer">
  385. <el-button size="mini" @click="deleteVisible = false">关 闭</el-button>
  386. <el-button size="mini" type="primary" @click="taskDelete()">确 定</el-button>
  387. </span>
  388. </el-dialog>
  389. <!-- 删除 -->
  390. <task-dialog v-if="showTaskDialog" :show.sync="showTaskDialog" :task-id="taskIds.id" :status-name="taskIds.statusString" @getList="taskGet" />
  391. <!-- 排期锁定 -->
  392. <schedule ref="ScheduleEvent" :visible.sync="scheduleVisble" :name="'任务'" :is-schedule-locked="isScheduleLocked" :require-id="taskId" @updataData="getScheduleGetTaskScheduleHistory" />
  393. <!-- 排期锁定 -->
  394. <!-- 状态及工作流 -->
  395. <workflowAndStatus
  396. :visible.sync="dialogVisible"
  397. :name="'任务'"
  398. :dpmrequired="toilp"
  399. @update="taskGet(); dialogVisible=false "
  400. />
  401. <!-- 状态及工作流 -->
  402. <!-- 同步望月 -->
  403. <synchronize-dialog
  404. v-if="synchronizeDialog"
  405. :id="taskId"
  406. :data="form_query.relatedDpmTaskInfo"
  407. :visible.sync="synchronizeDialog"
  408. @change="taskGet()"
  409. />
  410. <!-- 同步望月 -->
  411. <drawer
  412. ref="drawer"
  413. title="任务成员"
  414. center
  415. :display.sync="display"
  416. width="28%"
  417. :delete="form_query"
  418. :types="false"
  419. :inner="true"
  420. :mask="false"
  421. @childValInput="childVal"
  422. @click.stop
  423. />
  424. <checkListStopConfirm
  425. :visible="checklistStopVisible"
  426. @confirm="checklistConfirm"
  427. @cancel="checklistCancel"
  428. />
  429. </el-container>
  430. </div>
  431. </template>
  432. <script>
  433. const _ = require('lodash')
  434. import Vue from 'vue'
  435. import VueClipboard from 'vue-clipboard2'
  436. Vue.use(VueClipboard)
  437. // import { mapGetters } from 'vuex'
  438. // import store from '@/store'
  439. import { EncryptId, analysisBizId_id } from '@/utils/crypto-js.js'
  440. import {
  441. taskGet,
  442. configShowTaskEnum,
  443. tasktaskDelete,
  444. taskUpdate,
  445. commentCreate,
  446. commentList,
  447. taskHold,
  448. taskUnhold,
  449. taskOpenOrClose,
  450. configShowRequirementVersionEnum,
  451. scheduleGetTaskScheduleHistory
  452. } from '@/api/taskIndex'
  453. import checkListStopConfirm from '@/components/checkListStopConfirm'
  454. import { listByTask, taskUpdates } from '@/api/projectViewDetails'
  455. import { projectListProject, scheduleGetHistoryScheduleById, taskListAvailableDpmTask, taskSetTaskRelated, taskDeleteRelationship } from '@/api/requirement.js'
  456. import searchPeople from '@/components/select/searchPeople'
  457. import textArea from '@/components/input/textArea'
  458. import drawer from '@/views/projectManage/Drawer'
  459. import image_url from '@/assets/home_images/home_u.png'
  460. import createdBug from '@/views/projectManage/bugList/file/createdBug'
  461. import openDialog from '@/views/projectManage/dialog_vue'
  462. import createChildren from './childrenTask/createChildren'
  463. import childrenList from './childrenTask/childrenList'
  464. import scheduleList from './components/scheduleList'
  465. import reportList from './components/reportList'
  466. import dataStatistics from './components/dataStatistics'
  467. import TestReport from '@/views/reportManagement/components/TestingReport' // 提测
  468. import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
  469. import ReleaseReport from '@/views/reportManagement/components/ReleaseReport' // 准出
  470. import stage from '@/assets/detailPage/风险状态.png'
  471. import stage1 from '@/assets/detailPage/正常状态.png'
  472. import stage2 from '@/assets/detailPage/延期状态.png'
  473. import taskDialog from '@/views/projectManage/taskList/dialog/taskDialog' // 任务状态修改(已上线/已提测/已准出)
  474. import bugTableDialog from '@/views/projectManage/bugList/details/bugTableDialog' // 缺陷表格
  475. import publishTask from '@/views/projectManage/publishTask'
  476. import schedule from '@/views/projectManage/schedule' // 排期锁定弹窗
  477. import download from '@/views/projectManage/components/export.vue'
  478. import record from '@/views/projectManage/components/record.vue'
  479. import timeLine from '@/views/projectManage/components/timeLine.vue'
  480. import { dailyReportCheckStatus, reportreleaseCheckStatus, reportdelivertestCheckStatus } from '@/api/reportTemplate'
  481. import synchronizeDialog from './dialog/synchronizeDialog' // 同步弹框
  482. import workflowAndStatus from '@/views/projectManage/components/workflowAndStatus.vue'
  483. import { formatHMS } from '@/utils/global'
  484. import testPlan from '@/views/projectManage/components/testPlan.vue'
  485. import Tag from '@/components/Tag'
  486. export default {
  487. components: {
  488. searchPeople,
  489. textArea,
  490. drawer,
  491. createdBug,
  492. openDialog,
  493. createChildren,
  494. childrenList,
  495. scheduleList,
  496. reportList,
  497. dataStatistics,
  498. TestReport,
  499. DailyReport,
  500. ReleaseReport,
  501. taskDialog,
  502. bugTableDialog,
  503. schedule,
  504. download,
  505. record,
  506. timeLine,
  507. workflowAndStatus,
  508. synchronizeDialog,
  509. publishTask,
  510. testPlan,
  511. Tag,
  512. checkListStopConfirm // checklist拦截弹窗
  513. },
  514. filters: {
  515. ellipsis(value, num) {
  516. if (!value) return ''
  517. if (value.length > num) {
  518. return value.slice(0, num) + '...'
  519. }
  520. return value
  521. }
  522. },
  523. data() {
  524. return {
  525. textTips: ['每个任务仅支持一次提测和一次准出,请合理拆解任务后再排期。', '任务状态未变更【已排期】前,排期不可锁定;状态变更为【已排期】时,任务排期将被系统自动锁定。', '需求排期锁定时,任务排期将全部被锁定;所有任务锁定时,需求排期将被系统自动锁定。', '任务排期锁定后,如果解锁了排期,排期将在24小时后再次自动锁定。请解锁后,及时进行排期调整。', '任务新增、修改、删除排期时,系统会于半小时后将任务排期及交付时间同步至望岳。若多个任务关联同一个望岳任务,同步时排期会汇总一并同步到望岳,交付时间则按最晚日期同步至望岳。'],
  526. autoLockScheduleCountdown: '--', // 解锁剩余时间
  527. timer: null, // 定时器
  528. isShowLockedTime: false, // 是否显示解锁倒计时
  529. tabPosition: 'first',
  530. textarea2: '',
  531. textarea1: '',
  532. HoldTask: '',
  533. closeTask: '',
  534. bizId: '',
  535. visible: false, // Hold任务
  536. taskVisible: false, // 关闭任务
  537. dialogVisible: false,
  538. showunlock: true,
  539. taskCode: true,
  540. toilp: '',
  541. ScheduId: '', // 排期ID
  542. LockState: {}, // 锁定状态
  543. tips: '', // 后加入需求的任务排期提示
  544. scheduleVisble: false, // 排期锁定
  545. isParentRequireScheduleLocked: '',
  546. BackToTheLatest: true, // 显示添加排期按钮
  547. lockHide: false, // 隐藏排期变更记录
  548. SchedulingContent: [], // 排期历史变更记录
  549. stageImg: stage,
  550. normalImg: stage1,
  551. warningImg: stage2,
  552. activeName: '1', // 顶部tab切换
  553. userInformation: localStorage.getItem('username'),
  554. userNames: localStorage.getItem('realname'),
  555. textarea: '', // 评论
  556. showTaskDialog: false, // 状态弹窗
  557. taskId: -1, // 任务id
  558. allStatus: [], // 任务所有状态
  559. belongProjectList: [], // 所属项目列表
  560. requireList: [], // 所属需求列表
  561. appClient: [], // 跟版客户端列表
  562. taskScheduleEvent: [], // 排期类型
  563. dependList: [{ msg: '否', code: 2 }, { msg: '是', code: 1 }], // 是否跟版
  564. form_query: {},
  565. display: false, // 设置成员弹框
  566. isScheduleLocked: '', // 锁定状态1锁定0未锁定
  567. num: 0, // 成员数量
  568. image_url: image_url, // 成员icon
  569. createChildren: false, // 新建子任务弹框
  570. updateVisible: false, // 编辑任务弹框
  571. deleteVisible: false, // 删除任务弹框
  572. bug_open: false, // 新建缺陷弹框
  573. dialogTest: false, // 新建提测报告
  574. dialogDaily: false, // 新建测试日报
  575. dialogClient: false, // 新建准出报告
  576. iterationList: [], // 所属迭代列表
  577. commentContent: null, // 评论内容
  578. comments: [], // 评论列表
  579. taskIds: '', // 将要修改状态的任务id
  580. synchronizeDialog: false, // 同步任务至望月弹框
  581. dplOption: [], // 关联的望岳任务
  582. checklistStopVisible: false, // checklist拦截弹窗是否显示
  583. firstChecklistTaskId: -1,
  584. loaded: false // 是否请求到当前任务的task信息
  585. }
  586. },
  587. computed: {
  588. getStatus() {
  589. return this.allStatus.find(item => item.code === this.form_query.status) || { name: null }
  590. }
  591. // ...mapGetters(['bizId'])
  592. },
  593. watch: {
  594. activeName: {
  595. handler(newV) {
  596. Number(newV) > 0
  597. ? this.$router.replace({ path: this.$route.path, query: { ...this.$route.query, page: newV }})
  598. : this.$router.replace({ path: this.$route.path, query: { ...this.$route.query, page: '1' }})
  599. }
  600. }
  601. },
  602. created() {
  603. this.analysisBizId_id()
  604. this.$nextTick(() => {
  605. this.activeName = this.$route.query.page ? this.$route.query.page : '1'
  606. })
  607. this.$store.state.data.status = true
  608. },
  609. destroyed() {
  610. clearInterval(this.timer)
  611. this.$store.state.data.status = false
  612. },
  613. methods: {
  614. analysisBizId_id() { // 解析路由中的bizId_id
  615. if (!this.$route.query.bizId_id) return
  616. const bizId_id = analysisBizId_id(this.$route.query.bizId_id)
  617. this.bizId = bizId_id[0]
  618. this.taskId = bizId_id[1]
  619. this.taskGet()
  620. this.getTaskStatus()
  621. this.getBelongProject()
  622. this.getRequireList()
  623. this.getCommentList()
  624. this.getScheduleGetTaskScheduleHistory()
  625. },
  626. async getScheduleGetTaskScheduleHistory() {
  627. this.scheduleVisble = false
  628. const res = await scheduleGetTaskScheduleHistory(this.taskId)
  629. this.SchedulingContent = res.data
  630. const res1 = await listByTask(this.taskId)
  631. this.isScheduleLocked = res1.data.isScheduleLocked
  632. this.isShowLockedTime = false
  633. if (res1.data.isScheduleLocked !== 1 && res1.data.autoLockScheduleCountdown > 0) {
  634. this.isShowLockedTime = true
  635. let totolTime = res1.data.autoLockScheduleCountdown || 6000
  636. clearInterval(this.timer)
  637. this.timer = setInterval(() => {
  638. totolTime = totolTime - 1000
  639. this.autoLockScheduleCountdown = formatHMS(totolTime)
  640. if (totolTime < 1000) {
  641. this.isScheduleLocked = 1
  642. clearInterval(this.timer)
  643. }
  644. }, 1000)
  645. }
  646. this.tips = res1.data.tips
  647. this.isParentRequireScheduleLocked = res1.data.isParentRequireScheduleLocked
  648. this.$refs.taskSchedule.listByTask(this.taskId)
  649. this.taskGet()
  650. },
  651. async getSchedule() {
  652. this.scheduleVisble = false
  653. const res = await scheduleGetTaskScheduleHistory(this.taskId)
  654. this.SchedulingContent = res.data
  655. const res1 = await listByTask(this.taskId)
  656. this.isScheduleLocked = res1.data.isScheduleLocked
  657. this.tips = res1.data.tips
  658. this.isParentRequireScheduleLocked = res1.data.isParentRequireScheduleLocked
  659. },
  660. async clickScheduling(ele) {
  661. this.showunlock = false
  662. this.ScheduId = ele.id
  663. const res = await scheduleGetHistoryScheduleById(ele.id)
  664. this.taskScheduleEvent = res.data.scheduleDetailRespons
  665. this.BackToTheLatest = false
  666. },
  667. clickBackToTheLatest() {
  668. this.showunlock = true
  669. this.BackToTheLatest = true
  670. this.lockHide = false
  671. this.$refs.taskSchedule.listByTask(this.taskId)
  672. },
  673. async setChangeArea(e) {
  674. const user = { name: localStorage.getItem('username'), ename: localStorage.getItem('realname'), id: '' }
  675. const taskInfoDO = this.form_query
  676. const resTask = await taskUpdate({ taskInfoDO, user })
  677. if (resTask.code === 200) {
  678. this.$message({ message: '修改成功', type: 'success', offset: 150 })
  679. }
  680. },
  681. changeSchedule() { // 修改锁定状态
  682. if (this.isParentRequireScheduleLocked === 1) {
  683. this.$message({ message: '无法解锁,请先变更归属需求的排期状态为未锁定状态!', type: 'error', duration: 3000, offset: 150 })
  684. } else {
  685. this.scheduleVisble = true
  686. }
  687. },
  688. changeTaskClose(e) {
  689. console.log(this.closeTask)
  690. if (e) {
  691. this.taskCode = e
  692. } else {
  693. this.taskCode = false
  694. }
  695. if (this.closeTask === '关闭任务') {
  696. this.taskVisible = !this.taskVisible
  697. this.textarea1 = ''
  698. }
  699. if (this.closeTask === '解除关闭任务') {
  700. this.taskOpenOrClose()
  701. }
  702. },
  703. async taskOpenOrClose(val) {
  704. const data = { id: this.taskId, remark: val, closeStatus: -3 }
  705. if (this.closeTask === '关闭任务') {
  706. data.remark = val
  707. data.closeStatus = -4
  708. } else if (this.closeTask === '解除关闭任务') {
  709. data.closeStatus = -3
  710. }
  711. const res = await taskOpenOrClose(data)
  712. if (res.code === 200) {
  713. this.taskGet()
  714. this.$refs.timeLine.taskGetWorkFlow()
  715. this.visible = false
  716. this.$message({ message: '已修改任务状态', type: 'success', duration: 1000, offset: 150 })
  717. }
  718. },
  719. changeBtn() {
  720. if (this.HoldTask === 'Hold 任务') {
  721. this.visible = !this.visible
  722. this.textarea2 = ''
  723. }
  724. if (this.HoldTask === '解除 Hold') {
  725. this.taskHold()
  726. }
  727. },
  728. async taskHold(val) { // 锁定Hold
  729. if (this.HoldTask === 'Hold 任务') {
  730. const res = await taskHold(this.taskId, { 'remark': val })
  731. if (res.code === 200) {
  732. this.taskGet()
  733. this.$refs.timeLine.taskGetWorkFlow()
  734. this.visible = false
  735. this.$message({ message: '已修改状态为 Hold', type: 'success', duration: 1000, offset: 150 })
  736. }
  737. }
  738. if (this.HoldTask === '解除 Hold') {
  739. const res = await taskUnhold(this.taskId)
  740. if (res.code === 200) {
  741. this.taskGet()
  742. this.allStatus = []
  743. this.allStatus.push({ code: -2, msg: 'Hold' })
  744. this.$refs.timeLine.taskGetWorkFlow()
  745. this.$message({ message: 'Hold 状态已解除', type: 'success', duration: 1000, offset: 150 })
  746. }
  747. }
  748. },
  749. async changeArea(e) { // area修改
  750. const taskInfoDO = _.cloneDeep(this.form_query)
  751. taskInfoDO.rdOwner === null ? taskInfoDO.rdOwner = '' : ''
  752. taskInfoDO.qaOwner === null ? taskInfoDO.qaOwner = '' : ''
  753. const user = {
  754. name: localStorage.getItem('username'),
  755. ename: localStorage.getItem('realname'),
  756. id: ''
  757. }
  758. const res = await taskUpdate({ taskInfoDO, user })
  759. if (res.code === 200) {
  760. this.$message({ message: '修改成功', type: 'success', duration: 1000, offset: 150 })
  761. }
  762. this.taskGet()
  763. },
  764. async getBelongProject() { // 获取所属项目列表
  765. const res = await projectListProject({ bizId: this.bizId })
  766. if (res.code === 200) {
  767. this.belongProjectList = res.data
  768. }
  769. },
  770. async getRequireList() { // 获取所属需求列表
  771. const res = await configShowRequirementVersionEnum({ bizId: this.bizId })
  772. if (res.code === 200) {
  773. this.requireList = res.data
  774. }
  775. },
  776. async getTaskStatus() { // 获取任务状态列表,跟版客户端列表
  777. const res = await configShowTaskEnum()
  778. if (res.code === 200) {
  779. this.taskScheduleEvent = res.data.taskScheduleEvent || []
  780. this.appClient = res.data.appClient.map(item => {
  781. return {
  782. ...item,
  783. code: `${item.code}`
  784. }
  785. })
  786. }
  787. },
  788. async taskGet() { // 获取任务详情
  789. const res = await taskGet(this.taskId)
  790. if (res.code === 200) {
  791. this.form_query = res.data
  792. this.form_query.tags = res.data.tags || []
  793. if (!this.loaded) {
  794. this.loaded = true
  795. }
  796. if (this.form_query.isDirectlyFromDpm === 0 || this.form_query.isDirectlyFromDpm === 1) {
  797. this.toilp = this.form_query.relatedDpmTaskInfo.taskId + this.form_query.relatedDpmTaskInfo.name
  798. }
  799. this.allStatus = res.data.availableStatusList
  800. this.$refs.timeLine.taskGetWorkFlow()
  801. this.$refs.record.operationLogTask()
  802. }
  803. },
  804. async getCommentList() { // 获取任务评论
  805. const res = await commentList({ type: 3, joinId: this.taskId })
  806. if (res.code === 200) {
  807. this.comments = res.data
  808. this.commentContent = ''
  809. }
  810. },
  811. async addComment() { // 发表任务评论
  812. if (this.commentContent.replace(/\s+/g, '') === '' || this.commentContent === null) {
  813. this.$message.warning('评论不能为空')
  814. return
  815. }
  816. const commentInfo = {
  817. joinId: this.taskId,
  818. content: this.commentContent,
  819. type: 3,
  820. fatherId: 0,
  821. name: this.userNames,
  822. email: this.userInformation
  823. }
  824. const user = { name: this.userNames, ename: this.userInformation, id: '' }
  825. const res = await commentCreate({ commentInfo, user })
  826. if (res.code === 200) {
  827. this.$message({ message: '评论成功', type: 'success', duration: 1000, offset: 150 })
  828. this.getCommentList()
  829. } else {
  830. this.$message.warning(res.msg)
  831. }
  832. },
  833. async updateStatus(e) { // 状态改变
  834. if (e.status === 60 || e.status === 70 || e.status === 90 || e.status === 100) {
  835. this.taskIds = this.form_query
  836. this.allStatus.map(item => {
  837. item.code === e.status ? this.taskIds.statusString = e.label : ''
  838. })
  839. this.showTaskDialog = true
  840. this.taskIds.status = e.status
  841. return
  842. } else {
  843. const user = {
  844. name: localStorage.getItem('username'),
  845. ename: localStorage.getItem('realname'),
  846. id: ''
  847. }
  848. const taskInfoDO = this.form_query
  849. taskInfoDO.status = e.status
  850. const resTask = await taskUpdates({ taskInfoDO, user })
  851. if (resTask.code === 200) {
  852. this.$refs.timeLine.taskGetWorkFlow()
  853. this.$refs.record.operationLogTask()
  854. this.taskGet()
  855. this.$message({ message: '修改成功', type: 'success', offset: 150 })
  856. }
  857. }
  858. },
  859. clickAddScheduling() { // 模拟调用自组件方法
  860. this.$refs.taskSchedule.addSchedule()
  861. },
  862. scheduleHiHide() { // 排期变更显示隐藏
  863. this.lockHide = !this.lockHide
  864. this.BackToTheLatest = true
  865. this.showunlock = true
  866. this.ScheduId = ''
  867. },
  868. childVal(val) {
  869. this.num = val
  870. },
  871. setChild() { // 设置成员
  872. this.$refs.drawer.getRoleList()
  873. },
  874. open_created(type) { // 编辑任务
  875. this.updateVisible = true
  876. if (type === 'update') {
  877. this.$nextTick(() => {
  878. this.$refs.task_createdUpdata.init(3, [{ type: 'update' }, this.taskId])
  879. })
  880. } else if (type === 'copy') {
  881. this.$nextTick(() => {
  882. this.$refs.task_createdUpdata.init(3, [{ type: 'copy', name: this.form_query.name }, this.taskId])
  883. })
  884. }
  885. },
  886. async taskDelete() { // 删除任务
  887. const user = { name: this.userNames, ename: this.userInformation, id: '' }
  888. const res = await tasktaskDelete(user, this.taskId)
  889. if (res.code === 200) {
  890. this.$message({ message: '删除成功', type: 'success', duration: 1000, offset: 150 })
  891. this.$router.push({ name: '任务', query: {}})
  892. }
  893. },
  894. created_bug() { // 缺陷创建
  895. this.bug_open = true
  896. this.$nextTick(() => {
  897. this.$refs.createdBug.init(1, { id: this.taskId })
  898. })
  899. },
  900. createReport(e, ele) { // 创建报告
  901. switch (e) {
  902. case 1: // 提测
  903. reportdelivertestCheckStatus([this.taskId]).then(res => {
  904. if (res.code === 200) {
  905. if (res.data) {
  906. this.checklistStopVisible = true
  907. this.firstChecklistTaskId = res.data
  908. return
  909. }
  910. this.dialogTest = true
  911. this.$nextTick(() => { this.$refs.TestReport.init(7, [this.taskId]) })
  912. }
  913. })
  914. break
  915. case 2: // 日报
  916. dailyReportCheckStatus([this.taskId]).then(res => {
  917. if (res.code === 200) {
  918. this.dialogDaily = true
  919. this.$nextTick(() => {
  920. this.$refs.DailyReport.init(7, [this.taskId])
  921. })
  922. }
  923. })
  924. break
  925. case 3:
  926. reportreleaseCheckStatus([this.taskId]).then(res => {
  927. if (res.code === 200) {
  928. this.dialogClient = true
  929. this.$nextTick(() => { this.$refs.ClientReport.init(7, [this.taskId]) })
  930. }
  931. })
  932. break
  933. }
  934. },
  935. jump(page, id) { // 跳转
  936. const bizId_id = EncryptId(`${id.requireProjectBizId}_${id.projectId}`)
  937. this.$router.push({ name: page, query: { bizId_id: bizId_id }})
  938. },
  939. jumps(page, id) { // 跳转
  940. const bizId_id = EncryptId(`${id.requireIdBizId}_${id.requireId}`)
  941. this.$router.push({ name: page, query: { bizId_id: bizId_id }})
  942. },
  943. reloadList() {
  944. this.taskGet()
  945. if (this.$refs['bugTableDialog']) {
  946. this.$refs['bugTableDialog'].bugQzGetTableList()
  947. }
  948. if (this.$refs['data-statistics']) {
  949. this.$refs['data-statistics'].getRequireSumData()
  950. }
  951. if (this.$refs['children-list']) {
  952. this.$refs['children-list'].getSubTasksList()
  953. }
  954. },
  955. returnEmpty(val) {
  956. return val || ''
  957. },
  958. copyName(name) { // 复制名字
  959. this.$message({ message: '复制成功', type: 'success', duration: 1000, offset: 150 })
  960. },
  961. dpmUrl(url) {
  962. window.open(url, '_blank')
  963. },
  964. async getDplList(taskId) { // 获取关联望岳任务
  965. const res = await taskListAvailableDpmTask(taskId)
  966. if (res.code === 200) {
  967. this.dplOption = res.data
  968. }
  969. },
  970. throttle: _.throttle(function() {
  971. this.synchronize(...arguments)
  972. }, 5000, {
  973. leading: true,
  974. trailing: false
  975. }),
  976. async synchronize(id) { // 关联至望岳
  977. const res = await taskSetTaskRelated(this.taskId, id)
  978. if (res.code === 200) {
  979. this.taskGet()
  980. this.$message({ message: '关联成功', type: 'success', duration: 1000, offset: 150 })
  981. }
  982. },
  983. async deleteDpl() { // 取消关联
  984. const res = await taskDeleteRelationship(this.taskId)
  985. if (res.code === 200) {
  986. this.taskGet()
  987. this.$message({ message: '已取消关联', type: 'success', offset: 150 })
  988. }
  989. },
  990. checklistConfirm() {
  991. this.checklistStopVisible = false
  992. const { bizId = null } = this.$store.state.global || {}
  993. const bizId_id = EncryptId(`${bizId}_${this.firstChecklistTaskId}`)
  994. const newTab = this.$router.resolve({ name: '任务详情', query: { bizId_id: bizId_id, page: 6 }})
  995. window.open(newTab.href, '_blank')
  996. },
  997. checklistCancel() {
  998. this.checklistStopVisible = false
  999. this.dialogTest = true
  1000. this.$nextTick(() => { this.$refs.TestReport.init(7, [this.taskId]) })
  1001. }
  1002. }
  1003. }
  1004. </script>
  1005. <style scoped lang="less">
  1006. @import '@/styles/detail-pages.less';
  1007. .border-top {
  1008. margin: 0 20px;
  1009. /deep/.el-form-item {
  1010. margin: 0 30px 10px 0;
  1011. }
  1012. /deep/.el-divider--horizontal {
  1013. display: block;
  1014. height: 1px;
  1015. width: 100%;
  1016. margin: 10px 0;
  1017. }
  1018. }
  1019. /deep/.el-button {
  1020. cursor: pointer;
  1021. }
  1022. .hide-open-header();
  1023. .bg-project {
  1024. .bg-project();
  1025. }
  1026. .hide-sidebar .main-header {
  1027. .normal-main-header()
  1028. }
  1029. .top-sidebar .main-header {
  1030. .top-main-header()
  1031. }
  1032. .open-sidebar .main-header {
  1033. .left-main-header();
  1034. }
  1035. .main-header {
  1036. .main-header();
  1037. .title-name {
  1038. cursor: pointer;
  1039. }
  1040. .synchronize-icon {
  1041. position: relative;
  1042. img {
  1043. width: 60px;
  1044. }
  1045. }
  1046. .sty-icon {
  1047. position: absolute;
  1048. right: -5px;
  1049. top: -5px;
  1050. background: #eee;
  1051. border-radius: 50%;
  1052. }
  1053. }
  1054. .main-header::after {
  1055. .main-header-after();
  1056. }
  1057. .contain {
  1058. height: calc(100vh - 140px);
  1059. overflow: scroll;
  1060. }
  1061. .main-section {
  1062. .main-section();
  1063. .require-plan {
  1064. display: flex;
  1065. align-items: center;
  1066. span {
  1067. margin-left: 20px;
  1068. color: #E6A23C;
  1069. font-size: 12px;
  1070. }
  1071. }
  1072. .task-help-tips {
  1073. display: flex;
  1074. flex-direction: column;
  1075. margin: 0 30px;
  1076. padding: 15px 13px 5px;
  1077. border-radius: 4px;
  1078. background-color: rgba(64, 158, 255,0.1);
  1079. .tips-icon {
  1080. width: 100%;
  1081. font-size: 14px;
  1082. font-weight: 550;
  1083. line-height: 24px;
  1084. color: #333333;
  1085. i {
  1086. background: #1890FF;
  1087. color: #e0eefd;
  1088. border-color: #e0eefd;
  1089. border-radius: 50%;
  1090. }
  1091. }
  1092. .tips-context {
  1093. width: 100%;
  1094. font-size: 12px;
  1095. line-height: 20px;
  1096. color: #444444;
  1097. }
  1098. }
  1099. .schedule-control {
  1100. display: flex;
  1101. justify-content: flex-end;
  1102. margin: 5px 10px;
  1103. }
  1104. .detail-info {
  1105. padding: 0 34px 20px 34px;
  1106. /deep/.el-input__inner{
  1107. border: 1px solid rgba(220,223,230,0)
  1108. }
  1109. /deep/.el-input__inner:hover{
  1110. border: 1px solid rgba(220,223,230,1)
  1111. }
  1112. /deep/.is-focus .el-input__inner {
  1113. border: 1px solid rgb(64, 158, 255);
  1114. }
  1115. /deep/.el-select{
  1116. .el-input__suffix-inner {
  1117. visibility: hidden;
  1118. }
  1119. }
  1120. /deep/.el-select:hover{
  1121. .el-input__suffix-inner {
  1122. visibility: visible;
  1123. }
  1124. }
  1125. .demo-form-inline {
  1126. .el-form-item {
  1127. width: 33%;
  1128. margin-right: 0;
  1129. }
  1130. }
  1131. .comment-main {
  1132. list-style: none;
  1133. padding: 15px 0 0 0;
  1134. margin: 0 0 20px 0;
  1135. li {
  1136. list-style: none;
  1137. padding: 0px;
  1138. margin: 0px 0px 25px 0;
  1139. }
  1140. .comment-name {
  1141. font-size:14px;
  1142. color:#333B4A;
  1143. }
  1144. .comment-gmtCreater {
  1145. margin-left:20px;
  1146. color: #9B9B9B;
  1147. font-size:12px
  1148. }
  1149. .comment-content {
  1150. font-size:14px;
  1151. color:#333B4A;
  1152. margin-top: 10px;
  1153. white-space: pre-line;
  1154. }
  1155. }
  1156. .PRD-link:hover{
  1157. color:#409EFF;
  1158. }
  1159. .PRD-link {
  1160. width: 50%;
  1161. overflow: hidden;
  1162. text-overflow:ellipsis;
  1163. white-space: nowrap;
  1164. }
  1165. }
  1166. }
  1167. .task-stage {
  1168. position: absolute;
  1169. left: 5px;
  1170. top: 0px;
  1171. z-index: 999;
  1172. .task-stage-main {
  1173. position: relative;
  1174. height: 52px;
  1175. width: 15.5px;
  1176. img{
  1177. height: 52px;
  1178. width: 15.5px;
  1179. }
  1180. .task-stage-title{
  1181. position: absolute;
  1182. left: 0;
  1183. right: 0;
  1184. top: 0;
  1185. bottom: 0;
  1186. color: #ffffff;
  1187. font-size: 10px;
  1188. text-align: center;
  1189. }
  1190. .small-size {
  1191. transform: scale(0.6);
  1192. position: absolute;
  1193. left: 0;
  1194. top: -15px;
  1195. }
  1196. }
  1197. }
  1198. /deep/.module .el-form-item__content {
  1199. display: inline-block;
  1200. width: calc(100% - 100px);
  1201. div {
  1202. line-height: 18px;
  1203. padding-top: 12px;
  1204. cursor: pointer;
  1205. }
  1206. div:hover{
  1207. color: #409EFF;
  1208. }
  1209. }
  1210. .form-progress {
  1211. width: 200px;
  1212. padding-top: 12px;
  1213. padding-left: 15px;
  1214. }
  1215. /deep/.el-input--small {
  1216. font-size: 14px;
  1217. }
  1218. .vss {
  1219. border:1px solid #409EFF !important;
  1220. color:#409EFF !important;
  1221. }
  1222. .sign-tabs {
  1223. padding: 0 30px;
  1224. }
  1225. .el-btn-size {
  1226. margin: 10px 30px 10px 10px;
  1227. }
  1228. .blueStr {
  1229. width:4px;
  1230. height:17px;
  1231. background:#409EFF;
  1232. border-radius:1px;
  1233. position: absolute;
  1234. top: 22px;
  1235. left: 15px;
  1236. }
  1237. </style>
  1238. <style lang="less">
  1239. .bg-project {
  1240. .tip {
  1241. color: #F56C6C;
  1242. text-align: left;
  1243. padding: 0 14px;
  1244. font-size: 12px;
  1245. .icon {
  1246. margin-right: 2px;
  1247. }
  1248. }
  1249. }
  1250. .synchronize {
  1251. .el-popover__title {
  1252. color: #333333;
  1253. padding: 10px 20px;
  1254. }
  1255. .task-object-list {
  1256. width: 100%;
  1257. overflow: scroll;
  1258. cursor: pointer;
  1259. .task-item {
  1260. width: 100%;
  1261. white-space: nowrap;
  1262. color: #999999;
  1263. margin-bottom: 5px;
  1264. .item-id {
  1265. padding-right: 20px;
  1266. }
  1267. .item-name {
  1268. color: #333333;
  1269. padding-right: 20px;
  1270. }
  1271. }
  1272. }
  1273. .task-object-list::-webkit-scrollbar {
  1274. display: none;
  1275. }
  1276. }
  1277. .el-main-title .el-popper[x-placement^=bottom] {
  1278. margin: 12px 10px 0 0;
  1279. width: 300px;
  1280. }
  1281. .tag-from {
  1282. .el-form-item__content {
  1283. width: calc(100% - 100px);
  1284. }
  1285. }
  1286. </style>