修改路径节点和手动创建任务

This commit is contained in:
闫晓茹 2024-06-27 17:35:37 +08:00
parent 016b372f0c
commit e81a87f040
3 changed files with 240 additions and 100 deletions

View File

@ -451,8 +451,9 @@ export default {
optiononditionOperator() {
var dictType = "trigger_condition_operator";
getAgencytype(dictType).then((res) => {
console.log(res, 'redsssssssss')
// console.log(res, 'redsssssssss')
this.optionstriggerConditionOperator = res.data;
});
},
@ -628,9 +629,12 @@ export default {
//wangeditor传值
onNodeContent(item) {
this.form.nodeContent = item.nodeContent;
var abc = new RegExp("<br>", "g");
var bbb = this.form.nodeContent.replace(abc, "");
this.form.nodeContent = bbb;
if (this.form.nodeContent) {
var abc = new RegExp("<br>", "g");
var bbb = this.form.nodeContent.replace(abc, "");
this.form.nodeContent = bbb;
}
},
//小程序传值
miniProgramtemplate(item) {
@ -733,12 +737,13 @@ export default {
},
bottomclickevent(uitem, index, uindex) {
if (
this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" &&
this.form.taskSubdivisiontemplateType != "PROPAGANDA"
) {
// if (
// this.form.taskSubdivisiontemplateType != "QUESTIONNAIRE" &&
// this.form.taskSubdivisiontemplateType != "PROPAGANDA"
// ) {
// console.log()
this.$refs.wangeditor.emit();
}
// }
setTimeout(() => {
this.form = uitem;
this.taskPartitionList = [];

View File

@ -157,6 +157,7 @@
type="textarea"
v-model="formInline.textRemindContent"
:rows="6"
style="width: 600px"
placeholder="请输入内容"
/>
</el-form-item>
@ -187,24 +188,100 @@
</el-form-item>
</el-form>
</div>
<div
v-if="
formInline.taskType == 'TEXT_REMIND' ||
formInline.taskType == 'PROPAGANDA_ARTICLE' ||
formInline.taskType == 'QUESTIONNAIRE_SCALE'
"
>
<div class="PushMethod">
<span>推送方式短信</span>
<el-switch
v-model="formInline.messagePushSign"
active-color="#13ce66"
active-value="1"
inactive-value="0"
>
</el-switch>
<div>
<div
class="PushMethodrg"
v-if="formInline.taskType == 'ARTIFICIAL_FOLLOW_UP'"
>
<div class="flex">
<div class="itemlist">推送方式人工电话</div>
<div class="itemlist">
<el-switch
v-model="formInline.phonePushSign"
active-color="#13ce66"
active-value="1"
inactive-value="0"
>
</el-switch>
</div>
</div>
<div class="flex">
<div class="itemlist">
重播次数
<span>
<el-select
v-model="formInline.phoneRedialTimes"
style="width: 100px"
>
<el-option
v-for="item in optionslistS"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
</span>
</div>
<div class="itemlist">
时间间隔:
<span>
<el-input
v-model.number="formInline.phoneTimeInterval"
oninput="value=value.replace(/[^\d]/g,'')"
style="width: 100px"
>
</el-input>
</span>
</div>
<div class="itemlist">
短信提醒
<el-select
v-model="formInline.phoneMessageRemind"
style="width: 150px"
>
<el-option
v-for="item in optionslist"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
</div>
<div class="itemlist">
短信模板
<span
class="spanname"
v-if="formInline.phoneMessageRemind == 'NOT_SEND_MESSAGE'"
>
<message
style="width: 200px"
@on-template="messageontemplateMESSAGE"
:templateId="formInline.phoneMessageTemplateId"
:templateName="formInline.phoneMessageTemplateName"
></message>
</span>
<span v-else>
<message
style="width: 200px"
@on-template="messageontemplateMESSAGE"
:templateId="formInline.phoneMessageTemplateId"
:templateName="formInline.phoneMessageTemplateName"
></message>
</span>
</div>
</div>
</div>
<div class="PushMethod">
<div
class="PushMethod"
v-if="
formInline.taskType == 'TEXT_REMIND' ||
formInline.taskType == 'PROPAGANDA_ARTICLE' ||
formInline.taskType == 'QUESTIONNAIRE_SCALE'
"
>
<span>推送方式公众号</span>
<el-switch
v-model="formInline.officialPushSign"
@ -214,7 +291,14 @@
>
</el-switch>
</div>
<div class="PushMethod">
<div
class="PushMethod"
v-if="
formInline.taskType == 'TEXT_REMIND' ||
formInline.taskType == 'PROPAGANDA_ARTICLE' ||
formInline.taskType == 'QUESTIONNAIRE_SCALE'
"
>
<span>推送方式小程序</span>
<el-switch
v-model="formInline.appletPushSign"
@ -232,15 +316,52 @@
<div class="flex">
<div class="itemlist">
推送方式
<span> 人工电话 </span>
<span>
<el-radio-group v-model="formInline.phoneDialMethod">
<el-radio label="COMMON">人工电话</el-radio>
<el-radio label="AI">自动外呼</el-radio>
</el-radio-group>
</span>
</div>
<div class="itemlist">
模板
<scripts
@on-template="messageontemplateword"
:templateId="formInline.phoneId"
:templateName="formInline.phoneTemplateName"
></scripts>
话术模板
<span class="spanname" v-if="formInline.questionInfoId">
<scripts
@on-template="messageontemplateword"
:templateId="formInline.phoneId"
:templateName="formInline.phoneTemplateName"
></scripts>
</span>
<span v-else>
<scripts
@on-template="messageontemplateword"
:templateId="formInline.phoneId"
:templateName="formInline.phoneTemplateName"
></scripts>
</span>
</div>
<div
class="itemlist"
v-if="
formInline.phoneDialMethod == 'COMMON' ||
!formInline.phoneDialMethod
"
>
问卷模板
<span class="spanname" v-if="formInline.phoneId">
<question
@on-template="questionontemplate"
:templateId="formInline.questionInfoId"
:templateName="formInline.questionnaireName"
></question>
</span>
<span v-else>
<question
@on-template="questionontemplate"
:templateId="formInline.questionInfoId"
:templateName="formInline.questionnaireName"
></question>
</span>
</div>
<div class="itemlist">
<el-switch
@ -320,9 +441,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
</template>
@ -330,8 +449,8 @@
<script>
import propaganda from "../components/propaganda.vue";
import scriptphone from "../components/script.vue";
import scripts from '../components/script.vue'
import message from '../components/message.vue'
import scripts from "../components/script.vue";
import message from "../components/message.vue";
import question from "../components/question.vue";
import { signrouteadd } from "@/api/system/ManuallyCreatingTasks";
import { getAgencytype } from "@/api/system/agency";
@ -437,7 +556,9 @@ export default {
});
},
changeoptions(e) {
this.parentDictCode = this.options.find((el) => el.dictValue == e).dictCode;
this.parentDictCode = this.options.find(
(el) => el.dictValue == e
).dictCode;
this.changelisy();
},
changelisy() {
@ -462,8 +583,8 @@ export default {
//
questionontemplate(item) {
if (this.formInline.taskType == "ARTIFICIAL_FOLLOW_UP") {
this.formInline.followTemplateId = item.templateId;
this.formInline.followTemplateName = item.templateName;
this.formInline.questionInfoId = item.templateId;
this.formInline.questionnaireName = item.templateName;
} else {
this.formInline.questionInfoId = item.templateId;
this.formInline.questionnaireName = item.templateName;
@ -564,8 +685,6 @@ export default {
padding: 20px 50px 0px 20px;
border-radius: 10px;
.flex {
display: flex;
width: 100%;
@ -707,7 +826,7 @@ export default {
display: inline-block;
float: right;
}
::v-deep .el-form-item__content{
::v-deep .el-form-item__content {
display: inline-block !important;
}
</style>

View File

@ -20,25 +20,29 @@
:visible.sync="labelshow"
width="40%"
:before-close="beforeClose"
class="category-cascader-panel"
>
<el-cascader-panel
:key="isResouceShow"
:options="labeloptions"
@change="panelchange"
v-if="labelshow"
ref="cascaderAddaddlist"
v-model="selectedOptions"
:props="{
value: 'labelFieldId',
label: 'fieldName',
children: 'labelFieldContentList',
value: 'value',
label: 'label',
children: 'children',
checkStrictly: false,
multiple: true,
}"
></el-cascader-panel>
<div>
<div style="margin: 20px 0">结果预览:</div>
<el-input
type="textarea"
v-model="addnode.fileSpan"
disabled
></el-input>
<div v-for="(item, index) of addlist" :key="index">
<div>{{ item }}</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="labelclick" type="primary">确定</el-button>
@ -52,7 +56,6 @@
:before-close="beforeClose"
class="category-cascader-panel"
>
<!-- 在这里 -->
<el-cascader-panel
:options="fieldoptions"
@change="handleChange($event)"
@ -70,13 +73,7 @@
<div style="margin: 20px 0">结果预览:</div>
<div style="width: 80%; height: 100%; border: 2px solid #eceff7">
<div v-for="(item, index) of add" :key="index">
<!-- <input type="text"> -->
<div>{{ item }}</div>
<!-- <el-input
type="textarea"
v-model="item[0]"
disabled
></el-input> -->
</div>
</div>
<div slot="footer" class="dialog-footer">
@ -114,6 +111,14 @@ export default {
name: "wangEditor",
data() {
return {
selectedOptions: [],
props: {
value: "value",
label: "label",
children: "children",
multiple: true,
},
isResouceShow: 1,
searchForm: {},
labeloptions: [],
@ -176,10 +181,15 @@ export default {
fieldMark: "",
},
add: [],
addlist: [],
modify: false,
list: [],
elist: [],
termContent: "",
selectedNames: [],
name: "",
handlelist: [],
hlist: [],
};
},
@ -218,59 +228,64 @@ export default {
emit() {
this.$emit("on-nodeContent", { nodeContent: this.html });
},
panelchange(item) {
console.log(item, "item");
if (this.labelshow) {
this.labeloptions.forEach((e) => {
e.labelFieldContentList.forEach((el) => {
if (el.labelFieldId == item[1]) {
this.addnode.fileSpan = el.fieldName;
this.addnode.fileName = e.fieldName;
this.addnode.fieldMark = el.fieldMark;
panelchange(value) {
console.log(value, "value");
this.addlist = [];
value.forEach((e) => {
console.log(e, "eeeeee");
this.labeloptions.forEach((el) => {
el.children.forEach((ele) => {
if (e[1] == ele.value) {
console.log(e[1], "[1]");
this.addlist.push(el.label + "-" + ele.label);
// this.hlist.push(el.label)
// this.handlelist.push(ele.label)
console.log(this.addlist, "this.addlist");
}
});
});
}
});
},
labelclick() {
console.log(this.html, "this.html--before11111");
this.labelshow = false;
setTimeout(() => {
this.editor.focus();
}, 30);
setTimeout(() => {
this.editor.deleteBackward();
}, 50);
setTimeout(() => {
if (this.modify) {
this.modify = false;
this.editor.deleteBackward();
}
const resume = {
// JS
type: "attachment",
link: "",
fileName: this.addnode.fileName,
fileSpan: this.addnode.fileSpan,
fieldMark: this.addnode.fieldMark,
children: [{ text: "" }], // void children
};
this.editor.insertNode(resume);
this.addnode = {
fileName: "",
fileSpan: "",
fieldMark: "",
};
this.addlist.forEach((e) => {
const resume = {
// JS
type: "attachment",
fileName: e.split("-")[0],
fileSpan: e.split("-")[1],
children: [{ text: "" }], // void children
};
this.editor.insertNode(resume);
});
// this.addlist = [
// {
// fileName: "",
// // fieldMark: "",
// fileSpan: "",
// },
// ];
this.editor.focus();
++this.isResouceShow;
}, 100);
},
fieldclick() {
var aaa = document.querySelectorAll(".divBox");
// console.log(this.html, "this.html--before");
console.log(aaa, "打印dom");
// if (aaa.length != 0) {
// console.log(this.html, "this.html111");
// aaa.remove();
// }
// else
if (aaa.length == 0) {
// aaa.innerHTML = "";
this.html += `<div>${this.add}</div>`;
@ -322,13 +337,14 @@ export default {
},
info() {
labelFieldList("PORTRAIT_LABEL_FIELD").then((res) => {
res.data.data.forEach((e) => {
e.labelFieldContentList.forEach((el) => {
el.labelFieldId = el.labelFieldContentId;
el.fieldName = el.contentName;
});
});
this.labeloptions = res.data.data;
// res.data.data.forEach((e) => {
// e.labelFieldContentList.forEach((el) => {
// el.labelFieldId = el.labelFieldContentId;
// el.fieldName = el.contentName;
// });
// });
this.labeloptions = res;
console.log(res, "resssssssss");
});
bankLevel("3").then((res) => {
@ -344,7 +360,7 @@ export default {
// });
// });
this.fieldoptions = res;
// console.log(this.fieldoptions, "***");
console.log(this.fieldoptions, "***");
});
},
beforeClose() {