From cf7d85060c3b7c077dea072b0962252257318cd5 Mon Sep 17 00:00:00 2001 From: guoyue Date: Tue, 27 Sep 2022 11:53:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A5=BF=E6=B5=B7=E5=B2=B8=EF=BC=9A?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E8=AE=BE=E6=96=BD-=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=87=E6=9C=9F=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/apply.vue | 52 ++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/front/src/views/home/apply.vue b/front/src/views/home/apply.vue index 2177a951..8d0102bc 100644 --- a/front/src/views/home/apply.vue +++ b/front/src/views/home/apply.vue @@ -10,10 +10,17 @@
-
+
+ + + + +
@@ -127,6 +134,7 @@ import { sgcDel, getApplyForm } from '@/api/personalCenter' import { pageWithAttrs, updateIntegrationServices } from '@/api/home' import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' import { getIntegrationDetail, soldierApply } from '@/api/home' +import * as moment from 'moment' export default { name: '', @@ -148,6 +156,21 @@ export default { // 融合服务详情 const integrationServicesItemInfo = ref(null) const num = ref(0) + // 过期时间 + const expireDateOptions = [ + { + value: moment().add(30, 'days').format('YYYY-MM-DD HH:mm:ss'), + label: '30天', + }, + { + value: moment().add(60, 'days').format('YYYY-MM-DD HH:mm:ss'), + label: '60天', + }, + { + value: moment().add(90, 'days').format('YYYY-MM-DD HH:mm:ss'), + label: '90天', + }, + ] if (!applyAll) { list.value.map((item) => { @@ -171,8 +194,14 @@ export default { const baseURL = window.SITE_CONFIG.apiURL let record = ref('1') const text = ref('') - // 西海岸-特殊处理 todo + // 西海岸-特殊处理 let wrjAndDbText = ['单兵设备', '无人机'] + const isXiHaiAn = ref(whoShow.itShowXiHaiAn) + // 西海岸-判断是否是基础设施-摄像头 + const isCamera = ref(false); + if (list.value[0] && list.value[0].arr && list.value[0].arr[0] && list.value[0].arr[0].type == '基础设施') { + isCamera.value = true + } const formName = reactive({ title: applyAll ? '全部应用资源申请' @@ -331,8 +360,8 @@ export default { } } else { let obj = {} - Object.assign(obj, formName) - console.log('摄像头===============>', obj, item) + // todo + console.log('formName---摄像头--------->', formName); obj.system = [] item.note1 = JSON.parse(item.note1) item.note1.map((sxt) => { @@ -352,6 +381,8 @@ export default { status: sxt.status + '', }) }) + console.log('obj----摄像头申请-------->', obj); + return; submitApply(obj).then((res) => { // applySuccess.value = false console.log('摄像头申请================>', res) @@ -734,7 +765,7 @@ export default { }) } - // 西海岸:单兵设备、无人机提交申请 todo + // 西海岸:单兵设备、无人机提交申请 const handleWrjApply = (formName) => { let _data = { deviceId: formName.system && formName.system[0] && formName.system[0].resourceId, @@ -746,11 +777,8 @@ export default { applicationSystem: formName.applicationSystem, // 应用系统 applicationArea: JSON.stringify(formName.applicationScene), // 应用领域 demand: formName.applicationBackground, // 需求依据 - // applyUserId: formName.userId // 登录用户id } - console.log('_data-----提交申请------->', _data); soldierApply(_data).then(res => { - console.log('res----提交申请-------->', res); if (res.data.code == 0) { message.success(res.data.msg) jumpToDetailsPageconetent() @@ -794,6 +822,9 @@ export default { flag, applyAll, getIntegrationServicesDeatil, + isCamera, + isXiHaiAn, + expireDateOptions, } }, } @@ -839,6 +870,11 @@ export default { justify-content: space-between; } + .flex-row-start { + justify-content: flex-start; + align-items: center; + } + :deep(.ant-form-item-label) { label { color: #666; From 2df958d69e3f242a4bbdb40d55b57dd3283edfa2 Mon Sep 17 00:00:00 2001 From: guoyue Date: Tue, 27 Sep 2022 14:06:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A5=BF=E6=B5=B7=E5=B2=B8=EF=BC=9A?= =?UTF-8?q?=E8=83=BD=E5=8A=9B=E7=94=B3=E8=AF=B7--=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E7=BB=99=E5=87=BA=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/personalCenter/components/MyApply.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/front/src/views/personalCenter/components/MyApply.vue b/front/src/views/personalCenter/components/MyApply.vue index 2540017e..e0d49a4a 100644 --- a/front/src/views/personalCenter/components/MyApply.vue +++ b/front/src/views/personalCenter/components/MyApply.vue @@ -134,6 +134,8 @@ import { useRouter } from 'vue-router' import { message } from 'ant-design-vue' import ApplyDetails from '@/views/personalCenter/components/ApplyDetails' import mybus from '@/myplugins/mybus' +import * as moment from 'moment' + const router = useRouter() let typeList = ref([ '能力申请', @@ -218,12 +220,22 @@ const delObj = ref({}) const taskId = ref('') const backUrl = ref(window.SITE_CONFIG.apiURL + '/') const refObj = ref({}) + const showDetail = (item) => { - // getProcDefBizRoute(item.processDefinitionId) + // 西海岸-申请时间过期,提示 + if (isXiHaiAn) { + if (item.expireDate) { + let diff = moment().diff(moment(item.expireDate), 'seconds') + if (diff > 0) { + return message.error('当前申请已过期!') + } + } + } if (typeName.value == '能力申请' && item.applyFlag) { getByApplyFlag(item.applyFlag).then((res) => { if (res.data.code == 0) { - refObj.value = res.data.data + refObj.value = res.data.data; + detailsVisible.value = true processDefinitionName.value = item.processDefinitionName businessKey.value = item.businessKey