朱鑫波 4 лет назад
Родитель
Сommit
efc8e60a0c

+ 168 - 70
src/views/modules/Statistics/components/selectPagination.vue

@@ -6,6 +6,19 @@
 .select-table .ant-table {
   font-size: 12px;
 }
+.demo-infinite-container {
+  border: 1px solid #e8e8e8;
+  border-radius: 4px;
+  overflow: auto;
+  padding: 8px 24px;
+  height: 300px;
+}
+.demo-loading-container {
+  position: absolute;
+  bottom: 40px;
+  width: 100%;
+  text-align: center;
+}
 </style>
 <template>
   <a-form-item
@@ -16,22 +29,34 @@
     style="width:100%"
     class="select-table"
   >
-    <a-input placeholder="请选择项目" @focus=";(topMiddle = true), allData()" v-model="keyValue" @change="getData" />
+    <a-input placeholder="请选择项目" @focus="topMiddle = true" v-model="keyValue" @change="getData" />
     <div
+      v-show="topMiddle"
+      v-infinite-scroll="handleInfiniteOnLoad"
       style="background:white;padding:10px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.15);position:relative;z-index:1000"
-      v-if="topMiddle"
+      class="demo-infinite-container"
+      :infinite-scroll-disabled="busy"
+      :infinite-scroll-distance="80"
     >
-      <a-table
-        :showHeader="false"
-        :columns="columns"
-        :dataSource="data"
-        bordered
-        :pagination="false"
-        :scroll="{ y: 300 }"
-        :customRow="rowClick"
-      >
-        <span slot="mediaId" slot-scope="text">{{ text == '1' ? '头条' : text == '2'? '快手':text == '3'?'头条内广':'快手内广' }}</span>
-      </a-table>
+      <a-list :data-source="data">
+        <a-list-item slot="renderItem" slot-scope="item" @click="showProject(item)">
+          <a-list-item-meta :description="'广告主名称:'+item.advertiserName">
+            <a slot="title">项目名称:{{ item.projectName }}</a>
+          </a-list-item-meta>
+          <div>
+            {{item.mediaId == '1'
+            ? '头条'
+            : item.mediaId == '2'
+            ? '快手'
+            : item.mediaId == '3'
+            ? '头条内广'
+            : '快手内广'}}
+          </div>
+        </a-list-item>
+        <div v-if="loading && !busy" class="demo-loading-container">
+          <a-spin />
+        </div>
+      </a-list>
     </div>
   </a-form-item>
 </template>
@@ -41,6 +66,7 @@ import { getAction, postAction } from '@/api/manage'
 import moment from 'moment'
 import { mapGetters } from 'vuex'
 import jq from 'jquery'
