Admin
2022-09-26 aa2e3f4435dc4d12da4cb4bd282ba0daa1b3cb6d
Default Changelist
已修改3个文件
121 ■■■■■ 文件已修改
src/api/specialWorkSystem/workApply/index.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/specialWorkSystem/workPlan/reserveSum/index.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/specialWorkSystem/workTicket/allApplys/index.vue 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/specialWorkSystem/workApply/index.ts
@@ -11,6 +11,15 @@
            });
        },
        // 所有记录列表
        getApplyList: (data: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + `/work/apply/all/page/list`,
                method: 'post',
                data: data
            });
        },
        // 分页获取申请列表
        getAllUsers: () => {
            return request({
src/views/specialWorkSystem/workPlan/reserveSum/index.vue
@@ -42,15 +42,15 @@
    // 定义接口来定义对象的类型
    interface stateType {
        tableData: [],
        departmentList: [],
        hotCount: [],
        confinedSpaceCount: [],
        liftingCount: [],
        groundBreakingCount: [],
        openCircuitCout: [],
        heightCount: [],
        temporaryPowerCount: [],
        blindPlatePluggingCount: [],
        departmentList: Array<any>,
        hotCount: Array<any>,
        confinedSpaceCount: Array<any>,
        liftingCount: Array<any>,
        groundBreakingCount: Array<any>,
        openCircuitCout: Array<any>,
        heightCount: Array<any>,
        temporaryPowerCount: Array<any>,
        blindPlatePluggingCount: Array<any>,
        searchDates: Array<any>,
        startTime: String,
        endTime: String
@@ -73,7 +73,7 @@
                heightCount: [],
                temporaryPowerCount: [],
                blindPlatePluggingCount: [],
                searchDates: '',
                searchDates: [],
                startTime: '',
                endTime: ''
            });
@@ -116,7 +116,6 @@
            // 获取列表
            const getListByPage = async () => {
                console.log(state.searchDates)
                const data = { startTime: state.searchDates[0], endTime: state.searchDates[1] };
                let res = await workAppointApi().getAllRecords(data);
                if (res.data.code === '200') {
src/views/specialWorkSystem/workTicket/allApplys/index.vue
@@ -23,13 +23,17 @@
                                <el-cascader v-model="searchDep" :options="departmentList" :props="casProps" :show-all-levels="false"/>
                            </div>
                        </el-col>
                        <el-col :span="5" style="display:flex;align-items: center;">
                        <el-col :span="8" style="display:flex;align-items: center;">
                            <span style="white-space: nowrap;margin-left: 20px">申请时间:</span>
                            <div class="grid-content topInfo">
                                <el-date-picker
                                        v-model="searchDate"
                                        type="date"
                                        format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                                        type="daterange"
                                        unlink-panels
                                        range-separator="至"
                                        start-placeholder="开始日期"
                                        end-placeholder="结束日期"
                                        format="YYYY-MM-DD" value-format="YYYY-MM-DD HH:mm:ss"
                                />
                            </div>
                        </el-col>
@@ -63,7 +67,6 @@
                                    <template #default="scope">
                                        <el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看</el-button>
                                        <el-button link type="success" size="small" :icon="Finished" @click="viewStatus(scope.row)">进度</el-button>
                                        <el-button link type="warning" size="small" :icon="Delete" @click="deleteRecordBtn(scope.row)">取消</el-button>
                                        <el-button link type="primary" size="small" :icon="Download" @click="downLoadBtn(scope.row)">导出</el-button>
                                    </template>
                                </el-table-column>
@@ -156,15 +159,6 @@
                        </div>
                    </div>
                </el-dialog>
                <el-dialog v-model="deleteDialog" title="提示" width="30%" center>
                    <span>您确定要取消该条申请吗?</span>
                    <template #footer>
                        <span class="dialog-footer">
                            <el-button @click="deleteDialog = false" size="default">取消</el-button>
                            <el-button type="primary" @click="conFirmDelete" size="default">确认</el-button>
                        </span>
                    </template>
                </el-dialog>
                <el-dialog v-model="downLoadDialog" title="提示" width="30%" center>
                    <span>您确定要导出该条记录吗?</span>
                    <template #footer>
@@ -246,9 +240,9 @@
    deleteId: null | number;
    downLoadId: null | number;
    downLoadName: string;
    searchWord: string;
    searchWord: number | null;
    searchDep: number | null;
    searchDate: string;
    searchDate: Array<any>,
    totalSize1: number;
    activeName: string;
    addRecord: {};
@@ -292,9 +286,9 @@
            departmentList: [],
            departmentRecursionList: [],
            chosenIndex: null,
            searchWord: '',
            searchWord: null,
            searchDep: null,
            searchDate: '',
            searchDate: [],
            applyData: [],
            workTimeList: [],
            multipleSelection: [],
@@ -357,7 +351,7 @@
            let res = await teamManageApi().getAllDepartment();
            if (res.data.code === '200') {
                state.departmentList = JSON.parse(JSON.stringify(res.data.data))
                recursion(state.departmentList);
                // recursion(state.departmentList);
            } else {
                ElMessage({
                    type: 'warning',
@@ -366,21 +360,23 @@
            }
        };
        const recursion = (value: any) => {
            for (let i of value) {
                if (i.children.length !== 0) {
                    state.departmentRecursionList.push(i);
                    recursion(i.children);
                } else {
                    state.departmentRecursionList.push(i);
                }
            }
        };
        // const recursion = (value: any) => {
        //     for (let i of value) {
        //         if (i.children.length !== 0) {
        //             state.departmentRecursionList.push(i);
        //             recursion(i.children);
        //         } else {
        //             state.departmentRecursionList.push(i);
        //         }
        //     }
        // };
        // 分页获取工作时间组列表
        // 分页获取列表
        const getListByPage = async () => {
            const data = { pageSize: state.pageSize1, pageIndex: state.pageIndex1, searchParams: { workType: state.searchWord } };
            let res = await workApplyApi().getApplyListPage(data);
            const dateRange = JSON.parse(JSON.stringify(state.searchDate))
            if(dateRange[1]){dateRange[1] = dateRange[1].replace('00:00:00','23:59:59')}
            const data = { pageSize: state.pageSize1, pageIndex: state.pageIndex1, searchParams: { workType: state.searchWord, applyDepId: state.searchDep,applyStartTime: dateRange[0],applyEndTime: dateRange[1]} };
            let res = await workApplyApi().getApplyList(data);
            if (res.data.code === '200') {
                state.applyData = JSON.parse(JSON.stringify(res.data.data));
                state.applyData = state.applyData.map((item) => {
@@ -419,7 +415,7 @@
        // 关键词查询记录
        const searchRecord = async () => {
            if (state.searchWord == ''&& state.searchDep == null && state.searchDate == '') {
            if (state.searchWord == null && state.searchDep == null && state.searchDate == '') {
                ElMessage({
                    type: 'warning',
                    message: '请输入查询关键词'
@@ -430,14 +426,15 @@
        };
        // 重置搜索
        const clearSearch = async () => {
            state.searchWord = '';
            state.searchWord = null;
            state.searchDep = null;
            state.searchDate = ''
            getListByPage();
        };
        // 查看进度
        const viewStatus = (row) => {
            getStatus({ workApplyId: row.workApplyId });
            state.dialogStatus = true;
        };
        // 查询进度方法
@@ -446,6 +443,7 @@
            if (res.data.code === '200') {
                state.approveInfo = JSON.parse(JSON.stringify(res.data.data));
                state.approveInfo.operators = Array.from(state.approveInfo.operators, ({ operatorUname }) => operatorUname);
                state.dialogStatus = true;
            } else {
                ElMessage({
                    type: 'warning',
@@ -457,28 +455,6 @@
        const deleteRecordBtn = (row) => {
            state.deleteId = row.workApplyId;
            state.deleteDialog = true;
        };
        // 取消申请方法
        const deleteRecord = async (data: any) => {
            let res = await workApplyApi().cancelApply(data);
            if (res.data.code === '200') {
                ElMessage({
                    type: 'success',
                    message: '删除成功!'
                });
                getListByPage();
            } else {
                ElMessage({
                    type: 'warning',
                    message: res.data.msg
                });
            }
        };
        const conFirmDelete = () => {
            deleteRecord({ workApplyId: state.deleteId });
            state.deleteDialog = false;
        };
        // 导出图表
@@ -504,7 +480,7 @@
                } else {
                    ElMessage({
                        type: 'warning',
                        message: res.data.msg
                        message: '导出失败'
                    });
                }
            })
@@ -596,7 +572,6 @@
            viewStatus,
            deleteRecordBtn,
            downLoadBtn,
            conFirmDelete,
            conFirmDownLoad,
            getListByPage,
            handleSizeChange1,