From b7092c2bf77696eb13fd680cb006211c17b48f5c Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期四, 15 五月 2025 18:00:15 +0800 Subject: [PATCH] 测试完成 --- src/views/patient/follow/index.vue | 605 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 600 insertions(+), 5 deletions(-) diff --git a/src/views/patient/follow/index.vue b/src/views/patient/follow/index.vue index 289990c..6c7d903 100644 --- a/src/views/patient/follow/index.vue +++ b/src/views/patient/follow/index.vue @@ -1,17 +1,612 @@ <template> - <div>鎮h�呭洖璁�</div> + <div class="app-container"> + <el-row :gutter="20"> + <!--鐢ㄦ埛鏁版嵁--> + <el-col :span="24" :xs="24"> + <el-form + :model="queryParams" + ref="queryForm" + size="small" + :inline="true" + v-show="showSearch" + label-width="98px" + > + <el-form-item label="濮撳悕" + width="100" prop="name"> + <el-input + v-model="queryParams.name" + placeholder="璇疯緭鍏ュ鍚�" + clearable + style="width: 200px" + @keyup.enter.native="handleQuery" + /> + </el-form-item> + + <!-- <el-form-item label="鎮h�呰寖鍥�" prop="tagId"> + <el-select + v-model="queryParams.searchscope" + placeholder="璇烽�夋嫨" + > + <el-option + v-for="item in Patientrange" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> --> + + + <el-row> + + <el-form-item> + <el-button + type="primary" + icon="el-icon-search" + size="medium" + @click="handleQuery" + >鎼滅储</el-button + > + <el-button + icon="el-icon-refresh" + size="medium" + @click="resetQuery" + >閲嶇疆</el-button + > + </el-form-item> + </el-row> + </el-form> + + + <el-table + v-loading="loading" + :data="userList" + @selection-change="handleSelectionChange" + > + <el-table-column type="selection" width="50" align="center" /> + <!-- <el-table-column + label="搴忓彿" + align="center" + key="id" + prop="id" + /> --> + <el-table-column + fixed + label="濮撳悕" + width="100" + align="center" + key="name" + prop="name" + /> + <el-table-column label="鎬у埆"width="100" align="center" key="sex" prop="sex"> + <template slot-scope="scope"> + <span>{{ scope.row.sex == 1 ? "鐢�" : "濂�" }}</span> + </template> + </el-table-column> + <el-table-column + label="骞撮緞" + align="center" + key="age" + prop="age" + width="60" + /> + <el-table-column + label="鍑虹敓骞存湀" + align="center" + key="birthdate" + prop="birthdate" + width="160" + > + </el-table-column> + + <!-- <el-table-column + label="杩囨护绫诲瀷" + align="center" + key="notrequiredreason" + prop="notrequiredreason" + width="120" + > + <template slot-scope="scope"> + <dict-tag + :options="dict.type.futter_patient" + :value="scope.row.notrequiredreason" + /> + </template> + </el-table-column> --> + <el-table-column + label="杩囨护鍘熷洜" + align="center" + key="notrequiredreason" + prop="notrequiredreason" + width="190" + /> + <el-table-column + label="灞呬綇鍦�" + align="center" + key="placeOfResidence" + prop="placeOfResidence" + width="180" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鎮h�呮爣绛�" + align="center" + key="tagList" + prop="tagList" + width="160" + :show-overflow-tooltip="true" + > + <template slot-scope="scope"> + <span v-for="item in scope.row.tagList">{{ item.tagname }} </span> + </template> + </el-table-column> + <el-table-column + label="璇佷欢鍙风爜" + align="center" + key="idcardno" + prop="idcardno" + width="190" + /> + + <el-table-column + label="鑱旂郴鏂瑰紡" + align="center" + key="telcode" + prop="telcode" + width="120" + /> + <el-table-column + label="寤烘。鏃ユ湡" + align="center" + key="createTime" + prop="createTime" + width="160" + > + <template slot-scope="scope"> + <span>{{ formatTime(scope.row.createTime) }}</span> + </template> + </el-table-column> + + <el-table-column + label="鎿嶄綔" + align="center" + fixed="right" + width="190" + class-name="small-padding fixed-width" + > + <template slot-scope="scope"> + <el-button + size="medium" + type="text" + @click=" + $router.push({ + path: '/patient/patient/profile/', + query: { id: scope.row.id }, + }) + " + + ><span class="button-textsc" + ><i class="el-icon-zoom-in"></i>鏌ョ湅</span + ></el-button + > + <el-button + size="medium" + type="text" + @click="handleDelete(scope.row)" + + ><span class="button-textxga" + ><i class="el-icon-edit"></i>鍙栨秷杩囨护</span + ></el-button + > + </template> + </el-table-column> + </el-table> + + <pagination + v-show="total > 0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> + </el-col> + </el-row> + + + </div> </template> <script> +import { delUser } from "@/api/system/user"; + +import { + patarchivelist, + alterpatient, + addfiltration, + particularpatient, + delfiltration, + Exporterrorpatient, + toleadpatient, +} from "@/api/patient/homepage"; +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", "futter_patient"], + components: { Treeselect }, data() { - return {}; + return { + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 鐢ㄦ埛琛ㄦ牸鏁版嵁 + userList: null, + // 寮瑰嚭灞傛爣棰� + title: "", + // 閮ㄩ棬鏍戦�夐」 + deptOptions: undefined, + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 閮ㄩ棬鍚嶇О + deptName: undefined, + // 榛樿瀵嗙爜 + initPassword: undefined, + amendtag: false, //鏄惁淇敼 + // 鏃ユ湡鑼冨洿 + dateRange: [], + paperstypes: [ + { papersname: "韬唤璇�" }, + { papersname: "鎶ょ収" }, + { papersname: "涓浗娓境灞呮皯韬唤璇�" }, + { papersname: "涓浗鍙版咕灞呮皯韬唤璇�" }, + ], + // 琛ㄥ崟鍙傛暟 + form: { + name: "", + age: "", + sex: "", + tagList: [], + idcardno: "", + telcode: "", + idcardtype: "", + relativetelcode: "", + }, + //瀵煎叆杩涘害 + dractive: 1, + // 瀵煎叆灞曠ず琛ㄥ崟 + uploadingData: {}, + total: 0, // 鎬绘潯鏁� + ImportQuantity: 999, //瀵煎叆鎮h�呮暟閲� + Labelchange: false, //淇敼鏂板寮圭獥 + propss: { multiple: true }, + optionstag: [], //鏍囩鍒楄〃 + Patientrange: [ + { + value: 0, + label: "鎵�灞炴偅鑰�", + }, + { + value: 1, + label: "绉戝鎮h��", + }, + { + value: 2, + label: "鐥呭尯鎮h��", + }, + ], + whether: [ + { + name: "鏄�", + id: 1, + }, + { + name: "鍚�", + id: 2, + }, + ], + Filterreason: [], + defaultProps: { + children: "children", + label: "label", + }, + // 鐢ㄦ埛瀵煎叆鍙傛暟 + upload: { + // 鏄惁鏄剧ず寮瑰嚭灞傦紙鐢ㄦ埛瀵煎叆锛� + open: false, + // 寮瑰嚭灞傛爣棰橈紙鐢ㄦ埛瀵煎叆锛� + title: "", + // 鏄惁绂佺敤涓婁紶 + isUploading: false, + // 鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹� + updateSupport: 0, + // 璁剧疆涓婁紶鐨勮姹傚ご閮� + headers: { Authorization: "Bearer " + getToken() }, + // 涓婁紶鐨勫湴鍧� + url: process.env.VUE_APP_BASE_API + "/system/user/importData", + }, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + allhosp: "1", + notrequiredFlag: 1, + idcardno: undefined, + name: undefined, + status: undefined, + tagIds: undefined, + telcode: undefined, + }, + // 琛ㄥ崟鏍¢獙 + rules: {}, + }; }, + watch: { + // 鏍规嵁鍚嶇О绛涢�夐儴闂ㄦ爲 + deptName(val) { + this.$refs.tree.filter(val); + }, + }, + created() { + this.getList(); + this.gettabList(); + this.Filterreason = store.getters.Filterreason; + }, + methods: { + /** 鏌ヨ鎮h�呭垪琛� */ + getList() { + this.loading = true; + patarchivelist(this.queryParams).then((response) => { + console.log(response); + this.userList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + /** 鏌ヨ鏍囩鍒楄〃 */ + gettabList() { + const tagqueryParams = { + pageNum: 1, + pageSize: 1000, + tagname: undefined, + tagdescription: undefined, + tagcategoryid: "0", + }; + listtag(tagqueryParams).then((response) => { + console.log(response); + this.optionstag = response.rows; + }); + }, + // 鏌ヨ瀵煎叆灞曠ず鍒楄〃 + geterryList() { + this.loading = true; + listJob(this.queryParams).then((response) => { + this.jobList = 1; + this.total = 1; + this.loading = false; + }); + }, - created() {}, + // 绛涢�夎妭鐐� + filterNode(value, data) { + if (!value) return true; + return data.label.indexOf(value) !== -1; + }, + // 鑺傜偣鍗曞嚮浜嬩欢 + handleNodeClick(data) { + this.queryParams.deptId = data.id; + this.handleQuery(); + }, - methods: {}, + // 鍙栨秷鎸夐挳 + cancel() { + this.Labelchange = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + name: "", + age: "", + sex: "", + tagList: [], + idcardno: "", + telcode: "", + idcardtype: "", + relativetelcode: "", + }; + // this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.queryParams={ + pageNum: 1, + pageSize: 10, + allhosp: "1", + notrequiredFlag: 1, + }, + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map((item) => item.patid); + this.single = selection.length != 1; + this.multiple = !selection.length; + }, + + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset(); + this.Labelchange = true; + this.amendtag = false; + }, + + //淇敼/鏂板鎮h�� + submitForm() { + if (this.amendtag) { + alterpatient(this.form) + .then((response) => { + console.log(response); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("淇敼鎴愬姛"); + }); + } else { + addfiltration(this.form) + .then((response) => { + console.log(response); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("娣诲姞鎴愬姛"); + }); + } + this.reset(); + // this.idds = ""; + this.Labelchange = false; + }, + + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const userIds = row.id || this.ids; + this.$modal + .confirm('鏄惁纭鍙栨秷鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」杩囨护锛�') + .then( ()=> { + row.notrequiredFlag=0 + alterpatient(row) + .then((response) => { + console.log(response); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("淇敼鎴愬姛"); + }); + }) + + .catch(() => {}); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download( + "smartor/patarchive/export", + { + ...this.queryParams, + }, + `user_${new Date().getTime()}.xlsx` + ); + }, + /** 瀵煎叆鎸夐挳鎿嶄綔 */ + handleImport() { + this.upload.title = "鐢ㄦ埛瀵煎叆"; + this.upload.open = true; + }, + /** 涓嬭浇妯℃澘鎿嶄綔 */ + importTemplate() { + this.download( + "smartor/import/getImportPatTemplate", + {}, + `user_template_${new Date().getTime()}.xlsx` + ); + }, + // 鏂囦欢涓婁紶涓鐞� + handleFileUploadProgress(event, file, fileList) { + this.upload.isUploading = true; + }, + // 鏂囦欢涓婁紶鎴愬姛澶勭悊 + handleFileSuccess(response, file, fileList) { + this.upload.open = false; + this.upload.isUploading = false; + this.$refs.upload.clearFiles(); + this.$alert( + "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + + response.msg + + "</div>", + "瀵煎叆缁撴灉", + { dangerouslyUseHTMLString: true } + ); + this.getList(); + }, + // 鎻愪氦涓婁紶鏂囦欢 + submitFileForm() { + // 涓婁紶 + if (this.dractive == 1) { + this.$refs.upload.submit(); + this.dractive++; + } else { + this.dractive++; + } + }, + submitclose() { + this.upload.open = false; + this.dractive = 1; + }, + }, }; </script> -<style lang="scss" scoped></style> +<style lang="scss" scoped> +.el-button--primary.is-plain { + color: #ffffff; + background: #409eff; + border-color: #4fabe9; +} +.document { + width: 100px; + height: 50px; +} +.documentf { + 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; + } +} +.button-textsc { + color: #28cfe6; +} +</style> -- Gitblit v1.9.3