Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
662ea6c87b
@ -94,7 +94,7 @@
|
||||
:ref="name"
|
||||
v-model="formModel[name]"
|
||||
:multiple="field.config.multiple"
|
||||
clearable
|
||||
:clearable="!field.config.noClear"
|
||||
:placeholder="field.placeholder || $t('global.choose')"
|
||||
filterable
|
||||
@change="selectChange(field, formModel)"
|
||||
@ -293,6 +293,7 @@ export default {
|
||||
// 获取默认查询参数
|
||||
initQueryModel() {
|
||||
this.formModel = localStore.get(this.$route.path) || this.formModel;
|
||||
this.buildForm();
|
||||
if (typeof this.queryForm.initLoadCallback === 'function') {
|
||||
this.queryForm.initLoadCallback(this.formModel);
|
||||
}
|
||||
@ -304,7 +305,6 @@ export default {
|
||||
this.exportFlag = this.queryForm.canExport;
|
||||
this.resetShow = this.queryForm.reset;
|
||||
this.buildQueryField();
|
||||
this.buildForm();
|
||||
},
|
||||
// 构建查询表单对象、显示的查询对象
|
||||
buildForm() {
|
||||
@ -342,13 +342,12 @@ export default {
|
||||
if (this.queryForm.queryObject.show === false) {
|
||||
continue;
|
||||
} else if (this.queryForm.queryObject.visible === false) {
|
||||
model[item] = this.queryForm.queryObject[item].value;
|
||||
model[item] = this.formModel[item] || this.queryForm.queryObject[item].value;
|
||||
} else {
|
||||
queryObject[item] = this.queryForm.queryObject[item];
|
||||
model[item] = this.queryForm.queryObject[item].value || getDefaultValueByField(this.queryForm.queryObject[item]);
|
||||
model[item] = this.formModel[item] || this.queryForm.queryObject[item].value || getDefaultValueByField(this.queryForm.queryObject[item]);
|
||||
}
|
||||
}
|
||||
|
||||
this.queryObject = queryObject;
|
||||
this.formModel = model;
|
||||
},
|
||||
|
@ -117,9 +117,6 @@ const PermissionCreate = () => import('@/views/orderauthor/permission/create/ind
|
||||
const UserRules = () => import('@/views/orderauthor/rules/index');
|
||||
const UserRulesDetail = () => import('@/views/orderauthor/rules/detail');
|
||||
|
||||
const LessonApproval = () => import('@/views/approval/lesson/index');
|
||||
const ScriptApproval = () => import('@/views/approval/script/index');
|
||||
const RunPlanApproval = () => import('@/views/approval/runPlan/index');
|
||||
const DeviceManage = () => import('@/views/system/deviceManage/index');
|
||||
const MapSort = () => import('@/views/publish/publishMap/mapSort');
|
||||
const StudentManage = () => import('@/views/studentManage');
|
||||
@ -140,6 +137,7 @@ const JsxtApply = () => import('@/views/jsxt/apply/index');
|
||||
// const theoryManage = () => import('@/views/jsxt/competition/theory/index');
|
||||
const RefereeList = () => import('@/views/jsxt/refereeList/index');
|
||||
const RefereeDisplay = () => import('@/views/jsxt/refereeList/display');
|
||||
const Approval = () => import('@/views/approval/index');
|
||||
|
||||
import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
// import { getSessionStorage } from '@/utils/auth';
|
||||
@ -793,6 +791,13 @@ export const asyncRouter = [
|
||||
meta: {
|
||||
i18n: 'router.configLine'
|
||||
}
|
||||
},
|
||||
{// 发布申请
|
||||
path: 'approval',
|
||||
component: Approval,
|
||||
meta: {
|
||||
i18n: 'router.releaseApplication'
|
||||
}
|
||||
}
|
||||
// {
|
||||
// path: 'deviceManage',
|
||||
@ -803,37 +808,6 @@ export const asyncRouter = [
|
||||
// }
|
||||
]
|
||||
},
|
||||
{ // 发布申请
|
||||
path: '/apply',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.releaseApplication',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'lesson',
|
||||
component: LessonApproval,
|
||||
meta: {
|
||||
i18n: 'router.courseApplication'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'script',
|
||||
component: ScriptApproval,
|
||||
meta: {
|
||||
i18n: 'router.scriptReleaseApplication'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'runGraph',
|
||||
component: RunPlanApproval,
|
||||
meta: {
|
||||
i18n: 'router.runGraphReleaseApplication'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 新个人地图
|
||||
path: '/design',
|
||||
component: Layout,
|
||||
|
@ -103,11 +103,9 @@ const PermissionCreate = () => import('@/views/orderauthor/permission/create/ind
|
||||
const UserRules = () => import('@/views/orderauthor/rules/index');
|
||||
const UserRulesDetail = () => import('@/views/orderauthor/rules/detail');
|
||||
|
||||
const LessonApproval = () => import('@/views/approval/lesson/index');
|
||||
const ScriptApproval = () => import('@/views/approval/script/index');
|
||||
const RunPlanApproval = () => import('@/views/approval/runPlan/index');
|
||||
const DeviceManage = () => import('@/views/system/deviceManage/index');
|
||||
const MapSort = () => import('@/views/publish/publishMap/mapSort');
|
||||
const Approval = () => import('@/views/approval/index');
|
||||
|
||||
// import { loginInfo } from '@/scripts/ProjectConfig';
|
||||
// import { getSessionStorage } from '@/utils/auth';
|
||||
@ -716,36 +714,12 @@ export const asyncRouter = [
|
||||
meta: {
|
||||
i18n: 'router.deviceManage'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{// 发布申请
|
||||
path: '/apply',
|
||||
component: Layout,
|
||||
path: 'approval',
|
||||
component: Approval,
|
||||
meta: {
|
||||
i18n: 'router.releaseApplication',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'lesson',
|
||||
component: LessonApproval,
|
||||
meta: {
|
||||
i18n: 'router.courseApplication'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'script',
|
||||
component: ScriptApproval,
|
||||
meta: {
|
||||
i18n: 'router.scriptReleaseApplication'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'runGraph',
|
||||
component: RunPlanApproval,
|
||||
meta: {
|
||||
i18n: 'router.runGraphReleaseApplication'
|
||||
i18n: 'router.releaseApplication'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
527
src/views/approval/index.vue
Normal file
527
src/views/approval/index.vue
Normal file
@ -0,0 +1,527 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<el-dialog v-dialogDrag :title="this.$t('approval.explanation')" :visible.sync="dialogFormVisible" width="500px" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="rejectCancel">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="rejectConfirm">{{ $t('global.confirm') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<lesson-detail ref="lessonDetail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {adminPublishLesson, rejectedLessonRelease, reviewLessonList, reviewScriptList, publishScript, rejectScript, reviewRunPlanList, publishRunPlan, rejectRunPlan, previewRunPlan} from '@/api/designPlatform';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import { scriptDraftRecordNotify } from '@/api/simulation';
|
||||
import LessonDetail from './detail';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'Approval',
|
||||
components: {
|
||||
LessonDetail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogFormVisible: false,
|
||||
rejectId: '',
|
||||
passId: '',
|
||||
formModel: {
|
||||
explanation: ''
|
||||
},
|
||||
approvalType: 'lesson',
|
||||
mapList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryApprovalList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('lesson.courseName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.map'),
|
||||
prop: 'mapId ',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.courseDescription'),
|
||||
prop: 'remarks'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applicant'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applyTime'),
|
||||
prop: 'uploadTime',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '400',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('approval.lookOver'),
|
||||
handleClick: this.goDetail,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.applyPassed'),
|
||||
handleClick: this.pass,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.applyReject'),
|
||||
handleClick: this.noPass,
|
||||
type: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
form: {
|
||||
labelWidth: '80px',
|
||||
items: [
|
||||
{ prop: 'explanation', label: this.$t('approval.explanation'), type: 'textarea', required: true}
|
||||
]
|
||||
},
|
||||
rules: {
|
||||
explanation: [
|
||||
{ required: true, message: this.$t('rules.enterRejectReason'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
queryForm() {
|
||||
if (this.approvalType === 'script') {
|
||||
return {
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
initLoadCallback: this.initLoadCallback,
|
||||
queryObject: {
|
||||
approvalType: {
|
||||
type: 'select',
|
||||
label: '申请类型:',
|
||||
config: {
|
||||
data: [{ label: '课程申请', value: 'lesson' }, { label: '剧本申请', value: 'script'}, { label: '运行图申请', value: 'runPlan' }],
|
||||
noClear: true
|
||||
},
|
||||
default: 'lesson',
|
||||
selectChange: this.approvalTypeChange
|
||||
},
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('approval.map') + this.$t('global.colon'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'name':{
|
||||
type: 'text',
|
||||
label: this.$t('approval.scriptName')
|
||||
},
|
||||
'creatorName': {
|
||||
type: 'text',
|
||||
label: this.$t('approval.applicant')
|
||||
}
|
||||
}
|
||||
};
|
||||
} else if (this.approvalType === 'runPlan') {
|
||||
return {
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
approvalType: {
|
||||
type: 'select',
|
||||
label: '申请类型:',
|
||||
config: {
|
||||
data: [{ label: '课程申请', value: 'lesson' }, { label: '剧本申请', value: 'script'}, { label: '运行图申请', value: 'runPlan' }],
|
||||
noClear: true
|
||||
},
|
||||
default: 'lesson',
|
||||
selectChange: this.approvalTypeChange
|
||||
},
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('approval.map'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'name':{
|
||||
type: 'text',
|
||||
label: this.$t('approval.runPlanName')
|
||||
},
|
||||
'creatorName': {
|
||||
type: 'text',
|
||||
label: this.$t('approval.applicant')
|
||||
}
|
||||
}
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
initLoadCallback: this.initLoadCallback,
|
||||
queryObject: {
|
||||
approvalType: {
|
||||
type: 'select',
|
||||
label: '申请类型:',
|
||||
config: {
|
||||
data: [{ label: '课程申请', value: 'lesson' }, { label: '剧本申请', value: 'script'}, { label: '运行图申请', value: 'runPlan' }],
|
||||
noClear: true
|
||||
},
|
||||
default: 'lesson',
|
||||
selectChange: this.approvalTypeChange
|
||||
},
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('approval.map') + this.$t('global.colon'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
lessonName: {
|
||||
type: 'text',
|
||||
label: '课程名称:'
|
||||
},
|
||||
userName: {
|
||||
type: 'text',
|
||||
label: this.$t('approval.applicant') + this.$t('global.colon')
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
approvalType() {
|
||||
if (this.approvalType === 'lesson') {
|
||||
this.queryList.columns = [
|
||||
{
|
||||
title: this.$t('lesson.courseName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.map'),
|
||||
prop: 'mapId ',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.courseDescription'),
|
||||
prop: 'remarks'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applicant'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applyTime'),
|
||||
prop: 'uploadTime',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '400',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('approval.lookOver'),
|
||||
handleClick: this.goDetail,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.applyPassed'),
|
||||
handleClick: this.pass,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.applyReject'),
|
||||
handleClick: this.noPass,
|
||||
type: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
} else if (this.approvalType === 'script') {
|
||||
this.queryList.columns = [
|
||||
{
|
||||
title: this.$t('approval.scriptName'),
|
||||
width:250,
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.map'),
|
||||
prop: 'mapId ',
|
||||
width:250,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.scriptDescription'),
|
||||
prop: 'description'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applicant'),
|
||||
prop: 'creatorName'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applyTime'),
|
||||
prop: 'uploadTime',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '450',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('approval.applyPassed'),
|
||||
handleClick: this.scriptPass,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.applyReject'),
|
||||
handleClick: this.noPass,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.scriptPreview'),
|
||||
handleClick: this.scriptPreview,
|
||||
type: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
} else if (this.approvalType === 'runPlan') {
|
||||
this.queryList.columns = [
|
||||
{
|
||||
title: this.$t('approval.runPlanName'),
|
||||
width:250,
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.map'),
|
||||
prop: 'mapId ',
|
||||
width:250,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applicant'),
|
||||
prop: 'creatorName'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applyTime'),
|
||||
prop: 'uploadTime',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '450',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('approval.applyPassed'),
|
||||
handleClick: this.runPlanPassed,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.applyReject'),
|
||||
handleClick: this.noPass,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.runPlanPreview'),
|
||||
handleClick: this.runPlanPreview,
|
||||
type: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
getPublishMapListOnline().then(response=>{
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
goDetail(index, row) {
|
||||
this.$refs.lessonDetail.show(row.id);
|
||||
},
|
||||
queryApprovalList(params) {
|
||||
if (this.approvalType === 'lesson') {
|
||||
return reviewLessonList(params);
|
||||
} else if (this.approvalType === 'script') {
|
||||
return reviewScriptList(params);
|
||||
} else if (this.approvalType === 'runPlan') {
|
||||
return reviewRunPlanList(params);
|
||||
} else { return reviewLessonList(params); }
|
||||
},
|
||||
initLoadCallback(form) {
|
||||
form.approvalType = 'lesson';
|
||||
},
|
||||
pass(index, row) {
|
||||
this.$confirm(this.$t('tip.publishTheCourseHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const params = {
|
||||
cityCode: row.cityCode,
|
||||
mapId: row.mapId,
|
||||
name: row.name,
|
||||
prdType: row.prdType
|
||||
};
|
||||
adminPublishLesson(params, row.id).then(response => {
|
||||
this.$message.success(this.$t('tip.coursePublishSuccessful'));
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.coursePublishFailed'));
|
||||
});
|
||||
});
|
||||
},
|
||||
noPass(index, row) {
|
||||
this.form = {
|
||||
labelWidth: '80px',
|
||||
items: [
|
||||
{ prop: 'explanation', label: this.$t('approval.explanation'), type: 'textarea', required: true}
|
||||
]
|
||||
};
|
||||
this.dialogFormVisible = true;
|
||||
this.rejectId = row.id;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogFormVisible = false;
|
||||
this.rejectId = '';
|
||||
this.passId = '';
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
this.$refs.dataform.resetForm();
|
||||
},
|
||||
rejectConfirm() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
if (this.rejectId && this.approvalType === 'lesson') {
|
||||
rejectedLessonRelease(this.formModel, this.rejectId).then(resp =>{
|
||||
this.$message.success(this.$t('tip.rejectedCourseReleaseApplicationSuccessful'));
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.rejectedCourseReleaseApplicationSuccessful'));
|
||||
this.doClose();
|
||||
});
|
||||
} else if (this.rejectId && this.approvalType === 'script') {
|
||||
rejectScript(this.rejectId, this.formModel).then(resp => {
|
||||
this.$message.success(this.$t('approval.rejectScriptSuccess'));
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.$messageBox(`${this.$t('approval.rejectScriptFailed')}: ${error.message}`);
|
||||
this.doClose();
|
||||
});
|
||||
} else if (this.rejectId && this.approvalType === 'runPlan') {
|
||||
rejectRunPlan(this.rejectId, this.formModel).then(resp => {
|
||||
this.$message.success(this.$t('approval.rejectRunPlanSuccess'));
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.$messageBox(`${this.$t('approval.rejectRunPlanFailed')}: ${error.message}`);
|
||||
this.doClose();
|
||||
});
|
||||
} else if (this.passId && this.approvalType === 'runPlan') {
|
||||
publishRunPlan(this.passId, this.formModel).then(resp => {
|
||||
if (resp.data.length <= 0) {
|
||||
this.$message.success(this.$t('approval.passedRunPlanSuccess'));
|
||||
} else {
|
||||
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${resp.data[0]}`);
|
||||
}
|
||||
this.doClose();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${error.message}`);
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
rejectCancel() {
|
||||
this.dialogFormVisible = false;
|
||||
this.rejectId = '';
|
||||
this.textarea = '';
|
||||
},
|
||||
approvalTypeChange(form) {
|
||||
this.approvalType = form.approvalType;
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
},
|
||||
runPlanPreview(index, row) {
|
||||
previewRunPlan(row.id).then(resp => {
|
||||
const query = {
|
||||
prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id, from:''
|
||||
};
|
||||
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message);
|
||||
});
|
||||
},
|
||||
runPlanPassed(index, row) {
|
||||
this.form = {
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'runPlanName', label: this.$t('approval.runPlanName'), type: 'text', required: true}
|
||||
]
|
||||
};
|
||||
this.dialogFormVisible = true;
|
||||
this.passId = row.id;
|
||||
},
|
||||
scriptPass(index, row) {
|
||||
publishScript(row.id).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('approval.passedScriptSuccess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('approval.passedScriptFailed')}: ${error.message}`);
|
||||
});
|
||||
},
|
||||
scriptPreview(index, row) {
|
||||
const mapInfo = this.mapList.find(elem=>{ return elem.id == row.mapId; });
|
||||
scriptDraftRecordNotify(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:mapInfo.lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/
|
||||
.el-row .el-button+.el-button{
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
@ -1,193 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<el-dialog v-dialogDrag :title="this.$t('approval.explanation')" :visible.sync="dialogFormVisible">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="rejectCancel">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="rejectConfirm">{{ $t('global.confirm') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<lesson-detail ref="lessonDetail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {adminPublishLesson, rejectedLessonRelease, reviewLessonList} from '@/api/designPlatform';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import LessonDetail from './detail';
|
||||
|
||||
export default {
|
||||
name: 'LessonApproval',
|
||||
components: {
|
||||
LessonDetail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogFormVisible: false,
|
||||
rejectId: '',
|
||||
formModel: {
|
||||
explanation: ''
|
||||
},
|
||||
mapList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('approval.map') + this.$t('global.colon'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
lessonName: {
|
||||
type: 'text',
|
||||
label: this.$t('lesson.courseName')
|
||||
},
|
||||
userName: {
|
||||
type: 'text',
|
||||
label: this.$t('approval.applicant') + this.$t('global.colon')
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: reviewLessonList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('lesson.courseName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.map'),
|
||||
prop: 'mapId ',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.courseDescription'),
|
||||
prop: 'remarks'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applicant'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applyTime'),
|
||||
prop: 'uploadTime',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '400',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('approval.lookOver'),
|
||||
handleClick: this.goDetail,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.applyPassed'),
|
||||
handleClick: this.pass,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.applyReject'),
|
||||
handleClick: this.noPass,
|
||||
type: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
form: {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop: 'explanation', label: this.$t('approval.explanation'), type: 'textarea', required: true}
|
||||
]
|
||||
},
|
||||
rules: {
|
||||
explanation: [
|
||||
{ required: true, message: this.$t('rules.enterRejectReason'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
getPublishMapListOnline().then(response=>{
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
goDetail(index, row) {
|
||||
this.$refs.lessonDetail.show(row.id);
|
||||
},
|
||||
pass(index, row) {
|
||||
this.$confirm(this.$t('tip.publishTheCourseHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const params = {
|
||||
cityCode: row.cityCode,
|
||||
mapId: row.mapId,
|
||||
name: row.name,
|
||||
prdType: row.prdType
|
||||
};
|
||||
adminPublishLesson(params, row.id).then(response => {
|
||||
this.$message.success(this.$t('tip.coursePublishSuccessful'));
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.coursePublishFailed'));
|
||||
});
|
||||
});
|
||||
},
|
||||
noPass(index, row) {
|
||||
this.dialogFormVisible = true;
|
||||
this.rejectId = row.id;
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
},
|
||||
rejectConfirm() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
if (this.rejectId) {
|
||||
rejectedLessonRelease(this.formModel, this.rejectId).then(resp =>{
|
||||
this.$message.success(this.$t('tip.rejectedCourseReleaseApplicationSuccessful'));
|
||||
this.dialogFormVisible = false;
|
||||
this.rejectId = '';
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.rejectedCourseReleaseApplicationSuccessful'));
|
||||
this.dialogFormVisible = false;
|
||||
this.rejectId = '';
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
rejectCancel() {
|
||||
this.dialogFormVisible = false;
|
||||
this.rejectId = '';
|
||||
this.textarea = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/
|
||||
.el-row .el-button+.el-button{
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
@ -1,166 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<run-plan-operate ref="applyPassed" :title="$t('approval.passedRunPlan')" type="applyPassed" @reloadTable="reloadTable" @create="handleConfirmPass" />
|
||||
<run-plan-operate ref="applyReject" :title="$t('approval.rejectRunPlan')" type="applyReject" @reloadTable="reloadTable" @create="handleConfirmReject" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import RunPlanOperate from './operate';
|
||||
import { reviewRunPlanList, publishRunPlan, rejectRunPlan, previewRunPlan } from '@/api/designPlatform';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'RunPlanApproval',
|
||||
components: {
|
||||
RunPlanOperate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
mapList:[],
|
||||
queryForm: {
|
||||
labelWidth: '150px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('approval.map'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'name':{
|
||||
type: 'text',
|
||||
label: this.$t('approval.runPlanName')
|
||||
},
|
||||
'creatorName': {
|
||||
type: 'text',
|
||||
label: this.$t('approval.applicant')
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('approval.runPlanName'),
|
||||
width:250,
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.map'),
|
||||
prop: 'mapId ',
|
||||
width:250,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applicant'),
|
||||
prop: 'creatorName'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applyTime'),
|
||||
prop: 'uploadTime',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '450',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('approval.applyPassed'),
|
||||
handleClick: this.applyPassed,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.applyReject'),
|
||||
handleClick: this.applyReject,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.runPlanPreview'),
|
||||
handleClick: this.runPlanPreview,
|
||||
type: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
async loadInitData() {
|
||||
try {
|
||||
// 获取地图
|
||||
this.mapList = [];
|
||||
const res = await getPublishMapListOnline();
|
||||
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||
} catch (error) {
|
||||
console.error(error, '获取发布地图');
|
||||
}
|
||||
},
|
||||
queryFunction(params) {
|
||||
return reviewRunPlanList(params);
|
||||
},
|
||||
applyPassed(index, row) {
|
||||
this.$refs.applyPassed.doShow(row);
|
||||
},
|
||||
applyReject(index, row) {
|
||||
this.$refs.applyReject.doShow(row);
|
||||
},
|
||||
runPlanPreview(index, row) {
|
||||
previewRunPlan(row.id).then(resp => {
|
||||
const query = {
|
||||
prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id, from:''
|
||||
};
|
||||
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message);
|
||||
});
|
||||
},
|
||||
handleConfirmPass(data) {
|
||||
publishRunPlan(data.id, data).then(resp => {
|
||||
if (resp.data.length <= 0) {
|
||||
this.$message.success(this.$t('approval.passedRunPlanSuccess'));
|
||||
} else {
|
||||
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${resp.data[0]}`);
|
||||
}
|
||||
this.reloadTable();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${error.message}`);
|
||||
});
|
||||
},
|
||||
handleConfirmReject(data) {
|
||||
rejectRunPlan(data.id, data).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('approval.rejectRunPlanSuccess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('approval.rejectRunPlanFailed')}: ${error.message}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,96 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :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="doCreate">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'ScriptOperate',
|
||||
props: {
|
||||
title: {type:String, required:true},
|
||||
type: {type:String, required:true}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formModel:{
|
||||
runPlanName:'',
|
||||
id:'',
|
||||
explanation:''
|
||||
},
|
||||
isShow: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
let form = {};
|
||||
if (this.type == 'applyPassed') {
|
||||
form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop: 'runPlanName', label: this.$t('approval.runPlanName'), type: 'text', required: true}
|
||||
]
|
||||
};
|
||||
} else {
|
||||
form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
|
||||
{ prop: 'explanation', label: this.$t('approval.explanation'), type: 'textarea', required: true}
|
||||
]
|
||||
};
|
||||
}
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
let crules = {};
|
||||
if (this.type == 'applyPassed') {
|
||||
crules = {
|
||||
runPlanName: [
|
||||
{ required: true, message: this.$t('approval.inputRunPlanName'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
} else {
|
||||
crules = {
|
||||
explanation:[
|
||||
{ required: true, message: this.$t('approval.inputRejectExplanation'), trigger: 'blur', max:200 }
|
||||
]
|
||||
};
|
||||
}
|
||||
return crules;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(row) {
|
||||
if (this.type == 'applyPassed') {
|
||||
this.formModel.runPlanName = row.name;
|
||||
}
|
||||
this.formModel.id = row.id;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doCreate() {
|
||||
const self = this;
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
self.$emit('create', Object.assign({}, this.formModel));
|
||||
self.doClose();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.isShow = false;
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-dialog--center .el-dialog__body{
|
||||
padding: 15px 65px 10px 10px;
|
||||
}
|
||||
</style>
|
@ -1,171 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<script-operate ref="applyReject" :title="$t('approval.rejectScript')" @reloadTable="reloadTable" @create="handleConfirmReject" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { scriptDraftRecordNotify } from '@/api/simulation';
|
||||
import ScriptOperate from './operate';
|
||||
import { reviewScriptList, publishScript, rejectScript } from '@/api/designPlatform';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
export default {
|
||||
name: 'ScriptApproval',
|
||||
components: {
|
||||
ScriptOperate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
allMapList:[],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '100px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('approval.map'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'name':{
|
||||
type: 'text',
|
||||
label: this.$t('approval.scriptName')
|
||||
},
|
||||
'creatorName': {
|
||||
type: 'text',
|
||||
label: this.$t('approval.applicant')
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('approval.scriptName'),
|
||||
width:250,
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.map'),
|
||||
prop: 'mapId ',
|
||||
width:250,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.scriptDescription'),
|
||||
prop: 'description'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applicant'),
|
||||
prop: 'creatorName'
|
||||
},
|
||||
{
|
||||
title: this.$t('approval.applyTime'),
|
||||
prop: 'uploadTime',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '450',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('approval.applyPassed'),
|
||||
handleClick: this.applyPassed,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.applyReject'),
|
||||
handleClick: this.applyReject,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('approval.scriptPreview'),
|
||||
handleClick: this.scriptPreview,
|
||||
type: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
async loadInitData() {
|
||||
try {
|
||||
// 获取地图
|
||||
this.mapList = [];
|
||||
const res = await getPublishMapListOnline();
|
||||
this.allMapList = res.data;
|
||||
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||
} catch (error) {
|
||||
console.error(error, '获取发布地图');
|
||||
}
|
||||
},
|
||||
queryFunction(params) {
|
||||
return reviewScriptList(params);
|
||||
},
|
||||
applyPassed(index, row) {
|
||||
this.handleConfirmPass(row);
|
||||
},
|
||||
applyReject(index, row) {
|
||||
this.$refs.applyReject.doShow(row);
|
||||
},
|
||||
scriptPreview(index, row) {
|
||||
const mapInfo = this.allMapList.find(elem=>{ return elem.id == row.mapId; });
|
||||
scriptDraftRecordNotify(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:mapInfo.lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
},
|
||||
handleConfirmReject(data) {
|
||||
rejectScript(data.id, data).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('approval.rejectScriptSuccess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('approval.rejectScriptFailed')}: ${error.message}`);
|
||||
});
|
||||
},
|
||||
handleConfirmPass(data) {
|
||||
publishScript(data.id).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('approval.passedScriptSuccess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('approval.passedScriptFailed')}: ${error.message}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/
|
||||
.el-row .el-button+.el-button{
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
@ -1,70 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :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="doCreate">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'ScriptOperate',
|
||||
props: {
|
||||
title:{type:String, required:true}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formModel:{
|
||||
id:'',
|
||||
explanation:''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
|
||||
{ prop: 'explanation', label: this.$t('approval.explanation'), type: 'textarea', required: true}
|
||||
]
|
||||
};
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
const crules = {
|
||||
explanation:[
|
||||
{ required: true, message: this.$t('approval.inputRejectExplanation'), trigger: 'blur', max:200 }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(row) {
|
||||
this.formModel.id = row.id;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doCreate() {
|
||||
const self = this;
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
self.$emit('create', Object.assign({}, this.formModel));
|
||||
self.doClose();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-dialog--center .el-dialog__body{
|
||||
padding: 15px 65px 10px 10px;
|
||||
}
|
||||
</style>
|
@ -23,7 +23,7 @@ import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import PublishCreate from './lessoncategory/edit/create';
|
||||
import PublishLesson from './lessoncategory/edit/lesson/publish';
|
||||
import { delLesson } from '@/api/jmap/lessondraft';
|
||||
import LessonDetail from '@/views/approval/lesson/detail';
|
||||
import LessonDetail from '@/views/approval/detail';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
|
||||
export default {
|
||||
|
@ -552,9 +552,7 @@ export default {
|
||||
this.privateMessageList = [];
|
||||
this.quitLoading = false;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.tree) {
|
||||
this.$refs.tree.filter(this.queryMember);
|
||||
}
|
||||
this.$refs.tree && this.$refs.tree.filter(this.queryMember);
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message.error('退出会话失败!');
|
||||
@ -687,9 +685,7 @@ export default {
|
||||
this.conversitionMemberList = this.privateMemberList;
|
||||
this.messageList = [...this.privateMessageList];
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.tree) {
|
||||
this.$refs.tree.filter(this.queryMember);
|
||||
}
|
||||
this.$refs.tree && this.$refs.tree.filter(this.queryMember);
|
||||
});
|
||||
},
|
||||
clearAllData() {
|
||||
|
Loading…
Reference in New Issue
Block a user