lion 2 years ago
parent f93e575bbf
commit 661e0a98bf

@ -5,4 +5,4 @@ ENV = 'development'
VUE_APP_BASE_API = 'https://gb-test.ali251.langye.net' VUE_APP_BASE_API = 'https://gb-test.ali251.langye.net'
#VUE_APP_BASE_API = 'https://gb-test.ali251.langye.net' #VUE_APP_BASE_API = ' https://gbyuyue.szgmbwg.org.cn'

@ -4,4 +4,4 @@ ENV = 'production'
# base api # base api
#VUE_APP_BASE_API = 'https://gb-test.ali251.langye.net' #VUE_APP_BASE_API = 'https://gb-test.ali251.langye.net'
VUE_APP_BASE_API = 'https://gb-test.ali251.langye.net' VUE_APP_BASE_API = 'https://gbyuyue.szgmbwg.org.cn'

@ -7,12 +7,19 @@ import store from '@/store'
import { import {
getToken getToken
} from '@/utils/auth' } from '@/utils/auth'
// create an axios instance
const service = axios.create({ let baseUrl = ''
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url if(window.location.origin.indexOf('localhost')>-1){
// withCredentials: true, // send cookies when cross-domain requests baseUrl = process.env.VUE_APP_BASE_API
timeout: 50000 // request timeout }else{
baseUrl = window.location.origin + '/'
}
const service = axios.create({
baseURL: baseUrl, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
timeout: 50000, // request timeout
// isLoading:true
}) })
// request interceptor // request interceptor

@ -91,9 +91,11 @@
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>结束时间 <span style="color: red;font-weight: 600;padding-right: 4px;"></span>结束时间
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-date-picker style="width: 300px;" default-time="16:00:00" v-model="form.over_time" value-format="yyyy-MM-dd HH:mm:ss" <el-input v-model="form.over_time" placeholder="请输入结束时间" clearable style="width: 300px;"></el-input>
<!-- <el-date-picker style="width: 300px;" default-time="16:00:00" v-model="form.over_time" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime" placeholder="选择日期时间"> type="datetime" placeholder="选择日期时间">
</el-date-picker> </el-date-picker> -->
</div> </div>
</div> </div>
</template> </template>

