From f879cdaf094fdfaa039a82c414e381e67968587e Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Fri, 23 Aug 2024 08:51:36 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=9B=91=E6=8E=A7-?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E6=95=B0=E6=8D=AE=E9=A1=B6=E9=83=A8=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=BB=84=E6=94=B9=E4=B8=BA=E4=BE=BF=E6=90=BA=E5=BC=8F?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=89=80=E6=9C=89tab=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/tree/govern/pointTree.vue | 22 +++++---- src/components/tree/point.vue | 29 +++++++----- .../device/control/analysisList/index.vue | 36 ++++++++++---- src/views/govern/device/control/index.vue | 47 +++++++++---------- .../govern/device/control/tabs/realtime.vue | 16 +++---- 5 files changed, 85 insertions(+), 65 deletions(-) diff --git a/src/components/tree/govern/pointTree.vue b/src/components/tree/govern/pointTree.vue index 1f86e27..74e1fc7 100644 --- a/src/components/tree/govern/pointTree.vue +++ b/src/components/tree/govern/pointTree.vue @@ -1,5 +1,5 @@ - + diff --git a/src/views/govern/device/control/index.vue b/src/views/govern/device/control/index.vue index 1134248..0c84e6c 100644 --- a/src/views/govern/device/control/index.vue +++ b/src/views/govern/device/control/index.vue @@ -5,40 +5,20 @@ v-loading="loading" style="position: relative" > - +
@@ -100,7 +80,16 @@ 查询 -
+
{ loading.value = false } } +//治理设备和便携式设备切换判断 +const deviceType = ref('0') +const pointTypeChange = (val: any, obj: any) => { + deviceType.value = val + nodeClick(obj) +} const realTimeRef: any = ref() const intRealTime = async (val: any) => { await getTabsDataByType(val).then(res => { diff --git a/src/views/govern/device/control/tabs/realtime.vue b/src/views/govern/device/control/tabs/realtime.vue index 96bdba6..a9b53fc 100644 --- a/src/views/govern/device/control/tabs/realtime.vue +++ b/src/views/govern/device/control/tabs/realtime.vue @@ -20,7 +20,7 @@
-
+
@@ -75,10 +75,10 @@
{{ - tableData.find(item => { + tableData.find((item: any) => { return item.anotherName == vv.showName && item.phase == vv.phase })?.statisticalData - ? tableData.find(item => { + ? tableData.find((item: any) => { return item.anotherName == vv.showName && item.phase == vv.phase })?.statisticalData : '/' @@ -317,7 +317,7 @@ const initRadioCharts = () => { } }, { - value:70, + value: 70, name: 'B相', itemStyle: { color: '#DAA521' @@ -448,7 +448,7 @@ const getTableData = (list: any) => { })?.statisticalData }) if (index < 4) { - columnsDataTop.value.push(item) + columnsDataTop.value.push(item) } if (index >= 4) { columnsDataBot.value.push(item) @@ -582,8 +582,8 @@ onMounted(() => { height: auto; display: flex; justify-content: space-between; - border: 1px solid #eee; - padding: 10px; + //border: 1px solid #eee; + // padding: 10px; .view_top_left, .view_top_right { width: 30%; @@ -650,7 +650,7 @@ onMounted(() => { .table_info { width: 100%; height: 120px; - border: 1px solid #eee; + // border: 1px solid #eee; border-bottom: 2px solid #eee; margin-bottom: 20px; display: flex; From 829be660292cbe38005b7693a4f0228ff5c93108 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Mon, 26 Aug 2024 14:21:46 +0800 Subject: [PATCH 02/17] =?UTF-8?q?=E7=A6=BB=E7=BA=BF=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=A1=A5=E6=8B=9B=E6=96=87=E4=BB=B6=E5=A4=B9=E5=B1=82=E7=BA=A7?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/cs-harmonic-boot/recruitment.ts | 17 ++++ src/assets/img/wenjian.svg | 1 + src/assets/img/wenjianjia.svg | 1 + src/views/govern/device/control/index.vue | 21 +--- .../control/supplementaryRecruitment.vue | 38 ++++++-- .../currentDevice.vue | 97 +++++++++++++++++++ 6 files changed, 147 insertions(+), 28 deletions(-) create mode 100644 src/api/cs-harmonic-boot/recruitment.ts create mode 100644 src/assets/img/wenjian.svg create mode 100644 src/assets/img/wenjianjia.svg create mode 100644 src/views/govern/device/control/supplementaryRecruitment/currentDevice.vue diff --git a/src/api/cs-harmonic-boot/recruitment.ts b/src/api/cs-harmonic-boot/recruitment.ts new file mode 100644 index 0000000..d4db64a --- /dev/null +++ b/src/api/cs-harmonic-boot/recruitment.ts @@ -0,0 +1,17 @@ +import createAxios from '@/utils/request' + +// 获取设备补招页面数据 +export function getMakeUpData(data: any) { + return createAxios({ + url: '/cs-harmonic-boot/offlineDataUpload/makeUpData?lineId='+data, + method: 'POST' + }) +} + +//查询装置目录-文件 +export function getAskDirOrFile(data: any) { + return createAxios({ + url: `/cs-harmonic-boot/offlineDataUpload/askDirOrFile?fileType=${data.fileType}&nDid=${data.nDid}&path=${data.path}&prjName=${data.prjName}`, + method: 'POST' + }) +} \ No newline at end of file diff --git a/src/assets/img/wenjian.svg b/src/assets/img/wenjian.svg new file mode 100644 index 0000000..a83da60 --- /dev/null +++ b/src/assets/img/wenjian.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/wenjianjia.svg b/src/assets/img/wenjianjia.svg new file mode 100644 index 0000000..bcac974 --- /dev/null +++ b/src/assets/img/wenjianjia.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/govern/device/control/index.vue b/src/views/govern/device/control/index.vue index 0c84e6c..3f7b0bd 100644 --- a/src/views/govern/device/control/index.vue +++ b/src/views/govern/device/control/index.vue @@ -349,7 +349,8 @@ const handleaddDevice = () => { push({ path: '/supplementaryRecruitment', query: { - id: '1111' + id: lineId.value, + ndid:deviceData.value.ndid } }) } @@ -521,17 +522,11 @@ const handleClick = async (tab?: any) => { //模版下载 const handleDownLoadTemplate = () => {} //解析列表 -// const isAnalysisList = ref(false) const analysisListRef = ref() //打开解析列表 const handleAnalysisList = () => { - // isAnalysisList.value = true analysisListRef.value && analysisListRef.value.open() } -//返回 -// const handleBackAnalysisList=()=>{ -// isAnalysisList.value = false -// } //离线数据导入 const offLineDataImportRef = ref() const handleImport = () => { @@ -586,18 +581,6 @@ const openGroup = () => { }) }) } -watch( - () => dataSet.value, - (val: any, oldVal: any) => { - if (val) { - // handleClick() - } - } -) -watch( - () => tableData.value, - (val: any, oldVal: any) => {} -) onMounted(() => {}) diff --git a/src/views/govern/device/control/supplementaryRecruitment.vue b/src/views/govern/device/control/supplementaryRecruitment.vue index e0e31e8..cea0538 100644 --- a/src/views/govern/device/control/supplementaryRecruitment.vue +++ b/src/views/govern/device/control/supplementaryRecruitment.vue @@ -2,7 +2,8 @@
- + + @@ -10,14 +11,33 @@
- - \ No newline at end of file + diff --git a/src/views/govern/device/control/supplementaryRecruitment/currentDevice.vue b/src/views/govern/device/control/supplementaryRecruitment/currentDevice.vue new file mode 100644 index 0000000..431bd97 --- /dev/null +++ b/src/views/govern/device/control/supplementaryRecruitment/currentDevice.vue @@ -0,0 +1,97 @@ + + + From 2c594068712ca099a080af585621cdcb86c6d68c Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Thu, 29 Aug 2024 11:24:46 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=B1=BB=E5=9E=8B=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/auth/menu/api.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/auth/menu/api.vue b/src/views/auth/menu/api.vue index a048e05..650b9b3 100644 --- a/src/views/auth/menu/api.vue +++ b/src/views/auth/menu/api.vue @@ -44,7 +44,13 @@ const tableStore = new TableStore({ url: '/user-boot/function/getButtonById', column: [ { title: '普通接口/接口名称', field: 'name' }, - { title: '接口类型', field: 'type' }, + { + title: '接口类型', + field: 'type', + formatter: row => { + return row.cellValue == 1 ? '普通借口' : '公用接口' + } + }, { title: 'URL接口路径', field: 'path' }, { title: '操作', @@ -112,4 +118,4 @@ const search = () => { item.path.indexOf(tableStore.table.params.searchValue) !== -1 ) } - \ No newline at end of file + From 64d82adb571b58d959b522bceedb5f14c165e99b Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Fri, 30 Aug 2024 16:34:06 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=9C=8D=E5=8A=A1-?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9B=AE=E5=BD=95/=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/cs-device-boot/fileService.ts | 41 +++ src/views/auth/menu/popupApi.vue | 2 +- .../device/control/analysisList/index.vue | 2 +- src/views/govern/device/fileService/index.vue | 239 ++++++++++++++++++ src/views/govern/device/fileService/popup.vue | 83 ++++++ 5 files changed, 365 insertions(+), 2 deletions(-) create mode 100644 src/api/cs-device-boot/fileService.ts create mode 100644 src/views/govern/device/fileService/index.vue create mode 100644 src/views/govern/device/fileService/popup.vue diff --git a/src/api/cs-device-boot/fileService.ts b/src/api/cs-device-boot/fileService.ts new file mode 100644 index 0000000..7a09ec3 --- /dev/null +++ b/src/api/cs-device-boot/fileService.ts @@ -0,0 +1,41 @@ +import createAxios from '@/utils/request' + +// 设备文件根目录查询 +export function getDeviceRootPath(nDid) { + return createAxios({ + url: '/cs-device-boot/deviceFile/askDeviceRootPath?nDid=' + nDid, + method: 'POST' + }) +} + +// 设备文件-目录信息询问 +export function getFileServiceFileOrDir(data) { + return createAxios({ + url: `cs-device-boot/deviceFile/askDeviceFileOrDir?nDid=${data.nDid}&name=${data.name}&type=${data.type}`, + method: 'POST' + }) +} + +//设备文件下载 +export function downLoadDeviceFile(data) { + return createAxios({ + url: `/cs-device-boot/deviceFile/downloadFile?nDid=${data.nDid}&name=${data.name}&fileCheck=${data.fileCheck}&size=${data.size}`, + method: 'POST' + }) +} + +//上传文件至装置 +export function uploadDeviceFile(data) { + let form = new FormData() + form.append('file', data.file) + form.append('filePath', data.filePath) + form.append('id', data.id) + return createAxios({ + url: `/access-boot/analyzeModel/uploadDevFile`, + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: form + }) +} diff --git a/src/views/auth/menu/popupApi.vue b/src/views/auth/menu/popupApi.vue index bc5c3ae..eced413 100644 --- a/src/views/auth/menu/popupApi.vue +++ b/src/views/auth/menu/popupApi.vue @@ -59,7 +59,7 @@ const rules = { code: [ { required: true, message: '标识不能为空', trigger: 'blur' }, { - pattern: /^[a-zA-Z_]{1}[a-zA-Z0-9_]{2,15}$/, + pattern: /^[a-zA-Z_]{1}[a-zA-Z0-9_]{2,20}$/, message: '请输入至少3-20位英文', min: 3, max: 20, diff --git a/src/views/govern/device/control/analysisList/index.vue b/src/views/govern/device/control/analysisList/index.vue index 233bff7..c121689 100644 --- a/src/views/govern/device/control/analysisList/index.vue +++ b/src/views/govern/device/control/analysisList/index.vue @@ -80,7 +80,7 @@ const updateViewportHeight = async () => { // height.value = window.innerHeight; height.value = window.innerHeight < 1080 ? 180 : 400 tableStore.table.publicHeight = height.value - await tableStore.index() + // await tableStore.index() } onMounted(() => { diff --git a/src/views/govern/device/fileService/index.vue b/src/views/govern/device/fileService/index.vue new file mode 100644 index 0000000..efc223c --- /dev/null +++ b/src/views/govern/device/fileService/index.vue @@ -0,0 +1,239 @@ + + + + + + diff --git a/src/views/govern/device/fileService/popup.vue b/src/views/govern/device/fileService/popup.vue new file mode 100644 index 0000000..da9319a --- /dev/null +++ b/src/views/govern/device/fileService/popup.vue @@ -0,0 +1,83 @@ + + + + From 5183bacc19193000fe6e7e9f85199be4a31450bf Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Fri, 30 Aug 2024 16:38:23 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=8C=89=E9=92=AEloadi?= =?UTF-8?q?ng=E5=88=A4=E8=AF=BB=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/govern/device/fileService/popup.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/govern/device/fileService/popup.vue b/src/views/govern/device/fileService/popup.vue index da9319a..7c7d2b8 100644 --- a/src/views/govern/device/fileService/popup.vue +++ b/src/views/govern/device/fileService/popup.vue @@ -67,8 +67,10 @@ const handleDownLoad = () => { if (res.code == 'A0000') { window.open(res.data, '_blank') downLoading.value = false - } else if (res.code && res.code != 'A0000') { - downLoading.value = false + } + }).catch((e)=>{ + if(e){ + downLoading.value=false; } }) } From 40c909ea61e38f368722227b44c2cbea04b68201 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Mon, 2 Sep 2024 18:19:47 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/govern/device/fileService/index.vue | 127 +++++++++++++++--- src/views/govern/device/fileService/popup.vue | 28 ++-- 2 files changed, 122 insertions(+), 33 deletions(-) diff --git a/src/views/govern/device/fileService/index.vue b/src/views/govern/device/fileService/index.vue index efc223c..da13c1c 100644 --- a/src/views/govern/device/fileService/index.vue +++ b/src/views/govern/device/fileService/index.vue @@ -17,15 +17,49 @@
+
+ + 搜索 + 重置 +
-
+
- - + +
- - +
+ + + + + +
+ + 暂无内容

{{ @@ -49,8 +83,13 @@ import DeviceTree from '@/components/tree/govern/deviceTree.vue' import { mainHeight } from '@/utils/layout' import { ref, reactive, watch } from 'vue' import { ElMessage } from 'element-plus' -import { ArrowLeft, ArrowRight, Download } from '@element-plus/icons-vue' -import { getDeviceRootPath, getFileServiceFileOrDir, downLoadDeviceFile,uploadDeviceFile } from '@/api/cs-device-boot/fileService.ts' +import { ArrowLeft, ArrowRight, Download, Upload } from '@element-plus/icons-vue' +import { + getDeviceRootPath, + getFileServiceFileOrDir, + downLoadDeviceFile, + uploadDeviceFile +} from '@/api/cs-device-boot/fileService.ts' import popup from './popup.vue' defineOptions({ name: 'govern/device/fileService' @@ -81,11 +120,34 @@ const nodeClick = (e: any) => { }) } } - +//搜索文件或文件夹 +const filterFileName = ref('') +const handleSearch = () => { + let filterList = [] + dirList.value = currentDirList.value + dirList.value.map(item => { + if (filterFileName.value && item.prjDataPath.includes(filterFileName.value)) { + filterList.push(item) + } + }) + if (filterList.length != 0) { + dirList.value = filterList + } + if (!filterFileName) { + dirList.value = currentDirList.value + } +} +//重置搜索 +const handleRefresh = () => { + filterFileName.value = '' + dirList.value = currentDirList.value +} // 进入文件夹 const dirList = ref([]) +// 村村当前目录数据 +const currentDirList = ref([]) const handleIntoDir = (row: any) => { - if (!row.type||row.type == 'file') return + if (!row.type || row.type == 'file') return loading.value = true const obj = { nDid: nDid.value, @@ -100,6 +162,7 @@ const handleIntoDir = (row: any) => { getFileServiceFileOrDir(obj).then(res => { dirList.value = res.data loading.value = false + currentDirList.value = res.data activePathList.value.map((item: any, index: any) => { if (item.path.includes(activePath.value) && item.path.length > activePath.value.length) { activePathList.value.splice(index, 1) @@ -109,15 +172,13 @@ const handleIntoDir = (row: any) => { } //上传文件 -const uploadFile=(file:any)=>{ - const obj={ - id:nDid.value, - file:file, - filePath:'/' +const uploadFile = (file: any) => { + const obj = { + id: nDid.value, + file: file, + filePath: '/' } - uploadDeviceFile().then((res)=>{ - - }) + uploadDeviceFile().then(res => {}) } //根据面包屑导航切换 @@ -141,7 +202,22 @@ const handleIntoByPath = async (val: any) => { //下载文件 const fileRef = ref() const handleDownLoad = async (row: any) => { - await fileRef.value && fileRef.value.open(row, nDid.value) + ;(await nDid.value) && fileRef.value && fileRef.value.open(row, nDid.value) +} +//上传文件 +const handleUpload = (e: any, fileList: any, row: any) => { + console.log(e, fileList, row) + const obj = { + id: nDid.value, + file: e.raw, + filePath: row.prjDataPath + } + uploadDeviceFile(obj).then(res => { + console.log(res, '上传文件毁掉') + if (res.code == 'A0000') { + ElMessage.success(res.message) + } + }) } watch( () => activePathList.value, @@ -191,12 +267,22 @@ watch( cursor: pointer; } } + .filter { + width: 100%; + height: 30px; + display: flex; + margin-top: 10px; + justify-content: flex-start; + .el-button { + margin-left: 10px; + } + } .list { display: flex; flex-wrap: wrap; align-items: flex-start; overflow-y: auto; - margin-top: 20px; + margin-top: 10px; height: 100%; padding-bottom: 200px; z-index: 100; @@ -214,7 +300,8 @@ watch( cursor: pointer; position: relative; z-index: 1001 !important; - .item_download { + .item_download, + .item_upload { position: absolute; top: 10px; right: 10px; diff --git a/src/views/govern/device/fileService/popup.vue b/src/views/govern/device/fileService/popup.vue index 7c7d2b8..1d2c77d 100644 --- a/src/views/govern/device/fileService/popup.vue +++ b/src/views/govern/device/fileService/popup.vue @@ -39,15 +39,15 @@ const handleClose = () => { } //文件信息 const fileData: any = ref({}) -const open = (row: any, id: any) => { +const open = async (row: any, id: any) => { dialogVisible.value = true + loading.value = true const obj = { nDid: id, name: row.prjDataPath, type: row.type } - loading.value = true - getFileServiceFileOrDir(obj).then(res => { + await getFileServiceFileOrDir(obj).then(res => { if (res.code == 'A0000') { fileData.value = res.data[0] fileData.value.nDid = id @@ -63,16 +63,18 @@ const handleDownLoad = () => { fileCheck: fileData.value.fileCheck } downLoading.value = true - downLoadDeviceFile(obj).then(res => { - if (res.code == 'A0000') { - window.open(res.data, '_blank') - downLoading.value = false - } - }).catch((e)=>{ - if(e){ - downLoading.value=false; - } - }) + downLoadDeviceFile(obj) + .then(res => { + if (res.code == 'A0000') { + window.open(res.data, '_blank') + downLoading.value = false + } + }) + .catch(e => { + if (e) { + downLoading.value = false + } + }) } onMounted(() => {}) onUnmounted(() => {}) From 3a1520aa9525f6e3c369d343a1745b80f4029bb0 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Mon, 2 Sep 2024 18:39:44 +0800 Subject: [PATCH 07/17] =?UTF-8?q?1.=E4=B8=8B=E8=BD=BD=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=90=8E=E5=85=B3=E9=97=AD=E5=BC=B9=E6=A1=862.=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E8=8F=9C=E5=8D=95=E6=A0=8F=E8=B7=B3=E8=BD=AC=E5=8A=A0?= =?UTF-8?q?loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/govern/device/fileService/index.vue | 2 ++ src/views/govern/device/fileService/popup.vue | 3 +++ vite.config.ts | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/govern/device/fileService/index.vue b/src/views/govern/device/fileService/index.vue index da13c1c..6aa2817 100644 --- a/src/views/govern/device/fileService/index.vue +++ b/src/views/govern/device/fileService/index.vue @@ -189,6 +189,7 @@ const handleIntoByPath = async (val: any) => { type: 'dir' } activePath.value = val.path + loading.value=true getFileServiceFileOrDir(obj).then(res => { dirList.value = res.data activePathList.value.map((item: any, index: any) => { @@ -196,6 +197,7 @@ const handleIntoByPath = async (val: any) => { activePathList.value.splice(index, 1) } }) + loading.value=false }) } diff --git a/src/views/govern/device/fileService/popup.vue b/src/views/govern/device/fileService/popup.vue index 1d2c77d..53e9691 100644 --- a/src/views/govern/device/fileService/popup.vue +++ b/src/views/govern/device/fileService/popup.vue @@ -30,6 +30,7 @@ From 2bce41c561c418535167eb3320f302fb9c0f4380 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Mon, 2 Sep 2024 20:48:07 +0800 Subject: [PATCH 13/17] =?UTF-8?q?=E6=96=87=E4=BB=B6/=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=E6=B0=B4=E5=B9=B3=E4=BD=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/govern/device/fileService/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/govern/device/fileService/index.vue b/src/views/govern/device/fileService/index.vue index d3dbcba..f060668 100644 --- a/src/views/govern/device/fileService/index.vue +++ b/src/views/govern/device/fileService/index.vue @@ -320,6 +320,7 @@ watch( display: flex; flex-wrap: wrap; align-items: flex-start; + justify-content: space-between; overflow-y: auto; margin-top: 10px; height: 100%; From 9fc5cc92a80caab64d7f018b29a2a0e25bbad33a Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Mon, 2 Sep 2024 20:59:24 +0800 Subject: [PATCH 14/17] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/govern/device/fileService/index.vue | 25 ++++--------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/src/views/govern/device/fileService/index.vue b/src/views/govern/device/fileService/index.vue index f060668..46049cd 100644 --- a/src/views/govern/device/fileService/index.vue +++ b/src/views/govern/device/fileService/index.vue @@ -43,21 +43,6 @@

-
@@ -89,7 +74,7 @@ v-if="item?.type == 'file'" src="@/assets/img/wenjian.svg" /> - +

{{ item && @@ -102,7 +87,7 @@

- +
@@ -147,6 +132,8 @@ const nodeClick = (e: any) => { activePathList.value.push({ path: activePath.value }) } }) + }).catch((e)=>{ + loading.value = false }) } } @@ -245,14 +232,12 @@ const handleDownLoad = async (row: any) => { } //上传文件 const handleUpload = (e: any, fileList: any, row: any) => { - console.log(e, fileList, row) const obj = { id: nDid.value, file: e.raw, filePath: row|| row.prjDataPath } uploadDeviceFile(obj).then(res => { - console.log(res, '上传文件毁掉') if (res.code == 'A0000') { ElMessage.success(res.message) } @@ -323,7 +308,7 @@ watch( justify-content: space-between; overflow-y: auto; margin-top: 10px; - height: 100%; + max-height: 100%; padding-bottom: 200px; z-index: 100; position: relative; From 26390b55f722e3f5a4bac991307a9eb543d31164 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Tue, 3 Sep 2024 10:52:36 +0800 Subject: [PATCH 15/17] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/govern/device/fileService/index.vue | 68 +++++++++++++------ 1 file changed, 46 insertions(+), 22 deletions(-) diff --git a/src/views/govern/device/fileService/index.vue b/src/views/govern/device/fileService/index.vue index 46049cd..610fe96 100644 --- a/src/views/govern/device/fileService/index.vue +++ b/src/views/govern/device/fileService/index.vue @@ -28,19 +28,24 @@ 搜索 重置 - - 文件上传 - - + > + + 文件上传 + + + +
+ {{ fileName }} 上传中... +
@@ -87,7 +92,7 @@

- +
@@ -123,18 +128,20 @@ const nodeClick = (e: any) => { loading.value = true if (e.level == 2) { nDid.value = e.ndid - getDeviceRootPath(nDid.value).then(res => { - loading.value = false - dirList.value = [res.data] - activePath.value = res.data.prjDataPath - activePathList.value.map((item: any, index: any) => { - if (item.path.indexOf(res.data.prjDataPath) == -1) { - activePathList.value.push({ path: activePath.value }) - } + getDeviceRootPath(nDid.value) + .then(res => { + loading.value = false + dirList.value = [res.data] + activePath.value = res.data.prjDataPath + activePathList.value.map((item: any, index: any) => { + if (item.path.indexOf(res.data.prjDataPath) == -1) { + activePathList.value.push({ path: activePath.value }) + } + }) + }) + .catch(e => { + loading.value = false }) - }).catch((e)=>{ - loading.value = false - }) } } //搜索文件或文件夹 @@ -231,15 +238,20 @@ const handleDownLoad = async (row: any) => { ;(await nDid.value) && fileRef.value && fileRef.value.open(row, nDid.value) } //上传文件 +const progressVisibile = ref(false) +const fileName = ref('') const handleUpload = (e: any, fileList: any, row: any) => { + fileName.value = e.name const obj = { id: nDid.value, file: e.raw, - filePath: row|| row.prjDataPath + filePath: row || row.prjDataPath } + progressVisibile.value = true uploadDeviceFile(obj).then(res => { if (res.code == 'A0000') { ElMessage.success(res.message) + progressVisibile.value = false } }) } @@ -300,6 +312,18 @@ watch( .el-button { margin-left: 10px; } + .upload_progress { + flex: 1; + height: 30px; + display: flex; + align-items: center; + justify-content: flex-start; + margin-left: 10px; + .el-progress { + width: 300px; + margin-left: 10px; + } + } } .list { display: flex; From 25437f939abaa288d2a3405c902cd25f5bb646cb Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Wed, 4 Sep 2024 15:23:54 +0800 Subject: [PATCH 16/17] =?UTF-8?q?=E8=A3=85=E7=BD=AE=E9=87=8D=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/cs-device-boot/fileService.ts | 8 ++ src/views/govern/device/fileService/index.vue | 111 +++++++++++++----- src/views/govern/device/manage/index.vue | 9 ++ 3 files changed, 97 insertions(+), 31 deletions(-) diff --git a/src/api/cs-device-boot/fileService.ts b/src/api/cs-device-boot/fileService.ts index 7a09ec3..ad04a50 100644 --- a/src/api/cs-device-boot/fileService.ts +++ b/src/api/cs-device-boot/fileService.ts @@ -24,6 +24,14 @@ export function downLoadDeviceFile(data) { }) } +//装置重启 +export function reStartDevice(data) { + return createAxios({ + url: `/cs-device-boot/EquipmentDelivery/rebootDevice?nDid=${data.nDid}`, + method: 'POST' + }) +} + //上传文件至装置 export function uploadDeviceFile(data) { let form = new FormData() diff --git a/src/views/govern/device/fileService/index.vue b/src/views/govern/device/fileService/index.vue index 610fe96..a2ccb83 100644 --- a/src/views/govern/device/fileService/index.vue +++ b/src/views/govern/device/fileService/index.vue @@ -5,19 +5,25 @@
-