|
@@ -62,7 +62,12 @@
|
|
|
<div class="row">
|
|
|
<div class="row-tit">背景色</div>
|
|
|
<div class="color-choice">
|
|
|
- <swatches v-model="backColor" :swatches="swatches" popover-x="left" @close="changebackColor" />
|
|
|
+ <swatches
|
|
|
+ v-model="backColor"
|
|
|
+ :swatches="swatches"
|
|
|
+ popover-x="left"
|
|
|
+ @close="changebackColor"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -189,7 +194,11 @@
|
|
|
<a-button type="link" class="edit-option-btn" @click="OpenEditStatus">编辑区域</a-button>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
- <a-textarea @change="changeitemExplain" v-model="itemExplain" :auto-size="{ minRows: 4, maxRows: 6 }" />
|
|
|
+ <a-textarea
|
|
|
+ @change="changeitemExplain"
|
|
|
+ v-model="itemExplain"
|
|
|
+ :auto-size="{ minRows: 4, maxRows: 6 }"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div class="row-tit">描边</div>
|
|
@@ -251,10 +260,10 @@
|
|
|
v-if="type =='Zone' || type =='Image'||type == 'Line'"
|
|
|
>
|
|
|
<a-spin :spinning="spinning">
|
|
|
- <div class="row">
|
|
|
- <span class="edit-option-text">{{type =='Zone'?`工程信息化中的位置类型`:'工程信息化中的设备类型'}}</span>
|
|
|
- <a-button type="link" class="edit-option-btn" @click="handleEdit">选择编辑</a-button>
|
|
|
- </div>
|
|
|
+ <div class="row">
|
|
|
+ <span class="edit-option-text">{{type =='Zone'?`工程信息化中的位置类型`:'工程信息化中的设备类型'}}</span>
|
|
|
+ <a-button type="link" class="edit-option-btn" @click="handleEdit">选择编辑</a-button>
|
|
|
+ </div>
|
|
|
|
|
|
<div class="grid-content" style="margin-top: 12px;">
|
|
|
<a-card class="attr-card" v-for="(item,index) in attrCards" :key="index">{{item.sbjc ||item.wzjc}}</a-card>
|
|
@@ -282,13 +291,16 @@
|
|
|
>
|
|
|
<span>{{item.value}}</span>
|
|
|
<span class="key-board">{{item.keys}}</span>
|
|
|
- <span v-if="item.events" style="margin: 0 5px;">+ <img style="width:13px;height:18px;" src="./../../assets/images/shubiao.png" alt=""></span>
|
|
|
- <span> {{item.events}}</span>
|
|
|
+ <span v-if="item.events" style="margin: 0 5px;">
|
|
|
+ +
|
|
|
+ <img style="width:13px;height:18px;" src="./../../assets/images/shubiao.png" alt />
|
|
|
+ </span>
|
|
|
+ <span>{{item.events}}</span>
|
|
|
</p>
|
|
|
</a-collapse-panel>
|
|
|
</a-collapse>
|
|
|
</div>
|
|
|
- <editDialog ref="dialog" :attrCards="attrCards" :sysNum="imageNum" :key="new Date().getTime()"/>
|
|
|
+ <editDialog ref="dialog" :attrCards="attrCards" :sysNum="imageNum" :key="new Date().getTime()" />
|
|
|
<!-- <editDialog ref="dialog" :typeEdit="2" :getmajorId="'1001'" :sysNum="5" />-->
|
|
|
</div>
|
|
|
</template>
|
|
@@ -299,8 +311,12 @@ import Swatches from "vue-swatches";
|
|
|
import bus from "@/bus";
|
|
|
import "vue-swatches/dist/vue-swatches.css";
|
|
|
import { SLineStyle } from "@saga-web/graph/lib";
|
|
|
-import { uploadImg, queryGlsmsLocation,queryGlsmsAsset } from "@/api/editer.js";
|
|
|
-import {getUrlMsg} from '@/components/urlMsg.js'
|
|
|
+import {
|
|
|
+ uploadImg,
|
|
|
+ queryGlsmsLocation,
|
|
|
+ queryGlsmsAsset
|
|
|
+} from "@/api/editer.js";
|
|
|
+import { getUrlMsg } from "@/components/urlMsg.js";
|
|
|
export default {
|
|
|
name: "attr_select",
|
|
|
props: ["type", "focusItemList"],
|
|
@@ -361,26 +377,26 @@ export default {
|
|
|
},
|
|
|
swatchess: ["#69C5FC", "#656EDF", "#58AF6F", "#2D8FAA"],
|
|
|
swatches: [
|
|
|
- "#00000000",
|
|
|
- "#1FBC9C",
|
|
|
- "#1CA085",
|
|
|
- "#2ECC70",
|
|
|
- "#27AF60",
|
|
|
- "#3398DB",
|
|
|
- "#2980B9",
|
|
|
- "#A463BF",
|
|
|
- "#8E43AD",
|
|
|
- "#3D556E",
|
|
|
- "#222F3D",
|
|
|
+ "#00000000",
|
|
|
+ "#1FBC9C",
|
|
|
+ "#1CA085",
|
|
|
+ "#2ECC70",
|
|
|
+ "#27AF60",
|
|
|
+ "#3398DB",
|
|
|
+ "#2980B9",
|
|
|
+ "#A463BF",
|
|
|
+ "#8E43AD",
|
|
|
+ "#3D556E",
|
|
|
+ "#222F3D"
|
|
|
],
|
|
|
lengedName: "", // 图例名称
|
|
|
imageNum: 1, //设备数量
|
|
|
fillColor: "", //修改填充色 (主要针对防火风区以及石材铺装)
|
|
|
SubType: "", //空间类型,区分石材铺装
|
|
|
- itemExplain:'', //图例说明 只针对石材铺装
|
|
|
- attrCards:[],
|
|
|
- spinning:false,
|
|
|
- getmajorId:''
|
|
|
+ itemExplain: "", //图例说明 只针对石材铺装
|
|
|
+ attrCards: [],
|
|
|
+ spinning: false,
|
|
|
+ getmajorId: ""
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -473,12 +489,12 @@ export default {
|
|
|
bus.$emit("OpenEditStatus");
|
|
|
},
|
|
|
// 编辑图例说明
|
|
|
- changeitemExplain(){
|
|
|
- bus.$emit("changeitemExplain",this.itemExplain);
|
|
|
+ changeitemExplain() {
|
|
|
+ bus.$emit("changeitemExplain", this.itemExplain);
|
|
|
},
|
|
|
// 更改工程信息化数据
|
|
|
- changeAttachObjectIds(arr){
|
|
|
- bus.$emit('changeAttachObjectIds',arr)
|
|
|
+ changeAttachObjectIds(arr) {
|
|
|
+ bus.$emit("changeAttachObjectIds", arr);
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -488,8 +504,8 @@ export default {
|
|
|
this.imageNum = 1; //切换item初始化
|
|
|
if (Item.data && Item.data.SubType) {
|
|
|
this.SubType = Item.data.SubType;
|
|
|
- }else{
|
|
|
- this.SubType = '';
|
|
|
+ } else {
|
|
|
+ this.SubType = "";
|
|
|
}
|
|
|
|
|
|
if (newval.itemList.length == 1) {
|
|
@@ -517,9 +533,13 @@ export default {
|
|
|
newval.itemType == "Image"
|
|
|
) {
|
|
|
this.lengedName = Item.data.Name;
|
|
|
- this.itemExplain = '';
|
|
|
- if(Item.data.Properties.ItemExplain){
|
|
|
- this.itemExplain = Item.data.Properties.ItemExplain ? Item.data.Properties.ItemExplain : '';
|
|
|
+ this.borderColor = Item.strokeColor ? Item.strokeColor.value : "";
|
|
|
+ this.fillColor = Item.fillColor ? Item.fillColor.value : "";
|
|
|
+ this.itemExplain = "";
|
|
|
+ if (Item.data.Properties.ItemExplain) {
|
|
|
+ this.itemExplain = Item.data.Properties.ItemExplain
|
|
|
+ ? Item.data.Properties.ItemExplain
|
|
|
+ : "";
|
|
|
}
|
|
|
|
|
|
if (newval.itemType == "Image") {
|
|
@@ -534,55 +554,56 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- const locationList =[];
|
|
|
- const assetnumList =[];
|
|
|
- let params ={};
|
|
|
+ const locationList = [];
|
|
|
+ const assetnumList = [];
|
|
|
+ let params = {};
|
|
|
this.attrCards = [];
|
|
|
- Item.data.AttachObjectIds.map(item=>{
|
|
|
- if(item.type=='Zone'){
|
|
|
- locationList.push(item.id)
|
|
|
- }else if(item.type=='Image'){
|
|
|
- assetnumList.push(item.id)
|
|
|
+ Item.data.AttachObjectIds.map(item => {
|
|
|
+ if (item.type == "Zone") {
|
|
|
+ locationList.push(item.id);
|
|
|
+ } else if (item.type == "Image") {
|
|
|
+ assetnumList.push(item.id);
|
|
|
}
|
|
|
-
|
|
|
- })
|
|
|
- // if(newval.itemType == 'Zone'){
|
|
|
- this.spinning = true;
|
|
|
- if(locationList.length){
|
|
|
- params = {locationList:locationList}
|
|
|
- }else{
|
|
|
- params = {locationList:['']};
|
|
|
- }
|
|
|
- queryGlsmsLocation({plazaId: getUrlMsg().projectId},params).then(res=>{
|
|
|
- this.spinning = false;
|
|
|
- if(res.data.result =='success'){
|
|
|
- console.log(res.data);
|
|
|
- if(res.data.data && res.data.data.length){
|
|
|
- this.attrCards = this.attrCards.concat(res.data.data)
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.$message.error('工程信息化中的位置信息获取失败')
|
|
|
- }
|
|
|
- })
|
|
|
- // }else if(newval.itemType == 'Image'){
|
|
|
- this.spinning = true;
|
|
|
- if(assetnumList.length){
|
|
|
- params = {assetnumList:assetnumList}
|
|
|
- }else{
|
|
|
- params = {assetnumList:['']};
|
|
|
- }
|
|
|
- queryGlsmsAsset({plazaId: getUrlMsg().projectId},params).then(res=>{
|
|
|
- this.spinning = false;
|
|
|
- if(res.data.result =='success'){
|
|
|
- console.log(res.data);
|
|
|
- if(res.data.data &&res.data.data.length){
|
|
|
- this.attrCards = this.attrCards.concat(res.data.data)
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.$message.error('工程信息化中的设备信息获取失败')
|
|
|
- }
|
|
|
- })
|
|
|
- // }
|
|
|
+ });
|
|
|
+ // if(newval.itemType == 'Zone'){
|
|
|
+ this.spinning = true;
|
|
|
+ if (locationList.length) {
|
|
|
+ params = { locationList: locationList };
|
|
|
+ } else {
|
|
|
+ params = { locationList: [""] };
|
|
|
+ }
|
|
|
+ queryGlsmsLocation({ plazaId: getUrlMsg().projectId }, params).then(
|
|
|
+ res => {
|
|
|
+ this.spinning = false;
|
|
|
+ if (res.data.result == "success") {
|
|
|
+ console.log(res.data);
|
|
|
+ if (res.data.data && res.data.data.length) {
|
|
|
+ this.attrCards = this.attrCards.concat(res.data.data);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error("工程信息化中的位置信息获取失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ // }else if(newval.itemType == 'Image'){
|
|
|
+ this.spinning = true;
|
|
|
+ if (assetnumList.length) {
|
|
|
+ params = { assetnumList: assetnumList };
|
|
|
+ } else {
|
|
|
+ params = { assetnumList: [""] };
|
|
|
+ }
|
|
|
+ queryGlsmsAsset({ plazaId: getUrlMsg().projectId }, params).then(res => {
|
|
|
+ this.spinning = false;
|
|
|
+ if (res.data.result == "success") {
|
|
|
+ console.log(res.data);
|
|
|
+ if (res.data.data && res.data.data.length) {
|
|
|
+ this.attrCards = this.attrCards.concat(res.data.data);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error("工程信息化中的设备信息获取失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // }
|
|
|
console.log(this.attrCards);
|
|
|
}
|
|
|
}
|
|
@@ -590,13 +611,12 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
- /deep/ .ant-spin-nested-loading{
|
|
|
+/deep/ .ant-spin-nested-loading {
|
|
|
+ height: 100% !important;
|
|
|
+ .ant-spin-container {
|
|
|
height: 100% !important;
|
|
|
- .ant-spin-container{
|
|
|
- height: 100% !important;
|
|
|
-
|
|
|
- }
|
|
|
}
|
|
|
+}
|
|
|
.attr-select {
|
|
|
padding: 12px 16px;
|
|
|
box-sizing: border-box;
|
|
@@ -618,7 +638,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.row-tit {
|
|
|
- color: #8D9399;
|
|
|
+ color: #8d9399;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
@@ -640,7 +660,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.edit-option-text {
|
|
|
- color: #8D9399;
|
|
|
+ color: #8d9399;
|
|
|
height: 32px;
|
|
|
line-height: 32px;
|
|
|
margin-top: -5px;
|