src/components/public/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/advice/advice/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/hosp/project/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/picture/picture/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/sampling/sampling/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/system/tijian/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/components/public/index.vue
@@ -17,7 +17,7 @@ :inline="true" label-width="68px" > --> <!-- <el-form-item label="病种名称" prop="bingzhong"> <!-- <el-form-item label="病种名称" prop="bingzhong"> <el-input v-model="queryParams.bingzhong" placeholder="请输入简称" @@ -44,22 +44,21 @@ >搜索</el-button > </el-form-item> --> <!-- <el-form-item> <!-- <el-form-item> <h3 >{{ queryParams.proName || '暂无项目名称' }}</h3> </el-form-item> --> <!-- <el-form-item> <!-- <el-form-item> <h3 style="margin-left: 160px">已选项目</h3> </el-form-item> --> <!-- </el-form> --> <h2 style="text-align: center; margin-top: -30px"> {{ queryParams.proName || "暂无项目名称" }} </h2> <h2 style="text-align: center;margin-top: -30px;">{{ queryParams.proName || '暂无项目名称' }}</h2> <div style="display: flex; width: 100%"> <div style="width: 50%; margin-right: 40px"> <el-table :data="dataList" ref="multipleTable" v-loading="loading" row-key="aid" @selection-change="handleSelectionChange" border height="420px" @@ -159,10 +158,6 @@ type: Array, default: () => [], }, proSex: { type: String, default: "2" } }, data() { return { @@ -170,7 +165,7 @@ // 弹出层标题 title: "", yxbx: "", proName: "", proName:'', // lastDesc: "", total: 0, dataList: [], @@ -183,8 +178,8 @@ queryParams: { bingzhong: "", bzPinyin: "", proId: "", proSex: "2", proId:"", // proName:"", pageNum: 1, pageSize: 10, }, @@ -209,24 +204,15 @@ if (newVal && newVal.length > 0) { const firstProject = newVal[0]; // 你也可以遍历所有项目,看你业务需求 this.queryParams.proId = firstProject.proId; // 假设项目中叫 id this.proName = firstProject.proName; // this.queryParams.proName = firstProject.proName; this.proName = firstProject.proName } }, }, proSex: { handler(newVal) { this.queryParams.proSex = newVal; this.getList(); }, immediate: true } }, mounted() {}, created() { this.queryParams.proSex = this.proSex; this.getList(); }, created() {}, methods: { async getList() { try { @@ -251,6 +237,9 @@ if (!this.fList?.rulesList?.length) return; await this.$nextTick(); // 先清除所有选择 this.$refs.multipleTable?.clearSelection(); // 再进行选择 this.dataList.forEach((item) => { const shouldSelect = this.fList.rulesList.some( (rule) => rule.aid === item.aid @@ -279,8 +268,8 @@ }, handleSelectionChange(selection) { // this.list = selection; this.list = [...selection]; console.log('Selection changed:', selection); this.list = [...selection]; // 使用展开运算符创建新数组 this.updateFormContent(selection); }, @@ -295,8 +284,9 @@ this.form.desc = ""; this.form.jcsj = ""; // 使用map和join替代forEach和字符串拼接 // 只有在有选中项时才进行拼接 if (selection.length > 0) { // 使用map和join替代forEach和字符串拼接 this.form.desc = selection .map((item) => item.bingzhong || item.ruleStr) .filter(Boolean) src/views/advice/advice/index.vue
@@ -76,7 +76,7 @@ </el-col> </el-row> <el-row :gutter="20"> <el-col :span="3" :xs="24"> <el-col :span="4" :xs="24"> <div class="head-container"> <div class="content"> <el-tree src/views/hosp/project/index.vue
@@ -1,7 +1,7 @@ <template> <div class="app-container"> <el-row :gutter="20"> <el-col :span="3" :xs="24"> <el-col :span="4" :xs="24"> <div class="head-container"> <el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 15px" /> @@ -9,8 +9,8 @@ <div class="scrollable-container"> <div class="content"> <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree" node-key="id" :default-expanded-keys="treeId" highlight-current @node-click="handleNodeClick" :render-content="renderContent" v-loading="loadings"/> :filter-node-method="filterNode" ref="tree1" node-key="id" :default-expanded-keys="treeId" highlight-current @node-click="handleNodeClick" :render-content="renderContent" v-loading="loadings" /> </div> </div> </el-col> @@ -79,7 +79,7 @@ </el-table-column> <el-table-column label="项目标准值" align="center" prop="proScope" :show-overflow-tooltip="true" width="90px"> </el-table-column> <el-table-column label="Lis项目名称" align="center" prop="lisXmmc" :show-overflow-tooltip="true" width="200px"> <el-table-column label="Lis项目名称" align="center" prop="lisXmmc" :show-overflow-tooltip="true" width="200px"> </el-table-column> <el-table-column label="Lis编码" align="center" prop="lisXmbm" :show-overflow-tooltip="true" width="90px"> </el-table-column> @@ -542,6 +542,7 @@ watch: { deptName(val) { this.debounceFilter(val); }, treeId(newVal) { if (newVal && newVal.length > 0) { @@ -549,7 +550,7 @@ const lastId = newVal[newVal.length - 1] || "532"; const node = this.findNodeById(this.deptOptions, lastId); if (node) { this.$refs.tree.setCurrentKey(lastId); this.$refs.tree1.setCurrentKey(lastId); const nodeElement = document.querySelector(`.el-tree-node[data-key="${lastId}"] .el-tree-node__content`); if (nodeElement) { nodeElement.click(); @@ -586,8 +587,8 @@ }); }, methods: { debounceFilter: debounce(function(val) { this.$refs.tree.filter(val); debounceFilter: debounce(function (val) { this.$refs.tree1.filter(val); }, 300), precomputePinyin() { const traverse = (nodes) => { @@ -603,6 +604,7 @@ traverse(this.deptOptions); }, filterNode(value, data) { console.log(value, data,2233) if (!value) return true; const cached = this.pinyinCache.get(data.id); if (!cached) return false; @@ -690,24 +692,24 @@ this.form.proParentId = row.proId || 0; this.open = true; } else if (this.treeDate.id) { if(this.treeDate.qf == "0"){ this.form.proParentId = "0" this.form.deptId =this.treeDate.id }else{ this.form.proParentId = this.treeDate.id; this.projectOptions.forEach((item) => { item.children.forEach((item1) => { if (this.form.proParentId == item1.proId) { this.form.deptId = item1.deptId; } if (this.treeDate.qf == "0") { this.form.proParentId = "0" this.form.deptId = this.treeDate.id } else { this.form.proParentId = this.treeDate.id; this.projectOptions.forEach((item) => { item.children.forEach((item1) => { if (this.form.proParentId == item1.proId) { this.form.deptId = item1.deptId; } }); }); }); } } this.open = true; } else { this.form.proParentId = "0" this.form.proParentId = "0" this.open = true; } } @@ -729,9 +731,12 @@ } else if (this.form.proParentId) { if (this.form.proParentId != 0) { this.dialogTableVisible = true; this.$nextTick(() => { this.chargeId.push(this.deptOptionstree[0].id); }); if (this.deptOptionstree.length != 0) { this.$nextTick(() => { this.chargeId.push(this.deptOptionstree[0].id); }); } this.getlistSfxm(); } else { this.dialogTableVisible = false; @@ -824,7 +829,7 @@ }); }, handleNodeClick(date) { this.treeDate = date; console.log(this.treeDate) this.xiugais = date.qf === "0"; @@ -861,6 +866,11 @@ let data = { proId: this.queryParams.proId }; getAllChildListById(data).then(() => { this.loading = false; }); this.deptName = ""; // 手动调用过滤方法(需等待 DOM 更新) this.$nextTick(() => { this.$refs.tree1.filter(this.deptName); }); }, handleClose() { @@ -900,7 +910,7 @@ resetQuery() { this.resetForm("queryForm"); this.queryParams.proId = undefined; this.$refs.tree.setCurrentKey(null); this.$refs.tree1.setCurrentKey(null); this.handleQuery(); }, flexColumnWidth(column) { @@ -1057,6 +1067,11 @@ } } }); this.deptName = ""; // 手动调用过滤方法(需等待 DOM 更新) this.$nextTick(() => { this.$refs.tree1.filter(this.deptName); }); }, processSubmission(isUpdate, isY) { if (isUpdate) { @@ -1099,6 +1114,10 @@ this.sfxmId = parseInt(item.id); }); this.dialogTableVisible = false; this.getDeptList(); this.getDeptTree().then(() => { this.precomputePinyin(); }); }, handleDelete(row) { const proIds = row.proId || this.ids; @@ -1116,7 +1135,7 @@ this.getList(); this.$modal.msgSuccess("删除成功"); }) .catch(() => {}); .catch(() => { }); }, handleExport() { this.download( src/views/picture/picture/index.vue
@@ -1,138 +1,50 @@ <template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" > <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form-item label="体检号" prop="tjNumber"> <el-input ref="inputName" v-model="queryParams.tjNumber" placeholder="请输入体检号" clearable @keyup.enter.native="handleQuery" @blur="hb" style="width: 170px" /> <el-input ref="inputName" v-model="queryParams.tjNumber" placeholder="请输入体检号" clearable @keyup.enter.native="handleQuery" @blur="hb" style="width: 170px" /> </el-form-item> <el-form-item label="姓名" prop="name"> <el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" style="width: 110px" /> <el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" style="width: 110px" /> </el-form-item> <el-form-item label="单位名称" prop="tjCompName" style="margin-left: 20px" > <el-select :remote-method="getRemoteData" v-model="queryParams.tjCompName" value-key="drugManufacturerId" style="width: 180px" remote filterable placeholder="请选择单位名称" clearable @change="searchSelect" > <el-option v-for="dict in CompanyList" :key="dict.drugManufacturerId" :label="dict.cnName" :value="dict" /> <el-form-item label="单位名称" prop="tjCompName" style="margin-left: 20px"> <el-select :remote-method="getRemoteData" v-model="queryParams.tjCompName" value-key="drugManufacturerId" style="width: 180px" remote filterable placeholder="请选择单位名称" clearable @change="searchSelect"> <el-option v-for="dict in CompanyList" :key="dict.drugManufacturerId" :label="dict.cnName" :value="dict" /> </el-select> </el-form-item> <el-form-item label="项目" prop="tcm"> <el-input v-model="queryParams.tcm" placeholder="请输入体检号" clearable @keyup.enter.native="handleQuery" style="width: 170px" /> <el-input v-model="queryParams.tcm" placeholder="请输入项目" clearable @keyup.enter.native="handleQuery" style="width: 170px" /> </el-form-item> <el-form-item label="登记时间" prop="createTimeList"> <el-date-picker v-model="createTimeList" type="datetimerange" align="right" :picker-options="pickerOptions" style="width: 310px" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:00:00']" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" @change="dateChangebirthday1" > <el-date-picker v-model="createTimeList" type="datetimerange" align="right" :picker-options="pickerOptions" style="width: 310px" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:00:00']" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" @change="dateChangebirthday1"> </el-date-picker> </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" style="margin-right: 15px" >搜索</el-button > <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" >重置</el-button > <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" style="margin-right: 15px">搜索</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> </el-form-item> </el-form> <el-radio-group v-model="checkStatus" @input="radioChange" style="margin: 10px 15px" > <el-radio-group v-model="checkStatus" @input="radioChange" style="margin: 10px 15px"> <el-radio-button label="0">未检</el-radio-button> <el-radio-button label="1">已检</el-radio-button> </el-radio-group> <div style="width: 100%; margin-left: 10px; display: flex"> <div style="width: 36%; margin-right: 30px"> <el-table id="table" v-loading="loading" ref="tb" :data="pictureList" highlight-current-row :row-class-name="tableRowClassName" @current-change="handleCurrentChange" border height="520px" > <el-table v-loading="loading" ref="tb" :data="pictureList" highlight-current-row :row-class-name="tableRowClassName" @current-change="handleCurrentChange" border height="520px"> <!-- @selection-change="handleSelectionChange" --> <el-table-column label="体检号" align="center" prop="tjNumber" min-width="160" /> <el-table-column label="姓名" align="center" prop="cusName" min-width="80" /> <el-table-column label="性别" align="center" prop="cusSex" min-width="50" > <el-table-column label="体检号" align="center" prop="tjNumber" min-width="160" /> <el-table-column label="姓名" align="center" prop="cusName" min-width="80" /> <el-table-column label="性别" align="center" prop="cusSex" min-width="50"> <template slot-scope="scope"> <span v-if="scope.row.cusSex == '0'">男</span> <span v-if="scope.row.cusSex == '1'">女</span> @@ -145,103 +57,43 @@ <!-- <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.cusSex " /> --> <!-- </template> --> </el-table-column> <el-table-column label="手机号" align="center" prop="cusPhone" min-width="100" /> <el-table-column label="套餐名" align="center" prop="tcm" min-width="100" /> <el-table-column label="登记时间" align="center" prop="tjTime" min-width="120" /> <el-table-column label="审核状态" align="center" prop="confirmStatus" min-width="80" > <el-table-column label="手机号" align="center" prop="cusPhone" min-width="100" /> <el-table-column label="套餐名" align="center" prop="tcm" min-width="100" /> <el-table-column label="登记时间" align="center" prop="tjTime" min-width="120" /> <el-table-column label="审核状态" align="center" prop="confirmStatus" min-width="80"> <template slot-scope="scope"> <span :style="{ color: scope.row.confirmStatus == '301' ? '#0CB618' : '#EA1B29', }" v-if="scope.row.confirmStatus == '301'" >已通过</span > <span :style="{ color: scope.row.confirmStatus == '301' ? '#0CB618' : '#EA1B29', }" v-if="scope.row.confirmStatus == '299'" >已驳回</span > <span :style="{ color: scope.row.confirmStatus == '301' ? '#0CB618' : '#EA1B29', }" v-if="scope.row.confirmStatus == '301'">已通过</span> <span :style="{ color: scope.row.confirmStatus == '301' ? '#0CB618' : '#EA1B29', }" v-if="scope.row.confirmStatus == '299'">已驳回</span> </template> </el-table-column> </el-table> </div> <div style="width: 44%; height: 610px"> <el-table v-loading="loading" ref="mu" :data="tableList" :row-class-name="tableRowClassName" highlight-current-row @selection-change="handleChange" border style="height: 400px" > <el-table-column type="selection" width="50" align="center" /> <el-table-column label="科室" align="center" prop="deptName" min-width="100" :show-overflow-tooltip="true" /> <el-table-column label="项目" align="center" prop="proName" min-width="150" :show-overflow-tooltip="true" /> <el-table-column label="状态" align="center" prop="type" :show-overflow-tooltip="true" min-width="100" > <div id="table" style="width: 44%; height: 610px"> <el-table v-loading="loading" ref="mu" :data="tableList" :row-class-name="tableRowClassName" @header-click="handleHeaderClick" highlight-current-row @selection-change="handleChange" border style="height: 400px"> <el-table-column type="selection" width="50" align="center"> </el-table-column> <el-table-column label="科室" align="center" prop="deptName" min-width="100" :show-overflow-tooltip="true" /> <el-table-column label="项目" align="center" prop="proName" min-width="150" :show-overflow-tooltip="true" /> <el-table-column label="状态" align="center" prop="type" :show-overflow-tooltip="true" min-width="100"> <template slot-scope="scope"> <span v-if="scope.row.type == '0'" :style="type == 0 ? { color: 'red' } : { color: '#409EFF' }" > {{ type == 0 ? "未 检" : "在 检" }} <span v-if="scope.row.type == '0'" :style="type == 0 ? { color: 'red' } : { color: '#409EFF' }"> {{ type == 0 ? "未 检" : "在 检" }} </span> <span v-if="scope.row.type == '1'">已完成</span> <span v-if="scope.row.type == '2'">弃检</span> <span v-if="scope.row.type == '3'">延期</span> </template> </el-table-column> <el-table-column label="检查时间" align="center" prop="bcupdateTime" min-width="160" /> <el-table-column label="检查时间" align="center" prop="bcupdateTime" min-width="160" /> <!-- <el-table-column label="操作" align="center" min-width="120px"> <template slot-scope="scope"> <el-button @@ -271,44 +123,16 @@ <el-table-column label="项目结果" align="center" prop="proResult" /> --> </el-table> <div style="margin-top: 10px"> <el-form :model="form" ref="queryForm" size="small" :inline="false" label-width="68px" > <el-form :model="form" ref="queryForm" size="small" :inline="false" label-width="68px"> <el-form-item label="检查所见" prop="proResult"> <el-input v-model="form.proResult" clearable type="textarea" @focus="submiepilog" /> <el-input v-model="form.proResult" clearable type="textarea" @focus="submiepilog" /> </el-form-item> <el-form-item label="检查结论" prop="conclusion"> <el-input v-model="form.conclusion" clearable type="textarea" @focus="submiepilog" /> <el-input v-model="form.conclusion" clearable type="textarea" @focus="submiepilog" /> </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-picture" size="mini" @click="tupian" >图片</el-button > <el-button type="primary" icon="el-icon-search" size="mini" @click="submito" >提交</el-button > <el-button type="primary" icon="el-icon-picture" size="mini" @click="tupian">图片</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="submito">提交</el-button> </el-form-item> </el-form> </div> @@ -330,23 +154,12 @@ </el-dialog> <div style="margin-right: 58%"> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize" @pagination="submitForm" /> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize" @pagination="submitForm" /> </div> <Public ref="aaa" :check-status="checkStatus" :pro-result="form.proResult" :conclusion="form.conclusion" @add="handleChanges" :project-list="projectList" /> <Public ref="aaa" :check-status="checkStatus" :pro-result="form.proResult" :conclusion="form.conclusion" @add="handleChanges" :project-list="projectList" /> <!-- :last-desc="form.conclusion" --> </div> </template> @@ -713,16 +526,24 @@ this.CheckBox = val; // console.log(this.CheckBox, 9999); }, handleHeaderClick(column, event) { if (column.type === 'selection') { // 查找全选框并隐藏 const checkbox = event.target.closest('.el-checkbox'); if (checkbox) checkbox.style.display = 'none'; } }, /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; this.queryParams.page = 1; this.submitForm(); }, /** 重置按钮操作 */ resetQuery() { this.createTimeList = []; (this.queryParams = { pageNum: 1, page: 1, pageSize: 10, tjNumber: null, compId: null, @@ -761,10 +582,12 @@ this.loading = true; getYxJcXx(tjNumber).then((res) => { console.log(res, 222); this.tableList = res.data; this.loading = false; this.$nextTick(() => { const headerCheckbox = this.$refs.mu.$el.querySelector('.el-table__header .el-checkbox'); if (headerCheckbox) headerCheckbox.style.display = 'none'; if (this.tableList.length > 0) { const firstRow = this.tableList[0]; this.$refs.mu.toggleRowSelection(firstRow, true); @@ -888,6 +711,10 @@ }); }, handleChange(selection) { if (selection.length > 1) { let del_row = selection.shift(); this.$refs.mu.toggleRowSelection(del_row, false); //设置这一行取消选中 } this.projectList = selection.map((item) => ({ proId: item.proId, proName: item.proName, @@ -940,8 +767,11 @@ tupian() { this.dialogVisible = true; }, // 确定按钮 submito() { console.log(111112225) /* if (this.dataobj) { if (this.form.proResult) { this.dataobj.proResult = this.form.proResult; @@ -962,16 +792,15 @@ console.error("未选中行或缺少 proId"); return; } console.log(this.selectedRow.proId, 96); const proId = this.selectedRow.proId; const jcsj = this.form.proResult; // 获取检查所见 const jcjl = this.form.conclusion; // 获取检查结论 const jcsj = this.form.proResult || " "; // 获取检查所见 const jcjl = this.form.conclusion || " "; // 获取检查结论 // 确保 jcsj 和 jcjl 存在 if (!jcsj || !jcjl) { console.error("检查所见或检查结论不能为空"); return; } // if (!jcsj || !jcjl) { // console.error("检查所见或检查结论不能为空"); // return; // } addYxJcXx({ proId: proId, @@ -980,7 +809,6 @@ jcjl: jcjl, // 传递检查结论 }) .then((response) => { console.log("提交成功", response); this.submitForm(); this.form.proResult = ""; @@ -992,20 +820,16 @@ }, //删除按钮 handleDelete() {}, handleDelete() { }, // 导出 handleExport() {}, handleExport() { }, }, }; </script> <style> #table .el-table__header-wrapper .el-checkbox { display: none; } .default-button-style :hover { width: 80px; border-bottom: none; src/views/sampling/sampling/index.vue
@@ -105,8 +105,9 @@ </div> <div style="width: 50%"> <!-- v-if="this.rightTabShow" --> <el-table :key="tableKey" :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList" @selection-change="handleChange" :span-method="objectSpanMethod" ref="tab1" :row-class-name="tableRowClassName" border height="520px"> <el-table :key="tableKey" :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList" @selection-change="handleChange" :span-method="objectSpanMethod" ref="tab1" :row-class-name="tableRowClassName" border height="520px"> <el-table-column type="selection" width="40" align="center" /> <!-- :selectable="selectEnable" --> <!-- <el-table-column label="是否签收" align="center" prop="isSignFor" /> --> @@ -331,7 +332,7 @@ }, // 表单参数 form: {}, tableKey : "", tableKey: "", // 表单校验 rules: {}, // rightTabShow: false @@ -534,41 +535,49 @@ }, /** 查询体检采样管理列表 */ /** 查询体检采样管理列表 */ getList() { this.queryParams.compId = this.CheckBox.drugManufacturerId; this.loading1 = true; this.queryParams.isSignFor = this.tjStatus; getList() { this.queryParams.compId = this.CheckBox.drugManufacturerId; this.loading1 = true; this.queryParams.isSignFor = this.tjStatus; if (this.createTimeList) { this.queryParams.beginTime = this.createTimeList[0]; this.queryParams.endTime = this.createTimeList[1]; } else { this.queryParams.beginTime = null; this.queryParams.endTime = null; } getList(this.queryParams).then((response) => { this.loading1 = false; if (response.data && response.data.list && response.data.list.length > 0) { this.samplingList = response.data.list; this.total = response.data.total; // 移除默认选中第一行的逻辑 // this.$nextTick(() => { // this.$refs.tb.toggleRowSelection(this.samplingList[0], true); // 默认选中第一行 // this.fetchData(this.samplingList[0].tjNumber); // 刷新右侧表格 // }); } else { this.samplingList = []; this.tableList = []; this.selectList = []; // 清空 selectList this.ids = []; // 清空 ids if (this.$refs.tab1) { this.$refs.tab1.clearSelection(); // 清空右侧表格选中状态 if (this.createTimeList) { this.queryParams.beginTime = this.createTimeList[0]; this.queryParams.endTime = this.createTimeList[1]; } else { this.queryParams.beginTime = null; this.queryParams.endTime = null; } } this.loading1 = false; }); }, getList(this.queryParams).then((response) => { this.loading1 = false; if (response.data && response.data.list && response.data.list.length > 0) { this.samplingList = response.data.list; this.total = response.data.total; this.$nextTick(() => { if (this.$refs.tb) { const headerCheckbox = this.$refs.tb.$el.querySelector('.el-table__header .el-checkbox'); if (headerCheckbox) headerCheckbox.style.display = 'none'; } }); // 移除默认选中第一行的逻辑 // this.$nextTick(() => { // this.$refs.tb.toggleRowSelection(this.samplingList[0], true); // 默认选中第一行 // this.fetchData(this.samplingList[0].tjNumber); // 刷新右侧表格 // }); } else { this.samplingList = []; this.tableList = []; this.selectList = []; // 清空 selectList this.ids = []; // 清空 ids if (this.$refs.tab1) { this.$refs.tab1.clearSelection(); // 清空右侧表格选中状态 } } this.loading1 = false; }); }, // 取消按钮 cancel() { this.open = false; @@ -679,6 +688,8 @@ if (this.$refs.tab1) { this.$refs.tab1.doLayout(); // 修改为正确的 ref 名称 this.$refs.tab1.clearSelection(); // 清空选中状态 const headerCheckbox = this.$refs.tab1.$el.querySelector('.el-table__header .el-checkbox'); if (headerCheckbox) headerCheckbox.style.display = 'inline'; } }); resolve(this.tableList); @@ -1004,37 +1015,45 @@ }); }, // 单选按钮 // 单选按钮 radioChange(value) { this.loading = true; this.queryParams.isSignFor = value; getList(this.queryParams).then((response) => { if (response.data) { if (response.data.list == null) { this.samplingList = []; this.tableList = []; this.loading = false; } else { this.samplingList = response.data.list; this.loading = false; // 移除默认选中第一行的逻辑 // if (this.samplingList.length != 0) { // this.$nextTick(() => { // this.$refs.tb.toggleRowSelection(this.samplingList[0], true); // }); // } else { // this.$refs.tb.clearSelection(); // } } this.total = response.data.total; this.loading = false; } else { this.samplingList = []; this.tableList = []; this.loading = false; } }); }, // 单选按钮 radioChange(value) { this.loading = true; this.queryParams.isSignFor = value; getList(this.queryParams).then((response) => { if (response.data) { if (response.data.list == null) { this.samplingList = []; this.tableList = []; this.loading = false; } else { this.samplingList = response.data.list; this.$nextTick(() => { if (this.$refs.tb) { const headerCheckbox = this.$refs.tb.$el.querySelector('.el-table__header .el-checkbox'); if (headerCheckbox) headerCheckbox.style.display = 'none'; } }); this.loading = false; // 移除默认选中第一行的逻辑 // if (this.samplingList.length != 0) { // this.$nextTick(() => { // this.$refs.tb.toggleRowSelection(this.samplingList[0], true); // }); // } else { // this.$refs.tb.clearSelection(); // } } this.total = response.data.total; this.loading = false; } else { this.samplingList = []; this.tableList = []; this.loading = false; } }); }, // 默认接受四个值 { 当前行的值, 当前列的值, 行的下标, 列的下标 } objectSpanMethod({ row, column, rowIndex, columnIndex }) { src/views/system/tijian/index.vue
@@ -292,7 +292,7 @@ <el-tabs type="border-card" style="height: 560px; margin: 0 10px; width: 100%" v-model="activeNames" @tab-click="handleClick"> <el-tab-pane label="套餐" name="first"> <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-if="showSearch" label-width="auto"> <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-if="showSearch" label-width="auto" @submit.native.prevent="handle"> <el-form-item label="套餐名称" prop="pacName"> <el-input v-model="queryParam.pacName" placeholder="请输入套餐名称" clearable @keyup.enter.native="handle" /> </el-form-item> @@ -1323,7 +1323,9 @@ // } if (!value) return true; if (data.proName.indexOf(value) !== -1) return true; if (data.proEngName.indexOf(value) !== -1) return true; let values = value.toLowerCase(); if (data.proEngName.indexOf(values) !== -1) return true; // 匹配小写 let arr = data.proName.spell("low", "array"); let spell = arr.join(""); @@ -1347,20 +1349,8 @@ if (data.zhmc.indexOf(value) !== -1) { return data.zhmc.indexOf(value) !== -1; } else { console.log(55555) if (/[A-Z]/.test(data.pym)) { // 检查是否包含大写字母 let pym = data.pym.toLowerCase() console.log(pym,11111) return pym.indexOf(value) !== -1; } else if (/[a-z]/.test(data.pym)) { // 检查是否包含小写字母 console.log(pym,22222) let pym = data.pym.toLowerCase() return pym.indexOf(value) !== -1; } else { console.log(66666) return data.pym.indexOf(value) !== -1; } let values = value.toLowerCase(); return data.pym.indexOf(values) !== -1; } }, beforeDestroy() { @@ -2323,7 +2313,8 @@ dwId: this.form.firmId, }; if (this.name) { getPackageListName(this.name).then((response) => { let name= this.name.toLowerCase() getPackageListName(name).then((response) => { this.newpacName = response.data; this.loading = false; });