| | |
| | | </el-form> |
| | | |
| | | <div class="gd-table-toolbar"> |
| | | <el-button color="#F2F3F5" @click="requester = !requester">我是{{ requester ? '需求方' : '服务方' }}</el-button> |
| | | |
| | | <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">新增</el-button> |
| | | <el-button :icon="Delete" color="#4C34FF" :disabled="!selectedIds.length" @click="handleDelete()">删除</el-button> |
| | | </div> |
| | |
| | | {{ getDictLabel(row.workOrderType, dictObj.workOrderType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" show-overflow-tooltip label="阶段状态" > |
| | | <el-table-column prop="status" show-overflow-tooltip label="阶段状态"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.workOrderStatus, dictObj.workOrderStatus).split('_')[0] }} |
| | | </template> |
| | |
| | | <el-table-column prop="createTime" show-overflow-tooltip label="工单创建时间" /> |
| | | <el-table-column label="操作" class-name="operation-btns"> |
| | | <template v-slot="{ row }"> |
| | | <el-link @click="openForm('view', row)">查看</el-link> |
| | | <!-- <el-link @click="openForm('edit', row)">编辑</el-link>--> |
| | | <el-link @click="openFormChange(row)">查看</el-link> |
| | | <!-- <el-link @click="openForm('edit', row)">编辑</el-link>--> |
| | | <el-link @click="handleDelete(row)">删除</el-link> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | import { onMounted, ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { getDeptTree } from '@/api/system/dept' |
| | | import { dateRangeFormat, getDictLabel } from '@ztzf/utils' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { gdWorkOrderPageApi, gdWorkOrderRemoveApi } from './orderManageApi' |
| | |
| | | current: 1, // 当前页 |
| | | size: 10, // 每页大小 |
| | | }) |
| | | const requester = ref(true) |
| | | const searchParams = ref(initSearchParams()) // 查询参数 |
| | | const dateRange = ref([]) // 执行时间范围 |
| | | const total = ref(0) // 总条数 |
| | |
| | | workOrderType: [], // 工单类型 |
| | | workOrderStatus: [], // 工单状态 |
| | | }) |
| | | const editStatus = ['11', '24', '25'] |
| | | provide('dictObj', dictObj) |
| | | const deptTree = ref([]) // 部门树 |
| | | const treeProps = { |
| | | label: 'name', |
| | | children: 'children', |
| | | } |
| | | provide('deptTree', deptTree) |
| | | provide('treeProps', treeProps) |
| | | provide('requester', requester) |
| | | provide('editStatus', editStatus) |
| | | |
| | | // 获取列表 |
| | | async function getList() { |
| | |
| | | }) |
| | | } |
| | | |
| | | function openFormChange(row) { |
| | | dialogVisible.value = true |
| | | nextTick(() => { |
| | | const mode = editStatus.includes(row.workOrderStatus) && requester.value ? 'edit' : 'view' |
| | | dialogRef.value?.open({ mode, row }) |
| | | }) |
| | | } |
| | | |
| | | // 删除 |
| | | async function handleDelete(row) { |
| | | const tips = row ? '该条' : '选中的项' |
| | |
| | | }) |
| | | } |
| | | |
| | | // 获取部门树 |
| | | function getDeptTreeFun() { |
| | | getDeptTree().then(res => { |
| | | deptTree.value = res.data.data |
| | | }) |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getList() |
| | | getDictList() |
| | | getDeptTreeFun() |
| | | }) |
| | | </script> |
| | | <style scoped lang="scss"></style> |