| | |
| | | { label: '是', value: 1 }, |
| | | ]) |
| | | const tableData = ref([]) |
| | | const option = reactive({ |
| | | border: true, |
| | | stripe: false, |
| | | selection: true, |
| | | index: true, |
| | | indexLabel: '序号', |
| | | indexWidth: 60, |
| | | menuWidth: 150, |
| | | searchMenuSpan: 6, |
| | | viewBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | addBtn: false, |
| | | menu: true, |
| | | page: true, |
| | | height: 'auto', |
| | | calcHeight: 196, |
| | | column: [ |
| | | { label: '工单编号', prop: 'orderNumber', width: 170 }, |
| | | { label: '工单名称', prop: 'orderName', width: 150, overHidden: true, tooltip: true }, |
| | | { label: '所属部门', prop: 'department', overHidden: true, tooltip: true }, |
| | | { label: '发起任务时间', prop: 'startTime', width: 160, overHidden: true }, |
| | | { label: '关联算法', prop: 'aiType', overHidden: true, tooltip: true }, |
| | | { |
| | | label: '工单类型', |
| | | prop: 'type', |
| | | width: 110, |
| | | overHidden: true, |
| | | tooltip: true, |
| | | type: 'select', |
| | | dicData: [], |
| | | }, |
| | | { |
| | | label: '工单内容', |
| | | prop: 'content', |
| | | slot: true, |
| | | width: 152, |
| | | overHidden: true, |
| | | }, |
| | | { label: '创建人', prop: 'creator', width: 120, overHidden: true }, |
| | | { label: '处理人', prop: 'handler', width: 120, overHidden: true }, |
| | | { |
| | | slot: true, |
| | | hide: envName === 'jiangwu' ? true : false, |
| | | label: '复核状态', |
| | | prop: 'isReview', |
| | | width: 90, |
| | | }, |
| | | { label: '工单状态', prop: 'status', slot: true, width: 90 }, |
| | | ], |
| | | }) |
| | | const page = reactive({ |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | const inputMapShowDefaultCenter = ref(null) |
| | | const userInfo = computed(() => store.state.user.userInfo) |
| | | const permission = computed(() => store.state.user.permission); |
| | | // console.log('userInfo',permission.value); |
| | | |
| | | // 计算属性 |
| | | const firstRowData = computed(() => { |
| | | return tableData.value.length > 0 ? tableData.value[0] : null |
| | |
| | | function validData(value, defaultValue) { |
| | | return value !== undefined ? value : defaultValue |
| | | } |
| | | function findObject(array, prop) { |
| | | return array.find(item => item.prop === prop) |
| | | } |
| | | |
| | | // 获取工单类型标签 |
| | | function getTypeLabel(typeValue) { |
| | | const typeObj = types.value.find(item => item.value === typeValue) |
| | |
| | | label: value, |
| | | value: key, |
| | | })) |
| | | |
| | | const columnType = findObject(option.column, 'type') |
| | | columnType.dicData = types.value |
| | | allAlgorithms.value = info |
| | | |
| | | algorithms.value = ai_type?.map(item => ({ |
| | |
| | | job_name: item.job_name || '', |
| | | job_create_time: item.job_create_time || '', |
| | | isReview: item.is_review, |
| | | handle_user_id:item.handle_user_id |
| | | |
| | | } |
| | | }) |
| | | |
| | |
| | | try { |
| | | const response = await getstatusCount(params) |
| | | const statusCount = response.data.data || {} |
| | | console.log('数据',statusCount); |
| | | // console.log('数据',statusCount); |
| | | const totalCount = Object.values(statusCount).reduce((sum, count) => sum + (count || 0), 0) |
| | | tabs.value.forEach(tab => { |
| | | if (tab.name === 'all') { |
| | |
| | | |
| | | // 跳转后触发的Tab切换 |
| | | function handleTabChangeAfterJump() { |
| | | const isReview = findObject(option.column, 'isReview') |
| | | isReview.hide = !['all', 'completed', 'myTickets'].includes(activeTab.value) |
| | | handleReset() |
| | | page.currentPage = 1 |
| | | fetchTableData() |
| | |
| | | async function handleViewDetail(row) { |
| | | currentIndex.value = tableData.value.findIndex(item => item.id === row.id) |
| | | workType.value = row.work_type !== undefined ? Number(row.work_type) : 0 |
| | | |
| | | const detailData = { |
| | | ...row, |
| | | processingDetail: row.processing_details || '', |
| | |
| | | showQR: false, |
| | | latAndLon: _.round(detailData.location[0], 6) + ',' + _.round(detailData.location[1], 6), |
| | | } |
| | | console.log('currentDetail.value',currentDetail.value); |
| | | |
| | | detailVisible.value = true |
| | | handleTypeChange(currentDetail.value.type) |
| | |
| | | placeholder="请输入事件处理详情" |
| | | :rows="4" |
| | | style="width: 100%; margin-bottom: 10px" |
| | | :disabled="!isCurrentUserAssigned" |
| | | /> |
| | | </template> |
| | | <!-- 已完成和已完结状态显示只读文本 --> |
| | |
| | | <template v-else> 上传图片</template> |
| | | </div> |
| | | <el-upload |
| | | :disabled="!isCurrentUserAssigned" |
| | | v-if="hasProcessedAndOverBtnPermission()" |
| | | ref="uploadRef" |
| | | :action="'#'" |
| | |
| | | :loading="completeLoading" |
| | | @click="handleComplete" |
| | | icon="el-icon-circle-check" |
| | | :disabled="!isCurrentUserAssigned" |
| | | > |
| | | 完成工单 |
| | | </el-button> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { useStore } from 'vuex' |
| | | import { ref, computed, watch, nextTick } from 'vue'; |
| | | import { flowEvent, getStepInfo } from '@/api/tickets/ticket'; |
| | | import { getSmallImg, getShowImg } from '@/utils/util'; |
| | | import CreateQRcode from '@/components/CreateQRcode/CreateQRcode.vue'; |
| | | import { ElMessage} from 'element-plus'; |
| | | const store = useStore() |
| | | const userInfo = computed(() => store.state.user.userInfo) |
| | | console.log('userInfo',userInfo.value); |
| | | // 定义props |
| | | const props = defineProps({ |
| | | modelValue: { |
| | |
| | | } |
| | | }); |
| | | |
| | | // 定义emits |
| | | // 定义emits |
| | | |
| | | const emit = defineEmits([ |
| | | 'update:modelValue', |
| | | 'detail-success', |
| | |
| | | const isEditMode = computed(() => { |
| | | return props.currentDetail.status === -1; |
| | | }); |
| | | |
| | | // 是否有权限完成工单 |
| | | const isCurrentUserAssigned =computed(()=>{ |
| | | const handleUserId = props.currentDetail?.handle_user_id; |
| | | const currentUserId = userInfo.value?.user_id; |
| | | return !!handleUserId && !!currentUserId && String(handleUserId) === String(currentUserId); |
| | | }) |
| | | const formattedDetailFields = computed(() => { |
| | | const fields = [ |
| | | { label: '工单名称', value: props.currentDetail.orderName }, |
| | |
| | | |
| | | const mapStatus = (status) => { |
| | | const statusTextMap = { |
| | | '-1': '草稿', |
| | | 2: '待审核', |
| | | 0: '待处理', |
| | | 3: '处理中', |