Selaa lähdekoodia

提交新版本

lxh 3 kuukautta sitten
vanhempi
commit
4ecc763ebe

+ 50 - 0
src/views/vent/gas/gasInspectNonfc/components/inspectDel.vue

@@ -0,0 +1,50 @@
+<template>
+    <div class="inspectEdit">
+        <div class="card-area">
+
+            <a-popconfirm title="删除内容无法恢复,是否删除" ok-text="确定" cancel-text="取消" @confirm="handleDelCard"
+                @cancel="handleCancelDelCard">
+                <a-button type="primary" preIcon="ant-design:delete-outlined">删除巡检卡</a-button>
+            </a-popconfirm>
+            <a-popconfirm title="删除内容无法恢复,是否删除" ok-text="确定" cancel-text="取消" @confirm="handleDelCardInfo"
+                @cancel="handleCancelDelCard">
+                <a-button type="primary" preIcon="ant-design:delete-outlined">删除巡检信息</a-button>
+            </a-popconfirm>
+
+        </div>
+
+    </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive } from 'vue'
+
+let $emit = defineEmits(['handleDelCard', 'handleDelCardInfo', 'handleCancelDelCard'])
+//删除巡检卡
+let handleDelCard = () => {
+    $emit('handleDelCard')
+}
+//删除巡检卡信息
+let handleDelCardInfo = () => {
+    $emit('handleDelCardInfo')
+}
+//取消删除巡检卡或者巡检信息
+let handleCancelDelCard = () => {
+    $emit('handleCancelDelCard')
+}
+
+</script>
+
+<style lang="less" scoped>
+.inspectEdit {
+    padding: 10px;
+    box-sizing: border-box;
+
+    .card-area {
+        width: 100%;
+        margin: 10px;
+        display: flex;
+        justify-content: space-around;
+    }
+}
+</style>

+ 114 - 0
src/views/vent/gas/gasInspectNonfc/components/inspectEdit.vue

@@ -0,0 +1,114 @@
+<template>
+    <div class="inspectEdit">
+        <a-form :model="formStateEdit" name="basic" :label-col="{ span: 8 }" :wrapper-col="{ span: 12 }"
+            autocomplete="off">
+            <a-form-item label="瓦斯巡检卡ID:">
+                <a-input v-model:value="formStateEdit.id" disabled />
+            </a-form-item>
+            <a-form-item label="瓦斯巡检地点:">
+                <a-select ref="select" v-model:value="formStateEdit.strInstallPos" placeholder="请选择...">
+                    <a-select-option v-for="(item, index) in addressList" :key="index">{{ item.label
+                        }}</a-select-option>
+                </a-select>
+            </a-form-item>
+            <a-form-item label="所属区队:">
+                <a-select ref="select" v-model:value="formStateEdit.disTeamId" placeholder="请选择...">
+                    <a-select-option v-for="(item, index) in qdList" :key="index">{{ item.label }}</a-select-option>
+                </a-select>
+            </a-form-item>
+            <a-form-item label="巡检类型:">
+                <JDictSelectTag v-model:value="formStateEdit.insType" placeholder="请选择巡检类型" dictCode="ins_type"
+                    style="width: 240px" />
+            </a-form-item>
+        </a-form>
+        <div class="edit-btn">
+            <a-button type="primary" @click="confirmEdit">提交</a-button>
+            <a-button type="success" @click="cancelEdit">取消</a-button>
+        </div>
+    </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted, watch } from 'vue'
+import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
+import { queryAllDisTeam } from '../gasInspect.api'
+
+let props = defineProps({
+    inspectEditData: {
+        type: Object,
+        default: () => {
+            return {}
+        }
+    }
+})
+
+let formStateEdit = reactive<any>({
+    id: '',
+    strInstallPos: '',
+    disTeamId: '',
+    insType: '',
+})
+let addressList = ref<any[]>([//监测地点下拉选项列表
+    // { label: '地址1', value: '1' },
+    // { label: '地址2', value: '2' },
+])
+let qdList = ref<any[]>([])//区队下拉选项列表
+let $emit = defineEmits(['confirmEdit', 'cancelEdit'])
+
+//查询所有区队
+async function queryAllDisTeamList() {
+    let res = await queryAllDisTeam()
+    console.log(res, '区队数据---------------')
+    if (res.length != 0) {
+        qdList.value = res.map(m => {
+            return {
+                label: m.name,
+                value: m.id
+            }
+        })
+    }
+}
+//编辑提交
+let confirmEdit = () => {
+    $emit('confirmEdit', formStateEdit)
+}
+//编辑取消
+let cancelEdit = () => {
+    formStateEdit = {
+        id: '',
+        strInstallPos: '',
+        disTeamId: '',
+        insType: '',
+    }
+    $emit('cancelEdit',)
+}
+watch(() => props.inspectEditData, (newV, oldV) => {
+    formStateEdit = Object.assign({}, newV)
+}, { immediate: true })
+onMounted(() => {
+    queryAllDisTeamList()
+})
+</script>
+
+<style lang="less" scoped>
+.inspectEdit {
+    padding: 10px;
+    box-sizing: border-box;
+
+    .edit-btn {
+        display: flex;
+        justify-content: flex-end;
+
+        .zxm-btn {
+            margin: 0px 10px;
+        }
+    }
+
+}
+
+:deep(.zxm-input) {
+    color: #fff;
+    border: 1px solid #3ad8ff77 !important;
+    background-color: #ffffff00 !important;
+}
+</style>

