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

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

View File

@ -157,6 +157,7 @@
type="textarea" type="textarea"
v-model="formInline.textRemindContent" v-model="formInline.textRemindContent"
:rows="6" :rows="6"
style="width: 600px"
placeholder="请输入内容" placeholder="请输入内容"
/> />
</el-form-item> </el-form-item>
@ -187,24 +188,100 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div <div>
v-if=" <div
formInline.taskType == 'TEXT_REMIND' || class="PushMethodrg"
formInline.taskType == 'PROPAGANDA_ARTICLE' || v-if="formInline.taskType == 'ARTIFICIAL_FOLLOW_UP'"
formInline.taskType == 'QUESTIONNAIRE_SCALE' >
" <div class="flex">
> <div class="itemlist">推送方式人工电话</div>
<div class="PushMethod">
<span>推送方式短信</span> <div class="itemlist">
<el-switch <el-switch
v-model="formInline.messagePushSign" v-model="formInline.phonePushSign"
active-color="#13ce66" active-color="#13ce66"
active-value="1" active-value="1"
inactive-value="0" inactive-value="0"
> >
</el-switch> </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>
<div class="PushMethod"> <div
class="PushMethod"
v-if="
formInline.taskType == 'TEXT_REMIND' ||
formInline.taskType == 'PROPAGANDA_ARTICLE' ||
formInline.taskType == 'QUESTIONNAIRE_SCALE'
"
>
<span>推送方式公众号</span> <span>推送方式公众号</span>
<el-switch <el-switch
v-model="formInline.officialPushSign" v-model="formInline.officialPushSign"
@ -214,7 +291,14 @@
> >
</el-switch> </el-switch>
</div> </div>
<div class="PushMethod"> <div
class="PushMethod"
v-if="
formInline.taskType == 'TEXT_REMIND' ||
formInline.taskType == 'PROPAGANDA_ARTICLE' ||
formInline.taskType == 'QUESTIONNAIRE_SCALE'
"
>
<span>推送方式小程序</span> <span>推送方式小程序</span>
<el-switch <el-switch
v-model="formInline.appletPushSign" v-model="formInline.appletPushSign"
@ -232,15 +316,52 @@
<div class="flex"> <div class="flex">
<div class="itemlist"> <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>
<div class="itemlist"> <div class="itemlist">
模板 话术模板
<scripts <span class="spanname" v-if="formInline.questionInfoId">
@on-template="messageontemplateword" <scripts
:templateId="formInline.phoneId" @on-template="messageontemplateword"
:templateName="formInline.phoneTemplateName" :templateId="formInline.phoneId"
></scripts> :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>
<div class="itemlist"> <div class="itemlist">
<el-switch <el-switch
@ -320,9 +441,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
@ -330,8 +449,8 @@
<script> <script>
import propaganda from "../components/propaganda.vue"; import propaganda from "../components/propaganda.vue";
import scriptphone from "../components/script.vue"; import scriptphone from "../components/script.vue";
import scripts from '../components/script.vue' import scripts from "../components/script.vue";
import message from '../components/message.vue' import message from "../components/message.vue";
import question from "../components/question.vue"; import question from "../components/question.vue";
import { signrouteadd } from "@/api/system/ManuallyCreatingTasks"; import { signrouteadd } from "@/api/system/ManuallyCreatingTasks";
import { getAgencytype } from "@/api/system/agency"; import { getAgencytype } from "@/api/system/agency";
@ -437,7 +556,9 @@ export default {
}); });
}, },
changeoptions(e) { changeoptions(e) {
this.parentDictCode = this.options.find((el) => el.dictValue == e).dictCode; this.parentDictCode = this.options.find(
(el) => el.dictValue == e
).dictCode;
this.changelisy(); this.changelisy();
}, },
changelisy() { changelisy() {
@ -462,8 +583,8 @@ export default {
// //
questionontemplate(item) { questionontemplate(item) {
if (this.formInline.taskType == "ARTIFICIAL_FOLLOW_UP") { if (this.formInline.taskType == "ARTIFICIAL_FOLLOW_UP") {
this.formInline.followTemplateId = item.templateId; this.formInline.questionInfoId = item.templateId;
this.formInline.followTemplateName = item.templateName; this.formInline.questionnaireName = item.templateName;
} else { } else {
this.formInline.questionInfoId = item.templateId; this.formInline.questionInfoId = item.templateId;
this.formInline.questionnaireName = item.templateName; this.formInline.questionnaireName = item.templateName;
@ -564,8 +685,6 @@ export default {
padding: 20px 50px 0px 20px; padding: 20px 50px 0px 20px;
border-radius: 10px; border-radius: 10px;
.flex { .flex {
display: flex; display: flex;
width: 100%; width: 100%;
@ -707,7 +826,7 @@ export default {
display: inline-block; display: inline-block;
float: right; float: right;
} }
::v-deep .el-form-item__content{ ::v-deep .el-form-item__content {
display: inline-block !important; display: inline-block !important;
} }
</style> </style>

View File

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