设备管理
This commit is contained in:
		| @@ -4,7 +4,7 @@ | ||||
|       <ai-search-bar bottomBorder> | ||||
|         <template #left> | ||||
|           <el-button type="primary" icon="iconfont iconAdd" size="small" @click="add('添加设备', {})">添加</el-button> | ||||
|           <el-button icon="el-icon-delete" class="delete-btn del-btn-list" :disabled="!Boolean(ids.length)" @click="remove(ids)">删除</el-button> | ||||
|           <el-button icon="el-icon-delete" class="delete-btn del-btn-list" :disabled="!ids.length" @click="remove(ids)">删除</el-button> | ||||
|         </template> | ||||
|       </ai-search-bar> | ||||
|       <ai-table | ||||
| @@ -15,7 +15,8 @@ | ||||
|         style="margin-top: 16px;" | ||||
|         :current.sync="search.current" | ||||
|         :size.sync="search.size" | ||||
|         @getList="getList"> | ||||
|         @getList="getList" | ||||
|         @selection-change="v=>ids=v.map(e=>e.id)"> | ||||
|         <el-table-column slot="options" width="140px" fixed="right" label="操作" align="center"> | ||||
|           <template slot-scope="{ row }"> | ||||
|             <div class="table-options"> | ||||
| @@ -104,20 +105,20 @@ | ||||
|       }, | ||||
|       rules() { | ||||
|         return { | ||||
|           corpId: [{required: true, message: "请输入租户id"}], | ||||
|           corpId: [{required: true, message: "请输入CorpId"}], | ||||
|         } | ||||
|       }, | ||||
|       colConfigs() { | ||||
|         return [ | ||||
|           {type: "selection"}, | ||||
|           { prop: 'corpId', label: '租户id' }, | ||||
|           { prop: 'flag', align: 'center', label: '中移账号开启状态' }, | ||||
|           { prop: 'appId', align: 'center', label: '中移账号appid' }, | ||||
|           { prop: 'rsa', align: 'center', label: '中移账号rsa' }, | ||||
|           { prop: 'secret', align: 'center', label: '中移账号secret' }, | ||||
|           { prop: 'token', align: 'center', label: 'TOKEN信息' }, | ||||
|           { prop: 'orgIds', align: 'center', label: '中移组织结构结点ids' }, | ||||
|           { prop: 'version', align: 'center', label: '中移账号版本号' }, | ||||
|           { prop: 'corpId', label: 'CorpId' }, | ||||
|           { prop: 'flag', align: 'center', label: '状态' }, | ||||
|           { prop: 'appId', align: 'center', label: 'AppId' }, | ||||
|           { prop: 'rsa', align: 'center', label: 'RSA' }, | ||||
|           { prop: 'secret', align: 'center', label: 'SECRET' }, | ||||
|           { prop: 'token', align: 'center', label: 'TOKEN' }, | ||||
|           { prop: 'orgIds', align: 'center', label: '结点ids' }, | ||||
|           { prop: 'version', align: 'center', label: '版本号' }, | ||||
|           { prop: 'dlbName', align: 'center', label: '大喇叭账号' }, | ||||
|           { prop: 'dlbPwd', align: 'center', label: '大喇叭密码' }, | ||||
|           { prop: 'dlbToken', align: 'center', label: '大喇叭Token' }, | ||||
| @@ -139,6 +140,7 @@ | ||||
|         this.instance.post(`/app/appzyaccountconfig/list`, null, { | ||||
|           params: { | ||||
|             ...this.search, | ||||
|             type: 0 | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
| @@ -174,7 +176,7 @@ | ||||
|       addForm() { | ||||
|         this.$refs.addForm.validate((valid) => { | ||||
|           if (valid) { | ||||
|             this.dialogForm.type = 1 | ||||
|             this.dialogForm.type = 0 | ||||
|             this.instance.post(`/app/appzyaccountconfig/addOrUpdate`, this.dialogForm).then((res) => { | ||||
|               if (res.code == 0) { | ||||
|                 this.$message.success(`${this.dialogForm.id ? '编辑成功' : '添加成功'}`) | ||||
| @@ -187,14 +189,14 @@ | ||||
|           } | ||||
|         }); | ||||
|       }, | ||||
|       refresh() { | ||||
|       refresh(row) { | ||||
|         this.$confirm('确定刷新该数据token?').then(() => { | ||||
|           // this.instance.post(`/app/appzyaccountconfig/delete`).then(res => { | ||||
|           //   if (res.code == 0) { | ||||
|           //     this.$message.success('刷新成功!') | ||||
|           //     this.getList() | ||||
|           //   } | ||||
|           // }) | ||||
|           this.instance.post(`/app/appzyaccountconfig/refresh?id=${row.id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('刷新成功!') | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|     } | ||||
|   | ||||
| @@ -15,7 +15,8 @@ | ||||
|         style="margin-top: 16px;" | ||||
|         :current.sync="search.current" | ||||
|         :size.sync="search.size" | ||||
|         @getList="getList"> | ||||
|         @getList="getList" | ||||
|         @selection-change="v=>ids=v.map(e=>e.id)"> | ||||
|         <el-table-column slot="options" width="140px" fixed="right" label="操作" align="center"> | ||||
|           <template slot-scope="{ row }"> | ||||
|             <div class="table-options"> | ||||
| @@ -101,11 +102,11 @@ | ||||
|       colConfigs() { | ||||
|         return [ | ||||
|           {type: "selection"}, | ||||
|           { prop: 'corpId', label: '租户id' }, | ||||
|           { prop: 'flag', align: 'center', label: '视联网账号开启状态' }, | ||||
|           { prop: 'slwAreaId', align: 'center', label: '视联网地区ID' }, | ||||
|           { prop: 'slwUserId', align: 'center', label: '视联网用户ID' }, | ||||
|           { prop: 'slwToken', align: 'center', label: '视联网TOKEN' }, | ||||
|           { prop: 'corpId', label: 'CorpId' }, | ||||
|           { prop: 'flag', align: 'center', label: '状态' }, | ||||
|           { prop: 'slwUserId', align: 'center', label: '用户ID' }, | ||||
|           { prop: 'slwAreaId', align: 'center', label: '地区编码' }, | ||||
|           { prop: 'slwToken', align: 'center', label: 'TOKEN' }, | ||||
|           { prop: 'dlbName', align: 'center', label: '大喇叭账号' }, | ||||
|           { prop: 'dlbPwd', align: 'center', label: '大喇叭密码' }, | ||||
|           { prop: 'dlbToken', align: 'center', label: '大喇叭Token' }, | ||||
| @@ -127,6 +128,7 @@ | ||||
|         this.instance.post(`/app/appzyaccountconfig/list`, null, { | ||||
|           params: { | ||||
|             ...this.search, | ||||
|             type: 1 | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
| @@ -175,14 +177,14 @@ | ||||
|           } | ||||
|         }); | ||||
|       }, | ||||
|       refresh() { | ||||
|       refresh(row) { | ||||
|         this.$confirm('确定刷新该数据token?').then(() => { | ||||
|           // this.instance.post(`/app/appzyaccountconfig/delete`).then(res => { | ||||
|           //   if (res.code == 0) { | ||||
|           //     this.$message.success('刷新成功!') | ||||
|           //     this.getList() | ||||
|           //   } | ||||
|           // }) | ||||
|           this.instance.post(`/app/appzyaccountconfig/refresh?id=${row.id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('刷新成功!') | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user