Browse Source

5.16

master
fengdong777 2 years ago
parent
commit
df6cbdc5f5
  1. 15
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/BrandMessage.vue
  2. 71
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/inquireStatistics/index.vue

15
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/BrandMessage.vue

@ -6,6 +6,7 @@
<el-input
v-model="page.params.name"
style="width: 150px; margin-left: 10px"
maxlength="20"
/>
<el-button
type="primary"
@ -42,11 +43,7 @@
</el-table-column>
<el-table-column prop="name" label="品牌名称" align="center">
</el-table-column>
<el-table-column
prop="enpCode"
label="企业编码"
align="center"
>
<el-table-column prop="enpCode" label="企业编码" align="center">
</el-table-column>
</el-table>
@ -65,10 +62,10 @@
<script>
import { selectEnpBrandList } from "@/api/Zhj/essentialData/index.js";
import Pagination from '@/components/pagination'
import Pagination from "@/components/pagination";
export default {
components: {
Pagination
Pagination,
},
data() {
return {
@ -126,9 +123,9 @@ export default {
params: {
name: "",
},
}
};
this.getPageList();
}
},
},
};
</script>

71
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%">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="活动时间" required>
<el-form :model="ruleForm" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="抓取时间" required>
<el-col :span="11">
<el-form-item >
<el-date-picker type="date" value-format="yyyy-MM-dd" placeholder="选择日期" v-model="ruleForm.time" style="width: 100%;"></el-date-picker>
<el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions" v-model="ruleForm.time" style="width: 100%;"></el-date-picker>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="活动性质" prop="type">
<el-checkbox-group v-model="ruleForm.type">
<el-checkbox label="美食/餐厅线上活动" name="salesAmount"></el-checkbox>
<el-checkbox label="地推活动" name="purchase"></el-checkbox>
<el-checkbox label="线下主题活动" name="salesDishes"></el-checkbox>
</el-checkbox-group>
<el-form-item label="抓取内容" required>
<el-checkbox label="抓取实时金额" v-model="ruleForm.data.salesAmount"></el-checkbox>
<el-checkbox label="抓取采购信息" v-model="ruleForm.data.purchase"></el-checkbox>
<el-checkbox label="抓取菜品销量信息" v-model="ruleForm.data.salesDishes"></el-checkbox>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
<el-button @click="resetForm('ruleForm')">重置</el-button>
<el-button type="primary" @click="submitForm()">立即抓取</el-button>
<el-button @click="resetForm()">重置</el-button>
</el-form-item>
</el-form>
</el-dialog>
@ -250,8 +250,9 @@ export default {
captrueData:{},
ruleForm: {
time: '',
type:{
salesAmount:'',purchase:'',
data:{
salesAmount:'',
purchase:'',
salesDishes:''
}
},
@ -266,10 +267,10 @@ export default {
endTime: "",
},
},
rules: {
type: [
{ type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
],
pickerOptions:{
disabledDate(time){
return time.getTime()> Date.now()- 8.64e7;// -8.64e7
}
}
};
},
@ -388,16 +389,40 @@ export default {
this.dialogTitle = "抓取";
this.captrue=true
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
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)=>{
console.log(this.ruleForm);
console.log(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:''
}
}
}
},
};

Loading…
Cancel
Save