From f93cb40b76468c6f1063081a3be16027d69b4832 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 04 一月 2024 09:46:01 +0800
Subject: [PATCH] 指标完成

---
 src/views/knowledge/education/compilequer/index.vue |  451 +++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 265 insertions(+), 186 deletions(-)

diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue
index b48ef43..8ec30df 100644
--- a/src/views/knowledge/education/compilequer/index.vue
+++ b/src/views/knowledge/education/compilequer/index.vue
@@ -13,9 +13,7 @@
     <div class="leftvlue">
       <!-- 鍩烘湰淇℃伅 -->
       <div v-if="Editprogress == 1">
-        <div class="leftvlue-jbxx">
-          鍩烘湰淇℃伅<span>褰撳墠鐗堟湰:{{ currentVersion }}</span>
-        </div>
+        <div class="leftvlue-jbxx">鍩烘湰淇℃伅</div>
         <el-form
           :model="ruleForm"
           :rules="rules"
@@ -25,25 +23,29 @@
         >
           <el-form-item label="瀹f暀鍒嗙被" prop="region">
             <el-select
-              v-model="ruleForm.classify"
+              v-model="ruleForm.groupID"
               size="medium"
-              multiple
               filterable
               placeholder="璇烽�夋嫨鍒嗙被"
             >
               <el-option
                 class="ruleFormaa"
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
+                v-for="item in sortlist"
+                :key="item.id"
+                :label="item.assortname"
+                :value="item.id"
               >
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="瀹f暀鏍囬" prop="name">
+          <el-form-item label="瀹f暀鏍囬" prop="extName">
             <div style="width: 30%">
-              <el-input v-model="ruleForm.name"></el-input>
+              <el-input v-model="ruleForm.extName"></el-input>
+            </div>
+          </el-form-item>
+          <el-form-item label="瀹f暀鎻忚堪" prop="extName">
+            <div style="width: 30%">
+              <el-input v-model="ruleForm.note"></el-input>
             </div>
           </el-form-item>
           <el-form-item label="閫氱煡鍙橀噺" prop="name">
@@ -89,29 +91,32 @@
           <el-form-item label="鏍囩" prop="desc">
             <div class="xinz-inf">
               <el-tag
-                :key="tag"
+                :key="tag.tagname"
                 type="success"
                 v-for="tag in dynamicTags"
                 closable
                 :disable-transitions="false"
-                @close="handleClose(tag)"
+                @close="handleClosetag(tag)"
               >
-                {{ tag }}
+                {{ tag.tagname }}
               </el-tag>
               <el-select
                 v-model="inputValue"
                 v-if="inputVisible"
                 @change="handleInputConfirm"
                 filterable
-                  allow-create
-                  default-first-option
+                remote
+                reserve-keyword
+                default-first-option
+                :remote-method="remoteMethodtag"
+                :loading="loading"
                 placeholder="璇烽�夋嫨"
               >
                 <el-option
                   v-for="item in optionstag"
-                  :key="item.tagname"
-                    :label="item.tagname"
-                    :value="item.tagname"
+                  :key="item.tagid"
+                  :label="item.tagname"
+                  :value="item.tagname"
                 >
                 </el-option>
               </el-select>
@@ -127,12 +132,12 @@
           <el-row :gutter="20">
             <el-col :span="6">
               <el-form-item label="鐗堟湰鍙�" prop="name">
-                <el-input v-model="currentVersion"></el-input> </el-form-item
+                <el-input v-model="ruleForm.version"></el-input> </el-form-item
             ></el-col>
             <el-col :span="9">
               <el-form-item label="鍙敤鐘舵��" prop="region">
                 <el-select
-                  v-model="ruleForm.classify"
+                  v-model="ruleForm.isEnable"
                   size="medium"
                   multiple
                   filterable
@@ -140,7 +145,7 @@
                 >
                   <el-option
                     class="ruleFormaa"
-                    v-for="item in options"
+                    v-for="item in usable"
                     :key="item.value"
                     :label="item.label"
                     :value="item.value"
@@ -168,24 +173,47 @@
             </el-select>
           </el-form-item>
           <el-form-item label="閫傜敤鐤剧梾" prop="region">
