From 72af108154b75c3d8ec2448041e9e9a0fccdec9e Mon Sep 17 00:00:00 2001
From: su1124 <1583764726@qq.com>
Date: 星期五, 26 四月 2024 14:52:49 +0800
Subject: [PATCH] su

---
 src/views/doctor/check/index.vue        |   50 ++++++++++++++++
 src/components/createproposal/index.vue |   90 +++++++++++++++++++----------
 2 files changed, 108 insertions(+), 32 deletions(-)

diff --git a/src/components/createproposal/index.vue b/src/components/createproposal/index.vue
index be980b8..623f6fe 100644
--- a/src/components/createproposal/index.vue
+++ b/src/components/createproposal/index.vue
@@ -11,9 +11,13 @@
           <el-input v-model="propform.title" placeholder="璇疯緭鍏ュ悕绉版爣棰�" />
         </el-form-item>
         <el-form-item label="蹇嵎鏍囩" prop="kjbq">
-          <span slot="label" style="display:inline-block;border-bottom: 2px solid blue;" @click="handleQuery">
+          <span
+            slot="label"
+            style="display: inline-block; border-bottom: 2px solid blue"
+            @click="handleQuery"
+          >
             蹇嵎鏍囩
-              </span>
+          </span>
           <el-checkbox-group
             v-model="propform.kjbq"
             @change="handleCheckedCitiesChange"
@@ -41,8 +45,13 @@
         <el-button type="primary" @click="handleOk">纭� 瀹�</el-button>
       </span>
     </el-dialog>
-    <el-dialog title="娣诲姞蹇嵎鏍囩" :visible.sync="kjbqopen" width="500px" append-to-body>
-      <el-form ref="form" :model="form"  label-width="80px">
+    <el-dialog
+      title="娣诲姞蹇嵎鏍囩"
+      :visible.sync="kjbqopen"
+      width="500px"
+      append-to-body
+    >
+      <el-form ref="form" :model="form" label-width="80px">
         <el-form-item label="鍚嶇О" prop="kjbq">
           <el-input v-model="form.kjbq" placeholder="璇疯緭鍏ュ悕绉�" />
         </el-form-item>
