Browse Source

init

newStyle
lancer 3 years ago
parent
commit
a792def87d
6 changed files with 281 additions and 74 deletions
  1. +57
    -29
      public/index.html
  2. +9
    -0
      src/api/modules/api.js
  3. +182
    -15
      src/page/check/chose.vue
  4. +26
    -23
      src/page/check/index.vue
  5. +5
    -5
      src/page/login/index.vue
  6. +2
    -2
      vue.config.js

+ 57
- 29
public/index.html View File

@@ -9,47 +9,75 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<!--避免微信管理防盗链机制-->
<meta name="referrer" content="no-referrer"/>
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<meta name="referrer" content="no-referrer" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css">
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/avue.css">
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/index.css">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>智控管家</title>
<style>
.el-message .el-icon-success {
font-size: 18px;
}
.el-message .el-icon-error {
font-size: 18px;
}
.el-message .el-icon-warning {
font-size: 18px;
}
.el-message .el-icon-info {
font-size: 18px;
}
</style>
</head>

<body>
<noscript>
<strong>很抱歉,如果没有 JavaScript 支持,网站将不能正常工作。请启用浏览器的 JavaScript 然后继续。</strong>
</noscript>
<div id="app">
<div class="avue-home">
<div class="avue-home__main">
<img class="avue-home__loading" src="./svg/loading-spin.svg" alt="loading">
<div class="avue-home__title">
正在加载资源
<noscript>
<strong>很抱歉,如果没有 JavaScript 支持,网站将不能正常工作。请启用浏览器的 JavaScript 然后继续。</strong>
</noscript>
<div id="app">
<div class="avue-home">
<div class="avue-home__main">
<img class="avue-home__loading" src="./svg/loading-spin.svg" alt="loading">
<div class="avue-home__title">
正在加载资源
</div>
<div class="avue-home__sub-title">
初次加载资源可能需要较多时间 请耐心等待
</div>
</div>
<div class="avue-home__sub-title">
初次加载资源可能需要较多时间 请耐心等待
<div class="avue-home__footer">
<a href="https://pig4cloud.com/zh-cn" target="_blank">
Copyright © 2020 pig4cloud.com</a>
</div>
</div>
<div class="avue-home__footer">
<a href="https://pig4cloud.com/zh-cn" target="_blank">
Copyright © 2020 pig4cloud.com</a>
</div>
</div>
</div>
<!-- built files will be auto injected -->
<script src="<%= BASE_URL %>cdn/avue/index.js" charset="utf-8"></script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?0625618efb027ed02e88da84c121652e'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()
</script>
<!-- built files will be auto injected -->
<script src="<%= BASE_URL %>cdn/avue/index.js" charset="utf-8"></script>
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?0625618efb027ed02e88da84c121652e'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()
fnResize();
window.onresize = function () {
fnResize();
}
function fnResize() {
var deviceWidth = document.documentElement.clientWidth || window.innerWidth;
if (deviceWidth >= 1920) {
deviceWidth = 1920;
}
if (deviceWidth <= 1200) {
deviceWidth = 1200;
}
document.documentElement.style.fontSize = (deviceWidth / 19.2) + 'px';
}
</script>
</body>

</html>

+ 9
- 0
src/api/modules/api.js View File

@@ -176,3 +176,12 @@ export function deptDelOrg(data) {
data
})
}

// 获取代理商列表
export function zkagentPage(query) {
return request({
url: '/autoSR/zkagent/page',
method: 'get',
params: query
})
}

+ 182
- 15
src/page/check/chose.vue View File

