From e5454b769d44a34af423bf87ac8a740bf8c20341 Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期二, 29 四月 2025 13:25:29 +0800 Subject: [PATCH] Merge branch 'dev' into dev_tides --- src/views/CNAS/process/complaint/index.vue | 108 +++++++++++------------------------------------------- 1 files changed, 22 insertions(+), 86 deletions(-) diff --git a/src/views/CNAS/process/complaint/index.vue b/src/views/CNAS/process/complaint/index.vue index db76ec4..dad8264 100644 --- a/src/views/CNAS/process/complaint/index.vue +++ b/src/views/CNAS/process/complaint/index.vue @@ -1,23 +1,23 @@ <template> - <div class="Complaint"> + <div class="capacity-scope"> <div class="search"> - <div class="search_thing"> - <div class="search_label">鏍峰搧缂栧彿锛�</div> - <div class="search_input"><el-input v-model="queryParams.sampleCode" clearable placeholder="璇疯緭鍏�" size="small" - @keyup.enter.native="refreshTable()"></el-input></div> + <div> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> + <el-form-item label="鏍峰搧缂栧彿" prop="sampleCode"> + <el-input v-model="queryParams.sampleCode" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> + </el-form-item> + <el-form-item label="鎶曡瘔鍚嶇О" prop="complainName"> + <el-input v-model="queryParams.complainName" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> + </el-form-item> + <el-form-item> + <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button> + <el-button size="mini" @click="refresh">閲嶇疆</el-button> + </el-form-item> + </el-form> </div> - <div class="search_thing"> - <div class="search_label">鎶曡瘔鍚嶇О锛�</div> - <div class="search_input"> - <el-input v-model="queryParams.complainName" clearable placeholder="璇疯緭鍏�" size="small" - @keyup.enter.native="refreshTable()"></el-input> - </div> - </div> - <div class="search_thing" style="padding-left: 30px;"> - <el-button size="small" @click="refresh()">閲� 缃�</el-button> - <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button> - </div> - <div class="btn"> + <div> <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭</el-button> <el-button size="small" type="primary" @click="openAdd">鏂板</el-button> </div> @@ -280,11 +280,13 @@ } from '@/api/cnas/process/complaint.js' import { mapGetters } from "vuex"; export default { + name: 'Complaint', components: { limsTable }, data() { return { + tableLoading: false, addPower: false, outLoading: false, addDialogVisible: false, @@ -348,40 +350,9 @@ ...mapGetters(["userId"]), }, mounted() { - // this.entityCopy = this.HaveJson(this.componentData.entity); this.getList() }, methods: { - // 鏉冮檺鍒嗛厤 - getPower() { - let power = JSON.parse(sessionStorage.getItem('power')) - let up = false - let del = false - let add = false - let out = false - for (var i = 0; i < power.length; i++) { - if (power[i].menuMethod == 'doProcessComplain') { - up = true - } - if (power[i].menuMethod == 'addProcessComplain') { - add = true - } - if (power[i].menuMethod == 'delProcessComplain') { - del = true - } - if (power[i].menuMethod == 'exportProcessComplain') { - out = true - } - } - if (!up) { - this.componentData.do.splice(2, 1) - } - if (!del) { - this.componentData.do.splice(1, 1) - } - this.outPower = out - this.addPower = add - }, openAdd() { this.addInfo = {} this.addDialogVisible = true @@ -390,13 +361,6 @@ this.addLoading = true addProcessComplain(this.addInfo).then((res) => { this.addLoading = false - if (res.code == 201) { - this.$message({ - type: 'error', - message: '鏂板澶辫触' - }) - return - } this.$message({ type: 'success', message: '鏂板鎴愬姛' @@ -428,13 +392,6 @@ } doProcessComplain(this.currentInfo0).then((res) => { this.addLoading = false - if (res.code == 201) { - this.$message({ - type: 'error', - message: '鎻愪氦澶辫触' - }) - return - } this.$message({ type: 'success', message: '鎻愪氦鎴愬姛' @@ -497,18 +454,12 @@ this.outLoading = true exportProcessComplain(this.queryParams).then(res => { this.outLoading = false - if (res.code == 201) { - return - } const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '鎶曡瘔鎯呭喌姹囨�昏〃.xlsx'); }) }, handleOut(row) { getProcessComplain({ id: row.id }).then((res) => { - if (res.code == 201) { - return - } this.currentInfo = res.data this.currentInfo0 = this.HaveJson(res.data) this.title = '瀵煎嚭' @@ -531,7 +482,6 @@ }) .then(() => { delProcessComplain({ id: row.id }).then((res) => { - if (res.code == 201) return; this.$message.success("鍒犻櫎鎴愬姛"); this.refresh(); }); @@ -543,19 +493,11 @@ </script> <style scoped> -.title { - height: 60px; - line-height: 60px; -} - .search { - background-color: #fff; - height: 80px; + height: 46px; display: flex; - align-items: center; - position: relative; + justify-content: space-between; } - .search_thing { width: 350px; display: flex; @@ -570,12 +512,6 @@ .search_input { width: calc(100% - 110px); -} - -.table { - background-color: #fff; - height: calc(100% - 60px - 80px - 10px - 40px); - padding: 20px; } .dialog-body { @@ -610,7 +546,7 @@ .user-info { display: flex; align-items: center; - justify-content: end; + justify-content: flex-end; } .user-content { -- Gitblit v1.9.3