@@ -58,23 +67,24 @@
 <script>
 import {
   getTjAdviceKjbqByFl,
-  addCyTjAdvice,addTjAdviceKjbq
+  addCyTjAdvice,
+  addTjAdviceKjbq,
 } from "@/api/system/biaoqianzidian";
 import { getInfo } from "@/api/login";
 export default {
   name: "createproposal",
   props: {
-    textarea1: String,
+    creatobj: Object,
   },
   data() {
     return {
+      deptId:"",
+      isZjs: 0,
       propform: {
         advice: "",
         kjbq: [],
       },
-      form:{
-
-      },
+      form: {},
       kjbqopen: false,
       open: false,
       openone: false,
@@ -95,18 +105,19 @@
     };
   },
   watch: {
-
-    textarea1(val, newVla) {
-      this.propform.advice = val;
+    creatobj(val, newVla) {
+      console.log(val, 111);
+      this.propform.advice = val.proParentList;
+      this.isZjs = val.isZj;
     },
   },
   mounted() {
-    this.propform.kjbq =[]
-    this.getList()
+    this.propform.kjbq = [];
+    this.getList();
   },
 
   created() {
-        this.getList()
+    this.getList();
   },
   methods: {
     getList() {
@@ -114,6 +125,8 @@
       getInfo().then((res) => {
         this.form.userId = res.user.userId;
         this.queryParams.userId = res.user.userId;
+        this.deptId = res.user.deptId;
+        console.log(this.deptId);
         getTjAdviceKjbqByFl(this.queryParams).then((res) => {
           if (res.data) {
             this.dataList = res.data.records;
@@ -123,10 +136,10 @@
         });
       });
     },
-    handleQuery(){
+    handleQuery() {
       this.kjbqopen = true;
     },
-    cancel(){
+    cancel() {
       this.kjbqopen = false;
     },
     submitForm() {
@@ -148,21 +161,36 @@
         }
       });
     },
-    handleCheckedCitiesChange(val) {
-     
-    },
+    handleCheckedCitiesChange(val) {},
     handleOk() {
-      let data = {
-        title: this.propform.title,
-        isZj: 1,
-        kjbq: this.propform.kjbq.toString(),
-        advice: this.propform.advice,
-      };
-      addCyTjAdvice(data).then((res) => {
-        if (res.code == 200) {
-          this.open = false;
-        }
-      });
+      console.log(this.isZjs);
+        
+      if (this.isZjs == 0) {
+        let data = {
+          title: this.propform.title,
+          isZj: this.isZjs,
+          kjbq: this.propform.kjbq.toString(),
+          advice: this.propform.advice,
+        };
+        addCyTjAdvice(data).then((res) => {
+          if (res.code == 200) {
+            this.open = false;
+          }
+        });
+      } else {
+        let data = {
+          deptId:this.deptId,
+          title: this.propform.title,
+          isZj: this.isZjs,
+          kjbq: this.propform.kjbq.toString(),
+          advice: this.propform.advice,
+        };
+        addCyTjAdvice(data).then((res) => {
+          if (res.code == 200) {
+            this.open = false;
+          }
+        });
+      }
 
       // if (this.list.length != 0) {
       //   this.$emit("event1", this.list);
diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue
index b2a43e5..f387b40 100644
--- a/src/views/doctor/check/index.vue
+++ b/src/views/doctor/check/index.vue
@@ -357,6 +357,14 @@
                   寤鸿锛�
                 </td>
                 <td style="border: 1px solid #dfe6ec; border-collapse: collapse" colspan="2">
+                  <div style="margin: 0 0px 10px 15px">
+                    <el-button type="primary" @click="propoChange"
+                      >蹇嵎寤鸿</el-button
+                    >
+                    <el-button type="primary" @click="proposalChange"
+                      >鐢熸垚寤鸿</el-button
+                    >
+                  </div>
                   <el-input type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" v-model="proParentList.remark" rows="7">
                   </el-input>
                 </td>
@@ -481,6 +489,14 @@
                 </td>
               </tr>
               <tr style="border: 1px solid #dfe6ec; border-collapse: collapse">
+                <div style="margin: 0 0px 10px 15px">
+                    <el-button type="primary" @click="propoChange" class="height:100px"
+                      >蹇嵎寤鸿</el-button
+                    >
+                    <el-button type="primary" @click="proposalChange"
+                      >鐢熸垚寤鸿</el-button
+                    >
+                  </div>
                 <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
                   寤鸿锛�
                 </td>
@@ -570,11 +586,15 @@
         <el-button @click="jianqians = false">鍙� 娑�</el-button>
       </span>
     </el-dialog>
+    <proposal ref="proposal" :cusobj="cusobj" @event1="eventchange($event)" />
+    <createproposal ref="createproposal" :creatobj="creatobj" :textarea1="proParentList.remark" />
   </div>
 </template>
 
 
 <script>
+import proposal from "@/components/proposal";
+import createproposal from "@/components/createproposal";
 import { getInfoById } from "@/api/hosp/history";
 import jianqianwenzhen from "@/components/jianqianwenzhen";
 import Public from "@/components/public";
@@ -599,9 +619,13 @@
 export default {
   dicts: ["sys_user_sex", "sys_yes_no", "tj_result_type", "lj_positive"],
   name: "check",
-  components: { Public, Historicalreport, jianqianwenzhen },
+  components: { Public, Historicalreport, jianqianwenzhen,createproposal,proposal },
   data() {
     return {
+      creatobj:{},
+      dataText: [],
+      propform: {},
+      cusobj: {},
       baogaoqian: true,
       baogaohou: false,
       flags: false,
@@ -915,6 +939,30 @@
         this.submitForm();
       }
     },
+    propoChange() {
+      this.cusobj = { sex: this.tableAll.cusSex, isZj: 1 };
+      this.$refs.proposal.open = true;
+      this.$refs.proposal.title = "寤鸿鏂规";
+      // this.$refs.proposal.getList();
+    },
+    eventchange(data) {
+      this.dataText = data
+      data.forEach((item) => {
+        this.proParentList.remark += item.advice;
+      });
+    },
+    proposalChange() {
+      if (this.proParentList.remark) {
+        this.creatobj = {proParentList:this.proParentList.remark, isZj: 1}
+        this.$refs.createproposal.open = true;
+        this.$refs.createproposal.title = "甯哥敤寤鸿缁存姢";
+      }else{
+        this.$message({
+              type: "warning ",
+              message: "璇峰厛濉啓鎬绘寤鸿",
+            });
+      }
+    },
 
     // 鎼滅储
     submitForm() {

--
Gitblit v1.8.0