Prechádzať zdrojové kódy

feat: #调整列表

loki 3 rokov pred
rodič
commit
52e837e865

+ 2 - 2
src/api/photoWarehouse/index.js

@@ -1,11 +1,11 @@
 import api from '@/utils/request';
 import api from '@/utils/request';
 
 
-export const getList = params =>
+export const getPage = params =>
 	api.post(`/yxl-back-end/admin/photo-warehouse/page`, params);
 	api.post(`/yxl-back-end/admin/photo-warehouse/page`, params);
 export const getItem = ({ id, ...params }) =>
 export const getItem = ({ id, ...params }) =>
 	api.get(`/yxl-back-end/admin/photo-warehouse/${id}`, params);
 	api.get(`/yxl-back-end/admin/photo-warehouse/${id}`, params);
 export const saveItem = ({ id, ...params }) =>
 export const saveItem = ({ id, ...params }) =>
-	api.post(`/yxl-back-end/admin/photo-warehouse/save`, params);
+	api.post(`/yxl-back-end/admin/photo-warehouse`, params);
 export const delItem = ({ id, ...params }) =>
 export const delItem = ({ id, ...params }) =>
 	api.del(`/yxl-back-end/admin/photo-warehouse/${id}`, params);
 	api.del(`/yxl-back-end/admin/photo-warehouse/${id}`, params);
 export const auditItem = params =>
 export const auditItem = params =>

+ 0 - 1
src/containers/ToolbarContainer.vue