+ 131 - 0
src/views/vent/gas/gasInspectNonfc/components/inspectTask.vue

@@ -0,0 +1,131 @@
+<template>
+    <div class="inspectTask">
+        <a-table :columns="columnsTask" size="small" :data-source="tableDataTask" :pagination="false">
+            <template #bodyCell="{ column, text }">
+                <template v-if="column.dataIndex === 'accountEarly'">
+                    <a-select ref="select" v-model:value="accountEarly" size="small" clearable placeholder="请选择巡检员"
+                        style="width: 140px">
+                        <a-select-option v-for="(item, index) in accountList" :key="index" :value="item.value">{{
+                            item.label
+                            }}</a-select-option>
+                    </a-select>
+                </template>
+                <template v-if="column.dataIndex === 'accountNoon'">
+                    <a-select ref="select" v-model:value="accountNoon" size="small" clearable placeholder="请选择巡检员"
+                        style="width: 140px">
+                        <a-select-option v-for="(item, index) in accountList" :key="index" :value="item.value">{{
+                            item.label
+                            }}</a-select-option>
+                    </a-select>
+                </template>
+                <template v-if="column.dataIndex === 'accountNight'">
+                    <a-select ref="select" v-model:value="accountNight" size="small" clearable placeholder="请选择巡检员"
+                        style="width: 140px">
+                        <a-select-option v-for="(item, index) in accountList" :key="index" :value="item.value">{{
+                            item.label
+                            }}</a-select-option>
+                    </a-select>
+                </template>
+            </template>
+            <template #action="{ record }">
+                <a class="table-action-link" @click="handleTaskSubmit(record)">下发</a>
+            </template>
+        </a-table>
+        <div class="edit-btn">
+
+            <a-button type="primary" @click="handleTaskCancel">返回</a-button>
+        </div>
+    </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted } from 'vue'
+import { columnsTask } from '../gasInspect.data'
+import { queryAllDisTeam, getAllUserInfo } from '../gasInspect.api'
+
+let tableDataTask = ref<any[]>([])
+let accountEarly = ref('')
+let accountNoon = ref('')
+let accountNight = ref('')
+let accountList = ref<any[]>([//巡检员下拉列表
+    { label: '1', value: '1' }
+])
+
+let $emit = defineEmits(['handleTaskSubmit', 'handleTaskCancel'])
+
+
+//获取任务管理列表
+async function queryAllDisTeamList() {
+    let res = await queryAllDisTeam()
+    console.log(res, '任务管理列表')
+    tableDataTask.value = res || []
+}
+//任务管理下发
+let handleTaskSubmit = (param) => {
+    $emit('handleTaskSubmit', { ...param, accountEarly: accountEarly.value, accountNoon: accountNoon.value, accountNight: accountNight.value })
+}
+//任务管理弹窗关闭
+let handleTaskCancel = () => {
+    accountEarly.value = ''
+    accountNoon.value = ''
+    accountNight.value = ''
+    $emit('handleTaskCancel')
+}
+//获取早中晚班巡检员列表
+async function getAllUserInfoList() {
+    let res = await getAllUserInfo()
+    console.log(res, '巡检员列表')
+    if (res.length != 0) {
+        accountList.value = res.map(el => {
+            return {
+                label: el.realname,
+                value: el.id,
+            }
+        })
+    } else {
+        accountList.value = []
+    }
+}
+onMounted(() => {
+    queryAllDisTeamList()
+    getAllUserInfoList()
+})
+</script>
+
+<style lang="less" scoped>
+.inspectTask {
+    padding: 10px;
+    box-sizing: border-box;
+
+    .edit-btn {
+        padding: 10px 10px 0px 10px;
+        display: flex;
+        justify-content: flex-end;
+    }
+}
+
+:deep(.zxm-input) {
+    color: #fff;
+    border: 1px solid #3ad8ff77 !important;
+    background-color: #ffffff00 !important;
+}
+
+:deep(.zxm-select-selector) {
+    width: 100%;
+    color: #fff;
+    border: 1px solid #3ad8ff77 !important;
+    background-color: #ffffff00 !important;
+}
+
+:deep(.zxm-select-selection-item) {
+    color: #fff !important;
+}
+
+:deep(.zxm-select-selection-placeholder) {
+    color: #ccc !important;
+}
+
+:deep(.zxm-select-arrow) {
+    color: #fff;
+}
+</style>

