From 2c9ddebd07230ca4165e2ee55470133fdf9ccd99 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 31 七月 2024 09:42:22 +0800
Subject: [PATCH] 测试完成

---
 src/components/OptionalForm/index.vue                    |  328 +++++++++++++++++++++++++
 src/views/repositoryai/templateku/configurat/index.vue   |  116 +-------
 src/views/repositoryai/verbaltrick/particulars/index.vue |    1 
 src/components/Regular/index.vue                         |    6 
 src/api/AiCentre/Qtemplate.js                            |    9 
 src/views/knowledge/questionnaire/compilequer/index.vue  |  126 ++-------
 src/views/knowledge/questionnaire/index.vue              |    2 
 src/views/knowledge/education/compilequer/index.vue      |  163 ++++--------
 8 files changed, 455 insertions(+), 296 deletions(-)

diff --git a/src/api/AiCentre/Qtemplate.js b/src/api/AiCentre/Qtemplate.js
index 906ecdd..d87fb2f 100644
--- a/src/api/AiCentre/Qtemplate.js
+++ b/src/api/AiCentre/Qtemplate.js
@@ -2,13 +2,20 @@
 import { param } from "jquery";
 
 // 鏌ヨ闂嵎妯$増鍒楄〃
-export function getQtemplatelist(data) {
+export function getQtemplateobj(data) {
   return request({
     url: "/smartor/svyLibTemplate/selectSvyLibTemplatelist",
     method: "post",
     data: data,
   });
 }
+export function getQtemplatelist(data) {
+  return request({
+    url: "/smartor/svyLibTemplate/list",
+    method: "get",
+    params: data,
+  });
+}
 // 闂嵎妯$増璇︽儏
 export function Qtemplateinfo(Id) {
   return request({
diff --git a/src/components/OptionalForm/index.vue b/src/components/OptionalForm/index.vue
new file mode 100644
index 0000000..4b06d07
--- /dev/null
+++ b/src/components/OptionalForm/index.vue
@@ -0,0 +1,328 @@
+<template>
+  <div>
+    <el-dialog
+      title="閫傜敤鐤剧梾閫夋嫨"
+      :visible.sync="dialogVisiblepatient"
+      width="70%"
+      :before-close="handleClosehz"
+    >
+      <div class="examine-jic">
+        <div style="margin: 0 10px 20px 10px">
+          <el-card class="box-card">
+            <el-tag
+              v-for="item in overallCase"
+              :key="item.icdid"
+              type="warning"
+              closable
+              @close="handleClose(item)"
+            >
+              {{ item.icdname }}
+            </el-tag>
+            <div style="margin-top: 20px; text-align: right">
+              鍏遍�夋嫨<span
+                style="font-size: 18px; color: #409eff; margin: 0 10px"
+                >{{ overallCase.length }}</span
+              >鏉℃暟鎹�
+            </div>
+          </el-card>
+        </div>
+        <div class="jic-value">
+          <el-row :gutter="20">
+            <!--鐢ㄦ埛鏁版嵁-->
+            <el-form
+              :model="patientqueryParams"
+              ref="queryForm"
+              size="small"
+              :inline="true"
+              label-width="98px"
+            >
+              <el-form-item label="鐤剧梾鍚嶇О" prop="name">
+                <el-input
+                  v-model="patientqueryParams.icdname"
+                  placeholder="璇疯緭鍏ョ柧鐥呭悕绉�"
+                  @keyup.enter.native="handleAddpatient"
+                />
+              </el-form-item>
+
+              <el-form-item>
+                <el-button
+                  type="primary"
+                  icon="el-icon-search"
+                  size="medium"
+                  @click="handleAddpatient"
+                  >鎼滅储</el-button
+                >
+                <el-button
+                  icon="el-icon-refresh"
+                  size="medium"
+                  @click="resetQuery"
+                  >閲嶇疆</el-button
+                >
+              </el-form-item>
+            </el-form>
+            <!-- 閫夋嫨鍣ㄥ畼鍒楄〃 -->
+            <el-table
+              ref="multipleTable"
+              :data="donorchargeList"
+              tooltip-effect="dark"
+              style="width: 100%"
+              @selection-change="handleSelectionChange"
+            >
+              <el-table-column type="selection" width="55"> </el-table-column>
+              <el-table-column
+                prop="icdid"
+                label="鐤剧梾缂栧彿"
+                width="100"
+                show-overflow-tooltip
+              >
+              </el-table-column>
+              <el-table-column label="鐤剧梾鍚嶇О" show-overflow-tooltip>
+                <template slot-scope="scope">{{ scope.row.icdname }}</template>
+              </el-table-column>
+
+              <el-table-column prop="icdcode" label="鐤剧梾缂栫爜" width="150">
+              </el-table-column>
+            </el-table>
+          </el-row>
+          <pagination
+            v-show="patienttotal > 0"
+            :total="patienttotal"
+            :page.sync="patientqueryParams.pageNum"
+            :limit.sync="patientqueryParams.pageSize"
+            @pagination="handleAddpatient"
+          />
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="$emit('addoption')">鍙� 娑�</el-button>
+        <el-button type="primary" @click="AddDispatchpatients"
+          >纭畾娣诲姞</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getillnesslist, deltargetillness } from "@/api/AiCentre/index";
+export default {
+  name: "Diseasetotality",
+  data() {
+    return {
+      patienttotal: 0, //
+      // 褰撳墠椤甸�変腑鏁版嵁
+      multipleSelection: [],
+      // 鎬婚�変腑鏁版嵁
+      // overallCase: [],
+      patientqueryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      donorchargeList: [],
+      donorchargeanlList: [], //妗堜緥鍒楄〃
+    };
+  },
+
+  props: {
+    dialogVisiblepatient: {
+      type: Boolean,
+      default: () => {
+        return false;
+      },
+    },
+    overallCase: {
+      type: Array,
+      required: true,
+      default: () => [],
+    },
+    // 5闂嵎妯$増銆�3闅忚妯$増銆�6瀹f暀
+    type: {
+      type: Number,
+      default: () => {
+        return 5;
+      },
+    },
+  },
+
+  created() {},
+
+  mounted() {
+    // this.handleAddpatient();
+  },
+
+  watch: {},
+
+  methods: {
+    handleClosehz() {
+      this.$emit("addoption");
+    },
+    // 閫夋嫨鏁版嵁鏍囩鍒犻櫎浜嬩欢
+    handleClose(item) {
+      console.log(item);
+      if (this.multipleSelection.indexOf(item) == -1 && !item.outid) {
+        console.log(1);
+        this.overallCase.splice(this.overallCase.indexOf(item), 1);
+      } else if (item.outid) {
+        this.$modal
+          .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + item.icd10name + '"鐨勬暟鎹」锛�')
+          .then(() => {
+            this.multipleSelection.splice(
+              this.multipleSelection.indexOf(item),
+              1
+            );
+            deltargetillness(item.id).then((res) => {
+              if (res.code == 200) {
+                this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+                this.overallCase.splice(this.overallCase.indexOf(item), 1);
+              }
+            });
+            // 鍙栨秷鎸傝浇鐘舵��
+            this.$refs.multipleTable.toggleRowSelection(item, false);
+          })
+          .catch(() => {});
+      } else {
+        this.overallCase.splice(this.overallCase.indexOf(item), 1);
+        this.multipleSelection.splice(this.multipleSelection.indexOf(item), 1);
+        // 鍙栨秷鎸傝浇鐘舵��
+        this.$refs.multipleTable.toggleRowSelection(item, false);
+      }
+    },
+    resetQuery() {
+      this.patientqueryParams.icdname = null;
+      this.handleAddpatient();
+    },
+    // 瑙﹀彂鏌ヨ浜嬩欢
+    handleAddpatient(row) {
+      this.$emit("kkoption");
+
+      getillnesslist(this.patientqueryParams).then((res) => {
+        this.donorchargeList = res.rows;
+        this.patienttotal = res.total;
+        console.log(this.$refs.multipleTable, "22");
+        this.Restorecheck();
+      });
+    },
+    // 澶氶�夋閫変腑鏁版嵁
+    handleSelectionChange(selection) {
+      if (this.decision) return;
+      // 鍒ゆ柇鏄惁鏈夊垹闄�
+      if (this.multipleSelection.length <= selection.length) {
+        this.multipleSelection = selection;
+      } else {
+        console.log(selection, "selection");
+        console.log(this.multipleSelection, "this.multipleSelection");
+        this.multipleSelection.forEach((item) => {
+          if (selection.includes(item)) {
+          } else {
+            if (this.multipleSelection.length == 1) {
+              this.multipleSelection = [];
+            } else {
+              this.multipleSelection.splice(
+                this.multipleSelection.indexOf(item),
+                1
+              );
+            }
+            if (this.overallCase.length == 1) {
+              this.overallCase = [];
+            } else {
+              this.overallCase.splice(this.overallCase.indexOf(item), 1);
+            }
+          }
+        });
+      }
+      // 璧嬪�肩粰鏁翠綋閫変腑鏁扮粍
+      console.log(this.overallCase);
+      this.multipleSelection.forEach((item) => {
+        console.log(
+          this.overallCase.every((obj) => obj.icdname != item.icdname)
+        );
+
+        if (this.overallCase.every((obj) => obj.icdname != item.icdname)) {
+          this.overallCase.push(item);
+        }
+      });
+      console.log(this.multipleSelection, "瑙﹀彂閫夋嫨鍚巑ultipleSelection");
+    },
+    // 鍒囨崲椤靛悗鎭㈠閫変腑
+    Restorecheck() {
+      console.log(this.overallCase, "this.overallCase");
+      const allid = this.overallCase.map((item) => item.icdname);
+      const overlap = this.donorchargeList.filter((value) => {
+        return allid.includes(value.icdname);
+      });
+      // 淇濇寔ids鍜屽綋鍓嶉〉闈㈢殑鍚屾鎬�
+      this.multipleSelection = overlap;
+      console.log(this.multipleSelection, "杩涘叆鍒嗛〉multipleSelection");
+
+      this.toggleSelection(overlap);
+    },
+    // 鎸傝浇閫夋嫨鐘舵��
+    toggleSelection(rows) {
+      if (rows) {
+        this.decision = true;
+        this.$nextTick(() => {
+          rows.forEach((row) => {
+            this.$refs.multipleTable.toggleRowSelection(row, true);
+          });
+          this.decision = false;
+        });
+        console.log(123);
+      } else {
+        this.$refs.multipleTable.clearSelection();
+      }
+    },
+    AddDispatchpatients() {
+      this.$emit("addoption");
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.examine-jic {
+  .headline {
+    font-size: 24px;
+    border-left: 5px solid #41a1be;
+    padding-left: 5px;
+    margin-bottom: 10px;
+    display: flex;
+    justify-content: space-between;
+    .Add-details {
+      font-size: 18px;
+      color: #02a7f0;
+      cursor: pointer;
+    }
+  }
+  .jic-value {
+    font-size: 20px;
+    border-top: 1px solid #a7abac;
+    padding: 10px;
+    margin-bottom: 10px;
+    .details-jic {
+      padding: 10px 15px;
+      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);
+      .details-title {
+        display: flex;
+        justify-content: space-between;
+        margin-bottom: 10px;
+        div:nth-child(2) {
+          color: #02a7f0;
+          cursor: pointer;
+        }
+      }
+      .details-renw {
+        background: #e4ebfc;
+        padding: 15px 5px;
+        border-radius: 5px;
+        margin-bottom: 20px;
+      }
+    }
+  }
+}
+.el-tag + .el-tag {
+  margin-left: 10px;
+  margin-bottom: 10px;
+}
+</style>
diff --git a/src/components/Regular/index.vue b/src/components/Regular/index.vue
index 2c1841c..bab62b1 100644
--- a/src/components/Regular/index.vue
+++ b/src/components/Regular/index.vue
@@ -150,7 +150,7 @@
           >
         </div>
       </el-form-item>
-      <el-form-item label="閫夐」鏂囦欢" prop="sickness">
+      <el-form-item label="閫夐」鏂囦欢" prop="sickness" v-if="Verbalproblem">
         <div style="width: 40vw">
           <el-upload
             class="upload-demo"
@@ -271,6 +271,10 @@
       type: Boolean,
       default: true,
     },
+    Verbalproblem: {
+      type: Boolean,
+      default: true,
+    },
   },
 
   created() {
diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue
index 57f987d..dfdea95 100644
--- a/src/views/knowledge/education/compilequer/index.vue
+++ b/src/views/knowledge/education/compilequer/index.vue
@@ -211,45 +211,9 @@
             </el-select>
           </el-form-item>
           <el-form-item label="閫傜敤鐤剧梾" prop="region">
-            <div class="xinz-inf">
-              <el-tag
-                :key="item.icd10name"
-                type="warning"
-                v-for="item in illnesslist"
-                closable
-                :disable-transitions="false"
-                @close="handleCloseillness(item)"
-              >
-                {{ item.icd10name }}
-              </el-tag>
-              <el-select
-                v-model="inputValue"
-                v-if="illnessVisible"
-                @change="illnessConfirm"
-                :remote-method="remoteMethod"
-                filterable
-                remote
-                allow-create
-                default-first-option
-                placeholder="璇烽�夋嫨/鏌ヨ"
-                :loading="loading"
-              >
-                <el-option
-                  v-for="item in optionsillness"
-                  :key="item.icdid"
-                  :label="item.icdname"
-                  :value="item.icdid"
-                >
-                </el-option>
-              </el-select>
-              <el-button
-                v-else
-                class="button-new-tag"
-                size="small"
-                @click="illnessshowInput"
-                >+ 鏂板鐤剧梾</el-button
-              >
-            </div>
+            <el-button type="warning" @click="$refs.child.handleAddpatient()"
+              >娣诲姞鐤剧梾</el-button
+            >
           </el-form-item>
           <el-form-item label="閫傜敤闄㈠尯" prop="region">
             <el-select
@@ -385,6 +349,14 @@
         </div>
       </div>
     </div>
+    <!-- 娣诲姞閫傜敤鐤剧梾绐楀彛 -->
+    <Optional-Form
+      ref="child"
+      :dialogVisiblepatient="dialogVisiblepatient"
+      :overallCase="illnesslist"
+      @addoption="dialogVisiblepatient = false"
+      @kkoption="dialogVisiblepatient = true"
+    />
   </div>
 </template>
 
@@ -407,6 +379,8 @@
   illnesslistget,
   getillness,
 } from "@/api/AiCentre/index";
+import OptionalForm from "@/components/OptionalForm"; //姝e垯缁勪欢
+
 import { listDept } from "@/api/system/dept";
 // import * as Quill from "quill";
 import Quill from "quill";
@@ -440,6 +414,7 @@
 ];
 
 export default {
+  components: { OptionalForm },
   data() {
     return {
       headers: {
@@ -464,6 +439,7 @@
       dynamicTags: [],
       inputVisible: false,
       illnessVisible: false,
+      dialogVisiblepatient: false, //閫傜敤鐤剧梾绐楀彛
       inputValue: "",
       // 瀵屾枃鏈�
       editorOption: {
@@ -640,29 +616,47 @@
         this.ruleForm.suitway.length != 0
           ? this.ruleForm.suitway.join(",")
           : "";
-      if (this.id) {
-        this.ruleForm.isoperation = 2;
-      } else {
-        this.ruleForm.isoperation = 1;
-      }
-      this.illnesslist.forEach((item, index) => {
-        if (!item.id) {
-          addtargetillness(item).then((res) => {});
-        }
-      });
-      if (this.illnesslistapi.length) {
-        deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
-      }
+
       addrichText({
         content: this.content,
         fileName: this.fileName ? this.fileName : "娴嬭瘯.html",
       }).then((res) => {
         this.ruleForm.richText = res.msg;
-        compilelibrary(this.ruleForm).then((res) => {
-          this.$modal.msgSuccess("缂栬緫鎴愬姛");
-          this.$router.go(-1);
-        });
+        if (this.id) {
+          this.ruleForm.isoperation = 2;
+          compilelibrary(this.ruleForm).then((res) => {
+            this.$modal.msgSuccess("缂栬緫鎴愬姛");
+            this.confirmillness();
+            this.$router.go(-1);
+          });
+        } else {
+          this.ruleForm.isoperation = 1;
+          compilelibrary(this.ruleForm).then((res) => {
+            this.$modal.msgSuccess("鏂板鎴愬姛");
+            this.confirmillness(res.data);
+            this.$router.go(-1);
+          });
+        }
       });
+    },
+    // 淇濆瓨鐤剧梾
+    confirmillness(guid) {
+      this.illnesslist.forEach((item, index) => {
+        if (guid) {
+          item.outid = guid;
+        } else {
+          console.log(this.ruleForm);
+          item.outid = this.ruleForm.id;
+        }
+        item.icd10name = item.icdname;
+        item.icd10code = item.icdcode;
+        item.type = 6;
+        if (!item.id) {
+          addtargetillness(item).then((res) => {});
+        }
+      });
+      this.illnessVisible = false;
+      this.$modal.msgSuccess("缂栬緫鎴愬姛");
     },
     getFileNameFromPath(path) {
       const parts = path.split("/");
@@ -815,59 +809,16 @@
     },
     // 鐤剧梾-----------------------
     illnessUpdate() {
-      this.illnesslistapi = [];
-      const illnessqueryParams = {
-        pageNum: 1,
-        pageSize: 100,
-      };
-      getillnesslist(illnessqueryParams).then((response) => {
-        this.optionsillness = response.rows;
-      });
-      getillness({ outid: this.$route.query.id, type: 6 }).then((res) => {
-        this.illnesslist = res.rows;
-      });
-    },
-    handleCloseillness(tag) {
-      this.illnesslist.splice(this.illnesslist.indexOf(tag), 1);
-      if (tag.id) {
-        this.illnesslistapi.push(tag.id);
+      if (this.id) {
+        getillness({ outid: this.$route.query.id, type: 6 }).then((res) => {
+          this.illnesslist = res.rows;
+          this.illnesslist.forEach((item) => {
+            item.icdname = item.icd10name;
+          });
+        });
       }
     },
-    remoteMethod(value) {
-      const illnessqueryParams = {
-        pageNum: 1,
-        pageSize: 100,
-        icdname: value,
-      };
-      this.loading = true;
-      setTimeout(() => {
-        this.loading = false;
-        getillnesslist(illnessqueryParams).then((response) => {
-          this.optionsillness = response.rows;
-        });
-      }, 200);
-    },
-    illnessConfirm(item) {
-      let opeavalue = {};
-      let tagname = this.inputValue;
-      illnesslistget(item).then((res) => {
-        opeavalue = res.data;
-        opeavalue.outid = this.id;
-        opeavalue.type = 6;
-        opeavalue.icd10id = opeavalue.icdid;
-        opeavalue.icd10name = opeavalue.icdname;
-        opeavalue.icd10code = opeavalue.icdcode;
-        if (tagname) {
-          this.illnesslist.push(opeavalue);
-        }
-      });
-      this.illnessVisible = false;
-      this.inputValue = "";
-    },
 
-    illnessshowInput() {
-      this.illnessVisible = true;
-    },
     // --------------------------
 
     // 棰勮妯$増
diff --git a/src/views/knowledge/questionnaire/compilequer/index.vue b/src/views/knowledge/questionnaire/compilequer/index.vue
index 4db2cdc..5f90647 100644
--- a/src/views/knowledge/questionnaire/compilequer/index.vue
+++ b/src/views/knowledge/questionnaire/compilequer/index.vue
@@ -143,45 +143,9 @@
           </el-row>
           <el-row>
             <el-form-item label="閫傜敤鐤剧梾" prop="region">
-              <div class="xinz-inf">
-                <el-tag
-                  :key="item.icd10name"
-                  type="warning"
-                  v-for="item in illnesslist"
-                  closable
-                  :disable-transitions="false"
-                  @close="handleCloseillness(item)"
-                >
-                  {{ item.icd10name }}
-                </el-tag>
-                <el-select
-                  v-model="inputValueillness"
-                  v-if="inputVisibleillness"
-                  @change="illnessConfirm"
-                  :remote-method="remoteMethod"
-                  filterable
-                  remote
-                  allow-create
-                  default-first-option
-                  placeholder="璇烽�夋嫨/鏌ヨ"
-                  :loading="loading"
-                >
-                  <el-option
-                    v-for="item in optionsillness"
-                    :key="item.icdid"
-                    :label="item.icdname"
-                    :value="item.icdid"
-                  >
-                  </el-option>
-                </el-select>
-                <el-button
-                  v-else
-                  class="button-new-tag"
-                  size="small"
-                  @click="inputVisibleillness = true"
-                  >+ 鏂板鐤剧梾</el-button
-                >
-              </div>
+              <el-button type="warning" @click="$refs.child.handleAddpatient()"
+                >娣诲姞鐤剧梾</el-button
+              >
             </el-form-item>
           </el-row>
           <el-row :gutter="20">
@@ -617,7 +581,7 @@
         <el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
       </div>
     </div>
-    <!-- 棰勮妯$増寮圭獥 -->
+    <!-- 娣诲姞棰樼洰寮圭獥 -->
     <el-drawer
       title="娣诲姞棰樼洰"
       :visible.sync="drawer"
@@ -703,6 +667,14 @@
         />
       </div>
     </el-drawer>
+    <!-- 娣诲姞閫傜敤鐤剧梾绐楀彛 -->
+    <Optional-Form
+      ref="child"
+      :dialogVisiblepatient="dialogVisiblepatient"
+      :overallCase="illnesslist"
+      @addoption="dialogVisiblepatient = false"
+      @kkoption="dialogVisiblepatient = true"
+    />
   </div>
 </template>
 
@@ -714,7 +686,7 @@
   getQtemplateclassify,
   delQtemplateclassify,
   addQtemplateclassify,
-  getQtemplatelist,
+  getQtemplateobj,
   compileQtemplate,
   Qtemplateinfo,
   compileissue,
@@ -728,9 +700,14 @@
   illnesslistget,
   getillness,
 } from "@/api/AiCentre/index";
+import OptionalForm from "@/components/OptionalForm"; //姝e垯缁勪欢
 import { getToken } from "@/utils/auth";
 
 export default {
+  name: "Qcompilequer",
+
+  components: { OptionalForm },
+
   data() {
     return {
       headers: {
@@ -747,6 +724,7 @@
       radioas: "", //濉┖棰樼瓟妗�
       dynamicTags: [],
       inputVisible: false,
+      dialogVisiblepatient: false, //閫傜敤鐤剧梾绐楀彛
       inputValue: "",
       topicobj: {},
       // 鎬绘潯鏁�
@@ -891,31 +869,27 @@
     getissueinfo() {
       this.id = this.$route.query.id;
       if (this.id) {
-        getQtemplatelist({ svyid: this.id }).then((res) => {
+        getQtemplateobj({ svyid: this.id }).then((res) => {
           this.ruleForm = res.rows[0];
           this.dynamicTags = this.ruleForm.svyLibTemplateTagList.map(
             this.processElement
           );
           this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
           this.ruleForm.suitway = this.ruleForm.suitway.split(",");
-          console.log(this.tempDetpRelevanceslist);
         });
         getillness({ outid: this.id, type: 5 }).then((res) => {
           this.illnesslist = res.rows;
+          this.illnesslist.forEach((item) => {
+            item.icdname = item.icd10name;
+          });
         });
       }
-      getillnesslist({
-        pageNum: 1,
-        pageSize: 100,
-      }).then((response) => {
-        this.optionsillness = response.rows;
-      });
+
       listDept(this.queryParams).then((response) => {
         this.deptList = this.handleTree(response.data, "deptId");
       });
       // 鍒嗙被
       getQtemplateclassify({}).then((res) => {
-        // this.optionsclass = this.flattenArray(res.rows);
         this.optionsclass = res.rows;
       });
     },
@@ -1160,60 +1134,22 @@
     showInput() {
       this.inputVisible = true;
     },
-    // 鐤剧梾-----------------------
-
-    handleCloseillness(tag) {
-      this.illnesslist.splice(this.illnesslist.indexOf(tag), 1);
-      if (tag.id) {
-        this.illnesslistapi.push(tag.id);
-      }
-    },
-    remoteMethod(value) {
-      console.log(value);
-      const illnessqueryParams = {
-        pageNum: 1,
-        pageSize: 100,
-        icdname: value,
-      };
-      this.loading = true;
-      setTimeout(() => {
-        this.loading = false;
-        getillnesslist(illnessqueryParams).then((response) => {
-          this.optionsillness = response.rows;
-        });
-      }, 200);
-    },
-    illnessConfirm(item) {
-      let opeavalue = {};
-      let tagname = this.inputValueillness;
-      illnesslistget(item).then((res) => {
-        opeavalue = res.data;
-        opeavalue.outid = this.id;
-        opeavalue.type = 5;
-        opeavalue.icd10id = opeavalue.icdid;
-        opeavalue.icd10name = opeavalue.icdname;
-        opeavalue.icd10code = opeavalue.icdcode;
-        if (tagname) {
-          this.illnesslist.push(opeavalue);
-        }
-      });
-      console.log(this.illnesslist);
-      this.inputVisibleillness = false;
-      this.inputValueillness = "";
-    },
-    // 淇濆瓨
+    // 淇濆瓨鐤剧梾
     confirmillness(guid) {
       this.illnesslist.forEach((item, index) => {
         if (guid) {
           item.outid = guid;
+        } else {
+          console.log(this.ruleForm);
+          item.outid = this.ruleForm.svyid;
         }
+        item.icd10name = item.icdname;
+        item.icd10code = item.icdcode;
+        item.type = 5;
         if (!item.id) {
           addtargetillness(item).then((res) => {});
         }
       });
-      if (this.illnesslistapi.length) {
-        deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
-      }
       this.illnessVisible = false;
       this.$modal.msgSuccess("缂栬緫鎴愬姛");
     },
diff --git a/src/views/knowledge/questionnaire/index.vue b/src/views/knowledge/questionnaire/index.vue
index 6f32cfb..d46d0a7 100644
--- a/src/views/knowledge/questionnaire/index.vue
+++ b/src/views/knowledge/questionnaire/index.vue
@@ -778,7 +778,7 @@
       return data.name.indexOf(value) !== -1;
     },
     handleNodeClick(data) {
-      this.queryParams.assortid = data.id;
+      this.queryParams.categoryid = data.id;
       this.getList();
     },
 
diff --git a/src/views/repositoryai/templateku/configurat/index.vue b/src/views/repositoryai/templateku/configurat/index.vue
index 52f5ed0..f565af4 100644
--- a/src/views/repositoryai/templateku/configurat/index.vue
+++ b/src/views/repositoryai/templateku/configurat/index.vue
@@ -214,45 +214,9 @@
           </el-form-item>
 
           <el-form-item label="閫傜敤鐤剧梾" prop="region">
-            <div class="xinz-inf">
-              <el-tag
-                :key="item.icd10name"
-                type="warning"
-                v-for="item in illnesslist"
-                closable
-                :disable-transitions="false"
-                @close="handleCloseillness(item)"
-              >
-                {{ item.icd10name }}
-              </el-tag>
-              <el-select
-                v-model="inputValueillness"
-                v-if="inputVisibleillness"
-                @change="illnessConfirm"
-                :remote-method="remoteMethod"
-                filterable
-                remote
-                allow-create
-                default-first-option
-                placeholder="璇烽�夋嫨/鏌ヨ"
-                :loading="loading"
-              >
-                <el-option
-                  v-for="item in optionsillness"
-                  :key="item.icdid"
-                  :label="item.icdname"
-                  :value="item.icdid"
-                >
-                </el-option>
-              </el-select>
-              <el-button
-                v-else
-                class="button-new-tag"
-                size="small"
-                @click="inputVisibleillness = true"
-                >+ 鏂板鐤剧梾</el-button
-              >
-            </div>
+            <el-button type="warning" @click="$refs.child.handleAddpatient()"
+              >娣诲姞鐤剧梾</el-button
+            >
           </el-form-item>
           <el-form-item label="閫傜敤闄㈠尯" prop="region">
             <el-select
@@ -848,6 +812,14 @@
         />
       </div>
     </el-drawer>
+    <!-- 娣诲姞閫傜敤鐤剧梾绐楀彛 -->
+    <Optional-Form
+      ref="child"
+      :dialogVisiblepatient="dialogVisiblepatient"
+      :overallCase="illnesslist"
+      @addoption="dialogVisiblepatient = false"
+      @kkoption="dialogVisiblepatient = true"
+    />
   </div>
 </template>
 
@@ -874,10 +846,11 @@
   getillness,
   getgenerallist,
 } from "@/api/AiCentre/index";
+import OptionalForm from "@/components/OptionalForm"; //姝e垯缁勪欢
 
 export default {
   name: "SpeechTemplates",
-  components: { Regular },
+  components: { Regular, OptionalForm },
   data() {
     return {
       Editprogress: 1, //缂栬緫杩涘害
@@ -889,6 +862,7 @@
       taskform: null, //浠诲姟淇℃伅
       labelInfovalue: [], //鏍囩涓存椂瀛樺偍
       deptNamesvalue: [], //绉戝涓存椂瀛樺偍
+      dialogVisiblepatient: false, //閫傜敤鐤剧梾绐楀彛
       dynamicTags: [],
       indexAssortlist: [],
       inputValue: "",
@@ -1040,18 +1014,14 @@
             console.log(this.ruleForm.suitway);
           }
         });
-      }
-      getillnesslist({
-        pageNum: 1,
-        pageSize: 100,
-      }).then((response) => {
-        this.optionsillness = response.rows;
-      });
-      if (this.id) {
         getillness({ outid: this.id, type: 3 }).then((res) => {
           this.illnesslist = res.rows;
+          this.illnesslist.forEach((item) => {
+            item.icdname = item.icd10name;
+          });
         });
       }
+
       listDept(this.queryParams).then((response) => {
         this.deptList = this.handleTree(response.data, "deptId");
       });
@@ -1120,14 +1090,17 @@
       this.illnesslist.forEach((item, index) => {
         if (guid) {
           item.outid = guid;
+        } else {
+          console.log(this.ruleForm);
+          item.outid = this.ruleForm.id;
         }
+        item.icd10name = item.icdname;
+        item.icd10code = item.icdcode;
+        item.type = 3;
         if (!item.id) {
           addtargetillness(item).then((res) => {});
         }
       });
-      if (this.illnesslistapi.length) {
-        deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
-      }
       this.illnessVisible = false;
       this.$modal.msgSuccess("缂栬緫鎴愬姛");
     },
@@ -1390,47 +1363,6 @@
       this.$refs[formName].resetFields();
     },
 
-    // 鐤剧梾-----------------------
-
-    handleCloseillness(tag) {
-      this.illnesslist.splice(this.illnesslist.indexOf(tag), 1);
-      if (tag.id) {
-        this.illnesslistapi.push(tag.id);
-      }
-    },
-    remoteMethod(value) {
-      console.log(value);
-      const illnessqueryParams = {
-        pageNum: 1,
-        pageSize: 100,
-        icdname: value,
-      };
-      this.loading = true;
-      setTimeout(() => {
-        this.loading = false;
-        getillnesslist(illnessqueryParams).then((response) => {
-          this.optionsillness = response.rows;
-        });
-      }, 200);
-    },
-    illnessConfirm(item) {
-      let opeavalue = {};
-      let tagname = this.inputValueillness;
-      illnesslistget(item).then((res) => {
-        opeavalue = res.data;
-        opeavalue.outid = this.id;
-        opeavalue.type = 3;
-        opeavalue.icd10id = opeavalue.icdid;
-        opeavalue.icd10name = opeavalue.icdname;
-        opeavalue.icd10code = opeavalue.icdcode;
-        if (tagname) {
-          this.illnesslist.push(opeavalue);
-        }
-      });
-      console.log(this.illnesslist);
-      this.inputVisibleillness = false;
-      this.inputValueillness = "";
-    },
     // 棰勮---------------
     preview() {
       console.log(this.ruleForm);
diff --git a/src/views/repositoryai/verbaltrick/particulars/index.vue b/src/views/repositoryai/verbaltrick/particulars/index.vue
index 07ed606..6300473 100644
--- a/src/views/repositoryai/verbaltrick/particulars/index.vue
+++ b/src/views/repositoryai/verbaltrick/particulars/index.vue
@@ -455,6 +455,7 @@
                 @syioption="syioption"
                 @xiayioption="xiayioption"
                 :intent="false"
+                :Verbalproblem="false"
               />
             </el-card>
             <el-row :gutter="20">

--
Gitblit v1.9.3