Merge remote-tracking branch 'remotes/origin/dev' into test

This commit is contained in:
joylink_cuiweidong 2019-11-11 18:45:09 +08:00
commit e4dffd17af
22 changed files with 1049 additions and 1132 deletions

View File

@ -3,123 +3,123 @@ import request from '@/utils/request';
/** 分页获取订单数据*/
export function getOrderPageList(params) {
return request({
url: '/api/order',
method: 'get',
params: params
});
return request({
url: '/api/order',
method: 'get',
params: params
});
}
/** 根据ID获取订单数据*/
export function getOrderDetail(id, params) {
return request({
url: `/api/order/${id}`,
method: 'get',
params: params
});
return request({
url: `/api/order/${id}`,
method: 'get',
params: params
});
}
/** 创建一个订单*/
export function createOrder(data) {
return request({
url: '/api/order',
method: 'post',
data: data
});
return request({
url: '/api/order',
method: 'post',
data: data
});
}
/** 更新订单*/
export function updateOrder(data) {
return request({
url: '/api/order',
method: 'put',
data: data
});
return request({
url: '/api/order',
method: 'put',
data: data
});
}
export function deleteOrder(id) {
return request({
url: `/api/order/${id}`,
method: 'delete'
});
return request({
url: `/api/order/${id}`,
method: 'delete'
});
}
/** 订单权限领取*/
export function getOrder(params) {
return request({
url: '/api/order/getOrder',
method: 'get',
params: params
});
return request({
url: '/api/order/getOrder',
method: 'get',
params: params
});
}
/** 订单权限分发*/
export function giveOrder(data) {
return request({
url: '/api/order/giveOrder',
method: 'post',
data: data
});
return request({
url: '/api/order/giveOrder',
method: 'post',
data: data
});
}
/** 订单续费*/
export function getOrderCharge(id) {
return request({
url: `/api/order/${id}/charge`,
method: 'get'
});
return request({
url: `/api/order/${id}/charge`,
method: 'get'
});
}
/** 计算总价*/
export function calcuteOrderSumPrice(args) {
return request({
url: `/api/order/price`,
method: 'get',
params: args
});
return request({
url: `/api/order/price`,
method: 'get',
params: args
});
}
/** 提交订单*/
export function commitOrder(data) {
return request({
url: '/api/order/submit',
method: 'post',
data: data
});
return request({
url: '/api/order/submit',
method: 'post',
data: data
});
}
/** 确认订单*/
export function confirmOrder(data) {
return request({
url: `/api/order/${data.orderId}/${data.type}/pay`,
method: 'get'
});
return request({
url: `/api/order/${data.orderId}/${data.type}/pay`,
method: 'get'
});
}
/** 取消订单*/
export function cancalOrder(orderId) {
return request({
url: `/api/order/${orderId}/cancelPay`,
method: 'put'
});
return request({
url: `/api/order/${orderId}/cancelPay`,
method: 'put'
});
}
// 快速创建权限
export function createPermission(data) {
return request({
url: `/api/order/quicklyGenerateOrder`,
method: 'post',
data: data
});
return request({
url: `/api/order/quicklyGenerateOrder`,
method: 'post',
data: data
});
}
// 校验是否存在所选择权限对应的权限包
export function postFindPermission(ids) {
return request({
url: `/api/permission/findPermission`,
method: 'post',
data: {
relPermissions: ids
}
});
return request({
url: `/api/permission/findPermission`,
method: 'post',
data: {
relPermissions: ids
}
});
}

View File

@ -198,5 +198,6 @@ export default {
companyTel:'Tel: +86 13289398171',
companyICP:'Copyright ©2018 Beijing Jiulian Technology Co., Ltd ICP: 18028522',
enterPermissionNum:'please input number',
enterPermissionNumInt:'number must interger'
enterPermissionNumInt:'number must interger',
perpetual: 'perpetual'
};

View File

@ -198,5 +198,6 @@ export default {
companyTel:'联系电话: 13289398171',
companyICP:'Copyright ©2018 北京玖琏科技有限公司 京ICP备18028522号',
enterPermissionNum:'请输入权限数量',
enterPermissionNumInt:'权限数量需为整数'
enterPermissionNumInt:'权限数量需为整数',
perpetual: '永久'
};

View File

