朱鑫波 4 gadi atpakaļ
vecāks
revīzija
1bbc319182

+ 26 - 8
src/views/modules/autoLaunch/application/application-service.js

@@ -30,19 +30,37 @@
     setCauseColumns() {
     setCauseColumns() {
         return [
         return [
             {
             {
-                title: '项目名称',
-                dataIndex: 'projectName',
-                width: '30%'
+                title: '账户名称',
+                dataIndex: 'authName',
+                width: '25%',
+                align: 'center'
             },
             },
             {
             {
-                title: '账户名称',
-                dataIndex: 'accountName',
-                width: '30%'
+                title: '推送结果',
+                dataIndex: 'result',
+                width: '25%',
+                align: 'center'
             },
             },
             {
             {
-                title: '原因',
+                title: '失败原因',
                 dataIndex: 'message',
                 dataIndex: 'message',
-                width: '40%'
+                width: '25%',
+                align: 'center',
+                customRender(t) {
+                    if(t === 'OK') {
+                        return '-';
+                    }
+                    else {
+                        return t;
+                    }
+                }
+            },
+            {
+                title: '操作',
+                dataIndex: 'action',
+                scopedSlots: {customRender: 'action'},
+                width: '25%',
+                align: 'center'
             }
             }
         ]
         ]
     }
     }

+ 28 - 9
src/views/modules/autoLaunch/application/application.vue

@@ -84,7 +84,7 @@
             okText="下一步"
             okText="下一步"
         >
         >
             <div>
             <div>
-                <tree-select @applyType="handleApplyType" :projectId="tableSelectList.projectId" :templateId="tableSelectList.id"></tree-select>
+                <tree-select httpSrc="/kuaishouAppPackage/getAccountByProjectId" @applyType="handleApplyType" :projectId="tableSelectList.projectId" :templateId="tableSelectList.id"></tree-select>
             </div>
             </div>
         </a-modal>
         </a-modal>
         <a-modal
         <a-modal
@@ -318,6 +318,7 @@
                 </div>  
                 </div>  
             </a-form>
             </a-form>
         </a-modal>
         </a-modal>
+        <creat-application ref="application" />
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
@@ -327,6 +328,7 @@ import AcountSearch from '@/views/modules/Statistics/components/Treeselect.vue';
 import AppMarketService from './application-service';
 import AppMarketService from './application-service';
 import selectTable from '@/views/modules/Statistics/components/selectPagination.vue';
 import selectTable from '@/views/modules/Statistics/components/selectPagination.vue';
 import BMF from 'browser-md5-file';
 import BMF from 'browser-md5-file';
