From d87eaec0b07649dc356db0619ee7b87dd8cf558a Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期二, 14 二月 2023 16:16:50 +0800
Subject: [PATCH] 2023/2/14 肖辉 修改部门管理
---
src/views/systemSetting/platform/cockpitManage/index.vue | 1211 +++++++++++++++++++++++++++++++-------------------------
1 files changed, 670 insertions(+), 541 deletions(-)
diff --git a/src/views/systemSetting/platform/cockpitManage/index.vue b/src/views/systemSetting/platform/cockpitManage/index.vue
index 7217eb3..d5965dc 100644
--- a/src/views/systemSetting/platform/cockpitManage/index.vue
+++ b/src/views/systemSetting/platform/cockpitManage/index.vue
@@ -1,580 +1,709 @@
<template>
- <div class="userList">
- <header>
- <div class="headerContent">
- <div class="search">
- <div class="search-item">
- <span>閮ㄩ棬鍚嶇О:</span>
- <div class="option">
- <el-input v-model="searchDepartment" placeholder="璇疯緭鍏ラ儴闂�"></el-input>
- </div>
- </div>
- <div class="search-item">
- <span>鐘舵��:</span>
- <div class="option">
- <el-input v-model="searchStatus" placeholder="閫夋嫨鐘舵��"></el-input>
- </div>
- </div>
- <div class="findBtn">
- <el-button type="primary" @click="getDepartmentList">鏌ヨ</el-button>
- </div>
- </div>
+ <div class="userList">
+ <header>
+ <div class="headerContent">
+ <div class="search">
+ <div class="search-item">
+ <span>閮ㄩ棬鍚嶇О:</span>
+ <div class="option">
+ <el-input
+ v-model="searchDepartment"
+ placeholder="璇疯緭鍏ラ儴闂�"
+ ></el-input>
</div>
- </header>
- <main>
- <div class="mainContent">
- <div class="type-nav">
- <el-upload
- action=""
- ref="uploadFile"
- :http-request="importTable"
- :show-file-list="false"
- :auto-upload="true"
- :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>
- </div>
- <!-- 鏁版嵁灞曠ず -->
- <el-table ref="multipleTable"
- :header-cell-style="{ background: '#06122c', 'font-size': '12px', color: '#4b9bb7', 'font-weight': '650', 'line-height': '45px' }"
- :data="tableData" style="width: 100%" :row-class-name="tableRowClassName"
- @selection-change="tableChange">
- <el-table-column prop="name" label="閮ㄩ棬鍚嶇О" min-width="8">
- </el-table-column>
- <el-table-column prop="peopleNumber" label="閮ㄩ棬浜烘暟" min-width="10">
- </el-table-column>
- <el-table-column prop="upUndergraduatePeopleNumber" label="鏈瀛﹀巻鍙婁互涓婁汉鏁�" min-width="15">
- </el-table-column>
- <el-table-column prop="holderNumber" label="鎸佽瘉浜哄憳鏁�" min-width="8">
- </el-table-column>
- <el-table-column prop="underFortyFivePeopleNumber" label="45鏁颁互涓嬩汉鏁�" min-width="8">
- </el-table-column>
- <el-table-column prop="legalProfessionalQualificationCertificatePeopleNumber" label="鎸佹硶寰嬭亴涓氳祫鏍艰瘉浜烘暟" min-width="15" v-if="mystatus === 1">
- </el-table-column>
- <el-table-column prop="reportNumber" label="閫氭姤鏁伴噺" min-width="8">
- </el-table-column>
- <el-table-column prop="disciplinaryOffenceNumber" label="杩濈邯琛屼负鏁伴噺" min-width="15" v-if="mystatus === 1">
- </el-table-column>
- <el-table-column prop="criminalOffenseNumber" label="杩濇硶鐘姜琛屼负鏁伴噺" min-width="8">
- </el-table-column>
- <el-table-column prop="monthCaseNumber" label="姣忔湀妗堜欢妗�" min-width="15" v-if="mystatus === 1">
- </el-table-column>
- <el-table-column prop="noTimeoutCaseNumber" label="鏈秴鏃舵浠堕噺" min-width="8">
- </el-table-column>
- <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">
- </el-table-column>
- <el-table-column prop="operation" label="鎿嶄綔" min-width="15">
- <template slot-scope="scope">
- <div class="operation">
- <span @click="showUpdateDialog(scope.row)">淇敼</span>
- <span class="line">|</span>
- <span @click="handleDelete(scope.row)">鍒犻櫎</span>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <!-- 璇︽儏椤靛睍绀� -->
- <el-dialog :visible.sync="dialogView" width="80%" title="鍩虹淇℃伅(浜哄伐)"
- :before-close="handleClose">
- <MyDetail :info=info v-if="mystatus === 1"></MyDetail>
- <MyIllDetail :info=info v-else></MyIllDetail>
- </el-dialog>
-
- <el-dialog :visible.sync="dialogUpdate" width="40%" title="淇敼閮ㄩ棬"
- :before-close="handleClose">
- <update-user @closeUpdateDialog="closeUpdateDialog()"
- :updateDepartmentData="updateDepartmentData"
- :isUpdate="dialogType === 'update'"
- />
- </el-dialog>
- <el-dialog :visible.sync="dialogcheck" width="40%" title="鏌ョ湅"
- :before-close="handleClose" >
- <detailUser />
- </el-dialog>
-
- <el-dialog :visible.sync="dialogAdd" width="40%" title="娣诲姞閮ㄩ棬"
- :before-close="handleClose">
- <update-user @closeUpdateDialog="closeUpdateDialog()"
- :updateDepartmentData="updateDepartmentData"
- :isUpdate="dialogType === 'add'"
- />
- </el-dialog>
-
- <div class="tools">
- <div class="funs">
- <div class="funsItem funs-sp">
- <el-checkbox v-model="all" @change="selectAll()">鍏ㄩ��</el-checkbox>
- </div>
- <div class="funsItem funs-sp">
- <el-checkbox v-model="unsame" @change="disSame(tableData)">鍙嶉��</el-checkbox>
- </div>
- <div class="funsItem">
- <el-select v-model="myIdx" placeholder="鎵归噺鎿嶄綔" @change="selectChange" disabled>
- <el-option v-for="item in options" :key="item.value" :label="item.label"
- :value="item.value" :disabled="item.disabled">
- </el-option>
- </el-select>
- </div>
- </div>
- <div class="pagination">
- <el-pagination background :current-page="currentPage" layout="prev, pager, next"
- :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage">
- </el-pagination>
- </div>
- </div>
+ </div>
+ <div class="search-item">
+ <span>鐘舵��:</span>
+ <div class="option">
+ <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>
- </main>
- </div>
+ </div>
+ <div class="findBtn">
+ <el-button type="primary" @click="getDepartmentList"
+ >鏌ヨ</el-button
+ >
+ </div>
+ </div>
+ <div class="type-nav">
+ <el-upload
+ action=""
+ ref="uploadFile"
+ :http-request="importTable"
+ :show-file-list="false"
+ :auto-upload="true"
+ :limit="1"
+ >
+ <el-button type="primary">瀵煎叆</el-button>
+ </el-upload>
+ <el-button
+ style="margin-left: 10px"
+ type="primary"
+ @click="exportTable"
+ >瀵煎嚭</el-button
+ >
+ <el-button
+ class="button-addition"
+ type="primary"
+ @click="showAddDialog"
+ >娣诲姞</el-button
+ >
+ </div>
+ </div>
+ </header>
+ <main>
+ <div class="mainContent">
+ <!-- 鏁版嵁灞曠ず -->
+ <el-table
+ border
+ stripe
+ ref="multipleTable"
+ :header-cell-style="{
+ background: '#F5F5F5',
+ 'font-size': '14px',
+ 'font-weight': '650',
+ 'line-height': '45px',
+ }"
+ :data="tableData"
+ style="width: 100%"
+ :row-class-name="tableRowClassName"
+ @selection-change="tableChange"
+ >
+ <el-table-column type="selection" min-width="5"> </el-table-column>
+ <el-table-column prop="name" label="閮ㄩ棬鍚嶇О" min-width="8">
+ </el-table-column>
+ <el-table-column prop="peopleNumber" label="閮ㄩ棬浜烘暟" min-width="10">
+ </el-table-column>
+ <el-table-column
+ prop="upUndergraduatePeopleNumber"
+ label="鏈瀛﹀巻鍙婁互涓婁汉鏁�"
+ min-width="15"
+ >
+ </el-table-column>
+ <el-table-column prop="holderNumber" label="鎸佽瘉浜哄憳鏁�" min-width="8">
+ </el-table-column>
+ <el-table-column
+ prop="underFortyFivePeopleNumber"
+ label="45鏁颁互涓嬩汉鏁�"
+ min-width="8"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="legalProfessionalQualificationCertificatePeopleNumber"
+ label="鎸佹硶寰嬭亴涓氳祫鏍艰瘉浜烘暟"
+ min-width="15"
+ v-if="mystatus === 1"
+ >
+ </el-table-column>
+ <el-table-column prop="reportNumber" label="閫氭姤鏁伴噺" min-width="8">
+ </el-table-column>
+ <el-table-column
+ prop="disciplinaryOffenceNumber"
+ label="杩濈邯琛屼负鏁伴噺"
+ min-width="15"
+ v-if="mystatus === 1"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="criminalOffenseNumber"
+ label="杩濇硶鐘姜琛屼负鏁伴噺"
+ min-width="8"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="monthCaseNumber"
+ label="姣忔湀妗堜欢妗�"
+ min-width="15"
+ v-if="mystatus === 1"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="noTimeoutCaseNumber"
+ label="鏈秴鏃舵浠堕噺"
+ min-width="8"
+ >
+ </el-table-column>
+ <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">
+ <div class="operation">
+ <span @click="showUpdateDialog(scope.row)">淇敼</span>
+ <span class="line">|</span>
+ <span @click="handleDelete(scope.row)">鍒犻櫎</span>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ <!-- 璇︽儏椤靛睍绀� -->
+ <el-dialog
+ :visible.sync="dialogView"
+ width="60%"
+ title="鍩虹淇℃伅(浜哄伐)"
+ :before-close="handleClose"
+ >
+ <MyDetail :info="info" v-if="mystatus === 1"></MyDetail>
+ <MyIllDetail :info="info" v-else></MyIllDetail>
+ </el-dialog>
+
+ <el-dialog
+ :visible.sync="dialogUpdate"
+ width="40%"
+ title="淇敼閮ㄩ棬"
+ :before-close="handleClose"
+ >
+ <update-user
+ @closeUpdateDialog="closeUpdateDialog()"
+ :updateDepartmentData="updateDepartmentData"
+ :isUpdate="dialogType === 'update'"
+ />
+ </el-dialog>
+ <el-dialog
+ :visible.sync="dialogcheck"
+ width="40%"
+ title="鏌ョ湅"
+ :before-close="handleClose"
+ >
+ <detailUser />
+ </el-dialog>
+
+ <el-dialog
+ :visible.sync="dialogAdd"
+ width="40%"
+ title="娣诲姞閮ㄩ棬"
+ :before-close="handleClose"
+ >
+ <update-user
+ @closeUpdateDialog="closeUpdateDialog()"
+ :updateDepartmentData="updateDepartmentData"
+ :isUpdate="dialogType === 'add'"
+ />
+ </el-dialog>
+
+ <div class="tools">
+ <div class="funs">
+ <div class="funsItem funs-sp">
+ <el-checkbox v-model="all" @change="selectAll()"
+ >鍏ㄩ��</el-checkbox
+ >
+ </div>
+ <div class="funsItem funs-sp">
+ <el-checkbox v-model="unsame" @change="disSame(tableData)"
+ >鍙嶉��</el-checkbox
+ >
+ </div>
+ <div class="funsItem">
+ <el-select
+ v-model="myIdx"
+ placeholder="鎵归噺鎿嶄綔"
+ @change="selectChange"
+ >
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ :disabled="item.disabled"
+ >
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ <div class="pagination">
+ <el-pagination
+ background
+ :current-page="currentPage"
+ layout="prev, pager, next"
+ :total="totalNum"
+ :page-size="pageSize"
+ @current-change="changeCurrentPage"
+ >
+ </el-pagination>
+ </div>
+ </div>
+ </div>
+ </main>
+ </div>
</template>
<script>
import updateUser from "./updateUser";
import detailUser from "./detailUser";
-import { deleteTeam, exportTeamInfo, importTeamInfo, searchTeamInfo } from "@/api/system/portal/teamConstruction";
-import {SUCCESS_CODE} from "@/utils";
-import {downloadFile} from "@/utils/helper";
+import {
+ deleteTeam,
+ exportTeamInfo,
+ importTeamInfo,
+ searchTeamInfo,
+} from "@/api/system/portal/teamConstruction";
+import { SUCCESS_CODE } from "@/utils";
+import { downloadFile } from "@/utils/helper";
export default {
- components: { updateUser, detailUser },
+ components: { updateUser, detailUser },
- data() {
- return {
- updateDepartmentData: null,
- searchDepartment: null,
- searchStatus: null,
- dialogUpdate: false,
- dialogcheck: false,
- tableData: [],
- context: "",
- dialogUpload: false,
- dialogView: false,
- updateFlag: false,
- userInfo: {},
- info: {},
- totalNum: 1,
- pageSize: 10,
- currentPage: 1,
- all: false,
- unsame: false,
- myIdx: 0,
- preMyIdx: 0,
- file: null,
- options: [
- {
- value: 0,
- label: '鎵归噺鎿嶄綔',
- disabled: true,
- },
- {
- value: 1,
- label: '鎵归噺鍚敤',
- },
- {
- value: 2,
- label: '鎵归噺绂佺敤',
- },
- {
- value: 3,
- label: '鎵归噺鍒犻櫎',
- }
- ],
- tempList: [],
- typeList: [
- {
- name: '鎽勫儚澶存帹閫�',
- value: 1,
- checked: true
- },
- {
- name: '鍗曞叺鎺ㄩ��',
- value: 2,
- checked: false,
- },
- ],
- statusArr: [],
- mystatus: 1,
- caseId: '',
- caseCode: null,
- dialogAdd: false,
- dialogType: 'update'
- }
+ data() {
+ return {
+ updateDepartmentData: null,
+ searchDepartment: null,
+ searchStatus: null,
+ dialogUpdate: false,
+ dialogcheck: false,
+ tableData: [],
+ context: "",
+ dialogUpload: false,
+ dialogView: false,
+ updateFlag: false,
+ userInfo: {},
+ info: {},
+ totalNum: 1,
+ pageSize: 10,
+ currentPage: 1,
+ all: false,
+ unsame: false,
+ myIdx: 0,
+ preMyIdx: 0,
+ file: null,
+ statusOptions: [
+ {
+ value: 2,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 1,
+ label: "鍚敤",
+ },
+ {
+ value: 0,
+ label: "绂佺敤",
+ },
+ ],
+ options: [
+ {
+ value: 0,
+ label: "鎵归噺鎿嶄綔",
+ disabled: true,
+ },
+ {
+ value: 1,
+ label: "鎵归噺鍒犻櫎",
+ },
+ ],
+ tempList: [],
+ typeList: [
+ {
+ name: "鎽勫儚澶存帹閫�",
+ value: 1,
+ checked: true,
+ },
+ {
+ name: "鍗曞叺鎺ㄩ��",
+ value: 2,
+ checked: false,
+ },
+ ],
+ statusArr: [],
+ mystatus: 1,
+ caseId: "",
+ caseCode: null,
+ dialogAdd: false,
+ dialogType: "update",
+ };
+ },
+
+ created() {
+ this.statusArr[0] = 6;
+ this.typeList.forEach((item) => {
+ if (item.checked) {
+ this.statusArr[1] = item.value;
+ }
+ });
+ this.getDepartmentList();
+ },
+
+ methods: {
+ //淇敼
+ showUpdateDialog(data) {
+ this.dialogUpdate = true;
+ this.updateDepartmentData = data;
},
- created() {
- this.statusArr[0] = 6;
- this.typeList.forEach(item => {
- if (item.checked) {
- this.statusArr[1] = item.value;
- }
+ // 娣诲姞鐣岄潰
+ showAddDialog() {
+ this.dialogAdd = true;
+ this.dialogType = "add";
+ },
+
+ // 瀵煎嚭
+ exportTable() {
+ const status = this.searchStatus === 2 ? null : this.searchStatus;
+ exportTeamInfo({
+ current: this.currentPage,
+ size: this.pageSize,
+ departName: this.searchDepartment,
+ status,
+ })
+ .then((res) => {
+ downloadFile(res);
+ this.$message({ type: "success", message: "鎿嶄綔鎴愬姛" });
+ })
+ .catch((err) => {
+ this.$message({ type: "error", message: err });
});
- this.getDepartmentList();
},
- methods: {
-
- //淇敼
- showUpdateDialog(data) {
- this.dialogUpdate = true;
- this.updateDepartmentData = data;
- },
-
- // 鏌ョ湅
- showViewDialog() {
- this.dialogcheck = true;
- },
-
- // 娣诲姞鐣岄潰
- showAddDialog() {
- this.dialogAdd = true;
- this.dialogType = 'add';
- },
-
- // 瀵煎嚭
- exportTable() {
- exportTeamInfo({ current: this.currentPage, size: this.pageSize, departName: this.searchDepartment, status: this.searchStatus })
- .then(res => {
- downloadFile(res);
- this.$message({ type: 'success', message: '鎿嶄綔鎴愬姛' });
- })
- .catch(err => {
- this.$message({ type: 'error', message: err });
- });
- },
-
- // 瀵煎叆
- importTable(file) {
- const formData = new FormData();
- formData.append('file', file.file);
- importTeamInfo(formData)
- .then(() => {
- this.$message({ type: 'success', message: '鎿嶄綔鎴愬姛' });
- this.getDepartmentList();
- this.$refs.uploadFile.clearFiles();
- })
- .catch(err => {
- this.$message({ type: 'error', message: err });
- this.$refs.uploadFile.clearFiles();
- });
- },
-
- closeUpdateDialog() {
- this.dialogAdd = false;
- this.dialogUpdate = false;
+ // 瀵煎叆
+ importTable(file) {
+ const formData = new FormData();
+ formData.append("file", file.file);
+ importTeamInfo(formData)
+ .then(() => {
+ this.$message({ type: "success", message: "鎿嶄綔鎴愬姛" });
this.getDepartmentList();
- },
+ this.$refs.uploadFile.clearFiles();
+ })
+ .catch((err) => {
+ this.$message({ type: "error", message: err });
+ this.$refs.uploadFile.clearFiles();
+ });
+ },
- // 椤堕儴涓嬫媺妗�
- setMyStatus(value) {
- this.statusArr[1] = value;
- this.changeTypeChecked(value - 1);
- this.getDepartmentList();
- },
+ closeUpdateDialog() {
+ this.dialogAdd = false;
+ this.dialogUpdate = false;
+ this.getDepartmentList();
+ },
- // 鎵归噺鍒犻櫎
- mulDelete(idArr) {
- this.$axios({
- method: 'delete',
- url: 'sccg/violations/batch_delete?ids=' + idArr,
- }).then(res => {
- this.getDepartmentList();
- this.$message({
- message: res.message,
- type: res.code === 200 ? 'success' : 'warning'
- })
- })
- },
+ // 椤堕儴涓嬫媺妗�
+ setMyStatus(value) {
+ this.statusArr[1] = value;
+ this.changeTypeChecked(value - 1);
+ this.getDepartmentList();
+ },
- // 鎵ц涓嬫媺妗嗘搷浣�
- selectChange(list) {
- if (this.tempList.length !== 0) {
- if (list === 3) {
- this.preMyIdx = list;
- this.mulDelete(this.tempList);
- }
- } else {
- this.myIdx = this.preMyIdx;
- this.$message({
- type: 'warning',
- message: '鎮ㄨ繕娌¢�変腑浠讳綍鏁版嵁',
- })
- }
- },
+ // 鎵归噺鍒犻櫎
+ mulDelete(idArr) {
+ this.$axios({
+ method: "delete",
+ url: "sccg/team_construction/batch_delete?ids=" + idArr,
+ }).then((res) => {
+ this.getDepartmentList();
+ this.$message({
+ message: res.message,
+ type: res.code === 200 ? "success" : "warning",
+ });
+ });
+ },
- // 鐩戝惉琛ㄦ牸
- tableChange(list) {
- this.tempList = [];
- list.forEach(item => {
- this.tempList.push(item.code);
- })
- this.all = list.length === this.tableData.length;
- },
-
- // 鍏ㄩ��
- selectAll() {
- this.$refs.multipleTable.toggleAllSelection();
- },
-
- // 鍙嶉��
- disSame(list) {
- list.forEach(row => {
- this.$refs.multipleTable.toggleRowSelection(row)
- })
- },
-
- // 鍒犻櫎鍗曟潯鏁版嵁
- handleDelete(row) {
- this.$confirm('纭鍒犻櫎锛�')
- .then(() => {
- deleteTeam({ id: row.id })
- .then(({ code, message }) => {
- if (code === SUCCESS_CODE) {
- this.$message({ type: 'success', message });
- this.getDepartmentList();
- } else {
- this.$message({ type: 'error', message });
- }
- })
- .catch(err => {
- this.$message({ type: 'error', message: err });
- })
- })
- },
-
- // 鑾峰彇鐢ㄦ埛鍒楄〃
- getDepartmentList() {
- const searchInfo = {
- current: this.currentPage, size: this.pageSize, departName: this.searchDepartment, status: this.searchStatus
- };
- searchTeamInfo(searchInfo)
- .then(({ records, total }) => {
- this.tableData = records;
- this.totalNum = total;
- })
- .catch(err => {
- this.$message({ type: 'error', message: err });
- });
- },
-
- // 鏇存敼杩濊/杩濆缓
- changeTypeChecked(idx) {
- this.typeList.forEach((item, index) => {
- item.checked = index === idx;
- })
- this.mystatus = idx + 1;
- this.statusArr[1] = this.typeList[idx].value;
- this.getDepartmentList();
- },
-
- // 璁剧疆琛ㄦ牸鏂戦┈绾�
- tableRowClassName({ row, rowIndex }) {
- if ((rowIndex + 1) % 2 === 0) {
- return 'warning-row';
- } else {
- return 'success-row';
- }
- },
-
- // 褰撳墠椤垫敼鍙樿Е鍙戜簨浠�
- changeCurrentPage(page) {
- this.currentPage = page;
- this.getDepartmentList();
- },
-
- handleClose(done) {
- this.$confirm('纭鍏抽棴锛�')
- .then(_ => {
- this.dialogUpload = false;
- done();
- })
- .catch(_ => { });
- },
-
- async JumpView(data) {
- await this.getEventInfo(data.code);
- },
-
- // 鑾峰彇妗堜欢淇℃伅
- async getEventInfo(code) {
- await this.$axios({
- method: 'get',
- url: `sccg/base_case/baseCaseDetail/${code}`
- })
- .then(res => {
- this.info = res.data;
- this.dialogView = true;
- })
- },
-
- openDialog(data) {
- this.dialogUpload = true;
- this.caseId = data.id;
- this.caseCode = data.code
- },
-
- // 鍏抽棴涓婁紶鐣岄潰
- closeDialog({ flag }) {
- this.dialogUpload = flag;
- this.getDepartmentList();
+ // 鎵ц涓嬫媺妗嗘搷浣�
+ selectChange(list) {
+ if (this.tempList.length !== 0) {
+ if (list === 1) {
+ this.preMyIdx = list;
+ this.mulDelete(this.tempList);
}
- }
-}
+ } else {
+ this.myIdx = this.preMyIdx;
+ this.$message({
+ type: "warning",
+ message: "鎮ㄨ繕娌¢�変腑浠讳綍鏁版嵁",
+ });
+ }
+ },
+
+ // 鐩戝惉琛ㄦ牸
+ tableChange(list) {
+ this.tempList = [];
+ list.forEach((item) => {
+ this.tempList.push(item.id);
+ });
+ this.all = list.length === this.tableData.length;
+ },
+
+ // 鍏ㄩ��
+ selectAll() {
+ this.$refs.multipleTable.toggleAllSelection();
+ },
+
+ // 鍙嶉��
+ disSame(list) {
+ list.forEach((row) => {
+ this.$refs.multipleTable.toggleRowSelection(row);
+ });
+ },
+
+ // 鍒犻櫎鍗曟潯鏁版嵁
+ handleDelete(row) {
+ this.$confirm("纭鍒犻櫎锛�").then(() => {
+ deleteTeam({ id: row.id })
+ .then(({ code, message }) => {
+ if (code === SUCCESS_CODE) {
+ this.$message({ type: "success", message });
+ this.getDepartmentList();
+ } else {
+ this.$message({ type: "error", message });
+ }
+ })
+ .catch((err) => {
+ this.$message({ type: "error", message: err });
+ });
+ });
+ },
+
+ // 鑾峰彇鐢ㄦ埛鍒楄〃
+ getDepartmentList() {
+ const status = this.searchStatus === 2 ? null : this.searchStatus;
+ const searchInfo = {
+ current: this.currentPage,
+ size: this.pageSize,
+ departName: this.searchDepartment,
+ status,
+ };
+ searchTeamInfo(searchInfo)
+ .then(({ records, total }) => {
+ this.tableData = records;
+ this.totalNum = total;
+ })
+ .catch((err) => {
+ this.$message({ type: "error", message: err });
+ });
+ },
+
+ // 鏇存敼杩濊/杩濆缓
+ changeTypeChecked(idx) {
+ this.typeList.forEach((item, index) => {
+ item.checked = index === idx;
+ });
+ this.mystatus = idx + 1;
+ this.statusArr[1] = this.typeList[idx].value;
+ this.getDepartmentList();
+ },
+
+ // 璁剧疆琛ㄦ牸鏂戦┈绾�
+ tableRowClassName({ row, rowIndex }) {
+ if ((rowIndex + 1) % 2 === 0) {
+ return "warning-row";
+ } else {
+ return "success-row";
+ }
+ },
+
+ // 褰撳墠椤垫敼鍙樿Е鍙戜簨浠�
+ changeCurrentPage(page) {
+ this.currentPage = page;
+ this.getDepartmentList();
+ },
+
+ handleClose(done) {
+ this.$confirm("纭鍏抽棴锛�")
+ .then((_) => {
+ this.dialogUpload = false;
+ done();
+ })
+ .catch((_) => {});
+ },
+
+ async JumpView(data) {
+ await this.getEventInfo(data.code);
+ },
+
+ // 鑾峰彇妗堜欢淇℃伅
+ async getEventInfo(code) {
+ await this.$axios({
+ method: "get",
+ url: `sccg/base_case/baseCaseDetail/${code}`,
+ }).then((res) => {
+ this.info = res.data;
+ this.dialogView = true;
+ });
+ },
+
+ openDialog(data) {
+ this.dialogUpload = true;
+ this.caseId = data.id;
+ this.caseCode = data.code;
+ },
+
+ // 鍏抽棴涓婁紶鐣岄潰
+ closeDialog({ flag }) {
+ this.dialogUpload = flag;
+ this.getDepartmentList();
+ },
+ },
+};
</script>
<style lang="scss" scoped>
.userList {
- text-align: left;
- margin: 10px 20px;
- color: #4b9bb7;
+ text-align: left;
+ padding: 10px 20px;
+ // color: #4b9bb7;
+ border: 1px solid #ccc;
+ header {
+ // background-color: #09152f;
- header {
- background-color: #09152f;
+ .headerContent {
+ width: 100%;
+ line-height: 60px;
- .headerContent {
- width: 100%;
- line-height: 60px;
+ display: flex;
+ .search {
+ display: flex;
+ justify-content: flex-start;
- .search {
- display: flex;
- justify-content: flex-start;
-
- .search-item {
- display: flex;
- margin-right: 10vw;
- }
-
- .el-input {
- flex: 2;
- color: #1d3f57;
-
- &::v-deep .el-input__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
- }
- }
-
- }
-
- .findBtn {
- line-height: 100px;
- margin-left: 15px;
- display: flex;
- align-items: center;
- margin-top: -2px;
-
- .el-button {
- padding: 12px 25px;
- border-radius: 20px;
- }
- }
+ .search-item {
+ display: flex;
+ margin-right: 1vw;
}
+
+ .el-input {
+ flex: 2;
+ // color: #1d3f57;
+
+ // &::v-deep .el-input__inner {
+ // background-color: #09152f;
+ // border: 1px solid #17324c;
+ // }
+ }
+ }
+
+ .findBtn {
+ line-height: 100px;
+ margin-left: 15px;
+ display: flex;
+ align-items: center;
+ margin-top: -2px;
+
+ .el-button {
+ padding: 12px 25px;
+ //border-radius: 20px;
+ }
+ }
+ }
+ }
+
+ // &::v-deep .el-input__inner {
+ // background-color: #09152f;
+ // border: 1px solid #17324c;
+ // }
+
+ .type-nav {
+ display: flex;
+ line-height: 40px;
+ align-items: center;
+ // margin-bottom: 10px;
+ margin-left: auto;
+ }
+
+ main {
+ // background-color: #09152f;
+ margin-top: 20px;
+ padding-bottom: 50px;
+
+ .btn span:hover {
+ cursor: pointer;
}
- &::v-deep .el-input__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
+ .tools {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 20px;
+
+ .funs-sp {
+ // border: 1px solid #17324c;
+ }
+
+ .funs {
+ display: flex;
+
+ .funsItem {
+ line-height: 28px;
+ display: flex;
+ align-items: center;
+ border-radius: 4px;
+ font-size: 12px;
+ margin-left: 10px;
+
+ .el-checkbox {
+ width: 80px;
+ padding: 0 10px;
+ }
+
+ .el-select {
+ width: 120px;
+ }
+
+ // &:hover {
+ // border: 1px solid #4b9bb7;
+ // }
+
+ // &:hover .el-checkbox {
+ // color: #4b9bb7;
+ // }
+ }
+ }
+
+ .pagination {
+ margin-top: 50px;
+ display: flex;
+ line-height: 50px;
+ justify-content: center;
+
+ .el-pagination {
+ // &::v-deep li,
+ // &::v-deep .btn-prev,
+ // &::v-deep .btn-next {
+ // background-color: #071f39;
+ // color: #4b9bb7;
+ // }
+
+ // &::v-deep .active {
+ // background-color: #409eff;
+ // color: #fff;
+ // }
+ }
+ }
}
- main {
- background-color: #09152f;
- margin-top: 20px;
- padding-bottom: 50px;
+ .el-table {
+ // color: #4b9bb7;
+ // font-size: 10px;
- .btn span:hover {
- cursor: pointer;
+ .operation {
+ display: flex;
+ color: var(--operation-color);
+ .line {
+ padding: 0 5px;
}
- .type-nav {
- display: flex;
- line-height: 40px;
- align-items: center;
+ span:hover {
+ cursor: pointer;
}
-
- .tools {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 20px;
-
- .funs-sp {
- border: 1px solid #17324c;
- }
-
- .funs {
- display: flex;
-
- .funsItem {
- line-height: 28px;
- display: flex;
- align-items: center;
- border-radius: 4px;
- font-size: 12px;
- margin-left: 10px;
-
- .el-checkbox {
- width: 80px;
- padding: 0 10px;
- }
-
- .el-select {
- width: 120px;
- }
-
- &:hover {
- border: 1px solid #4b9bb7;
- }
-
- &:hover .el-checkbox {
- color: #4b9bb7;
- }
- }
-
- }
-
- .pagination {
- margin-top: 50px;
- display: flex;
- line-height: 50px;
- justify-content: center;
-
- .el-pagination {
-
- &::v-deep li,
- &::v-deep .btn-prev,
- &::v-deep .btn-next {
- background-color: #071f39;
- color: #4b9bb7;
- }
-
- &::v-deep .active {
- background-color: #409eff;
- color: #fff;
- }
- }
- }
- }
-
- .el-table {
- color: #4b9bb7;
- font-size: 10px;
-
- .operation {
- display: flex;
-
- .line {
- padding: 0 5px;
- }
-
- span:hover {
- cursor: pointer;
- }
- }
- }
+ }
}
+ }
- .line {
- padding: 0 5px;
- }
+ .line {
+ padding: 0 5px;
+ }
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0