From 9f4da363a401c3624fa57a87fb50193b59bc6a35 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 24 七月 2024 10:28:32 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/tasklist/index.vue                |    2 
 src/components/Address/index.vue                        |  177 +++++++++++++++++++++++++++++++++++
 src/views/knowledge/questionbank/particulars/index.vue  |    1 
 src/views/repositoryai/general/particulars/index.vue    |   41 ++++++-
 src/layout/components/Navbar.vue                        |    6 
 src/views/knowledge/questionnaire/compilequer/index.vue |    1 
 src/views/patient/patient/index.vue                     |   10 +-
 src/store/getters.js                                    |   12 ++
 src/views/patient/propaganda/Missioncreation.vue        |    9 -
 src/views/patient/propaganda/particty.vue               |    2 
 src/views/patient/propaganda/QuestionnaireTask.vue      |    6 -
 11 files changed, 235 insertions(+), 32 deletions(-)

diff --git a/src/components/Address/index.vue b/src/components/Address/index.vue
new file mode 100644
index 0000000..4056a0c
--- /dev/null
+++ b/src/components/Address/index.vue
@@ -0,0 +1,177 @@
+<template>
+  <div style="display: flex">
+    <el-select
+      v-model="caddress.sheng"
+      style="flex: 1"
+      placeholder="璇烽�夋嫨鐪佷唤"
+      size="small"
+      @change="getCityData"
+    >
+      <el-option
+        v-for="item in addressArray"
+        :key="item.areacode"
+        :label="item.areaname"
+        :value="item.areaname"
+      >
+      </el-option>
+    </el-select>
+    <el-select
+      v-model="caddress.shi"
+      style="flex: 1; margin-left: 10px"
+      placeholder="璇烽�夋嫨甯傚尯"
+      size="small"
+      @change="getAreaData"
+    >
+      <el-option
+        v-for="item in cityArray"
+        :key="item.areacode"
+        :label="item.areaname"
+        :value="item.areaname"
+      >
+      </el-option>
+    </el-select>
+    <el-select
+      v-model="caddress.qu"
+      style="flex: 1; margin-left: 10px"
+      placeholder="璇烽�夋嫨鍘�"
+      size="small"
+      @change="onAreaChanged"
+    >
+      <el-option
+        v-for="item in areaArray"
+        :key="item.areacode"
+        :label="item.areaname"
+        :value="item.areaname"
+      >
+      </el-option>
+    </el-select>
+  </div>
+</template>
+
+<script>
+// 浣跨敤璇存槑锛歷-model鏃讹紝蹇呴』浼犲甫鏈夊甫鏈夌渷锛屽競锛屽尯鎷奸煶鐨勫瓧娈�
+import request from '@/utils/request'
+export default {
+  name: "li_area_select",
+  //閫氳繃 model 閫夐」閰嶇疆瀛愮粍浠舵帴鏀剁殑 prop 鍚嶄互鍙婃淳鍙戠殑浜嬩欢鍚�
+  model: {
+    prop: "caddress",
+    event: "change",
+  },
+  props: {
+    caddress: {
+      type: Object,
+    },
+  },
+  data() {
+    return {
+      areaJson: "/project/dict/treeselect", // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃
+      //areaJson: './../address.json',
+      addressArray: [], //鎵�鏈夋暟鎹�
+      cityArray: [],
+      areaArray: [],
+    };
+  },
+  created() {
+    this.getAddressData();
+  },
+  methods: {
+    getAddressData() {
+      var that = this;
+      request({
+        url: that.areaJson,
+        method: "get",
+      }).then(function (response) {
+        if (response.code === 200) {
+          //鑾峰彇鍦板潃
+
+          that.addressArray = response.data;
+          //榛樿鍊艰祴鍊艰幏鍙栧煄甯傛暟缁�
+          if (that.caddress.sheng) {
+            for (let ad of that.addressArray) {
+              if (ad.areaname === that.caddress.sheng) {
+                that.cityArray = ad.subarea;
+                //---
+                //榛樿璧嬪�艰幏鍙栧尯鍩熸暟缁�
+                if (that.caddress.shi) {
+                  for (let area of that.cityArray) {
+                    if (area.areaname === that.caddress.shi) {
+                      that.areaArray = area.subarea;
+                      break;
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      });
+    },
+    //閫夋嫨鐪佷唤
+    getCityData(val) {
+      //娓呯┖甯傦紝鍜屽尯
+      this.caddress.shi = "";
+      this.caddress.qu = "";
+      this.$emit("change", this.caddress); //鍙戦�佹敼鍙�
+      for (let ad of this.addressArray) {
+        if (ad.areaname === val) {
+          this.cityArray = ad.subarea;
+          return;
+        }
+      }
+    },
+    getAreaData(val) {
+      //娓呯┖鍖�
+      this.caddress.qu = "";
+      this.$emit("change", this.caddress); //鍙戦�佹敼鍙�
+      for (let area of this.cityArray) {
+        if (area.areaname === val) {
+          this.areaArray = area.subarea;
+          return;
+        }
+      }
+    },
+    //鍦板尯鏁版嵁鍙樺姩鍚�
+    onAreaChanged(val) {
+      this.$emit("change", this.caddress); //鍙戦�佹敼鍙�
+      this.$forceUpdate();
+    },
+
+    getSheng(){
+      let list= this.addressArray.filter(r=>r.areaname ==  this.caddress.sheng);
+      if(list.length>0){
+        return list[0].areacode;
+      }
+      else{
+        return '';
+      }
+    },
+     getShi(){
+      let list= this.cityArray.filter(r=>r.areaname ==  this.caddress.shi);
+      if(list.length>0){
+        return list[0].areacode;
+      }
+      else{
+        return '';
+      }
+    },
+     getQu(){
+      let list= this.areaArray.filter(r=>r.areaname ==  this.caddress.qu);
+      if(list.length>0){
+        return list[0].areacode;
+      }
+      else{
+        return '';
+      } 
+    },
+    clean(){
+      this.caddress.sheng="";
+      this.caddress.shi="";
+      this.caddress.qu="";
+    }
+  },
+};
+</script>
+
+<style scoped>
+</style>
\ No newline at end of file
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 9aa306e..3ad514a 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -8,7 +8,7 @@
     <div class="right-menu">
       <template v-if="device!=='mobile'">
         <search id="header-search" class="right-menu-item" />
-        
+
         <!-- <el-tooltip content="婧愮爜鍦板潃" effect="dark" placement="bottom">
           <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
         </el-tooltip> -->
@@ -19,9 +19,9 @@
 
         <screenfull id="screenfull" class="right-menu-item hover-effect" />
 
-        <el-tooltip content="甯冨眬澶у皬" effect="dark" placement="bottom">
+        <!-- <el-tooltip content="甯冨眬澶у皬" effect="dark" placement="bottom">
           <size-select id="size-select" class="right-menu-item hover-effect" />
-        </el-tooltip>
+        </el-tooltip> -->
 
       </template>
 
diff --git a/src/store/getters.js b/src/store/getters.js
index 4a6ac06..22e0988 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -183,7 +183,15 @@
     },
     {
       value: '3',
-      label: "鏂囨湰鏀堕泦",
+      label: "闂瓟",
+      raw: {
+        cssClass: "",
+        listClass: "",
+      },
+    },
+    {
+      value: '4',
+      label: "濉┖",
       raw: {
         cssClass: "",
         listClass: "",
@@ -442,7 +450,7 @@
     },
 
   ],
-  // 棰樼洰绫诲埆
+  // 棰樼洰绫诲埆锛堥殢璁匡級
   xjxsoptions:(state) => [
     {
       value: "1",
diff --git a/src/views/followvisit/tasklist/index.vue b/src/views/followvisit/tasklist/index.vue
index 1945b3c..28b2664 100644
--- a/src/views/followvisit/tasklist/index.vue
+++ b/src/views/followvisit/tasklist/index.vue
@@ -436,7 +436,7 @@
         },
         {
           value: "6",
-          label: "闂嵎鏈嶅姟",
+          label: "鎮h�呮姤鍛�",
         },
       ],
       tasktopic: "2", //鏂板绫诲瀷
diff --git a/src/views/knowledge/questionbank/particulars/index.vue b/src/views/knowledge/questionbank/particulars/index.vue
index f3bae06..b96ed53 100644
--- a/src/views/knowledge/questionbank/particulars/index.vue
+++ b/src/views/knowledge/questionbank/particulars/index.vue
@@ -222,6 +222,7 @@
                     @change="handleInputConfirm"
                     filterable
                     remote
+                    allow-create
                     reserve-keyword
                     default-first-option
                     :remote-method="remoteMethodtag"
diff --git a/src/views/knowledge/questionnaire/compilequer/index.vue b/src/views/knowledge/questionnaire/compilequer/index.vue
index e2d2b78..1f70109 100644
--- a/src/views/knowledge/questionnaire/compilequer/index.vue
+++ b/src/views/knowledge/questionnaire/compilequer/index.vue
@@ -116,6 +116,7 @@
                   @change="handleInputConfirm"
                   filterable
                   remote
+                  allow-create
                   reserve-keyword
                   default-first-option
                   :remote-method="remoteMethodtag"
diff --git a/src/views/patient/patient/index.vue b/src/views/patient/patient/index.vue
index 0612be0..3dcc862 100644
--- a/src/views/patient/patient/index.vue
+++ b/src/views/patient/patient/index.vue
@@ -216,8 +216,8 @@
                 fixed
                 label="搴忓彿"
                 align="center"
-                key="patid"
-                prop="patid"
+                key="id"
+                prop="id"
               />
               <el-table-column
                 fixed
@@ -320,7 +320,7 @@
                     @click="
                       $router.push({
                         path: '/patient/patient/profile/',
-                        query: { id: scope.row.patid },
+                        query: { id: scope.row.id },
                       })
                     "
                     v-hasPermi="['system:user:edit']"
@@ -933,7 +933,7 @@
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.patid);
+      this.ids = selection.map((item) => item.id);
       this.single = selection.length != 1;
       this.multiple = !selection.length;
     },
@@ -947,7 +947,7 @@
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
       console.log(row);
-      const userIds = row.patid || this.ids;
+      const userIds = row.id || this.ids;
       particularpatient(userIds).then((response) => {
         console.log(response);
         this.form = response.data;
diff --git a/src/views/patient/propaganda/Missioncreation.vue b/src/views/patient/propaganda/Missioncreation.vue
index 1861e31..ad931a3 100644
--- a/src/views/patient/propaganda/Missioncreation.vue
+++ b/src/views/patient/propaganda/Missioncreation.vue
@@ -226,7 +226,6 @@
         <el-alert title="鍦ㄦ湰闃舵閫夋嫨瀹f暀鐥呬汉" type="success" effect="dark">
         </el-alert>
         <div class="leftvlue-jbxx">
-
           <div class="examine-jic">
             <div class="headline">
               <div>鎮h�呭垪琛�</div>
@@ -894,13 +893,7 @@
       this.currenttype = this.$route.query.type;
       this.title = "瀹f暀鍐呭鍒楄〃";
       this.tableLabel = this.tableLabelxj;
-      this.checkboxlist = [
-        "绾夸笅锛堢焊璐級",
-        "绾夸笂锛堢煭淇�/閽夐拤鐨勬枃鏈棰戯級",
-        "瀹f暀閾炬帴",
-        "寰俊鍏紬鍙�",
-        "鐭俊",
-      ];
+      this.checkboxlist = ["鐭俊", "寰俊", "浜哄伐鐢佃瘽", "鏅鸿兘鏈哄櫒浜�"];
       getlibrarylist(queryParams).then((response) => {
         this.userList = response.rows;
         this.total = response.total;
diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue
index ed4b22f..9b4ed1a 100644
--- a/src/views/patient/propaganda/QuestionnaireTask.vue
+++ b/src/views/patient/propaganda/QuestionnaireTask.vue
@@ -945,11 +945,7 @@
       this.currenttype = this.$route.query.type;
       this.title = "闂嵎鍐呭鍒楄〃";
       this.tableLabel = this.tableLabelwj;
-      this.checkboxlist = [
-        "绾夸笅锛堢焊璐級",
-        "绾夸笂锛堢煭淇�/閽夐拤鐨勬枃鏈�侀棶鍗烽摼鎺ワ級",
-        "寰俊鍏紬鍙�",
-      ];
+      this.checkboxlist = ["鐭俊", "寰俊", "浜哄伐鐢佃瘽", "鏅鸿兘鏈哄櫒浜�"];
       getQtemplatelist(queryParams).then((response) => {
         this.userList = response.rows;
         this.total = response.total;
diff --git a/src/views/patient/propaganda/particty.vue b/src/views/patient/propaganda/particty.vue
index d49df9b..fa536d9 100644
--- a/src/views/patient/propaganda/particty.vue
+++ b/src/views/patient/propaganda/particty.vue
@@ -935,7 +935,7 @@
       // 鍑洪櫌銆侀棬璇娿�佷笓鐥呴殢璁�
       this.title = "闅忚鍐呭鍒楄〃";
       this.tableLabel = this.tableLabelmz;
-      this.checkboxlist = ["绾歌川", "澶氬獟浣�", "鐢佃瘽", "寰俊鍏紬鍙�"];
+      this.checkboxlist = ["鐭俊", "寰俊", "浜哄伐鐢佃瘽", "鏅鸿兘鏈哄櫒浜�"];
       getFollowuplist(queryParams).then((response) => {
         this.userList = response.rows;
         this.total = response.total;
diff --git a/src/views/repositoryai/general/particulars/index.vue b/src/views/repositoryai/general/particulars/index.vue
index f36599f..6a71a31 100644
--- a/src/views/repositoryai/general/particulars/index.vue
+++ b/src/views/repositoryai/general/particulars/index.vue
@@ -51,13 +51,19 @@
           ></el-col>
         </el-row>
       </el-form>
-      <div style="display: flex">
-        <div class="elcardiv">
+      <div class="presentation">
+        <div class="presentation-left">
           <div class="leftvlue-jbxx">璇濇湳鍒楄〃</div>
           <el-divider></el-divider>
 
           <el-table :data="targetList" :row-class-name="tableRowClassName">
-            <el-table-column label="搴忓彿" align="center" key="id" prop="id" />
+            <el-table-column
+              label="搴忓彿"
+              fixed
+              align="center"
+              key="id"
+              prop="id"
+            />
 
             <el-table-column
               label="闂鏂囨湰"
@@ -92,6 +98,7 @@
             <el-table-column
               label="鎿嶄綔"
               align="center"
+              fixed="right"
               width="200"
               class-name="small-padding fixed-width"
             >
@@ -117,7 +124,7 @@
             </el-table-column>
           </el-table>
         </div>
-        <div class="elcardiv">
+        <div class="presentation-right">
           <el-form
             :model="ruleForm"
             :rules="rules"
@@ -125,10 +132,9 @@
             label-width="100px"
             class="demo-ruleForm"
           >
-          <div class="leftvlue-jbxx">璇濇湳缂栬緫</div>
-          <el-divider></el-divider>
+            <div class="leftvlue-jbxx">璇濇湳缂栬緫</div>
+            <el-divider></el-divider>
             <div style="margin: 15px; margin-top: 50px">
-
               <el-form-item label="璇濇湳鏂囨湰" prop="name">
                 <el-input
                   v-model="ruleForm.switchText"
@@ -572,6 +578,27 @@
     margin: 15px 0;
   }
 }
+.presentation {
+  margin: 20px 0;
+  display: flex;
+  .presentation-left {
+    width: 60%;
+    // height: 500px;
+  }
+  .presentation-right {
+    width: 40%;
+    max-height: 688px;
+    padding: 0 20px;
+    font-size: 18px;
+    overflow: auto;
+  }
+  .leftvlue-jbxx {
+    font-size: 24px;
+    border-left: 5px solid #5788fe;
+    padding-left: 5px;
+    margin: 15px 0;
+  }
+}
 .button-textxg {
   color: rgb(35, 81, 233);
 }

--
Gitblit v1.9.3