+ 103 - 0
src/views/vent/gas/gasInspectNonfc/components/uploadOrdown.vue

@@ -0,0 +1,103 @@
+<template>
+    <div class="uploadOrdown">
+        <a-form :model="formState" :label-col="{ span: 7 }" :wrapper-col="{ span: 14 }" autocomplete="off">
+            <a-form-item label="巡检类型:">
+                <JDictSelectTag v-model:value="formState.insType" placeholder="请选择巡检类型" dictCode="ins_type"
+                    style="width: 240px" />
+            </a-form-item>
+
+            <a-form-item label="选择文件:" v-if="modalType == 'upload'">
+                <a-upload :before-upload="beforeUpload" @remove="handleRemove" :multiple="false" :file-list="fileList">
+                    <a-button type="primary" preIcon="ant-design:cloud-upload-outlined">选择文件</a-button>
+                </a-upload>
+            </a-form-item>
+        </a-form>
+        <div class="btn">
+            <a-button class="btn-item" type="primary" @click="handlerComfirm">确定</a-button>
+
+            <a-button class="btn-item" @click="handlerCancel">取消</a-button>
+        </div>
+    </div>
+</template>
+
+<script setup lang=ts>
+import { ref, reactive, computed } from 'vue'
+import { message } from 'ant-design-vue';
+import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
+
+let props = defineProps({
+    modalType: {
+        type: String,
+        default: ''
+    }
+})
+
+let formState = reactive({
+    insType: '',
+})
+let fileList = reactive<any[]>([])
+let $emit = defineEmits(['handlerComfirm', 'handlerCancel'])
+
+//选择文件
+let beforeUpload = (file) => {
+    console.log(file, '选中文件');
+    fileList.length = 0;
+    let index = file.name.indexOf('.');
+    let name = file.name.substring(index + 1);
+    if (name == 'png' || name == 'jpg' || name == 'gif' || name == 'psd' || name == 'webp') {
+        message.warning('禁止上传图片类型的文件!');
+    } else {
+        fileList.push(file);
+    }
+};
+// 文件移除
+let handleRemove = (file) => {
+    const index = fileList.indexOf(file);
+    const newFileList = fileList.slice();
+    newFileList.splice(index, 1);
+    fileList.length = 0;
+};
+
+//确认
+let handlerComfirm = () => {
+    if (props.modalType == 'upload') {
+        const formData = new FormData();
+        formData.append('file', fileList[0]);
+        formData.append('insType', formState.insType);
+        $emit('handlerComfirm', formData)
+    } else {
+        $emit('handlerComfirm', formState)
+    }
+}
+//取消
+let handlerCancel = () => {
+    formState.insType = ''
+    $emit('handlerCancel', formState)
+}
+</script>
+
+<style lang="less" scoped>
+.uploadOrdown {
+    position: relative;
+    padding: 10px 15px;
+    box-sizing: border-box;
+
+    .btn {
+        padding: 10px 10px 0px 10px;
+        display: flex;
+        justify-content: flex-end;
+
+        .btn-item {
+            margin: 0px 5px;
+        }
+    }
+}
+
+::v-deep .zxm-upload-list-item-name {
+    color: #fff;
+}
+
+::v-deep .zxm-upload-list-item-name:hover {
+    background-color: transparent !important;
+}
+</style>

+ 73 - 0
src/views/vent/gas/gasInspectNonfc/gasInspectNonfc.api.ts

