| | |
| | | <template> |
| | | <div> |
| | | <div class="capacity-scope"> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span v-if="tabIndex === '0'" class="search-group"> |
| | | <span style="width: 150px">单位名称:</span> |
| | | <el-input v-model="searchForm.unitName" clearable size="small"></el-input> |
| | | </span> |
| | | <span v-if="tabIndex === '1'" class="search-group"> |
| | | <span style="width: 150px">文件名称:</span> |
| | | <el-input v-model="searchForm1.fileName" clearable size="small"></el-input> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="small" @click="resetSearchForm">重 置</el-button> |
| | | <el-button size="small" type="primary" @click="searchList">查 询</el-button> |
| | | </span> |
| | | <div class="btn"> |
| | | <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-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="mini" @click="searchList">查询</el-button> |
| | | <el-button size="mini" @click="resetSearchForm">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-button v-if="tabIndex === '0'" size="small" type="primary" @click="openFormDia('add')">新 增</el-button> |
| | | <el-upload v-if="tabIndex === '1'" ref='upload' :action="action" :before-upload="beforeUpload" |
| | | :headers="headers" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" |
| | | accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'> |
| | | :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> |
| | | </div> |
| | |
| | | </el-radio-group> |
| | | </div> |
| | | <div v-if="tabIndex === '0'"> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 22em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 22em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" @pagination="pagination" |
| | | :page="page"> |
| | | </limsTable> |
| | | </div> |
| | | <div v-if="tabIndex === '1'"> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <limsTable :column="tableColumn1" :height="'calc(100vh - 22em)'" :table-data="tableData1" |
| | | :table-loading="tableLoading1" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination0"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | <limsTable :column="tableColumn1" :height="'calc(100vh - 22em)'" :table-data="tableData1" |
| | | :table-loading="tableLoading1" @pagination="pagination0"> |
| | | </limsTable> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import FormDialog from './components/formDialog.vue'; |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | |
| | | delClientSatisfaction, |
| | | delAnalyseFile, |
| | | } from '@/api/cnas/systemManagement/customerSatisfaction.js' |
| | | import { getToken } from "@/utils/auth"; |
| | | |
| | | export default { |
| | | name: 'a8-customer-satisfaction', |
| | | name: 'CustomerSatisfaction', |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: { filePreview, FormDialog, limsTable, TableCard }, |
| | | components: { filePreview, FormDialog, limsTable }, |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | total: 0, |
| | | tableColumn1: [ |
| | | { |
| | | label: '附件名称', |
| | |
| | | page1: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | total1: 0, |
| | | formDialog: false, |
| | | upLoading: false, |
| | | currentInfo: {}, |
| | |
| | | this.tableLoading = true |
| | | pageClientSatisfaction({ ...entity, ...page }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.total = res.data.total |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | |
| | | this.tableLoading1 = true |
| | | pageAnalyseFile({ ...entity, ...page }).then(res => { |
| | | this.tableLoading1 = false |
| | | if (res.code === 201) return |
| | | this.tableData1 = res.data.records |
| | | this.total1 = res.data.total |
| | | this.page1.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading1 = false |
| | |
| | | this.tableLoading = true |
| | | delClientSatisfaction({ clientSatisfactionId: row.clientSatisfactionId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('删除成功') |
| | | this.searchList() |
| | | }).catch(err => { |
| | |
| | | }, |
| | | // 下载客户福建 |
| | | upload(row) { |
| | | let url = ''; |
| | | if (row.type == 1) { |
| | | url = this.javaApi + '/img/' + row.fileUrl |
| | | file.downloadIamge(url, row.fileName) |
| | | } else { |
| | | url = this.javaApi + '/word/' + row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | this.$download.saveAs(row.fileUrl, row.fileName); |
| | | }, |
| | | // 删除客户分析附件 |
| | | delFile(row) { |
| | |
| | | this.tableLoading = true |
| | | delAnalyseFile({ analyseFileId: row.analyseFileId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('删除成功') |
| | | this.searchList() |
| | | }).catch(err => { |
| | |
| | | }, |
| | | // 用于上传文件的信息 |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'Authorization': "Bearer " + getToken() |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi + '/clientSatisfaction/uploadAnalyseFile' |
| | | } |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .view-title { |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 60px; |
| | | padding-left: 20px; |
| | | } |
| | | |
| | | .search-background { |
| | | width: 100%; |
| | | height: 80px; |
| | | line-height: 80px; |
| | | background-color: #ffffff; |
| | | display: flex; |
| | | position: relative; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | |
| | | .table { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .table-tab { |
| | | margin: 0 20px 20px 20px; |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | top: 16px; |
| | | right: 20px; |
| | | margin: 0 0 20px 0; |
| | | } |
| | | </style> |