|
@@ -89,141 +89,6 @@ |
|
|
></el-input> |
|
|
></el-input> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="date"> |
|
|
|
|
|
<span class="ld" style="flex-shrink: 0">接待时间</span> |
|
|
|
|
|
<div class="date-box"> |
|
|
|
|
|
<el-select |
|
|
|
|
|
class="selectone" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
v-model="params.dateType" |
|
|
|
|
|
@change="emptyDateType" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in dateTypeLsit" |
|
|
|
|
|
:key="item.label" |
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
:value="item.label" |
|
|
|
|
|
> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="params.dateType == '周'"> |
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
v-model="params.time" |
|
|
|
|
|
type="week" |
|
|
|
|
|
format="yyyy年-W周" |
|
|
|
|
|
:picker-options="weekPickerOptions" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="params.dateType == '月'"> |
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
v-model="params.time" |
|
|
|
|
|
type="month" |
|
|
|
|
|
format="yyyy-MM" |
|
|
|
|
|
value-format="yyyy-MM" |
|
|
|
|
|
:picker-options="weekPickerOptions" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="params.dateType == '自定义'"> |
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
class="little" |
|
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
|
v-model="params.time" |
|
|
|
|
|
type="daterange" |
|
|
|
|
|
range-separator="-" |
|
|
|
|
|
start-placeholder="开始日期" |
|
|
|
|
|
end-placeholder="结束日期" |
|
|
|
|
|
:picker-options="weekPickerOptions" |
|
|
|
|
|
> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<span class="ld" style="margin: 0 10px; flex-shrink: 0" |
|
|
|
|
|
>对比时间</span |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="params.dateType == '周'"> |
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
v-model="params.contrastTime" |
|
|
|
|
|
type="week" |
|
|
|
|
|
format="yyyy年-W周" |
|
|
|
|
|
:picker-options="weekPickerOptions" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="params.dateType == '月'"> |
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
v-model="params.contrastTime" |
|
|
|
|
|
type="month" |
|
|
|
|
|
format="yyyy-MM" |
|
|
|
|
|
value-format="yyyy-MM" |
|
|
|
|
|
:picker-options="weekPickerOptions" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="params.dateType == '自定义'"> |
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
class="little" |
|
|
|
|
|
v-model="params.contrastTime" |
|
|
|
|
|
type="daterange" |
|
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
|
range-separator="-" |
|
|
|
|
|
start-placeholder="开始日期" |
|
|
|
|
|
end-placeholder="结束日期" |
|
|
|
|
|
:picker-options="weekPickerOptions" |
|
|
|
|
|
> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</template> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="date"> |
|
|
|
|
|
<span class="ld">选择项目</span> |
|
|
|
|
|
<div class="date-box"> |
|
|
|
|
|
<el-select |
|
|
|
|
|
class="selectone" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
v-model="params.houseType" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in selectItem" |
|
|
|
|
|
:key="item.label" |
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
:value="item.label" |
|
|
|
|
|
> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="params.houseType != '全部'"> |
|
|
|
|
|
<el-select |
|
|
|
|
|
class="selectone" |
|
|
|
|
|
style="width: 280px" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
v-model="params.selectHouseId" |
|
|
|
|
|
filterable |
|
|
|
|
|
multiple |
|
|
|
|
|
collapse-tags |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in projectList" |
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
:label="item.propertyName" |
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</template> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
@@ -376,7 +241,7 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
// 生成记录 |
|
|
// 生成记录 |
|
|
findDataByRuleId() { |
|
|
findDataByRuleId() { |
|
|
this.$api.http.findDataByRuleIdopenApiData(this.creatHistory).then((res) => { |
|
|
|
|
|
|
|
|
this.$api.http.findDataByRuleId(this.creatHistory).then((res) => { |
|
|
this.gridData = res.data.records; |
|
|
this.gridData = res.data.records; |
|
|
this.roleHistory = true; // 获取到数据后展示列表 |
|
|
this.roleHistory = true; // 获取到数据后展示列表 |
|
|
this.creatHistory.total = res.data.total; |
|
|
this.creatHistory.total = res.data.total; |
|
@@ -420,67 +285,6 @@ export default { |
|
|
name: this.params.name, |
|
|
name: this.params.name, |
|
|
ruleId: this.row.id, |
|
|
ruleId: this.row.id, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
// 自定义时间选择 |
|
|
|
|
|
if (this.params.dateType == "自定义") { |
|
|
|
|
|
if (!this.params.time || this.params.time.length == 0) { |
|
|
|
|
|
this.$message.error("请选择时间"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (!this.params.contrastTime || this.params.contrastTime.length == 0) { |
|
|
|
|
|
this.$message.error("请选择对比时间"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
let aTime = |
|
|
|
|
|
new Date(this.params.time[1]).getTime() - |
|
|
|
|
|
new Date(this.params.time[0]).getTime(); |
|
|
|
|
|
let bTime = |
|
|
|
|
|
new Date(this.params.contrastTime[1]).getTime() - |
|
|
|
|
|
new Date(this.params.contrastTime[0]).getTime(); |
|
|
|
|
|
if (aTime != bTime) { |
|
|
|
|
|
this.$message.error("请选择相同天数的时间段"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 是否选择时间 |
|
|
|
|
|
if ( |
|
|
|
|
|
!this.params.time || |
|
|
|
|
|
!this.params.contrastTime || |
|
|
|
|
|
this.params.time.length == 0 || |
|
|
|
|
|
this.params.contrastTime.length == 0 |
|
|
|
|
|
) { |
|
|
|
|
|
this.$message.error("请选择时间"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 指定选择某些项目时 |
|
|
|
|
|
if ( |
|
|
|
|
|
this.params.houseType != "全部" && |
|
|
|
|
|
this.params.selectHouseId.length == 0 |
|
|
|
|
|
) { |
|
|
|
|
|
this.$message.error("请选择项目"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.params.houseType == "不等于") { |
|
|
|
|
|
this.projectList.forEach((item) => { |
|
|
|
|
|
if (!this.params.selectHouseId.includes(item.id)) { |
|
|
|
|
|
arr.push(item.id); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
let a = { |
|
|
|
|
|
...this.params, |
|
|
|
|
|
houstId: arr.join(","), |
|
|
|
|
|
}; |
|
|
|
|
|
obj.screen = JSON.stringify(a); |
|
|
|
|
|
} else { |
|
|
|
|
|
let a = { |
|
|
|
|
|
...this.params, |
|
|
|
|
|
houstId: this.params.selectHouseId.join(","), |
|
|
|
|
|
}; |
|
|
|
|
|
obj.screen = JSON.stringify(a); |
|
|
|
|
|
} |
|
|
|
|
|
this.creatRule = false; // 先关闭弹窗 |
|
|
this.creatRule = false; // 先关闭弹窗 |
|
|
this.params = { |
|
|
this.params = { |
|
|
dateType: "周", // 周 月 自定义 |
|
|
dateType: "周", // 周 月 自定义 |
|
|