Browse Source

Merge remote-tracking branch 'origin/test' into test

syh 5 years ago
parent
commit
5f39519a87
2 changed files with 152 additions and 141 deletions
  1. 1 1
      src/components/ctop/vm-card.vue
  2. 151 140
      src/views/modules/actor/ActorList.vue

+ 1 - 1
src/components/ctop/vm-card.vue

@@ -52,7 +52,7 @@ li {
       <!-- <img :src="img" alt="" height="250"> -->
       <div v-if="editable && type == 'vertical'" class="control">
         <span class="edit">
-          <a :href="editUrl">
+          <a href="javascript:;">
             <a-icon type="edit" @click="handleDetail(record)"></a-icon>
           </a>
         </span>

+ 151 - 140
src/views/modules/actor/ActorList.vue

@@ -1,148 +1,159 @@
 <template>
-  <a-card :bordered="false">
-
-    <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline">
-        <a-row :gutter="24">
-          <a-col :md="6" :sm="8">
-            <a-form-item label="姓名">
-              <a-input placeholder="请输入姓名" v-model="queryParam.name"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="8">
-            <a-form-item label="性别">
-              <a-select v-model="queryParam.sex" placeholder="请选择性别查询">
-                <a-select-option value="">请选择性别查询</a-select-option>
-                <a-select-option value="1">男</a-select-option>
-                <a-select-option value="2">女</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-
-          <a-col :md="6" :sm="8">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-            </span>
-          </a-col>
-
-        </a-row>
-      </a-form>
-    </div>
-
-    <!-- 操作按钮区域 -->
-    <div class="table-operator">
-      <a-button @click="handleAdd" v-show="show" type="primary" icon="plus">新增</a-button>
-
-    </div>
-
-    <!-- table区域-begin -->
-    <div>
-
-      <a-table
-        ref="table"
-        size="middle"
-        bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading">
-
-        <!-- 字符串超长截取省略号显示-->
-        <span slot="esContent" slot-scope="text">
-          <j-ellipsis :value="text" :length="10"/>
-        </span>
-
-        <span slot="action" slot-scope="text, record">
-          <a href="javascript:;" @click="handleDetail(record)">详情</a>
-          <a-divider type="vertical"/>
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多<a-icon type="down"/></a>
-            <a-menu slot="overlay">
-               <a-menu-item v-show="show">
-                <a @click="handleEdit(record)">编辑</a>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
-        </span>
-
-      </a-table>
-    </div>
-    <!-- table区域-end -->
-
-    <!-- 表单区域 -->
-    <actor-modal ref="modalForm" @ok="modalFormOk"></actor-modal>
-  </a-card>
+  <vm-image-list
+    :data="dataImageList"
+    :total="total"
+    @delete-ok="deletefn"
+    class="vm-margin"
+    @getList="getActorList"
+    @updateList="getActorList(1,'')"
+  ></vm-image-list>
 </template>
 
 <script>
-  import ActorModal from './modules/ActorModal'
-  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
-  import JEllipsis from "@/components/jeecg/JEllipsis";
-
-  export default {
-    name: "ActorList",
-    mixins: [JeecgListMixin],
-    components: {
-      JEllipsis,
-      ActorModal
-    },
-    data() {
-      return {
-        queryParam:{},
-        description: '演员管理',
-        // 新增修改按钮是否显示
-        show: true,
-        // 表头
-        columns: [
-          {
-            title: 'ID',
-            align: "center",
-            dataIndex: 'id'
-          },
-          {
-            title: '姓名',
-            align: "center",
-            dataIndex: 'name'
-          },
-          {
-            title: '生日',
-            align: "center",
-            dataIndex: 'birthday',
-          },
-          {
-            title: '性别',
-            align: "center",
-            dataIndex: 'sex_dictText',
-          },
-          {
-            title: '特长',
-            align: "center",
-            dataIndex: 'speciality'
-          },
-          {
-            title: '创建时间',
-            align: 'center',
-            dataIndex: 'createTime'
-          },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align: "center",
-            scopedSlots: {customRender: 'action'},
-          }
-        ],
-        url: {
-          list: "/ctop/actor/list",
-        },
+import VmImageList from '@/components/ctop/vm-image-list'
+import { actorList  } from '@/api/actor'
+export default {
+  name: 'ImageList',
+  components: {
+    VmImageList
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.getActorList(1)
+    })
+  },
+  methods: {
+    deletefn: function(data) {
+      for (let i = 0; i < this.dataImageList.length; i++) {
+        if (this.dataImageList[i].id === data.id) {
+          this.dataImageList.splice(i, 1)
+        }
       }
     },
-
-    methods: {}
+    getActorList(page,name) {
+      this.dataImageList = []
+      actorList({ pageNo: page, pageSize: 8,name:name }).then(res => {
+        if (res.code == 0) {
+          this.dataImageList = res.result.records
+          this.total = res.result.total
+        }
+      })
+    }
+  },
+  data: function() {
+    return {
+      dataImageList: [
+        {
+          id: '1',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569329515&di=192e14566c758fcd55c1cc71fa19421a&imgtype=jpg&er=1&src=http%3A%2F%2Fstatic.ws.126.net%2Fent%2F2015%2F8%2F5%2F20150805175229d97cb.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        },
+        {
+          id: '2',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569379371&di=cc78b98e59098b91b71b86aef92dcf43&imgtype=jpg&er=1&src=http%3A%2F%2Fi3.sinaimg.cn%2Fent%2Fj%2F2009-08-31%2FU2223P28T3D2676725F358DT20090831022144.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        },
+        {
+          id: '3',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569329515&di=192e14566c758fcd55c1cc71fa19421a&imgtype=jpg&er=1&src=http%3A%2F%2Fstatic.ws.126.net%2Fent%2F2015%2F8%2F5%2F20150805175229d97cb.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        },
+        {
+          id: '4',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569329515&di=192e14566c758fcd55c1cc71fa19421a&imgtype=jpg&er=1&src=http%3A%2F%2Fstatic.ws.126.net%2Fent%2F2015%2F8%2F5%2F20150805175229d97cb.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        },
+        {
+          id: '5',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569329515&di=192e14566c758fcd55c1cc71fa19421a&imgtype=jpg&er=1&src=http%3A%2F%2Fstatic.ws.126.net%2Fent%2F2015%2F8%2F5%2F20150805175229d97cb.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        },
+        {
+          id: '6',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569329515&di=192e14566c758fcd55c1cc71fa19421a&imgtype=jpg&er=1&src=http%3A%2F%2Fstatic.ws.126.net%2Fent%2F2015%2F8%2F5%2F20150805175229d97cb.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        },
+        {
+          id: '7',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569329515&di=192e14566c758fcd55c1cc71fa19421a&imgtype=jpg&er=1&src=http%3A%2F%2Fstatic.ws.126.net%2Fent%2F2015%2F8%2F5%2F20150805175229d97cb.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        },
+        {
+          id: '8',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569329515&di=192e14566c758fcd55c1cc71fa19421a&imgtype=jpg&er=1&src=http%3A%2F%2Fstatic.ws.126.net%2Fent%2F2015%2F8%2F5%2F20150805175229d97cb.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        },
+        {
+          id: '9',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569329515&di=192e14566c758fcd55c1cc71fa19421a&imgtype=jpg&er=1&src=http%3A%2F%2Fstatic.ws.126.net%2Fent%2F2015%2F8%2F5%2F20150805175229d97cb.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        },
+        {
+          id: '10',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569329515&di=192e14566c758fcd55c1cc71fa19421a&imgtype=jpg&er=1&src=http%3A%2F%2Fstatic.ws.126.net%2Fent%2F2015%2F8%2F5%2F20150805175229d97cb.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        },
+        {
+          id: '11',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569329515&di=192e14566c758fcd55c1cc71fa19421a&imgtype=jpg&er=1&src=http%3A%2F%2Fstatic.ws.126.net%2Fent%2F2015%2F8%2F5%2F20150805175229d97cb.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        },
+        {
+          id: '12',
+          title: '佟丽娅',
+          img:
+            'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1569329515&di=192e14566c758fcd55c1cc71fa19421a&imgtype=jpg&er=1&src=http%3A%2F%2Fstatic.ws.126.net%2Fent%2F2015%2F8%2F5%2F20150805175229d97cb.jpg',
+          desc: '代表作《北京爱情故事》',
+          detailUrl: 'http://www.baidu.com',
+          editUrl: 'http://www.baidu.com'
+        }
+      ],
+      total: null
+    }
   }
+}
 </script>
-<style  scoped>
-  @import '~@assets/less/common.less'
-</style>