|
|
|
@ -263,6 +263,7 @@
|
|
|
|
|
>
|
|
|
|
|
<el-form
|
|
|
|
|
ref="form"
|
|
|
|
|
v-model="switchValue"
|
|
|
|
|
:inline="true"
|
|
|
|
|
:model="form"
|
|
|
|
|
:rules="rules"
|
|
|
|
@ -270,8 +271,11 @@
|
|
|
|
|
class="add-task"
|
|
|
|
|
label-width="80px"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="任务名称" prop="taskName">
|
|
|
|
|
<el-input v-model="form.taskName" style="width: 340px" />
|
|
|
|
|
<el-form-item label="线索开关">
|
|
|
|
|
<el-switch
|
|
|
|
|
v-model="form.isDmpDelivery"
|
|
|
|
|
@change="editTagChange(form.isDmpDelivery)"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="Tag" prop="taskName">
|
|
|
|
|
<el-tag
|
|
|
|
@ -294,6 +298,10 @@
|
|
|
|
|
/>
|
|
|
|
|
<el-button v-else class="button-new-tag" size="small" @click="showInput">新增</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="任务名称" prop="taskName">
|
|
|
|
|
<el-input v-model="form.taskName" style="width: 340px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<!-- <el-form-item label="号码加密">
|
|
|
|
|
<el-switch v-model="form.isEncryption" />
|
|
|
|
|
</el-form-item> -->
|
|
|
|
@ -319,6 +327,28 @@
|
|
|
|
|
title="编辑"
|
|
|
|
|
width="520px"
|
|
|
|
|
>
|
|
|
|
|
<!-- <div
|
|
|
|
|
slot="title"
|
|
|
|
|
class="dialog-title"
|
|
|
|
|
>
|
|
|
|
|
<el-row class="editRow">
|
|
|
|
|
<span style="padding-right: 40px;font-size: 18px;line-height: 24px;">编辑</span>
|
|
|
|
|
<el-switch
|
|
|
|
|
v-model="switchValue"
|
|
|
|
|
inactive-text="线索开关"
|
|
|
|
|
@change="editTagChange(switchValue)"
|
|
|
|
|
/>
|
|
|
|
|
</el-row>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="u-flex mb-15" style="flex-wrap: wrap;">
|
|
|
|
|
<div class="label">
|
|
|
|
|
线索开关
|
|
|
|
|
</div>
|
|
|
|
|
<el-switch
|
|
|
|
|
v-model="switchValue"
|
|
|
|
|
@change="editTagChange(switchValue)"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="u-flex mb-15" style="flex-wrap: wrap;">
|
|
|
|
|
<div class="label">
|
|
|
|
|
Tag
|
|
|
|
@ -397,6 +427,7 @@ import { mapGetters } from 'vuex'
|
|
|
|
|
import Treeselect from '@riophae/vue-treeselect'
|
|
|
|
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
|
|
|
import zanwu from '@/assets/images/zanwu.png'
|
|
|
|
|
|
|
|
|
|
const defaultForm = {}
|
|
|
|
|
export default {
|
|
|
|
|
name: 'CurrentTask',
|
|
|
|
@ -466,7 +497,8 @@ export default {
|
|
|
|
|
tagStr: [], // tag
|
|
|
|
|
isEncryption: false,
|
|
|
|
|
remark: '', // 备注
|
|
|
|
|
labelOrganizeId: ''
|
|
|
|
|
labelOrganizeId: '',
|
|
|
|
|
isDmpDelivery: true
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
taskName: [
|
|
|
|
@ -495,7 +527,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
permission: {
|
|
|
|
|
withdraw: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
switchValue: '',
|
|
|
|
|
currentId: ''// 当前正在编辑的任务id
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
@ -634,7 +668,8 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 任务弹框
|
|
|
|
|
operationFun(obj = {}) {
|
|
|
|
|
async operationFun(obj = {}) {
|
|
|
|
|
console.log(this.switchValue, 'this.switchValue')
|
|
|
|
|
const { type = '', idx, row } = obj
|
|
|
|
|
if (type === 'distSwitch' || type === 'add') {
|
|
|
|
|
this.taskDialog = !this.taskDialog
|
|
|
|
@ -657,10 +692,18 @@ export default {
|
|
|
|
|
this.operationIndex = idx
|
|
|
|
|
this.proportionPopover = false
|
|
|
|
|
if (type === 'resourcesProp') {
|
|
|
|
|
this.resourcesDialog = true
|
|
|
|
|
queryDmpTask({ taskId: row.id }).then(res => {
|
|
|
|
|
this.currentId = row.id
|
|
|
|
|
const res = await queryDmpTask({ taskId: row.id })
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
this.form.tagStr = res.data.tagStr
|
|
|
|
|
})
|
|
|
|
|
if (res.data.isDmpDelivery === null) {
|
|
|
|
|
this.switchValue = false
|
|
|
|
|
this.resourcesDialog = true
|
|
|
|
|
} else {
|
|
|
|
|
this.switchValue = res.data.isDmpDelivery
|
|
|
|
|
this.resourcesDialog = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.crud.toQuery()
|
|
|
|
|
}
|
|
|
|
@ -773,6 +816,7 @@ export default {
|
|
|
|
|
arr.push(item.replace(/\s/g, ''))
|
|
|
|
|
})
|
|
|
|
|
obj.tagStr = arr
|
|
|
|
|
obj.isDmpDelivery = this.switchValue
|
|
|
|
|
updateDmpTask(obj).then(res => {
|
|
|
|
|
if (res.data) {
|
|
|
|
|
this.$message.error(`创建失败, ${res.data.join()} 重复`)
|
|
|
|
@ -892,6 +936,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
resetTaskCur() {
|
|
|
|
|
this.operationIndex = ''
|
|
|
|
|
},
|
|
|
|
|
editTagChange(data) {
|
|
|
|
|
data = !data
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -998,7 +1045,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.label{
|
|
|
|
|
min-width: 80px;
|
|
|
|
|
min-width: 88px;
|
|
|
|
|
line-height: 32px;
|
|
|
|
|
float: none;
|
|
|
|
|
display: inline-block;
|
|
|
|
@ -1055,4 +1102,8 @@ export default {
|
|
|
|
|
.text-hide-2 {
|
|
|
|
|
line-height: 1.3;
|
|
|
|
|
}
|
|
|
|
|
.editRow{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|