Hua 3 ay önce
ebeveyn
işleme
0e156ac564

+ 11 - 0
ruoyi-ui/src/layout/components/Sidebar/index.vue

@@ -96,6 +96,17 @@ const activeMenu = computed(() => {
   return path;
 
 })
+function logout() {
+  ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
+    confirmButtonText: '确定',
+    cancelButtonText: '取消',
+    type: 'warning'
+  }).then(() => {
+    userStore.logOut().then(() => {
+      location.href = 'sh/index';
+    })
+  }).catch(() => { });
+}
 onMounted(() => {
   appStore.sidebar.opened = true
   console.log(Cookies.get('sidebarStatus'))

+ 13 - 13
ruoyi-ui/src/router/index.js

@@ -52,19 +52,19 @@ export const constantRoutes = [
         component: () => import('@/views/error/401'),
         hidden: true
     },
-    {
-        path: '',
-        component: Layout,
-        redirect: '/index',
-        children: [
-            {
-                path: '/index',
-                component: () => import('@/views/index'),
-                name: 'Index',
-                meta: {title: '首页', icon: 'dashboard', affix: true}
-            }
-        ]
-    },
+    // {
+    //     path: '',
+    //     component: Layout,
+    //     redirect: '/index',
+    //     children: [
+    //         {
+    //             path: '/index',
+    //             component: () => import('@/views/index'),
+    //             name: 'Index',
+    //             meta: {title: '首页', icon: 'dashboard', affix: true}
+    //         }
+    //     ]
+    // },
     {
         path: '/user',
         component: Layout,

+ 86 - 5
ruoyi-ui/src/views/dpp/calculateDev/index.vue

@@ -93,6 +93,11 @@
             </el-table-column>
             <el-table-column prop="chargeBy" label="责任人" width="200"  show-overflow-tooltip/>
             <el-table-column prop="chargePhone" label="联系方式" />
+            <el-table-column prop="jobStatus" label="任务状态" width="170">
+              <template #default="scope">
+                  <el-switch @change="changejobStatus(scope.row)" v-model="scope.row.jobStatus"/>
+              </template>
+            </el-table-column>
             <el-table-column prop="address" label="操作" width="150">
                 <template #default="scope">
                     <div style="display: flex;">
@@ -169,7 +174,7 @@
             </span>
           </template>
         </el-dialog>
-        <el-dialog @close="clearAdd" v-model="dialogVisibleTest" draggable :title="titleTest" width="60%" destroy-on-close :key="tableKey">
+        <el-dialog @close="clearAdd" v-model="dialogVisibleTest" draggable :title="titleDe" width="60%" destroy-on-close :key="tableKey">
           <el-form  size="mini"  style="margin-top: 0%;width: 98%;"  :model="formJi" label-position="right" ref="formRefJi" label-width="120px" :rules="rulesJi">
             <el-row :gutter="48">
                     <el-col :span="8">
@@ -183,7 +188,7 @@
                     </el-col>
                     
             </el-row>
-            <el-form-item label="状态:" prop="jobStatus">
+            <el-form-item label="状态:" prop="jobStatus" v-if="isAdd">
                 <el-radio-group v-model="formJi.jobStatus" class="custom-radio-group" style="width: 100%;margin-top: -1%;">
                     <el-radio :label=1 size="large">启用</el-radio>
                     <el-radio :label=0 size="large">禁用</el-radio>
@@ -451,9 +456,45 @@
     </div>
       </el-tab-pane>
       <el-tab-pane label="执行结果" name="second">
+        <div style="display: flex;width: 98%;align-items: center;margin-left: 1%;">
+            <!-- <div>
+                组名称
+            </div>
+            <el-input size="mini" v-model="groupName" style="width: 10%;margin-left: 1%;" placeholder="" /> -->
+            <div style="margin-left: 0%;">
+                任务名称
+            </div>
+            <el-input size="mini" v-model="jobName" style="width: 10%;margin-left: 1%;" placeholder="" />
+            <div style="margin-left: 2%;">
+                创建时间
+            </div>
+            <div style="width:15%;margin-left: 1%;">
+              <el-date-picker
+                v-model="createTime"
+                type="datetimerange"
+                format="YYYY-MM-DD HH:mm:ss"
+                style="width:100%;margin-left: 1%;"
+                value-format="YYYY-MM-DD"
+              />
+            </div>
+            <div style="margin-left: 2%;">
+                状态
+            </div>
+            <el-select
+            v-model="jobStatus"
+            class="noBorSel"
+            placeholder=""
+            style="width: 10%;margin-left: 1%;"
+            >
+                <el-option label="启用" :value="0" />
+                <el-option label="禁用" :value="1" />
+            </el-select>
+            <!-- <el-button type="" @click="" size="mini" style="margin-left:auto;" :icon="RefreshRight">重置 </el-button> -->
+            <el-button type="primary" @click="getTable" size="mini" style="margin-left:auto;" :icon="Search">搜索 </el-button>
+        </div>
         <el-table 
           :data="tableData" 
-          style="width: 98%;margin-left: 1%;margin-top: 0.5%;"
+          style="width: 98%;margin-left: 1%;margin-top: 1.5%;;height: 73vh;"
           :cell-style="{ padding:'5px' }"
           :header-cell-style="{height: heightAll*0.01+'px',}"
           :row-style="{ fontSize: '16px',textAlign:'center'}"
@@ -465,14 +506,34 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="name" label="执行次数"  width="200">
+          <el-table-column prop="name" label="任务名称"  width="200">
             <template #default="scope">
               <div style="color: #409EFF;cursor: pointer;" @click="showDe(scope.row)">
                 {{scope.row.name}}
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="type" label="执行结果"  width="200">
+          <el-table-column prop="type" label="建模方案"  width="300">
+            </el-table-column>
+          <el-table-column prop="type" label="任务类型" >
+          </el-table-column>
+          <el-table-column prop="type" label="开始执行时间"  >
+          </el-table-column>
+          <el-table-column prop="type" label="执行时长(秒)"  >
+          </el-table-column>
+          <el-table-column prop="type" label="状态"  >
+          </el-table-column>
+          <el-table-column prop="type" label="操作原因"  >
+          </el-table-column>
+          <el-table-column prop="type" label="创建时间" >
+          </el-table-column>
+          <el-table-column prop="address" label="操作" width="150">
+              <template #default="scope">
+                  <div style="display: flex;">
+                    <el-button @click="getEdit(scope.row)" type="primary" text size="mini" style="margin-left: 0%;">编辑</el-button>
+                    <el-button @click="delTaskDe(scope.row)" type="danger" text size="mini" style="margin-left: 0%;">删除</el-button>
+                  </div>
+              </template>
           </el-table-column>
         </el-table>
       </el-tab-pane>
@@ -494,6 +555,7 @@ import { cloneDeep } from 'lodash'
 import { useClipboard } from "@vueuse/core";
 import Crontab from '@/components/Crontab'
 import { routerKey } from "vue-router";
+import {snailSta } from "@/api/service/timing";
 const titleTest = ref('')
 const { proxy } = getCurrentInstance();
 const JsonAdd= ref(JSON.stringify({ data: "初始值1" }))
@@ -675,6 +737,7 @@ const rulesJi = reactive({
   jobStatus: [{ required: true, message: '必填', trigger: 'blur' }]
 });
 const formRefJi = ref();
+const titleDe = ref('')
 const formAdd = ref({
   name:'',
   cateCode:'',
@@ -739,6 +802,17 @@ function changePage(val){
   pageNum.value = val
   getDataRen()
 }
+async function changejobStatus(row){
+  var par = {
+    jobId:row.id,
+    status:row.jobStatus===true?1:0
+  }
+  await snailSta(par).then(res=>{
+    if(res.code===200){
+      proxy.$modal.msgSuccess("修改成功");
+    }
+  })
+}
 function saveEdit(){
   formRefJi.value.validate((valid) => {
     if (valid) {
@@ -865,6 +939,7 @@ function addTask(row){
 }
 function getEdit(row){
   isAdd.value = false
+  titleDe.value = '编辑任务-'+row.flowJobName
   dialogVisibleTest.value = true
   tableDataCanStart.value = []
   getTaskDe(row.flowJobId).then(res=>{
@@ -953,7 +1028,13 @@ async function handleNodeClick(node,data,event){
       tableData.value = res.rows
       tableData.value.forEach(item=>{
         item.type = titleTest.value
+        if(item.jobStatus===1){
+          item.jobStatus = true
+        }else{
+          item.jobStatus = false
+        }
       })
+      
       total.value = res.total
     }
   })

+ 1 - 1
ruoyi-ui/src/views/login.vue

@@ -125,7 +125,7 @@ function handleLogin() {
           }
           return acc;
         }, {});
-        router.push({ path: redirect.value || "/", query: otherQueryParams });
+        router.push('datamonitor/monitorservice');
       }).catch(() => {
         loading.value = false;
         // 重新获取验证码

+ 157 - 4
ruoyi-ui/src/views/register/componentReg/index.vue

@@ -43,10 +43,13 @@
           </template>
         </el-table-column>
         <el-table-column prop="enname" label="英文名称">
+          <!-- <template #default="scope">
+            <div style="color: #409EFF;cursor: pointer;" @click="showTest(scope.row)">{{scope.row.enname}}</div>
+          </template> -->
         </el-table-column>
         <el-table-column prop="type" label="模型类型" width="160"/>
-        <el-table-column prop="mdUnit" label="模型单位" width="200"/>
-        <el-table-column prop="mdContact" label="联系方式" width="100"/>
+        <el-table-column prop="mdUnit" label="模型单位" width="220"/>
+        <el-table-column prop="mdContact" label="联系方式" width="150"/>
         <el-table-column prop="status" label="模型状态" width="140">
         </el-table-column>
         <el-table-column prop="modifyBy" label="发布时间" width="170"/>
@@ -155,7 +158,7 @@
                         </el-form-item>
                       </el-col>
                       <el-col :span="11">
-                        <el-form-item label="联系方式:" prop="" style="">
+                        <el-form-item label="联系方式:" prop="" style="" >
                           <div style="display: flex;width: 100%;justify-content: space-between;">
                             <el-input  v-model="formJi.mdContact" style="width: 100%;"/>
                           </div>
@@ -676,6 +679,130 @@
             </span>
           </template>
         </el-dialog>
+        <el-dialog v-model="dialogVisibleDetail" :title="titleFen" width="80%" @close="clearFromTree" destroy-on-close :key="tableKey">
+          <div ref="expandableDiv" :style="{ height: currentHeight + 'px' }" style="position: relative;width: 98%;margin-left: 1%;border: #47AFE5 1px solid;min-height: 10vh;margin-top: 1%;border-radius: 8px;">
+            <div style="display: flex;margin-top: 1%;margin-left: 3%;">
+              <div style="display: flex;align-items: center;width: 50%;">
+                <div style="font-size: 16px;font-weight: bold;">
+                  模型名称:
+                </div>
+                <div style="font-size: 15px;">
+                  上海沿海风暴潮预报模型
+                </div>
+              </div>
+              <div style="display: flex;align-items: center;width: 50%;">
+                <div style="font-size: 16px;font-weight: bold;">
+                  英文名称:
+                </div>
+                <div style="font-size: 15px;">
+                  Shang Hai Shi Cheng Qu Hong Lao Fang Zhen Mo Xing 
+                </div>
+              </div>
+            </div>
+            <div style="display: flex;align-items: center;width: 50%;margin-top: 1%;margin-left: 3%;">
+              <div style="font-size: 16px;font-weight: bold;">
+                模型简介:
+              </div>
+              <div style="font-size: 15px;">
+                Shang Hai Shi Cheng Qu Hong Lao Fang Zhen Mo Xing 
+              </div>
+            </div>
+            <div v-if="isExpanded">
+              <div style="display: flex;margin-top: 1%;margin-left: 3%;">
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    版本号:
+                  </div>
+                  <div style="font-size: 15px;">
+                  </div>
+                </div>
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    接口分类:
+                  </div>
+                  <div style="font-size: 15px;">
+                  </div>
+                </div>
+              </div>
+              <div style="display: flex;margin-top: 1%;margin-left: 3%;">
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    开发语言:
+                  </div>
+                  <div style="font-size: 15px;">
+                    
+                  </div>
+                </div>
+              </div>
+              <div style="display: flex;margin-top: 1%;margin-left: 3%;">
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    模型归属单位:
+                  </div>
+                  <div style="font-size: 15px;">
+                  </div>
+                </div>
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    联系方式:
+                  </div>
+                  <div style="font-size: 15px;">
+                  </div>
+                </div>
+              </div>
+              <div style="display: flex;margin-top: 1%;margin-left: 3%;">
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    技术支持单位:
+                  </div>
+                  <div style="font-size: 15px;">
+                  </div>
+                </div>
+                <div style="display: flex;align-items: center;width: 50%;">
+                  <div style="font-size: 16px;font-weight: bold;">
+                    联系方式:
+                  </div>
+                  <div style="font-size: 15px;">
+                  </div>
+                </div>
+              </div>
+            </div>
+            <el-link :icon="isExpanded ? ArrowUp : ArrowDown"   @click="zhankai" type="primary"  size="mini" style="position: absolute;right:1%;bottom: 5%;">{{ isExpanded ? '收起' : '展开' }}</el-link >
+          </div>
+          <div style="position: relative;width: 98%;margin-left: 1%;border: #47AFE5 1px solid;height: 40vh;margin-top: 1%;border-radius: 8px;">
+            <div style="width: 100%;height:3vh;background-color: #6CA8DB;display: flex;align-items: center;padding-left: 1%;border-top-left-radius: 8px;border-top-right-radius: 8px;color: white;font-size: 14px">
+              <div @click="changeBack(0)" style="width: 5%;height: 100%;display: grid; place-items: center;cursor: pointer;" :style="{backgroundColor: activeColor[0]}">
+                服务信息 
+              </div>
+              <div @click="changeBack(1)" style="width: 5%;height: 100%;display: grid; place-items: center;cursor: pointer;" :style="{backgroundColor: activeColor[1]}">
+                数据信息 
+              </div>
+              <div @click="changeBack(2)" style="width: 5%;height: 100%;display: grid; place-items: center;cursor: pointer;" :style="{backgroundColor: activeColor[2]}">
+                工作流程 
+              </div>
+              <div @click="changeBack(3)" style="width: 5%;height: 100%;display: grid; place-items: center;cursor: pointer;" :style="{backgroundColor: activeColor[3]}">
+                任务信息 
+              </div>
+              <div @click="changeBack(4)" style="width: 5%;height: 100%;display: grid; place-items: center;cursor: pointer;" :style="{backgroundColor: activeColor[4]}">
+                消息信息 
+              </div>
+              <div @click="changeBack(5)" style="width: 5%;height: 100%;display: grid; place-items: center;cursor: pointer;" :style="{backgroundColor: activeColor[5]}">
+                日志信息 
+              </div>
+              <div @click="changeBack(6)" style="width: 5%;height: 100%;display: grid; place-items: center;cursor: pointer;":style="{backgroundColor: activeColor[6]}">
+                访问统计 
+              </div>
+            </div>
+          </div>
+          <template #footer>
+            <span class="dialog-footer">
+              <el-button size="mini" @click="dialogVisibleDetail = false">取消</el-button>
+              <el-button type="primary" @click="submitFen" size="mini">
+                提交
+              </el-button>
+            </span>
+          </template>
+        </el-dialog>
     </div>
   </div>
 </template>
@@ -685,7 +812,8 @@ import { ref, onMounted, onUnmounted, nextTick } from 'vue';
 import { Search } from '@element-plus/icons-vue'
 import {
   ArrowLeft,
-  Plus
+  ArrowUp,
+  ArrowDown
 } from '@element-plus/icons-vue'
 import { reactive } from 'vue'
 import { forwardRefProps } from 'element-plus/es/components/tooltip-v2/src/forward-ref.mjs';
@@ -698,8 +826,10 @@ import pinyin from 'pinyin';
 
 const { proxy } = getCurrentInstance();
 const dialogVisibleFen = ref(false)
+const currentHeight = ref(100)
 const dragTableRef = ref()
 const isaddFen = ref(false)
+const dialogVisibleDetail = ref(true)
 const dialogVisible = ref(false)
 const dialogVisibleDe = ref(false)
 const dialogVisiblePei = ref(false)
@@ -713,7 +843,12 @@ const elseLan = ref('')
 const tableDataCan = ref([])
 const selFen = ref(true)
 const groupTreeData = ref([])
+const isExpanded = ref(false)
+const expandableDiv = ref(null)
 const parRow = ref({})
+const initialHeight = 100
+const activeColor = ref(['#6CA8DB','#6CA8DB','#6CA8DB','#6CA8DB','#6CA8DB','#6CA8DB','#6CA8DB'])
+const expandedHeight = 250
 const formJi = ref({
   name:'',
   version:'',
@@ -895,6 +1030,21 @@ const handleChange = (file, files) => {
 const handleChange1 = (file, files) => {
   fileList1.value = files;
 };
+function changeBack(index){
+  active.value = index
+  for(var i=0;i<activeColor.value.length;i++){
+    if(i===index){
+      activeColor.value[i] = 'rgb(51, 126, 204)'
+    }
+    else{
+      activeColor.value[i] = ''
+    }
+  }
+}
+function zhankai(){
+  isExpanded.value = !isExpanded.value
+  currentHeight.value = isExpanded.value ? expandedHeight : initialHeight
+}
 function getChineseInitials(str) {
     if (!str || typeof str !== 'string') return '';
     
@@ -1123,6 +1273,9 @@ function delCan(index,row){
     }
   })
 }
+function showTest(){
+  dialogVisibleDetail.value = true
+}
 function showDe(row){
   dialogVisibleDe.value = true
   getModelDetail(row.mdid).then(res=>{

+ 8 - 2
ruoyi-ui/src/views/service/info/test.vue

@@ -231,9 +231,9 @@
                 </el-table-column>
             </el-table>
             <div style="margin-top:4%;font-size: 18px;">
-              返回参数
+              测试结果
             </div>
-            <el-input  placeholder="" :rows="8" type="textarea" v-model="dataReturn" size="mini" text style="margin-top: 1%;width: 98%;" ></el-input>
+            <el-input :style="isError ? '--el-input-text-color: red' : ''"   placeholder="" :rows="8" type="textarea" v-model="dataReturn" size="mini" text style="margin-top: 1%;width: 98%;color: red;" ></el-input>
           <template #footer>
             <span class="dialog-footer">
             </span>
@@ -356,6 +356,7 @@ import { cloneDeep } from 'lodash'
 import { useClipboard } from "@vueuse/core";
 
 const titleTest = ref('')
+const isError = ref(false)
 const { proxy } = getCurrentInstance();
 const JsonAdd= ref(JSON.stringify({ data: "初始值1" }))
 const exampleAdd = ref('')
@@ -571,6 +572,11 @@ function test(){
   var par = detailJson.value
   par.params = tableDataCan.value
   testService(par).then(res=>{
+    if(res.code===444){
+      isError.value = true
+    }else{
+      isError.value = false
+    }
     console.log(res)
     dataReturn.value = res.msg
     var par1  = {

+ 12 - 6
ruoyi-ui/src/views/service/test/index.vue

@@ -102,7 +102,7 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="audit" label="测试状态" width="140">
+          <el-table-column prop="audit" label="测试状态" width="100">
             <template #default="scope">
               <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.senState==1">
                 已测试
@@ -186,7 +186,7 @@
             </span>
           </template>
         </el-dialog>
-        <el-dialog @close="clearAdd" v-model="dialogVisibleTest" draggable :title="titleTest" width="60%" destroy-on-close :key="tableKey">
+        <el-dialog @close="clearAdd" v-model="dialogVisibleTest" :title="titleTest" width="60%" destroy-on-close :key="tableKey">
           <div style="margin-left: 1%;">
             {{ detailJson.name }}:
           </div>
@@ -202,7 +202,7 @@
               {{ detailJson.url }}
             </div>
             <!-- <svg-icon @click="test" icon-class="startTest" style="margin-left: 1%;width: 50px;height: 25px;cursor: pointer;"/> -->
-             <el-button @click="test" size="mini" type="primary" style="margin-left: 1%;cursor: pointer;" plain>点击测试</el-button>
+            <el-button @click="test" size="mini" type="primary" style="margin-left: 1%;cursor: pointer;" plain>点击测试</el-button>
           </div>
           <div style="margin-top:2%;font-size: 18px;">
             请求参数
@@ -231,15 +231,15 @@
                 </el-table-column>
             </el-table>
             <div style="margin-top:4%;font-size: 18px;">
-              返回参数
+              测试结果
             </div>
-            <el-input  placeholder="" :rows="8" type="textarea" v-model="dataReturn" size="mini" text style="margin-top: 1%;width: 98%;" ></el-input>
+            <el-input :style="isError ? '--el-input-text-color: red' : ''"   placeholder="" :rows="8" type="textarea" v-model="dataReturn" size="mini" text style="margin-top: 1%;width: 98%;color: red;" ></el-input>
           <template #footer>
             <span class="dialog-footer">
             </span>
           </template>
         </el-dialog>
-        <el-dialog @close="clearFromLev" :title="titleTest" v-model="dialogVisibleLevel" width="50%" destroy-on-close :key="tableKey">
+        <el-dialog @close="clearFromLev" :title="titleTest" draggable v-model="dialogVisibleLevel" width="50%" destroy-on-close :key="tableKey">
           <el-table 
             style="margin-top: 1%;width: 98%;"
             :data="tableDataLog" 
@@ -356,6 +356,7 @@ import { cloneDeep } from 'lodash'
 import { useClipboard } from "@vueuse/core";
 
 const titleTest = ref('')
+const isError = ref(false)
 const { proxy } = getCurrentInstance();
 const JsonAdd= ref(JSON.stringify({ data: "初始值1" }))
 const exampleAdd = ref('')
@@ -571,6 +572,11 @@ function test(){
   var par = detailJson.value
   par.params = tableDataCan.value
   testService(par).then(res=>{
+    if(res.code===444){
+      isError.value = true
+    }else{
+      isError.value = false
+    }
     console.log(res)
     dataReturn.value = res.msg
     var par1  = {

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

@@ -993,7 +993,6 @@ async function changejobStatus(row){
       proxy.$modal.msgSuccess("修改成功");
     }
   })
-
 }
 const handleCheckboxClick = () => {
   // 1. 执行 checkbox 的切换逻辑(v-model 自动处理)