+import infiniteScroll from 'vue-infinite-scroll'
 const clickoutside = {
   // 初始化指令
   bind(el, binding, vnode) {
@@ -64,112 +90,184 @@ const clickoutside = {
     // 解除事件监听
     document.removeEventListener('click', el.__vueClickOutside__)
     delete el.__vueClickOutside__
-  }
-}
-const columns = [
-  {
-    title: '',
-    dataIndex: 'projectName',
-    align: 'center'
   },
-  {
-    title: '',
-    dataIndex: 'mediaId',
-    scopedSlots: { customRender: 'mediaId' },
-    width: 80,
-    align: 'center'
-  },
-
-  {
-    title: '',
-    dataIndex: 'advertiserName',
-    align: 'center'
-  }
-]
+}
 export default {
-  name: 'BaseForm',
+  name: 'select-pagination',
   components: {},
-  directives: { clickoutside },
+  directives: { clickoutside, infiniteScroll },
   props: {
     projectId: {
       type: String,
       default() {
         return ''
-      }
-    }
+      },
+    },
   },
 
   data() {
     return {
+      loading: false,
+      busy: false,
       labelCol: {
         xs: { span: 24 },
-        sm: { span: 5 }
+        sm: { span: 5 },
       },
       wrapperCol: {
         xs: { span: 24 },
-        sm: { span: 12 }
+        sm: { span: 12 },
       },
       selectedRowKeys: [],
       selectedRowKeysValue: [],
       topMiddle: false,
       keyValue: '',
-      columns,
       data: [],
       dataElse: [],
+      ipagination: {
+        current: 0,
+        pageSize: 20,
+      },
       rowClick: (record, index) => ({
         // 事件
         on: {
           click: () => {
-            var str = record.mediaId == '1' ? '头条' : record.mediaId == '2'? '快手':record.mediaId == '3'?'头条内广':'快手内广'
+            var str =
+              record.mediaId == '1'
+                ? '头条'
+                : record.mediaId == '2'
+                ? '快手'
+                : record.mediaId == '3'
+                ? '头条内广'
+                : '快手内广'
             this.keyValue = record.projectName + ' ' + str
             this.topMiddle = false
             this.data = this.dataElse
             this.$emit('update:projectId', record.projectId)
-          }
-        }
-      })
+          },
+        },
+      }),
     }
   },
   computed: {},
   filters: {},
   methods: {
+    showProject(record) {
+      var str =
+        record.mediaId == '1'
+          ? '头条'
+          : record.mediaId == '2'
+          ? '快手'
+          : record.mediaId == '3'
+          ? '头条内广'
+          : '快手内广'
+      this.keyValue = record.projectName
+      this.topMiddle = false
+      this.$emit('update:projectId', record.projectId)
+    },
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     onSelectChange(selectedRowKeys, selectionRows) {
       this.selectedRowKeys = selectedRowKeys
-      this.selectedRowKeysValue = selectionRows.map(item => {
+      this.selectedRowKeysValue = selectionRows.map((item) => {
         return { orientationId: item.orientationId, orientationName: item.orientationName }
       })
     },
     getData() {
-      if (this.keyValue != '') {
-        this.data = this.dataElse.filter(item => {
-          return item.projectName.toLowerCase().indexOf(this.keyValue.toLowerCase()) > -1
-        })
+      if(this.keyValue == ''){
+        this.$emit('update:projectId', "")
       }
-    },
-    handleClose() {
-      this.topMiddle = false
-    },
-    allData() {
-      getAction('/ctop/projectMember/participateList', { userId: this.userInfo().id }).then(res => {
+      this.ipagination.current = 1
+      getAction('/ctop/projectMember/participateListV2', {
+        userId: this.userInfo().id,
+        pageNo:  this.ipagination.current,
+        projectName: this.keyValue,
+      }).then((res) => {
         if (res.code == 0) {
-          this.data = res.result.map((item, index) => {
-            return {
-              ...item,
-              projectId: item.projectId + '',
-              key: index
-            }
-          })
-          this.dataElse = res.result.map((item, index) => {
+          this.data = res.result.records.map((item, index) => {
             return {
               ...item,
               projectId: item.projectId + '',
-              key: index
+              key: index,
             }
           })
+          // this.dataElse = res.result.records.map((item, index) => {
+          //   return {
+          //     ...item,
+          //     projectId: item.projectId + '',
+          //     key: index,
+          //   }
+          // })
         }
       })
-    }
+    },
+    handleClose() {
+      this.topMiddle = false
+    },
+    // allData() {
+    //   getAction('/ctop/projectMember/participateListV2', {
+    //     userId: this.userInfo().id,
+    //     pageSize: this.ipagination.pageSize,
+    //     pageNo: this.ipagination.current,
+    //   }).then((res) => {
+    //     if (res.code == 0) {
+    //       this.data = res.result.records.map((item, index) => {
+    //         return {
+    //           ...item,
+    //           projectId: item.projectId + '',
+    //           key: index,
+    //         }
+    //       })
+    //       this.dataElse = res.result.records.map((item, index) => {
+    //         return {
+    //           ...item,
+    //           projectId: item.projectId + '',
+    //           key: index,
+    //         }
+    //       })
+    //     }
+    //   })
+    // },
+    handleInfiniteOnLoad() {
+      const data = this.data
+      this.loading = true
+      this.ipagination.current++
+      // this.fetchData((res) => {
+      //   this.data = data.concat(res.results)
+      //   this.loading = false
+      // })
+      getAction('/ctop/projectMember/participateListV2', {
+        userId: this.userInfo().id,
+        pageSize: this.ipagination.pageSize,
+        pageNo: this.ipagination.current,
+        projectName: this.keyValue,
+      }).then((res) => {
+        if (res.code == 0) {
+          this.busy = true
+          this.data = data.concat(
+            res.result.records.map((item, index) => {
+              return {
+                ...item,
+                projectId: item.projectId + '',
+              }
+            })
+          )
+
+          // this.data = res.result.records.map((item, index) => {
+          //   return {
+          //     ...item,
+          //     projectId: item.projectId + '',
+          //     key: index,
+          //   }
+          // })
+          // this.dataElse = res.result.records.map((item, index) => {
+          //   return {
+          //     ...item,
+          //     projectId: item.projectId + '',
+          //     key: index,
+          //   }
+          // })
+        }
+      })
+    },
   },
   watch: {
     projectId(n, o) {
@@ -177,11 +275,11 @@ export default {
         this.keyValue = ''
       } else {
       }
-    }
+    },
+  },
+  mounted: function () {
+    this.handleInfiniteOnLoad()
   },
-  mounted: function() {
-    this.allData()
-  }
 }
 </script>
 

+ 174 - 123
src/views/modules/advertiser/ProjectList.vue

@@ -19,11 +19,21 @@
             <a-col :md="6" :sm="8">
               <a-form-item label="运营负责人">
                 <!-- <a-input placeholder="请输入负责人" v-model="queryParam.responsible"></a-input> -->
-                <a-select placeholder="请选择运营负责人" showSearch optionFilterProp="children" style="width: 100%"
-                  :filterOption="filterOption" v-model="queryParam.responsibleId">
-                  <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
-                    :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}
-                  </a-select-option>
+                <a-select
+                  placeholder="请选择运营负责人"
+                  showSearch
+                  optionFilterProp="children"
+                  style="width: 100%"
+                  :filterOption="filterOption"
+                  v-model="queryParam.responsibleId"
+                  @search="search"
+                  @focus="getAllUserList"
+                >
+                  <a-select-option
+                    v-for="appModel in options"
+                    :key="appModel.userId + new Date().getTime()"
+                    :value="appModel.userId"
+                  >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
@@ -32,36 +42,50 @@
             <a-col :md="6" :sm="8">
               <a-form-item label="设计负责人">
                 <!-- <a-input placeholder="请输入负责人" v-model="queryParam.responsible"></a-input> -->
-                <a-select placeholder="请选择设计负责人" showSearch optionFilterProp="children" style="width: 100%"
-                  :filterOption="filterOption" v-model="queryParam.designResponsibleId">
-                  <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
-                    :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}
-                  </a-select-option>
+                <a-select
+                  placeholder="请选择设计负责人"
+                  showSearch
+                  optionFilterProp="children"
+                  style="width: 100%"
+                  :filterOption="filterOption"
+                  v-model="queryParam.designResponsibleId"
+                  @search="search"
+                  @focus="getAllUserList"
+                >
+                  <a-select-option
+                    v-for="appModel in options"
+                    :key="appModel.userId + new Date().getTime()"
+                    :value="appModel.userId"
+                  >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="6">
-            <a-form-item label="行业">
+              <a-form-item label="行业">
                 <j-tree-select
-                    v-model="queryParam.industryId"
-                    ref="treeSelect"
-                    placeholder="请选择行业"
-                    dict="sys_category,name,id"
-                    pidField="pid"
-                    pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76"
-                >
-                </j-tree-select>
-                </a-form-item>
+                  v-model="queryParam.industryId"
+                  ref="treeSelect"
+                  placeholder="请选择行业"
+                  dict="sys_category,name,id"
+                  pidField="pid"
+                  pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76"
+                ></j-tree-select>
+              </a-form-item>
             </a-col>
           </template>
           <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>
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+              >重置</a-button>
               <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
                 {{ toggleSearchStatus ? '收起' : '展开' }}
                 <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
-              </a> -->
+              </a>-->
             </span>
           </a-col>
         </a-row>
@@ -76,8 +100,17 @@
     <!-- table区域-begin -->
     <!-- 供应商 -->
     <div>
-      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
-        :pagination="ipagination" :loading="loading" @change="handleTableChange">
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
         <span slot="maxBid" slot-scope="text">{{ text / 1000 }}</span>
         <span slot="maxDeepCpaBid" slot-scope="text">{{ text / 1000 }}</span>
 
@@ -100,116 +133,134 @@
 </template>
 
 <script>
-  import ProjectModal from './modules/ProjectModal'
-  import JTreeSelect from '@/components/jeecg/JTreeSelect'
-  import {
-    httpAction,
-    getAction
-  } from '@/api/manage'
-  import {
-    JeecgListMixin
-  } from '@/mixins/JeecgListMixin'
+import ProjectModal from './modules/ProjectModal'
+import JTreeSelect from '@/components/jeecg/JTreeSelect'
+import { httpAction, getAction } from '@/api/manage'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 
-  export default {
-    name: 'ProjectList',
-    mixins: [JeecgListMixin],
-    components: {
-      ProjectModal,
-      JTreeSelect
-    },
-    data() {
-      return {
-        description: '项目管理页面',
-        // 表头
-        columns: [{
-            title: '项目名称',
-            align: 'center',
-            dataIndex: 'projectName'
-          },
-          {
-            title: '广告主名称',
-            align: 'center',
-            dataIndex: 'advertiserName'
-          },
-          {
-            title: '行业类型',
-            align: 'center',
-            dataIndex: 'industryId_dictText'
-          },
-          {
-            title: '最高出价',
-            align: 'center',
-            dataIndex: 'maxBid',
-            scopedSlots: {
-              customRender: 'maxBid'
-            }
-          },
-          {
-            title: '最高转化出价',
-            align: 'center',
-            dataIndex: 'maxDeepCpaBid',
-            scopedSlots: {
-              customRender: 'maxDeepCpaBid'
-            }
-          },
-          {
-            title: '供应商',
-            align: 'center',
-            dataIndex: 'supplierCode_dictText'
-          },
-          {
-            title: '销售',
-            align: 'center',
-            dataIndex: 'saleId_dictText'
+export default {
+  name: 'ProjectList',
+  mixins: [JeecgListMixin],
+  components: {
+    ProjectModal,
+    JTreeSelect,
+  },
+  data() {
+    return {
+      description: '项目管理页面',
+      // 表头
+      columns: [
+        {
+          title: '项目名称',
+          align: 'center',
+          dataIndex: 'projectName',
+        },
+        {
+          title: '广告主名称',
+          align: 'center',
+          dataIndex: 'advertiserName',
+        },
+        {
+          title: '行业类型',
+          align: 'center',
+          dataIndex: 'industryId_dictText',
+        },
+        {
+          title: '最高出价',
+          align: 'center',
+          dataIndex: 'maxBid',
+          scopedSlots: {
+            customRender: 'maxBid',
           },
-          {
-            title: '运营负责人',
-            align: 'center',
-            dataIndex: 'responsibleName'
+        },
+        {
+          title: '最高转化出价',
+          align: 'center',
+          dataIndex: 'maxDeepCpaBid',
+          scopedSlots: {
+            customRender: 'maxDeepCpaBid',
           },
-          {
-            title: '设计负责人',
-            align: 'center',
-            dataIndex: 'designResponsibleName'
+        },
+        {
+          title: '供应商',
+          align: 'center',
+          dataIndex: 'supplierCode_dictText',
+        },
+        {
+          title: '销售',
+          align: 'center',
+          dataIndex: 'saleId_dictText',
+        },
+        {
+          title: '运营负责人',
+          align: 'center',
+          dataIndex: 'responsibleName',
+        },
+        {
+          title: '设计负责人',
+          align: 'center',
+          dataIndex: 'designResponsibleName',
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'action',
           },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align: 'center',
-            scopedSlots: {
-              customRender: 'action'
-            }
-          }
-        ],
-        url: {
-          list: '/ctop/project/list',
-          delete: '/ctop/project/delete',
-          deleteBatch: '/ctop/project/deleteBatch',
-          exportXlsUrl: 'ctop/project/exportXls',
-          importExcelUrl: 'ctop/project/importExcel'
         },
-        options: []
-      }
-    },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
-      }
-    },
-    methods: {
-      filterOption(input, option) {
-        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      ],
+      url: {
+        list: '/ctop/project/list',
+        delete: '/ctop/project/delete',
+        deleteBatch: '/ctop/project/deleteBatch',
+        exportXlsUrl: 'ctop/project/exportXls',
+        importExcelUrl: 'ctop/project/importExcel',
       },
+      options: [],
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
     },
-    mounted() {
-      getAction('/sys/user/getAllUserList', '').then(res => {
+  },
+  methods: {
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    getAllUserList(value) {
+      this.options = []
+      getAction('/sys/user/getAllUserList', { pageSize: 50, pageNo: 1, userName: value }).then((res) => {
         if (res.success) {
-          this.options = res.result
+          this.options = res.result.list
         }
       })
     },
-  }
+    search(value) {
+      this.options = []
+      if (value != '') {
+        // this.options = this.list.filter(item => {
+        //   var data = item.realName + ' ' + item.roleName
+        //   return data.toLowerCase().indexOf(value.toLowerCase()) > -1
+        // })
+        // this.options = [...this.options]
+        this.getAllUserList(value)
+      } else {
+        this.getAllUserList()
+      }
+    },
+  },
+  mounted() {
+    this.getAllUserList()
+    // getAction('/sys/user/getAllUserList', { pageSize: 50, pageNo: 1, userName: '' }).then((res) => {
+    //   if (res.success) {
+    //     this.options = res.result.list
+    //   }
+    // })
+  },
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>

+ 16 - 35
src/views/modules/advertiser/ProjectMemberList.vue

@@ -567,16 +567,19 @@
           }
         })
       },
+      getAllUserList(value){
+        getAction('/sys/user/getAllUserList', {pageSize:50,pageNo:1,userName:value}).then(res => {
+          if (res.success) {
+            this.list = res.result.list
+            this.options = res.result.list
+          }
+        })
+      },
       addParams(item) {
         if (this.noTitleKey == 'myProject') {
           this.visibleAdd = true
           this.itemJson = item
-          getAction('/sys/user/getAllUserList', '').then(res => {
-            if (res.success) {
-              this.list = res.result
-              this.options = res.result
-            }
-          })
+          this.getAllUserList()
         } else {
           this.visibleAccount = true
           this.titleAccount = item.projectName
@@ -697,40 +700,18 @@
       },
       handleBlur() {},
       handleFocus() {
-        if (this.appId.length > 0) {
-          this.options = []
-          for (let i = 0; i < this.list.length; i++) {
-            for (let j = 0; j < this.appId.length; j++) {
-              if (this.list[i].userId == this.appId[j]) {
-                this.options.push(this.list[i])
-              }
-            }
-          }
-        } else {
-          this.options = this.list
-        }
       },
       search(value) {
         this.options = []
         if (value != '') {
-          this.options = this.list.filter(item => {
-            var data = item.realName + ' ' + item.roleName
-            return data.toLowerCase().indexOf(value.toLowerCase()) > -1
-          })
-          this.options = [...this.options]
+          // this.options = this.list.filter(item => {
+          //   var data = item.realName + ' ' + item.roleName
+          //   return data.toLowerCase().indexOf(value.toLowerCase()) > -1
+          // })
+          // this.options = [...this.options]
+          this.getAllUserList(value)
         } else {
-          if (this.appId.length > 0) {
-            this.options = []
-            for (let i = 0; i < this.list.length; i++) {
-              for (let j = 0; j < this.appId.length; j++) {
-                if (this.list[i].userId == this.appId[j]) {
-                  this.options.push(this.list[i])
-                }
-              }
-            }
-          } else {
-            this.options = this.list
-          }
+          this.getAllUserList()
         }
       }
     },

+ 378 - 277
src/views/modules/advertiser/UserAllocationList.vue

@@ -6,12 +6,22 @@
         <a-row :gutter="24">
           <a-col :md="8" :sm="8">
             <a-form-item label="账号所属人">
-
-              <a-select placeholder="请选择所属人" showSearch optionFilterProp="children" style="width: 100%"
-                :filterOption="filterOption" v-model="queryParam.userId" v-if="userInfo().username == 'admin'">
-                <a-select-option v-for="appModel in optionsAll" :key="appModel.userId + new Date().getTime()"
-                  :value="appModel.userId">{{ appModel.realName }}
-                </a-select-option>
+              <a-select
+                placeholder="请选择所属人"
+                showSearch
+                optionFilterProp="children"
+                style="width: 100%"
+                :filterOption="filterOption"
+                v-model="queryParam.userId"
+                v-if="userInfo().username == 'admin'"
+                @search="search"
+                @focus="getAllUserList"
+              >
+                <a-select-option
+                  v-for="appModel in optionsAll"
+                  :key="appModel.userId + new Date().getTime()"
+                  :value="appModel.userId"
+                >{{ appModel.realName }}</a-select-option>
               </a-select>
               <a-input placeholder="请输入所属人" v-model="queryParam.userName" v-else></a-input>
             </a-form-item>
@@ -33,12 +43,16 @@
           </a-col>
           <a-col :md="8" :sm="8">
             <a-form-item label="项目名称">
-              <a-select v-model="queryParam.projectId" showSearch optionFilterProp="children"
-                :filterOption="filterOption">
+              <a-select
+                v-model="queryParam.projectId"
+                showSearch
+                optionFilterProp="children"
+                :filterOption="filterOption"
+              >
                 <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
                   {{ item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
-                   }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-                    item.projectName
+                  }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+                  item.projectName
                   }}
                 </a-select-option>
               </a-select>
@@ -52,7 +66,12 @@
           <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>
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+              >重置</a-button>
             </span>
           </a-col>
         </a-row>
@@ -62,12 +81,24 @@
     <br />
     <!-- table区域-begin -->
     <div>
-      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
-        :pagination="ipagination" :loading="loading" @change="handleTableChange">
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
         <span slot="accountStatus" slot-scope="text, record">
           <!-- {{ text == 0 ? '启用' : '禁用' }} -->
 
-          <a-switch v-model="record.accountStatus == 0 ? true : false" @change="onChangeSwitch(record)" />
+          <a-switch
+            v-model="record.accountStatus == 0 ? true : false"
+            @change="onChangeSwitch(record)"
+          />
         </span>
         <span slot="mediaId" slot-scope="text">{{ text == 1 ? '头条' : '快手' }}</span>
         <span slot="action" slot-scope="text, record">
@@ -80,7 +111,11 @@
           <a @click="handleEdit(record)">编辑</a>
 
           <a-divider type="vertical" v-show="roleCode == 'admin'" />
-          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" v-show="roleCode == 'admin'">
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+            v-show="roleCode == 'admin'"
+          >
             <a>删除</a>
           </a-popconfirm>
         </span>
@@ -91,34 +126,72 @@
     <!-- 表单区域 -->
     <userAllocation-modal ref="modalForm" @ok="modalFormOk"></userAllocation-modal>
     <!--  添加项目成员 -->
-    <a-modal title="账户转让" v-model="visibleAdd" @ok="handleOkAdd" :confirmLoading="confirmLoading" :width="800">
+    <a-modal
+      title="账户转让"
+      v-model="visibleAdd"
+      @ok="handleOkAdd"
+      :confirmLoading="confirmLoading"
+      :width="800"
+    >
       <a-form :form="form">
-        <a-form-item label="转户人" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-select v-decorator="['transferor']" showSearch optionFilterProp="children" :filterOption="filterOption"
-            style="width:100%" disabled>
-            <a-select-option :value="item.userId" v-for="(item, index) of options" :key="index">
-              {{ item.realName }}
-            </a-select-option>
+        <a-form-item
+          label="转户人"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-select
+            v-decorator="['transferor']"
+            showSearch
+            optionFilterProp="children"
+            :filterOption="filterOption"
+            style="width:100%"
+            disabled
+          >
+            <a-select-option
+              :value="item.userId"
+              v-for="(item, index) of options"
+              :key="index"
+            >{{ item.realName }}</a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item label="受让人" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-select v-decorator="['assignee', { rules: [{ required: true, message: '请选择受让人' }] }]" placeholder="请选择受让人"
-            showSearch optionFilterProp="children" :filterOption="filterOption" style="width:100%">
-            <a-select-option :value="item.userId" v-for="(item, index) of options" :key="index">
-              {{ item.realName }}
-            </a-select-option>
+        <a-form-item
+          label="受让人"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-select
+            v-decorator="['assignee', { rules: [{ required: true, message: '请选择受让人' }] }]"
+            placeholder="请选择受让人"
+            showSearch
+            optionFilterProp="children"
+            :filterOption="filterOption"
+            style="width:100%"
+          >
+            <a-select-option
+              :value="item.userId"
+              v-for="(item, index) of options"
+              :key="index"
+            >{{ item.realName }}</a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item label="转户人绩效截止日期" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-date-picker v-decorator="['transferorDate', { rules: [{ required: true, message: '请选择转户人绩效截止日期' }] }]" />
+        <a-form-item
+          label="转户人绩效截止日期"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-date-picker
+            v-decorator="['transferorDate', { rules: [{ required: true, message: '请选择转户人绩效截止日期' }] }]"
+          />
           <!-- , { initialValue:moment(new Date(), 'YYYY-MM-DD') } -->
         </a-form-item>
-        <a-form-item label="受让人绩效开始日期" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-date-picker v-decorator="['assigneeDate', { rules: [{ required: true, message: '请选择受让人绩效截止日期' }] }]" />
+        <a-form-item
+          label="受让人绩效开始日期"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-date-picker
+            v-decorator="['assigneeDate', { rules: [{ required: true, message: '请选择受让人绩效截止日期' }] }]"
+          />
         </a-form-item>
         <!-- 
         <a-form-item
@@ -132,30 +205,53 @@
         -->
       </a-form>
     </a-modal>
-    <a-modal title="项目转移" v-model="visibleAccount" @ok="handleOkAccount" :confirmLoading="accountLoading" :width="800">
+    <a-modal
+      title="项目转移"
+      v-model="visibleAccount"
+      @ok="handleOkAccount"
+      :confirmLoading="accountLoading"
+      :width="800"
+    >
       <a-form :form="formAccount">
-        <a-form-item label="原项目" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-select v-decorator="[
+        <a-form-item
+          label="原项目"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-select
+            v-decorator="[
               'projectId', // 给表单赋值或拉取表单时,该input对应的key
               { rules: [{ required: true, message: '请选择项目!' }] }
-            ]" showSearch optionFilterProp="children" :filterOption="filterOption" disabled>
+            ]"
+            showSearch
+            optionFilterProp="children"
+            :filterOption="filterOption"
+            disabled
+          >
             <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
               {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-               item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
+              item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
               }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
             </a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item label="转移项目" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-select v-decorator="[
