cauto 2 years ago
parent
commit
b9163578f8
2 changed files with 17 additions and 19 deletions
  1. 1 1
      src/view/index/index.vue
  2. 16 18
      src/view/node/nodeconfig.vue

+ 1 - 1
src/view/index/index.vue

@@ -12,7 +12,7 @@
     </div>
     <div style="margin-top: 10px">
       <a-spin :spinning="spinning">
-        <a-list :grid="{ gutter: 16, xs: 1, sm: 2, md: 4, lg: 4, xl: 6, xxl: 3, xxxl: 2 }" :data-source="nodeItme">
+        <a-list :grid="{ gutter: 16, xs: 1, sm: 2, md: 4, lg: 4, xl: 6, xxl: 4, xxxl: 2 }" :data-source="nodeItme">
           <template #renderItem="{ item }">
             <a-list-item>
               <a-card :title="item.Name">

+ 16 - 18
src/view/node/nodeconfig.vue

@@ -60,15 +60,15 @@
     <!-- 加载节点信息 -->
   <a-table :row-selection="rowSelection" :columns="columns" :data-source="datalist" rowKey="id" :style="{ height: '100%', borderRight: 0 }">
       <template v-slot:bodyCell="{column , record}">
-        <template v-if="column.dataIndex === 'delete'">
-          <a-popconfirm
-              v-if="datalist.length"
-              title="是否删除这条记录"
-              @confirm="onDeleteNode(record)"
-          >
-            <a>删除</a>
-          </a-popconfirm>
-        </template>
+<!--        <template v-if="column.dataIndex === 'delete'">-->
+<!--          <a-popconfirm-->
+<!--              v-if="datalist.length"-->
+<!--              title="是否删除这条记录"-->
+<!--              @confirm="onDeleteNode(record)"-->
+<!--          >-->
+<!--            <a>删除</a>-->
+<!--          </a-popconfirm>-->
+<!--        </template>-->
 
         <template v-if="column.dataIndex === 'edit'">
           <a @click="onEditNode(record)">编辑</a>
@@ -179,12 +179,12 @@ export default defineComponent({
         key: 'Sshusername',
         dataIndex:'Sshusername',
       },
-      {
-        title: '删除',
-        key: 'delete',
-        dataIndex: 'delete',
-        // slots: { customRender: 'delete' },
-      },
+      // {
+      //   title: '删除',
+      //   key: 'delete',
+      //   dataIndex: 'delete',
+      //   // slots: { customRender: 'delete' },
+      // },
       {
         title: '编辑',
         key: 'edit',
@@ -323,9 +323,7 @@ export default defineComponent({
 
     const onSubmit = (isedit) =>{
       const reqdata = {
-        "id"   : toRaw(formState).Serverid,
-        "name" : toRaw(formState).Name,
-        "host" : toRaw(formState).Host,
+        "serverid"   : toRaw(formState).Serverid,
         "sshcom" : toRaw(formState).Sshcommand,
         "sshuser"  : toRaw(formState).Sshusername,
         "sshpass"  : toRaw(formState).Sshpassword,