+import creatApplication from './components/creatApplication.vue'
 let retargetColumns=[
 let retargetColumns=[
     {
     {
         title: '人群包',
         title: '人群包',
@@ -363,6 +365,7 @@ export default {
         TreeSelect,
         TreeSelect,
         AcountSearch,
         AcountSearch,
         selectTable,
         selectTable,
+        creatApplication
     },
     },
     data() {
     data() {
         let that = this;
         let that = this;
@@ -642,7 +645,7 @@ export default {
     },
     },
     methods: {
     methods: {
         addNewApp() {   
         addNewApp() {   
-
+            this.$refs.application.showApplication()
         },
         },
         onSelectExcludePerson(selectedRowKeys, selectedRows) {
         onSelectExcludePerson(selectedRowKeys, selectedRows) {
             
             
@@ -880,7 +883,7 @@ export default {
                 title: '删除提示',
                 title: '删除提示',
                 content: '是否删除该定向包?',
                 content: '是否删除该定向包?',
                 onOk() {
                 onOk() {
-                    getAction('/kuaishouAppPackage/delete', {id: data.id}).then(result => {
+                    postAction('/kuaishouAppPackage/delete', {id: data.id}).then(result => {
                         if (result.code === 200) {
                         if (result.code === 200) {
                             that.handleGetTableList({});
                             that.handleGetTableList({});
                             that.$message.success('删除成功');
                             that.$message.success('删除成功');
@@ -934,7 +937,7 @@ export default {
                 pageSize: this.causePag.size,
                 pageSize: this.causePag.size,
                 status: this.resultHistory !== 2 ? this.resultHistory : null
                 status: this.resultHistory !== 2 ? this.resultHistory : null
             };
             };
-            postAction('/kuaishouDirectionalPackage/queryPushResults', paramsData).then(result => {
+            postAction('/kuaishouAppPackage/queryPushHistory', paramsData).then(result => {
                 if (result.code === 200) {
                 if (result.code === 200) {
                     this.causeData = result.result.list || [];
                     this.causeData = result.result.list || [];
                     this.totalAllCause = result.result.total || 0;
                     this.totalAllCause = result.result.total || 0;
@@ -1021,14 +1024,30 @@ export default {
         },
         },
         handlePushSure() {
         handlePushSure() {
             if(this.finallyRightTree.length > 0) {
             if(this.finallyRightTree.length > 0) {
-                this.pushVisible = false;
-                this.setPersonVisible = true;
-                this.activeKey = this.finallyRightTree[0].key
+                this.pushConfirmLoading = true;
+                const paramsData = {
+                    accountIds: this.finallyRightTree.map(item => item.key),
+                    id: this.tableSelectList.id
+                };
+                postAction('/kuaishouAppPackage/pushAppPackage', paramsData).then(result => {
+                    this.pushConfirmLoading = false;
+                    if (result.code === 200) {
+                        this.pushVisible = false;
+                        this.handleGetTableList({});
+                        this.$message.success('推送成功')
+                    }
+                    else {
+                        this.$message.error(result.message);
+                    }
+                }).catch(error => {
+                    this.pushConfirmLoading = false;
+                    console.log(error, 'eeeeeee');
+                });
             }
             }
             else {
             else {
-                this.$message.error("请选择要分享的账户")
+                this.$message.error("请选择要推送的账户")
             }
             }
-            
+           
         },
         },
         handlePushCancel() {
         handlePushCancel() {
             this.pushVisible = false;
             this.pushVisible = false;

+ 511 - 0
src/views/modules/autoLaunch/application/components/creatApplication.vue

@@ -0,0 +1,511 @@
+<template>
+  <div>
+    <a-modal
+      title="添加应用"
+      :visible="application"
+      @ok="handleOk"
+      :confirmLoading="confirmLoading"
+      @cancel="handleCancel"
+      width="800px"
+    >
+      <a-card :body-style="{ padding: '24px 32px' }" :bordered="false">
+        <a-form :form="form">
+          <selectTable :projectId.sync="projectId" ref="selectTable" :requireCheck="true"></selectTable>
+          <a-form-item
+            label="设备类型"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-radio-group v-model="appType" @change="changePlatform">
+              <a-radio-button value="android">安卓</a-radio-button>
+              <a-radio-button value="ios">IOS</a-radio-button>
+            </a-radio-group>
+          </a-form-item>
+          <!-- <a-form-item v-if="appType == 'android'"> -->
+          <a-form-item
+            label="推广类型"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-radio-group v-model="platform" @change="changeShowUploadType">
+              <a-radio value="1">应用下载</a-radio>
+              <a-radio value="2">网页游戏</a-radio>
+            </a-radio-group>
+          </a-form-item>
+
+          <a-form-item
+            label="上传应用"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-radio-group v-model="uploadType" @change="changeShowUpload">
+              <a-radio-button value="1">本地上传</a-radio-button>
+              <a-radio-button value="2">填写链接</a-radio-button>
+            </a-radio-group>
+          </a-form-item>
+
+          <a-form-item
+            label="上传文件"
+            v-if="uploadType == '1'"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-upload name="file" :file-list="fileList" :before-upload="beforeUpload" @change="handleChange">
+              <a-button><a-icon type="upload" />文件上传</a-button>
+            </a-upload>
+            <a @click="downLoadFile">文件格式下载</a>
+          </a-form-item>
+
+          <a-form-item
+            v-if="uploadType == '2'"
+            label="下载链接"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-input
+              placeholder="请填写应用链接"
+              v-decorator="[
+                'url',
+                {
+                  rules: [{ required: true, validator: handleConfirmValue }],
+                },
+              ]"
+            />
+          </a-form-item>
+
+          <a-form-item
+            label="应用包名"
+            v-if="uploadType == '2'"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-input
+              v-decorator="[
+                'packageName',
+                {
+                  rules: [{ required: true, message: '请填写正确的应用包名称' }],
+                },
+              ]"
+              placeholder="请填写包名称,如com.smile.gifmaker"
+            />
+          </a-form-item>
+
+          <a-form-item
+            label="应用名称"
+            v-if="uploadType == '2'"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-input
+              v-decorator="[
+                'appName',
+                {
+                  rules: [{ required: true, message: '请填写应用名称' }],
+                },
+              ]"
+              placeholder="请填写应用名称"
+            />
+          </a-form-item>
+
+          <a-form-item
+            label="上传图标"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 19 } }"
+          >
+            <uploadFile
+              :value.sync="fileUrl"
+              :multiple="false"
+              :fileCount="1"
+              uploadType="image"
+              @overUpload="overUpload"
+              :size="100"
+            ></uploadFile>
+          </a-form-item>
+
+          <a-form-item
+            label="应用标记"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+            v-if="uploadType == '2'"
+          >
+            <a-input
+              v-decorator="[
+                'appVersion',
+                {
+                  rules: [{ required: true, message: '请填写应用标记' }, { validator: checkAppVersion }],
+                },
+              ]"
+              placeholder="请填写应用标记,必填且不可重复,如快手-5.6.1.66"
+            />
+          </a-form-item>
+          <!-- <a-form-item>
+            <a-form-item :wrapperCol="{ span: 24 }" style="text-align: center">
+              <a-button htmlType="submit" type="primary">提交</a-button>
+              <a-button style="margin-left: 8px">保存</a-button>
+            </a-form-item>
+          </a-form-item> -->
+          <a-form-item
+            label="隐私政策是否接入"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+            v-if="uploadType == '2'"
+          >
+            <a-radio-group
+              v-decorator="[
+                'useSdk',
+                {
+                  rules: [{ required: true }],
+                  initialValue: '0',
+                },
+              ]"
+            >
+              <a-radio value="0">未接入</a-radio>
+              <a-radio value="1">已接入</a-radio>
+            </a-radio-group>
+          </a-form-item>
+          <a-form-item
+            label="监测链接"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+            v-if="uploadType == '2'"
+          >
+            <a-input
+              v-decorator="[
+                'trackUrl',
+                {
+                  rules: [{ required: true, message: '请填写监测链接' }, { validator: handleConfirmValue }],
+                },
+              ]"
+              placeholder="请填写监测链接"
+            />
+          </a-form-item>
+        </a-form>
+      </a-card>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { deleteAction, postAction, getAction, downFilePost, downFile } from '@/api/manage'
+import uploadFile from '@/components/uploadFile.vue'
+import { mapActions, mapGetters } from 'vuex'
+import BMF from 'browser-md5-file'
+import selectTable from '@/views/modules/Statistics/components/selectPagination.vue'
+export default {
+  name: 'BaseForm',
+  components: {
+    uploadFile,
+    selectTable,
+  },
+  data() {
+    return {
+      projectId: '',
+      accountId: '',
+      fileList: [],
+      fileUrl: '',
+      accountList: {},
+      appType: 'android', //设备类型
+      platform: '1', //应用类型   : 1 Android 应用下载,2: Android 网页游戏,3: iOS 应用下载, 4:iOS 网页游戏
+      uploadType: '1', //上传类型 1 本地上传 2 填写链接
+      appVersion: '', //应用标记
+      appName: '', // 应用名称
+      packageName: '', //应用包名
+      file: '', // 上传文件
+      imageUrl: '', // 上传图标链接链接
+      downloadUrl: '', //下载链接
+      showUploadFile: true,
+      showDownLoad: false,
+      showUpload: true,
+      showAndroid: true,
+      showIOS: false,
+      customDomain: '',
+      acceptVideo: '/*.apk,/*.png,/*.jpg,/*.jpeg,/*.mp4',
+      accessKeyId: 'LTAIbNbqWzSOklQV',
+      accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
+      region: 'oss-cn-beijing',
+      bucket: 'ctop-media',
+      form: this.$form.createForm(this),
+      url: {
+        insertTemplateUrl: '/kuaishouAppPackage/fillInLink',
+        userAllocationList: '/ctop/userAllocation/list',
+      },
+      application: false,
+      confirmLoading: false,
+      imageToken: '',
+    }
+  },
+  methods: {
+    checkAppVersion(rule, value, callback){
+      if(value!=''){
+        let params = {}
+        params.projectId = this.projectId
+        params.appVersion = value
+        getAction('/kuaishouAppPackage/checkAppVersion',params).then(res=>{
+          if(res.success){
+            callback()
+          }else{
+            callback(res.message)
+          }
+        })
+      }
+     
+    },
+    overUpload(file) {
+      console.log(file)
+    },
+    downLoadFile() {
+      downFile('/kuaishouAppPackage/exportAppTemplate').then((res) => {
+        let blob = new Blob([res], {
+          type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+        })
+        let downloadElement = document.createElement('a')
+        let href = window.URL.createObjectURL(blob) //创建下载的链接
+        downloadElement.href = href
+        downloadElement.download = '应用模板' //下载后文件名
+        document.body.appendChild(downloadElement)
+        downloadElement.click() //点击下载
+        document.body.removeChild(downloadElement) //下载完成移除元素
+        window.URL.revokeObjectURL(href) //释放掉blob对象
+      })
+    },
+    handleChange(info) {
+      this.fileList = info.fileList
+    },
+    beforeUpload(file) {
+      this.cosUpload(file)
+    },
+    cosUpload(file) {
+      let that = this
+      let date = new Date()
+      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
+      let timeElse = new Date().getTime()
+      let arr = file.name.split('.')
+      let str = ''
+      for (let i = 0; i < arr.length; i++) {
+        if (i === arr.length - 1) {
+        } else {
+          if (i === arr.length - 2) {
+            str += arr[i]
+          } else {
+            str += arr[i] + '.'
+          }
+        }
+      }
+      cos.putObject(
+        {
+          Bucket: 'media-1301855440',
+          Region: 'ap-chongqing',
+          // 存储桶所在地域,必须字段
+          Key: that.appType + '/' + y + '-' + MM + '-' + d + '/' + str + '-' + timeElse + '.' + arr[arr.length - 1],
+          StorageClass: 'STANDARD',
+          Body: file, // 上传文件对象
+        },
+        function (err, data) {
+          if (err) {
+            that.$message.error('上传失败!!!' + err)
+            return
+          }
+          that.loadingElse = false
+          that.fileList.push({
+            uid: file.name,
+            name: file.name,
+            status: 'done',
+            url: '//' + data.Location,
+          })
+          if (that.fileList.length > 1) {
+            that.fileList = that.fileList.slice(-1)
+          }
+          const isZip = file.type.includes('zip') || file.type.includes('text')
+          const fileOvesize = file.size > 1024 * 1024 * 1024
+          if (!isZip) {
+            that.$message.error('只能上传zip格式的文件或者txt文件')
+            return
+          }
+          if (fileOvesize) {
+            that.$message.error('文件大小不能超过1G')
+            return
+          }
+          that.handleMd5(file)
+        }
+      )
+    },
+    handleMd5(file) {
+      let bmf = new BMF()
+      let that = this
+      return new Promise(function (resolve, reject) {
+        bmf.md5(file, (err, md5) => {
+          // getAction('kuaishouPopulationPackage/checkPopulationPackage', { signature: md5 })
+          //   .then((result) => {
+          //     if (result.code === 200) {
+          that.personNameDisabled = false
+          that.personResourceDisabled = false
+          resolve()
+          //   } else if (result.code === 201) {
+          //     that.$message.error(result.message)
+          //     that.personForm.name = result.result.orientationName
+          //     that.personForm.resource = result.result.type
+          //     that.personNameDisabled = true
+          //     that.personResourceDisabled = true
+          //     reject()
+          //   }
+          // })
+          // .catch((error) => {
+          //   console.log(error, 'eeee')
+          //   reject()
+          // })
+        })
+      })
+    },
+    handleOk() {
+      this.handleSubmit()
+    },
+    handleCancel() {
+      this.form.resetFields()
+      this.imageUrl = ''
+      this.file = ''
+      this.platform = '1'
+      this.application = false
+    },
+    showApplication() {
+      this.application = true
+    },
+    handleConfirmValue(rule, value, callback) {
+      if (/(http|https):\/\/([\w.]+\/?)\S*/.test(value) && value != '') {
+        callback()
+      } else {
+        callback('链接不能为空且开头为http://或https://')
+      }
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    changePlatform() {
+      this.form.resetFields()
+      if (this.appType == 'android') {
+        this.showAndroid = true
+        this.showIOS = false
+        this.platform = '1'
+      } else {
+        this.showAndroid = false
+        this.showIOS = true
+        this.showDownLoad = true
+        this.platform = '1'
+      }
+    },
+    changeShowUpload() {
+      this.form.resetFields()
+      if (this.uploadType == '1') {
+        this.showUploadFile = true
+        this.showDownLoad = false
+      } else {
+        this.showUploadFile = false
+        this.showDownLoad = true
+      }
+    },
+    changeShowUploadType() {
+      this.form.resetFields()
+      if (this.platform == '2') {
+        this.showUpload = false
+        this.showUploadFile = false
+        this.showDownLoad = true
+        this.uploadType = '1'
+      } else {
+        this.showUpload = true
+        this.showUploadFile = true
+        this.showDownLoad = false
+      }
+    },
+
+    handleSubmit() {
+      //   console.log('设备类型:' + this.appType)
+      //   console.log('应用类型:' + this.platform)
+      //   console.log('上传类型:' + this.uploadType)
+      //   console.log('应用标记:' + this.appVersion)
+      //   console.log('应用名称:' + this.appName)
+      //   console.log('包名称:' + this.packageName)
+      //   console.log('文件地址:' + this.file)
+      //   console.log('图片地址:' + this.imageUrl)
+      //   e.preventDefault()
+      this.form.validateFields((err, values) => {
+        console.log('Received values of form: ', values)
+        if (!err) {
+          let params = {}
+          params.projectId = this.projectId
+          if (this.uploadType == '1') {
+            this.url.insertTemplateUrl = '/kuaishouAppPackage/importAppExcel'
+            params.platform = this.appType == 'ios' ? +this.platform + 2 : +this.platform
+            params.imageUrl = this.fileUrl
+            params.imageToken = this.imageToken
+          } else {
+            this.url.insertTemplateUrl = '/kuaishouAppPackage/fillInLink'
+            params = {...values}
+            params.projectId = this.projectId
+            params.appIconUrl = this.fileUrl
+            params.imageToken = this.imageToken
+            params.platform = this.appType == 'ios' ? +this.platform + 2 : +this.platform
+          }
+          // if (this.appType == 'android') {
+          //   if (this.imageUrl != '') {
+          //     params.imageUrl = this.imageUrl
+          //   }
+          //   if (this.platform == '2') {
+          //     params.url = values.downloadUrl
+          //   } else {
+          //     if (this.uploadType == '1') {
+          //       if (this.file != '') {
+          //         params.file = this.file
+          //       }
+          //     } else if (this.uploadType == '2') {
+          //       params.url = values.downloadUrl
+          //     }
+          //   }
+          //   params.platform = this.platform
+          //   params.uploadType = values.uploadType
+          //   params.appType = 'android'
+          //   params.packageName = values.packageName
+          //   params.appName = values.appName
+          //   params.appVersion = values.appVersion
+          //   params.loginId = this.userInfo().id
+          // } else {
+          //   params.appType = 'ios'
+          //   params.platform = this.platform
+          //   params.uploadType = '2'
+          //   params.url = values.downloadUrl
+          //   params.appName = values.appName
+          //   params.appVersion = values.appVersion
+          //   params.loginId = this.userInfo().id
+          // }
+
+          console.log(params)
+          postAction(this.url.insertTemplateUrl, params).then((res) => {
+            console.log(res)
+            if (res.success) {
+              this.$message.success('创建成功')
+              this.handleCancel()
+            } else {
+              this.$message.error(res.message)
+            }
+          })
+        }
+      })
+    },
+
+    onChange(value) {
+      console.log(value)
+    },
+  },
+  created: function () {
+    let params = {}
+    params.pageSize = '1000'
+    params.mediaId = '2'
+    params.userId = this.userInfo().id
+    getAction(this.url.userAllocationList, params).then((res) => {
+      if (res.success) {
+        this.accountList = res.result.records
+      }
+    })
+  },
+}
+</script>

+ 6 - 0
src/views/modules/autoLaunch/application/components/tree-select.less

@@ -21,6 +21,12 @@
             .class-left-content {
             .class-left-content {
                 overflow-y: auto;
                 overflow-y: auto;
                 height: 340px;
                 height: 340px;
+                position: relative;
+                .pagin-table-class {
+                    position: absolute;
+                    bottom: 0;
+                    right: 0;
+                }
             }
             }
             .example {
             .example {
                 text-align: center;
                 text-align: center;

+ 55 - 25
src/views/modules/autoLaunch/application/components/tree-select.vue

@@ -16,6 +16,14 @@
                             @check="onCheck"
                             @check="onCheck"
                             @expand="onExpand"
                             @expand="onExpand"
                         />
                         />
+                        <!-- <a-pagination
+                            class="pagin-table-class"
+                            :total="totalAll"
+                            :show-total="total => `共 ${totalAll} 条`"
+                            size="small"
+                            @change="onShowSizeChange"
+                            @showSizeChange="onShowSizeChange"
+                        /> -->
                     </template>
                     </template>
                     <div class="example">
                     <div class="example">
                         <a-spin :spinning="spinning"/>
                         <a-spin :spinning="spinning"/>
@@ -54,12 +62,33 @@
 </template>
 </template>
 <script>
 <script>
 import {mapGetters} from 'vuex';
 import {mapGetters} from 'vuex';
-import {postAction} from '@/api/manage';
+import {postAction,getAction} from '@/api/manage';
 
 
 export default {
 export default {
     name: 'tree-select',
     name: 'tree-select',
+    props: {
+        projectId: {
+            type: [String,Number],
+            default() {
+                return null
+            },
+        },
+        templateId: {
+            type: [String,Number],
+            default() {
+                return null
+            },
+        },
+        httpSrc: {
+            type: String,
+            default() {
+                return '/kuaishouDirectionalPackage/getAccountByProjectId'
+            }
+        }
+    },
     data() {
     data() {
         return {
         return {
+            totalAll: 20,
             expandedKeys: [],
             expandedKeys: [],
             autoExpandParent: true,
             autoExpandParent: true,
             checkedKeys: [],
             checkedKeys: [],
@@ -69,7 +98,11 @@ export default {
             applyTypeOption: [],
             applyTypeOption: [],
             selectRightData: new Set(),
             selectRightData: new Set(),
             spinning: true,
             spinning: true,
-            leftTreeNoData: false
+            leftTreeNoData: false,
+            tablePag: {
+                page: 1,
+                size: 100
+            },
         };
         };
     },
     },
     mounted() {
     mounted() {
@@ -77,36 +110,32 @@ export default {
     },
     },
     methods: {
     methods: {
         ...mapGetters(['userInfo']),
         ...mapGetters(['userInfo']),
+        onShowSizeChange(current, pageSize) {
+            this.tablePag = {
+                page: current,
+                size: pageSize
+            };
+            this.getAccountId();
+        },
         getAccountId() {
         getAccountId() {
-            postAction('/ctop/projectMember/participateListByMediaId', {
-                userId: this.userInfo().id,
-                type: 'kuaishou'
+            getAction(this.httpSrc, {
+                projectId: this.projectId,
+                id: this.templateId,
+                pageNo: this.tablePag.page,
+                pageSize: this.tablePag.size
             }).then(result => {
             }).then(result => {
-                if (result.result.length) {
+                if (result.result.list.length) {
                     this.spinning = false;
                     this.spinning = false;
-                    this.treeData = result.result.map(item => {
+                    this.treeData = result.result.list.map(item => {
                         return {
                         return {
-                            key: item.projectId + 'projectId',
-                            title: item.projectName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.advertiserName,
-                            children: item.accountList
-                            ? item.accountList.map(i => {
-                                return {
-                                    key: i.accountId,
-                                    title:
-                                    (i.userName.length === 2
-                                        ? i.userName + '\xa0\xa0\xa0\xa0\xa0'
-                                        : i.userName.length === 3
-                                        ? i.userName + '\xa0\xa0\xa0\xa0'
-                                        : i.userName)
-                                        + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0'
-                                        + i.accountId
-                                        + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0'
-                                        + i.authName
-                                };
-                            }) : []
+                            key: item.accountId,
+                            title: item.authName,
+                            disabled: item.state === 1,
+                            children: null
                         };
                         };
                     });
                     });
                     this.updateTreeData = [...this.treeData];
                     this.updateTreeData = [...this.treeData];
+                    this.totalAll = result.result.total || 0;
                 }
                 }
                 else {
                 else {
                     this.spinning = false;
                     this.spinning = false;
@@ -231,6 +260,7 @@ export default {
         },
         },
         onCheck(checkedKeys) {
         onCheck(checkedKeys) {
             // this.checkedKeys = checkedKeys;
             // this.checkedKeys = checkedKeys;
+            console.log(checkedKeys)
             this.nodes(this.treeData, checkedKeys);
             this.nodes(this.treeData, checkedKeys);
             const filterCheckKey = this.checkedKeys.filter(item=>typeof item ==='number');
             const filterCheckKey = this.checkedKeys.filter(item=>typeof item ==='number');
             let filterCheckKeySet = new Set(filterCheckKey);
             let filterCheckKeySet = new Set(filterCheckKey);

+ 1 - 1
vue.config.js

@@ -77,7 +77,7 @@ module.exports = {
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8806', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8806', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
+        target: 'http://192.168.1.219:8081', //请求本地 需要jeecg-boot后台项目  赵西安
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
         //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目