desc: 调整高度样式
This commit is contained in:
parent
7246568801
commit
c08e2afaaa
59
.eslintrc.js
59
.eslintrc.js
@ -25,31 +25,31 @@ module.exports = {
|
|||||||
"vue/no-v-html": "off",
|
"vue/no-v-html": "off",
|
||||||
'accessor-pairs': 2,
|
'accessor-pairs': 2,
|
||||||
"arrow-spacing": 0,//=>的前/后括号
|
"arrow-spacing": 0,//=>的前/后括号
|
||||||
'block-spacing': [2, 'always'],
|
'block-spacing': [2, 'always'], // 禁止或强制在代码块中开括号前和闭括号后有空格 { return 11 }
|
||||||
'brace-style': [2, '1tbs', {
|
'brace-style': [2, '1tbs', { // 强制在代码块中使用一致的大括号风格
|
||||||
'allowSingleLine': true
|
'allowSingleLine': true
|
||||||
}],
|
}],
|
||||||
'camelcase': [0, {
|
'camelcase': [0, { // 强制使用驼峰拼写法命名规定
|
||||||
'properties': 'always'
|
'properties': 'always'
|
||||||
}],
|
}],
|
||||||
'comma-dangle': [2, 'never'],
|
'comma-dangle': [2, 'never'], // 要求或禁止末尾逗号
|
||||||
'comma-spacing': [2, {
|
'comma-spacing': [2, { // 强制在逗号前后使用一致的空格
|
||||||
'before': false,
|
'before': false,
|
||||||
'after': true
|
'after': true
|
||||||
}],
|
}],
|
||||||
'comma-style': [2, 'last'],
|
'comma-style': [2, 'last'], // 强制在逗号前后使用一致的空格
|
||||||
'constructor-super': 2,
|
'constructor-super': 2, // 要求在构造函数中有super()调用
|
||||||
'curly': [2, 'multi-line'],
|
'curly': [2, 'multi-line'], // 强制所有控制语句使用一致的括号风格
|
||||||
'dot-location': [2, 'property'],
|
'dot-location': [2, 'property'], // 强制在点号之前和之后一致的换行
|
||||||
'eol-last': 2,
|
'eol-last': 2, // 禁止文件末尾存在空行禁止文件末尾存在空行
|
||||||
'generator-star-spacing': [2, {
|
'generator-star-spacing': [2, {
|
||||||
'before': true,
|
'before': true,
|
||||||
'after': true
|
'after': true
|
||||||
}],
|
}],
|
||||||
'handle-callback-err': [2, '^(err|error)$'],
|
'handle-callback-err': [2, '^(err|error)$'],
|
||||||
'indent': ["error", "tab"],
|
'indent': [2, 4], // 强制使用一致的缩进
|
||||||
'jsx-quotes': [2, 'prefer-single'],
|
'jsx-quotes': [2, 'prefer-single'], // 强制在JSX属性中一致地使用双引号或单引号
|
||||||
'key-spacing': [2, {
|
'key-spacing': [0, { // 强制要求在对象字面量的属性中键和值之间使用一致的间距
|
||||||
'beforeColon': false,
|
'beforeColon': false,
|
||||||
'afterColon': true
|
'afterColon': true
|
||||||
}],
|
}],
|
||||||
@ -58,8 +58,8 @@ module.exports = {
|
|||||||
'after': true
|
'after': true
|
||||||
}],
|
}],
|
||||||
"new-cap": 2,//函数名首行大写必须使用new方式调用,首行小写必须用不带new方式调用
|
"new-cap": 2,//函数名首行大写必须使用new方式调用,首行小写必须用不带new方式调用
|
||||||
'new-parens': 2,
|
'new-parens': 2, // 要求构造无参构造函数时有圆括号
|
||||||
'no-array-constructor': 2,
|
'no-array-constructor': 2, // 禁用Array构造函数
|
||||||
'no-caller': 2,
|
'no-caller': 2,
|
||||||
'no-console': 'off',
|
'no-console': 'off',
|
||||||
'no-class-assign': 2,
|
'no-class-assign': 2,
|
||||||
@ -94,9 +94,10 @@ module.exports = {
|
|||||||
}],
|
}],
|
||||||
'no-lone-blocks': 2,
|
'no-lone-blocks': 2,
|
||||||
"no-mixed-spaces-and-tabs": [2, false],//禁止混用tab和空格
|
"no-mixed-spaces-and-tabs": [2, false],//禁止混用tab和空格
|
||||||
"no-multi-spaces": 1,//不能用多余的空格
|
"no-multi-spaces": 1,// 不能用多余的空格
|
||||||
'no-multi-str': 2,
|
'no-multi-str': 2,
|
||||||
'no-multiple-empty-lines': [2, {
|
'no-multiple-empty-lines': [2, { // 禁止出现多行空行
|
||||||
|
// 最大连续空行数
|
||||||
'max': 1
|
'max': 1
|
||||||
}],
|
}],
|
||||||
'no-native-reassign': 2,
|
'no-native-reassign': 2,
|
||||||
@ -121,7 +122,7 @@ module.exports = {
|
|||||||
'no-sparse-arrays': 2,
|
'no-sparse-arrays': 2,
|
||||||
'no-this-before-super': 2,
|
'no-this-before-super': 2,
|
||||||
'no-throw-literal': 2,
|
'no-throw-literal': 2,
|
||||||
"no-trailing-spaces": 1,//一行结束后面不要有空格
|
"no-trailing-spaces": 1,// 禁止行尾空格
|
||||||
'no-undef': 2,
|
'no-undef': 2,
|
||||||
'no-undef-init': 2,
|
'no-undef-init': 2,
|
||||||
'no-unexpected-multiline': 2,
|
'no-unexpected-multiline': 2,
|
||||||
@ -139,7 +140,7 @@ module.exports = {
|
|||||||
'no-useless-computed-key': 2,
|
'no-useless-computed-key': 2,
|
||||||
'no-useless-constructor': 2,
|
'no-useless-constructor': 2,
|
||||||
'no-useless-escape': 0,
|
'no-useless-escape': 0,
|
||||||
'no-whitespace-before-property': 2,
|
'no-whitespace-before-property': 2, // 禁止属性前有空白
|
||||||
'no-with': 2,
|
'no-with': 2,
|
||||||
'one-var': [2, {
|
'one-var': [2, {
|
||||||
'initialized': 'never'
|
'initialized': 'never'
|
||||||
@ -150,21 +151,21 @@ module.exports = {
|
|||||||
':': 'before'
|
':': 'before'
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
"padded-blocks": 0,//块语句内行首行尾是否要空行
|
"padded-blocks": 0, // 块语句内行首行尾是否要空行
|
||||||
'quotes': [2, 'single', {
|
'quotes': [2, 'single', {
|
||||||
'avoidEscape': true,
|
'avoidEscape': true,
|
||||||
'allowTemplateLiterals': true
|
'allowTemplateLiterals': true
|
||||||
}],
|
}],
|
||||||
'semi': [2, 'always'], //语句强制分号结尾
|
'semi': [2, 'always'], // 语句强制分号结尾
|
||||||
'semi-spacing': [2, {
|
'semi-spacing': [2, { // 强制分号之前和之后使用一致的空格
|
||||||
'before': false,
|
'before': false,
|
||||||
'after': true
|
'after': true
|
||||||
}],
|
}],
|
||||||
"strict": 2,//使用严格模式
|
"strict": 2,//使用严格模式
|
||||||
'space-before-blocks': [2, 'always'], //不以新行开始的块{前面要不要有空格
|
'space-before-blocks': [2, 'always'], // 不以新行开始的块{前面要不要有空格 强制在块之前使用一致的空格
|
||||||
"space-before-function-paren": [0, "always"],//函数定义时括号前面要不要有空格
|
"space-before-function-paren": [0, "always"],// 函数定义时括号前面要不要有空格
|
||||||
"space-in-parens": [0, "never"],//小括号里面要不要有空格
|
"space-in-parens": [0, "never"],// 小括号里面要不要有空格
|
||||||
"space-infix-ops": 0,//中缀操作符周围要不要有空格
|
"space-infix-ops": 2,// 要求操作符周围有空格
|
||||||
'space-unary-ops': [2, {
|
'space-unary-ops': [2, {
|
||||||
'words': true,
|
'words': true,
|
||||||
'nonwords': false
|
'nonwords': false
|
||||||
@ -172,7 +173,7 @@ module.exports = {
|
|||||||
'spaced-comment': [2, 'always', {
|
'spaced-comment': [2, 'always', {
|
||||||
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
|
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
|
||||||
}], //注释风格要不要有空格什么的
|
}], //注释风格要不要有空格什么的
|
||||||
'template-curly-spacing': [2, 'never'],
|
// 'template-curly-spacing': [2, 'never'],
|
||||||
'use-isnan': 2, //禁止比较时使用NaN,只能用isNaN()
|
'use-isnan': 2, //禁止比较时使用NaN,只能用isNaN()
|
||||||
'valid-typeof': 2, //必须使用合法的typeof的值
|
'valid-typeof': 2, //必须使用合法的typeof的值
|
||||||
"wrap-iife": [2, "inside"],//立即执行函数表达式的小括号风格
|
"wrap-iife": [2, "inside"],//立即执行函数表达式的小括号风格
|
||||||
@ -180,7 +181,7 @@ module.exports = {
|
|||||||
'yoda': [2, 'never'], //禁止尤达条件
|
'yoda': [2, 'never'], //禁止尤达条件
|
||||||
'prefer-const': 2,
|
'prefer-const': 2,
|
||||||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||||
"object-curly-spacing": [0, "never"],//大括号内是否允许不必要的空格
|
"object-curly-spacing": [0, "never"], // 强制在大括号中使用一致的空格
|
||||||
"array-bracket-spacing": [2, "never"], //是否允许非空数组里面有多余的空格
|
"array-bracket-spacing": [2, "never"], // 禁止或强制在括号内使用空格
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="query-list-page" :style="{height: queryList.height ? 'auto' : listPageHeight}">
|
<!-- :style="{height: queryList.height ? 'auto' : listPageHeight}" -->
|
||||||
|
<div class="query-list-page">
|
||||||
<query-form
|
<query-form
|
||||||
v-show="!(queryForm.show === false)"
|
v-show="!(queryForm.show === false)"
|
||||||
ref="queryForm"
|
ref="queryForm"
|
||||||
|
@ -147,7 +147,7 @@ export const userLesson = '012'; // 教学系统
|
|||||||
export const userSimulation = '013'; // 仿真系统
|
export const userSimulation = '013'; // 仿真系统
|
||||||
export const userScreen = '014'; // 大屏系统
|
export const userScreen = '014'; // 大屏系统
|
||||||
export const userPlan = '015'; // 计划系统
|
export const userPlan = '015'; // 计划系统
|
||||||
export const userDesign='016'; // 设计系统
|
export const userDesign = '016'; // 设计系统
|
||||||
const isDev = process.env.NODE_ENV === 'development';
|
const isDev = process.env.NODE_ENV === 'development';
|
||||||
|
|
||||||
export const UrlConfig = {
|
export const UrlConfig = {
|
||||||
@ -1065,7 +1065,7 @@ const router = createRouter();
|
|||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
const project = getSessionStorage('project');
|
const project = getSessionStorage('project');
|
||||||
document.title = loginTitle[project||'login'];
|
document.title = loginTitle[project || 'login'];
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card>
|
<el-card style="height: 100%; overflow-y: auto;">
|
||||||
<div slot="header" style="text-align: center;">
|
<div slot="header" style="text-align: center;">
|
||||||
<b>{{ $t('lesson.courseName') + ': '+ name }}</b>
|
<b>{{ $t('lesson.courseName') + ': '+ name }}</b>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag :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" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
@ -32,7 +39,14 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'skinCode', label: this.$t('lesson.skinType'), type: 'select', required: true, options: this.skinCodeList, disabled: true }
|
{
|
||||||
|
prop: 'skinCode',
|
||||||
|
label: this.$t('lesson.skinType'),
|
||||||
|
type: 'select',
|
||||||
|
required: true,
|
||||||
|
options: this.skinCodeList,
|
||||||
|
disabled: true
|
||||||
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -40,7 +54,11 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const crules = {
|
const crules = {
|
||||||
skinCode: [
|
skinCode: [
|
||||||
{ required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' }
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('rules.inputSkinType'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
@ -77,13 +95,19 @@ export default {
|
|||||||
const self = this;
|
const self = this;
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
if (this.isShow) {
|
if (this.isShow) {
|
||||||
this.$confirm(this.$t('lesson.wellClearOperate'), this.$t('global.tips'), {
|
this.$confirm(
|
||||||
|
this.$t('lesson.wellClearOperate'),
|
||||||
|
this.$t('global.tips'),
|
||||||
|
{
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
self.create();
|
self.create();
|
||||||
}).catch(() => { });
|
})
|
||||||
|
.catch(() => {});
|
||||||
} else {
|
} else {
|
||||||
self.create();
|
self.create();
|
||||||
}
|
}
|
||||||
@ -92,14 +116,21 @@ export default {
|
|||||||
create() {
|
create() {
|
||||||
const self = this;
|
const self = this;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
addTrainingRulesList(this.formModel.skinCode, OperationList[this.formModel.skinCode].list).then(response => {
|
addTrainingRulesList(
|
||||||
|
this.formModel.skinCode,
|
||||||
|
OperationList[this.formModel.skinCode].list
|
||||||
|
)
|
||||||
|
.then(response => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
self.$message.success(this.$t('lesson.batchCreateSuccess'));
|
self.$message.success(this.$t('lesson.batchCreateSuccess'));
|
||||||
self.handleClose();
|
self.handleClose();
|
||||||
self.$emit('reloadTable'); // 刷新列表
|
self.$emit('reloadTable'); // 刷新列表
|
||||||
}).catch(error => {
|
})
|
||||||
|
.catch(error => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
self.$message.error(`${this.$('error.batchCreateFailed')}:${error.message}`);
|
self.$message.error(
|
||||||
|
`${this.$('error.batchCreateFailed')}:${error.message}`
|
||||||
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
|
@ -197,10 +197,10 @@ export default {
|
|||||||
maxDuration: data.maxDuration,
|
maxDuration: data.maxDuration,
|
||||||
trainingRemark: this.repliceName(data.trainingRemark, this.placeholderList)
|
trainingRemark: this.repliceName(data.trainingRemark, this.placeholderList)
|
||||||
};
|
};
|
||||||
}else {
|
} else {
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
skinCode: this.$route.query.skinCode
|
skinCode: this.$route.query.skinCode
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
repliceName(fieldValue, enumList) {
|
repliceName(fieldValue, enumList) {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div style="height: 100%; overflow-y: auto;">
|
||||||
|
<!-- <div style="height: calc(100% - 80px); overflow-y: auto;"> -->
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
|
<!-- </div> -->
|
||||||
<training-edit ref="create" type="ADD" @reloadTable="reloadTable" />
|
<training-edit ref="create" type="ADD" @reloadTable="reloadTable" />
|
||||||
<training-edit ref="edit" type="EDIT" @reloadTable="reloadTable" />
|
<training-edit ref="edit" type="EDIT" @reloadTable="reloadTable" />
|
||||||
<add-batch ref="addBatch" @reloadTable="reloadTable" />
|
<add-batch ref="addBatch" @reloadTable="reloadTable" />
|
||||||
@ -14,7 +16,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTrainingRulesList, deleteTrainingRulesData, getPlaceholderList } from '@/api/management/operation';
|
import {
|
||||||
|
getTrainingRulesList,
|
||||||
|
deleteTrainingRulesData,
|
||||||
|
getPlaceholderList
|
||||||
|
} from '@/api/management/operation';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
import TrainingEdit from './addEdit';
|
import TrainingEdit from './addEdit';
|
||||||
import AddBatch from './addBatch';
|
import AddBatch from './addBatch';
|
||||||
@ -55,7 +61,6 @@ export default {
|
|||||||
label: this.$t('lesson.trainingName')
|
label: this.$t('lesson.trainingName')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: this.getList,
|
query: this.getList,
|
||||||
@ -66,28 +71,56 @@ export default {
|
|||||||
title: this.$t('lesson.trainingName'),
|
title: this.$t('lesson.trainingName'),
|
||||||
prop: 'trainingName',
|
prop: 'trainingName',
|
||||||
type: 'replicText',
|
type: 'replicText',
|
||||||
columnValue: (row) => { return this.repliceName(row.trainingName, this.placeholderMap[row.trainingType]); }
|
columnValue: row => {
|
||||||
|
return this.repliceName(
|
||||||
|
row.trainingName,
|
||||||
|
this.placeholderMap[row.trainingType]
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('lesson.skinType'),
|
title: this.$t('lesson.skinType'),
|
||||||
prop: 'skinCode',
|
prop: 'skinCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
columnValue: row => {
|
||||||
tagType: (row) => { return ''; }
|
return this.$convertField(row.skinCode, this.skinCodeList, [
|
||||||
|
'code',
|
||||||
|
'name'
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
tagType: row => {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('lesson.trainingType'),
|
title: this.$t('lesson.trainingType'),
|
||||||
prop: 'trainingType',
|
prop: 'trainingType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.trainingType, this.trainingTypeList, ['code', 'name']); },
|
columnValue: row => {
|
||||||
tagType: (row) => { return 'success'; }
|
return this.$convertField(
|
||||||
|
row.trainingType,
|
||||||
|
this.trainingTypeList,
|
||||||
|
['code', 'name']
|
||||||
|
);
|
||||||
|
},
|
||||||
|
tagType: row => {
|
||||||
|
return 'success';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('lesson.operationType'),
|
title: this.$t('lesson.operationType'),
|
||||||
prop: 'operateType',
|
prop: 'operateType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.trainingType], ['code', 'name']); },
|
columnValue: row => {
|
||||||
tagType: (row) => { return 'success'; }
|
return this.$convertField(
|
||||||
|
row.operateType,
|
||||||
|
this.trainingOperateTypeMap[row.trainingType],
|
||||||
|
['code', 'name']
|
||||||
|
);
|
||||||
|
},
|
||||||
|
tagType: row => {
|
||||||
|
return 'success';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('lesson.minDuration'),
|
title: this.$t('lesson.minDuration'),
|
||||||
@ -102,7 +135,12 @@ export default {
|
|||||||
title: this.$t('lesson.trainingRemark'),
|
title: this.$t('lesson.trainingRemark'),
|
||||||
prop: 'trainingRemark',
|
prop: 'trainingRemark',
|
||||||
type: 'replicText',
|
type: 'replicText',
|
||||||
columnValue: (row) => { return this.repliceName(row.trainingRemark, this.placeholderMap[row.trainingType]); }
|
columnValue: row => {
|
||||||
|
return this.repliceName(
|
||||||
|
row.trainingRemark,
|
||||||
|
this.placeholderMap[row.trainingType]
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -185,7 +223,10 @@ export default {
|
|||||||
this.$Dictionary.trainingType().then(list => {
|
this.$Dictionary.trainingType().then(list => {
|
||||||
this.trainingTypeList = list;
|
this.trainingTypeList = list;
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.trainingType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.trainingType.config.data.push({
|
||||||
|
value: elem.code,
|
||||||
|
label: elem.name
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -195,7 +236,10 @@ export default {
|
|||||||
if (enumList && enumList.length > 0) {
|
if (enumList && enumList.length > 0) {
|
||||||
for (let i = 0; i < enumList.length; i++) {
|
for (let i = 0; i < enumList.length; i++) {
|
||||||
if (fieldValue.includes(`{${enumList[i].id}}`)) {
|
if (fieldValue.includes(`{${enumList[i].id}}`)) {
|
||||||
fieldValue = fieldValue.replace(`{${enumList[i].id}}`, `{${enumList[i].name}}`);
|
fieldValue = fieldValue.replace(
|
||||||
|
`{${enumList[i].id}}`,
|
||||||
|
`{${enumList[i].name}}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fieldValue;
|
return fieldValue;
|
||||||
@ -209,7 +253,10 @@ export default {
|
|||||||
if (form && form.trainingType) {
|
if (form && form.trainingType) {
|
||||||
form.operateType = '';
|
form.operateType = '';
|
||||||
this.trainingOperateTypeMap[form.trainingType].forEach(elem => {
|
this.trainingOperateTypeMap[form.trainingType].forEach(elem => {
|
||||||
this.queryForm.queryObject.operateType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.operateType.config.data.push({
|
||||||
|
value: elem.code,
|
||||||
|
label: elem.name
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -220,7 +267,10 @@ export default {
|
|||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
handleViewDetail(index, row) {
|
handleViewDetail(index, row) {
|
||||||
this.$router.push({ path: `${UrlConfig.design.trainingRuleDetail}`, query: { id: row.id, type: row.trainingType, skinCode: row.skinCode } });
|
this.$router.push({
|
||||||
|
path: `${UrlConfig.design.trainingRuleDetail}`,
|
||||||
|
query: { id: row.id, type: row.trainingType, skinCode: row.skinCode }
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEdit(index, row) {
|
handleEdit(index, row) {
|
||||||
@ -240,22 +290,28 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
this.$confirm(this.$t('lesson.wellDelTrainingRule'), this.$t('global.tips'), {
|
this.$confirm(
|
||||||
|
this.$t('lesson.wellDelTrainingRule'),
|
||||||
|
this.$t('global.tips'),
|
||||||
|
{
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}
|
||||||
deleteTrainingRulesData(row.id).then(response => {
|
).then(() => {
|
||||||
|
deleteTrainingRulesData(row.id)
|
||||||
|
.then(response => {
|
||||||
this.$message.success(this.$t('lesson.deleteSuccess'));
|
this.$message.success(this.$t('lesson.deleteSuccess'));
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$messageBox(this.$t('error.deleteFailed'));
|
this.$messageBox(this.$t('error.deleteFailed'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
turnback() {
|
turnback() {
|
||||||
this.$router.go(-1)
|
this.$router.go(-1);
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload();
|
this.queryList.reload();
|
||||||
@ -264,9 +320,9 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
.draft {
|
.draft {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag :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" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
@ -31,8 +38,20 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'skinCodeFrom', label: this.$t('lesson.skinTypeFrom'), type: 'select', required: true, options: this.skinCodeList },
|
{
|
||||||
{ prop: 'skinCodeTo', label: this.$t('lesson.skinTypeTo'), type: 'select', required: true, options: this.skinCodeList }
|
prop: 'skinCodeFrom',
|
||||||
|
label: this.$t('lesson.skinTypeFrom'),
|
||||||
|
type: 'select',
|
||||||
|
required: true,
|
||||||
|
options: this.skinCodeList
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'skinCodeTo',
|
||||||
|
label: this.$t('lesson.skinTypeTo'),
|
||||||
|
type: 'select',
|
||||||
|
required: true,
|
||||||
|
options: this.skinCodeList
|
||||||
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -40,10 +59,18 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const crules = {
|
const crules = {
|
||||||
skinCodeFrom: [
|
skinCodeFrom: [
|
||||||
{ required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' }
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('rules.inputSkinType'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
skinCodeTo: [
|
skinCodeTo: [
|
||||||
{ required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' }
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('rules.inputSkinType'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
@ -79,7 +106,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$alert(this.$t('lesson.countSkinCode'), this.$t('global.tips'), {
|
this.$alert(this.$t('lesson.countSkinCode'), this.$t('global.tips'), {
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
callback: () => { }
|
callback: () => {}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -87,14 +114,18 @@ export default {
|
|||||||
create() {
|
create() {
|
||||||
const self = this;
|
const self = this;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
postOperateSaveAs(this.formModel.skinCodeFrom, this.formModel.skinCodeTo).then(response => {
|
postOperateSaveAs(this.formModel.skinCodeFrom, this.formModel.skinCodeTo)
|
||||||
|
.then(response => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
self.$message.success(this.$t('lesson.batchCreateSuccess'));
|
self.$message.success(this.$t('lesson.batchCreateSuccess'));
|
||||||
self.handleClose();
|
self.handleClose();
|
||||||
self.$emit('reloadTable'); // 刷新列表
|
self.$emit('reloadTable'); // 刷新列表
|
||||||
}).catch(error => {
|
})
|
||||||
|
.catch(error => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
self.$message.error(`${this.$('error.batchCreateFailed')}:${error.message}`);
|
self.$message.error(
|
||||||
|
`${this.$('error.batchCreateFailed')}:${error.message}`
|
||||||
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div style="height: 100%; overflow-y: auto;">
|
||||||
|
<!-- <div style="height: calc(100% - 80px); overflow-y: auto;"> -->
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
|
<!-- </div> -->
|
||||||
<training-draft
|
<training-draft
|
||||||
ref="draftTrain"
|
ref="draftTrain"
|
||||||
:skin-code-list="skinCodeList"
|
:skin-code-list="skinCodeList"
|
||||||
@ -252,7 +254,7 @@ export default {
|
|||||||
this.$router.push({ path: `${UrlConfig.display}/manage`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/manage`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(this.$t('error.createSimulationFailed') +error.message);
|
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
|
Loading…
Reference in New Issue
Block a user