فهرست منبع

Merge remote-tracking branch 'origin/master'

Lin Qilong 2 ماه پیش
والد
کامیت
088d24f6b9

+ 15 - 0
ruoyi-admin/src/main/resources/application-dev.yml

@@ -1,3 +1,18 @@
+ruoyi:
+  # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
+  profile: /soft/sh-models/uploadPath
+sys:
+  gateway:
+    url: http://localhost:8081
+  report:
+    upload:
+      path: /soft/sh-model/report/
+  chart:
+    upload:
+      path: /soft/sh-model/chart/
+  map:
+    upload:
+      path: /soft/sh-model/map/
 # 数据源配置
 spring:
   datasource:

+ 15 - 0
ruoyi-admin/src/main/resources/application-dm.yml

@@ -1,3 +1,18 @@
+ruoyi:
+  # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
+  profile: D:/soft/sh-models/uploadPath
+sys:
+  gateway:
+    url: http://localhost:8081
+    report:
+      upload:
+        path: /soft/sh-model/report/
+    chart:
+      upload:
+        path: /soft/sh-model/chart/
+    map:
+      upload:
+        path: /soft/sh-model/map/
 # 数据源配置
 spring:
   datasource:

+ 15 - 0
ruoyi-admin/src/main/resources/application-druid.yml

@@ -1,3 +1,18 @@
+ruoyi:
+  # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
+  profile: D:/soft/sh-models/uploadPath
+sys:
+  gateway:
+    url: http://localhost:8081
+    report:
+      upload:
+        path: /soft/sh-model/report/
+    chart:
+      upload:
+        path: /soft/sh-model/chart/
+    map:
+      upload:
+        path: /soft/sh-model/map/
 # 数据源配置
 spring:
   datasource:

+ 15 - 0
ruoyi-admin/src/main/resources/application-test.yml

@@ -1,3 +1,18 @@
+ruoyi:
+  # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
+  profile: D:/soft/sh-models/uploadPath
+sys:
+  gateway:
+    url: http://localhost:8081
+    report:
+      upload:
+        path: /soft/sh-model/report/
+    chart:
+      upload:
+        path: /soft/sh-model/chart/
+    map:
+      upload:
+        path: /soft/sh-model/map/
 # 数据源配置
 spring:
   datasource:

+ 0 - 23
ruoyi-admin/src/main/resources/application.yml

@@ -6,8 +6,6 @@ ruoyi:
   version: 3.8.8
   # 版权年份
   copyrightYear: 2024
