demand.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  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="setRelation(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 { listByRequire, taskListAvailableDpmTask, taskSetTaskRelated, taskDeleteRelationship, taskShowRelatedDpmTask, taskSyncScheduleToDpm } from '@/api/requirement.js'
  164. import scheduleList from '@/views/projectManage/components/scheduleList.vue'
  165. import '@/styles/PublicStyle/index.scss' // 通用css
  166. import { configShowTaskStatusEnum } from '@/api/taskIndex'
  167. import { taskUpdate } from '@/api/taskIndex'
  168. import { taskUpdates } from '@/api/projectViewDetails'
  169. import { memberQueryMemberInfoByIDAPorName } from '@/api/projectIndex'
  170. import schedule from '@/views/projectManage/schedule' // 排期锁定弹窗
  171. import taskDialog from '@/views/projectManage/taskList/dialog/taskDialog' // 任务状态修改(已上线/已提测/已准出)
  172. export default {
  173. components: {
  174. scheduleList,
  175. schedule,
  176. taskDialog
  177. },
  178. filters: {
  179. ellipsis(value) {
  180. if (!value) return ''
  181. if (value.length > 23) {
  182. return value.slice(0, 23) + '...'
  183. }
  184. return value
  185. }
  186. },
  187. props: {
  188. requiredList: {
  189. type: [Object, Array],
  190. default: () => null,
  191. required: false
  192. }
  193. },
  194. data() {
  195. return {
  196. requirementId: Number(this.$route.query.id),
  197. allStatus: [], // task状态
  198. taskDataList: [], // 同步排期到望岳的任务
  199. memberIDAP: [],
  200. tableData: [],
  201. checkAlls: false,
  202. taskIdObject: {},
  203. showTaskDialog: false,
  204. taskScheduleList: [],
  205. scheduleList: [],
  206. datas: [{
  207. date: '',
  208. type: '',
  209. desc: '',
  210. seperateDaysNoHoliday: '',
  211. dayLength: '',
  212. peopleList: ''
  213. }],
  214. dplOption: [],
  215. taskDpl: '',
  216. form_query: {
  217. rdOwner: null
  218. },
  219. nowChangeTask: null, // 当前正在改变的任务对象
  220. isScheduleLocked: '', // 当前排期的状态
  221. taskId: '', // taskID
  222. scheduleVisble: false, // 排期锁定
  223. userInformation: localStorage.getItem('username'),
  224. userNames: localStorage.getItem('realname'),
  225. taskList: [], // 全选list
  226. tableHeader: false, // 表头切换
  227. taskName: '', // taskname
  228. scheduleDetail: {}, // 用例/开发/提测/测试/准出/上线
  229. preOnlineVersion: [], // 预计上线版本
  230. dataList: {}, // 排期
  231. taskScheduleEvent: [], // 排期类型
  232. locking: true, // 查看历史记录锁定能
  233. isDelete: false // 删除排期操作
  234. }
  235. },
  236. watch: {
  237. requiredList: {
  238. handler(newV, old) {
  239. if (newV.length === 0) {
  240. this.listByTask(this.requirementId)
  241. } else {
  242. this.tableData = newV.taskDetailList // 任务list
  243. this.dataList = newV // 排期
  244. this.scheduleList = newV.scheduleDetailRespons || []
  245. this.scheduleDetail = newV.timeInfos // 用例/开发/提测/测试/准出/上线
  246. this.preOnlineVersion = newV.preOnlineVersion // 预计上线版本
  247. this.taskScheduleEvent = newV.scheduleDetailRespons // 排期详情
  248. this.locking = false
  249. this.tableHeader = false
  250. if (this.tableData !== null) {
  251. this.tableData = this.tableData.map(item => ({
  252. ...item,
  253. vsInput: false
  254. }))
  255. }
  256. }
  257. },
  258. deep: true,
  259. immediate: true
  260. }
  261. },
  262. created() {
  263. this.configShowTaskStatusEnum()
  264. },
  265. methods: {
  266. async listByTask(id) { // 获取排期列表
  267. this.taskList = []
  268. this.scheduleVisble = false
  269. const res = await listByRequire(id)
  270. if (res.code === 200) {
  271. this.$nextTick(() => {
  272. this.tableData = res.data.taskDetailList // 任务list
  273. this.dataList = res.data // 排期
  274. this.scheduleList = res.data.scheduleDetailRespons || []
  275. this.scheduleDetail = res.data.timeInfos // 用例/开发/提测/测试/准出/上线
  276. this.preOnlineVersion = res.data.preOnlineVersion // 预计上线版本
  277. this.taskScheduleEvent = res.data.scheduleDetailRespons // 排期详情
  278. this.tableData = this.tableData.map(item => ({
  279. ...item,
  280. vsInput: false
  281. }))
  282. })
  283. }
  284. },
  285. async configShowTaskStatusEnum() { // 获取任务下拉数据
  286. const res = await configShowTaskStatusEnum(localStorage.getItem('bizId'))
  287. if (res.code === 200) {
  288. this.allStatus = res.data.taskStatus
  289. }
  290. },
  291. async taskSyncScheduleToDpm(id) {
  292. const res = await taskSyncScheduleToDpm(id)
  293. if (res.code === 200) {
  294. this.$refs.Simulation.click()
  295. this.$message({ message: '同步排期成功', type: 'success', offset: 150 })
  296. }
  297. },
  298. async getDplList(taskId) {
  299. const res = await taskListAvailableDpmTask(taskId)
  300. if (res.code === 200) {
  301. this.dplOption = res.data
  302. }
  303. },
  304. async getTaskList(item) {
  305. this.taskDpl = item.relatedDpmTaskInfo.taskId + item.relatedDpmTaskInfo.name
  306. const res = await taskShowRelatedDpmTask(item.id)
  307. if (res.code === 200) {
  308. this.taskDataList = res.data
  309. }
  310. },
  311. async changeStatus(e) { // 状态改变
  312. if (e.status === 70 || e.status === 90 || e.status === 100) {
  313. this.taskIdObject = e
  314. this.allStatus.map(item => {
  315. item.code === e.status ? this.taskIdObject.statusString = item.msg : ''
  316. })
  317. this.showTaskDialog = true
  318. this.nowChangeTask = e
  319. return
  320. } else {
  321. const user = {
  322. name: localStorage.getItem('username'),
  323. ename: localStorage.getItem('realname'),
  324. id: ''
  325. }
  326. const taskInfoDO = e
  327. const resTask = await taskUpdates({ taskInfoDO, user })
  328. if (resTask.code === 200) {
  329. this.listByTask(this.requirementId)
  330. this.$emit('getRequirementById')
  331. this.$message({ message: '修改成功', type: 'success', offset: 150 })
  332. }
  333. }
  334. },
  335. changeRequirementId() {
  336. this.$emit('getRequirementById')
  337. },
  338. addClass({ row, column, rowIndex, columnIndex }) {
  339. if (columnIndex === 3) {
  340. return 'cell-grey'
  341. }
  342. },
  343. setRemoteMethod(val) {
  344. this.form_query.name = val
  345. this.remoteMethod(val)
  346. },
  347. async remoteMethod(query) {
  348. const res = await memberQueryMemberInfoByIDAPorName({ memberIDAP: query })
  349. this.memberIDAP = res.data
  350. },
  351. setRdOwner(e) {
  352. this.$set(this.form_query, 'rdOwner', e)
  353. this.remoteMethod(e)
  354. },
  355. jump(url) {
  356. window.open(url, '_blank')
  357. },
  358. async setRelation(item, taskId) { // 关联望月任务
  359. const res = await taskSetTaskRelated(taskId, item.id)
  360. if (res.code === 200) {
  361. this.listByTask(this.requirementId)
  362. this.$refs.Simulation.click()
  363. this.$message({ message: '关联成功', type: 'success', offset: 150 })
  364. }
  365. },
  366. async delete_dpl(val) { // task断开和望月的关联
  367. const res = await taskDeleteRelationship(val)
  368. if (res.code === 200) {
  369. this.listByTask(this.requirementId)
  370. this.$message({ message: '已取消关联', type: 'success', offset: 150 })
  371. }
  372. },
  373. lockingchange() {
  374. this.locking = true
  375. },
  376. changeSchedule(ele) { // 修改锁定状态
  377. if (this.dataList.isScheduleLocked === 1 && ele.isScheduleLocked === 1) {
  378. this.$message({ message: '无法解锁,请先变更归属需求的排期状态为未锁定状态!', type: 'error', duration: 3000, offset: 150 })
  379. } else {
  380. this.isScheduleLocked = ele.isScheduleLocked
  381. this.taskId = ele.id
  382. this.scheduleVisble = true
  383. }
  384. },
  385. async changeTaskName(val, value, key) { // 修改taskname
  386. if (value) {
  387. key === 1 ? val.rdOwner = value.idap : ''
  388. key === 2 ? val.qaOwner = value.idap : ''
  389. }
  390. val.vsInput = false
  391. val.name = this.taskName.split(' ').join('').length === 0 ? val.name : this.taskName
  392. const taskInfoDO = val
  393. const user = { name: this.userNames, ename: this.userInformation, id: '' }
  394. const res = await taskUpdate({ taskInfoDO, user })
  395. if (res.code === 200) {
  396. this.$refs.Simulation.click()
  397. this.listByTask(this.requirementId)
  398. this.$message({ message: '任务更新成功', type: 'success', duration: 1000, offset: 150 })
  399. }
  400. },
  401. clickAddScheduling(index, ele) { // 模拟调用自组件方法
  402. if (index === 2) {
  403. this.taskList = []
  404. this.taskList.push(ele)
  405. }
  406. const taskA = []
  407. this.taskList.map(item => {
  408. if (item.isScheduleLocked === 1) {
  409. taskA.push(item.taskIdSting)
  410. }
  411. })
  412. if (taskA.length !== 0) {
  413. this.$message({ message: '任务 ' + taskA + ' 的排期已锁定,请先解锁排期后再添加排期', type: 'warning', offset: 150 })
  414. return
  415. }
  416. this.$refs.taskSchedule.addSchedule()
  417. },
  418. clickTemplatTaskName(e) { // 任务名称店家跳转
  419. const { href } = this.$router.resolve({ name: '任务详情', query: { id: e }})
  420. window.open(href, '_blank')
  421. },
  422. editTask(val) { // 点击修改taskName
  423. val.vsInput = true
  424. this.taskName = val.name
  425. this.$nextTick(() => {
  426. this.$refs.taskName.focus()
  427. })
  428. },
  429. changeCheckout(rows) {
  430. if (rows) {
  431. this.tableData.forEach(row => {
  432. this.$refs.taskList.toggleRowSelection(row, true)
  433. })
  434. } else {
  435. this.$refs.taskList.clearSelection()
  436. }
  437. },
  438. Deselect() { // 取消选择
  439. this.taskList.forEach(row => {
  440. this.$refs.taskList.clearSelection()// 调用这个方法
  441. })
  442. this.tableHeader = false
  443. this.taskList = []
  444. },
  445. handleSelectionChange(val) {
  446. this.taskList = val
  447. this.taskList.length === this.tableData.length ? this.checkAlls = true : this.checkAlls = false
  448. if (this.taskList.length > 0) {
  449. this.tableHeader = true
  450. } else {
  451. this.tableHeader = false
  452. }
  453. },
  454. taskScheduleLists(id) {
  455. for (var key in this.taskScheduleEvent) {
  456. if (id === Number(key)) {
  457. return this.taskScheduleEvent[key]
  458. }
  459. }
  460. }
  461. }
  462. }
  463. </script>
  464. <style lang="scss" scoped>
  465. .item-detail {
  466. min-width:110px;
  467. color: #999999;
  468. font-size: 12px;
  469. overflow:hidden
  470. }
  471. .item-details {
  472. color: #333333;
  473. font-size: 12px;
  474. overflow:hidden
  475. }
  476. .templatName {
  477. font-size:12px;
  478. font-family:MicrosoftYaHei;
  479. line-height:14px;
  480. color:rgba(102,102,102,1);
  481. opacity:1;
  482. margin: 5px 0;
  483. }
  484. .templatTaskName {
  485. font-size:14px;
  486. font-family:MicrosoftYaHei;
  487. line-height:23px;
  488. color:rgba(51,51,51,1);
  489. margin-right: 5px;
  490. opacity:1;
  491. }
  492. .lineHeight {
  493. line-height: inherit;
  494. }
  495. .cursorPo:hover {
  496. color:#409EFF;
  497. cursor: pointer;
  498. }
  499. .templatCreator {
  500. font-size:12px;
  501. font-family:MicrosoftYaHei;
  502. line-height:14px;
  503. color:rgba(102,102,102,1);
  504. opacity:1;
  505. margin: 5px 0;
  506. }
  507. .demandLayout {
  508. display: inline-block;
  509. // width: 100px;
  510. margin: 10px 0;
  511. font-size:14px;
  512. line-height:14px;
  513. color:rgba(102,102,102,1);
  514. opacity:1;
  515. }
  516. .demandeta {
  517. font-size:12px;
  518. font-family:MicrosoftYaHei;
  519. line-height:14px;
  520. color:rgba(51,51,51,1);
  521. opacity:1;
  522. }
  523. .iconEdit {
  524. width:100px;
  525. background:rgba(245,245,245,1);
  526. opacity:1;
  527. padding: 1px 10px;
  528. border-radius:20px;
  529. display: flex;
  530. justify-content: space-between;
  531. }
  532. .tableHeader {
  533. >>> .el-table__empty-block{
  534. display: none;
  535. }
  536. }
  537. .involveApp-top-bottom {
  538. margin: 10px 0;
  539. }
  540. .iconPadding {
  541. margin-left: 5px;
  542. }
  543. .schedule-list {
  544. /deep/ .el-table td {
  545. padding: 0;
  546. }
  547. }
  548. .schedule-list {
  549. margin: 0 20px;
  550. padding: 0;
  551. }
  552. .img-logo {
  553. display: inline-block;
  554. width: 60px;
  555. }
  556. >>>.el-table, .el-table__expanded-cell{
  557. background:rgba(248,248,248,0.6);
  558. }
  559. .sty-icon {
  560. position: relative;
  561. left: -6px;
  562. bottom: 8px;
  563. background: #eee;
  564. border-radius: 50%;
  565. }
  566. .el-involveApp {
  567. font-size:10px;
  568. font-family:MicrosoftYaHei;
  569. line-height:12px;
  570. color:rgba(64,158,255,1);
  571. opacity:1;
  572. }
  573. .endCheck {
  574. font-size:14px;
  575. font-family:Microsoft Sans Serif;
  576. font-weight:400;
  577. line-height:16px;
  578. margin-right: 10px;
  579. color:rgba(102,102,102,1);
  580. opacity:1;
  581. }
  582. @mixin setStatus($color) {
  583. input {
  584. color:$color;
  585. border: 1px solid $color;
  586. }
  587. >>> .el-select__caret{
  588. color:$color;
  589. }
  590. >>> .el-input__inner{
  591. color:$color;
  592. border-color: $color;
  593. }
  594. >>> .el-input__inner:focus {
  595. border-color: $color;
  596. }
  597. }
  598. .status0 {
  599. @include setStatus(#409EFF)
  600. }
  601. .status1{
  602. @include setStatus(#FF8952)
  603. }
  604. .status2 {
  605. @include setStatus(#7ED321)
  606. }
  607. .deg {
  608. transform:rotate(90deg);
  609. -ms-transform:rotate(-90deg); /* Internet Explorer 9*/
  610. -moz-transform:rotate(-90deg); /* Firefox */
  611. -webkit-transform:rotate(-90deg); /* Safari 和 Chrome */
  612. -o-transform:rotate(-90deg); /* Opera */
  613. }
  614. .blueStr {
  615. width:4px;
  616. height:17px;
  617. background:#409EFF;
  618. border-radius:1px;
  619. position: absolute;
  620. top: 22px;
  621. left: 15px;
  622. }
  623. .synchronization {
  624. font-size: 14px;
  625. font-family: Microsoft Sans Serif;
  626. font-weight: 400;
  627. line-height: 25px;
  628. color: #333333;
  629. opacity: 1;
  630. }
  631. .btn-dpl {
  632. color: #fff;
  633. font-size: 12px;
  634. background: #409EFF;
  635. opacity: 1;
  636. border-radius: 5px;
  637. padding: 0 6px;
  638. }
  639. </style>
  640. <style>
  641. .el-popover__title {
  642. color: #333333;
  643. padding: 10px 20px 0px 10px;
  644. }
  645. .cell-grey .cell {
  646. padding: 0 !important;
  647. }
  648. .el-tooltip__popper.is-dark {
  649. background:rgba(121,132,150,0.8);
  650. color: #FFF;
  651. }
  652. </style>