attr_select.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  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" :swatches="swatchesFont" 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" :swatches="swatchesFont" @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" :swatches="swatchesFont" @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" :swatches="swatchesFont" @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: ["#57C5FC", "#5F6CE1", "#71B312", "#00A177"],
  374. swatches: [
  375. "#f7f9facc",
  376. "#1FBC9C",
  377. "#1CA085",
  378. "#2ECC70",
  379. "#27AF60",
  380. "#3398DB",
  381. "#2980B9",
  382. "#A463BF",
  383. "#8E43AD",
  384. "#3D556E",
  385. "#222F3D",
  386. "#00000000",
  387. ],
  388. swatchesFont: [
  389. "#1fbc9c",
  390. "#1ca085",
  391. "#2ecc70",
  392. "#27af60",
  393. "#3398db",
  394. "#2980b9",
  395. "#a463bf",
  396. "#8e43ad",
  397. "#646c73",
  398. "#1f2429",
  399. "#f2c511",
  400. "#f39c19",
  401. "#e84b3c",
  402. "#c0382b",
  403. "#dde6e8",
  404. "#bdc3c8"
  405. ],
  406. lengedName: "", // 图例名称
  407. imageNum: 1, //设备数量
  408. fillColor: "", //修改填充色 (主要针对防火风区以及石材铺装)
  409. SubType: "", //空间类型,区分石材铺装
  410. itemExplain: "", //图例说明 只针对石材铺装
  411. attrCards: [],
  412. spinning: false,
  413. getmajorId: "",
  414. InfoLocal:[]
  415. };
  416. },
  417. methods: {
  418. onChange(e) {
  419. this.precision = e.target.checked === true ? false : true;
  420. },
  421. changeBorder(value) {
  422. bus.$emit("changeBorder", value);
  423. },
  424. changeNumber() {
  425. bus.$emit("changeFont", this.fontSize);
  426. },
  427. // 改变字体大小
  428. changeFont() {
  429. bus.$emit("changeFont", this.fontSize);
  430. },
  431. // 改变线宽
  432. changeLineWidth() {
  433. bus.$emit("changeLineWidth", this.lineWidth);
  434. },
  435. // 改变文案
  436. changeTextArea() {
  437. bus.$emit("changeText", this.textMsg);
  438. },
  439. // 改变线的颜色
  440. changeBorderColor() {
  441. if (this.borderColor) {
  442. bus.$emit("changeBorderColor", this.borderColor);
  443. }
  444. },
  445. // 改变字体颜色
  446. changeFontColor(color) {
  447. if (color) {
  448. bus.$emit("changeFontColor", color);
  449. }
  450. },
  451. changebackColor(color) {
  452. if (color) {
  453. bus.$emit("changebackColor", color);
  454. }
  455. },
  456. customRequest(info) {
  457. const formData = new FormData();
  458. formData.append("file", info.file);
  459. const postParams = formData;
  460. uploadImg({ postParams }).then(res => {
  461. if (res.Result == "success") {
  462. bus.$emit("upadataImageUrl", res.EntityList[0]);
  463. this.$message.success(
  464. `${info.file.name} file uploaded successfully.`
  465. );
  466. } else {
  467. this.$message.error(`${info.file.name} file upload failed.`);
  468. }
  469. });
  470. },
  471. //更改图例名称
  472. changeLengedName() {
  473. bus.$emit("changeLengedName", this.lengedName);
  474. },
  475. changeImage(info) {
  476. const status = info.file.status;
  477. console.log(status);
  478. if (status !== "uploading") {
  479. console.log(info.file, info.fileList);
  480. }
  481. if (status === "done") {
  482. this.$message.success(`${info.file.name} file uploaded successfully.`);
  483. } else if (status === "error") {
  484. this.$message.error(`${info.file.name} file upload failed.`);
  485. }
  486. },
  487. handleEdit() {
  488. this.$refs.dialog.showModal();
  489. },
  490. // 修改设备数量
  491. changeImageNum() {
  492. if (this.imageNum < this.attrCards.length) {
  493. this.imageNum = this.attrCards.length;
  494. return false;
  495. }
  496. if (!this.imageNum) {
  497. this.imageNum = 1;
  498. }
  499. bus.$emit("changeImageNum", this.imageNum);
  500. },
  501. // 石材铺装
  502. changefillColor() {
  503. if (this.fillColor) {
  504. bus.$emit("changefillColor", this.fillColor);
  505. }
  506. },
  507. // 防火分区
  508. fhfqchangefillColor() {
  509. if (this.fillColor) {
  510. bus.$emit("changeBorderColor", this.fillColor);
  511. bus.$emit("changefillColor", this.fillColor);
  512. }
  513. },
  514. //设置缩小item为编辑状态
  515. OpenEditStatus() {
  516. bus.$emit("OpenEditStatus");
  517. },
  518. // 编辑图例说明
  519. changeitemExplain() {
  520. bus.$emit("changeitemExplain", this.itemExplain);
  521. },
  522. // 更改工程信息化数据
  523. changeAttachObjectIds(arr) {
  524. bus.$emit("changeAttachObjectIds", arr);
  525. }
  526. },
  527. watch: {
  528. focusItemList: function(newval) {
  529. console.log('------------')
  530. console.log(FENGMAP)
  531. const Item = newval.itemList[0];
  532. this.imageNum = 1; //切换item初始化
  533. if (Item.data && Item.data.SubType) {
  534. this.SubType = Item.data.SubType;
  535. } else {
  536. this.SubType = "";
  537. }
  538. this.getmajorId = Item.data.Properties.InfoSystemId;
  539. this.InfoLocal = Item.data.Properties.InfoLocal;
  540. //判断点 面 带回专业类
  541. // let InfoTypeIdArr = [];
  542. // if( Item.data.Properties.InfoTypeId.length){
  543. // let InfoTypeId = Item.data.Properties.InfoTypeId;
  544. // console.log('poiList',11111111111111,FENGMAP.poiList);
  545. // console.log('spaceType',2222222222222222,FENGMAP.spaceType);
  546. // if(FENGMAP.poiList.length){
  547. // FENGMAP.poiList.join(',').split(',').map((item,index)=>{
  548. // let n = InfoTypeId.includes(item)
  549. // if(n){
  550. // InfoTypeIdArr.push(item);
  551. // }
  552. // })
  553. // }else if(FENGMAP.spaceType.length){
  554. // FENGMAP.spaceType.join(',').split(',').map((item,index)=>{
  555. // let n = InfoTypeId.includes(item)
  556. // if(n){
  557. // InfoTypeIdArr.push(item);
  558. // }
  559. // })
  560. // }else{
  561. // this.getmajorId = '';
  562. // }
  563. // }
  564. // InfoTypeIdArr.length? this.getmajorId = InfoTypeIdArr[0]:this.getmajorId ='';
  565. //结束
  566. if (newval.itemList.length == 1) {
  567. if (newval.itemType == "baseText") {
  568. this.textMsg = Item.text;
  569. this.fontSize = Item.font.size;
  570. this.fontColor = Item.color.value;
  571. this.backColor = Item.backgroundColor.value;
  572. } else if (newval.itemType == "baseLine") {
  573. this.lineWidth = Item.lineWidth;
  574. this.borderColor = Item.strokeColor.value;
  575. if (Item.lineStyle == SLineStyle.Solid) {
  576. this.borderStyle = "solid";
  577. } else if (Item.lineStyle == SLineStyle.Dashed) {
  578. this.borderStyle = "dashed";
  579. } else if (Item.lineStyle == SLineStyle.Dotted) {
  580. this.borderStyle = "dotted";
  581. }
  582. } else if (newval.itemType == "baseImage") {
  583. this.lineWidth = Item.lineWidth;
  584. this.borderColor = Item.strokeColor.value;
  585. }else if (
  586. newval.itemType == "Zone" ||
  587. newval.itemType == "Line" ||
  588. newval.itemType == "Image"
  589. ) {
  590. if (newval.itemType == "Image") {
  591. this.imageNum = Item.num;
  592. this.lengedName = Item.name;
  593. this.color = Item.color.value;
  594. this.fontSize = Item.font.size;
  595. } else if (newval.itemType == "Line") {
  596. this.color = Item.color.value;
  597. this.fillColor = Item.fillColor.value;
  598. this.borderColor = Item.strokeColor.value;
  599. this.lineWidth = Item.lineWidth;
  600. } else if (newval.itemType == "Zone") {
  601. this.lengedName = Item.name;
  602. this.fontSize = Item.font.size;
  603. this.fontColor = Item.color.value;
  604. this.borderColor = Item.strokeColor ? Item.strokeColor.value : "";
  605. this.fillColor = Item.fillColor ? Item.fillColor.value : "";
  606. this.itemExplain = "";
  607. if (Item.data.Properties.ItemExplain) {
  608. this.itemExplain = Item.data.Properties.ItemExplain
  609. ? Item.data.Properties.ItemExplain
  610. : "";
  611. }
  612. }
  613. }
  614. }
  615. const locationList = [];
  616. const assetnumList = [];
  617. let params = {};
  618. this.attrCards = [];
  619. Item.data.AttachObjectIds.map(item => {
  620. if (item.type == "Zone") {
  621. locationList.push(item.id);
  622. } else if (item.type == "Image") {
  623. assetnumList.push(item.id);
  624. }
  625. });
  626. // if(newval.itemType == 'Zone'){
  627. this.spinning = true;
  628. if (locationList.length) {
  629. params = { locationList: locationList };
  630. } else {
  631. params = { locationList: [""] };
  632. }
  633. queryGlsmsLocation({ plazaId: getUrlMsg().projectId }, params).then(
  634. 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. }
  645. ).catch(()=>{
  646. this.spinning = false;
  647. this.$message.error("工程信息化中的位置信息获取失败");
  648. });
  649. // }else if(newval.itemType == 'Image'){
  650. this.spinning = true;
  651. if (assetnumList.length) {
  652. params = { assetnumList: assetnumList };
  653. } else {
  654. params = { assetnumList: [""] };
  655. }
  656. queryGlsmsAsset({ plazaId: getUrlMsg().projectId }, params).then(res => {
  657. this.spinning = false;
  658. if (res.data.result == "success") {
  659. console.log(res.data);
  660. if (res.data.data && res.data.data.length) {
  661. this.attrCards = this.attrCards.concat(res.data.data);
  662. }
  663. } else {
  664. this.$message.error("工程信息化中的设备信息获取失败");
  665. }
  666. }).catch(()=>{
  667. this.spinning = false;
  668. this.$message.error("工程信息化中的设备信息获取失败");
  669. });
  670. // }
  671. console.log(this.attrCards);
  672. }
  673. }
  674. };
  675. </script>
  676. <style scoped lang="less">
  677. /deep/ .ant-spin-nested-loading {
  678. height: 100% !important;
  679. .ant-spin-container {
  680. height: 100% !important;
  681. }
  682. }
  683. .attr-select {
  684. padding: 12px 16px;
  685. box-sizing: border-box;
  686. .grid-title {
  687. font-size: 12px;
  688. color: #8d9399;
  689. }
  690. .row {
  691. width: 100%;
  692. display: flex;
  693. justify-content: space-between;
  694. align-items: center;
  695. margin-top: 12px;
  696. .color-choice {
  697. width: 26px;
  698. height: 26px;
  699. & /deep/ .vue-swatches__trigger {
  700. width: 26px !important;
  701. height: 26px !important;
  702. border-radius: 2px !important;
  703. }
  704. }
  705. .row-tit {
  706. color: #8d9399;
  707. font-size: 14px;
  708. }
  709. }
  710. .grid {
  711. margin: 10px 15px;
  712. .grid-title {
  713. font-size: 12px;
  714. color: #8d9399;
  715. }
  716. }
  717. .grid-content {
  718. /*margin-top: 12px;*/
  719. position: relative;
  720. }
  721. .icon-image {
  722. font-size: 25px;
  723. }
  724. .edit-option-text {
  725. color: #8d9399;
  726. height: 32px;
  727. line-height: 32px;
  728. margin-top: -5px;
  729. }
  730. .edit-option-btn {
  731. float: right;
  732. margin-top: -5px;
  733. }
  734. .attr-card {
  735. width: 250px;
  736. margin-bottom: 10px;
  737. white-space: normal;
  738. box-shadow: 0px 2px 6px 0px rgba(31, 36, 41, 0.05);
  739. border-radius: 4px;
  740. }
  741. .ant-upload.ant-upload-drag p.ant-upload-text {
  742. font-size: 14px;
  743. color: #c3c7cb;
  744. }
  745. .ant-upload.ant-upload-drag p.ant-upload-hint {
  746. color: #0091ff;
  747. }
  748. }
  749. .key-boards {
  750. .key-board {
  751. width: 52px;
  752. height: 24px;
  753. border-radius: 3px;
  754. border: 1px solid rgba(195, 199, 203, 1);
  755. font-size: 14px;
  756. color: #646a73;
  757. text-align: center;
  758. }
  759. /deep/ .ant-collapse-content {
  760. border-top: 1px solid #eff0f1;
  761. }
  762. }
  763. #attr-select {
  764. width: 100%;
  765. height: 100%;
  766. .attr-select-bottom {
  767. height: 100%;
  768. width: 100%;
  769. position: absolute;
  770. overflow-y: auto;
  771. padding-bottom: 400px;
  772. }
  773. }
  774. </style>