浏览代码

Merge remote-tracking branch 'origin/master'

ZhuDeKang 3 月之前
父节点
当前提交
ef2fa5353e

+ 35 - 0
ruoyi-ui/src/api/service/info.js

@@ -160,4 +160,39 @@ export function publishModel(query) {
     method: "get",
     params: query,
   });
+}
+export function getDayChart(query) {
+  return request({
+    url: "/service/log/statis/mdList",
+    method: "get",
+    params: query,
+  });
+}
+export function getDaySum(query) {
+  return request({
+    url: "/service/log/statis/toDaySum",
+    method: "get",
+    params: query,
+  });
+}
+export function getYueChart(query) {
+  return request({
+    url: "/service/log/statis/monthMdList",
+    method: "get",
+    params: query,
+  });
+}
+export function getSumAll(query) {
+  return request({
+    url: "/service/log/statis/sum",
+    method: "get",
+    params: query,
+  });
+}
+export function getPaihang(query) {
+  return request({
+    url: "/service/log/statis/yearMdList",
+    method: "get",
+    params: query,
+  });
 }

+ 387 - 398
ruoyi-ui/src/views/evaluate/index.vue

@@ -1,188 +1,305 @@
 <template>
-    <div style="margin-left: 1%;width: 98%;display: flex;margin-top: 1%;" :style="{'height':heightAll*0.15+'px'}">
-      <div shadow="always" style="width: 33%;height: 100%;;border-radius: 10px;background-color: white;" class="boxShadow">
-        <div style="width: 100%;display: flex;align-items: center;justify-content: center;font-size: 35px;font-weight: bold;color: #477ACF;;height: 70%">
-          358
-        </div>
-        <div style="display: flex;align-items: center;justify-content: center;background-color: #477ACF;font-size: 20px;width: 100%;color: white;text-align: center;border-radius: 0 0 10px 10px;height: 30%;">
-          日调用次数
-        </div>
-      </div>
-      <div shadow="always" style="width: 33%;height: 100%;;border-radius: 10px;background-color: white;margin-left: 1%;" class="boxShadow">
-        <div style="width: 100%;display: flex;align-items: center;justify-content: center;font-size: 35px;font-weight: bold;color: #40B0D7;;height: 70%">
-          1532
-        </div>
-        <div style="display: flex;align-items: center;justify-content: center;background-color: #40B0D7;font-size: 20px;width: 100%;color: white;text-align: center;border-radius: 0 0 10px 10px;height: 30%;">
-          月调用次数
-        </div>
-      </div>
-      <div shadow="always" style="width: 33%;height: 100%;;border-radius: 10px;background-color: white;margin-left: 1%;" class="boxShadow">
-        <div style="width: 100%;display: flex;align-items: center;justify-content: center;font-size: 35px;font-weight: bold;color: #2DBEA2;;height: 70%">
-          9523
+   <div style="overflow-y: auto;">
+     <div style="margin-left: 1%;width: 98%;display: flex;margin-top: 1%;height: 15vh;">
+        <div shadow="always" style="width: 33%;height: 100%;;border-radius: 10px;background-color: white;" class="boxShadow">
+          <div style="width: 100%;display: flex;align-items: center;justify-content: center;font-size: 35px;font-weight: bold;color: #477ACF;;height: 70%">
+            {{dayAll}}
+          </div>
+          <div style="display: flex;align-items: center;justify-content: center;background-color: #477ACF;font-size: 20px;width: 100%;color: white;text-align: center;border-radius: 0 0 10px 10px;height: 30%;">
+            日调用次数
+          </div>
         </div>
-        <div style="display: flex;align-items: center;justify-content: center;background-color: #2DBEA2;font-size: 20px;width: 100%;color: white;text-align: center;border-radius: 0 0 10px 10px;height: 30%;">
-          年调用次数
+        <div shadow="always" style="width: 33%;height: 100%;;border-radius: 10px;background-color: white;margin-left: 1%;" class="boxShadow">
+          <div style="width: 100%;display: flex;align-items: center;justify-content: center;font-size: 35px;font-weight: bold;color: #40B0D7;;height: 70%">
+            {{monAll}}
+          </div>
+          <div style="display: flex;align-items: center;justify-content: center;background-color: #40B0D7;font-size: 20px;width: 100%;color: white;text-align: center;border-radius: 0 0 10px 10px;height: 30%;">
+            月调用次数
+          </div>
         </div>
-      </div>
-    </div>
-  <div style="background-color:  #F7F7F7;padding-top:1% ;">
-    <div style="margin-left: 1%;width: 98%;display: flex;" :style="{'height':heightAll*0.35+'px'}">
-      <div style="width: 100%;height: 100%;">
-        <el-card shadow="always" class="box-card" style="width:100%;height: 100%;">
-          <div style="display: flex;align-items: center;font-weight: bold;">
-            <div style="">今日模型服务调度次数</div>
-            <div style="color: #79bbff;margin-left: 1%;"> 356 </div>
-            <div style="margin-left: 1%;"> 次 </div>
-            <el-select
-            v-model="value"
-            class="m-2"
-            placeholder="本月"
-            style="width: 10%;margin-left: 1%;"
-            >
-                <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-                />
-            </el-select>
-            <el-select
-            v-model="value"
-            class="m-2"
-            placeholder="上海市城区洪涝仿真模型"
-            style="width: 10%;margin-left: 1%;"
-            >
-                <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-                />
-            </el-select>
+        <div shadow="always" style="width: 33%;height: 100%;;border-radius: 10px;background-color: white;margin-left: 1%;" class="boxShadow">
+          <div style="width: 100%;display: flex;align-items: center;justify-content: center;font-size: 35px;font-weight: bold;color: #2DBEA2;;height: 70%">
+            {{yearAll}}
           </div>
-          <div id="top1" style="width: 98%;margin-left: 1%;margin-top: 1%;" :style="{'height':heightAll*0.23+'px'}">
-
+          <div style="display: flex;align-items: center;justify-content: center;background-color: #2DBEA2;font-size: 20px;width: 100%;color: white;text-align: center;border-radius: 0 0 10px 10px;height: 30%;">
+            年调用次数
           </div>
-        </el-card>
+        </div>
       </div>