@ -21,7 +21,7 @@
import { runPlanTemplateList } from '@/api/runplan';
import { getStationList } from '@/api/runplan';
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import { listPublishMap, getPublishMapInfo } from '@/api/jmap/map';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'ReloadTodayPlan',
@ -29,7 +29,6 @@ export default {
return {
dialogShow: false,
loading: false,
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
@ -52,15 +51,6 @@ export default {
{
title: '运行图名称',
prop: 'name'
},
{
title: '地图名称',
prop: 'mapId',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.mapId, this.mapList, ['id', 'name']);
},
tagType: (row) => { return 'success'; }
}
]
},
@ -74,16 +64,9 @@ export default {
}
},
methods: {
loadInitData() {
this.mapList = [];
listPublishMap().then(response => {
this.mapList = response.data;
});
},
doShow() {
this.loading = false;
this.dialogShow = true;
this.loadInitData();
},
doClose() {
this.dialogShow = false;

View File

@ -21,7 +21,7 @@
import { runPlanTemplateList } from '@/api/runplan';
import { getStationList } from '@/api/runplan';
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import { listPublishMap, getPublishMapInfo } from '@/api/jmap/map';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'ReloadTodayPlan',
@ -29,7 +29,6 @@ export default {
return {
dialogShow: false,
loading: false,
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
@ -52,15 +51,6 @@ export default {
{
title: '运行图名称',
prop: 'name'
},
{
title: '地图名称',
prop: 'mapId',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.mapId, this.mapList, ['id', 'name']);
},
tagType: (row) => { return 'success'; }
}
]
},
@ -74,16 +64,9 @@ export default {
}
},
methods: {
loadInitData() {
this.mapList = [];
listPublishMap().then(response => {
this.mapList = response.data;
});
},
doShow() {
this.loading = false;
this.dialogShow = true;
this.loadInitData();
},
doClose() {
this.dialogShow = false;

View File

@ -21,7 +21,7 @@
import { runPlanTemplateList } from '@/api/runplan';
import { getStationList } from '@/api/runplan';
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import { listPublishMap, getPublishMapInfo} from '@/api/jmap/map';
import {getPublishMapInfo} from '@/api/jmap/map';
export default {
name: 'ReloadTodayPlan',
@ -29,7 +29,6 @@ export default {
return {
dialogShow: false,
loading: false,
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
@ -52,15 +51,6 @@ export default {
{
title: '运行图名称',
prop: 'name'
},
{
title: '地图名称',
prop: 'mapId',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.mapId, this.mapList, ['id', 'name']);
},
tagType: (row) => { return 'success'; }
}
]
},
@ -74,16 +64,9 @@ export default {
}
},
methods: {
loadInitData() {
this.mapList = [];
listPublishMap().then(response => {
this.mapList = response.data;
});
},
doShow() {
this.loading = false;
this.dialogShow = true;
this.loadInitData();
},
doClose() {
this.dialogShow = false;

View File

@ -29,451 +29,451 @@ import { runDiagramGetTime } from '@/api/simulation';
import DataTable from '../menusPlan/components/dataTable';
export default {
name: 'PlanSchedule',
components: {
DataTable
},
props: {
group: {
type: String,
required: true
},
skinCode: {
type: String,
required: true
},
maxWidth: {
type: Number,
require: true
},
maxHeight: {
type: Number,
required: true
}
},
data() {
return {
top: 0,
height: 0,
heights: [100, 100],
runPlanId: 'plan-schedule-id',
myChart: null,
PlanConvert: {},
serviceNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.serviceNumberChange,
showClose: false,
columns: [
{
prop: 'serviceNumber',
label: '表号'
},
{
width: 40
}
]
},
tripNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.tripNumberChange,
showClose: false,
columns: [
{
prop: 'tripNumber',
label: '车次号'
},
{
width: 40
}
]
},
realData: {},
kmRangeCoordMap: {},
option: {
title: {
text: '',
left: 'center'
},
grid: {
top: '30px',
left: '120px',
right: '40px',
bottom: '65px',
containLabel: true,
backgroundColor: 'floralwhite'
},
toolbox: {
right: '30px',
feature: {
dataZoom: {
yAxisIndex: 'none'
},
restore: {},
saveAsImage: {}
}
},
tooltip: {
axisPointer: {
trigger: 'item',
type: 'cross'
},
formatter: this.axisTooltip,
borderWidth: 1
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: [],
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
formatter: this.xAxisLableFormat,
textStyle: {
color: '#333'
}
},
axisPointer: {
snap: true,
label: {
formatter: this.xAxisPointFormat,
backgroundColor: 'rgb(255,0,0,0.5)',
color: 'white'
}
}
}
],
yAxis: {
type: 'value',
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
interval: 'auto',
formatter: this.yAxisLableFormat
},
axisPointer: {
xAxisIndex: 'all',
label: {
formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white'
}
},
min: 0,
max: 0
},
series: [],
dataZoom: [
{
type: 'inside'
},
{
fiterMode: 'filter',
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
handleStyle: {
color: '#fff',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.6)',
shadowOffsetX: 2,
shadowOffsetY: 2
},
bottom: '20px'
}
]
},
absoluteTime: 2 * 3600,
indexKmRangeMap: {}
};
},
computed: {
...mapGetters('runPlan', [
'stations'
])
},
watch: {
maxWidth() {
this.setPosition();
},
maxHeight() {
this.setPosition();
},
'$store.state.runPlan.planLoadedCount': async function () {
await this.loadChartPage();
},
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
'$store.state.runPlan.selected.serviceNumber': function (val) {
const index = this.serviceNumberConfig.data.findIndex(elem => {
return elem.serviceNumber == val;
});
name: 'PlanSchedule',
components: {
DataTable
},
props: {
group: {
type: String,
required: true
},
skinCode: {
type: String,
required: true
},
maxWidth: {
type: Number,
require: true
},
maxHeight: {
type: Number,
required: true
}
},
data() {
return {
top: 0,
height: 0,
heights: [100, 100],
runPlanId: 'plan-schedule-id',
myChart: null,
PlanConvert: {},
serviceNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.serviceNumberChange,
showClose: false,
columns: [
{
prop: 'serviceNumber',
label: '表号'
},
{
width: 40
}
]
},
tripNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.tripNumberChange,
showClose: false,
columns: [
{
prop: 'tripNumber',
label: '车次号'
},
{
width: 40
}
]
},
realData: {},
kmRangeCoordMap: {},
option: {
title: {
text: '',
left: 'center'
},
grid: {
top: '30px',
left: '120px',
right: '40px',
bottom: '65px',
containLabel: true,
backgroundColor: 'floralwhite'
},
toolbox: {
right: '30px',
feature: {
dataZoom: {
yAxisIndex: 'none'
},
restore: {},
saveAsImage: {}
}
},
tooltip: {
axisPointer: {
trigger: 'item',
type: 'cross'
},
formatter: this.axisTooltip,
borderWidth: 1
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: [],
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
formatter: this.xAxisLableFormat,
textStyle: {
color: '#333'
}
},
axisPointer: {
snap: true,
label: {
formatter: this.xAxisPointFormat,
backgroundColor: 'rgb(255,0,0,0.5)',
color: 'white'
}
}
}
],
yAxis: {
type: 'value',
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
interval: 'auto',
formatter: this.yAxisLableFormat
},
axisPointer: {
xAxisIndex: 'all',
label: {
formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white'
}
},
min: 0,
max: 0
},
series: [],
dataZoom: [
{
type: 'inside'
},
{
fiterMode: 'filter',
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
handleStyle: {
color: '#fff',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.6)',
shadowOffsetX: 2,
shadowOffsetY: 2
},
bottom: '20px'
}
]
},
absoluteTime: 2 * 3600,
indexKmRangeMap: {}
};
},
computed: {
...mapGetters('runPlan', [
'stations'
])
},
watch: {
maxWidth() {
this.setPosition();
},
maxHeight() {
this.setPosition();
},
'$store.state.runPlan.planLoadedCount': async function () {
await this.loadChartPage();
},
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
'$store.state.runPlan.selected.serviceNumber': function (val) {
const index = this.serviceNumberConfig.data.findIndex(elem => {
return elem.serviceNumber == val;
});
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
},
'$store.state.runPlan.selected.tripNumber': function (val) {
const index = this.tripNumberConfig.data.findIndex(elem => {
return elem.tripNumber == val;
});
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
}
},
mounted() {
this.PlanConvert = this.$theme.loadPlanConvert(this.skinCode);
},
beforeDestroy() {
this.destroy();
},
methods: {
serviceNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
if (serviceObj) {
this.analyticalTripNumber(serviceObj.trainMap);
}
}
},
tripNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
}
},
async analyticalServiceNumber(data) {
this.serviceNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(serviceNumber => { return { serviceNumber }; });
},
async analyticalTripNumber(data) {
this.tripNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(tripNumber => { return { tripNumber }; });
},
async setPosition() {
this.$nextTick(() => {
let top = 3;
const width = this.maxWidth * 0.85;
let height = this.maxHeight;
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
},
'$store.state.runPlan.selected.tripNumber': function (val) {
const index = this.tripNumberConfig.data.findIndex(elem => {
return elem.tripNumber == val;
});
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
}
},
mounted() {
this.PlanConvert = this.$theme.loadPlanConvert(this.skinCode);
},
beforeDestroy() {
this.destroy();
},
methods: {
serviceNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
if (serviceObj) {
this.analyticalTripNumber(serviceObj.trainMap);
}
}
},
tripNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
}
},
async analyticalServiceNumber(data) {
this.serviceNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(serviceNumber => { return { serviceNumber }; });
},
async analyticalTripNumber(data) {
this.tripNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(tripNumber => { return { tripNumber }; });
},
async setPosition() {
this.$nextTick(() => {
let top = 3;
const width = this.maxWidth * 0.85;
let height = this.maxHeight;
const titleBar = document.getElementById('PlanTitleBar');
const menuBar = document.getElementById('PlanMenuBar');
const menuTool = document.getElementById('PlanMenuTool');
const statusBar = document.getElementById('PlanStatusBar');
const titleBar = document.getElementById('PlanTitleBar');
const menuBar = document.getElementById('PlanMenuBar');
const menuTool = document.getElementById('PlanMenuTool');
const statusBar = document.getElementById('PlanStatusBar');
if (titleBar) {
top += (titleBar.offsetHeight || 0);
}
if (titleBar) {
top += (titleBar.offsetHeight || 0);
}
if (menuBar) {
top += (menuBar.offsetHeight || 0);
}
if (menuBar) {
top += (menuBar.offsetHeight || 0);
}
if (menuTool) {
top += (menuTool.offsetHeight || 0);
}
if (menuTool) {
top += (menuTool.offsetHeight || 0);
}
if (statusBar) {
height -= (statusBar.offsetHeight || 0);
}
if (statusBar) {
height -= (statusBar.offsetHeight || 0);
}
height = height - top;
this.$store.dispatch('runPlan/resize', { width, height });
height = height - top;
this.$store.dispatch('runPlan/resize', { width, height });
if (this.top != top) {
this.top = top;
}
if (this.top != top) {
this.top = top;
}
if (this.height != height) {
this.height = height - 20 * 2;
}
});
},
async loadChartPage() {
try {
let series = [];
const stations = this.$store.state.runPlan.stations;
const planData = this.$store.state.runPlan.planData;
if (this.height != height) {
this.height = height - 20 * 2;
}
});
},
async loadChartPage() {
try {
let series = [];
const stations = this.$store.state.runPlan.stations;
const planData = this.$store.state.runPlan.planData;
this.viewDisabled = true;
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
series = this.pushModels(series, [this.PlanConvert.initializeYaxis(stations)]);
series = this.pushModels(series, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { color: '#000', width: 0.5 }));
await this.loadInitData(series);
await this.analyticalServiceNumber(this.$store.state.runPlan.editData);
this.viewDisabled = false;
this.viewDisabled = true;
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
series = this.pushModels(series, [this.PlanConvert.initializeYaxis(stations)]);
series = this.pushModels(series, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { color: '#000', width: 0.5 }));
await this.loadInitData(series);
await this.analyticalServiceNumber(this.$store.state.runPlan.editData);
this.viewDisabled = false;
} catch (error) {
this.viewDisabled = false;
this.$messageBox(`加载运行图数据失败`);
}
},
async loadInitData(series) {
this.myChart && this.myChart.showLoading();
await this.xAxisInit();
await this.yAxisInit();
await this.loadInitChart(series);
this.myChart && this.myChart.hideLoading();
},
pushModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
if (elem) {
series.push(elem);
}
});
}
} catch (error) {
this.viewDisabled = false;
this.$messageBox(`加载运行图数据失败`);
}
},
async loadInitData(series) {
this.myChart && this.myChart.showLoading();
await this.xAxisInit();
await this.yAxisInit();
await this.loadInitChart(series);
this.myChart && this.myChart.hideLoading();
},
pushModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
if (elem) {
series.push(elem);
}
});
}
return series;
},
popModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
const index = series.indexOf(elem);
if (index >= 0) {
series.split(index, 1);
}
});
}
return series;
},
popModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
const index = series.indexOf(elem);
if (index >= 0) {
series.split(index, 1);
}
});
}
return series;
},
loadInitChart(series) {
return new Promise((resolve, reject) => {
try {
const that = this;
// echart
require.config(
{
paths: {
echarts: './js/dist'
}
}
);
//
require(
[
'echarts',
'echarts/lib/chart/line'
],
function (ec) {
that.destroy();
return series;
},
loadInitChart(series) {
return new Promise((resolve, reject) => {
try {
const that = this;
// echart
require.config(
{
paths: {
echarts: './js/dist'
}
}
);
//
require(
[
'echarts',
'echarts/lib/chart/line'
],
function (ec) {
that.destroy();
let startValue = 3600 + that.PlanConvert.TranslationTime;
const offsetTime = 3600;
let startValue = 3600 + that.PlanConvert.TranslationTime;
const offsetTime = 3600;
runDiagramGetTime(that.group).then(resp => {
startValue = resp.data - that.PlanConvert.TranslationTime;
that.option.dataZoom[0].startValue = that.option.dataZoom[1].startValue = startValue - offsetTime;
that.option.dataZoom[0].endValue = that.option.dataZoom[1].endValue = startValue + offsetTime;
that.option.series = series;
that.myChart = ec.init(document.getElementById(that.runPlanId));
if (that.myChart) {
that.myChart.setOption(that.option);
that.reSize({ width: that.$store.state.runPlan.width, height: that.$store.state.runPlan.height });
that.myChart.on('click', that.mouseClick);
}
});
resolve(true);
}
);
} catch (error) {
reject(error);
}
});
},
xAxisPointFormat(params) {
return timeFormat(params.value);
},
yAxisPointFormat(params) {
return this.PlanConvert.computedFormatYAxis(this.stations, params);
},
xAxisLableFormat(value, index) {
if (value % 60 === 0) {
return timeFormat(value);
}
},
yAxisLableFormat(value, index) {
return '';
},
xAxisInit() {
const list = [];
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
list.push(time);
}
runDiagramGetTime(that.group).then(resp => {
startValue = resp.data - that.PlanConvert.TranslationTime;
that.option.dataZoom[0].startValue = that.option.dataZoom[1].startValue = startValue - offsetTime;
that.option.dataZoom[0].endValue = that.option.dataZoom[1].endValue = startValue + offsetTime;
that.option.series = series;
that.myChart = ec.init(document.getElementById(that.runPlanId));
if (that.myChart) {
that.myChart.setOption(that.option);
that.reSize({ width: that.$store.state.runPlan.width, height: that.$store.state.runPlan.height });
that.myChart.on('click', that.mouseClick);
}
});
resolve(true);
}
);
} catch (error) {
reject(error);
}
});
},
xAxisPointFormat(params) {
return timeFormat(params.value);
},
yAxisPointFormat(params) {
return this.PlanConvert.computedFormatYAxis(this.stations, params);
},
xAxisLableFormat(value, index) {
if (value % 60 === 0) {
return timeFormat(value);
}
},
yAxisLableFormat(value, index) {
return '';
},
xAxisInit() {
const list = [];
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
list.push(time);
}
const startValue = 3600 * 6;
const offsetTime = 3600 * 1;
const startValue = 3600 * 6;
const offsetTime = 3600 * 1;
this.option.xAxis[0].data = list;
if (!this.option.dataZoom[0].startValue) {
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
}
this.option.xAxis[0].data = list;
if (!this.option.dataZoom[0].startValue) {
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
}
if (!this.option.dataZoom[0].endValue) {
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
}
},
yAxisInit() {
if (Object.keys(this.PlanConvert).length) {
this.option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
this.option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
}
},
axisTooltip(param) {
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
].join('');
},
mouseClick(params) {
const model = {
serviceNumber: params.seriesName
};
this.$store.dispatch('runPlan/setSelected', model);
},
reSize(opt) {
if (this.myChart) {
this.myChart.resize({
width: opt.width,
height: opt.height,
silent: false
});
}
},
destroy() {
if (this.myChart && this.myChart.isDisposed) {
this.myChart.dispose();
this.myChart = null;
}
},
scheduleTouch() {
if (!this.option.dataZoom[0].endValue) {
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
}
},
yAxisInit() {
if (Object.keys(this.PlanConvert).length) {
this.option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
this.option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
}
},
axisTooltip(param) {
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
].join('');
},
mouseClick(params) {
const model = {
serviceNumber: params.seriesName
};
this.$store.dispatch('runPlan/setSelected', model);
},
reSize(opt) {
if (this.myChart) {
this.myChart.resize({
width: opt.width,
height: opt.height,
silent: false
});
}
},
destroy() {
if (this.myChart && this.myChart.isDisposed) {
this.myChart.dispose();
this.myChart = null;
}
},
scheduleTouch() {
},
trainNumTouch() {
},
trainNumTouch() {
}
}
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>

