From 40c1138a3fc7ea11536a661f543a55c30be24382 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 02 十一月 2026 16:51:25 +0800
Subject: [PATCH] feat(costStatistics): - 新增全局汇总信息,展示筛选结果条数与全部费用合计 - 保存费用后自动刷新数据并同步已勾选行状态
---
src/views/CNAS/systemManagement/customerSatisfaction/index.vue | 206 ++++-----------------------------------------------
1 files changed, 17 insertions(+), 189 deletions(-)
diff --git a/src/views/CNAS/systemManagement/customerSatisfaction/index.vue b/src/views/CNAS/systemManagement/customerSatisfaction/index.vue
index 200c674..89413b8 100644
--- a/src/views/CNAS/systemManagement/customerSatisfaction/index.vue
+++ b/src/views/CNAS/systemManagement/customerSatisfaction/index.vue
@@ -4,11 +4,8 @@
<div class="search">
<div>
<el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
- <el-form-item label="瀹㈡埛鍚嶇О" prop="unitName" v-if="tabIndex === '0'">
+ <el-form-item label="瀹㈡埛鍚嶇О" prop="unitName">
<el-input v-model="searchForm.unitName" clearable size="small"></el-input>
- </el-form-item>
- <el-form-item label="鏂囦欢鍚嶇О" prop="fileName" v-if="tabIndex === '1'">
- <el-input v-model="searchForm1.fileName" clearable size="small"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="searchList">鏌ヨ</el-button>
@@ -17,39 +14,17 @@
</el-form>
</div>
<div>
- <el-button v-if="tabIndex === '0'" size="small" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
- <el-button v-if="tabIndex === '0'" size="small" type="primary" @click="openExportDialog">瀵� 鍑�</el-button>
- <el-upload v-if="tabIndex === '1'" ref='upload' :action="action" :before-upload="beforeUpload"
- :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
- accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'>
- <el-button :loading="upLoading" size="small" type="primary">瀵煎叆</el-button>
- </el-upload>
+ <el-button size="small" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
+ <el-button size="small" type="primary" @click="openExportDialog">瀵� 鍑�</el-button>
</div>
</div>
<div class="table">
- <div class="table-tab">
- <el-radio-group v-model="tabIndex" @change="searchList" size="small">
- <el-radio-button value="0">瀹㈡埛婊℃剰搴�</el-radio-button>
- <el-radio-button value="1">缁煎悎鍒嗘瀽</el-radio-button>
- </el-radio-group>
- </div>
- <div v-if="tabIndex === '0'">
- <limsTable :column="tableColumn" :height="'calc(100vh - 22em)'" :table-data="tableData"
- :table-loading="tableLoading" @pagination="pagination"
- :page="page">
- </limsTable>
- </div>
- <div v-if="tabIndex === '1'">
- <limsTable :column="tableColumn1" :height="'calc(100vh - 22em)'" :table-data="tableData1"
- :table-loading="tableLoading1" @pagination="pagination0">
- </limsTable>
- </div>
+ <limsTable :column="tableColumn" :height="'calc(100vh - 22em)'" :table-data="tableData"
+ :table-loading="tableLoading" @pagination="pagination"
+ :page="page">
+ </limsTable>
</div>
</div>
- <el-dialog v-model="lookDialogVisible" fullscreen title="鏌ョ湅闄勪欢" top="5vh" width="800px">
- <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="javaApi + '/word/' + currentInfo.fileUrl"
- style="height: 90vh;overflow-y: auto;" />
- </el-dialog>
<el-dialog v-model="exportDialogVisible" title="瀵煎嚭骞村害姹囨��" width="360px" :close-on-click-modal="false">
<el-form label-width="80px">
<el-form-item label="姹囨�诲勾搴�">
@@ -72,30 +47,23 @@
<script>
import limsTable from "@/components/Table/lims-table.vue";
import FormDialog from './components/formDialog.vue';
-import filePreview from '@/components/Preview/filePreview.vue'
import limsAttachment from '@/components/Attachment/lims-attachment.vue'
import {
pageClientSatisfaction,
- pageAnalyseFile,
delClientSatisfaction,
- delAnalyseFile,
exportAnnualSummary,
} from '@/api/cnas/systemManagement/customerSatisfaction.js'
export default {
name: 'CustomerSatisfaction',
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
- components: { filePreview, FormDialog, limsTable, limsAttachment },
+ components: { FormDialog, limsTable, limsAttachment },
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
searchForm: {
unitName: '',
},
- searchForm1: {
- fileName: '',
- },
- tabIndex: '0',
tableColumn: [
{
label: '瀹㈡埛鍚嶇О',
@@ -192,62 +160,7 @@
current: 1,
total: 0,
},
- tableColumn1: [
- {
- label: '闄勪欢鍚嶇О',
- prop: 'fileName',
- minWidth: '100'
- },
- {
- label: '鍒涘缓浜�',
- prop: 'userName',
- minWidth: '100'
- },
- {
- label: '鍒涘缓鏃堕棿',
- prop: 'createTime',
- minWidth: '100'
- },
- {
- dataType: 'action',
- label: '鎿嶄綔',
- operation: [
- {
- name: '棰勮',
- type: 'text',
- clickFun: (row) => {
- this.handleLook(row)
- }
- },
- {
- name: '涓嬭浇',
- type: 'text',
- clickFun: (row) => {
- this.upload(row);
- },
- },
- {
- name: '鍒犻櫎',
- type: 'text',
- color: 'var(--el-color-danger)',
- clickFun: (row) => {
- this.delFile(row)
- }
- }
- ]
- }
- ],
- tableData1: [],
- tableLoading1: false,
- page1: {
- size: 20,
- current: 1,
- total: 0,
- },
formDialog: false,
- upLoading: false,
- currentInfo: {},
- lookDialogVisible: false,
exportDialogVisible: false,
exportYear: String(new Date().getFullYear()),
exportLoading: false,
@@ -260,29 +173,15 @@
methods: {
// 鏌ヨ鍒楄〃
searchList() {
- const entity = this.tabIndex === '0' ? this.searchForm : this.searchForm1
- const page = this.tabIndex === '0' ? this.page : this.page1
- if (this.tabIndex === '0') {
- this.tableLoading = true
- pageClientSatisfaction({ ...entity, ...page }).then(res => {
- this.tableLoading = false
- this.tableData = res.data.records
- this.page.total = res.data.total
- }).catch(err => {
- console.log('err---', err);
- this.tableLoading = false
- })
- } else {
- this.tableLoading1 = true
- pageAnalyseFile({ ...entity, ...page }).then(res => {
- this.tableLoading1 = false
- this.tableData1 = res.data.records
- this.page1.total = res.data.total
- }).catch(err => {
- console.log('err---', err);
- this.tableLoading1 = false
- })
- }
+ this.tableLoading = true
+ pageClientSatisfaction({ ...this.searchForm, ...this.page }).then(res => {
+ this.tableLoading = false
+ this.tableData = res.data.records
+ this.page.total = res.data.total
+ }).catch(err => {
+ console.log('err---', err);
+ this.tableLoading = false
+ })
},
openFormDia(type, row) {
this.formDialog = true
@@ -333,30 +232,7 @@
// 閲嶇疆鏌ヨ鏉′欢
resetSearchForm() {
this.searchForm.unitName = '';
- this.searchForm1.fileName = '';
this.searchList()
- },
- // 瀵煎叆娴佺▼
- beforeUpload(file) {
- if (file.size > 1024 * 1024 * 10) {
- this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
- this.$refs.upload.clearFiles()
- return false;
- } else {
- this.upLoading = true;
- return true;
- }
- },
- onError(err, file, fileList) {
- this.$message.error('涓婁紶澶辫触')
- this.$refs.upload.clearFiles()
- },
- handleSuccessUp(response) {
- this.upLoading = false;
- if (response.code == 200) {
- this.$message.success('涓婁紶鎴愬姛');
- this.searchList()
- }
},
// 鍒犻櫎瀹㈡埛婊℃剰搴�
delPlan(row) {
@@ -381,56 +257,12 @@
});
});
},
- // 鏌ョ湅鏂囦欢
- handleLook(row) {
- this.currentInfo = row
- this.lookDialogVisible = true
- },
- // 涓嬭浇瀹㈡埛绂忓缓
- upload(row) {
- this.$download.saveAs(row.fileUrl, row.fileName);
- },
- // 鍒犻櫎瀹㈡埛鍒嗘瀽闄勪欢
- delFile(row) {
- this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- this.tableLoading = true
- delAnalyseFile({ analyseFileId: row.analyseFileId }).then(res => {
- this.tableLoading = false
- this.$message.success('鍒犻櫎鎴愬姛')
- this.searchList()
- }).catch(err => {
- this.tableLoading = false
- console.log('err---', err);
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '宸插彇娑堝垹闄�'
- });
- });
- },
// 鍒嗛〉
pagination({ page, limit }) {
this.page.current = page;
this.page.size = limit;
this.searchList();
},
- // 鍒嗛〉
- pagination0({ page, limit }) {
- this.page.current = page;
- this.page.size = limit;
- this.searchList();
- },
- },
- // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
- computed: {
- action() {
- return this.javaApi + '/clientSatisfaction/uploadAnalyseFile'
- }
},
};
</script>
@@ -440,9 +272,5 @@
height: 46px;
display: flex;
justify-content: space-between;
-}
-
-.table-tab {
- margin: 0 0 20px 0;
}
</style>
--
Gitblit v1.9.3