-      <!-- <div style="width: 30%;height: 100%;margin-left: 1%;">
-        <el-card shadow="always" class="box-card" style="width:100%;height: 100%;">
-          <div style="display: flex;align-items: center;font-weight: bold;width: 100%;">
-            <div style="">模型服务调用次数</div>
-            <div style="width: 50%;margin-left: 20%;">
-              <el-select
-                v-model="value"
-                class="m-2"
-                placeholder="长江水利委员会"
-                style="width: 100%;;"
-              >
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+      <div style="background-color:  #F7F7F7;padding-top:1%;">
+        <div style="margin-left: 1%;width: 98%;display: flex;height: 35vh;">
+          <div style="width: 100%;height: 100%;">
+            <el-card shadow="always" class="box-card" style="width:100%;height: 100%;">
+              <div style="display: flex;align-items: center;font-weight: bold;line-height: 1;">
+                <div style="">今日模型服务调度次数</div>
+                <div style="color: #79bbff;margin-left: 1%;"> {{daySum}} </div>
+                <div style="margin-left: 1%;"> 次 </div>
+                <el-date-picker
+                  v-model="valueYue"
+                  type="month"
+                  style="margin-left: 1%;"
+                  @change="getDay"
+                  placeholder="本月"
+                  value-format="YYYY-MM-DD"
                 />
-              </el-select>
-            </div>
-          </div>
-          <div id="top2"  style="width: 98%;margin-left: 1%;margin-top: 1%;" :style="{'height':heightAll*0.23+'px'}">
+                <el-select
+                v-model="valueMod"
+                @change="getDay"
+                class="m-2"
+                placeholder="上海市城区洪涝仿真模型"
+                style="width: 10%;margin-left: 1%;"
+                >
+                    <el-option
+                    v-for="item in optionsModel"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.id"
+                    />
+                </el-select>
+              </div>
+              <div id="top1" style="width: 98%;margin-left: 1%;margin-top: 1%;height:23vh">
 
+              </div>
+            </el-card>
           </div>
-        </el-card>
-      </div>
-      <div style="width: 30%;height: 100%;;margin-left: 1%">
-        <el-card shadow="always" class="box-card" style="width:100%;height: 100%;">
-          <div style="display: flex;align-items: center;font-weight: bold;width: 100%;">
-            <div style="">模型服务类型总数 </div>
-            <div style="color: #79bbff;margin-left: 1%;"> 123 </div>
-            <div style="margin-left: 1%;"> 次 </div>
-          </div>
-          <div id="top3"  style="width: 98%;margin-left: 1%;margin-top: 1%;" :style="{'height':heightAll*0.25+'px'}">
+          <!-- <div style="width: 30%;height: 100%;margin-left: 1%;">
+            <el-card shadow="always" class="box-card" style="width:100%;height: 100%;">
+              <div style="display: flex;align-items: center;font-weight: bold;width: 100%;">
+                <div style="">模型服务调用次数</div>
+                <div style="width: 50%;margin-left: 20%;">
+                  <el-select
+                    v-model="value"
+                    class="m-2"
+                    placeholder="长江水利委员会"
+                    style="width: 100%;;"
+                  >
+                    <el-option
+                      v-for="item in options"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"
+                    />
+                  </el-select>
+                </div>
+              </div>
+              <div id="top2"  style="width: 98%;margin-left: 1%;margin-top: 1%;" :style="{'height':heightAll*0.23+'px'}">
 
+              </div>
+            </el-card>
           </div>
-        </el-card>
-      </div> -->
-    </div>
-    
-    <div style="margin-left: 1%;width: 98%;display: flex;margin-top: 1%" :style="{'height':heightAll*0.38+'px'}">
-      <el-card shadow="always" class="box-card" style="width:50%;height: 100%;">
-        <div style="width: 100%;display: flex;">
-          <el-select
-            v-model="value"
-            class="m-2"
-            placeholder="本年"
-            style="width: 20%;margin-left: 1%;"
-            >
-                <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-                />
-            </el-select>
-            <el-select
-            v-model="value"
-            class="m-2"
-            placeholder="上海市城区洪涝仿真模型"
-            style="width:20%;margin-left: 1%;"
-            >
-                <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-                />
-            </el-select>
-        </div>
-        <div id="bt1"  style="width: 100%;margin-left: 0%;margin-top: 1%;;" :style="{'height':heightAll*0.3+'px'}">
+          <div style="width: 30%;height: 100%;;margin-left: 1%">
+            <el-card shadow="always" class="box-card" style="width:100%;height: 100%;">
+              <div style="display: flex;align-items: center;font-weight: bold;width: 100%;">
+                <div style="">模型服务类型总数 </div>
+                <div style="color: #79bbff;margin-left: 1%;"> 123 </div>
+                <div style="margin-left: 1%;"> 次 </div>
+              </div>
+              <div id="top3"  style="width: 98%;margin-left: 1%;margin-top: 1%;" :style="{'height':heightAll*0.25+'px'}">
 
+              </div>
+            </el-card>
+          </div> -->
         </div>
-      </el-card>
-      <el-card shadow="always" class="box-card" style="width:50%;height: 100%;margin-left: 1%;">
-        <div style="width: 100%;display: flex;">
-          <el-select
-            v-model="value"
-            class="m-2"
-            placeholder="本年"
-            style="width: 20%;margin-left: 1%;"
-            >
-                <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
+        <div style="margin-left: 1%;width: 98%;display: flex;margin-top: 1%;height: 38vh;">
+          <el-card shadow="always" class="box-card" style="width:50%;height: 100%;">
+            <div style="width: 100%;display: flex;">
+              <el-date-picker
+                  v-model="valueMon"
+                  type="year"
+                  style="margin-left: 1%;"
+                  @change="getMon"
+                  placeholder="本年"
+                  value-format="YYYY-MM-DD"
                 />
-            </el-select>
-            <el-select
-            v-model="value"
-            class="m-2"
-            placeholder="上海市城区洪涝仿真模型"
-            style="width:20%;margin-left: 1%;"
-            >
-                <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
+                <el-select
+                v-model="valueModMon"
+                @change="getMon"
+                class="m-2"
+                placeholder=""
+                style="width: 20%;margin-left: 1%;"
+                >
+                    <el-option
+                    v-for="item in optionsModel"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.id"
+                    />
+                </el-select>
+            </div>
+            <div id="bt1"  style="width: 100%;margin-left: 0%;margin-top: 1%;height: 30vh;">
+
+            </div>
+          </el-card>
+          <el-card shadow="always" class="box-card" style="width:50%;height: 100%;margin-left: 1%;">
+            <div style="width: 100%;display: flex;">
+              <el-date-picker
+                  v-model="valuePai"
+                  type="year"
+                  style="margin-left: 1%;"
+                  @change="getPai"
+                  placeholder="本年"
+                  value-format="YYYY-MM-DD"
                 />
-            </el-select>
-        </div>
-        <div id="bt2"  style="width: 100%;margin-left: 1%;margin-top: 1%;" :style="{'height':heightAll*0.3+'px'}">
+                <!-- <el-select
+                v-model="value"
+                class="m-2"
+                placeholder="上海市城区洪涝仿真模型"
+                style="width:20%;margin-left: 1%;"
+                >
+                    <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                    />
+                </el-select> -->
+            </div>
+            <div id="bt2"  style="width: 100%;margin-left: 1%;margin-top: 1%;height: 30vh;">
 
