From 6ca45612f4564a741c56c8179e594a72fa79dbc7 Mon Sep 17 00:00:00 2001
From: su1124 <1583764726@qq.com>
Date: 星期三, 10 一月 2024 15:33:27 +0800
Subject: [PATCH] su

---
 src/views/picture/music/index.vue |  155 +++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 131 insertions(+), 24 deletions(-)

diff --git a/src/views/picture/music/index.vue b/src/views/picture/music/index.vue
index 5823fec..4063da9 100644
--- a/src/views/picture/music/index.vue
+++ b/src/views/picture/music/index.vue
@@ -221,14 +221,16 @@
       <!-- </div> -->
     </div>
 
-    <div style="margin-right: 70%">
-      <pagination
-        v-show="total > 0"
-        :total="total"
-        :page.sync="queryParams.pageNum"
-        :limit.sync="queryParams.pageSize"
-        @pagination="getList"
-      />
+    <div class="pag">
+      <div class="pag1">
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </div>
     </div>
     <el-drawer
       title="鎴戞槸鏍囬"
@@ -511,9 +513,52 @@
           </div>
         </div>
         <div class="tanchuangbox_right">
-          <div>
+          <div v-if="row.tjType == '02'">
             <span>鑱屼笟鍙�</span>
-            <div style="width: 100%; min-height: 300px"></div>
+            <div style="width: 100%; min-height: 200px; margin-top: 10px">
+              <el-table
+                border
+                :data="row.workLogs"
+                style="width: 100%"
+                max-height="200"
+              >
+                <el-table-column
+                  prop="beginTime"
+                  label="寮�濮嬫椂闂�"
+                  align="center"
+                  :show-overflow-tooltip="true"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="endTime"
+                  label="缁撴潫鏃堕棿"
+                  align="center"
+                  :show-overflow-tooltip="true"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="workCompany"
+                  label="宸ヤ綔鍗曚綅"
+                  align="center"
+                  :show-overflow-tooltip="true"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="workDept"
+                  label="閮ㄩ棬"
+                  align="center"
+                  :show-overflow-tooltip="true"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="workType"
+                  label="宸ョ"
+                  align="center"
+                  :show-overflow-tooltip="true"
+                >
+                </el-table-column>
+              </el-table>
+            </div>
           </div>
           <div style="display: flex; margin-top: 20px">
             <div
@@ -622,12 +667,23 @@
           </div>
           <div style="margin-top: 20px">
             <span>妫�鏌ュ尰鐢燂細</span>
-            <el-input
-              v-model="input"
-              style="width: 160px; margin-right: 10px"
-            ></el-input>
-            <el-date-picker v-model="value1" type="date" placeholder="閫夋嫨鏃ユ湡">
-            </el-date-picker>
+            <el-select
+              v-model="doctorName"
+              placeholder="璇烽�夋嫨"
+              style="width: 30%"
+              filterable
+              @change="selName"
+            >
+              <el-option
+                v-for="item in userList"
+                :key="item.userId"
+                :label="item.nickName"
+                :value="item.userId"
+              >
+              </el-option>
+            </el-select>
+            <!-- <el-date-picker v-model="value1" type="date" placeholder="閫夋嫨鏃ユ湡">
+            </el-date-picker> -->
           </div>
           <div style="margin-top: 20px">
             <!-- <el-button type="primary">鐢熸垚灏忕粨</el-button> -->
@@ -661,7 +717,8 @@
 require("echarts/lib/component/tooltip");
 require("echarts/lib/component/legend");
 require("echarts/lib/chart/pie");
-
+import { listUser } from "@/api/system/user";
+import { getInfo } from "@/api/login";
 import Public from "@/components/public";
 export default {
   dicts: [
@@ -676,7 +733,10 @@
   components: { Public },
   data() {
     return {
-      remark:"",
+      tjNum:"",
+      doctorName:"",
+      userList: [],
+      remark: "",
       pureTestId: "",
       youerList: {
         qdwb: null,
@@ -822,6 +882,7 @@
   },
   created() {
     this.getList();
+    this.getListUser();
   },
   mounted() {
     this.$nextTick(() => {
@@ -829,6 +890,26 @@
     });
   },
   methods: {
+      /** 鏌ヨ鐢ㄦ埛鍒楄〃 */
+    getListUser() {
+      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
+        (response) => {
+          this.userList = response.rows;
+          // this.userList.forEach((element) => {
+          //   const userName = this.$store.state.user.name;
+          //   if (userName == element.userName) {
+          //     this.doctorName = element.nickName;
+          //   }
+          // });
+        }
+      );
+      getInfo().then((response) => {
+        this.info = response.user;
+        this.deptId = response.user.deptId;
+        this.userId = response.user.userId;
+        this.nickName = response.user.nickName;
+      });
+    },
     ysels(val) {
       this.youeryuanshi1[0] = val;
       this.getech();
@@ -926,6 +1007,15 @@
       this.zuoerjiaozheng1[5] = val;
       this.getech3();
     },
+    selName(val) {
+      this.doctorName = val;
+      console.log(this.doctorName);
+      // this.userList.forEach(item =>{
+      //   if(val === item.userId){
+      //     this.doctorName = item.nickName
+      //   }
+      // })
+    },
     handleRowClick(selection) {
       this.row = selection.customer;
       selection.list.forEach((item) => {
@@ -933,10 +1023,15 @@
       });
       this.row.tjType = Number(selection.customer.tjType);
       this.drawer = true;
-      let pureTestId = this.pureTestId;
-      getTjPureToneTestDetilList(pureTestId).then((res) => {
-        if (res.data != []) {
-          res.data.forEach((item) => {
+      let data = {
+        pureTestId:this.pureTestId,
+        tjNum:this.row.tjNumber,
+      }
+      getTjPureToneTestDetilList(data).then((res) => {
+        if (res.data != {}) {
+          this.doctorName = res.data.doctorName;
+          this.remark = res.data.remark;
+          res.data.detilList.forEach((item) => {
             if (item.rd == "鍙宠��") {
               this.youerList = item;
               this.youeryuanshi1[0] = this.youerList.qdwb;
@@ -1373,8 +1468,11 @@
       this.zuoerList.rd = "宸﹁��";
       this.shuangerList.pureTestId = this.pureTestId;
       this.shuangerList.rd = "鍙岃��";
-      let data = [this.youerList, this.zuoerList, this.shuangerList];
-      saveTjPureToneTestDetil(data).then((res) => {
+      let pureToneTestDetils = [this.youerList, this.zuoerList, this.shuangerList];
+      let remark = this.remark;
+      let tjNum = this.row.tjNumber;
+      let doctorName = this.doctorName;
+      saveTjPureToneTestDetil(pureToneTestDetils,remark,tjNum,doctorName).then((res) => {
         console.log(res);
         if (res.code == 200) {
           this.$modal.msgSuccess("鎻愪氦鎴愬姛");
@@ -1496,4 +1594,13 @@
 .ss_txt {
   width: 60px;
 }
+.pag {
+  width: 100%;
+  display: flex;
+  justify-content: center;
+}
+
+.pag1 {
+  width: 30%;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0