attr_select.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  1. <template>
  2. <div id="attr-select">
  3. <!--选中-->
  4. <div class="attr-select" v-if="type==='baseLine'">
  5. <span class="grid-title">外观</span>
  6. <div class="row">
  7. <div class="row-tit">线宽</div>
  8. <div class="grid-content">
  9. <a-input-number
  10. v-model="lineWidth"
  11. :min="1"
  12. :max="9"
  13. @change="changeLineWidth"
  14. style="width: 168px"
  15. />
  16. </div>
  17. <div class="color-choice">
  18. <swatches v-model="borderColor" popover-x="left" @close="changeBorderColor" />
  19. </div>
  20. </div>
  21. <div class="row">
  22. <div class="row-tit">线型</div>
  23. <a-select
  24. style="width: 208px"
  25. v-model="borderStyle"
  26. :default-value="borderLineOption[0].id"
  27. @change="changeBorder"
  28. >
  29. <a-select-option
  30. v-for="item in borderLineOption"
  31. :key="item.id"
  32. :label="item.src"
  33. :value="item.id"
  34. >
  35. <img :src="item.src" alt width='180' />
  36. </a-select-option>
  37. </a-select>
  38. </div>
  39. </div>
  40. <!--文字内容-->
  41. <div class="attr-select" v-if="type==='baseText'">
  42. <span class="grid-title">文字内容</span>
  43. <div class="grid-content">
  44. <a-textarea
  45. placeholder="请在此处输入文字!"
  46. v-model="textMsg"
  47. allow-clear
  48. @change="changeTextArea"
  49. :rows="4"
  50. />
  51. </div>
  52. <span class="grid-title">外观</span>
  53. <div class="row">
  54. <div class="row-tit">字号</div>
  55. <div class="grid-content">
  56. <a-input-number v-model="fontSize" :min="1" @change="changeFont" style="width: 168px" />
  57. </div>
  58. <div class="color-choice">
  59. <swatches v-model="fontColor" popover-x="left" @close="changeFontColor" />
  60. </div>
  61. </div>
  62. <div class="row">
  63. <div class="row-tit">背景色</div>
  64. <div class="color-choice">
  65. <swatches
  66. v-model="backColor"
  67. :swatches="swatches"
  68. popover-x="left"
  69. @close="changebackColor"
  70. />
  71. </div>
  72. </div>
  73. </div>
  74. <!--图片-->
  75. <div class="attr-select" v-if="type=='baseImage'">
  76. <span class="grid-title">图片</span>
  77. <section class="grid">
  78. <div class="grid-content">
  79. <a-upload-dragger
  80. name="file"
  81. accept="image/*"
  82. :customRequest="customRequest"
  83. :showUploadList="false"
  84. action="https://jsonplaceholder.typicode.com/posts/"
  85. @change="changeImage"
  86. >
  87. <p class="icon-image">
  88. <a-icon type="cloud-upload" />
  89. </p>
  90. <p class="ant-upload-text">将图片拖动到这里替换</p>
  91. <p class="ant-upload-hint">本地上传</p>
  92. </a-upload-dragger>
  93. </div>
  94. </section>
  95. <span class="grid-title">外观</span>
  96. <div class="row">
  97. <div class="row-tit">边框</div>
  98. <div class="grid-content">
  99. <a-input-number
  100. v-model="lineWidth"
  101. :min="1"
  102. :max="9"
  103. @change="changeLineWidth"
  104. style="width: 168px"
  105. />
  106. </div>
  107. <div class="color-choice">
  108. <swatches v-model="borderColor" popover-x="left" @close="changeBorderColor" />
  109. </div>
  110. </div>
  111. </div>
  112. <!--针对“设备/位置/管线/分区”属性示例-->
  113. <div class="attr-select" v-show="type =='Image'|| type == 'Line' || type == 'Zone'">
  114. <div v-if="type =='Image'|| type == 'Line'">
  115. <div class="row">
  116. <div class="row-tit">显示名称</div>
  117. <a-button type="link" class="edit-option-btn" @click="OpenEditStatus">{{editStatus[type]}}</a-button>
  118. </div>
  119. <div class="row">
  120. <a-input v-model="lengedName" @change="changeLengedName" />
  121. </div>
  122. <div class="row" v-show="type =='Image'">
  123. <div class="row-tit">字号</div>
  124. <div class="grid-content">
  125. <a-input-number v-model="fontSize" :min="1" @change="changeFont" style="width: 168px" />
  126. </div>
  127. <div class="color-choice">
  128. <swatches v-model="fontColor" @close="changeFontColor" popover-x="left" />
  129. </div>
  130. </div>
  131. <!-- 当为设备状态时 -->
  132. <div class="row" v-if="type =='Image'">
  133. <div class="row-tit">数量</div>
  134. <div class="grid-content">
  135. <a-input-number
  136. v-model="imageNum"
  137. :min="attrCards.length==imageNum?imageNum:1"
  138. @change="changeImageNum"
  139. style="width: 208px"
  140. />
  141. </div>
  142. </div>
  143. <!-- 当为管道状态时 -->
  144. <div class="row" v-if="type =='Line'">
  145. <div class="row-tit">线宽</div>
  146. <div class="grid-content">
  147. <a-input-number
  148. v-model="lineWidth"
  149. :min="1"
  150. :max="9"
  151. @change="changeLineWidth"
  152. style="width: 208px"
  153. />
  154. </div>
  155. </div>
  156. </div>
  157. <div v-if="type == 'Zone'">
  158. <div v-if="SubType=='FHFQ'">
  159. <!-- 防火分区 -->
  160. <div class="row-tit">颜色</div>
  161. <div class="row">
  162. <swatches @input="fhfqchangefillColor" :swatches="swatchess" v-model="fillColor" inline></swatches>
  163. </div>
  164. <div class="row">
  165. <div class="row-tit">显示名称</div>
  166. <a-button
  167. type="link"
  168. class="edit-option-btn"
  169. @click="OpenEditStatus"
  170. >{{editStatus[type]}}</a-button>
  171. </div>
  172. <div class="row">
  173. <a-input v-model="lengedName" @change="changeLengedName" />
  174. </div>
  175. <div class="row">
  176. <div class="row-tit">字号</div>
  177. <div class="grid-content">
  178. <a-input-number
  179. v-model="fontSize"
  180. :min="1"
  181. @change="changeFont"
  182. style="width: 168px"
  183. />
  184. </div>
  185. <div class="color-choice">
  186. <swatches v-model="fontColor" @close="changeFontColor" popover-x="left" />
  187. </div>
  188. </div>
  189. </div>
  190. <div v-if="SubType=='SCPZ'">
  191. <!-- 石材铺装 -->
  192. <div class="row">
  193. <div class="row-tit">图例说明</div>
  194. <a-button type="link" class="edit-option-btn" @click="OpenEditStatus">编辑区域</a-button>
  195. </div>
  196. <div class="row">
  197. <a-textarea
  198. @change="changeitemExplain"
  199. v-model="itemExplain"
  200. :auto-size="{ minRows: 4, maxRows: 6 }"
  201. />
  202. </div>
  203. <div class="row">
  204. <div class="row-tit">描边</div>
  205. <div class="grid-content">
  206. <a-input-number
  207. v-model="lineWidth"
  208. :min="1"
  209. :max="9"
  210. @change="changeLineWidth"
  211. style="width: 168px"
  212. />
  213. </div>
  214. <div class="color-choice">
  215. <swatches v-model="borderColor" @close="changeBorderColor" popover-x="left" />
  216. </div>
  217. </div>
  218. <div class="row">
  219. <div class="row-tit">填充</div>
  220. <div class="color-choice">
  221. <swatches v-model="fillColor" @close="changefillColor" popover-x="left" />
  222. </div>
  223. </div>
  224. </div>
  225. <div v-if="!SubType">
  226. <!-- 普通分区 -->
  227. <div class="row">
  228. <div class="row-tit">显示名称</div>
  229. <a-button
  230. type="link"
  231. class="edit-option-btn"
  232. @click="OpenEditStatus"
  233. >{{editStatus[type]}}</a-button>
  234. </div>
  235. <div class="row">
  236. <a-input v-model="lengedName" @change="changeLengedName" />
  237. </div>
  238. <div class="row">
  239. <div class="row-tit">字号</div>
  240. <div class="grid-content">
  241. <a-input-number
  242. v-model="fontSize"
  243. :min="1"
  244. @change="changeFont"
  245. style="width: 168px"
  246. />
  247. </div>
  248. <div class="color-choice">
  249. <swatches v-model="fontColor" @close="changeFontColor" popover-x="left" />
  250. </div>
  251. </div>
  252. </div>
  253. </div>
  254. </div>
  255. <!--设备/工程信息化ID/工程信息化中的位置类型-->
  256. <div
  257. class="attr-select attr-select-bottom"
  258. v-if="type =='Zone' || type =='Image'||type == 'Line'"
  259. >
  260. <a-spin :spinning="spinning">
  261. <div class="row">
  262. <span class="edit-option-text">{{type =='Zone'?`工程信息化中的位置类型`:'工程信息化中的设备类型'}}</span>
  263. <a-button type="link" class="edit-option-btn" @click="handleEdit">选择编辑</a-button>
  264. </div>
  265. <div class="grid-content" style="margin-top: 12px;">
  266. <a-card class="attr-card" v-for="(item,index) in attrCards" :key="index">{{item.sbjc ||item.wzjc}}</a-card>
  267. </div>
  268. </a-spin>
  269. </div>
  270. <!-- 快捷操作提示-->
  271. <div style="position: fixed;bottom: 0;width: 280px;" class="key-boards">
  272. <a-collapse :bordered="false" expand-icon-position="right">
  273. <template #expandIcon="props">
  274. <a-icon type="caret-up" :rotate="props.isActive ? 180 : 0" />
  275. </template>
  276. <a-collapse-panel key="1" :style="customStyle">
  277. <template slot="header">
  278. <div style="font-size: 12px;color: #8D9399;">
  279. <a-icon type="exclamation-circle" />
  280. <span style="margin-left: 5px;">键盘操作提示</span>
  281. </div>
  282. </template>
  283. <p
  284. v-for="item in keyboardOperation"
  285. :key="item.value"
  286. style="display: flex;margin-top: 13px;"
  287. >
  288. <span>{{item.value}}</span>
  289. <span class="key-board">{{item.keys}}</span>
  290. <span v-if="item.events" style="margin: 0 5px;">
  291. +
  292. <img style="width:13px;height:18px;" src="./../../assets/images/shubiao.png" alt />
  293. </span>
  294. <span>{{item.events}}</span>
  295. </p>
  296. </a-collapse-panel>
  297. </a-collapse>
  298. </div>
  299. <editDialog ref="dialog" :attrCards="attrCards" :getmajorId="getmajorId" :InfoLocal="InfoLocal" :sysNum="imageNum" :key="new Date().getTime()" />
  300. <!-- <editDialog ref="dialog" :typeEdit="2" :getmajorId="'1001'" :sysNum="5" />-->
  301. </div>
  302. </template>
  303. <script>
  304. import editDialog from "./edit-dialog";
  305. import Swatches from "vue-swatches";
  306. import bus from "@/bus";
  307. import "vue-swatches/dist/vue-swatches.css";
  308. import { SLineStyle } from "@saga-web/graph/lib";
  309. import {
  310. uploadImg,
  311. queryGlsmsLocation,
  312. queryGlsmsAsset
  313. } from "@/api/editer.js";
  314. import { getUrlMsg } from "@/components/urlMsg.js";
  315. export default {
  316. name: "attr_select",
  317. props: ["type", "focusItemList"],
  318. components: { editDialog, Swatches },
  319. data() {
  320. return {
  321. precisionList: [{ value: 10 }, { value: 20 }, { value: 30 }],
  322. precision: true,
  323. customStyle:
  324. "background: #fff;overflow: hidden; box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.11);border:0",
  325. keyboardOperation: [
  326. { value: "拖动画布:", keys: "Space", events: "Click" },
  327. { value: "加选对象:", keys: "Ctrl", events: "Press" },
  328. { value: "确认操作:", keys: "Enter" },
  329. { value: "取消对象:", keys: "Enter" }
  330. ],
  331. numberValue: 3,
  332. fontSize: 12, //字体大小
  333. lineWidth: 0,
  334. textMsg: "", //
  335. color: "#1CA085",
  336. fontColor: "#1CA085", //文字颜色
  337. borderColor: "", // 边框颜色 直线,折线,多边形等
  338. backColor: "", //背景色 用于text文字
  339. borderStyle: "solid",
  340. borderLineOption: [
  341. {
  342. id: "solid",
  343. src: require("@/assets/images/solidLine.png")
  344. },
  345. {
  346. id: "dashed",
  347. src: require("@/assets/images/dashedLine.png")
  348. },
  349. {
  350. id: "dotted",
  351. src: require("@/assets/images/dotLine.png")
  352. }
  353. ],
  354. linepxOption: [
  355. {
  356. id: 1,
  357. src: require("@/assets/images/1pxline.jpg")
  358. },
  359. {
  360. id: 2,
  361. src: require("@/assets/images/2pxline.jpg")
  362. },
  363. {
  364. id: 3,
  365. src: require("@/assets/images/3pxline.jpg")
  366. }
  367. ],
  368. editStatus: {
  369. Image: "编辑设备",
  370. Line: "管道编辑",
  371. Zone: "编辑区域"
  372. },
  373. swatchess: ["#69C5FC", "#656EDF", "#58AF6F", "#2D8FAA"],
  374. swatches: [
  375. "#F7F9Fa",
  376. "#1FBC9C",
  377. "#1CA085",
  378. "#2ECC70",
  379. "#27AF60",
  380. "#3398DB",
  381. "#2980B9",
  382. "#A463BF",
  383. "#8E43AD",
  384. "#3D556E",
  385. "#222F3D",
  386. "#00000000",
  387. ],
  388. lengedName: "", // 图例名称
  389. imageNum: 1, //设备数量
  390. fillColor: "", //修改填充色 (主要针对防火风区以及石材铺装)
  391. SubType: "", //空间类型,区分石材铺装
  392. itemExplain: "", //图例说明 只针对石材铺装
  393. attrCards: [],
  394. spinning: false,
  395. getmajorId: "",
  396. InfoLocal:[]
  397. };
  398. },
  399. methods: {
  400. onChange(e) {
  401. this.precision = e.target.checked === true ? false : true;
  402. },
  403. changeBorder(value) {
  404. bus.$emit("changeBorder", value);
  405. },
  406. changeNumber() {
  407. bus.$emit("changeFont", this.fontSize);
  408. },
  409. // 改变字体大小
  410. changeFont() {
  411. bus.$emit("changeFont", this.fontSize);
  412. },
  413. // 改变线宽
  414. changeLineWidth() {
  415. bus.$emit("changeLineWidth", this.lineWidth);
  416. },
  417. // 改变文案
  418. changeTextArea() {
  419. bus.$emit("changeText", this.textMsg);
  420. },
  421. // 改变线的颜色
  422. changeBorderColor() {
  423. if (this.borderColor) {
  424. bus.$emit("changeBorderColor", this.borderColor);
  425. }
  426. },
  427. // 改变字体颜色
  428. changeFontColor(color) {
  429. if (color) {
  430. bus.$emit("changeFontColor", color);
  431. }
  432. },
  433. changebackColor(color) {
  434. if (color) {
  435. bus.$emit("changebackColor", color);
  436. }
  437. },
  438. customRequest(info) {
  439. const formData = new FormData();
  440. formData.append("file", info.file);
  441. const postParams = formData;
  442. uploadImg({ postParams }).then(res => {
  443. if (res.Result == "success") {
  444. bus.$emit("upadataImageUrl", res.EntityList[0]);
  445. this.$message.success(
  446. `${info.file.name} file uploaded successfully.`
  447. );
  448. } else {
  449. this.$message.error(`${info.file.name} file upload failed.`);
  450. }
  451. });
  452. },
  453. //更改图例名称
  454. changeLengedName() {
  455. bus.$emit("changeLengedName", this.lengedName);
  456. },
  457. changeImage(info) {
  458. const status = info.file.status;
  459. console.log(status);
  460. if (status !== "uploading") {
  461. console.log(info.file, info.fileList);
  462. }
  463. if (status === "done") {
  464. this.$message.success(`${info.file.name} file uploaded successfully.`);
  465. } else if (status === "error") {
  466. this.$message.error(`${info.file.name} file upload failed.`);
  467. }
  468. },
  469. handleEdit() {
  470. this.$refs.dialog.showModal();
  471. },
  472. // 修改设备数量
  473. changeImageNum() {
  474. if (this.imageNum < this.attrCards.length) {
  475. this.imageNum = this.attrCards.length;
  476. return false;
  477. }
  478. if (!this.imageNum) {
  479. this.imageNum = 1;
  480. }
  481. bus.$emit("changeImageNum", this.imageNum);
  482. },
  483. // 石材铺装
  484. changefillColor() {
  485. if (this.fillColor) {
  486. bus.$emit("changefillColor", this.fillColor);
  487. }
  488. },
  489. // 防火分区
  490. fhfqchangefillColor() {
  491. if (this.fillColor) {
  492. bus.$emit("changeBorderColor", this.fillColor);
  493. bus.$emit("changefillColor", this.fillColor);
  494. }
  495. },
  496. //设置缩小item为编辑状态
  497. OpenEditStatus() {
  498. bus.$emit("OpenEditStatus");
  499. },
  500. // 编辑图例说明
  501. changeitemExplain() {
  502. bus.$emit("changeitemExplain", this.itemExplain);
  503. },
  504. // 更改工程信息化数据
  505. changeAttachObjectIds(arr) {
  506. bus.$emit("changeAttachObjectIds", arr);
  507. }
  508. },
  509. watch: {
  510. focusItemList: function(newval) {
  511. console.log('------------')
  512. console.log(FENGMAP)
  513. const Item = newval.itemList[0];
  514. this.imageNum = 1; //切换item初始化
  515. if (Item.data && Item.data.SubType) {
  516. this.SubType = Item.data.SubType;
  517. } else {
  518. this.SubType = "";
  519. }
  520. this.getmajorId = Item.data.Properties.InfoSystemId;
  521. this.InfoLocal = Item.data.Properties.InfoLocal;
  522. //判断点 面 带回专业类
  523. // let InfoTypeIdArr = [];
  524. // if( Item.data.Properties.InfoTypeId.length){
  525. // let InfoTypeId = Item.data.Properties.InfoTypeId;
  526. // console.log('poiList',11111111111111,FENGMAP.poiList);
  527. // console.log('spaceType',2222222222222222,FENGMAP.spaceType);
  528. // if(FENGMAP.poiList.length){
  529. // FENGMAP.poiList.join(',').split(',').map((item,index)=>{
  530. // let n = InfoTypeId.includes(item)
  531. // if(n){
  532. // InfoTypeIdArr.push(item);
  533. // }
  534. // })
  535. // }else if(FENGMAP.spaceType.length){
  536. // FENGMAP.spaceType.join(',').split(',').map((item,index)=>{
  537. // let n = InfoTypeId.includes(item)
  538. // if(n){
  539. // InfoTypeIdArr.push(item);
  540. // }
  541. // })
  542. // }else{
  543. // this.getmajorId = '';
  544. // }
  545. // }
  546. // InfoTypeIdArr.length? this.getmajorId = InfoTypeIdArr[0]:this.getmajorId ='';
  547. //结束
  548. if (newval.itemList.length == 1) {
  549. if (newval.itemType == "baseText") {
  550. this.textMsg = Item.text;
  551. this.fontSize = Item.font.size;
  552. this.fontColor = Item.color.value;
  553. this.backColor = Item.backgroundColor.value;
  554. } else if (newval.itemType == "baseLine") {
  555. this.lineWidth = Item.lineWidth;
  556. this.borderColor = Item.strokeColor.value;
  557. if (Item.lineStyle == SLineStyle.Solid) {
  558. this.borderStyle = "solid";
  559. } else if (Item.lineStyle == SLineStyle.Dashed) {
  560. this.borderStyle = "dashed";
  561. } else if (Item.lineStyle == SLineStyle.Dotted) {
  562. this.borderStyle = "dotted";
  563. }
  564. } else if (newval.itemType == "baseImage") {
  565. this.lineWidth = Item.lineWidth;
  566. this.borderColor = Item.strokeColor.value;
  567. }else if (
  568. newval.itemType == "Zone" ||
  569. newval.itemType == "Line" ||
  570. newval.itemType == "Image"
  571. ) {
  572. this.lengedName = Item.name;
  573. this.borderColor = Item.strokeColor ? Item.strokeColor.value : "";
  574. this.fillColor = Item.fillColor ? Item.fillColor.value : "";
  575. this.itemExplain = "";
  576. if (Item.data.Properties.ItemExplain) {
  577. this.itemExplain = Item.data.Properties.ItemExplain
  578. ? Item.data.Properties.ItemExplain
  579. : "";
  580. }
  581. if (newval.itemType == "Image") {
  582. this.imageNum = Item.num;
  583. this.color = Item.color.value;
  584. this.fontSize = Item.font.size;
  585. } else if (newval.itemType == "Line") {
  586. this.color = Item.color.value;
  587. this.fillColor = Item.fillColor.value;
  588. this.borderColor = Item.strokeColor.value;
  589. this.lineWidth = Item.lineWidth;
  590. }
  591. }
  592. }
  593. const locationList = [];
  594. const assetnumList = [];
  595. let params = {};
  596. this.attrCards = [];
  597. Item.data.AttachObjectIds.map(item => {
  598. if (item.type == "Zone") {
  599. locationList.push(item.id);
  600. } else if (item.type == "Image") {
  601. assetnumList.push(item.id);
  602. }
  603. });
  604. // if(newval.itemType == 'Zone'){
  605. this.spinning = true;
  606. if (locationList.length) {
  607. params = { locationList: locationList };
  608. } else {
  609. params = { locationList: [""] };
  610. }
  611. queryGlsmsLocation({ plazaId: getUrlMsg().projectId }, params).then(
  612. res => {
  613. this.spinning = false;
  614. if (res.data.result == "success") {
  615. console.log(res.data);
  616. if (res.data.data && res.data.data.length) {
  617. this.attrCards = this.attrCards.concat(res.data.data);
  618. }
  619. } else {
  620. this.$message.error("工程信息化中的位置信息获取失败");
  621. }
  622. }
  623. ).catch(()=>{
  624. this.spinning = false;
  625. this.$message.error("工程信息化中的位置信息获取失败");
  626. });
  627. // }else if(newval.itemType == 'Image'){
  628. this.spinning = true;
  629. if (assetnumList.length) {
  630. params = { assetnumList: assetnumList };
  631. } else {
  632. params = { assetnumList: [""] };
  633. }
  634. queryGlsmsAsset({ plazaId: getUrlMsg().projectId }, params).then(res => {
  635. this.spinning = false;
  636. if (res.data.result == "success") {
  637. console.log(res.data);
  638. if (res.data.data && res.data.data.length) {
  639. this.attrCards = this.attrCards.concat(res.data.data);
  640. }
  641. } else {
  642. this.$message.error("工程信息化中的设备信息获取失败");
  643. }
  644. }).catch(()=>{
  645. this.spinning = false;
  646. this.$message.error("工程信息化中的设备信息获取失败");
  647. });
  648. // }
  649. console.log(this.attrCards);
  650. }
  651. }
  652. };
  653. </script>
  654. <style scoped lang="less">
  655. /deep/ .ant-spin-nested-loading {
  656. height: 100% !important;
  657. .ant-spin-container {
  658. height: 100% !important;
  659. }
  660. }
  661. .attr-select {
  662. padding: 12px 16px;
  663. box-sizing: border-box;
  664. .grid-title {
  665. font-size: 12px;
  666. color: #8d9399;
  667. }
  668. .row {
  669. width: 100%;
  670. display: flex;
  671. justify-content: space-between;
  672. align-items: center;
  673. margin-top: 12px;
  674. .color-choice {
  675. width: 26px;
  676. height: 26px;
  677. & /deep/ .vue-swatches__trigger {
  678. width: 26px !important;
  679. height: 26px !important;
  680. border-radius: 2px !important;
  681. }
  682. }
  683. .row-tit {
  684. color: #8d9399;
  685. font-size: 14px;
  686. }
  687. }
  688. .grid {
  689. margin: 10px 15px;
  690. .grid-title {
  691. font-size: 12px;
  692. color: #8d9399;
  693. }
  694. }
  695. .grid-content {
  696. /*margin-top: 12px;*/
  697. position: relative;
  698. }
  699. .icon-image {
  700. font-size: 25px;
  701. }
  702. .edit-option-text {
  703. color: #8d9399;
  704. height: 32px;
  705. line-height: 32px;
  706. margin-top: -5px;
  707. }
  708. .edit-option-btn {
  709. float: right;
  710. margin-top: -5px;
  711. }
  712. .attr-card {
  713. width: 250px;
  714. margin-bottom: 10px;
  715. white-space: normal;
  716. box-shadow: 0px 2px 6px 0px rgba(31, 36, 41, 0.05);
  717. border-radius: 4px;
  718. }
  719. .ant-upload.ant-upload-drag p.ant-upload-text {
  720. font-size: 14px;
  721. color: #c3c7cb;
  722. }
  723. .ant-upload.ant-upload-drag p.ant-upload-hint {
  724. color: #0091ff;
  725. }
  726. }
  727. .key-boards {
  728. .key-board {
  729. width: 52px;
  730. height: 24px;
  731. border-radius: 3px;
  732. border: 1px solid rgba(195, 199, 203, 1);
  733. font-size: 14px;
  734. color: #646a73;
  735. text-align: center;
  736. }
  737. /deep/ .ant-collapse-content {
  738. border-top: 1px solid #eff0f1;
  739. }
  740. }
  741. #attr-select {
  742. width: 100%;
  743. height: 100%;
  744. .attr-select-bottom {
  745. height: 100%;
  746. width: 100%;
  747. position: absolute;
  748. overflow-y: auto;
  749. padding-bottom: 400px;
  750. }
  751. }
  752. </style>