|
@@ -40,7 +40,7 @@
|
|
|
<el-row :gutter="10" class="mb8" align="middle">
|
|
|
<el-col :span="1.5">
|
|
|
<div class="grid-content">
|
|
|
- <el-button type="primary" size="mini" @click="warrantHandle">企微授权</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="warrantHandle">新增企业</el-button>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
@@ -49,11 +49,6 @@
|
|
|
<el-table :data="corpList" v-loading="loading" size="mini">
|
|
|
<el-table-column label="企微名称" prop="corpName" width="150" align="center" fixed="left"
|
|
|
:show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="企微头像" prop="corpSquareLogoUrl" align="center" width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-image style="height: 23px" :src="scope.row.corpSquareLogoUrl" fit="fit" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="企微ID" prop="originCorpId" align="center" width="150" />
|
|
|
<el-table-column label="应用类型" prop="applicationType" align="center" width="150">
|
|
|
|
|
@@ -104,7 +99,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="会话存档Secret" prop="msgAuditSecret" width="150" :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-if="scope.row.msgAuditSecret">{{scope.row.msgAuditSecret}}</div>
|
|
|
+ <div v-if="scope.row.msgAuditSecret">{{ scope.row.msgAuditSecret }}</div>
|
|
|
<div v-else>--</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -122,8 +117,8 @@
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.authStatus === 1" class="czCell">
|
|
|
- <el-button size="mini" type="text" icon="el-icon-refresh"
|
|
|
- @click="handleRefresh(scope.row)">刷新</el-button>
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-edit"
|
|
|
+ @click="handleRefresh(scope.row)">修改</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-setting"
|
|
|
@click="setSecretHandle(scope.row)">配置密钥</el-button>
|
|
|
<el-button size="mini" v-if="scope.row.corpId" type="text" icon="el-icon-setting"
|
|
@@ -152,7 +147,10 @@
|
|
|
@close="setShow = false; secretData = { bookAgentIdMap: [] }" @change="closeSetSecret(); getList()" />
|
|
|
<mailList :corpId="corpId" :visible="mailShow" @close="mailShow = false; corpId = null" />
|
|
|
<set-session v-if="sessionVisible" :visible="sessionVisible" :msgAuditSecret="msgAuditSecret" :corpId="corpId"
|
|
|
- @close="msgAuditSecret = {}; corpId = null; sessionVisible = false" @change="sessionChange()"/>
|
|
|
+ @close="msgAuditSecret = {}; corpId = null; sessionVisible = false" @change="sessionChange()" />
|
|
|
+
|
|
|
+ <modal-corp :visible="corpVisible" :modifyData="corpData" :modalTitle="corpTitle" @onClose="corpVisible = false"
|
|
|
+ @onChange="corpVisible = false; getList()" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -161,9 +159,10 @@ import { getCorpToAuth, getCorpList, putRefreshCorp, putSyncAllCorpUser } from "
|
|
|
import setSecret from './setSecret.vue'
|
|
|
import mailList from './mailList.vue'
|
|
|
import setSession from './setSession.vue'
|
|
|
+import ModalCorp from './modalCorp.vue'
|
|
|
export default {
|
|
|
name: 'corp',
|
|
|
- components: { setSecret, mailList, setSession },
|
|
|
+ components: { setSecret, mailList, setSession, ModalCorp },
|
|
|
data() {
|
|
|
return {
|
|
|
showSearch: true,
|
|
@@ -185,7 +184,11 @@ export default {
|
|
|
corpId: null,
|
|
|
applicationTypeList: [{ label: '内部应用', value: 'INTERNAL' }, { label: '自建应用', value: 'SELF_BUILT' }, { label: '服务商代开发应用', value: 'PROVIDER' }],
|
|
|
msgAuditSecret: null,
|
|
|
- sessionVisible: false
|
|
|
+ sessionVisible: false,
|
|
|
+
|
|
|
+ corpVisible: false,
|
|
|
+ corpData: null,
|
|
|
+ corpTitle: '新增企业'
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -267,24 +270,31 @@ export default {
|
|
|
},
|
|
|
/** 企微授权 */
|
|
|
warrantHandle() {
|
|
|
- getCorpToAuth({ redirectUri: encodeURIComponent(process.env.VUE_APP_CORP_URL) }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- window.open(res.data)
|
|
|
- }
|
|
|
- })
|
|
|
+ // getCorpToAuth({ redirectUri: encodeURIComponent(process.env.VUE_APP_CORP_URL) }).then(res => {
|
|
|
+ // if (res.data) {
|
|
|
+ // window.open(res.data)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ this.corpVisible = true
|
|
|
+ this.corpData = null
|
|
|
+ this.corpTitle = '新增企业'
|
|
|
},
|
|
|
/** 刷新企微信息 */
|
|
|
handleRefresh(row) {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: 'Loading',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
- });
|
|
|
- putRefreshCorp(row.corpId).then(res => {
|
|
|
- loading.close()
|
|
|
- this.getList()
|
|
|
- }).catch(() => loading.close())
|
|
|
+ // const loading = this.$loading({
|
|
|
+ // lock: true,
|
|
|
+ // text: 'Loading',
|
|
|
+ // spinner: 'el-icon-loading',
|
|
|
+ // background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ // });
|
|
|
+ // putRefreshCorp(row.corpId).then(res => {
|
|
|
+ // loading.close()
|
|
|
+ // this.getList()
|
|
|
+ // }).catch(() => loading.close())
|
|
|
+ const { originCorpId, corpId, corpFullName, corpName } = row
|
|
|
+ this.corpVisible = true
|
|
|
+ this.corpData = { originCorpId, corpId, corpFullName, corpName }
|
|
|
+ this.corpTitle = '修改企业'
|
|
|
},
|
|
|
/** 配置密钥 */
|
|
|
setSecretHandle(row) {
|
|
@@ -319,8 +329,8 @@ export default {
|
|
|
this.sessionVisible = true
|
|
|
},
|
|
|
sessionChange() {
|
|
|
- this.msgAuditSecret = {};
|
|
|
- this.corpId = null;
|
|
|
+ this.msgAuditSecret = {};
|
|
|
+ this.corpId = null;
|
|
|
this.sessionVisible = false;
|
|
|
this.getList()
|
|
|
}
|