From f949002ed6025d048b6d8676c4a55641dc28cb6b Mon Sep 17 00:00:00 2001 From: mengfanliang Date: Mon, 19 Aug 2024 10:08:45 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archive/components/list.vue | 27 +++++++----- .../inspected/components/list.vue | 41 ++++++++++-------- .../inspector/components/list.vue | 40 +++++++++-------- .../plead/components/list.vue | 43 ++++++++++--------- 4 files changed, 84 insertions(+), 67 deletions(-) diff --git a/src/views/safetyenvironmental/archive/components/list.vue b/src/views/safetyenvironmental/archive/components/list.vue index b0d0dc1..35069a4 100644 --- a/src/views/safetyenvironmental/archive/components/list.vue +++ b/src/views/safetyenvironmental/archive/components/list.vue @@ -70,6 +70,7 @@ + +
-
@@ -186,24 +187,27 @@ export default { this.getList(this.ROLE_ID) }, methods: { + /** 获取行数据 Key,用于优化 table 表格的渲染 */ getRowKey(row) { return row.INSPECTION_ID }, + /** 转换检验的状态 */ translateInspection(id) { for (var i = 0; i < this.inspectionStatusList.length; i++) { if (this.inspectionStatusList[i].ID == id) return this.inspectionStatusList[i].NAME } }, - // 搜索 + /** 执行参数搜索 */ getQuery() { this.$refs.multipleTable.clearSelection() this.getList() }, + /** 执行重置 */ goKeyReset() { this.resetSearch() this.getQuery() }, - // 获取列表 + /** 获取列表 */ getList() { this.listLoading = true // requestFN( @@ -230,22 +234,24 @@ export default { this.total = archiveList.length }, 400) }, - // 查看 + /** 查看指定项 */ goDetail(row) { this.$parent.activeName = 'Info' this.$parent.INSPECTION_ID = row.INSPECTION_ID }, + /** 处理指派逻辑 */ goAssign(row) { this.$parent.activeName = 'HiddenList' // 是否可以指派 this.$parent.assign = row.INSPECTED_SITEUSER_ID.includes(this.USER_ID) ? '0' : '1' this.$parent.INSPECTION_ID = row.INSPECTION_ID }, + /** 处理验收 */ goAccept(row) { this.$parent.activeName = 'HiddenList' this.$parent.INSPECTION_ID = row.INSPECTION_ID }, - + /** 处理删除 */ handleDelete(id) { this.$confirm('确定要删除吗?', { confirmButtonText: '确定', @@ -273,7 +279,7 @@ export default { }).catch(() => { }) }, - + /** 处理批量删除 */ batchDel() { const _selectData = this.$refs.multipleTable.selection if (_selectData == null || _selectData.length == 0) { @@ -314,8 +320,8 @@ export default { }).catch(() => { }) }, - // 判断按钮权限,用于是否显示按钮 - hasButton: function() { + /** 判断按钮权限,用于是否显示按钮 */ + hasButton() { var keys = 'safetyenvironmental:add,safetyenvironmental:del,safetyenvironmental:edit,toExcel' requestFN( '/head/hasButton', @@ -330,8 +336,8 @@ export default { this.listLoading = false }) }, - // 获取数据字典数据 - getDict: function() { + /** 获取数据字典数据 */ + getDict() { requestFN( '/dictionaries/listSelectTree', { @@ -343,6 +349,7 @@ export default { }) }, + /** 重置搜索状态 */ resetSearch() { this.search = { INSPECTED_DEPARTMENT_NAME: '', // 被检查单位 diff --git a/src/views/safetyenvironmental/inspected/components/list.vue b/src/views/safetyenvironmental/inspected/components/list.vue index 45c051c..88c24e7 100644 --- a/src/views/safetyenvironmental/inspected/components/list.vue +++ b/src/views/safetyenvironmental/inspected/components/list.vue @@ -75,6 +75,7 @@ + +
@@ -179,7 +181,6 @@ -
-