nanjingliujinyu 3 місяців тому
батько
коміт
a48eefd9d9

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

@@ -1058,6 +1058,11 @@ function delAllCan(){
   }).catch(() => {});
 }
 function saveChangePar(){
+  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
@@ -1273,6 +1278,7 @@ function clearFromTree(){
 }
 function clearForm(){
   tableDataCan.value = []
+  checked1.value = false
   activeName.value = 'first'
   fileList.value = []
   fileList1.value = []

+ 16 - 13
ruoyi-ui/src/views/register/componentReg/index.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',}"
@@ -44,8 +45,8 @@
         <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" show-overflow-tooltip/>
-        <el-table-column prop="mdContact" label="联系方式" width="100" show-overflow-tooltip/>
+        <el-table-column prop="mdUnit" label="模型单位" width="200"/>
+        <el-table-column prop="mdContact" label="联系方式" width="100"/>
         <el-table-column prop="status" label="模型状态" width="140">
         </el-table-column>
         <el-table-column prop="modifyBy" label="发布时间" width="170"/>
@@ -58,7 +59,7 @@
                     <!-- <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 type="info" @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>
@@ -640,7 +641,7 @@
                 </div>
               </div>
             </el-tab-pane>
-            <el-tab-pane label="模型状态"></el-tab-pane>
+            <el-tab-pane label="模型状态">Role</el-tab-pane>
           </el-tabs>
           <template #footer>
           <span class="dialog-footer">
@@ -789,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:'基于水文响应' },
@@ -912,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,
@@ -927,6 +926,9 @@ function shenhe(row){
     }
   })
 }
+function handleBlur(){
+  formTree.value.parGroupCode = getChineseInitials(formTree.value.parGroupName)
+}
 function gatherTable(){
   if(checked1.value===false){
     var keyArray = []
@@ -951,9 +953,10 @@ function gatherTable(){
   }
 }
 function handleNodeClick(node, data){
+    console.log(node.mgid)
+    parMgid.value = node.mgid
     var keyArray = []
     selFen.value = false
-    parMgid.value = node.mgid
     tableDataCanAll.value.forEach(item=>{
       keyArray.push(item.key)
     })
@@ -1059,7 +1062,6 @@ function saveChangePar(){
     tableDataCan.value.forEach((item, index, array) => { 
       tableDataCanAll.value.push(item)
     })
-    tableDataCanAll.value.push(tableDataCan.value)
   }
   if(tableDataCanAll.value.length>0){
     tableDataCanAll.value.forEach((item, index, array) => { 
@@ -1135,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)
@@ -1218,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("新增成功");
@@ -1276,6 +1278,7 @@ function clearFromTree(){
 }
 function clearForm(){
   tableDataCan.value = []
+  checked1.value = false
   activeName.value = 'first'
   fileList.value = []
   fileList1.value = []
@@ -1312,7 +1315,7 @@ function reg(){
   dialogVisible.value = true
 }
 function getModelListTable(){
-  tableData.value = []
+  tableData.value = [] 
   var par = {
     pageNum:1,
     pageSize:20,