-            <el-select
-              v-model="ruleForm.illness"
-              size="medium"
-              multiple
-              filterable
-              placeholder="璇烽�夋嫨鍒嗙被"
-            >
-              <el-option
-                class="ruleFormaa"
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
+            <div class="xinz-infs">
+              <el-tag
+                :key="item.icd10name"
+                type="warning"
+                v-for="item in illnesslist"
+                closable
+                :disable-transitions="false"
+                @close="handleCloseillness(item)"
               >
-              </el-option>
-            </el-select>
+                {{ 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-form-item>
-          <el-form-item label="浣跨敤闄㈠尯" prop="region">
+          <el-form-item label="閫傜敤闄㈠尯" prop="region">
             <el-select
               v-model="ruleForm.courtyard"
               size="medium"
@@ -194,7 +222,7 @@
             >
               <el-option
                 class="ruleFormaa"
-                v-for="item in options"
+                v-for="item in courtyardlist"
                 :key="item.value"
                 :label="item.label"
                 :value="item.value"
@@ -225,9 +253,7 @@
               >涓嬩竴姝�</el-button
             >
             <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button>
-            <el-button type="info" @click="closeFm('ruleForm')"
-                >鍏抽棴</el-button
-              >
+            <el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
           </el-form-item>
         </el-form>
       </div>
@@ -303,10 +329,23 @@
 
 <script>
 import { quillEditor } from "vue-quill-editor";
+import {
+  getheLibraryAssort,
+  delheLibraryAssort,
+  addheLibraryAssort,
+  addtargetillness,
+  getlibrarylist,
+  dellibraryinfo,
+  compilelibrary,
+  getlibraryinfo,
+  getillnesslist,
+  illnesslistget,
+  getillness,
+} from "@/api/AiCentre/index";
 // import * as Quill from "quill";
 import Quill from "quill";
 import { listtag } from "@/api/system/label";
-
+import store from "@/store";
 
 // 杩欓噷寮曞叆淇敼杩囩殑video妯″潡骞舵敞鍐�
 import Video from "./video";
@@ -354,8 +393,9 @@
         },
       ],
       content: "", //鏈�缁堜繚瀛樼殑鍐呭
-      dynamicTags: ["鏍囩涓�", "鏍囩浜�", "鏍囩涓�"],
+      dynamicTags: [],
       inputVisible: false,
+      illnessVisible: false,
       inputValue: "",
       // 瀵屾枃鏈�
       editorOption: {
@@ -405,88 +445,31 @@
       radioas: "", //濉┖棰樼瓟妗�
       // 鎬绘潯鏁�
       total: 1,
-      ruleForm: {
-        name: "",
-        shape: "",
-        classify: "",
-        region: "",
-        date1: "",
-        date2: "",
-        delivery: false,
-        type: [],
-        resource: "",
-        desc: "",
-        templatevalue: "",
-        data2: "",
-      },
+      ruleForm: {},
       rules: {},
-      rulesa: {
-        name: [
-          { required: true, message: "璇疯緭鍏ユ椿鍔ㄥ悕绉�", trigger: "blur" },
-          { min: 3, max: 5, message: "闀垮害鍦� 3 鍒� 5 涓瓧绗�", trigger: "blur" },
-        ],
-        region: [
-          { required: true, message: "璇烽�夋嫨娲诲姩鍖哄煙", trigger: "change" },
-        ],
-        date1: [
-          {
-            type: "date",
-            required: true,
-            message: "璇烽�夋嫨鏃ユ湡",
-            trigger: "change",
-          },
-        ],
-        date2: [
-          {
-            type: "date",
-            required: true,
-            message: "璇烽�夋嫨鏃堕棿",
-            trigger: "change",
-          },
-        ],
-        type: [
-          {
-            type: "array",
-            required: true,
-            message: "璇疯嚦灏戦�夋嫨涓�涓椿鍔ㄦ�ц川",
-            trigger: "change",
-          },
-        ],
-        resource: [
-          { required: true, message: "璇烽�夋嫨娲诲姩璧勬簮", trigger: "change" },
-        ],
-        desc: [{ required: true, message: "璇峰~鍐欐椿鍔ㄥ舰寮�", trigger: "blur" }],
-      },
-      options: [
-        {
-          value: "閫夐」1",
-          label: "鐤剧梾瀹f暀",
-        },
-        {
-          value: "閫夐」2",
-          label: "鍏ラ櫌瀹f暀",
-        },
-        {
-          value: "閫夐」3",
-          label: "鎵嬫湳瀹f暀",
-        },
-        {
-          value: "閫夐」4",
-          label: "鎶ょ悊瀹f暀",
-        },
-      ],
-      optionstag:[],
+      rulesa: {},
+      mode: [],
+      editableTabs: [],
+      sortlist: [],
+      usable: [],
+      courtyardlist: [],
+      precedencetype: [],
+      optionsillness: [],
+      illnesslistapi: [],
+      illnesslist: [],
+      options: [],
+      optionstag: [],
       xjxsoptions: [
         {
-          value: "閫夐」1",
+          value: "1",
           label: "鍥炬枃",
         },
         {
-          value: "閫夐」2",
+          value: "2",
           label: "瑙嗛",
         },
         {
-          value: "閫夐」3",
+          value: "3",
           label: "闊抽",
         },
       ],
@@ -498,25 +481,7 @@
         },
       ],
       addvalue: "娣诲姞棰樼洰",
