From 0f6b37e52e686c4a81f82419d65ee6940ad1b25e Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Thu, 30 Jun 2022 15:27:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=91=84=E5=83=8F=E5=A4=B4=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/public/static/config/location.js | 6 +- front/src/views/home/AbilityToApplyFor.vue | 14 +- front/src/views/home/apply.vue | 123 +++++++----------- front/src/views/home/infrastructurePage.vue | 76 ++++++++++- .../components/PurchaseVehicle.vue | 62 +++++---- 5 files changed, 163 insertions(+), 118 deletions(-) diff --git a/front/public/static/config/location.js b/front/public/static/config/location.js index 688a983f..b63b09da 100644 --- a/front/public/static/config/location.js +++ b/front/public/static/config/location.js @@ -2,7 +2,7 @@ * @Author: hisense.wuhongjian * @Date: 2020-07-07 16:03:23 * @LastEditors: hisense.liangjunhua - * @LastEditTime: 2022-06-27 14:22:56 + * @LastEditTime: 2022-06-30 11:05:52 * @Description: 数据资源参数配置 */ const newLocation = 'qingdao' @@ -14,6 +14,8 @@ const whoShow = {} const launchedDataNumObject = {} // 导航数据 const navListManagement = {} +// 基础设施 +const infrastructure = {} // 区市站点数据 const mapTestNum = {} // 底部数据 @@ -21,6 +23,8 @@ const footerDataList = {} // qingdao if (newLocation === 'qingdao') { whoShow.itShowQingDao = true + infrastructure.deptName = '青岛市大数据发展管理局' + infrastructure.deptId = '1067246875800000066' navListManagement.navList = [ { name: '共享门户', key: 'home' }, { name: '能力集市', key: 'DetailsPageconetent' }, diff --git a/front/src/views/home/AbilityToApplyFor.vue b/front/src/views/home/AbilityToApplyFor.vue index ec68b65f..af0309ac 100644 --- a/front/src/views/home/AbilityToApplyFor.vue +++ b/front/src/views/home/AbilityToApplyFor.vue @@ -16,7 +16,17 @@ {{ val.resourceName }} {{ val.type }} -
{{ val.description || '--' }}
+
+ {{ + val.description || + (val.note1 && + JSON.parse(val.note1)[0].channelName + + '等' + + JSON.parse(val.note1).length + + '个摄像头') || + '--' + }} +
@@ -48,7 +58,7 @@ //移除方法 const removeFunction = (data) => { dataForm.value.map((val) => { - val.arr = val.arr.filter((item) => item.resourceId !== data.resourceId) + val.arr = val.arr.filter((item) => item.id !== data.id) }) dataForm.value = dataForm.value.filter((val) => val.arr.length !== 0) } diff --git a/front/src/views/home/apply.vue b/front/src/views/home/apply.vue index 0af91f1c..263c64b1 100644 --- a/front/src/views/home/apply.vue +++ b/front/src/views/home/apply.vue @@ -378,88 +378,57 @@ } let ids = [] formName.system = [] + console.log('list==================', list.value) list.value.map((val) => { val.arr.map((item) => { - formName.system.push({ - resourceId: item.resourceId, - resourceName: item.resourceName, - }) - console.log(item.id) - ids.push(item.id) + if (item.type !== '基础设施') { + formName.system.push({ + resourceId: item.resourceId, + resourceName: item.resourceName, + }) + console.log(item.id) + ids.push(item.id) + } else { + let obj = {} + Object.assign(obj, formName) + console.log('摄像头===============>', obj, item) + obj.system = [] + item.note1 = JSON.parse(item.note1) + item.note1.map((sxt) => { + obj.system.push({ + resourceId: sxt.idtCameraChannel, + resourceName: sxt.channelName, + cameraId: sxt.channelId, + }) + }) + submitApply(obj).then((res) => { + console.log('摄像头申请================>', res) + if (item.id) { + sgcDel({ ids: [item.id] }).then((res) => { + if (res.data.msg === 'success') { + mybus.emit('getSgcNum') + } + }) + } + }) + } }) }) console.log('提交数据==========================>', formName, ids) - submitApply(formName).then((res) => { - applySuccess.value = false - message.success('操作成功!') - console.log('能力申请================>', res) - if (ids) { - sgcDel({ ids: ids }).then((res) => { - if (res.data.msg === 'success') { - mybus.emit('getSgcNum') - } - }) - } - }) - // if (arr && arr.length !== 0) { - // console.log('提交') - // const obj = ref({}) - // for (const key in formName) { - // if (key !== 'formNameSystem') { - // obj.value[key] = formName[key] - // } - // } - // submitApply(obj.value).then((res) => { - // applySuccess.value = false - // message.success('操作成功!') - // console.log('能力申请================>', res) - // if (ids) { - // sgcDel({ ids: ids }).then((res) => { - // if (res.data.msg === 'success') { - // mybus.emit('getSgcNum') - // } - // }) - // } - // }) - // } else { - // lastestPage({ - // key: dataForm.processDefinitionKey, - // }) - // .then(({ data: res }) => { - // if (res.code !== 0) { - // return message.error(res.msg) - // } - // if (!res.data.list || res.data.list.length <= 0) { - // return message.error('没有查询到流程,请先设计流程') - // } - // // proxy.$http['post'](formUrl, rootObj[formName]) - // tabilityapplication(formName) - // .then(({ data: res }) => { - // if (res.code !== 0) { - // message.error(res.msg) - // if (callbacks.formSaveErrorCallback) { - // callbacks.formSaveErrorCallback(res) - // } - // } - // if (callbacks.formSaveSuccessCallback) { - // callbacks.formSaveSuccessCallback(res) - // } - // if (!res.data.businessKey) { - // return message.error('业务KEY为空,无法启动流程') - // // startProcess(dataForm.processDefinitionKey, null, rootObj[formName]) - // } else { - // startProcess( - // dataForm.processDefinitionKey, - // res.data.businessKey - // // rootObj[formName] - // ) - // } - // }) - // .catch(() => {}) - // }) - // .catch(() => {}) - // // }) - // } + if (formName.system.length !== 0) { + submitApply(formName).then((res) => { + applySuccess.value = false + message.success('操作成功!') + console.log('能力申请================>', res) + if (ids) { + sgcDel({ ids: ids }).then((res) => { + if (res.data.msg === 'success') { + mybus.emit('getSgcNum') + } + }) + } + }) + } }) } } diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index e68ecad9..a68f92a0 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -37,7 +37,7 @@

已选 - {{ allClick.length }} + {{ selectedRowKeys.length }}

@@ -86,7 +86,9 @@ @change="handleTableChange" :row-selection="{ selectedRowKeys: selectedRowKeys, - onChange: onSelectChange, + // onChange: onSelectChange, + onSelect: onSelectChange, + onSelectAll: onSelectAll, }" >