desc: 所有弹窗可拖拽处理, 增加登陆页面登陆说明

This commit is contained in:
zyy 2019-10-09 17:05:10 +08:00
parent ff9364382c
commit a8e491ea6e
80 changed files with 947 additions and 981 deletions

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="35%" :before-close="done => {}" :show-close="false" center>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="35%" :before-close="done => {}" :show-close="false" center>
<div style="text-align:center; margin:auto;">
<qrcode-vue v-loading="loading" :value="url" :size="400" />
</div>

View File

@ -1,72 +1,81 @@
<template>
<el-dialog class="fuzhou_01 notice-info" :title="title" :visible.sync="show" width="360px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span>{{message}}</span><br>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
<el-dialog
v-dialogDrag
class="fuzhou_01 notice-info"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="message in messages">
<span>{{ message }}</span><br>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'NoticeInfo',
data() {
return {
dialogShow: false,
messages: ['命令下达失败'],
operate: null
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages) {
this.messages = messages;
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
}
export default {
name: 'NoticeInfo',
data() {
return {
dialogShow: false,
messages: ['命令下达失败'],
operate: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages) {
this.messages = messages;
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
};
</script>
<style>
@ -74,4 +83,4 @@
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>
</style>

View File

@ -1,13 +1,18 @@
<template>
<el-dialog
class="beijing-01__systerm station-control"
:title="title" :visible.sync="show" width="400px"
:before-close="doClose"
:show-close="true" :z-index="2000" :modal="false" v-dialogDrag
:close-on-click-modal="false"
>
v-dialogDrag
class="beijing-01__systerm station-control"
:title="title"
:visible.sync="show"
width="400px"
:before-close="doClose"
:show-close="true"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-radio-group v-model="control" :disabled="true">
<el-row v-for="item in Object.keys(controlProps)" style="padding-bottom: 10px;padding-top:10px" :key="item">
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
<el-radio :label="item" disabled="false">{{ controlProps[item] }}</el-radio>
</el-row>
</el-radio-group>
@ -16,7 +21,7 @@ class="beijing-01__systerm station-control"
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
</el-button>
</el-row>
<notice-info ref="noticeInfo"/>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>

View File

@ -1,10 +1,15 @@
<template>
<el-dialog
class="beijing-01__systerm view-train-id"
title="列车识别号显示设置" :visible.sync="show" width="420px"
:before-close="doClose"
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
>
v-dialogDrag
class="beijing-01__systerm view-train-id"
title="列车识别号显示设置"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
@ -51,7 +56,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"/>
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
@ -66,7 +71,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"/>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
@ -76,20 +81,20 @@ import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16,
}
},
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;

View File

@ -1,10 +1,15 @@
<template>
<el-dialog
class="chengdou-03__systerm view-train-id"
title="列车识别号显示设置" :visible.sync="show" width="420px"
:before-close="doClose"
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
>
v-dialogDrag
class="chengdou-03__systerm view-train-id"
title="列车识别号显示设置"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
@ -51,7 +56,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"/>
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
@ -66,7 +71,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"/>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
@ -76,20 +81,20 @@ import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16,
}
},
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;

View File

