Browse Source

提交代码-修改

zhuxinbo 5 years ago
parent
commit
b71e862f9b

+ 223 - 219
src/views/modules/advertiser/AdvertiserList.vue

@@ -1,12 +1,9 @@
 <template>
   <a-card :bordered="false">
-
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
-      <a-form
-        layout="inline">
+      <a-form layout="inline">
         <a-row :gutter="24">
-
           <a-col :md="6" :sm="8">
             <a-form-item label="广告主名称">
               <a-input placeholder="请输入广告主名称" v-model="queryParam.name"></a-input>
@@ -20,7 +17,8 @@
                 placeholder="请选择行业"
                 dict="sys_category,name,id"
                 pidField="pid"
-                pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76">
+                pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76"
+              >
               </j-tree-select>
             </a-form-item>
           </a-col>
@@ -30,7 +28,6 @@
               <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
             </span>
           </a-col>
-
         </a-row>
       </a-form>
     </div>
@@ -42,7 +39,6 @@
 
     <!-- table区域-begin -->
     <div>
-
       <a-table
         ref="table"
         size="middle"
@@ -52,108 +48,121 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        @change="handleTableChange">
+        @change="handleTableChange"
+      >
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
 
-          <a-divider type="vertical"/>
-         <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+          <a-divider type="vertical" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
             <a>删除</a>
           </a-popconfirm>
         </span>
-
       </a-table>
       <a-modal
         title="账号绑定"
         v-model="visible"
         @ok="handleSubmit"
         :width="800"
-        :okButtonProps="{ props: {disabled: false} }"
-        :cancelButtonProps="{ props: {disabled: false} }"
+        :okButtonProps="{ props: { disabled: false } }"
+        :cancelButtonProps="{ props: { disabled: false } }"
       >
-
         <a-form>
           <a-form-item
             label="选择方式"
-            :labelCol="{xs: {span: 24},sm: {span: 5}}"
-            :wrapperCol="{xs: {span: 24},sm: {span: 16}}">
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
             <a-radio-group buttonStyle="solid" @change="onChageLogin" v-model="mode">
               <a-radio-button value="login">登录</a-radio-button>
               <a-radio-button value="authorization">授权</a-radio-button>
             </a-radio-group>
           </a-form-item>
 
-          <a-form-item
-            v-if="showLogin"
-          >
-            <a-form
-              :form="form">
+          <a-form-item v-if="showLogin">
+            <a-form :form="form">
               <!-- @submit="loginForm">-->
               <a-form-item
                 label="账号:"
-                :label-col="{xs: {span: 24},sm: {span: 5}}"
-                :wrapper-col="{xs: {span: 24},sm: {span: 16}}">
-                <a-input v-model="accountName" placeholder="请输入账户名"/>
+                :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
+                :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
+              >
+                <a-input v-model="accountName" placeholder="请输入账户名" />
               </a-form-item>
               <a-form-item
                 label="密码:"
-                :label-col="{xs: {span: 24},sm: {span: 5}}"
-                :wrapper-col="{xs: {span: 24},sm: {span: 16}}">
-                <a-input type="password" v-model="password" placeholder="请输入密码"/>
+                :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
+                :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
+              >
+                <a-input type="password" v-model="password" placeholder="请输入密码" />
               </a-form-item>
               <a-form-item
                 label="媒体:"
-                :label-col="{xs: {span: 24},sm: {span: 5}}"
-                :wrapper-col="{xs: {span: 24},sm: {span: 16}}">
+                :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
+                :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
+              >
                 <a-radio-group buttonStyle="outline" v-model="loginType">
                   <a-radio-button value="kuaishou">快手</a-radio-button>
                   <a-radio-button value="bytedance">头条</a-radio-button>
                 </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-show="!departDisabled">
+              <a-form-item
+                label="部门分配"
+                :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+                :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+                v-show="!departDisabled"
+              >
                 <j-select-depart v-model="departmentId" :multi="false"></j-select-depart>
               </a-form-item>
 
