2019-07-26 13:32:43 +08:00
|
|
|
<template>
|
2019-08-19 10:31:11 +08:00
|
|
|
<div class="reminder-drag">
|
|
|
|
<div ref="drapBox" class="reminder-box">
|
|
|
|
<div class="tip-title">
|
|
|
|
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
|
|
|
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
|
|
|
<p v-if="isShrink" style="color: #fff;">
|
|
|
|
<span>{{ title }}</span>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div ref="dragBody" class="tip-body-box">
|
|
|
|
<div class="tip-body">
|
|
|
|
<div>
|
|
|
|
<get-action ref="getAction" :group="group" />
|
|
|
|
</div>
|
|
|
|
<el-button-group class="button-group">
|
|
|
|
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
|
|
|
|
<el-button type="primary" @click="saveMaplocation">{{ $t('scriptRecord.saveMaplocation') }}</el-button>
|
|
|
|
<el-button type="primary" @click="saveScenesStage">{{ $t('scriptRecord.saveBackground') }}</el-button>
|
|
|
|
<el-button type="success" @click="saveScenesData">{{ $t('scriptRecord.saveData') }}</el-button>
|
|
|
|
</el-button-group>
|
2019-07-26 13:32:43 +08:00
|
|
|
</div>
|
2019-08-19 10:31:11 +08:00
|
|
|
</div>
|
2019-07-26 13:32:43 +08:00
|
|
|
</div>
|
2019-08-19 10:31:11 +08:00
|
|
|
</div>
|
2019-07-26 13:32:43 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
2019-08-19 10:31:11 +08:00
|
|
|
import Vue from 'vue';
|
|
|
|
import GetAction from './scriptRecord/getAction';
|
|
|
|
import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation} from '@/api/simulation';
|
2019-07-26 13:32:43 +08:00
|
|
|
|
2019-08-19 10:31:11 +08:00
|
|
|
export default {
|
|
|
|
name: 'TipScriptRecord',
|
|
|
|
components: {
|
|
|
|
GetAction
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
group: {
|
|
|
|
type: String,
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
// this.$t('scriptRecord.scriptTitle')
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
title: '剧本编制',
|
|
|
|
isShrink: false,
|
|
|
|
mapLocation: {}
|
|
|
|
// isSaveStage: true,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
'$store.state.map.mapViewLoadedCount': function (val) {
|
|
|
|
Vue.prototype.$jlmap.setOptions(this.$store.state.scriptRecord.mapLocation);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.shrink();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
jump(obj) {
|
|
|
|
},
|
|
|
|
shrink() {
|
|
|
|
const height = this.$refs.dragBody.offsetHeight + 40;
|
|
|
|
const top = this.$refs.drapBox.style.top;
|
|
|
|
if (this.isShrink) {
|
|
|
|
this.$refs.drapBox.style.height = '40px';
|
|
|
|
this.$refs.drapBox.style.top = '';
|
|
|
|
this.isShrink = false;
|
|
|
|
} else {
|
|
|
|
this.$refs.drapBox.style.height = height + 'px';
|
|
|
|
this.$refs.drapBox.style.top = top;
|
|
|
|
this.isShrink = true;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
// getActions(row){
|
|
|
|
// this.displayType="action";
|
|
|
|
// this.behaviorId=row.id;
|
|
|
|
// this.$store.dispatch('scriptRecord/updateBehaviorName',row.description);
|
|
|
|
// },
|
|
|
|
saveScenesStage() {
|
|
|
|
saveScriptScenes(this.group).then(resp => {
|
|
|
|
// this.isSaveStage = false;
|
|
|
|
this.$message.success('保存背景成功');
|
|
|
|
}).catch(() => {
|
|
|
|
this.$messageBox('保存背景失败!');
|
|
|
|
});
|
|
|
|
},
|
|
|
|
saveScenesData() {
|
|
|
|
saveScriptData(this.group).then(resp => {
|
|
|
|
this.$message.success('保存数据成功');
|
|
|
|
}).catch(error => {
|
|
|
|
this.$messageBox(`保存数据失败!: ${error.message}`);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
dumpScenesData() {
|
|
|
|
const group=this.group;
|
|
|
|
this.$confirm('此操作将会清除已保存的编制数据, 是否继续?', '提示', {
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
type: 'warning'
|
|
|
|
}).then(() => {
|
|
|
|
dumpScriptData(group).then(resp => {
|
|
|
|
// this.isSaveStage = true;
|
|
|
|
this.$message.success('清除数据成功');
|
|
|
|
}).catch(() => {
|
|
|
|
this.$messageBox('清除数据失败!');
|
|
|
|
});
|
|
|
|
}).catch(() => { });
|
|
|
|
},
|
|
|
|
saveMaplocation() {
|
|
|
|
const data=Vue.prototype.$jlmap.$options;
|
|
|
|
const group=this.$route.query.group;
|
|
|
|
const dataZoom={scale: data.scaleRate, x: data.offsetX, y: data.offsetY};
|
|
|
|
updateMapLocation(group, dataZoom).then(response=>{
|
|
|
|
this.$message.success('更新定位成功');
|
|
|
|
}).catch(error => {
|
|
|
|
this.$messageBox(`更新定位失败: ${error.message}`);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2019-07-26 13:32:43 +08:00
|
|
|
</script>
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
@import "src/styles/mixin.scss";
|
|
|
|
|
|
|
|
.tip-body-box {
|
|
|
|
position: relative;
|
|
|
|
// height: 540px;
|
|
|
|
}
|
|
|
|
.tab-pane-big{
|
|
|
|
height:420px;
|
|
|
|
}
|
2019-08-08 10:31:46 +08:00
|
|
|
.breadColor{
|
|
|
|
color:#fff;
|
|
|
|
}
|
2019-07-26 13:32:43 +08:00
|
|
|
|
|
|
|
.reminder-box {
|
|
|
|
position: absolute;
|
|
|
|
float: left;
|
|
|
|
left: 15px;
|
|
|
|
bottom: 15px;
|
2019-08-08 10:31:46 +08:00
|
|
|
width: 995px;
|
2019-07-26 13:32:43 +08:00
|
|
|
height: 540px;
|
|
|
|
background-color: #fff;
|
|
|
|
border-radius: 5px;
|
|
|
|
overflow: hidden;
|
|
|
|
z-index: 10;
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
|
|
.tip-title {
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
height: 40px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
background-color: #409EFF;
|
|
|
|
border-radius: 5px 5px 0 0;
|
|
|
|
justify-content: space-between;
|
|
|
|
padding: 0 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tip-body {
|
|
|
|
height: 500px;
|
|
|
|
padding: 10px;
|
|
|
|
|
|
|
|
.list-label {
|
|
|
|
width: 105px;
|
|
|
|
}
|
|
|
|
.button-group{
|
|
|
|
margin-top:15px;
|
|
|
|
margin-left: 20px;
|
|
|
|
float:right;
|
|
|
|
}
|
2019-08-16 09:25:12 +08:00
|
|
|
.actionInfo{
|
|
|
|
margin-top:30px;
|
|
|
|
}
|
|
|
|
.conditionVO{
|
|
|
|
width:400px;
|
|
|
|
}
|
|
|
|
.actionList{
|
|
|
|
margin-top: 10px;
|
|
|
|
margin-left: 5px;
|
|
|
|
font-size: 15px;
|
|
|
|
margin-bottom:10px;
|
|
|
|
}
|
|
|
|
.titleStyle{
|
|
|
|
margin-left:10px;
|
|
|
|
}
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
float: right;
|
|
|
|
margin-right: 10px;
|
|
|
|
cursor: pointer;
|
|
|
|
background-color: #f3f3f3;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/ {
|
|
|
|
.el-tree-node__content {
|
|
|
|
margin-bottom: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
|
|
|
|
background-color: #d6e5f7;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-19 10:31:11 +08:00
|
|
|
</style>
|