Merge branch 'master' of http://139.196.74.78:10010/r/jagzwxm/ja_web
18 files modified
5 files added
1 files deleted
| | |
| | | __INTLIFY_PROD_DEVTOOLS__: false, |
| | | }, |
| | | server: { |
| | | port: 5174, |
| | | port: 5177, |
| | | // host: '192.168.1.178', |
| | | proxy: { |
| | | '/api': { |
| | |
| | | // key: fs.readFileSync('./127.0.0.1+3-key.pem'), // 私钥路径 |
| | | // cert: fs.readFileSync('./127.0.0.1+3.pem'), // 证书路径 |
| | | // }, |
| | | port: 5175, |
| | | port: 5179, |
| | | proxy: { |
| | | '/aisky-webodm-vol': { |
| | | target: 'https://wrj.shuixiongit.com/aisky-webodm-vol', |
| | |
| | | innovationStatus: '', |
| | | }) |
| | | |
| | | // 从父组件注入字典数据 |
| | | const appInnovationStatusOptions = inject('appInnovationStatusOptions') |
| | | |
| | | const emit = defineEmits(['success']) |
| | | const formRef = ref(null) // 表单实例 |
| | | const formData = ref(initForm()) // 表单数据 |
| | |
| | | <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="openForm('edit', row)">编辑</el-link>--> |
| | | <el-link @click="handleDelete(row)">删除</el-link> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">相关附件</div> |
| | | <div class="val">{{ formData.attachName || '暂无附件' }}</div> |
| | | <div class="val">{{ formData.attachNames || '暂无附件' }}</div> |
| | | </el-col> |
| | | <el-col :span="12" v-if="detailObjectionStatus === '2'"> |
| | | <div class="label">其他异议详情</div> |
| | |
| | | > |
| | | 反馈 |
| | | </el-button> |
| | | <el-button |
| | | class="save-btn" |
| | | color="#4C34FF" |
| | | |
| | | :loading="submitting" |
| | | :disabled="submitting" |
| | | @click="handleDownloadAttach" |
| | | |
| | | > |
| | | 下载附件 |
| | | </el-button> |
| | | </template> |
| | | <template v-if="detailDemandStatus === '2'"> |
| | | <template v-if="detailObjectionStatus === '2'"> |
| | | <el-button color="#F2F3F5" :loading="submitting" :disabled="submitting" @click="visible = false">关闭</el-button> |
| | | </template> |
| | | </template> |
| | |
| | | import { |
| | | gdDataObjectionDetailApi, |
| | | gdDataObjectionSubmitApi, |
| | | getAttachDetailApi, |
| | | } from '@/views/orderView/orderDataManage/dataObjection/dataObjectionApi' |
| | | import { putFileAttachApi } from '@/views/orderView/orderDataManage/supplyAdd/supplyAddApi' |
| | | import { pxToRem } from '@/utils/rem' |
| | |
| | | const titleEnum = ref({ edit: '编辑', view: '查看', add: '数据异议申请' }) |
| | | const fileList = ref([]) // 上传文件列表 |
| | | const uploadedFiles = ref([]) // 已上传文件列表 |
| | | const attachmentDetailsList = ref([]) |
| | | |
| | | // 表单校验规则 |
| | | const rules = { |
| | |
| | | if (file.response && file.response.attachId) { |
| | | uploadedFiles.value = uploadedFiles.value.filter(item => item.attachId !== file.response.attachId) |
| | | } |
| | | // 更新formData中的附件信息 |
| | | formData.value.attachId = uploadedFiles.value.map(f => f.attachId).join(',') |
| | | formData.value.attachName = uploadedFiles.value.map(f => f.originalName).join(',') |
| | | } |
| | | |
| | | // 上传前验证 |
| | |
| | | link: fileData.link, |
| | | attachId: fileData.attachId, |
| | | }) |
| | | // 更新formData中的附件信息 |
| | | formData.value.attachId = uploadedFiles.value.map(f => f.attachId).join(',') |
| | | formData.value.attachName = uploadedFiles.value.map(f => f.originalName).join(',') |
| | | ElMessage.success('文件上传成功!') |
| | | } |
| | | } |
| | |
| | | const res = await gdDataObjectionDetailApi({ id: formData.value.id }) |
| | | formData.value = res?.data?.data ?? {} |
| | | } |
| | | // 获取附件详情 |
| | | async function getAttachDetail() { |
| | | if (!formData.value.id) return |
| | | const res = await getAttachDetailApi({ id: formData.value.id }) |
| | | console.log('附件详情',res.data.data) |
| | | attachmentDetailsList.value=res.data.data |
| | | } |
| | | // 处理附件下载 |
| | | async function handleDownloadAttach() { |
| | | console.log('附件'); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | // 打开弹框 |
| | | async function open({ mode = 'add', row } = {}) { |
| | |
| | | feedbackFormData.value = initFeedbackForm() |
| | | if (dialogMode.value !== 'add') { |
| | | await loadDetail() |
| | | await getAttachDetail() |
| | | } |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | // 获取附件详情 |
| | | export const getAttachDetailApi = params => { |
| | | return request({ |
| | | url: `/blade-resource/attach/detail`, |
| | | method: 'get', |
| | | params, |
| | | }) |
| | | } |
| | | |
| | |
| | | </el-row> |
| | | </div> |
| | | <!-- 申请中--> |
| | | <div v-if="detailDemandStatus === '1'"> |
| | | <div v-if="detailDemandStatus === '1' && !requesterProvider"> |
| | | <div class="detail-title">数据上传</div> |
| | | <div class="upload-container"> |
| | | <el-upload |
| | |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <template v-if="detailDemandStatus === '1'"> |
| | | <template v-if="detailDemandStatus === '1' && !requesterProvider"> |
| | | <el-button class="save-btn" color="#4C34FF" @click="rejectTheApplication">拒绝申请</el-button> |
| | | <el-button color="#F2F3F5" @click="approvedByTheReview">审核通过</el-button> |
| | | </template> |
| | |
| | | import { ElMessage } from 'element-plus' |
| | | import reasonForRejectionDialog from '@/views/orderView/orderDataManage/supplyAdd/reasonForRejectionDialog.vue' |
| | | import AuditRecord from '@/views/orderView/orderDataManage/supplyAdd/auditRecord.vue' // 导入新组件 |
| | | |
| | | import { useStore } from 'vuex' |
| | | const store = useStore() |
| | | const requesterProvider = computed(() => store.state.user.userInfo?.role_id === '2014158512610869250') |
| | | const emit = defineEmits(['success']) |
| | | const dictObj = inject('dictObj') |
| | | const deptTree = inject('deptTree') |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <template #footer v-if="!dialogReadonly"> |
| | | <el-button |
| | | class="save-btn" |
| | | color="#4C34FF" |
| | | v-if="!dialogReadonly" |
| | | :loading="submitting" |
| | | :disabled="submitting" |
| | | @click="handleSubmit" |
| | |
| | | <template> |
| | | <el-dialog class="gd-dialog" :close-on-click-modal="false" v-model="visible" title="查看" @closed="visible = false" width="1000px" destroy-on-close> |
| | | <div class="" v-loading="loading"> |
| | | <div class="gd-table-content-bg"> |
| | | <el-table :data="list"> |
| | | <el-dialog class="gd-dialog" v-model="visible" title="查看" @closed="visible = false" width="1000px" destroy-on-close> |
| | | <div class="gd-table-container" v-loading="loading" style="height: 600px"> |
| | | <div class="gd-table-content gd-table-content-bg"> |
| | | <el-table class="gd-table" :data="list"> |
| | | <el-table-column label="线索缩略图" width="120"> |
| | | <template v-slot="{ row }"> |
| | | <el-image |
| | |
| | | <el-table-column prop="distributeUserName" show-overflow-tooltip label="分发人员" /> |
| | | <el-table-column label="操作" class-name="operation-btns" width="140"> |
| | | <template v-slot="{ row }"> |
| | | <el-link @click="openDistributeDialog(row)" :disabled="row.distributeStatus === 1"> |
| | | <el-link v-if="row.distributeStatus === 0" @click="openDistributeDialog(row)" :disabled="row.distributeStatus === 1"> |
| | | 转为事件并分发 |
| | | </el-link> |
| | | <div class="disabled-text" v-else>转为事件并分发</div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | defineExpose({ open }) |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | | <style lang="scss" scoped> |
| | | .disabled-text { |
| | | color: #C0C4CC; |
| | | cursor: not-allowed; |
| | | } |
| | | </style> |
| | |
| | | <!-- 线索事件管理 --> |
| | | <template> |
| | | <basic-container> |
| | | <el-form ref="queryParamsRef" :model="searchParams" class="gd-search-form"> |
| | | <el-form-item label="任务名称" prop="patrolTaskName"> |
| | | <el-form-item label="模糊搜索" prop="patrolTaskName"> |
| | | <el-input |
| | | class="gd-input" |
| | | v-model="searchParams.patrolTaskName" |
| | |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="任务类型" prop="patrolTaskType"> |
| | | <el-form-item label="巡查任务类型" prop="patrolTaskType"> |
| | | <el-select |
| | | class="gd-select" |
| | | popper-class="gd-select-popper" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="任务状态" prop="taskStatus"> |
| | | <!-- <el-form-item label="任务状态" prop="taskStatus"> |
| | | <el-select |
| | | class="gd-select" |
| | | popper-class="gd-select-popper" |
| | |
| | | :value="item.dictKey" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | |
| | | <el-form-item label="执行时间" prop="executeTime"> |
| | | <el-date-picker |
| | |
| | | <el-table-column prop="executeTime" show-overflow-tooltip label="任务执行时间" /> |
| | | <el-table-column prop="workOrderName" show-overflow-tooltip label="关联工单" /> |
| | | <el-table-column prop="createTime" show-overflow-tooltip label="巡查任务创建时间" /> |
| | | <el-table-column prop="resultCount" show-overflow-tooltip label="线索数量" /> |
| | | <el-table-column prop="issueEventCount" show-overflow-tooltip label="转为问题" /> |
| | | <el-table-column prop="taskDesc" show-overflow-tooltip label="巡查任务描述" /> |
| | | <el-table-column label="操作" class-name="operation-btns"> |
| | | <template v-slot="{ row }"> |
| | | <el-link @click="viewDiaLogView(row)">查看</el-link> |
| | | <el-link @click="viewDiaLogView(row)">查看线索</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <!-- 巡查报告管理 --> |
| | | <template> |
| | | <basic-container> |
| | | 基础管理 |
| | | <el-form ref="queryParamsRef" :model="searchParams" class="gd-search-form"> |
| | | <el-form-item label="模糊搜索" prop="nickName"> |
| | | <el-input |
| | | class="gd-input" |
| | | v-model="searchParams.nickName" |
| | | placeholder="请输入" |
| | | clearable |
| | | @clear="handleSearch" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="文档类型" prop="resultType"> |
| | | <el-select |
| | | class="gd-select" |
| | | popper-class="gd-select-popper" |
| | | v-model="searchParams.resultType" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="handleSearch" |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.patrolTaskType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item class="gd-search-actions"> |
| | | <el-button :icon="RefreshRight" @click="resetForm"></el-button> |
| | | <el-button class="search-btn" :icon="Search" @click="handleSearch"></el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <div class="gd-table-toolbar"> |
| | | <el-button :icon="Download" color="#4C34FF" type="primary" @click="handleDownload">文档下载</el-button> |
| | | <el-button :icon="Upload" color="#4C34FF" type="primary" @click="handleUpload">文档上传</el-button> |
| | | </div> |
| | | |
| | | <div class="gd-table-container" v-loading="loading"> |
| | | <div class="gd-table-content gd-table-content-bg"> |
| | | <el-table class="gd-table" :data="list" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="46" /> |
| | | <el-table-column type="index" width="64" label="序号" /> |
| | | <el-table-column prop="nickName" show-overflow-tooltip label="文档名称" /> |
| | | <el-table-column prop="attachSize" show-overflow-tooltip label="文档大小" /> |
| | | <el-table-column prop="deptName" show-overflow-tooltip label="文档归属" /> |
| | | <!-- <el-table-column prop="resultType" show-overflow-tooltip label="文档类型" /> --> |
| | | <el-table-column prop="resultType" show-overflow-tooltip label="文档类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.resultType, dictObj.patrolTaskType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" class-name="operation-btns"> |
| | | <template v-slot="{ row }"> |
| | | <el-link @click="seeOnlineWord(item)">查看</el-link> |
| | | <el-link @click="openForm(row)">在线编辑</el-link> |
| | | <el-link @click="handleDelete(row)">删除</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <div class="gd-pagination-parent"> |
| | | <el-pagination |
| | | popper-class="gd-select-popper" |
| | | v-model:current-page="searchParams.current" |
| | | v-model:page-size="searchParams.size" |
| | | layout="total, prev, pager, next, sizes" |
| | | :total="total" |
| | | @change="getList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <el-dialog class="gd-dialog" append-to-body v-model="isShowEditView" :title="titleTxt" |
| | | :width="pxToRem(800)" :close-on-click-modal="false" :destroy-on-close="true" @close="handleClose"> |
| | | <el-form class="gd-dialog-form" ref="ruleFormRef" :model="editParams" :rules="rules" label-width="140px"> |
| | | <el-form-item label="文档名称" prop="nickName"> |
| | | <el-input v-model="editParams.nickName" /> |
| | | </el-form-item> |
| | | <el-form-item label="文档类型" prop="resultType" v-if="titleTxt === '上传巡查报告'"> |
| | | <el-select |
| | | class="gd-select" |
| | | popper-class="gd-select-popper" |
| | | v-model="editParams.resultType" |
| | | placeholder="请选择" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.patrolTaskType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="上传文件" prop="link" v-if="titleTxt === '上传巡查报告'"> |
| | | {{ uploadName }} |
| | | <el-upload |
| | | class="avatar-uploader" |
| | | action="" |
| | | :show-file-list="false" |
| | | :before-upload="onUploadFileBefore" |
| | | > |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- </div> --> |
| | | <template #footer> |
| | | <el-button color="#F2F3F5" @click="isShowEditView = false">取消</el-button> |
| | | <el-button class="save-btn" color="#4C34FF" :loading="submitting" :disabled="submitting" @click="submit(ruleFormRef)"> |
| | | 保存 |
| | | </el-button> |
| | | </template> |
| | | </el-dialog> |
| | | <PreviewFiles v-model="previewVisible" :src="searchUrl" type="docx"/> |
| | | <el-image v-if="previewVisibleImg" :src="searchUrl" fit="contain" style="height: 100%;width: 100%" /> |
| | | </basic-container> |
| | | </template> |
| | | <script setup> |
| | | import { Search, RefreshRight, Download, Upload, Delete } from '@element-plus/icons-vue' |
| | | import { fjPageApi, fjSubmitApi, fjRemoveApi, fjDetailApi, fjUploadApi } from './inspectionRequestApi' |
| | | import { useStore } from 'vuex' |
| | | import { ref, computed, inject, onMounted } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import PreviewFiles from '@/components/PreviewFiles/PreviewFiles.vue' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | |
| | | const store = useStore() |
| | | const userInfo = computed(() => store.getters.userInfo); |
| | | |
| | | // 初始化查询参数 |
| | | const initSearchParams = () => ({ |
| | | nickName: '', |
| | | resultType: '', |
| | | current: 1, // 当前页 |
| | | size: 10, // 每页大小 |
| | | }) |
| | | |
| | | // 查看文档 |
| | | const previewVisible = ref(false) |
| | | const previewVisibleImg = ref(false) |
| | | const searchUrl = ref('') |
| | | |
| | | // 上传名称 |
| | | const uploadName = ref('') |
| | | |
| | | const dictObj = ref({ |
| | | patrolTaskType: [], // 巡查任务类型 |
| | | }) |
| | | |
| | | const searchParams = ref(initSearchParams()) // 查询参数 |
| | | const total = ref(0) // 总条数 |
| | | const loading = ref(true) // 列表加载中 |
| | | const list = ref([]) // 列表数据 |
| | | const selectedIds = ref([]) // 勾选的ID列表 |
| | | const selectedFiles = ref([]) // 勾选的文件列表 |
| | | const queryParamsRef = ref(null) // 查询表单实例 |
| | | |
| | | const isShowEditView = ref(false) |
| | | const titleTxt = ref('上传巡查报告') |
| | | const editParams = ref({ |
| | | id:'', |
| | | nickName: '', |
| | | resultType: '', |
| | | link: '', |
| | | }) |
| | | const ruleFormRef = ref() |
| | | const submitting = ref(false) |
| | | const rules = ref({ |
| | | nickName: [{ required: true, message: '请输入文档名称', trigger: ['blur'] }], |
| | | resultType: [{ required: true, message: '请选择文档类型', trigger: ['change'] }], |
| | | link: [{ required: true, message: '请上传文件', trigger: ['change'] }], |
| | | }) |
| | | |
| | | // 获取字典 |
| | | function getDictList() { |
| | | getDictionaryByCode('patrolTaskType').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |
| | | |
| | | // 获取列表 |
| | | async function getList() { |
| | | loading.value = true |
| | | try { |
| | | const res = await fjPageApi({ ...searchParams.value }) |
| | | console.log(res?.data?.data?.records,'888') |
| | | list.value = res?.data?.data?.records ?? [] |
| | | console.log(list.value,'999') |
| | | total.value = res?.data?.data?.total ?? 0 |
| | | } finally { |
| | | loading.value = false |
| | | } |
| | | } |
| | | |
| | | // 重置查询 |
| | | function resetForm() { |
| | | queryParamsRef.value?.resetFields() |
| | | searchParams.value.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | // 查询 |
| | | function handleSearch() { |
| | | searchParams.value.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | // 新增/编辑/查看 弹框 |
| | | function openForm(row) { |
| | | isShowEditView.value = true |
| | | titleTxt.value = '编辑' |
| | | editParams.value.id = row.id |
| | | editParams.value.nickName = row.nickName |
| | | editParams.value.resultType = row.resultType |
| | | editParams.value.link = row.link |
| | | } |
| | | |
| | | // 在线查看文档 |
| | | function seeOnlineWord(item) { |
| | | if (!item.link) { |
| | | ElMessage.error('文档链接不存在') |
| | | return |
| | | } else if (!item.link.includes('docx') && !item.link.includes('pdf') && !item.link.includes('png') && !item.link.includes('jpg')) { |
| | | ElMessage.error('可进行下载观看!') |
| | | return |
| | | } else if (item.link.includes('png') || item.link.includes('jpg')) { |
| | | previewVisibleImg.value = true |
| | | searchUrl.value = item.link |
| | | return |
| | | } else if (item.link.includes('docx') || item.link.includes('pdf')) { |
| | | previewVisible.value = true |
| | | searchUrl.value = item.link |
| | | return |
| | | } |
| | | } |
| | | |
| | | // 删除 |
| | | async function handleDelete(row) { |
| | | const tips = row ? '该条' : '选中的项' |
| | | await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', { |
| | | type: 'warning', |
| | | customClass: 'gd-confirm-custom', |
| | | confirmButtonClass: 'gd-confirm-button', |
| | | cancelButtonClass: 'gd-confirm-cancel-button', |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await fjRemoveApi({ ids }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | | } |
| | | |
| | | // 勾选值设置 |
| | | function handleSelectionChange(rows) { |
| | | selectedFiles.value = rows |
| | | selectedIds.value = rows.map((item) => item.id) |
| | | } |
| | | |
| | | // 文档下载 |
| | | async function handleDownload() { |
| | | // 如果是勾选一个可以直接下载,超过一个打包下载 |
| | | // 依次下载每个文件(添加延迟以避免浏览器限制) |
| | | selectedFiles.value.forEach((file, index) => { |
| | | setTimeout(() => { |
| | | if (file.link) { |
| | | const a = document.createElement('a') |
| | | a.href = file.link |
| | | a.download = file.originalName || `attachment_${index + 1}` |
| | | document.body.appendChild(a) |
| | | a.click() |
| | | document.body.removeChild(a) |
| | | } |
| | | }, index * 300) // 300ms delay between downloads |
| | | }) |
| | | |
| | | } |
| | | |
| | | // 文档上传 |
| | | async function handleUpload() { |
| | | isShowEditView.value = true |
| | | titleTxt.value = '上传巡查报告' |
| | | } |
| | | |
| | | // 上传文件前处理 |
| | | function onUploadFileBefore(file) { |
| | | // 执行文件上传 |
| | | let data = new FormData(); |
| | | data.append('file', file); |
| | | |
| | | fjUploadApi(data).then(res => { |
| | | if (res.data.code === 200) { |
| | | ElMessage.success('上传成功') |
| | | // 保存文件URL到表单 |
| | | uploadName.value = res.data.data.originalName |
| | | editParams.value.link = res.data.data.link |
| | | } else { |
| | | ElMessage.error(res.msg || '上传失败') |
| | | } |
| | | }) |
| | | |
| | | return false // 阻止组件的默认上传行为 |
| | | } |
| | | |
| | | // 保存上传文件数据 |
| | | async function submit(formValidate) { |
| | | if (!formValidate) return |
| | | await formValidate.validate(async (valid, fields) => { |
| | | if (valid) { |
| | | submitting.value = true |
| | | try { |
| | | await fjSubmitApi({ ...editParams.value }) |
| | | ElMessage.success('保存成功') |
| | | isShowEditView.value = false |
| | | getList() |
| | | } finally { |
| | | submitting.value = false |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function handleClose() { |
| | | // 清除表单内容 |
| | | uploadName.value = '' |
| | | editParams.value = { |
| | | id: '', |
| | | nickName: '', |
| | | resultType: '', |
| | | uploadFile: '', |
| | | } |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getDictList() |
| | | getList() |
| | | }) |
| | | |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | </style> |
| New file |
| | |
| | | import request from '@/axios' |
| | | |
| | | // 分页查询 |
| | | export const fjPageApi = params => { |
| | | return request({ |
| | | url: `/blade-resource/attach/page`, |
| | | method: 'get', |
| | | params: { descs: 'create_time', ...params }, |
| | | }) |
| | | } |
| | | |
| | | // 新增/修改 |
| | | export const fjSubmitApi = data => { |
| | | return request({ |
| | | url: `/blade-resource/attach/submit`, |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | } |
| | | |
| | | // 删除 |
| | | export const fjRemoveApi = params => { |
| | | return request({ |
| | | url: `/blade-resource/attach/remove`, |
| | | method: 'post', |
| | | params, |
| | | }) |
| | | } |
| | | |
| | | // 详情 |
| | | export const fjDetailApi = params => { |
| | | return request({ |
| | | url: `/blade-resource/attach/detail`, |
| | | method: 'get', |
| | | params, |
| | | }) |
| | | } |
| | | |
| | | // 上传文件 |
| | | export const fjUploadApi = data => { |
| | | return request({ |
| | | url: `/blade-resource/oss/endpoint/put-file`, |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | } |
| | |
| | | import request from '@/axios' |
| | | |
| | | // 分页查询 |
| | | // 分页查询巡查page |
| | | export const gdPatrolTaskPageApi = params => { |
| | | return request({ |
| | | url: `/drone-gd/workOrder/gdPatrolTask/page`, |
| | |
| | | <!-- 运营收益 --> |
| | | <template> |
| | | <basic-container> |
| | | 基础管理 |
| | | <div class="gd-table-toolbar"> |
| | | <el-button :icon="Plus" color="#4C34FF" type="primary" @click="handleAdd">新增</el-button> |
| | | <el-button :icon="Delete" color="#4C34FF" :disabled="!selectedIds.length" @click="handleDelete()">删除</el-button> |
| | | </div> |
| | | <div class="gd-table-container" v-loading="loading"> |
| | | <div class="gd-table-content gd-table-content-bg"> |
| | | <el-table class="gd-table" :data="tableList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="46" /> |
| | | <el-table-column label="序号" type="index" width="60"></el-table-column> |
| | | <el-table-column prop="operatingIncome" label="营业收入" align="center"></el-table-column> |
| | | <el-table-column prop="totalCost" label="综合总成本费用" align="center"></el-table-column> |
| | | <el-table-column prop="netProfit" label="净利润" align="center"></el-table-column> |
| | | <el-table-column prop="financialIrr" label="财务内部收益率" align="center"></el-table-column> |
| | | <el-table-column prop="marketSpace" label="市场空间" align="center" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> |
| | | <el-table-column prop="nickName" label="创建人" align="center"></el-table-column> |
| | | <el-table-column label="操作" width="180" align="center"> |
| | | <template #default="scope"> |
| | | <!-- <el-button icon="el-icon-view" type="text" @click="handleDetail(scope.row)">查看</el-button> --> |
| | | <el-button type="text" @click="handleEdit(scope.row)">编辑</el-button> |
| | | <el-button type="text" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="gd-pagination-parent"> |
| | | <el-pagination |
| | | popper-class="gd-select-popper" |
| | | v-model:current-page="params.current" |
| | | v-model:page-size="params.size" |
| | | layout="total, prev, pager, next, sizes" |
| | | :total="total" |
| | | @change="getList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <el-dialog class="gd-dialog" append-to-body v-model="isShowEditView" :title="titleTxt" |
| | | :width="pxToRem(800)" :close-on-click-modal="false" :destroy-on-close="true" @close="handleClose"> |
| | | <el-form class="gd-dialog-form" ref="ruleFormRef" :model="editParams" :rules="rules" label-width="140px"> |
| | | <el-form-item label="营业收入" prop="operatingIncome"> |
| | | <el-input v-model="editParams.operatingIncome" /> |
| | | </el-form-item> |
| | | <el-form-item label="综合总成本费用" prop="totalCost"> |
| | | <el-input v-model="editParams.totalCost" /> |
| | | </el-form-item> |
| | | <el-form-item label="净利润" prop="netProfit"> |
| | | <el-input v-model="editParams.netProfit" /> |
| | | </el-form-item> |
| | | <el-form-item label="财务内部收益率" prop="financialIrr"> |
| | | <el-input v-model="editParams.financialIrr" /> |
| | | </el-form-item> |
| | | <el-form-item label="市场空间" prop="marketSpace"> |
| | | <el-input v-model="editParams.marketSpace" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- </div> --> |
| | | <template #footer> |
| | | <el-button color="#F2F3F5" @click="isShowEditView = false">取消</el-button> |
| | | <el-button class="save-btn" color="#4C34FF" :loading="submitting" :disabled="submitting" @click="submit(ruleFormRef)"> |
| | | 保存 |
| | | </el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | <script setup> |
| | | import { ElMessage, ElMessageBox, ElLoading } from 'element-plus'; |
| | | import { operatingIncomePage, operatingIncomeUpdate, operatingIncomeAdd, operatingIncomeBatchDelete } from './operatingIncomeApi'; |
| | | |
| | | let titleTxt = ref('新增') |
| | | const total = ref(0) |
| | | const params = ref({ |
| | | current: 1, |
| | | size: 10, |
| | | }); |
| | | const submitting = ref(false) |
| | | const loading = ref(true) // 列表加载中 |
| | | const selectedIds = ref([]) // 勾选的ID列表 |
| | | let tableList = ref([]) |
| | | |
| | | let isShowEditView = ref(false) |
| | | |
| | | const ruleFormRef = ref() |
| | | let editParams = ref({ |
| | | id: '', |
| | | operatingIncome: '', |
| | | totalCost: '', |
| | | netProfit: '', |
| | | financialIrr: '', |
| | | marketSpace: '', |
| | | }) |
| | | const rules = reactive({ |
| | | operatingIncome: [ |
| | | { required: true, message: '请输入营业收入', trigger: 'blur' }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | if (!/^\d+(\.\d+)?$/.test(value)) { |
| | | callback(new Error('请输入有效的数字(整数或小数)')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | totalCost: [ |
| | | { required: true, message: '请输入综合总成本费用', trigger: 'blur' }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | if (!/^\d+(\.\d+)?$/.test(value)) { |
| | | callback(new Error('请输入有效的数字(整数或小数)')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | netProfit: [ |
| | | { required: true, message: '请输入净利润', trigger: 'blur' }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | if (!/^\d+(\.\d+)?$/.test(value)) { |
| | | callback(new Error('请输入有效的数字(整数或小数)')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | financialIrr: [ |
| | | { required: true, message: '请输入财务内部收益率', trigger: 'blur' }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | if (!/^\d+(\.\d+)?$/.test(value)) { |
| | | callback(new Error('请输入有效的数字(整数或小数)')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | marketSpace: [ |
| | | { required: true, message: '请输入市场空间', trigger: 'blur' }, |
| | | ], |
| | | }) |
| | | |
| | | // 勾选值设置 |
| | | function handleSelectionChange(rows) { |
| | | selectedIds.value = rows.map(item => item.id) |
| | | } |
| | | |
| | | function getList() { |
| | | loading.value = true |
| | | operatingIncomePage(params.value).then(res => { |
| | | tableList.value = res.data.data.records || [] |
| | | total.value = res.data.data.total || 0 |
| | | }).finally(() => { |
| | | loading.value = false |
| | | }) |
| | | } |
| | | function handleEdit(row) { |
| | | titleTxt.value = '编辑' |
| | | isShowEditView.value = true |
| | | editParams.value = { ...row } |
| | | } |
| | | |
| | | // 删除 |
| | | async function handleDelete(row) { |
| | | const tips = row ? '该条' : '选中的项' |
| | | await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', { |
| | | type: 'warning', |
| | | customClass: 'gd-confirm-custom', |
| | | confirmButtonClass: 'gd-confirm-button', |
| | | cancelButtonClass: 'gd-confirm-cancel-button', |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value |
| | | await operatingIncomeBatchDelete(ids) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | | } |
| | | |
| | | function handleAdd() { |
| | | titleTxt.value = '新增' |
| | | isShowEditView.value = true |
| | | } |
| | | |
| | | async function submit(formValidate) { |
| | | if (!formValidate) return |
| | | await formValidate.validate((valid, fields) => { |
| | | if (valid) { |
| | | submitting.value = true |
| | | try { |
| | | if (titleTxt.value === '新增') { |
| | | operatingIncomeAdd(editParams.value).then(res => { |
| | | isShowEditView.value = false |
| | | ElMessage.success('新增成功') |
| | | getList() |
| | | }) |
| | | } else { |
| | | operatingIncomeUpdate(editParams.value).then(res => { |
| | | isShowEditView.value = false |
| | | ElMessage.success('操作成功') |
| | | getList() |
| | | }) |
| | | } |
| | | } finally { |
| | | submitting.value = false |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function handleClose() { |
| | | // 清除表单内容 |
| | | editParams.value = { |
| | | id: '', |
| | | operating_income: '', |
| | | total_cost: '', |
| | | net_profit: '', |
| | | financial_irr: '', |
| | | market_space: '', |
| | | } |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getList() |
| | | }) |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | <style lang="scss" scoped> |
| | | .operatingIncome { |
| | | height: 0; |
| | | flex: 1; |
| | | margin: 0 10px 10px 10px; |
| | | background-color: #ffffff; |
| | | padding: 10px 20px; |
| | | border-radius: 5px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .search-box { |
| | | margin-top: 20px; |
| | | height: 40px; |
| | | } |
| | | |
| | | :deep(.el-input) { |
| | | .el-input__wrapper { |
| | | width: 200px; |
| | | } |
| | | } |
| | | |
| | | // 表格 |
| | | .mange-table { |
| | | height: 0; |
| | | flex: 1; |
| | | margin-top: 18px; |
| | | overflow: auto; |
| | | } |
| | | :deep(.el-pagination) { |
| | | display: flex; |
| | | justify-content: right; |
| | | } |
| | | |
| | | :deep(.el-pagination button) { |
| | | background: center center no-repeat none !important; |
| | | color: #8eb8ea !important; |
| | | } |
| | | :deep(.ztzf-select){ |
| | | .el-select__selection { |
| | | width: 200px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .content { |
| | | padding: 20px; |
| | | |
| | | .view-table { |
| | | width: 100%; |
| | | border-collapse: collapse; |
| | | border: 1px solid #EBEEF5; |
| | | |
| | | tr { |
| | | &:not(:last-child) { |
| | | border-bottom: 1px solid #EBEEF5; |
| | | } |
| | | |
| | | td { |
| | | padding: 12px 10px; |
| | | |
| | | &.label { |
| | | width: 140px; |
| | | text-align: right; |
| | | // color: #909399; |
| | | // background-color: #F5F7FA; |
| | | border-right: 1px solid #EBEEF5; |
| | | } |
| | | |
| | | &.value { |
| | | width: 180px; |
| | | // color: #303133; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .content-edit { |
| | | .el-form { |
| | | .el-form-item { |
| | | width: 320px; |
| | | :deep(.el-form-item__label) { |
| | | width: 140px; |
| | | } |
| | | } |
| | | // .el-form-item:last-child { |
| | | // width: 640px; |
| | | // } |
| | | .btns { |
| | | display: flex; |
| | | justify-content: center |
| | | } |
| | | } |
| | | } |
| | | </style> |
| New file |
| | |
| | | import request from '@/axios' |
| | | |
| | | // ----------运营收益相关接口调用---------- |
| | | |
| | | export const operatingIncomePage = params => { |
| | | return request({ |
| | | url: '/drone-gd/revenue/page', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | export const operatingIncomeUpdate = data => { |
| | | return request({ |
| | | url: '/drone-gd/revenue/update', |
| | | method: 'put', |
| | | data: data, |
| | | }) |
| | | } |
| | | |
| | | export const operatingIncomeAdd= data => { |
| | | return request({ |
| | | url: '/drone-gd/revenue/add', |
| | | method: 'post', |
| | | data: data, |
| | | }) |
| | | } |
| | | |
| | | export const operatingIncomeDelete= data => { |
| | | return request({ |
| | | url: '/drone-gd/revenue/delete/' + data, |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | // 批量删除 |
| | | export const operatingIncomeBatchDelete= data => { |
| | | return request({ |
| | | url: '/drone-gd/revenue/batch', |
| | | method: 'delete', |
| | | data, |
| | | }) |
| | | } |
| | |
| | | <el-table-column prop="deviceName" label="设备型号" /> |
| | | <el-table-column prop="devicePayload" label="设备负载" /> |
| | | </el-table> |
| | | <template v-if="hasPatrolTaskList"> |
| | | <div class="detail-title" :style="{ marginTop: pxToRem(20) }">巡查任务名称</div> |
| | | <el-table class="setHeight" :data="patrolTaskList" row-key="id"> |
| | | <el-table-column prop="patrolTaskName" show-overflow-tooltip label="巡查任务名称" /> |
| | | <el-table-column prop="patrolTaskType" show-overflow-tooltip label="巡查任务类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.patrolTaskType, dictObj.patrolTaskType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskStatus" show-overflow-tooltip label="任务状态"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.taskStatus, dictObj.taskStatus) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="executeTime" show-overflow-tooltip label="任务执行时间" /> |
| | | <el-table-column prop="feishou" show-overflow-tooltip label="选择飞手" /> |
| | | <el-table-column prop="deviceId" show-overflow-tooltip label="选择设备" /> |
| | | <el-table-column label="操作" class-name="operation-btns"> |
| | | <template v-slot="{ row }"> |
| | | <el-link type="primary" @click="">查看</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | |
| | | </div> |
| | | <el-form |
| | | class="gd-dialog-form" |
| | |
| | | import dayjs from 'dayjs' |
| | | import RefuseOrderDialog from '@/views/orderView/orderManage/orderManage/RefuseOrderDialog.vue' |
| | | import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue' |
| | | import { gdPatrolTaskPageApi } from '@/views/orderView/orderManage/inspectionRequest/inspectionRequestApi' |
| | | |
| | | // 初始化表单数据 |
| | | const initForm = () => ({ |
| | |
| | | const rejectVisible = ref(false) |
| | | const dictObj = inject('dictObj') |
| | | const dateRange = ref([]) |
| | | const patrolTaskList = ref([]) |
| | | const emit = defineEmits(['success']) |
| | | const formRef = ref(null) // 表单实例 |
| | | const formData = ref(initForm()) // 表单数据 |
| | |
| | | }) |
| | | } |
| | | |
| | | const hasPatrolTaskList = computed(() => ['30','40','50','60'].includes(String(formData.value.workOrderStatus))) |
| | | |
| | | function gdPatrolTaskPage() { |
| | | gdPatrolTaskPageApi({ current: 1, size: 1000, workOrderId: formData.value.id }).then(res => { |
| | | patrolTaskList.value = res.data.data.records || [] |
| | | }) |
| | | } |
| | | |
| | | // 打开弹框 |
| | | async function open({ mode = 'add', row } = {}) { |
| | | dialogMode.value = mode |
| | | formData.value = dialogMode.value === 'add' ? initForm() : row |
| | | initMap() |
| | | if (dialogMode.value !== 'add') { |
| | | await loadDetail() |
| | | } |
| | | await getDeviceList() |
| | | if (dialogMode.value === 'add') { |
| | | addPolygon() |
| | | } else if (dialogMode.value === 'edit') { |
| | | editPolygon() |
| | | } else { |
| | | viewPolygon() |
| | | await loadDetail() |
| | | hasPatrolTaskList.value && gdPatrolTaskPage() |
| | | dialogMode.value === 'edit' ? editPolygon() : viewPolygon() |
| | | } |
| | | await getDeviceList() |
| | | await nextTick() |
| | | syncSelection() |
| | | } |
| | |
| | | } |
| | | |
| | | .setHeight { |
| | | max-height: 300px; |
| | | min-height: 200px; |
| | | //max-height: 300px; |
| | | //min-height: 200px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |
| | | <el-tab-pane label="全部 " name="all"></el-tab-pane> |
| | | <el-tab-pane label="我的任务工单" name="my"></el-tab-pane> |
| | | </el-tabs> |
| | | <el-form ref="queryParamsRef" :model="searchParams" class="gd-search-form"> |
| | | <el-form-item label="工单名称" prop="workOrderName"> |
| | | <el-input |
| | |
| | | </el-form> |
| | | |
| | | <div class="gd-table-toolbar"> |
| | | <el-button color="#F2F3F5" @click="requester = !requester">我是{{ requester ? '需求方' : '服务方' }}</el-button> |
| | | <!-- <el-button color="#F2F3F5" @click="requester = !requester">我是{{ requester ? '需求方' : '服务方' }}</el-button>--> |
| | | <el-button color="#F2F3F5" @click="previewVisible = true">预览</el-button> |
| | | |
| | | <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">新增</el-button> |
| | |
| | | import PreviewFiles from '@/components/PreviewFiles/PreviewFiles.vue' |
| | | import testDock from '@/assets/docx/testDocx.docx' |
| | | import testPdf from '@/assets/pdf/testPdf.pdf' |
| | | import { useStore } from 'vuex' |
| | | |
| | | const store = useStore() |
| | | const requester = computed(() => store.state.user.userInfo?.role_id === '2014158512610869250') |
| | | const activeName = ref('all') |
| | | |
| | | // 初始化查询参数 |
| | | const initSearchParams = () => ({ |
| | |
| | | current: 1, // 当前页 |
| | | size: 10, // 每页大小 |
| | | }) |
| | | const requester = ref(true) |
| | | // const requester = ref(true) |
| | | const searchParams = ref(initSearchParams()) // 查询参数 |
| | | const dateRange = ref([]) // 执行时间范围 |
| | | const total = ref(0) // 总条数 |
| | |
| | | const range = dateRangeFormat(dateRange.value) |
| | | loading.value = true |
| | | try { |
| | | const res = await gdWorkOrderPageApi({ ...searchParams.value, startTime: range[0], endTime: range[1] }) |
| | | const res = await gdWorkOrderPageApi({ |
| | | ...searchParams.value, |
| | | startTime: range[0], |
| | | endTime: range[1], |
| | | createUser: activeName.value === 'user' ? store.state.user.userInfo.user_id : '', |
| | | }) |
| | | list.value = res?.data?.data?.records ?? [] |
| | | total.value = res?.data?.data?.total ?? 0 |
| | | } finally { |
| | |
| | | dateRange.value = [] |
| | | searchParams.value.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | function handleClick(tab,event) { |
| | | handleSearch() |
| | | } |
| | | |
| | | // 新增/编辑/查看 弹框 |
| | |
| | | |
| | | // 获取字典 |
| | | function getDictList() { |
| | | getDictionaryByCode('deviceLoadDemand,workOrderType,workOrderStatus').then(res => { |
| | | getDictionaryByCode('deviceLoadDemand,workOrderType,workOrderStatus,patrolTaskType,taskStatus').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |
| | |
| | | __INTLIFY_PROD_DEVTOOLS__: false, |
| | | }, |
| | | server: { |
| | | port: 5174, |
| | | port: 5178, |
| | | // host: '192.168.1.178', |
| | | proxy: { |
| | | '/api': { |
| New file |
| | |
| | | <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| | | <g id="Frame" clip-path="url(#clip0_287_2445)"> |
| | | <path id="Vector" d="M19.9987 0.450256C9.20293 0.450256 0.450195 9.20295 0.450195 20C0.450195 30.7971 9.20293 39.5498 19.9987 39.5498C30.797 39.5498 39.5496 30.7971 39.5496 20C39.5496 9.20295 30.797 0.450256 19.9987 0.450256Z" fill="#1D6FE9"/> |
| | | <path id="Vector_2" d="M31.0671 30.9625C33.4277 28.5893 33.4277 24.7551 31.0671 22.3819L27.2396 18.5567C27.261 19.693 27.053 20.8219 26.6282 21.876L29.0995 24.3543C30.3814 25.6382 30.3814 27.7177 29.0995 29.0017L28.9989 29.1025C27.7157 30.3841 25.6368 30.3841 24.3538 29.1025L18.8817 23.6327C17.5994 22.3481 17.5994 20.2677 18.8817 18.983L18.9824 18.8845C19.1775 18.689 19.3972 18.5197 19.6359 18.3809L17.6354 16.3782C17.4222 16.5444 17.2114 16.7224 17.0147 16.9169L16.9139 17.0176C14.5544 19.3921 14.5544 23.2261 16.9139 25.6005L22.3836 31.0676C24.7573 33.4271 28.5905 33.4271 30.964 31.0676L31.0671 30.9647V30.9625H31.0671ZM22.9857 23.087L23.0864 22.9863C25.4447 20.6113 25.4447 16.7784 23.0864 14.4035L17.6167 8.93146C15.2417 6.57314 11.4089 6.57314 9.03386 8.93146L8.93323 9.03455C6.57206 11.4092 6.57206 15.245 8.93323 17.6197L12.7608 21.4402C12.7408 20.3038 12.9496 19.1751 13.3745 18.121L10.9008 15.6498C9.61894 14.3658 9.61894 12.2861 10.9008 11.0022L11.0016 10.8992C12.2869 9.61814 14.366 9.61814 15.6514 10.8992L21.1211 16.3687C22.403 17.6527 22.403 19.7323 21.1211 21.0161L21.018 21.1169C20.8189 21.3184 20.5963 21.4823 20.3621 21.6229L22.3625 23.6234C22.5823 23.4583 22.7905 23.2783 22.9857 23.0847L22.9857 23.087Z" fill="white"/> |
| | | </g> |
| | | <defs> |
| | | <clipPath id="clip0_287_2445"> |
| | | <rect width="40" height="40" fill="white"/> |
| | | </clipPath> |
| | | </defs> |
| | | </svg> |
| New file |
| | |
| | | <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| | | <g id="Frame" clip-path="url(#clip0_287_2442)"> |
| | | <path id="Vector" d="M20 0C8.95407 0 0 8.95407 0 20C0 31.0459 8.95407 40 20 40C31.0459 40 40 31.0459 40 20C40 8.95407 31.0459 0 20 0ZM28.9563 11.0437C30.8007 12.8881 31.5415 14.5889 31.5415 14.5889L25.4111 20.7185L25.3407 8.52889C25.3415 8.52815 27.1126 9.19926 28.9563 11.0437ZM20 7.33333C22.6089 7.33333 24.3348 8.01185 24.3348 8.01185V16.6815L15.6659 8.11185C15.6659 8.11185 17.3919 7.33333 20 7.33333ZM11.0437 11.0437C12.8889 9.19926 14.5889 8.45852 14.5889 8.45852L20.7185 14.5881L8.52963 14.6578C8.52889 14.6585 9.19926 12.8881 11.0437 11.0437ZM7.33333 20C7.33333 17.3919 8.01259 15.6659 8.01259 15.6659H16.6815L8.11111 24.3341C8.11111 24.3341 7.33333 22.6081 7.33333 20ZM11.0437 28.9563C9.19926 27.1119 8.45852 25.4111 8.45852 25.4111L14.5889 19.2815L14.6593 31.4711C14.6585 31.4711 12.8881 30.8007 11.0437 28.9563ZM20 32.6667C17.3911 32.6667 15.6652 31.9881 15.6652 31.9881V23.3185L24.3341 31.8889C24.3348 31.8889 22.6089 32.6667 20 32.6667ZM28.9563 28.9563C27.1119 30.8007 25.4111 31.5415 25.4111 31.5415L19.2815 25.4111L31.4711 25.3407C31.4719 25.3415 30.8007 27.1119 28.9563 28.9563ZM31.9874 24.3341H23.3185L31.8889 15.6652C31.8889 15.6652 32.6667 17.3911 32.6667 19.9993C32.6667 22.6081 31.9874 24.3341 31.9874 24.3341Z" fill="#33CC00"/> |
| | | </g> |
| | | <defs> |
| | | <clipPath id="clip0_287_2442"> |
| | | <rect width="40" height="40" fill="white"/> |
| | | </clipPath> |
| | | </defs> |
| | | </svg> |
| New file |
| | |
| | | <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| | | <g id="Frame" clip-path="url(#clip0_287_2435)"> |
| | | <path id="Vector" d="M13.1793 13.3526C12.4856 13.3526 11.792 13.815 11.792 14.5087C11.792 15.2023 12.4856 15.6647 13.1793 15.6647C13.8729 15.6647 14.3353 15.2023 14.3353 14.5087C14.3353 13.7861 13.8729 13.3526 13.1793 13.3526ZM22.5723 20.0578C22.1099 20.0578 21.6764 20.5491 21.6764 20.9827C21.6764 21.474 22.1388 21.9075 22.5723 21.9075C23.266 21.9075 23.7284 21.4451 23.7284 20.9827C23.7284 20.5202 23.266 20.0578 22.5723 20.0578ZM19.5955 15.6647C20.2891 15.6647 20.7515 15.1734 20.7515 14.5087C20.7515 13.815 20.2891 13.3526 19.5955 13.3526C18.9018 13.3526 18.2082 13.815 18.2082 14.5087C18.2082 15.2023 18.9018 15.6647 19.5955 15.6647ZM27.6012 20.0578C27.1388 20.0578 26.7053 20.5491 26.7053 20.9827C26.7053 21.474 27.1677 21.9075 27.6012 21.9075C28.2949 21.9075 28.7573 21.4451 28.7573 20.9827C28.7573 20.5202 28.2949 20.0578 27.6012 20.0578Z" fill="#28C445"/> |
| | | <path id="Vector_2" d="M19.9422 0.115601C8.93064 0.115601 0 9.04624 0 20.0578C0 31.0694 8.93064 40 19.9422 40C30.9538 40 39.8844 31.0694 39.8844 20.0578C39.8844 9.04624 30.9538 0.115601 19.9422 0.115601ZM16.1561 25.1734C15 25.1734 14.0751 24.9422 12.9769 24.6821L9.79769 26.3006L10.6936 23.4971C8.41041 21.8786 7.02312 19.7688 7.02312 17.2543C7.02312 12.8324 11.1561 9.36416 16.1561 9.36416C20.6358 9.36416 24.5954 12.1387 25.3757 15.867C25.0867 15.8381 24.7977 15.8092 24.5087 15.8092C20.1734 15.867 16.763 19.1329 16.763 23.1792C16.763 23.8439 16.8786 24.4798 17.052 25.1156C16.763 25.1445 16.4451 25.1734 16.1561 25.1734ZM29.6821 28.4104L30.3757 30.7225L27.8902 29.3353C26.9942 29.5665 26.0694 29.7977 25.1445 29.7977C20.7803 29.7977 17.341 26.7919 17.341 23.0636C17.3121 19.3642 20.7514 16.3584 25.0867 16.3584C29.2197 16.3584 32.8613 19.3931 32.8613 23.0925C32.8613 25.1734 31.5029 27.0231 29.6821 28.4104Z" fill="#28C445"/> |
| | | </g> |
| | | <defs> |
| | | <clipPath id="clip0_287_2435"> |
| | | <rect width="40" height="40" fill="white"/> |
| | | </clipPath> |
| | | </defs> |
| | | </svg> |
| | |
| | | } |
| | | |
| | | .share-icon.wechat { |
| | | background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%2307C160" d="M18.66 6.86l-1.41-1.42a1 1 0 00-1.42 0l-12 12a1 1 0 000 1.42l1.42 1.42a1 1 0 001.42 0l12-12a1 1 0 000-1.42z"/><path fill="%2307C160" d="M8.5 14.5c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm0-6a2 2 0 100 4 2 2 0 000-4zm7 6c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm0-6a2 2 0 100 4 2 2 0 000-4z"/></svg>'); |
| | | background-image: url('@/static/images/work/wechat.svg'); |
| | | } |
| | | |
| | | .share-icon.moments { |
| | | background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%2307C160" d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 18H6V4h12v16z"/><path fill="%2307C160" d="M12 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"/><path fill="%2307C160" d="M10 13.5h4v3h-4z"/></svg>'); |
| | | background-image: url('@/static/images/work/moments.svg'); |
| | | } |
| | | |
| | | |
| | | .share-icon.link { |
| | | background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23666" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>'); |
| | | background-image: url('@/static/images/work/link.svg'); |
| | | } |
| | | |
| | | .share-icon.poster { |
| | | background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23FFA500" d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"/><path fill="%23FFA500" d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></svg>'); |
| | | } |
| | | |
| | | .share-name { |
| | | font-size: 24rpx; |
| | | color: #666; |
| | |
| | | <template> |
| | | <view class="regulationsDetail"> |
| | | <scroll-view |
| | | <scroll-view |
| | | class="scroll-container" |
| | | scroll-y |
| | | :enable-back-to-top="true" |
| | |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | <u-pdf-reader v-if="pdfUrl" :src="pdfUrl"></u-pdf-reader> |
| | | </view> |
| | | </template> |
| | | <script setup> |
| | |
| | | td: 'border: 1px solid #ddd; padding: 8rpx;' |
| | | }; |
| | | |
| | | const pdfUrl = ref('') |
| | | |
| | | function downloadFile(item) { |
| | | console.log(item,'999') |
| | | // aLinkDownloadUtil(item.fileUrl, item.fileName) |
| | | downloadAndPreview(item.fileUrl, item.fileName) |
| | | // downloadAndPreview(item.fileUrl, item.fileName) |
| | | pdfUrl.value = item.fileUrl |
| | | // downloadAndSavePDF(item.fileUrl, item.fileName) |
| | | } |
| | | // 下载并打开文件(支持PDF、图片、Word等) |
| | | const downloadAndPreview = async (fileUrl, fileName) => { |
| | |
| | | title: '下载中...', |
| | | mask: true |
| | | }) |
| | | |
| | | |
| | | try { |
| | | // 1. 下载文件到临时目录 |
| | | const downloadRes = await uni.downloadFile({ |
| | | url: fileUrl, |
| | | timeout: 60000 |
| | | }) |
| | | |
| | | |
| | | if (downloadRes.statusCode !== 200) { |
| | | throw new Error(`下载失败: ${downloadRes.statusCode}`) |
| | | } |
| | | |
| | | |
| | | // 2. 打开文件(小程序会调用系统能力) |
| | | uni.openDocument({ |
| | | filePath: downloadRes.tempFilePath, |
| | |
| | | handleOpenFail(downloadRes.tempFilePath, fileName) |
| | | } |
| | | }) |
| | | |
| | | |
| | | } catch (error) { |
| | | console.error('下载失败:', error) |
| | | uni.showToast({ |
| | |
| | | } finally { |
| | | uni.hideLoading() |
| | | } |
| | | } |
| | | |
| | | // 下载并保存PDF到手机(iOS需要特殊处理) |
| | | const downloadAndSavePDF = (pdfUrl, fileName = 'document.pdf') => { |
| | | uni.showLoading({ |
| | | title: '下载中...', |
| | | mask: true |
| | | }) |
| | | |
| | | // 检查权限(主要针对iOS) |
| | | const checkAndDownload = () => { |
| | | uni.downloadFile({ |
| | | url: pdfUrl, |
| | | success: (downloadRes) => { |
| | | uni.hideLoading() |
| | | |
| | | if (downloadRes.statusCode === 200) { |
| | | const tempFilePath = downloadRes.tempFilePath |
| | | |
| | | // 保存到本地 |
| | | uni.saveFile({ |
| | | tempFilePath: tempFilePath, |
| | | success: (saveRes) => { |
| | | const savedFilePath = saveRes.savedFilePath |
| | | |
| | | uni.showModal({ |
| | | title: '下载成功', |
| | | content: `文件已保存到: ${savedFilePath}`, |
| | | showCancel: false, |
| | | success: () => { |
| | | // 可以引导用户去文件管理查看 |
| | | } |
| | | }) |
| | | }, |
| | | fail: (saveErr) => { |
| | | console.error('保存失败:', saveErr) |
| | | uni.showToast({ |
| | | title: '保存失败111', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '下载失败1111', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 检查文件访问权限 |
| | | uni.authorize({ |
| | | scope: 'scope.writePhotosAlbum', |
| | | success: () => { |
| | | checkAndDownload() |
| | | }, |
| | | fail: () => { |
| | | uni.showModal({ |
| | | title: '权限提示', |
| | | content: '需要文件存储权限才能下载文件', |
| | | success: (modalRes) => { |
| | | if (modalRes.confirm) { |
| | | uni.openSetting({ |
| | | success: (settingRes) => { |
| | | if (settingRes.authSetting['scope.writePhotosAlbum']) { |
| | | checkAndDownload() |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 获取文件类型 |
| | |
| | | .safe-area { |
| | | /* 处理导航栏高度 */ |
| | | padding-top: var(--status-bar-height); |
| | | |
| | | |
| | | /* iOS 安全区域 */ |
| | | padding-top: constant(safe-area-inset-top); |
| | | padding-top: env(safe-area-inset-top); |
| | |
| | | overflow: hidden; |
| | | /* 关键:滚动内容在安全区域内 */ |
| | | height: calc(100vh - var(--status-bar-height) - 44px); |
| | | |
| | | |
| | | /* 计算高度考虑导航栏 */ |
| | | @supports (top: constant(safe-area-inset-top)) { |
| | | height: calc(100vh - constant(safe-area-inset-top) - 44px); |
| | | } |
| | | |
| | | |
| | | @supports (top: env(safe-area-inset-top)) { |
| | | height: calc(100vh - env(safe-area-inset-top) - 44px); |
| | | } |
| | |
| | | |
| | | .content { |
| | | padding: 0 24rpx 40rpx; |
| | | |
| | | |
| | | .title { |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 500; |