+            </div>
+          </el-card>
         </div>
-      </el-card>
-    </div>
-  </div>
+      </div>
+   </div>
 </template>
 <script setup>
 import { ref, onMounted } from 'vue';
 import * as echarts from 'echarts';
+import { modelTreeSelect,getDayChart,getDaySum,getYueChart,getSumAll,getPaihang } from "@/api/service/info";
 const listHelp = [
 ]
+const valuePai = ref()
+const modelList = ref([])
+const daySum = ref('')
+const valueYue = ref('')
+const dayAll = ref()
+const monAll = ref()
+const yearAll = ref()
+const valueModMon = ref('')
+const valueMon = ref('')
+const valueMod = ref('')
 const heightAll = window.innerHeight
 const seledMo = ['primary','plain','plain','plain','plain','plain','plain']
-
-function inintChartTop1(){
+const optionsModel = ref({})
+function getLastDayOfMonth(firstDay) {
+    // 从第一天字符串解析年月
+    const [year, month] = firstDay.split('-').map(Number);
+    
+    // 创建下个月第一天的日期对象
+    const nextMonthFirstDay = new Date(year, month, 1); // month是1-12,JS会自动处理跨年
+    
+    // 获取当月最后一天(下个月第一天减1毫秒)
+    const lastDay = new Date(nextMonthFirstDay - 1);
+    
+    // 格式化输出
+    const lastDayYear = lastDay.getFullYear();
+    const lastDayMonth = (lastDay.getMonth() + 1).toString().padStart(2, '0');
+    const lastDayDate = lastDay.getDate().toString().padStart(2, '0');
+    
+    return `${lastDayYear}-${lastDayMonth}-${lastDayDate}`;
+}
+function getAllDaysInMonth(firstDayOfMonth) {
+    // 解析输入字符串获取年月
+    const [year, month] = firstDayOfMonth.split('-').map(Number);
+    
+    // 创建当月最后一天的日期对象
+    const lastDay = new Date(year, month, 0); // 月份从0开始,所以month即下个月
+    
+    // 获取当月天数
+    const daysCount = lastDay.getDate();
+    
+    // 生成所有天数的数组
+    return Array.from({length: daysCount}, (_, i) => 
+        (i + 1).toString().padStart(2, '0')
+    );
+}
+function getLastDayOfYear(firstDay) {
+    // 从输入字符串中提取年份
+    const year = parseInt(firstDay.split('-')[0]);
+    
+    // 计算下一年度的第一天
+    const nextYearFirstDay = new Date(year + 1, 0, 1); // 月份0代表1月
+    
+    // 计算本年度的最后一天(下一年第一天减去1毫秒)
+    const lastDay = new Date(nextYearFirstDay.getTime() - 1);
+    
+    // 格式化为 YYYY-MM-DD
+    const lastDayYear = lastDay.getFullYear();
+    const lastDayMonth = String(lastDay.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需+1
+    const lastDayDate = String(lastDay.getDate()).padStart(2, '0');
+    
+    return `${lastDayYear}-${lastDayMonth}-${lastDayDate}`;
+}
+function getMon(){
+  var mdName
+  for(var i = 0;i<optionsModel.value.length;i++){
+    if(valueModMon.value===optionsModel.value[i].id){
+      mdName = optionsModel.value[i].label
+    }
+  }
+  console.log(mdName.value)
+  var par = {
+    params:{
+      beginTime:valueMon.value,
+      endTime:getLastDayOfYear(valueMon.value)
+    },
+    mdId:valueModMon.value
+  }
+  var x = [1,2,3,4,5,6,7,8,9,10,11,12]
+  var y = []
+  x.forEach(item=>{
+    y.push(0)
+  })
+  getYueChart(par).then(res=>{
+    for(var i = 0;i<res.data.length;i++){
+      for(var i1 = 0;i1<y.length;i1++){
+        if(Number(res.data[i].statisTm.slice(-5,-3))===i1+1){
+          y[i1] = res.data[i].statisNum
+        }
+      }
+    }
+    initChartbt1(y,mdName)
+  })
+}
+function getDay(){
+  var mdName
+  for(var i = 0;i<optionsModel.value.length;i++){
+    if(valueMod.value===optionsModel.value[i].id){
+      mdName = optionsModel.value[i].label
+    }
+  }
+  console.log(mdName)
+  var par = {
+    params:{
+      beginTime:valueYue.value,
+      endTime:getLastDayOfMonth(valueYue.value)
+    },
+    mdId:valueMod.value
+  }
+  console.log(Number('01'))
+  var x = getAllDaysInMonth(valueYue.value)
+  var y = []
+  x.forEach(item=>{
+    y.push(0)
+  })
+  var par1 = {
+    mdId:valueMod.value
+  }
+  getDaySum(par1).then(res=>{
+    daySum.value = res.data
+  })
+  getDayChart(par).then(res=>{
+    for(var i = 0;i<res.data.length;i++){
+      for(var i1 = 0;i1<y.length;i1++){
+        if(Number(res.data[i].statisTm.slice(-2))===i1+1){
+          y[i1] = res.data[i].statisNum
+        }
+      }
+    }
+    inintChartTop1(x,y,mdName)
+  })
+}
+function inintChartTop1(x,y,mdName){
   var chartDom = document.getElementById('top1');
   var myChart = echarts.init(chartDom);
   var option;
@@ -192,14 +309,12 @@ function inintChartTop1(){
         trigger: 'axis'
     },
     legend: {
-      data: ['上海市城区洪涝仿真模型', '上海沿海风暴潮预报模型', '黄浦江水系水文分析预报数值模拟模型', '苏州河水系水情预报模型', 
-      '内涝风险实时预警与预报模型','上海市中心城区排水系统模型', '温带风暴潮预报模型',],
       top:'90%'
     },
     xAxis: {
       splitLine: { show: false },
       // type: 'category',
-      data: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
+      data: x
     },
     yAxis: {
       type: 'value',
@@ -207,10 +322,10 @@ function inintChartTop1(){
     },
     series: [
       {
-      name: '上海市城区洪涝仿真模型',
+      name: mdName,
       type: 'line',
       color:'#409EFF',
-      data: [29, 21, 10, 40, 30, 26, 31, 7, 28, 20, 3, 6, 20, 4, 10, 32, 37, 13, 21, 39, 8, 39, 31, 18, 4, 9, 33, 38, 37, 4],
+      data: y,
       smooth: true
     },
     // {
@@ -260,7 +375,7 @@ function inintChartTop1(){
   option && myChart.setOption(option);
 
 }
-function initChartbt1(){
+function initChartbt1(y,mdName){
   var chartDom = document.getElementById('bt1');
   var myChart = echarts.init(chartDom);
   var option;
@@ -284,60 +399,19 @@ function initChartbt1(){
     },
     series: [
       {
-      name: '上海市城区洪涝仿真模型',
+      name: mdName,
       type: 'line',
       color:'#409EFF',
-      data: [29, 21, 10, 40, 30, 26, 31, 7, 28, 20, 3, 6, 20, 4, 10, 32, 37, 13, 21, 39, 8, 39, 31, 18, 4, 9, 33, 38, 37, 4],
+      data: y,
       smooth: true
     },
-    // {
-    //   name: '上海沿海风暴潮预报模型',
-    //   type: 'line',
-    //   color:'rgb(51, 126, 204)',
-    //   data:  [39, 37, 37, 1, 18, 19, 16, 15, 18, 16, 19, 35, 12, 10, 5, 12, 25, 2, 16, 13, 27, 14, 4, 9, 18, 27, 29, 14, 35, 22], smooth: true
-    // },
-    // {
-    //   name: '黄浦江水系水文分析预报数值模拟模型',
-    //   type: 'line',
-    //   smooth: true,
-    //   color:'rgb(121, 187, 255)',
-    //   data: [28, 8, 12, 34, 33, 20, 10, 3, 24, 38, 35, 20, 28, 33, 23, 10, 13, 14, 33, 3, 32, 18, 9, 3, 6, 37, 24, 5, 33, 20],
-    // },
-    // {
-    //   name: '苏州河水系水情预报模型',
-    //   type: 'line',
-    //   color:'rgb(121, 187, 255)',
-    //   smooth: true,
-    //   data:  [19, 12, 38, 13, 9, 20, 35, 10, 32, 7, 26, 17, 23, 15, 33, 10, 27, 39, 2, 37, 19, 39, 28, 11, 33, 30, 37, 31, 13, 36],
-    // },
-    // {
-    //   name: '内涝风险实时预警与预报模型',
-    //   type: 'line',
-    //   smooth: true,
-    //   color:"rgb(198, 226, 255)",
-    //   data: [15, 15, 37, 35, 24, 14, 23, 13, 12, 36, 17, 20, 10, 17, 24, 39, 10, 15, 32, 23, 31, 8, 28, 3, 25, 30, 3, 25, 8, 2],
-    // },
-    // {
-    //   name: '上海市中心城区排水系统模型',
-    //   smooth: true,
-    //   type: 'line',
-    //   color:'#67C23A',
-    //   data:  [37, 25, 18, 35, 15, 28, 8, 24, 34, 8, 20, 8, 10, 16, 18, 23, 7, 14, 17, 13, 18, 28, 8, 37, 32, 18, 37, 8, 16, 40],
-    // },
-    // {
-    //   name: '温带风暴潮预报模型',
-    //   smooth: true,
-    //   type: 'line',
-    //   color:'rgb(149, 212, 117)',
-    //   data:  [35, 23, 35, 18, 32, 13, 34, 8, 5, 7, 21, 4, 19, 14, 10, 5, 1, 2, 26, 2, 27, 31, 18, 17, 28, 7, 26, 25, 21, 37],
-    // }
     ]
   };
   
   option && myChart.setOption(option);
 
 }
-function initChartbt2(){
+function initChartbt2(y){
   var chartDom = document.getElementById('bt2');
   var myChart = echarts.init(chartDom);
   var option;
@@ -345,15 +419,19 @@ function initChartbt2(){
     tooltip: {
         trigger: 'axis'
     },
-    legend: {
-      data: ['上海市城区洪涝仿真模型', '上海沿海风暴潮预报模型', '黄浦江水系水文分析预报数值模拟模型', '苏州河水系水情预报模型', 
-      '内涝风险实时预警与预报模型','上海市中心城区排水系统模型', '温带风暴潮预报模型',],
-      top:'90%'
-    },
     xAxis: {
       splitLine: { show: false },
-      // type: 'category',
-      data: [1,2,3,4,5,6,7,8,9,10,11,12]
+      type: 'category',
+      data: modelList.value,
+      axisLabel: {
+      interval: 0,  // 强制显示所有标签
+      rotate: -25,   // 旋转角度,正值表示顺时针旋转,负值表示逆时针旋转
+      // 可以设置文字样式,如字体大小、颜色等
+      textStyle: {
+        fontSize: 8,
+        color: '#333'
+      }
+    }
     },
     yAxis: {
       type: 'value',
@@ -361,205 +439,116 @@ function initChartbt2(){
     },
     series: [
       {
-      name: '上海市城区洪涝仿真模型',
       type: 'bar',
       color:'#409EFF',
-      data: [29, 21, 10, 40, 30, 26, 31, 7, 28, 20, 3,],
+      data: y,
       smooth: true
     },
-    // {
-    //   name: '上海沿海风暴潮预报模型',
-    //   type: 'line',
-    //   color:'rgb(51, 126, 204)',
-    //   data:  [39, 37, 37, 1, 18, 19, 16, 15, 18, 16, 19, 35, 12, 10, 5, 12, 25, 2, 16, 13, 27, 14, 4, 9, 18, 27, 29, 14, 35, 22], smooth: true
-    // },
-    // {
-    //   name: '黄浦江水系水文分析预报数值模拟模型',
-    //   type: 'line',
-    //   smooth: true,
-    //   color:'rgb(121, 187, 255)',
-    //   data: [28, 8, 12, 34, 33, 20, 10, 3, 24, 38, 35, 20, 28, 33, 23, 10, 13, 14, 33, 3, 32, 18, 9, 3, 6, 37, 24, 5, 33, 20],
-    // },
-    // {
-    //   name: '苏州河水系水情预报模型',
-    //   type: 'line',
-    //   color:'rgb(121, 187, 255)',
-    //   smooth: true,
-    //   data:  [19, 12, 38, 13, 9, 20, 35, 10, 32, 7, 26, 17, 23, 15, 33, 10, 27, 39, 2, 37, 19, 39, 28, 11, 33, 30, 37, 31, 13, 36],
-    // },
-    // {
-    //   name: '内涝风险实时预警与预报模型',
-    //   type: 'line',
-    //   smooth: true,
-    //   color:"rgb(198, 226, 255)",
-    //   data: [15, 15, 37, 35, 24, 14, 23, 13, 12, 36, 17, 20, 10, 17, 24, 39, 10, 15, 32, 23, 31, 8, 28, 3, 25, 30, 3, 25, 8, 2],
-    // },
-    // {
-    //   name: '上海市中心城区排水系统模型',
-    //   smooth: true,
-    //   type: 'line',
-    //   color:'#67C23A',
-    //   data:  [37, 25, 18, 35, 15, 28, 8, 24, 34, 8, 20, 8, 10, 16, 18, 23, 7, 14, 17, 13, 18, 28, 8, 37, 32, 18, 37, 8, 16, 40],
-    // },
-    // {
-    //   name: '温带风暴潮预报模型',
-    //   smooth: true,
-    //   type: 'line',
-    //   color:'rgb(149, 212, 117)',
-    //   data:  [35, 23, 35, 18, 32, 13, 34, 8, 5, 7, 21, 4, 19, 14, 10, 5, 1, 2, 26, 2, 27, 31, 18, 17, 28, 7, 26, 25, 21, 37],
-    // }
     ]
   };
   
   option && myChart.setOption(option);
 
 }
-function initChartTop2(){
-  var chartDom = document.getElementById('top2');
-  var myChart = echarts.init(chartDom);
-  var option;
-
-  option = {
-    tooltip: {
-      trigger: 'item'
-    },
-    legend: {
-      top: '90%',
-      left: 'center'
+const getFirstDayOfMonthShort = () => {
+    const now = new Date();
+    return `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, '0')}-01`;
+};
+function getFirstDayOfYear() {
+    const currentYear = new Date().getFullYear();
+    const firstDay = new Date(currentYear, 0, 1);
+    
+    // 格式化为 YYYY-MM-DD
+    const year = firstDay.getFullYear();
+    const month = String(firstDay.getMonth() + 1).padStart(2, '0');
+    const day = String(firstDay.getDate()).padStart(2, '0');
+    
+    return `${year}-${month}-${day}`;
+}
+function getPai(){
+  var par = {
+    params:{
+      beginTime:valuePai.value,
+      endTime:getLastDayOfYear(valueMon.value)
     },
-    series: [
-      {
-        type: 'pie',
-        radius: ['50%', '70%'],
-        avoidLabelOverlap: false,
-        label: {
-          show: true,
-          position: 'outside',
-          formatter: '{c}',
-        },  
-        labelLine: {
-          show: true
-        },
-        color:['#80D0F8','#3384C2','#14D3D4','#69F3C0'],
-        data: [
-          { value: 200, name: '新安江' },
-          { value: 250, name: '陕北模型' },
-          { value: 30, name: '需水模型' },
-          { value: 300, name: '一维水动力' },
-        ]
-      }
-    ]
-  };
-  option && myChart.setOption(option);
+  }
+  modelList.value = []
+  var y = []
+  getPaihang(par).then(res=>{
+    res.data.forEach(item=>{
+      modelList.value.push(item.mdName)
+      y.push(item.statisNum)
+    })
+    initChartbt2(y)
+  })
 }
-function initChartTop3(){
-  var chartDom = document.getElementById('top3');
-  var myChart = echarts.init(chartDom);
-  var option;
-
-  option = {
-    tooltip: {
-      trigger: 'item'
+async function getTreeLeft(){
+  var par = {
+    params:{
+      level:'2',
+      devkind:'APP'
+    }
+  }
+  await modelTreeSelect(par).then(res=>{
+    optionsModel.value = res.data[0].children
+    valueMod.value = optionsModel.value[0].id
+    valueModMon.value = optionsModel.value[0].id
+    valueMon.value = getFirstDayOfYear()
+    valueYue.value = getFirstDayOfMonthShort()
+    valuePai.value = getFirstDayOfYear()
+    getDay()
+    getMon()
+    getPai()
+  })
+  var par1 = {
+    params:{
+      beginTime:valuePai.value,
+      endTime:getLastDayOfYear(valueMon.value)
     },
-    legend: {
-      top: '90%',
-      left: 'center'
+  }
+  modelList.value = []
+  var y = []
+  await getPaihang(par1).then(res=>{
+    res.data.forEach(item=>{
+      modelList.value.push(item.mdName)
+      y.push(item.statisNum)
+    })
+    initChartbt2(y)
+  })
+  var parDay = {
+    params:{
+      beginTime:`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, '0')}-${String(new Date().getDate()).padStart(2, '0')}`,
+      endTime:`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, '0')}-${String(new Date().getDate()).padStart(2, '0')}`
     },
-    series: [
-      {
-        type: 'pie',
-        radius: ['50%', '70%'],
-        avoidLabelOverlap: false,
-        label: {
-          show: true,
-          position: 'outside',
-          formatter: '{c}',
-        },  
-        labelLine: {
-          show: true
-        },
-        color:['#529b2e','#95d475','#b3e19d','#d1edc4'],
-        data: [
-          { value: 200, name: '洪水演进' },
-          { value: 250, name: '工程' },
-          { value: 30, name: '需水模型' },
-          { value: 300, name: '一维水动力' },
-        ]
-      }
-    ]
-  };
-  option && myChart.setOption(option);
-}
-function initChartBottom1(){
-  var chartDom = document.getElementById('bt1');
-  var myChart = echarts.init(chartDom);
-  var option;
-
-  option = {
-    xAxis: {
-      type: 'category',
-      splitLine: { show: false },
-      data: ['新安江模型', '一维水动力模型', '二维水动力模型', '降雨预报模型', 'API模型', '大数据洪涝预报模型']
+  }
+  var parMon = {
+    params:{
+      beginTime:getFirstDayOfMonthShort(),
+      endTime:getLastDayOfMonth(valueYue.value)
     },
-    yAxis: {
-      type: 'value',
-      splitLine: { show: false }
+  }
+  var parYear = {
+    params:{
+      beginTime:getFirstDayOfYear(),
+      endTime:getLastDayOfYear(valueMon.value)
     },
-    series: [
-      {
-        data: [123, 103, 89, 89, 56, 46],
-        type: 'bar',
-        label: { 
-      show: true,   // 启用标签
-      position: 'top' // 位置:顶部(可选 'inside'、'bottom' 等)
-    }
-      }
-    ]
-  };
-
-  option && myChart.setOption(option);
-}
-function initChartBottom2(){
-  var chartDom = document.getElementById('bt2');
-var myChart = echarts.init(chartDom);
-var option;
-
-option = {
-  radar: {
-    // shape: 'circle',
-    indicator: [
-      { name: 'Sales', max: 6500 },
-      { name: 'Administration', max: 16000 },
-      { name: 'Information Technology', max: 30000 },
-      { name: 'Customer Support', max: 38000 },
-      { name: 'Development', max: 52000 },
-      { name: 'Marketing', max: 25000 }
-    ]
-  },
-  series: [
-    {
-      name: 'Budget vs spending',
-      type: 'radar',
-      data: [
-        {
-          value: [4200, 3000, 20000, 35000, 50000, 18000],
-          name: 'Allocated Budget'
-        },
-        {
-          value: [5000, 14000, 28000, 26000, 42000, 21000],
-          name: 'Actual Spending'
-        }
-      ]
-    }
-  ]
-};
-
-option && myChart.setOption(option);
+  }
+  getSumAll(parDay).then(res=>{
+    dayAll.value = res.data
+  })
+  getSumAll(parMon).then(res=>{
+    monAll.value = res.data
+  })
+  getSumAll(parYear).then(res=>{
+    yearAll.value = res.data
+  })
 }
 onMounted(() => {
-  inintChartTop1()
-  initChartbt1()
-  initChartbt2()
+  getTreeLeft()
+  
+  // inintChartTop1()
+  // initChartbt1()
+  
 });
 </script>
 <style scoped lang="scss">

+ 2 - 55
ruoyi-ui/src/views/evaluate/score.vue

@@ -99,59 +99,6 @@
             </span>
           </template>
         </el-dialog>
-        <el-dialog @close="clearAdd" v-model="dialogVisibleTest" :title="titleTest" width="60%" destroy-on-close :key="tableKey">
-          <div style="margin-left: 1%;">
-            {{ detailJson.name }}:
-          </div>
-          <div style="display: flex;align-items: center;width: 98%;margin-top: 1%;">
-            <div v-if="detailJson.rqtype==='GET'">
-              <el-tag class="ml-2" type="warning">GET</el-tag>
-            </div>
-            <div v-if="detailJson.rqtype==='POST'">
-              <el-tag class="ml-2" type="warning">POST</el-tag>
-            </div>
-            
-            <div style="margin-left: 1%;">
-              {{ 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>
-          </div>
-          <div style="margin-top:2%;font-size: 18px;">
-            请求参数
-          </div>
-           <el-table 
-            style="margin-top: 1%;width: 98%;"
-            :data="tableDataCan" 
-            :cell-style="{ textAlign: 'center',padding:'2px 0' }"
-            :header-cell-style="{ textAlign: 'center'}"
-            :row-style="{ height: heightAll*0.01+'px',fontSize: '16px',textAlign:'center'  }"
-            border >
-                <el-table-column prop="paramCode" label="参数字段">
-                </el-table-column>
-                <el-table-column prop="paramName" label="参数名称">
-                </el-table-column>
-                <el-table-column prop="paramType" label="参数类型" width="200">
-                </el-table-column>
-                <el-table-column prop="paramValue" label="测试值">
-                  <template #default="scope">
-                      <div style="width: 100%;">
-                          <el-input placeholder="请填写" type="primary" class="noBor" v-model="scope.row.paramValue" size="mini" text style="margin-left: 0%;"></el-input>
-                      </div>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="paramNote" label="参数说明" show-overflow-tooltip>
-                </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>
-          <template #footer>
-            <span class="dialog-footer">
-            </span>
-          </template>
-        </el-dialog>
         <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%;min-height: 500px;"
@@ -184,7 +131,7 @@
               <el-input v-model="formAdd.intro" style="width: 40%;"  resize="none" />
             </el-form-item>
             <el-row :gutter="48">
-              <el-col :span="10">
+              <el-col :span="12">
                 <el-form-item label="评价日期:" prop="url" style="">
                     <el-date-picker
                       v-model="value1"
@@ -210,7 +157,7 @@
               </el-col>
             </el-row>
             <el-row :gutter="48">
-              <el-col :span="10">
+              <el-col :span="12">
                 <el-form-item label="质量:" prop="name" style="">
                   <el-input v-model="formAdd.intro" style="width: 100%;"  resize="none" />
                 </el-form-item>

+ 44 - 18
ruoyi-ui/src/views/platform/plugin/peizhi.vue

@@ -38,12 +38,15 @@
           </template>
         </el-table-column>
         <el-table-column prop="name" label="模型名称">
+          <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="enname" label="英文名称">
         </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="250"/>
+        <el-table-column prop="mdContact" label="联系方式" width="200"/>
         <el-table-column prop="status" label="模型状态" width="140">
         </el-table-column>
         <el-table-column prop="modifyBy" label="发布时间" width="170"/>
@@ -54,14 +57,14 @@
                     <!-- <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:0%;">配置</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 type="danger" @click="shenhe(scope.row)" text size="mini" style="margin-left: -5%;">审核</el-button> -->
+                    <el-button type="danger" @click="shenhe(scope.row)" text size="mini" style="margin-left: -5%;">审核申请</el-button> -->
                 </div>
             </template>
         </el-table-column>
       </el-table>
-        <el-dialog v-model="dialogVisible" title="" width="60%" @close="clearForm" destroy-on-close>
+        <el-dialog v-model="dialogVisible" title="" width="60%" @close="clearForm">
                 <div class="card-header">
                   <span style="font-size: 20px;margin-left: 1%;">基本信息</span>
                   <el-divider style="margin-top: 1%;"/>
@@ -677,7 +680,7 @@
   </div>
 </template>
 <script   setup>
-import { getModelList,addModel,delMdid,getModelDetail,updateModel,addGroup,getParamsList,changePar,delAllPar,getModelParList,delFen,changeShenhe } from "@/api/register/regCom";
+import { getModelList,addModel,delMdid,getModelDetail,updateModel,addGroup,getParamsList,changePar,delAllPar,getModelParList,delFen,changeShenhe,delModelPar } from "@/api/register/regCom";
 import { ref, onMounted, onUnmounted, nextTick } from 'vue';
 import { Search } from '@element-plus/icons-vue'
 import {
@@ -787,6 +790,7 @@ const upload = reactive({
 const downUrl = ref(import.meta.env.VITE_APP_BASE_API)
 const tableKey = ref(0);
 const totalComReg = ref()
+const parMgid = ref()
 const currentPage = ref(1)
 const tableData2 = ref([ 
   { date1:'流域拓扑', date2:'', date3:'single', date4:'基于水文响应' },
@@ -949,6 +953,8 @@ function gatherTable(){
   }
 }
 function handleNodeClick(node, data){
+    console.log(node.mgid)
+    parMgid.value = node.mgid
     var keyArray = []
     selFen.value = false
     tableDataCanAll.value.forEach(item=>{
@@ -1052,17 +1058,36 @@ function delAllCan(){
   }).catch(() => {});
 }
 function saveChangePar(){
-  tableDataCanAll.value.forEach((item, index, array) => { 
+  if(checked1.value===true&&tableDataCan.value.length>0){
+    tableDataCan.value.forEach((item, index, array) => { 
+      tableDataCanAll.value.push(item)
+    })
+  }
+  if(tableDataCanAll.value.length>0){
+    tableDataCanAll.value.forEach((item, index, array) => { 
       item.mdid = parForm.value.mdid
       item.parCate = 'int'
-  })
-  changePar(tableDataCanAll.value).then(res=>{
-    if(res.code===200){
-      proxy.$modal.msgSuccess("修改成功");
-      dialogVisiblePei.value = false
-      getModelListTable()
+    })
+    changePar(tableDataCanAll.value).then(res=>{
+      if(res.code===200){
+        proxy.$modal.msgSuccess("修改成功");
+        dialogVisiblePei.value = false
+        getModelListTable()
+      }
+    })
+  }
+  else{
+    var par = {
+      mdid:parForm.value.mdid
     }
-  })
+    delModelPar(par).then(res=>{
+      if(res.code===200){
+        proxy.$modal.msgSuccess("修改成功");
+        dialogVisiblePei.value = false
+        getModelListTable()
+      }
+    })
+  }
 }
 async function showPei(row){
   dialogVisiblePei.value = true
@@ -1112,7 +1137,7 @@ function showDe(row){
 function addCan(){
   tableDataCan.value.push({
     key:Math.random(),
-    mdid:parForm.value.mdid,
+    mgid:parMgid.value,
     parGroup:parTree.value.parGroupCode
   })
   console.log(tableDataCan.value)
@@ -1159,13 +1184,13 @@ async function showEdit(row){
   })
 }
 async function subEdit(){
-  if(fileList.value.length>0&&fileList1.value.length===0){
+  if(fileList.value&&fileList.value.length>0&&fileList1.value.length===0){
     await proxy.$refs["uploadRef"].submit();
   }
-  else if(fileList.value.length>0&&fileList.value.length===0){
+  else if(fileList1.value&&fileList1.value.length>0&&fileList1.value.length===0){
     await proxy.$refs["uploadRef1"].submit();
   }
-  else if(fileList.value.length>0&&fileList.value.length>0){
+  else if(fileList.value&&fileList1.value&&fileList.value.length>0&&fileList1.value.length>0){
     await proxy.$refs["uploadRef1"].submit();
     await proxy.$refs["uploadRef"].submit();
   }
@@ -1253,6 +1278,7 @@ function clearFromTree(){
 }
 function clearForm(){
   tableDataCan.value = []
+  checked1.value = false
   activeName.value = 'first'
   fileList.value = []
   fileList1.value = []

+ 52 - 25
ruoyi-ui/src/views/register/componentReg/peizhi.vue

@@ -24,6 +24,7 @@
     <div style="margin-top: 0%;margin-left: 0%;width: 100%;">
         <el-table 
         :data="tableData" 
+        height="80vh"
         style="width: 98%;margin-left: 1%;margin-top: 0.5%;"
         :cell-style="{ padding:'5px' }"
         :header-cell-style="{height: heightAll*0.01+'px',}"
@@ -37,30 +38,33 @@
           </template>
         </el-table-column>
         <el-table-column prop="name" label="模型名称">
+          <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="enname" label="英文名称">
         </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="250"/>
+        <el-table-column prop="mdContact" label="联系方式" width="200"/>
         <el-table-column prop="status" label="模型状态" width="140">
         </el-table-column>
         <el-table-column prop="modifyBy" label="发布时间" width="170"/>
         <el-table-column prop="version" label="版本" width="120"/>
-        <<el-table-column prop="address" label="操作" width="100">
+        <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:0%;">配置</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 type="danger" @click="shenhe(scope.row)" text size="mini" style="margin-left: -5%;">审核</el-button> -->
+                    <el-button type="danger" @click="shenhe(scope.row)" text size="mini" style="margin-left: -5%;">审核申请</el-button> -->
                 </div>
             </template>
         </el-table-column>
       </el-table>
-        <el-dialog v-model="dialogVisible" title="" width="60%" @close="clearForm" destroy-on-close>
+        <el-dialog v-model="dialogVisible" title="" width="60%" @close="clearForm">
                 <div class="card-header">
                   <span style="font-size: 20px;margin-left: 1%;">基本信息</span>
                   <el-divider style="margin-top: 1%;"/>
@@ -676,7 +680,7 @@
   </div>
 </template>
 <script   setup>
-import { getModelList,addModel,delMdid,getModelDetail,updateModel,addGroup,getParamsList,changePar,delAllPar,getModelParList,delFen,changeShenhe } from "@/api/register/regCom";
+import { getModelList,addModel,delMdid,getModelDetail,updateModel,addGroup,getParamsList,changePar,delAllPar,getModelParList,delFen,changeShenhe,delModelPar } from "@/api/register/regCom";
 import { ref, onMounted, onUnmounted, nextTick } from 'vue';
 import { Search } from '@element-plus/icons-vue'
 import {
@@ -786,6 +790,7 @@ const upload = reactive({
 const downUrl = ref(import.meta.env.VITE_APP_BASE_API)
 const tableKey = ref(0);
 const totalComReg = ref()
+const parMgid = ref()
 const currentPage = ref(1)
 const tableData2 = ref([ 
   { date1:'流域拓扑', date2:'', date3:'single', date4:'基于水文响应' },
@@ -909,9 +914,6 @@ function getChineseInitials(str) {
     });
     return result.join('');
 }
-function handleBlur(){
-  formTree.value.parGroupCode = getChineseInitials(formTree.value.parGroupName)
-}
 function shenhe(row){
   var par = {
     srvIds:row.mdid,
@@ -924,6 +926,9 @@ function shenhe(row){
     }
   })
 }
+function handleBlur(){
+  formTree.value.parGroupCode = getChineseInitials(formTree.value.parGroupName)
+}
 function gatherTable(){
   if(checked1.value===false){
     var keyArray = []
@@ -948,6 +953,8 @@ function gatherTable(){
   }
 }
 function handleNodeClick(node, data){
+    console.log(node.mgid)
+    parMgid.value = node.mgid
     var keyArray = []
     selFen.value = false
     tableDataCanAll.value.forEach(item=>{
@@ -1051,17 +1058,36 @@ function delAllCan(){
   }).catch(() => {});
 }
 function saveChangePar(){
-  tableDataCanAll.value.forEach((item, index, array) => { 
+  if(checked1.value===true&&tableDataCan.value.length>0){
+    tableDataCan.value.forEach((item, index, array) => { 
+      tableDataCanAll.value.push(item)
+    })
+  }
+  if(tableDataCanAll.value.length>0){
+    tableDataCanAll.value.forEach((item, index, array) => { 
       item.mdid = parForm.value.mdid
       item.parCate = 'int'
-  })
-  changePar(tableDataCanAll.value).then(res=>{
-    if(res.code===200){
-      proxy.$modal.msgSuccess("修改成功");
-      dialogVisiblePei.value = false
-      getModelListTable()
+    })
+    changePar(tableDataCanAll.value).then(res=>{
+      if(res.code===200){
+        proxy.$modal.msgSuccess("修改成功");
+        dialogVisiblePei.value = false
+        getModelListTable()
+      }
+    })
+  }
+  else{
+    var par = {
+      mdid:parForm.value.mdid
     }
-  })
+    delModelPar(par).then(res=>{
+      if(res.code===200){
+        proxy.$modal.msgSuccess("修改成功");
+        dialogVisiblePei.value = false
+        getModelListTable()
+      }
+    })
+  }
 }
 async function showPei(row){
   dialogVisiblePei.value = true
@@ -1111,7 +1137,7 @@ function showDe(row){
 function addCan(){
   tableDataCan.value.push({
     key:Math.random(),
-    mdid:parForm.value.mdid,
+    mgid:parMgid.value,
     parGroup:parTree.value.parGroupCode
   })
   console.log(tableDataCan.value)
@@ -1158,13 +1184,13 @@ async function showEdit(row){
   })
 }
 async function subEdit(){
-  if(fileList.value.length>0&&fileList1.value.length===0){
+  if(fileList.value&&fileList.value.length>0&&fileList1.value.length===0){
     await proxy.$refs["uploadRef"].submit();
   }
-  else if(fileList.value.length>0&&fileList.value.length===0){
+  else if(fileList1.value&&fileList1.value.length>0&&fileList1.value.length===0){
     await proxy.$refs["uploadRef1"].submit();
   }
-  else if(fileList.value.length>0&&fileList.value.length>0){
+  else if(fileList.value&&fileList1.value&&fileList.value.length>0&&fileList1.value.length>0){
     await proxy.$refs["uploadRef1"].submit();
     await proxy.$refs["uploadRef"].submit();
   }
@@ -1194,9 +1220,9 @@ async function submit(){
         if(formJi.value.devlang==='1'){
           formJi.value.devlang = elseLan.value
         }
-        delete formJi.value.msort 
+        delete formJi.value.msort
         formJi.value.devkind = 'APP'
-        formJi.value.cateid = '776eba74-eaeb-47ca-8436-e05ed87b68ec'
+        formJi.value.cateid = '776eba74-eaeb-47ca-8436-e05ed87b68ec'//区分目录
         addModel(formJi.value).then(res=>{
         if(res.code===200){
           proxy.$modal.msgSuccess("新增成功");
@@ -1252,6 +1278,7 @@ function clearFromTree(){
 }
 function clearForm(){
   tableDataCan.value = []
+  checked1.value = false
   activeName.value = 'first'
   fileList.value = []
   fileList1.value = []
@@ -1288,7 +1315,7 @@ function reg(){
   dialogVisible.value = true
 }
 function getModelListTable(){
-  tableData.value = []
+  tableData.value = [] 
   var par = {
     pageNum:1,
     pageSize:20,

+ 2 - 4
ruoyi-ui/src/views/service/fabu/fabu.vue

@@ -61,8 +61,6 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="cateCode" label="服务分类" width="140" show-overflow-tooltip>
-          </el-table-column>
           <el-table-column prop="audit" label="发布状态" width="100">
             <template #default="scope">
               <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.publish=='1'">
@@ -196,10 +194,10 @@
               </el-table-column>
               <el-table-column prop="audit" label="发布状态" width="100">
                 <template #default="scope">
-                  <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.publish=='1'">
+                  <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.state=='1'">
                     已发布
                   </div>
-                  <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.publish=='0'||scope.row.publish==null">
+                  <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.state=='0'||scope.row.state==null">
                     未发布
                   </div>
                 </template>

+ 2 - 4
ruoyi-ui/src/views/service/info/fabu.vue

@@ -97,8 +97,6 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="cateCode" label="服务分类" width="140" show-overflow-tooltip>
-          </el-table-column>
           <el-table-column prop="audit" label="发布状态" width="100">
             <template #default="scope">
               <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.publish=='1'">
@@ -232,10 +230,10 @@
               </el-table-column>
               <el-table-column prop="audit" label="发布状态" width="100">
                 <template #default="scope">
-                  <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.publish=='1'">
+                  <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.state=='1'">
                     已发布
                   </div>
-                  <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.publish=='0'||scope.row.publish==null">
+                  <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.state=='0'||scope.row.state==null">
                     未发布
                   </div>
                 </template>

+ 1 - 3
ruoyi-ui/src/views/service/info/shenhe.vue

@@ -97,8 +97,6 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="cateCode" label="服务分类" width="140" show-overflow-tooltip>
-          </el-table-column>
           <el-table-column prop="audit" label="审核状态" width="100">
             <template #default="scope">
               <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.audit=='4'">
@@ -196,7 +194,7 @@
               <el-input v-model="auditRemark" style="width: 100%;" type="textarea"/>
             </el-form-item>
           </el-form>
-          <div style="display: flex;font-size: 13px;align-items: center;line-height: 1.5;margin-left: 1%;margin-top: 5%;">
+          <div style="display: flex;font-size: 15px;align-items: center;line-height: 1.5;margin-left: 1%;margin-top: 5%;">
             <div style="">
               当前审核人:
             </div>

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

@@ -102,8 +102,6 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="cateCode" label="服务分类" width="140" show-overflow-tooltip>
-          </el-table-column>
           <el-table-column prop="audit" label="测试状态" width="100">
             <template #default="scope">
               <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.testRunNum>0">
@@ -256,10 +254,10 @@
                 </el-table-column>
                 <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=='0'">
+                    <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.senState=='1'">
                       已测试
                     </div>
-                    <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.senState=='1'">
+                    <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.senState=='0'">
                       未测试
                     </div>
                   </template>

+ 1 - 3
ruoyi-ui/src/views/service/shenhe/index.vue

@@ -97,8 +97,6 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="cateCode" label="服务分类" width="140" show-overflow-tooltip>
-          </el-table-column>
           <el-table-column prop="audit" label="审核状态" width="100">
             <template #default="scope">
               <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.audit=='4'">
@@ -196,7 +194,7 @@
               <el-input v-model="auditRemark" style="width: 100%;" type="textarea"/>
             </el-form-item>
           </el-form>
-          <div style="display: flex;font-size: 13px;align-items: center;line-height: 1.5;margin-left: 1%;margin-top: 5%;">
+          <div style="display: flex;font-size: 15px;align-items: center;line-height: 1.5;margin-left: 1%;margin-top: 5%;">
             <div style="">
               当前审核人:
             </div>

+ 5 - 4
ruoyi-ui/src/views/service/test/index.vue

@@ -102,14 +102,15 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="cateCode" label="服务分类" width="140" show-overflow-tooltip>
-          </el-table-column>
           <el-table-column prop="audit" label="测试状态" width="140">
             <template #default="scope">
-              <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.testRunNum>0">
+              <div style="text-align: center;display: flex;color:#67C23A" v-if="scope.row.senState==1">
                 已测试
               </div>
-              <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.testRunNum==0||scope.row.testRunNum==null">
+              <div style="text-align: center;display: flex;color:#F56C6C" v-if="scope.row.testRunNum==0">
+                测试失败
+              </div>
+              <div style="text-align: center;display: flex;color:#E6A23C" v-if="scope.row.testRunNum==null">
                 未测试
               </div>
             </template>