-      // 棰樼洰琛ㄦ牸鏁版嵁
-      userList: [
-        {
-          userid: "1",
-          userName: "涓�鍙峰鏁�",
-        },
-        {
-          userid: "2",
-          userName: "浜屽彿瀹f暀",
-        },
-        {
-          userid: "3",
-          userName: "涓夊彿瀹f暀",
-        },
-        {
-          userid: "4",
-          userName: "鍥涘彿瀹f暀",
-        },
-      ],
+
       variablelist: [
         {
           variable: "paitent",
@@ -527,17 +492,19 @@
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        userName: undefined,
-        phonenumber: undefined,
-        status: undefined,
-        deptId: undefined,
-        IDnumber: undefined,
       },
     };
   },
 
   created() {
     this.gettabList();
+    this.getList();
+    this.illnessUpdate();
+    this.mode = store.getters.mode;
+    this.editableTabs = store.getters.editableTabs;
+    this.usable = store.getters.usable;
+    this.precedencetype = store.getters.precedencetype;
+    this.courtyardlist = store.getters.courtyardlist;
   },
   watch: {
     content(newVal, oldVal) {
@@ -548,6 +515,28 @@
   },
 
   methods: {
+    getList() {
+      this.loading = true;
+      getlibraryinfo({ id: this.$route.query.id }).then((res) => {
+        this.ruleForm = res.data;
+      });
+      getheLibraryAssort({}).then((res) => {
+        this.sortlist = res.rows;
+        console.log(res);
+      });
+    },
+    /** 鏌ヨ鏍囩鍒楄〃 */
+    gettabList() {
+      const tagqueryParams = {
+        pageNum: 1,
+        pageSize: 1000,
+        tagcategoryid: "0",
+      };
+      listtag(tagqueryParams).then((response) => {
+        console.log(response);
+        this.optionstag = response.rows;
+      });
+    },
     // 瀹屾垚
     submitForm(formName) {
       this.rules = this.rulesa;
@@ -572,48 +561,26 @@
       this.Editprogress = this.Editprogress - 1;
     },
     // 鍏抽棴
-    closeFm(){
-      this.$confirm('閫�鍑轰笉浼氫繚鐣欓〉闈㈠唴瀹规洿鏀�, 鏄惁缁х画?', '鎻愮ず', {
-          confirmButtonText: '纭畾',
-          cancelButtonText: '鍙栨秷',
-          type: 'warning'
-        }).then(() => {
-          this.$router.go(-1)
-        }).catch(() => {
+    closeFm() {
+      this.$confirm("閫�鍑轰笉浼氫繚鐣欓〉闈㈠唴瀹规洿鏀�, 鏄惁缁х画?", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          this.$router.go(-1);
+        })
+        .catch(() => {
           this.$message({
-            type: 'info',
-            message: '宸插彇娑�'
-          });          
+            type: "info",
+            message: "宸插彇娑�",
+          });
         });
     },
     // 淇濆瓨棰樼洰淇℃伅
-    Saveproblem(){},
+    Saveproblem() {},
     /** 鏌ヨ棰樼洰鍒楄〃 */
-    getList() {
-      //   this.loading = true;
-      listUser().then((response) => {
-        console.log(response);
-        // this.userList = response.data;
-        // this.total = response.total;
-        // this.loading = false;
-        console.log(this.userList);
-      });
-      //   const { rows } = await listUser();
-      //   console.log(rows);
-      //   this.list = rows;
-    },
-    /** 鏌ヨ鏍囩鍒楄〃 */
-    gettabList() {
-      const tagqueryParams = {
-        pageNum: 1,
-        pageSize: 1000,
-        tagcategoryid: "0",
-      };
-      listtag(tagqueryParams).then((response) => {
-        console.log(response);
-        this.optionstag = response.rows;
-      });
-    },
+
     // 鏂板鍙橀噺
     addvariable() {
       this.variablelist.push({
@@ -635,23 +602,135 @@
       this.fileList = fileList.slice(-3);
     },
     // 鏍囩-----------------
-    handleClose(tag) {
+    gettabList() {
+      const tagqueryParams = {
+        pageNum: 1,
+        pageSize: 1000,
+        tagcategoryid: "0",
+      };
+      listtag(tagqueryParams).then((response) => {
+        console.log(response);
+        this.optionstag = response.rows;
+      });
+    },
+    handleClosetag(tag) {
+      console.log(tag);
+      console.log(this.dynamicTags.indexOf(tag));
+      const lindex = this.dynamicTags.indexOf(tag);
       this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+      this.ruleForm.ivrLibaTemplateTargetList[lindex].isoperation = 3;
     },
     handleInputConfirm() {
-      let inputValue = this.inputValue;
-      if (inputValue) {
-        this.dynamicTags.push(inputValue);
+      let tagvalue = {};
+      let tagname = this.inputValue;
+      if (tagname) {
+        listtag({
+          pageNum: 1,
+          pageSize: 1000,
+          tagcategoryid: "0",
+          tagname: tagname,
+        }).then((res) => {
+          if (res.rows[0]) {
+            tagvalue = res.rows[0];
+            tagvalue.isoperation = 1;
+          } else {
+            tagvalue = {
+              tagname: tagname,
+              isoperation: 1,
+            };
+          }
+          this.ruleForm.ivrLibaTemplateTargetList.push(tagvalue);
+          this.dynamicTags.push(tagvalue);
+        });
       }
       this.inputVisible = false;
       this.inputValue = "";
     },
+    remoteMethodtag(query) {
+      if (query !== "") {
+        this.loading = true;
+        setTimeout(() => {
+          this.loading = false;
+          listtag({ tagname: query, tagcategoryid: "0" }).then((res) => {
+            this.optionstag = res.rows;
+          });
+        }, 200);
+      } else {
+        this.optionstag = [];
+      }
+    },
     showInput() {
       this.inputVisible = true;
-      // 鑷姩鑾峰彇鐒︾偣
-      // this.$nextTick((_) => {
-      //   this.$refs.saveTagInput.$refs.input.focus();
-      // });
+    },
+    // 鐤剧梾-----------------------
+    illnessUpdate() {
+      this.illnesslistapi = [];
+      const illnessqueryParams = {
+        pageNum: 1,
+        pageSize: 100,
+      };
+      getillnesslist(illnessqueryParams).then((response) => {
+        console.log(response);
+        this.optionsillness = response.rows;
+      });
+      getillness({ outid: this.$route.query.id, type: 6 }).then((res) => {
+        this.illnesslist = res.rows;
+        console.log(res);
+      });
+    },
+    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.inputValue;
+      illnesslistget(item).then((res) => {
+        opeavalue = res.data;
+        opeavalue.outid = this.indexid;
+        opeavalue.type = 6;
+        opeavalue.icd10id = opeavalue.icdid;
+        opeavalue.icd10name = opeavalue.icdname;
+        opeavalue.icd10code = opeavalue.icdcode;
+        if (tagname) {
+          this.illnesslist.push(opeavalue);
+        }
+      });
+      console.log(this.illnesslist);
+      this.inputVisible = false;
+      this.inputValue = "";
+    },
+    confirmillness() {
+      this.illnesslist.forEach((item, index) => {
+        if (!item.id) {
+          addtargetillness(item).then((res) => {});
+        }
+      });
+      if (this.illnesslistapi.length) {
+        deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
+      }
+      this.illnessVisible = false;
+      this.$modal.msgSuccess("缂栬緫鎴愬姛");
+    },
+    illnessshowInput() {
+      this.illnessVisible = true;
     },
     // --------------------------
 

--
Gitblit v1.9.3