| | |
| | | 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: '处理中', |