-              <a-form-item label="用户选择" :labelCol="{xs: {span: 24},sm: {span: 5}}"
-                           :wrapperCol="{xs: {span: 24},sm: {span: 16}}">
+              <a-form-item
+                label="用户选择"
+                :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+                :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+              >
                 <j-select-user-by-dep v-model="users"></j-select-user-by-dep>
               </a-form-item>
-
             </a-form>
           </a-form-item>
 
           <a-form-item
             v-if="showAuthorization"
-            :labelCol="{xs: {span: 24},sm: {span: 5}}"
-            :wrapperCol="{xs: {span: 24},sm: {span: 16}}">
-            <a-form
-              :form="form">
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-form :form="form">
               <!--@submit="authorizationForm"-->
 
-              <a-form-item label="媒体:" :labelCol="{xs: {span: 24},sm: {span: 5}}"
-                           :wrapperCol="{xs: {span: 24},sm: {span: 16}}">
+              <a-form-item
+                label="媒体:"
+                :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+                :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+              >
                 <a-radio-group buttonStyle="outline" v-model="authorizationType">
                   <a-radio-button value="kuaishou">快手</a-radio-button>
                   <a-radio-button value="bytedance">头条</a-radio-button>
                 </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-show="!departDisabled">
+              <a-form-item
+                label="部门分配"
+                :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+                :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+                v-show="!departDisabled"
+              >
                 <j-select-depart v-model="departmentId" :multi="false"></j-select-depart>
-
               </a-form-item>
 
-              <a-form-item label="用户选择" :labelCol="{xs: {span: 24},sm: {span: 5}}"
-                           :wrapperCol="{xs: {span: 24},sm: {span: 16}}">
+              <a-form-item
+                label="用户选择"
+                :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+                :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+              >
                 <j-select-user-by-dep v-model="users"></j-select-user-by-dep>
               </a-form-item>
-
             </a-form>
           </a-form-item>
-
         </a-form>
       </a-modal>
     </div>
@@ -166,189 +175,184 @@
 </template>
 
 <script>