@@ -0,0 +1,73 @@
+import { defHttp } from '/@/utils/http/axios';
+
+
+enum Api {
+    list = '/safety/gasInsCard/list',//通过id(巡检卡id)查询
+    importByExcel='/safety/gasDayReport/importByExcel',//导入瓦斯巡检地址
+    exportGasByExcel='/safety/gasDayReport/exportGasByExcel',//导出瓦斯巡检地址
+    queryAllDisTeam='/safety/disTeamInfo/queryAllDisTeam',//查询所有区队
+    moveOrderNum='/safety/gasInsCard/moveOrderNum',//上下移接口
+    edit='/safety/gasInsCard/edit',//瓦斯巡检地点编辑
+    deleteCard='/safety/gasInsCard/delete',//瓦斯巡检卡删除
+    taskSubmit='/safety/disTeamInfo/edit',//任务管理下发
+    clearCardInfo='/safety/gasInsCard/clearCard',//瓦斯巡检卡信息删除
+    getAllUserInfo='/safety/gasInsCard/getAllUserInfo'//获取早中晚班巡检员列表
+
+}
+
+/**
+ * 下载文件目录
+ * @param params
+ */
+export const zipdownload = (params) => defHttp.post({ url: Api.zipdownload, params, responseType: 'blob' },{ joinParamsToUrl: true });
+/**
+ * 通过id(巡检卡id)查询
+ * @param params
+ */
+export const list = (params) => defHttp.get({ url: Api.list,params },);
+
+/**
+ * 导入瓦斯巡检地址
+ * @param params 
+ */
+export const importByExcel = (params) => defHttp.post({ headers: { 'Content-Type': 'multipart/form-data' }, url: Api.importByExcel, params });
+
+/**
+ * 导出瓦斯巡检地址
+ * @param params 
+ */
+export const exportGasByExcel = (params) => defHttp.get({ url: Api.exportGasByExcel, params, responseType: 'blob' });
+
+/**
+ * 查询所有区队
+ * @param params 
+ */
+export const queryAllDisTeam = () => defHttp.get({ url: Api.queryAllDisTeam, });
+/**
+ * 上下移接口
+ * @param params 
+ */
+export const moveOrderNum = (params) => defHttp.post({ url: Api.moveOrderNum,params });
+/**
+ * 瓦斯巡检地点编辑
+ * @param params 
+ */
+export const edit = (params) => defHttp.post({ url: Api.edit,params });
+
+/**
+ * 瓦斯巡检卡-删除
+ */
+export const deleteCard = (params) => defHttp.delete({ url: Api.deleteCard, params }, { joinParamsToUrl: true });
+/**
+ * 瓦斯巡检卡信息-删除
+ */
+export const clearCardInfo = (params) => defHttp.get({ url: Api.clearCardInfo, params }, { joinParamsToUrl: true });
+/**
+ * 获取早中晚班巡检员列表
+ */
+export const getAllUserInfo = () => defHttp.get({ url: Api.getAllUserInfo, });
+/**
+ * 任务管理下发
+ * @param params 
+ */
+export const taskSubmit = (params) => defHttp.post({ url: Api.taskSubmit,params });

+ 137 - 0
src/views/vent/gas/gasInspectNonfc/gasInspectNonfc.data.ts

