tactics.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  1. <template>
  2. <div class="content">
  3. <div class="tabs">
  4. <ul>
  5. <li v-for="(tab,i) in tabs" @click="goTab(tab.url)" :class="{'active':tabIndex == i}">
  6. {{tab.name}}
  7. </li>
  8. </ul>
  9. </div>
  10. <div class="panel">
  11. <div class="panel-body">
  12. <div class=" panel_control">
  13. <div class="pline">
  14. <em>策略名称:</em>
  15. <el-input v-model="panel.tagname" placeholder=""></el-input>
  16. </div>
  17. <div class="pline">
  18. <el-button size="medium" type="primary" @click="query">查询</el-button>
  19. </div>
  20. <div class="pline pull-right">
  21. <el-button size="medium" type="primary" @click="addList">添加</el-button>
  22. <el-button size="medium" type="primary" @click="editList">修改</el-button>
  23. <el-button size="medium" type="primary" @click="delList">删除</el-button>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. <el-table
  29. :data="tableData"
  30. is-horizontal-resize
  31. :default-sort="{prop: 'date', order: 'descending'}"
  32. v-loading="loading"
  33. element-loading-background="rgba(0, 0, 0, 0.8)"
  34. class=""
  35. @selection-change="handleSelectionChange"
  36. stripe
  37. ref="multipleTable"
  38. @row-click="handle"
  39. >
  40. <el-table-column type="expand">
  41. <template slot-scope="props">
  42. <el-table
  43. :data="props.row.Value.SignalList"
  44. style="width: 100%">
  45. <el-table-column
  46. prop="Type"
  47. label="无线协议"
  48. :formatter="filterWirelessTypeName"
  49. >
  50. </el-table-column>
  51. <el-table-column
  52. prop="Range"
  53. label="扫描距离"
  54. :formatter="filterDistanceName"
  55. sortable
  56. >
  57. </el-table-column>
  58. <el-table-column
  59. prop="begin"
  60. label="起始频率"
  61. sortable
  62. >
  63. </el-table-column>
  64. <el-table-column
  65. prop="end"
  66. label="截止频率"
  67. sortable
  68. >
  69. </el-table-column>
  70. </el-table>
  71. </template>
  72. </el-table-column>
  73. <el-table-column
  74. type="selection"
  75. width="55">
  76. </el-table-column>
  77. <el-table-column
  78. type="index"
  79. label="序号"
  80. width="60"
  81. sortable
  82. >
  83. </el-table-column>
  84. <el-table-column
  85. prop="Name"
  86. label="策略名称"
  87. >
  88. </el-table-column>
  89. <el-table-column
  90. prop="Value.IsRecording"
  91. label="信号录制"
  92. >
  93. <template slot-scope="scope">
  94. <span class="red" v-if="scope.row.Value.IsRecording" style="color: #72FF99">已启用</span>
  95. <span v-else style="color: red">已禁用</span>
  96. </template>
  97. </el-table-column>
  98. <el-table-column
  99. prop="CreateAt"
  100. label="创建时间"
  101. sortable
  102. :formatter="filterTime"
  103. >
  104. </el-table-column>
  105. </el-table>
  106. <br>
  107. <el-pagination
  108. background
  109. :total="pageination.total"
  110. :page-size="pageination.pageItem"
  111. @current-change="pageChange"
  112. ></el-pagination>
  113. </div>
  114. </template>
  115. <script>
  116. import Global from '../Global.js'
  117. import dialog_referrer_list from '../components/dialog_referrer_list'
  118. import {
  119. DetectorQuery,
  120. GetChildRegionSelect,
  121. DetectorEditStatus,
  122. RegionPictureGetByRegionId,
  123. DetectorAdd,
  124. RegionList,
  125. DetectorList,
  126. DetectorEdit,
  127. GetDetectorCoords,
  128. GeFullRegionSelect,
  129. ScanStrategyListDetail,
  130. ScanStrategyDel
  131. } from '../api/getApiRes.js'
  132. let qs = require('qs');
  133. export default {
  134. data() {
  135. return {
  136. // dialog
  137. dialog_state: false,
  138. dialog_title: '',
  139. dialog_type: '',//类型,1是添加,2是修改
  140. dialog: {
  141. mac: '',
  142. comId: 1,
  143. regionlevelOneId: 0,
  144. regionId: 0,
  145. tagname: '',
  146. longitude: 0,
  147. latitude: 0,
  148. HardwareVersion: '',
  149. FirmwareVersion: '',
  150. FirmwareScanM4Version: '',
  151. FirmwareScanM0Version: '',
  152. purchasesrc: '',
  153. location: '',
  154. coords_memo: '',
  155. memo: '',
  156. plateImgSrc: '',
  157. regionlevelOneIdOptions: [],
  158. regionIdRoomOptions: [],
  159. points: [],
  160. CoordsId: 0,
  161. status: 0,
  162. },
  163. tabIndex: 0,
  164. tabs: [
  165. {name: '扫描策略管理', url: 'tactics'},
  166. ],
  167. // panel 配置项目
  168. panel: {
  169. usercode: '',
  170. username: '',
  171. compname: '',
  172. keyword: '',
  173. USERCODE: '',
  174. taskstatus: 99,
  175. regionid: 0,
  176. regionid2: '',
  177. regionidOptions: [],
  178. regionidOptions2: [],
  179. options: [
  180. {value: 99, label: '全部'},
  181. {value: 1, label: '进行中'},
  182. {value: 2, label: '已完成'},
  183. ],
  184. time1: globalBt3(2),
  185. },
  186. pageination: {
  187. pageItem: 100,
  188. pageoptions: pageOptions(),
  189. total: 500,
  190. pageIndex: 1,
  191. },
  192. draw: 1,
  193. start: 0,
  194. recordsTotal: 0,
  195. tableData: [],
  196. allTableData: [],
  197. limit: '10',
  198. multipleSort: false,
  199. loading: true,
  200. fileList: [],
  201. multipleSelection: [],
  202. detectedmac: '',
  203. }
  204. },
  205. mounted() {
  206. if (this.$route.query.RegionId) {
  207. this.panel.regionid = this.$route.query.RegionId;
  208. this.panel.tagname = this.$route.query.TagName;
  209. }
  210. this.getTableQuery();
  211. },
  212. watch: {
  213. '$route': function (val) {
  214. if (val.path == '/tactics') {
  215. this.getTableQuery();
  216. }
  217. },
  218. },
  219. methods: {
  220. handle(row, column, event) {
  221. this.$refs.multipleTable.toggleRowSelection(row);
  222. },
  223. // 页面数据查询
  224. getTableQuery() {
  225. let that = this;
  226. // this.getGetChildRegionSelect(0, 1);
  227. this.getGeFullRegionSelect();
  228. that.loading = true;
  229. // 查询检测策略。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测策略。 如果supregionid,regionid都传0,默认查询企业ID下所有检测策略
  230. let param = {
  231. token: localStorage.token,
  232. name: that.panel.tagname,//标签名
  233. };
  234. let postdata = qs.stringify(param);
  235. ScanStrategyListDetail(postdata).then(res => {
  236. let json = res;
  237. if (json.Code == 0) {
  238. that.loading = false;
  239. if (json.Rs) {
  240. // 把起始频率回填
  241. json.Rs.map(function (item) {
  242. item.Value.SignalList.map(function (row) {
  243. if (row.Type == 13) {
  244. row.begin = item.Value.Freq06G[0].Begin;
  245. row.end = item.Value.Freq06G[0].End;
  246. }
  247. })
  248. });
  249. that.allTableData = json.Rs;
  250. that.recordsTotal = json.Rs.length;
  251. } else {
  252. that.allTableData = [];
  253. that.recordsTotal = 0;
  254. }
  255. // 设置分页数据
  256. that.setPaginations();
  257. } else {
  258. that.$message.error(json.Memo + ',错误代码:' + json.Code);
  259. }
  260. })
  261. },
  262. // 获取下级列表
  263. getGeFullRegionSelect() {
  264. let that = this;
  265. let param = {
  266. token: localStorage.token,
  267. };
  268. let postdata = qs.stringify(param);
  269. RegionList(postdata).then(res => {
  270. let json = res;
  271. if (json.Code == 0) {
  272. if (!json.Rs) {
  273. that.$message.error('区域列表为空,请先添加有效区域');
  274. return false
  275. }
  276. that.panel.regionidOptions = json.Rs;
  277. that.panel.regionidOptions.unshift({Id: 0, Name: "全部", DisplayName: "全部"});
  278. } else {
  279. that.$message.error(json.Memo + ',错误代码:' + json.Code);
  280. }
  281. })
  282. },
  283. // dialog获取下级列表
  284. dialoggetGeFullRegionSelect() {
  285. let that = this;
  286. let param = {
  287. token: localStorage.token,
  288. };
  289. let postdata = qs.stringify(param);
  290. RegionList(postdata).then(res => {
  291. let json = res;
  292. if (json.Code == 0) {
  293. that.dialog.regionlevelOneIdOptions = json.Rs;
  294. that.dialog.regionId = json.Rs[0].Id;
  295. } else {
  296. that.$message.error(json.Memo + ',错误代码:' + json.Code);
  297. }
  298. })
  299. },
  300. // dialog获取区域下级菜单
  301. dialogGetGetChildRegionSelect(regionId, level) {
  302. let that = this;
  303. let param = {
  304. token: localStorage.token,
  305. regionId: regionId,
  306. };
  307. let postdata = qs.stringify(param);
  308. RegionList(postdata).then(res => {
  309. let json = res;
  310. if (json.Code == 0) {
  311. that.dialog.regionlevelOneIdOptions = json.Rs;
  312. that.dialog.regionlevelOneId = regionId;
  313. // if (level == 1) {
  314. // console.log(json.Rs);
  315. // that.dialog.regionlevelOneIdOptions = json.Rs;
  316. // that.dialog.regionlevelOneId = regionId;
  317. // } else {
  318. // if (json.Rs) {
  319. // console.log(123);
  320. // that.dialog.regionIdRoomOptions = json.Rs;
  321. // that.dialog.regionId = regionId;
  322. // } else {
  323. // that.dialog.regionIdRoomOptions = [];
  324. // that.dialog.regionId = '';
  325. // }
  326. // }
  327. } else {
  328. that.$message.error(json.Memo + ',错误代码:' + json.Code);
  329. }
  330. })
  331. },
  332. // 跳转tab页面
  333. goTab(url) {
  334. this.$router.push({path: url});
  335. },
  336. // 查询按钮
  337. query() {
  338. this.getTableQuery();
  339. this.$message.success('查询完毕');
  340. },
  341. handleSelectionChange(val) {
  342. this.multipleSelection = val;
  343. },
  344. // 设置分页数据
  345. setPaginations() {
  346. // 分页属性
  347. let that = this;
  348. that.pageination.total = that.recordsTotal;
  349. // 默认分页
  350. that.tableData = that.allTableData.filter((item, index) => {
  351. return index < that.pageination.pageItem;
  352. });
  353. },
  354. // 每页显示数量
  355. handleSizeChange() {
  356. let that = this;
  357. that.tableData = that.allTableData.filter((item, index) => {
  358. return index < that.pageination.pageItem;
  359. });
  360. that.draw = that.pageination.pageItem;
  361. // that.getTableQuery();
  362. },
  363. // 翻页
  364. pageChange(pageIndex) {
  365. let that = this;
  366. // 获取当前页
  367. let index = that.pageination.pageItem * (pageIndex - 1);
  368. // 数据总数
  369. let nums = that.pageination.pageItem * pageIndex;
  370. // 容器
  371. let tables = [];
  372. for (var i = index; i < nums; i++) {
  373. if (that.allTableData[i]) {
  374. tables.push(that.allTableData[i])
  375. }
  376. this.tableData = tables;
  377. }
  378. that.start = index * that.draw;
  379. // that.getTableQuery();
  380. },
  381. // 自动排序
  382. sortChange(params) {
  383. console.log(params)
  384. },
  385. // 过滤时间
  386. filterFmtDate(value, row, column) {
  387. return globalfmtDate(column, 11);
  388. },
  389. addList() {
  390. this.$router.push(
  391. {
  392. path: '/addTactics', query: {tid: 0}
  393. }
  394. )
  395. },
  396. delList() {
  397. let that = this;
  398. // checkNum
  399. if (!this.multipleSelection.length) {
  400. that.$message({
  401. showClose: true,
  402. message: '错了哦,需要先选中至少一条记录',
  403. type: 'error'
  404. });
  405. return false
  406. }
  407. if (this.multipleSelection.length > 1) {
  408. this.$message({
  409. showClose: true,
  410. message: '错了哦,只能选中一条记录',
  411. type: 'error'
  412. });
  413. return false
  414. }
  415. let Id = that.multipleSelection[0].Id;
  416. let param = {
  417. token: localStorage.token,
  418. id: Id,
  419. };
  420. let postdata = qs.stringify(param);
  421. this.$confirm('此操作将永久删除该策略, 是否继续?', '提示', {
  422. confirmButtonText: '确定',
  423. cancelButtonText: '取消',
  424. type: 'warning'
  425. }).then(() => {
  426. ScanStrategyDel(postdata).then(res => {
  427. let json = res;
  428. if (json.Code == 0) {
  429. that.$message({
  430. showClose: true,
  431. message: '选中的策略已删除!',
  432. type: 'success'
  433. });
  434. // 重载列表
  435. that.getTableQuery();
  436. that.dialog_state = false;
  437. } else {
  438. that.$message.error(json.Memo + ',错误代码:' + json.Code);
  439. }
  440. });
  441. }).catch(() => {
  442. this.$message({
  443. type: 'info',
  444. message: '已取消删除'
  445. });
  446. });
  447. },
  448. editList() {
  449. let that = this;
  450. // checkNum
  451. if (!this.multipleSelection.length) {
  452. this.$message({
  453. showClose: true,
  454. message: '错了哦,需要先选中一条记录',
  455. type: 'error'
  456. });
  457. return false
  458. }
  459. if (this.multipleSelection.length > 1) {
  460. this.$message({
  461. showClose: true,
  462. message: '错了哦,只能选中一条记录',
  463. type: 'error'
  464. });
  465. return false
  466. }
  467. let row = this.multipleSelection[0];
  468. this.$router.push(
  469. {
  470. path: '/addtactics', query: {tid: row.Id, name: row.Name, Value: JSON.stringify(row.Value)}
  471. }
  472. );
  473. },
  474. // 自动补全MAC
  475. autoCompleteMac() {
  476. let text = this.dialog.mac;
  477. if (text.length == 2 || text.length == 5 || text.length == 8 || text.length == 11 || text.length == 14) {
  478. this.dialog.mac = this.dialog.mac.toUpperCase() + ":"
  479. }
  480. if (text.length > 14) {
  481. this.dialog.mac = this.dialog.mac.toUpperCase()
  482. }
  483. },
  484. // 探测记录
  485. goPhoneRecord(row) {
  486. this.$router.push({
  487. path: '/phoneSign',
  488. query:
  489. {
  490. detectorid: row.Id,
  491. comId: 1,
  492. regionId: row.RegionId,
  493. }
  494. });
  495. },
  496. // 探测记录
  497. goWifiRecord(row) {
  498. this.$router.push({
  499. path: '/wifiSign',
  500. query:
  501. {
  502. detectorid: row.Id,
  503. comId: 1,
  504. regionId: row.RegionId,
  505. }
  506. });
  507. },
  508. dialog_cancel() {
  509. let that = this;
  510. that.dialog_state = false;
  511. },
  512. dialog_ok() {
  513. if (this.dialog_type == 1) {
  514. this.confirmAddEquip();
  515. } else {
  516. this.confirmEditEquip();
  517. }
  518. },
  519. // 提交增加新策略
  520. confirmAddEquip() {
  521. let that = this;
  522. // checkVal
  523. if (!that.dialog.mac) {
  524. this.$message.error('错了哦,mac不能为空');
  525. return false
  526. }
  527. if (!checkMac(that.dialog.mac)) {
  528. this.$message.error('错了哦,mac格式不正确');
  529. return false
  530. }
  531. if (!that.dialog.regionId) {
  532. this.$message.error('错了哦,所属区域不能为空');
  533. return false
  534. }
  535. if (!that.dialog.tagname) {
  536. this.$message.error('错了哦,标签名不能为空');
  537. return false
  538. }
  539. if (that.dialog.tagname.length > 20) {
  540. this.$message.error('错了哦,标签名不能超过20个字符');
  541. return false
  542. }
  543. this.selectRegionLabel(that.dialog.regionId);
  544. let param = {
  545. token: localStorage.token,
  546. mac: that.dialog.mac,
  547. comId: 1,
  548. regionId: that.dialog.regionId,
  549. name: that.dialog.tagname,
  550. HardwareVersion: that.dialog.HardwareVersion,
  551. FirmwareVersion: that.dialog.FirmwareVersion,
  552. FirmwareScanM4Version: that.dialog.FirmwareScanM4Version,
  553. FirmwareScanM0Version: that.dialog.FirmwareScanM0Version,
  554. location: that.dialog.location,
  555. purchasesrc: that.dialog.purchasesrc,
  556. x: that.dialog.points[0].x,
  557. y: that.dialog.points[0].y,
  558. // coords_memo: that.dialog.coords_memo,
  559. memo: that.dialog.memo,
  560. };
  561. let postdata = qs.stringify(param);
  562. DetectorAdd(postdata).then(res => {
  563. let json = res;
  564. if (json.Code == 0) {
  565. that.$message({
  566. showClose: true,
  567. message: '策略添加成功!',
  568. type: 'success'
  569. });
  570. // 重载列表
  571. that.getTableQuery();
  572. that.dialog_state = false;
  573. } else {
  574. that.$message.error(json.Memo + ',错误代码:' + json.Code);
  575. }
  576. });
  577. },
  578. // 提交修改策略信息
  579. confirmEditEquip() {
  580. let that = this;
  581. // checkVal
  582. if (!that.dialog.mac) {
  583. this.$message.error('错了哦,mac不能为空');
  584. return false
  585. }
  586. if (!checkMac(that.dialog.mac)) {
  587. this.$message.error('错了哦,mac格式不正确');
  588. return false
  589. }
  590. if (!that.dialog.regionId) {
  591. this.$message.error('错了哦,所属区域不能为空');
  592. return false
  593. }
  594. if (!that.dialog.tagname) {
  595. this.$message.error('错了哦,标签名不能为空');
  596. return false
  597. }
  598. if (that.dialog.tagname.length > 20) {
  599. this.$message.error('错了哦,标签名不能超过20个字符');
  600. return false
  601. }
  602. this.selectRegionLabel(that.dialog.regionId);
  603. let param = {
  604. token: localStorage.token,
  605. id: that.dialog.eqId,
  606. mac: that.dialog.mac,
  607. comId: 1,
  608. regionId: that.dialog.regionId,
  609. name: that.dialog.tagname,
  610. HardwareVersion: that.dialog.HardwareVersion,
  611. FirmwareVersion: that.dialog.FirmwareVersion,
  612. FirmwareScanM4Version: that.dialog.FirmwareScanM4Version,
  613. FirmwareScanM0Version: that.dialog.FirmwareScanM0Version,
  614. location: that.dialog.location,
  615. purchasesrc: that.dialog.purchasesrc,
  616. x: that.dialog.points[0].x,
  617. y: that.dialog.points[0].y,
  618. coords_memo: that.dialog.coords_memo,
  619. memo: that.dialog.memo,
  620. coordsType: 1,//坐标状态 0:禁用, 1:启用, 9:删除,没有就传0
  621. coordsID: that.dialog.CoordsId,
  622. status: that.dialog.status,
  623. };
  624. let postdata = qs.stringify(param);
  625. DetectorEdit(postdata).then(res => {
  626. let json = res;
  627. if (json.Code == 0) {
  628. that.$message({
  629. showClose: true,
  630. message: '策略添加成功!',
  631. type: 'success'
  632. });
  633. // 重载列表
  634. that.getTableQuery();
  635. that.dialog_state = false;
  636. } else {
  637. that.$message.error(json.Memo + ',错误代码:' + json.Code);
  638. }
  639. });
  640. },
  641. // 修改策略状态
  642. getDetectorEditStatus(detectorid, status, text) {
  643. let that = this;
  644. let param = {
  645. token: localStorage.token,
  646. detectorid: detectorid,
  647. status: status,
  648. };
  649. let postdata = qs.stringify(param);
  650. DetectorEditStatus(postdata).then(res => {
  651. let json = res;
  652. if (json.Code == 0) {
  653. that.$message({
  654. showClose: true,
  655. message: text + '成功!',
  656. type: 'success'
  657. });
  658. // table 重载
  659. that.getTableQuery();
  660. } else {
  661. that.$message.error(json.Memo + ',错误代码:' + json.Code);
  662. }
  663. })
  664. },
  665. // 禁用
  666. pauseRow(row) {
  667. let that = this;
  668. this.$confirm('是否禁用' + row.TagName + '策略?', '禁用操作', {
  669. confirmButtonText: '确定',
  670. cancelButtonText: '取消',
  671. type: 'warning'
  672. }).then(() => {
  673. that.getDetectorEditStatus(row.Id, 0, '禁用');
  674. }).catch(() => {
  675. this.$message({
  676. type: 'info',
  677. message: '已取消禁用'
  678. });
  679. });
  680. },
  681. // 获取区域位置的平面图
  682. getRegionPictureGetByRegionId(regionID) {
  683. let that = this;
  684. let param = {
  685. token: localStorage.token,
  686. regionID: regionID,
  687. regionId: regionID,
  688. };
  689. let postdata = qs.stringify(param);
  690. that.dialog.plateImgSrc = '../assets/img/main/grid.png'
  691. // RegionPictureGetByRegionId(postdata).then(res => {
  692. // let json = res;
  693. // that.dialog.plateImgSrc = '';
  694. // if (json.Code == 0) {
  695. // that.dialog.plateImgSrc = json.EncodeString;
  696. // } else {
  697. // that.$message.error(json.Memo + ',错误代码:' + json.Code);
  698. // }
  699. // })
  700. },
  701. // 启用
  702. runRow(row) {
  703. console.log(row);
  704. let that = this;
  705. this.$confirm('是否启用' + row.TagName + '策略?', '启用操作', {
  706. confirmButtonText: '确定',
  707. cancelButtonText: '取消',
  708. type: 'warning'
  709. }).then(() => {
  710. that.getDetectorEditStatus(row.Id, 1, '启用');
  711. }).catch(() => {
  712. this.$message({
  713. type: 'info',
  714. message: '已取消启用'
  715. });
  716. });
  717. },
  718. // 添加探测器位置的点坐标
  719. addPoint(e) {
  720. let x = e.offsetX;
  721. let y = e.offsetY;
  722. this.dialog.points = [{x: x, y: y}];
  723. },
  724. // 获取位置的文字内容
  725. selectRegionLabel(id) {
  726. let that = this;
  727. let selectedWorkName = {};
  728. // selectedWorkName = that.dialog.regionIdRoomOptions.filter(item => {
  729. selectedWorkName = that.dialog.regionlevelOneIdOptions.filter(item => {
  730. if (item.Id === id) {
  731. console.log(item.Name);
  732. that.dialog.location = item.Name;
  733. }
  734. });
  735. },
  736. // 过滤设备类型
  737. filterWirelessTypeName(value, row, column) {
  738. return filterWirelessType(column);
  739. },
  740. filterDistanceName(value, row, column) {
  741. return filterWirelessRangeText(column)
  742. },
  743. filterTime(val, row, column) {
  744. return nonTfmtDate(column, 10);
  745. }
  746. }
  747. ,
  748. components: {
  749. dialog_referrer_list
  750. }
  751. }
  752. </script>
  753. <style scoped>
  754. @import "../assets/css/panel.css";
  755. @import "../assets/css/dialog.css";
  756. .tabs ul {
  757. width: 168px;
  758. float: left;
  759. }
  760. table span {
  761. cursor: pointer;
  762. }
  763. .down_btn {
  764. float: left;
  765. }
  766. .content {
  767. width: 98%;
  768. overflow: hidden;
  769. display: block;
  770. margin: 0 auto;
  771. padding-left: 20px;
  772. }
  773. .selectStyle {
  774. width: 100%;
  775. color: #005EA2;
  776. }
  777. .selectStyle ::placeholder {
  778. color: #005EA2;
  779. }
  780. /deep/ .modal .el-select .el-input .el-select__caret {
  781. position: relative;
  782. top: 35px;
  783. }
  784. .imgContianer {
  785. width: 100%;
  786. height: 340px;
  787. overflow: hidden;
  788. display: block;
  789. margin: 0 auto;
  790. }
  791. .imgContianer img {
  792. width: 100%;
  793. height: 100%;
  794. overflow: hidden;
  795. display: block;
  796. margin: 0 auto;
  797. }
  798. .pointers {
  799. position: relative;
  800. bottom: 340px;
  801. width: 100%;
  802. height: 100%;
  803. overflow: hidden;
  804. display: block;
  805. margin: 0 auto;
  806. }
  807. .imgContianer i {
  808. position: relative;
  809. width: 10px;
  810. height: 10px;
  811. float: left;
  812. border-radius: 250px;
  813. background: #FFDD00;
  814. }
  815. /deep/ .modal-dialog {
  816. height: 80px;
  817. margin-top: 20px;
  818. }
  819. /deep/ textarea {
  820. color: #6DC1FF;
  821. }
  822. /deep/ .el-table__empty-text {
  823. color: #015B9E;
  824. }
  825. /deep/ .el-input.is-disabled .el-input__inner {
  826. background-color: #015B9E;
  827. }
  828. .red {
  829. color: red;
  830. }
  831. .yellow {
  832. color: #fd0;
  833. }
  834. /deep/ .el-table__expand-icon {
  835. color: #fff;
  836. }
  837. </style>