Browse Source

完成邮箱,企业微信提醒,企业微信登录

zhuxinbo 5 năm trước cách đây
mục cha
commit
333dc119cf

+ 1 - 0
public/index.html

@@ -289,6 +289,7 @@
 
 <!-- update_begin author:sunjianlei date:20190524 for: 去指定页面的加载动画 -->
 <script src="https://ssl.captcha.qq.com/TCaptcha.js"></script>
+<script src="http://rescdn.qqmail.com/node/ww/wwopenmng/js/sso/wwLogin-1.0.0.js"></script>
 
 <script src="<%= BASE_URL %>xlsx.extendscript.js"></script>
 <script src="<%= BASE_URL %>xlsx.full.min.js"></script>

+ 15 - 0
src/api/manage.js

@@ -112,6 +112,21 @@ export function downFile(url, parameter) {
   })
 }
 
+/**
+ * 下载文件 用于excel导出
+ * @param url
+ * @param parameter
+ * @returns {*}
+ */
+export function downFilePost(url, parameter) {
+    return axios({
+      url: url,
+      data: parameter,
+      method: 'post',
+      responseType: 'blob'
+    })
+  }
+
 export function getProvince(url, parameter) {
     return axios({
       url: url,

+ 10 - 0
src/api/statistics.js

@@ -30,6 +30,16 @@ export function getStatistics(parameter) {
 }
 
 
+
+// getDailyReport 
+export function getDailyReport(parameter) {
+    return axios({
+      url: "/ctop/daily/getDailyReport",
+      method: 'post',
+      data: parameter
+    })
+}
+
 // /materialReport/getKuaiShouMaterialMarket
 //素材大盘
 export function getKuaiShouMaterialMarket(parameter) {

+ 83 - 78
src/config/router.config.js

@@ -1,78 +1,83 @@
-import {UserLayout, TabLayout, RouteView, BlankLayout, PageView} from '@/components/layouts'
-
-/**
- * 走菜单,走权限控制
- * @type {[null,null]}
- */
-export const asyncRouterMap = [
-
-  {
-    path: '/',
-    name: 'dashboard',
-    component: TabLayout,
-    meta: {title: '首页'},
-    redirect: '/dashboard/workplace',
-    children: []
-  },
-  {
-    path: '*', redirect: '/404', hidden: true
-  }
-]
-
-/**
- * 基础路由
- * @type { *[] }
- */
-export const constantRouterMap = [
-  {
-    path: '/user',
-    component: UserLayout,
-    redirect: '/user/login',
-    hidden: true,
-    children: [
-      {
-        path: 'login',
-        name: 'login',
-        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
-      },
-      {
-        path: 'register',
-        name: 'register',
-        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
-      },
-      {
-        path: 'register-result',
-        name: 'registerResult',
-        component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
-      },
-      {
-        path: 'alteration',
-        name: 'alteration',
-        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Alteration')
-      },
-      {
-        path: 'layer',
-        name: 'layer',
-        component: () => import(/* webpackChunkName: "user" */ '@/views/user/layer')
-      }
-    ]
-  },
-
-
-  {
-    path: '/test',
-    component: BlankLayout,
-    redirect: '/test/home',
-    children: [
-      {
-        path: 'home',
-        name: 'TestHome',
-        component: () => import('@/views/Home')
-      }
-    ]
-  },
-  {
-    path: '/404',
-    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
-  },
-]
+import {UserLayout, TabLayout, RouteView, BlankLayout, PageView} from '@/components/layouts'
+
+/**
+ * 走菜单,走权限控制
+ * @type {[null,null]}
+ */
+export const asyncRouterMap = [
+
+  {
+    path: '/',
+    name: 'dashboard',
+    component: TabLayout,
+    meta: {title: '首页'},
+    redirect: '/dashboard/workplace',
+    children: []
+  },
+  {
+    path: '*', redirect: '/404', hidden: true
+  }
+]
+
+/**
+ * 基础路由
+ * @type { *[] }
+ */
+export const constantRouterMap = [
+  {
+    path: '/user',
+    component: UserLayout,
+    redirect: '/user/login',
+    hidden: true,
+    children: [
+      {
+        path: 'login',
+        name: 'login',
+        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
+      },
+      {
+        path: 'transfer-local',
+        name: 'transfer-local',
+        component: () => import(/* webpackChunkName: "user" */ '@/views/user/transferLocal')
+      },
+      {
+        path: 'register',
+        name: 'register',
+        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
+      },
+      {
+        path: 'register-result',
+        name: 'registerResult',
+        component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
+      },
+      {
+        path: 'alteration',
+        name: 'alteration',
+        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Alteration')
+      },
+      {
+        path: 'layer',
+        name: 'layer',
+        component: () => import(/* webpackChunkName: "user" */ '@/views/user/layer')
+      }
+    ]
+  },
+
+
+  {
+    path: '/test',
+    component: BlankLayout,
+    redirect: '/test/home',
+    children: [
+      {
+        path: 'home',
+        name: 'TestHome',
+        component: () => import('@/views/Home')
+      }
+    ]
+  },
+  {
+    path: '/404',
+    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
+  },
+]

+ 1 - 1
src/permission.js

@@ -10,7 +10,7 @@ import {generateIndexRouter} from "@/utils/util"
 NProgress.configure({showSpinner: false}) // NProgress Configuration
 
 
-const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration'] // no redirect whitelist
+const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration','/user/transfer-local'] // no redirect whitelist
 
 router.beforeEach((to, from, next) => {
   NProgress.start() // start progress bar

+ 14 - 0
src/store/modules/user.js

@@ -58,6 +58,20 @@ const user = {
         })
       })
     },
+    //企业微信登录
+    wxLogin({commit}, userInfos) {
+
+              const result = userInfos.result
+              const userInfo = result.userInfo
+              Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
+              Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
+              Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
+              commit('SET_TOKEN', result.token)
+              commit('SET_INFO', userInfo)
+              commit('SET_NAME', {username: userInfo.username, realname: userInfo.realname, welcome: welcome()})
+              commit('SET_AVATAR', userInfo.avatar)
+
+      },
     //手机号登录
     PhoneLogin({commit}, userInfo) {
       return new Promise((resolve, reject) => {

+ 6 - 6
src/views/modules/Statistics/Statistics.vue

@@ -1362,12 +1362,12 @@ export default {
 
       var option = {
         backgroundColor: '#fff',
-        toolbox: {
-          show: true,
-          feature: {
-            dataView: { readOnly: false }
-          }
-        },
+        // toolbox: {
+        //   show: true,
+        //   feature: {
+        //     dataView: { readOnly: false }
+        //   }
+        // },
         tooltip: {
           trigger: 'axis',
           formatter: function(params) {

+ 528 - 0
src/views/modules/Statistics/alipayStatistics.vue

@@ -0,0 +1,528 @@
+<style lang="scss" scoped>
+.search-bar {
+  display: flex;
+  align-items: center;
+}
+.search-box p {
+  display: inline-block;
+  border: 1px solid #f2f2f2;
+  border-radius: 5px;
+  margin-right: 10px;
+  padding: 5px 10px;
+  cursor: pointer;
+}
+</style>
+<style>
+/* .data-display-statistics .ant-card-body {
+  padding: 0 15px;
+} */
+.data-display-statistics .ant-col-6 {
+  margin: 10px 0;
+}
+.data-display-statistics .ant-col-6 .ant-card-body {
+  display: flex;
+  justify-content: center;
+}
+.data-display-statistics .ant-col-6 p,
+.data-display-statistics .ant-col-6 span {
+  text-align: center;
+  line-height: 40px;
+  font-size: 30px;
+  font-weight: 600;
+  color: red;
+  margin: 0;
+}
+.search-box .ant-card-body {
+  padding: 5px 15px;
+}
+.data-display-statistics .ant-col-6 .ant-card-body .styleElse {
+  line-height: 60px;
+  height: 40px;
+  font-size: 16px;
+  font-weight: 400;
+  margin-left: 10px;
+}
+.ant-modal-wrap .yincang .ant-modal-content .ant-modal-footer {
+  display: none !important;
+}
+.yincang .ant-col-6 p {
+  text-align: left;
+  color: red;
+  font-size: 16px;
+  font-weight: 500;
+}
+.ant-table-thead div {
+  font-weight: 700;
+}
+.tool-tip {
+  position: absolute;
+  top: 65px;
+  right: 10px;
+}
+th div {
+  white-space: nowrap;
+}
+</style>
+<template>
+  <div class="data-statistics">
+    <a-row class="image-list-heading vm-panel">
+      <a-row type="flex" align="middle" justify="space-between" class="panel-body">
+        <div class="search-bar" style="width:100%">
+          <span>账户选择:</span>
+          <treeselect :appId.sync="appId" style="width:400px" />
+          <span style="margin-left:10px">返点比例:</span>
+          <a-input-number
+            :min="1"
+            :max="10"
+            :step="0.1"
+            v-model="discount"
+            placeholder="请输入折扣"
+            style="width:100px"
+          />
+          <span style="margin-left:10px">日期选择:</span>
+          <a-date-picker @change="getDate" :disabledDate="disabledDate" />
+          <a-button type="primary" style="margin:10px" @click="addUser">搜索</a-button>
+          <a-button
+            type="primary"
+            icon="reload"
+            @click="getDataReset"
+            style="background-color:#67c23a;border-color:#67c23a"
+            >刷新</a-button
+          >
+        </div>
+      </a-row>
+    </a-row>
+    <a-row :gutter="10" style="margin-top:10px">
+      <a-col :span="24">
+        <a-card
+          style="width:100%"
+          :tabList="tabListNoTitle"
+          :activeTabKey="noTitleKey"
+          @tabChange="key => onTabChange(key, 'noTitleKey')"
+        >
+          <div style="display:flex;margin-bottom:15px">
+            <!-- <a-select style="width: 120px" v-model="statHour" @change="getElseData" allowClear>
+              <a-select-option v-for="item of 24" :key="item - 1" :value="item - 1">{{ item - 1 }}</a-select-option>
+            </a-select> -->
+            <a-button type="primary" @click="exportExcel">导出</a-button>
+          </div>
+          <a-table
+            size="middle"
+            :columns="columns"
+            :dataSource="data"
+            bordered
+            id="outTable"
+            :pagination="ipagination"
+            :scroll="{ x: 1900 }"
+            :loading="loading"
+          >
+            <span slot="statDate" slot-scope="statDate">{{ statDate | formatDate }}</span>
+            <span slot="disCountCost" slot-scope="disCountCost">{{ disCountCost | toFixtwo }}</span>
+
+            <span slot="clickConversionRate" slot-scope="clickConversionRate">{{ clickConversionRate | getBo }}</span>
+
+            <span slot="cost" slot-scope="cost">{{ cost | toFixtwo }}</span>
+            <span slot="photoClickCost" slot-scope="photoClickCost">{{ photoClickCost | toFixtwo }}</span>
+            <span slot="impression1kCost" slot-scope="impression1kCost">{{ impression1kCost | toFixtwo }}</span>
+            <span slot="conversionPrice" slot-scope="conversionPrice">{{ conversionPrice | toFixtwo }}</span>
+            <span slot="discountConversionPrice" slot-scope="discountConversionPrice">{{
+              discountConversionPrice | toFixtwo
+            }}</span>
+            <span slot="contractRebateRealCharged" slot-scope="contractRebateRealCharged">{{
+              contractRebateRealCharged | toFixtwo
+            }}</span>
+            <span slot="actualCost" slot-scope="actualCost">{{ actualCost | toFixtwo }}</span>
+
+            <span slot="photoClickRatio" slot-scope="photoClickRatio">{{ photoClickRatio | getBo }}</span>
+            <span slot="actionRatio" slot-scope="actionRatio">{{ actionRatio | getBo }}</span>
+            <span slot="conversionRate" slot-scope="conversionRate">{{ conversionRate | getBo }}</span>
+            <span slot="photoClickRatio" slot-scope="photoClickRatio">{{ photoClickRatio | getBo }}</span>
+          </a-table>
+        </a-card>
+      </a-col>
+    </a-row>
+  </div>
+</template>
+
+<script>
+import ARow from 'ant-design-vue/es/grid/Row'
+import ACol from 'ant-design-vue/es/grid/Col'
+import countTo from 'vue-count-to'
+import moment from 'moment'
+import { getDailyReport } from '@api/statistics'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
+import axios from 'axios'
+import lifting from './components/lifting'
+import timeCheck from './components/timeCheck'
+import Treeselect from './components/Treeselect.vue'
+
+import { JeecgListMixin } from '@/mixins/ipagination'
+
+var length = 0
+var active = 1
+const columns = [
+  {
+    title: '消耗(¥)',
+    dataIndex: 'cost',
+    scopedSlots: { customRender: 'cost' },
+    align: 'center'
+  },
+  {
+    title: '展示数',
+    dataIndex: 'photoShow',
+    align: 'center'
+  },
+  {
+    title: '点击数',
+    dataIndex: 'photoClick',
+    align: 'center'
+  },
+  {
+    title: '点击率',
+    dataIndex: 'photoClickRatio',
+    align: 'center',
+    scopedSlots: { customRender: 'photoClickRatio' }
+  },
+  {
+    title: '平均点击花费',
+    dataIndex: 'photoClickCost',
+    align: 'center',
+    scopedSlots: { customRender: 'photoClickCost' }
+  },
+  {
+    title: '行为数',
+    dataIndex: 'bclick',
+    align: 'center'
+  },
+  {
+    title: '行为率',
+    dataIndex: 'actionRatio',
+    align: 'center',
+    scopedSlots: { customRender: 'actionRatio' }
+  },
+  {
+    title: '平均千次展示花费(¥)',
+    dataIndex: 'impression1kCost',
+    align: 'center',
+    scopedSlots: { customRender: 'impression1kCost' }
+  },
+
+  {
+    title: '转化数',
+    dataIndex: 'conversions',
+    align: 'center'
+  },
+  {
+    title: '转化单价(¥)',
+    dataIndex: 'conversionPrice',
+    align: 'center',
+    scopedSlots: { customRender: 'conversionPrice' }
+  },
+  {
+    title: '转化率',
+    dataIndex: 'conversionRate',
+    align: 'center',
+    scopedSlots: { customRender: 'conversionRate' }
+  },
+  {
+    title: '折后转化成本(¥)',
+    dataIndex: 'discountConversionPrice',
+    align: 'center',
+    scopedSlots: { customRender: 'discountConversionPrice' }
+  },
+  {
+    title: '激励花费(¥)',
+    dataIndex: 'contractRebateRealCharged',
+    align: 'center',
+    scopedSlots: { customRender: 'contractRebateRealCharged' }
+  },
+  {
+    title: '实际消耗(¥)',
+    dataIndex: 'actualCost',
+    align: 'center',
+    scopedSlots: { customRender: 'actualCost' }
+  }
+]
+
+const columnsGroup = [
+  {
+    title: '日期',
+    dataIndex: 'statDate',
+    scopedSlots: { customRender: 'statDate' },
+    align: 'center'
+  },
+  {
+    title: '账号',
+    dataIndex: 'accountId',
+    align: 'center'
+  },
+  {
+    title: '账号名称',
+    dataIndex: 'accountName',
+    align: 'center'
+  },
+  {
+    title: '计划名称',
+    dataIndex: 'campaignName',
+    align: 'center'
+  },
+  {
+    title: '广告组名称',
+    dataIndex: 'unitName',
+    align: 'center'
+  },
+  {
+    title: '消耗',
+    dataIndex: 'cost',
+    align: 'center',
+    scopedSlots: { customRender: 'cost' }
+  },
+  {
+    title: '折后消耗',
+    dataIndex: 'disCountCost',
+    align: 'center',
+    scopedSlots: { customRender: 'cost' }
+  },
+  {
+    title: '展示数',
+    dataIndex: 'photoShow',
+    align: 'center'
+  },
+  {
+    title: '点击数',
+    dataIndex: 'photoClick',
+    align: 'center'
+  },
+  {
+    title: '点击率',
+    dataIndex: 'photoClickRatio',
+    align: 'center',
+    scopedSlots: { customRender: 'photoClickRatio' }
+  },
+
+  {
+    title: '行为数',
+    dataIndex: 'bclick',
+    align: 'center'
+  },
+  {
+    title: '行为率',
+    dataIndex: 'actionRatio',
+    align: 'center',
+    scopedSlots: { customRender: 'actionRatio' }
+  },
+  {
+    title: '平均千次展示花费(¥)',
+    dataIndex: 'impression1kCost',
+    align: 'center',
+    scopedSlots: { customRender: 'impression1kCost' }
+  },
+  {
+    title: '平均点击花费',
+    dataIndex: 'photoClickCost',
+    align: 'center',
+    scopedSlots: { customRender: 'photoClickCost' }
+  },
+  {
+    title: '转化数',
+    dataIndex: 'conversions',
+    align: 'center'
+  },
+  {
+    title: '转化单价(¥)',
+    dataIndex: 'conversionPrice',
+    align: 'center',
+    scopedSlots: { customRender: 'conversionPrice' }
+  },
+  {
+    title: '转化率',
+    dataIndex: 'conversionRate',
+    align: 'center',
+    scopedSlots: { customRender: 'conversionRate' }
+  },
+  {
+    title: '折后转化成本(¥)',
+    dataIndex: 'discountConversionPrice',
+    align: 'center',
+    scopedSlots: { customRender: 'discountConversionPrice' }
+  },
+  {
+    title: '点击转化率',
+    dataIndex: 'clickConversionRate',
+    align: 'center',
+    scopedSlots: { customRender: 'clickConversionRate' }
+  }
+]
+
+export default {
+  name: 'data-display-statistics',
+  components: {
+    ACol,
+    ARow,
+    countTo,
+    lifting,
+    timeCheck,
+    Treeselect
+  },
+  mixins: [JeecgListMixin],
+  data: function() {
+    return {
+      title: '账户数据展示',
+      show: true,
+      data: [],
+      dataAll: null,
+      columns: columns,
+      options: [],
+      list: [],
+      appId: [],
+      tabListNoTitle: [
+        {
+          key: 'day',
+          tab: '分日数据'
+        },
+        {
+          key: 'group',
+          tab: '分组数据'
+        }
+      ],
+      noTitleKey: 'day',
+      discount: 1,
+      date: '',
+      loading: false
+    }
+  },
+  filters: {
+    formatDate: function(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
+      let h = date.getHours()
+      h = h < 10 ? '0' + h : h
+      let m = date.getMinutes()
+      m = m < 10 ? '0' + m : m
+      let s = date.getSeconds()
+      s = s < 10 ? '0' + s : s
+      return y + '-' + MM + '-' + d
+    },
+    toFixtwo: function(value) {
+      if (value) {
+        return value.toFixed(2)
+      } else {
+        return 0.0
+      }
+    },
+    getBo: function(value) {
+      if (value) {
+        return (value * 100).toFixed(2) + '%'
+      } else {
+        return '0.00%'
+      }
+    }
+  },
+  methods: {
+    moment,
+    onTabChange(key, type) {
+      console.log(key, type)
+      this[type] = key
+      if (key == 'day') {
+        this.columns = columns
+        this.data.push({ ...this.dataAll.dailyAccountReport, key: 1 })
+      } else {
+        this.columns = columnsGroup
+        this.data = this.dataAll.dailyGroupReport.map((item, index) => {
+          return {
+            ...item,
+            key: index
+          }
+        })
+      }
+      this.ipagination.total = this.data.length
+    },
+    disabledDate(current) {
+      return current && current > moment().subtract(1, 'day')
+    },
+    getDataReset() {
+      this.addUser()
+    },
+    addUser() {
+      var that = this
+      if (this.appId.length > 0 && this.date != '') {
+        that.getDailyReport()
+      } else {
+        this.$message.error('请选择账户及时间')
+      }
+    },
+    getDailyReport() {
+      var params = {}
+      params.accountIds = JSON.stringify(this.appId)
+      params.date = this.date
+      params.discount = this.discount
+      this.data = []
+      this.loading = true
+      getDailyReport(params).then(res => {
+        if (res.success) {
+          this.loading = false
+          this.dataAll = res.result
+          if (this.noTitleKey == 'day') {
+            this.data.push({ ...res.result.dailyAccountReport, key: 1 })
+          } else {
+            this.data = res.result.dailyGroupReport.map((item, index) => {
+              return {
+                ...item,
+                key: index
+              }
+            })
+          }
+          this.ipagination.total = this.data.length
+        }
+      })
+    },
+    getDate(value) {
+      if (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
+        this.date = y + '-' + MM + '-' + d
+      } else {
+        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
+        this.date = y + '-' + MM + '-' + d
+      }
+    },
+    exportExcel() {
+      var params = {}
+      params.accountIds = JSON.stringify(this.appId)
+      params.date = this.date
+      params.discount = this.discount
+      downFilePost('/ctop/daily/exportDailyReport', params).then(res => {
+        let blob = new Blob([res], {
+          type: 'application/vnd.ms-excel'
+        })
+        let downloadElement = document.createElement('a')
+        let href = window.URL.createObjectURL(blob) //创建下载的链接
+        downloadElement.href = href
+        downloadElement.download = this.date + '-日报' //下载后文件名
+        document.body.appendChild(downloadElement)
+        downloadElement.click() //点击下载
+        document.body.removeChild(downloadElement) //下载完成移除元素
+        window.URL.revokeObjectURL(href) //释放掉blob对象
+      })
+    }
+  },
+  watch: {},
+  distoryed() {},
+  mounted: function() {
+    this.$nextTick(() => {})
+  }
+}
+</script>

+ 16 - 2
src/views/modules/Statistics/components/Treeselect.vue

@@ -6,7 +6,8 @@
 <template>
   <div class="select-project">
     <treeselect
-      :multiple="true"
+      :multiple="multiple"
+      :disable-branch-nodes="!multiple"
       :options="options"
       :load-options="loadOptions"
       placeholder="请选择项目以及账户"
@@ -14,6 +15,10 @@
       :value-consists-of="valueConsistsOf"
       @select="update"
       @input="emitValue"
+      :limit="2"
+      :limitText="(count)=>{return '隐藏'+count+'条'}"
+      noChildrenText="该项目下暂无账号"
+      noOptionsText="暂无项目"
     />
   </div>
 </template>
@@ -36,6 +41,14 @@ export default {
     valueConsistsOf: 'LEAF_PRIORITY',
     options: []
   }),
+  props: {
+    multiple: {
+      type: Boolean,
+      default() {
+        return true
+      }
+    }
+  },
   components: { Treeselect },
   watch: {
     $route(n, o) {
@@ -46,6 +59,7 @@ export default {
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     update(node, id) {
       console.log(node, id)
+
       getAction('/ctop/userAllocation/getAccountListByProjectId', { projectId: node.id }).then(res => {
         console.log(res)
         if (res.code == 0) {
@@ -109,7 +123,7 @@ export default {
       })
     }
   },
-  activated() {
+  mounted() {
     this.getParticipateList()
   }
 }

+ 0 - 1
src/views/modules/Statistics/dataDisplayStatistics.vue

@@ -66,7 +66,6 @@ th div {
 <template>
   <div class="data-statistics">
     <a-row class="image-list-heading vm-panel">
-      <div class="panel-heading">{{ title }}</div>
       <a-row type="flex" align="middle" justify="space-between" class="panel-body">
         <div class="search-bar" style="width:100%">
           <span>账户选择:</span>

+ 1 - 1
src/views/modules/Statistics/refuseData.vue

@@ -56,7 +56,7 @@ th div {
       <a-row type="flex" align="middle" justify="space-between" class="panel-body">
         <div class="search-bar" style="width:100%;display:flex">
           <span style="line-height:35px">账户选择:</span>
-          <treeselect :appId.sync="appId" />
+          <treeselect :appId.sync="appId" :multiple="false"/>
           <!-- <a-select
             v-model="appId"
             showSearch

+ 0 - 0
src/views/modules/achievements/optimize.vue


+ 65 - 66
src/views/modules/advertiser/ProjectList.vue

@@ -1,11 +1,9 @@
 <template>
   <a-card :bordered="false">
-
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
       <a-form layout="inline">
         <a-row :gutter="24">
-
           <a-col :md="6" :sm="8">
             <a-form-item label="项目名称">
               <a-input placeholder="请输入项目名称" v-model="queryParam.projectName"></a-input>
@@ -16,14 +14,14 @@
               <a-input placeholder="请输入广告主名称" v-model="queryParam.advertiserName"></a-input>
             </a-form-item>
           </a-col>
-        <template>
-        <a-col :md="6" :sm="8">
-            <a-form-item label="负责人">
-              <a-input placeholder="请输入负责人" v-model="queryParam.responsible"></a-input>
-            </a-form-item>
-          </a-col>
+          <template>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="负责人">
+                <a-input placeholder="请输入负责人" v-model="queryParam.responsible"></a-input>
+              </a-form-item>
+            </a-col>
           </template>
-          <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="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
@@ -33,7 +31,6 @@
               </a> -->
             </span>
           </a-col>
-
         </a-row>
       </a-form>
     </div>
@@ -45,7 +42,6 @@
 
     <!-- table区域-begin -->
     <div>
-
       <a-table
         ref="table"
         size="middle"
@@ -55,19 +51,18 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        @change="handleTableChange">
-
+        @change="handleTableChange"
+      >
+        <span slot="maxBid" slot-scope="text">{{ text / 1000 }}</span>
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
 
           <a-divider type="vertical" />
-         
+
           <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
             <a>删除</a>
           </a-popconfirm>
-
         </span>
-
       </a-table>
     </div>
     <!-- table区域-end -->
@@ -78,61 +73,65 @@
 </template>
 
 <script>
-  import ProjectModal from './modules/ProjectModal'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import ProjectModal from './modules/ProjectModal'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 
-  export default {
-    name: "ProjectList",
-    mixins:[JeecgListMixin],
-    components: {
-      ProjectModal
-    },
-    data () {
-      return {
-        description: '项目管理页面',
-        // 表头
-        columns: [
-		   {
-            title: '项目名称',
-            align:"center",
-            dataIndex: 'projectName'
-           },
-		   {
-            title: '广告主名称',
-            align:"center",
-            dataIndex: 'advertiserName'
-           },
-		   {
-            title: '负责人',
-            align:"center",
-            dataIndex: 'responsibleName'
-           },
-          {
-            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",
-       },
+export default {
+  name: 'ProjectList',
+  mixins: [JeecgListMixin],
+  components: {
+    ProjectModal
+  },
+  data() {
+    return {
+      description: '项目管理页面',
+      // 表头
+      columns: [
+        {
+          title: '项目名称',
+          align: 'center',
+          dataIndex: 'projectName'
+        },
+        {
+          title: '广告主名称',
+          align: 'center',
+          dataIndex: 'advertiserName'
+        },
+        {
+          title: '最高出价',
+          align: 'center',
+          dataIndex: 'maxBid',
+          scopedSlots: { customRender: 'maxBid' }
+        },
+        {
+          title: '负责人',
+          align: 'center',
+          dataIndex: 'responsibleName'
+        },
+        {
+          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'
+      }
     }
   },
   computed: {
-    importExcelUrl: function(){
-      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    importExcelUrl: function() {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
     }
   },
-    methods: {
-     
-    }
-  }
+  methods: {}
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less'
-</style>
+@import '~@assets/less/common.less';
+</style>

+ 12 - 7
src/views/modules/advertiser/ProjectMemberList.vue

@@ -70,7 +70,7 @@
     </a-modal>
 
     <!--  添加项目成员 -->
-    <a-modal title="添加项目成员" v-model="visibleAdd" @ok="handleOkAdd">
+    <a-modal title="添加项目成员" v-model="visibleAdd" @ok="handleOkAdd" :confirmLoading="confirmLoading">
       <!-- /sys/user/getAllUserList -->
       <a-select
         v-model="appId"
@@ -91,7 +91,9 @@
           v-for="appModel in options"
           :key="appModel.userId + new Date().getTime()"
           :value="appModel.userId"
-          >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
+        >
+          {{ appModel.realName }}
+          &#12288;&#12288;{{ appModel.roleName }}</a-select-option
         >
       </a-select>
     </a-modal>
@@ -161,7 +163,7 @@
         rowKey="id"
         :columns="columnsAccount"
         :dataSource="dataAccount"
-        :pagination="false"
+        :pagination="ipagination"
         :loading="loadingAccount"
       >
         <span slot="createTime" slot-scope="createTime">{{ createTime | getDate }}</span>
@@ -178,12 +180,14 @@ import { mapGetters } from 'vuex'
 
 import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
 
+import { JeecgListMixin } from '@/mixins/ipagination'
 export default {
   name: 'ProjectMemberList',
   components: {
     ProjectMemberModal,
     JSelectUserByDep
   },
+  mixins: [JeecgListMixin],
   data() {
     return {
       title: '',
@@ -267,7 +271,6 @@ export default {
       dataAccount: [],
       dataSource: [],
       dataElse: [],
-      ipagination: {},
       loading: false,
       memberList: [],
       visibleAdd: false,
@@ -279,7 +282,8 @@ export default {
       appId: [],
       list: [],
       options: [],
-      visibleAccount: false
+      visibleAccount: false,
+      confirmLoading:false
     }
   },
   computed: {
@@ -450,9 +454,9 @@ export default {
       params.projectId = this.itemJson.id
       params.projectName = this.itemJson.projectName
       params.memberArr = this.appId
-
+      this.confirmLoading = true
       httpAction('/ctop/projectMember/batchAdd', params, 'post').then(res => {
-        console.log(res)
+        this.confirmLoading = false
         if (res.success) {
           this.visibleAdd = false
           this.appId = []
@@ -484,6 +488,7 @@ export default {
           if (res.success) {
             this.dataAccount = res.result
             this.loadingAccount = false
+            this.ipagination.total = res.result.length
           }
         })
       }

+ 9 - 2
src/views/modules/advertiser/modules/ProjectModal.vue

@@ -26,6 +26,9 @@
             }}</a-select-option>
           </a-select>
         </a-form-item>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高出价">
+          <a-input placeholder="请输入最高出价" v-decorator="['maxBid', validatorRules.maxBid]" addonAfter="元" />
+        </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="负责人">
           <a-select
             showSearch
@@ -83,7 +86,8 @@ export default {
       validatorRules: {
         projectName: { rules: [{ required: true, message: '请输入项目名称!' }] },
         advertiserId: { rules: [{ required: true, message: '请选择广告主!' }] },
-        responsibleName: { rules: [{ required: true, message: '请选择负责人!' }] }
+        responsibleName: { rules: [{ required: true, message: '请选择负责人!' }] },
+        maxBid: { rules: [{ required: true, message: '请输入最高出价!' }] }
       },
       url: {
         add: '/ctop/project/add',
@@ -140,11 +144,13 @@ export default {
       if (params.advertiserId) {
         params.advertiserId = { key: params.advertiserId, label: params.advertiserName }
       }
+      console.log(record)
       this.form.resetFields()
       this.model = Object.assign({}, params)
+      this.model.maxBid = this.model.maxBid ? this.model.maxBid / 1000 : 0
       this.visible = true
       this.$nextTick(() => {
-        this.form.setFieldsValue(pick(this.model, 'projectName', 'advertiserId', 'responsibleName'))
+        this.form.setFieldsValue(pick(this.model, 'projectName', 'advertiserId', 'responsibleName', 'maxBid'))
         this.resId = record.responsibleId
         getAction('/sys/user/getAllUserList', '').then(res => {
           console.log(res)
@@ -176,6 +182,7 @@ export default {
           }
           var data = values.advertiserId
           let formData = Object.assign(this.model, values)
+          formData.maxBid = formData.maxBid * 1000
           //时间格式化
           formData.advertiserId = data.key
           formData.advertiserName = data.label

+ 68 - 77
src/views/modules/kuaishouapp/account/accountIndex.vue

@@ -8,38 +8,20 @@
 <template>
   <div class="account-statistics">
     <a-row class="image-list-heading vm-panel">
-      <a-row>
-        <!-- <div class="panel-heading">{{ title }}</div> -->
-        <!-- <a-select defaultValue="jack" style="width:30%" class="panel-heading">
-          <a-select-option value="jack">账户1</a-select-option>
-          <a-select-option value="lucy">账户2</a-select-option>
-          <a-select-option value="Yiminghe">账户3</a-select-option>
-        </a-select>-->
-        <a-select
-          v-model="appId"
-          showSearch
-          allowClear
-          placeholder="请选择账户"
-          optionFilterProp="children"
-          style="width:600px;margin-left:20px"
-        >
-          <a-select-option
-            v-for="appModel in options"
-            :key="appModel.id+new Date().getTime()"
-            :value="appModel.accountId"
-          >{{appModel.advertiserName}}&#12288;&#12288;{{appModel.accountId}}&#12288;&nbsp;&#12288;{{appModel.authName}}&#12288;&#12288;{{appModel.operationName}}</a-select-option>
-        </a-select>
+      <a-col :span="24" style="display:flex">
+        <Treeselect :appId.sync="appId" :multiple="false" style="margin:8px 20px" />
         <a-button type="primary" style="margin:10px" @click="addUser">搜索</a-button>
-      </a-row>
+      </a-col>
     </a-row>
     <a-row :gutter="15" style="margin-top:15px">
-      <a-col :span="8">
+      <a-col :span="12">
         <a-card hoverable title="总花费">
-          <countTo :startVal="0" :endVal="1000" :duration="duration" :decimals="2" class="count"></countTo>
+          <countTo :startVal="0" :endVal="cost" :duration="duration" :decimals="2" class="count"></countTo>
         </a-card>
       </a-col>
-      <a-col :span="8">
+      <!-- <a-col :span="8">
         <a-card hoverable title="预算">
+          
           <countTo
             :startVal="0"
             :endVal="many"
@@ -48,24 +30,19 @@
             v-show="!showEdit"
             class="count"
           ></countTo>
-          <a-input-number
-            :min="0"
-            :step="0.01"
-            v-show="showEdit"
-            v-model="manyTwo"
-            style="width:200px"
-          />
-          <!-- <a-input v-show="showEdit" v-model="manyTwo" style="width:200px"></a-input> -->
+          <span v-show="!showEdit" class="count">{{ many > 0 ? many.toFixed(2) : '不限制预算' }}</span>
+          <a-input-number :min="0" :step="0.01" v-show="showEdit" v-model="manyTwo" style="width:200px" />
+          <a-input v-show="showEdit" v-model="manyTwo" style="width:200px"></a-input>
           <a-icon
-            :type="showEdit?'check':'edit'"
-            @click="showEdit=!showEdit,show()"
+            :type="showEdit ? 'check' : 'edit'"
+            @click=";(showEdit = !showEdit), show()"
             style="margin-left:10px"
           />
         </a-card>
-      </a-col>
-      <a-col :span="8">
+      </a-col> -->
+      <a-col :span="12">
         <a-card hoverable title="余额">
-          <countTo :startVal="0" :endVal="1000" :duration="duration" :decimals="2" class="count"></countTo>
+          <countTo :startVal="0" :endVal="balance" :duration="duration" :decimals="2" class="count"></countTo>
         </a-card>
       </a-col>
     </a-row>
@@ -73,6 +50,7 @@
       <a-card>
         <a-button @click="dianji" style="margin-bottom:15px">新增广告计划</a-button>
         <a-table
+          size="middle"
           :columns="columns"
           :dataSource="dataList"
           bordered
@@ -80,19 +58,20 @@
           :customRow="rowClick"
           :pagination="ipagination"
         >
-          <template slot="dayBudget" slot-scope="text,record">
+          <template slot="dayBudget" slot-scope="text, record">
             <div style="display:flex;justify-content: center;">
-              <span v-show="!record.edit" class="count">{{text?text.toFixed(2):'不限制预算'}}</span>
+              <span v-show="!record.edit" class="count">{{ text ? text.toFixed(2) : '不限制预算' }}</span>
               <a-input-number
                 :min="0"
                 :step="0.01"
                 v-show="record.edit"
                 v-model="record.elseMoney"
                 style="width:150px"
+                @fouse.stop
               />
               <a-icon
-                :type="record.edit?'check':'edit'"
-                @click.stop="record.edit=!record.edit,editShow(record)"
+                :type="record.edit ? 'check' : 'edit'"
+                @click.stop=";(record.edit = !record.edit), editShow(record)"
                 style="margin-left:10px"
                 class="count"
               />
@@ -110,11 +89,12 @@ import ACol from 'ant-design-vue/es/grid/Col'
 import moment from 'moment'
 import countTo from 'vue-count-to'
 import { mapGetters } from 'vuex'
-import { deleteAction, getAction } from '@/api/manage'
+import { deleteAction, getAction, postAction } from '@/api/manage'
 
 import { getMaterialAccount } from '@api/statistics'
 
-// import lifting from './components/lifting'
+import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+
 var columns = [
   {
     title: '广告计划名称',
@@ -133,7 +113,7 @@ var columns = [
   {
     title: '计划类型',
     align: 'center',
-    dataIndex: 'type'
+    dataIndex: 'campaignType'
   },
   {
     title: '应用创建id',
@@ -151,28 +131,23 @@ var columns = [
     align: 'center',
     dataIndex: 'url'
   },
-
-  {
-    title: '操作',
-    dataIndex: 'action',
-    align: 'center',
-    scopedSlots: { customRender: 'action' }
-  }
 ]
 export default {
   name: 'account-statistics',
   components: {
     ACol,
     ARow,
-    countTo
+    countTo,
+    Treeselect
   },
-
   data: function() {
     return {
       duration: 1000,
       showEdit: false,
-      many: 1200,
-      manyTwo: null,
+      many: 0,
+      manyTwo: 0,
+      cost: 0,
+      balance: 0,
       columns,
       dataList: [],
       appId: '',
@@ -205,21 +180,19 @@ export default {
       ipagination: {
         current: 1,
         pageSize: 10,
-        pageSizeOptions: ['10', '20', '30'],
         showTotal: (total, range) => {
           return range[0] + '-' + range[1] + ' 共' + total + '条'
         },
         showQuickJumper: true,
-        showSizeChanger: true,
+        onChange: current => {
+          // 切换分页时的回调,
+          // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+          this.ipagination.current = current
+          this.addUser()
+        },
         total: 0
       },
-      url: {
-        list: '/kuaishou/kuaiShouCampaignTemplate/list',
-        delete: '/kuaishou/kuaiShouCampaignTemplate/delete',
-        deleteBatch: '/kuaishou/kuaiShouCampaignTemplate/deleteBatch',
-        exportXlsUrl: 'kuaishou/kuaiShouCampaignTemplate/exportXls',
-        importExcelUrl: 'kuaishou/kuaiShouCampaignTemplate/importExcel'
-      }
+      url: {}
     }
   },
   methods: {
@@ -228,25 +201,43 @@ export default {
       this.loading = true
       this.dataList = []
       var params = {}
-    //   params.accountId = this.appId + ''
+      params.accountId = this.appId + ''
       params.pageNo = this.ipagination.current
       params.pageSize = this.ipagination.pageSize
       if (this.appId) {
-        getAction(this.url.list, params).then(res => {
-          if (res.code == 0) {
-            this.dataList = res.result.records.map((v, index) => {
-              return {
-                ...v,
-                key: index,
-                edit: false
-              }
-            })
-          }
-        })
+        this.getSpend(params)
+        this.getCampaignList(params)
       } else {
         this.$message.error('请选择账户')
       }
     },
+    getCampaignList(params) {
+      getAction('/kuaishou/batch/getCampaignList', params).then(res => {
+        if (res.code == 0) {
+          this.dataList = res.result.records.map((v, index) => {
+            return {
+              ...v,
+              key: index,
+              edit: false
+            }
+          })
+          this.ipagination.total = res.result.total
+        }
+      })
+    },
+    getSpend(item) {
+      getAction('/kuaishou/batch/spend', { accountId: item.accountId }).then(res => {
+        if (res.success) {
+          console.log(res)
+          this.many = res.result.budget
+          this.manyTwo = res.result.budget
+          this.cost = res.result.cost
+          this.balance = res.result.balance
+        } else {
+          this.$message.error(res.message)
+        }
+      })
+    },
     show() {
       if (!this.showEdit) {
         this.many = this.manyTwo

+ 148 - 259
src/views/modules/material/materialList.vue

@@ -184,139 +184,129 @@ a {
 
     <!-- table区域-begin -->
     <!-- <div> -->
-    <a-tabs @change="callback" type="card" id="material-card" v-model="activeKey" style="position:relative;z-index:100">
-      <a-tab-pane :tab="item.tab" v-for="item of materialList" :key="item.value">
-        <!-- 操作按钮区域 -->
 
-        <div class="table-operator" style="position:relative;z-index:100">
-          <a-button @click="visible = true" type="primary" icon="plus">新增</a-button>
-          <a-button @click="onCheckAllChange" v-if="queryParam.projectId && active == '1'">{{
-            checkAll ? '取消  (  ' + checkArr.length + '  )' : '全选'
-          }}</a-button>
-          <a-button v-if="queryParam.projectId && active == '1'" :disabled="checkArr.length == 0" @click="tongbu"
-            >一键同步</a-button
-          >
-        </div>
+    <div class="table-operator" style="position:relative;z-index:100">
+      <a-button @click="visible = true" type="primary" icon="plus">新增</a-button>
+      <a-button @click="onCheckAllChange" v-if="queryParam.projectId && active == '1'">{{
+        checkAll ? '取消  (  ' + checkArr.length + '  )' : '全选'
+      }}</a-button>
+      <a-button v-if="queryParam.projectId && active == '1'" :disabled="checkArr.length == 0" @click="tongbu"
+        >一键同步</a-button
+      >
+    </div>
 
-        <a-tabs @change="callbackTwo" v-model="active">
-          <a-tab-pane :tab="item.tab" v-for="item of examinelList" :key="item.value">
-            <a-checkbox-group @change="onChangeCheck" v-model="checkArr" class="home-card">
-              <div class="home-item" v-for="(items, index) in dataSource" :key="index" @click="showDetail(items)">
-                <div class="home-right">
-                  <a-badge
-                    :count="checkArr.indexOf(items.id) > -1 ? checkArr.indexOf(items.id) + 1 : 0"
-                    :numberStyle="{ backgroundColor: '#52c41a' }"
-                    style="width:100%"
+    <a-tabs @change="callbackTwo" v-model="active" id="material-card" type="card">
+      <a-tab-pane :tab="item.tab" v-for="item of examinelList" :key="item.value">
+        <div v-if="dataSource.length > 0">
+          <a-checkbox-group @change="onChangeCheck" v-model="checkArr" class="home-card">
+            <div class="home-item" v-for="(items, index) in dataSource" :key="index" @click="showDetail(items)">
+              <div class="home-right">
+                <a-badge
+                  :count="checkArr.indexOf(items.id) > -1 ? checkArr.indexOf(items.id) + 1 : 0"
+                  :numberStyle="{ backgroundColor: '#52c41a' }"
+                  style="width:100%"
+                >
+                  <span
+                    style="color: #999; fontSize: 16px;padding-bottom:10px;display:block;width:100%;overflow: hidden;text-overflow: ellipsis;"
                   >
-                    <span
-                      style="color: #999; fontSize: 16px;padding-bottom:10px;display:block;width:100%;overflow: hidden;text-overflow: ellipsis;"
-                    >
-                      {{ items.materialName }}
-                    </span>
-                  </a-badge>
-                  <div style="display:flex;justify-content:center;width:100%;height:200px;position:relative">
-                    <div
-                      class="home-num bg"
-                      v-if="activeKey == 'image'"
-                      :style="{
-                        backgroundImage: 'url(' + items.url + ')',
-                        backgroundSize: 'cover',
-                        backgroundRepeat: 'no-repeat',
-                        backgroundPosition: 'center center',
-                        overflow: 'hidden',
-                        position: 'relative',
-                        width: '100%',
-                        height: '100%'
-                      }"
-                    ></div>
+                    {{ items.materialName }}
+                  </span>
+                </a-badge>
+                <div style="display:flex;justify-content:center;width:100%;height:200px;position:relative">
+                  <div
+                    class="home-num bg"
+                    v-if="activeKey == 'image'"
+                    :style="{
+                      backgroundImage: 'url(' + items.url + ')',
+                      backgroundSize: 'cover',
+                      backgroundRepeat: 'no-repeat',
+                      backgroundPosition: 'center center',
+                      overflow: 'hidden',
+                      position: 'relative',
+                      width: '100%',
+                      height: '100%'
+                    }"
+                  ></div>
+                  <img
+                    v-if="activeKey == 'image'"
+                    :src="items.url"
+                    style="height:200px;max-width:100%;position:absolute;z-index:10;"
+                  />
+                </div>
 
-                    <img
-                      v-if="activeKey == 'image'"
-                      :src="items.url"
-                      style="height:200px;max-width:100%;position:absolute;z-index:10;"
-                    />
-                    <div v-else style="display:flex;justify-content:center;width:100%;height:200px;position:relative">
-                      <video
-                        :src="items.url"
-                        @canplay="a(items)"
-                        style="height:200px;max-width:100%;position:absolute;z-index:10;"
-                      />
-                      <img
-                        src="./timg.gif"
-                        v-if="!items.showVideo"
-                        alt=""
-                        style="height:200px;max-width:100%;position:absolute;z-index:11;"
-                        @click.stop
-                      />
+                <div v-if="active == '2'" class="bh">驳回原因:{{ items.refuseReason }}</div>
+                <span style="color: black; fontSize: 16px;padding-top:10px;display:block;width:100%" @click.stop>
+                  {{ items.createTime | getDate }}
+                  <a
+                    href="javascript:;"
+                    style="margin-left:20px"
+                    @click="edit(items, '2')"
+                    v-show="active == '2'"
+                    v-if="items.userId == userInfo().id"
+                  >
+                    修改</a
+                  >
+                  <a-popconfirm
+                    @confirm="okEditShow(items, '2')"
+                    v-show="active != '2'"
+                    v-if="
+                      role.roleCode == 'operator' ||
+                        role.roleCode == 'kuaishouOperationManager' ||
+                        role.roleCode == 'admin'
+                    "
+                  >
+                    <div slot="title">
+                      <div>
+                        驳回原因:
+                        <a-textarea
+                          placeholder="请输入原因"
+                          v-model="refuseReason"
+                          :autosize="{ minRows: 3, maxRows: 10 }"
+                        />
+                      </div>
+                      <div>
+                        截图:
+                        <upload-to-ali
+                          v-model="refuseFile"
+                          :customDomain="customDomain"
+                          multiple
+                          preview
+                          :region="region"
+                          :bucket="bucket"
+                          :accept="acceptImage"
+                          :max="10"
+                          :size="1024000"
+                          :accessKeyId="accessKeyId"
+                          :accessKeySecret="accessKeySecret"
+                          :dir="dirImg"
+                        ></upload-to-ali>
+                      </div>
                     </div>
-                  </div>
+                    <a href="javascript:;" style="margin-left:20px">驳回</a>
+                  </a-popconfirm>
 
-                  <div v-if="active == '2'" class="bh">驳回原因:{{ items.refuseReason }}</div>
-                  <span style="color: black; fontSize: 16px;padding-top:10px;display:block;width:100%" @click.stop>
-                    {{ items.createTime | getDate }}
+                  <a-popconfirm
+                    @confirm="okEditShow(items, '1')"
+                    v-show="active != '1'"
+                    v-if="
+                      role.roleCode == 'operator' ||
+                        role.roleCode == 'kuaishouOperationManager' ||
+                        role.roleCode == 'admin'
+                    "
+                  >
+                    <div slot="title">
+                      <div>
+                        广告语:
+                        <a-textarea
+                          placeholder="请输入"
+                          v-model="refuseReason"
+                          :autosize="{ minRows: 3, maxRows: 10 }"
+                        />
+                      </div>
+                    </div>
                     <a
                       href="javascript:;"
                       style="margin-left:20px"
-                      @click="edit(items, '2')"
-                      v-show="active == '2'"
-                      v-if="items.userId == userInfo().id"
-                    >
-                      修改</a
-                    >
-                    <!-- <a
-                      href="javascript:;"
-                      style="margin-left:20px"
-                      @click="edit(items, '2')"
-                      v-show="active == '0' || active == '1'"
-                      v-if="
-                        role.roleCode == 'operator' ||
-                          role.roleCode == 'kuaishouOperationManager' ||
-                          role.roleCode == 'admin'
-                      "
-                    >
-                      驳回</a
-                    > -->
-                    <a-popconfirm
-                      @confirm="okEditShow(items, '2')"
-                      v-show="active != '2'"
-                      v-if="
-                        role.roleCode == 'operator' ||
-                          role.roleCode == 'kuaishouOperationManager' ||
-                          role.roleCode == 'admin'
-                      "
-                    >
-                      <div slot="title">
-                        <div>
-                          驳回原因:
-                          <a-textarea
-                            placeholder="请输入原因"
-                            v-model="refuseReason"
-                            :autosize="{ minRows: 3, maxRows: 10 }"
-                          />
-                        </div>
-                        <div>
-                          截图:
-                          <upload-to-ali
-                            v-model="refuseFile"
-                            :customDomain="customDomain"
-                            multiple
-                            preview
-                            :region="region"
-                            :bucket="bucket"
-                            :accept="acceptImage"
-                            :max="10"
-                            :size="1024000"
-                            :accessKeyId="accessKeyId"
-                            :accessKeySecret="accessKeySecret"
-                            :dir="dirImg"
-                          ></upload-to-ali>
-                        </div>
-                      </div>
-                      <a href="javascript:;" style="margin-left:20px">驳回</a>
-                    </a-popconfirm>
-
-                    <a-popconfirm
-                      @confirm="okEditShow(items, '1')"
                       v-show="active != '1'"
                       v-if="
                         role.roleCode == 'operator' ||
@@ -324,44 +314,32 @@ a {
                           role.roleCode == 'admin'
                       "
                     >
-                      <div slot="title">
-                        <div>
-                          广告语:
-                          <a-textarea
-                            placeholder="请输入"
-                            v-model="refuseReason"
-                            :autosize="{ minRows: 3, maxRows: 10 }"
-                          />
-                        </div>
-                      </div>
-                      <a
-                        href="javascript:;"
-                        style="margin-left:20px"
-                        v-show="active != '1'"
-                        v-if="
-                          role.roleCode == 'operator' ||
-                            role.roleCode == 'kuaishouOperationManager' ||
-                            role.roleCode == 'admin'
-                        "
-                      >
-                        通过审核</a
-                      >
-                    </a-popconfirm>
-                    <a-checkbox :value="items.id" style="float:right"></a-checkbox
-                  ></span>
-                </div>
+                      通过审核</a
+                    >
+                  </a-popconfirm>
+                  <a-checkbox :value="items.id" style="float:right"></a-checkbox
+                ></span>
               </div>
-            </a-checkbox-group>
-            <a-pagination
-              style="float:right"
-              v-if="dataSource.length > 0"
-              showQuickJumper
-              :pageSize.sync="ipagination.pageSize"
-              :total="ipagination.total"
-              v-model="ipagination.current"
-              @change="getDataSource"
-          /></a-tab-pane>
-        </a-tabs>
+            </div>
+          </a-checkbox-group>
+          <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>
+        <div v-else style="width:100%;height:400px;display:flex;justify-content: center;align-items: center;">
+          <img
+            src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
+            alt=""
+          />
+        </div>
       </a-tab-pane>
     </a-tabs>
     <a-modal title="添加素材" v-model="visible" @ok="handleOk" @cancel="close">
@@ -379,11 +357,7 @@ a {
             </a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item
-          :label-col="labelCol"
-          :wrapper-col="wrapperCol"
-          :label="activeKey == 'image' ? '图片素材上传' : '视频素材上传'"
-        >
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="图片素材上传">
           <upload-to-ali
             v-model="urlList.url"
             :customDomain="customDomain"
@@ -417,71 +391,10 @@ a {
             @loaded="overUpload"
           ></upload-to-ali>
         </a-form-item>
-        <div v-if="activeKey == 'video'">
-          <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="策划" v-if="activeKey == 'video'">
-            <a-select
-              v-decorator="[
-                'planId', // 给表单赋值或拉取表单时,该input对应的key
-                { rules: [{ required: true, message: '请选择策划!' }] }
-              ]"
-            >
-              <a-select-option :value="item.userId" v-for="item of ascription.clipId" :key="item.userId">
-                {{ item.userName }}
-              </a-select-option>
-            </a-select>
-          </a-form-item>
-          <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="拍摄" v-if="activeKey == 'video'">
-            <a-select
-              v-decorator="[
-                'shotId', // 给表单赋值或拉取表单时,该input对应的key
-                { rules: [{ required: true, message: '请选择策划!' }] }
-              ]"
-            >
-              <a-select-option :value="item.userId" v-for="item of ascription.shotId" :key="item.userId">
-                {{ item.userName }}
-              </a-select-option>
-            </a-select>
-          </a-form-item>
-          <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="剪辑">
-            <a-select
-              v-decorator="[
-                'clipId', // 给表单赋值或拉取表单时,该input对应的key
-                { rules: [{ required: true, message: '请选择策划!' }] }
-              ]"
-            >
-              <a-select-option :value="item.userId" v-for="item of ascription.clipId" :key="item.userId">
-                {{ item.userName }}
-              </a-select-option>
-            </a-select>
-          </a-form-item>
-          <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="平面" v-if="activeKey == 'image'">
-            <a-select
-              v-decorator="[
-                'planeId', // 给表单赋值或拉取表单时,该input对应的key
-                { rules: [{ required: true, message: '请选择策划!' }] }
-              ]"
-            >
-              <a-select-option :value="item.userId" v-for="item of ascription.planeId" :key="item.userId">
-                {{ item.userName }}
-              </a-select-option>
-            </a-select>
-          </a-form-item>
-        </div>
-        <div v-else>
-          <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="role.roleName">
-            <!-- <a-select
-              v-decorator="[
-                role.roleCode, // 给表单赋值或拉取表单时,该input对应的key
-                { rules: [{ required: true, message: '请选择' + role.roleName }] }
-              ]"
-            >
-              <a-select-option :value="item.userId" v-for="item of ascription.clipId" :key="item.userId">
-                {{ item.userName }}
-              </a-select-option>
-            </a-select> -->
-            <span>{{ userInfo().realname }}</span>
-          </a-form-item>
-        </div>
+
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="role.roleName">
+          <span>{{ userInfo().realname }}</span>
+        </a-form-item>
         <a-form-item
           :label-col="labelCol"
           :wrapper-col="{
@@ -540,35 +453,15 @@ a {
           style="width:50%;padding:10px;box-sizing:border-box;display:flex;justify-content:center;border-right:1px solid #f2f2f2"
         >
           <img :src="showUrl" alt="" v-if="activeKey == 'image'" style="height:100%" />
-          <video class="video" :src="showUrl" controls="controls" v-else style="width:100%">
-            您的浏览器不支持 video 标签。
-          </video>
         </div>
         <div style="flex:3;padding:10px;box-sizing:border-box;">
           <a-form v-if="detail" class="detail">
-            <a-form-item label="素材id" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              {{ detail.parameter.materialId }}
-            </a-form-item>
-            <a-form-item
-              label="视频时长"
-              :label-col="{ span: 6 }"
-              :wrapper-col="{ span: 18 }"
-              v-if="activeKey == 'video'"
-            >
-              {{ detail.parameter.second }}秒
-            </a-form-item>
             <a-form-item label="尺寸" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
               {{ detail.parameter.width }}*{{ detail.parameter.height }}
             </a-form-item>
             <a-form-item label="大小" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
               {{ detail.parameter.size }}
             </a-form-item>
-            <a-form-item label="策划" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" v-if="activeKey == 'video'">
-              {{ detail.ascription.planName }}
-            </a-form-item>
-            <a-form-item label="拍摄" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" v-if="activeKey == 'video'">
-              {{ detail.ascription.shotName }}
-            </a-form-item>
             <a-form-item
               label="剪辑"
               :label-col="{ span: 6 }"
@@ -722,10 +615,6 @@ export default {
       visibleDetail: false,
       activeKey: 'image',
       active: '0',
-      materialList: [
-        { value: 'image', tab: '图片素材' },
-        { value: 'video', tab: '视频素材' }
-      ],
       examinelList: [
         { value: '0', tab: '未审核' },
         { value: '1', tab: '已批准' },
@@ -1119,10 +1008,10 @@ export default {
       })
     },
     close() {
-    //   this.form.resetFields()
-    //   this.urlList = { url: '', md5: '', name: '' }
-    //   this.watermarkUrl = { url: '', md5: '', name: '' }
-    //   this.tags = []
+      //   this.form.resetFields()
+      //   this.urlList = { url: '', md5: '', name: '' }
+      //   this.watermarkUrl = { url: '', md5: '', name: '' }
+      //   this.tags = []
     },
     onChange(date, dateString) {},
     callback(key) {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1148 - 0
src/views/modules/material/videoMaterial.vue


+ 185 - 200
src/views/system/RoleList.vue

@@ -1,201 +1,186 @@
-<template>
-  <a-card :bordered="false" class="card-area">
-
-    <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <!-- 搜索区域 -->
-      <a-form layout="inline">
-        <a-row :gutter="24">
-          <a-col :md="6" :sm="8">
-            <a-form-item label="名称" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
-              <a-input placeholder="请输入名称查询" v-model="queryParam.roleName"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :md="10" :sm="12">
-            <a-form-item label="创建时间" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
-              <j-date v-model="queryParam.createTime_begin" :showTime="true" date-format="YYYY-MM-DD HH:mm:ss"
-                      style="width:45%" placeholder="请选择开始时间"></j-date>
-              <span style="width: 10px;">~</span>
-              <j-date v-model="queryParam.createTime_end" :showTime="true" date-format="YYYY-MM-DD HH:mm:ss"
-                      style="width:45%" placeholder="请选择结束时间"></j-date>
-            </a-form-item>
-          </a-col>
-          <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-            <a-col :md="6" :sm="24">
-              <a-button type="primary" @click="searchQuery">查询</a-button>
-              <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
-            </a-col>
-          </span>
-        </a-row>
-      </a-form>
-    </div>
-
-    <!-- 操作按钮区域 -->
-    <div class="table-operator" style="margin-top: 5px">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('角色信息')">导出</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
-                @change="handleImportExcel">
-        <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
-
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel">
-            <a-icon type="delete"/>
-            删除
-          </a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px">
-          批量操作
-          <a-icon type="down"/>
-        </a-button>
-      </a-dropdown>
-    </div>
-
-    <!-- table区域-begin -->
-    <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择&nbsp;<a style="font-weight: 600">{{
-        selectedRowKeys.length }}</a>项&nbsp;&nbsp;
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
-
-      <a-table
-        ref="table"
-        size="middle"
-        bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange">
-
-        <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
-
-          <a-divider type="vertical"/>
-          <a-dropdown>
-            <a class="ant-dropdown-link">
-              更多 <a-icon type="down"/>
-            </a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a @click="handlePerssion(record.id)">授权</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
-        </span>
-
-
-      </a-table>
-    </div>
-    <!-- table区域-end -->
-
-    <!-- 表单区域 -->
-    <role-modal ref="modalForm" @ok="modalFormOk"></role-modal>
-    <user-role-modal ref="modalUserRole"></user-role-modal>
-  </a-card>
-</template>
-
-<script>
-  import RoleModal from './modules/RoleModal'
-  import UserRoleModal from './modules/UserRoleModal'
-  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
-  import JDate from '@/components/jeecg/JDate'
-
-  export default {
-    name: "RoleList",
-    mixins: [JeecgListMixin],
-    components: {
-      RoleModal,
-      UserRoleModal,
-      JDate
-    },
-    data() {
-      return {
-
-        description: '角色管理页面',
-        // 查询条件
-        queryParam: {roleName: '',},
-        // 表头
-        columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key: 'rowIndex',
-            width: 60,
-            align: "center",
-            customRender: function (t, r, index) {
-              return parseInt(index) + 1;
-            }
-          },
-          {
-            title: '角色名称',
-            align: "center",
-            dataIndex: 'roleName'
-          },
-          {
-            title: '角色编码',
-            align: "center",
-            dataIndex: 'roleCode'
-          },
-          {
-            title: '备注',
-            align: "center",
-            dataIndex: 'description'
-          },
-          {
-            title: '创建时间',
-            dataIndex: 'createTime',
-            align: "center",
-            sorter: true
-          },
-          {
-            title: '更新时间',
-            dataIndex: 'updateTime',
-            align: "center",
-            sorter: true
-          },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align: "center",
-            scopedSlots: {customRender: 'action'},
-          }
-        ],
-        url: {
-          list: "/sys/role/list",
-          delete: "/sys/role/delete",
-          deleteBatch: "/sys/role/deleteBatch",
-          exportXlsUrl: "/sys/role/exportXls",
-          importExcelUrl: "sys/role/importExcel",
-        },
-      }
-    },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-      }
-    },
-    methods: {
-      handlePerssion: function (roleId) {
-        // alert(roleId);
-        this.$refs.modalUserRole.show(roleId);
-      },
-      onChangeDate(date, dateString) {
-        console.log(date, dateString);
-      },
-    }
-  }
-</script>
-<style scoped>
-  @import '~@assets/less/common.less'
+<template>
+  <a-card :bordered="false" class="card-area">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <!-- 搜索区域 -->
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :md="6" :sm="8">
+            <a-form-item label="名称" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
+              <a-input placeholder="请输入名称查询" v-model="queryParam.roleName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="10" :sm="12">
+            <a-form-item label="创建时间" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
+              <j-date v-model="queryParam.createTime_begin" :showTime="true" date-format="YYYY-MM-DD HH:mm:ss"
+                      style="width:45%" placeholder="请选择开始时间"></j-date>
+              <span style="width: 10px;">~</span>
+              <j-date v-model="queryParam.createTime_end" :showTime="true" date-format="YYYY-MM-DD HH:mm:ss"
+                      style="width:45%" placeholder="请选择结束时间"></j-date>
+            </a-form-item>
+          </a-col>
+          <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="searchQuery">查询</a-button>
+              <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
+            </a-col>
+          </span>
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator" style="margin-top: 5px">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel">
+            <a-icon type="delete"/>
+            删除
+          </a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px">
+          批量操作
+          <a-icon type="down"/>
+        </a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择&nbsp;<a style="font-weight: 600">{{
+        selectedRowKeys.length }}</a>项&nbsp;&nbsp;
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical"/>
+          <a-dropdown>
+            <a class="ant-dropdown-link">
+              更多 <a-icon type="down"/>
+            </a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handlePerssion(record.id)">授权</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <role-modal ref="modalForm" @ok="modalFormOk"></role-modal>
+    <user-role-modal ref="modalUserRole"></user-role-modal>
+  </a-card>
+</template>
+
+<script>
+  import RoleModal from './modules/RoleModal'
+  import UserRoleModal from './modules/UserRoleModal'
+  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
+  import JDate from '@/components/jeecg/JDate'
+
+  export default {
+    name: "RoleList",
+    mixins: [JeecgListMixin],
+    components: {
+      RoleModal,
+      UserRoleModal,
+      JDate
+    },
+    data() {
+      return {
+
+        description: '角色管理页面',
+        // 查询条件
+        queryParam: {roleName: '',},
+        // 表头
+        columns: [
+          {
+            title: '角色名称',
+            align: "center",
+            dataIndex: 'roleName'
+          },
+          {
+            title: '角色编码',
+            align: "center",
+            dataIndex: 'roleCode'
+          },
+          {
+            title: '备注',
+            align: "center",
+            dataIndex: 'description'
+          },
+          {
+            title: '创建时间',
+            dataIndex: 'createTime',
+            align: "center",
+            sorter: true
+          },
+          {
+            title: '更新时间',
+            dataIndex: 'updateTime',
+            align: "center",
+            sorter: true
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align: "center",
+            scopedSlots: {customRender: 'action'},
+          }
+        ],
+        url: {
+          list: "/sys/role/list",
+          delete: "/sys/role/delete",
+          deleteBatch: "/sys/role/deleteBatch",
+          exportXlsUrl: "/sys/role/exportXls",
+          importExcelUrl: "sys/role/importExcel",
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function () {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+      handlePerssion: function (roleId) {
+        // alert(roleId);
+        this.$refs.modalUserRole.show(roleId);
+      },
+      onChangeDate(date, dateString) {
+        console.log(date, dateString);
+      },
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
 </style>

+ 321 - 357
src/views/system/UserList.vue

@@ -1,358 +1,322 @@
-<template>
-  <a-card :bordered="false">
-
-    <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline">
-        <a-row :gutter="24">
-
-          <a-col :md="6" :sm="12">
-            <a-form-item label="账号">
-              <a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>
-            </a-form-item>
-          </a-col>
-
-          <a-col :md="6" :sm="8">
-            <a-form-item label="性别">
-              <a-select v-model="queryParam.sex" placeholder="请选择性别查询">
-                <a-select-option value="">请选择性别查询</a-select-option>
-                <a-select-option value="1">男性</a-select-option>
-                <a-select-option value="2">女性</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-
-
-          <template v-if="toggleSearchStatus">
-            <a-col :md="6" :sm="8">
-              <a-form-item label="邮箱">
-                <a-input placeholder="请输入邮箱查询" v-model="queryParam.email"></a-input>
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="手机号码">
-                <a-input placeholder="请输入手机号码查询" v-model="queryParam.phone"></a-input>
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="状态">
-                <a-select v-model="queryParam.status" placeholder="请选择用户状态查询">
-                  <a-select-option value="">请选择用户状态</a-select-option>
-                  <a-select-option value="1">正常</a-select-option>
-                  <a-select-option value="2">解冻</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-          </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 @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '收起' : '展开' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
-              </a>
-            </span>
-          </a-col>
-
-        </a-row>
-      </a-form>
-    </div>
-
-    <!-- 操作按钮区域 -->
-    <div class="table-operator" style="border-top: 5px">
-      <a-button @click="handleAdd" v-has="'user:add'" type="primary" icon="plus">添加用户</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
-                @change="handleImportExcel">
-        <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay" @click="handleMenuClick">
-          <a-menu-item key="1">
-            <a-icon type="delete" @click="batchDel"/>
-            删除
-          </a-menu-item>
-          <a-menu-item key="2">
-            <a-icon type="lock" @click="batchFrozen('2')"/>
-            冻结
-          </a-menu-item>
-          <a-menu-item key="3">
-            <a-icon type="unlock" @click="batchFrozen('1')"/>
-            解冻
-          </a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px">
-          批量操作
-          <a-icon type="down"/>
-        </a-button>
-      </a-dropdown>
-    </div>
-
-    <!-- table区域-begin -->
-    <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{
-        selectedRowKeys.length }}</a>项&nbsp;&nbsp;
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
-
-      <a-table
-        ref="table"
-        bordered
-        size="middle"
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange">
-
-        <template slot="avatarslot" slot-scope="text, record, index">
-          <div class="anty-img-wrap">
-            <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
-          </div>
-        </template>
-
-        <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
-          <a-divider type="vertical"/>
-
-          <a-dropdown>
-            <a class="ant-dropdown-link">
-              更多 <a-icon type="down"/>
-            </a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a href="javascript:;" @click="handleDetail(record)">详情</a>
-              </a-menu-item>
-
-              <a-menu-item>
-                <a href="javascript:;" @click="handleChangePassword(record.username)">密码</a>
-              </a-menu-item>
-
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-
-              <a-menu-item v-if="record.status==1">
-                <a-popconfirm title="确定冻结吗?" @confirm="() => handleFrozen(record.id,2)">
-                  <a>冻结</a>
-                </a-popconfirm>
-              </a-menu-item>
-
-              <a-menu-item v-if="record.status==2">
-                <a-popconfirm title="确定解冻吗?" @confirm="() => handleFrozen(record.id,1)">
-                  <a>解冻</a>
-                </a-popconfirm>
-              </a-menu-item>
-
-              <a-menu-item>
-                <a href="javascript:;" @click="handleAgentSettings(record.username)">代理人</a>
-              </a-menu-item>
-
-            </a-menu>
-          </a-dropdown>
-        </span>
-
-
-      </a-table>
-    </div>
-    <!-- table区域-end -->
-
-    <user-modal ref="modalForm" @ok="modalFormOk"></user-modal>
-
-    <password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal>
-
-    <sys-user-agent-modal ref="sysUserAgentModal"></sys-user-agent-modal>
-  </a-card>
-</template>
-
-<script>
-  import UserModal from './modules/UserModal'
-  import PasswordModal from './modules/PasswordModal'
-  import {putAction} from '@/api/manage';
-  import {frozenBatch} from '@/api/api'
-  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
-  import SysUserAgentModal from "./modules/SysUserAgentModal";
-
-  export default {
-    name: "UserList",
-    mixins: [JeecgListMixin],
-    components: {
-      SysUserAgentModal,
-      UserModal,
-      PasswordModal
-    },
-    data() {
-      return {
-        description: '这是用户管理页面',
-        queryParam: {},
-        columns: [
-          /*{
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-          },*/
-          {
-            title: '用户账号',
-            align: "center",
-            dataIndex: 'username',
-            width: 120
-          },
-          {
-            title: '真实姓名',
-            align: "center",
-            width: 100,
-            dataIndex: 'realname',
-          },
-          {
-            title: '头像',
-            align: "center",
-            width: 120,
-            dataIndex: 'avatar',
-            scopedSlots: {customRender: "avatarslot"}
-          },
-
-          {
-            title: '性别',
-            align: "center",
-            width: 80,
-            dataIndex: 'sex_dictText',
-            sorter: true
-          },
-          {
-            title: '生日',
-            align: "center",
-            width: 180,
-            dataIndex: 'birthday'
-          },
-          {
-            title: '手机号码',
-            align: "center",
-            width: 100,
-            dataIndex: 'phone'
-          },
-          {
-            title: '邮箱',
-            align: "center",
-            dataIndex: 'email'
-          },
-          {
-            title: '状态',
-            align: "center",
-            width: 80,
-            dataIndex: 'status_dictText'
-          },
-          /* {
-             title: '创建时间',
-             align: "center",
-             width: 150,
-             dataIndex: 'createTime',
-             sorter: true
-           },*/
-          {
-            title: '操作',
-            dataIndex: 'action',
-            scopedSlots: {customRender: 'action'},
-            align: "center",
-            width: 170
-          }
-
-        ],
-        url: {
-          imgerver: window._CONFIG['domianURL'] + "/sys/common/view",
-          syncUser: "/process/extActProcess/doSyncUser",
-          list: "/sys/user/list",
-          delete: "/sys/user/delete",
-          deleteBatch: "/sys/user/deleteBatch",
-          exportXlsUrl: "/sys/user/exportXls",
-          importExcelUrl: "sys/user/importExcel",
-        },
-      }
-    },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-      }
-    },
-    methods: {
-      getAvatarView: function (avatar) {
-        return this.url.imgerver + "/" + avatar;
-      },
-
-      batchFrozen: function (status) {
-        if (this.selectedRowKeys.length <= 0) {
-          this.$message.warning('请选择一条记录!');
-          return false;
-        } else {
-          let ids = "";
-          let that = this;
-          that.selectedRowKeys.forEach(function (val) {
-            ids += val + ",";
-          });
-          that.$confirm({
-            title: "确认操作",
-            content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
-            onOk: function () {
-              frozenBatch({ids: ids, status: status}).then((res) => {
-                if (res.success) {
-                  that.$message.success(res.message);
-                  that.loadData();
-                  that.onClearSelected();
-                } else {
-                  that.$message.warning(res.message);
-                }
-              });
-            }
-          });
-        }
-      },
-      handleMenuClick(e) {
-        if (e.key == 1) {
-          this.batchDel();
-        } else if (e.key == 2) {
-          this.batchFrozen(2);
-        } else if (e.key == 3) {
-          this.batchFrozen(1);
-        }
-      },
-      handleFrozen: function (id, status) {
-        let that = this;
-        frozenBatch({ids: id, status: status}).then((res) => {
-          if (res.success) {
-            that.$message.success(res.message);
-            that.loadData();
-          } else {
-            that.$message.warning(res.message);
-          }
-        });
-      },
-      handleChangePassword(username) {
-        this.$refs.passwordmodal.show(username);
-      },
-      handleAgentSettings(username) {
-        this.$refs.sysUserAgentModal.agentSettings(username);
-        this.$refs.sysUserAgentModal.title = "用户代理人设置";
-      },
-      passwordModalOk() {
-        //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
-      }
-    }
-
-  }
-</script>
-<style scoped>
-  @import '~@assets/less/common.less'
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+
+          <a-col :md="6" :sm="12">
+            <a-form-item label="账号">
+              <a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="性别">
+              <a-select v-model="queryParam.sex" placeholder="请选择性别查询">
+                <a-select-option value="">请选择性别查询</a-select-option>
+                <a-select-option value="1">男性</a-select-option>
+                <a-select-option value="2">女性</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+
+
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="邮箱">
+                <a-input placeholder="请输入邮箱查询" v-model="queryParam.email"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="手机号码">
+                <a-input placeholder="请输入手机号码查询" v-model="queryParam.phone"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="状态">
+                <a-select v-model="queryParam.status" placeholder="请选择用户状态查询">
+                  <a-select-option value="">请选择用户状态</a-select-option>
+                  <a-select-option value="1">正常</a-select-option>
+                  <a-select-option value="2">解冻</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+
+          <a-col :md="6" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator" style="border-top: 5px">
+      <a-button @click="handleAdd" v-has="'user:add'" type="primary" icon="plus">添加用户</a-button>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+
+      <a-table
+        ref="table"
+        bordered
+        size="middle"
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange">
+
+        <template slot="avatarslot" slot-scope="text, record">
+          <div class="anty-img-wrap">
+            <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
+          </div>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+          <a-divider type="vertical"/>
+
+          <a-dropdown>
+            <a class="ant-dropdown-link">
+              更多 <a-icon type="down"/>
+            </a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a href="javascript:;" @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a href="javascript:;" @click="handleChangePassword(record.username)">密码</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+
+              <a-menu-item v-if="record.status==1">
+                <a-popconfirm title="确定冻结吗?" @confirm="() => handleFrozen(record.id,2)">
+                  <a>冻结</a>
+                </a-popconfirm>
+              </a-menu-item>
+
+              <a-menu-item v-if="record.status==2">
+                <a-popconfirm title="确定解冻吗?" @confirm="() => handleFrozen(record.id,1)">
+                  <a>解冻</a>
+                </a-popconfirm>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a href="javascript:;" @click="handleAgentSettings(record.username)">代理人</a>
+              </a-menu-item>
+
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <user-modal ref="modalForm" @ok="modalFormOk"></user-modal>
+
+    <password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal>
+
+    <sys-user-agent-modal ref="sysUserAgentModal"></sys-user-agent-modal>
+  </a-card>
+</template>
+
+<script>
+  import UserModal from './modules/UserModal'
+  import PasswordModal from './modules/PasswordModal'
+  import {putAction} from '@/api/manage';
+  import {frozenBatch} from '@/api/api'
+  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
+  import SysUserAgentModal from "./modules/SysUserAgentModal";
+
+  export default {
+    name: "UserList",
+    mixins: [JeecgListMixin],
+    components: {
+      SysUserAgentModal,
+      UserModal,
+      PasswordModal
+    },
+    data() {
+      return {
+        description: '这是用户管理页面',
+        queryParam: {},
+        columns: [
+          /*{
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },*/
+          {
+            title: '用户账号',
+            align: "center",
+            dataIndex: 'username',
+            width: 120
+          },
+          {
+            title: '真实姓名',
+            align: "center",
+            width: 100,
+            dataIndex: 'realname',
+          },
+          {
+            title: '头像',
+            align: "center",
+            width: 120,
+            dataIndex: 'avatar',
+            scopedSlots: {customRender: "avatarslot"}
+          },
+
+          {
+            title: '性别',
+            align: "center",
+            width: 80,
+            dataIndex: 'sex_dictText',
+            sorter: true
+          },
+          {
+            title: '生日',
+            align: "center",
+            width: 180,
+            dataIndex: 'birthday'
+          },
+          {
+            title: '手机号码',
+            align: "center",
+            width: 100,
+            dataIndex: 'phone'
+          },
+          {
+            title: '邮箱',
+            align: "center",
+            dataIndex: 'email'
+          },
+          {
+            title: '状态',
+            align: "center",
+            width: 80,
+            dataIndex: 'status_dictText'
+          },
+          /* {
+             title: '创建时间',
+             align: "center",
+             width: 150,
+             dataIndex: 'createTime',
+             sorter: true
+           },*/
+          {
+            title: '操作',
+            dataIndex: 'action',
+            scopedSlots: {customRender: 'action'},
+            align: "center",
+            width: 170
+          }
+
+        ],
+        url: {
+          imgerver: window._CONFIG['domianURL'] + "/sys/common/view",
+          syncUser: "/process/extActProcess/doSyncUser",
+          list: "/sys/user/list",
+          delete: "/sys/user/delete",
+          deleteBatch: "/sys/user/deleteBatch",
+          exportXlsUrl: "/sys/user/exportXls",
+          importExcelUrl: "sys/user/importExcel",
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function () {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+      getAvatarView: function (avatar) {
+        return this.url.imgerver + "/" + avatar;
+      },
+
+      batchFrozen: function (status) {
+        if (this.selectedRowKeys.length <= 0) {
+          this.$message.warning('请选择一条记录!');
+          return false;
+        } else {
+          let ids = "";
+          let that = this;
+          that.selectedRowKeys.forEach(function (val) {
+            ids += val + ",";
+          });
+          that.$confirm({
+            title: "确认操作",
+            content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
+            onOk: function () {
+              frozenBatch({ids: ids, status: status}).then((res) => {
+                if (res.success) {
+                  that.$message.success(res.message);
+                  that.loadData();
+                  that.onClearSelected();
+                } else {
+                  that.$message.warning(res.message);
+                }
+              });
+            }
+          });
+        }
+      },
+      handleMenuClick(e) {
+        if (e.key == 1) {
+          this.batchDel();
+        } else if (e.key == 2) {
+          this.batchFrozen(2);
+        } else if (e.key == 3) {
+          this.batchFrozen(1);
+        }
+      },
+      handleFrozen: function (id, status) {
+        let that = this;
+        frozenBatch({ids: id, status: status}).then((res) => {
+          if (res.success) {
+            that.$message.success(res.message);
+            that.loadData();
+          } else {
+            that.$message.warning(res.message);
+          }
+        });
+      },
+      handleChangePassword(username) {
+        this.$refs.passwordmodal.show(username);
+      },
+      handleAgentSettings(username) {
+        this.$refs.sysUserAgentModal.agentSettings(username);
+        this.$refs.sysUserAgentModal.title = "用户代理人设置";
+      },
+      passwordModalOk() {
+        //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
+      }
+    }
+
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
 </style>

+ 7 - 3
src/views/system/modules/UserModal.vue

@@ -40,6 +40,11 @@
         <a-form-item label="用户名字" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <a-input placeholder="请输入用户名称" v-decorator="[ 'realname', validatorRules.realname]"/>
         </a-form-item>
+
+        <a-form-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-input placeholder="请输入邮箱" v-decorator="[ 'email', validatorRules.email]"/>
+        </a-form-item>
+        
         <a-form-item label="角色分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled">
           <a-select
             style="width: 100%"
@@ -93,9 +98,7 @@
           </a-select>
         </a-form-item>
 
-        <a-form-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-input placeholder="请输入邮箱" v-decorator="[ 'email', validatorRules.email]"/>
-        </a-form-item>
+
 
         <a-form-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <a-input placeholder="请输入手机号码" :disabled="isDisabledAuth('user:form:phone')"
@@ -181,6 +184,7 @@
           phone: {rules: [{validator: this.validatePhone}]},
           email: {
             rules: [{
+              required: true,
               validator: this.validateEmail
             }],
           },

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 518 - 515
src/views/user/Login.vue


+ 156 - 156
src/views/user/Step1.vue

@@ -1,157 +1,157 @@
-<template>
-  <div class="main">
-
-    <a-form style="max-width: 500px; margin: 40px auto 0;" :form="form">
-      <a-form-item>
-        <a-input
-          v-decorator="['username',validatorRules.username]"
-          size="large"
-          type="text"
-          autocomplete="false"
-          placeholder="请输入用户名或手机号">
-          <a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/>
-        </a-input>
-      </a-form-item>
-      <a-row :gutter="0">
-        <a-col :span="14">
-          <a-form-item>
-            <a-input
-              v-decorator="['inputCode',validatorRules.inputCode]"
-              size="large"
-              type="text"
-              @change="inputCodeChange"
-              placeholder="请输入验证码">
-              <a-icon slot="prefix" v-if=" inputCodeContent==verifiedCode " type="smile"
-                      :style="{ color: 'rgba(0,0,0,.25)' }"/>
-              <a-icon slot="prefix" v-else type="frown" :style="{ color: 'rgba(0,0,0,.25)' }"/>
-            </a-input>
-          </a-form-item>
-        </a-col>
-        <a-col :span="10">
-          <j-graphic-code @success="generateCode" style="float: right"></j-graphic-code>
-        </a-col>
-      </a-row>
-      <a-form-item :wrapperCol="{span: 19, offset: 5}">
-        <a-button type="primary" @click="nextStep">下一步</a-button>
-      </a-form-item>
-    </a-form>
-  </div>
-</template>
-
-<script>
-  import JGraphicCode from '@/components/jeecg/JGraphicCode'
-  import {getAction} from '@/api/manage'
-  import {duplicateCheck} from '@/api/api'
-
-  export default {
-    name: "Step1",
-    components: {
-      JGraphicCode
-    },
-    data() {
-      return {
-        form: this.$form.createForm(this),
-        inputCodeContent: "",
-        inputCodeNull: true,
-        verifiedCode: "",
-        validatorRules: {
-          username: {rules: [{required: false}, {validator: this.validateInputUsername}]},
-          inputCode: {rules: [{required: true, message: '请输入验证码!'}, {validator: this.validateInputCode}]},
-        },
-
-      }
-    },
-    methods: {
-      nextStep() {
-        let that = this
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            var params = {}
-            var reg = /^[1-9]\d*$|^0$/;
-            var username = values.username;
-            if (reg.test(username) == true) {
-              params.phone = username;
-            } else {
-              params.username = username;
-            }
-            getAction("/sys/user/querySysUser", params).then((res) => {
-              if (res.success) {
-                var userList = {
-                  username: res.result.username,
-                  phone: res.result.phone
-                };
-                setTimeout(function () {
-                  that.$emit('nextStep', userList)
-                })
-              }
-            });
-          }
-        })
-
-      },
-      validateInputCode(rule, value, callback) {
-        if (!value || this.verifiedCode == this.inputCodeContent) {
-          callback();
-        } else {
-          callback(new Error("您输入的验证码不正确!"));
-        }
-      },
-      inputCodeChange(e) {
-        this.inputCodeContent = e.target.value;
-        console.log(this.inputCodeContent)
-        if (!e.target.value || 0 == e.target.value) {
-          this.inputCodeNull = true
-        } else {
-          this.inputCodeContent = this.inputCodeContent.toLowerCase()
-          this.inputCodeNull = false
-        }
-      },
-      generateCode(value) {
-        this.verifiedCode = value.toLowerCase();
-        console.log(this.verifiedCode);
-      },
-      validateInputUsername(rule, value, callback) {
-        console.log(value);
-        var reg = /^[0-9]+.?[0-9]*/;
-        if (!value) {
-          callback("请输入用户名和手机号!");
-        }
-
-        if (reg.test(value)) {
-          var params = {
-            tableName: 'sys_user',
-            fieldName: 'phone',
-            fieldVal: value,
-            dataId: null
-          };
-          duplicateCheck(params).then((res) => {
-            if (res.success) {
-              callback("用户名不存在!")
-            } else {
-              callback()
-            }
-          })
-        } else {
-          var params = {
-            tableName: 'sys_user',
-            fieldName: 'username',
-            fieldVal: value,
-            dataId: null
-          };
-          duplicateCheck(params).then((res) => {
-            if (res.success) {
-              callback("用户名不存在!")
-            } else {
-              callback()
-            }
-          })
-        }
-      },
-
-    }
-  }
-</script>
-
-<style scoped>
-
+<template>
+  <div class="main">
+
+    <a-form style="max-width: 500px; margin: 40px auto 0;" :form="form">
+      <a-form-item>
+        <a-input
+          v-decorator="['username',validatorRules.username]"
+          size="large"
+          type="text"
+          autocomplete="false"
+          placeholder="请输入用户名或手机号">
+          <a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/>
+        </a-input>
+      </a-form-item>
+      <a-row :gutter="0">
+        <a-col :span="14">
+          <a-form-item>
+            <a-input
+              v-decorator="['inputCode',validatorRules.inputCode]"
+              size="large"
+              type="text"
+              @change="inputCodeChange"
+              placeholder="请输入验证码">
+              <a-icon slot="prefix" v-if=" inputCodeContent==verifiedCode " type="smile"
+                      :style="{ color: 'rgba(0,0,0,.25)' }"/>
+              <a-icon slot="prefix" v-else type="frown" :style="{ color: 'rgba(0,0,0,.25)' }"/>
+            </a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :span="10">
+          <j-graphic-code @success="generateCode" style="float: right"></j-graphic-code>
+        </a-col>
+      </a-row>
+      <a-form-item :wrapperCol="{span: 19, offset: 5}">
+        <a-button type="primary" @click="nextStep">下一步</a-button>
+      </a-form-item>
+    </a-form>
+  </div>
+</template>
+
+<script>
+  import JGraphicCode from '@/components/jeecg/JGraphicCode'
+  import {getAction} from '@/api/manage'
+  import {duplicateCheck} from '@/api/api'
+
+  export default {
+    name: "Step1",
+    components: {
+      JGraphicCode
+    },
+    data() {
+      return {
+        form: this.$form.createForm(this),
+        inputCodeContent: "",
+        inputCodeNull: true,
+        verifiedCode: "",
+        validatorRules: {
+          username: {rules: [{required: false}, {validator: this.validateInputUsername}]},
+          inputCode: {rules: [{required: true, message: '请输入验证码!'}, {validator: this.validateInputCode}]},
+        },
+
+      }
+    },
+    methods: {
+      nextStep() {
+        let that = this
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            var params = {}
+            var reg = /^[1-9]\d*$|^0$/;
+            var username = values.username;
+            if (reg.test(username) == true) {
+              params.phone = username;
+            } else {
+              params.username = username;
+            }
+            getAction("/sys/user/querySysUser", params).then((res) => {
+              if (res.success) {
+                var userList = {
+                  username: res.result.username,
+                  phone: res.result.phone
+                };
+                setTimeout(function () {
+                  that.$emit('nextStep', userList)
+                })
+              }
+            });
+          }
+        })
+
+      },
+      validateInputCode(rule, value, callback) {
+        if (!value || this.verifiedCode == this.inputCodeContent) {
+          callback();
+        } else {
+          callback(new Error("您输入的验证码不正确!"));
+        }
+      },
+      inputCodeChange(e) {
+        this.inputCodeContent = e.target.value;
+        console.log(this.inputCodeContent)
+        if (!e.target.value || 0 == e.target.value) {
+          this.inputCodeNull = true
+        } else {
+          this.inputCodeContent = this.inputCodeContent.toLowerCase()
+          this.inputCodeNull = false
+        }
+      },
+      generateCode(value) {
+        this.verifiedCode = value.toLowerCase();
+        console.log(this.verifiedCode);
+      },
+      validateInputUsername(rule, value, callback) {
+        console.log(value);
+        var reg = /^[0-9]+.?[0-9]*/;
+        if (!value) {
+          callback("请输入用户名和手机号!");
+        }
+
+        if (reg.test(value)) {
+          var params = {
+            tableName: 'sys_user',
+            fieldName: 'phone',
+            fieldVal: value,
+            dataId: null
+          };
+          duplicateCheck(params).then((res) => {
+            if (res.success) {
+              callback("用户名不存在!")
+            } else {
+              callback()
+            }
+          })
+        } else {
+          var params = {
+            tableName: 'sys_user',
+            fieldName: 'username',
+            fieldVal: value,
+            dataId: null
+          };
+          duplicateCheck(params).then((res) => {
+            if (res.success) {
+              callback("用户名不存在!")
+            } else {
+              callback()
+            }
+          })
+        }
+      },
+
+    }
+  }
+</script>
+
+<style scoped>
+
 </style>

+ 161 - 0
src/views/user/transferLocal.vue

@@ -0,0 +1,161 @@
+<style scoped>
+.bounce {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 100%;
+  color: black;
+  height: 100%;
+  font: normal bold 2rem 'Product Sans', sans-serif;
+  white-space: nowrap;
+}
+
+.letter {
+  animation: bounce 0.75s cubic-bezier(0.05, 0, 0.2, 1) infinite alternate;
+  display: inline-block;
+  transform: translate3d(0, 0, 0);
+  margin-top: 0.5em;
+  text-shadow: rgba(255, 255, 255, 0.4) 0 0 0.05em;
+  font: normal 500 2rem 'Varela Round', sans-serif;
+}
+.letter:nth-child(1) {
+  animation-delay: 0s;
+}
+.letter:nth-child(2) {
+  animation-delay: 0.1s;
+}
+.letter:nth-child(3) {
+  animation-delay: 0.2s;
+}
+.letter:nth-child(4) {
+  animation-delay: 0.3s;
+}
+.letter:nth-child(5) {
+  animation-delay: 0.4s;
+}
+.letter:nth-child(6) {
+  animation-delay: 0.5s;
+}
+.letter:nth-child(7) {
+  animation-delay: 0.6s;
+}
+.letter:nth-child(8) {
+  animation-delay: 0.7s;
+}
+.letter:nth-child(9) {
+  animation-delay: 0.8s;
+}
+.letter:nth-child(10) {
+  animation-delay: 0.9s;
+}
+@keyframes bounce {
+  0% {
+    transform: translate3d(0, 0, 0);
+    text-shadow: rgba(255, 255, 255, 0.4) 0 0 0.05em;
+  }
+  100% {
+    transform: translate3d(0, -1em, 0);
+    text-shadow: rgba(255, 255, 255, 0.4) 0 1em 0.35em;
+  }
+}
+</style>
+<template>
+  <div style="margin:100px 0">
+    <div style="text-align:center;width:300%;margin-left:-100%;font-size:30px" class="bounce">
+      <span class="letter">企</span>
+      <span class="letter">业</span>
+      <span class="letter">微</span>
+      <span class="letter">信</span>
+      <span class="letter">登</span>
+      <span class="letter">录</span>
+      <span class="letter">中</span>
+      ,
+      <span class="letter">请</span>
+      <span class="letter">稍</span>
+      <span class="letter">候</span>
+    </div>
+  </div>
+</template>
+
+<script>
+import { postAction } from '@/api/manage'
+import { mapActions } from 'vuex'
+import { timeFix } from '@/utils/util'
+import qs from 'qs'
+import Vue from 'vue'
+export default {
+  name: 'transfer',
+  components: {},
+  data() {
+    return {}
+  },
+  methods: {
+    ...mapActions(['Login', 'Logout', 'PhoneLogin', 'wxLogin']),
+    login(values) {
+      this.wxLogin(values)
+      this.loginSuccess()
+    },
+    departConfirm(res) {
+      if (res.success) {
+        let multi_depart = res.result.multi_depart
+        //0:无部门 1:一个部门 2:多个部门
+        if (multi_depart == 0) {
+          this.loginSuccess()
+          this.$notification.warn({
+            message: '提示',
+            description: `您尚未归属部门,请确认账号信息`,
+            duration: 3
+          })
+        } else if (multi_depart == 2) {
+          this.departVisible = true
+          this.currentUsername = this.form.getFieldValue('username')
+          this.departList = res.result.departs
+        } else {
+          this.loginSuccess()
+        }
+      } else {
+        this.requestFailed(res)
+        this.Logout()
+      }
+    },
+    requestFailed(err) {
+      this.$notification['error']({
+        message: '登录失败',
+        description: ((err.response || {}).data || {}).message || err.message || '请求出现错误,请稍后再试',
+        duration: 4
+      })
+      this.loginBtn = false
+    },
+    loginSuccess() {
+      this.$router.push({ name: 'dashboard' })
+      this.$notification.success({
+        message: '欢迎',
+        description: `${timeFix()},欢迎回来`
+      })
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      console.log(window.location.search)
+      var data = window.location.search.split('?')[1]
+      var arr = data.split('=')
+      var json = {}
+      json[arr[0]] = arr[1]
+      var params = qs.stringify(json)
+      postAction('/sys/wxlogin', params).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.login(res)
+        } else {
+          //   this.$message.error('企业微信登录失败,请选择账户登录')
+
+          this.requestFailed(res)
+          this.$router.push({ name: 'login' })
+        }
+      })
+    })
+  }
+}
+</script>
+
+<style scoped></style>

+ 1 - 0
vue.config.js

@@ -69,6 +69,7 @@ module.exports = {
         target: 'http://192.168.2.130:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.2.133:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://192.168.2.185:8080', //请求本地 需要jeecg-boot后台项目  祚云
         ws: false,
         changeOrigin: true
       },