| | |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- 添加或修改运维点位对话框 --> |
| | | <!-- 添加运维点位对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> |
| | | <el-form ref="form" :model="tempForm" :rules="rules" label-width="120px"> |
| | | <el-form-item label="点位名称" prop="pointName"> |
| | |
| | | <el-button @click="nextAdd" type="primary" plain>继续添加</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <div class="point-row" v-for="(point,index) in tempFormList"> |
| | | <div class="point-row" v-for="(point,index) in tempFormList"> |
| | | <div class="row-item"> |
| | | <el-input :disabled="editingIndex!==index" v-model="point.pointName" placeholder="点位名称"></el-input> |
| | | </div> |
| | |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 修改运维点位对话框 --> |
| | | <el-dialog :title="title" :visible.sync="editOpen" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-form-item label="点位名称" prop="pointName"> |
| | | <el-input v-model="form.pointName" placeholder="请输入点位名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="运维单位" prop="unitId"> |
| | | <el-select v-model="form.unitId" placeholder="运维单位"> |
| | | <el-option |
| | | v-for="item in unitList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="点位时区" prop="timezone"> |
| | | <el-date-picker |
| | | @change="dateChange" |
| | | v-model="form.timezone" |
| | | type="daterange" |
| | | align="right" |
| | | unlink-panels |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="updateCancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 修改弹窗 |
| | | editOpen: false, |
| | | // 运维单位 |
| | | unitList: [], |
| | | // 运维时区 |
| | |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | updateCancel() { |
| | | this.editOpen = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | |
| | | const id = row.id || this.ids |
| | | getPoint(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.form.timezone = [this.form.startTime, this.form.endTime] |
| | | this.editOpen = true; |
| | | this.title = "修改运维点位"; |
| | | }); |
| | | }, |
| | |
| | | addPointBatch(this.formList).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | // 重置 |
| | | this.tempForm = {}; |
| | | this.tempFormList = []; |
| | | this.formList = []; |
| | | this.getList(); |
| | | }); |
| | | } |
| | |
| | | if (this.form.id != null) { |
| | | updatePoint(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.editOpen = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |