diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/BrandMessage.vue b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/BrandMessage.vue index 8bca680c..57a2a665 100644 --- a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/BrandMessage.vue +++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/BrandMessage.vue @@ -6,6 +6,7 @@ 查询 重置 + type="primary" + size="small" + icon="el-icon-refresh" + @click="resetSearch" + >重置
@@ -42,33 +43,29 @@ - +
-
- -
+
+ +
diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/inquireStatistics/index.vue b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/inquireStatistics/index.vue index 0ca2f3e6..eac58ed2 100644 --- a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/inquireStatistics/index.vue +++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/inquireStatistics/index.vue @@ -33,6 +33,7 @@ v-model="queryParams.params.fromTime" type="date" clearable + :picker-options="pickerOptions" value-format="yyyy-MM-dd" placeholder="选择日期" /> @@ -41,6 +42,7 @@ v-model="queryParams.params.endTime" type="date" clearable + :picker-options="pickerOptions" value-format="yyyy-MM-dd" placeholder="选择日期" /> @@ -198,24 +200,22 @@ :title="dialogTitle + '数据'" :visible.sync="captrue" width="40%"> - - + + - - + + - - - - - - + + + + - 立即创建 - 重置 + 立即抓取 + 重置 @@ -248,13 +248,14 @@ export default { tableXiaoshou:[], student: {}, captrueData:{}, - ruleForm:{ - time:'', - type:{ - salesAmount:'',purchase:'', - salesDishes:'' - } - }, + ruleForm: { + time: '', + data:{ + salesAmount:'', + purchase:'', + salesDishes:'' + } + }, queryParams: { current: 1, size: 10, @@ -266,11 +267,11 @@ export default { endTime: "", }, }, - rules: { - type: [ - { type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' } - ], - } + pickerOptions:{ + disabledDate(time){ + return time.getTime()> Date.now()- 8.64e7;// 如果没有后面的-8.64e7就是不可以选择今天的 + } + } }; }, mounted() { @@ -388,17 +389,41 @@ export default { this.dialogTitle = "抓取"; this.captrue=true }, - submitForm(formName) { - this.$refs[formName].validate((valid) => { - handCrawl(this.ruleForm).then((res)=>{ - console.log(this.ruleForm); - console.log(res); - }) + submitForm() { + if(this.ruleForm.time===''){ + this.$message({ + showClose: true, + message: '请选择时间', + type: 'warning' + }); + }else if(this.ruleForm.data.salesAmount || this.ruleForm.data.purchase || this.ruleForm.data.salesDishes){ + this.captrue=false + handCrawl(this.ruleForm).then((res)=>{ + this.$message({ + message: '抓取成功', + type: 'success' + }); + this.resetForm() + this.getPageList(); + }) + }else{ + this.$message({ + showClose: true, + message: '请至少选择一条数据', + type: 'warning' }); - }, - resetForm(formName) { - this.$refs[formName].resetFields(); } + }, + resetForm() { + this.ruleForm= { + time: '', + data:{ + salesAmount:'', + purchase:'', + salesDishes:'' + } + } + } }, };