@ -157,7 +157,7 @@ export default {
const res = await index({ const res = await index({
page_size:this.select.pageSize, page_size:this.select.pageSize,
page:this.select.pageIndex, page:this.select.pageIndex,
title:this.select.name, name:this.select.name,
sort_name:'state', sort_name:'state',
sort_name_tow:'release_time', sort_name_tow:'release_time',
sort_type:"DESC", sort_type:"DESC",

@ -7,14 +7,14 @@
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<div> <div>
<el-date-picker <!-- <el-date-picker
v-model="searchFields.year" v-model="searchFields.year"
type="year" type="year"
value-format="yyyy" value-format="yyyy"
placeholder="选择年份"> placeholder="选择年份">
</el-date-picker> </el-date-picker>
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button> <Button type="primary" @click="load" style="margin-left: 10px">查询</Button> -->
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button> <Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
<Button type="primary" style="margin-left: 10px" @click="handleGo"></Button> <Button type="primary" style="margin-left: 10px" @click="handleGo"></Button>
</div> </div>

@ -10,6 +10,8 @@
<el-date-picker <el-date-picker
v-model="daterange" v-model="daterange"
type="daterange" type="daterange"
value-format="yyyy-MM-dd"
@change='dateChange'
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期">
@ -66,10 +68,10 @@
}, },
mounted() {}, mounted() {},
data() { data() {
return { return {
daterange:"",
showData: false, showData: false,
searchFields: {}, daterange:[],
select: {},
tableData: [], tableData: [],
tableHeight: 0, tableHeight: 0,
btnText:"数据展示", btnText:"数据展示",
@ -109,11 +111,23 @@
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20; let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight; that.tableHeight = tableHeight;
that.chartHeight = that.tableHeight + "px" that.chartHeight = that.tableHeight + "px"
},
dateChange(e){
if(e){
this.select.start_date = e[0]
this.select.end_date = e[1]
}else{
this.select.start_date = ''
this.select.end_date = ''
}
}, },
load() { load() {
// this.showData = true; // this.showData = true;
var arr = []; var arr = [];
ageRpt().then((res) => { ageRpt({
start_date:this.select.start_date,
end_date:this.select.end_date
}).then((res) => {
for (var m of res) { for (var m of res) {
m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%" m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%"

@ -10,6 +10,8 @@
<el-date-picker <el-date-picker
v-model="daterange" v-model="daterange"
type="daterange" type="daterange"
value-format="yyyy-MM-dd"
@change='dateChange'
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期">
@ -18,7 +20,7 @@
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button> <Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button> <Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
<Button type="primary" style="margin-left: 10px" @click="handleGo"></Button> <Button type="primary" style="margin-left: 10px" @click="handleGo"></Button>
</div> </div>
</slot> </slot>
</LxHeader> </LxHeader>
@ -68,8 +70,8 @@
data() { data() {
return { return {
showData: false, showData: false,
daterange:"", daterange:[],
searchFields: {}, select: {},
tableData: [], tableData: [],
tableHeight: 0, tableHeight: 0,
chartHeight:"", chartHeight:"",
@ -112,13 +114,25 @@
that.tableHeight = tableHeight; that.tableHeight = tableHeight;
that.chartHeight = tableHeight+"px" that.chartHeight = tableHeight+"px"
},
dateChange(e){
if(e){
this.select.start_date = e[0]
this.select.end_date = e[1]
}else{
this.select.start_date = ''
this.select.end_date = ''
}
}, },
load() { load() {
// this.showData = true; // this.showData = true;
var xarr = []; var xarr = [];
var planarr=[]; var planarr=[];
var usearr=[]; var usearr=[];
visitdetailRpt().then((res) => { visitdetailRpt({
start_date:this.select.start_date,
end_date:this.select.end_date
}).then((res) => {
for (var m of res) { for (var m of res) {
m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%" m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%"
xarr.push(m.date); xarr.push(m.date);

@ -7,14 +7,14 @@
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<div> <div>
<el-date-picker <!-- <el-date-picker
v-model="searchFields.year" v-model="searchFields.year"
type="year" type="year"
value-format="yyyy" value-format="yyyy"
placeholder="选择年份"> placeholder="选择年份">
</el-date-picker> </el-date-picker>
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button> <Button type="primary" @click="load" style="margin-left: 10px">查询</Button> -->
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button> <Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
<Button type="primary" style="margin-left: 10px" @click="handleGo"></Button> <Button type="primary" style="margin-left: 10px" @click="handleGo"></Button>

@ -8,7 +8,7 @@
<slot> <slot>
<div> <div>
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button> <!-- <Button type="primary" @click="load" style="margin-left: 10px">查询</Button> -->
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button> <Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
<Button type="primary" style="margin-left: 10px" @click="handleGo"></Button> <Button type="primary" style="margin-left: 10px" @click="handleGo"></Button>

@ -251,7 +251,8 @@
resetForm(formName) { resetForm(formName) {
var that = this; var that = this;
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
that.dialogFormVisible = false; that.dialogFormVisible = false;
that.dialogFormEditVisible = false
}, },
handleCurrentChange(page) { handleCurrentChange(page) {
this.paginations.page = page; this.paginations.page = page;

@ -7,8 +7,8 @@
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<div> <div>
<Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.Name" placeholder="关键字搜索" /> <!-- <Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.Name" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button> <Button type="primary" @click="load" style="margin-left: 10px">查询</Button> -->
<Button type="primary" @click="edit()" style="margin-left: 10px">新增菜单</Button> <Button type="primary" @click="edit()" style="margin-left: 10px">新增菜单</Button>
</div> </div>
</slot> </slot>

@ -7,8 +7,8 @@
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<div> <div>
<Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.Name" placeholder="关键字搜索" /> <!-- <Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.Name" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button> <Button type="primary" @click="load" style="margin-left: 10px">查询</Button> -->
<Button type="primary" @click="edit()" style="margin-left: 10px">新增角色</Button> <Button type="primary" @click="edit()" style="margin-left: 10px">新增角色</Button>
</div> </div>
</slot> </slot>

@ -7,8 +7,8 @@
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<div> <div>
<Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.Name" placeholder="关键字搜索" /> <!-- <Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.keyword" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button> <Button type="primary" @click="load" style="margin-left: 10px">查询</Button> -->
<Button type="primary" @click="edit()" style="margin-left: 10px">新增用户</Button> <Button type="primary" @click="edit()" style="margin-left: 10px">新增用户</Button>
</div> </div>
</slot> </slot>
@ -143,7 +143,7 @@
tableHeight: 0, tableHeight: 0,
// //
searchFields: { searchFields: {
KeyWord: "" keyword: ""
}, },
tableData: [] tableData: []
} }

Loading…
Cancel
Save