View File

@ -21,7 +21,7 @@
import { runPlanTemplateList } from '@/api/runplan';
import { getStationList } from '@/api/runplan';
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import { listPublishMap, getPublishMapInfo } from '@/api/jmap/map';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'ReloadTodayPlan',
@ -29,7 +29,6 @@ export default {
return {
dialogShow: false,
loading: false,
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
@ -52,15 +51,6 @@ export default {
{
title: this.$t('menu.runGraphName'),
prop: 'name'
},
{
title: this.$t('menu.mapName'),
prop: 'mapId',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.mapId, this.mapList, ['id', 'name']);
},
tagType: (row) => { return 'success'; }
}
]
},
@ -74,16 +64,9 @@ export default {
}
},
methods: {
loadInitData() {
this.mapList = [];
listPublishMap().then(response => {
this.mapList = response.data;
});
},
doShow() {
this.loading = false;
this.dialogShow = true;
this.loadInitData();
},
doClose() {
this.dialogShow = false;

View File

@ -29,65 +29,65 @@ import DeleteTask from '../menusPlan/deleteTask';
import ModifyingTask from '../menusPlan/modifyingTask';
export default {
name: 'Menus',
components: {
TitleBar,
MenuBar,
StatusBar,
Schedule,
ManagePlanList,
CreateWeekPlan,
CreateTodayPlan,
ModifyingPlan,
AddTask,
DeleteTask,
ModifyingTask
},
props: {
group: {
type: String,
required: true
}
},
data() {
return {
};
},
computed: {
skinCode() {
return this.$route.query.skinCode || '02';
},
width() {
return this.$store.state.app.width;
},
height() {
return this.$store.state.app.height;
}
},
methods: {
setPosition() {
this.$nextTick(() => {
this.$refs.schedule.setPosition();
});
},
dispatchDialog(dialogObj) {
this.$nextTick(() => {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].doShow(dialogObj.params);
}
});
},
reloadTable(dialogObj) {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].reloadTable();
}
},
confirm(params) {
},
back() {
this.$emit('back');
}
}
name: 'Menus',
components: {
TitleBar,
MenuBar,
StatusBar,
Schedule,
ManagePlanList,
CreateWeekPlan,
CreateTodayPlan,
ModifyingPlan,
AddTask,
DeleteTask,
ModifyingTask
},
props: {
group: {
type: String,
required: true
}
},
data() {
return {
};
},
computed: {
skinCode() {
return this.$route.query.skinCode || '02';
},
width() {
return this.$store.state.app.width;
},
height() {
return this.$store.state.app.height;
}
},
methods: {
setPosition() {
this.$nextTick(() => {
this.$refs.schedule.setPosition();
});
},
dispatchDialog(dialogObj) {
this.$nextTick(() => {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].doShow(dialogObj.params);
}
});
},
reloadTable(dialogObj) {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].reloadTable();
}
},
confirm(params) {
},
back() {
this.$emit('back');
}
}
};
</script>

