|
@@ -22,23 +22,39 @@ export default {
|
|
|
this.init();
|
|
|
},
|
|
|
props: {
|
|
|
- Related: {}
|
|
|
+ Related: {},
|
|
|
+ typeName: {}
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters("layout", ["projectId"])
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- let param = { Related: this.Related };
|
|
|
+ let param = { Related: this.Related, typeName: this.typeName };
|
|
|
dynamicLocationList(param, res => {
|
|
|
this.LocationList = res.Content[0].List;
|
|
|
+ //添加未明确对象
|
|
|
+ this.LocationList.map(item => {
|
|
|
+ if (item.List && item.List.length) {
|
|
|
+ item.List.map(child => {
|
|
|
+ child.List.unshift({ Name: "未明确业务空间" })
|
|
|
+ })
|
|
|
+ item.List.unshift({ Name: '未明确楼层' })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.LocationList.unshift({ Name: '未明确建筑' })
|
|
|
+ //结束
|
|
|
});
|
|
|
},
|
|
|
changeCascader(val) {
|
|
|
clearTimeout(this.timer);
|
|
|
this.timer = setTimeout(() => {
|
|
|
- this.$emit("change", val);
|
|
|
- }, 500);
|
|
|
+ let tempVal = JSON.parse(JSON.stringify(val));
|
|
|
+ if (tempVal[tempVal.length - 1].indexOf('未明确') > -1) {
|
|
|
+ tempVal.splice(tempVal.length - 1, 1, '')
|
|
|
+ }
|
|
|
+ this.$emit("change", tempVal);
|
|
|
+ }, 800);
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -49,9 +65,9 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
-.location{
|
|
|
+.location {
|
|
|
width: 100%;
|
|
|
- /deep/ .el-input__inner{
|
|
|
+ /deep/ .el-input__inner {
|
|
|
vertical-align: baseline;
|
|
|
}
|
|
|
}
|