| | |
| | | <div class="search-item"> |
| | | <span>状态:</span> |
| | | <div class="option"> |
| | | <el-input v-model="searchStatus" placeholder="选择状态"></el-input> |
| | | <el-select v-model="searchStatus" placeholder="选择状态"> |
| | | <el-option v-for="{ label, value } in statusOptions" :key="value" :label="label" :value="value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="findBtn"> |
| | |
| | | :http-request="importTable" |
| | | :show-file-list="false" |
| | | :auto-upload="true" |
| | | multiple |
| | | :limit="1"> |
| | | <el-button type="primary">导入</el-button> |
| | | </el-upload> |
| | | <el-button style="margin-left: 10px" type="primary" @click="exportTable">导出</el-button> |
| | | <el-button type="primary" @click="showAddDialog">添加</el-button> |
| | | <el-button class="button-addition" type="primary" @click="showAddDialog">添加</el-button> |
| | | </div> |
| | | <!-- 数据展示 --> |
| | | <el-table ref="multipleTable" |
| | |
| | | <el-table-column prop="reviewOrLawsuitNumber" label="复议或诉讼数" min-width="15" v-if="mystatus === 1"> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="状态" min-width="15" v-if="mystatus === 1"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.row. status=== 1? '启动' : '禁用'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="operation" label="操作" min-width="15"> |
| | | <template slot-scope="scope"> |
| | |
| | | import updateUser from "./updateUser"; |
| | | import detailUser from "./detailUser"; |
| | | import { deleteTeam, exportTeamInfo, importTeamInfo, searchTeamInfo } from "@/api/system/portal/teamConstruction"; |
| | | import {SUCCESS_CODE} from "@/utils"; |
| | | import { SUCCESS_CODE } from "@/utils"; |
| | | import {downloadFile} from "@/utils/helper"; |
| | | |
| | | export default { |
| | | components: { updateUser, detailUser }, |
| | |
| | | data() { |
| | | return { |
| | | updateDepartmentData: null, |
| | | searchDepartment: '', |
| | | searchStatus: '', |
| | | searchDepartment: null, |
| | | searchStatus: null, |
| | | dialogUpdate: false, |
| | | dialogcheck: false, |
| | | tableData: [], |
| | |
| | | unsame: false, |
| | | myIdx: 0, |
| | | preMyIdx: 0, |
| | | file: null, |
| | | statusOptions: [ |
| | | { |
| | | value: 2, |
| | | label: '全部' |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: '启用' |
| | | }, |
| | | { |
| | | value: 0, |
| | | label: '禁用' |
| | | } |
| | | ], |
| | | options: [ |
| | | { |
| | | value: 0, |
| | |
| | | this.updateDepartmentData = data; |
| | | }, |
| | | |
| | | // 查看 |
| | | showViewDialog() { |
| | | this.dialogcheck = true; |
| | | }, |
| | | |
| | | // 添加界面 |
| | | showAddDialog() { |
| | | this.dialogAdd = true; |
| | |
| | | |
| | | // 导出 |
| | | exportTable() { |
| | | exportTeamInfo({ current: this.currentPage, size: this.pageSize, departName: this.searchDepartment, status: this.searchStatus }) |
| | | const status = this.searchStatus === 2 ? null : this.searchStatus; |
| | | exportTeamInfo({ current: this.currentPage, size: this.pageSize, departName: this.searchDepartment, status }) |
| | | .then(res => { |
| | | const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }); |
| | | const fileName = res.contentDisposition.split('=')[1]; |
| | | if (window.navigator && window.navigator.msSaveBlob) { |
| | | navigator.msSaveBlob(blob, fileName); |
| | | } else { |
| | | const link = document.createElement('a'); |
| | | link.style.display = 'none'; |
| | | link.href = URL.createObjectURL(blob); |
| | | link.setAttribute('download', decodeURI(fileName)); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | URL.revokeObjectURL(link.href); |
| | | document.body.removeChild(link); |
| | | } |
| | | downloadFile(res); |
| | | this.$message({ type: 'success', message: '操作成功' }); |
| | | }) |
| | | .catch(err => { |
| | | this.$message({ type: 'error', message: err }); |
| | |
| | | |
| | | // 导入 |
| | | importTable(file) { |
| | | importTeamInfo({ 'multipartFile': file.file }) |
| | | const formData = new FormData(); |
| | | formData.append('file', file.file); |
| | | importTeamInfo(formData) |
| | | .then(() => { |
| | | this.$message({ type: 'success', message: '操作成功' }); |
| | | this.getDepartmentList(); |
| | |
| | | }) |
| | | .catch(err => { |
| | | this.$message({ type: 'error', message: err }); |
| | | this.$refs.uploadFile.clearFiles(); |
| | | }); |
| | | }, |
| | | |
| | |
| | | |
| | | // 获取用户列表 |
| | | getDepartmentList() { |
| | | const status = this.searchStatus === 2 ? null : this.searchStatus; |
| | | const searchInfo = { |
| | | current: this.currentPage, size: this.pageSize, departName: this.searchDepartment, status: this.searchStatus |
| | | current: this.currentPage, size: this.pageSize, departName: this.searchDepartment, status |
| | | }; |
| | | searchTeamInfo(searchInfo) |
| | | .then(({ records, total }) => { |