@ -1,9 +1,11 @@
<template>
<el-dialog
v-dialogDrag
:title="$t('global.switchLanguage')"
:visible.sync="visible"
width="360px"
:before-close="doClose"
class="language_box"
>
<div style="">
<span>{{ $t('global.language') }}</span>
@ -53,3 +55,9 @@ export default {
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.language_box .el-dialog__header{
padding: 0 20px 10px;
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('global.chooseRoom')" :visible.sync="centerDialogVisible" width="30%" center>
<el-dialog v-dialogDrag :title="$t('global.chooseRoom')" :visible.sync="centerDialogVisible" width="30%" center>
<el-input v-model="input" :placeholder="$t('global.inputRoomNumber')" />
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false">{{ $t('global.cancel') }}</el-button>

View File

@ -5,7 +5,7 @@ export function getBaseUrl() {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.10.4:9000'; // 旭强
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
} else {
BASE_API = process.env.VUE_APP_BASE_API;

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="35%" :before-close="handleClose" center>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="35%" :before-close="handleClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSure">{{ $t('global.confirm') }}</el-button>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="35%" :before-close="handleClose" center>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="35%" :before-close="handleClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSure">{{ $t('global.confirm') }}</el-button>

View File

@ -1,6 +1,7 @@
<template>
<div>
<el-dialog
v-dialogDrag
:title="$t('display.script.scriptList')"
:visible.sync="show"
top="50px"
@ -17,6 +18,7 @@
/>
</el-dialog>
<el-dialog
v-dialogDrag
:title="$t('display.script.roleSelect')"
:visible.sync="roleShow"
top="50px"
@ -41,8 +43,8 @@
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="roleDoClose">{{$t('global.cancel')}}</el-button>
<el-button type="primary" @click="confirm">{{$t('global.confirm')}}</el-button>
<el-button @click="roleDoClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" @click="confirm">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</div>

View File

@ -1,161 +1,160 @@
<template>
<el-dialog :title="title" :visible.sync="dialogShow" width="800px" :before-close="doClose" :modal="false">
<div class="draft">
<el-radio-group v-model="auto">
<el-radio :label="false" border>{{$t('display.faultChoose.manual')}}</el-radio>
<el-radio :label="true" border>{{$t('display.faultChoose.automatic')}}</el-radio>
</el-radio-group>
</div>
<div class="card" v-if="auto">
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
</QueryListPage>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
<el-button type="primary" @click="handleConfirm" :loading="loading">{{$t('global.confirm')}}</el-button>
</span>
</el-dialog>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogShow" width="800px" :before-close="doClose" :modal="false">
<div class="draft">
<el-radio-group v-model="auto">
<el-radio :label="false" border>{{ $t('display.faultChoose.manual') }}</el-radio>
<el-radio :label="true" border>{{ $t('display.faultChoose.automatic') }}</el-radio>
</el-radio-group>
</div>
<div v-if="auto" class="card">
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" :loading="loading" @click="handleConfirm">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { getFailureGenerateRules, setFailureMode } from '@/api/simulation'
import { FaultStatusEnum } from '@/scripts/FaultDic';
import ModelType from "@/jmap/constant/deviceType";
import { getFailureGenerateRules, setFailureMode } from '@/api/simulation';
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 = '';
let 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) {
let station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
if (station) {
name += '【' + station.name + '】';
}
}
}
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 + '】';
}
}
}
return name;
},
doShow() {
this.dialogShow = true;
this.queryList.data = [];
getFailureGenerateRules({ skin: this.skinCode, group: this.group }).then(response => {
let 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) {
let 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(() => {
let 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">
.draft {
text-align: center;
margin-bottom: 10px;
}
</style>
</style>

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
:visible.sync="dialogShow"
width="100%"

View File

@ -1,6 +1,7 @@
<template>
<div>
<el-dialog
v-dialogDrag
:title="title"
:visible.sync="show"
top="50px"
@ -45,8 +46,8 @@
<el-col :span="6">
<el-form-item style="text-align: right">
<el-button-group>
<el-button size="small" type="warning" @click="handleCheck">{{$t('display.schedule.check')}}</el-button>
<el-button size="small" type="primary" @click="handleSave">{{$t('display.schedule.save')}}</el-button>
<el-button size="small" type="warning" @click="handleCheck">{{ $t('display.schedule.check') }}</el-button>
<el-button size="small" type="primary" @click="handleSave">{{ $t('display.schedule.save') }}</el-button>
</el-button-group>
</el-form-item>
</el-col>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="show" width="550px" :before-close="doClose">
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="550px" :before-close="doClose">
<el-form ref="form" label-width="120px" :model="formModel" :rules="rules">
<el-form-item :label="$t('display.setTime.systemTime')" prop="initTime">
<el-time-picker

View File

@ -28,7 +28,7 @@
<img :src="errGif" width="313" height="428" alt="Girl has dropped her ice cream.">
</el-col>
</el-row>
<el-dialog :visible.sync="dialogVisible" :title="this.$t('error.casualLook')">
<el-dialog v-dialogDrag :visible.sync="dialogVisible" :title="this.$t('error.casualLook')">
<img :src="ewizardClap" class="pan-img">
</el-dialog>
</div>

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="this.$t('lesson.trainingList')"
:visible.sync="show"
top="20px"
@ -12,7 +13,6 @@
</template>
<script>
import { listPublishMap, putMapProductOnLine, putMapProductOffLine } from '@/api/jmap/mapdraft';
import { getProductList } from '@/api/management/mapprd';
import { pageQueryTraining } from '@/api/jmap/training';
import { getSkinCodeList } from '@/api/management/mapskin';
@ -23,10 +23,16 @@ export default {
name: 'TrainList',
props: {
trainings: {
type: Array
type: Array,
default() {
return null;
}
},
detail: {
type: Object
type: Object,
default() {
return null;
}
}
},
data() {
@ -63,7 +69,7 @@ export default {
type: 'select',
label: this.$t('lesson.automaticOrManual'),
config: {
data: [{ value: '02', label: this.$t('lesson.automatic'), }, { value: '01', label: this.$t('lesson.manual'), }]
data: [{ value: '02', label: this.$t('lesson.automatic') }, { value: '01', label: this.$t('lesson.manual') }]
}
}
}

View File

@ -1,88 +1,87 @@
<template>
<el-dialog :title="this.$t('lesson.createNewCoursesFromRelease')" :visible.sync="dialogShow" width="600px" :before-close="doClose">
<el-form ref="form" :model="courseModel" :rules="rules" label-width="120px" size="mini">
<el-form-item :label="this.$t('lesson.publishCourseName')" prop="code">
<el-select v-model="courseModel.code" :placeholder="$t('rules.pleaseSelect')">
<el-option v-for="item in lessonList" :key="item.code" :value="item.code" :label="item.name">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('lesson.draftCourseName')" prop="name">
<el-input v-model="courseModel.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
<el-button type="primary" @click="create" :loading="loading">{{$t('global.confirm')}}</el-button>
</span>
</el-dialog>
<el-dialog v-dialogDrag :title="this.$t('lesson.createNewCoursesFromRelease')" :visible.sync="dialogShow" width="600px" :before-close="doClose">
<el-form ref="form" :model="courseModel" :rules="rules" label-width="120px" size="mini">
<el-form-item :label="this.$t('lesson.publishCourseName')" prop="code">
<el-select v-model="courseModel.code" :placeholder="$t('rules.pleaseSelect')">
<el-option v-for="item in lessonList" :key="item.code" :value="item.code" :label="item.name" />
</el-select>
</el-form-item>
<el-form-item :label="this.$t('lesson.draftCourseName')" prop="name">
<el-input v-model="courseModel.name" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" :loading="loading" @click="create">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { getPublishLessonList } from '@/api/jmap/lesson';
import { createLessonFromPublish } from '@/api/jmap/lessondraft';
import { getPublishLessonList } from '@/api/jmap/lesson';
import { createLessonFromPublish } from '@/api/jmap/lessondraft';
export default {
name: 'MapCreate',
data() {
return {
dialogShow: false,
loading: false,
lessonList: [],
courseModel: {
code: '',
name: '',
}
}
},
computed: {
rules() {
let baseRules = {
code: [
{ required: true, message: this.$t('rules.selectCourseName'), trigger: 'change' }
],
name: [
{ required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
]
}
return baseRules;
}
},
mounted() {
this.lessonList = [];
getPublishLessonList().then(response => {
this.lessonList = response.data.map(elem => { return { code: elem.id, name: elem.name }; })
}).catch(error => {
this.$messageBox(this.$t('error.refreshFailed'))
});
},
methods: {
doShow(node) {
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
},
create() {
this.$refs.form.validate((valid) => {
if (valid) {
let model = {
id: this.courseModel.code,
name: this.courseModel.name,
}
createLessonFromPublish(model).then(response => {
this.$emit('refresh');
this.doClose();
this.$message.success(this.$t('tip.createSuccess'));
}).catch(error => {
this.$messageBox(this.$t('tip.creatingFailed'))
});
}
});
}
}
}
export default {
name: 'MapCreate',
data() {
return {
dialogShow: false,
loading: false,
lessonList: [],
courseModel: {
code: '',
name: ''
}
};
},
computed: {
rules() {
const baseRules = {
code: [
{ required: true, message: this.$t('rules.selectCourseName'), trigger: 'change' }
],
name: [
{ required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
]
};
return baseRules;
}
},
mounted() {
this.lessonList = [];
getPublishLessonList().then(response => {
this.lessonList = response.data.map(elem => { return { code: elem.id, name: elem.name }; });
}).catch(error => {
this.$messageBox(this.$t('error.refreshFailed'));
});
},
methods: {
doShow(node) {
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
},
create() {
this.$refs.form.validate((valid) => {
if (valid) {
const model = {
id: this.courseModel.code,
name: this.courseModel.name
};
createLessonFromPublish(model).then(response => {
this.$emit('refresh');
this.doClose();
this.$message.success(this.$t('tip.createSuccess'));
}).catch(error => {
this.$messageBox(this.$t('tip.creatingFailed'));
});
}
});
}
}
};
</script>
<style>
.option-group {

View File

@ -1,136 +1,140 @@
<template>
<el-dialog :title="this.$t('lesson.courseRelease')" :visible.sync="dialogShow" width="30%" :before-doClose="doClose">
<div>
<el-form label-position="right" ref="form" :rules="rules" :model="editModel" label-width="140px"
@submit.native.prevent>
<el-form-item :label="this.$t('lesson.releaseAssociatedCity')" prop="cityCode">
<el-select v-model="editModel.cityCode" @change="cityChange" :placeholder="this.$t('rules.pleaseSelect')">
<el-option v-for="item in cityList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('lesson.releaseAssociatedMap')" prop="mapId">
<el-select v-model="editModel.mapId" @change="mapChange" :placeholder="this.$t('rules.pleaseSelect')">
<el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('lesson.publishCourseName')" prop="name">
<el-input v-model="editModel.name"></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
<el-button type="primary" @click="doSave" :loading="loading">{{$t('global.confirm')}}</el-button>
</span>
</el-dialog>
<el-dialog v-dialogDrag :title="this.$t('lesson.courseRelease')" :visible.sync="dialogShow" width="30%" :before-do-close="doClose">
<div>
<el-form
ref="form"
label-position="right"
:rules="rules"
:model="editModel"
label-width="140px"
@submit.native.prevent
>
<el-form-item :label="this.$t('lesson.releaseAssociatedCity')" prop="cityCode">
<el-select v-model="editModel.cityCode" :placeholder="this.$t('rules.pleaseSelect')" @change="cityChange">
<el-option v-for="item in cityList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
<el-form-item :label="this.$t('lesson.releaseAssociatedMap')" prop="mapId">
<el-select v-model="editModel.mapId" :placeholder="this.$t('rules.pleaseSelect')" @change="mapChange">
<el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="this.$t('lesson.publishCourseName')" prop="name">
<el-input v-model="editModel.name" />
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" :loading="loading" @click="doSave">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { getPublishMapListBySkinCode } from '@/api/jmap/map';
import { getLessonNameByMapIdAndLessonId } from '@/api/jmap/lessondraft';
import { publishLesson } from '@/api/jmap/lessondraft';
import { getPublishMapListBySkinCode } from '@/api/jmap/map';
import { getLessonNameByMapIdAndLessonId } from '@/api/jmap/lessondraft';
import { publishLesson } from '@/api/jmap/lessondraft';
export default {
name: 'LessonPublish',
data() {
return {
dialogShow: false,
loading: false,
mapList: [],
cityList: [],
cityMapDict: {},
editModel: {
id: '',
name: '',
mapId: '',
prdCode: '',
cityCode: '',
}
}
},
computed: {
rules() {
return {
id: [
{ required: true, message: this.$t('rules.courseIdIsEmpty'), trigger: 'change' }
],
cityCode: [
{ required: true, message: this.$t('rules.selectCity'), trigger: 'change' }
],
mapId: [
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
],
name: [
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
],
}
}
},
methods: {
cityChange(code) {
this.editModel.mapId = '';
this.mapList = this.cityMapDict[code];
},
async mapChange(mapId) {
let resp = await getLessonNameByMapIdAndLessonId({ mapId: mapId, lessonId: this.editModel.id });
if (resp && resp.data) {
this.editModel.name = resp.data.name;
}
},
doShow(model) {
this.mapList = [];
this.cityList = [];
this.cityMapDict = {};
this.editModel = {
id: model.id,
name: model.name,
mapId: '',
prdCode: model.prdCode,
cityCode: model.cityCode,
}
export default {
name: 'LessonPublish',
data() {
return {
dialogShow: false,
loading: false,
mapList: [],
cityList: [],
cityMapDict: {},
editModel: {
id: '',
name: '',
mapId: '',
prdCode: '',
cityCode: ''
}
};
},
computed: {
rules() {
return {
id: [
{ required: true, message: this.$t('rules.courseIdIsEmpty'), trigger: 'change' }
],
cityCode: [
{ required: true, message: this.$t('rules.selectCity'), trigger: 'change' }
],
mapId: [
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
],
name: [
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
]
};
}
},
methods: {
cityChange(code) {
this.editModel.mapId = '';
this.mapList = this.cityMapDict[code];
},
async mapChange(mapId) {
const resp = await getLessonNameByMapIdAndLessonId({ mapId: mapId, lessonId: this.editModel.id });
if (resp && resp.data) {
this.editModel.name = resp.data.name;
}
},
doShow(model) {
this.mapList = [];
this.cityList = [];
this.cityMapDict = {};
this.editModel = {
id: model.id,
name: model.name,
mapId: '',
prdCode: model.prdCode,
cityCode: model.cityCode
};
if (model.skinCode && model.id) {
getPublishMapListBySkinCode(model.skinCode).then(resp => {
let list = resp.data || [];
list.forEach(elem => {
if (!this.cityMapDict[elem.cityCode]) {
this.cityMapDict[elem.cityCode] = [];
}
this.cityMapDict[elem.cityCode].push(elem);
});
if (model.skinCode && model.id) {
getPublishMapListBySkinCode(model.skinCode).then(resp => {
const list = resp.data || [];
list.forEach(elem => {
if (!this.cityMapDict[elem.cityCode]) {
this.cityMapDict[elem.cityCode] = [];
}
this.cityMapDict[elem.cityCode].push(elem);
});
this.$Dictionary.cityType().then(list => {
this.cityList = list.filter(elem => { return this.cityMapDict[elem.code] });
})
})
}
this.$Dictionary.cityType().then(list => {
this.cityList = list.filter(elem => { return this.cityMapDict[elem.code]; });
});
});
}
this.dialogShow = true;
},
doClose() {
this.$refs.form.resetFields();
this.dialogShow = false;
},
doSave() {
this.loading = true;
this.$refs['form'].validate((valid) => {
if (valid) {
publishLesson(this.editModel).then(response => {
this.loading = false;
this.$message.success(this.$t('tip.coursePublishSuccessful'));
this.doClose();
}).catch(error => {
this.loading = false;
this.$messageBox(this.$t('tip.coursePublishFailed'));
});
} else {
this.loading = false;
}
});
this.dialogShow = true;
},
doClose() {
this.$refs.form.resetFields();
this.dialogShow = false;
},
doSave() {
this.loading = true;
this.$refs['form'].validate((valid) => {
if (valid) {
publishLesson(this.editModel).then(response => {
this.loading = false;
this.$message.success(this.$t('tip.coursePublishSuccessful'));
this.doClose();
}).catch(error => {
this.loading = false;
this.$messageBox(this.$t('tip.coursePublishFailed'));
});
} else {
this.loading = false;
}
});
}
}
}
}
}
};
</script>

View File

@ -1,100 +1,100 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%" :before-close="doClose" center>
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{$t('global.confirm')}}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
</span>
</el-dialog>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="25%" :before-close="doClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { addTrainingRulesList } from '@/api/management/dictionary';
import { listPublishMap } from '@/api/jmap/mapdraft';
import { OperationList } from '@/scripts/OperationConfig';
import { addAutoGenerateTask } from '@/api/management/task';
import { getSkinCodeList } from '@/api/management/mapskin'
import { addTrainingRulesList } from '@/api/management/dictionary';
import { listPublishMap } from '@/api/jmap/mapdraft';
import { OperationList } from '@/scripts/OperationConfig';
import { addAutoGenerateTask } from '@/api/management/task';
import { getSkinCodeList } from '@/api/management/mapskin';
export default {
name: 'CreateTask',
data() {
return {
dialogVisible: false,
skinCodeList: [],
taskStatusList: [],
formModel: {
parameter: '',
type: '01',
},
isShow: false,
}
},
computed: {
form() {
let isAdd = this.type === 'ADD'
let form = {
labelWidth: '120px',
items: [
{ prop: 'parameter', label: this.$t('lesson.skinType'), type: 'select', required: true, options: this.skinCodeList },
]
}
return form
},
rules() {
let crules = {
parameter: [
{ required: true, message: this.$t('rules.mapInput'), trigger: 'change' },
]
}
return crules
},
title() {
return this.$t('lesson.generationOperation')
}
},
mounted() {
this.loadInitData();
},
methods: {
loadInitData() {
this.skinCodeList = [];
getSkinCodeList().then(response => {
this.skinCodeList = response.data.map(elem => { return { value: elem.code, label: elem.name } });
})
export default {
name: 'CreateTask',
data() {
return {
dialogVisible: false,
skinCodeList: [],
taskStatusList: [],
formModel: {
parameter: '',
type: '01'
},
isShow: false
};
},
computed: {
form() {
const isAdd = this.type === 'ADD';
const form = {
labelWidth: '120px',
items: [
{ prop: 'parameter', label: this.$t('lesson.skinType'), type: 'select', required: true, options: this.skinCodeList }
]
};
return form;
},
rules() {
const crules = {
parameter: [
{ required: true, message: this.$t('rules.mapInput'), trigger: 'change' }
]
};
return crules;
},
title() {
return this.$t('lesson.generationOperation');
}
},
mounted() {
this.loadInitData();
},
methods: {
loadInitData() {
this.skinCodeList = [];
getSkinCodeList().then(response => {
this.skinCodeList = response.data.map(elem => { return { value: elem.code, label: elem.name }; });
});
this.taskStatusList = [];
this.$Dictionary.taskStatus().then(list => {
this.taskStatusList = list.map(elem => { return { value: elem.code, label: elem.name } });
})
},
doShow() {
this.dialogVisible = true
},
doSave() {
let self = this
this.$refs.dataform.validateForm(() => {
self.create()
})
},
doClose() {
this.formModel = {
parameter: '',
type: '01',
}
this.$refs.dataform.resetForm();
this.isShow = false;
this.dialogVisible = false
},
async create() {
let self = this
try {
let res = await addAutoGenerateTask(this.formModel);
self.doClose()
self.$emit('reloadTable'); //
} catch (error) {
this.$messageBox(this.$t('tip.creatingFailed'));
}
}
}
}
this.taskStatusList = [];
this.$Dictionary.taskStatus().then(list => {
this.taskStatusList = list.map(elem => { return { value: elem.code, label: elem.name }; });
});
},
doShow() {
this.dialogVisible = true;
},
doSave() {
const self = this;
this.$refs.dataform.validateForm(() => {
self.create();
});
},
doClose() {
this.formModel = {
parameter: '',
type: '01'
};
this.$refs.dataform.resetForm();
this.isShow = false;
this.dialogVisible = false;
},
async create() {
const self = this;
try {
const res = await addAutoGenerateTask(this.formModel);
self.doClose();
self.$emit('reloadTable'); //
} catch (error) {
this.$messageBox(this.$t('tip.creatingFailed'));
}
}
}
};
</script>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%" :before-close="handleClose" center>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="25%" :before-close="handleClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>

View File

@ -1,173 +1,172 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { create, checkDicDetailCodeExist, getData, update } from '@/api/management/dictionaryDetail';
import { postOperateStepData, putOperateStepData, getPlaceholderList } from '@/api/management/operation'
import { validateCharCode } from '@/utils/validate'
export default {
name: 'TrainingDetailEdit',
props: {
type: {
type: String,
required: true
},
dicId: {
type: String,
required: true
},
deviceList: {
type: Array,
default() {
return []
}
}
},
data() {
return {
dialogVisible: false,
formModel: {
operateCode: '',
orderNum: '',
deviceType: '',
val: '',
tip: ''
},
placeholderList: []
}
},
computed: {
form() {
let isAdd = this.type === 'ADD'
let form = {
labelWidth: '120px',
items: [
{ prop: 'orderNum', label: this.$t('lesson.stepNo'), type: 'text', required: true, disabled: !isAdd },
{ prop: 'operateCode', label: this.$t('lesson.operateCode'), type: 'text', required: true, disabled: !isAdd },
{ prop: 'deviceType', label: this.$t('lesson.deviceType'), type: 'select', required: true, options: this.deviceList, disabled: !isAdd },
{ prop: 'val', label: this.$t('lesson.stepReturn'), type: 'text', required: false, disabled: !isAdd },
{ label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainRemark },
{ prop: 'tip', label: this.$t('lesson.stepTips'), type: 'textarea', required: true, tooltip: true, info: this.$t('lesson.tipExplainPlaceholderInfo') },
]
}
return form
},
rules() {
let crules = {
operateCode: [
{ required: true, message: this.$t('rules.inputOperateCode'), trigger: 'blur' },
],
orderNum: [
{ required: true, message: this.$t('rules.inputStepNo'), trigger: 'blur' },
],
tip: [
{ required: true, max: 500, message: this.$t('rules.inputStepTips'), trigger: 'blur' }
]
}
return crules;
},
title() {
if (this.type === 'ADD') {
return this.$t('lesson.createStepInfo');
} else {
return this.$t('lesson.editStepInfo');
}
}
},
methods: {
async show(data) {
this.dialogVisible = true
let res = await getPlaceholderList({ trainingType: this.$route.query.type, skinCode: this.$route.query.skinCode });
this.placeholderList = res.data;
if (data && data.operateCode) {
//
this.formModel = {
operateCode: data.operateCode,
orderNum: data.orderNum,
deviceType: data.deviceType,
definitionId: data.definitionId,
val: data.val,
id: data.id,
tip: this.repliceName(data.tip, this.placeholderList)
}
}
},
repliceName(fieldValue, enumList) {
if (enumList && enumList.length > 0) {
for (let i = 0; enumList && i < enumList.length; i++) {
if (fieldValue.includes(`{${enumList[i].id}}`)) {
fieldValue = fieldValue.replace(`{${enumList[i].id}}`, `{${enumList[i].name}}`);
}
}
return fieldValue;
}
},
addTrainRemark(val) {
this.formModel.tip = `${this.formModel.tip}{${val.name}}`;
},
doSave() {
let self = this
this.$refs.dataform.validateForm(() => {
if (self.type === 'ADD') {
self.create()
} else {
self.update()
}
})
},
create() {
let self = this
this.placeholderList.forEach(item => {
if (this.formModel.tip.includes(`{${item.name}}`)) {
let tip = this.formModel.tip.replace(`{${item.name}}`, `{${item.id}}`);
this.formModel.tip = tip;
}
})
this.formModel.definitionId = this.$route.query.id;
this.formModel.orderNum = Number(this.formModel.orderNum);
postOperateStepData(this.formModel).then(response => {
self.$message.success(this.$t('lesson.createOperateSuccess'))
self.handleClose()
self.$emit('reloadTable')
}).catch(error => {
self.$message.error(`${this.$t('error.createOperateStepFailed')}:${error.message}`)
})
},
update() {
let self = this
this.placeholderList.forEach(item => {
if (this.formModel.tip.includes(`{${item.name}}`)) {
let tip = this.formModel.tip.replace(`{${item.name}}`, `{${item.id}}`);
this.formModel.tip = tip;
}
})
this.formModel.orderNum = Number(this.formModel.orderNum);
putOperateStepData(this.formModel).then(response => {
self.$message.success(this.$t('lesson.updateOperateSuccess'))
self.handleClose()
self.$emit('reloadTable')
}).catch(error => {
self.$message.error(`${this.$t('error.updateOperateStepFailed')}:${error.message}`)
})
},
handleClose() {
this.formModel = {
operateCode: '',
orderNum: '',
deviceType: '',
val: '',
tip: ''
}
this.$refs.dataform.resetForm()
this.dialogVisible = false
}
}
}
</script>
import { postOperateStepData, putOperateStepData, getPlaceholderList } from '@/api/management/operation';
export default {
name: 'TrainingDetailEdit',
props: {
type: {
type: String,
required: true
},
dicId: {
type: String,
required: true
},
deviceList: {
type: Array,
default() {
return [];
}
}
},
data() {
return {
dialogVisible: false,
formModel: {
operateCode: '',
orderNum: '',
deviceType: '',
val: '',
tip: ''
},
placeholderList: []
};
},
computed: {
form() {
const isAdd = this.type === 'ADD';
const form = {
labelWidth: '120px',
items: [
{ prop: 'orderNum', label: this.$t('lesson.stepNo'), type: 'text', required: true, disabled: !isAdd },
{ prop: 'operateCode', label: this.$t('lesson.operateCode'), type: 'text', required: true, disabled: !isAdd },
{ prop: 'deviceType', label: this.$t('lesson.deviceType'), type: 'select', required: true, options: this.deviceList, disabled: !isAdd },
{ prop: 'val', label: this.$t('lesson.stepReturn'), type: 'text', required: false, disabled: !isAdd },
{ label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainRemark },
{ prop: 'tip', label: this.$t('lesson.stepTips'), type: 'textarea', required: true, tooltip: true, info: this.$t('lesson.tipExplainPlaceholderInfo') }
]
};
return form;
},
rules() {
const crules = {
operateCode: [
{ required: true, message: this.$t('rules.inputOperateCode'), trigger: 'blur' }
],
orderNum: [
{ required: true, message: this.$t('rules.inputStepNo'), trigger: 'blur' }
],
tip: [
{ required: true, max: 500, message: this.$t('rules.inputStepTips'), trigger: 'blur' }
]
};
return crules;
},
title() {
if (this.type === 'ADD') {
return this.$t('lesson.createStepInfo');
} else {
return this.$t('lesson.editStepInfo');
}
}
},
methods: {
async show(data) {
this.dialogVisible = true;
const res = await getPlaceholderList({ trainingType: this.$route.query.type, skinCode: this.$route.query.skinCode });
this.placeholderList = res.data;
if (data && data.operateCode) {
//
this.formModel = {
operateCode: data.operateCode,
orderNum: data.orderNum,
deviceType: data.deviceType,
definitionId: data.definitionId,
val: data.val,
id: data.id,
tip: this.repliceName(data.tip, this.placeholderList)
};
}
},
repliceName(fieldValue, enumList) {
if (enumList && enumList.length > 0) {
for (let i = 0; enumList && i < enumList.length; i++) {
if (fieldValue.includes(`{${enumList[i].id}}`)) {
fieldValue = fieldValue.replace(`{${enumList[i].id}}`, `{${enumList[i].name}}`);
}
}
return fieldValue;
}
},
addTrainRemark(val) {
this.formModel.tip = `${this.formModel.tip}{${val.name}}`;
},
doSave() {
const self = this;
this.$refs.dataform.validateForm(() => {
if (self.type === 'ADD') {
self.create();
} else {
self.update();
}
});
},
create() {
const self = this;
this.placeholderList.forEach(item => {
if (this.formModel.tip.includes(`{${item.name}}`)) {
const tip = this.formModel.tip.replace(`{${item.name}}`, `{${item.id}}`);
this.formModel.tip = tip;
}
});
this.formModel.definitionId = this.$route.query.id;
this.formModel.orderNum = Number(this.formModel.orderNum);
postOperateStepData(this.formModel).then(response => {
self.$message.success(this.$t('lesson.createOperateSuccess'));
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.$message.error(`${this.$t('error.createOperateStepFailed')}:${error.message}`);
});
},
update() {
const self = this;
this.placeholderList.forEach(item => {
if (this.formModel.tip.includes(`{${item.name}}`)) {
const tip = this.formModel.tip.replace(`{${item.name}}`, `{${item.id}}`);
this.formModel.tip = tip;
}
});
this.formModel.orderNum = Number(this.formModel.orderNum);
putOperateStepData(this.formModel).then(response => {
self.$message.success(this.$t('lesson.updateOperateSuccess'));
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.$message.error(`${this.$t('error.updateOperateStepFailed')}:${error.message}`);
});
},
handleClose() {
this.formModel = {
operateCode: '',
orderNum: '',
deviceType: '',
val: '',
tip: ''
};
this.$refs.dataform.resetForm();
this.dialogVisible = false;
}
}
};
</script>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%" :before-close="handleClose" center>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="25%" :before-close="handleClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="operation.title" :visible.sync="dialogShow" width="500px" :before-close="close">
<el-dialog v-dialogDrag :title="operation.title" :visible.sync="dialogShow" width="500px" :before-close="close">
<el-form ref="form" :model="operateModel" label-width="auto" :rules="rules" size="mini" label-position="right" class="dialog-form">
<el-form-item :label="this.$t('lesson.skinType') + ':'" prop="skinCode">
<el-select v-model="operateModel.skinCode" @change="skinCodeChoose">

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="operation.title" :visible.sync="dialogShow" width="30%" :before-close="close">
<el-dialog v-dialogDrag :title="operation.title" :visible.sync="dialogShow" width="30%" :before-close="close">
<el-form ref="form" :model="operateModel" label-width="120px" :rules="rules" size="mini">
<el-form-item :label="this.$t('lesson.trainingName')+':'" prop="name">
<el-input v-model="operateModel.name" />

View File

@ -35,7 +35,7 @@
<span class="svg-container svg-container_login">
<svg-icon icon-class="user" />
</span>
<el-input v-model="loginForm.username" name="username" type="text" placeholder="username" />
<el-input v-model="loginForm.username" name="username" type="text" placeholder="手机号/邮箱" />
</el-form-item>
<el-form-item prop="password" class="item_form_box">
<span class="svg-container">
@ -45,18 +45,24 @@
v-model="loginForm.password"
name="password"
:type="pwdType"
placeholder="password"
placeholder="密码"
@keyup.enter="handleLogin"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon icon-class="eye" />
</span>
</el-form-item>
<!-- <el-form-item class="item_form_box">
<span class="svg-container" />
<el-radio>琏课堂</el-radio>
</el-form-item> -->
<div class="tip-message">{{ tipsMsg }}</div>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="请在琏课堂小程序助手,完善个人信息,设置登陆密码,手机号或邮箱。"
class="popover_box"
>
<div slot="reference">无法登陆</div>
</el-popover>
<el-form-item>
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
登陆
@ -195,10 +201,10 @@ export default {
this.loading = false;
this.tipsMsg = '';
this.$router.push({ path: '/' });
}).catch(error => {
this.tipsMsg = error.message;
}).catch(() => {
this.tipsMsg = '用户名或密码不正确,请重新输入。';
this.loading = false;
setTimeout(() => { this.tipsMsg = ''; }, 5000);
setTimeout(() => { this.tipsMsg = ''; }, 15000);
});
} else {
console.log('error submit!!');
@ -214,8 +220,6 @@ export default {
$bg:#fff;
$light_gray:#eee;
/* reset element-ui css */
.login-container {
.el-input {
height: 40px;
@ -228,7 +232,7 @@ export default {
border-radius: 0px;
padding: 8px 9px 7px 5px;
color: #000;
height: 100%;
height: 100%;
&:-webkit-autofill {
box-shadow: 0 0 0px 1000px $bg inset !important;
@ -246,7 +250,8 @@ export default {
.tip-message {
color: #F56C61;
padding: 5px;
font-size: 12px;
font-size: 12px;
height: 23px;
}
}
</style>
@ -257,6 +262,14 @@ export default {
$dark_gray:#889aa4;
$light_gray:#eee;
$qrcodeSize: 270px;
.popover_box {
position: absolute;
right: 80px;
bottom: 97px;
cursor: pointer;
color: #6c6c6c;
font-size: 14px;
}
.login-container {
position: fixed;
@ -278,6 +291,7 @@ export default {
padding: 30px 30px 30px;
margin-bottom: 20px;
box-sizing: border-box;
position: relative;
}
.login-form {

View File

@ -35,7 +35,7 @@
<span class="svg-container svg-container_login">
<svg-icon icon-class="user" />
</span>
<el-input v-model="loginForm.username" name="username" type="text" placeholder="username" />
<el-input v-model="loginForm.username" name="username" type="text" placeholder="Mobile phone number/email" />
</el-form-item>
<el-form-item prop="password" class="item_form_box">
<span class="svg-container">
@ -52,11 +52,17 @@
<svg-icon icon-class="eye" />
</span>
</el-form-item>
<!-- <el-form-item class="item_form_box">
<span class="svg-container" />
<el-radio>琏课堂</el-radio>
</el-form-item> -->
<div class="tip-message">{{ tipsMsg }}</div>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="Please in lian classroom small program assistant, perfect personal information, set login password, mobile phone number or email."
class="popover_box"
>
<div slot="reference">unable to login</div>
</el-popover>
<el-form-item>
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
login
@ -84,14 +90,14 @@ export default {
data() {
const validateUsername = (rule, value, callback) => {
if (value.length < 5) {
callback(new Error('请输入正确的用户名'));
callback(new Error('Please enter the correct user name'));
} else {
callback();
}
};
const validatePass = (rule, value, callback) => {
if (value.length < 5) {
callback(new Error('密码不能小于5位'));
callback(new Error('Password cannot be less than 5 digits'));
} else {
callback();
}
@ -144,7 +150,7 @@ export default {
}).catch((error) => {
console.log(error);
this.loadingCode = false;
this.$messageBox('获取登陆二维码失败,请刷新重试');
this.$messageBox('Failed to get login qr code, please refresh and try again');
});
},
checkLoginStatus() {
@ -204,8 +210,8 @@ export default {
this.$i18n.locale = 'en';
Cookies.set('user_lang', 'en');
});
}).catch(error => {
this.tipsMsg = error.message;
}).catch(() => {
this.tipsMsg = 'Incorrect user name or password, please retype.';
this.loading = false;
setTimeout(() => { this.tipsMsg = ''; }, 5000);
});
@ -219,47 +225,6 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss">
$bg:#fff;
$light_gray:#eee;
/* reset element-ui css */
.login-container {
.el-input {
height: 40px;
width: 85%;
input {
background: #fff !important;
border: 0px;
-webkit-appearance: none;
border-radius: 0px;
padding: 8px 9px 7px 5px;
color: #000;
height: 100%;
&:-webkit-autofill {
box-shadow: 0 0 0px 1000px $bg inset !important;
-webkit-text-fill-color: #000 !important;
}
}
}
.item_form_box {
border: 1px solid #ccc;
border-radius: 5px;
color: #454545;
}
.tip-message {
color: #F56C61;
padding: 5px;
font-size: 12px;
}
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
$bg:#f0f0f0;
$qrbg:#fff;
@ -267,6 +232,15 @@ export default {
$light_gray:#eee;
$qrcodeSize: 270px;
.popover_box {
position: absolute;
right: 80px;
bottom: 97px;
cursor: pointer;
color: #6c6c6c;
font-size: 14px;
}
.login-container {
position: fixed;
display: flex;
@ -287,6 +261,7 @@ export default {
padding: 30px 30px 30px;
margin-bottom: 20px;
box-sizing: border-box;
position: relative;
}
.login-form {

View File

@ -35,7 +35,7 @@
<span class="svg-container svg-container_login">
<svg-icon icon-class="user" />
</span>
<el-input v-model="loginForm.username" name="username" type="text" placeholder="username" />
<el-input v-model="loginForm.username" name="username" type="text" placeholder="手机号/邮箱" />
</el-form-item>
<el-form-item prop="password" class="item_form_box">
<span class="svg-container">
@ -45,18 +45,24 @@
v-model="loginForm.password"
name="password"
:type="pwdType"
placeholder="password"
placeholder="密码"
@keyup.enter="handleLogin"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon icon-class="eye" />
</span>
</el-form-item>
<!-- <el-form-item class="item_form_box">
<span class="svg-container" />
<el-radio>琏计划</el-radio>
</el-form-item> -->
<div class="tip-message">{{ tipsMsg }}</div>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="请在琏课堂小程序助手,完善个人信息,设置登陆密码,手机号或邮箱。"
class="popover_box"
>
<div slot="reference">无法登陆</div>
</el-popover>
<el-form-item>
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
登陆
@ -196,8 +202,8 @@ export default {
this.loading = false;
this.tipsMsg = '';
this.$router.push({ path: `${UrlConfig.plan.prefix}/home` });
}).catch(error => {
this.tipsMsg = error.message;
}).catch(() => {
this.tipsMsg = '用户名或密码不正确,请重新输入。';
this.loading = false;
setTimeout(() => { this.tipsMsg = ''; }, 5000);
});
@ -212,47 +218,6 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss">
$bg:#fff;
$light_gray:#eee;
/* reset element-ui css */
.login-container {
.el-input {
height: 40px;
width: 85%;
input {
background: #fff !important;
border: 0px;
-webkit-appearance: none;
border-radius: 0px;
padding: 8px 9px 7px 5px;
color: #000;
height: 100%;
&:-webkit-autofill {
box-shadow: 0 0 0px 1000px $bg inset !important;
-webkit-text-fill-color: #000 !important;
}
}
}
.item_form_box {
border: 1px solid #ccc;
border-radius: 5px;
color: #454545;
}
.tip-message {
color: #F56C61;
padding: 5px;
font-size: 12px;
}
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
$bg:#f0f0f0;
$qrbg:#fff;
@ -260,6 +225,15 @@ export default {
$light_gray:#eee;
$qrcodeSize: 270px;
.popover_box {
position: absolute;
right: 80px;
bottom: 97px;
cursor: pointer;
color: #6c6c6c;
font-size: 14px;
}
.login-container {
position: fixed;
display: flex;
@ -280,6 +254,7 @@ export default {
padding: 30px 30px 30px;
margin-bottom: 20px;
box-sizing: border-box;
position: relative;
}
.login-form {

View File

@ -35,7 +35,7 @@
<span class="svg-container svg-container_login">
<svg-icon icon-class="user" />
</span>
<el-input v-model="loginForm.username" name="username" type="text" placeholder="username" />
<el-input v-model="loginForm.username" name="username" type="text" placeholder="手机号/邮箱" />
</el-form-item>
<el-form-item prop="password" class="item_form_box">
<span class="svg-container">
@ -45,18 +45,24 @@
v-model="loginForm.password"
name="password"
:type="pwdType"
placeholder="password"
placeholder="密码"
@keyup.enter="handleLogin"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon icon-class="eye" />
</span>
</el-form-item>
<!-- <el-form-item class="item_form_box">
<span class="svg-container" />
<el-radio>大屏系统</el-radio>
</el-form-item> -->
<div class="tip-message">{{ tipsMsg }}</div>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="请在琏课堂小程序助手,完善个人信息,设置登陆密码,手机号或邮箱。"
class="popover_box"
>
<div slot="reference">无法登陆</div>
</el-popover>
<el-form-item>
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
登陆
@ -196,8 +202,8 @@ export default {
this.loading = false;
this.tipsMsg = '';
this.$router.push({ path: `${UrlConfig.dp.prefix}/home` });
}).catch(error => {
this.tipsMsg = error.message;
}).catch(() => {
this.tipsMsg = '用户名或密码不正确,请重新输入。';
this.loading = false;
setTimeout(() => { this.tipsMsg = ''; }, 5000);
});
@ -212,47 +218,6 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss">
$bg:#fff;
$light_gray:#eee;
/* reset element-ui css */
.login-container {
.el-input {
height: 40px;
width: 85%;
input {
background: #fff !important;
border: 0px;
-webkit-appearance: none;
border-radius: 0px;
padding: 8px 9px 7px 5px;
color: #000;
height: 100%;
&:-webkit-autofill {
box-shadow: 0 0 0px 1000px $bg inset !important;
-webkit-text-fill-color: #000 !important;
}
}
}
.item_form_box {
border: 1px solid #ccc;
border-radius: 5px;
color: #454545;
}
.tip-message {
color: #F56C61;
padding: 5px;
font-size: 12px;
}
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
$bg:#f0f0f0;
$qrbg:#fff;
@ -260,6 +225,15 @@ export default {
$light_gray:#eee;
$qrcodeSize: 270px;
.popover_box {
position: absolute;
right: 80px;
bottom: 97px;
cursor: pointer;
color: #6c6c6c;
font-size: 14px;
}
.login-container {
position: fixed;
display: flex;
@ -280,6 +254,7 @@ export default {
padding: 30px 30px 30px;
margin-bottom: 20px;
box-sizing: border-box;
position: relative;
}
.login-form {

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="this.$t('system.subscribeMap')" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="this.$t('system.subscribeMap')" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false">
<el-form ref="form" v-model="formModel" label-width="120px">
<el-form-item :label="this.$t('system.subscribeToTheMapList')" prop="mapIdList">
<el-select v-model="formModel.mapIdList" clearable multiple :placeholder="this.$t('rules.enterKeyword')" style="width: 80%">

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('system.editUserPermission')" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="$t('system.editUserPermission')" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>

View File

@ -1,9 +1,9 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{$t('global.confirm')}}</el-button>
<el-button @click="handleClose">{{$t('global.cancel')}}</el-button>
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>

View File

@ -1,6 +1,6 @@
<template>
<div>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisibles" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisibles" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: '280px', width:'100%' }">
<el-tree
ref="tree"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('map.layerDisplay')" :visible.sync="dialogTableVisible" class="view_box" width="460px" :before-close="doClose" :modal-append-to-body="false">
<el-dialog v-dialogDrag :title="$t('map.layerDisplay')" :visible.sync="dialogTableVisible" class="view_box" width="460px" :before-close="doClose" :modal-append-to-body="false">
<el-row type="flex" justify="center" class="content_box">
<el-form label-width="80px" class="demo-ruleForm">
<el-form-item :label="$t('map.viewShows')">

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('map.automaticSignalList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<el-dialog v-dialogDrag :title="$t('map.automaticSignalList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="mapInfo.name + ' / ' + name + ' / ' + title"
:visible.sync="show"
width="30%"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('map.pathUnitList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<el-dialog v-dialogDrag :title="$t('map.pathUnitList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('map.pathUnitList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<el-dialog v-dialogDrag :title="$t('map.pathUnitList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('map.routePreview')" :visible.sync="show" width="95%" :before-do-close="doClose">
<el-dialog v-dialogDrag :title="$t('map.routePreview')" :visible.sync="show" width="95%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="mapInfo.name + ' / ' + name + ' / ' + title"
:visible.sync="show"
width="30%"

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="mapInfo.name + ' / ' + editModel.name + ' / ' + title"
:visible.sync="show"
width="40%"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('map.thenList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<el-dialog v-dialogDrag :title="$t('map.thenList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="mapInfo.name + ' / ' + name + ' / ' + title"
:visible.sync="show"
width="30%"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('map.linkageSwitchList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<el-dialog v-dialogDrag :title="$t('map.linkageSwitchList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="$t('map.createBatch')"
:visible.sync="visible"
width="400px"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="isNew? $t('map.trainmodelCreate'): $t('map.trainmodelUpdate')" :visible.sync="dialogShow" width="30%" :before-close="doClose">
<el-dialog v-dialogDrag :title="isNew? $t('map.trainmodelCreate'): $t('map.trainmodelUpdate')" :visible.sync="dialogShow" width="30%" :before-close="doClose">
<el-card shadow="never">
<el-form
ref="form"

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
v-loading="loadingUpload"
:title="$t('map.createNewMap')"
:visible.sync="dialogShow"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('map.mapEditor')" :visible.sync="dialogShow" :close-on-click-modal="false" width="30%" :before-close="handleClose">
<el-dialog v-dialogDrag :title="$t('map.mapEditor')" :visible.sync="dialogShow" :close-on-click-modal="false" width="30%" :before-close="handleClose">
<div>
<template v-if="basicInfo">
<el-form

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('map.mapPublished')" :visible.sync="dialogShow" width="30%" :before-close="handleClose">
<el-dialog v-dialogDrag :title="$t('map.mapPublished')" :visible.sync="dialogShow" width="30%" :before-close="handleClose">
<div>
<el-form
ref="form"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="$t('map.saveMapAs')" :visible.sync="dialogShow" width="30%" :before-close="handleClose">
<el-dialog v-dialogDrag :title="$t('map.saveMapAs')" :visible.sync="dialogShow" width="30%" :before-close="handleClose">
<div>
<el-form
ref="form"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="this.$t('map.setupOperationGraph')" :visible.sync="dialogShow" width="600px" :before-close="doClose" append-to-body>
<el-dialog v-dialogDrag :title="this.$t('map.setupOperationGraph')" :visible.sync="dialogShow" width="600px" :before-close="doClose" append-to-body>
<el-form ref="form" :model="formModel" label-width="160px" size="mini" :rules="rules">
<el-form-item :label="this.$t('map.selectOperationGraphDataRange')+':'" prop="timeArea">
<el-time-picker

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="this.$t('map.createNewOperationGraph')+selected.name" :visible.sync="dialogShow" width="600px" :before-close="close">
<el-dialog v-dialogDrag :title="this.$t('map.createNewOperationGraph')+selected.name" :visible.sync="dialogShow" width="600px" :before-close="close">
<el-steps :active="active" finish-status="success" simple>
<el-step :title="this.$t('map.setOperatingSpeed')" icon="el-icon-edit" />
<el-step :title="this.$t('map.createOperationGraph')" icon="el-icon-upload" />

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="this.$t('map.importOperationGraph')" :visible.sync="dialogShow" width="600px" :before-close="close">
<el-dialog v-dialogDrag :title="this.$t('map.importOperationGraph')" :visible.sync="dialogShow" width="600px" :before-close="close">
<el-form ref="form" label-position="right" :model="model" size="mini" :rules="rules">
<el-form-item prop="filename">
<el-input v-model="model.filename" type="file" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" />

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="this.$t('map.operationGraphPublished')" :visible.sync="dialogShow" width="30%" :before-close="handleClose">
<el-dialog v-dialogDrag :title="this.$t('map.operationGraphPublished')" :visible.sync="dialogShow" width="30%" :before-close="handleClose">
<div>
<el-form ref="form" label-position="right" :model="editModel" label-width="120px" size="mini" :rules="rules">
<el-form-item :label="this.$t('map.operationGraphName')" prop="name">

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="this.$t('orderAuthor.oneClickGenerationPermission')" :visible.sync="dialogShow" width="420px" :before-close="handleClose">
<el-dialog v-dialogDrag :title="this.$t('orderAuthor.oneClickGenerationPermission')" :visible.sync="dialogShow" width="420px" :before-close="handleClose">
<div>
<el-form
ref="form"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="this.$t('orderAuthor.packingDetails')" :visible.sync="dialogShow" width="700px" :before-close="close">
<el-dialog v-dialogDrag :title="this.$t('orderAuthor.packingDetails')" :visible.sync="dialogShow" width="700px" :before-close="close">
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</div>

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
:visible.sync="show"
top="20px"

View File

@ -1,6 +1,6 @@
<template>
<div>
<el-dialog :title="this.$t('orderAuthor.modifyPermissionContent')" :visible.sync="dialogShow" width="30%" :before-close="handleClose" :z-index="2000">
<el-dialog v-dialogDrag :title="this.$t('orderAuthor.modifyPermissionContent')" :visible.sync="dialogShow" width="30%" :before-close="handleClose" :z-index="2000">
<div>
<el-form
ref="form"

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="this.$t('orderAuthor.selectPermission')"
:visible.sync="show"
top="20px"

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="this.$t('orderAuthor.orderSelectionItem')"
:visible.sync="show"
top="20px"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="this.$t('orderAuthor.orderDetails')" :visible.sync="show" width="500px" :before-do-close="doClose" :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="this.$t('orderAuthor.orderDetails')" :visible.sync="show" width="500px" :before-do-close="doClose" :close-on-click-modal="false">
<div>
<el-scrollbar wrap-class="scrollbar-wrapper" style="height: 400px">
<data-form ref="dataform" :form="form" :form-model="formModel" class="data-box" />

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="this.$t('global.scan')" :visible.sync="centerDialogVisible" width="30%" center>
<el-dialog v-dialogDrag :title="this.$t('global.scan')" :visible.sync="centerDialogVisible" width="30%" center>
<el-input v-model="input" :placeholder="$t('global.inputRoomNumber')" />
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false">{{ $t('global.cancel') }}</el-button>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="this.$t('orderAuthor.packingDetails')" :visible.sync="dialogShow" width="800px" :before-close="close">
<el-dialog v-dialogDrag :title="this.$t('orderAuthor.packingDetails')" :visible.sync="dialogShow" width="800px" :before-close="close">
<div style="height: 300px">
<el-scrollbar wrap-class="scrollbar-wrapper" style="">
<el-table :data="permissionList" border style="width: 100%">

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
:visible.sync="show"
top="20px"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="this.$t('orderAuthor.packingDetails')" :visible.sync="dialogShow" width="800px" :before-close="close">
<el-dialog v-dialogDrag :title="this.$t('orderAuthor.packingDetails')" :visible.sync="dialogShow" width="800px" :before-close="close">
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</div>

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="$t('permission.userList')"
:visible.sync="show"
top="20px"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="show" width="800px" :before-close="doClose" center>
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="800px" :before-close="doClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="draftRule">{{ isAdd? $t('global.add'): $t('global.edit') }}

View File

@ -1,5 +1,6 @@
<template>
<el-dialog
v-dialogDrag
:title="$t('permission.userList')"
:visible.sync="show"
top="20px"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" :visible.sync="dialogShow" :before-close="handleCancel" :close-on-click-modal="false">
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogShow" :before-close="handleCancel" :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
<el-form-item :label="$t('publish.trainingType')" prop="course">
<el-select

View File

@ -1,13 +1,5 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogShow" width="80%" :before-close="doClose" :modal="false" :close-on-click-modal="false">
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" :loading="loading" @click="handleConfirm">{{ $t('global.select') }}</el-button>

View File

@ -1,10 +1,5 @@
<template>
<el-dialog
:title="title"
:visible.sync="show"
width="30%"
:before-close="doClose"
>
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="30%" :before-close="doClose">
<el-form ref="form" :model="formMdoel" :rules="rules" label-width="140px">
<el-form-item :label="$t('publish.selectSkinCode')" prop="skinCode">
<el-select v-model="formMdoel.skinCode">

View File

@ -1,10 +1,5 @@
<template>
<el-dialog
:title="title"
:visible.sync="show"
width="30%"
:before-close="doClose"
>
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="30%" :before-close="doClose">
<el-form ref="form" :model="formMdoel" :rules="rules" label-width="140px">
<el-form-item :label="$t('publish.selectMap')" prop="mapId">
<el-select v-model="formMdoel.mapId">

View File

@ -1,15 +1,5 @@
<template>
<el-dialog
v-dialogDrag
class="default route-cancel"
:title="title"
:visible.sync="show"
width="20%"
:z-index="2000"
:modal="true"
:before-close="cancel"
:close-on-click-modal="false"
>
<el-dialog v-dialogDrag class="default route-cancel" :title="title" :visible.sync="show" width="20%" :z-index="2000" :modal="true" :before-close="cancel" :close-on-click-modal="false">
<el-input v-model="filterText" :placeholder="this.$t('global.enterNameToFilter')" clearable />
<ul class="listBox">
<li v-for="(item,index) in list" :key="index" class="listLi">
@ -25,8 +15,8 @@
</li>
</ul>
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">{{$t('global.cancel')}}</el-button>
<el-button type="primary" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button @click="cancel">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" @click="commit">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>