-  # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
-  profile: D:/tmp/sh-models/uploadPath
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数字计算 char 字符验证
@@ -133,20 +131,6 @@ xss:
   # 匹配链接
   urlPatterns: /system/*,/monitor/*,/tool/*
 
-sys:
-  gateway:
-    url: http://localhost:8081
-  report:
-    upload:
-      path: D:/tmp/report/
-  chart:
-    upload:
-      path: D:/tmp/chart/
-  map:
-    upload:
-      path: D:/tmp/map/
-
-
 # 调度器相关配置dpp
 ds:
   # 调度器api前缀
@@ -179,13 +163,6 @@ id.workerId: 1
 #数据中心ID(0~31)
 id.datacenterId: 1
 
-golden:
-  plugin:
-    mode: deployment
-    enabled: true
-    work-dir: D:/Workspaces/sh-model-platform/plugins
-    path: D:/Workspaces/sh-model-platform/plugins
-
 #sm4密钥
 sm4:
   secret-key: "8E4A7C2F9B1D5E3A6C8F0B2D4E6A8C05" # 32位十六进制字符串,对应16字节密钥

+ 0 - 1
ruoyi-ui/src/views/codeModel(developer).vue

@@ -154,7 +154,6 @@ const formZu = ref({
   itemName:'',
   itemTp:'',
   itemEn:'',
-  itemTp:'',
   itemDataTp:'',
   itemDefaultVal:'',
   itemUnit:'',

+ 1 - 1
ruoyi-ui/src/views/error/404.vue

@@ -17,7 +17,7 @@
         <div class="bullshit__info">
           对不起,您正在寻找的页面不存在。尝试检查URL的错误,然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容。
         </div>
-        <router-link to="/index" class="bullshit__return-home">
+        <router-link to="/datamonitor/monitorservice" class="bullshit__return-home">
           返回首页
         </router-link>
       </div>

+ 1 - 1
ruoyi-ui/src/views/platform/plugin/index.vue

@@ -3,7 +3,7 @@
       <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
          <el-form-item label="目录名称" prop="deptName">
             <el-input
-               v-model="queryParams.deptName"
+               v-model="queryParams.catalogName"
                placeholder=""
                clearable
                style="width: 200px"

+ 25 - 9
ruoyi-ui/src/views/register/componentReg/index.vue

@@ -1877,7 +1877,7 @@ async function editSer(row){
 }
 const dialogVisibleSer = ref(false)
 function handleNodeClick(node, data){
-    console.log(node.mgid)
+  console.log(node,data)
     parMgid.value = node.mgid
     var keyArray = []
     selFen.value = false
@@ -2005,6 +2005,7 @@ function saveChangePar(){
       }
     })
     if(parRule === true){
+      tableDataCanAll.value = removeDuplicateObjects(tableDataCanAll.value)
       changePar(tableDataCanAll.value).then(res=>{
         if(res.code===200){
           proxy.$modal.msgSuccess("修改成功");
@@ -2030,6 +2031,14 @@ function saveChangePar(){
     })
   }
 }
+function removeDuplicateObjects(arr) {
+    // 将对象数组转换为JSON字符串数组,利用Set去重,再转换回对象
+    const uniqueArray = Array.from(
+        new Set(arr.map(obj => JSON.stringify(obj)))
+    ).map(str => JSON.parse(str));
+    
+    return uniqueArray;
+}
 async function showPei(row){
   remarkVer.value = ''
   fileVersion.value = ''
@@ -2074,13 +2083,7 @@ async function showPei(row){
       }
     }
   })
-  await getModelParList(par).then(res=>{
-    groupTreeData.value = res.data
-    groupTreeData.value.forEach((item, index, array) => { 
-      item.label = item.parGroupName
-      item.value = item.parGroupCode
-    })
-  })
+  
   await getModelDetail(row.mdid).then(res=>{
     parForm.value = res.data
     formJi.value = res.data
@@ -2094,6 +2097,18 @@ async function showPei(row){
   }) 
   
   tableDataCanAll.value = JSON.parse(JSON.stringify(tableDataCan.value))
+  await getModelParList(par).then(res=>{
+    groupTreeData.value = res.data
+    groupTreeData.value.forEach((item, index, array) => { 
+      item.label = item.parGroupName
+      item.value = item.parGroupCode
+    })
+    console.log(groupTreeData.value)
+    var par1  = {
+      data:groupTreeData.value[0]
+    }
+    handleNodeClick(groupTreeData.value[0],par1)
+  })
 }
 function delCan(index,row){
   tableDataCan.value.splice(index, 1)
@@ -2342,11 +2357,12 @@ async function delVer(row) {
   });
 }
 function clearForm(){
+  parMgid.value = null
   tableDataCan.value = []
   formAdd.value = {
   }
   tableDataCanAdd.value = []
-  checked1.value = false
+  checked1.value = true
   activeName.value = 'first'
   fileList.value = []
   fileList1.value = []

+ 30 - 9
ruoyi-ui/src/views/register/componentReg/peizhi.vue

@@ -75,7 +75,12 @@
         <el-table-column prop="address" label="操作" width="100">
             <template #default="scope">
                 <div style="display: flex;justify-content: space-between;width: 100%;">
+                    <!-- <el-button type="primary" @click="showEdit(scope.row)" size="mini" text style="margin-left: 0%;">编辑</el-button> -->
+                    <!-- <el-button type="danger" text size="mini" style="margin-left: -5%;" @click="handleDelete(scope.row)">注销</el-button> -->
+                    <!-- <el-button @click="showDe(scope.row)" type="primary" text size="mini" style="margin-left: -5%;">查看</el-button> -->
                     <el-button @click="showPei(scope.row)" type="warning" text size="mini" style="margin-left: -5%;">配置</el-button>
+                    <!-- <el-button type="danger" @click="delModel(scope.row)" text size="mini" style="margin-left: -5%;">删除</el-button>
+                    <el-button v-if="scope.row.audit === null||scope.row.audit === '2'||scope.row.audit === ''" type="info" @click="shenhe(scope.row)" text size="mini" style="margin-left: -5%;">审核申请</el-button> -->
                 </div>
             </template>
         </el-table-column>
@@ -1872,7 +1877,7 @@ async function editSer(row){
 }
 const dialogVisibleSer = ref(false)
 function handleNodeClick(node, data){
-    console.log(node.mgid)
+  console.log(node,data)
     parMgid.value = node.mgid
     var keyArray = []
     selFen.value = false
@@ -2000,6 +2005,7 @@ function saveChangePar(){
       }
     })
     if(parRule === true){
+      tableDataCanAll.value = removeDuplicateObjects(tableDataCanAll.value)
       changePar(tableDataCanAll.value).then(res=>{
         if(res.code===200){
           proxy.$modal.msgSuccess("修改成功");
@@ -2025,6 +2031,14 @@ function saveChangePar(){
     })
   }
 }
+function removeDuplicateObjects(arr) {
+    // 将对象数组转换为JSON字符串数组,利用Set去重,再转换回对象
+    const uniqueArray = Array.from(
+        new Set(arr.map(obj => JSON.stringify(obj)))
+    ).map(str => JSON.parse(str));
+    
+    return uniqueArray;
+}
 async function showPei(row){
   remarkVer.value = ''
   fileVersion.value = ''
@@ -2069,13 +2083,7 @@ async function showPei(row){
       }
     }
   })
-  await getModelParList(par).then(res=>{
-    groupTreeData.value = res.data
-    groupTreeData.value.forEach((item, index, array) => { 
-      item.label = item.parGroupName
-      item.value = item.parGroupCode
-    })
-  })
+  
   await getModelDetail(row.mdid).then(res=>{
     parForm.value = res.data
     formJi.value = res.data
@@ -2089,6 +2097,18 @@ async function showPei(row){
   }) 
   
   tableDataCanAll.value = JSON.parse(JSON.stringify(tableDataCan.value))
+  await getModelParList(par).then(res=>{
+    groupTreeData.value = res.data
+    groupTreeData.value.forEach((item, index, array) => { 
+      item.label = item.parGroupName
+      item.value = item.parGroupCode
+    })
+    console.log(groupTreeData.value)
+    var par1  = {
+      data:groupTreeData.value[0]
+    }
+    handleNodeClick(groupTreeData.value[0],par1)
+  })
 }
 function delCan(index,row){
   tableDataCan.value.splice(index, 1)
@@ -2337,11 +2357,12 @@ async function delVer(row) {
   });
 }
 function clearForm(){
+  parMgid.value = null
   tableDataCan.value = []
   formAdd.value = {
   }
   tableDataCanAdd.value = []
-  checked1.value = false
+  checked1.value = true
   activeName.value = 'first'
   fileList.value = []
   fileList1.value = []

+ 3 - 0
ruoyi-ui/src/views/service/fabu/fabu.vue

@@ -197,6 +197,9 @@
                   <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.state=='1'">
                     已发布
                   </div>
+                  <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.state=='2'">
+                    下线
+                  </div>
                   <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.state=='0'||scope.row.state==null">
                     未发布
                   </div>

+ 3 - 0
ruoyi-ui/src/views/service/info/fabu.vue

@@ -230,6 +230,9 @@
               </el-table-column>
               <el-table-column prop="audit" label="发布状态" width="100">
                 <template #default="scope">
+                  <div style="text-align: center;display: flex;color:red" v-if="scope.row.state=='2'">
+                    已下线
+                  </div>
                   <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.state=='1'">
                     已发布
                   </div>

+ 1 - 9
ruoyi-ui/src/views/service/timing/index.vue

@@ -1,19 +1,11 @@
 <template>
   <div style="width: 100%;padding-top: 1%;display: flex;" :style="{'height':heightAll+'px'}">
     <div style="width: 98%;margin-left: 1%;">
-        <div style="display: flex;width: 100%;align-items: center;margin-left: 0%;">
-            <div>
-                组名称
-            </div>
-            <el-input size="mini" v-model="groupName" style="width: 10%;margin-left: 1%;" placeholder="" />
+        <div style="display: flex;width: 100%;align-items: center;margin-left:-1%;">
             <div style="margin-left: 2%;">
                 任务名称
             </div>
             <el-input size="mini" v-model="jobName" style="width: 10%;margin-left: 1%;" placeholder="" />
-            <div style="margin-left: 2%;">
-                执行器名称
-            </div>
-            <el-input size="mini" v-model="executorInfo" style="width: 10%;margin-left: 1%;" placeholder="" />
             <div style="margin-left: 2%;">
                 状态
             </div>

+ 89 - 61
ruoyi-ui/src/views/standardization/modelUsing/index.vue

@@ -30,7 +30,9 @@
           <div style="margin-left: 8%;margin-top: 5%;width: 60%;">
             {{ item.appTitle }}
           </div>
-          <img style="width: 90px;height: 90px;margin-left: 0%;margin-top: 8%;border-radius: 12px;" :src="item.appIcon"
+          <img style="width: 90px;height: 90px;margin-left: 0%;margin-top: 8%;border-radius: 12px;" :src="item.appIcon" v-if="item.appIcon"
+               alt="">
+          <img style="width: 90px;height: 90px;margin-left: 0%;margin-top: 8%;border-radius: 12px;" v-if="!item.appIcon" src="@/assets/images/defaultModel.png"
                alt="">
         </div>
         <div>
@@ -72,6 +74,7 @@
       :title="title"
       v-model="isContentVisible"
       width="30%"
+      @close="clearForm"
   >
     <div>
       <el-form ref="formAddref" :model="formAdd" label-width="100px" class="coz-mg-card" :rules="rulesAdd">
@@ -101,7 +104,7 @@
               :action="upload.url + '?file=' + upload.updateSupport"
               :auto-upload="false"
           >
-            <el-button @click="clearDefault" plain type="primary" size="mini" style="margin-left:auto;width: 80px;"
+            <el-button slot="trigger" @click="clearDefault" plain type="primary" size="mini" style="margin-left:auto;width: 80px;"
                        :icon="Upload">上传
             </el-button>
           </el-upload>
@@ -125,8 +128,10 @@ import {getToken} from '@/utils/auth'
 import imagePath from '@/assets/images/defaultModel.png';
 import {useStore} from 'vuex';
 import router from "@/router/index.js";
+import defaultAvatar from '@/assets/images/defaultModel.png'
 
 const {proxy} = getCurrentInstance();
+const imageUrl = ref(defaultAvatar)
 const title = ref()
 const heightAll = window.innerHeight
 const isContentVisible = ref(false)
@@ -136,7 +141,14 @@ const modelList = ref([])
 const total = ref(0)
 const hoverIndex = ref(-1)
 const uploadRef = ref()
-const fileList = ref([]);
+const fileList = ref([
+  {
+    name: '', // 文件名
+    url: defaultAvatar , // 文件访问URL
+    status: 'ready', // 文件状态:success-上传成功
+    uid: new Date().getTime() // 唯一标识
+  }
+]);
 const formAdd = ref({
   appTitle: '',
   appNote: '',
@@ -178,7 +190,10 @@ function goFlow(item) {
   store.commit('setId', item.appId);
   proxy.$router.push({path: '/standardization/modeling'});
 }
-
+function clearForm(){
+  formAdd.value = {}
+  previewUrl.value = ''
+}
 function editModel(item) {
   parModel.value = item
   isAdd.value = false
@@ -186,10 +201,13 @@ function editModel(item) {
   title.value = '修改模型应用'
   getModelingById(item.appId).then(res => {
     if (res.code === 200) {
+      const parUrl = import.meta.env.VITE_APP_BASE_API 
       formAdd.value.appTitle = res.data.appTitle
       formAdd.value.appNote = res.data.appNote
       formAdd.value.appId = res.data.appId
-      previewUrl.value = res.data.appIcon ? res.data.appIcon : imagePath;
+      formAdd.value.appIcon = parUrl + res.data.appIcon
+      previewUrl.value = res.data.appIcon ? parUrl + res.data.appIcon : imagePath;
+      console.log(previewUrl.value)
     } else {
       proxy.$message.error('获取模型详情失败');
     }
@@ -203,31 +221,31 @@ function handleBizDataShowConfig(data) {
 }
 
 function subEdit() {
-  if (parFile.value) {
-    formAddref.value.validate(async (valid) => {
-      if (valid) {
-        formAdd.value.appIcon = '/profile/upload/2025/08/20/defaultModel_20250820173415A032.png'
-        editModeling(formAdd.value).then(res => {
-          if (res.code === 200) {
-            proxy.$message({
-              message: '修改成功',
-              type: 'success'
-            });
-            isContentVisible.value = false;
-            getList();
-          }
-        })
-      }
-    })
-  } else {
-    formAddref.value.validate(async (valid) => {
-      if (valid) {
-        nextTick(() => {
-          uploadRef.value.submit();
-        });
-      }
-    })
-  }
+  // if (parFile.value) {
+  //   formAddref.value.validate(async (valid) => {
+  //     if (valid) {
+  //       editModeling(formAdd.value).then(res => {
+  //         if (res.code === 200) {
+  //           proxy.$message({
+  //             message: '修改成功',
+  //             type: 'success'
+  //           });
+  //           isContentVisible.value = false;
+  //           getList();
+  //         }
+  //       })
+  //     }
+  //   })
+  // } else {
+    
+  // }
+  formAddref.value.validate(async (valid) => {
+    if (valid) {
+      nextTick(() => {
+        uploadRef.value.submit();
+      });
+    }
+  })
 }
 
 function delModel(item) {
@@ -253,35 +271,40 @@ function delModel(item) {
 }
 
 function submitAdd() {
-  if (parFile.value) {
-    formAddref.value.validate(async (valid) => {
-      if (valid) {
-        formAdd.value.appIcon = '/profile/upload/2025/10/30/defaultModel_20251030230202A001.png'
-        addModeling(formAdd.value).then(res => {
-          if (res.code === 200) {
-            proxy.$message({
-              message: '新增成功',
-              type: 'success'
-            });
-            isContentVisible.value = false;
-            getList();
-          } else {
-            proxy.$message.error('新增失败');
-          }
-        })
-      }
-    })
-
-  } else {
-    formAddref.value.validate(async (valid) => {
-      if (valid) {
-        nextTick(() => {
-          uploadRef.value.submit();
-        });
-      }
-    })
-  }
+  // if (parFile.value) {
+  //   formAddref.value.validate(async (valid) => {
+  //     if (valid) {
+  //       addModeling(formAdd.value).then(res => {
+  //         if (res.code === 200) {
+  //           proxy.$message({
+  //             message: '新增成功',
+  //             type: 'success'
+  //           });
+  //           isContentVisible.value = false;
+  //           getList();
+  //         } else {
+  //           proxy.$message.error('新增失败');
+  //         }
+  //       })
+  //     }
+  //   })
 
+  // } else {
+  //   formAddref.value.validate(async (valid) => {
+  //     if (valid) {
+  //       nextTick(() => {
+  //         uploadRef.value.submit();
+  //       });
+  //     }
+  //   })
+  // }
+  formAddref.value.validate(async (valid) => {
+    if (valid) {
+      nextTick(() => {
+        uploadRef.value.submit();
+      });
+    }
+  })
 }
 
 function handleFileSuccess(response, file, fileList) {
@@ -350,9 +373,14 @@ function getList() {
     pageSize: 12,
     pageNum: pageNum.value,
   }
-  getModellist(par).then(response => {
-    modelList.value = response.rows
-    total.value = response.total
+  const parUrl = import.meta.env.VITE_APP_BASE_API 
+  getModellist(par).then(res => {
+    modelList.value = res.rows
+    total.value = res.total
+    modelList.value.forEach(item=>{
+      item.appIcon = parUrl + item.appIcon
+    })
+    console.log(parUrl)
   })
 }
 

+ 5 - 5
ruoyi-ui/vite.config.js

@@ -35,11 +35,11 @@ export default defineConfig(({mode, command}) => {
             host: '0.0.0.0',
             open: true,
             proxy: {
-                '/profile/upload': {
-                    target: env.VITE_DEV_PATH,
-                    changeOrigin: true,
-                    rewrite: (p) => p.replace(/^\/profile\/upload/, '/profile/upload')
-                },
+                // '/profile/upload': {
+                //     target: env.VITE_DEV_PATH,
+                //     changeOrigin: true,
+                //     rewrite: (p) => p.replace(/^\/profile\/upload/, '/profile/upload')
+                // },
                 // https://cn.vitejs.dev/config/#server-proxy
                 '/sh-api': {
                     target: env.VITE_DEV_PATH,