View File

@ -136,7 +136,7 @@ export default {
runPlanPreview(index, row) {
previewRunPlan(row.id).then(resp => {
const query = {
skinCode: row.skinCode, prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id, from:''
prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id, from:''
};
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
launchFullscreen();

View File

@ -135,9 +135,9 @@ export default {
this.$refs.applyReject.doShow(row);
},
scriptPreview(index, row) {
const mapInfo = this.allMapList.find(elem=>{ return elem.id == row.mapId; });
// const mapInfo = this.allMapList.find(elem=>{ return elem.id == row.mapId; });
scriptDraftRecordNotify(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, skinCode:mapInfo.skinCode, try:0};
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0};
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
launchFullscreen();
}).catch(error => {

View File

@ -11,7 +11,7 @@
<el-table-column prop="startTime" :label="`${$t('permission.startTime')}`" />
<el-table-column prop="endTime" :label="`${$t('permission.endTime')}`">
<template slot-scope="scope">
<span>{{ scope.row.endTime? scope.row.endTime: '永久' }}</span>
<span>{{ scope.row.endTime? scope.row.endTime: $t('global.perpetual') }}</span>
</template>
</el-table-column>
<el-table-column prop="amount" :label="$t('global.total')" />

View File

@ -55,144 +55,144 @@ import { commitOrder } from '@/api/management/order';
import { PermissionType } from '@/scripts/ConstDic';
export default {
name: 'CommitDraft',
props: {
orderData: {
type: Object,
required: true
},
systemName: {
type: String,
required: true
}
},
data() {
return {
disabled: true,
choose: this.$t('global.january'),
chooseList: [
{ label: this.$t('global.january'), value: 1 },
{ label: this.$t('global.march'), value: 3 },
{ label: this.$t('global.year'), value: 12 },
{ label: this.$t('global.twoYears'), value: 24 },
{ label: this.$t('global.fiveYears'), value: 60 },
{ label: this.$t('global.tenYears'), value: 120 }
],
saleModel: {
goodsId: '',
name: '',
price: 0,
months: 1,
total: 1
}
};
},
computed: {
sumPrice() {
return this.saleModel.price * this.saleModel.months * this.saleModel.total || 0;
},
nameTitle() {
if (this.$route.query.permissionType == PermissionType.EXAM ||
name: 'CommitDraft',
props: {
orderData: {
type: Object,
required: true
},
systemName: {
type: String,
required: true
}
},
data() {
return {
disabled: true,
choose: this.$t('global.january'),
chooseList: [
{ label: this.$t('global.january'), value: 1 },
{ label: this.$t('global.march'), value: 3 },
{ label: this.$t('global.year'), value: 12 },
{ label: this.$t('global.twoYears'), value: 24 },
{ label: this.$t('global.fiveYears'), value: 60 },
{ label: this.$t('global.tenYears'), value: 120 }
],
saleModel: {
goodsId: '',
name: '',
price: 0,
months: 1,
total: 1
}
};
},
computed: {
sumPrice() {
return this.saleModel.price * this.saleModel.months * this.saleModel.total || 0;
},
nameTitle() {
if (this.$route.query.permissionType == PermissionType.EXAM ||
this.$route.query.permissionType == PermissionType.LESSON) {
return this.$t('global.courseName');
} else if (this.$route.query.permissionType == PermissionType.SCREEN) {
return this.$t('global.screenName');
} else {
return this.$t('global.productName');
}
},
priceTitle() {
switch (this.$route.query.permissionType) {
case PermissionType.LESSON: return this.$t('global.coursePrice');
case PermissionType.EXAM: return this.$t('global.testPrice');
case PermissionType.SIMULATION: return this.$t('global.simulationPrice');
case PermissionType.SCREEN: return this.$t('global.timeUnitPrice');
}
return '';
},
rules() {
return {
'name': [
{ required: true, message: this.$t('rules.courseNameEmpty'), trigger: 'blur' }
],
'months': [
{ required: true, message: this.$t('rules.purchaseMonth'), trigger: 'blur' },
{
validator(rule, value, callback) {
if (Number.isInteger(Number(value)) && Number(value) >= 0) {
callback();
} else {
callback(new Error(this.$t('tip.purchaseMonth')));
}
},
trigger: 'blur'
}
],
'total': [
{ required: true, message: this.$t('rules.accessNumber'), trigger: 'blur' },
{
validator(rule, value, callback) {
if (Number.isInteger(Number(value)) && Number(value) >= 0) {
callback();
} else {
callback(new Error(this.$t('tip.permissionsNumber')));
}
},
trigger: 'blur'
}
]
};
}
},
watch: {
orderData: function (val) {
if (val) {
this.saleModel.price = val.price;
this.saleModel.goodsId = val.id;
this.saleModel.name = val.name;
// if (this.$route.query.permissionType == PermissionType.LESSON ||
// this.$route.query.permissionType == PermissionType.EXAM) {
// this.saleModel.name = val.name;
// } else if (this.$route.query.permissionType == PermissionType.SCREEN) {
// this.saleModel.name = val.name;
// } else {
// this.saleModel.name = val.prdName;
// }
}
}
},
methods: {
//
chooseEvent(label) {
this.disabled = label !== this.$t('global.custom');
this.chooseList.forEach(elem => {
if (label === elem.label) {
this.saleModel.months = elem.value;
}
});
},
//
commit() {
this.$refs.make.validate((valid) => {
if (valid) {
const model = {
goodsId: this.saleModel.goodsId,
price: this.saleModel.price,
monthAmount: this.saleModel.months,
amount: this.saleModel.total,
permissionType: this.$route.query.permissionType
};
commitOrder(model).then(response => {
this.$emit('commit', response.data);
}).catch(() => {
this.$messageBox(this.$t('tip.failedSubmitOrder'));
});
}
});
},
back() {
history.go(-1);
}
}
return this.$t('global.courseName');
} else if (this.$route.query.permissionType == PermissionType.SCREEN) {
return this.$t('global.screenName');
} else {
return this.$t('global.productName');
}
},
priceTitle() {
switch (this.$route.query.permissionType) {
case PermissionType.LESSON: return this.$t('global.coursePrice');
case PermissionType.EXAM: return this.$t('global.testPrice');
case PermissionType.SIMULATION: return this.$t('global.simulationPrice');
case PermissionType.SCREEN: return this.$t('global.timeUnitPrice');
}
return '';
},
rules() {
return {
'name': [
{ required: true, message: this.$t('rules.courseNameEmpty'), trigger: 'blur' }
],
'months': [
{ required: true, message: this.$t('rules.purchaseMonth'), trigger: 'blur' },
{
validator(rule, value, callback) {
if (Number.isInteger(Number(value)) && Number(value) >= 0) {
callback();
} else {
callback(new Error(this.$t('tip.purchaseMonth')));
}
},
trigger: 'blur'
}
],
'total': [
{ required: true, message: this.$t('rules.accessNumber'), trigger: 'blur' },
{
validator(rule, value, callback) {
if (Number.isInteger(Number(value)) && Number(value) >= 0) {
callback();
} else {
callback(new Error(this.$t('tip.permissionsNumber')));
}
},
trigger: 'blur'
}
]
};
}
},
watch: {
orderData: function (val) {
if (val) {
this.saleModel.price = val.price;
this.saleModel.goodsId = val.id;
this.saleModel.name = val.name;
// if (this.$route.query.permissionType == PermissionType.LESSON ||
// this.$route.query.permissionType == PermissionType.EXAM) {
// this.saleModel.name = val.name;
// } else if (this.$route.query.permissionType == PermissionType.SCREEN) {
// this.saleModel.name = val.name;
// } else {
// this.saleModel.name = val.prdName;
// }
}
}
},
methods: {
//
chooseEvent(label) {
this.disabled = label !== this.$t('global.custom');
this.chooseList.forEach(elem => {
if (label === elem.label) {
this.saleModel.months = elem.value;
}
});
},
//
commit() {
this.$refs.make.validate((valid) => {
if (valid) {
const model = {
goodsId: this.saleModel.goodsId,
price: this.saleModel.price,
monthAmount: this.saleModel.months,
amount: this.saleModel.total,
permissionType: this.$route.query.permissionType
};
commitOrder(model).then(response => {
this.$emit('commit', response.data);
}).catch(() => {
this.$messageBox(this.$t('tip.failedSubmitOrder'));
});
}
});
},
back() {
history.go(-1);
}
}
};
</script>

View File

@ -117,184 +117,184 @@ import img_alipay_logo from '@/assets/pay_images/AliPayLogo.png';
import img_alipay_logo_info from '@/assets/pay_images/AliPayLogoInfo.png';
export default {
name: 'ConfirmDraft',
components: {
QrcodeVue
},
props: {
order: {
type: Object,
required: true
},
orderData: {
type: Object,
required: true
},
systemName: {
type: String,
required: true
}
},
data() {
return {
active: '02',
stomp: null,
loadings: [true, true],
WePayUrl: '',
AlipayForm: '',
cancalOk: false,
rotateIndex: 0,
payTypeEnum: {
WePay: '02',
Alipay: '03'
},
images: {
img_wepay_logo,
img_wepay_logo_info,
img_alipay_logo,
img_alipay_logo_info
},
saleModel: {
name: '',
price: 0,
monthAmount: 0,
amount: 0,
orderCode: '',
createTime: '',
sumPrice: 0
}
};
},
computed: {
nameTitle() {
if (this.$route.query.permissionType == PermissionType.EXAM ||
name: 'ConfirmDraft',
components: {
QrcodeVue
},
props: {
order: {
type: Object,
required: true
},
orderData: {
type: Object,
required: true
},
systemName: {
type: String,
required: true
}
},
data() {
return {
active: '02',
stomp: null,
loadings: [true, true],
WePayUrl: '',
AlipayForm: '',
cancalOk: false,
rotateIndex: 0,
payTypeEnum: {
WePay: '02',
Alipay: '03'
},
images: {
img_wepay_logo,
img_wepay_logo_info,
img_alipay_logo,
img_alipay_logo_info
},
saleModel: {
name: '',
price: 0,
monthAmount: 0,
amount: 0,
orderCode: '',
createTime: '',
sumPrice: 0
}
};
},
computed: {
nameTitle() {
if (this.$route.query.permissionType == PermissionType.EXAM ||
this.$route.query.permissionType == PermissionType.LESSON) {
return this.$t('global.courseName');
} else if (this.$route.query.permissionType == PermissionType.SCREEN) {
return this.$t('global.screenName');
} else {
return this.$t('global.productName');
}
},
priceTitle() {
switch (this.$route.query.permissionType) {
case PermissionType.LESSON: return this.$t('global.coursePrice');
case PermissionType.EXAM: return this.$t('global.testPrice');
case PermissionType.SIMULATION: return this.$t('global.simulationPrice');
case PermissionType.SCREEN: return this.$t('global.timeUnitPrice');
}
return '';
}
},
watch: {
order: function (val) {
if (val) {
this.saleModel.goodsId = val.goodsId;
this.saleModel.amount = val.amount;
this.saleModel.monthAmount = val.monthAmount;
this.saleModel.orderCode = val.code;
this.saleModel.createTime = val.createTime;
const model = {
goodsId: this.saleModel.goodsId,
monthAmount: this.saleModel.monthAmount,
amount: this.saleModel.amount,
permissionType: this.$route.query.permissionType
};
calcuteOrderSumPrice(model).then(response => {
this.saleModel.sumPrice = response.data;
this.loadPayQtCode();
}).catch(() => {
this.$messageBox(this.$t('tip.totalAmount'));
});
}
},
orderData: function (val) {
this.saleModel.price = val.price;
this.saleModel.name = val.name;
// if (this.$route.query.permissionType == PermissionType.LESSON ||
return this.$t('global.courseName');
} else if (this.$route.query.permissionType == PermissionType.SCREEN) {
return this.$t('global.screenName');
} else {
return this.$t('global.productName');
}
},
priceTitle() {
switch (this.$route.query.permissionType) {
case PermissionType.LESSON: return this.$t('global.coursePrice');
case PermissionType.EXAM: return this.$t('global.testPrice');
case PermissionType.SIMULATION: return this.$t('global.simulationPrice');
case PermissionType.SCREEN: return this.$t('global.timeUnitPrice');
}
return '';
}
},
watch: {
order: function (val) {
if (val) {
this.saleModel.goodsId = val.goodsId;
this.saleModel.amount = val.amount;
this.saleModel.monthAmount = val.monthAmount;
this.saleModel.orderCode = val.code;
this.saleModel.createTime = val.createTime;
const model = {
goodsId: this.saleModel.goodsId,
monthAmount: this.saleModel.monthAmount,
amount: this.saleModel.amount,
permissionType: this.$route.query.permissionType
};
calcuteOrderSumPrice(model).then(response => {
this.saleModel.sumPrice = response.data;
this.loadPayQtCode();
}).catch(() => {
this.$messageBox(this.$t('tip.totalAmount'));
});
}
},
orderData: function (val) {
this.saleModel.price = val.price;
this.saleModel.name = val.name;
// if (this.$route.query.permissionType == PermissionType.LESSON ||
// this.$route.query.permissionType == PermissionType.EXAM) {
// this.saleModel.name = val.lessonName;
// } else if (this.$route.query.permissionType == PermissionType.SCREEN) {
// this.saleModel.name = val.name;
// } else {
// this.saleModel.name = val.prdName;
// }
},
'$store.state.socket.payStatus': function (val) { // 仿
if (val) {
this.handlePayStatus(val);
}
}
},
methods: {
//
loadPayQtCode() {
if (this.order && this.order.id) {
//
this.loadWePayQtCode();
//
this.loadAliPayQtCode();
}
},
rotateRefresh() {
this.$refs.rotateA.style[`transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateA.style[`-webkit-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateA.style[`-moz-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateA.style[`-o-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateA.style[`-ms-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateB.style[`transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateB.style[`-webkit-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateB.style[`-moz-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateB.style[`-o-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateB.style[`-ms-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.rotateIndex = this.rotateIndex + 1;
},
//
loadWePayQtCode() {
//
this.rotateRefresh();
// this.saleModel.name = val.lessonName;
// } else if (this.$route.query.permissionType == PermissionType.SCREEN) {
// this.saleModel.name = val.name;
// } else {
// this.saleModel.name = val.prdName;
// }
},
'$store.state.socket.payStatus': function (val) { // 仿
if (val) {
this.handlePayStatus(val);
}
}
},
methods: {
//
loadPayQtCode() {
if (this.order && this.order.id) {
//
this.loadWePayQtCode();
//
this.loadAliPayQtCode();
}
},
rotateRefresh() {
this.$refs.rotateA.style[`transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateA.style[`-webkit-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateA.style[`-moz-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateA.style[`-o-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateA.style[`-ms-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateB.style[`transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateB.style[`-webkit-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateB.style[`-moz-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateB.style[`-o-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.$refs.rotateB.style[`-ms-transform`] = `rotate(${this.rotateIndex * 180}deg)`;
this.rotateIndex = this.rotateIndex + 1;
},
//
loadWePayQtCode() {
//
this.rotateRefresh();
//
this.loadings[0] = true;
confirmOrder({ type: this.payTypeEnum.WePay, orderId: this.order.id }).then(response => {
this.WePayUrl = response.data;
this.loadings[0] = false;
}).catch(() => {
this.$messageBox(this.$t('tip.wxCodePayFailde'));
this.loadings[0] = false;
});
},
//
loadAliPayQtCode() {
//
this.rotateRefresh();
//
this.loadings[0] = true;
confirmOrder({ type: this.payTypeEnum.WePay, orderId: this.order.id }).then(response => {
this.WePayUrl = response.data;
this.loadings[0] = false;
}).catch(() => {
this.$messageBox(this.$t('tip.wxCodePayFailde'));
this.loadings[0] = false;
});
},
//
loadAliPayQtCode() {
//
this.rotateRefresh();
//
this.loadings[1] = true;
confirmOrder({ type: this.payTypeEnum.Alipay, orderId: this.order.id }).then(response => {
this.AlipayForm = response.data;
this.loadings[1] = false;
}).catch(() => {
this.$messageBox(this.$t('tip.aliCodePayFailde'));
this.loadings[1] = false;
});
},
//
handlePayStatus(order) {
//
order.code === this.order.code && this.$emit('confirm', order.status);
},
//
cancal() {
cancalOrder(this.order.id).then(response => {
this.cancalOk = true;
this.$emit('confirm', '03');
}).catch(() => {
this.cancalOk = false;
this.$messageBox(this.$t('tip.cancelOrderFailed'));
});
}
}
//
this.loadings[1] = true;
confirmOrder({ type: this.payTypeEnum.Alipay, orderId: this.order.id }).then(response => {
this.AlipayForm = response.data;
this.loadings[1] = false;
}).catch(() => {
this.$messageBox(this.$t('tip.aliCodePayFailde'));
this.loadings[1] = false;
});
},
//
handlePayStatus(order) {
//
order.code === this.order.code && this.$emit('confirm', order.status);
},
//
cancal() {
cancalOrder(this.order.id).then(response => {
this.cancalOk = true;
this.$emit('confirm', '03');
}).catch(() => {
this.cancalOk = false;
this.$messageBox(this.$t('tip.cancelOrderFailed'));
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -105,7 +105,7 @@ export default {
launchFullscreen();
await putJointTrainingSimulationEntrance(this.group);
const rest = await getPublishMapInfo(this.mapId);
const query = { skinCode: rest.data.lineCode, mapId: this.mapId, group: this.group, subSystem: this.$route.query.subSystem };
const query = { lineCode: rest.data.lineCode, mapId: this.mapId, group: this.group, subSystem: this.$route.query.subSystem };
this.$router.push({ path: `/jointTraining`, query: query });
} else if (this.state == '01') {
const query = { group: this.group };

View File

@ -59,7 +59,7 @@ export default {
launchFullscreen();
await putJointTrainingSimulationEntrance(this.group);
const rest = await getPublishMapInfo(this.mapId);
const query = { skinCode: rest.data.lineCode, mapId: this.mapId, group: this.group };
const query = { lineCode: rest.data.lineCode, mapId: this.mapId, group: this.group };
this.$router.push({ path: `/jointTraining`, query: query });
} else if (this.state == '01') {
const query = { group: this.group };

View File

@ -54,7 +54,7 @@ export default {
id: '',
name: '',
mapId: '',
skinCode: '',
lineCode: '',
remarks: '',
prdType: '',
prdId: '',
@ -105,7 +105,7 @@ export default {
id: resp.data.mapPrd.id,
name: resp.data.mapPrd.name,
mapId: this.mapId,
skinCode: resp.data.mapPrd.skinCode,
lineCode: resp.data.mapPrd.lineCode,
remarks: resp.data.mapPrd.remarks,
prdType: resp.data.mapPrd.prdType,
prdId: resp.data.mapPrd.id,
@ -158,7 +158,7 @@ export default {
},
async joinRoom() {
await getjointTraining(this.jointGroup);
const query = { skinCode: this.courseModel.skinCode, group: this.jointGroup, subSystem: this.$route.params.subSystem};
const query = { lineCode: this.courseModel.lineCode, group: this.jointGroup, subSystem: this.$route.params.subSystem};
this.$router.push({ path: `/trainroom`, query: query });
},
async createRoom() {
@ -170,7 +170,7 @@ export default {
};
const res = await postCreateRoom(param);
if (res && res.code == 200) {
const query = { skinCode: this.courseModel.skinCode, group: res.data, subSystem: this.$route.params.subSystem };
const query = { lineCode: this.courseModel.lineCode, group: res.data, subSystem: this.$route.params.subSystem };
this.$router.push({ path: `/trainroom`, query: query });
}
} catch (error) {
@ -214,7 +214,7 @@ export default {
this.buttonLoading = true;
const data = { mapId: this.courseModel.mapId, prdId: this.currentPrdId };
schedulingNotify(data).then(resp => {
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
launchFullscreen();
}).catch(error => {
@ -226,7 +226,7 @@ export default {
const data = { mapId: this.courseModel.mapId, mapPrdId: this.currentPrdId };
this.buttonLoading = true;
simulationNotify(data).then(resp => {
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
launchFullscreen();
}).catch(error => {

View File

@ -1,6 +1,6 @@
<template>
<div class="app-wrapper">
<map-create ref="mapCreate" :skin-code="skinCode" @refresh="refresh1" />
<map-create ref="mapCreate" :line-code="lineCode" @refresh="refresh1" />
<div v-show="listShow" class="examList" :style="{width: widthLeft+'px'}">
<demon-list ref="demonList" :width="widthLeft" @createMap="createMap" />
</div>
@ -32,7 +32,7 @@ export default {
listShow: true,
widthLeft: Number(localStore.get('LeftWidth')) || 450,
productList: [],
skinCode: ''
lineCode: ''
};
},
computed: {

View File

@ -22,134 +22,134 @@ import { FaultStatusEnum } from '@/scripts/FaultDic';
import ModelType from '@/jmap/constant/deviceType';
export default {
name: 'FaultChoose',
props: {
group: {
type: String,
required: true
}
},
data() {
return {
dialogShow: false,
loading: false,
deviceMap: {},
auto: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '80px',
queryObject: {
condition: {
type: 'text',
label: this.$t('display.faultChoose.settingCondition')
}
}
},
queryList: {
query: null,
selectCheckShow: false,
radioShow: true,
columns: [
{
title: this.$t('display.faultChoose.settingCondition'),
prop: 'condition'
},
{
title: this.$t('display.faultChoose.triggerTarget'),
prop: 'target'
}
]
}
};
},
computed: {
title() {
return this.$t('display.faultChoose.selectFault');
},
skinCode() {
return this.$route.query.skinCode;
}
},
mounted() {
this.$Dictionary.physicalViewType().then(list => {
this.deviceMap = [];
list.forEach(elem => {
this.deviceMap[elem.code] = elem.name;
});
});
},
methods: {
formatNameByCode(code) {
let name = '';
const device = this.$store.getters['map/getDeviceByCode'](code);
if (device) {
switch (device._type) {
case ModelType.Signal:
case ModelType.Switch:
case ModelType.Station:
case ModelType.Section: {
name += device.name;
break;
}
}
if (device.stationCode) {
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
if (station) {
name += '【' + station.name + '】';
}
}
}
name: 'FaultChoose',
props: {
group: {
type: String,
required: true
}
},
data() {
return {
dialogShow: false,
loading: false,
deviceMap: {},
auto: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '80px',
queryObject: {
condition: {
type: 'text',
label: this.$t('display.faultChoose.settingCondition')
}
}
},
queryList: {
query: null,
selectCheckShow: false,
radioShow: true,
columns: [
{
title: this.$t('display.faultChoose.settingCondition'),
prop: 'condition'
},
{
title: this.$t('display.faultChoose.triggerTarget'),
prop: 'target'
}
]
}
};
},
computed: {
title() {
return this.$t('display.faultChoose.selectFault');
},
skinCode() {
return this.$route.query.skinCode;
}
},
mounted() {
this.$Dictionary.physicalViewType().then(list => {
this.deviceMap = [];
list.forEach(elem => {
this.deviceMap[elem.code] = elem.name;
});
});
},
methods: {
formatNameByCode(code) {
let name = '';
const device = this.$store.getters['map/getDeviceByCode'](code);
if (device) {
switch (device._type) {
case ModelType.Signal:
case ModelType.Switch:
case ModelType.Station:
case ModelType.Section: {
name += device.name;
break;
}
}
if (device.stationCode) {
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
if (station) {
name += '【' + station.name + '】';
}
}
}
return name;
},
doShow() {
this.dialogShow = true;
this.queryList.data = [];
getFailureGenerateRules({ skin: this.skinCode, group: this.group }).then(response => {
const data = response.data;
data.forEach(elem => {
this.queryList.data.push({
id: elem.id,
condition: `${this.deviceMap[elem.condition.triggerDeviceType]}${this.formatNameByCode(elem.condition.triggerDeviceCode)} 状态:${FaultStatusEnum[elem.condition.triggerDeviceType][elem.condition.triggerDeviceStatus]}`,
target: `${this.deviceMap[elem.targetDeviceType]}${this.formatNameByCode(elem.targetDeviceCode)}`
});
});
});
},
doClose() {
this.dialogShow = false;
},
getFailureModel(auto) {
const model = { auto };
if (auto) {
const choose = this.$refs.pageRules.currentChoose();
if (choose) {
choose.id ? Object.assign(model, { ruleId: choose.id }) : this.$messageBox(this.$t('display.faultChoose.selectRules'));
}
}
return name;
},
doShow() {
this.dialogShow = true;
this.queryList.data = [];
getFailureGenerateRules({ skin: this.skinCode, group: this.group }).then(response => {
const data = response.data;
data.forEach(elem => {
this.queryList.data.push({
id: elem.id,
condition: `${this.deviceMap[elem.condition.triggerDeviceType]}${this.formatNameByCode(elem.condition.triggerDeviceCode)} 状态:${FaultStatusEnum[elem.condition.triggerDeviceType][elem.condition.triggerDeviceStatus]}`,
target: `${this.deviceMap[elem.targetDeviceType]}${this.formatNameByCode(elem.targetDeviceCode)}`
});
});
});
},
doClose() {
this.dialogShow = false;
},
getFailureModel(auto) {
const model = { auto };
if (auto) {
const choose = this.$refs.pageRules.currentChoose();
if (choose) {
choose.id ? Object.assign(model, { ruleId: choose.id }) : this.$messageBox(this.$t('display.faultChoose.selectRules'));
}
}
return model;
},
handleConfirm() {
this.$nextTick(() => {
const faultModel = this.getFailureModel(this.auto);
setFailureMode(faultModel, this.group).then(() => {
this.$message.success(this.$t('display.faultChoose.setFaultSuccess'));
}).catch(error => {
this.$messageBox(this.$t('display.faultChoose.setFaultFail'));
});
return model;
},
handleConfirm() {
this.$nextTick(() => {
const faultModel = this.getFailureModel(this.auto);
setFailureMode(faultModel, this.group).then(() => {
this.$message.success(this.$t('display.faultChoose.setFaultSuccess'));
}).catch(error => {
this.$messageBox(this.$t('display.faultChoose.setFaultFail'));
});
this.doClose();
});
},
reloadTable() {
this.queryList.reload();
}
}
this.doClose();
});
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">

View File

@ -7,43 +7,43 @@
<script>
export default {
name: 'RunPlanLoad',
props: {
group: {
type: String,
required: true
}
},
data() {
return {
menus: null,
show: false
};
},
computed: {
title() {
return this.$t('display.runPlan.runDiagramPlanTool');
}
},
watch: {
'$route.query.skinCode': function (code) {
if (code) {
this.menus = this.$theme.loadPlanComponent(code);
}
}
},
mounted() {
this.menus = this.$theme.loadPlanComponent(this.$route.query.skinCode);
},
methods: {
doShow() {
this.show = true;
this.$refs.schedule.setPosition();
},
doClose() {
this.show = false;
}
}
name: 'RunPlanLoad',
props: {
group: {
type: String,
required: true
}
},
data() {
return {
menus: null,
show: false
};
},
computed: {
title() {
return this.$t('display.runPlan.runDiagramPlanTool');
}
},
watch: {
'$route.query.skinCode': function (code) {
if (code) {
this.menus = this.$theme.loadPlanComponent(code);
}
}
},
mounted() {
this.menus = this.$theme.loadPlanComponent(this.$route.query.skinCode);
},
methods: {
doShow() {
this.show = true;
this.$refs.schedule.setPosition();
},
doClose() {
this.show = false;
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -1,6 +1,6 @@
<template>
<div style="height: 100%; overflow-y: auto;">
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 98%;margin-left:1%;margin-top:20px;" />
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 98%;margin-left:1%;margin-top:20px;" />
<create-task ref="CreateTask" @reloadTable="reloadTable" />
<div class="draft">
<el-button-group>

View File

@ -18,7 +18,6 @@ export default {
},
data() {
return {
cityList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
@ -65,13 +64,6 @@ export default {
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
tagType: (row) => { return 'success'; }
},
{
title: this.$t('publish.city'),
prop: 'cityCode',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.cityCode, this.cityList, ['code', 'name']); },
tagType: (row) => { return 'success'; }
},
{
title: this.$t('publish.lessonIntroduction'),
prop: 'remarks'
@ -123,7 +115,6 @@ export default {
},
methods: {
loadInitData() {
this.cityList = [];
this.mapList = [];
getPublishMapListOnline().then(resp => {
this.mapList = resp.data;
@ -131,14 +122,6 @@ export default {
this.queryForm.queryObject.mapId.config.data.push({value: elem.id, label: elem.name});
});
});
this.$Dictionary.cityType().then(list => {
this.cityList = list;
this.cityList.forEach(elem => {
this.queryForm.queryObject.cityCode.config.data.push({ value: elem.code, label: elem.name });
});
}).catch(() => {
this.$messageBox(this.$t('error.loadingCityListFailed'));
});
},
//
handleEdit(index, row) {