-  import AdvertiserModal from './modules/AdvertiserModal'
-  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
-  import JTreeSelect from '@/components/jeecg/JTreeSelect'
-  import AFormItem from "ant-design-vue/es/form/FormItem";
-  import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
-  import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
-  import JSelectUser from '@/components/jeecgbiz/JSelectUser'
-  import {postAction} from "../../../api/manage";
-  import {mapActions, mapGetters} from 'vuex'
-
-
-  export default {
-    name: 'AdvertiserList',
-    mixins: [JeecgListMixin],
-    components: {
-      AFormItem,
-      AdvertiserModal,
-      JTreeSelect,
-      JSelectUserByDep,
-      JSelectDepart,
-      JSelectUser
-    },
-    data() {
-      return {
-        departDisabled: false, //是否是我的部门调用该页面
-        users: this.userInfo().realname,//用户名称
-        departmentId: this.userInfo().departId, //部门id
-        description: '广告主信息表管理页面',
-        visible: false,
-        accountName: '',
-        password: '',
-        mode: 'login',
-        showLogin: true,
-        showAuthorization: false,
-        authorizationType: 'kuaishou',
-        loginType: 'kuaishou',
-        form: this.$form.createForm(this),
-        // 表头
-        columns: [
-          {
-            title: '广告主名称',
-            align: 'center',
-            dataIndex: 'name'
-          },
-          {
-            title: '行业',
-            align: 'center',
-            dataIndex: 'industryId'
-          },
-          {
-            title: '联系人姓名',
-            align: 'center',
-            dataIndex: 'contact'
-          },
-          {
-            title: '联系人手机',
-            align: 'center',
-            dataIndex: 'mobile'
-          },
-          {
-            title: '联系人邮箱',
-            align: 'center',
-            dataIndex: 'email'
-          },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align: 'center',
-            scopedSlots: {customRender: 'action'},
-          }
-        ],
-        url: {
-          list: '/ctop/advertiser/list',
-          delete: '/ctop/advertiser/delete',
-          deleteBatch: '/ctop/advertiser/deleteBatch',
-          exportXlsUrl: 'ctop/advertiser/exportXls',
-          importExcelUrl: 'ctop/advertiser/importExcel',
-          bindAccountLoginUrl: '/ctop/bindAccountLogin/login',
-          bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization',
-          getLoginInfo: '/ctop/bindAccount/getLoginInfo',
-          userId: "/sys/user/generateUserId", // 引入生成添加用户情况下的url
-          userWithDepart: "/sys/user/userDepartList", // 引入为指定用户查看部门信息需要的url
-
+import AdvertiserModal from './modules/AdvertiserModal'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JTreeSelect from '@/components/jeecg/JTreeSelect'
+import AFormItem from 'ant-design-vue/es/form/FormItem'
+import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
+import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
+import JSelectUser from '@/components/jeecgbiz/JSelectUser'
+import { postAction } from '../../../api/manage'
+import { mapActions, mapGetters } from 'vuex'
+
+export default {
+  name: 'AdvertiserList',
+  mixins: [JeecgListMixin],
+  components: {
+    AFormItem,
+    AdvertiserModal,
+    JTreeSelect,
+    JSelectUserByDep,
+    JSelectDepart,
+    JSelectUser
+  },
+  data() {
+    return {
+      departDisabled: false, //是否是我的部门调用该页面
+      users: this.userInfo().realname, //用户名称
+      departmentId: this.userInfo().departId, //部门id
+      description: '广告主信息表管理页面',
+      visible: false,
+      accountName: '',
+      password: '',
+      mode: 'login',
+      showLogin: true,
+      showAuthorization: false,
+      authorizationType: 'kuaishou',
+      loginType: 'kuaishou',
+      form: this.$form.createForm(this),
+      // 表头
+      columns: [
+        {
+          title: '广告主名称',
+          align: 'center',
+          dataIndex: 'name'
         },
+        {
+          title: '行业',
+          align: 'center',
+          dataIndex: 'industryId'
+        },
+        {
+          title: '联系人姓名',
+          align: 'center',
+          dataIndex: 'contact'
+        },
+        {
+          title: '联系人手机',
+          align: 'center',
+          dataIndex: 'mobile'
+        },
+        {
+          title: '联系人邮箱',
+          align: 'center',
+          dataIndex: 'email'
+        },
+        {
+          title: '销售',
+          align: 'center',
+          dataIndex: 'saleName'
+        },
+
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: '/ctop/advertiser/list',
+        delete: '/ctop/advertiser/delete',
+        deleteBatch: '/ctop/advertiser/deleteBatch',
+        exportXlsUrl: 'ctop/advertiser/exportXls',
+        importExcelUrl: 'ctop/advertiser/importExcel',
+        bindAccountLoginUrl: '/ctop/bindAccountLogin/login',
+        bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization',
+        getLoginInfo: '/ctop/bindAccount/getLoginInfo',
+        userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url
+        userWithDepart: '/sys/user/userDepartList' // 引入为指定用户查看部门信息需要的url
       }
+    }
+  },
+  computed: {
+    importExcelUrl: function() {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    }
+  },
+  created() {
+    this.queryParam.userId = this.userInfo().id
+  },
+  methods: {
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    searchRe() {
+      this.queryParam.name = ''
+      this.queryParam.industryId = ''
+      this.loadData()
     },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-      }
-    },
-    created(){
-        this.queryParam.userId = this.userInfo().id
-    },
-    methods: {
-      ...mapGetters(["nickname", "avatar", "userInfo"]),
-      searchRe() {
-        this.queryParam.name = ''
-        this.queryParam.industryId = ''
-        this.loadData()
-      },
-      handleSubmit() {
-
-        let params = {};
-        params.advertiserId = this.record.id;
-        params.advertiser_name = this.record.name;
-        params.userId = this.userInfo().id;
-        params.userName = this.userInfo().realname
-        params.projectId = this.record.projectId
-        params.projectName = this.record.projectName
-
-        // 触发表单验证
-        this.form.validateFields((err) => {
-          if (!err) {
-            if (this.mode == 'login') {
-              params.accountName = this.accountName;
-              params.password = this.password;
-              params.loginType = this.loginType;
-              if (this.loginType == 'kuaishou') {
-                params.mediaId = 2;
-              } else if (this.loginType == 'bytedance') {
-                params.mediaId = 1;
-              }
-              postAction(this.url.bindAccountLoginUrl, params).then((res) => {
-                if (res.success) {
-                  alert("绑定成功");
-                  this.accountName = '';
-                  this.password = '';
-                  this.loginType = '';
-                } else {
-                  alert(res.message);
-                }
-              });
+    handleSubmit() {
+      let params = {}
+      params.advertiserId = this.record.id
+      params.advertiser_name = this.record.name
+      params.userId = this.userInfo().id
+      params.userName = this.userInfo().realname
+      params.projectId = this.record.projectId
+      params.projectName = this.record.projectName
+
+      // 触发表单验证
+      this.form.validateFields(err => {
+        if (!err) {
+          if (this.mode == 'login') {
+            params.accountName = this.accountName
+            params.password = this.password
+            params.loginType = this.loginType
+            if (this.loginType == 'kuaishou') {
+              params.mediaId = 2
+            } else if (this.loginType == 'bytedance') {
+              params.mediaId = 1
             }
-            // 授权登录
-            if (this.mode == 'authorization') {
-              params.authorizationType = this.authorizationType;
-              if (this.authorizationType == 'kuaishou') {
-                params.mediaId = 2;
-              } else if (this.authorizationType == 'bytedance') {
-                params.mediaId = 1;
+            postAction(this.url.bindAccountLoginUrl, params).then(res => {
+              if (res.success) {
+                alert('绑定成功')
+                this.accountName = ''
+                this.password = ''
+                this.loginType = ''
+              } else {
+                alert(res.message)
               }
-              postAction(this.url.bindAuthorizationUrl, params).then((res) => {
-                if (res.success) {
-                  window.open(res.message, '_blank');
-                } else {
-                  alert("绑定失败");
-                }
-              });
+            })
+          }
+          // 授权登录
+          if (this.mode == 'authorization') {
+            params.authorizationType = this.authorizationType
+            if (this.authorizationType == 'kuaishou') {
+              params.mediaId = 2
+            } else if (this.authorizationType == 'bytedance') {
+              params.mediaId = 1
             }
-
+            postAction(this.url.bindAuthorizationUrl, params).then(res => {
+              if (res.success) {
+                window.open(res.message, '_blank')
+              } else {
+                alert('绑定失败')
+              }
+            })
           }
-        })
-
-      },
-
-      onChageLogin() {
-        console.log(this.mode)
-        if (this.mode == 'login') {
-          this.showLogin = true;
-          this.showAuthorization = false;
-        } else {
-          this.showLogin = false;
-          this.showAuthorization = true;
-
-
         }
-      },
-      showModal(record) {
-        this.record = record
-        this.visible = true
-      },
-
-      handleCancel() {
-        this.close()
-      },
+      })
     },
 
+    onChageLogin() {
+      console.log(this.mode)
+      if (this.mode == 'login') {
+        this.showLogin = true
+        this.showAuthorization = false
+      } else {
+        this.showLogin = false
+        this.showAuthorization = true
+      }
+    },
+    showModal(record) {
+      this.record = record
+      this.visible = true
+    },
 
-
-
+    handleCancel() {
+      this.close()
+    }
   }
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less'
-</style>
+@import '~@assets/less/common.less';
+</style>

+ 105 - 1
src/views/modules/advertiser/ProjectMemberList.vue

@@ -6,6 +6,9 @@
 .close-account-my-project .ant-modal-footer .ant-btn-primary {
   display: none;
 }
+.only .ant-badge-count {
+  right: -16px;
+}
 </style>
 <template>
   <a-card
@@ -52,6 +55,12 @@
           <a @click="handleEdit(record)">{{ noTitleKey == 'myProject' ? '查看成员' : '账号绑定' }}</a>
           <a-divider type="vertical" />
           <a @click="addParams(record)">{{ noTitleKey == 'myProject' ? '新增人员' : '查看账户' }}</a>
+          <a-divider type="vertical" v-if="noTitleKey == 'myProject'" />
+          <a-badge :count="record.needExamine" class="only">
+            <a @click="projectLook(record)" v-if="noTitleKey == 'myProject'" :disabled="record.needExamine == 0"
+              >待办事项</a
+            >
+          </a-badge>
         </span>
       </a-table>
     </div>
@@ -211,12 +220,39 @@
         <span slot="createTime" slot-scope="createTime">{{ createTime | getDate }}</span>
       </a-table>
     </a-modal>
+
+    <!-- 待办事件审核 -->
+    <a-modal
+      title="待办事件审核"
+      v-model="projectVisible"
+      @ok="handleOkProject"
+      width="800px"
+      class="close-account-my-project"
+      :footer="null"
+    >
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columnsProject"
+        :dataSource="dataProject"
+        :pagination="ipaginationAccount"
+        :loading="loadingAccount"
+      >
+        <span slot="action" slot-scope="text, record">
+          <a @click="projectEdit(record, 1)">通过</a>
+          <a-divider type="vertical" />
+          <a @click="projectEdit(record, 2)">拒绝</a>
+        </span>
+      </a-table>
+    </a-modal>
   </a-card>
 </template>
 
 <script>
 import ProjectMemberModal from './modules/ProjectMemberModal'
-import { httpAction, getAction, deleteAction } from '@/api/manage'
+import { httpAction, getAction, deleteAction, putAction } from '@/api/manage'
 
 import { mapGetters } from 'vuex'
 
@@ -344,6 +380,42 @@ export default {
         }
       },
       loadingAccount: false,
+      projectVisible: false,
+      columnsProject: [
+        {
+          title: '转让账户',
+          align: 'center',
+          dataIndex: 'accountId'
+        },
+        {
+          title: '受让人姓名',
+          align: 'center',
+          dataIndex: 'transferorName'
+        },
+        {
+          title: '转户人姓名',
+          align: 'center',
+          dataIndex: 'assigneeName'
+        },
+
+        {
+          title: '受让人绩效开始时间',
+          align: 'center',
+          dataIndex: 'assigneeDate'
+        },
+        {
+          title: '转户人绩效结束时间',
+          align: 'center',
+          dataIndex: 'transferorDate'
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      dataProject: [],
       dataAccount: [],
       dataSource: [],
       dataElse: [],
@@ -401,6 +473,38 @@ export default {
   },
   methods: {
     //   /ctop/userAllocation/getAccountsByProjectId    projectId  userId
+    projectLook(item) {
+      var params = {}
+      params.projectId = item.projectId
+      params.status = 0
+      getAction('/ctop/transferAccount/list', params).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.projectVisible = true
+          this.dataProject = res.result.map((item, index) => {
+            return {
+              ...item,
+              key: index
+            }
+          })
+          this.ipaginationAccount.total = res.result.length
+        }
+      })
+    },
+    projectEdit(item, status) {
+      var params = {}
+      params.id = item.id
+      params.status = status
+      params.auditor = this.userInfo().id
+      putAction('/ctop/transferAccount/edit', params).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.projectVisible = false
+          this.getResponsibleList()
+        }
+      })
+    },
+    handleOkProject() {},
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     add(value, key) {
       var dataValue = value.split(',')

+ 108 - 40
src/views/modules/advertiser/UserAllocationList.vue

@@ -42,15 +42,15 @@
       >
         <span slot="mediaId" slot-scope="text">{{ text == 1 ? '头条' : '快手' }}</span>
         <span slot="action" slot-scope="text, record">
-          <a @click="project(record)">绑定项目</a>
+          <a @click="project(record)">转让账户</a>
 
           <a-divider type="vertical" />
           <a @click="handleEdit(record)">编辑</a>
 
-          <a-divider type="vertical" />
+          <!-- <a-divider type="vertical" />
           <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
             <a>删除</a>
-          </a-popconfirm>
+          </a-popconfirm> -->
         </span>
       </a-table>
     </div>
@@ -59,21 +59,74 @@
     <!-- 表单区域 -->
     <userAllocation-modal ref="modalForm" @ok="modalFormOk"></userAllocation-modal>
     <!--  添加项目成员 -->
-    <a-modal title="项目绑定" v-model="visibleAdd" @ok="handleOkAdd" :confirmLoading="confirmLoading">
-      <!-- /sys/user/getAllUserList -->
-      <treeSelect ref="treeSelect" :appId.sync="projectId" :multiple="false" :mediaId="mediaId" style="width:100%" />
-      <!-- <a-select
-        v-model="projectId"
-        placeholder="请输入项目名称"
-        showSearch
-        optionFilterProp="children"
-        :filterOption="filterOption"
-        style="width:100%"
-      >
-        <a-select-option :value="item.id" v-for="item of options" :key="item.id">
-          {{ item.projectName }}
-        </a-select-option>
-      </a-select> -->
+    <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', { initialValue: userInfo().id }]"
+            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-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: '请选择转户人绩效截止日期' }] }]"
+          />
+          <!-- , { 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>
+        <!-- 
+        <a-form-item
+          label="账号:"
+          :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
+          v-show="mode == 'login'"
+        >
+          <a-input v-model="accountName" placeholder="请输入账户名" />
+        </a-form-item>
+        -->
+      </a-form>
     </a-modal>
   </a-card>
 </template>
@@ -85,7 +138,8 @@ 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'
 export default {
   name: 'UserAllocationList',
   mixins: [JeecgListMixin],
@@ -163,7 +217,8 @@ export default {
       confirmLoading: false,
       projectId: '',
       accountId: '',
-      mediaId: ''
+      mediaId: '',
+      form: this.$form.createForm(this)
     }
   },
   computed: {
@@ -172,38 +227,51 @@ export default {
     }
   },
   methods: {
+    moment,
     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) {
       console.log(item)
       this.visibleAdd = true
       this.accountId = item.accountId
-      this.$refs.treeSelect.getParticipateList(item.mediaId)
-      //   getAction('/ctop/project/getProjectByCompany', { userId: this.userInfo().id, mediaId: item.mediaId }).then(
-      //     res => {
-      //       console.log(res)
-      //       if (res.success) {
-      //         this.options = res.result
-      //       }
-      //     }
-      //   )
+      this.projectId = item.projectId
+      this.getALLperson()
     },
     handleOkAdd(e) {
-      var params = {}
-      params.projectId = this.projectId
-      params.accountId = this.accountId
       this.confirmLoading = true
-      getAction('/ctop/userAllocation/accountTurnProject', params).then(res => {
-        this.confirmLoading = false
-        if (res.success) {
-          this.visibleAdd = false
-          this.projectId = ''
-          this.$message.success('绑定成功')
-          this.loadData()
+
+      this.form.validateFieldsAndScroll((err, values) => {
+        if (err) {
+          // 这里做逻辑处理
         } else {
-          this.$message.error(res.message)
+          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
+          console.log(params)
+          postAction('/ctop/transferAccount/add', params).then(res => {
+            console.log(res)
+            if (res.success) {
+              this.confirmLoading = false
+              this.visibleAdd = false
+              this.form.resetFields()
+            } else {
+              this.$message.error(res.message)
+            }
+          })
         }
       })
     }

+ 24 - 2
src/views/modules/material/scriptMaterial.vue

@@ -416,6 +416,14 @@ a {
 
         <div slot="content" v-if="!repeat">
           <a-form-item
+            label="排序"
+            :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapper-col="{ xs: { span: 24 }, sm: { span: 17 } }"
+            v-if="editScript"
+          >
+            <a-input v-model="rank"></a-input>
+          </a-form-item>
+          <a-form-item
             label="镜头"
             :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
             :wrapper-col="{ xs: { span: 24 }, sm: { span: 17 } }"
@@ -595,6 +603,8 @@ export default {
       actorList: [],
       submitting: false,
       value: '',
+      rank: '',
+      editScript: null,
       scene: '',
       clipRemark: '',
       picContent: '',
@@ -703,7 +713,18 @@ export default {
       })
     },
     editAction(item, index) {
-      console.log(item,index)
+      console.log(item, index)
+      this.editScript = item.id
+
+
+
+    //   line: this.value,
+    //     scene: this.scene,
+    //     clipRemark: this.clipRemark,
+    //     picContent: this.picContent,
+    //     type: this.author[0] == 'scence' ? 1 : 2,
+    //     roleId: this.author[0] == 'scence' ? null : this.author[1]
+        
       //   postAction('/ctop/dramaItemInfo/edit', { id: item.id }).then(res => {
       //     if (res.success) {
       //       this.comments.splice(index, 1)
@@ -971,7 +992,8 @@ export default {
           scnece: item.scnece,
           shootReq: item.shootReq,
           usp: item.usp,
-          videoType: item.videoType
+          videoType: item.videoType,
+          timeLong: item.timeLong
         })
       })
       this.tags = item.tag.split(',')

+ 69 - 44
src/views/modules/onlineTraining/onlineTrainingList.vue

@@ -7,49 +7,33 @@
   padding: 5px 10px;
   cursor: pointer;
 }
+#office-iframe {
+  height: 800px;
+}
 </style>
 <template>
   <a-row :gutter="10">
-    <a-col :sm="24" style="margin-bottom: 20px;z-index: 10">
-      <a-card class="search-box">
-        <p
-          :style="active == item.value ? 'color:cornflowerblue;background:#f2f2f2' : ''"
-          v-for="(item, index) of timeList"
-          :key="index"
-          @click="getAdd(item.value)"
-        >
-          {{ item.label }}
-        </p>
-        <div @click="openFile">打开文件</div>
-        <div id="videoPlay" style="width:500px;height:300px"></div>
+    <a-col :sm="8" style="margin-bottom: 20px;z-index: 10">
+      <a-card class="search-box" style="min-height:500px">
+        <a-directory-tree defaultExpandAll @select="onSelect" @expand="onExpand">
+          <a-tree-node title="parent 0" key="1">
+            <a-tree-node title="leaf 0-0" key="11" isLeaf />
+            <a-tree-node title="leaf 0-1" key="12" isLeaf />
+          </a-tree-node>
+          <a-tree-node title="parent 1" key="2">
+            <a-tree-node title="leaf 1-0" key="21" isLeaf />
+            <a-tree-node title="leaf 1-1" key="22" isLeaf />
+          </a-tree-node>
+        </a-directory-tree>
       </a-card>
     </a-col>
-
-    <a-col :sm="24" style="margin-bottom: 20px;z-index: 10">
+    <a-col :sm="16" style="margin-bottom: 20px;z-index: 10">
       <a-card class="search-box">
-        <div v-if="data.length > 0">
-          <a-list :grid="{ gutter: 16, column: 4 }" :dataSource="data">
-            <a-list-item slot="renderItem" slot-scope="item">
-              <a-card :title="item.title" @click="lookDetail(item)">时间</a-card>
-            </a-list-item>
-          </a-list>
-
-          <a-pagination
-            size="small"
-            :showTotal="ipagination.showTotal"
-            style="float:right"
-            v-if="dataSource.length > 0"
-            showQuickJumper
-            :pageSize.sync="ipagination.pageSize"
-            :total="ipagination.total"
-            v-model="ipagination.current"
-            @change="getDataSource"
-          />
-        </div>
-        <a-empty v-else />
+        <!-- <div @click="openFile">打开文件</div> -->
+        <div id="iframeData" v-show="startList" style="height:800px"></div>
+        <div id="videoPlay" style="height:800px" v-show="!startList"></div>
       </a-card>
     </a-col>
-    <a-modal title="课程详情" v-model="visibleDetail" width="70%"> </a-modal>
   </a-row>
 </template>
 
@@ -93,13 +77,14 @@ export default {
   data() {
     return {
       visibleDetail: false,
+      srcList: '',
       timeList: [
         { label: '分类1', value: 1, show: true },
         { label: '分类2', value: 2, show: true },
         { label: '分类3', value: 3, show: true },
         { label: '分类4', value: 4, show: true },
         { label: '分类5', value: 5, show: true },
-        { label: '分类6', value: 6, show: true }, 
+        { label: '分类6', value: 6, show: true },
         { label: '分类7', value: 7, show: true },
         { label: '分类8', value: 8, show: true }
       ],
@@ -111,9 +96,9 @@ export default {
         autoplay: false, //自动播放
         live: false,
         loadNext: 1000,
-        usehardwareeecoder: true,//硬件加速
+        usehardwareeecoder: true, //硬件加速
         video: textDes(
-          'https://ctop-media.oss-cn-beijing.aliyuncs.com/%E4%BB%8A%E6%97%A5%E5%A4%B4%E6%9D%A1%E8%A1%8C%E4%B8%9A%E6%9C%88%E6%8A%A5%E5%88%86%E4%BA%AB.mp4'
+          'https://ctop-media.oss-cn-beijing.aliyuncs.com/video/2020-03-25/0324%E6%96%97%E5%9C%B0%E4%B8%BB%20%E6%9B%B9%E7%90%B33-1585130744273.mp4'
         ) //视频地址(必填)
       },
       active: 1,
@@ -134,11 +119,56 @@ export default {
       url: {
         list: '/ctop/materialInfo/list'
       },
-      startList: true
+      startList: true,
+      simpleMode: false
     }
   },
   components: {},
   methods: {
+    onSelect(keys, event) {
+      console.log(event.node.isLeaf)
+      console.log('Trigger Select', keys, event)
+      if (event.node.isLeaf) {
+        if (keys[0] == '11') {
+          this.startList = false
+          this.videoObject.video = textDes(
+            'https://ctop-media.oss-cn-beijing.aliyuncs.com/video/2020-03-25/0324%E6%96%97%E5%9C%B0%E4%B8%BB%20%E6%9B%B9%E7%90%B33-1585130744273.mp4'
+          )
+        } else {
+          this.startList = true
+          getAction('http://www.ljserver.cn:8088/v1/api/file/getViewUrlWebPath', {
+            fileUrl: 'https://ctop-media.oss-cn-beijing.aliyuncs.com/zixingche.docx'
+          }).then(res => {
+            console.log(res)
+            let r = res.data
+            sessionStorage.wpsUrl = r.wpsUrl
+            sessionStorage.token = r.token
+            this.openWps(r.wpsUrl, r.token)
+          })
+        }
+
+        let player = new ckplayer(this.videoObject)
+      } else {
+        return
+      }
+    },
+    openWps(url, token) {
+      let _this = this
+      const wps = WebOfficeSDK.config({
+        mode: _this.simpleMode ? 'simple' : 'normal',
+        mount: document.querySelector('#iframeData'),
+        wpsUrl: url,
+        commonOptions: {
+          isShowTopArea: false // 隐藏顶部区域(头部和工具栏)
+        }
+      })
+      wps.setToken({ token: token })
+      wps.Application
+      wps.iframe.height = '800px'
+    },
+    onExpand() {
+      console.log('Trigger Expand')
+    },
     getDataSource(page, pageSize) {
       this.ipagination.current = page
       this.loadData()
@@ -178,11 +208,6 @@ export default {
   },
   mounted() {
     this.$nextTick(() => {
-      this.videoObject.video = textDes(
-        'https://ctop-media.oss-cn-beijing.aliyuncs.com/%E4%BB%8A%E6%97%A5%E5%A4%B4%E6%9D%A1%E8%A1%8C%E4%B8%9A%E6%9C%88%E6%8A%A5%E5%88%86%E4%BA%AB.mp4'
-      )
-      let player = new ckplayer(this.videoObject)
-
       //   var demo = WebOfficeSDK.config({
       //     url: 'https://ctop-media.oss-cn-beijing.aliyuncs.com/zixingche.docx', // 如果需要通过js-sdk传递token方式鉴权,则需要包含w_tokentype=1参数
       //   })

+ 2 - 2
vue.config.js

@@ -65,8 +65,8 @@ module.exports = {
        },*/
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
-        target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
-        // target: 'http://192.168.2.53:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        // target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
+        target: 'http://192.168.2.53:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.2.109:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云