|
@ -84,12 +84,13 @@ |
|
|
|
|
|
|
|
|
<!-- 定时上报输入--> |
|
|
<!-- 定时上报输入--> |
|
|
<el-row v-if="data.report.type === 'POINT'" :gutter="20"> |
|
|
<el-row v-if="data.report.type === 'POINT'" :gutter="20"> |
|
|
<el-col v-for="(item, index) in data.report.timePoints" :key="index" :lg="6" :md="8" :sm="12" :xl="4"> |
|
|
<el-col v-for="(item, index) in data.report.timePoints" :key="index" :lg="6" :md="12" :sm="24" :xl="4"> |
|
|
<el-form-item prop="report.timePoints" style="margin-bottom: 10px !important"> |
|
|
<el-form-item prop="report.timePoints" style="margin-bottom: 10px !important"> |
|
|
<el-time-picker v-model="data.report.timePoints[index]" :placeholder="`上报时间点${index + 1}`" format="HH:mm"></el-time-picker> |
|
|
<el-time-picker v-model="data.report.timePoints[index]" :placeholder="`上报时间点${index + 1}`" format="HH:mm"></el-time-picker> |
|
|
|
|
|
<el-button circle type="text" @click="removeTimePoint(index)"> |
|
|
|
|
|
<i class="el-icon-circle-close text-lg text-red-600"></i> |
|
|
|
|
|
</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<i class="el-icon-semi-select"></i> |
|
|
|
|
|
<el-button circle type="danger"></el-button> |
|
|
|
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col v-if="!data.report.timePoints || data.report.timePoints.length < 6" :lg="6" :md="8" :sm="12" :xl="4"> |
|
|
<el-col v-if="!data.report.timePoints || data.report.timePoints.length < 6" :lg="6" :md="8" :sm="12" :xl="4"> |
|
|
<el-button plain @click="addTimePoints"> |
|
|
<el-button plain @click="addTimePoints"> |
|
@ -275,4 +276,12 @@ function validateTimePoints(points) { |
|
|
} |
|
|
} |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 移除上报时间点 |
|
|
|
|
|
* @param {number} index 索引 |
|
|
|
|
|
*/ |
|
|
|
|
|
function removeTimePoint(index) { |
|
|
|
|
|
data.value.report.timePoints.splice(index, 1); |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|