| | |
| | | handleOptionChange( |
| | | $event, |
| | | index, |
| | | item.svyLibTemplateTargetoptions, |
| | | item.svyTaskTemplateTargetoptions, |
| | | item |
| | | ) |
| | | " |
| | |
| | | <el-radio |
| | | v-for="( |
| | | items, indexs |
| | | ) in item.svyLibTemplateTargetoptions" |
| | | ) in item.svyTaskTemplateTargetoptions" |
| | | :class="items.isabnormal ? 'red-star' : ''" |
| | | :key="indexs" |
| | | :label="items.optioncontent" |
| | |
| | | @change="$forceUpdate()" |
| | | v-for="( |
| | | items, indexs |
| | | ) in item.svyLibTemplateTargetoptions" |
| | | ) in item.svyTaskTemplateTargetoptions" |
| | | :key="indexs" |
| | | :label="items.optioncontent" |
| | | > |
| | |
| | | > |
| | | <el-radio |
| | | v-for="(items, index) in item.scriptResult" |
| | | :key="items" |
| | | :key="index" |
| | | :label="items" |
| | | :class="items.isabnormal ? 'red-star' : ''" |
| | | @click.native.prevent=" |
| | | handleRadioToggle(item, items.optioncontent) |
| | | handleRadioToggles(item, items) |
| | | " |
| | | >{{ items }}</el-radio |
| | | > |
| | |
| | | console.log(date); |
| | | |
| | | if (!date) { |
| | | this.form.date1 = ''; |
| | | this.form.date1 = ""; |
| | | this.$refs.zcform.clearValidate(["date1"]); |
| | | return; |
| | | } |
| | |
| | | |
| | | if (selectedDate < now) { |
| | | this.$message.warning("随访时间不能早于当前日期"); |
| | | this.form.date1 = ''; |
| | | this.form.date1 = ""; |
| | | this.$refs.zcform.validateField("date1"); // 触发验证 |
| | | } |
| | | }, |
| | |
| | | return; |
| | | } |
| | | } |
| | | var objs = item.svyLibTemplateTargetoptions.find( |
| | | var objs = item.svyTaskTemplateTargetoptions.find( |
| | | (items) => items.optioncontent == item.scriptResult |
| | | ); |
| | | if (obj) { |
| | |
| | | .confirm('是否查看任务为"' + row.taskName + '"的服务详情数据?') |
| | | .then(() => { |
| | | let type = ""; |
| | | console.log(row, "rwo"); |
| | | if (row.type == 1) { |
| | | type = 1; |
| | | } |
| | | console.log(row, "rwo"); |
| | | if (row.type == 1) { |
| | | type = 1; |
| | | } |
| | | this.taskid = row.taskid; |
| | | this.id = row.id; |
| | | this.patid = row.patid; |
| | |
| | | (item) => item.optioncontent == a |
| | | ); |
| | | } else { |
| | | var obj = this.tableDatatop[b].svyLibTemplateTargetoptions.find( |
| | | var obj = this.tableDatatop[b].svyTaskTemplateTargetoptions.find( |
| | | (item) => item.optioncontent == a |
| | | ); |
| | | } |
| | |
| | | }, |
| | | // 新增的切换选中/取消选中方法 |
| | | handleRadioToggle(questionItem, optionValue) { |
| | | console.log(questionItem, optionValue, 999); |
| | | |
| | | // 如果点击的是当前已选中的选项,则取消选中 |
| | | if (questionItem.scriptResult === optionValue) { |
| | | questionItem.scriptResult = ""; // 清空选中值 |
| | |
| | | // 后续的跳转等复杂逻辑会在 handleOptionChange 中正常执行 |
| | | } |
| | | }, |
| | | handleRadioToggles(questionItem, optionValue) { |
| | | if (!questionItem.matchedtext) { |
| | | questionItem.matchedtext == ""; |
| | | } |
| | | // 如果点击的是当前已选中的选项,则取消选中 |
| | | if (questionItem.matchedtext == optionValue) { |
| | | this.$set(questionItem, "matchedtext", ""); |
| | | // 同时重置与选项相关的状态 |
| | | questionItem.isabnormal = false; |
| | | questionItem.showAppendInput = false; |
| | | // 注意:取消选中时,我们通常不希望触发题目跳转逻辑,所以直接返回 |
| | | // 如果需要,可以在这里添加取消选中后的特定逻辑,例如重置题目序列 |
| | | } else { |
| | | // 如果点击的是未选中的选项,则通过更改绑定值来触发原始的 handleOptionChange 方法 |
| | | // 这里只需要改变 v-model 绑定的值,change事件会自动触发 |
| | | this.$set(questionItem, "matchedtext", optionValue); // 后续的跳转等复杂逻辑会在 handleOptionChange 中正常执行 |
| | | } |
| | | }, |
| | | // 在methods部分,修改handleOptionChange方法: |
| | | handleOptionChange(selectedOption, questionIndex, options, a) { |
| | | console.log(selectedOption, questionIndex, options, a, "888"); |
| | | |
| | | if (document.activeElement) { |
| | | document.activeElement.blur(); |
| | | } |
| | |
| | | }, |
| | | overdata() { |
| | | this.tableDatatop.forEach((item, index) => { |
| | | var obj = item.svyLibTemplateTargetoptions.find( |
| | | var obj = item.svyTaskTemplateTargetoptions.find( |
| | | (items) => items.optioncontent == item.scriptResult |
| | | ); |
| | | if (obj) { |
| | |
| | | }, |
| | | // 新增问题 |
| | | addtopic(row) { |
| | | console.log(row); |
| | | row.isoperation = 1; |
| | | row.scriptid = row.id; |
| | | row.svyLibScriptOptions.forEach((item) => { |
| | | item.isoperation = 1; |
| | | }); |
| | |
| | | > |
| | | <el-radio |
| | | border |
| | | v-for="(items, index) in item.svyLibTemplateTargetoptions" |
| | | v-for="(items, index) in item.svyTaskTemplateTargetoptions" |
| | | :class=" |
| | | items.isabnormal && item.scriptResult == items.optioncontent |
| | | ? 'red-star' |
| | |
| | | <el-checkbox |
| | | border |
| | | @change="$forceUpdate()" |
| | | v-for="(items, indexs) in item.svyLibTemplateTargetoptions" |
| | | v-for="(items, indexs) in item.svyTaskTemplateTargetoptions" |
| | | :key="indexs" |
| | | :label="items.optioncontent" |
| | | > |
| | |
| | | // scriptType: 1, |
| | | // scriptContent: "您的年龄范围是?", |
| | | // scriptResult: null, |
| | | // svyLibTemplateTargetoptions: [ |
| | | // svyTaskTemplateTargetoptions: [ |
| | | // { optioncontent: "18-25", value: "18-25", isabnormal: true }, |
| | | // { optioncontent: "26-35", value: "26-35" }, |
| | | // { optioncontent: "36-45", value: "36-45" }, |
| | |
| | | // scriptType: 1, |
| | | // scriptContent: "您的职业是什么?", |
| | | // scriptResult: null, |
| | | // svyLibTemplateTargetoptions: [ |
| | | // svyTaskTemplateTargetoptions: [ |
| | | // { optioncontent: "学生", value: "student" }, |
| | | // { optioncontent: "教师", value: "teacher" }, |
| | | // { optioncontent: "工程师", value: "engineer" }, |
| | |
| | | // scriptType: 2, |
| | | // scriptContent: "您感兴趣的活动有哪些?", |
| | | // scriptResult: [], |
| | | // svyLibTemplateTargetoptions: [ |
| | | // svyTaskTemplateTargetoptions: [ |
| | | // { optioncontent: "旅游", value: "travel", isabnormal: true }, |
| | | // { optioncontent: "阅读", value: "reading", isabnormal: true }, |
| | | // { optioncontent: "运动", value: "sports", isabnormal: true }, |
| | |
| | | // scriptType: 1, |
| | | // scriptContent: "您的职业是什么?", |
| | | // scriptResult: null, |
| | | // svyLibTemplateTargetoptions: [ |
| | | // svyTaskTemplateTargetoptions: [ |
| | | // { optioncontent: "学生", value: "student" }, |
| | | // { optioncontent: "教师", value: "teacher" }, |
| | | // { optioncontent: "工程师", value: "engineer" }, |
| | |
| | | // scriptType: 1, |
| | | // scriptContent: "您的职业是什么?", |
| | | // scriptResult: null, |
| | | // svyLibTemplateTargetoptions: [ |
| | | // svyTaskTemplateTargetoptions: [ |
| | | // { optioncontent: "学生", value: "student" }, |
| | | // { optioncontent: "教师", value: "teacher" }, |
| | | // { optioncontent: "工程师", value: "engineer", isabnormal: true }, |
| | |
| | | // scriptType: 1, |
| | | // scriptContent: "您的职业是什么?", |
| | | // scriptResult: null, |
| | | // svyLibTemplateTargetoptions: [ |
| | | // svyTaskTemplateTargetoptions: [ |
| | | // { optioncontent: "学生", value: "student" }, |
| | | // { optioncontent: "教师", value: "teacher" }, |
| | | // { optioncontent: "工程师", value: "engineer" }, |
| | |
| | | let form = { |
| | | param1: this.taskid, |
| | | param2: this.patid, |
| | | svyLibTemplateScriptVOS: [], |
| | | svyTaskTemplateScriptVOS: [], |
| | | }; |
| | | const arr = structuredClone(this.questionList); |
| | | console.log(arr, "srr"); |
| | | arr.forEach((item, index) => { |
| | | var obj = item.svyLibTemplateTargetoptions.find( |
| | | var obj = item.svyTaskTemplateTargetoptions.find( |
| | | (items) => items.optioncontent == item.scriptResult |
| | | ); |
| | | console.log(obj, "obj"); |
| | |
| | | item.scriptResult = JSON.stringify(item.scriptResult); |
| | | } |
| | | }); |
| | | form.svyLibTemplateScriptVOS = arr; |
| | | form.svyTaskTemplateScriptVOS = arr; |
| | | form.type = 2; |
| | | Cachequestionnaire(form).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | // 处理单选选项 |
| | | handleOptionChange(selectedvalue, index, arr) { |
| | | // 查找选中的选项对象 |
| | | const selectedOption = arr.svyLibTemplateTargetoptions.find( |
| | | const selectedOption = arr.svyTaskTemplateTargetoptions.find( |
| | | (option) => option.optioncontent == selectedvalue |
| | | ); |
| | | if (selectedOption) { |
| | |
| | | // // ��加分数 |
| | | // let score = 0; |
| | | // selectedvalues.forEach((value) => { |
| | | // const selectedOption = arr.svyLibTemplateTargetoptions.find( |
| | | // const selectedOption = arr.svyTaskTemplateTargetoptions.find( |
| | | // (option) => option.optioncontent == value |
| | | // ); |
| | | // if (selectedOption) { |
| | |
| | | sendType: [ |
| | | { required: true, message: "发送设置不能为空", trigger: "blur" }, |
| | | ], |
| | | deptcode: [ |
| | | { required: true, message: "适用科室不能为空", trigger: "blur" }, |
| | | |
| | | longTask: [ |
| | | { required: true, message: "请选择执行周期", trigger: "blur" }, |
| | | ], |
| | | // leavehospitaldistrictcode: [ |
| | | // { required: true, message: "适用病区不能为空", trigger: "blur" }, |
| | |
| | | this.form.preachformList = this.selectedOrder; |
| | | } else { |
| | | this.$modal.msgError("请选择服务类型"); |
| | | this.submitLoading = false; |
| | | |
| | | return; |
| | | } |
| | | console.log(this.operationcodes[0]); |
| | |
| | | ) { |
| | | } else { |
| | | this.$modal.msgError("请选择任务关联条件"); |
| | | this.submitLoading = false; |
| | | return; |
| | | } |
| | | //暂停任务患者限制 |
| | |
| | | |
| | | if (!this.form.templatename && !this.templateor) { |
| | | this.$modal.msgError("未选择模板"); |
| | | this.submitLoading = false; |
| | | |
| | | return; |
| | | } |
| | | |
| | |
| | | this.form.longTask |
| | | ) { |
| | | } else { |
| | | this.submitLoading = false; |
| | | return this.$modal.msgError("时间信息缺失"); |
| | | } |
| | | const filteredArray = this.variableList.filter( |
| | |
| | | TaskQuestioncomit(this.objyl).then((response) => { |
| | | this.previewtf = false; |
| | | this.form.libtemplateid = this.objyl.svyid; |
| | | this.form.libtemplatename = this.objyl.svyname; |
| | | this.form.templateid = response.data; |
| | | this.form.templatename = this.objyl.svyname; |
| | | this.$modal.msgSuccess("选择模板成功"); |
| | |
| | | TaskQuestioncomit(this.objyl).then((response) => { |
| | | this.previewtf = false; |
| | | this.form.libtemplateid = this.objyl.svyid; |
| | | this.form.libtemplatename = this.objyl.svyname; |
| | | this.form.templateid = response.data; |
| | | this.form.templatename = this.objyl.svyname; |
| | | this.$modal.msgSuccess("选择模板成功"); |
| | |
| | | this.objyl.templateid = this.objyl.svyid; |
| | | this.form.libtemplateid = this.objyl.svyid; |
| | | this.objyl.isoperation = 1; |
| | | this.objyl.svyLibTemplateScriptVOS = |
| | | this.objyl.svyTaskTemplateScriptVOS = |
| | | this.objyl.svyTemplateLibScripts; |
| | | this.objyl.svyLibTemplateScriptVOS.forEach((item) => { |
| | | this.objyl.svyTaskTemplateScriptVOS.forEach((item) => { |
| | | item.svyTaskTemplateTargetoptions = |
| | | item.svyLibTemplateTargetoptions; |
| | | }); |
| | |
| | | <el-radio |
| | | v-for="( |
| | | items, index |
| | | ) in item.ivrLibaScriptTargetoptionList" |
| | | ) in item.ivrTaskScriptTargetoptionList" |
| | | :key="index" |
| | | :label="index" |
| | | >{{ items.targetvalue }}</el-radio |
| | |
| | | <el-checkbox |
| | | v-for="( |
| | | items, index |
| | | ) in item.ivrLibaScriptTargetoptionList" |
| | | ) in item.ivrTaskScriptTargetoptionList" |
| | | :key="index" |
| | | :label="index" |
| | | > |
| | |
| | | sendType: [ |
| | | { required: true, message: "发送设置不能为空", trigger: "blur" }, |
| | | ], |
| | | longTask: [ |
| | | { required: true, message: "请选择执行周期", trigger: "blur" }, |
| | | ], |
| | | // deptcode: [ |
| | | // { required: true, message: "适用科室不能为空", trigger: "blur" }, |
| | | // ], |
| | |
| | | this.form.preachformList = this.selectedOrder; |
| | | } else { |
| | | this.$modal.msgError("请选择服务类型"); |
| | | this.submitLoading = false; |
| | | |
| | | return; |
| | | } |
| | | |
| | |
| | | ) { |
| | | } else { |
| | | this.$modal.msgError("请选择任务关联条件"); |
| | | this.submitLoading = false; |
| | | |
| | | return; |
| | | } |
| | | // if (!this.form.patTaskRelevances[0] && !this.form.longTask) { |
| | |
| | | |
| | | if (!this.form.templatename && !this.templateor) { |
| | | this.$modal.msgError("未选择模板"); |
| | | this.submitLoading = false; |
| | | |
| | | return; |
| | | } |
| | | |
| | |
| | | this.form.longTask |
| | | ) { |
| | | } else { |
| | | this.submitLoading = false; |
| | | |
| | | return this.$modal.msgError("时间信息缺失"); |
| | | } |
| | | const filteredArray = this.variableList.filter( |
| | |
| | | this.objyl.suitway = this.objyl.suitway.join(","); |
| | | } |
| | | this.objyl.ivrLibaTemplateScriptVOList.forEach((item) => { |
| | | item.ivrTaskScriptTargetoptionList = item.ivrLibaScriptTargetoptionList; |
| | | item.ivrTaskScriptTargetoptionList = item.ivrTaskScriptTargetoptionList; |
| | | }); |
| | | this.objyl.ivrTaskTemplateScriptVOList = |
| | | this.objyl.ivrLibaTemplateScriptVOList; |
| | |
| | | Taskparticty(this.objyl).then((response) => { |
| | | this.previewtf = false; |
| | | this.form.libtemplateid = this.objyl.id; |
| | | this.form.libtemplatename = this.objyl.templateName; |
| | | this.form.templateid = response.data; |
| | | this.putbelongDepts(response.data); |
| | | this.form.templatename = this.objyl.templateName; |
| | |
| | | Taskparticty(this.objyl).then((response) => { |
| | | this.previewtf = false; |
| | | this.form.libtemplateid = this.objyl.id; |
| | | this.form.libtemplatename = this.objyl.templateName; |
| | | this.form.templateid = response.data; |
| | | this.putbelongDepts(response.data); |
| | | this.form.templatename = this.objyl.templateName; |
| | |
| | | this.objyl.isoperation = 1; |
| | | this.objyl.ivrLibaTemplateScriptVOList.forEach((item) => { |
| | | item.ivrTaskScriptTargetoptionList = |
| | | item.ivrLibaScriptTargetoptionList; |
| | | item.ivrTaskScriptTargetoptionList; |
| | | }); |
| | | this.objyl.ivrTaskTemplateScriptVOList = |
| | | this.objyl.ivrLibaTemplateScriptVOList; |
| | |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="通知内容" prop="preachcontent"> |
| | | <div style="width: 80%"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="5" |
| | | v-model="ruleForm.preachcontent" |
| | | placeholder="请输入通知内容" |
| | | ></el-input> |
| | | </div> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="5" |
| | | show-word-limit |
| | | id="preachcontent" |
| | | v-model.sync="ruleForm.preachcontent" |
| | | placeholder="请输入通知内容" |
| | | @focus="handleInput('preachcontent')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="通知变量" prop="name"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="通知变量" prop="scriptContent"> |
| | | <div style="display: flex; margin-bottom: 10px"> |
| | | <div |
| | | v-for="item in variablelist" |
| | | :class="item.default ? 'tsgname' : 'tsgnames'" |
| | | @click="tsgnameto(item)" |
| | | > |
| | | {{ item.variatename }} |
| | | </div> |
| | | <div class="tsgnamebj" @click="variabledeawer = true"> |
| | | 变量编辑 |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col></el-row |
| | | > |
| | | <!-- <el-form-item label="通知变量" prop="name"> |
| | | <div style="margin-bottom: 5px" v-for="item in variablelist"> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | |
| | | <el-form-item label="标签" prop="desc"> |
| | | <div class="xinz-inf"> |
| | |
| | | > |
| | | <el-button type="info" @click="closeFm('ruleForm')">关闭</el-button> |
| | | </el-form-item> |
| | | <el-drawer |
| | | title="变量编辑" |
| | | :visible.sync="variabledeawer" |
| | | direction="ttb" |
| | | size="35%" |
| | | > |
| | | <el-form-item label="通知变量" prop="name"> |
| | | <div style="margin-bottom: 5px" v-for="item in variablelist"> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-input |
| | | v-model="item.variatename" |
| | | placeholder="请输入变量名" |
| | | ></el-input> |
| | | </el-col> |
| | | <el-col :span="8" :offset="1"> |
| | | <el-input |
| | | v-model="item.variate" |
| | | placeholder="请输入变量内容" |
| | | ></el-input> |
| | | </el-col> |
| | | <el-col :span="8" :offset="1"> |
| | | <el-button |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | circle |
| | | @click="addvariable(item)" |
| | | ></el-button> |
| | | <el-button |
| | | v-if="!item.default" |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | circle |
| | | @click="delvariable(item)" |
| | | ></el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form-item> |
| | | </el-drawer> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 添加适用疾病窗口 --> |
| | | <Optional-Form |
| | | ref="child" |
| | |
| | | dynamicTags: [], |
| | | inputVisible: false, |
| | | illnessVisible: false, |
| | | variabledeawer: false, |
| | | dialogVisiblepatient: false, |
| | | inputValue: "", |
| | | sidecolumnrabs: "left", |
| | |
| | | tempDetpRelevances: [], |
| | | version: "1.0.1", |
| | | }, |
| | | currentInputId: "", |
| | | rules: {}, |
| | | rulesa: {}, |
| | | mode: [], |
| | |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | // 便捷标签 |
| | | tsgnameto(row) { |
| | | let inputValueArr = ""; |
| | | let el = document.querySelector("#" + this.currentInputId); |
| | | //el.selectionStart; 这就是当前光标所在的位置(字符串中字符的index) |
| | | if (this.currentInputId == "preachcontent") { |
| | | inputValueArr = this.ruleForm.preachcontent.split(""); |
| | | } else { |
| | | return; |
| | | } |
| | | //将输入框内容切成数组,方便后续操作 |
| | | // inputValueArr = this.inputValue.split(""); |
| | | // 拿到选中文字的长度(后续可以用来替换选中的文字) |
| | | let selectLength = el.selectionEnd - el.selectionStart; |
| | | // 将要插入/替换的文字插入/替换(value.name是要插入/替换的字符串) |
| | | inputValueArr.splice(el.selectionStart, selectLength, `${row.variate}`); |
| | | // 把数组重新转换为字符串并赋值 |
| | | inputValueArr = inputValueArr.join(""); |
| | | console.log(inputValueArr); |
| | | if (this.currentInputId == "preachcontent") { |
| | | this.ruleForm.preachcontent = inputValueArr; |
| | | } else { |
| | | return; |
| | | } |
| | | }, |
| | | handleInput(id) { |
| | | this.currentInputId = id; |
| | | console.log("输入框的值已更新:", this.currentInputId); |
| | | // 在这里执行更新数据的逻辑 |
| | | }, |
| | | // 保存疾病 |
| | | confirmillness(guid) { |
| | |
| | | vertical-align: bottom; |
| | | } |
| | | } |
| | | .tsgnames { |
| | | width: 90px; |
| | | margin-right: 10px; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | background: #7799fa; |
| | | color: #ffff; |
| | | font-size: 18px; |
| | | border-radius: 5px; |
| | | } |
| | | .tsgnames:hover { |
| | | background: #3366f5; |
| | | } |
| | | .tsgname { |
| | | width: 90px; |
| | | margin-right: 10px; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | background: #66c18c; |
| | | color: #ffff; |
| | | font-size: 18px; |
| | | border-radius: 5px; |
| | | } |
| | | .tsgname:hover { |
| | | background: #20894d; |
| | | } |
| | | .tsgnamebj { |
| | | width: 90px; |
| | | margin-left: 15px; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | background: #49dbb7; |
| | | color: #ffff; |
| | | font-size: 18px; |
| | | border-radius: 5px; |
| | | } |
| | | .tsgnamebj:hover { |
| | | background: #27c449; |
| | | } |
| | | |
| | | ::v-deep .el-step.is-vertical .el-step__title { |
| | | font-size: 25px; |