+        <a-form-item
+          label="转移项目"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-select
+            v-decorator="[
               'projectNewId', // 给表单赋值或拉取表单时,该input对应的key
               { rules: [{ required: true, message: '请选择项目!' }] }
-            ]" showSearch optionFilterProp="children" :filterOption="filterOption">
+            ]"
+            showSearch
+            optionFilterProp="children"
+            :filterOption="filterOption"
+          >
             <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
               {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-               item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
+              item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
               }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
             </a-select-option>
           </a-select>
@@ -176,259 +272,264 @@
 </template>
 
 <script>
-  import UserAllocationModal from './modules/UserAllocationModal'
-  import {
-    JeecgListMixin
-  } from '@/mixins/JeecgListMixin'
-  import {
-    mapGetters
-  } from 'vuex'
-  import {
-    httpAction,
-    getAction,
-    deleteAction
-  } from '@/api/manage'
+import UserAllocationModal from './modules/UserAllocationModal'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { mapGetters } from 'vuex'
+import { httpAction, getAction, deleteAction } from '@/api/manage'
 
-  import treeSelect from './modules/Treeselect'
-  import moment from 'moment'
-  import {
-    postAction
-  } from '../../../api/manage'
-  import qs from 'qs'
-  export default {
-    name: 'UserAllocationList',
-    mixins: [JeecgListMixin],
-    components: {
-      UserAllocationModal,
-      treeSelect
-    },
-    data() {
-      return {
-        description: '账号绑定管理页面',
-        visibleAdd: false,
-        visibleAccount: false,
-        options: [],
-        optionsAll: [],
-        dataElse: [],
-        // 表头
-        columns: [{
-            title: '账号所属人',
-            align: 'center',
-            dataIndex: 'userName'
-          },
-          {
-            title: '授权',
-            align: 'center',
-            dataIndex: 'accountId'
-          },
-          {
-            title: '广告主名称',
-            align: 'center',
-            dataIndex: 'advertiserName'
-          },
-          {
-            title: '项目名称',
-            align: 'center',
-            dataIndex: 'projectName'
-          },
-          //    {
-          //     title: '输入账号  --登陆',
-          //     align:"center",
-          //     dataIndex: 'accountName'
-          //    },
-          {
-            title: '授权名称',
-            align: 'center',
-            dataIndex: 'authName'
-          },
-          {
-            title: '平台类型',
-            align: 'center',
-            dataIndex: 'mediaId',
-            scopedSlots: {
-              customRender: 'mediaId'
-            }
-          },
-          {
-            title: '预警金额',
-            align: 'center',
-            dataIndex: 'warningAmount'
-          },
-          {
-            title: '预警比例',
-            align: 'center',
-            dataIndex: 'warningProportion'
+import treeSelect from './modules/Treeselect'
+import moment from 'moment'
+import { postAction } from '../../../api/manage'
+import qs from 'qs'
+export default {
+  name: 'UserAllocationList',
+  mixins: [JeecgListMixin],
+  components: {
+    UserAllocationModal,
+    treeSelect,
+  },
+  data() {
+    return {
+      description: '账号绑定管理页面',
+      visibleAdd: false,
+      visibleAccount: false,
+      options: [],
+      optionsAll: [],
+      dataElse: [],
+      // 表头
+      columns: [
+        {
+          title: '账号所属人',
+          align: 'center',
+          dataIndex: 'userName',
+        },
+        {
+          title: '授权',
+          align: 'center',
+          dataIndex: 'accountId',
+        },
+        {
+          title: '广告主名称',
+          align: 'center',
+          dataIndex: 'advertiserName',
+        },
+        {
+          title: '项目名称',
+          align: 'center',
+          dataIndex: 'projectName',
+        },
+        //    {
+        //     title: '输入账号  --登陆',
+        //     align:"center",
+        //     dataIndex: 'accountName'
+        //    },
+        {
+          title: '授权名称',
+          align: 'center',
+          dataIndex: 'authName',
+        },
+        {
+          title: '平台类型',
+          align: 'center',
+          dataIndex: 'mediaId',
+          scopedSlots: {
+            customRender: 'mediaId',
           },
-          // accountStatus:0启用;1禁用
-          {
-            title: '账户状态',
-            dataIndex: 'accountStatus',
-            align: 'center',
-            scopedSlots: {
-              customRender: 'accountStatus'
-            }
+        },
+        {
+          title: '预警金额',
+          align: 'center',
+          dataIndex: 'warningAmount',
+        },
+        {
+          title: '预警比例',
+          align: 'center',
+          dataIndex: 'warningProportion',
+        },
+        // accountStatus:0启用;1禁用
+        {
+          title: '账户状态',
+          dataIndex: 'accountStatus',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'accountStatus',
           },
+        },
 
-          {
-            title: '系统名称',
-            dataIndex: 'systemType',
-            align: 'center'
+        {
+          title: '系统名称',
+          dataIndex: 'systemType',
+          align: 'center',
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'action',
           },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align: 'center',
-            scopedSlots: {
-              customRender: 'action'
-            }
-          }
-        ],
-        url: {
-          list: '/ctop/userAllocation/list',
-          delete: '/ctop/userAllocation/delete',
-          deleteBatch: '/ctop/userAllocation/deleteBatch',
-          exportXlsUrl: 'ctop/userAllocation/exportXls',
-          importExcelUrl: 'ctop/userAllocation/importExcel'
         },
-        confirmLoading: false,
-        accountLoading: false,
-        projectId: '',
-        accountId: '',
-        mediaId: '',
-        form: this.$form.createForm(this),
-        formAccount: this.$form.createForm(this),
-        roleCode: localStorage.getItem('roleCode'),
-        dataElse: []
-      }
+      ],
+      url: {
+        list: '/ctop/userAllocation/list',
+        delete: '/ctop/userAllocation/delete',
+        deleteBatch: '/ctop/userAllocation/deleteBatch',
+        exportXlsUrl: 'ctop/userAllocation/exportXls',
+        importExcelUrl: 'ctop/userAllocation/importExcel',
+      },
+      confirmLoading: false,
+      accountLoading: false,
+      projectId: '',
+      accountId: '',
+      mediaId: '',
+      form: this.$form.createForm(this),
+      formAccount: this.$form.createForm(this),
+      roleCode: localStorage.getItem('roleCode'),
+      dataElse: [],
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
     },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+  },
+  mounted() {
+    this.getParticipateList()
+  },
+  methods: {
+    moment,
+    search(value) {
+      this.optionsAll = []
+      if (value != '') {
+        // this.options = this.list.filter(item => {
+        //   var data = item.realName + ' ' + item.roleName
+        //   return data.toLowerCase().indexOf(value.toLowerCase()) > -1
+        // })
+        // this.options = [...this.options]
+        this.getAllUserList(value)
+      } else {
+        this.getAllUserList()
       }
     },
-    mounted() {
-      this.getParticipateList()
-      getAction('/sys/user/getAllUserList', '').then(res => {
+    getAllUserList(value) {
+      getAction('/sys/user/getAllUserList', { pageSize: 50, pageNo: 1, userName: value }).then((res) => {
         if (res.success) {
-          this.optionsAll = res.result
+          this.optionsAll = res.result.list
         }
       })
+    },
+    onChangeSwitch(item) {
+      var params = {}
+      params.id = item.id
+      params.accountStatus = item.accountStatus == 0 ? 1 : 0
 
+      httpAction('/ctop/userAllocation/edit', params, 'put').then((res) => {
+        if (res.success) {
+          this.loadData()
+        }
+      })
     },
-    methods: {
-      moment,
-      onChangeSwitch(item) {
-        var params = {}
-        params.id = item.id
-        params.accountStatus = item.accountStatus == 0 ? 1 : 0
+    getParticipateList() {
+      getAction('/ctop/projectMember/participateList', {
+        userId: this.userInfo().id,
+      }).then((res) => {
+        if (res.code == 0) {
+          this.dataElse = res.result
+        }
+      })
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    getALLperson() {
+      getAction('/sys/user/getAllUserListByCompany', {
+        userId: this.userInfo().id,
+      }).then((res) => {
+        if (res.success) {
+          this.options = res.result
+        }
+      })
+    },
+    project(item) {
+      this.visibleAdd = true
+      this.accountId = item.accountId
+      this.projectId = item.projectId
 
-        httpAction('/ctop/userAllocation/edit', params, 'put').then(res => {
-          if (res.success) {
-            this.loadData()
-          }
-        })
-      },
-      getParticipateList() {
-        getAction('/ctop/projectMember/participateList', {
-          userId: this.userInfo().id
-        }).then(res => {
-          if (res.code == 0) {
-            this.dataElse = res.result
-          }
+      setTimeout(() => {
+        this.form.setFieldsValue({
+          transferor: item.userId,
         })
-      },
-      filterOption(input, option) {
-        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      },
-      ...mapGetters(['nickname', 'avatar', 'userInfo']),
-      getALLperson() {
-        getAction('/sys/user/getAllUserListByCompany', {
-          userId: this.userInfo().id
-        }).then(res => {
-          if (res.success) {
-            this.options = res.result
-          }
+      }, 0)
+      this.getALLperson()
+    },
+    account(item) {
+      this.visibleAccount = true
+      this.accountId = item.accountId
+      this.projectId = item.projectId
+
+      setTimeout(() => {
+        this.formAccount.setFieldsValue({
+          projectId: item.projectId,
         })
-      },
-      project(item) {
-        this.visibleAdd = true
-        this.accountId = item.accountId
-        this.projectId = item.projectId
+      }, 0)
+    },
+    handleOkAccount(e) {
+      this.accountLoading = true
 
-        setTimeout(() => {
-          this.form.setFieldsValue({
-            transferor: item.userId
+      this.formAccount.validateFieldsAndScroll((err, values) => {
+        if (err) {
+          // 这里做逻辑处理
+        } else {
+          var params = qs.stringify({
+            projectId: values.projectNewId,
+            accountId: this.accountId,
           })
-        }, 0)
-        this.getALLperson()
-      },
-      account(item) {
-        this.visibleAccount = true
-        this.accountId = item.accountId
-        this.projectId = item.projectId
-
-        setTimeout(() => {
-          this.formAccount.setFieldsValue({
-            projectId: item.projectId
+          postAction('/ctop/projectTransferRecord/add', params).then((res) => {
+            if (res.success) {
+              this.accountLoading = false
+              this.visibleAccount = false
+              this.formAccount.resetFields()
+              this.loadData()
+            } else {
+              this.$message.error(res.message)
+            }
           })
-        }, 0)
-      },
-      handleOkAccount(e) {
-        this.accountLoading = true
+        }
+      })
+    },
+    handleOkAdd(e) {
+      this.confirmLoading = true
 
-        this.formAccount.validateFieldsAndScroll((err, values) => {
-          if (err) {
-            // 这里做逻辑处理
-          } else {
-            var params = qs.stringify({
-              projectId: values.projectNewId,
-              accountId: this.accountId
-            })
-            postAction('/ctop/projectTransferRecord/add', params).then(res => {
-              if (res.success) {
-                this.accountLoading = false
-                this.visibleAccount = false
-                this.formAccount.resetFields()
-                this.loadData()
-              } else {
-                this.$message.error(res.message)
-              }
-            })
+      this.form.validateFieldsAndScroll((err, values) => {
+        if (err) {
+          // 这里做逻辑处理
+        } else {
+          var params = {
+            ...values,
           }
-        })
-      },
-      handleOkAdd(e) {
-        this.confirmLoading = true
-
-        this.form.validateFieldsAndScroll((err, values) => {
-          if (err) {
-            // 这里做逻辑处理
-          } else {
-            var params = {
-              ...values
+          params.transferorDate = moment(values.transferorDate).format('YYYY-MM-DD')
+          params.assigneeDate = moment(values.assigneeDate)
+            // .add(1, 'day')
+            .format('YYYY-MM-DD')
+          params.projectId = this.projectId
+          params.accountId = this.accountId
+          params.status = 0
+          postAction('/ctop/transferAccount/add', params).then((res) => {
+            if (res.success) {
+              this.confirmLoading = false
+              this.visibleAdd = false
+              this.form.resetFields()
+            } else {
+              this.$message.error(res.message)
             }
-            params.transferorDate = moment(values.transferorDate).format('YYYY-MM-DD')
-            params.assigneeDate = moment(values.assigneeDate)
-              // .add(1, 'day')
-              .format('YYYY-MM-DD')
-            params.projectId = this.projectId
-            params.accountId = this.accountId
-            params.status = 0
-            postAction('/ctop/transferAccount/add', params).then(res => {
-              if (res.success) {
-                this.confirmLoading = false
-                this.visibleAdd = false
-                this.form.resetFields()
-              } else {
-                this.$message.error(res.message)
-              }
-            })
-          }
-        })
-      }
-    }
-  }
+          })
+        }
+      })
+    },
+  },
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>

+ 1 - 1
src/views/modules/advertiser/modules/ProjectModal.vue

@@ -260,7 +260,7 @@ export default {
         )
         // this.resId = record.responsibleId
         // this.shejiId = record.designResponsibleId
-        getAction('/sys/user/getAllUserList', '').then(res => {
+        getAction('/sys/user/getAllUserListV1', '').then(res => {
           console.log(res)
           if (res.success) {
             this.options = res.result

+ 1 - 1
src/views/modules/kuaishouapp/account/editGroupNew.vue

@@ -830,7 +830,7 @@
                   bid: item.bid != '' ? item.bid * 1000 : '',
                   deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
                   ocpxActionType: item.bidType,
-                  bidType: item.bidType == 1 ? 2 : 6
+                  bidType: item.bidType == 1 ? 2 : 10
                 }
               })[0]
               console.log(groupArrTwo)

+ 214 - 207
src/views/modules/material/labelMaterial.vue

@@ -32,7 +32,12 @@
           <a-col :md="6" :sm="6">
             <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>
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+              >重置</a-button>
             </span>
           </a-col>
         </a-row>
@@ -42,24 +47,26 @@
     <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
       <!-- <a-button @click="batchDel" v-if="selectedRowKeys.length > 0" ghost type="primary" icon="delete">批量删除
-      </a-button> -->
+      </a-button>-->
     </div>
 
     <!-- table区域-begin -->
     <div>
-
-      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
-        :pagination="ipagination" :loading="loading" @change="handleTableChange">
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
         <span slot="tagName" slot-scope="text,record">
-          <span v-if="record.status == 1">
-            {{text}}
-          </span>
-          <span v-else-if="record.status == 0" style="color:red">
-            {{text}}(未审核)
-          </span>
-          <span v-else>
-            {{text}}(已驳回)
-          </span>
+          <span v-if="record.status == 1">{{text}}</span>
+          <span v-else-if="record.status == 0" style="color:red">{{text}}(未审核)</span>
+          <span v-else>{{text}}(已驳回)</span>
         </span>
         <span slot="action" slot-scope="text, record">
           <a href="javascript:;" @click="handleAddSub(record)" :disabled="record.level==3">添加下级</a>
@@ -67,26 +74,29 @@
           <a @click="handleDeleteModel(record)" :disabled="!IsURL(record.model)">查看示例</a>
           <a-divider type="vertical" />
           <a-dropdown>
-            <a class="ant-dropdown-link" @click="e => e.preventDefault()">
-              更多
-            </a>
+            <a class="ant-dropdown-link" @click="e => e.preventDefault()">更多</a>
             <a-menu slot="overlay">
               <!-- <a-menu-item key="4" :disabled="!IsURL(record.model)">
                 <a style="margin-right:20px" @click="handleDeleteModel(record)">查看示例</a>
-              </a-menu-item> -->
+              </a-menu-item>-->
               <a-menu-item key="0">
                 <a-popconfirm title="确定删除吗?" @confirm="() => handleDeleteElse(record.id)">
                   <a>删除</a>
                 </a-popconfirm>
               </a-menu-item>
               <a-menu-item key="1" :disabled="record.status==1">
-                <a href="javascript:;" @click="handleDeleteStatus(record.id,'1')" :disabled="record.status==1">
-                  通过</a>
+                <a
+                  href="javascript:;"
+                  @click="handleDeleteStatus(record.id,'1')"
+                  :disabled="record.status==1"
+                >通过</a>
               </a-menu-item>
               <a-menu-item key="3" :disabled="record.status==1">
-                <a style="margin-right:20px" @click="handleDeleteStatus(record.id,'2')"
-                  :disabled="record.status==1">驳回</a>
-
+                <a
+                  style="margin-right:20px"
+                  @click="handleDeleteStatus(record.id,'2')"
+                  :disabled="record.status==1"
+                >驳回</a>
               </a-menu-item>
             </a-menu>
           </a-dropdown>
@@ -98,47 +108,37 @@
           <span v-else>-</span>
         </span>
       </a-table>
-
     </div>
     <!-- table区域-end -->
 
     <permission-modal ref="modalForm" @ok="modalFormOk"></permission-modal>
-
   </a-card>
 </template>
 
 <script>
-  import PermissionModal from './modules/DepartModal'
-  import {
-    getPermissionList
-  } from '@/api/api'
-  import {
-    httpAction,
-    deleteAction,
-    getAction
-  } from '@/api/manage'
-  import {
-    JeecgListMixin
-  } from '@/mixins/JeecgListMixin'
-  //   import PermissionDataRuleList from './PermissionDataRuleList'
-  import JEllipsis from '@/components/jeecg/JEllipsis'
-  import selectPagination from '@/views/modules/Statistics/components/selectPagination.vue'
-  const columns = [{
-      title: "标签分类",
-      dataIndex: "tagCategoryId_dictText",
-      key: 'tagCategoryId_dictText',
-      align: 'center'
-    },
-    {
-      title: '标签名称',
-      dataIndex: 'tagName',
-      key: 'tagName',
-      align: 'center',
-      scopedSlots: {
-        customRender: 'tagName'
-      },
+import PermissionModal from './modules/DepartModal'
+import { getPermissionList } from '@/api/api'
+import { httpAction, deleteAction, getAction } from '@/api/manage'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+//   import PermissionDataRuleList from './PermissionDataRuleList'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+const columns = [
+  {
+    title: '标签分类',
+    dataIndex: 'tagCategoryId_dictText',
+    key: 'tagCategoryId_dictText',
+    align: 'center',
+  },
+  {
+    title: '标签名称',
+    dataIndex: 'tagName',
+    key: 'tagName',
+    align: 'center',
+    scopedSlots: {
+      customRender: 'tagName',
     },
-    /*{
+  },
+  /*{
          title: '菜单类型',
          dataIndex: 'menuType',
          key: 'menuType',
@@ -154,170 +154,177 @@
            }
          }
        },*/
-    {
-      title: '标签层级',
-      dataIndex: 'level',
-      key: 'level',
-      customRender: function (text) {
-        if (text == 1) {
-          return '一级标签'
-        } else if (text == 2) {
-          return '二级标签'
-        } else if (text == 3) {
-          return '三级标签'
-        }
-      },
-      align: 'center'
-    }, {
-      title: '所属一级标签',
-      dataIndex: 'firstTagId_dictText',
-      key: 'firstTagId_dictText',
-      customRender: function (text) {
-        if (text == null) {
-          return '-'
-        } else {
-          return text
-        }
-      },
-      align: 'center'
+  {
+    title: '标签层级',
+    dataIndex: 'level',
+    key: 'level',
+    customRender: function (text) {
+      if (text == 1) {
+        return '一级标签'
+      } else if (text == 2) {
+        return '二级标签'
+      } else if (text == 3) {
+        return '三级标签'
+      }
     },
-    {
-      title: '所属二级标签',
-      dataIndex: 'secendTagId_dictText',
-      key: 'secendTagId_dictText',
-      customRender: function (text) {
-        if (text == null) {
-          return '-'
-        } else {
-          return text
-        }
-      },
-      align: 'center'
+    align: 'center',
+  },
+  {
+    title: '所属一级标签',
+    dataIndex: 'firstTagId_dictText',
+    key: 'firstTagId_dictText',
+    customRender: function (text) {
+      if (text == null) {
+        return '-'
+      } else {
+        return text
+      }
     },
-    {
-      title: '描述',
-      dataIndex: 'description',
-      key: 'description',
-      customRender: function (text) {
-        if (text == null) {
-          return '-'
-        } else {
-          return text
-        }
-      },
-      align: 'center',
-      width: 400
+    align: 'center',
+  },
+  {
+    title: '所属二级标签',
+    dataIndex: 'secendTagId_dictText',
+    key: 'secendTagId_dictText',
+    customRender: function (text) {
+      if (text == null) {
+        return '-'
+      } else {
+        return text
+      }
     },
-    // {
-    //   title: '标签示例',
-    //   dataIndex: 'model',
-    //   key: 'model',
-    //   scopedSlots: {
-    //     customRender: 'model'
-    //   },
-    //   //   customRender: function (text) {
-    //   //     if (text == null) {
-    //   //       return '-'
-    //   //     } else {
-    //   //       return text
-    //   //     }
-    //   //   },
-    //   align: 'center',
-    //   width: 200
-    // },
-    {
-      title: '操作',
-      dataIndex: 'action',
-      scopedSlots: {
-        customRender: 'action'
+    align: 'center',
+  },
+  {
+    title: '描述',
+    dataIndex: 'description',
+    key: 'description',
+    customRender: function (text) {
+      if (text == null) {
+        return '-'
+      } else {
+        return text
+      }
+    },
+    align: 'center',
+    width: 400,
+  },
+  // {
+  //   title: '标签示例',
+  //   dataIndex: 'model',
+  //   key: 'model',
+  //   scopedSlots: {
+  //     customRender: 'model'
+  //   },
+  //   //   customRender: function (text) {
+  //   //     if (text == null) {
+  //   //       return '-'
+  //   //     } else {
+  //   //       return text
+  //   //     }
+  //   //   },
+  //   align: 'center',
+  //   width: 200
+  // },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    scopedSlots: {
+      customRender: 'action',
+    },
+    align: 'center',
+    width: 250,
+  },
+]
+export default {
+  name: 'label-material',
+  mixins: [JeecgListMixin],
+  components: {
+    PermissionModal,
+    JEllipsis
+  },
+  data() {
+    return {
+      description: '标签管理',
+      // 表头
+      columns: columns,
+      loading: false,
+      // 展开的行,受控属性
+      expandedRowKeys: [],
+      url: {
+        list: '/ctop/tagInfo/list',
+        delete: '/ctop/tagInfo/edit',
+        deleteBatch: '/sys/permission/deleteBatch',
       },
-      align: 'center',
-      width: 250
     }
-  ]
-  export default {
-    name: 'label-material',
-    mixins: [JeecgListMixin],
-    components: {
-      PermissionModal,
-      JEllipsis,
+  },
+  methods: {
+    IsURL(res) {
+      //   var strRegex = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/|www\.)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/
+      var strRegex = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+(.+[A-Za-z0-9-~\/])+$/
+      var re = new RegExp(strRegex)
+      // console.log(re.test(res))
+      if (re.test(res)) {
+        return true
+      } else {
+        return false
+      }
     },
-    data() {
-      return {
-        description: '标签管理',
-        // 表头
-        columns: columns,
-        loading: false,
-        // 展开的行,受控属性
-        expandedRowKeys: [],
-        url: {
-          list: '/ctop/tagInfo/list',
-          delete: '/ctop/tagInfo/edit',
-          deleteBatch: '/sys/permission/deleteBatch'
+    handleDeleteModel(record) {
+      if (record.model) {
+        if (this.IsURL(record.model)) {
+          window.open(record.model, '_blank')
         }
       }
     },
-    methods: {
-      IsURL(res) {
-        //   var strRegex = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/|www\.)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/
-        var strRegex =
-          /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+(.+[A-Za-z0-9-~\/])+$/
-        var re = new RegExp(strRegex)
-        // console.log(re.test(res))
-        if (re.test(res)) {
-          return true
+    handleDeleteStatus(id, status) {
+      httpAction(
+        '/ctop/tagInfo/edit',
+        {
+          id: id,
+          status: status,
+        },
+        'post'
+      ).then((res) => {
+        if (res.success) {
+          //删除成功后,去除已选中中的数据
+          this.loadData(1)
         } else {
-          return false
-        }
-      },
-      handleDeleteModel(record) {
-        if (record.model) {
-          if (this.IsURL(record.model)) {
-            window.open(record.model, '_blank')
-          }
-
+          this.$message.warning(res.message)
         }
-      },
-      handleDeleteStatus(id, status) {
-        httpAction('/ctop/tagInfo/edit', {
-          id: id,
-          status: status
-        }, 'post').then(res => {
-          if (res.success) {
-            //删除成功后,去除已选中中的数据
-            this.loadData(1)
-          } else {
-            this.$message.warning(res.message)
-          }
-        })
-      },
-      handleDeleteElse(id) {
-        httpAction('/ctop/tagInfo/edit', {
+      })
+    },
+    handleDeleteElse(id) {
+      httpAction(
+        '/ctop/tagInfo/edit',
+        {
           id: id,
-          delFlag: 1
-        }, 'post').then(res => {
-          if (res.success) {
-            //删除成功后,去除已选中中的数据
-            this.loadData(1)
-          } else {
-            this.$message.warning('删除失败!')
-          }
-        })
-      },
-      handleAddSub(record) {
-        this.$refs.modalForm.title = "添加子标签";
-        this.$refs.modalForm.edit({
-          status: '1',
-          'parentId': record.id,
-          tagCategoryId: record.tagCategoryId
-        });
-      },
-      handleExpandedRowsChange(expandedRows) {
-        this.expandedRowKeys = expandedRows
-      },
-    }
-  }
+          delFlag: 1,
+        },
+        'post'
+      ).then((res) => {
+        if (res.success) {
+          //删除成功后,去除已选中中的数据
+          this.loadData(1)
+        } else {
+          this.$message.warning('删除失败!')
+        }
+      })
+    },
+    handleAddSub(record) {
+      this.$refs.modalForm.title = '添加子标签'
+      this.$refs.modalForm.edit({
+        status: '1',
+        parentId: record.id,
+        tagCategoryId: record.tagCategoryId,
+      })
+    },
+    handleExpandedRowsChange(expandedRows) {
+      this.expandedRowKeys = expandedRows
+    },
+  },
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>

+ 1 - 7
src/views/modules/material/modules/videoList.vue

@@ -99,7 +99,6 @@
           }
         ],
         url: {},
-        options: []
       }
     },
     computed: {
@@ -113,12 +112,7 @@
       },
     },
     mounted() {
-      getAction('/sys/user/getAllUserList', '').then(res => {
-        console.log(res)
-        if (res.success) {
-          this.options = res.result
-        }
-      })
+  
     },
   }
 </script>

+ 361 - 290
src/views/modules/material/scriptFile.vue

@@ -1,7 +1,7 @@
 <style>
-  #wps-iframe {
-    height: 100%
-  }
+#wps-iframe {
+  height: 100%;
+}
 </style>
 <template>
   <a-card :bordered="false">
@@ -20,28 +20,53 @@
           <a-col :md="6" :sm="8">
             <a-form-item label="创建人">
               <!-- <a-input placeholder="请输入创建人" v-model="queryParam.creator_dictText"></a-input> -->
-              <a-select v-model="queryParam.creator" showSearch allowClear placeholder="请选择创建人"
-                optionFilterProp="children" style="width: 100%" :filterOption="true">
-                <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
-                  :value="appModel.userId">
+              <a-select
+                v-model="queryParam.creator"
+                showSearch
+                allowClear
+                placeholder="请选择创建人"
+                optionFilterProp="children"
+                style="width: 100%"
+                :filterOption="true"
+                @search="search"
+                @focus="getAllUserList"
+              >
+                <a-select-option
+                  v-for="appModel in options"
+                  :key="appModel.userId + new Date().getTime()"
+                  :value="appModel.userId"
+                >
                   {{ appModel.realName }}
-                  &#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+                  &#12288;&#12288;{{ appModel.roleName }}
+                </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>
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+              >重置</a-button>
             </span>
           </a-col>
-
         </a-row>
       </a-form>
     </div>
     <div style="float:right;margin:0 0 20px 20px">
-      <a-upload name="file" :multiple="false" :action="uploadAction" :headers="tokenHeader" :showUploadList="false"
-        :beforeUpload="beforeUpload" @change="handleChange" style="margin-right:20px">
+      <a-upload
+        name="file"
+        :multiple="false"
+        :action="uploadAction"
+        :headers="tokenHeader"
+        :showUploadList="false"
+        :beforeUpload="beforeUpload"
+        @change="handleChange"
+        style="margin-right:20px"
+      >
         <a-button :disabled="loadingElse">
           <a-icon type="upload" />
           {{loadingElse?'上传中,请稍后':'文件上传'}}
@@ -51,13 +76,16 @@
         <a-button>新增</a-button>
         <a-menu slot="overlay">
           <a-menu-item>
-            <a-icon type="file-word" /><span style="text-align: center" @click="creatWps('word')">文字文档</span>
+            <a-icon type="file-word" />
+            <span style="text-align: center" @click="creatWps('word')">文字文档</span>
           </a-menu-item>
           <a-menu-item>
-            <a-icon type="file-excel" /><span style="text-align: center" @click="creatWps('excel')">表格文档</span>
+            <a-icon type="file-excel" />
+            <span style="text-align: center" @click="creatWps('excel')">表格文档</span>
           </a-menu-item>
           <a-menu-item>
-            <a-icon type="file-ppt" /><span style="text-align: center" @click="creatWps('ppt')">演示文档</span>
+            <a-icon type="file-ppt" />
+            <span style="text-align: center" @click="creatWps('ppt')">演示文档</span>
           </a-menu-item>
 
           <!-- <a-menu-item>
@@ -68,14 +96,23 @@
           </a-menu-item>
           <a-menu-item>
             <a target="_blank" rel="noopener noreferrer" href="http://www.tmall.com/">3rd menu item</a>
-          </a-menu-item> -->
+          </a-menu-item>-->
         </a-menu>
       </a-dropdown>
     </div>
     <div style="clear:both"></div>
     <div>
-      <a-table ref="table" size="middle" bordered rowKey="name" :columns="columns" :dataSource="dataSource"
-        :pagination="ipagination" :loading="loading" @change="handleTableChange">
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="name"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
         <span slot="modifyTime" slot-scope="text">{{text|getDate}}</span>
         <span slot="size" slot-scope="text">{{text|sizeShow}}</span>
         <span slot="projectId_dictText" slot-scope="text">{{text?text:'-'}}</span>
@@ -90,26 +127,32 @@
             <a>删除</a>
           </a-popconfirm>
         </span>
-
       </a-table>
     </div>
     <!-- <div id="show"></div> -->
-    <a-modal :maskClosable="false" :title="type=='add'?'脚本新建':'脚本编辑'" v-model="visibleBind" :width="1200"
-      :footer="null">
-
+    <a-modal
+      :maskClosable="false"
+      :title="type=='add'?'脚本新建':'脚本编辑'"
+      v-model="visibleBind"
+      :width="1200"
+      :footer="null"
+    >
       <iframe :src="src" frameborder="0" style="width:100%;height:600px" v-if="type=='add'"></iframe>
       <div id="showWps" style="height:600px" v-show="type=='edit'"></div>
-
-
     </a-modal>
     <a-modal :maskClosable="false" title="绑定项目" v-model="visibleProject" @ok="handleOk">
       <span>项目选择:</span>
-      <a-select v-model="projectId" showSearch style="width:300px" optionFilterProp="children"
-        :filterOption="filterOption">
+      <a-select
+        v-model="projectId"
+        showSearch
+        style="width:300px"
+        optionFilterProp="children"
+        :filterOption="filterOption"
+      >
         <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
           {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-                item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
-              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
+          item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
+          }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
         </a-select-option>
       </a-select>
     </a-modal>
@@ -117,296 +160,324 @@
 
     <!-- 表单区域 -->
     <wpsFile-modal ref="modalForm" @ok="modalFormOk"></wpsFile-modal>
-
   </a-card>
 </template>
 
 <script>
-  import {
-    getAction,
-    postAction,
-    postFile,
-    deleteAction,
-    putAction
-  } from '@/api/manage'
-  import selectTable from '@/views/modules/Statistics/components/selecTable.vue'
-  import WpsFileModal from './modules/WpsFileModal'
-  import {
-    mapGetters
-  } from 'vuex'
-  import {
-    JeecgListMixin
-  } from '@/mixins/JeecgListMixin'
-  import qs from 'qs';
-  const fileSuffix = [
-    'xls', 'xlt', 'et', 'xlsx', 'xltx', 'csv', 'xlsm', 'xltm',
-    'doc', 'dot', 'wps', 'wpt', 'docx', 'dotx', 'docm', 'dotm',
-    'ppt', 'pptx', 'pptm', 'ppsx', 'ppsm', 'pps', 'potx', 'potm', 'dpt', 'dps',
-    'pdf'
-  ];
-  export default {
-    name: "WpsFileList",
-    mixins: [JeecgListMixin],
-    components: {
-      WpsFileModal,
-      selectTable
-    },
-    data() {
-      return {
-        description: 'wps文件管理页面',
-        dataElse: [],
-        projectId: '',
-        visibleProject: false,
-        // 表头
-        visibleBind: false,
-        wpsType: 'word',
-        type: "add",
-        uploadAction: "http://api.tjyourong.com.cn/jeecg-boot/ctop/wpsFile/uploadFile",
-        columns: [{
-            title: '脚本名称',
-            align: "center",
-            dataIndex: 'name'
-          },
-          {
-            title: '文件大小(KB)',
-            align: "center",
-            dataIndex: 'size',
-            scopedSlots: {
-              customRender: 'size'
-            },
+import { getAction, postAction, postFile, deleteAction, putAction } from '@/api/manage'
+import selectTable from '@/views/modules/Statistics/components/selectPagination.vue'
+import WpsFileModal from './modules/WpsFileModal'
+import { mapGetters } from 'vuex'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import qs from 'qs'
+const fileSuffix = [
+  'xls',
+  'xlt',
+  'et',
+  'xlsx',
+  'xltx',
+  'csv',
+  'xlsm',
+  'xltm',
+  'doc',
+  'dot',
+  'wps',
+  'wpt',
+  'docx',
+  'dotx',
+  'docm',
+  'dotm',
+  'ppt',
+  'pptx',
+  'pptm',
+  'ppsx',
+  'ppsm',
+  'pps',
+  'potx',
+  'potm',
+  'dpt',
+  'dps',
+  'pdf',
+]
+export default {
+  name: 'WpsFileList',
+  mixins: [JeecgListMixin],
+  components: {
+    WpsFileModal,
+    selectTable,
+  },
+  data() {
+    return {
+      description: 'wps文件管理页面',
+      dataElse: [],
+      projectId: '',
+      visibleProject: false,
+      // 表头
+      visibleBind: false,
+      wpsType: 'word',
+      type: 'add',
+      uploadAction: 'http://api.tjyourong.com.cn/jeecg-boot/ctop/wpsFile/uploadFile',
+      columns: [
+        {
+          title: '脚本名称',
+          align: 'center',
+          dataIndex: 'name',
+        },
+        {
+          title: '文件大小(KB)',
+          align: 'center',
+          dataIndex: 'size',
+          scopedSlots: {
+            customRender: 'size',
           },
-          {
-            title: '绑定项目',
-            align: "center",
-            dataIndex: 'projectId_dictText',
-            scopedSlots: {
-              customRender: 'projectId_dictText'
-            },
+        },
+        {
+          title: '绑定项目',
+          align: 'center',
+          dataIndex: 'projectId_dictText',
+          scopedSlots: {
+            customRender: 'projectId_dictText',
           },
-          {
-            title: '创建人',
-            align: "center",
-            dataIndex: 'creator_dictText'
+        },
+        {
+          title: '创建人',
+          align: 'center',
+          dataIndex: 'creator_dictText',
+        },
+        {
+          title: '发布时间',
+          align: 'center',
+          dataIndex: 'modifyTime',
+          scopedSlots: {
+            customRender: 'modifyTime',
           },
-          {
-            title: '发布时间',
-            align: "center",
-            dataIndex: 'modifyTime',
-            scopedSlots: {
-              customRender: 'modifyTime'
-            },
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'action',
           },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align: "center",
-            scopedSlots: {
-              customRender: 'action'
-            },
-          }
-        ],
-        url: {
-          list: "/ctop/wpsFile/list",
-          delete: "/ctop/wpsFile/delete",
-          deleteBatch: "/ctop/wpsFile/deleteBatch",
-          exportXlsUrl: "ctop/wpsFile/exportXls",
-          importExcelUrl: "ctop/wpsFile/importExcel",
         },
-        src: "",
-        loadingElse: false,
-        fileId: '',
-        loadingOk: false,
-        options: []
-      }
+      ],
+      url: {
+        list: '/ctop/wpsFile/list',
+        delete: '/ctop/wpsFile/delete',
+        deleteBatch: '/ctop/wpsFile/deleteBatch',
+        exportXlsUrl: 'ctop/wpsFile/exportXls',
+        importExcelUrl: 'ctop/wpsFile/importExcel',
+      },
+      src: '',
+      loadingElse: false,
+      fileId: '',
+      loadingOk: false,
+      options: [],
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
     },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+  },
+  watch: {
+    visibleBind(n, o) {
+      if (!n) {
+        this.src = ''
+        this.loadData(1)
       }
     },
-    watch: {
-      visibleBind(n, o) {
-        if (!n) {
-          this.src = ''
-          this.loadData(1)
-        }
-      }
+  },
+  filters: {
+    getDate(value) {
+      let date = new Date(value)
+      let y = date.getFullYear()
+      let MM = date.getMonth() + 1
+      MM = MM < 10 ? '0' + MM : MM
+      let d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      return y + '-' + MM + '-' + d
     },
-    filters: {
-      getDate(value) {
-        let date = new Date(value)
-        let y = date.getFullYear()
-        let MM = date.getMonth() + 1
-        MM = MM < 10 ? '0' + MM : MM
-        let d = date.getDate()
-        d = d < 10 ? '0' + d : d
-        return y + '-' + MM + '-' + d
-      },
-      sizeShow(value) {
-        return (value / 1024).toFixed(2)
+    sizeShow(value) {
+      return (value / 1024).toFixed(2)
+    },
+  },
+  mounted() {
+    this.getParticipateList()
+    // getAction('/sys/user/getAllUserList', '').then((res) => {
+    //   if (res.success) {
+    //     this.options = res.result
+    //   }
+    // })
+  },
+  methods: {
+    search(value) {
+      this.options = []
+      if (value != '') {
+        // this.options = this.list.filter(item => {
+        //   var data = item.realName + ' ' + item.roleName
+        //   return data.toLowerCase().indexOf(value.toLowerCase()) > -1
+        // })
+        // this.options = [...this.options]
+        this.getAllUserList(value)
+      } else {
+        this.getAllUserList()
       }
     },
-    mounted() {
-      this.getParticipateList()
-      getAction('/sys/user/getAllUserList', '').then(res => {
+    getAllUserList(value) {
+      getAction('/sys/user/getAllUserList', { pageSize: 50, pageNo: 1, userName: value }).then((res) => {
         if (res.success) {
-          this.options = res.result
+          this.options = res.result.list
+        }
+      })
+    },
+    downLoad(item) {
+      let downloadElement = document.createElement('a')
+      downloadElement.href = item.downloadUrl
+      downloadElement.download = item.name //下载后文件名
+      document.body.appendChild(downloadElement)
+      downloadElement.click() //点击下载
+      document.body.removeChild(downloadElement) //下载完成移除元素
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    getParticipateList() {
+      getAction('/ctop/projectMember/participateList', {
+        userId: this.userInfo().id,
+      }).then((res) => {
+        if (res.code == 0) {
+          this.dataElse = res.result
         }
       })
     },
-    methods: {
-      downLoad(item) {
-        let downloadElement = document.createElement('a')
-        downloadElement.href = item.downloadUrl
-        downloadElement.download = item.name //下载后文件名
-        document.body.appendChild(downloadElement)
-        downloadElement.click() //点击下载
-        document.body.removeChild(downloadElement) //下载完成移除元素
+    beforeUpload(file) {
+      this.loadingElse = true
+      const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
+      const fileName = file.name
+      const fileStrArr = fileName.split('.')
+      const suffix = fileStrArr[fileStrArr.length - 1]
 
-      },
-      filterOption(input, option) {
-        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      },
-      ...mapGetters(['nickname', 'avatar', 'userInfo']),
-      getParticipateList() {
-        getAction('/ctop/projectMember/participateList', {
-          userId: this.userInfo().id
-        }).then(res => {
-          if (res.code == 0) {
-            this.dataElse = res.result
-          }
-        })
-      },
-      beforeUpload(file) {
-        this.loadingElse = true
-        const size = (Number(file.size) / (1024 * 1024)).toFixed(2);
-        const fileName = file.name;
-        const fileStrArr = fileName.split(".");
-        const suffix = fileStrArr[fileStrArr.length - 1];
+      let result = fileSuffix.some((item) => {
+        return item === suffix
+      })
 
-        let result = fileSuffix.some((item) => {
-          return item === suffix
-        });
+      if (!result) {
+        this.$message.error('不支持该文件类型')
+        this.loadingElse = false
+        return false
+      }
 
-        if (!result) {
-          this.$message.error("不支持该文件类型");
-          this.loadingElse = false
-          return false;
+      if (size > 10) {
+        this.$message.error('文件不能大于10MB')
+        this.loadingElse = false
+        return false
+      }
+    },
+    handleChange(info) {
+      if (info.file.status !== 'uploading') {
+        console.log(info.file, info.fileList)
+      }
+      if (info.file.status === 'done') {
+        this.$message.success(`${info.file.name} 上传成功`)
+        this.loadingElse = false
+        this.loadData(1)
+      } else if (info.file.status === 'error') {
+        this.$message.error(`${info.file.name} file upload failed.`)
+        this.loadingElse = false
+      }
+    },
+    handleOk(e) {
+      this.loadingOk = true
+      var params = qs.stringify({
+        projectId: this.projectId,
+        fileId: this.fileId,
+      })
+      postAction('/ctop/wpsFile/bindProject', params).then((res) => {
+        if (res.success) {
+          this.visibleProject = false
+          this.projectId = ''
+          this.loadingOk = false
+          this.loadData()
+        } else {
+          this.$message.error('绑定失败')
+          this.loadingOk = false
         }
-
-        if (size > 10) {
-          this.$message.error("文件不能大于10MB");
-          this.loadingElse = false
-          return false;
+      })
+    },
+    creatWps(type) {
+      console.log(type)
+      this.visibleBind = true
+      this.wpsType = type
+      this.type = 'add'
+      getAction('/ctop/wpsFile/createTemplateFile', {
+        template: type,
+      }).then((res) => {
+        console.log(res)
+        if (res.code == 200) {
+          this.src = res.msg
+          console.log(this.src)
+        } else {
+          this.$message.error('请求错误!')
         }
-      },
-      handleChange(info) {
+      })
+      // getCreateFilePath({
+      //   template: type
+      // }).then(res => {
+      //   console.log(res)
+      //   // if (res.data.data){
+      //   this.src = res.data.msg;
+      //   // }else {
+      //   // this.showErrMeg('请求错误!');
+      //   // }
+      // }).catch(() => {
+      //   this.showErrMeg('请求错误!');
+      // });
+    },
 
-        if (info.file.status !== 'uploading') {
-          console.log(info.file, info.fileList);
-        }
-        if (info.file.status === 'done') {
-          this.$message.success(`${info.file.name} 上传成功`);
-          this.loadingElse = false
-          this.loadData(1)
-        } else if (info.file.status === 'error') {
-          this.$message.error(`${info.file.name} file upload failed.`);
-          this.loadingElse = false
+    bindProject(item) {
+      this.visibleProject = true
+      this.projectId = ''
+      this.fileId = item.id
+      // this.getParticipateList()
+    },
+    getViewUrlDbPath(item) {
+      // this.loading = true;
+      const params = {
+        fileId: item.id,
+        userId: item.creator,
+      }
+      getAction('/v1/api/file/getViewUrlDbPath', params).then((res) => {
+        console.log(res)
+        if (res.data) {
+          let r = res.data
+          this.visibleBind = true
+          // this.src = r.wpsUrl;
+          this.type = 'edit'
+          this.openWps(r.wpsUrl, r.token)
+        } else {
+          this.$message.error('请求错误')
         }
-      },
-      handleOk(e) {
-        this.loadingOk = true
-        var params = qs.stringify({
-          projectId: this.projectId,
-          fileId: this.fileId
-        })
-        postAction('/ctop/wpsFile/bindProject', params).then(res => {
-          if (res.success) {
-            this.visibleProject = false
-            this.projectId = ""
-            this.loadingOk = false
-            this.loadData()
-          } else {
-            this.$message.error('绑定失败')
-            this.loadingOk = false
-          }
-        })
-      },
-      creatWps(type) {
-        console.log(type)
-        this.visibleBind = true
-        this.wpsType = type
-        this.type = 'add'
-        getAction('/ctop/wpsFile/createTemplateFile', {
-          template: type
-        }).then(res => {
-          console.log(res)
-          if (res.code == 200) {
-            this.src = res.msg;
-            console.log(this.src)
-          } else {
-            this.$message.error('请求错误!')
-          }
-        })
-        // getCreateFilePath({
-        //   template: type
-        // }).then(res => {
-        //   console.log(res)
-        //   // if (res.data.data){
-        //   this.src = res.data.msg;
-        //   // }else {
-        //   // this.showErrMeg('请求错误!');
-        //   // }
-        // }).catch(() => {
-        //   this.showErrMeg('请求错误!');
-        // });
-
-      },
-
-      bindProject(item) {
-        this.visibleProject = true
-        this.projectId = ''
-        this.fileId = item.id
-        // this.getParticipateList()
-      },
-      getViewUrlDbPath(item) {
-        // this.loading = true;
-        const params = {
-          fileId: item.id,
-          userId: item.creator
-        };
-        getAction('/v1/api/file/getViewUrlDbPath', params).then((res) => {
-          console.log(res)
-          if (res.data) {
-            let r = res.data;
-            this.visibleBind = true
-            // this.src = r.wpsUrl;
-            this.type = 'edit'
-            this.openWps(r.wpsUrl, r.token)
-
-          } else {
-            this.$message.error('请求错误')
-          }
+      })
+    },
+    openWps(url, token) {
+      this.$nextTick(() => {
+        let _this = this
+        const wps = _this.wps.config({
+          mode: 'simple',
+          mount: document.querySelector('#showWps'),
+          wpsUrl: url,
         })
-      },
-      openWps(url, token) {
-
-        this.$nextTick(() => {
-          let _this = this;
-          const wps = _this.wps.config({
-            mode: 'simple',
-            mount: document.querySelector('#showWps'),
-            wpsUrl: url,
-          });
-          wps.setToken({
-            "token": token
-          });
-          let app = wps.Application;
+        wps.setToken({
+          token: token,
         })
-      }
-    }
-  }
+        let app = wps.Application
+      })
+    },
+  },
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>

Разница между файлами не показана из-за своего большого размера
+ 2206 - 1796
src/views/modules/material/videoMaterial.vue


+ 68 - 31
src/views/ureport/UReportFileList.vue

@@ -12,18 +12,23 @@
           <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>
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+              >重置</a-button>
             </span>
           </a-col>
         </a-row>
       </a-form>
     </div>
     <a-row :gutter="24" style="margin-bottom:10px">
-        <a-col :md="6" :sm="8">
+      <a-col :md="6" :sm="8">
         <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-            <a-button type="primary" @click="addData">新增</a-button>
+          <a-button type="primary" @click="addData">新增</a-button>
         </span>
-        </a-col>
+      </a-col>
     </a-row>
     <!-- table区域-begin -->
     <div>
@@ -56,7 +61,13 @@
     <uReportFile-modal ref="modalForm" @ok="modalFormOk"></uReportFile-modal>
 
     <!--  查看成员,接触绑定 -->
-    <a-modal title="解除绑定" v-model="visible" @ok="handleOk" width="800px" class="close-account-my-project">
+    <a-modal
+      title="解除绑定"
+      v-model="visible"
+      @ok="handleOk"
+      width="800px"
+      class="close-account-my-project"
+    >
       <div style="display:flex;line-height:50px;flex-wrap: wrap;">
         <div style="width:25%;text-align:center;" v-for="(item, index) of memberList" :key="index">
           <a-tag color="#2db7f5" @close="log(item.userId)" closable>{{ item.userName }}</a-tag>
@@ -77,6 +88,7 @@
         style="width: 100%"
         :filterOption="filterOption"
         :maxTagCount="1"
+        @search="search"
       >
         <a-select-option
           v-for="appModel in options"
@@ -84,8 +96,8 @@
           :value="appModel.userId"
         >
           {{ appModel.realName }}
-          &#12288;&#12288;{{ appModel.roleName }}</a-select-option
-        >
+          &#12288;&#12288;{{ appModel.roleName }}
+        </a-select-option>
       </a-select>
     </a-modal>
   </a-card>
@@ -101,7 +113,7 @@ export default {
   name: 'UReportFileList',
   mixins: [JeecgListMixin],
   components: {
-    UReportFileModal
+    UReportFileModal,
   },
   data() {
     return {
@@ -111,21 +123,21 @@ export default {
         {
           title: '报表模板名称',
           align: 'center',
-          dataIndex: 'name'
+          dataIndex: 'name',
         },
         {
           title: '操作',
           dataIndex: 'action',
           align: 'center',
-          scopedSlots: { customRender: 'action' }
-        }
+          scopedSlots: { customRender: 'action' },
+        },
       ],
       url: {
         list: '/ctop/uReportFile/list',
         delete: '/ctop/uReportFile/delete',
         deleteBatch: '/ctop/uReportFile/deleteBatch',
         exportXlsUrl: 'ctop/uReportFile/exportXls',
-        importExcelUrl: 'ctop/uReportFile/importExcel'
+        importExcelUrl: 'ctop/uReportFile/importExcel',
       },
       visibleAdd: false,
       itemJson: null,
@@ -135,22 +147,25 @@ export default {
       appId: [],
       memberList: [],
       visible: false,
-      fileId: ''
+      fileId: '',
     }
   },
   computed: {
-    importExcelUrl: function() {
+    importExcelUrl: function () {
       return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
-    }
+    },
   },
   methods: {
-    subscribe(record){
-      console.log(record);
-      postAction('/ctop/uReportFileBindUser/subscribe',qs.stringify({
-        fileId:record.id
-      })).then(res=>{
-        console.log(res);
-        if(res.success){  
+    subscribe(record) {
+      console.log(record)
+      postAction(
+        '/ctop/uReportFileBindUser/subscribe',
+        qs.stringify({
+          fileId: record.id,
+        })
+      ).then((res) => {
+        console.log(res)
+        if (res.success) {
           this.$message.success('订阅成功')
         }
       })
@@ -161,15 +176,37 @@ export default {
     addParams(item) {
       this.visibleAdd = true
       this.itemJson = item
-      getAction('/sys/user/getAllUserList', '').then(res => {
+      // getAction('/sys/user/getAllUserList', '').then(res => {
+      //   if (res.success) {
+      //     this.list = res.result
+      //     this.options = res.result
+      //   }
+      // })
+      this.getAllUserList()
+    },
+    getAllUserList(value) {
+      getAction('/sys/user/getAllUserList', { pageSize: 50, pageNo: 1, userName: value }).then((res) => {
         if (res.success) {
-          this.list = res.result
-          this.options = res.result
+          this.list = res.result.list
+          this.options = res.result.list
         }
       })
     },
+    search(value) {
+      this.options = []
+      if (value != '') {
+        // this.options = this.list.filter(item => {
+        //   var data = item.realName + ' ' + item.roleName
+        //   return data.toLowerCase().indexOf(value.toLowerCase()) > -1
+        // })
+        // this.options = [...this.options]
+        this.getAllUserList(value)
+      } else {
+        this.getAllUserList()
+      }
+    },
     log(id) {
-      httpAction('/ctop/uReportFile/unbindUser', { fileId: this.fileId, userId: id }, 'post').then(res => {
+      httpAction('/ctop/uReportFile/unbindUser', { fileId: this.fileId, userId: id }, 'post').then((res) => {
         if (res.success) {
           this.getMemberList(this.fileId)
           this.$message.success('删除成功')
@@ -186,7 +223,7 @@ export default {
       params.fileId = this.itemJson.id
       params.userIds = this.appId.join()
       this.confirmLoading = true
-      httpAction('/ctop/uReportFile/bindUser', params, 'post').then(res => {
+      httpAction('/ctop/uReportFile/bindUser', params, 'post').then((res) => {
         this.confirmLoading = false
         if (res.success) {
           this.visibleAdd = false
@@ -210,7 +247,7 @@ export default {
       }
       window.open(url, '_blank')
     },
-    addData(){
+    addData() {
       var url = ''
       if (process.env.NODE_ENV === 'development') {
         url = 'http://api.tjyourong.com.cn/jeecg-boot/ureport/designer'
@@ -221,14 +258,14 @@ export default {
     },
     getMemberList(id) {
       this.memberList = []
-      httpAction('/ctop/uReportFileBindUser/userList', { fileId: id }, 'post').then(res => {
+      httpAction('/ctop/uReportFileBindUser/userList', { fileId: id }, 'post').then((res) => {
         if (res.success) {
           this.visible = true
           this.memberList = res.data
         }
       })
-    }
-  }
+    },
+  },
 }
 </script>
 <style scoped>