@@ -4,52 +4,219 @@
<div>质控管家管理系统</div>
<div class="callback" @click="goback" style="cursor: pointer">返回</div>
</div>
<div class="hid">选择后台</div>
这是楼盘
<button @click="goindex">去</button>
<div class="hid">
选择后台|{{
flag == 1 ? "选择代理商" : flag == 2 ? "选择公司" : "选择楼盘"
}}
</div>
<div class="content" v-if="flag == 1">
<div class="search">
<el-input
placeholder="请输入内容"
style="width: 200px; margin-left: 40px; margin-right: 30px"
v-model="agentName"
clearable
>
</el-input>
<el-button
style="height: 32px; line-height: 13px"
type="primary"
size="medium"
@click="getAgentList"
>搜索</el-button
>
</div>
<div class="con">
<div v-for="item in list" :key="item.id" class="tab" @click="chose(item)">
<div class="text-1">{{ item.agentName }}</div>
<div class="text-2">
服务状态:
<span
style="font-size: 12px"
:style="item.residueTime > 0 ? 'color:green;' : 'color:red;'"
>{{ item.residueTime > 0 ? "服务中" : "已过期" }}</span
>
</div>
<div class="text-3">{{ item.address }}</div>
</div>
</div>
</div>
<!-- <div class="content">
<div class="search">
<el-input
placeholder="请输入内容"
style="width: 200px; margin-left: 40px; margin-right: 30px"
v-model="agentName"
clearable
>
</el-input>
<el-button
style="height: 32px; line-height: 13px"
type="primary"
size="medium"
@click="getAgentList"
>搜索</el-button
>
</div>
<el-row :gutter="20">
<el-col class="tab" v-for="item in list" :key="item.id">
<div>
<div>{{ item.agentName }}</div>
<div>服务状态{{ item.residueTime > 0 ? "未过期" : "已过期" }}</div>
<div>{{ item.address }}</div>
</div>
</el-col>
</el-row>
</div> -->
<div class="content" v-if="flag == 2">这是公司</div>
<div class="content" v-if="flag == 3">这是楼盘</div>
<el-pagination
style="margin: 20px auto"
class="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-size="10"
layout="total, sizes, prev, pager, next, jumper"
:total="40"
>
</el-pagination>
</div>
</template>

