From 514146014586aa8b98d667edbaf0d6897186173d Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期五, 11 四月 2025 15:55:43 +0800 Subject: [PATCH] qx --- src/views/system/tijian/index.vue | 25 - src/components/public/index.vue | 150 +++++------ src/views/sampling/sampling/index.vue | 153 ++++++----- src/views/advice/advice/index.vue | 2 src/views/picture/picture/index.vue | 344 ++++++-------------------- src/views/hosp/project/index.vue | 75 +++-- 6 files changed, 291 insertions(+), 458 deletions(-) diff --git a/src/components/public/index.vue b/src/components/public/index.vue index 98c8513..c4369c5 100644 --- a/src/components/public/index.vue +++ b/src/components/public/index.vue @@ -1,11 +1,6 @@ <template> <div> - <el-dialog - :title="title" - :visible.sync="open" - width="1080px" - append-to-body - > + <el-dialog :title="title" :visible.sync="open" width="1080px" append-to-body> <h3 v-if="fList.proResult">妫�娴嬮」鐩� :{{ fList.project.proName }}</h3> <h3 v-if="fList.proResult"> 妫�娴嬬粨鏋� :{{ fList.proResult }}{{ fList.project.proMetering }} @@ -17,7 +12,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,58 +39,35 @@ >鎼滅储</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" - @selection-change="handleSelectionChange" - border - height="420px" - > + <el-table :data="dataList" ref="multipleTable" v-loading="loading" @selection-change="handleSelectionChange" + border height="420px"> <el-table-column type="selection" width="40" align="center" /> - <el-table-column - label="搴忓彿" - type="index" - align="center" - width="50px" - /> + <el-table-column label="搴忓彿" type="index" align="center" width="50px" /> <!-- <el-table-column label="瑙勫垯" align="center" prop="ruleStr" /> --> <el-table-column label="妫�鏌ユ墍瑙�" align="center" prop="yxbx" /> <el-table-column label="妫�鏌ョ粨璁�" align="center" prop="ruleStr" /> </el-table> <div class="pag"> <div class="pag1" style="margin-left: 630px"> - <pagination - small - v-show="total > 0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> + <pagination small v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" @pagination="getList" /> </div> </div> </div> <div style="width: 100%; height: 600px"> <!-- <h3 style="margin-top: -30px;">宸查�夐」鐩�</h3> --> - <el-form - :model="form" - ref="queryForm" - size="small" - label-width="68px" - :inline="true" - > + <el-form :model="form" ref="queryForm" size="small" label-width="68px" :inline="true"> <!-- :inline="true" --> <!-- <el-form-item> <el-input @@ -105,35 +77,23 @@ ></el-input> </el-form-item> --> <el-form-item label="妫�鏌ユ墍瑙�" prop="jcsj"> - <el-input - v-model="form.jcsj" - clearable - type="textarea" - :autosize="{ minRows: 8 }" - style="width: 380px" - /> + <el-input v-model="form.jcsj" clearable type="textarea" :autosize="{ minRows: 8 }" style="width: 380px" /> </el-form-item> <el-form-item label="妫�鏌ョ粨璁�" prop="conclusion"> - <el-input - v-model="form.desc" - clearable - type="textarea" - :autosize="{ minRows: 8 }" - style="width: 380px" - /> + <el-input v-model="form.desc" clearable type="textarea" :autosize="{ minRows: 8 }" style="width: 380px" /> </el-form-item> </el-form> </div> </div> <span slot="footer" class="dialog-footer" style="margin-top: -120px"> - <el-button @click="open = false">鍙� 娑�</el-button> + <el-button @click="callcolos">鍙� 娑�</el-button> <el-button type="primary" @click="handleOk">纭� 瀹�</el-button> </span> </el-dialog> </div> </template> - + <script> import { getlist, getlistByRuleStr } from "@/api/doctor/check"; import { getYxJcXxJg } from "@/api/picture/picture"; @@ -164,7 +124,7 @@ // 寮瑰嚭灞傛爣棰� title: "", yxbx: "", - proName:'', + proName: '', // lastDesc: "", total: 0, dataList: [], @@ -177,8 +137,8 @@ queryParams: { bingzhong: "", bzPinyin: "", - proId:"", - proName:"", + proId: "", + proName: "", pageNum: 1, pageSize: 10, }, @@ -209,17 +169,19 @@ }, }, }, - mounted() {}, + mounted() { }, - created() {}, + created() { }, methods: { async getList() { try { this.loading = true; // 娣诲姞鍔犺浇鐘舵�� - const res = await getlist(this.queryParams); this.dataList = res.rows; this.total = res.total; + + this.updateData(this.proResult, this.conclusion); + // 濡傛灉闇�瑕侀�変腑鎿嶄綔锛屽皢鍏跺皝瑁呬负鐙珛鏂规硶 await this.handleAutoSelection(); @@ -256,11 +218,26 @@ }, updateData(proResult, conclusion) { - if (this.checkStatus === "1") { + console.log(proResult, conclusion, 5658) + this.form.jcsj = proResult; // 鏇存柊妫�鏌ユ墍瑙� this.form.desc = conclusion; // 鏇存柊妫�鏌ョ粨璁� - // console.log(proResult, conclusion); - } + if (this.list.length != 0) { + let desc = "" + desc += this.list + .map((item) => item.bingzhong || item.ruleStr) + .filter(Boolean) + .join(","); + let jcsj = "" + jcsj += this.list + .map((item) => item.yxbx) + .filter(Boolean) + .join(","); + this.form.jcsj = this.form.jcsj+jcsj; // 鏇存柊妫�鏌ユ墍瑙� + this.form.desc= this.form.desc+desc; + + } + }, handleSelectionChange(selection) { @@ -269,28 +246,28 @@ }, updateFormContent(selection) { - if (!selection.length) return; - + // if (!selection.length) return; + this.updateData(this.proResult, this.conclusion); // 濡傛灉澶勪簬妫�鏌ョ姸鎬侊紝浣跨敤浼犲叆鐨勫�� - if (this.checkStatus === "1") { - this.updateData(this.proResult, this.conclusion); - return; - } + // if (this.checkStatus === "1") { + // this.updateData(this.proResult, this.conclusion); + // return; + // } // 閲嶇疆琛ㄥ崟鍐呭 - this.form.desc = ""; - this.form.jcsj = ""; + // this.form.desc = ""; + // this.form.jcsj = ""; + // console.log(22222); + // // 浣跨敤map鍜宩oin鏇夸唬forEach鍜屽瓧绗︿覆鎷兼帴 + // this.form.desc = selection + // .map((item) => item.bingzhong || item.ruleStr) + // .filter(Boolean) + // .join(","); - // 浣跨敤map鍜宩oin鏇夸唬forEach鍜屽瓧绗︿覆鎷兼帴 - this.form.desc = selection - .map((item) => item.bingzhong || item.ruleStr) - .filter(Boolean) - .join(","); - - this.form.jcsj = selection - .map((item) => item.yxbx) - .filter(Boolean) - .join(","); + // this.form.jcsj = selection + // .map((item) => item.yxbx) + // .filter(Boolean) + // .join(","); }, handleOk() { @@ -317,6 +294,9 @@ this.$refs.multipleTable.clearSelection(); } }, + callcolos() { + this.open = false; + } }, computed: { isCheckMode() { @@ -329,14 +309,14 @@ }, }; </script> - + <style scoped> .el-dialog__body { padding: 10px 20px; } + ::v-deep .el-dialog__footer { padding: 0 !important; padding-bottom: 40px !important; } -</style> - \ No newline at end of file +</style> \ No newline at end of file diff --git a/src/views/advice/advice/index.vue b/src/views/advice/advice/index.vue index 7bb29aa..615d51f 100644 --- a/src/views/advice/advice/index.vue +++ b/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 diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue index 92e9b30..e11fe23 100644 --- a/src/views/hosp/project/index.vue +++ b/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( diff --git a/src/views/picture/picture/index.vue b/src/views/picture/picture/index.vue index d49b142..dd30464 100644 --- a/src/views/picture/picture/index.vue +++ b/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; diff --git a/src/views/sampling/sampling/index.vue b/src/views/sampling/sampling/index.vue index 2e7f740..7d97733 100644 --- a/src/views/sampling/sampling/index.vue +++ b/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 }) { diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue index 56b7c7a..0e82f85 100644 --- a/src/views/system/tijian/index.vue +++ b/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; }); -- Gitblit v1.8.0