@@ -0,0 +1,137 @@
+import { BasicColumn } from '/@/components/Table';
+export const columns: BasicColumn[] = [
+    {
+        title: '序号',
+        width: 60,
+        align: 'center',
+        customRender: ({ index }: { index: number }) => `${index + 1}`
+    },
+    {
+        title: '巡检卡ID',
+        dataIndex: 'id',
+        key: 'id',
+        align: 'center',
+    },
+    {
+        title: '地点',
+        dataIndex: 'strInstallPos',
+        key: 'strInstallPos',
+        align: 'center',
+    },
+    {
+        title: '巡检人',
+        children: [
+            {
+                title: '早班',
+                dataIndex: 'nameEarly',
+                key: 'nameEarly',
+                align: 'center',
+
+            },
+
+            {
+                title: '中班',
+                dataIndex: 'nameNoon',
+                key: 'nameNoon',
+                align: 'center',
+
+            },
+            {
+                title: '晚班',
+                dataIndex: 'nameNight',
+                key: 'nameNight',
+                align: 'center',
+
+            },
+        ],
+    },
+    {
+        title: '是否巡检',
+        children: [
+            {
+                title: '',
+                dataIndex: 'insType',
+                key: 'insType',
+                align: 'center',
+
+            },
+            {
+                title: '早班',
+                dataIndex: 'morning',
+                key: 'morning',
+                align: 'center',
+
+            },
+
+            {
+                title: '中班',
+                dataIndex: 'afterNoon',
+                key: 'afterNoon',
+                align: 'center',
+
+            },
+            {
+                title: '晚班',
+                dataIndex: 'evening',
+                key: 'eevening',
+                align: 'center',
+
+            },
+        ],
+    },
+    {
+        title: '操作',
+        dataIndex: 'action',
+        width: 250,
+        align: 'center',
+        slots: { customRender: 'action' },
+    },
+];
+export const columnsTask: BasicColumn[] = ([
+    {
+        title: '序号',
+        width: 60,
+        align: 'center',
+        customRender: ({ index }: { index: number }) => `${index + 1}`
+    },
+    {
+        title: '所属队别',
+        dataIndex: 'name',
+        key: 'name',
+        align: 'center',
+    },
+    {
+        title: '早班巡检',
+        dataIndex: 'accountEarly',
+        key: 'accountEarly',
+        align: 'center',
+    },
+    {
+        title: '中班巡检',
+        dataIndex: 'accountNoon',
+        key: 'accountNoon',
+        align: 'center',
+    },
+    {
+        title: '晚班巡检',
+        dataIndex: 'accountNight',
+        key: 'accountNight',
+        align: 'center',
+    },
+    {
+        title: '操作',
+        dataIndex: 'action',
+        width: 120,
+        align: 'center',
+        slots: { customRender: 'action' },
+    },
+])
+//分页参数
+export const pagination = {
+    current: 1, // 当前页码
+    pageSize: 10, // 每页显示条数
+    total: 0, // 总条目数,后端返回
+    // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
+    showSizeChanger: true, // 是否可改变每页显示条数
+    pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
+};

+ 357 - 0
src/views/vent/gas/gasInspectNonfc/index.vue

