| | |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <div style="display: flex"> |
| | | <el-button icon="el-icon-c-scale-to-original" @click="deviceTypeButton">设备类型</el-button> |
| | | <el-button icon="el-icon-document-copy" @click="deviceGroupButton">设备组</el-button> |
| | | <el-button icon="el-icon-download" @click="upload">导入</el-button> |
| | | <el-button v-waves icon="el-icon-c-scale-to-original" @click="deviceTypeButton">设备类型</el-button> |
| | | <el-button v-waves icon="el-icon-document-copy" @click="deviceGroupButton">设备组</el-button> |
| | | <el-button v-waves icon="el-icon-download" @click="upload">导入</el-button> |
| | | |
| | | </div> |
| | | |
| | | <!-- <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>--> |
| | | <!-- <el-button v-waves type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>--> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | class="bodySearchReset" |
| | | :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}" |
| | | > |
| | | <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button> |
| | | <el-button v-waves type="primary" icon="el-icon-search" @click="search">查询</el-button> |
| | | <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button> |
| | | </div> |
| | | </el-form> |
| | | <div |
| | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button v-waves @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | |
| | | @close="handleCloseDeviceType" |
| | | > |
| | | <div style="margin-bottom: 20px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="addDeviceType">新增</el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-delete" @click="delSetting">删除</el-button>--> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="addDeviceType">新增</el-button> |
| | | <!-- <el-button v-waves type="primary" icon="el-icon-delete" @click="delSetting">删除</el-button>--> |
| | | </div> |
| | | <el-table |
| | | ref="DeviceTypeArray" |
| | |
| | | <el-table-column label="操作"> |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="DeviceTypeDel(row)">删除</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="DeviceTypeSave(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="DeviceTypeCancel(row)">取消</el-button> |
| | | <el-button v-if="row.isVisible===0" v-waves type="text" @click="DeviceTypeDel(row)">删除</el-button> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="DeviceTypeSave(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="DeviceTypeCancel(row)">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | /> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="DeviceTypeDialogVisibleCancel">返回</el-button> |
| | | <!-- <el-button type="primary" @click="settingDialogVisibleConfirm">确 定</el-button>--> |
| | | <el-button v-waves @click="DeviceTypeDialogVisibleCancel">返回</el-button> |
| | | <!-- <el-button v-waves type="primary" @click="settingDialogVisibleConfirm">确 定</el-button>--> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | @close="handleCloseDeviceGroup" |
| | | > |
| | | <div style="margin-bottom: 20px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="addDeviceGroup">新增</el-button> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="addDeviceGroup">新增</el-button> |
| | | </div> |
| | | <el-table |
| | | ref="DeviceGroupArray" |
| | |
| | | <el-table-column label="操作"> |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="DeviceGroupDel(row)">删除</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="DeviceGroupSave(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="DeviceGroupCancel(row)">取消</el-button> |
| | | <el-button v-if="row.isVisible===0" v-waves type="text" @click="DeviceGroupDel(row)">删除</el-button> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="DeviceGroupSave(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="DeviceGroupCancel(row)">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | /> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="DeviceGroupDialogVisibleCancel">返回</el-button> |
| | | <!-- <el-button type="primary" @click="settingDialogVisibleConfirm">确 定</el-button>--> |
| | | <el-button v-waves @click="DeviceGroupDialogVisibleCancel">返回</el-button> |
| | | <!-- <el-button v-waves type="primary" @click="settingDialogVisibleConfirm">确 定</el-button>--> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | import { handleDatetime, validateCode } from '@/utils/global' |
| | | import ImportPicker from '@/components/ImportPicker' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | |
| | | export default { |
| | | name: 'SBQD', |
| | | components: { |
| | | Pagination, ImportPicker |
| | | }, |
| | | directives: { elDragDialog }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | | return { |
| | | mouseHoverType: 'mouseout', |
| | |
| | | }, |
| | | // 新增按钮 |
| | | addDeviceType() { |
| | | if (this.DeviceTypeArray.find(i => i.isVisible === 1)) { |
| | | return this.$message.info('请先保存上一条记录!') |
| | | } |
| | | |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | this.DeviceTypeArray.unshift({ code: '', name: '', group: '', remark: '', isVisible: 1, number: number }) |
| | |
| | | }, |
| | | // 新增 |
| | | addDeviceGroup() { |
| | | if (this.DeviceGroupArray.find(i => i.isVisible === 1)) { |
| | | return this.$message.info('请先保存上一条记录!') |
| | | } |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | this.DeviceGroupArray.unshift({ |