Commit 89abb6f0 authored by xinzhedeai's avatar xinzhedeai

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

parent eaf0a8db
......@@ -6,7 +6,11 @@
</keep-alive>
</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">
<span v-html="$store.state.settings.footerTxt" />
......@@ -53,7 +57,8 @@ export default {
display:flex;justify-content:center;background-color:#fff;line-height:2;
&:after{
color:#888;display:inline-block;font-weight:bold;
content:'© ⋅ 技术支持:威海晶合数字矿山技术有限公司';
// content:'© ⋅ 技术支持:山东天地寰宇';
content: attr(data-content)
}
}
</style>
......
......@@ -43,7 +43,7 @@ module.exports = {
* 底部文字,支持html语法
*/
//footerTxt: '© 2019 Zheng Jie <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License 2.0</a>',
footerTxt: '© ',
footerTxt: '© ⋅ 技术支持:山东天地寰宇',
/**
* 备案号
*/
......
......@@ -16,10 +16,24 @@
<div class="content-fix">
<div class="toolbar">
<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
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
>
</div>
<div>
<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>
<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
>
</div>
</div>
<!-- 表格渲染 -->
......@@ -49,75 +63,103 @@
</template>
<script>
import { reqApi, Config } from '@/assets/js/httpApi.js';
import { Tools } from '@/assets/js/common.js';
import DateRangePicker from '@/components/DateRangePicker';
import TableFilter from '@/components/TableFilter';
import cuForm from '@/components/cuForm';
import cuTable from '@/components/cuTable';
import { reqApi, Config } from "@/assets/js/httpApi.js";
import { Tools } from "@/assets/js/common.js";
import DateRangePicker from "@/components/DateRangePicker";
import TableFilter from "@/components/TableFilter";
import cuForm from "@/components/cuForm";
import cuTable from "@/components/cuTable";
export default {
name: 'Dashboard',
name: "Dashboard",
components: {
DateRangePicker, TableFilter, cuForm, cuTable
DateRangePicker,
TableFilter,
cuForm,
cuTable,
},
data() {
return {
Dict:{selectList:[]},
table:{
refreshInterval: null,
Dict: { selectList: [] },
table: {
page: 1,
size: 10,
total: 0,
loading: false,
dataList:[],
dataList: [],
},
rules: {},
form: {
title:'', visible:false, reqType:'add', historyDialog:false,
status:{cu:0},
query:{},
search:{},
item:{},
file:0,
config:{},
title: "",
visible: false,
reqType: "add",
historyDialog: false,
status: { cu: 0 },
query: {},
search: {},
item: {},
file: 0,
config: {},
},
}
};
},
created(){
created() {
// 获取基本信息
this.pageApi = Config.getModuleInfo(this);
this.Dict = this.pageApi.Dict;
this.form.config = this.pageApi.config;
this.rules = reqApi.getRules(this.Dict.baseInfo) || (this.Dict.rules || {});
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;
Tools.asyncLoop.call(this, selectList, function(key, value, next){
if(typeof value === 'function'){
value.call(this.Dict).then(function(res){
selectList[key] = res; next();
})
}else{next()};
Tools.asyncLoop.call(this, selectList, function (key, value, next) {
if (typeof value === "function") {
value.call(this.Dict).then(function (res) {
selectList[key] = res;
next();
});
} else {
next();
}
});
},
beforeDestroy() {
this.clearRefreshInterval(); // 清除定时器
},
methods: {
loadData:reqApi.common.getRequst,
cancelForm(){
// 定时刷新开始
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){
submitForm(form, item) {
reqApi.common.submitForm.call(this, form, item);
},
}
}
},
};
</script>
<style rel="stylesheet/scss" lang="scss" scope>
.qyzz{
}
.qyzz {
}
</style>
......@@ -16,10 +16,24 @@
<div class="content-fix">
<div class="toolbar">
<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
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
>
</div>
<div>
<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>
<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
>
</div>
</div>
<!-- 表格渲染 -->
......@@ -49,75 +63,103 @@
</template>
<script>
import { reqApi, Config } from '@/assets/js/httpApi.js';
import { Tools } from '@/assets/js/common.js';
import DateRangePicker from '@/components/DateRangePicker';
import TableFilter from '@/components/TableFilter';
import cuForm from '@/components/cuForm';
import cuTable from '@/components/cuTable';
import { reqApi, Config } from "@/assets/js/httpApi.js";
import { Tools } from "@/assets/js/common.js";
import DateRangePicker from "@/components/DateRangePicker";
import TableFilter from "@/components/TableFilter";
import cuForm from "@/components/cuForm";
import cuTable from "@/components/cuTable";
export default {
name: 'Dashboard',
name: "Dashboard",
components: {
DateRangePicker, TableFilter, cuForm, cuTable
DateRangePicker,
TableFilter,
cuForm,
cuTable,
},
data() {
return {
Dict:{selectList:[]},
table:{
refreshInterval: null,
Dict: { selectList: [] },
table: {
page: 1,
size: 10,
total: 0,
loading: false,
dataList:[],
dataList: [],
},
rules: {},
form: {
title:'', visible:false, reqType:'add', historyDialog:false,
status:{cu:0},
query:{},
search:{},
item:{},
file:0,
config:{},
title: "",
visible: false,
reqType: "add",
historyDialog: false,
status: { cu: 0 },
query: {},
search: {},
item: {},
file: 0,
config: {},
},
}
};
},
created(){
created() {
// 获取基本信息
this.pageApi = Config.getModuleInfo(this);
this.Dict = this.pageApi.Dict;
this.form.config = this.pageApi.config;
this.rules = reqApi.getRules(this.Dict.baseInfo) || (this.Dict.rules || {});
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;
Tools.asyncLoop.call(this, selectList, function(key, value, next){
if(typeof value === 'function'){
value.call(this.Dict).then(function(res){
selectList[key] = res; next();
})
}else{next()};
Tools.asyncLoop.call(this, selectList, function (key, value, next) {
if (typeof value === "function") {
value.call(this.Dict).then(function (res) {
selectList[key] = res;
next();
});
} else {
next();
}
});
},
beforeDestroy() {
this.clearRefreshInterval(); // 清除定时器
},
methods: {
loadData:reqApi.common.getRequst,
cancelForm(){
// 定时刷新开始
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){
submitForm(form, item) {
reqApi.common.submitForm.call(this, form, item);
},
}
}
},
};
</script>
<style rel="stylesheet/scss" lang="scss" scope>
.qyzz{
}
.qyzz {
}
</style>
......@@ -318,7 +318,7 @@ export default {
//background-image:-webkit-linear-gradient(top, #8fe9ff, #3d8aff);
background-image:-webkit-linear-gradient(top,#8affe1,#4193ff);
-webkit-background-clip:text;-webkit-text-fill-color:transparent;
content:'© ⋅ 技术支持:威海晶合数字矿山技术有限公司';
content:'© ⋅ 技术支持:山东天地寰宇';
}
img{display:none !important;}
}
......
......@@ -443,7 +443,7 @@ export default {
//background-image:-webkit-linear-gradient(top, #8fe9ff, #3d8aff);
background-image:-webkit-linear-gradient(top,#8affe1,#4193ff);
-webkit-background-clip:text;-webkit-text-fill-color:transparent;
content:'© ⋅ 技术支持:威海晶合数字矿山技术有限公司';
content:'© ⋅ 技术支持:山东天地寰宇';
}
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