From b5a56d53e44c426fa188ba3e4e1db3eb779e2fd9 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 11 九月 2024 21:49:21 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/patient/index.vue |  378 +++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 288 insertions(+), 90 deletions(-)

diff --git a/src/views/patient/patient/index.vue b/src/views/patient/patient/index.vue
index c55f71a..69a6d28 100644
--- a/src/views/patient/patient/index.vue
+++ b/src/views/patient/patient/index.vue
@@ -25,8 +25,11 @@
       <div>
         <el-row :gutter="10">
           <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
-            <el-card shadow="hover">
-              <div style="padding: 8px">
+            <el-card
+              shadow="hover"
+              :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
+            >
+              <div style="padding: 8px" @click="$router.push(item.router)">
                 <span>{{ item.name }}</span>
                 <div
                   style="
@@ -168,6 +171,16 @@
                   >鍒犻櫎</el-button
                 >
               </el-col>
+              <el-col :span="1.5">
+                <el-button
+                  type="primary"
+                  plain
+                  icon="el-icon-s-promotion"
+                  size="medium"
+                  @click="distribute"
+                  >鍚戜换鍔℃淳鍙戞偅鑰�</el-button
+                >
+              </el-col>
               <el-col :span="6">
                 <div class="documentf">
                   <div class="document">
@@ -285,6 +298,9 @@
                 prop="createTime"
                 width="160"
               >
+              <template slot-scope="scope">
+                  <span>{{ formatTime(scope.row.createTime) }}</span>
+                </template>
               </el-table-column>
               <el-table-column
                 label="鏇存柊鏃ユ湡"
@@ -293,7 +309,7 @@
                 width="160"
               >
                 <template slot-scope="scope">
-                  <span>{{ parseTime(scope.row.createTime) }}</span>
+                  <span>{{ formatTime(scope.row.archivetime) }}</span>
                 </template>
               </el-table-column>
               <el-table-column
@@ -315,10 +331,10 @@
                     "
                     v-hasPermi="['system:user:edit']"
                     ><span class="button-textsc"
-                      ><i class="el-icon-zoom-in"></i>鏌ョ湅</span
+                      ><i class="el-icon-zoom-in"></i>璇︽儏缂栬緫</span
                     ></el-button
                   >
-                  <el-button
+                  <!-- <el-button
                     size="medium"
                     type="text"
                     @click="handleUpdate(scope.row)"
@@ -326,7 +342,7 @@
                     ><span class="button-textxga"
                       ><i class="el-icon-edit"></i>淇敼</span
                     ></el-button
-                  >
+                  > -->
                   <el-button
                     size="medium"
                     type="text"
@@ -351,6 +367,127 @@
         </el-row>
       </div>
     </div>
