| | |
| | | { |
| | | path: '/inspectionTask', |
| | | name: 'inspectionTask', |
| | | component: () => import('/@/views/IntelligentXjSys/inspectionTaskManagement/inspectionTask/index.vue'), |
| | | component: () => import('/@/views/IntelligentXjSys/inspectionTaskManagement/index.vue'), |
| | | meta: { |
| | | title: '巡检任务' |
| | | }, |
| | |
| | | meta: { |
| | | title: '设施区域管理' |
| | | }, |
| | | }, |
| | | { |
| | | path: '/inspectionRecordManagement', |
| | | name: 'inspectionRecordManagement', |
| | | component: () => import('/@/views/IntelligentXjSys/inspectionRecordManagement/index.vue'), |
| | | meta: { |
| | | title: '巡检记录管理' |
| | | }, |
| | | } |
| | | ]; |
对比新文件 |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <el-scrollbar height="100%"> |
| | | <el-row class="homeCard"> |
| | | <el-col :span="12"> |
| | | <div class="grid-content topInfo"> |
| | | <el-select v-model="searchType" @change="changeSearch" placeholder="任务名称"> |
| | | <el-option label="巡检任务类型" value="巡检任务类型" /> |
| | | <el-option label="创建人" value="创建人" /> |
| | | <el-option label="巡检人" value="巡检人" /> |
| | | <el-option label="检查频次" value="检查频次" /> |
| | | <el-option label="开始时间" value="开始时间" /> |
| | | </el-select> |
| | | <el-input v-model="searchContent" v-if="searchType == '任务名称'" placeholder="请输入任务名称"></el-input> |
| | | <el-input |
| | | v-else-if="searchType == '检查频次'" |
| | | v-model="searchContent" |
| | | placeholder="请输入检查频次" |
| | | > |
| | | <template #append> |
| | | <el-select v-model="searchUnit" placeholder="选择单位"> |
| | | <el-option label="分钟" value="分钟" /> |
| | | <el-option label="小时" value="小时" /> |
| | | <el-option label="天" value="天" /> |
| | | </el-select> |
| | | </template> |
| | | </el-input> |
| | | <el-select v-model="searchContent" v-else-if="searchType == '巡检任务类型'" placeholder="请选择任务类型"> |
| | | <el-option v-for="(item,index) in typeOptions" :label="item.name" :value="item.value" :key="index"/> |
| | | </el-select> |
| | | <el-select v-model="searchContent" v-else-if="searchType == '创建人'" placeholder="请选择创建人"> |
| | | <el-option v-for="(item,index) in createrOptions" :label="item.name" :value="item.value" :key="index"/> |
| | | </el-select> |
| | | <el-select v-model="searchContent" v-else-if="searchType == '巡检人'" placeholder="请选择巡检人"> |
| | | <el-option v-for="(item,index) in inspectorOptions" :label="item.name" :value="item.value" :key="index"/> |
| | | </el-select> |
| | | <el-date-picker |
| | | v-model="searchContent" |
| | | type="date" |
| | | v-else |
| | | :placeholder="'请选择' + searchType" |
| | | size="large" |
| | | style="margin-right: 20px" |
| | | /> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button plain>重置</el-button> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="homeCard"> |
| | | <div class="main-card"> |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="dialogAddRecord=true">新建</el-button> |
| | | <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default"/> |
| | | </el-row> |
| | | <el-table |
| | | ref="multipleTableRef" |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | :header-cell-style="{background: '#fafafa'}" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column property="name" label="任务名称" width="200"/> |
| | | <el-table-column property="type" label="任务类型"/> |
| | | <el-table-column property="creater" label="创建人"/> |
| | | <el-table-column property="inspector" label="巡检人"/> |
| | | <el-table-column property="frequency" label="检查频次"/> |
| | | <el-table-column property="unit" label="频次单位"/> |
| | | <el-table-column property="startTime" label="任务开始时间" width="180"/> |
| | | <el-table-column property="validTime" label="任务有效时间" width="180"/> |
| | | <el-table-column property="createTime" label="创建时间" width="180"/> |
| | | <el-table-column property="chainLength" label="巡检链长度" width="160"/> |
| | | <el-table-column property="status" label="状态" width="60"/> |
| | | <el-table-column fixed="right" label="操作" align="center" width="300"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="pageBtn"> |
| | | <el-pagination |
| | | v-model:currentPage="currentPage" |
| | | v-model:page-size="pageSize" |
| | | :page-sizes="[10, 15]" |
| | | small=false |
| | | background |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="100" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | <el-dialog v-model="dialogDetails" title="巡检任务"> |
| | | <el-form :model="details" label-width="120px"> |
| | | <el-form-item label="任务名称"> |
| | | <el-input |
| | | v-model="details.name" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="任务类型"> |
| | | <el-input |
| | | v-model="details.type" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="执行巡检人员"> |
| | | <el-input |
| | | v-model="details.inspector" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="检查频次"> |
| | | <el-input |
| | | v-model="details.inspector" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="检查频次" prop="frequency"> |
| | | <el-input |
| | | v-model="details.frequency" |
| | | readonly |
| | | > |
| | | <template #append> |
| | | <el-input |
| | | v-model="details.unit" |
| | | readonly |
| | | /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="周期开始时间"> |
| | | <el-input |
| | | v-model="details.startTime" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="周期有效时间"> |
| | | <el-input |
| | | v-model="details.validTime" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="巡检链"> |
| | | <div style="width: 100%;margin-left: -30px"> |
| | | <div v-for="(item,index) in details.shiftSteps" class="stepItem"> |
| | | <div class="stepNum">{{index+1}}</div> |
| | | <div class="stepCard"> |
| | | <el-card class="box-card" shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <div>{{item.name}}</div> |
| | | </div> |
| | | </template> |
| | | <div> |
| | | <el-table :data="item.inspectorData" style="width: 100%" :default-sort="{ prop: 'sort', order: 'ascending'}" :header-cell-style="{background: '#fafafa',padding: '5px'}"> |
| | | <el-table-column property="sort" sortable label="排序"/> |
| | | <el-table-column property="name" label="巡检点名称"/> |
| | | <el-table-column property="section" label="所属设备区域"/> |
| | | <el-table-column property="rfid" label="关联RFID"/> |
| | | <el-table-column property="norm" label="巡检指标"/> |
| | | <el-table-column property="reference" label="数据参考值"/> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="dialogDetails = false" size="default">确认</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { toRefs, reactive, ref } from 'vue'; |
| | | import { storeToRefs } from 'pinia'; |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | import { Session } from '/@/utils/storage'; |
| | | import { Edit, View, Plus, Delete, Refresh, Search, Download } from '@element-plus/icons-vue' |
| | | import { ElTable, ElMessage } from 'element-plus' |
| | | import { FormInstance, FormRules } from 'element-plus' |
| | | let global: any = { |
| | | homeChartOne: null, |
| | | homeChartTwo: null, |
| | | homeCharThree: null, |
| | | dispose: [null, '', undefined], |
| | | }; |
| | | |
| | | interface stateType { |
| | | homeOne: Array <type> |
| | | } |
| | | interface type { |
| | | |
| | | } |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | |
| | | // 顶部筛选搜索 |
| | | const searchType = ref('任务名称') |
| | | const typeOptions = ref([ |
| | | { |
| | | name: '日常检查', |
| | | value: '日常检查' |
| | | }, |
| | | { |
| | | name: '周期检查', |
| | | value: '周期检查' |
| | | } |
| | | ]) |
| | | const createrOptions = ref([ |
| | | { |
| | | name: '张三', |
| | | value: '张三' |
| | | }, |
| | | { |
| | | name: '李四', |
| | | value: '李四' |
| | | } |
| | | ]) |
| | | const inspectorOptions = ref([ |
| | | { |
| | | name: '李四', |
| | | value: '李四' |
| | | }, |
| | | { |
| | | name: '张三', |
| | | value: '张三' |
| | | } |
| | | ]) |
| | | const searchUnit = ref('小时') |
| | | const changeSearch =()=>{ |
| | | searchContent.value='' |
| | | } |
| | | const searchContent = ref() |
| | | |
| | | |
| | | const currentPage = ref(1) |
| | | const pageSize = ref(10) |
| | | const chosenIndex = ref(-1) |
| | | const chosenShiftIndex = ref(-1) |
| | | const chosenInspectionIndex = ref(-1) |
| | | const handleSizeChange = (val: number) => { |
| | | console.log(`${val} items per page`) |
| | | } |
| | | const handleCurrentChange = (val: number) => { |
| | | console.log(`current page: ${val}`) |
| | | } |
| | | |
| | | // 时间格式化 |
| | | const timeForm = { |
| | | hour12: false, |
| | | year: 'numeric', |
| | | month: '2-digit', |
| | | day: '2-digit', |
| | | hour: '2-digit', |
| | | minute: '2-digit', |
| | | second: '2-digit' |
| | | } |
| | | const tableData = reactive( |
| | | [ |
| | | { |
| | | name: '甲醛装置()列现场岗位巡检', |
| | | type: '周期检查', |
| | | creater: '管理员A', |
| | | inspector: '张三', |
| | | frequency: 2, |
| | | unit: '小时', |
| | | startTime: '2022-07-02 13:01:37', |
| | | validTime: '30分钟', |
| | | createTime: '2022-07-02 12:03:47', |
| | | chainLength: '20', |
| | | status: '开启', |
| | | shiftSteps:[ |
| | | { |
| | | name: '风机系统', |
| | | inspectorData:[ |
| | | { |
| | | sort: 1, |
| | | name: '73011', |
| | | section: '风机系统', |
| | | rfid: '风机系统1标签', |
| | | norm: '风机声音', |
| | | reference: '10<正常<50' |
| | | }, |
| | | { |
| | | sort: 2, |
| | | name: '73012', |
| | | section: '风机系统', |
| | | rfid: '风机系统2标签', |
| | | norm: '设备温度', |
| | | reference: '20<正常<50' |
| | | }, |
| | | { |
| | | sort: 3, |
| | | name: '73013', |
| | | section: '风机系统', |
| | | rfid: '风机系统3标签', |
| | | norm: '风机震动', |
| | | reference: '30<正常<50' |
| | | } |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | name: 'A场所', |
| | | inspectorData:[ |
| | | { |
| | | sort: 1, |
| | | name: '73021', |
| | | section: '风机系统', |
| | | rfid: '风机系统1标签', |
| | | norm: '风机声音', |
| | | reference: '10<正常<50' |
| | | }, |
| | | { |
| | | sort: 2, |
| | | name: '73022', |
| | | section: '风机系统', |
| | | rfid: '风机系统2标签', |
| | | norm: '设备温度', |
| | | reference: '20<正常<50' |
| | | }, |
| | | { |
| | | sort: 3, |
| | | name: '73023', |
| | | section: '风机系统', |
| | | rfid: '风机系统3标签', |
| | | norm: '风机震动', |
| | | reference: '30<正常<50' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | name: 'A车间日常巡检', |
| | | type: '日常检查', |
| | | creater: '管理员B', |
| | | inspector: '李四', |
| | | frequency: 4, |
| | | unit: '小时', |
| | | startTime: '2022-07-02 12:45:37', |
| | | validTime: '30分钟', |
| | | createTime: '2022-07-02 08:15:41', |
| | | chainLength: '15', |
| | | status: '开启' |
| | | } |
| | | ] |
| | | ) |
| | | |
| | | const dialogDetails = ref(false) |
| | | |
| | | const details = ref({}) |
| | | const viewRecord = (row) =>{ |
| | | details.value = JSON.parse(JSON.stringify(row)) |
| | | dialogDetails.value = true |
| | | } |
| | | |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | padding: 20px; |
| | | .homeCard{ |
| | | width: 100%; |
| | | padding: 20px; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | } |
| | | .el-row{ |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | .grid-content{ |
| | | align-items: center; |
| | | min-height: 36px; |
| | | } |
| | | |
| | | .topInfo { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | |
| | | &>div{ |
| | | white-space: nowrap; |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | } |
| | | .mainPages{ |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | } |
| | | .main-card{ |
| | | width: 100%; |
| | | .cardTop{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 20px; |
| | | .mainCardBtn{ |
| | | margin: 0; |
| | | } |
| | | } |
| | | } |
| | | .pageBtn{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: right; |
| | | margin-top: 20px; |
| | | |
| | | .demo-pagination-block + .demo-pagination-block { |
| | | margin-top: 10px; |
| | | } |
| | | .demo-pagination-block .demonstration { |
| | | margin-bottom: 16px; |
| | | } |
| | | } |
| | | } |
| | | .stepItem{ |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | margin-bottom: 30px; |
| | | margin-left: 30px; |
| | | padding-bottom: 30px; |
| | | border-left: 2px solid #ccc; |
| | | &:first-of-type{ |
| | | margin-top: 30px; |
| | | } |
| | | &:last-of-type{ |
| | | margin-bottom: 0; |
| | | border-left: none; |
| | | } |
| | | .stepNum { |
| | | width: 30px; |
| | | height: 30px; |
| | | border-radius: 15px; |
| | | box-sizing: border-box; |
| | | color: #333; |
| | | border: 1px solid #999; |
| | | line-height: 28px; |
| | | text-align: center; |
| | | margin-right: 10px; |
| | | margin-left: -16px; |
| | | margin-top: -30px; |
| | | } |
| | | .stepCard { |
| | | width: 100%; |
| | | margin-top: -30px; |
| | | |
| | | .box-card { |
| | | width: 100%; |
| | | &:deep(.el-card__header){ |
| | | padding: 10px 15px |
| | | } |
| | | .card-header { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | &>div:first-of-type{ |
| | | margin-right: 80px; |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | &:hover .card-header{ |
| | | color: #0098F5; |
| | | } |
| | | &:hover .stepNum{ |
| | | border: 2px solid #0098F5; |
| | | color: #0098F5; |
| | | } |
| | | } |
| | | .el-input{ |
| | | width: 100% !important; |
| | | } |
| | | :deep(.el-date-editor){ |
| | | width: 100%; |
| | | } |
| | | .el-select{ |
| | | width: 100%; |
| | | } |
| | | </style> |
文件名从 src/views/IntelligentXjSys/inspectionTaskManagement/inspectionTask/index.vue 修改 |
| | |
| | | </el-scrollbar> |
| | | <el-dialog v-model="dialogDetails" title="巡检任务"> |
| | | <el-form :model="details" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="任务名称"> |
| | | <el-input |
| | | v-model="details.name" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="任务类型"> |
| | | <el-input |
| | | v-model="details.type" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="执行巡检人员"> |
| | | <el-input |
| | | v-model="details.inspector" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="检查频次"> |
| | | <el-input |
| | | v-model="details.inspector" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="检查频次" prop="frequency"> |
| | | <el-input |
| | | v-model="details.frequency" |
| | |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="周期开始时间"> |
| | | <el-input |
| | | v-model="details.startTime" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="周期有效时间"> |
| | | <el-input |
| | | v-model="details.validTime" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 20px"> |
| | | <el-form-item label="巡检链"> |
| | | <div style="width: 100%;margin-left: -30px"> |
| | | <div v-for="(item,index) in details.shiftSteps" class="stepItem"> |
| | | <div class="stepNum">{{index+1}}</div> |
| | | <div class="stepCard"> |
| | | <el-card class="box-card" shadow="hover"> |
| | | <el-card class="box-card"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <div>{{item.name}}</div> |
| | | </div> |
| | | </template> |
| | | <div> |
| | | <el-table :data="item.inspectorData" style="width: 100%" :default-sort="{ prop: 'sort', order: 'ascending'}" :header-cell-style="{background: '#fafafa',padding: '5px'}"> |
| | | <el-table-column property="sort" sortable label="排序"/> |
| | | <div class="inspect-chain"> |
| | | <el-table :data="item.inspectorData" style="width: 100%" |
| | | :default-sort="{ prop: 'sort', order: 'ascending'}" |
| | | :header-cell-style="{background: '#fafafa',padding: '5px'}" |
| | | > |
| | | <el-table-column property="sort" label="排序"/> |
| | | <el-table-column property="name" label="巡检点名称"/> |
| | | <el-table-column property="section" label="所属设备区域"/> |
| | | <el-table-column property="rfid" label="关联RFID"/> |
| | |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="dialogDetails = false" size="default">确认</el-button> |
| | | </el-form-item> |
| | | </el-row> |
| | | </el-form> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogAddRecord" title="巡检任务编辑" @close="closeAdd" @open="openAdd"> |
| | | <el-form :model="addRecord" label-width="120px" ref="addRef" :rules="addRules"> |
| | | <el-row> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="任务名称" prop="name"> |
| | | <el-input |
| | | v-model="addRecord.name" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="任务类型" prop="type"> |
| | | <el-select v-model="addRecord.type"> |
| | | <el-option label="日常检查" value="日常检查" /> |
| | | <el-option label="周期检查" value="周期检查" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="执行巡检人员" prop="inspector"> |
| | | <el-select v-model="addRecord.inspector"> |
| | | <el-option label="张三" value="张三" /> |
| | | <el-option label="李四" value="李四" /> |
| | | </el-select> |
| | | <el-select v-model="addRecord.inspector"> |
| | | <el-option label="张三" value="张三" /> |
| | | <el-option label="李四" value="李四" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="检查频次" prop="frequency"> |
| | | <el-input |
| | | v-model="addRecord.frequency" |
| | | placeholder="请输入检查频次" |
| | | > |
| | | <template #append> |
| | | <el-select v-model="addRecord.unit" placeholder="选择单位"> |
| | | <el-option label="分钟" value="分钟" /> |
| | | <el-option label="小时" value="小时" /> |
| | | <el-option label="天" value="天" /> |
| | | </el-select> |
| | | </template> |
| | | </el-input> |
| | | <el-input |
| | | v-model="addRecord.frequency" |
| | | placeholder="请输入检查频次" |
| | | > |
| | | <template #append> |
| | | <el-select v-model="addRecord.unit" placeholder="选择单位"> |
| | | <el-option label="分钟" value="分钟" /> |
| | | <el-option label="小时" value="小时" /> |
| | | <el-option label="天" value="天" /> |
| | | </el-select> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="周期开始时间" prop="startTime"> |
| | | <el-date-picker |
| | | v-model="addRecord.startTime" |
| | |
| | | format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 20px"> |
| | | <el-form-item label="周期有效时间" prop="validTime"> |
| | | <el-select v-model="addRecord.validTime" placeholder="选择时间"> |
| | | <el-option label="15分钟" value="15分钟" /> |
| | |
| | | <el-option label="90分钟" value="90分钟" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="创建巡检链"> |
| | | <div style="width: 100%;margin-bottom: 20px"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="dialogAddShift = true">新增巡检设备区域</el-button> |
| | |
| | | <div v-for="(item,index) in addRecord.shiftSteps" class="stepItem"> |
| | | <div class="stepNum">{{index+1}}</div> |
| | | <div class="stepCard"> |
| | | <el-card class="box-card" shadow="hover"> |
| | | <el-card class="box-card"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <div>{{item.name}}</div> |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <div> |
| | | <el-button type="primary" size="default" :icon="Plus" plain @click="addSysInspection(index)" style="margin-bottom: 10px">新增系统巡检点</el-button> |
| | | <div class="inspect-chain" style="display: flex;flex-direction: column;align-items: center"> |
| | | <el-button type="primary" size="default" :icon="Plus" plain @click="addSysInspection(index)" style="margin-bottom: 10px">添加巡检点</el-button> |
| | | <el-table |
| | | :data="item.inspectorData" |
| | | style="width: 100%" |
| | | :default-sort="{ prop: 'sort', order: 'ascending' }" |
| | | :header-cell-style="{background: '#fafafa',padding: '5px'}" |
| | | > |
| | | <el-table-column property="sort" sortable label="排序"/> |
| | | <el-table-column property="sort" label="排序"/> |
| | | <el-table-column property="name" label="巡检点名称"/> |
| | | <el-table-column property="section" label="所属设备区域"/> |
| | | <el-table-column property="rfid" label="关联RFID"/> |
| | |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form-item> |
| | | <el-button type="warning" @click="dialogAddRecord = false" size="default" plain>取消</el-button> |
| | | <el-button type="primary" @click="confirmAddRecord(addRef)" size="default">确认</el-button> |
| | |
| | | chosenShiftIndex.value = -1 |
| | | } |
| | | const editRecord =(index, row)=>{ |
| | | dialogAddRecord.value = true |
| | | chosenIndex.value = index |
| | | dialogAddRecord.value = true |
| | | addRecord.value = JSON.parse(JSON.stringify(row)) |
| | | } |
| | | |
| | |
| | | .el-select{ |
| | | width: 100%; |
| | | } |
| | | |
| | | .inspect-chain :deep(.el-table__row){ |
| | | background: #fff; |
| | | |
| | | } |
| | | |
| | | .inspect-chain :deep(.el-table__cell){ |
| | | background: #fff; |
| | | } |
| | | </style> |
| | |
| | | interface type { |
| | | |
| | | } |
| | | // export default defineComponent({ |
| | | // name: 'workCheckinRecord', |
| | | // setup() { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({}); |
| | | const currentPage = ref(1) |
| | | const pageSize = ref(10) |
| | | const chosenIndex = ref(-1) |
| | | const handleSizeChange = (val: number) => { |
| | | console.log(`${val} items per page`) |
| | | } |
| | | const handleCurrentChange = (val: number) => { |
| | | console.log(`current page: ${val}`) |
| | | } |
| | | const tableData = reactive( |
| | | [ |
| | | { |
| | | id: '11011', |
| | | cardName: '动火作业证', |
| | | checkTime: '2021-04-22 15:21:31', |
| | | worker: '吴海涛', |
| | | result: '合格', |
| | | remark: '没意见' |
| | | }, |
| | | { |
| | | id: '11012', |
| | | cardName: '动火作业证', |
| | | checkTime: '2021-04-22 15:21:31', |
| | | worker: '吴沈峰', |
| | | result: '合格', |
| | | remark: '有点意见' |
| | | }, |
| | | ] |
| | | ) |
| | | const addRef = ref<FormInstance>() |
| | | const addRules = reactive<FormRules>({ |
| | | id:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | cardName:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | worker:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | result:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | checkTime:[{required: true, message: '该内容不能为空',trigger:'blur'}] |
| | | }) |
| | | const dialogDetails = ref(false) |
| | | const dialogAddRecord = ref(false) |
| | | const deleteDialog = ref(false) |
| | | const addRecord = ref({}) |
| | | const details = ref({}) |
| | | const viewRecord = (row) =>{ |
| | | details.value = JSON.parse(JSON.stringify(row)) |
| | | dialogDetails.value = true |
| | | } |
| | | const deleteRecord = (index) =>{ |
| | | chosenIndex.value = index |
| | | deleteDialog.value = true |
| | | } |
| | | const conFirmDelete = ()=> { |
| | | tableData.splice(chosenIndex.value,1) |
| | | deleteDialog.value = false |
| | | } |
| | | const confirmAddRecord = async (formEl: FormInstance | undefined) =>{ |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | if(chosenIndex.value == -1){ |
| | | tableData.push(addRecord.value) |
| | | }else{ |
| | | tableData[chosenIndex.value] = addRecord.value |
| | | } |
| | | dialogAddRecord.value =false |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | | }) |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | |
| | | // 分页 |
| | | const currentPage = ref(1) |
| | | const pageSize = ref(10) |
| | | |
| | | // 判断编辑和新增 |
| | | const chosenIndex = ref(-1) |
| | | |
| | | const handleSizeChange = (val: number) => { |
| | | console.log(`${val} items per page`) |
| | | } |
| | | const handleCurrentChange = (val: number) => { |
| | | console.log(`current page: ${val}`) |
| | | } |
| | | const tableData = reactive( |
| | | [ |
| | | { |
| | | id: '11011', |
| | | cardName: '动火作业证', |
| | | checkTime: '2021-04-22 15:21:31', |
| | | worker: '吴海涛', |
| | | result: '合格', |
| | | remark: '没意见' |
| | | }, |
| | | { |
| | | id: '11012', |
| | | cardName: '动火作业证', |
| | | checkTime: '2021-04-22 15:21:31', |
| | | worker: '吴沈峰', |
| | | result: '合格', |
| | | remark: '有点意见' |
| | | }, |
| | | ] |
| | | ) |
| | | const addRef = ref<FormInstance>() |
| | | const addRules = reactive<FormRules>({ |
| | | id:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | cardName:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | worker:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | result:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | checkTime:[{required: true, message: '该内容不能为空',trigger:'blur'}] |
| | | }) |
| | | |
| | | const dialogDetails = ref(false) |
| | | const dialogAddRecord = ref(false) |
| | | const deleteDialog = ref(false) |
| | | const addRecord = ref({}) |
| | | const details = ref({}) |
| | | |
| | | // 查看记录 |
| | | const viewRecord = (row) =>{ |
| | | details.value = JSON.parse(JSON.stringify(row)) |
| | | dialogDetails.value = true |
| | | } |
| | | |
| | | // 删除记录 |
| | | const deleteRecord = (index) =>{ |
| | | chosenIndex.value = index |
| | | deleteDialog.value = true |
| | | } |
| | | |
| | | // 弹窗确认删除记录 |
| | | const conFirmDelete = ()=> { |
| | | tableData.splice(chosenIndex.value,1) |
| | | deleteDialog.value = false |
| | | } |
| | | |
| | | // 弹窗确认新增记录 |
| | | const confirmAddRecord = async (formEl: FormInstance | undefined) =>{ |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | if(chosenIndex.value == -1){ |
| | | tableData.push(addRecord.value) |
| | | }else{ |
| | | tableData[chosenIndex.value] = addRecord.value |
| | | } |
| | | dialogAddRecord.value =false |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | | const closeAdd =()=>{ |
| | | addRecord.value={} |
| | | chosenIndex.value = -1 |
| | | } |
| | | const indexClear = ()=>{ |
| | | chosenIndex.value = -1 |
| | | } |
| | | const editRecord =(index, row)=>{ |
| | | dialogAddRecord.value = true |
| | | chosenIndex.value = index |
| | | addRecord.value = JSON.parse(JSON.stringify(row)) |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | // return { |
| | | // renderMenu, |
| | | // multipleTableRef, |
| | | // tableData, |
| | | // currentPage, |
| | | // pageSize, |
| | | // dialogDetails, |
| | | // details, |
| | | // deleteDialog, |
| | | // dialogAddRecord, |
| | | // viewRecord, |
| | | // deleteRecord, |
| | | // handleSizeChange, |
| | | // handleCurrentChange, |
| | | // Plus, |
| | | // Edit, |
| | | // Delete, |
| | | // Search, |
| | | // Download, |
| | | // handleSelectionChange, |
| | | // Refresh, |
| | | // ...toRefs(state), |
| | | // }; |
| | | // }, |
| | | // }); |
| | | }) |
| | | |
| | | } |
| | | // 新增弹窗关闭时的数据初始化处理 |
| | | const closeAdd =()=>{ |
| | | addRecord.value={} |
| | | chosenIndex.value = -1 |
| | | } |
| | | const indexClear = ()=>{ |
| | | chosenIndex.value = -1 |
| | | } |
| | | |
| | | // 修改编辑记录 |
| | | const editRecord =(index, row)=>{ |
| | | dialogAddRecord.value = true |
| | | chosenIndex.value = index |
| | | addRecord.value = JSON.parse(JSON.stringify(row)) |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | <el-row class="homeCard"> |
| | | <el-col :span="12"> |
| | | <div class="grid-content topInfo"> |
| | | <el-select v-model="searchType" placeholder="请选择" style="width: 100%"> |
| | | <el-select v-model="searchType"> |
| | | <el-option label="动火作业" value="动火作业" /> |
| | | <el-option label="动土作业" value="动土作业" /> |
| | | </el-select> |
| | | <el-input v-model="searchWord" placeholder="作业证编号"></el-input> |
| | | <el-input v-model="searchWord" placeholder="申请单位"></el-input> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button plain>重置</el-button> |
| | | <el-button-group style="display: flex;margin-left: 12px"> |
| | | <el-button plain :icon="Download"></el-button> |
| | | <el-button plain :icon="Refresh"></el-button> |
| | | </el-button-group> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="homeCard"> |
| | | <div class="main-card"> |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="dialogAddRecord=true">新建</el-button> |
| | | <!-- <el-button type="warning" :icon="Edit" size="default" plain>修改</el-button>--> |
| | | <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default"/> |
| | | </el-row> |
| | | <el-table |
| | | ref="multipleTableRef" |
| | | :data="tableData" |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column property="id" label="作业证编号" width="300" sortable /> |
| | | <el-table-column property="cardName" label="作业证名称" width="300" /> |
| | | <el-table-column property="name" label="申请人" width="300" /> |
| | | <el-table-column property="department" label="申请部门" /> |
| | | <el-table-column property="date" label="归档日期" sortable /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="180"> |
| | | <el-table-column property="id" label="作业证编号" width="200" sortable/> |
| | | <el-table-column property="cardName" label="作业证名称" width="180" /> |
| | | <el-table-column property="name" label="申请人"/> |
| | | <el-table-column property="department" label="申请部门"/> |
| | | <el-table-column property="date" label="归档日期" sortable/> |
| | | <el-table-column fixed="right" label="操作" align="center" width="250"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="">查看</el-button> |
| | | <el-button link type="danger" size="small" @click="">删除</el-button> |
| | | <el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看</el-button> |
| | | <el-button link type="danger" size="small" :icon="Delete" @click="deleteRecord(scope.$index)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | /> |
| | | </div> |
| | | </div> |
| | | <el-dialog v-model="dialogDetails" title="签到记录" @close="dialogColse"> |
| | | </el-scrollbar> |
| | | <el-dialog v-model="dialogDetails" title="作业票查看"> |
| | | <el-form :model="details" label-width="120px"> |
| | | <el-form-item label="作业证编号"> |
| | | <el-input v-model="details.id" readonly/> |
| | | </el-form-item> |
| | | <el-form-item label="签到人"> |
| | | <el-input |
| | | v-model="details.worker" |
| | | class="input-with-select" |
| | | readonly |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | v-model="details.id" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="签到状态">--> |
| | | <!-- <el-select v-model="details.status" readonly>--> |
| | | <!-- <el-option label="已签到" value="已签到" />--> |
| | | <!-- <el-option label="未签到" value="未签到" />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="签到时间"> |
| | | <el-input v-model="details.checkinTime" readonly/> |
| | | <el-form-item label="作业证名称"> |
| | | <el-input |
| | | v-model="details.cardName" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="details.remark" type="textarea" readonly/> |
| | | <el-form-item label="申请人"> |
| | | <el-input |
| | | v-model="details.name" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="申请部门"> |
| | | <el-input |
| | | v-model="details.department" |
| | | class="input-with-select" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="归档日期"> |
| | | <el-input |
| | | v-model="details.date" |
| | | class="input-with-select" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="dialogDetails = false" size="default">确认</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | </el-scrollbar> |
| | | <el-dialog v-model="deleteDialog" title="提示" width="30%" center @close="indexClear"> |
| | | <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" v-throttle>确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { toRefs, reactive, defineComponent, ref } from 'vue'; |
| | | <script lang="ts" setup> |
| | | import { toRefs, reactive, ref } from 'vue'; |
| | | import { storeToRefs } from 'pinia'; |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | import { Session } from '/@/utils/storage'; |
| | | import { Plus, Edit, Delete, Refresh, Search, Download } from '@element-plus/icons-vue' |
| | | import { Edit, View, Plus, Delete, Refresh, Search, Download } from '@element-plus/icons-vue' |
| | | import { ElTable } from 'element-plus' |
| | | import { FormInstance, FormRules } from 'element-plus' |
| | | let global: any = { |
| | | homeChartOne: null, |
| | | homeChartTwo: null, |
| | |
| | | interface type { |
| | | |
| | | } |
| | | interface User { |
| | | date: string |
| | | name: string |
| | | address: string |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | |
| | | // 分页 |
| | | const currentPage = ref(1) |
| | | const pageSize = ref(10) |
| | | |
| | | // 顶部查询 |
| | | const searchType = ref('') |
| | | const searchWord = ref('') |
| | | |
| | | // 判断编辑和新增 |
| | | const chosenIndex = ref(-1) |
| | | |
| | | const handleSizeChange = (val: number) => { |
| | | console.log(`${val} items per page`) |
| | | } |
| | | export default defineComponent({ |
| | | name: 'gasCheckAnalyze', |
| | | setup() { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({}); |
| | | const multipleTableRef = ref<InstanceType<typeof ElTable>>() |
| | | const multipleSelection = ref<User[]>([]) |
| | | const handleSelectionChange = (val: User[]) => { |
| | | multipleSelection.value = val |
| | | const handleCurrentChange = (val: number) => { |
| | | console.log(`current page: ${val}`) |
| | | } |
| | | const tableData = reactive( |
| | | [ |
| | | { |
| | | id: '11011', |
| | | cardName: '动火作业证', |
| | | name: '吴海涛', |
| | | department: '动火部门', |
| | | date: '2021-04-22 15:21:31' |
| | | }, |
| | | { |
| | | id: '11011', |
| | | cardName: '动火作业证', |
| | | name: '吴海涛', |
| | | department: '动火部门', |
| | | date: '2021-04-22 15:21:31' |
| | | } |
| | | const currentPage = ref(1) |
| | | const pageSize = ref(10) |
| | | const handleSizeChange = (val: number) => { |
| | | console.log(`${val} items per page`) |
| | | } |
| | | const handleCurrentChange = (val: number) => { |
| | | console.log(`current page: ${val}`) |
| | | } |
| | | const tableData: User[] = [ |
| | | { |
| | | id: '11011', |
| | | cardName: '动火作业证', |
| | | name: '吴沈峰', |
| | | department: '土木部', |
| | | date: '2021-04-22 15:21:31' |
| | | ] |
| | | ) |
| | | const addRef = ref<FormInstance>() |
| | | const addRules = reactive<FormRules>({ |
| | | id:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | cardName:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | name:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | department:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | date:[{required: true, message: '该内容不能为空',trigger:'blur'}] |
| | | }) |
| | | |
| | | const dialogDetails = ref(false) |
| | | const dialogAddRecord = ref(false) |
| | | const deleteDialog = ref(false) |
| | | const addRecord = ref({}) |
| | | const details = ref({}) |
| | | |
| | | // 查看记录 |
| | | const viewRecord = (row) =>{ |
| | | details.value = JSON.parse(JSON.stringify(row)) |
| | | dialogDetails.value = true |
| | | } |
| | | |
| | | // 删除记录 |
| | | const deleteRecord = (index) =>{ |
| | | chosenIndex.value = index |
| | | deleteDialog.value = true |
| | | } |
| | | |
| | | // 弹窗确认删除记录 |
| | | const conFirmDelete = ()=> { |
| | | tableData.splice(chosenIndex.value,1) |
| | | deleteDialog.value = false |
| | | } |
| | | |
| | | // 弹窗确认新增记录 |
| | | const confirmAddRecord = async (formEl: FormInstance | undefined) =>{ |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | if(chosenIndex.value == -1){ |
| | | tableData.push(addRecord.value) |
| | | }else{ |
| | | tableData[chosenIndex.value] = addRecord.value |
| | | } |
| | | ] |
| | | const dialogDetails = ref(false) |
| | | const details = ref({}) |
| | | const viewDetails = (row)=> { |
| | | console.log(row,'row') |
| | | details.value = JSON.parse(JSON.stringify(row)) |
| | | console.log(details,'details') |
| | | dialogDetails.value = true |
| | | dialogAddRecord.value =false |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | return { |
| | | renderMenu, |
| | | multipleTableRef, |
| | | tableData, |
| | | currentPage, |
| | | pageSize, |
| | | dialogDetails, |
| | | details, |
| | | viewDetails, |
| | | handleSizeChange, |
| | | handleCurrentChange, |
| | | Plus, |
| | | Edit, |
| | | Delete, |
| | | Search, |
| | | Download, |
| | | handleSelectionChange, |
| | | Refresh, |
| | | ...toRefs(state), |
| | | }; |
| | | }, |
| | | }); |
| | | }) |
| | | |
| | | } |
| | | // 新增弹窗关闭时的数据初始化处理 |
| | | const closeAdd =()=>{ |
| | | addRecord.value={} |
| | | chosenIndex.value = -1 |
| | | } |
| | | const indexClear = ()=>{ |
| | | chosenIndex.value = -1 |
| | | } |
| | | |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | } |
| | | } |
| | | } |
| | | .el-input{ |
| | | width: 100% !important; |
| | | } |
| | | .el-date-editor::v-deep{ |
| | | width: 100%; |
| | | } |
| | | .el-select{ |
| | | width: 100%; |
| | | } |
| | | </style> |
| | |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="dialogAddRecord=true">新建审批环节</el-button> |
| | | <!-- <el-button type="warning" :icon="Edit" size="default" plain>修改</el-button>--> |
| | | <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default"/> |
| | |
| | | interface type { |
| | | |
| | | } |
| | | // export default defineComponent({ |
| | | // name: 'workCheckinRecord', |
| | | // setup() { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({}); |
| | | const currentPage = ref(1) |
| | | const pageSize = ref(10) |
| | | const chosenIndex = ref(-1) |
| | | const handleSizeChange = (val: number) => { |
| | | console.log(`${val} items per page`) |
| | | } |
| | | const handleCurrentChange = (val: number) => { |
| | | console.log(`current page: ${val}`) |
| | | } |
| | | const tableData = reactive( |
| | | [ |
| | | { |
| | | processName: '作业负责人审批', |
| | | approveType: '上报审批意见', |
| | | creater: '李四', |
| | | createTime: '2021-04-22 15:21:31', |
| | | updater: '吴海涛', |
| | | updateTime: '2022-04-22 15:21:31', |
| | | }, |
| | | { |
| | | processName: '作业负责人审批', |
| | | approveType: '上报气体检测数据', |
| | | creater: '李四', |
| | | createTime: '2021-04-22 15:21:31', |
| | | updater: '吴海涛', |
| | | updateTime: '2022-04-22 15:21:31', |
| | | }, |
| | | ] |
| | | ) |
| | | const timeForm = { |
| | | hour12: false, |
| | | year: 'numeric', |
| | | month: '2-digit', |
| | | day: '2-digit', |
| | | hour: '2-digit', |
| | | minute: '2-digit', |
| | | second: '2-digit' |
| | | } |
| | | const addRef = ref<FormInstance>() |
| | | const addRules = reactive<FormRules>({ |
| | | processName:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | approveType:[{required: true, message: '该内容不能为空',trigger:'blur'}] |
| | | }) |
| | | const dialogDetails = ref(false) |
| | | const dialogAddRecord = ref(false) |
| | | const deleteDialog = ref(false) |
| | | const addRecord = ref({}) |
| | | const details = ref({}) |
| | | const viewRecord = (row) =>{ |
| | | details.value = JSON.parse(JSON.stringify(row)) |
| | | dialogDetails.value = true |
| | | } |
| | | const deleteRecord = (index) =>{ |
| | | chosenIndex.value = index |
| | | deleteDialog.value = true |
| | | } |
| | | const conFirmDelete = ()=> { |
| | | tableData.splice(chosenIndex.value,1) |
| | | deleteDialog.value = false |
| | | } |
| | | const confirmAddRecord = async (formEl: FormInstance | undefined) =>{ |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | if(chosenIndex.value == -1){ |
| | | addRecord.value.createTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | addRecord.value.updateTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | tableData.push(addRecord.value) |
| | | }else{ |
| | | addRecord.value.updateTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | tableData[chosenIndex.value] = addRecord.value |
| | | } |
| | | dialogAddRecord.value =false |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | | }) |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | |
| | | // 分页 |
| | | const currentPage = ref(1) |
| | | const pageSize = ref(10) |
| | | |
| | | const handleSizeChange = (val: number) => { |
| | | console.log(`${val} items per page`) |
| | | } |
| | | const handleCurrentChange = (val: number) => { |
| | | console.log(`current page: ${val}`) |
| | | } |
| | | |
| | | // 判断新增和修改 |
| | | const chosenIndex = ref(-1) |
| | | |
| | | const tableData = reactive( |
| | | [ |
| | | { |
| | | processName: '作业负责人审批', |
| | | approveType: '上报审批意见', |
| | | creater: '李四', |
| | | createTime: '2021-04-22 15:21:31', |
| | | updater: '吴海涛', |
| | | updateTime: '2022-04-22 15:21:31', |
| | | }, |
| | | { |
| | | processName: '作业负责人审批', |
| | | approveType: '上报气体检测数据', |
| | | creater: '李四', |
| | | createTime: '2021-04-22 15:21:31', |
| | | updater: '吴海涛', |
| | | updateTime: '2022-04-22 15:21:31', |
| | | }, |
| | | ] |
| | | ) |
| | | |
| | | // 时间格式化 |
| | | const timeForm = { |
| | | hour12: false, |
| | | year: 'numeric', |
| | | month: '2-digit', |
| | | day: '2-digit', |
| | | hour: '2-digit', |
| | | minute: '2-digit', |
| | | second: '2-digit' |
| | | } |
| | | |
| | | const addRef = ref<FormInstance>() |
| | | const addRules = reactive<FormRules>({ |
| | | processName:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | approveType:[{required: true, message: '该内容不能为空',trigger:'blur'}] |
| | | }) |
| | | const dialogDetails = ref(false) |
| | | const dialogAddRecord = ref(false) |
| | | const deleteDialog = ref(false) |
| | | const addRecord = ref({}) |
| | | const details = ref({}) |
| | | |
| | | // 查看记录 |
| | | const viewRecord = (row) =>{ |
| | | details.value = JSON.parse(JSON.stringify(row)) |
| | | dialogDetails.value = true |
| | | } |
| | | |
| | | // 删除记录 |
| | | const deleteRecord = (index) =>{ |
| | | chosenIndex.value = index |
| | | deleteDialog.value = true |
| | | } |
| | | const conFirmDelete = ()=> { |
| | | tableData.splice(chosenIndex.value,1) |
| | | deleteDialog.value = false |
| | | } |
| | | |
| | | // 新增修改记录 |
| | | const confirmAddRecord = async (formEl: FormInstance | undefined) =>{ |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | if(chosenIndex.value == -1){ |
| | | addRecord.value.createTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | addRecord.value.updateTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | tableData.push(addRecord.value) |
| | | }else{ |
| | | addRecord.value.updateTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | tableData[chosenIndex.value] = addRecord.value |
| | | } |
| | | dialogAddRecord.value =false |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | | const closeAdd =()=>{ |
| | | addRecord.value={} |
| | | chosenIndex.value = -1 |
| | | } |
| | | const indexClear = ()=>{ |
| | | chosenIndex.value = -1 |
| | | } |
| | | const editRecord =(index, row)=>{ |
| | | dialogAddRecord.value = true |
| | | chosenIndex.value = index |
| | | addRecord.value = JSON.parse(JSON.stringify(row)) |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | // return { |
| | | // renderMenu, |
| | | // multipleTableRef, |
| | | // tableData, |
| | | // currentPage, |
| | | // pageSize, |
| | | // dialogDetails, |
| | | // details, |
| | | // deleteDialog, |
| | | // dialogAddRecord, |
| | | // viewRecord, |
| | | // deleteRecord, |
| | | // handleSizeChange, |
| | | // handleCurrentChange, |
| | | // Plus, |
| | | // Edit, |
| | | // Delete, |
| | | // Search, |
| | | // Download, |
| | | // handleSelectionChange, |
| | | // Refresh, |
| | | // ...toRefs(state), |
| | | // }; |
| | | // }, |
| | | // }); |
| | | }) |
| | | |
| | | } |
| | | |
| | | // 编辑弹窗关闭时数据初始化处理 |
| | | const closeAdd =()=>{ |
| | | addRecord.value={} |
| | | chosenIndex.value = -1 |
| | | } |
| | | const indexClear = ()=>{ |
| | | chosenIndex.value = -1 |
| | | } |
| | | |
| | | // 修改记录 |
| | | const editRecord =(index, row)=>{ |
| | | dialogAddRecord.value = true |
| | | chosenIndex.value = index |
| | | addRecord.value = JSON.parse(JSON.stringify(row)) |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | interface type { |
| | | |
| | | } |
| | | // export default defineComponent({ |
| | | // name: 'workCheckinRecord', |
| | | // setup() { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({}); |
| | | const currentPage = ref(1) |
| | | const pageSize = ref(10) |
| | | const chosenIndex = ref(-1) |
| | | const handleSizeChange = (val: number) => { |
| | | console.log(`${val} items per page`) |
| | | } |
| | | const handleCurrentChange = (val: number) => { |
| | | console.log(`current page: ${val}`) |
| | | } |
| | | const tableData = reactive( |
| | | [ |
| | | { |
| | | approveType: '单人审批', |
| | | creater: '李四', |
| | | createTime: '2021-04-22 15:21:31', |
| | | updater: '吴海涛', |
| | | updateTime: '2022-04-22 15:21:31', |
| | | }, |
| | | { |
| | | approveType: '多人同时审批', |
| | | creater: '李四', |
| | | createTime: '2021-04-22 15:21:31', |
| | | updater: '吴海涛', |
| | | updateTime: '2022-04-22 15:21:31', |
| | | }, |
| | | ] |
| | | ) |
| | | const timeForm = { |
| | | hour12: false, |
| | | year: 'numeric', |
| | | month: '2-digit', |
| | | day: '2-digit', |
| | | hour: '2-digit', |
| | | minute: '2-digit', |
| | | second: '2-digit' |
| | | } |
| | | const addRef = ref<FormInstance>() |
| | | const addRules = reactive<FormRules>({ |
| | | approveType:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | }) |
| | | const dialogDetails = ref(false) |
| | | const dialogAddRecord = ref(false) |
| | | const deleteDialog = ref(false) |
| | | const addRecord = ref({}) |
| | | const details = ref({}) |
| | | const viewRecord = (row) =>{ |
| | | details.value = JSON.parse(JSON.stringify(row)) |
| | | dialogDetails.value = true |
| | | } |
| | | const deleteRecord = (index) =>{ |
| | | chosenIndex.value = index |
| | | deleteDialog.value = true |
| | | } |
| | | const conFirmDelete = ()=> { |
| | | tableData.splice(chosenIndex.value,1) |
| | | deleteDialog.value = false |
| | | } |
| | | const confirmAddRecord = async (formEl: FormInstance | undefined) =>{ |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | if(chosenIndex.value == -1){ |
| | | addRecord.value.createTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | addRecord.value.updateTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | tableData.push(addRecord.value) |
| | | }else{ |
| | | addRecord.value.updateTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | tableData[chosenIndex.value] = addRecord.value |
| | | } |
| | | dialogAddRecord.value =false |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | | }) |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | |
| | | // 分页 |
| | | const currentPage = ref(1) |
| | | const pageSize = ref(10) |
| | | const chosenIndex = ref(-1) |
| | | const handleSizeChange = (val: number) => { |
| | | console.log(`${val} items per page`) |
| | | } |
| | | const handleCurrentChange = (val: number) => { |
| | | console.log(`current page: ${val}`) |
| | | } |
| | | const tableData = reactive( |
| | | [ |
| | | { |
| | | approveType: '单人审批', |
| | | creater: '李四', |
| | | createTime: '2021-04-22 15:21:31', |
| | | updater: '吴海涛', |
| | | updateTime: '2022-04-22 15:21:31', |
| | | }, |
| | | { |
| | | approveType: '多人同时审批', |
| | | creater: '李四', |
| | | createTime: '2021-04-22 15:21:31', |
| | | updater: '吴海涛', |
| | | updateTime: '2022-04-22 15:21:31', |
| | | }, |
| | | ] |
| | | ) |
| | | |
| | | // 时间格式化 |
| | | const timeForm = { |
| | | hour12: false, |
| | | year: 'numeric', |
| | | month: '2-digit', |
| | | day: '2-digit', |
| | | hour: '2-digit', |
| | | minute: '2-digit', |
| | | second: '2-digit' |
| | | } |
| | | const addRef = ref<FormInstance>() |
| | | const addRules = reactive<FormRules>({ |
| | | approveType:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | }) |
| | | const dialogDetails = ref(false) |
| | | const dialogAddRecord = ref(false) |
| | | const deleteDialog = ref(false) |
| | | const addRecord = ref({}) |
| | | const details = ref({}) |
| | | |
| | | // 查看记录 |
| | | const viewRecord = (row) =>{ |
| | | details.value = JSON.parse(JSON.stringify(row)) |
| | | dialogDetails.value = true |
| | | } |
| | | |
| | | // 删除记录 |
| | | const deleteRecord = (index) =>{ |
| | | chosenIndex.value = index |
| | | deleteDialog.value = true |
| | | } |
| | | const conFirmDelete = ()=> { |
| | | tableData.splice(chosenIndex.value,1) |
| | | deleteDialog.value = false |
| | | } |
| | | |
| | | // 修改记录 |
| | | const editRecord =(index, row)=>{ |
| | | dialogAddRecord.value = true |
| | | chosenIndex.value = index |
| | | addRecord.value = JSON.parse(JSON.stringify(row)) |
| | | } |
| | | |
| | | // 新增修改记录确认 |
| | | const confirmAddRecord = async (formEl: FormInstance | undefined) =>{ |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | if(chosenIndex.value == -1){ |
| | | addRecord.value.createTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | addRecord.value.updateTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | tableData.push(addRecord.value) |
| | | }else{ |
| | | addRecord.value.updateTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | tableData[chosenIndex.value] = addRecord.value |
| | | } |
| | | dialogAddRecord.value =false |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | | const closeAdd =()=>{ |
| | | addRecord.value={} |
| | | chosenIndex.value = -1 |
| | | } |
| | | const indexClear = ()=>{ |
| | | chosenIndex.value = -1 |
| | | } |
| | | const editRecord =(index, row)=>{ |
| | | dialogAddRecord.value = true |
| | | chosenIndex.value = index |
| | | addRecord.value = JSON.parse(JSON.stringify(row)) |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | // return { |
| | | // renderMenu, |
| | | // multipleTableRef, |
| | | // tableData, |
| | | // currentPage, |
| | | // pageSize, |
| | | // dialogDetails, |
| | | // details, |
| | | // deleteDialog, |
| | | // dialogAddRecord, |
| | | // viewRecord, |
| | | // deleteRecord, |
| | | // handleSizeChange, |
| | | // handleCurrentChange, |
| | | // Plus, |
| | | // Edit, |
| | | // Delete, |
| | | // Search, |
| | | // Download, |
| | | // handleSelectionChange, |
| | | // Refresh, |
| | | // ...toRefs(state), |
| | | // }; |
| | | // }, |
| | | // }); |
| | | }) |
| | | |
| | | } |
| | | const closeAdd =()=>{ |
| | | addRecord.value={} |
| | | chosenIndex.value = -1 |
| | | } |
| | | const indexClear = ()=>{ |
| | | chosenIndex.value = -1 |
| | | } |
| | | |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | } |
| | | ]) |
| | | const dialogAddForm = ref(false); |
| | | |
| | | // 判断新增修改参数 |
| | | const rowIndex = ref(-1) |
| | | |
| | | const reportForm = ref({ |
| | | type: '', |
| | | founder: '', |
| | |
| | | editor: '', |
| | | editeTime: '' |
| | | }) |
| | | |
| | | // 时间格式化 |
| | | const timeForm = { |
| | | hour12: false, |
| | | year: 'numeric', |
| | |
| | | minute: '2-digit', |
| | | second: '2-digit' |
| | | } |
| | | |
| | | // 新增记录 |
| | | const addReport = ()=>{ |
| | | dialogAddForm.value = true |
| | | }; |
| | | |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const addRules = reactive<FormRules>({ |
| | | type:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | founder:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | editor:[{required: true, message: '该内容不能为空',trigger:'blur'}] |
| | | }) |
| | | |
| | | // 新增修改记录确认 |
| | | const onSubmitAddForm = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 修改记录 |
| | | const editeRow = (index: number, row: User) =>{ |
| | | dialogAddForm.value = true |
| | | rowIndex.value = index |
| | | reportForm.value = JSON.parse(JSON.stringify(row)) |
| | | } |
| | | |
| | | // 删除记录 |
| | | const deleteRow = (index)=>{ |
| | | tableData.splice( index,1) |
| | | } |
| | | |
| | | // 弹窗关闭数据初始化 |
| | | const dialogColse = () =>{ |
| | | reportForm.value = { |
| | | type: '', |
| | |
| | | } |
| | | ] |
| | | ) |
| | | |
| | | // 时间格式化 |
| | | const timeForm = { |
| | | hour12: false, |
| | |
| | | const deleteDialog = ref(false) |
| | | const addRecord = ref({}) |
| | | const details = ref({}) |
| | | |
| | | // 查看记录 |
| | | const viewRecord = (row) =>{ |
| | | details.value = JSON.parse(JSON.stringify(row)) |
| | | dialogDetails.value = true |
| | | } |
| | | |
| | | // 删除记录 |
| | | const deleteRecord = (index) =>{ |
| | | chosenIndex.value = index |
| | | deleteDialog.value = true |
| | |
| | | tableData.splice(chosenIndex.value,1) |
| | | deleteDialog.value = false |
| | | } |
| | | |
| | | // 修改记录 |
| | | const editRecord =(index, row)=>{ |
| | | dialogAddRecord.value = true |
| | | chosenIndex.value = index |
| | | addRecord.value = JSON.parse(JSON.stringify(row)) |
| | | } |
| | | |
| | | // 新增修改记录确认 |
| | | const confirmAddRecord = async (formEl: FormInstance | undefined) =>{ |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | |
| | | } |
| | | const indexClear = ()=>{ |
| | | chosenIndex.value = -1 |
| | | } |
| | | const editRecord =(index, row)=>{ |
| | | dialogAddRecord.value = true |
| | | chosenIndex.value = index |
| | | addRecord.value = JSON.parse(JSON.stringify(row)) |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | |
| | | department: [{required:true,message: '该选项不能为空',trigger: 'blur'}], |
| | | manager: [{required:true,message: '该选项不能为空',trigger: 'blur'}] |
| | | }) |
| | | |
| | | // 确认新增 |
| | | const confirmClick = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | |
| | | const cancelClick=()=>{ |
| | | showAdd.value = false |
| | | } |
| | | |
| | | // 新增 |
| | | const addFlow = (index) => { |
| | | showAdd.value = true |
| | | chosenIndex.value = index |
| | | } |
| | | |
| | | // 删除记录 |
| | | const deleteFlow = (index) => { |
| | | if(approveSteps.length>1){ |
| | | deleteDialog.value = true |
| | |
| | | <el-tag type="success">{{ scope.row.status }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center" width="250"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看</el-button> |
| | | <el-button link type="danger" size="small" :icon="Delete" @click="deleteRecord(scope.$index)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="pageBtn"> |
| | |
| | | /> |
| | | </div> |
| | | </div> |
| | | <el-dialog v-model="dialogDetails" title="作业票查看"> |
| | | <el-form :model="details" label-width="120px"> |
| | | <el-form-item label="作业证编号"> |
| | | <el-input |
| | | v-model="details.num" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="作业证等级"> |
| | | <el-input |
| | | v-model="details.level" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="申请日期"> |
| | | <el-input |
| | | v-model="details.applyDate" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="申请人"> |
| | | <el-input |
| | | v-model="details.name" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="申请部门"> |
| | | <el-input |
| | | v-model="details.department" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="状态"> |
| | | <el-input |
| | | v-model="details.status" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="dialogDetails = false" size="default">确认</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | <el-dialog v-model="deleteDialog" title="提示" width="30%" center @close="indexClear"> |
| | | <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" v-throttle>确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </el-scrollbar> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="已通过" name="passed"> |
| | | <el-scrollbar height="100%"> |
| | | <el-row> |
| | | <div class="homeCard"> |
| | | <el-col :span="12"> |
| | | <el-col :span="8"> |
| | | <div class="grid-content topInfo"> |
| | | <el-input v-model="searchWord" placeholder="作业证名称"></el-input> |
| | | <el-button type="primary">查询</el-button> |
| | |
| | | const handleCurrentChange = (val: number) => { |
| | | console.log(`current page: ${val}`) |
| | | } |
| | | const applyData: User[] = [] |
| | | const applyData = reactive([ |
| | | |
| | | ]) |
| | | const chosenIndex = ref(-1) |
| | | const passedData: User[] = [] |
| | | const dialogDetails = ref(false) |
| | | const details = ref({}) |
| | | const deleteDialog = ref(false) |
| | | |
| | | // 查看记录 |
| | | const viewRecord = (row) =>{ |
| | | details.value = JSON.parse(JSON.stringify(row)) |
| | | dialogDetails.value = true |
| | | } |
| | | |
| | | // 删除记录 |
| | | const applyRecord = (index) =>{ |
| | | chosenIndex.value = index |
| | | deleteDialog.value = true |
| | | } |
| | | |
| | | // 弹窗确认删除记录 |
| | | const conFirmDelete = ()=> { |
| | | applyData.splice(chosenIndex.value,1) |
| | | deleteDialog.value = false |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |