|
@@ -211,20 +211,18 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="时间范围" prop="dateRange" v-if="reportForm.reportTableType == 1">
|
|
|
+ <el-form-item label="开始时间" prop="dateRange" v-if="reportForm.reportTableType == 1">
|
|
|
<el-date-picker
|
|
|
- v-model="dateByRange"
|
|
|
- type="datetimerange"
|
|
|
+ v-model="reportForm.startTime"
|
|
|
+ style="width: 100%;"
|
|
|
+ type="datetime"
|
|
|
:clearable="false"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间"
|
|
|
- placeholder="选择取值时间范围"
|
|
|
+ placeholder="请选择开始时间"
|
|
|
+ prefix-icon=""
|
|
|
:picker-options="{
|
|
|
format: 'yyyy-MM-dd HH:mm:ss'
|
|
|
}"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- :default-time="['09:00:00', '18:00:00']">
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="运行时间" prop="cronLabel" v-if="reportForm.reportTableType == 1">
|
|
@@ -717,6 +715,7 @@ export default {
|
|
|
tableTemplateId: null,
|
|
|
reportTableData: '',
|
|
|
cronLabel: '',
|
|
|
+ startTime: '',
|
|
|
cron: ''
|
|
|
},
|
|
|
printDialogTitle: '打印任务配置',
|
|
@@ -1144,6 +1143,7 @@ export default {
|
|
|
tableTemplateId: null,
|
|
|
reportTableData: '',
|
|
|
cronLabel: '',
|
|
|
+ startTime: '',
|
|
|
cron: ''
|
|
|
}
|
|
|
this.dateByRange = null
|
|
@@ -1176,8 +1176,12 @@ export default {
|
|
|
/** 模版报表选择 */
|
|
|
chooseReportEvent() {
|
|
|
// 判断是否自动报表
|
|
|
- if (this.reportForm.reportTableType == 1 && this.dateByRange.length == 0) {
|
|
|
- showAlertMsgWin(this, null, '请选择时间范围!')
|
|
|
+ // if (this.reportForm.reportTableType == 1 && this.dateByRange.length == 0) {
|
|
|
+ // showAlertMsgWin(this, null, '请选择时间范围!')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ if (this.reportForm.reportTableType == 1 && !this.reportForm.startTime) {
|
|
|
+ showAlertMsgWin(this, null, '请选择开始时间!')
|
|
|
return
|
|
|
}
|
|
|
if (this.reportForm.reportTableType == 1 && !this.reportForm.cron) {
|
|
@@ -1906,11 +1910,12 @@ export default {
|
|
|
this.cronVal = _data.cron
|
|
|
this.analysisCron(this.cronVal)
|
|
|
this.reportForm = _data
|
|
|
- if (_data.startTime && _data.endTime) {
|
|
|
- this.dateByRange = [_data.startTime, _data.endTime]
|
|
|
- } else {
|
|
|
- this.dateByRange = ''
|
|
|
- }
|
|
|
+ // if (_data.startTime && _data.endTime) {
|
|
|
+ // this.dateByRange = [_data.startTime, _data.endTime]
|
|
|
+ // } else {
|
|
|
+ // this.dateByRange = ''
|
|
|
+ // }
|
|
|
+ this.reportForm.startTime = _data.startTime
|
|
|
this.reportForm.cronLabel = this.getCronLabel()
|
|
|
})
|
|
|
this.reportDialogTitle = '配置报表'
|
|
@@ -2094,10 +2099,10 @@ export default {
|
|
|
let _excelData = this.initBaseInfoData(dataInfo)
|
|
|
let params = JSON.parse(JSON.stringify(this.reportForm))
|
|
|
params.reportTableData = JSON.stringify(_excelData)
|
|
|
- if (this.dateByRange && this.dateByRange.length > 0) {
|
|
|
- params.startTime = this.dateByRange[0]
|
|
|
- params.endTime = this.dateByRange[1]
|
|
|
- }
|
|
|
+ // if (this.dateByRange && this.dateByRange.length > 0) {
|
|
|
+ // params.startTime = this.dateByRange[0]
|
|
|
+ // params.endTime = this.dateByRange[1]
|
|
|
+ // }
|
|
|
saveReport(params).then(res => {
|
|
|
loading.close()
|
|
|
let msg = res.data ? '保存成功!' : '保存失败!'
|
|
@@ -2115,10 +2120,10 @@ export default {
|
|
|
updateReportInfo(loading, dataInfo) {
|
|
|
if (!loading) loading = showLoading(this, '修改中,请稍候···')
|
|
|
let params = JSON.parse(JSON.stringify(this.reportForm))
|
|
|
- if (this.dateByRange && this.dateByRange.length > 0) {
|
|
|
- params.startTime = this.dateByRange[0]
|
|
|
- params.endTime = this.dateByRange[1]
|
|
|
- }
|
|
|
+ // if (this.dateByRange && this.dateByRange.length > 0) {
|
|
|
+ // params.startTime = this.dateByRange[0]
|
|
|
+ // params.endTime = this.dateByRange[1]
|
|
|
+ // }
|
|
|
setAutoTableTime(params).then(res => {
|
|
|
loading.close()
|
|
|
let msg = res.data ? '修改成功!' : '修改失败!'
|