| | |
| | | </el-select> |
| | | </div> |
| | | <div class="basic-line"> |
| | | <span>部门:</span> |
| | | <el-cascader class="input-box" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="请选择部门" clearable v-model="tableData.params.execDepId" |
| | | @change="changeGroup" |
| | | > </el-cascader> |
| | | </div> |
| | | <div class="basic-line"> |
| | | <span>执行班组:</span> |
| | | <el-select v-model="tableData.params.execClassgroupId" clearable filterable class="input-box" placeholder="执行班组"> |
| | | <el-option v-for="item in classGroupList" :key="item.id" :label="item.groupName" :value="item.id"></el-option> |
| | |
| | | <div class="main-card"> |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openInspectTaskDialog('新增', {})">新建</el-button> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openInspectTaskDialog('新增', {})">新增</el-button> |
| | | <!-- <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>--> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default" /> |
| | |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column property="status" label="状态" width="60" /> |
| | | <el-table-column property="taskUnitStatus" label="状态" width="60"> |
| | | <template #default="scope"> |
| | | <div> |
| | | <div v-if="scope.row.taskUnitStatus === 1"> |
| | | <el-tag :type="''"> |
| | | {{ '开启' }} |
| | | </el-tag> |
| | | </div> |
| | | <div v-if="scope.row.taskUnitStatus === 2"> |
| | | <el-tag :type="'danger'"> |
| | | {{ '关闭' }} |
| | | </el-tag> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center" width="300"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" :icon="View" @click="openInspectTaskDialog('查看', scope.row)">查看</el-button> |
| | |
| | | params: { |
| | | pageIndex: number | null; |
| | | pageSize: number | null; |
| | | execDepId: number | null; |
| | | unitName: string | null; |
| | | workType: number | null; |
| | | createUserId: number | null; |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | unitName: null, |
| | | execDepId: null, |
| | | workType: null, |
| | | createUserId: null, |
| | | execClassgroupId: null, |
| | |
| | | } |
| | | }, |
| | | workTypeList: [ |
| | | { id: 1, name: '单次任务' }, |
| | | { id: 2, name: '周期任务' } |
| | | { id: 1, name: '周期任务' }, |
| | | { id: 2, name: '单次任务' } |
| | | ], |
| | | quotaList: [], |
| | | departmentList: [], |
| | |
| | | { id: 3, name: '日' }, |
| | | { id: 4, name: '月' }, |
| | | { id: 5, name: '年' } |
| | | ] |
| | | ], |
| | | }); |
| | | |
| | | //获取巡检任务数据 |
| | |
| | | }; |
| | | |
| | | //获取部门 |
| | | const getQuotaList = async () => { |
| | | let res = await inspectTaskApi().getQuotaList(); |
| | | if (res.data.code === '200') { |
| | | state.quotaList = res.data.data; |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }; |
| | | // const getQuotaList = async () => { |
| | | // let res = await inspectTaskApi().getQuotaList(); |
| | | // if (res.data.code === '200') { |
| | | // state.quotaList = res.data.data; |
| | | // } else { |
| | | // ElMessage({ |
| | | // type: 'warning', |
| | | // message: res.data.msg |
| | | // }); |
| | | // } |
| | | // }; |
| | | //获取部门 |
| | | const getQuotaList = async () => { |
| | | let res = await inspectTaskApi().getAllQuotaList(); |
| | | if (res.data.code === '200') { |
| | | state.quotaList = res.data.data; |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | //获取巡检点 |
| | | const getInspectTaskPoint = async () => { |
| | |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | const changeGroup = async () => { |
| | | if(state.tableData.params.execDepId === null) { |
| | | state.classGroupList = [] |
| | | }else{ |
| | | let res = await departmentApi().getByDepId({depId:state.tableData.params.execDepId}) |
| | | if(res.data.code === '200'){ |
| | | state.classGroupList = res.data.data |
| | | }else{ |
| | | |
| | | } |
| | | } |
| | | }; |
| | | |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | unitName: null, |
| | | execDepId: null, |
| | | workType: null, |
| | | createUserId: null, |
| | | execClassgroupId: null, |
| | |
| | | Plus, |
| | | reset, |
| | | changeStatus, |
| | | changeGroup, |
| | | parseNumber, |
| | | deleteInspectTask, |
| | | getInspectionTask, |