WXL
2024-05-22 e014c6f2c4123d811353b4fe59d1b489e0587543
测试完成
已修改4个文件
241 ■■■■■ 文件已修改
src/api/AiCentre/SingleTask.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/tasklist/index.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/particty.vue 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/repositoryai/templateku/configurat/index.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/AiCentre/SingleTask.js
@@ -93,4 +93,30 @@
        method: "post",
        data: data,
      });
    }
    }
    // 获取任务模版详情
  export function TaskTemplategetinfo(id) {
    return request({
      url: "/smartor/ivrTaskTemplate/getInfo/"+id,
      method: "get",
    });
  }
   // 任务模版新增修改
   export function TaskTemplatecomit(data) {
    return request({
      url: "/smartor/ivrTaskTemplate/saveOrUpdateTempScript",
      method: "post",
      data: data,
    });
  }
  // 任务发送,执行
  export function TaskTemplateSendExecution(data) {
    return request({
      url: "/dev-api/smartor/tasksingle/taskSend",
      method: "post",
      data: data,
    });
  }
src/views/followvisit/tasklist/index.vue
@@ -333,7 +333,7 @@
  resetUserPwd,
  changeUserStatus,
} from "@/api/system/user";
import { getTasklist, getTaskInfo } from "@/api/AiCentre/index";
import { getTasklist, getTaskInfo,TaskTemplateSendExecution } from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -623,21 +623,7 @@
        this.options = [];
      }
    },
    // 门诊随访状态修改
    handleStatusChange(row) {
      let text = row.status === "0" ? "启用" : "停用";
      this.$modal
        .confirm('确认要"' + text + '""' + row.userName + '"用户吗?')
        .then(function () {
          return changeUserStatus(row.userId, row.status);
        })
        .then(() => {
          this.$modal.msgSuccess(text + "成功");
        })
        .catch(function () {
          row.status = row.status === "0" ? "1" : "0";
        });
    },
    // 取消按钮
    cancel() {
      this.addalteropen = false;
@@ -716,22 +702,7 @@
    },
    // 删除任务
    deletefn(){},
    /** 重置密码按钮操作 */
    handleResetPwd(row) {
      this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        closeOnClickModal: false,
        inputPattern: /^.{5,20}$/,
        inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
      })
        .then(({ value }) => {
          resetUserPwd(row.userId, value).then((response) => {
            this.$modal.msgSuccess("修改成功,新密码是:" + value);
          });
        })
        .catch(() => {});
    },
    /** 提交按钮 */
    submitForm: function () {
src/views/patient/propaganda/particty.vue
@@ -41,7 +41,7 @@
                        placeholder="请输入任务名称"
                      /> </el-form-item
                  ></el-col>
                  <el-col :span="12"
                  <el-col :span="8"
                    ><el-form-item label="模版名称">
                      <el-input
                        style="width: 220px"
@@ -50,6 +50,13 @@
                        placeholder="请在下列选择"
                      /> </el-form-item
                  ></el-col>
                  <el-col :span="4">
                    <el-button
                      type="primary"
                      icon="el-icon-edit"
                      circle
                    ></el-button>
                  </el-col>
                </el-row>
                <el-form-item label="任务描述">
@@ -637,6 +644,43 @@
        >
      </span>
    </el-dialog>
    <el-dialog title="模版预览" :visible.sync="previewtf" width="60%">
      <div class="preview-left">
        <!-- 单选 -->
        <div
          class="topic-dev"
          v-for="(item, index) in questionList"
          :key="item.aaa"
        >
          <div class="dev-text">
            {{ index + 1 }}、<span>{{ item.questionText }}</span>
          </div>
          <div class="dev-xx" v-if="item.valueType == 1">
            <el-radio-group v-model="item.radio">
              <el-radio
                v-for="(items, index) in item.ivrLibaScriptTargetoptionList"
                :key="items.id"
                :label="items.id"
                >{{ items.targetvalue }}</el-radio
              >
            </el-radio-group>
          </div>
          <div v-else>
            <el-input
              type="textarea"
              placeholder="未获取到信息"
              v-model.sync="item.questionResult"
              :rows="2"
            />
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="previewGo">前往模版详情修改</el-button>
        <el-button type="primary" @click="previewFn">确认使用</el-button>
      </span>
    </el-dialog>
  </div>
</template>
@@ -648,6 +692,7 @@
  getlibrarylist,
  getFollowuplist,
  getQtemplatelist,
  TaskTemplatecomit,
  getTaskInfo,
  gethetaskinfo,
  delhetaskinfo,
@@ -665,13 +710,18 @@
      title: "宣教内容列表",
      currenttype: 1, //1宣教2门诊3出院4复诊5体检6问卷
      id: "",
      previewid: "",
      libName: "",
      libId: null,
      Editprogress: 1, //编辑进度
      previewtf: false, //预览
      loading: false, // 遮罩层
      patientloading: false, // 遮罩层
      dialogVisiblepatient: false, //添加患者弹框
      radio: 1,
      checkboxlist: [],
      tableLabel: [],
      questionList: [],
      // 患者表单
      tableLabelhz: [
@@ -811,6 +861,7 @@
        sendType: 1,
        templatename: "",
        templateid: null,
        libtemplateid: null,
      },
      taskoptions: [
        {
@@ -967,15 +1018,20 @@
          currenttype == 5 ||
          currenttype == 7
        ) {
          this.form.templatename = row.templateName;
          this.form.templateid = row.id;
          this.libName = row.templateName;
          this.libId = row.id;
        } else if (this.currenttype == 1) {
          this.form.templatename = row.preachname;
          this.form.templateid = row.id;
          this.libName = row.preachname;
          this.libId = row.id;
        }
        getvFollowup({ id: row.id }).then((res) => {
          if (res.code == 200) {
            this.Tasktemplate = res.data;
            const data = res.data;
            this.questionList = data.ivrLibaTemplateScriptVOList;
            this.previewtf = true;
            this.previewid = data.id;
            console.log(this.questionList, "questionList");
            this.Variablehandling(data.ivrLibaTemplateScriptVOList, 1);
          }
        });
@@ -1097,17 +1153,15 @@
      });
      this.form.patTaskRelevances.push(...this.SelectPatientslist);
      this.dialogVisiblepatient = false;
      this.assignedVariable()
      this.assignedVariable();
    },
    // 变量处理赋值服务
    assignedVariable() {
      // 获取患者列表信息循环
      console.log(this.variableList,'this.variableList');
      console.log(this.variableList, "this.variableList");
      this.form.patTaskRelevances.forEach((item) => {
        this.variableList.forEach((item1) => {
        })
      })
        this.variableList.forEach((item1) => {});
      });
      // 取数据填充变量数组
      // 数组转对象存入
    },
@@ -1187,6 +1241,34 @@
      if (this.time2) this.form.sendlimitnbegin = this.time2.join(",");
      if (this.time3) this.form.sendlimitnend = this.time3.join(",");
      console.log(combinedData, "combinedData");
    },
    // 查看模版
    previewGo() {
      this.$router.push({
        path: "/knowledge/templateku/configurat/",
        query: { id: this.previewid, task: true, data: this.form },
      });
    },
    previewFn() {
      let id = this.Tasktemplate.id;
      this.Tasktemplate.id = null;
      this.Tasktemplate.ivrLibaTemplateScriptVOList.ivrTaskScriptTargetoptionList =
        this.Tasktemplate.ivrLibaTemplateScriptVOList.ivrLibaScriptTargetoptionList;
      this.Tasktemplate.ivrTaskTemplateScriptVOList =
        this.Tasktemplate.ivrLibaTemplateScriptVOList;
      this.Tasktemplate.ivrLibaTemplateTagList = null;
      this.Tasktemplate.tempDetpRelevances = null;
      this.Tasktemplate.libtemplateid = id;
      this.Tasktemplate.isoperation = 1;
      this.Tasktemplate.libtemplatename = this.Tasktemplate.templateName;
      TaskTemplatecomit(this.Tasktemplate).then((response) => {
        console.log(response);
        this.previewtf = false;
        this.form.templateid = response.data;
        this.form.libtemplateid = this.libId;
        this.form.templatename = this.libName;
        this.$modal.msgSuccess("选择成功");
      });
    },
  },
};
@@ -1280,6 +1362,22 @@
//     margin: 0 20px;
//   }
// }
.preview-left {
  margin: 20px;
  //   margin: 20px;
  padding: 30px;
  background: #ffff;
  border: 1px solid #dcdfe6;
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
    0 0 6px 0 rgba(0, 0, 0, 0.04);
  .topic-dev {
    margin-bottom: 25px;
    font-size: 20px !important;
    .dev-text {
      margin-bottom: 10px;
    }
  }
}
.jic-value {
  font-size: 20px;
  border-top: 1px solid #a7abac;
src/views/repositoryai/templateku/configurat/index.vue
@@ -351,8 +351,10 @@
              >下一步</el-button
            >
            <el-button type="info" @click="closeFm('ruleForm')">关闭</el-button>
            <el-button type="success" @click="Departmenttreatment('ruleForm')"
              >保存随访模版基础信息</el-button
            <el-button
              type="success"
              @click="Departmenttreatment('ruleForm')"
              >{{ task ? "保存到任务模版" : "保存随访模版基础信息" }}</el-button
            >
          </el-form-item>
        </el-form>
@@ -453,7 +455,6 @@
                  <el-input
                    v-model="topicobj.questiontitle"
                    placeholder="请从左侧列表选择"
                    :disabled="true"
                  ></el-input>
                </el-form-item>
                <el-form-item label="问题节点">
@@ -679,9 +680,9 @@
          </div>
        </div>
        <el-button type="success" @click="Departmenttreatment('ruleForm')"
          >保存题目数据</el-button
        >
        <el-button type="success" @click="Departmenttreatment('ruleForm')">{{
          task ? "保存到任务模版" : "保存题目数据"
        }}</el-button>
        <el-button type="primary" plain @click="laststep()">上一步</el-button>
        <el-button type="success" plain @click="preview('ruleForm')"
          >查看预览</el-button
@@ -858,6 +859,8 @@
      drawer: false, //控制展开
      radios: [], //多选题选中
      radioas: "", //填空题答案
      task: null, //是否来自任务
      taskform: null, //任务信息
      labelInfovalue: [], //标签临时存储
      deptNamesvalue: [], //科室临时存储
      dynamicTags: [],
@@ -925,38 +928,11 @@
        },
      ],
      valssu: [
        {
          idd: 1,
          wssd: "你最近怎么样",
          sdadd: ["sss", "ssccss", "ssaas", "ss"],
        },
      ],
      valssu: [],
      radio: "",
      addvalue: "添加题目",
      // 题目表格数据
      userList: [
        {
          userid: "1",
          userName: "一号随访模版",
          verbaltrick: "一号随访模版",
        },
        {
          userid: "2",
          userName: "二号随访模版",
          verbaltrick: "一号随访模版",
        },
        {
          userid: "3",
          userName: "三号随访模版",
          verbaltrick: "一号随访模版",
        },
        {
          userid: "4",
          userName: "四号随访模版",
          verbaltrick: "一号随访模版",
        },
      ],
      userList: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
@@ -971,6 +947,7 @@
  },
  created() {
    this.RoutingDataProcessing();
    this.gettabList();
    this.getvFollowup();
    this.auxiliary();
@@ -991,10 +968,17 @@
    processElement(element) {
      return { ...element, isoperation: 0 };
    },
    // 路由数据处理
    RoutingDataProcessing() {
      this.id = this.$route.query.id;
      this.task = this.$route.query.task;
      console.log(this.task,'task');
      if (this.task) {
        this.id = this.$route.query.id;
      }
    },
    // 获取表单数据
    getvFollowup() {
      this.id = this.$route.query.id;
      getvFollowup({ id: this.id }).then((res) => {
        this.ruleForm = res.data;