luobisheng
2022-11-09 f7bdedf1f3f7600c73f6d5beb46c1d1f4d518822
src/views/systemSetting/platform/cockpitManage/index.vue
@@ -16,7 +16,7 @@
                        </div>
                    </div>
                    <div class="findBtn">
                        <el-button type="primary" @click="getUserList">查询</el-button>
                        <el-button type="primary" @click="getDepartmentList">查询</el-button>
                    </div>
                </div>
            </div>
@@ -79,25 +79,30 @@
                    </el-table-column>
                </el-table>
                <!-- 详情页展示 -->
                <el-dialog :visible.sync="dialogView" width="80%" title="基础信息(人工)" v-if="dialogView"
                <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="修改部门" v-if="dialogUpdate"
                <el-dialog :visible.sync="dialogUpdate" width="40%" title="修改部门"
                    :before-close="handleClose">
                    <updateUser @closeUpdateDialog="closeUpdateDialog()" :updateDepartmentData="updateDepartmentData" />
                    <update-user @closeUpdateDialog="closeUpdateDialog()"
                                :updateDepartmentData="updateDepartmentData"
                                :isUpdate="dialogType === 'update'"
                    />
                </el-dialog>
                <el-dialog :visible.sync="dialogcheck" width="40%" title="查看" v-if="dialogcheck"
                <el-dialog :visible.sync="dialogcheck" width="40%" title="查看"
                    :before-close="handleClose" >
                    <detailUser />
                </el-dialog>
                <el-dialog :visible.sync="dialogAdd" width="40%" title="添加部门" v-if="dialogAdd"
                <el-dialog :visible.sync="dialogAdd" width="40%" title="添加部门"
                    :before-close="handleClose">
                    <createUser @closeUpdateDialog="closeUpdateDialog()" />
                    <update-user @closeUpdateDialog="closeUpdateDialog()"
                                 :updateDepartmentData="updateDepartmentData"
                                 :isUpdate="dialogType === 'add'"
                    />
                </el-dialog>
                <div class="tools">
@@ -118,8 +123,7 @@
                    </div>
                    <div class="pagination">
                        <el-pagination background :current-page="currentPage" layout="prev, pager, next"
                            :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage"
                            @prev-click="handlePrev" @next-click="handleNext">
                            :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage">
                        </el-pagination>
                    </div>
                </div>
@@ -128,16 +132,13 @@
    </div>
</template>
<script>
import createUser from "./createUser";
import updateUser from "./updateUser";
import detailUser from "./detailUser";
import { deleteTeam, exportTeamInfo, importTeamInfo, searchTeamInfo } from "@/api/system/portal/teamConstruction";
import {SUCCESS_CODE} from "@/utils";
export default {
    components: {
        updateUser, createUser, detailUser
    },
    components: { updateUser, detailUser },
    data() {
        return {
@@ -153,7 +154,7 @@
            updateFlag: false,
            userInfo: {},
            info: {},
            totalNum: 5,
            totalNum: 1,
            pageSize: 10,
            currentPage: 1,
            all: false,
@@ -197,6 +198,7 @@
            caseId: '',
            caseCode: null,
            dialogAdd: false,
            dialogType: 'update'
        }
    },
@@ -206,8 +208,8 @@
            if (item.checked) {
                this.statusArr[1] = item.value;
            }
        })
        this.getUserList();
        });
        this.getDepartmentList();
    },
    methods: {
@@ -226,6 +228,7 @@
        // 添加界面
        showAddDialog() {
          this.dialogAdd = true;
          this.dialogType = 'add';
        },
        // 导出
@@ -255,14 +258,10 @@
        // 导入
        importTable(file) {
          importTeamInfo({ 'multipartFile': file.file })
              .then(({ code, message }) => {
                if (code === SUCCESS_CODE) {
                  this.$message({ type: 'success', message });
                  this.getUserList();
              .then(() => {
                  this.$message({ type: 'success', message: '操作成功' });
                  this.getDepartmentList();
                  this.$refs.uploadFile.clearFiles();
                } else {
                  this.$message({ type: 'error', message });
                }
              })
              .catch(err => {
                this.$message({ type: 'error', message: err });
@@ -272,14 +271,14 @@
        closeUpdateDialog() {
          this.dialogAdd = false;
          this.dialogUpdate = false;
          this.getUserList();
          this.getDepartmentList();
        },
        // 顶部下拉框
        setMystatus(value) {
        setMyStatus(value) {
            this.statusArr[1] = value;
            this.changeTypeChecked(value - 1);
            this.getUserList();
            this.getDepartmentList();
        },
        // 批量删除
@@ -288,7 +287,7 @@
                method: 'delete',
                url: 'sccg/violations/batch_delete?ids=' + idArr,
            }).then(res => {
                this.getUserList();
                this.getDepartmentList();
                this.$message({
                    message: res.message,
                    type: res.code === 200 ? 'success' : 'warning'
@@ -341,7 +340,7 @@
                    .then(({ code, message }) => {
                      if (code === SUCCESS_CODE) {
                        this.$message({ type: 'success', message });
                        this.getUserList();
                        this.getDepartmentList();
                      } else {
                        this.$message({ type: 'error', message });
                      }
@@ -353,17 +352,17 @@
        },
        // 获取用户列表
        getUserList() {
        getDepartmentList() {
          const searchInfo = {
            current: this.currentPage, size: this.pageSize, departName: this.searchDepartment, status: this.searchStatus
          };
          searchTeamInfo(searchInfo)
              .then(({ data }) => {
                this.tableData = data.records;
                this.totalNum = data.total;
              .then(({ records, total }) => {
                this.tableData = records;
                this.totalNum = total;
              })
              .catch(err => {
                console.log(err);
                this.$message({ type: 'error', message: err });
              });
        },
@@ -374,7 +373,7 @@
            })
            this.mystatus = idx + 1;
            this.statusArr[1] = this.typeList[idx].value;
            this.getUserList();
            this.getDepartmentList();
        },
        // 设置表格斑马纹
@@ -389,19 +388,7 @@
        // 当前页改变触发事件
        changeCurrentPage(page) {
            this.currentPage = page;
            this.getUserList();
        },
        // 上一页点击事件
        handlePrev(page) {
            this.currentPage = page;
            this.getUserList();
        },
        // 下一页点击事件
        handleNext(page) {
            this.currentPage = page;
            this.getUserList();
            this.getDepartmentList();
        },
        handleClose(done) {
@@ -438,12 +425,7 @@
        // 关闭上传界面
        closeDialog({ flag }) {
            this.dialogUpload = flag;
            this.getUserList();
        },
        // 处理时间
        filterTime(time) {
            return helper(time);
            this.getDepartmentList();
        }
    }
}