From 1842f5f85ff29cd0771c31a6733607485a82eda6 Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期四, 25 四月 2024 17:06:34 +0800
Subject: [PATCH] qxtj

---
 src/views/doctor/checkAll/index.vue     |   29 +-----
 src/components/proposal/index.vue       |   26 ++++--
 src/components/createproposal/index.vue |  153 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 177 insertions(+), 31 deletions(-)

diff --git a/src/components/createproposal/index.vue b/src/components/createproposal/index.vue
new file mode 100644
index 0000000..a7c09be
--- /dev/null
+++ b/src/components/createproposal/index.vue
@@ -0,0 +1,153 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="1200px"
+      append-to-body
+    >
+    <el-form ref="form" :model="propform" label-width="80px">
+        <el-form-item label="寤鸿鏍囬" prop="title">
+          <el-input v-model="propform.title" placeholder="璇疯緭鍏ュ悕绉版爣棰�" />
+        </el-form-item>
+        <el-form-item label="蹇嵎鏍囩" prop="title">
+          <el-input v-model="propform.title" placeholder="璇疯緭鍏ュ悕绉版爣棰�" />
+        </el-form-item>
+        <el-form-item label="寤鸿鍐呭" prop="advice">
+          <el-input
+            type="textarea"
+            v-model="propform.advice"
+            :autosize="{ minRows: 9, maxRows: 10 }"
+            placeholder="璇疯緭鍏ュ缓璁�"
+          />
+        </el-form-item>
+      </el-form>
+     
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="open = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="handleOk">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+  
+<script>
+import {
+  getKjTjAdviceKjbqBySex,
+  getCyTjAdviceKjbqBySex,
+} from "@/api/hosp/project";
+import { getInfo } from "@/api/login";
+export default {
+  name: "Packagese",
+  props: {
+    cusobj: Object,
+  },
+  data() {
+    return {
+      tjproposal: "0",
+      open: false,
+      openone: false,
+      // 寮瑰嚭灞傛爣棰�
+      title: "",
+      total: 0,
+      dataList: [],
+      // 閬僵灞�
+      loading: false,
+      queryParams: {
+        sex: "",
+        isZj: "",
+        userId: "",
+        page: 1,
+        pageSize: 10,
+      },
+      list: [],
+      fList: {},
+    };
+  },
+  watch: {
+    cusobj(val, newVla) {
+      // console.log(val,newVla,1111)
+      this.fList= val
+      this.queryParams.sex = val.sex;
+      this.queryParams.isZj = val.isZj;
+      if (this.queryParams.sex) {
+        this.getList();
+      }
+    },
+  },
+  mounted() {
+    // this.getList()
+  },
+
+  created() {
+    // if( this.queryParams){
+    //     this.getList()
+    // }
+  },
+  methods: {
+    getAllList() {
+      this.loading = true;
+      this.openone = true;
+      getTjHyBgList(this.queryParams).then((res) => {
+        this.dataList = res.data.records;
+        this.loading = false;
+      });
+    },
+    getList() {
+      this.loading = true;
+      getKjTjAdviceKjbqBySex(this.queryParams).then((res) => {
+        this.dataList = res.data.records;
+        this.total = res.data.total;
+        this.loading = false;
+      });
+    },
+    handleQuery() {
+      this.getAllList();
+    },
+    handleSelectionChange(selection) {
+    //   if (selection.length > 1) {
+    //     this.$refs.elTable.clearSelection(); // 娓呯┖鎵�鏈夐�夋嫨
+    //     this.$refs.elTable.toggleRowSelection(selection.pop()); // 璁剧疆閫夋嫨椤�
+    //   }
+      this.list = selection;
+      console.log( this.list)
+    },
+    radiotjproposalChange() {
+      if (this.tjproposal == "0") {
+        this.queryParams.isZj = this.fList.isZj;
+        this.getList();
+      } else {
+        this.loading = true;
+        getInfo().then((res) => {
+          this.queryParams.userId = res.user.userId;
+          this.queryParams.isZj = null;
+          getCyTjAdviceKjbqBySex(this.queryParams).then((res) => {
+            this.dataList = res.data.records;
+            this.total = res.data.total;
+            this.loading = false;
+          });
+        });
+      }
+    },
+    handleOk() {
+      this.open = false;
+      if (this.list.length != 0) {
+        this.$emit("event1", this.list);
+      }
+    },
+  },
+};
+</script>
+  
+<style scoped>
+.pag {
+  width: 100%;
+  display: flex;
+  justify-content: center;
+}
+
+.pag1 {
+  width: 30%;
+}
+</style>
+  
\ No newline at end of file
diff --git a/src/components/proposal/index.vue b/src/components/proposal/index.vue
index e9a676f..160259f 100644
--- a/src/components/proposal/index.vue
+++ b/src/components/proposal/index.vue
@@ -52,7 +52,7 @@
             :total="total"
             :page.sync="queryParams.page"
             :limit.sync="queryParams.pageSize"