+    <el-dialog title="閫夋嫨浠诲姟" :visible.sync="distributeVisible" width="70%">
+      <div class="preview-left">
+        <el-form
+          :model="queryParams"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          label-width="98px"
+        >
+          <el-select
+            @change="distribute"
+            v-model="tasktopic"
+            placeholder="璇烽�夋嫨浠诲姟绫诲瀷"
+          >
+            <el-option
+              v-for="item in taskoptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form>
+        <el-table v-loading="loading" :data="taskuserList">
+          <el-table-column
+            label="浠诲姟鍚嶇О"
+            fixed
+            align="center"
+            key="taskName"
+            prop="taskName"
+            width="140"
+            :show-overflow-tooltip="true"
+          />
+          <el-table-column
+            label="浠诲姟鎻忚堪"
+            align="center"
+            key="taskDesc"
+            prop="taskDesc"
+            width="180"
+            :show-overflow-tooltip="true"
+          />
+          <el-table-column
+            label="鏈嶅姟椤圭洰"
+            align="center"
+            key="templatename"
+            prop="templatename"
+          />
+          <el-table-column
+            label="寰呮墽琛�/鎬讳换鍔�"
+            align="center"
+            key="nickName"
+            prop="nickName"
+          >
+            <template slot-scope="scope">
+              <span>{{ scope.row.wfs }}/{{ scope.row.yfs }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="鍒涘缓浜�"
+            align="center"
+            key="createBy"
+            prop="createBy"
+            width="120"
+            :show-overflow-tooltip="true"
+          />
+          <el-table-column
+            label="鍒涘缓鏃堕棿"
+            sortable
+            align="center"
+            prop="createTime"
+            width="160"
+          >
+            <template slot-scope="scope">
+              <span>{{ formatTime(scope.row.createTime) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="鐘舵��"
+            fixed="right"
+            align="center"
+            key="sendState"
+            prop="sendState"
+            width="120"
+          >
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.task_status"
+                :value="scope.row.sendState"
+              />
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            label="浠诲姟璇︽儏"
+            fixed="right"
+            align="center"
+            width="200"
+            class-name="small-padding fixed-width"
+          >
+            <template slot-scope="scope">
+              <el-button
+                size="medium"
+                type="text"
+                @click="handleUpdate(scope.row)"
+                ><span class="button-xq"
+                  ><i class="el-icon-s-data"></i>閫夋嫨娲惧彂</span
+                ></el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="tasktotal > 0"
+          :total="tasktotal"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="distribute"
+        />
+      </div>
+    </el-dialog>
 
     <!-- 娣诲姞鎴栦慨鏀圭敤鎴烽厤缃璇濇 -->
     <el-dialog
@@ -543,7 +680,7 @@
               href="http://m.qpic.cn/psc?/V50ZTolo1AIhq00dqrJP2169QM2VHGTU/ruAMsa53pVQWN7FLK88i5qfmCJclyMduqqL6kjE4h7TXDAjimVtmLmTyGVfF4qlkyOISsYQ4Mxx705X2tkXEIUPrfCS4L4yK.f11SmO8Tq0!/b&bo=twb0AgAAAAADB2U!&rf=viewer_4"
               target="_blank"
             >
-              鏌ョ湅妯$増</el-link
+              鏌ョ湅妯℃澘</el-link
             >
           </div>
         </el-upload>
@@ -627,14 +764,16 @@
     </el-dialog>
     <!-- 璺宠浆鏈嶅姟瀵硅瘽妗� -->
     <el-dialog title="閫夋嫨鏈嶅姟绫诲瀷" :visible.sync="serviceVisible">
-      <el-radio-group v-model="serviceradio">
-        <el-radio :label="1">瀹f暀闅忚</el-radio>
-        <el-radio :label="2">闂ㄨ瘖鏈嶅姟</el-radio>
-        <el-radio :label="3">鍑洪櫌鏈嶅姟</el-radio>
-        <el-radio :label="4">澶嶈瘖鏈嶅姟</el-radio>
-        <el-radio :label="5">浣撴閫氱煡</el-radio>
-        <el-radio :label="6">闂嵎鏈嶅姟</el-radio>
-      </el-radio-group>
+      <el-card class="box-card">
+        <el-radio-group v-model="serviceradio">
+          <el-radio :label="1">瀹f暀闅忚</el-radio>
+          <el-radio :label="2">闂ㄨ瘖鏈嶅姟</el-radio>
+          <el-radio :label="3">鍑洪櫌鏈嶅姟</el-radio>
+          <el-radio :label="4">澶嶈瘖鏈嶅姟</el-radio>
+          <el-radio :label="5">浣撴閫氱煡</el-radio>
+          <el-radio :label="6">闂嵎鏈嶅姟</el-radio>
+        </el-radio-group>
+      </el-card>
       <div slot="footer" class="dialog-footer">
         <el-button @click="serviceVisible = false">鍙� 娑�</el-button>
         <el-button type="primary" @click="CreateService">鍒涘缓鏈嶅姟</el-button>
@@ -655,19 +794,16 @@
   Exporterrorpatient,
   toleadpatient,
 } from "@/api/patient/homepage";
-import {
-  getTaskservelist,
-  getTaskInfo,
-  Editsingletask,
-} from "@/api/AiCentre/index";
+import { getTasklist } from "@/api/AiCentre/index";
 import { listtag } from "@/api/system/label";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
+import store from "@/store";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
 export default {
-  name: "Userhuanze",
-  dicts: ["sys_normal_disable", "sys_user_sex"],
+  name: "Patient",
+  dicts: ["sys_normal_disable", "task_status", "sys_user_sex"],
   components: { Treeselect },
   data() {
     return {
@@ -683,8 +819,10 @@
       showSearch: true,
       // 鎬绘潯鏁�
       total: 0,
+      tasktotal: 0,
       // 鐢ㄦ埛琛ㄦ牸鏁版嵁
       userList: null,
+      taskuserList: null,
       // 寮瑰嚭灞傛爣棰�
       title: "",
       // 閮ㄩ棬鏍戦�夐」
@@ -699,8 +837,19 @@
       amendtag: false, //鏄惁淇敼
       serviceVisible: false,
       serviceradio: 1,
+      distributeVisible: false,
+      tasktopic: "5", //鏂板绫诲瀷
+      // 鏌ヨ鍙傛暟
+      topqueryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userName: undefined,
+        tagid: undefined,
+        topic: undefined,
+      },
       // 鏃ユ湡鑼冨洿
       dateRange: [],
+      taskoptions: [],
       paperstypes: [
         { papersname: "韬唤璇�" },
         { papersname: "鎶ょ収" },
@@ -734,14 +883,17 @@
         {
           name: "鍦ㄩ櫌鎮h��",
           value: 23,
+          router: "/patient/inpatient",
         },
         {
-          name: "绂婚櫌鎮h��",
+          name: "鍑洪櫌鎮h��",
           value: 41,
+          router: "/patient/hospital",
         },
         {
-          name: "璇婄枟鎮h��",
+          name: "闂ㄨ瘖鎮h��",
           value: 56,
+          router: "/patient/outpatient",
         },
         {
           name: "绂讳笘鎮h��",
@@ -801,49 +953,42 @@
       },
       // 琛ㄥ崟鏍¢獙
       rules: {
-        // userName: [
-        //   { required: true, message: "鐢ㄦ埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
-        //   {
-        //     min: 2,
-        //     max: 20,
-        //     message: "鐢ㄦ埛鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿",
-        //     trigger: "blur",
-        //   },
-        // ],
-        // nickName: [
-        //   { required: true, message: "鐢ㄦ埛鏄电О涓嶈兘涓虹┖", trigger: "blur" },
-        // ],
-        // password: [
-        //   { required: true, message: "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" },
-        //   {
-        //     min: 5,
-        //     max: 20,
-        //     message: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
-        //     trigger: "blur",
-        //   },
-        // ],
-        // email: [
-        //   {
-        //     type: "email",
-        //     message: "璇疯緭鍏ユ纭殑閭鍦板潃",
-        //     trigger: ["blur", "change"],
-        //   },
-        // ],
-        // phonenumber: [
-        //   {
-        //     pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-        //     message: "璇疯緭鍏ユ纭殑鎵嬫満鍙风爜",
-        //     trigger: "blur",
-        //   },
-        // ],
-        // IDnumber: [
-        //   {
-        //     pattern:
-        //       /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/,
-        //     message: "璇疯緭鍏ユ纭殑韬唤璇佸彿鐮�",
-        //     trigger: "blur",
-        //   },
-        // ],
+        name: [
+          { required: true, message: "鐢ㄦ埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
+          {
+            min: 2,
+            max: 20,
+            message: "鐢ㄦ埛鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿",
+            trigger: "blur",
+          },
+        ],
+
+        sex: [{ required: true, message: "鎬у埆涓嶈兘涓虹┖", trigger: "blur" }],
+        age: [{ required: true, message: "骞撮緞涓嶈兘涓虹┖", trigger: "blur" }],
+        nation: [{ required: true, message: "姘戞棌涓嶈兘涓虹┖", trigger: "blur" }],
+        telcode: [
+          { required: true, message: "鑱旂郴鏂瑰紡涓嶈兘涓虹┖", trigger: "blur" },
+          {
+            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+            message: "璇疯緭鍏ユ纭殑鎵嬫満鍙风爜",
+            trigger: "blur",
+          },
+        ],
+        idcardtype: [
+          { required: true, message: "璇佷欢绫诲瀷涓嶈兘涓虹┖", trigger: "blur" },
+        ],
+        idcardno: [
+          { required: true, message: "璇佷欢鍙疯兘涓虹┖", trigger: "blur" },
+          {
+            pattern:
+              /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/,
+            message: "璇疯緭鍏ユ纭殑韬唤璇佸彿鐮�",
+            trigger: "blur",
+          },
+        ],
+        placeOfResidence: [
+          { required: true, message: "灞呬綇鍦颁笉鑳戒负绌�", trigger: "blur" },
+        ],
       },
     };
   },
@@ -856,6 +1001,8 @@
   created() {
     this.getList();
     this.gettabList();
+    //鑾峰彇宸茬瓫閫夊悗鐨勫彲閫変换鍔$被鍨�
+    this.taskoptions = store.getters.Serviceauthority;
   },
   methods: {
     /** 鏌ヨ鎮h�呭垪琛� */
@@ -871,6 +1018,10 @@
     },
     handleClick() {
       this.getList();
+    },
+    findLabelByValue(data, value) {
+      const item = data.find((item) => item.value === value);
+      return item ? item.label : null;
     },
     /** 鏌ヨ鏍囩鍒楄〃 */
     gettabList() {
@@ -954,31 +1105,36 @@
       this.amendtag = true;
       this.Labelchange = true;
     },
-
     //淇敼/鏂板鎮h��
     submitForm() {
-      if (this.amendtag) {
-        alterpatient(this.form)
-          .then((response) => {
-            console.log(response);
-          })
-          .then(() => {
-            this.getList();
-            this.$modal.msgSuccess("淇敼鎴愬姛");
-          });
-      } else {
-        addpatient(this.form)
-          .then((response) => {
-            console.log(response);
-          })
-          .then(() => {
-            this.getList();
-            this.$modal.msgSuccess("娣诲姞鎴愬姛");
-          });
-      }
-      this.reset();
-      // this.idds = "";
-      this.Labelchange = false;
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.amendtag) {
+            this.form.isoperation = 2;
+            alterpatient(this.form)
+              .then((response) => {
+                console.log(response);
+              })
+              .then(() => {
+                this.getList();
+                this.$modal.msgSuccess("淇敼鎴愬姛");
+              });
+          } else {
+            this.form.isoperation = 1;
+            alterpatient(this.form)
+              .then((response) => {
+                console.log(response);
+              })
+              .then(() => {
+                this.getList();
+                this.$modal.msgSuccess("娣诲姞鎴愬姛");
+              });
+          }
+          this.reset();
+          // this.idds = "";
+          this.Labelchange = false;
+        }
+      });
     },
 
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
@@ -1000,6 +1156,31 @@
       this.$router.push({
         path: "/followvisit/particty",
         query: { type: this.serviceradio },
+      });
+    },
+    distribute() {
+      this.distributeVisible = true;
+      if (this.tasktopic == 1) {
+        this.topqueryParams.type = 3;
+      } else if (this.tasktopic == 2) {
+        this.topqueryParams.type = 1;
+      } else if (this.tasktopic == 3) {
+        this.topqueryParams.type = 1;
+      } else if (this.tasktopic == 4) {
+        this.topqueryParams.type = 1;
+      } else if (this.tasktopic == 5) {
+        this.topqueryParams.type = 1;
+      } else if (this.tasktopic == 6) {
+        this.topqueryParams.type = 2;
+      }
+      this.topqueryParams.typename = this.findLabelByValue(
+        this.taskoptions,
+        this.tasktopic
+      );
+      getTasklist(this.topqueryParams).then((response) => {
+        this.taskuserList = response.rows;
+        this.tasktotal = response.total;
+        this.$forceUpdate();
       });
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
@@ -1101,6 +1282,22 @@
     display: center !important;
   }
 }
+.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);
+  .scriptTopic-dev {
+    margin-bottom: 25px;
+    font-size: 20px !important;
+    .dev-text {
+      margin-bottom: 10px;
+    }
+  }
+}
 ::v-deep.el-tabs--left,
 .el-tabs--right {
   overflow: hidden;
@@ -1125,6 +1322,7 @@
 }
 ::v-deep.leftvlue .el-card__body:hover {
   background: #8dc8f8;
+  cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
 }
 .leftvlue {
   width: 80%;

--
Gitblit v1.9.3