demand.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. <template>
  2. <!-- 表头 -->
  3. <div class="schedule-list">
  4. <el-table v-if="tableHeader === false" max-height="38px" :data="datas" class="tableHeader" border size="mini" :header-cell-style="{ background: 'rgba(247,247,247,1)', color: 'rgb(74, 74, 74)', fontSize: '14px', fontWeight: '500'}" @selection-change="changeCheckout(1)">
  5. <el-table-column v-if="locking" type="selection" width="50" align="center" />
  6. <el-table-column prop="date" label="任务" width="300" />
  7. <el-table-column prop="taskStatus" label="任务状态" width="150" />
  8. <el-table-column prop="type" label="类型" min-width="70" />
  9. <el-table-column prop="desc" label="描述" min-width="140" />
  10. <el-table-column prop="seperateDaysNoHoliday" label="排期" min-width="160" />
  11. <el-table-column prop="dayLength" label="时长" min-width="50" />
  12. <el-table-column prop="peopleList" label="参与人员" min-width="150" />
  13. <el-table-column prop="dayLength" label="关联任务" min-width="80" />
  14. <el-table-column label="操作" width="120" />
  15. </el-table>
  16. <div v-if="tableHeader === true" class="Layout_space_between" style="height: 40px;;border: 1px solid #EBEEF5;">
  17. <div class="Layout_flex_start" style="width: 90%">
  18. <el-checkbox v-model="checkAlls" style="padding: 17.5px; line-height: 20px; border-right: 1px solid #EBEEF5" @change="changeCheckout(checkAlls)" />
  19. <div style="margin: 0 30px 0 10px" class="endCheck"> 已选择 <span style="color:rgba(64,158,255,1) ">{{ taskList.length }}</span> 个</div>
  20. <div class="endCheck cursorPo" @click="clickAddScheduling(1)"><i class="el-icon-document" /> 添加排期</div>
  21. </div>
  22. <div class="endCheck cursorPo" @click="Deselect">取消选择</div>
  23. </div>
  24. <!-- 表头 -->
  25. <!-- 任务表格 -->
  26. <el-table ref="taskList" :data="tableData" :cell-class-name="addClass" :header-cell-style="{ background: 'rgba(247,247,247,1)', color: 'rgb(74, 74, 74)', fontSize: '14px', fontWeight: '500'}" border :show-header="false" @selection-change="handleSelectionChange">
  27. <el-table-column v-if="locking" type="selection" width="50" align="center" />
  28. <el-table-column label="任务" width="300">
  29. <template slot-scope="scope">
  30. <div v-show="!scope.row.vsInput">
  31. <div class="templatName">
  32. <div class="involveApp-top-bottom el-involveApp">{{ scope.row.involveAppString || "" }} </div>
  33. <el-tooltip v-if="scope.row.moduleInfoName" class="item" effect="dark" :content="scope.row.moduleInfoName" placement="top">
  34. <div ref="Simulation">{{ scope.row.moduleInfoName | ellipsis }}</div>
  35. </el-tooltip>
  36. <div v-else ref="Simulation" style="visibility: hidden;">{{ '你好' }}</div>
  37. </div>
  38. <div class="templatTaskName cursorPo" @click="clickTemplatTaskName(scope.row.id)">{{ scope.row.name }}</div>
  39. <div class="templatCreator">
  40. <el-tooltip class="item" effect="dark" content="点击修改" placement="top">
  41. <el-popover placement="bottom" title="开发负责人" width="400" trigger="click">
  42. <div class="blueStr" />
  43. <el-input v-model="form_query.rdOwner" clearable size="small" style="width: 100%; margin-bottom: 10px;" placeholder="请输入姓名或邮箱前缀" @input="remoteMethod" />
  44. <div style="height: 200px; overflow: hidden; overflow-y: auto;">
  45. <div v-for="(item, index) in memberIDAP" :key="index" class="Layout_space_between involveApp-top-bottom cursorPo" @click="changeTaskName(scope.row, item, 1)">
  46. <span class="item-detail">{{ item.deptName }}</span>
  47. <span class="item-details" style="min-width:80px">{{ item.name }}</span>
  48. <span class="item-detail">{{ item.idap }}</span>
  49. </div>
  50. </div>
  51. <span slot="reference" class="cursorPo" @click="setRdOwner(scope.row.rdObject.name)">开发负责人:{{ scope.row.rdObject.name !== null? scope.row.rdObject.name: '无' }}</span>
  52. </el-popover>
  53. </el-tooltip>
  54. <el-tooltip class="item" effect="dark" content="点击修改" placement="top">
  55. <el-popover placement="bottom" title="测试负责人" width="400" class="iconPadding" trigger="click">
  56. <div class="blueStr" />
  57. <el-input v-model="form_query.name" clearable size="small" style="width: 100%; margin-bottom: 10px;" placeholder="请输入姓名或邮箱前缀" @input="remoteMethod" />
  58. <div style="height: 200px; overflow: hidden; overflow-y: auto;">
  59. <div v-for="(item, index) in memberIDAP" :key="index" class="Layout_space_between involveApp-top-bottom cursorPo" @click="changeTaskName(scope.row, item, 2)">
  60. <span class="item-detail">{{ item.deptName }}</span>
  61. <span class="item-details" style="min-width:80px">{{ item.name }}</span>
  62. <span class="item-detail">{{ item.idap }}</span>
  63. </div>
  64. </div>
  65. <span slot="reference" class="cursorPo" @click="setRemoteMethod(scope.row.qaObject.name)">测试负责人: {{ scope.row.qaObject.name !== null ? scope.row.qaObject.name: '无' }}</span>
  66. </el-popover>
  67. </el-tooltip>
  68. </div>
  69. <div class="Layout_space_between" style="margin-bottom: 10px;">
  70. <div v-if="scope.row.isDirectlyFromDpm === -2" style="visibility: hidden;">关联望岳</div>
  71. <span v-if="scope.row.isDirectlyFromDpm === 0 || scope.row.isDirectlyFromDpm === 1">
  72. <el-tooltip class="item" effect="dark" :content="scope.row.relatedDpmTaskInfo.taskId + ' ' + scope.row.relatedDpmTaskInfo.moduleInfoName + ' ' + scope.row.relatedDpmTaskInfo.name" placement="top">
  73. <img class="cursorPo img-logo" src="@/assets/home_images/WX20200914-141851@2x.png" @click="jump(scope.row.dpmUrl)">
  74. </el-tooltip>
  75. <i v-if="scope.row.isDirectlyFromDpm === 0" class="el-icon-circle-close sty-icon cursorPo" @click="delete_dpl(scope.row.id)" />
  76. </span>
  77. <el-popover v-if="scope.row.isDirectlyFromDpm === -1" placement="bottom" title="关联望岳任务" width="400" trigger="click">
  78. <div class="blueStr" />
  79. <div v-for="(item, index) in dplOption" :key="index" class="Layout_space_between involveApp-top-bottom cursorPo" @click="throttle(item, scope.row.id)">
  80. <span class="item-detail">{{ item.moduleInfoName }}</span>
  81. <span class="item-details">{{ item.name }}</span>
  82. <span class="item-detail">{{ item.taskId }}</span>
  83. </div>
  84. <div v-if="scope.row.isDirectlyFromDpm === -1" slot="reference" class="btn-dpl" style=" cursor: pointer;" @click="getDplList(scope.row.id)"> 关联望岳 </div>
  85. </el-popover>
  86. <div v-if="locking" class="iconEdit">
  87. <el-tooltip class="item cursorPo lineHeight" effect="dark" :content="scope.row.isScheduleLocked === 1? '点击解锁排期' : '点击锁定排期'" placement="top">
  88. <div :class="scope.row.isScheduleLocked === 1 ? 'el-icon-lock' : 'el-icon-unlock'" @click="changeSchedule(scope.row)" />
  89. </el-tooltip>
  90. <el-tooltip class="item cursorPo lineHeight" effect="dark" :content="'点击修改任务名称'" placement="top">
  91. <i class="el-icon-edit-outline cursorPo lineHeight" @click="editTask(scope.row)" />
  92. </el-tooltip>
  93. <el-tooltip class="item cursorPo lineHeight" effect="dark" :content="'点击添加排期'" placement="top">
  94. <i v-show="scope.row.isScheduleLocked === 0" class="el-icon-circle-plus-outline cursorPo lineHeight" @click="clickAddScheduling(2,scope.row)" />
  95. </el-tooltip>
  96. <el-tooltip class="item cursorPo lineHeight" effect="dark" :content="'同步任务排期至望岳'" placement="top">
  97. <el-popover v-if="scope.row.isDirectlyFromDpm === 0 || scope.row.isDirectlyFromDpm === 1" placement="bottom" title="同步排期至望岳" width="400" trigger="click">
  98. <div class="blueStr" />
  99. <div class="synchronization">是否需要同步当前任务的排期到望岳<span style="color: rgba(230,162,60,100%);"> {{ taskDpl }}</span> ?</div>
  100. <div v-if="taskDataList.length > 0" class="synchronization">以下任务与该望岳任务也关联,排期将一并同步,请知悉!</div>
  101. <div v-for="(item, index) in taskDataList" :key="index" class="Layout_space_between involveApp-top-bottom">
  102. <span class="item-detail">{{ item.taskId }}</span>
  103. <el-tooltip class="item" effect="dark" :content="item.name" placement="top">
  104. <span class="item-details">{{ item.name.substring(0,12) + '...' }}</span>
  105. </el-tooltip>
  106. <span class="item-detail">{{ item.moduleInfoName }}</span>
  107. </div>
  108. <div align="right" style="margin-top:20px;">
  109. <el-button size="mini" @click="$refs.Simulation.click()">取 消</el-button>
  110. <el-button size="mini" type="primary" @click="taskSyncScheduleToDpm(scope.row.id, taskDataList)">确 定</el-button>
  111. </div>
  112. <i slot="reference" class="el-icon-sort cursorPo deg" @click="getTaskList(scope.row)" />
  113. </el-popover>
  114. </el-tooltip>
  115. </div>
  116. </div>
  117. </div>
  118. <el-input v-if="scope.row.vsInput" ref="taskName" v-model="taskName" type="textarea" rows="4" placeholder="请输入内容" maxlength="150" show-word-limit @blur="changeTaskName(scope.row)" />
  119. </template>
  120. </el-table-column>
  121. <el-table-column width="150" align="center">
  122. <template slot-scope="scope">
  123. <el-select
  124. v-model="scope.row.status"
  125. :class="{
  126. 'status0':scope.row.status===0,
  127. 'status1':scope.row.status > 0 && scope.row.status <100,
  128. 'status2':scope.row.status===100,
  129. 'public_btn':scope.row.status!==10 || scope.row.status!==40 || scope.row.status!==20 || scope.row.status!==30,
  130. 'public_btn1':scope.row.status===40,
  131. 'public_btn2':scope.row.status===10,
  132. 'public_btn3':scope.row.status===20 || scope.row.status===30
  133. }"
  134. size="mini"
  135. @change="changeStatus(scope.row)"
  136. >
  137. <el-option v-for="item in scope.row.availableStatusList" :key="item.code" :label="item.name" :value="item.code" />
  138. </el-select>
  139. </template>
  140. </el-table-column>
  141. <el-table-column label="任">
  142. <template slot-scope="scope">
  143. <schedule-list :id="scope.row.id" ref="taskSchedule" :locking="locking" :select-task-list="taskList" :required-list="taskScheduleLists(scope.row.id)" @listByTask="listByTask(requirementId)" />
  144. </template>
  145. </el-table-column>
  146. </el-table>
  147. <!-- 任务表格 -->
  148. <!-- 日期详情 -->
  149. <el-row><span class="demandLayout">交付日期:</span><span class="demandeta">{{ dataList.endTime }}</span></el-row>
  150. <el-row><span class="demandLayout">排期:</span><span class="demandeta">{{ dataList.startTime || '' }} ~ {{ dataList.endTime }}</span></el-row>
  151. <el-row :gutter="20">
  152. <el-col v-for="(item, index) in scheduleDetail" :key="index" :span="6"><span class="demandLayout">{{ index }}:</span><span class="demandeta">{{ item.startTime }} ~ {{ item.endTime }}</span></el-col>
  153. </el-row>
  154. <el-row><span class="demandLayout">预计上线版本:</span> <span v-for="item in preOnlineVersion" :key="item" class="demandeta">{{ item }}</span></el-row>
  155. <!-- 日期详情 -->
  156. <!-- 排期锁定弹窗 -->
  157. <schedule ref="ScheduleEvent" :visible.sync="scheduleVisble" :name="'任务'" :is-schedule-locked="isScheduleLocked" :require-id="Number(taskId)" @updataData="listByTask(requirementId)" />
  158. <!-- 排期锁定弹窗 -->
  159. <task-dialog v-if="showTaskDialog" :show.sync="showTaskDialog" :task-id="taskIdObject.id" :status-name="taskIdObject.statusString" @getList="listByTask(requirementId)" @changeStatusAll="changeRequirementId" />
  160. </div>
  161. </template>
  162. <script>
  163. import { analysisBizId_id } from '@/utils/crypto-js.js'
  164. import _ from 'lodash'
  165. import { listByRequire, taskListAvailableDpmTask, taskSetTaskRelated, taskDeleteRelationship, taskShowRelatedDpmTask, taskSyncScheduleToDpm } from '@/api/requirement.js'
  166. import scheduleList from '@/views/projectManage/components/scheduleList.vue'
  167. import '@/styles/PublicStyle/index.scss' // 通用css
  168. import { configShowTaskStatusEnum } from '@/api/taskIndex'
  169. import { taskUpdate } from '@/api/taskIndex'
  170. import { taskUpdates } from '@/api/projectViewDetails'
  171. import { memberQueryMemberInfoByIDAPorName } from '@/api/projectIndex'
  172. import schedule from '@/views/projectManage/schedule' // 排期锁定弹窗
  173. import taskDialog from '@/views/projectManage/taskList/dialog/taskDialog' // 任务状态修改(已上线/已提测/已准出)
  174. export default {
  175. components: {
  176. scheduleList,
  177. schedule,
  178. taskDialog
  179. },
  180. filters: {
  181. ellipsis(value) {
  182. if (!value) return ''
  183. if (value.length > 23) {
  184. return value.slice(0, 23) + '...'
  185. }
  186. return value
  187. }
  188. },
  189. props: {
  190. requiredList: {
  191. type: [Object, Array],
  192. default: () => null,
  193. required: false
  194. }
  195. },
  196. data() {
  197. return {
  198. requirementId: -1,
  199. allStatus: [], // task状态
  200. taskDataList: [], // 同步排期到望岳的任务
  201. memberIDAP: [],
  202. tableData: [],
  203. checkAlls: false,
  204. taskIdObject: {},
  205. showTaskDialog: false,
  206. taskScheduleList: [],
  207. scheduleList: [],
  208. datas: [{
  209. date: '',
  210. type: '',
  211. desc: '',
  212. seperateDaysNoHoliday: '',
  213. dayLength: '',
  214. peopleList: ''
  215. }],
  216. dplOption: [],
  217. taskDpl: '',
  218. form_query: {
  219. rdOwner: null
  220. },
  221. nowChangeTask: null, // 当前正在改变的任务对象
  222. isScheduleLocked: '', // 当前排期的状态
  223. taskId: '', // taskID
  224. scheduleVisble: false, // 排期锁定
  225. userInformation: localStorage.getItem('username'),
  226. userNames: localStorage.getItem('realname'),
  227. taskList: [], // 全选list
  228. tableHeader: false, // 表头切换
  229. taskName: '', // taskname
  230. scheduleDetail: {}, // 用例/开发/提测/测试/准出/上线
  231. preOnlineVersion: [], // 预计上线版本
  232. dataList: {}, // 排期
  233. taskScheduleEvent: [], // 排期类型
  234. locking: true, // 查看历史记录锁定能
  235. isDelete: false // 删除排期操作
  236. }
  237. },
  238. watch: {
  239. requiredList: {
  240. handler(newV, old) {
  241. if (newV.length === 0) {
  242. const bizId_id = analysisBizId_id(this.$route.query.bizId_id)
  243. this.requirementId = bizId_id[1]
  244. if (this.requirementId === -1) return
  245. this.listByTask(this.requirementId)
  246. } else {
  247. this.tableData = newV.taskDetailList // 任务list
  248. this.dataList = newV // 排期
  249. this.scheduleList = newV.scheduleDetailRespons || []
  250. this.scheduleDetail = newV.timeInfos // 用例/开发/提测/测试/准出/上线
  251. this.preOnlineVersion = newV.preOnlineVersion // 预计上线版本
  252. this.taskScheduleEvent = newV.scheduleDetailRespons // 排期详情
  253. this.locking = false
  254. this.tableHeader = false
  255. if (this.tableData !== null) {
  256. this.tableData = this.tableData.map(item => ({
  257. ...item,
  258. vsInput: false
  259. }))
  260. }
  261. }
  262. },
  263. deep: true,
  264. immediate: true
  265. }
  266. },
  267. created() {
  268. this.configShowTaskStatusEnum()
  269. },
  270. methods: {
  271. async listByTask(id) { // 获取排期列表
  272. this.taskList = []
  273. this.scheduleVisble = false
  274. const res = await listByRequire(id)
  275. if (res.code === 200) {
  276. this.$nextTick(() => {
  277. this.tableData = res.data.taskDetailList // 任务list
  278. this.dataList = res.data // 排期
  279. this.scheduleList = res.data.scheduleDetailRespons || []
  280. this.scheduleDetail = res.data.timeInfos // 用例/开发/提测/测试/准出/上线
  281. this.preOnlineVersion = res.data.preOnlineVersion // 预计上线版本
  282. this.taskScheduleEvent = res.data.scheduleDetailRespons // 排期详情
  283. this.tableData = this.tableData.map(item => ({
  284. ...item,
  285. vsInput: false
  286. }))
  287. })
  288. }
  289. },
  290. async configShowTaskStatusEnum() { // 获取任务下拉数据
  291. const res = await configShowTaskStatusEnum(this.$store.state.data.bizId)
  292. if (res.code === 200) {
  293. this.allStatus = res.data.taskStatus
  294. }
  295. },
  296. async taskSyncScheduleToDpm(id) {
  297. const res = await taskSyncScheduleToDpm(id)
  298. if (res.code === 200) {
  299. this.$refs.Simulation.click()
  300. this.$message({ message: '同步排期成功', type: 'success', offset: 150 })
  301. }
  302. },
  303. async getDplList(taskId) {
  304. const res = await taskListAvailableDpmTask(taskId)
  305. if (res.code === 200) {
  306. this.dplOption = res.data
  307. }
  308. },
  309. async getTaskList(item) {
  310. this.taskDpl = item.relatedDpmTaskInfo.taskId + item.relatedDpmTaskInfo.name
  311. const res = await taskShowRelatedDpmTask(item.id)
  312. if (res.code === 200) {
  313. this.taskDataList = res.data
  314. }
  315. },
  316. async changeStatus(e) { // 状态改变
  317. if (e.status === 70 || e.status === 90 || e.status === 100) {
  318. this.taskIdObject = e
  319. this.allStatus.map(item => {
  320. item.code === e.status ? this.taskIdObject.statusString = item.msg : ''
  321. })
  322. this.showTaskDialog = true
  323. this.nowChangeTask = e
  324. return
  325. } else {
  326. const user = {
  327. name: localStorage.getItem('username'),
  328. ename: localStorage.getItem('realname'),
  329. id: ''
  330. }
  331. const taskInfoDO = e
  332. const resTask = await taskUpdates({ taskInfoDO, user })
  333. if (resTask.code === 200) {
  334. this.listByTask(this.requirementId)
  335. this.$emit('getRequirementById')
  336. this.$message({ message: '修改成功', type: 'success', offset: 150 })
  337. }
  338. }
  339. },
  340. changeRequirementId() {
  341. this.$emit('getRequirementById')
  342. },
  343. addClass({ row, column, rowIndex, columnIndex }) {
  344. if (columnIndex === 3) {
  345. return 'cell-grey'
  346. }
  347. },
  348. setRemoteMethod(val) {
  349. this.form_query.name = val
  350. this.remoteMethod(val)
  351. },
  352. async remoteMethod(query) {
  353. const res = await memberQueryMemberInfoByIDAPorName({ memberIDAP: query })
  354. this.memberIDAP = res.data
  355. },
  356. setRdOwner(e) {
  357. this.$set(this.form_query, 'rdOwner', e)
  358. this.remoteMethod(e)
  359. },
  360. jump(url) {
  361. window.open(url, '_blank')
  362. },
  363. throttle: _.throttle(function() {
  364. this.setRelation(...arguments)
  365. }, 5000, {
  366. leading: true,
  367. trailing: false
  368. }),
  369. async setRelation(item, taskId) { // 关联望月任务
  370. const res = await taskSetTaskRelated(taskId, item.id)
  371. if (res.code === 200) {
  372. this.listByTask(this.requirementId)
  373. this.$refs.Simulation.click()
  374. this.$message({ message: '关联成功', type: 'success', offset: 150 })
  375. }
  376. },
  377. async delete_dpl(val) { // task断开和望月的关联
  378. const res = await taskDeleteRelationship(val)
  379. if (res.code === 200) {
  380. this.listByTask(this.requirementId)
  381. this.$message({ message: '已取消关联', type: 'success', offset: 150 })
  382. }
  383. },
  384. lockingchange() {
  385. this.locking = true
  386. },
  387. changeSchedule(ele) { // 修改锁定状态
  388. if (this.dataList.isScheduleLocked === 1 && ele.isScheduleLocked === 1) {
  389. this.$message({ message: '无法解锁,请先变更归属需求的排期状态为未锁定状态!', type: 'error', duration: 3000, offset: 150 })
  390. } else {
  391. this.isScheduleLocked = ele.isScheduleLocked
  392. this.taskId = ele.id
  393. this.scheduleVisble = true
  394. }
  395. },
  396. async changeTaskName(val, value, key) { // 修改taskname
  397. if (value) {
  398. key === 1 ? val.rdOwner = value.idap : ''
  399. key === 2 ? val.qaOwner = value.idap : ''
  400. }
  401. val.vsInput = false
  402. val.name = this.taskName.split(' ').join('').length === 0 ? val.name : this.taskName
  403. const taskInfoDO = val
  404. const user = { name: this.userNames, ename: this.userInformation, id: '' }
  405. const res = await taskUpdate({ taskInfoDO, user })
  406. if (res.code === 200) {
  407. this.$refs.Simulation.click()
  408. this.listByTask(this.requirementId)
  409. this.$message({ message: '任务更新成功', type: 'success', duration: 1000, offset: 150 })
  410. }
  411. },
  412. clickAddScheduling(index, ele) { // 模拟调用自组件方法
  413. if (index === 2) {
  414. this.taskList = []
  415. this.taskList.push(ele)
  416. }
  417. const taskA = []
  418. this.taskList.map(item => {
  419. if (item.isScheduleLocked === 1) {
  420. taskA.push(item.taskIdSting)
  421. }
  422. })
  423. if (taskA.length !== 0) {
  424. this.$message({ message: '任务 ' + taskA + ' 的排期已锁定,请先解锁排期后再添加排期', type: 'warning', offset: 150 })
  425. return
  426. }
  427. this.$refs.taskSchedule.addSchedule()
  428. },
  429. clickTemplatTaskName(e) { // 任务名称店家跳转
  430. const { href } = this.$router.resolve({ name: '任务详情', query: { id: e }})
  431. window.open(href, '_blank')
  432. },
  433. editTask(val) { // 点击修改taskName
  434. val.vsInput = true
  435. this.taskName = val.name
  436. this.$nextTick(() => {
  437. this.$refs.taskName.focus()
  438. })
  439. },
  440. changeCheckout(rows) {
  441. if (rows) {
  442. this.tableData.forEach(row => {
  443. this.$refs.taskList.toggleRowSelection(row, true)
  444. })
  445. } else {
  446. this.$refs.taskList.clearSelection()
  447. }
  448. },
  449. Deselect() { // 取消选择
  450. this.taskList.forEach(row => {
  451. this.$refs.taskList.clearSelection()// 调用这个方法
  452. })
  453. this.tableHeader = false
  454. this.taskList = []
  455. },
  456. handleSelectionChange(val) {
  457. this.taskList = val
  458. this.taskList.length === this.tableData.length ? this.checkAlls = true : this.checkAlls = false
  459. if (this.taskList.length > 0) {
  460. this.tableHeader = true
  461. } else {
  462. this.tableHeader = false
  463. }
  464. },
  465. taskScheduleLists(id) {
  466. for (var key in this.taskScheduleEvent) {
  467. if (id === Number(key)) {
  468. return this.taskScheduleEvent[key]
  469. }
  470. }
  471. }
  472. }
  473. }
  474. </script>
  475. <style lang="scss" scoped>
  476. .item-detail {
  477. min-width:110px;
  478. color: #999999;
  479. font-size: 12px;
  480. overflow:hidden
  481. }
  482. .item-details {
  483. color: #333333;
  484. font-size: 12px;
  485. overflow:hidden
  486. }
  487. .templatName {
  488. font-size:12px;
  489. font-family:MicrosoftYaHei;
  490. line-height:14px;
  491. color:rgba(102,102,102,1);
  492. opacity:1;
  493. margin: 5px 0;
  494. }
  495. .templatTaskName {
  496. font-size:14px;
  497. font-family:MicrosoftYaHei;
  498. line-height:23px;
  499. font-weight: 500;
  500. color:rgba(51,51,51,1);
  501. margin-right: 5px;
  502. opacity:1;
  503. }
  504. .lineHeight {
  505. line-height: inherit;
  506. }
  507. .cursorPo:hover {
  508. color:#409EFF;
  509. cursor: pointer;
  510. }
  511. .templatCreator {
  512. font-size:12px;
  513. font-family:MicrosoftYaHei;
  514. line-height:14px;
  515. color:rgba(102,102,102,1);
  516. opacity:1;
  517. margin: 5px 0;
  518. }
  519. .demandLayout {
  520. display: inline-block;
  521. // width: 100px;
  522. margin: 10px 0;
  523. font-size:14px;
  524. line-height:14px;
  525. color:rgba(102,102,102,1);
  526. opacity:1;
  527. }
  528. .demandeta {
  529. font-size:12px;
  530. font-family:MicrosoftYaHei;
  531. line-height:14px;
  532. color:rgba(51,51,51,1);
  533. opacity:1;
  534. }
  535. .iconEdit {
  536. width:100px;
  537. background:rgba(245,245,245,1);
  538. opacity:1;
  539. padding: 1px 10px;
  540. border-radius:20px;
  541. display: flex;
  542. justify-content: space-between;
  543. }
  544. .tableHeader {
  545. >>> .el-table__empty-block{
  546. display: none;
  547. }
  548. }
  549. .involveApp-top-bottom {
  550. margin: 10px 0;
  551. }
  552. .iconPadding {
  553. margin-left: 5px;
  554. }
  555. .schedule-list {
  556. /deep/ .el-table td {
  557. padding: 0;
  558. }
  559. }
  560. .schedule-list {
  561. margin: 0 20px;
  562. padding: 0;
  563. }
  564. .img-logo {
  565. display: inline-block;
  566. width: 60px;
  567. }
  568. >>>.el-table, .el-table__expanded-cell{
  569. background:rgba(248,248,248,0.6);
  570. }
  571. .sty-icon {
  572. position: relative;
  573. left: -6px;
  574. bottom: 8px;
  575. background: #eee;
  576. border-radius: 50%;
  577. }
  578. .el-involveApp {
  579. font-size:10px;
  580. font-family:MicrosoftYaHei;
  581. line-height:12px;
  582. color:rgba(64,158,255,1);
  583. opacity:1;
  584. }
  585. .endCheck {
  586. font-size:14px;
  587. font-family:Microsoft Sans Serif;
  588. font-weight:400;
  589. line-height:16px;
  590. margin-right: 10px;
  591. color:rgba(102,102,102,1);
  592. opacity:1;
  593. }
  594. @mixin setStatus($color) {
  595. input {
  596. color:$color;
  597. border: 1px solid $color;
  598. }
  599. >>> .el-select__caret{
  600. color:$color;
  601. }
  602. >>> .el-input__inner{
  603. color:$color;
  604. border-color: $color;
  605. }
  606. >>> .el-input__inner:focus {
  607. border-color: $color;
  608. }
  609. }
  610. .status0 {
  611. @include setStatus(#409EFF)
  612. }
  613. .status1{
  614. @include setStatus(#FF8952)
  615. }
  616. .status2 {
  617. @include setStatus(#7ED321)
  618. }
  619. .deg {
  620. transform:rotate(90deg);
  621. -ms-transform:rotate(-90deg); /* Internet Explorer 9*/
  622. -moz-transform:rotate(-90deg); /* Firefox */
  623. -webkit-transform:rotate(-90deg); /* Safari 和 Chrome */
  624. -o-transform:rotate(-90deg); /* Opera */
  625. }
  626. .blueStr {
  627. width:4px;
  628. height:17px;
  629. background:#409EFF;
  630. border-radius:1px;
  631. position: absolute;
  632. top: 22px;
  633. left: 15px;
  634. }
  635. .synchronization {
  636. font-size: 14px;
  637. font-family: Microsoft Sans Serif;
  638. font-weight: 400;
  639. line-height: 25px;
  640. color: #333333;
  641. opacity: 1;
  642. }
  643. .btn-dpl {
  644. color: #fff;
  645. font-size: 12px;
  646. background: #409EFF;
  647. opacity: 1;
  648. border-radius: 5px;
  649. padding: 0 6px;
  650. }
  651. </style>
  652. <style>
  653. .el-popover__title {
  654. color: #333333;
  655. padding: 10px 20px 0px 10px;
  656. }
  657. .cell-grey .cell {
  658. padding: 0 !important;
  659. }
  660. .el-tooltip__popper.is-dark {
  661. background:rgba(121,132,150,0.8);
  662. color: #FFF;
  663. }
  664. </style>