Commit 64d26905 by 匡雅琴

Merge branch 'kuangyq_dev_v2.8.0' into 'v2.8.0'

Kuangyq dev v2.8.0

See merge request !12
2 parents cd07c8c5 832dcd0c
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="closeDia">取 消</el-button> <el-button size="small" @click="closeDia">取 消</el-button>
<el-button size="small" type="primary" @click="activeStaff">确 定</el-button> <el-button size="small" type="primary" @click="activeStaff" :loading="butLoading">确 定</el-button>
</span> </span>
</GLDialog> </GLDialog>
</div> </div>
...@@ -81,6 +81,7 @@ export default { ...@@ -81,6 +81,7 @@ export default {
data() { data() {
return { return {
url: url, url: url,
butLoading: false,
searchForm: { searchForm: {
staffName: '', staffName: '',
openJoinStatus: '' openJoinStatus: ''
...@@ -128,25 +129,17 @@ export default { ...@@ -128,25 +129,17 @@ export default {
tableActiveData: [], tableActiveData: [],
innerTags: [], innerTags: [],
// 账号信息 // 账号信息
activeInfo: {}, activeInfo: {}
// 账号许可列表页面数据
tablePage: {}
} }
}, },
mounted() {}, mounted() {},
methods: { methods: {
init(row, pageInfo) { init(row) {
this.activeInfo = row this.activeInfo = row
this.tablePage = pageInfo
this.dialogActivateVisible = true this.dialogActivateVisible = true
this.findNotActiveStaff() this.findNotActiveStaff()
// this.$nextTick(() => {
// console.log(row)
// this.findNotActiveStaff(row)
// })
}, },
selectionTable(val) { selectionTable(val) {
console.log(val)
this.innerTags = val this.innerTags = val
}, },
// 清空搜索条件 // 清空搜索条件
...@@ -159,19 +152,13 @@ export default { ...@@ -159,19 +152,13 @@ export default {
}, },
findNotActiveStaff() { findNotActiveStaff() {
const { corpId, merchantId } = this.activeInfo const { corpId, merchantId } = this.activeInfo
// let pageSize = this.$refs.activateTable.page.pageSize
// let pageNum = this.$refs.activateTable.page.pageNum
var params = { var params = {
...JSON.parse(JSON.stringify(this.searchForm)), ...JSON.parse(JSON.stringify(this.searchForm)),
corpId, corpId,
merchantId merchantId
// pageSize,
// pageNum
} }
this.loading = true this.loading = true
console.log(params)
this.$apis.accountConfig.findNotActiveStaff(params).then(res => { this.$apis.accountConfig.findNotActiveStaff(params).then(res => {
console.log(res, '======')
if (res.code == 0) { if (res.code == 0) {
this.tableActiveData = res.data this.tableActiveData = res.data
this.loading = false this.loading = false
...@@ -186,13 +173,11 @@ export default { ...@@ -186,13 +173,11 @@ export default {
}) })
}, },
handleNodeClick(data) { handleNodeClick(data) {
console.log(data)
this.searchForm.department = data.departmentName this.searchForm.department = data.departmentName
this.currentTreeData = data this.currentTreeData = data
this.onHidePopover() this.onHidePopover()
}, },
remove(item) { remove(item) {
console.log(item)
this.$refs.activateTable.$refs.salelistMutiTable.toggleRowSelection(item) this.$refs.activateTable.$refs.salelistMutiTable.toggleRowSelection(item)
}, },
rowClick(row) { rowClick(row) {
...@@ -200,10 +185,9 @@ export default { ...@@ -200,10 +185,9 @@ export default {
}, },
// 激活员工 // 激活员工
activeStaff() { activeStaff() {
console.log(this.innerTags, this.activeInfo)
if (!this.innerTags.length) { if (!this.innerTags.length) {
this.$message({ this.$message({
message: '请选择激活员工', message: '未选中员工,无法激活',
type: 'error', type: 'error',
customClass: 'global-messageZindex' customClass: 'global-messageZindex'
}) })
...@@ -213,17 +197,17 @@ export default { ...@@ -213,17 +197,17 @@ export default {
this.innerTags.forEach(item => { this.innerTags.forEach(item => {
userIdList.push(item.userId) userIdList.push(item.userId)
}) })
console.log(userIdList)
const { merchantId, corpId } = this.activeInfo const { merchantId, corpId } = this.activeInfo
var params = { var params = {
corpId, corpId,
merchantId, merchantId,
userIdList userIdList
} }
console.log(params, '+++++++') this.butLoading = true
this.$apis.accountConfig.activeAccount(params).then(res => { this.$apis.accountConfig.activeAccount(params).then(res => {
if (res) { if (res.code == '0') {
// <i class="el-icon-success" style="color:#2CCA74;font-size:48px;"></i> this.butLoading = false
this.dialogActivateVisible = false
var txt = '<p>已激活&nbsp;' + `${res.data ? res.data : 0}` + '&nbsp;个</p>' var txt = '<p>已激活&nbsp;' + `${res.data ? res.data : 0}` + '&nbsp;个</p>'
this.$confirm(txt, '提示', { this.$confirm(txt, '提示', {
confirmButtonText: '我知道了', confirmButtonText: '我知道了',
...@@ -234,14 +218,13 @@ export default { ...@@ -234,14 +218,13 @@ export default {
customClass: 'gl-message-box confirm-btn', customClass: 'gl-message-box confirm-btn',
callback: action => { callback: action => {
if (res.data && res.data > 0) { if (res.data && res.data > 0) {
this.dialogActivateVisible = false this.$emit('activeStaff')
var pras = this.tablePage
this.$apis.accountConfig.listCustomizedAgentWithPage(pras).then(res => {})
} }
} }
}) })
} else { } else {
this.$message.error('激活失败') this.butLoading = false
this.$message.error(res.message)
} }
}) })
}, },
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<!-- <el-button type="text" @click="handelActivate(scope.scope)" :loading="loading">一键激活许可</el-button> --> <!-- <el-button type="text" @click="handelActivate(scope.scope)" :loading="loading">一键激活许可</el-button> -->
</template> </template>
</GLTable> </GLTable>
<ActivateDia ref="activateDia" :dialogActivateVisible="dialogActivateVisible"></ActivateDia> <ActivateDia ref="activateDia" :dialogActivateVisible="dialogActivateVisible" @activeStaff="handleSearch"></ActivateDia>
</div> </div>
</div> </div>
</template> </template>
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
{ {
type: 'el-button', type: 'el-button',
name: row => { name: row => {
return '一键激活许可' return '批量激活许可'
}, },
attrs: { attrs: {
type: 'text', type: 'text',
...@@ -217,16 +217,8 @@ export default { ...@@ -217,16 +217,8 @@ export default {
}, },
// 一键激活许可 // 一键激活许可
handelActivate(row) { handelActivate(row) {
console.log(this.dialogActivateVisible)
// 获取当前页面
var pageInfo = {
pageSize: this.$refs.accountTable.page.pageSize,
pageNum: this.$refs.accountTable.page.pageNum
}
this.dialogActivateVisible = true this.dialogActivateVisible = true
console.log(this.dialogActivateVisible) this.$refs.activateDia.init(row)
this.$refs.activateDia.init(row, pageInfo)
}, },
// 同步购买订单 // 同步购买订单
handleSync() { handleSync() {
......
...@@ -120,33 +120,26 @@ export default { ...@@ -120,33 +120,26 @@ export default {
methods: { methods: {
init(scope, routerInfo) { init(scope, routerInfo) {
console.log(scope, routerInfo)
this.transferInfo = scope this.transferInfo = scope
this.routerInfo = routerInfo this.routerInfo = routerInfo
this.dialogTransferVisible = true this.dialogTransferVisible = true
this.findNotActiveStaff(routerInfo) this.findNotActiveStaff()
}, },
findNotActiveStaff() { findNotActiveStaff() {
const { corpId, merchantId } = this.routerInfo const { corpId, merchantId } = this.routerInfo
// let pageSize = this.$refs.transferTable.page.pageSize
// let pageNum = this.$refs.transferTable.page.pageNum
var params = { var params = {
...JSON.parse(JSON.stringify(this.searchForm)), ...JSON.parse(JSON.stringify(this.searchForm)),
corpId, corpId,
merchantId merchantId
// pageSize,
// pageNum
} }
this.loading = true this.loading = true
this.$apis.accountConfig.findNotActiveStaff(params).then(res => { this.$apis.accountConfig.findNotActiveStaff(params).then(res => {
console.log(res, '======')
if (res.code == 0) { if (res.code == 0) {
this.tableActiveData = res.data this.tableActiveData = res.data
let num = 0 let num = 0
this.tableActiveData.forEach(item => { this.tableActiveData.forEach(item => {
item.num = ++num item.num = ++num
}) })
console.log(this.tableActiveData, '+++++')
this.loading = false this.loading = false
} else { } else {
this.loading = false this.loading = false
...@@ -168,9 +161,7 @@ export default { ...@@ -168,9 +161,7 @@ export default {
}, },
// 选择转移员工 // 选择转移员工
getTransferInfo() { getTransferInfo() {
console.log(this.associationRadio)
let inx = this.tableActiveData.filter(value => value.id == this.associationRadio) let inx = this.tableActiveData.filter(value => value.id == this.associationRadio)
console.log(inx)
this.selectStaff = inx[0] this.selectStaff = inx[0]
}, },
// 转移员工 // 转移员工
......
...@@ -25,20 +25,6 @@ ...@@ -25,20 +25,6 @@
</GLTable> </GLTable>
</div> </div>
</div> </div>
<!-- <GLDialog class="trans-dia" title="帐号接口许可转移" :visible.sync="dialogTransferVisible">
<el-form :model="transferForm">
<el-form-item label="转移员工:">
<el-select @change="selectTransferStaff" v-model="transferForm.staff" filterable :size="size" placeholder="请选择或输入关键字搜索">
<el-option v-for="item in notActiveStaffList" :key="item.userId" :label="item.staffName" :value="item.userId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="接口有效期至:">{{ expireTime }}</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button :size="size" @click="handleClose">取消</el-button>
<el-button :size="size" type="primary" @click="transferCount">提交</el-button>
</span>
</GLDialog> -->
<TransferDia ref="TransferDia" :dialogTransferVisible="dialogTransferVisible" @transferStaff="getListApi"></TransferDia> <TransferDia ref="TransferDia" :dialogTransferVisible="dialogTransferVisible" @transferStaff="getListApi"></TransferDia>
</div> </div>
</template> </template>
...@@ -173,75 +159,21 @@ export default { ...@@ -173,75 +159,21 @@ export default {
params.pageSize = this.$refs.accountCodeTable.page.pageSize params.pageSize = this.$refs.accountCodeTable.page.pageSize
params.pageNum = this.$refs.accountCodeTable.page.pageNum params.pageNum = this.$refs.accountCodeTable.page.pageNum
this.$apis.accountConfig.listAccountCodeWithPage(params).then(res => { this.$apis.accountConfig.listAccountCodeWithPage(params).then(res => {
this.accountTableData = res.list if (res) {
this.tableTotal = res.total this.accountTableData = res.list
this.tableTotal = res.total
}
}) })
}, },
// 账号许可转移弹窗 // 账号许可转移弹窗
handelTransfer(scope) { handelTransfer(scope) {
this.dialogTransferVisible = true this.dialogTransferVisible = true
this.$refs.TransferDia.init(scope, this.routerInfo) this.$refs.TransferDia.init(scope, this.routerInfo)
// const { merchantId, corpId } = this.routerInfo
// let params = {
// merchantId,
// corpId
// }
// this.handoverUserid = scope.userid
// this.expireTime = scope.expireTime
// this.$apis.accountConfig.findNotActiveStaff(params).then(res => {
// if (res) {
// this.dialogTransferVisible = true
// this.$refs.TransferDia.init(scope, res.data)
// // this.notActiveStaffList = res.data
// // console.log(res.data, '+++++')
// } else {
// // var txt = '<i class="el-icon-warning" style="color:#e6a23c;font-size:48px;"></i><p>无可用的用户转移</p>'
// this.$confirm('无可用的用户转移', '提示', {
// confirmButtonText: '我知道了',
// dangerouslyUseHTMLString: true,
// showClose: true,
// showCancelButton: false,
// confirmButtonClass: 'confirmbtn',
// type: 'warning',
// customClass: 'gl-message-box confirm-btn'
// })
// }
// })
}, },
// 选择转移员工 // 选择转移员工
selectTransferStaff(id) { selectTransferStaff(id) {
this.takeoverUserid = id this.takeoverUserid = id
}, },
// 账号许可转移
// transferCount() {
// const { merchantId, corpId } = this.routerInfo
// let params = {
// merchantId,
// corpId
// }
// params.handoverUserid = this.handoverUserid
// params.takeoverUserid = this.takeoverUserid
// this.$apis.accountConfig.transferLicenseAccount(params).then(res => {
// if (res.code == 0) {
// this.$message({
// message: '账号转移成功',
// type: 'success',
// customClass: 'global-messageZindex'
// })
// this.getListApi()
// this.dialogTransferVisible = false
// this.transferForm.staff = ''
// } else {
// this.$message({
// message: '账号转移失败,请联系管理员',
// type: 'error',
// customClass: 'global-messageZindex'
// })
// this.dialogTransferVisible = false
// this.transferForm.staff = ''
// }
// })
// },
// 关闭弹窗 // 关闭弹窗
handleClose() { handleClose() {
this.dialogTransferVisible = false this.dialogTransferVisible = false
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<span class="container-tip">提供企微代开发应用的配置管理</span> <span class="container-tip">提供企微代开发应用的配置管理</span>
</div> </div>
<div class="table-box"> <div class="table-box">
<GLCombiForm :formObj="searchForm.condition" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm :rowNumber="1" :formObj="searchForm.condition" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable ref="accountTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"> <GLTable ref="accountTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <el-button type="text" @click="viewConfig(scope.scope)">查看配置</el-button> --> <!-- <el-button type="text" @click="viewConfig(scope.scope)">查看配置</el-button> -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!