Merge branch 'master' of http://139.196.74.78:10010/r/jagzwxm/ja_web
14 files modified
2 files added
| | |
| | | //变量 |
| | | $gd-placeholder: #86909C; |
| | | $form-bg:#F2F3F5; |
| | | $form-bg: #F2F3F5; |
| | | |
| | | .gd-table { |
| | | height: 0; |
| | |
| | | } |
| | | |
| | | .gd-input { |
| | | .el-input__wrapper,.el-textarea__inner { |
| | | .el-input__wrapper, .el-textarea__inner { |
| | | padding: 0 8px !important; |
| | | background: $form-bg; |
| | | box-shadow: none !important; |
| | | border: none; |
| | | } |
| | | |
| | | .el-input__inner,.el-textarea__inner { |
| | | .el-input__inner, .el-textarea__inner { |
| | | &::placeholder { |
| | | color: $gd-placeholder; |
| | | } |
| | |
| | | padding: 30px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | background: #FFFFFF; |
| | | border: 1px solid #CCCCCC; |
| | | border-radius: 6px 6px 6px 6px; |
| | | |
| | | |
| | | .el-dialog__header { |
| | | span { |
| | |
| | | height: 0; |
| | | flex: 1; |
| | | |
| | | .detail-container { |
| | | padding: 0 10px; |
| | | |
| | | .detail-title { |
| | | margin-bottom: 30px; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 500; |
| | | font-size: 18px; |
| | | color: #FFFFFF; |
| | | text-align: left; |
| | | font-style: normal; |
| | | text-transform: none; |
| | | } |
| | | |
| | | .el-row { |
| | | .el-col { |
| | | margin-bottom: 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .label { |
| | | width: 88px; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 500; |
| | | font-size: 14px; |
| | | color: #86909C; |
| | | line-height: 22px; |
| | | text-align: right; |
| | | font-style: normal; |
| | | text-transform: none; |
| | | } |
| | | |
| | | .val { |
| | | margin-left: 12px; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: #4E5969; |
| | | line-height: 22px; |
| | | text-align: left; |
| | | font-style: normal; |
| | | text-transform: none; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | .gd-table-container { |
| | | height: 360px; |
| | | |
| | | .gd-pagination-parent { |
| | | justify-content: center; |
| | | } |
| | | } |
| | | .detail-title { |
| | | margin-bottom: 20px; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: #161B2C; |
| | | } |
| | | |
| | | .dialog-form { |
| | | .el-form-item { |
| | | // 查看 |
| | | .detail-row-view { |
| | | background: #F2F3F5; |
| | | border-radius: 2px 2px 2px 2px; |
| | | gap: 20px 0; |
| | | padding: 20px; |
| | | |
| | | .el-col { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 0; |
| | | |
| | | .el-form-item__label { |
| | | display: flex; |
| | | align-items: center; |
| | | .label { |
| | | width: 88px; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 500; |
| | | font-size: 14px; |
| | | color: #4E5969; |
| | | color: #86909C; |
| | | line-height: 22px; |
| | | text-align: right; |
| | | font-style: normal; |
| | | text-transform: none; |
| | | } |
| | | |
| | | .el-form-item__content { |
| | | display: flex; |
| | | align-items: center; |
| | | .val { |
| | | margin-left: 12px; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: #4E5969; |
| | | line-height: 22px; |
| | | text-align: left; |
| | | font-style: normal; |
| | | text-transform: none; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | <template> |
| | | <el-dialog |
| | | class="gd-dialog" |
| | | v-model="visible" |
| | | :title="titleEnum[dialogMode]" |
| | | @closed="visible = false" |
| | | destroy-on-close |
| | | > |
| | | <div class="detail-container" v-if="dialogReadonly"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <div class="label">案例名称</div> |
| | | <div class="val">{{ formData.caseName }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">所属领域</div> |
| | | <div class="val">{{ formData.belongDomain }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">应用场景描述</div> |
| | | <div class="val">{{ formData.applicationScenarioDesc }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">事项名称</div> |
| | | <div class="val">{{ formData.matterName }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">资源名称</div> |
| | | <div class="val">{{ formData.resourceName }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">资源编码</div> |
| | | <div class="val">{{ formData.resourceCode }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div class="label">案例描述</div> |
| | | <div class="val">{{ formData.caseDesc }}</div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <el-form |
| | | class="gd-dialog-form" |
| | | v-else |
| | | ref="formRef" |
| | | :model="formData" |
| | | :rules="rules" |
| | | :disabled="dialogReadonly" |
| | | label-width="100px" |
| | | > |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="案例名称" prop="caseName"> |
| | | <el-input class="gd-input" v-model="formData.caseName" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="所属领域" prop="belongDomain"> |
| | | <el-input class="gd-input" v-model="formData.belongDomain" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="应用场景描述" prop="applicationScenarioDesc"> |
| | | <el-input class="gd-input" v-model="formData.applicationScenarioDesc" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="事项名称" prop="matterName"> |
| | | <el-input class="gd-input" v-model="formData.matterName" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="资源名称" prop="resourceName"> |
| | | <el-input class="gd-input" v-model="formData.resourceName" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="资源编码" prop="resourceCode"> |
| | | <el-input class="gd-input" v-model="formData.resourceCode" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="案例描述" prop="caseDesc"> |
| | | <el-input |
| | | class="gd-input" |
| | | v-model="formData.caseDesc" |
| | | type="textarea" |
| | | :rows="4" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <el-button color="#F2F3F5" @click="visible = false">{{ dialogReadonly ? '关闭' : '取消' }}</el-button> |
| | | <el-button |
| | | class="save-btn" |
| | | color="#4C34FF" |
| | | v-if="!dialogReadonly" |
| | | :loading="submitting" |
| | | :disabled="submitting" |
| | | @click="handleSubmit" |
| | | > |
| | | 保存 |
| | | </el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { computed, ref, inject } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { fieldRules } from '@ztzf/utils' |
| | | import { |
| | | gdApplicationInnovationDetailApi, |
| | | gdApplicationInnovationSubmitApi, |
| | | } from '@/views/orderView/orderDataManage/appInnovation/appInnovationApi' |
| | | |
| | | // 初始化表单数据 |
| | | const initForm = () => ({ |
| | | caseName: '', |
| | | belongDomain: '', |
| | | applicationScenarioDesc: '', |
| | | matterName: '', |
| | | resourceName: '', |
| | | resourceCode: '', |
| | | caseDesc: '', |
| | | innovationStatus: '', |
| | | }) |
| | | |
| | | // 从父组件注入字典数据 |
| | | const appInnovationStatusOptions = inject('appInnovationStatusOptions') |
| | | |
| | | const emit = defineEmits(['success']) |
| | | const formRef = ref(null) // 表单实例 |
| | | const formData = ref(initForm()) // 表单数据 |
| | | const visible = defineModel() // 弹框显隐 |
| | | const dialogMode = ref('add') // 弹框模式 |
| | | const submitting = ref(false) // 提交中 |
| | | const dialogReadonly = computed(() => dialogMode.value === 'view') |
| | | const titleEnum = ref({ edit: '编辑', view: '查看', add: '新增' }) |
| | | |
| | | const rules = { |
| | | caseName: fieldRules(true), |
| | | belongDomain: fieldRules(true), |
| | | applicationScenarioDesc: fieldRules(true), |
| | | matterName: fieldRules(true), |
| | | resourceName: fieldRules(true), |
| | | resourceCode: fieldRules(true), |
| | | caseDesc: fieldRules(true), |
| | | } |
| | | |
| | | // 提交新增/编辑 |
| | | async function handleSubmit() { |
| | | const isValid = await formRef.value?.validate().catch(() => false) |
| | | if (!isValid) return |
| | | submitting.value = true |
| | | try { |
| | | await gdApplicationInnovationSubmitApi(formData.value) |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | | } finally { |
| | | submitting.value = false |
| | | } |
| | | } |
| | | |
| | | // 加载详情 |
| | | async function loadDetail() { |
| | | if (!formData.value.id) return |
| | | const res = await gdApplicationInnovationDetailApi({ id: formData.value.id }) |
| | | formData.value = res?.data?.data ?? {} |
| | | } |
| | | |
| | | // 打开弹框 |
| | | async function open({ mode = 'add', row } = {}) { |
| | | dialogMode.value = mode |
| | | formData.value = dialogMode.value === 'add' ? initForm() : row |
| | | if (dialogMode.value !== 'add') { |
| | | await loadDetail() |
| | | } |
| | | } |
| | | |
| | | defineExpose({ open }) |
| | | </script> |
| New file |
| | |
| | | import request from '@/axios' |
| | | |
| | | // 列表 |
| | | // 分页查询应用创新案例 |
| | | export const gdApplicationInnovationPageApi = params => { |
| | | return request({ |
| | | url: `/drone-gd/orderdata/gdApplicationInnovation/page`, |
| | | method: 'get', |
| | | params: { descs: 'update_time', ...params }, |
| | | }) |
| | | } |
| | | |
| | | // 新增或编辑 |
| | | // 提交应用创新案例 |
| | | export const gdApplicationInnovationSubmitApi = data => { |
| | | return request({ |
| | | url: `/drone-gd/orderdata/gdApplicationInnovation/submit`, |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | } |
| | | |
| | | // 删除 |
| | | // 删除应用创新案例 |
| | | export const gdApplicationInnovationRemoveApi = params => { |
| | | return request({ |
| | | url: `/drone-gd/orderdata/gdApplicationInnovation/remove`, |
| | | method: 'post', |
| | | params, |
| | | }) |
| | | } |
| | | |
| | | // 详情 |
| | | // 获取应用创新案例详情 |
| | | export const gdApplicationInnovationDetailApi = params => { |
| | | return request({ |
| | | url: `/drone-gd/orderdata/gdApplicationInnovation/detail`, |
| | | method: 'get', |
| | | params, |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <basic-container> |
| | | 创新 |
| | | </basic-container> |
| | | <basic-container> |
| | | <el-form ref="queryParamsRef" :model="searchParams" class="gd-search-form"> |
| | | <el-form-item label="案例名称" prop="caseName"> |
| | | <el-input class="gd-input" v-model="searchParams.caseName" placeholder="请输入" clearable @clear="handleSearch" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="应用创新状态" prop="innovationStatus"> |
| | | <el-select |
| | | class="gd-select" |
| | | popper-class="gd-select-popper" |
| | | v-model="searchParams.innovationStatus" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="handleSearch" |
| | | > |
| | | <el-option v-for="item in dictObj.appInnovationStatus" :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="Plus" color="#4C34FF" type="primary" @click="openForm('add')">应用创新新增</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="list" @selection-change="handleSelectionChange"> |
| | | <el-table-column label="序号" width="60" align="center"> |
| | | <template #default="{ $index }"> |
| | | {{ formatNumber((searchParams.current - 1) * searchParams.size + $index + 1) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="caseName" show-overflow-tooltip label="案例名称" /> |
| | | <el-table-column prop="belongDomain" show-overflow-tooltip label="所属领域" /> |
| | | <el-table-column prop="innovationStatus" show-overflow-tooltip label="应用创新状态"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.innovationStatus) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="applicationScenarioDesc" show-overflow-tooltip label="应用场景描述" /> |
| | | <el-table-column prop="matterName" show-overflow-tooltip label="事项名称" /> |
| | | <el-table-column prop="resourceName" show-overflow-tooltip label="资源名称" /> |
| | | <el-table-column prop="resourceCode" show-overflow-tooltip label="资源编码" /> |
| | | <el-table-column prop="caseDesc" 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="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> |
| | | |
| | | <FormDiaLog ref="dialogRef" @success="getList" v-if="dialogVisible" v-model="dialogVisible" /> |
| | | </basic-container> |
| | | </template> |
| | | <script setup> |
| | | import { Search, RefreshRight, Plus, Delete } from '@element-plus/icons-vue' |
| | | import { onMounted, ref, nextTick, provide } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { |
| | | gdApplicationInnovationPageApi, |
| | | gdApplicationInnovationRemoveApi, |
| | | } from '@/views/orderView/orderDataManage/appInnovation/appInnovationApi' |
| | | |
| | | // 初始化查询参数 |
| | | const initSearchParams = () => ({ |
| | | caseName: '', // 案例名称 |
| | | innovationStatus: '', // 应用创新状态 |
| | | current: 1, // 当前页 |
| | | size: 10, // 每页大小 |
| | | }) |
| | | const searchParams = ref(initSearchParams()) // 查询参数 |
| | | const total = ref(0) // 总条数 |
| | | const loading = ref(true) // 列表加载中 |
| | | const list = ref([]) // 列表数据 |
| | | const selectedIds = ref([]) // 勾选的ID列表 |
| | | const queryParamsRef = ref(null) // 查询表单实例 |
| | | const dialogRef = ref(null) // 弹框实例 |
| | | const dialogVisible = ref(false) |
| | | const dictObj = ref({}) // 字典对象 |
| | | provide('dictObj', dictObj) |
| | | // 获取字典 |
| | | function getDictList() { |
| | | return getDictionaryByCode('appInnovationStatus').then(res => { |
| | | dictObj.value = res.data.data |
| | | |
| | | }) |
| | | } |
| | | |
| | | |
| | | // 获取列表 |
| | | async function getList() { |
| | | loading.value = true |
| | | try { |
| | | const res = await gdApplicationInnovationPageApi(searchParams.value) |
| | | list.value = res?.data?.data?.records ?? [] |
| | | total.value = res?.data?.data?.total ?? 0 |
| | | } finally { |
| | | loading.value = false |
| | | } |
| | | } |
| | | |
| | | // 查询 |
| | | function handleSearch() { |
| | | searchParams.value.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | // 重置查询 |
| | | function resetForm() { |
| | | queryParamsRef.value?.resetFields() |
| | | searchParams.value.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | // 新增/编辑/查看 弹框 |
| | | function openForm(mode, row) { |
| | | dialogVisible.value = true |
| | | nextTick(() => { |
| | | dialogRef.value?.open({ mode, 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.join(',') |
| | | await gdApplicationInnovationRemoveApi({ ids }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | | } |
| | | |
| | | // 勾选值设置 |
| | | function handleSelectionChange(rows) { |
| | | selectedIds.value = rows.map(item => item.id) |
| | | } |
| | | |
| | | // 格式化数字为两位数 |
| | | function formatNumber(num) { |
| | | return num.toString().padStart(2, '0') |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getList() |
| | | getDictList() |
| | | }) |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | </style> |
| | | <style scoped lang="scss"></style> |
| | | |
| | |
| | | destroy-on-close |
| | | > |
| | | <div class="detail-container" v-if="dialogReadonly"> |
| | | <el-row> |
| | | <el-row class="detail-row-view"> |
| | | <el-col :span="12"> |
| | | <div class="label">标题</div> |
| | | <div class="val">{{ formData.title }}</div> |
| | |
| | | <div class="label">提交人联系方式</div> |
| | | <div class="val">{{ formData.submitterContact }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <!-- <el-col :span="12"> |
| | | <div class="label">提交单位</div> |
| | | <div class="val">{{ formData.submitUnitName }}</div> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="12"> |
| | | <div class="label">目录/申请资源名称</div> |
| | | <div class="val">{{ formData.catalogResourceName }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-col :span="12"> |
| | | <div class="label">异议描述</div> |
| | | <div class="val">{{ formData.objectionDesc }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-col :span="12"> |
| | | <div class="label">异议依据</div> |
| | | <div class="val">{{ formData.objectionBasis }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-col :span="12"> |
| | | <div class="label">相关附件</div> |
| | | <div class="val">{{ formData.attachName || '暂无附件' }}</div> |
| | | </el-col> |
| | |
| | | <el-input class="gd-input" v-model="formData.submitterContact" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="提交单位" prop="submitUnitId"> |
| | | <el-tree-select |
| | | class="gd-select" |
| | | popper-class="gd-tree-select-popper" |
| | | v-model="formData.submitUnitId" |
| | | node-key="id" |
| | | :data="deptTree" |
| | | :props="treeProps" |
| | | check-strictly |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="提交单位" prop="submitUnitId">--> |
| | | <!-- <el-tree-select--> |
| | | <!-- class="gd-select"--> |
| | | <!-- popper-class="gd-tree-select-popper"--> |
| | | <!-- v-model="formData.submitUnitId"--> |
| | | <!-- node-key="id"--> |
| | | <!-- :data="deptTree"--> |
| | | <!-- :props="treeProps"--> |
| | | <!-- check-strictly--> |
| | | <!-- clearable--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <el-col :span="12"> |
| | | <el-form-item label="目录/申请资源名称" prop="catalogResourceName"> |
| | | <el-input class="gd-input" v-model="formData.catalogResourceName" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="异议描述" prop="objectionDesc"> |
| | | <el-input |
| | | class="gd-input" |
| | | v-model="formData.objectionDesc" |
| | | type="textarea" |
| | | :rows="4" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="异议依据" prop="objectionBasis"> |
| | | <el-input |
| | | class="gd-input" |
| | | v-model="formData.objectionBasis" |
| | | type="textarea" |
| | | :rows="4" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="相关附件" prop="attachId"> |
| | | <div class="upload-container"> |
| | | <el-upload |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <el-button color="#F2F3F5" @click="visible = false">{{ dialogReadonly ? '关闭' : '取消' }}</el-button> |
| | | <el-button |
| | | class="save-btn" |
| | | color="#4C34FF" |
| | |
| | | > |
| | | 保存 |
| | | </el-button> |
| | | <el-button color="#F2F3F5" @click="handleApply">申请</el-button> |
| | | |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | catalogResourceName: '', |
| | | objectionDesc: '', |
| | | objectionBasis: '', |
| | | attachId: '', |
| | | attachName: '', |
| | | attachmentList:[ |
| | | { |
| | | attachId: '', |
| | | attachName: '', |
| | | } |
| | | ] |
| | | |
| | | }) |
| | | |
| | | // 注入部门树和字典 |
| | |
| | | const dialogMode = ref('add') // 弹框模式 |
| | | const submitting = ref(false) // 提交中 |
| | | const dialogReadonly = computed(() => dialogMode.value === 'view') |
| | | const titleEnum = ref({ edit: '编辑', view: '查看', add: '新增' }) |
| | | const titleEnum = ref({ edit: '编辑', view: '查看', add: '数据异议申请' }) |
| | | const fileList = ref([]) // 上传文件列表 |
| | | const uploadedFiles = ref([]) // 已上传文件列表 |
| | | |
| | |
| | | if (!isValid) return |
| | | submitting.value = true |
| | | try { |
| | | await gdDataObjectionSubmitApi(formData.value) |
| | | // 构建符合接口要求的提交数据 |
| | | const submitData = { |
| | | title: formData.value.title, |
| | | objectionType: formData.value.objectionType, |
| | | submitter: formData.value.submitter, |
| | | submitterContact: formData.value.submitterContact, |
| | | catalogResourceName: formData.value.catalogResourceName, |
| | | objectionDesc: formData.value.objectionDesc, |
| | | objectionBasis: formData.value.objectionBasis, |
| | | areaCode: formData.value.areaCode || '', |
| | | handleUnit: formData.value.handleUnit || '', |
| | | objectionStatus: formData.value.objectionStatus || '', |
| | | otherObjectionDetail: formData.value.otherObjectionDetail || '', |
| | | reviewOpinion: formData.value.reviewOpinion || '', |
| | | // 构建附件列表 |
| | | attachmentList: uploadedFiles.value.map(file => ({ |
| | | attachId: file.attachId, |
| | | attachName: file.originalName, |
| | | })) |
| | | } |
| | | await gdDataObjectionSubmitApi(submitData) |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | submitting.value = false |
| | | } |
| | | } |
| | | |
| | | // 申请提交 |
| | | async function handleApply() { |
| | | |
| | | } |
| | | // 加载详情 |
| | | async function loadDetail() { |
| | | if (!formData.value.id) return |
| | |
| | | // 分页列表 |
| | | export const gdDataObjectionPageApi = params => { |
| | | return request({ |
| | | url: `/drone-gd/orderdata/gdDataObjection/list`, |
| | | url: `/drone-gd/orderdata/gdDataObjection/page`, |
| | | method: 'get', |
| | | params: { descs: 'update_time', ...params }, |
| | | }) |
| | |
| | | </el-form> |
| | | |
| | | <div class="gd-table-toolbar"> |
| | | <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> |
| | | <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">数据异议申请</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 class="gd-table" :data="list"> |
| | | <el-table-column label="序号" width="60"> |
| | | <template v-slot="{ $index }"> |
| | | {{ String($index + 1).padStart(2, '0') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="title" show-overflow-tooltip label="标题" /> |
| | | <el-table-column prop="objectionType" show-overflow-tooltip label="异议类别"> |
| | | <template v-slot="{ row }"> |
| | |
| | | const total = ref(0) // 总条数 |
| | | const loading = ref(true) // 列表加载中 |
| | | const list = ref([]) // 列表数据 |
| | | const selectedIds = ref([]) // 勾选的ID列表 |
| | | |
| | | const queryParamsRef = ref(null) // 查询表单实例 |
| | | const dialogRef = ref(null) // 弹框实例 |
| | | const dialogVisible = ref(false) |
| | |
| | | |
| | | // 删除 |
| | | async function handleDelete(row) { |
| | | const tips = row ? '该条' : '选中的项' |
| | | await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', { |
| | | await ElMessageBox.confirm(`确认删除该条记录吗?`, '提示', { |
| | | type: 'warning', |
| | | customClass: 'gd-confirm-custom', |
| | | confirmButtonClass: 'gd-confirm-button', |
| | | cancelButtonClass: 'gd-confirm-cancel-button', |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await gdDataObjectionRemoveApi({ ids }) |
| | | await gdDataObjectionRemoveApi({ ids: row.id }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | | } |
| | | |
| | | // 勾选值设置 |
| | | function handleSelectionChange(rows) { |
| | | selectedIds.value = rows.map(item => item.id) |
| | | } |
| | | |
| | | |
| | | // 获取部门树 |
| | | function getDeptTreeFun() { |
| | |
| | | @closed="visible = false" |
| | | destroy-on-close |
| | | > |
| | | <div class="detail-container" v-if="dialogReadonly"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <div class="label">标题</div> |
| | | <div class="val">{{ formData.title }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">数据名称</div> |
| | | <div class="val">{{ formData.dataName }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">提出部门</div> |
| | | <div class="val">{{ formData.proposeDeptName }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">数据提供部门</div> |
| | | <div class="val">{{ formData.dataProvideDeptName }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">评分</div> |
| | | <div class="val">{{ formData.score }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">是否解决</div> |
| | | <div class="val">{{ formData.isResolved === '1' ? '是' : '否' }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div class="label">评价内容</div> |
| | | <div class="val">{{ formData.evaluationContent }}</div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-row class="detail-row-view" v-if="dialogReadonly"> |
| | | <el-col :span="12"> |
| | | <div class="label">标题</div> |
| | | <div class="val">{{ formData.title }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">数据名称</div> |
| | | <div class="val">{{ formData.dataName }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">提出部门</div> |
| | | <div class="val">{{ formData.proposeDeptName }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">数据提供部门</div> |
| | | <div class="val">{{ formData.dataProvideDeptName }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">评分</div> |
| | | <div class="val">{{ formData.score }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">是否解决</div> |
| | | <div class="val">{{ formData.isResolved === '1' ? '是' : '否' }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div class="label">评价内容</div> |
| | | <div class="val">{{ formData.evaluationContent }}</div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form |
| | | class="gd-dialog-form" |
| | |
| | | }) |
| | | |
| | | ElMessage.success('文件上传成功!') |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 上传失败处理函数 |
| | |
| | | const handleRejectionConfirm = reason => { |
| | | // 从 uploadedFiles.value 中提取所有 attachId |
| | | const id = uploadedFiles.value.map(file => file.attachId) |
| | | |
| | | |
| | | gdSupplyDemandAuditRejectApi({ attachIds: id, auditOpinion: reason, demandId: demandId.value }) |
| | | .then(() => { |
| | | ElMessage.success('拒绝申请成功') |
| | |
| | | destroy-on-close |
| | | > |
| | | <div class="detail-container" v-if="dialogReadonly"> |
| | | <el-row> |
| | | <el-row class="detail-row-view"> |
| | | <el-col :span="12"> |
| | | <div class="label">需求名称</div> |
| | | <div class="val">{{ formData.demandName }}</div> |
| | |
| | | function getDeptNameById(deptId, deptList) { |
| | | // 处理类型转换,确保比较的是相同类型 |
| | | const targetId = String(deptId) |
| | | |
| | | |
| | | // 递归遍历部门树 |
| | | function findDept(deptList) { |
| | | for (const dept of deptList) { |
| | |
| | | } |
| | | return '' |
| | | } |
| | | |
| | | |
| | | if (!targetId || !Array.isArray(deptList) || deptList.length === 0) { |
| | | return '' |
| | | } |
| | | |
| | | |
| | | return findDept(deptList) |
| | | } |
| | | // 提交新增/编辑 |
| | |
| | | |
| | | <!-- 工单信息展示 --> |
| | | <div class="work-order-info" v-if="selectedWorkOrder"> |
| | | <el-row> |
| | | <el-row class="detail-row-view"> |
| | | <el-col :span="12"> |
| | | <div class="info-item"> |
| | | <span class="label">工单类型</span> |
| | |
| | | <div class="leftBox"> |
| | | <!-- 查看模式 --> |
| | | <div class="detail-container" v-if="dialogReadonly"> |
| | | <el-row> |
| | | <el-row class="detail-row-view"> |
| | | <el-col :span="12"> |
| | | <div class="label">巡查任务名称</div> |
| | | <div class="val">{{ formData.patrolTaskName }}</div> |
| | |
| | | v-model="visible" |
| | | :title="titleEnum[dialogMode]" |
| | | @closed="visible = false" |
| | | :style="{ width: pxToRem(1216) }" |
| | | width="80%" |
| | | destroy-on-close |
| | | > |
| | | <div class="content" style="display: flex"> |
| | | <div class="processBox"> |
| | | <div v-for="(item, index) in processList">{{ index }}-{{ item.flowName }}{{ item.flowDesc }}</div> |
| | | <el-steps direction="vertical" :active="processList.length"> |
| | | <el-step v-for="item in processList" :title="item.flowName" :description="item.flowDesc" /> |
| | | </el-steps> |
| | | <!-- <div v-for="(item, index) in processList">{{ index }}-{{ item.flowName }}{{ item.flowDesc }}</div>--> |
| | | </div> |
| | | <div class="leftBox"> |
| | | <div class="detail-container" v-if="dialogReadonly"> |
| | | <el-row> |
| | | <div v-if="dialogReadonly"> |
| | | <div class="detail-title">工单详情</div> |
| | | <el-row class="detail-row-view"> |
| | | <el-col :span="12"> |
| | | <div class="label">工单名称</div> |
| | | <div class="val">{{ formData.workOrderName }}</div> |
| | |
| | | <div class="val">{{ formData.remark }}</div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table ref="deviceTableRef" :data="deviceList" row-key="id"> |
| | | <div class="detail-title" :style="{ marginTop: pxToRem(20) }">已选设备</div> |
| | | <el-table class="setHeight" ref="deviceTableRef" :data="deviceList" row-key="id"> |
| | | <el-table-column prop="nickname" label="设备名称" /> |
| | | <el-table-column prop="deviceName" label="设备型号" /> |
| | | <el-table-column prop="devicePayload" label="设备负载" /> |
| | |
| | | /> |
| | | </div> |
| | | <div class="rightBox" v-if="!dialogReadonly"> |
| | | <div class="title">推荐设备</div> |
| | | <div class="detail-title">推荐设备</div> |
| | | <el-table ref="deviceTableRef" :data="deviceList" row-key="id" @selection-change="handleDeviceSelectionChange"> |
| | | <el-table-column type="selection" width="55" :reserve-selection="true" /> |
| | | <el-table-column prop="nickname" label="设备名称" /> |
| | |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <!-- <el-button color="#F2F3F5" @click="visible = false">{{ dialogReadonly ? '关闭' : '取消' }}</el-button>--> |
| | | <!-- <el-button color="#F2F3F5" @click="visible = false">{{ dialogReadonly ? '关闭' : '取消' }}</el-button>--> |
| | | <el-button |
| | | class="save-btn" |
| | | color="#4C34FF" |
| | |
| | | </el-button> |
| | | </template> |
| | | </template> |
| | | |
| | | </template> |
| | | |
| | | <RefuseOrderDialog |
| | |
| | | material: Cesium.Color.RED, |
| | | }, |
| | | }) |
| | | viewer.flyTo(mian) |
| | | viewer.flyTo(mian, { duration: 0 }) |
| | | } |
| | | |
| | | // 同步关联场景 |
| | |
| | | .leftBox { |
| | | width: 0; |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .gd-cesium { |
| | | width: 100%; |
| | | height: 423px; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .setHeight { |
| | | max-height: 300px; |
| | | min-height: 200px; |
| | | } |
| | | </style> |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | height: 108rpx; |
| | | :deep(){ |
| | | .u-search__content{ |
| | | background: #fff !important; |
| | | } |
| | | .u-search__content__input{ |
| | | background: #fff !important; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .contactList { |
| | |
| | | padding-right: 24rpx; |
| | | width: 100%; |
| | | height: 108rpx; |
| | | :deep(){ |
| | | .u-search__content{ |
| | | background: #fff !important; |
| | | } |
| | | .u-search__content__input{ |
| | | background: #fff !important; |
| | | } |
| | | } |
| | | } |
| | | :deep(){ |
| | | |
| | |
| | | label: '女', |
| | | name: '1' |
| | | }, |
| | | { |
| | | label: '未知', |
| | | name: '2' |
| | | } |
| | | // { |
| | | // label: '未知', |
| | | // name: '2' |
| | | // } |
| | | ] |
| | | // 校验手机号 |
| | | const validatePhone = () => { |