| | |
| | | /> |
| | | |
| | | <el-select |
| | | v-model="filters.create_dept" |
| | | placeholder="请选择所属单位" |
| | | v-model="filters.create_dept" |
| | | @change="handleDepartmentChange" |
| | | class="filter-item" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in departments" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | v-for="dept in departments" |
| | | :key="dept.value" |
| | | :label="dept.label" |
| | | :value="dept.value" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-date-picker |
| | | v-model="filters.dateRange" |
| | | type="daterange" |
| | | type="datetimerange" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | class="filter-item" |
| | | style="width: 80px" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100px" |
| | | /> |
| | | |
| | | |
| | | <el-select v-model="form.file_id" placeholder="请选择关联航线" class="filter-item" clearable > |
| | | <el-option |
| | | v-for="item in wayLineList" |
| | | :key="item.wayline_id" |
| | | :label="item.name" |
| | | :value="item.wayline_id" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-select |
| | | v-model="filters.file_id" |
| | | placeholder="请选择关联航线" |
| | | class="filter-item" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in wayLineList" |
| | | :key="item.wayline_id" |
| | | :label="item.name" |
| | | :value="item.wayline_id" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-select |
| | | v-model="filters.ai_types" |
| | |
| | | <avue-crud |
| | | :data="tableData" |
| | | :option="option" |
| | | :page.sync="pagination" |
| | | v-model:page="page" |
| | | ref="crud" |
| | | :table-loading="loading" |
| | | @current-change="handlePaginationChange" |
| | | @size-change="handlePaginationChange" |
| | | @current-change="currentChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | @search-change="searchChange" |
| | | @size-change="sizeChange" |
| | | > |
| | | <template #menu-left> |
| | | <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新建工单</el-button> |
| | |
| | | @close="resetForm" |
| | | > |
| | | <el-form :model="form" ref="form" label-width="100px"> |
| | | |
| | | |
| | | <div class="custom-steps-container"> |
| | | <!-- 标题行 --> |
| | | <div class="steps-titles" > |
| | | |
| | | <div v-for="(record, index) in form.record_list" :class="{ 'active': record.user_id >=0 }" :key="index" class="step-title" >{{record.status_str}}</div> |
| | | |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | | <!-- Element Steps 组件 --> |
| | | <el-steps :active="form.active" align-center class="custom-steps" > |
| | | |
| | | <el-step v-for="(record, index) in form.record_list" :key="index"> |
| | | <template #description> |
| | | <div class="step-description"> |
| | | {{record.user_name}} |
| | | <div class="custom-steps-container"> |
| | | <!-- 标题行 --> |
| | | <div class="steps-titles"> |
| | | <div |
| | | v-for="(record, index) in form.record_list" |
| | | :class="{ active: record.user_id >= 0 }" |
| | | :key="index" |
| | | class="step-title" |
| | | > |
| | | {{ record.status_str }} |
| | | </div> |
| | | </div> |
| | | <div class="step-description"> |
| | | {{record.create_time_str}} |
| | | </div> |
| | | |
| | | </template> |
| | | </el-step> |
| | | |
| | | |
| | | |
| | | <!-- Element Steps 组件 --> |
| | | <el-steps :active="form.active" align-center class="custom-steps"> |
| | | <el-step v-for="(record, index) in form.record_list" :key="index"> |
| | | <template #description> |
| | | <div class="step-description"> |
| | | {{ record.user_name }} |
| | | </div> |
| | | <div class="step-description"> |
| | | {{ record.create_time_str }} |
| | | </div> |
| | | </template> |
| | | </el-step> |
| | | </el-steps> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </el-steps> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工单名称" prop="name"> |
| | |
| | | |
| | | <el-col :span="3"> |
| | | <el-time-picker |
| | | style="width: 100px" |
| | | style="width: 100px" |
| | | v-model="form.deal_time" |
| | | prop="deal_time" |
| | | value-format="HH:mm" |
| | |
| | | orderLogPass, |
| | | orderLogExport, |
| | | } from '@/api/tickets/orderLog'; |
| | | import { getTicketInfo } from '@/api/tickets/ticket'; |
| | | import { getDictionary } from '@/api/system/dictbiz'; |
| | | import { getWaylineFileListByArea } from '@/api/resource/wayline'; |
| | | import { export_json_to_excel } from '@/utils/exportExcel'; |
| | |
| | | file_id: '', |
| | | ai_types: [], |
| | | status: '', |
| | | dateRange: null, |
| | | dateRange: [], |
| | | }, |
| | | departments: [], |
| | | types: [], |
| | |
| | | { label: '工单状态', prop: 'status', width: 60 }, |
| | | ], |
| | | }, |
| | | pagination: { |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | }, |
| | | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | this.types = word_order_typeResponse.data.data; |
| | | //获取航线 |
| | | this.asyncgetWaylineFileListByArea(); |
| | | const response2 = await getTicketInfo(); |
| | | const { dept_data, event_type, ai_type } = response2.data.data; |
| | | this.departments = dept_data.map(item => ({ |
| | | label: item.dept_name, |
| | | value: item.id, |
| | | })); |
| | | }, |
| | | mounted() { |
| | | this.fetchTableData(); |
| | |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | async onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(null, Object.assign(params, this.query)).then(res => { |
| | | getList( |
| | | null, |
| | | this.page.currentPage, |
| | | this.page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then(res => { |
| | | this.tableData = res.data.data; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | |
| | | |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | |
| | | try { |
| | | let params = this.getQueryParam(); |
| | | console.log('发送的参数:', params); |
| | | const response = await getList(params); |
| | | const response = await getList(params, this.page.currentPage, this.page.pageSize); |
| | | if (!response?.data?.data?.records) { |
| | | throw new Error('接口返回数据格式不正确'); |
| | | } |
| | |
| | | this.updateGlobalCounts(records, total); |
| | | } |
| | | |
| | | this.pagination.total = total || 0; |
| | | this.page.total = total || 0; |
| | | this.updateTabCounts(); |
| | | } catch (error) { |
| | | console.error('获取数据失败:', error); |
| | | this.$message.error(error.message || '获取数据失败'); |
| | | this.tableData = []; |
| | | this.pagination.total = 0; |
| | | this.page.total = 0; |
| | | } finally { |
| | | this.loading = false; |
| | | } |
| | |
| | | |
| | | getQueryParam() { |
| | | const currentTab = this.tabs.find(tab => tab.name === this.activeTab); |
| | | if (this.filters.dateRange) { |
| | | console.log( |
| | | 'this.formatDate(this.filters.dateRange[0])', |
| | | this.formatDate(this.filters.dateRange[0]) |
| | | ); |
| | | } |
| | | |
| | | const params = { |
| | | key_word: this.filters.key_word || undefined, |
| | |
| | | end_date: this.filters.dateRange?.[1] |
| | | ? this.formatDate(this.filters.dateRange[1]).replace('00:00:00', '23:59:59') |
| | | : undefined, |
| | | current: this.pagination.currentPage, |
| | | size: this.pagination.pageSize, |
| | | current: this.page.currentPage, |
| | | size: this.page.pageSize, |
| | | }; |
| | | return params; |
| | | }, |
| | | |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | async submitForm(status) { |
| | | this.$refs.form.validate(async valid => { |
| | | if (valid) { |
| | |
| | | handleTabChange(tab) { |
| | | this.activeTab = tab.props?.name || tab.name; |
| | | this.filters.status = ''; |
| | | this.pagination.currentPage = 1; |
| | | this.page.currentPage = 1; |
| | | this.fetchTableData(); |
| | | }, |
| | | |
| | | handleSearch() { |
| | | this.pagination.currentPage = 1; |
| | | this.page.currentPage = 1; |
| | | this.fetchTableData(); |
| | | }, |
| | | |
| | |
| | | dateRange: [], |
| | | status: '', |
| | | }; |
| | | this.pagination.currentPage = 1; |
| | | this.page.currentPage = 1; |
| | | this.fetchTableData(); |
| | | }, |
| | | |
| | | handlePaginationChange(val) { |
| | | this.pagination.currentPage = val.currentPage; |
| | | this.pagination.pageSize = val.pageSize; |
| | | this.fetchTableData(); |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | |
| | | updateGlobalCounts(records, total) { |
| | |
| | | margin-top: 7px; |
| | | } |
| | | |
| | | |
| | | |
| | | .custom-steps-container { |
| | | width: 100%; |
| | | margin: 20px 0; |
| | |
| | | } |
| | | |
| | | .step-title.active { |
| | | color: #409EFF; |
| | | color: #409eff; |
| | | font-weight: bold; |
| | | } |
| | | |
| | |
| | | color: #666; |
| | | line-height: 1.5; |
| | | } |
| | | |
| | | </style> |