From d9cbb5e4cf6f0423b84b739c52d55f98f3af148a Mon Sep 17 00:00:00 2001 From: heimawl <1785969728@qq.com> Date: 星期二, 13 六月 2023 18:09:24 +0800 Subject: [PATCH] 完成标签管理模块搭建 --- src/views/patient/patient/index.vue | 212 +++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 150 insertions(+), 62 deletions(-) diff --git a/src/views/patient/patient/index.vue b/src/views/patient/patient/index.vue index 7ca4b28..29c10a1 100644 --- a/src/views/patient/patient/index.vue +++ b/src/views/patient/patient/index.vue @@ -172,14 +172,12 @@ align="center" key="userId" prop="userId" - v-if="columns[0].visible" /> <el-table-column label="濮撳悕" align="center" key="userName" prop="userName" - v-if="columns[1].visible" :show-overflow-tooltip="true" /> <el-table-column @@ -187,7 +185,6 @@ align="center" key="nickName" prop="nickName" - v-if="columns[2].visible" :show-overflow-tooltip="true" /> <el-table-column @@ -195,7 +192,6 @@ align="center" key="deptName" prop="dept.deptName" - v-if="columns[3].visible" :show-overflow-tooltip="true" /> <el-table-column @@ -203,14 +199,12 @@ align="center" key="phonenumber" prop="phonenumber" - v-if="columns[4].visible" width="120" /><el-table-column label="璇佷欢鍙风爜" align="center" key="phonenumber" prop="phonenumber" - v-if="columns[4].visible" width="120" /> <el-table-column @@ -221,21 +215,6 @@ v-if="columns[4].visible" width="120" /> - <!-- <el-table-column - label="鐘舵��" - align="center" - key="status" - v-if="columns[5].visible" - > - <template slot-scope="scope"> - <el-switch - v-model="scope.row.status" - active-value="0" - inactive-value="1" - @change="handleStatusChange(scope.row)" - ></el-switch> - </template> - </el-table-column> --> <el-table-column label="鑱旂郴鏂瑰紡" @@ -447,41 +426,88 @@ <el-dialog :title="upload.title" :visible.sync="upload.open" - width="400px" + width="70%" append-to-body > - <el-upload - ref="upload" - :limit="1" - accept=".xlsx, .xls" - :headers="upload.headers" - :action="upload.url + '?updateSupport=' + upload.updateSupport" - :disabled="upload.isUploading" - :on-progress="handleFileUploadProgress" - :on-success="handleFileSuccess" - :auto-upload="false" - drag - > - <i class="el-icon-upload"></i> - <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> - <div class="el-upload__tip text-center" slot="tip"> - <div class="el-upload__tip" slot="tip"> - <el-checkbox v-model="upload.updateSupport" /> - 鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹� + <el-steps :active="dractive" simple> + <el-step title="涓婁紶瀵煎叆鏂囦欢" icon="el-icon-upload"></el-step> + <el-step title="瀵煎叆妫�鏌�" icon="el-icon-picture"></el-step> + <el-step title="瀵煎叆缁撴灉" icon="el-icon-picture"></el-step> + </el-steps> + <!-- 涓婁紶瀵煎叆鏂囦欢 --> + <div class="download" v-if="dractive == 1"> + <el-upload + class="upload-demo" + ref="upload" + :limit="1" + accept=".xlsx, .xls" + :headers="upload.headers" + :action="upload.url + '?updateSupport=' + upload.updateSupport" + :disabled="upload.isUploading" + :on-progress="handleFileUploadProgress" + :on-success="handleFileSuccess" + :auto-upload="false" + drag + > + <i class="el-icon-upload"></i> + <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> + <div class="el-upload__tip text-center" slot="tip"> + <div class="el-upload__tip" slot="tip"> + <el-checkbox v-model="upload.updateSupport" /> + 鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹� + </div> + <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span> + <el-link + type="primary" + :underline="false" + style="font-size: 24px; vertical-align: baseline" + @click="importTemplate" + >涓嬭浇妯℃澘</el-link + > </div> - <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span> - <el-link - type="primary" - :underline="false" - style="font-size: 12px; vertical-align: baseline" - @click="importTemplate" - >涓嬭浇妯℃澘</el-link - > - </div> - </el-upload> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitFileForm">纭� 瀹�</el-button> - <el-button @click="upload.open = false">鍙� 娑�</el-button> + </el-upload> + </div> + <!-- 瀵煎叆妫�鏌� --> + <div class="uploading" v-else-if="dractive == 2"> + <el-table :data="uploadingData" style="width: 100%"> + <el-table-column prop="serial" label="搴忓彿"> </el-table-column> + <el-table-column prop="name" label="濮撳悕"> </el-table-column> + <el-table-column prop="sex" label="鎬у埆"> </el-table-column> + <el-table-column prop="certificate" label="璇佷欢绫诲瀷"> + </el-table-column> + <el-table-column prop="certificatenum" label="璇佷欢鍙风爜"> + </el-table-column> + <el-table-column prop="goday" label="鍑虹敓鏃ユ湡"> </el-table-column> + <el-table-column prop="menum" label="鏈汉鑱旂郴鏂瑰紡"> </el-table-column> + <el-table-column prop="younum" label="浜插睘鑱旂郴鏂瑰紡"> + </el-table-column> + <el-table-column prop="tag" label="鎮h�呮爣绛�"> </el-table-column> + <el-table-column prop="erry" label="閿欒鍘熷洜"> </el-table-column> + </el-table> + <pagination + v-show="total > 0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="geterryList" + /> + </div> + <!-- 瀹屾垚 --> + <div class="drexamine" v-else-if="dractive == 3"> + <img + src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" + /> + <p>瀵煎叆鎮h�呮垚鍔燂紒</p> + <p>鏈鍏辫瀵煎叆{{ ImportQuantity }}浣嶆偅鑰�</p> + </div> + + <div slot="footer" class="dialog-footer" v-if="dractive == 3"> + <!-- <el-button type="primary" @click="submitFileForm">涓嬩竴姝�</el-button> --> + <el-button @click="submitclose">瀹屾垚</el-button> + </div> + <div slot="footer" v-else> + <el-button type="primary" @click="submitFileForm">涓嬩竴姝�</el-button> + <el-button @click="submitclose">鍙� 娑�</el-button> </div> </el-dialog> </div> @@ -498,6 +524,7 @@ changeUserStatus, deptTreeSelect, } from "@/api/system/user"; +import { listpatient } from "@/api/patient/homepage"; import { getToken } from "@/utils/auth"; import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; @@ -540,6 +567,20 @@ roleOptions: [], // 琛ㄥ崟鍙傛暟 form: {}, + //瀵煎叆杩涘害 + dractive: 1, + // 瀵煎叆灞曠ず琛ㄥ崟 + uploadingData: {}, + total: 0, // 鎬绘潯鏁� + ImportQuantity: 999, //瀵煎叆鎮h�呮暟閲� + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + jobName: undefined, + jobGroup: undefined, + status: undefined, + }, propss: { multiple: true }, optionss: [ { @@ -660,16 +701,24 @@ }); }, methods: { - /** 鏌ヨ鐢ㄦ埛鍒楄〃 */ + /** 鏌ヨ鎮h�呭垪琛� */ getList() { this.loading = true; - listUser(this.addDateRange(this.queryParams, this.dateRange)).then( - (response) => { - this.userList = response.rows; - this.total = response.total; - this.loading = false; - } - ); + listUser(this.queryParams).then((response) => { + console.log(response); + this.userList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 鏌ヨ瀵煎叆灞曠ず鍒楄〃 + geterryList() { + this.loading = true; + listJob(this.queryParams).then((response) => { + this.jobList = 1; + this.total = 1; + this.loading = false; + }); }, /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */ getDeptTree() { @@ -881,7 +930,17 @@ }, // 鎻愪氦涓婁紶鏂囦欢 submitFileForm() { - this.$refs.upload.submit(); + // 涓婁紶 + if (this.dractive == 1) { + this.$refs.upload.submit(); + this.dractive++; + } else { + this.dractive++; + } + }, + submitclose() { + this.upload.open = false; + this.dractive = 1; }, }, }; @@ -901,4 +960,33 @@ display: flex; justify-content: flex-end; } +.download { + text-align: center; + .el-upload__tip { + font-size: 23px; + } + .el-upload__text { + font-size: 23px; + } +} +.uploading { + margin-top: 20px; + margin: 20px; + padding: 30px; + background: #ffffff; + 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); +} +.drexamine { + display: flex; + align-items: center; + justify-content: center; + padding: 30px; + background: #daeaf5; + img { + width: 100px; + height: 100px; + } +} </style> -- Gitblit v1.9.3