From 1bff9afb2dfda9824c3956c4a491a1b2261ad306 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期日, 27 四月 2025 14:37:54 +0800 Subject: [PATCH] 1 --- src/views/picture/picture/index.vue | 199 ++++++++++++++++++++++++++++++------------------- 1 files changed, 123 insertions(+), 76 deletions(-) diff --git a/src/views/picture/picture/index.vue b/src/views/picture/picture/index.vue index f2cab30..e182a8b 100644 --- a/src/views/picture/picture/index.vue +++ b/src/views/picture/picture/index.vue @@ -5,9 +5,17 @@ ref="queryForm" size="small" :inline="true" - v-show="showSearch" label-width="68px" > + <el-form-item label="濮撳悕" prop="name"> + <el-input + v-model="queryParams.name" + placeholder="璇疯緭鍏ュ鍚�" + clearable + @keyup.enter.native="handleQuery" + style="width: 110px" + /> + </el-form-item> <el-form-item label="浣撴鍙�" prop="tjNumber"> <el-input ref="inputName" @@ -19,13 +27,13 @@ style="width: 170px" /> </el-form-item> - <el-form-item label="濮撳悕" prop="name"> + <el-form-item label="椤圭洰" prop="tcm"> <el-input - v-model="queryParams.name" - placeholder="璇疯緭鍏ュ鍚�" + v-model="queryParams.tcm" + placeholder="璇疯緭鍏ラ」鐩�" clearable @keyup.enter.native="handleQuery" - style="width: 110px" + style="width: 170px" /> </el-form-item> <el-form-item @@ -52,31 +60,6 @@ /> </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-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> - </el-form-item> <el-form-item> <el-button type="primary" @@ -89,7 +72,50 @@ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" >閲嶇疆</el-button > + <el-button + type="primary" + size="mini" + @click="toggleCollapse" + style="margin-right: 15px" + v-show="isCollapsed == 0" + >楂樼骇鎼滅储 + </el-button> + <!-- 灞曞紑鏇村绛涢�夐」 --> + <el-button + type="primary" + size="mini" + @click="toggleCollapse3" + style="margin-right: 15px" + v-show="isCollapsed == 1" + >楂樼骇鎼滅储 + </el-button> + <!-- 鏀惰捣鏇村绛涢�夐」 --> </el-form-item> + + <el-row v-show="isCollapsed == 1" :gutter="20"> + <el-col :span="8"> + <el-form-item style="margin-left: 22px;" + label="鐧昏鏃堕棿" + prop="createTimeList" + v-show="isCollapsed == 1" + > + <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-col> + </el-row> </el-form> <el-radio-group @@ -101,8 +127,8 @@ <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-row :gutter="20"> + <el-col :span="11"> <el-table v-loading="loading" ref="tb" @@ -113,6 +139,7 @@ border height="520px" > + <!-- <el-table-column type="selection" width="55" /> --> <!-- @selection-change="handleSelectionChange" --> <el-table-column label="浣撴鍙�" @@ -188,9 +215,20 @@ </template> </el-table-column> </el-table> - </div> - <div id="table" style="width: 44%; height: 610px"> + <div class="pag"> + <div class="pag1"> + <pagination + v-show="total > 0" + :total="total" + :page.sync="queryParams.page" + :limit.sync="queryParams.pageSize" + @pagination="submitForm" + /> + </div> + </div> + </el-col> + <el-col :span="11"> <el-table v-loading="loading" ref="mu" @@ -313,32 +351,13 @@ </el-form-item> </el-form> </div> - - <!-- <div style="display:flex;margin:15px 0px;width: 100%;"> - <div style="width: 100%;display:flex;"> - <el-button type="primary" class="default-button-style" size="small" - @click="submiepilog">缁撴灉缁撹</el-button> - <el-button type="primary" icon="el-icon-s-claim" size="mini" @click="submito">鎻愪氦</el-button> - - </div> - </div> --> - </div> - </div> + </el-col> + </el-row> <el-dialog title="鎻愮ず" :visible.sync="dialogVisible" width="60%"> <!-- :before-close="handleClose" --> <img src="../../../assets/logo/logo.png" alt="" /> </el-dialog> - - <div style="margin-right: 58%"> - <pagination - v-show="total > 0" - :total="total" - :page.sync="queryParams.page" - :limit.sync="queryParams.pageSize" - @pagination="submitForm" - /> - </div> <Public ref="aaa" @@ -401,6 +420,7 @@ // 閫変腑鏁扮粍 ids: [], CheckBox: {}, + isCollapsed: 0, // 榛樿涓烘姌鍙犵姸鎬� // 闈炲崟涓鐢� single: true, // 闈炲涓鐢� @@ -544,7 +564,6 @@ this.queryParams.endTime = null; } /* getYxJcList(this.queryParams).then((response) => { - // console.log(response.data.customers, 666); if (response.data) { this.pictureList = response.data.customers; @@ -560,15 +579,12 @@ this.$refs.tb.clearSelection(); } this.total = response.data.total; - console.log(response.data.total, 88); this.loading = false; }); */ getCompany(this.queryParams).then((response) => { this.CompanyList = response.data; - // console.log(this.CompanyList, 555); - this.loading = false; }); }, @@ -610,9 +626,7 @@ }, handleRowClick(row, column, event) { - // console.log(row, 2323); this.name = row.proName; - // console.log(this.name, 99999); }, // 浣撴鍏徃鎷奸煶鎼滅储 getRemoteData(query) { @@ -626,6 +640,8 @@ radioChange(value) { this.loading = true; this.queryParams.checkStatus = value; + this.form.proResult = ""; + this.form.conclusion = ""; getYxJcList(this.queryParams).then((res) => { if (res.code == 200) { this.loading = false; @@ -649,7 +665,6 @@ getYxJcXx(tjNumber).then((res) => { - console.log(res, 222); this.tableList = res.data; this.loading = false; }); */ @@ -669,7 +684,6 @@ this.resetForm("form"); }, hb() { - // console.log(this.queryParams.tjNum); if (this.queryParams.tjNumber != null) { // this.handleQuery(); this.submitForm(); @@ -712,7 +726,6 @@ // 閫夋鏁版嵁 searchSelect(val) { this.CheckBox = val; - // console.log(this.CheckBox, 9999); }, handleHeaderClick(column, event) { @@ -749,6 +762,20 @@ this.loading = true; }, + toggleCollapse3() { + // this.isCollapsed = !this.isCollapsed; // 鐐瑰嚮鎸夐挳鏃跺垏鎹sCollapsed鐨勫�� + this.isCollapsed = 0; + this.$nextTick(() => { + this.$refs.inputName.focus(); + }); + }, + toggleCollapse() { + this.isCollapsed = 1; // 鐐瑰嚮鎸夐挳鏃跺垏鎹sCollapsed鐨勫�� + this.$nextTick(() => { + this.$refs.inputName.focus(); + }); + }, + tableRowClassName({ row, rowIndex }) { for (let i = 0; i < this.selectList.length; i++) { if (row === this.selectList[i]) { @@ -758,18 +785,20 @@ }, handleCurrentChange(val) { - console.log(val); this.selectedRow = val; if (!val || !val.tjNumber) { console.warn("tjNumber 涓虹┖锛屼笉璋冪敤鎺ュ彛"); this.tableList = []; return; } - - let tjNumber = val.tjNumber; this.selectedTjNumber = val.tjNumber; - this.loading = true; + this.changtjNumber(val.tjNumber); + }, + changtjNumber(val) { + console.log(8989); + let tjNumber = val; + this.loading = true; getYxJcXx(tjNumber).then((res) => { this.tableList = res.data; this.loading = false; @@ -778,8 +807,17 @@ ".el-table__header .el-checkbox" ); if (headerCheckbox) headerCheckbox.style.display = "none"; - - if (this.tableList.length > 0) { + if (this.queryParams.checkStatus == 0) { + if (this.tableList.length > 0) { + this.tableList.forEach((item, index) => { + if (item.type == 0) { + const firstRow = item; + this.$refs.mu.toggleRowSelection(firstRow, true); + this.handleChange([firstRow]); + } + }); + } + } else { const firstRow = this.tableList[0]; this.$refs.mu.toggleRowSelection(firstRow, true); this.handleChange([firstRow]); @@ -927,13 +965,11 @@ }, /* handleChange(selection) { - // console.log(selection, 123); if (selection && selection.length > 0) { const proId = selection[0].proId; const tjNumber = this.selectedRow.tjNumber; this.selectedRow = selection[0]; getYxJcXxJg(tjNumber, proId).then((res) => { - console.log(res, 333); this.form.proResult = res.data.jcsj; this.form.conclusion = res.data.jcjl; }); @@ -957,7 +993,6 @@ // 纭畾鎸夐挳 submito() { - console.log(111112225); /* if (this.dataobj) { if (this.form.proResult) { this.dataobj.proResult = this.form.proResult; @@ -995,10 +1030,19 @@ jcjl: jcjl, // 浼犻�掓鏌ョ粨璁� }) .then((response) => { - this.submitForm(); - this.form.proResult = ""; this.form.conclusion = ""; + if (this.tableList.length == 1) { + this.submitForm(); + } else { + this.tableList.forEach((item, index) => { + if (item.type == 0) { + this.changtjNumber(this.selectedTjNumber); + } else { + this.submitForm(); + } + }); + } }) .catch((error) => { console.error("鎻愪氦澶辫触", error); @@ -1077,4 +1121,7 @@ float: left; position: relative; } -</style> \ No newline at end of file +.el-input--small { + font-size: 13px; +} +</style> -- Gitblit v1.8.0