用户实训统计,用户仿真统计 产品类型修改

This commit is contained in:
joylink_cuiweidong 2019-12-26 16:32:03 +08:00
parent 8e82ceab27
commit cd5e923c52
4 changed files with 216 additions and 246 deletions

View File

@ -14,7 +14,6 @@ import ConstConfig from '@/scripts/ConstConfig';
import { postSimulationStats } from '@/api/simulation';
import { getDimUserList } from '@/api/management/user';
import { getPublishMapList } from '@/api/jmap/map';
import { getCommodityMapProduct } from '@/api/management/mapprd';
export default {
name: 'UsersTrainingAdd',
@ -35,7 +34,6 @@ export default {
duration: ''
},
LessonList: [],
mapPrdList: [],
UserList: [],
UserLoading: false
};
@ -51,7 +49,7 @@ export default {
const form = {
labelWidth: '120px',
items: [
{ prop: 'mapId', label: this.$t('system.mapName'), type: 'select', required: true, options: this.LessonList, change: true, onChange: this.mapChange, placeholder: this.$t('rules.mapInput') },
{ prop: 'mapId', label: this.$t('system.mapName'), type: 'select', required: true, options: this.LessonList, placeholder: this.$t('rules.mapInput') },
{ prop: 'prdType', label: this.$t('system.productType'), type: 'select', required: true, options: this.prdTypeList, placeholder: this.$t('rules.productTypeInput') },
{ prop: 'userName', label: this.$t('system.userName'), type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: this.$t('system.pleaseInputNames') },
{ prop: 'duration', label: this.$t('system.trainingUseTime'), type: 'text', rightWidth: true, required: true, message: 's' }
@ -131,21 +129,6 @@ export default {
prdSelect(item) {
this.formModel.userId = item.id;
},
async mapChange(val) {
this.mapPrdList = [];
this.formModel.prdType = '';
try {
const res = await getCommodityMapProduct(val);
const data = res.data;
if (data && data.length) {
data.forEach(elem => {
this.mapPrdList.push({ value: elem.id, label: elem.name });
});
}
} catch (error) {
console.error(error);
}
},
show(data) {
this.dialogVisible = true;
},

View File

@ -8,7 +8,6 @@
<script>
import { getSimulationList, deleteSimulationStats } from '@/api/simulation';
import { getPublishLessonList } from '@/api/jmap/lesson';
import UsersTrainingEdit from './edit';
import UsersTrainingAdd from './add';
@ -21,7 +20,6 @@ export default {
data() {
return {
examResultList: [],
LessonList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
@ -73,7 +71,7 @@ export default {
type: 'button',
title: this.$t('global.operate'),
width: '250',
hide: (row) => { return !row.fake; },
showControl: (row) => { return !row.fake; },
buttons: [
{
name: this.$t('global.edit'),
@ -97,19 +95,8 @@ export default {
};
},
created() {
this.loadInitData();
},
methods: {
async loadInitData() {
debugger;
const response = await getPublishLessonList();
const data = response.data;
if (data && data.length) {
data.forEach(elem => {
this.LessonList.push({ value: elem.prdId, name: elem.name });
});
}
},
createTraining() {
this.$refs.add.show();
},