+
-
-
+
+
{{scope.$index+(currentPage - 1) * limit + 1}}
@@ -32,6 +31,7 @@
modelValue: null,
api: { type: String, default: '' },
params: { type: Object, default: () => {} },
+ form: { type: Array, default: () => [] },
placeholder: { type: String, default: "请选择" },
size: { type: String, default: "default" },
clearable: { type: Boolean, default: false },
@@ -40,7 +40,6 @@
collapseTags: { type: Boolean, default: false },
collapseTagsTooltip: { type: Boolean, default: false },
disabled: { type: Boolean, default: false },
- tableWidth: {type: Number, default: 400},
mode: { type: String, default: "popover" },
props: { type: Object, default: () => {} }
},
@@ -101,13 +100,19 @@
[this.defaultProps.keyword]: this.keyword
}
Object.assign(reqData, this.params, this.formData)
- var res = await this.$http.get(this.api, reqData);
+ var res = await this.$http.get(this.api, reqData, {cacheparameters:1});
var parseData = config.parseData(res)
this.tableData = parseData.rows;
this.total = parseData.total;
this.loading = false;
//表格默认赋值
this.$nextTick(() => {
+
+ if(typeof this.defaultValue === 'undefined'){
+ this.defaultValue = {};
+ }
+
+
if(this.multiple){
this.defaultValue.forEach(row => {
var setrow = this.tableData.filter(item => item[this.defaultProps.value]===row[this.defaultProps.value] )
@@ -139,9 +144,10 @@
this.$refs.select.selected.forEach(item => {
item.currentLabel = item.value[this.defaultProps.label]
})
- }else{
- this.$refs.select.selectedLabel = this.defaultValue[this.defaultProps.label]
+ return ;
}
+
+ this.$refs.select.selectedLabel = typeof this.defaultValue === 'object' ? this.defaultValue[this.defaultProps.label]: this.defaultValue
})
},
//表格勾选事件
diff --git a/src/config/tableSelect.js b/src/config/tableSelect.js
index d6c35c8..6a0de9a 100644
--- a/src/config/tableSelect.js
+++ b/src/config/tableSelect.js
@@ -16,7 +16,7 @@ export default {
keyword: 'keyword' //规定搜索字段
},
props: {
- label: 'label', //映射label显示字段
- value: 'value', //映射value值字段
+ label: 'label', // 映射label显示字段
+ value: 'value', // 映射value值字段
}
}
\ No newline at end of file
diff --git a/src/style/media.scss b/src/style/media.scss
index b5df26d..ff885eb 100644
--- a/src/style/media.scss
+++ b/src/style/media.scss
@@ -39,7 +39,7 @@
.adminui-main > .el-container > .el-container {border-top: 1px solid var(--el-border-color-light);border-bottom: 1px solid var(--el-border-color-light);margin-top: 15px;}
.adminui-main > .el-container > .el-container + .el-aside {border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
.adminui-main > .el-container > .el-header {@extend .headerPublic;}
- .adminui-main > .el-container > .el-main.nopadding {border-top: 1px solid var(--el-border-color-light);border-bottom: 1px solid var(--el-border-color-light);margin-top: 15px;}
+ .adminui-main > .el-container > .el-main.nopadding {}
.adminui-main > .el-container > .el-main + .el-aside {border-left: 0!important;border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
.adminui-main > .el-container > .el-footer {margin-top: 15px;border-bottom: 1px solid var(--el-border-color-light);}
.adminui-main > .el-container > .el-container > .el-header {@extend .headerPublic}
diff --git a/src/utils/request.js b/src/utils/request.js
index e3b9f17..0933d29 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -17,7 +17,10 @@ axios.interceptors.request.use(
}
if (!sysConfig.REQUEST_CACHE && config.method == 'get') {
config.params = config.params || {};
- config.params['_'] = new Date().getTime();
+
+ if (!config.cacheparameters) {
+ config.params['_'] = new Date().getTime();
+ }
}
Object.assign(config.headers, sysConfig.HEADERS)
return config;
diff --git a/src/views/system/setting/index.vue b/src/views/system/setting/index.vue
index b04748d..03e101c 100644
--- a/src/views/system/setting/index.vue
+++ b/src/views/system/setting/index.vue
@@ -29,7 +29,7 @@
- 1
+
保存
diff --git a/src/views/system/stat/index.vue b/src/views/system/stat/index.vue
index 68e2d58..499d832 100644
--- a/src/views/system/stat/index.vue
+++ b/src/views/system/stat/index.vue
@@ -42,6 +42,9 @@
scEcharts,
scStatistic,
},
+ props: {
+ name: { type: String, default: "" },
+ },
data(){
return {
dateGroup: [
@@ -61,11 +64,13 @@
},
dateType: '',
date: null,
+ statName: this.$route.meta.tablename,
}
},
watch: {
//监听从props里拿到值了
date(){
+
},
},
mounted() {
@@ -73,6 +78,10 @@
const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
lastDay.setHours(23, 59, 0, 0);
this.date = [new Date(now.getFullYear(), now.getMonth(), 1, 0, 0), lastDay];
+
+ if (this.name) {
+ this.statName = this.name || this.$route.meta.tablename;
+ }
this.loaddata();
},
methods: {
@@ -90,11 +99,10 @@
},
loaddata(){
//判断是否开启自定义列
- if(this.$route.meta.tablename) {
- this.$http.get('system/stat/get', { name: this.$route.meta.tablename,date:this.date }, { cache:this.$route.meta.tablecache || 0 }).then((res) => {
+ if(this.statName) {
+ this.$http.get('system/stat/get', { name: this.statName,date:this.date }).then((res) => {
if (res.code == 200) {
Object.assign(this.$data, res.data);
-
this.dateType = '';
this.dateGroup.forEach((item) => {
if (new Date(item.value[0]).getTime()==new Date(this.date[0]).getTime() && new Date(item.value[1]).getTime()==new Date(this.date[1]).getTime()) {
@@ -105,11 +113,9 @@
});
}
}
-
}
}
-
-
-
-
+
\ No newline at end of file
diff --git a/src/views/system/table/stat.vue b/src/views/system/table/stat.vue
new file mode 100644
index 0000000..033f93e
--- /dev/null
+++ b/src/views/system/table/stat.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
+