This commit is contained in:
fan 2020-09-21 14:29:23 +08:00
commit 99894a1443
18 changed files with 1898 additions and 152 deletions

View File

@ -63,37 +63,37 @@ export default {
{ {
// 线 线 线 线 // 线 线 线 线
name: '电力监控系统', name: '电力监控系统',
mode: 'powerMonitoring', mode: 'powerMonitoring02',
id: 'powerMonitoring', id: 'powerMonitoring',
type: 'totalSystem', type: 'totalSystem',
children: [ children: [
{ {
name: '变电所接线图', name: '变电所接线图',
mode: 'substation', mode: 'powerMonitoring02',
id: 'substation', id: 'substation',
type: 'interface' type: 'interface'
}, },
{ {
name: '降压变电所主接线图', name: '降压变电所主接线图',
mode: 'stepDown', mode: 'powerMonitoring02',
id: 'stepDown', id: 'stepDown',
type: 'interface' type: 'interface'
}, },
{ {
name: '混合变电所主接线图', name: '混合变电所主接线图',
mode: 'hybrid', mode: 'powerMonitoring02',
id: 'hybrid', id: 'hybrid',
type: 'interface' type: 'interface'
}, },
{ {
name: '牵引降压混合变电所主接线图', name: '牵引降压混合变电所主接线图',
mode: 'combined', mode: 'powerMonitoring02',
id: 'combined', id: 'combined',
type: 'interface' type: 'interface'
}, },
{ {
name: '接触网图', name: '接触网图',
mode: 'catenary', mode: 'powerMonitoring02',
id: 'catenary', id: 'catenary',
type: 'interface' type: 'interface'
} }
@ -101,19 +101,19 @@ export default {
}, },
{ {
name: '自动售检票/门禁', name: '自动售检票/门禁',
mode: 'afc', mode: 'afc02',
id: 'afc', id: 'afc',
type: 'totalSystem', type: 'totalSystem',
children: [ children: [
{ {
name: '自动售检票系统', name: '自动售检票系统',
mode: 'autoTicket', mode: 'afc02',
id: 'autoTicket', id: 'autoTicket',
type: 'interface' type: 'interface'
}, },
{ {
name: '门禁系统', name: '门禁系统',
mode: 'entranceGuard', mode: 'afc02',
id: 'entranceGuard', id: 'entranceGuard',
type: 'interface' type: 'interface'
} }
@ -121,43 +121,43 @@ export default {
}, },
{ {
name: '火灾报警系统', name: '火灾报警系统',
mode: 'fas', mode: 'fas02',
id: 'fas', id: 'fas',
type: 'totalSystem', type: 'totalSystem',
children: [ children: [
{ {
name: '火灾报警系统-FAS联动', name: '火灾报警系统-FAS联动',
mode: 'linkage', mode: 'fas02',
id: 'linkage', id: 'linkage',
type: 'interface' type: 'interface'
}, },
{ {
name: '火灾报警系统-站厅层', name: '火灾报警系统-站厅层',
mode: 'stationHall', mode: 'fas02',
id: 'stationHall', id: 'stationHall',
type: 'interface' type: 'interface'
}, },
{ {
name: '火灾报警系统-站台层', name: '火灾报警系统-站台层',
mode: 'platform', mode: 'fas02',
id: 'platform', id: 'platform',
type: 'interface' type: 'interface'
}, },
{ {
name: '火灾报警系统-区间', name: '火灾报警系统-区间',
mode: 'section', mode: 'fas02',
id: 'section', id: 'section',
type: 'interface' type: 'interface'
}, },
{ {
name: '感温光纤探测系统', name: '感温光纤探测系统',
mode: 'sensing', mode: 'fas02',
id: 'sensing', id: 'sensing',
type: 'interface' type: 'interface'
}, },
{ {
name: '气体灭火系统', name: '气体灭火系统',
mode: 'gas', mode: 'fas02',
id: 'gas', id: 'gas',
type: 'interface' type: 'interface'
} }
@ -165,56 +165,57 @@ export default {
}, },
{ {
name: '信号系统', name: '信号系统',
mode: 'signalSystem', mode: 'signalSystem02',
id: 'signalSystem', id: 'signalSystem',
type: 'totalSystem', type: 'totalSystem',
children: [ children: [
{ {
name: 'TIS管理器', name: 'TIS管理器',
mode: 'tis', mode: 'signalSystem02',
id: 'tis', id: 'tis',
type: 'interface' type: 'interface'
}, },
{ {
name: '列车时刻表', name: '列车时刻表',
mode: 'schedule', mode: 'signalSystem02',
id: 'schedule', id: 'schedule',
type: 'interface' type: 'interface'
}, },
{ {
name: '信号系统', name: '信号系统',
mode: 'signal', mode: 'signalSystem02',
id: 'signal', id: 'signal',
type: 'interface' type: 'interface'
}, },
{ {
name: '全线信号系统界面', name: '全线信号系统界面',
mode: 'allLineSignal', mode: 'signalSystem02',
id: 'allLineSignal', id: 'allLineSignal',
type: 'interface' type: 'interface'
} }
] ]
}, { },
{
name: '通信', name: '通信',
mode: 'communication', mode: 'communication02',
id: 'communication', id: 'communication',
type: 'totalSystem', type: 'totalSystem',
children: [ children: [
{ {
name: '乘客信息显示系统', name: '乘客信息显示系统',
mode: 'pis', mode: 'communication02',
id: 'pis', id: 'pis',
type: 'interface' type: 'interface'
}, },
{ {
name: '广播系统', name: '广播系统',
mode: 'broadcasting', mode: 'communication02',
id: 'broadcasting', id: 'broadcasting',
type: 'interface' type: 'interface'
}, },
{ {
name: '闭路电视', name: '闭路电视',
mode: 'cctv', mode: 'communication02',
id: 'cctv', id: 'cctv',
type: 'interface' type: 'interface'
} }

View File

@ -0,0 +1,176 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="100px" style="width: 100%;padding: 10px 50px;">
<el-form-item v-if="isUpdate" label="按钮编号:" prop="code">
<el-input v-model="form.code" size="small" :disabled="true" />
</el-form-item>
<el-form-item label="X轴坐标:" prop="x">
<el-input-number v-model="form.x" size="small" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="Y轴坐标:" prop="y">
<el-input-number v-model="form.y" size="small" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="按钮文字:" prop="context">
<el-input v-model="form.context" size="small" />
</el-form-item>
<el-form-item label="文字大小:" prop="fontSize">
<el-input-number v-model="form.fontSize" size="small" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="左右内距:" prop="levelPadding">
<el-input-number v-model="form.levelPadding" size="small" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="上下内距:" prop="verticalPadding">
<el-input-number v-model="form.verticalPadding" size="small" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="按钮功能:" prop="function">
<el-select v-model="form.function" size="small">
<el-option
v-for="item in functionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" size="small" type="danger" @click="deleteDevice">删除</el-button>
<el-button v-show="showDeleteButton" size="small" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'IscsButton',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
functionList: [
{label: '图元说明', value: 'GraphicEle'},
{label: '公共区域', value: 'PublicArea'},
{label: '操作按钮', value: 'OperatingButton'},
{label: '返回', value: 'GoBack'},
{label: '至EPS系统及导向照明', value: 'GoEPS'},
{label: '射流风机图', value: 'GoJetFan'},
{label: '至B端小系统', value: 'GoBMiniSystem'},
{label: '至A端小系统(一)', value: 'GoAMiniSystem1'},
{label: '至A端小系统(二)', value: 'GoAMiniSystem2'}
],
form: {
code: '',
levelPadding: 10,
verticalPadding: 5,
fontSize: 10,
x: 10,
y: 10,
context: '',
function: ''
},
rules: {
context: [
{ required: true, message: '请填写按钮文字', trigger: 'blur' }
],
function: [
{ required: true, message: '请选择按钮功能', trigger: 'change'}
]
}
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'IscsButton' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.levelPadding = model.levelPadding;
this.form.verticalPadding = model.verticalPadding;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.form.context = model.context;
this.form.function = model.function;
this.form.fontSize = model.fontSize;
}
}
},
mounted() {},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const rectModel = {
point: {
x: this.form.x,
y: this.form.y
},
code: this.isUpdate ? this.form.code : getUID('IscsButton', this.iscs.iscsButtonList),
_type: 'IscsButton',
levelPadding: this.form.levelPadding,
verticalPadding: this.form.verticalPadding,
context: this.form.context,
function: this.form.function,
fontSize: this.form.fontSize
};
this.$emit('createDataModel', rectModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const rectModel = {
point: {
x: this.form.x,
y: this.form.y
},
code: this.form.code,
_type: 'IscsButton',
levelPadding: this.form.levelPadding,
verticalPadding: this.form.verticalPadding,
context: this.form.context,
function: this.form.function,
fontSize: this.form.fontSize
};
this.$emit('deleteDataModel', rectModel);
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
levelPadding: 10,
verticalPadding: 2,
fontSize: 10,
x: 10,
y: 10,
context: '',
function: ''
};
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -0,0 +1,175 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="100px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="线段宽度:" prop="lineWidth">
<el-input-number v-model="form.lineWidth" controls-position="right" :min="1" :max="50" size="small" />
</el-form-item>
<el-form-item label="类型:" prop="type">
<el-select v-model="form.classify" placeholder="请选择类型" size="small">
<el-option label="实线:" value="solid" />
<el-option label="虚线:" value="dashed" />
</el-select>
</el-form-item>
<el-form-item label="线段颜色:" prop="fillColor">
<el-color-picker v-model="form.fillColor" size="small" />
</el-form-item>
<el-form-item label="箭头显示:" prop="arrowShow">
<el-select v-model="form.arrowShow" placeholder="请选择" size="small">
<el-option label="无" value="none" />
<el-option label="始端" value="star" />
<el-option label="终端" value="end" />
</el-select>
</el-form-item>
<el-form-item v-if="form.arrowShow != 'none'" label="箭头大小:" prop="arrowSize">
<el-input-number v-model="form.arrowSize" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="起始X轴坐标:">
<el-input-number v-model="form.x1" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item label="起始Y轴坐标:">
<el-input-number v-model="form.y1" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item label="终止X轴坐标:">
<el-input-number v-model="form.x2" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item label="终止Y轴坐标:">
<el-input-number v-model="form.y2" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" size="small" type="danger" @click="deleteDevice">删除</el-button>
<el-button v-show="showDeleteButton" size="small" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'IscsLine',
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
form: {
classify:'solid',
code: '',
lineWidth: '',
fillColor: '#fff',
arrowShow: 'none',
arrowSize: 5,
x1: 10,
y1: 10,
x2: 20,
y2: 10
},
rules: {
lineWidth: [
{ required: true, message: '请输入线段宽度', trigger: 'blur' }
],
fillColor: [
{ required: true, message: '请输入线段颜色', trigger: 'blur' }
]
}
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'IscsLine' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.lineWidth = model.lineWidth;
this.form.fillColor = model.fillColor;
this.form.x1 = model.point1.x;
this.form.y1 = model.point1.y;
this.form.x2 = model.point2.x;
this.form.y2 = model.point2.y;
this.form.classify = model.classify;
this.form.arrowShow = model.arrowShow || 'none';
this.form.arrowSize = model.arrowSize || 5;
}
}
},
mounted() {},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const lineModel = {
point1: {
x: this.form.x1,
y: this.form.y1
},
point2: {
x: this.form.x2,
y: this.form.y2
},
code: this.isUpdate ? this.form.code : getUID('IscsLine', this.iscs.iscsLineList),
_type: 'IscsLine',
lineWidth: this.form.lineWidth,
fillColor: this.form.fillColor,
classify: this.form.classify,
arrowShow: this.form.arrowShow,
arrowSize: this.form.arrowSize
};
this.$emit('createDataModel', lineModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const lineModel = {
point1: {
x: this.form.x1,
y: this.form.y1
},
point2: {
x: this.form.x2,
y: this.form.y2
},
code: this.form.code,
_type: 'IscsLine',
lineWidth: this.form.lineWidth,
fillColor: this.form.fillColor,
classify: this.form.classify,
arrowShow: this.form.arrowShow,
arrowSize: this.form.arrowSize
};
this.$emit('deleteDataModel', lineModel);
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
lineWidth: '',
fillColor: '#fff',
arrowShow: 'none',
arrowSize: 5,
x1: 10,
y1: 10,
x2: 20,
y2: 10,
classify:'solid'
};
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
</style>

View File

@ -0,0 +1,165 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="宽度:" prop="width">
<el-input-number v-model="form.width" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="高度:" prop="height">
<el-input-number v-model="form.height" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="填充色:" prop="fillColor">
<el-color-picker v-model="form.fillColor" show-alpha size="small" />
</el-form-item>
<el-form-item label="边框宽度:" prop="borderWidth">
<el-input-number v-model="form.borderWidth" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item label="类型:" prop="type">
<el-select v-model="form.type" placeholder="请选择类型" size="small">
<el-option label="实线:" value="solid" />
<el-option label="虚线:" value="dashed" />
</el-select>
</el-form-item>
<el-form-item label="边框色:" prop="strokeColor">
<el-color-picker v-model="form.strokeColor" size="small" />
</el-form-item>
<el-form-item label="X轴坐标:">
<el-input-number v-model="form.x" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="Y轴坐标:">
<el-input-number v-model="form.y" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" size="small" type="danger" @click="deleteDevice">删除</el-button>
<el-button v-show="showDeleteButton" size="small" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'IscsRect',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
fillColor: '',
borderWidth: '',
strokeColor: '',
type: 'solid',
width: 1,
height: 1,
x: 10,
y: 10
},
rules: {
strokeColor: [
{ required: true, message: '请选择边框颜色', trigger: 'change' }
],
fillColor: [
{ required: true, message: '请选择矩形填充颜色', trigger: 'change'}
]
}
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'IscsRect' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.fillColor = model.fillColor;
this.form.borderWidth = model.borderWidth;
this.form.strokeColor = model.strokeColor;
this.form.width = model.width;
this.form.type = model.type || 'solid';
this.form.height = model.height;
this.form.x = model.point.x;
this.form.y = model.point.y;
}
}
},
mounted() {},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const rectModel = {
point: {
x: this.form.x,
y: this.form.y
},
code: this.isUpdate ? this.form.code : getUID('IscsRect', this.iscs.iscsRectList),
_type: 'IscsRect',
fillColor: this.form.fillColor,
borderWidth: this.form.borderWidth,
strokeColor: this.form.strokeColor,
width: this.form.width,
height: this.form.height,
type: this.form.type
};
this.$emit('createDataModel', rectModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const rectModel = {
point: {
x: this.form.x,
y: this.form.y
},
code: this.form.code,
_type: 'IscsRect',
fillColor: this.form.fillColor,
borderWidth: this.form.borderWidth,
strokeColor: this.form.strokeColor,
width: this.form.width,
height: this.form.height
};
this.$emit('deleteDataModel', rectModel);
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
fillColor: '',
borderWidth: '',
strokeColor: '',
type: 'solid',
width: 1,
height: 1,
x: 10,
y: 10
};
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -0,0 +1,285 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rule="rules" :model="addModel" label-width="120px" size="small" style="width: 100%;padding: 10px 50px;">
<el-form-item v-if="isUpdate" label="表格编号:" prop="code">
<el-input v-model="addModel.code" :disabled="true" />
</el-form-item>
<el-form-item label="x坐标:" prop="x">
<el-input-number v-model="addModel.x" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="y坐标:" prop="y">
<el-input-number v-model="addModel.y" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="列数:" prop="columnNum">
<el-input-number v-model="addModel.columnNum" controls-position="right" :min="1" size="small" @change="changeColumnNum" />
</el-form-item>
<el-form-item label="列宽:" prop="width">
<template v-for="(item, index) in addModel.columnWidthList">
<el-input-number :key="index" v-model="addModel.columnWidthList[index]" style="display: block; margin-bottom: 5px" controls-position="right" :min="1" size="small" />
</template>
</el-form-item>
<el-form-item label="行数:" prop="rowNum">
<el-input-number v-model="addModel.rowNum" controls-position="right" :min="1" size="small" @change="changeRowNum" />
</el-form-item>
<el-form-item label="行高:" prop="rowHeight">
<el-input-number v-model="addModel.rowHeight" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="表头类型:" prop="headerType">
<el-select v-model="addModel.headerType" size="small">
<el-option
v-for="item in headerTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="表头内容:" prop="headerContextList">
<div v-if="addModel.headerType === 'normal'">
<template v-for="(item, index) in addModel.columnWidthList">
<el-input :key="index" v-model="addModel.headerContextList[index]" size="small" />
</template>
</div>
<div v-else-if="addModel.headerType === 'merge'">
<el-input v-model="addModel.headerContextList[0]" size="small" />
</div>
</el-form-item>
<el-form-item label="表头字体大小:" prop="headerFontSize">
<el-input-number v-model="addModel.headerFontSize" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="表格字体大小:" prop="fontSize">
<el-input-number v-model="addModel.fontSize" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="表格内容:" prop="tableData">
<el-table :data="addModel.tableData" border style="width: 100%;">
<template v-for="(item, i) in addModel.columnWidthList">
<el-table-column :key="i" :label="'列'+(i + 1)" :prop="'column'+ (i + 1)">
<template slot-scope="scope">
<el-input v-if="i === 0" v-model="addModel.tableData[scope.$index]['column'+ (i + 1)]" size="small" />
<el-select v-else v-model="addModel.tableData[scope.$index]['column'+ (i + 1)]" filterable size="small">
<el-option
v-for="it in stateList"
:key="it.value"
:label="it.label"
:value="it.value"
/>
</el-select>
</template>
</el-table-column>
</template>
</el-table>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" size="small" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
<el-button v-show="showDeleteButton" size="small" @click="initPage">{{ $t('global.cancel') }}</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'FasBrakeMachine',
data() {
return {
addModel:{
code: '',
rowHeight: 25,
x: 10,
y: 10,
columnNum: 2,
rowNum: 2,
columnWidthList: [50, 50],
headerType: 'normal',
tableData: [{}],
headerContextList: [],
headerFontSize: 14,
fontSize: 12
},
headerTypeList: [
{label: '单列表头', value: 'merge'},
{label: '多列表头', value: 'normal'},
{label: '无表头', value: 'none'}
],
stateList: [
{label: '火灾系统故障', value: 'fasSystemFailure'},
{label: 'FACP自动状态', value: 'facpAutoMode'},
{label: '气灭控制系统状态', value: 'gesControlStatus'},
{label: '消火栓泵启动状态', value: 'hydrantStartupStatus'},
{label: '感温电缆火警状态', value: 'tscFireCondition'},
{label: '站厅A端设备区点型火灾探测器', value: 'aEquipmentAreaFireDetector'},
{label: '站厅B端设备区点型火灾探测器', value: 'bEquipmentAreaFireDetector'},
{label: '站台公共区点型火灾探测器', value: 'pcaFireDetector'},
{label: '站厅公共区点型火灾探测器', value: 'scaFireDetector'},
{label: '站内垂直电梯切非站台B消', value: 'elevatorCutFirePowerSupply'},
{label: '其他切非回路站台B消', value: 'otherCutFirePowerSupply'},
{label: '站内下行左线手动报警按钮', value: 'inDownLeftManualAlarm'},
{label: '站内上行右线手动报警按钮', value: 'inUpRightManualAlarm'},
{label: '站间下行左线手动报警按钮', value: 'outDownLeftManualAlarm'},
{label: '站间上行右线手动报警按钮', value: 'outUpRightManualAlarm'},
{label: '站内下行左线消火栓按钮', value: 'inDownLeftHydrant'},
{label: '站内上行右线消火栓按钮', value: 'inUpRightHydrant'},
{label: '站间下行左线消火栓按钮', value: 'outDownLeftHydrant'},
{label: '站间上行右线消火栓按钮', value: 'outUpRightHydrant'},
{label: '视屏服务器状态', value: 'videoServerStatus'},
{label: '数据服务器状态', value: 'dataServerStatus'},
{label: '媒体交换服务区状态', value: 'mediaServerStatus'},
{label: '解码器状态', value: 'decoderState'},
{label: '四路解码器状态', value: 'quadDecoderState'},
{label: '四路解码器模式状态', value: 'quadDecoderModeState'},
{label: '控制键盘状态', value: 'controlKeyboardState'},
{label: '进线电源', value: 'coilInPower'},
{label: '旁路开关状态', value: 'bypassSwitchStatus'},
{label: '电源欠压报警', value: 'powerUnderVoltageAlarm'},
{label: '风扇运行状态', value: 'fanRunningState'},
{label: '总报警信号', value: 'generalAlarmSignal'},
{label: '电池容量', value: 'batteryCapacity'},
{label: '充电时间', value: 'chargingTime'},
{label: '放电时间', value: 'dischargeTime'},
{label: '交流输出电压', value: 'acOutputVoltage'},
{label: '直流电压信号', value: 'dcVoltageSignal'}
],
rules: {
width:[{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }],
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
},
isUpdate:false,
showDeleteButton: false,
buttonText: '立即创建'
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'StateTable' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.addModel.code = model.code;
this.addModel.rowHeight = model.rowHeight;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
this.addModel.columnNum = model.columnNum;
this.addModel.rowNum = model.rowNum;
this.addModel.columnWidthList = model.columnWidthList;
this.addModel.headerType = model.headerType;
this.addModel.tableData = model.tableData;
this.addModel.headerFontSize = model.headerFontSize;
this.addModel.fontSize = model.fontSize;
this.addModel.headerContextList = model.headerContextList;
}
}
},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const model = {
point: {
x: this.addModel.x,
y: this.addModel.y
},
columnNum: this.addModel.columnNum,
rowNum: this.addModel.rowNum,
rowHeight: this.addModel.rowHeight,
columnWidthList: this.addModel.columnWidthList,
headerType: this.addModel.headerType,
tableData: this.addModel.tableData,
_type: 'StateTable',
headerFontSize: this.addModel.headerFontSize,
fontSize: this.addModel.fontSize,
headerContextList: this.addModel.headerContextList,
code: this.isUpdate ? this.addModel.code : getUID('StateTable', this.iscs.stateTableList)
};
this.$emit('createDataModel', model);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const model = {
point: {
x: this.addModel.x,
y: this.addModel.y
},
code: this.addModel.code,
columnNum: this.addModel.columnNum,
rowNum: this.addModel.rowNum,
rowHeight: this.addModel.rowHeight,
columnWidthList: this.addModel.columnWidthList,
headerType: this.addModel.headerType,
tableData: this.addModel.tableData,
headerFontSize: this.addModel.headerFontSize,
fontSize: this.addModel.fontSize,
headerContextList: this.addModel.headerContextList,
_type: 'StateTable'
};
this.$emit('deleteDataModel', model);
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.addModel = {
code: '',
rowHeight: 25,
x: 10,
y: 10,
columnNum: 2,
rowNum: 2,
columnWidthList: [50, 50],
headerType: 'normal',
tableData: [{}, {}],
headerFontSize: 14,
fontSize: 12,
headerContextList: []
};
},
changeColumnNum(num) {
const length = this.addModel.columnWidthList.length;
if (length > num) {
this.addModel.columnWidthList.splice(num - 1, length - num);
this.addModel.headerContextList.splice(num - 1, length - num);
this.addModel.tableData.forEach(item => {
for (let i = 0; i < length - num; i++) {
delete item['column' + (num - i + 1)];
}
});
} else if (length < num) {
for (let i = 0; i < num - length; i++) {
this.addModel.columnWidthList.push(50);
this.addModel.headerContextList.push('');
}
}
},
changeRowNum(num) {
const length = this.addModel.tableData.length;
if (length + 1 > num) {
this.addModel.tableData.splice(num - 2, length + 1 - num);
} else if (length + 1 < num) {
for (let i = 0; i < num - length - 1; i++) {
this.addModel.tableData.push({});
}
}
}
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,158 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="120px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="文字内容:" prop="context">
<el-input v-model="form.context" type="textarea" size="small" />
</el-form-item>
<el-form-item label="文字颜色:" prop="textFill">
<el-color-picker v-model="form.textFill" size="small" />
</el-form-item>
<el-form-item label="文字大小:" prop="fontSize">
<el-input-number v-model="form.fontSize" controls-position="right" :min="1" :max="100" size="small" />
</el-form-item>
<el-form-item label="文字粗细:" prop="fontWeight">
<el-input-number v-model="form.fontWeight" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="X轴坐标:">
<el-input-number v-model="form.x" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="Y轴坐标:">
<el-input-number v-model="form.y" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" size="small" type="danger" @click="deleteDevice">删除</el-button>
<el-button v-show="showDeleteButton" size="small" @click="initPage">取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'IscsText',
components: {
},
data() {
return {
isUpdate: false,
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
context: '',
textFill: '',
fontSize: 14,
fontWeight: 450,
x: 10,
y: 10
},
rules: {
code: [
{ required: true, message: '请输入文字编号', trigger: 'blur' }
],
context: [
{ required: true, message: '请输入文字内容', trigger: 'blur' }
],
textFill: [
{ required: true, message: '请输入文字颜色', trigger: 'blur' }
],
fontSize: [
{ required: true, message: '请输入文字大小', trigger: 'blur' }
],
fontWeight: [
{ required: true, message: '请输入文字粗细', trigger: 'blur' }
]
}
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'IscsText' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.context = model.context;
this.form.fontSize = model.fontSize;
this.form.fontWeight = model.fontWeight;
this.form.textFill = model.textFill;
this.form.x = model.point.x;
this.form.y = model.point.y;
}
}
},
mounted() {},
methods: {
onSubmit(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const textModel = {
point: {
x: this.form.x,
y: this.form.y
},
code: this.isUpdate ? this.form.code : getUID('IscsText', this.iscs.iscsTextList),
_type: 'IscsText',
context: this.form.context,
textFill: this.form.textFill,
fontSize: this.form.fontSize,
fontWeight: this.form.fontWeight,
fontFamily: 'consolas'
};
this.$emit('createDataModel', textModel);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
const textModel = {
point: {
x: this.form.x,
y: this.form.y
},
code: this.form.code,
_type: 'IscsText',
context: this.form.context,
textFill: this.form.textFill,
fontSize: this.form.fontSize,
fontWeight: this.form.fontWeight,
fontFamily: 'consolas'
};
this.$emit('deleteDataModel', textModel);
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code: '',
context: '',
textFill: '',
fontSize: 14,
fontWeight: 450,
x: 10,
y: 10
};
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -13,6 +13,11 @@
<iscs-afc-operate v-else-if="iscsMode==='afc'" ref="iscsAfcOperate" @iscsChange="iscsChange" @handleSave="handleSave" /> <iscs-afc-operate v-else-if="iscsMode==='afc'" ref="iscsAfcOperate" @iscsChange="iscsChange" @handleSave="handleSave" />
<iscs-acs-operate v-else-if="iscsMode==='acs'" ref="iscsAcsOperate" @iscsChange="iscsChange" @handleSave="handleSave" /> <iscs-acs-operate v-else-if="iscsMode==='acs'" ref="iscsAcsOperate" @iscsChange="iscsChange" @handleSave="handleSave" />
<iscs-net-operate v-else-if="iscsMode==='netState'" ref="iscsNetOperate" @iscsChange="iscsChange" @handleSave="handleSave" /> <iscs-net-operate v-else-if="iscsMode==='netState'" ref="iscsNetOperate" @iscsChange="iscsChange" @handleSave="handleSave" />
<iscs-automatic v-else-if="iscsMode==='afc02'" ref="" @iscsChange="iscsChange" @handleSave="handleSave" /> <!-- 自动售检票/门禁 -->
<iscs-communication v-else-if="iscsMode==='communication02'" ref="" @iscsChange="iscsChange" @handleSave="handleSave" /> <!-- 通信 -->
<iscs-fire-alarm v-else-if="iscsMode==='fas02'" ref="" @iscsChange="iscsChange" @handleSave="handleSave" /> <!-- 火灾报警系统 -->
<iscs-power-monitoring v-else-if="iscsMode==='powerMonitoring02'" ref="" @iscsChange="iscsChange" @handleSave="handleSave" /> <!-- 电力监控系统 -->
<iscs-signal-system v-else-if="iscsMode==='signalSystem02'" ref="" @iscsChange="iscsChange" @handleSave="handleSave" /> <!-- 信号系统 -->
</div> </div>
</div> </div>
</transition> </transition>
@ -27,6 +32,13 @@ import IscsCctvOperate from './iscsCctvOperate/index';
import IscsAfcOperate from './iscsAfcOperate/index'; import IscsAfcOperate from './iscsAfcOperate/index';
import IscsAcsOperate from './iscsAcsOperate/index'; import IscsAcsOperate from './iscsAcsOperate/index';
import IscsNetOperate from './IscsNetOperate/index'; import IscsNetOperate from './IscsNetOperate/index';
import IscsAutomatic from './iscsAutomatic/index';
import IscsCommunication from './iscsCommunication/index';
import IscsFireAlarm from './iscsFireAlarm/index';
import IscsPowerMonitoring from './iscsPowerMonitoring/index';
import IscsSignalSystem from './iscsSignalSystem/index';
import { saveIscsElement } from '@/api/iscs'; import { saveIscsElement } from '@/api/iscs';
export default { export default {
@ -39,7 +51,13 @@ export default {
IscsCctvOperate, IscsCctvOperate,
IscsAfcOperate, IscsAfcOperate,
IscsAcsOperate, IscsAcsOperate,
IscsNetOperate IscsNetOperate,
IscsAutomatic,
IscsCommunication,
IscsFireAlarm,
IscsPowerMonitoring,
IscsSignalSystem
}, },
data() { data() {
return { return {
@ -107,11 +125,11 @@ export default {
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.map-draft{ .map-draft{
width: 420px; width: 470px;
height: 100%; height: 100%;
position: absolute; position: absolute;
right: 0; right: 0;
transform: translateX(420px); transform: translateX(470px);
transition: all 0.5s; transition: all 0.5s;
background: #fff; background: #fff;
z-index: 9; z-index: 9;

View File

@ -0,0 +1,174 @@
<template>
<transition name="el-zoom-in-center">
<div class="map-control heightClass ">
<el-card type="border-card" class="heightClass">
<div slot="header" class="clearfix">
<el-button
type="text"
style="float: right; padding: 3px 0; margin-right: 5px;"
@click="handleSave"
>{{ $t('ibp.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane label="按钮" name="IscsButton">
<iscs-button
ref="iscsButton"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="文字" name="IscsText">
<iscs-text
ref="iscsText"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="线段" name="IscsLine">
<iscs-line
ref="iscsLine"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="矩形" name="IscsRect">
<iscs-rect
ref="iscsRect"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</transition>
</template>
<script>
import {deviceFactory} from '@/iscs/utils/parser';
import IscsLine from '../icscComponents/line';
import IscsText from '../icscComponents/text';
import IscsRect from '../icscComponents/rect';
import IscsButton from '../icscComponents/button';
export default {
name: 'IscsOperate',
components: {
IscsRect,
IscsLine,
IscsText,
IscsButton
},
mixins: [
],
data() {
return {
enabledTab: 'PlatformScreenDoor',
data: '',
stationCode: ''
};
},
computed: {
height() {
return this.$store.state.config.height;
}
},
watch: {
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
this.enabledTab = model._type;
}
},
mounted() {
this.$emit('iscsChange', this.$route.params.id);
},
beforeDestroy() {
},
methods: {
createDataModel(model) {
const newModel = deviceFactory(model._type, model);
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
},
deleteDataModel(model) {
this.$store.dispatch('iscs/deleteIscsDevices', model);
},
handleSave() {
const data = JSON.stringify(this.$store.state.iscs.iscs);
console.log(data);
this.$emit('handleSave', data);
},
handleTabClick() {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.map-control {
float: right;
width: 100%;
height: 100%;
.border-card{
height: 100%;
}
}
.mapEdit{
height: calc(100% - 47px);
.tab_pane_box{
height: 100%;
}
}
/deep/ .el-card__body{
height:100%;
}
/deep/ {
.mapEdit .el-tabs__nav-wrap.is-scrollable {
padding: 0 20px;
}
.mapEdit .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f5f7fa;
background: #f5f7fa;
}
.mapEdit .el-tabs__active-bar{
background: transparent;
}
.mapEdit .el-tabs__content {
height: calc(100% - 56px);
}
.mapEdit .el-tab-pane {
height: 100%;
}
.card .el-tabs__nav .el-tabs__item.is-active {
border-bottom: 2px solid #E4E7ED;
background: #409eff;
color: #fff;
}
.card .el-tabs__nav .el-tabs__item{
padding: 0 20px!important;
}
.mapEdit .el-tabs__nav-prev {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
.mapEdit .el-tabs__nav-next {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
}
.heightClass{height:100%;}
</style>

View File

@ -0,0 +1,174 @@
<template>
<transition name="el-zoom-in-center">
<div class="map-control heightClass ">
<el-card type="border-card" class="heightClass">
<div slot="header" class="clearfix">
<el-button
type="text"
style="float: right; padding: 3px 0; margin-right: 5px;"
@click="handleSave"
>{{ $t('ibp.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane label="按钮" name="IscsButton">
<iscs-button
ref="iscsButton"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="文字" name="IscsText">
<iscs-text
ref="iscsText"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="线段" name="IscsLine">
<iscs-line
ref="iscsLine"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="矩形" name="IscsRect">
<iscs-rect
ref="iscsRect"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</transition>
</template>
<script>
import {deviceFactory} from '@/iscs/utils/parser';
import IscsLine from '../icscComponents/line';
import IscsText from '../icscComponents/text';
import IscsRect from '../icscComponents/rect';
import IscsButton from '../icscComponents/button';
export default {
name: 'IscsOperate',
components: {
IscsRect,
IscsLine,
IscsText,
IscsButton
},
mixins: [
],
data() {
return {
enabledTab: 'PlatformScreenDoor',
data: '',
stationCode: ''
};
},
computed: {
height() {
return this.$store.state.config.height;
}
},
watch: {
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
this.enabledTab = model._type;
}
},
mounted() {
this.$emit('iscsChange', this.$route.params.id);
},
beforeDestroy() {
},
methods: {
createDataModel(model) {
const newModel = deviceFactory(model._type, model);
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
},
deleteDataModel(model) {
this.$store.dispatch('iscs/deleteIscsDevices', model);
},
handleSave() {
const data = JSON.stringify(this.$store.state.iscs.iscs);
console.log(data);
this.$emit('handleSave', data);
},
handleTabClick() {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.map-control {
float: right;
width: 100%;
height: 100%;
.border-card{
height: 100%;
}
}
.mapEdit{
height: calc(100% - 47px);
.tab_pane_box{
height: 100%;
}
}
/deep/ .el-card__body{
height:100%;
}
/deep/ {
.mapEdit .el-tabs__nav-wrap.is-scrollable {
padding: 0 20px;
}
.mapEdit .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f5f7fa;
background: #f5f7fa;
}
.mapEdit .el-tabs__active-bar{
background: transparent;
}
.mapEdit .el-tabs__content {
height: calc(100% - 56px);
}
.mapEdit .el-tab-pane {
height: 100%;
}
.card .el-tabs__nav .el-tabs__item.is-active {
border-bottom: 2px solid #E4E7ED;
background: #409eff;
color: #fff;
}
.card .el-tabs__nav .el-tabs__item{
padding: 0 20px!important;
}
.mapEdit .el-tabs__nav-prev {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
.mapEdit .el-tabs__nav-next {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
}
.heightClass{height:100%;}
</style>

View File

@ -0,0 +1,174 @@
<template>
<transition name="el-zoom-in-center">
<div class="map-control heightClass ">
<el-card type="border-card" class="heightClass">
<div slot="header" class="clearfix">
<el-button
type="text"
style="float: right; padding: 3px 0; margin-right: 5px;"
@click="handleSave"
>{{ $t('ibp.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane label="按钮" name="IscsButton">
<iscs-button
ref="iscsButton"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="文字" name="IscsText">
<iscs-text
ref="iscsText"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="线段" name="IscsLine">
<iscs-line
ref="iscsLine"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="矩形" name="IscsRect">
<iscs-rect
ref="iscsRect"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</transition>
</template>
<script>
import {deviceFactory} from '@/iscs/utils/parser';
import IscsLine from '../icscComponents/line';
import IscsText from '../icscComponents/text';
import IscsRect from '../icscComponents/rect';
import IscsButton from '../icscComponents/button';
export default {
name: 'IscsOperate',
components: {
IscsRect,
IscsLine,
IscsText,
IscsButton
},
mixins: [
],
data() {
return {
enabledTab: 'PlatformScreenDoor',
data: '',
stationCode: ''
};
},
computed: {
height() {
return this.$store.state.config.height;
}
},
watch: {
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
this.enabledTab = model._type;
}
},
mounted() {
this.$emit('iscsChange', this.$route.params.id);
},
beforeDestroy() {
},
methods: {
createDataModel(model) {
const newModel = deviceFactory(model._type, model);
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
},
deleteDataModel(model) {
this.$store.dispatch('iscs/deleteIscsDevices', model);
},
handleSave() {
const data = JSON.stringify(this.$store.state.iscs.iscs);
console.log(data);
this.$emit('handleSave', data);
},
handleTabClick() {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.map-control {
float: right;
width: 100%;
height: 100%;
.border-card{
height: 100%;
}
}
.mapEdit{
height: calc(100% - 47px);
.tab_pane_box{
height: 100%;
}
}
/deep/ .el-card__body{
height:100%;
}
/deep/ {
.mapEdit .el-tabs__nav-wrap.is-scrollable {
padding: 0 20px;
}
.mapEdit .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f5f7fa;
background: #f5f7fa;
}
.mapEdit .el-tabs__active-bar{
background: transparent;
}
.mapEdit .el-tabs__content {
height: calc(100% - 56px);
}
.mapEdit .el-tab-pane {
height: 100%;
}
.card .el-tabs__nav .el-tabs__item.is-active {
border-bottom: 2px solid #E4E7ED;
background: #409eff;
color: #fff;
}
.card .el-tabs__nav .el-tabs__item{
padding: 0 20px!important;
}
.mapEdit .el-tabs__nav-prev {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
.mapEdit .el-tabs__nav-next {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
}
.heightClass{height:100%;}
</style>

View File

@ -0,0 +1,174 @@
<template>
<transition name="el-zoom-in-center">
<div class="map-control heightClass ">
<el-card type="border-card" class="heightClass">
<div slot="header" class="clearfix">
<el-button
type="text"
style="float: right; padding: 3px 0; margin-right: 5px;"
@click="handleSave"
>{{ $t('ibp.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane label="按钮" name="IscsButton">
<iscs-button
ref="iscsButton"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="文字" name="IscsText">
<iscs-text
ref="iscsText"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="线段" name="IscsLine">
<iscs-line
ref="iscsLine"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="矩形" name="IscsRect">
<iscs-rect
ref="iscsRect"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</transition>
</template>
<script>
import {deviceFactory} from '@/iscs/utils/parser';
import IscsLine from '../icscComponents/line';
import IscsText from '../icscComponents/text';
import IscsRect from '../icscComponents/rect';
import IscsButton from '../icscComponents/button';
export default {
name: 'IscsOperate',
components: {
IscsRect,
IscsLine,
IscsText,
IscsButton
},
mixins: [
],
data() {
return {
enabledTab: 'PlatformScreenDoor',
data: '',
stationCode: ''
};
},
computed: {
height() {
return this.$store.state.config.height;
}
},
watch: {
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
this.enabledTab = model._type;
}
},
mounted() {
this.$emit('iscsChange', this.$route.params.id);
},
beforeDestroy() {
},
methods: {
createDataModel(model) {
const newModel = deviceFactory(model._type, model);
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
},
deleteDataModel(model) {
this.$store.dispatch('iscs/deleteIscsDevices', model);
},
handleSave() {
const data = JSON.stringify(this.$store.state.iscs.iscs);
console.log(data);
this.$emit('handleSave', data);
},
handleTabClick() {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.map-control {
float: right;
width: 100%;
height: 100%;
.border-card{
height: 100%;
}
}
.mapEdit{
height: calc(100% - 47px);
.tab_pane_box{
height: 100%;
}
}
/deep/ .el-card__body{
height:100%;
}
/deep/ {
.mapEdit .el-tabs__nav-wrap.is-scrollable {
padding: 0 20px;
}
.mapEdit .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f5f7fa;
background: #f5f7fa;
}
.mapEdit .el-tabs__active-bar{
background: transparent;
}
.mapEdit .el-tabs__content {
height: calc(100% - 56px);
}
.mapEdit .el-tab-pane {
height: 100%;
}
.card .el-tabs__nav .el-tabs__item.is-active {
border-bottom: 2px solid #E4E7ED;
background: #409eff;
color: #fff;
}
.card .el-tabs__nav .el-tabs__item{
padding: 0 20px!important;
}
.mapEdit .el-tabs__nav-prev {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
.mapEdit .el-tabs__nav-next {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
}
.heightClass{height:100%;}
</style>

View File

@ -0,0 +1,174 @@
<template>
<transition name="el-zoom-in-center">
<div class="map-control heightClass ">
<el-card type="border-card" class="heightClass">
<div slot="header" class="clearfix">
<el-button
type="text"
style="float: right; padding: 3px 0; margin-right: 5px;"
@click="handleSave"
>{{ $t('ibp.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane label="按钮" name="IscsButton">
<iscs-button
ref="iscsButton"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="文字" name="IscsText">
<iscs-text
ref="iscsText"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="线段" name="IscsLine">
<iscs-line
ref="iscsLine"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="矩形" name="IscsRect">
<iscs-rect
ref="iscsRect"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</transition>
</template>
<script>
import {deviceFactory} from '@/iscs/utils/parser';
import IscsLine from '../icscComponents/line';
import IscsText from '../icscComponents/text';
import IscsRect from '../icscComponents/rect';
import IscsButton from '../icscComponents/button';
export default {
name: 'IscsOperate',
components: {
IscsRect,
IscsLine,
IscsText,
IscsButton
},
mixins: [
],
data() {
return {
enabledTab: 'PlatformScreenDoor',
data: '',
stationCode: ''
};
},
computed: {
height() {
return this.$store.state.config.height;
}
},
watch: {
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
this.enabledTab = model._type;
}
},
mounted() {
this.$emit('iscsChange', this.$route.params.id);
},
beforeDestroy() {
},
methods: {
createDataModel(model) {
const newModel = deviceFactory(model._type, model);
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
},
deleteDataModel(model) {
this.$store.dispatch('iscs/deleteIscsDevices', model);
},
handleSave() {
const data = JSON.stringify(this.$store.state.iscs.iscs);
console.log(data);
this.$emit('handleSave', data);
},
handleTabClick() {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.map-control {
float: right;
width: 100%;
height: 100%;
.border-card{
height: 100%;
}
}
.mapEdit{
height: calc(100% - 47px);
.tab_pane_box{
height: 100%;
}
}
/deep/ .el-card__body{
height:100%;
}
/deep/ {
.mapEdit .el-tabs__nav-wrap.is-scrollable {
padding: 0 20px;
}
.mapEdit .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f5f7fa;
background: #f5f7fa;
}
.mapEdit .el-tabs__active-bar{
background: transparent;
}
.mapEdit .el-tabs__content {
height: calc(100% - 56px);
}
.mapEdit .el-tab-pane {
height: 100%;
}
.card .el-tabs__nav .el-tabs__item.is-active {
border-bottom: 2px solid #E4E7ED;
background: #409eff;
color: #fff;
}
.card .el-tabs__nav .el-tabs__item{
padding: 0 20px!important;
}
.mapEdit .el-tabs__nav-prev {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
.mapEdit .el-tabs__nav-next {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
}
.heightClass{height:100%;}
</style>

View File

@ -96,7 +96,7 @@
</div> </div>
<div class="chat-box-footer"> <div class="chat-box-footer">
<div class="chat-box-footer-tool" /> <div class="chat-box-footer-tool" />
<el-button v-if="isButtonShow && !commonConversation" size="mini" type="danger" class="chat-box-footer-quit" :loading="quitLoading" @click="quitConversition()">结束会话</el-button> <el-button v-if="isButtonShow && !commonConversation" size="mini" type="danger" class="chat-box-footer-quit" :loading="quitLoading" @click="quitConversition()">退出会话</el-button>
<el-button v-if="isButtonShow && !commonConversation" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button> <el-button v-if="isButtonShow && !commonConversation" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button>
</div> </div>
</template> </template>
@ -654,6 +654,8 @@ export default {
this.messageList = []; this.messageList = [];
}, },
resetCoversition() { resetCoversition() {
//
this.commonMessageList = [];
this.conversitionStateMap = {}; this.conversitionStateMap = {};
} }
} }

View File

@ -32,30 +32,6 @@ export default {
required: true required: true
} }
}, },
data() {
return {
isHasCoversition:false,
conversitionId:'',
currentMemberList:[],
chatContentList:[],
activeTrainList:[],
isStartRecord:false,
inviteUserName:'',
createCoversition:true,
inviteUser:{},
isQuitShow:false,
treeData:[],
driverList:[],
simulationUsers:{}
};
},
computed:{
isShow() {
return this.userRole != '' &&
this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' &&
!this.isHasCoversition && this.createCoversition;
}
},
watch:{ watch:{
// //
'$store.state.socket.scriptFinish':function(val, old) { '$store.state.socket.scriptFinish':function(val, old) {
@ -66,58 +42,15 @@ export default {
mounted() { mounted() {
}, },
methods:{ methods:{
addContent(simulationText) {
const text = {};
const member = this.currentMemberList.find(member=>{
return member.id == simulationText.memberId;
});
if (member) {
text.self = (this.$store.state.user.id == member.userId);
text.member = member;
text.chatTime = simulationText.time;
text.src = simulationText.audioPath;
text.message = simulationText.content;
}
return text;
},
coverName(inviteUser) {
const member = this.memberData.find(member=>{ return member.id == inviteUser.creatorId; });
return member.label;
},
clearAllData() { clearAllData() {
this.resetCoversition(); // this.resetCoversition();
this.createCoversition = true;
this.$refs.chatbox.resetCoversition(); this.$refs.chatbox.resetCoversition();
this.$refs.scriptTip.resetScriptTip(); this.$refs.scriptTip.resetScriptTip();
}, },
setMembers(roleId) {
this.memberData.map(member=>{
if (member.id == roleId) {
member.userId = this.$store.state.user.id;
member.userName = this.$store.state.user.nickname;
member.disabled = true;
} else {
member.userId = '';
member.userName = '';
member.disabled = false;
}
const userName = member.userName ? '-' + member.userName : '';
const name = member.name == undefined ? '' : '-' + member.name;
member.label = member.type + member.deviceName + name + userName;
});
},
resetCoversition() { resetCoversition() {
this.conversitionId = ''; this.$refs.chatbox.resetCoversition();
this.isHasCoversition = false;
this.currentMemberList = [];
this.chatContentList = [];
this.isStartRecord = false;
this.inviteUserName = '';
this.inviteUser = {};
this.isQuitShow = false;
}, },
allowCreatCoversition() { allowCreatCoversition() {
this.createCoversition = true;
}, },
resetScriptTip() { resetScriptTip() {
this.$refs.scriptTip.resetScriptTip(); this.$refs.scriptTip.resetScriptTip();
@ -125,47 +58,6 @@ export default {
cancelCommonConversation() { cancelCommonConversation() {
this.$refs.chatbox.cancelCommonConversation(); this.$refs.chatbox.cancelCommonConversation();
} }
// isAudienceInitData() {
// getAllConversition(this.group).then(resp => {
// const messages = [];
// if (resp.data && resp.data.length) {
// debugger;
// resp.data.forEach(conversation => {
// (conversation.messageList || []).forEach(message => {
// const member = this.memberData[message.memberId];
// message.src = `/audio/${message.audioPath}`;
// message.members = conversation.memberList;
// if (member) {
// message.self = this.$store.state.userId == member.userId;
// }
// messages.push(message);
// });
// if (this.userRole !== 'AUDIENCE') {
// const user = this.simulationUsers[this.$store.state.user.id];
// this.isConversitionCreator = conversation.creatorId == user.memberId;
// !conversation.over && conversation.memberList.forEach(member =>{
// if (member.memberId == user.memberId && member.connect) {
// this.conversitionMemberList = conversation.memberList;
// this.conversitionId = conversation.id;
// this.messageList = [];
// conversation.messageList.forEach(message => {
// const member = this.memberData[message.memberId];
// message.src = `/audio/${message.audioPath}`;
// if (member) {
// message.self = this.$store.state.userId == member.userId;
// }
// this.privateMessageList.push(message);
// this.messageList.push(message);
// });
// }
// });
// }
// });
// }
// this.commonMessageList = messages.sort(this.sortByMessageTime);
// // this.initCommonMemberList();
// });
// }
} }
}; };
</script> </script>

View File

@ -451,6 +451,8 @@ export default {
this.formatScore = res.data; this.formatScore = res.data;
this.$messageBox('得分:' + this.formatScore); this.$messageBox('得分:' + this.formatScore);
} }
// this.userRole = 'AUDIENCE';
// this.$store.dispatch('training/setRoles', 'AUDIENCE');
// this.quitScriptTraining(); // this.quitScriptTraining();
}).catch(error=>{ }).catch(error=>{
this.$messageBox(error.message); this.$messageBox(error.message);
@ -524,6 +526,7 @@ export default {
this.quitScriptTraining(); this.quitScriptTraining();
} }
this.$store.dispatch('training/setScriptQuit'); this.$store.dispatch('training/setScriptQuit');
// this.$refs.chatbox.resetCoversition();
// this.$store.dispatch('scriptRecord/updateSimulationPause', false); // this.$store.dispatch('scriptRecord/updateSimulationPause', false);
}, },
quitScriptTraining() { quitScriptTraining() {

View File

@ -98,7 +98,7 @@ export default {
if (res.code == 200) { if (res.code == 200) {
const response = await loadScript(this.$route.query.group, row.id); const response = await loadScript(this.$route.query.group, row.id);
if (response.code == 200) { if (response.code == 200) {
let playerList = []; const playerList = [];
EventBus.$emit('clearRunSeries'); EventBus.$emit('clearRunSeries');
if (res.data.memberList && res.data.memberList.length > 0) { if (res.data.memberList && res.data.memberList.length > 0) {
this.form.type = ''; this.form.type = '';
@ -112,8 +112,11 @@ export default {
activeMemberList.push(activeMember.memberId); activeMemberList.push(activeMember.memberId);
} }
}); });
playerList = res.data.memberList.filter(member=>{
return activeMemberList.includes(member.id); res.data.memberList.forEach(member=>{
if (activeMemberList.includes(member.id)) {
playerList.push(Object.assign({}, member));
}
}); });
playerList.map(member=>{ playerList.map(member=>{
@ -131,13 +134,11 @@ export default {
break; break;
} }
case 'DRIVER': { case 'DRIVER': {
member.type = '司机';
member.deviceName = member.deviceCode; member.deviceName = member.deviceCode;
member.label = '司机' + member.deviceName; member.label = '司机' + member.deviceName;
break; break;
} }
case 'MAINTAINER': { case 'MAINTAINER': {
member.type = '通号';
member.label = '通号' + (member.name ? member.name : ''); member.label = '通号' + (member.name ? member.name : '');
break; break;
} }

View File

@ -32,7 +32,7 @@ export default {
} else if (val.type == 'Operation') { } else if (val.type == 'Operation') {
this.scriptTipMessage = covertOperate(val.operationType, val.operationParamMap); this.scriptTipMessage = covertOperate(val.operationType, val.operationParamMap);
// this.scriptTipMessage = '' + deviceName + '' + operateName.label + ''; // this.scriptTipMessage = '' + deviceName + '' + operateName.label + '';
} else if (val.type == 'Over_Conversation') { } else if (val.type == 'Exit_Conversation') {
this.scriptTipMessage = '请结束当前会话'; this.scriptTipMessage = '请结束当前会话';
} else if (val.type == 'Start_Conversation' ) { } else if (val.type == 'Start_Conversation' ) {
const inviteMember = []; const inviteMember = [];

View File

@ -17,10 +17,10 @@
<span>把车开到</span> <span>把车开到</span>
<span class="commandStyle">区段{{ actionInfo.targetName }}</span> <span class="commandStyle">区段{{ actionInfo.targetName }}</span>
</span> </span>
<span v-else-if="actionInfo.isClose"> <!-- <span v-else-if="actionInfo.isClose">
<span class="roleClass">{{ actionInfo.memberName }}</span> <span class="roleClass">{{ actionInfo.memberName }}</span>
<span>结束了会话</span> <span>结束了会话</span>
</span> </span> -->
<span v-else-if="actionInfo.isCoversition"> <span v-else-if="actionInfo.isCoversition">
<span class="roleClass">{{ actionInfo.memberName }}</span> <span class="roleClass">{{ actionInfo.memberName }}</span>
<!-- <span>{{ $t('scriptRecord.speakTo') }}</span> --> <!-- <span>{{ $t('scriptRecord.speakTo') }}</span> -->
@ -131,10 +131,10 @@ export default {
this.actionInfoList.push({id: element.id, isCoversition: true, memberName: memberName, reply: element.content, row: element, visible: true, isModify:false, modifyText:''}); this.actionInfoList.push({id: element.id, isCoversition: true, memberName: memberName, reply: element.content, row: element, visible: true, isModify:false, modifyText:''});
break; break;
} }
case 'Over_Conversation': { // case 'Exit_Conversation': {
this.actionInfoList.push({id: element.id, isClose: true, memberName: memberName}); // this.actionInfoList.push({id: element.id, isClose: true, memberName: memberName});
break; // break;
} // }
case 'Operation': case 'Operation':
{ {
// const command = CommandHandler.getScriptDefinition(element.operationType); // const command = CommandHandler.getScriptDefinition(element.operationType);