Selaa lähdekoodia

[首页] 友情链接 暂放两行8个。分页查询接口,一页10条,2行半

liangyan0105 2 vuotta sitten
vanhempi
commit
f1c7ab901f

+ 1 - 1
src/assets/less/mytodo.css

@@ -51,7 +51,7 @@
   border: none;
   margin-right: 10px;
   background-color: rgba(102, 155, 188, 0.7);
-  margin-bottom: 10px;
+  margin-bottom: 20px;
   width: calc((100% - 40px) / 4);
   justify-content: center;
   align-items: center;

+ 1 - 1
src/assets/less/mytodo.less

@@ -63,7 +63,7 @@
         border: none;
         margin-right: 10px;
         background-color: rgba(102, 155, 188, 0.7);
-        margin-bottom: 10px;
+        margin-bottom: 20px;
         width: calc((100% - 40px) / 4);
         // display: flex;
         justify-content: center;

+ 2 - 1
src/views/dashboard/MyToDo.vue

@@ -109,7 +109,7 @@
             <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" :style="{ marginBottom: '8px', paddingRight: 0 }">
               <a-card title="友情链接" :bordered="false" style="width:100%;height:216px">
                 <template #extra><a href="javascript:void(0);" @click="openMyLinks">更多</a></template>
-                <div v-for="item in linksList.slice(0, 10)" :key="item.id" class="links">
+                <div v-for="item in linksList.slice(0, 8)" :key="item.id" class="links">
                   <button class="itemLink">
                     <a href="#" @click="openItemLink(item)">
                       <span width="2em"> {{ item.name }}</span>
@@ -393,6 +393,7 @@ export default {
     // 查询友情链接
     async getMyLinks() {
       // params:{xx1:'',xx2:'',......}
+      // isRelease为 1  已发布(渲染)
       await linksList({ isRelease: '1' }).then(res => {
         console.log('友情链接后台返回结果', res)
         this.linksList = res.result.records

+ 7 - 9
src/views/oa/myLinks.vue

@@ -115,18 +115,18 @@ export default {
     },
     data () {
         return {
-            selectedRowKeys: [],
-            id: '', // 唯一标识 双绑定后自动生成,删除
+            selectedRowKeys: [], // 选中行
+            id: '', // 唯一标识 双绑定后自动生成,删除
             loading: false, // 表格加载
             pagination: {
                 total: 0,
                 current: 0,
                 pageSize: 0
             },
+            // 查询参数
             queryParam: {
                 pageNo: '1',
                 name: '' // 名称
-                // isRelease: '' // 是否发布
             },
             // 表头
             columns: [
@@ -140,12 +140,6 @@ export default {
                     dataIndex: 'link',
                     align: 'center'
                 },
-                // {
-                //     title: '简要介绍',
-                //     dataIndex: 'briefIntroduction',
-                //     align: 'center',
-                //     width: '30%'
-                // },
                 {
                     title: '创建人',
                     dataIndex: 'createBy',
@@ -238,6 +232,10 @@ export default {
         },
 
         // 发布
+        /* --------------------------------------------
+            id:'', 需修改的id
+            isRelease:'' 修改成需要的发布状态 0未  1已
+        ----------------------------------------------- */
         sendLinks (id) {
             console.log('发布')
             linksReleseUpdate({ id: id, isRelease: '1' }).then(res => {