| | |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | @row-click="rowClick" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | |
| | | @submit="handleDatasourceSubmit" |
| | | /> |
| | | </el-dialog> |
| | | <!-- 右侧弹窗,业主的设备 --> |
| | | <el-dialog |
| | | :title="onceData.tenantName" |
| | | :visible.sync="dialogVisible" |
| | | width="620px" |
| | | :before-close="handleClose" |
| | | modal-append-to-body="false" |
| | | append-to-body="true" |
| | | class="right-open" |
| | | > |
| | | <el-divider content-position="left">点击查看详情</el-divider> |
| | | <div class="r-o-our"> |
| | | <!-- <avue-crud :data="datas" :option="options" @row-click="rowClicks"> |
| | | <template slot-scope="{ row }" slot="devicestate"> |
| | | <el-tag |
| | | >{{ |
| | | row.devicestate == "0" |
| | | ? "撤防" |
| | | : row.devicestate == "1" |
| | | ? "布防" |
| | | : "无" |
| | | }} |
| | | </el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="dxzt"> |
| | | <el-tag |
| | | >{{ row.dxzt == "0" ? "掉线" : row.dxzt == "1" ? "在线" : "无" }} |
| | | </el-tag> |
| | | </template> |
| | | </avue-crud> --> |
| | | <el-table |
| | | :data="datas" |
| | | style="width: 603px; height: auto" |
| | | stripe="true" |
| | | @row-click="rowClicks" |
| | | class="r-o-o-table" |
| | | border="true" |
| | | > |
| | | <el-table-column prop="deviceName" label="设备名称" width="300"> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceNumber" label="设备编号" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="stateSevicestate" label="布撤防状态" width="100"> |
| | | </el-table-column> |
| | | <el-table-column prop="stateOnline" ref="stateOnline" label="设备状态" width="80"> </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAll } from "@/api/client/client"; |
| | | import { |
| | | getList, |
| | | getDetail, |
| | |
| | | loading: true, |
| | | box: false, |
| | | datasourceBox: false, |
| | | dialogVisible: false, //右侧弹窗 |
| | | onceData: {}, //数据 |
| | | win: {}, //样式 |
| | | datas: "", //cc |
| | | // options: { |
| | | // addBtn: false, |
| | | // height: 'auto', |
| | | // menu: false, |
| | | // header: false, |
| | | // calcHeight: 80, |
| | | // stripe:true, |
| | | // title: "表格的标题", |
| | | // titleSize: "h3", |
| | | // titleStyle: { |
| | | // color: "red", |
| | | // }, |
| | | // page: false, |
| | | // align: "center", |
| | | // menuAlign: "center", |
| | | // column: [ |
| | | // { |
| | | // label: "设备名称", |
| | | // prop: "deviceName", |
| | | // width: 180, |
| | | // }, |
| | | // { |
| | | // label: "设备编号", |
| | | // prop: "deviceNumber", |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // label: "布撤防状态", |
| | | // prop: "devicestate", |
| | | // type: "select", |
| | | // slot: true, |
| | | // width: 100, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择布撤防状态", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // dicData: [ |
| | | // { |
| | | // label: "撤防", |
| | | // value: "0", |
| | | // }, |
| | | // { |
| | | // label: "布防", |
| | | // value: "1", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // label: "设备状态", |
| | | // prop: "dxzt", |
| | | // slot: true, |
| | | // addDisplay: false, |
| | | // editDisplay: false, |
| | | // }, |
| | | // ], |
| | | // }, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | ], |
| | | }, |
| | | ]; |
| | | } |
| | | else if (value.value == "2") { |
| | | } else if (value.value == "2") { |
| | | that.option.group = [ |
| | | { |
| | | label: "详细信息", |
| | |
| | | add(row).then( |
| | | () => { |
| | | if (row.type == "0") { |
| | | console.log(123) |
| | | console.log(123); |
| | | instery( |
| | | row.dj, |
| | | // row.had, |
| | | // row.had, |
| | | row.ht, |
| | | row.ctime, |
| | | row.content, |
| | |
| | | insertss( |
| | | row.dj, |
| | | row.nature, |
| | | // row.had, |
| | | // row.had, |
| | | row.motto, |
| | | row.ctime, |
| | | row.content, |
| | |
| | | row.category, |
| | | row.attributes, |
| | | row.developers, |
| | | // row.had, |
| | | // row.had, |
| | | row.housetype, |
| | | row.content, |
| | | row.hn |
| | |
| | | }); |
| | | } else if (this.form.type == "0") { |
| | | selectTy(this.form.tenantName).then((re) => { |
| | | console.log(re ,123) |
| | | console.log(re, 123); |
| | | const data = res.data.data; |
| | | data.dj = re.data.data[0].dj; |
| | | data.ht = re.data.data[0].ht; |
| | |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | // console.log(res); |
| | | this.onceData = res.data.data.records[0]; |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | rowClick(val) { |
| | | //行点击事件 //右侧弹窗事件 |
| | | // console.log(val); |
| | | this.onceData = val; |
| | | this.dialogVisible = true; |
| | | }, |
| | | rowClicks(val) { |
| | | //弹窗行点击事件 |
| | | // console.log(val); |
| | | this.$router.push({ path: "/dataL/dataL", query: val }); |
| | | }, |
| | | changeDataOpen(det){ |
| | | if(det.length > 0){ |
| | | for(var key in det){ |
| | | |
| | | det[key].stateOnline = det[key].onlineStatus == "0" ? "掉线" : det[key].onlineStatus == "1" ? "在线" : "无" |
| | | det[key].stateSevicestate = det[key].devicestate == "0" ? "撤防" : det[key].devicestate == "1" ? "布防" : "无" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | getAll().then((res) => { |
| | | //测试数据 |
| | | this.datas = res.data.data; |
| | | this.changeDataOpen(this.datas) |
| | | console.log(this.datas); |
| | | }); |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | .el-input__inner { |
| | | width: aotu; |
| | | } |
| | | .right-open { |
| | | //右侧弹窗样式 |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: Center; |
| | | overflow: hidden; |
| | | |
| | | .el-dialog { |
| | | margin: 0 auto !important; |
| | | height: 98%; |
| | | overflow: hidden; |
| | | position: fixed; |
| | | top: 1%; |
| | | right: 0; |
| | | .el-dialog__body { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 54px; |
| | | bottom: 0; |
| | | right: 0; |
| | | padding: 0; |
| | | z-index: 1; |
| | | overflow: hidden; |
| | | overflow-y: auto; |
| | | } |
| | | } |
| | | @keyframes dialog-fade-in { |
| | | 0% { |
| | | transform: translate3d(0, 0, 0, 100%); |
| | | opacity: 0; |
| | | } |
| | | 100% { |
| | | transform: translate3d(0, 0, 0, 0); |
| | | opacity: 1; |
| | | } |
| | | } |
| | | @keyframes dialog-fade-out { |
| | | 0% { |
| | | transform: translate3d(0, 0, 0); |
| | | opacity: 1; |
| | | } |
| | | 100% { |
| | | transform: translate3d(0, 0, 0); |
| | | opacity: 0; |
| | | } |
| | | } |
| | | .r-o-our { |
| | | width: calc(100% - 2px); |
| | | height: calc(100% - 28px); |
| | | // border: hotpink 1px solid; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | .r-o-o-table{ |
| | | // border: rgb(69, 36, 146) 1px solid; |
| | | position: relative; |
| | | left: 8px; |
| | | } |
| | | </style> |