@@ -159,7 +159,6 @@ export default {
         init = await init;
         init = await init;
         init[current.name] =
         init[current.name] =
           current.defaultValue !== undefined ? current.defaultValue : null;
           current.defaultValue !== undefined ? current.defaultValue : null;
-        console.log(current.name, current.defaultValue);
         if (current.options && isPromise(current.options)) {
         if (current.options && isPromise(current.options)) {
           current.options = await current.options;
           current.options = await current.options;
         }
         }

+ 10 - 10
src/views/photoManagement/imageGoodsManagement/index.vue

@@ -15,7 +15,7 @@
 <script>
 <script>
 import toolbar from './toolbar';
 import toolbar from './toolbar';
 import mxFilterList from '@/mixins/filterList';
 import mxFilterList from '@/mixins/filterList';
-import { getList, delItem } from '@/api/photoWarehouse';
+import { getPage, delItem } from '@/api/photoWarehouse';
 
 
 export default {
 export default {
   name: 'ImageGoodsManagement',
   name: 'ImageGoodsManagement',
@@ -24,7 +24,7 @@ export default {
 
 
   mixins: [
   mixins: [
     mxFilterList({
     mxFilterList({
-      fetchList: getList // 在下方data再声明一个 fetchList: iGetList 同等效果
+      fetchList: getPage // 在下方data再声明一个 fetchList: iGetList 同等效果
     })
     })
   ],
   ],
 
 
@@ -34,7 +34,7 @@ export default {
         {
         {
           key: 'listPreview',
           key: 'listPreview',
           name: '图片',
           name: '图片',
-          width: '160',
+          width: this.$col.b,
           render: (h, { row }) =>
           render: (h, { row }) =>
             h('img', {
             h('img', {
               style: {
               style: {
@@ -55,41 +55,41 @@ export default {
         {
         {
           key: 'location',
           key: 'location',
           name: '上传位置',
           name: '上传位置',
-          minWidth: '180',
+          minWidth: this.$col.b,
           render: (h, { row }) =>
           render: (h, { row }) =>
             h('span', `${row.kindergartenName}/${row.activityName}`)
             h('span', `${row.kindergartenName}/${row.activityName}`)
         },
         },
         {
         {
           key: 'createAt',
           key: 'createAt',
           name: '上传时间',
           name: '上传时间',
-          width: '140'
+          width: this.$col.b
         },
         },
         {
         {
           key: 'likes',
           key: 'likes',
           name: '点赞数',
           name: '点赞数',
-          width: '140'
+          width: this.$col.m
         },
         },
         {
         {
           key: 'collections',
           key: 'collections',
           name: '收藏数',
           name: '收藏数',
-          width: '140'
+          width: this.$col.m
         },
         },
         {
         {
           key: 'hdLogoPhotoPrice',
           key: 'hdLogoPhotoPrice',
           name: '高清价',
           name: '高清价',
-          width: '140',
+          width: this.$col.m,
           render: (h, { row }) => h('span', `${row.hdLogoPhotoPrice}`)
           render: (h, { row }) => h('span', `${row.hdLogoPhotoPrice}`)
         },
         },
         {
         {
           key: 'originPhotoPrice',
           key: 'originPhotoPrice',
           name: '原图价',
           name: '原图价',
-          width: '140',
+          width: this.$col.m,
           render: (h, { row }) => h('span', `${row.originPhotoPrice}`)
           render: (h, { row }) => h('span', `${row.originPhotoPrice}`)
         },
         },
         {
         {
           key: 'isShow',
           key: 'isShow',
           name: '状态',
           name: '状态',
-          width: '80',
+          width: this.$col.s,
           type: 'tag',
           type: 'tag',
           fetchTagType: val => (val ? 'success' : 'info'),
           fetchTagType: val => (val ? 'success' : 'info'),
           tagName: row => (row.isShow ? '上架' : '下架')
           tagName: row => (row.isShow ? '上架' : '下架')

+ 2 - 0
src/views/photoManagement/imageGoodsManagement/toolbar.vue

@@ -3,6 +3,8 @@
 </template>
 </template>
 
 
 <script>
 <script>
+import AUDITTYPE from '@/const/auditType';
+
 export default {
 export default {
   name: 'ImageGoodsManagementToolbar',
   name: 'ImageGoodsManagementToolbar',
 
 

+ 6 - 6
src/views/photoManagement/photoVerifyManagement/index.vue

@@ -15,7 +15,7 @@
 <script>
 <script>
 import toolbar from './toolbar';
 import toolbar from './toolbar';
 import mxFilterList from '@/mixins/filterList';
 import mxFilterList from '@/mixins/filterList';
-import { getList } from '@/api/photoWarehouse';
+import { getPage } from '@/api/photoWarehouse';
 
 
 export default {
 export default {
   name: 'photoVerifyManagement',
   name: 'photoVerifyManagement',
@@ -24,7 +24,7 @@ export default {
 
 
   mixins: [
   mixins: [
     mxFilterList({
     mxFilterList({
-      fetchList: getList // 在下方data再声明一个 fetchList: iGetList 同等效果
+      fetchList: getPage // 在下方data再声明一个 fetchList: iGetList 同等效果
     })
     })
   ],
   ],
 
 
@@ -34,7 +34,7 @@ export default {
         {
         {
           key: 'listPreview',
           key: 'listPreview',
           name: '图片',
           name: '图片',
-          width: '160',
+          width: this.$col.b,
           render: (h, { row }) =>
           render: (h, { row }) =>
             h('img', {
             h('img', {
               style: {
               style: {
@@ -55,19 +55,19 @@ export default {
         {
         {
           key: 'location',
           key: 'location',
           name: '上传位置',
           name: '上传位置',
-          minWidth: '180',
+          minWidth: this.$col.b,
           render: (h, { row }) =>
           render: (h, { row }) =>
             h('span', `${row.kindergartenName}/${row.activityName}`)
             h('span', `${row.kindergartenName}/${row.activityName}`)
         },
         },
         {
         {
           key: 'createAt',
           key: 'createAt',
           name: '上传时间',
           name: '上传时间',
-          width: '140'
+          width: this.$col.b
         },
         },
         {
         {
           key: 'auditStatus',
           key: 'auditStatus',
           name: '状态',
           name: '状态',
-          width: '80',
+          width: this.$col.s,
           type: 'tag',
           type: 'tag',
           fetchTagType: val => {
           fetchTagType: val => {
             switch (val) {
             switch (val) {

+ 4 - 1
src/views/photoManagement/photoVerifyManagement/toolbar.vue

@@ -3,6 +3,8 @@
 </template>
 </template>
 
 
 <script>
 <script>
+import AUDITTYPE from '@/const/auditType';
+
 export default {
 export default {
   name: 'UploadManagementToolbar',
   name: 'UploadManagementToolbar',
 
 
@@ -20,7 +22,8 @@ export default {
           name: 'auditStatus',
           name: 'auditStatus',
           label: '状态',
           label: '状态',
           options: AUDITTYPE,
           options: AUDITTYPE,
-          format: val => (val !== null && val !== '' ? !!val : null)
+          format: val => (val !== null && val !== '' ? !!val : null),
+          defaultValue: 0
         },
         },
         {
         {
           type: 'dateArray',
           type: 'dateArray',

+ 6 - 6
src/views/photographerManagement/photoVerify/index.vue

@@ -15,7 +15,7 @@
 <script>
 <script>
 import toolbar from './toolbar';
 import toolbar from './toolbar';
 import mxFilterList from '@/mixins/filterList';
 import mxFilterList from '@/mixins/filterList';
-import { getList, delItem } from '@/api/photoWarehouse';
+import { getPage, delItem } from '@/api/photoWarehouse';
 
 
 export default {
 export default {
   name: 'PhotoVerify',
   name: 'PhotoVerify',
@@ -24,7 +24,7 @@ export default {
 
 
   mixins: [
   mixins: [
     mxFilterList({
     mxFilterList({
-      fetchList: getList // 在下方data再声明一个 fetchList: iGetList 同等效果
+      fetchList: getPage // 在下方data再声明一个 fetchList: iGetList 同等效果
     })
     })
   ],
   ],
 
 
@@ -34,7 +34,7 @@ export default {
         {
         {
           key: 'listPreview',
           key: 'listPreview',
           name: '图片',
           name: '图片',
-          width: '160',
+          width: this.$col.b,
           render: (h, { row }) =>
           render: (h, { row }) =>
             h('img', {
             h('img', {
               style: {
               style: {
@@ -55,19 +55,19 @@ export default {
         {
         {
           key: 'location',
           key: 'location',
           name: '上传位置',
           name: '上传位置',
-          minWidth: '180',
+          minWidth: this.$col.b,
           render: (h, { row }) =>
           render: (h, { row }) =>
             h('span', `${row.kindergartenName}/${row.activityName}`)
             h('span', `${row.kindergartenName}/${row.activityName}`)
         },
         },
         {
         {
           key: 'createAt',
           key: 'createAt',
           name: '上传时间',
           name: '上传时间',
-          width: '140'
+          width: this.$col.b
         },
         },
         {
         {
           key: 'auditStatus',
           key: 'auditStatus',
           name: '状态',
           name: '状态',
-          width: '80',
+          width: this.$col.s,
           type: 'tag',
           type: 'tag',
           fetchTagType: val => {
           fetchTagType: val => {
             switch (val) {
             switch (val) {