@@ -0,0 +1,357 @@
+<template>
+    <div class="gasReport">
+        <customHeader>瓦斯巡检地点管理</customHeader>
+        <div class="report-container">
+            <div class="search-area">
+                <a-row>
+                    <a-col :span="4">
+                        <div class="area-item">
+                            <div class="item-text">巡检卡ID:</div>
+                            <a-input style="width: 240px" v-model:value="searchId" placeholder="请输入巡检卡ID" />
+                        </div>
+                    </a-col>
+                    <a-col :span="20">
+                        <a-button type="primary" preIcon="ant-design:search-outlined" style="margin-left: 10px;"
+                            @click="getSearchCardId">查询</a-button>
+                        <a-button preIcon="ant-design:sync-outlined" style="margin: 0px 15px"
+                            @click="getReset">重置</a-button>
+                        <a-button type="primary" preIcon="ant-design:import-outlined" @click="getupload">导入</a-button>
+                        <a-button type="primary" preIcon="ant-design:download-outlined" style="margin: 0px 15px"
+                            @click="getdownload">导出</a-button>
+                        <a-button type="primary" preIcon="ant-design:sync-outlined" style="margin-right: 15px;"
+                            @click="handlerTask">任务管理</a-button>
+                        <a-dropdown>
+                            <template #overlay>
+                                <a-menu @click="handlerFilter">
+                                    <a-menu-item key="1">
+                                        <UserOutlined />
+                                        一次
+                                    </a-menu-item>
+                                    <a-menu-divider />
+                                    <a-menu-item key="2">
+                                        <UserOutlined />
+                                        两次
+                                    </a-menu-item>
+                                </a-menu>
+                            </template>
+                            <a-button type="primary">
+                                巡检次数筛选
+                                <DownOutlined />
+                            </a-button>
+                        </a-dropdown>
+                    </a-col>
+                </a-row>
+            </div>
+            <a-table :columns="columns" size="small" :data-source="tableData" :scroll="{ y: 500 }" class="tableW"
+                :pagination="pagination">
+                <template #action="{ record }">
+                    <a class="table-action-link" @click="handlerEdit(record)">编辑</a>
+                    <a class="table-action-link" @click="handlerDel(record)">删除</a>
+                    <a class="table-action-link" @click="moveUp(record)">上移</a>
+                    <a class="table-action-link" @click="moveDown(record)">下移</a>
+                </template>
+                <template #bodyCell="{ column, text }">
+                    <template v-if="column.dataIndex == 'insType'">
+                        <div v-if="text == '2'">
+                            <div class="table-text">第一次</div>
+                            <div>第二次</div>
+                        </div>
+                        <div v-else>第一次</div>
+                    </template>
+                    <template
+                        v-if="column.dataIndex == 'afterNoon' || column.dataIndex == 'morning' || column.dataIndex == 'evening'">
+                        <div v-if="text == '1'">
+                            <div class="table-text text-y ">是</div>
+                            <div class="text-y">是</div>
+                        </div>
+                        <div v-else>
+                            <div class="table-text text-n">否</div>
+                            <div class="text-n">否</div>
+                        </div>
+                    </template>
+
+                </template>
+            </a-table>
+            <!-- 任务管理弹窗 -->
+            <a-modal v-model:visible="visibleTask" width="850px" :footer="null" :title="titleTask" centered
+                destroyOnClose>
+                <inspectTask @handleTaskSubmit="handleTaskSubmit" @handleTaskCancel="handleTaskCancel"></inspectTask>
+            </a-modal>
+            <!-- 编辑弹窗 -->
+            <a-modal v-model:visible="visibleEdit" width="650px" :footer="null" :title="titleEdit" centered
+                destroyOnClose>
+                <inspectEdit :inspectEditData="inspectEditData" @confirmEdit="confirmEdit" @cancelEdit="cancelEdit">
+                </inspectEdit>
+            </a-modal>
+            <!-- 删除弹窗 -->
+            <a-modal v-model:visible="visibleDel" width="450px" :footer="null" :title="titleDel" centered
+                destroyOnClose>
+                <inspectDel @handleDelCard="handleDelCard" @handleDelCardInfo="handleDelCardInfo"
+                    @handleCancelDelCard="handleCancelDelCard"></inspectDel>
+            </a-modal>
+            <!-- 导入弹窗 -->
+            <a-modal v-model:visible="visibleUploadorDown" width="450px" :footer="null" :title="titleUploadorDown"
+                centered destroyOnClose>
+                <uploadOrdown :modalType="modalType" @handlerComfirm="handlerComfirm" @handlerCancel="handlerCancel">
+                </uploadOrdown>
+            </a-modal>
+        </div>
+    </div>
+</template>
+
+<script setup lang="ts">
+import { ref, onMounted, computed, reactive } from 'vue';
+import customHeader from '/@/components/vent/customHeader.vue';
+import inspectTask from './components/inspectTask.vue'
+import inspectEdit from './components/inspectEdit.vue'
+import inspectDel from './components/inspectDel.vue'
+import uploadOrdown from './components/uploadOrdown.vue'
+import { message } from 'ant-design-vue';
+import { columns, pagination } from './gasInspect.data'
+import { list, importByExcel, exportGasByExcel, moveOrderNum, edit, deleteCard, taskSubmit, clearCardInfo } from './gasInspect.api'
+
+
+let searchId = ref('')
+let tableData = ref<any[]>([])//巡检列表
+let visibleTask = ref(false)//控制任务管理弹窗的显示与隐藏
+let titleTask = ref('')
+let visibleEdit = ref(false)//控制编辑弹窗的显示与隐藏
+let titleEdit = ref('')//编辑弹窗标题
+let inspectEditData = reactive({})//编辑弹窗数据
+let visibleDel = ref(false)//控制删除弹窗的显示与隐藏
+let titleDel = ref('')//删除弹窗标题
+let inspectDelData = ref('')
+let visibleUploadorDown = ref(false)//控制导入/导出弹窗的显示与隐藏
+let titleUploadorDown = ref('')
+let modalType = ref('')//判断当前是导入/导出弹窗
+
+
+//打开任务管理弹窗
+let handlerTask = () => {
+    visibleTask.value = true
+    titleTask.value = '瓦斯巡检任务管理'
+}
+//任务管理下发
+async function handleTaskSubmit(param) {
+    let res = await taskSubmit({ ...param })
+    console.log(res, '任务管理下发')
+    if (res) {
+        visibleTask.value = false
+        queryByIdList()
+    }
+}
+//任务管理弹窗关闭
+let handleTaskCancel = () => {
+    visibleTask.value = false
+}
+//打开编辑弹窗
+let handlerEdit = (record) => {
+    visibleEdit.value = true
+    titleEdit.value = '瓦斯巡检点编辑'
+    inspectEditData = Object.assign({}, record)
+}
+//编辑提交
+async function confirmEdit(param) {
+    let res = await edit({ ...param })
+    if (res) {
+        queryByIdList()
+    }
+}
+//编辑取消
+let cancelEdit = () => {
+    visibleEdit.value = false
+}
+//代开删除弹窗
+let handlerDel = (record) => {
+    visibleDel.value = true
+    titleDel.value = '瓦斯巡检点删除'
+    inspectDelData.value = record.id
+}
+//删除巡检卡
+async function handleDelCard() {
+    let res = await deleteCard({ id: inspectDelData.value })
+    if (res) {
+        visibleDel.value = false
+        inspectDelData.value = ''
+        queryByIdList()
+    }
+}
+//删除巡检卡信息
+async function handleDelCardInfo() {
+    let res = await clearCardInfo({ id: inspectDelData.value })
+    console.log(res, '瓦斯巡检卡信息删除')
+    if (res) {
+        visibleDel.value = false
+        inspectDelData.value = ''
+        queryByIdList()
+    }
+}
+//取消删除巡检卡或者巡检卡信息
+let handleCancelDelCard = () => {
+    inspectDelData.value = ''
+    visibleDel.value = false
+}
+
+//通过id(巡检卡id)查询
+async function queryByIdList() {
+    let res = await list({ id: searchId.value, pageNo: pagination.current, pageSize: pagination.pageSize })
+    console.log(res, '列表查询---')
+    pagination.current = 1
+    tableData.value = res.records
+    pagination.total = res.total
+}
+//查询
+let getSearchCardId = () => {
+    queryByIdList()
+}
+//重置
+let getReset = () => {
+    searchId.value = ''
+    queryByIdList()
+}
+//导入
+let getupload = () => {
+    modalType.value = 'upload'
+    visibleUploadorDown.value = true
+    titleUploadorDown.value = '导入'
+}
+//确定导入
+async function handlerComfirm(param) {
+    let res = await importByExcel(param)
+    if (res.code == 200) {
+        visibleUploadorDown.value = false
+        message.success('导入成功')
+        queryByIdList()
+    }
+}
+//导出
+let getdownload = () => {
+    modalType.value = 'download'
+    visibleUploadorDown.value = true
+    titleUploadorDown.value = '导出'
+}
+//确定导出
+async function handlerCancel(param) {
+    let res = await exportGasByExcel({ insType: param.insType })
+    console.log(res, '导出数据')
+    if (res) {
+        let filename = '111.xlsx';
+        downFilePublic(res, filename);
+    }
+}
+// 下载公用方法
+function downFilePublic(content, fileName) {
+    const blob = new Blob([content], { type: 'application/xlsx;charset=UTF-8' }); // 构造一个blob对象来处理数据
+    // 对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
+    // IE10以上支持blob但是依然不支持download
+    if ('download' in document.createElement('a')) {
+        // 支持a标签download的浏览器
+        const link = document.createElement('a'); // 创建a标签
+        link.download = fileName; // a标签添加属性
+        link.style.display = 'none';
+        link.href = URL.createObjectURL(blob);
+        document.body.appendChild(link);
+        link.click(); // 执行下载
+        URL.revokeObjectURL(link.href); // 释放url
+        document.body.removeChild(link); // 释放标签
+    } else {
+        // 其他浏览器
+        navigator.msSaveBlob(blob, fileName);
+    }
+}
+//列表上移
+async function moveUp(param) {
+    let res = await moveOrderNum({ id: param.id, moveType: 'upp' })
+    console.log(res, '向上移动')
+    if (res) {
+        queryByIdList()
+    }
+}
+//列表下移
+async function moveDown(param) {
+    let res = await moveOrderNum({ id: param.id, moveType: 'bel' })
+    console.log(res, '向下移动')
+    if (res) {
+        queryByIdList()
+    }
+}
+//巡检次数筛选
+let handlerFilter = (param) => {
+    let data = param.key
+    switch (data) {
+        case '1':
+            pagination.current = 1
+            tableData.value = tableData.value.filter(v => v.insType == '1')
+            break;
+        case '2':
+            pagination.current = 2
+            tableData.value = tableData.value.filter(v => v.insType == '2')
+            break;
+    }
+}
+
+onMounted(() => {
+    queryByIdList()
+})
+
+</script>
+
+<style lang="less" scoped>
+.gasReport {
+    width: 100%;
+    height: 100%;
+    padding: 80px 10px 15px 10px;
+    box-sizing: border-box;
+    position: relative;
+
+    .search-area {
+        margin: 20px 0px;
+
+        .area-item {
+            display: flex;
+            align-items: center;
+
+            .item-text {
+                color: #fff;
+            }
+        }
+    }
+
+    .table-text {
+        margin-bottom: 5px;
+    }
+
+    .text-y {
+        color: #0be716;
+    }
+
+    .text-n {
+        color: #ff0000;
+    }
+
+    .zxm-picker,
+    .zxm-input {
+        border: 1px solid #3ad8ff77 !important;
+        background-color: #ffffff00 !important;
+        color: #fff !important;
+    }
+
+}
+
+:deep(.zxm-table-thead > tr > th:last-child) {
+    border-right: 1px solid #91e9fe !important;
+}
+
+:deep(.zxm-picker-input > input) {
+    color: #fff;
+}
+
+:deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
+    border: 1px solid #3ad8ff77 !important;
+    background-color: #ffffff00 !important;
+}
+
+:deep(.zxm-select-selection-item) {
+    color: #fff !important;
+}
+</style>

