From e7b50d605e80c70e904e7722861dbeec35f3fe36 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Mon, 22 Mar 2021 09:36:41 +0800
Subject: [PATCH] 用户管理
---
public/index.html | 2
src/api/system/tenant.js | 2
src/views/system/tenant.vue | 119 +++++++++++++++++++++++++++++++++++++--
3 files changed, 114 insertions(+), 9 deletions(-)
diff --git a/public/index.html b/public/index.html
index 2b19ee8..b4affd0 100644
--- a/public/index.html
+++ b/public/index.html
@@ -16,6 +16,8 @@
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.7.5/index.css">
<script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script>
<script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script>
+ <script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.11&key=7ab53b28352e55dc5754699add0ad862&plugin=AMap.PlaceSearch'></script>
+ <script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
<link rel="icon" href="img/1.jpg">
<title>物联网安保云服务平台</title>
<style>
diff --git a/src/api/system/tenant.js b/src/api/system/tenant.js
index 050c4bb..b0091e6 100644
--- a/src/api/system/tenant.js
+++ b/src/api/system/tenant.js
@@ -2,7 +2,7 @@
export const getList = (current, size, params) => {
return request({
- url: '/api/blade-system/tenant/list',
+ url: '/api/blade-system/tenant/page',
method: 'get',
params: {
...params,
diff --git a/src/views/system/tenant.vue b/src/views/system/tenant.vue
index ceb9a52..e424a1b 100644
--- a/src/views/system/tenant.vue
+++ b/src/views/system/tenant.vue
@@ -47,6 +47,10 @@
slot="expireTime">
<el-tag>{{ row.expireTime ? row.expireTime : '不限制' }}</el-tag>
</template>
+ <template slot-scope="{ row }" slot="jfzt">
+ <i class="el-icon-check client-jf" v-if="row.type == '0'"></i>
+ <i class="el-icon-close client-qf" v-else-if="row.type == '1'"></i>
+ </template>
</avue-crud>
<el-dialog title="租户授权配置"
append-to-body
@@ -66,6 +70,7 @@
<script>
import {getList, getDetail, remove, update, add, setting, datasource} from "@/api/system/tenant";
import {mapGetters} from "vuex";
+import AvueMap from 'avue-plugin-map'
export default {
data() {
@@ -95,10 +100,9 @@
dialogClickModal: false,
column: [
{
- label: "租户ID",
+ label: "用户ID",
prop: "tenantId",
width: 100,
- search: true,
addDisplay: false,
editDisplay: false,
span: 24,
@@ -109,10 +113,10 @@
}]
},
{
- label: "租户名称",
+ label: "用户名称",
prop: "tenantName",
search: true,
- width: 180,
+ width: 190,
span: 24,
rules: [{
required: true,
@@ -137,11 +141,25 @@
width: 150,
},
{
- label: "联系地址",
- prop: "address",
+ label: '坐标',
+ prop: 'test',
+ hide: true,
span: 24,
- minRows: 2,
- type: "textarea",
+ component: "avueMap",
+ clickChild: (obj) => {
+ console.log(123,obj)
+ this.form.jd = obj.latitude
+ this.form.wd = obj.longitude
+ },
+ },
+ {
+ label: "经度",
+ prop: "jd",
+ hide: true,
+ },
+ {
+ label: "纬度",
+ prop: "wd",
hide: true,
},
{
@@ -161,11 +179,96 @@
editDisplay: false,
},
{
+ label: "缴费状态",
+ prop: "jfzt",
+ width: 80,
+ slot: true,
+ align: "center",
+ addDisplay: false,
+ editDisplay: false,
+ },
+ {
+ label: "类型",
+ prop: "types",
+ span: 11,
+ width: 60,
+ },
+ {
+ label: "省份",
+ prop: "province",
+ hide: true,
+ search: true,
+ searchSpan: 3,
+ searchLabelWidth: 45,
+ placeholder: "省份",
+ type: "select",
+ props: {
+ label: "name",
+ value: "code"
+ },
+ cascaderItem: ["city", "district"],
+ dicUrl: "/api/blade-system/region/select",
+ span: 6,
+ className: "cityClass1"
+ },
+ {
+ label: "地市",
+ prop: "city",
+ hide: true,
+ type: "select",
+ searchPlaceholder: "地市",
+ placeholder: "地市",
+ searchLabelWidth: 1,
+ searchSpan: 2,
+ search: true,
+ props: {
+ label: "name",
+ value: "code"
+ },
+ dicUrl: "/api/blade-system/region/select?code={{key}}",
+ span: 3,
+ labelWidth: "0",
+ className: "cityClass2"
+ },
+ {
+ label: "区县",
+ searchSpan: 2,
+ hide: true,
+ searchLabelWidth: 1,
+ searchPlaceholder: "区县",
+ placeholder: "区县",
+ search: true,
+ prop: "district",
+ type: "select",
+ props: {
+ label: "name",
+ value: "code"
+ },
+ dicUrl: "/api/blade-system/region/select?code={{key}}",
+ span: 3,
+ labelWidth: "0",
+ className: "cityClass3"
+ },
+ {
+ label: "联系地址",
+ prop: "address",
+ span: 24,
+ minRows: 2,
+ type: "textarea",
+ hide: true,
+ },
+ {
label: "绑定域名",
prop: "domain",
span: 24,
},
{
+ label: "营业信息",
+ prop: "information",
+ hide: true,
+ span: 24,
+ },
+ {
label: "系统背景",
prop: "backgroundUrl",
type: 'upload',
--
Gitblit v1.9.3