|
@@ -17,15 +17,44 @@
|
|
|
<el-table-column label="序号" width="55" type="index" align="center" />
|
|
|
<el-table-column label="账号id" align="center" prop="id" />
|
|
|
<el-table-column label="企微账号" align="center" prop="account" />
|
|
|
- <el-table-column label="姓名" align="center" prop="nickName" />
|
|
|
- <el-table-column label="手机号码" align="center" prop="phone" />
|
|
|
+ <el-table-column label="头像" align="center" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-popover
|
|
|
+ placement="right"
|
|
|
+ title=""
|
|
|
+ trigger="hover"
|
|
|
+ >
|
|
|
+ <img slot="reference" :src="scope.row.avatar" width="70">
|
|
|
+ <img :src="scope.row.avatar" style="max-width: 120px;">
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="昵称" align="center" prop="nickName" />
|
|
|
+ <el-table-column label="企业名称" align="center" prop="corpName" />
|
|
|
<el-table-column label="审核状态" align="center" prop="isAudit" >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag prop="isAudit" v-for="(item, index) in isAuditOptions" v-if="scope.row.isAudit==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
+ <el-tag prop="isAudit" v-for="(item, index) in isAuditOptions" :type="scope.row.isAudit==-1?'danger':'success'" v-if="scope.row.isAudit==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column width="500" label="关联设备id" align="center" prop="deviceId" />
|
|
|
+ <el-table-column label="创建时间" align="center" prop="createTime" />
|
|
|
+ <el-table-column label="设备是否可用" align="center" prop="availableDevice" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag prop="availableDevice" v-for="(item, index) in availableOptions" :type="scope.row.availableDevice==-1?'danger':'success'" v-if="scope.row.availableDevice==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.availableDevice == -1"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdateDevice(scope.row)"
|
|
|
+ >更新设备</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
@@ -42,12 +71,6 @@
|
|
|
<el-form-item label="企微账号" prop="account">
|
|
|
<el-input v-model="form.account" placeholder="请输入企微账号" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="手机号" prop="phone">
|
|
|
- <el-input v-model="form.phone" placeholder="请输入手机号" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="姓名" prop="nickName">
|
|
|
- <el-input v-model="form.nickName" placeholder="请输入姓名" />
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
<el-input v-model="form.remark" type="textarea" :row="5" />
|
|
|
</el-form-item>
|
|
@@ -61,7 +84,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listAccount, getAccount, delAccount, addAccount, auditAccount, exportAccount } from "@/api/qw/account";
|
|
|
+import { listAccount, getAccount, delAccount, addAccount, auditAccount, exportAccount,updateDevice } from "@/api/qw/account";
|
|
|
// import { getCompanyList } from "@/api/company/company";
|
|
|
|
|
|
export default {
|
|
@@ -85,6 +108,7 @@ export default {
|
|
|
// 企微功能账号管理表格数据
|
|
|
accountList: [],
|
|
|
isAuditOptions:[],
|
|
|
+ availableOptions:[],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
@@ -132,6 +156,9 @@ export default {
|
|
|
this.getDicts("common_audit").then((response) => {
|
|
|
this.isAuditOptions = response.data;
|
|
|
});
|
|
|
+ this.getDicts("qw_device_status").then((response) => {
|
|
|
+ this.availableOptions = response.data;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询企微功能账号管理列表 */
|
|
@@ -211,7 +238,7 @@ export default {
|
|
|
if (valid) {
|
|
|
addAccount(this.form).then(response => {
|
|
|
if (response.code === 200) {
|
|
|
- this.msgSuccess("审核成功");
|
|
|
+ this.msgSuccess("提交至审核");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
}
|
|
@@ -233,6 +260,20 @@ export default {
|
|
|
this.msgSuccess("删除成功");
|
|
|
}).catch(function() {});
|
|
|
},
|
|
|
+
|
|
|
+ handleUpdateDevice(row) {
|
|
|
+ const id = row.id || this.ids
|
|
|
+ this.$confirm('是否确认重新生成编号为"' + id + '"的设备id项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return updateDevice(id);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("变更成功");
|
|
|
+ }).catch(function() {});
|
|
|
+ },
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|