+ 12 - 2
src/views/vent/performance/comment/NormalTable.vue

@@ -14,6 +14,8 @@
         <a-popconfirm title="确定删除?" @confirm="handleDelete(record)">
           <a class="table-action-link">删除</a>
         </a-popconfirm>
+        <a class="table-action-link" @click="handlerSg(record)">束管分析</a>
+        <a class="table-action-link" @click="handlerSpy(record)">色谱仪分析</a>
       </template>
 
       <template #bodyCell="{ column, record }">
@@ -62,6 +64,7 @@
   import { historicFlowNew, getHighlightImgNew, getTodoTask, getCancelNew } from './comment.api';
   import { message } from 'ant-design-vue';
   import { useUserStore } from '/@/store/modules/user';
+  import {useRouter} from 'vue-router'
 
   const props = defineProps({
     //文件审批-提交信息
@@ -127,7 +130,7 @@
       type: String,
     },
   });
-
+  let router = useRouter(); //路由
   let resetTable = ref(0);
   let fileType = ref(''); //文件类型
   let editID = ref(0); //文件ID
@@ -361,7 +364,14 @@
       navigator.msSaveBlob(blob, fileName);
     }
   }
-
+  //束管分析
+  function handlerSg(record){
+    router.push('/bundle/bundleTable')
+  }
+  //色谱仪分析
+ function handlerSpy(record){
+  router.push('/bundleSpy/bundleSpyTable')
+ }
   // CAD预览相关的逻辑
   const [registerCADModal, { openModal: openCADModal }] = useModal();
 