-            @pagination="getList"
+            @pagination="radiotjproposalChange"
           />
         </div>
       </div>
@@ -100,7 +100,7 @@
   watch: {
     cusobj(val, newVla) {
       // console.log(val,newVla,1111)
-      this.fList= val
+      this.fList = val;
       this.queryParams.sex = val.sex;
       this.queryParams.isZj = val.isZj;
       if (this.queryParams.sex) {
@@ -138,16 +138,17 @@
       this.getAllList();
     },
     handleSelectionChange(selection) {
-    //   if (selection.length > 1) {
-    //     this.$refs.elTable.clearSelection(); // 娓呯┖鎵�鏈夐�夋嫨
-    //     this.$refs.elTable.toggleRowSelection(selection.pop()); // 璁剧疆閫夋嫨椤�
-    //   }
+      //   if (selection.length > 1) {
+      //     this.$refs.elTable.clearSelection(); // 娓呯┖鎵�鏈夐�夋嫨
+      //     this.$refs.elTable.toggleRowSelection(selection.pop()); // 璁剧疆閫夋嫨椤�
+      //   }
       this.list = selection;
-      console.log( this.list)
+      console.log(this.list);
     },
     radiotjproposalChange() {
       if (this.tjproposal == "0") {
         this.queryParams.isZj = this.fList.isZj;
+        this.queryParams.userId = null
         this.getList();
       } else {
         this.loading = true;
@@ -155,8 +156,15 @@
           this.queryParams.userId = res.user.userId;
           this.queryParams.isZj = null;
           getCyTjAdviceKjbqBySex(this.queryParams).then((res) => {
-            this.dataList = res.data.records;
-            this.total = res.data.total;
+            if (res.data) {
+              this.dataList = res.data.records;
+              this.total = res.data.total;
+             
+            } else {
+                this.dataList =[]
+                this.total = 0
+                this.$modal.msgError(res.msg);
+            }
             this.loading = false;
           });
         });
diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 5bdc2b9..5b02f2b 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -1048,32 +1048,15 @@
     </el-dialog>
     <Packages ref="bbb" :baogao="baogao" />
     <proposal ref="proposal" :cusobj="cusobj" @event1="eventchange($event)" />
+    <createproposal ref="createproposal" :textarea1="textarea1" />
+    
     <el-dialog
       title="甯哥敤寤鸿缁存姢"
       :visible.sync="propdialog"
       width="500px"
       append-to-body
     >
-      <el-form ref="form" :model="propform" label-width="80px">
-        <el-form-item label="寤鸿鏍囬" prop="title">
-          <el-input v-model="propform.title" placeholder="璇疯緭鍏ュ悕绉版爣棰�" />
-        </el-form-item>
-        <el-form-item label="蹇嵎鏍囩" prop="title">
-          <el-input v-model="propform.title" placeholder="璇疯緭鍏ュ悕绉版爣棰�" />
-        </el-form-item>
-        <el-form-item label="寤鸿鍐呭" prop="advice">
-          <el-input
-            type="textarea"
-            v-model="propform.advice"
-            :autosize="{ minRows: 9, maxRows: 10 }"
-            placeholder="璇疯緭鍏ュ缓璁�"
-          />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitpropForm">纭� 瀹�</el-button>
-        <el-button @click="cancel">鍙� 娑�</el-button>
-      </div>
+     
     </el-dialog>
   </div>
 </template>
@@ -1083,6 +1066,7 @@
 import jianqianwenzhen from "@/components/jianqianwenzhen";
 import Packages from "@/components/Packages";
 import proposal from "@/components/proposal";
+import createproposal from "@/components/createproposal";
 import {
   getcheckList,
   getTjdetailList,
@@ -1113,7 +1097,7 @@
     Historicalreport,
     jianqianwenzhen,
     Packages,
-    proposal,
+    proposal,createproposal
   },
   dicts: [
     "dict_tjtype",
@@ -1510,7 +1494,8 @@
       });
     },
     proposalChange() {
-      this.propdialog = true;
+      this.$refs.createproposal.open = true;
+      this.$refs.createproposal.title = "甯哥敤寤鸿缁存姢";
     },
     radiotjprojectChange() {
       if (this.tjproject == "0") {

--
Gitblit v1.8.0