|
@@ -80,7 +80,7 @@
|
|
|
</span>
|
|
|
<el-popover v-if="scope.row.isDirectlyFromDpm === -1" placement="bottom" title="关联望岳任务" width="400" trigger="click">
|
|
|
<div class="blueStr" />
|
|
|
- <div v-for="(item, index) in dplOption" :key="index" class="Layout_space_between involveApp-top-bottom cursorPo" @click="setRelation(item, scope.row.id)">
|
|
|
+ <div v-for="(item, index) in dplOption" :key="index" class="Layout_space_between involveApp-top-bottom cursorPo" @click="throttle(item, scope.row.id)">
|
|
|
<span class="item-detail">{{ item.moduleInfoName }}</span>
|
|
|
<span class="item-details">{{ item.name }}</span>
|
|
|
<span class="item-detail">{{ item.taskId }}</span>
|
|
@@ -168,6 +168,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import _ from 'lodash'
|
|
|
import { listByRequire, taskListAvailableDpmTask, taskSetTaskRelated, taskDeleteRelationship, taskShowRelatedDpmTask, taskSyncScheduleToDpm } from '@/api/requirement.js'
|
|
|
import scheduleList from '@/views/projectManage/components/scheduleList.vue'
|
|
|
import '@/styles/PublicStyle/index.scss' // 通用css
|
|
@@ -370,6 +371,12 @@ export default {
|
|
|
jump(url) {
|
|
|
window.open(url, '_blank')
|
|
|
},
|
|
|
+ throttle: _.throttle(function() {
|
|
|
+ this.setRelation(...arguments)
|
|
|
+ }, 5000, {
|
|
|
+ leading: true,
|
|
|
+ trailing: false
|
|
|
+ }),
|
|
|
async setRelation(item, taskId) { // 关联望月任务
|
|
|
const res = await taskSetTaskRelated(taskId, item.id)
|
|
|
if (res.code === 200) {
|