+ 7 - 7
src/views/vent/performance/fileDetail/fileDetail.data.ts

@@ -17,19 +17,19 @@ export const columns: BasicColumn[] = [
     title: '文件名称',
     dataIndex: 'fileName',
     align:'center',
-    width:220,
+    width:190,
   },
   {
     title: '文件格式',
     dataIndex: 'fileSuffix',
     align:'center',
-    width:80,
+    width:70,
   },
 
   {
     title: '文件类型',
     dataIndex: 'fileType_dictText',
-    width:110,
+    width:90,
     align:'center',
   },
   {
@@ -52,26 +52,26 @@ export const columns: BasicColumn[] = [
   {
     title: '审批状态',
     dataIndex: 'bpmStatus_dictText',
-    width:90,
+    width:70,
     align:'center',
   },
   {
     title: '创建人',
     dataIndex: 'createBy',
-    width:90,
+    width:70,
     align:'center',
   },
   {
     title: '审批操作',
     dataIndex: 'actionSp',
-    width: 150,
+    width: 130,
     align: 'center',
     slots: { customRender: 'actionSp' },
   },
   {
     title: '文件操作',
     dataIndex: 'actionWj',
-    width: 150,
+    width: 240,
     align: 'center',
     slots: { customRender: 'actionWj' },
   },

+ 1 - 1
src/views/vent/performance/fileDetail/index.vue

@@ -524,10 +524,10 @@
         padding: 10px;
         border: 1px solid #99e8ff66;
         background: #27546e1a;
+        overflow-y:auto;
         box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
         -moz-box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
         -webkit-box-shadow: 0px 0px 50px 1px rgb(149 235 255 / 5%) inset;
-
         // lxh
         .iconfont {
           color: #fff;