<script>
export default {
data() {
return {};
return {
flag: 1,
currentPage: 1,
agentName: "", //代理商名称
list: [],
};
},
mounted() {
this.$message.success('123')
// console.log(this.$route.query)
// 给定一个标志做判断显隐
this.flag = this.$route.query.flag;
// 获取数据
if (this.flag == 1) {
// 获取代理商
// return
this.getAgentList();
} else if (this.flag == 2) {
// 获取公司
} else {
// 获取楼盘
}
},
computed: {},
methods: {
goindex() {
// 获取代理商
getAgentList() {
this.$api.api
.zkagentPage({
pageNum: this.currentPage,
pageSize: 10,
agentName: this.agentName,
})
.then((res) => {
console.log(res);
this.list = res.data.records;
});
},
chose(item) {
console.log(item)
this.$router.push({ path: "/wel" });
},
goback() {
this.$router.back();
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.currentPage = val;
if (this.flag == 1) {
// 获取代理商
this.getAgentList();
} else if (this.flag == 2) {
// 获取公司
} else {
// 获取楼盘
}
},
},
};
</script>

<style lang="scss" scoped >
.head {
height: 64px;
height: .64rem;
background: #409eff;
display: flex;
padding: 0 20%;
padding: 0 3rem;
box-sizing: border-box;
justify-content: space-between;
line-height: 64px;
line-height: .64rem;
color: #fff;
font-size: 24px;
font-size: .24rem;
.callback {
font-size: 14px;
font-size: .14rem;
}
}
.hid {
margin-top: 25px;
height: 50px;
margin-top: .25rem;
height: .50rem;
background: #f8f8f8;
border-radius: 4px;
border-radius: .04rem;
text-align: center;
line-height: 50px;
font-size: 18px;
line-height: .50rem;
font-size: .18rem;
color: #32363d;
}
.content {
margin-top: .30rem;
padding: 0 3rem;
// height: 680px;
min-height: 5rem;
.con {
display: flex;
flex-wrap: wrap;
}
.search {
display: flex;
}
.tab {
width: 2rem;
height: .98rem;
border-radius: .04px;
border: 1px solid #e0e0e0;
box-sizing: border-box;
padding-left: .20rem;
margin-left: .40rem;
margin-top: .30rem;
cursor: pointer;
.text-1 {
font-size: .16rem;
line-height: .30rem;
margin-top: .10rem;
}
.text-2 {
font-size: .14rem;
line-height: .30rem;
}
.text-3 {
font-size: .14rem;
line-height: .20rem;
margin-bottom: .10rem;
}
}
}
.page {
position: absolute;
bottom: 0;
left: 30%;
}
</style>

+ 26
- 23
src/page/check/index.vue View File

@@ -45,6 +45,7 @@ export default {
mounted() {
// console.log(123);
this.getTab();

},
methods: {
// 获取可选权限对
@@ -84,18 +85,19 @@ export default {
localStorage.setItem('orgType',idx)
if (idx == 0) {
// 质控管家后台
this.$router.push({ path: "/wel" });
}
if (idx == 1) {
// 代理商
this.$router.push({ path: "/chose" });
this.$router.push({ path: "/chose",query:{flag:1}});
}
if (idx == 2) {
// 公司后台
this.$router.push({ path: "/chose" });
this.$router.push({ path: "/chose",query:{flag:2}});
}
if (idx == 3) {
// 楼盘后台
this.$router.push({ path: "/chose" });
this.$router.push({ path: "/chose",query:{flag:3}});
}

// this.$router.push({ path: "/chose" });
@@ -106,51 +108,52 @@ export default {

<style lang="scss" scoped >
.head {
height: 64px;
height: .64rem;
background: #409eff;
display: flex;
padding: 0 20%;
padding: 0 3rem;
box-sizing: border-box;
justify-content: space-between;
line-height: 64px;
line-height: .64rem;
color: #fff;
font-size: 24px;
font-size: .24rem;
.callback {
font-size: 14px;
font-size: .14rem;
}
}
.hid {
margin-top: 25px;
height: 50px;
margin-top: .25rem;
height: .50rem;
background: #f8f8f8;
border-radius: 4px;
text-align: center;
line-height: 50px;
font-size: 18px;
line-height: .50rem;
font-size: .18rem;
color: #32363d;
}
.content {
margin-top: 30px;
padding: 0 20%;
margin-top: .30rem;
padding: 0 3rem;
display: flex;
justify-content: space-around;
// justify-content: space-around;
.tab {
width: 225px;
height: 225px;
width: 2.25rem;
height: 2.25rem;
background: #ffffff;
border: 1px solid #e0e0e0;
text-align: center;
cursor: pointer;
margin-right: 1.05rem;
img {
height: 88px;
width: 88px;
margin-top: 47px;
height: .88rem;
width: .88rem;
margin-top: .47rem;
}
.text {
font-size: 20px;
margin-top: 30px;
font-size: .20rem;
margin-top: .30rem;
color: #333333;
line-height: 20px;
line-height: .20rem;
}
}
}


+ 5
- 5
src/page/login/index.vue View File

@@ -5,10 +5,10 @@
<img src="/img/logo.png" alt="">
</div>
<p class="login-tip">{{ website.title}} v 4.0</p>
<div class="login-border">
<div class="login-border" style="padding-top:.6rem">
<div class="login-main">
<h4 class="login-title">
<el-select v-model="active"
<!-- <el-select v-model="active"
class="login-select animated fadeIn"
placeholder="点击请选择租户"
@change="handleCommand">
@@ -16,7 +16,7 @@
:key="tenant.id"
:label="tenant.name"
:value="tenant.id"></el-option>
</el-select>
</el-select> -->
</h4>
<userLogin v-if="activeName==='user'" />
<codeLogin v-else-if="activeName==='code'" />
@@ -33,9 +33,9 @@

</div>
</div>
<div class="login-copyright">
<!-- <div class="login-copyright">
{{ website.copyright}}
</div>
</div> -->
<top-color v-show="false" />
</div>
</template>


+ 2
- 2
vue.config.js View File

@@ -3,9 +3,9 @@
* https://cli.vuejs.org/zh/config/
*/
// const url = 'http://pigx-gateway'
const url = 'http://39.97.167.65:9999' //测试
// const url = 'http://39.97.167.65:9999' //测试
// const url = 'http://192.168.31.161:9999' //长龙
// const url = 'http://192.168.31.128:9999' //嘉豪
const url = 'http://192.168.31.128:9999' //嘉豪

const CompressionWebpackPlugin = require('compression-webpack-plugin')
const productionGzipExtensions = ['js', 'css']


Loading…
Cancel
Save