From 0a26d58a3906b9e13946c7cb46fae51a0de98920 Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期一, 17 三月 2025 15:49:08 +0800 Subject: [PATCH] Merge branch 'dev' into dev_tides --- src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue | 131 +++++++++---------------------------------- 1 files changed, 28 insertions(+), 103 deletions(-) diff --git a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue index 08be833..522e74a 100644 --- a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue +++ b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue @@ -1,24 +1,26 @@ <template> <!-- 鍙戞斁鍥炴敹璁板綍 --> - <div class="distribution-collection-record" style="height: 100%;"> + <div> <div class="search"> - <div class="search_thing"> - <div class="search_label">鏂囦欢缂栧彿锛�</div> - <div class="search_input"><el-input v-model="queryParams.documentCode" 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="documentCode"> + <el-input v-model="queryParams.documentCode" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> + </el-form-item> + <el-form-item label="鏂囦欢鍚嶇О" prop="laboratoryNumber"> + <el-input v-model="queryParams.name" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button> + <el-button icon="el-icon-refresh" 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.name" 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="btns" style="padding-left: 30px;"> - <el-button v-if="addPower" size="small" type="primary" - @click="addDialogVisible = true, addInfo = {}, radio = '鍙戞斁'">娣诲姞鍙戞斁璁板綍</el-button> + <div> + <el-button v-if="addPower" size="small" type="primary" icon="el-icon-plus" + @click="addDialogVisible = true, addInfo = {}, radio = '鍙戞斁', file = null">娣诲姞鍙戞斁璁板綍</el-button> <el-button v-if="outPower" :loading="outLoading" size="small" type="primary" @click="handleOut">瀵煎嚭</el-button> </div> </div> @@ -27,7 +29,7 @@ :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table> </div> <el-dialog :title="'娣诲姞' + radio + '璁板綍'" :visible.sync="addDialogVisible" top="10vh" width="800px"> - <el-row> + <el-row v-if="addDialogVisible"> <el-col :span="12" style="margin-bottom: 16px;"> <div class="search_thing"> <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>鐢宠缂栧彿锛�</div> @@ -152,7 +154,7 @@ <div class="search_thing"> <div class="search_label">涓婁紶闄勪欢锛�</div> <div class="search_input"><el-upload :auto-upload="false" :multiple="false" :on-change="handleChangeUpload" - accept='.pdf,.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;"> + accept='.pdf,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;"> <el-button size="small" type="primary">涓婁紶闄勪欢</el-button> </el-upload></div> </div> @@ -245,7 +247,7 @@ clickFun: (row) => { this.handleDelete(row); }, - disabFun: (row, index) => { + disabled: (row, index) => { return row.documentState == '閫氳繃' } }, @@ -255,7 +257,7 @@ clickFun: (row) => { this.handleLook(row); }, - disabFun: (row, index) => { + disabled: (row, index) => { return !row.url } }, @@ -265,7 +267,7 @@ clickFun: (row) => { this.handleCheck(row); }, - disabFun: (row, index) => { + disabled: (row, index) => { return row.receiveUser != this.userId || row.documentState == '閫氳繃' } }, @@ -288,38 +290,6 @@ this.selectEnumByCategory() }, methods: { - getPower() { - let power = JSON.parse(sessionStorage.getItem('power')) - let out = false - let del = false - let add = false - // let check = false - for (var i = 0; i < power.length; i++) { - if (power[i].menuMethod == 'exportManageDocumentIssueRecycle') { - out = true - } - if (power[i].menuMethod == 'addManageDocumentIssueRecycle') { - add = true - } - if (power[i].menuMethod == 'delManageDocumentIssueRecycle') { - del = true - } - // if (power[i].menuMethod == 'checkManageDocumentControlled') { - // check = true - // } - } - // if (!check) { - // this.componentData.do.splice(2, 1) - // } - if (!del) { - this.componentData.do.splice(1, 1) - } - if (!add) { - this.componentData.do.splice(0, 1) - } - this.addPower = add - this.outPower = out - }, getList() { this.tableLoading = true; let param = { ...this.queryParams, ...this.page }; @@ -394,33 +364,7 @@ exportManageDocumentIssueRecycle(this.queryParams).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); - this.$download.saveAs(blob, '鍙戞斁鍥炴敹璁板綍.xlsx') - //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆 - // let reader = new FileReader(); - // reader.readAsText(blob, 'utf-8'); - // reader.onload = () => { - // try { - // let result = JSON.parse(reader.result); - // if (result.message) { - // this.$message.error(result.message); - // } else { - // const url = URL.createObjectURL(blob); - // const link = document.createElement('a'); - // link.href = url; - // link.download = '鍙戞斁鍥炴敹璁板綍.xlsx'; - // link.click(); - // this.$message.success('瀵煎嚭鎴愬姛') - // } - // } catch (err) { - // console.log(err); - // const url = URL.createObjectURL(blob); - // const link = document.createElement('a'); - // link.href = url; - // link.download = '鍙戞斁鍥炴敹璁板綍.xlsx'; - // link.click(); - // this.$message.success('瀵煎嚭鎴愬姛') - // } - // } + this.$download.saveAs(blob, '鍙戞斁鍥炴敹璁板綍.xlsx'); }) }, changeFileList(e) { @@ -505,6 +449,7 @@ handleUpdate(row) { this.addInfo = this.HaveJson(row) this.radio = '鍥炴敹' + this.file = null this.addDialogVisible = true }, // 瀹℃牳 @@ -567,7 +512,6 @@ }) .then(() => { delManageDocumentIssueRecycle({ id: row.id }).then((res) => { - if (res.code == 201) return; this.$message.success("鍒犻櫎鎴愬姛"); this.refresh(); }); @@ -579,17 +523,10 @@ </script> <style scoped> -.title { - height: 60px; - line-height: 60px; -} - .search { - background-color: #fff; - height: 40px; + height: 46px; display: flex; - align-items: center; - position: relative; + justify-content: space-between; } .search_thing { @@ -606,17 +543,5 @@ .search_input { width: calc(100% - 110px); -} - -.table { - background-color: #fff; - height: calc(100% - 60px - 80px); - padding: 20px; -} - -.btns { - position: absolute; - right: 20px; - top: 5px; } </style> -- Gitblit v1.9.3