Commit 89abb6f0 authored by xinzhedeai's avatar xinzhedeai

西沟修改:定时刷新、foottext修改

parent eaf0a8db
...@@ -6,7 +6,11 @@ ...@@ -6,7 +6,11 @@
</keep-alive> </keep-alive>
</transition> </transition>
<footer v-if="$route.path!=='/dashboard'" class="page-footer"></footer> <footer v-if="$route.path!=='/dashboard'" class="page-footer" :data-content="$store.state.settings.footerTxt">
<!-- <span v-html="$store.state.settings.footerTxt" style="color:#888;display:inline-block;font-weight:bold;" /> -->
<!-- <span style="color:#888;display:inline-block;font-weight:bold;" /> -->
</footer>
<!-- <div v-if="$store.state.settings.showFooter" id="el-main-footer"> <!-- <div v-if="$store.state.settings.showFooter" id="el-main-footer">
<span v-html="$store.state.settings.footerTxt" /> <span v-html="$store.state.settings.footerTxt" />
...@@ -53,7 +57,8 @@ export default { ...@@ -53,7 +57,8 @@ export default {
display:flex;justify-content:center;background-color:#fff;line-height:2; display:flex;justify-content:center;background-color:#fff;line-height:2;
&:after{ &:after{
color:#888;display:inline-block;font-weight:bold; color:#888;display:inline-block;font-weight:bold;
content:'© ⋅ 技术支持:威海晶合数字矿山技术有限公司'; // content:'© ⋅ 技术支持:山东天地寰宇';
content: attr(data-content)
} }
} }
</style> </style>
......
...@@ -43,7 +43,7 @@ module.exports = { ...@@ -43,7 +43,7 @@ module.exports = {
* 底部文字,支持html语法 * 底部文字,支持html语法
*/ */
//footerTxt: '© 2019 Zheng Jie <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License 2.0</a>', //footerTxt: '© 2019 Zheng Jie <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License 2.0</a>',
footerTxt: '© ', footerTxt: '© ⋅ 技术支持:山东天地寰宇',
/** /**
* 备案号 * 备案号
*/ */
......
<template> <template>
<div class="common-page qyzz page-t1"> <div class="common-page qyzz page-t1">
<div class="option page-row"> <div class="option page-row">
<table-filter <table-filter
ref="filter" ref="filter"
:form="form" :form="form"
:Dict="Dict" :Dict="Dict"
:rules="rules" :rules="rules"
:config="form.config" :config="form.config"
:loadData="loadData" :loadData="loadData"
/> />
</div> </div>
<div class="panel-bottom page-row"> <div class="panel-bottom page-row">
<div class="ctin-box"> <div class="ctin-box">
<div class="content-within"> <div class="content-within">
<div class="content-fix"> <div class="content-fix">
<div class="toolbar"> <div class="toolbar">
<div> <div>
<el-button v-for="(item, key) in form.config.otherBtn" size="mini" :type="item.type" :icon="item.icon" @click="item.callback.call(_self, $event)">{{item.name}}</el-button> <el-button
</div> v-for="(item, key) in form.config.otherBtn"
<div> size="mini"
<el-button v-for="(item, key) in form.config.rightBtn" size="mini" :type="item.type" :icon="item.icon" @click="item.callback.call(_self, $event)">{{item.name}}</el-button> :type="item.type"
</div> :icon="item.icon"
</div> @click="item.callback.call(_self, $event)"
<!-- 表格渲染 --> >{{ item.name }}</el-button
<cu-table >
ref="cuTable" </div>
:table="table" <div>
:Dict="Dict" <el-button
:config="form.config" v-for="(item, key) in form.config.rightBtn"
:loadData="loadData" size="mini"
/> :type="item.type"
</div> :icon="item.icon"
</div> @click="item.callback.call(_self, $event)"
</div> >{{ item.name }}</el-button
</div> >
</div>
</div>
<!-- 表格渲染 -->
<cu-table
ref="cuTable"
:table="table"
:Dict="Dict"
:config="form.config"
:loadData="loadData"
/>
</div>
</div>
</div>
</div>
<!-- 表单渲染 --> <!-- 表单渲染 -->
<cu-form <cu-form
ref="cuForm" ref="cuForm"
:form="form" :form="form"
:Dict="Dict" :Dict="Dict"
:rules="rules" :rules="rules"
:submit="submitForm" :submit="submitForm"
:cancel="cancelForm" :cancel="cancelForm"
:watchKeys="['paperfilename']" :watchKeys="['paperfilename']"
/> />
</div> </div>
</template> </template>
<script> <script>
import { reqApi, Config } from '@/assets/js/httpApi.js'; import { reqApi, Config } from "@/assets/js/httpApi.js";
import { Tools } from '@/assets/js/common.js'; import { Tools } from "@/assets/js/common.js";
import DateRangePicker from '@/components/DateRangePicker'; import DateRangePicker from "@/components/DateRangePicker";
import TableFilter from '@/components/TableFilter'; import TableFilter from "@/components/TableFilter";
import cuForm from '@/components/cuForm'; import cuForm from "@/components/cuForm";
import cuTable from '@/components/cuTable'; import cuTable from "@/components/cuTable";
export default { export default {
name: 'Dashboard', name: "Dashboard",
components: { components: {
DateRangePicker, TableFilter, cuForm, cuTable DateRangePicker,
}, TableFilter,
data() { cuForm,
return { cuTable,
Dict:{selectList:[]}, },
table:{ data() {
page: 1, return {
size: 10, refreshInterval: null,
total: 0, Dict: { selectList: [] },
loading: false, table: {
dataList:[], page: 1,
}, size: 10,
rules: {}, total: 0,
form: { loading: false,
title:'', visible:false, reqType:'add', historyDialog:false, dataList: [],
status:{cu:0}, },
query:{}, rules: {},
search:{}, form: {
item:{}, title: "",
file:0, visible: false,
config:{}, reqType: "add",
}, historyDialog: false,
} status: { cu: 0 },
}, query: {},
created(){ search: {},
// 获取基本信息 item: {},
this.pageApi = Config.getModuleInfo(this); file: 0,
this.Dict = this.pageApi.Dict; config: {},
this.form.config = this.pageApi.config; },
this.rules = reqApi.getRules(this.Dict.baseInfo) || (this.Dict.rules || {}); };
this.pageApi.created && this.pageApi.created(); },
}, created() {
mounted() { // 获取基本信息
this.$nextTick(() => { this.pageApi = Config.getModuleInfo(this);
this.loadData(); this.Dict = this.pageApi.Dict;
}); this.form.config = this.pageApi.config;
this.rules = reqApi.getRules(this.Dict.baseInfo) || this.Dict.rules || {};
this.pageApi.created && this.pageApi.created();
},
mounted() {
this.$nextTick(() => {
this.loadData();
this.startRefreshInterval(); // 开启定时器
});
// 获取选择列表字典 // 获取选择列表字典
var selectList = this.Dict.selectList; var selectList = this.Dict.selectList;
Tools.asyncLoop.call(this, selectList, function(key, value, next){ Tools.asyncLoop.call(this, selectList, function (key, value, next) {
if(typeof value === 'function'){ if (typeof value === "function") {
value.call(this.Dict).then(function(res){ value.call(this.Dict).then(function (res) {
selectList[key] = res; next(); selectList[key] = res;
}) next();
}else{next()}; });
}); } else {
}, next();
methods: { }
loadData:reqApi.common.getRequst, });
cancelForm(){ },
this.form.visible = false; beforeDestroy() {
}, this.clearRefreshInterval(); // 清除定时器
submitForm(form, item){ },
reqApi.common.submitForm.call(this, form, item); methods: {
}, // 定时刷新开始
} startRefreshInterval() {
} this.refreshInterval = setInterval(() => {
this.loadData(); // 每30秒刷新列表
}, 30000); // 30000毫秒 == 30秒
},
clearRefreshInterval() {
if (this.refreshInterval) {
clearInterval(this.refreshInterval);
this.refreshInterval = null;
}
},
// 定时刷新结束
loadData: reqApi.common.getRequst,
cancelForm() {
this.form.visible = false;
},
submitForm(form, item) {
reqApi.common.submitForm.call(this, form, item);
},
},
};
</script> </script>
<style rel="stylesheet/scss" lang="scss" scope> <style rel="stylesheet/scss" lang="scss" scope>
.qyzz{ .qyzz {
} }
</style> </style>
<template> <template>
<div class="common-page qyzz page-t1"> <div class="common-page qyzz page-t1">
<div class="option page-row"> <div class="option page-row">
<table-filter <table-filter
ref="filter" ref="filter"
:form="form" :form="form"
:Dict="Dict" :Dict="Dict"
:rules="rules" :rules="rules"
:config="form.config" :config="form.config"
:loadData="loadData" :loadData="loadData"
/> />
</div> </div>
<div class="panel-bottom page-row"> <div class="panel-bottom page-row">
<div class="ctin-box"> <div class="ctin-box">
<div class="content-within"> <div class="content-within">
<div class="content-fix"> <div class="content-fix">
<div class="toolbar"> <div class="toolbar">
<div> <div>
<el-button v-for="(item, key) in form.config.otherBtn" size="mini" :type="item.type" :icon="item.icon" @click="item.callback.call(_self, $event)">{{item.name}}</el-button> <el-button
</div> v-for="(item, key) in form.config.otherBtn"
<div> size="mini"
<el-button v-for="(item, key) in form.config.rightBtn" size="mini" :type="item.type" :icon="item.icon" @click="item.callback.call(_self, $event)">{{item.name}}</el-button> :type="item.type"
</div> :icon="item.icon"
</div> @click="item.callback.call(_self, $event)"
<!-- 表格渲染 --> >{{ item.name }}</el-button
<cu-table >
ref="cuTable" </div>
:table="table" <div>
:Dict="Dict" <el-button
:config="form.config" v-for="(item, key) in form.config.rightBtn"
:loadData="loadData" size="mini"
/> :type="item.type"
</div> :icon="item.icon"
</div> @click="item.callback.call(_self, $event)"
</div> >{{ item.name }}</el-button
</div> >
</div>
</div>
<!-- 表格渲染 -->
<cu-table
ref="cuTable"
:table="table"
:Dict="Dict"
:config="form.config"
:loadData="loadData"
/>
</div>
</div>
</div>
</div>
<!-- 表单渲染 --> <!-- 表单渲染 -->
<cu-form <cu-form
ref="cuForm" ref="cuForm"
:form="form" :form="form"
:Dict="Dict" :Dict="Dict"
:rules="rules" :rules="rules"
:submit="submitForm" :submit="submitForm"
:cancel="cancelForm" :cancel="cancelForm"
:watchKeys="['paperfilename']" :watchKeys="['paperfilename']"
/> />
</div> </div>
</template> </template>
<script> <script>
import { reqApi, Config } from '@/assets/js/httpApi.js'; import { reqApi, Config } from "@/assets/js/httpApi.js";
import { Tools } from '@/assets/js/common.js'; import { Tools } from "@/assets/js/common.js";
import DateRangePicker from '@/components/DateRangePicker'; import DateRangePicker from "@/components/DateRangePicker";
import TableFilter from '@/components/TableFilter'; import TableFilter from "@/components/TableFilter";
import cuForm from '@/components/cuForm'; import cuForm from "@/components/cuForm";
import cuTable from '@/components/cuTable'; import cuTable from "@/components/cuTable";
export default { export default {
name: 'Dashboard', name: "Dashboard",
components: { components: {
DateRangePicker, TableFilter, cuForm, cuTable DateRangePicker,
}, TableFilter,
data() { cuForm,
return { cuTable,
Dict:{selectList:[]}, },
table:{ data() {
page: 1, return {
size: 10, refreshInterval: null,
total: 0, Dict: { selectList: [] },
loading: false, table: {
dataList:[], page: 1,
}, size: 10,
rules: {}, total: 0,
form: { loading: false,
title:'', visible:false, reqType:'add', historyDialog:false, dataList: [],
status:{cu:0}, },
query:{}, rules: {},
search:{}, form: {
item:{}, title: "",
file:0, visible: false,
config:{}, reqType: "add",
}, historyDialog: false,
} status: { cu: 0 },
}, query: {},
created(){ search: {},
// 获取基本信息 item: {},
this.pageApi = Config.getModuleInfo(this); file: 0,
this.Dict = this.pageApi.Dict; config: {},
this.form.config = this.pageApi.config; },
this.rules = reqApi.getRules(this.Dict.baseInfo) || (this.Dict.rules || {}); };
this.pageApi.created && this.pageApi.created(); },
}, created() {
mounted() { // 获取基本信息
this.$nextTick(() => { this.pageApi = Config.getModuleInfo(this);
this.loadData(); this.Dict = this.pageApi.Dict;
}); this.form.config = this.pageApi.config;
this.rules = reqApi.getRules(this.Dict.baseInfo) || this.Dict.rules || {};
this.pageApi.created && this.pageApi.created();
},
mounted() {
this.$nextTick(() => {
this.loadData();
this.startRefreshInterval(); // 开启定时器
});
// 获取选择列表字典 // 获取选择列表字典
var selectList = this.Dict.selectList; var selectList = this.Dict.selectList;
Tools.asyncLoop.call(this, selectList, function(key, value, next){ Tools.asyncLoop.call(this, selectList, function (key, value, next) {
if(typeof value === 'function'){ if (typeof value === "function") {
value.call(this.Dict).then(function(res){ value.call(this.Dict).then(function (res) {
selectList[key] = res; next(); selectList[key] = res;
}) next();
}else{next()}; });
}); } else {
}, next();
methods: { }
loadData:reqApi.common.getRequst, });
cancelForm(){ },
this.form.visible = false; beforeDestroy() {
}, this.clearRefreshInterval(); // 清除定时器
submitForm(form, item){ },
reqApi.common.submitForm.call(this, form, item); methods: {
}, // 定时刷新开始
} startRefreshInterval() {
} this.refreshInterval = setInterval(() => {
this.loadData(); // 每30秒刷新列表
}, 30000); // 30000毫秒 == 30秒
},
clearRefreshInterval() {
if (this.refreshInterval) {
clearInterval(this.refreshInterval);
this.refreshInterval = null;
}
},
// 定时刷新结束
loadData: reqApi.common.getRequst,
cancelForm() {
this.form.visible = false;
},
submitForm(form, item) {
reqApi.common.submitForm.call(this, form, item);
},
},
};
</script> </script>
<style rel="stylesheet/scss" lang="scss" scope> <style rel="stylesheet/scss" lang="scss" scope>
.qyzz{ .qyzz {
} }
</style> </style>
...@@ -318,7 +318,7 @@ export default { ...@@ -318,7 +318,7 @@ export default {
//background-image:-webkit-linear-gradient(top, #8fe9ff, #3d8aff); //background-image:-webkit-linear-gradient(top, #8fe9ff, #3d8aff);
background-image:-webkit-linear-gradient(top,#8affe1,#4193ff); background-image:-webkit-linear-gradient(top,#8affe1,#4193ff);
-webkit-background-clip:text;-webkit-text-fill-color:transparent; -webkit-background-clip:text;-webkit-text-fill-color:transparent;
content:'© ⋅ 技术支持:威海晶合数字矿山技术有限公司'; content:'© ⋅ 技术支持:山东天地寰宇';
} }
img{display:none !important;} img{display:none !important;}
} }
......
...@@ -443,7 +443,7 @@ export default { ...@@ -443,7 +443,7 @@ export default {
//background-image:-webkit-linear-gradient(top, #8fe9ff, #3d8aff); //background-image:-webkit-linear-gradient(top, #8fe9ff, #3d8aff);
background-image:-webkit-linear-gradient(top,#8affe1,#4193ff); background-image:-webkit-linear-gradient(top,#8affe1,#4193ff);
-webkit-background-clip:text;-webkit-text-fill-color:transparent; -webkit-background-clip:text;-webkit-text-fill-color:transparent;
content:'© ⋅ 技术支持:威海晶合数字矿山技术有限公司'; content:'© ⋅ 技术支持:山东天地寰宇';
} }
img{display:none !important;} img{display:none !important;}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment