|
|
@@ -1,6 +1,16 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
+ <el-form-item label="销售公司" prop="companyId">
|
|
|
+ <el-select filterable v-model="queryParams.companyId" clearable placeholder="请选择公司名" size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in companyList"
|
|
|
+ :key="item.companyId"
|
|
|
+ :label="item.companyName"
|
|
|
+ :value="item.companyId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="名称" prop="name">
|
|
|
<el-input
|
|
|
v-model="queryParams.name"
|
|
|
@@ -130,7 +140,17 @@
|
|
|
</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="课程" prop="courseId">
|
|
|
+ <el-form-item label="销售公司" prop="companyId">
|
|
|
+ <el-select filterable v-model="form.companyId" placeholder="请选择公司名" size="small" @change="loadUser">
|
|
|
+ <el-option
|
|
|
+ v-for="item in companyList"
|
|
|
+ :key="item.companyId"
|
|
|
+ :label="item.companyName"
|
|
|
+ :value="item.companyId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程ID" prop="courseId">
|
|
|
<el-select v-model="form.courseId" :disabled="form.id != null" placeholder="请选择课程" style=" margin-right: 10px;" size="mini">
|
|
|
<el-option
|
|
|
v-for="dict in courseList"
|
|
|
@@ -153,13 +173,13 @@
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="内容" style="margin-bottom: 2%">
|
|
|
- <el-input v-if="item.contentType == 1 ||item.contentType == 15" v-model="item.value" type="textarea" :rows="3"
|
|
|
+ <el-input v-if="item.contentType == 1 " v-model="item.value" type="textarea" :rows="3"
|
|
|
placeholder="内容" style="width: 90%;margin-top: 10px;"/>
|
|
|
|
|
|
<ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1" :width="150"
|
|
|
:height="150"/>
|
|
|
|
|
|
- <div v-if="item.contentType == 3 || item.contentType ==9">
|
|
|
+ <div v-if="item.contentType == 3 ">
|
|
|
<el-card class="box-card">
|
|
|
<el-form-item label="链接标题:" label-width="100px">
|
|
|
<el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
|
|
|
@@ -178,52 +198,7 @@
|
|
|
</el-card>
|
|
|
</div>
|
|
|
<div v-if="item.contentType == 4">
|
|
|
- <el-card class="box-card">
|
|
|
-
|
|
|
- <el-form-item label="选择课程">
|
|
|
- <el-select
|
|
|
- v-model="item.courseId"
|
|
|
- placeholder="请选择课程"
|
|
|
- style="margin-right: 10px"
|
|
|
- size="mini"
|
|
|
- @change="handleRuleCourseChange(item)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="dict in courseList"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="parseInt(dict.dictValue)"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- <el-select
|
|
|
- v-model="item.videoId"
|
|
|
- placeholder="请选择小节"
|
|
|
- size="mini"
|
|
|
- style="margin-right: 10px"
|
|
|
- filterable
|
|
|
- remote
|
|
|
- :remote-method="(query) => remoteMethodRuleVideo(query, item)"
|
|
|
- :loading="videoOptionsLoading"
|
|
|
- @change="handleRuleVideoChange(item)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="dict in videoOptions || []"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="parseInt(dict.dictValue)"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
|
|
|
- <el-card class="box-card" style="margin-top: 10px">
|
|
|
- <el-form-item label="标题" prop="miniprogramTitle">
|
|
|
- <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="封面" prop="miniprogramPicUrl">
|
|
|
- <ImageUpload v-model="item.miniprogramPicUrl" type="image" :num="10" :width="150" :height="150" />
|
|
|
- </el-form-item>
|
|
|
- </el-card>
|
|
|
- </el-card>
|
|
|
</div>
|
|
|
<div v-if="item.contentType == 5 ">
|
|
|
|
|
|
@@ -261,7 +236,7 @@
|
|
|
</video>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div v-if="item.contentType == 7 || item.contentType == 16">
|
|
|
+ <div v-if="item.contentType == 7 ">
|
|
|
<el-input
|
|
|
v-model="item.value"
|
|
|
type="textarea" :rows="3" maxlength="66" show-word-limit
|
|
|
@@ -269,44 +244,7 @@
|
|
|
@input="handleInputVideoText(item.value,item)"/>
|
|
|
</div>
|
|
|
<div v-if="item.contentType == 8">
|
|
|
- <el-button type="primary"
|
|
|
- style="margin-bottom: 1%"
|
|
|
- @click="hanldeSelectVideoNum(setting,index)">
|
|
|
- 选择视频号
|
|
|
- </el-button>
|
|
|
- <el-card class="box-card" v-if="item.coverUrl">
|
|
|
- <el-form-item label="封面标题:" label-width="100px">
|
|
|
- <el-input v-model="item.nickname"
|
|
|
- style="width: 90%;margin-bottom: 1%" disabled/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="头像:" label-width="100px">
|
|
|
- <el-image
|
|
|
- v-if="item.avatar != null"
|
|
|
- :src="item.avatar"
|
|
|
- :preview-src-list="[item.avatar]"
|
|
|
- :style="{ width: '50px', height: '50px' }"
|
|
|
- ></el-image>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="封面:" label-width="100px">
|
|
|
- <el-image
|
|
|
- v-if="item.coverUrl != null"
|
|
|
- :src="item.coverUrl"
|
|
|
- :preview-src-list="[item.coverUrl]"
|
|
|
- :style="{ width: '200px', height: '200px' }"
|
|
|
- ></el-image>
|
|
|
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="简介:" label-width="100px">
|
|
|
- <el-input type="textarea" :rows="3"
|
|
|
- v-model="item.desc"
|
|
|
- style="width: 90%;margin-top: 1%;" disabled/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="视频地址:" label-width="100px"
|
|
|
- style="margin-top: 1%">
|
|
|
- <el-input v-model="item.url"
|
|
|
- style="width: 90%;" disabled/>
|
|
|
- </el-form-item>
|
|
|
- </el-card>
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
@@ -335,13 +273,13 @@
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="内容" style="margin-bottom: 2%">
|
|
|
- <el-input v-if="item.contentType == 1 ||item.contentType == 15" v-model="item.value" type="textarea" :rows="3"
|
|
|
+ <el-input v-if="item.contentType == 1 " v-model="item.value" type="textarea" :rows="3"
|
|
|
placeholder="内容" style="width: 90%;margin-top: 10px;"/>
|
|
|
|
|
|
<ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1" :width="150"
|
|
|
:height="150"/>
|
|
|
|
|
|
- <div v-if="item.contentType == 3 || item.contentType ==9">
|
|
|
+ <div v-if="item.contentType == 3 ">
|
|
|
<el-card class="box-card">
|
|
|
<el-form-item label="链接标题:" label-width="100px">
|
|
|
<el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
|
|
|
@@ -360,52 +298,7 @@
|
|
|
</el-card>
|
|
|
</div>
|
|
|
<div v-if="item.contentType == 4">
|
|
|
- <el-card class="box-card">
|
|
|
-
|
|
|
- <el-form-item label="选择课程">
|
|
|
- <el-select
|
|
|
- v-model="item.courseId"
|
|
|
- placeholder="请选择课程"
|
|
|
- style="margin-right: 10px"
|
|
|
- size="mini"
|
|
|
- @change="handleRuleCourseChange(item)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="dict in courseList"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="parseInt(dict.dictValue)"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- <el-select
|
|
|
- v-model="item.videoId"
|
|
|
- placeholder="请选择小节"
|
|
|
- size="mini"
|
|
|
- style="margin-right: 10px"
|
|
|
- filterable
|
|
|
- remote
|
|
|
- :remote-method="(query) => remoteMethodRuleVideo(query, item)"
|
|
|
- :loading="videoOptionsLoading"
|
|
|
- @change="handleRuleVideoChange(item)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="dict in videoOptions || []"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="parseInt(dict.dictValue)"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
|
|
|
- <el-card class="box-card" style="margin-top: 10px">
|
|
|
- <el-form-item label="标题" prop="miniprogramTitle">
|
|
|
- <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="封面" prop="miniprogramPicUrl">
|
|
|
- <ImageUpload v-model="item.miniprogramPicUrl" type="image" :num="10" :width="150" :height="150" />
|
|
|
- </el-form-item>
|
|
|
- </el-card>
|
|
|
- </el-card>
|
|
|
</div>
|
|
|
<div v-if="item.contentType == 5 ">
|
|
|
|
|
|
@@ -443,7 +336,7 @@
|
|
|
</video>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div v-if="item.contentType == 7 || item.contentType == 16">
|
|
|
+ <div v-if="item.contentType == 7 ">
|
|
|
<el-input
|
|
|
v-model="item.value"
|
|
|
type="textarea" :rows="3" maxlength="66" show-word-limit
|
|
|
@@ -451,44 +344,7 @@
|
|
|
@input="handleInputVideoText(item.value,item)"/>
|
|
|
</div>
|
|
|
<div v-if="item.contentType == 8">
|
|
|
- <el-button type="primary"
|
|
|
- style="margin-bottom: 1%"
|
|
|
- @click="hanldeSelectVideoNum(setting,index)">
|
|
|
- 选择视频号
|
|
|
- </el-button>
|
|
|
- <el-card class="box-card" v-if="item.coverUrl">
|
|
|
- <el-form-item label="封面标题:" label-width="100px">
|
|
|
- <el-input v-model="item.nickname"
|
|
|
- style="width: 90%;margin-bottom: 1%" disabled/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="头像:" label-width="100px">
|
|
|
- <el-image
|
|
|
- v-if="item.avatar != null"
|
|
|
- :src="item.avatar"
|
|
|
- :preview-src-list="[item.avatar]"
|
|
|
- :style="{ width: '50px', height: '50px' }"
|
|
|
- ></el-image>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="封面:" label-width="100px">
|
|
|
- <el-image
|
|
|
- v-if="item.coverUrl != null"
|
|
|
- :src="item.coverUrl"
|
|
|
- :preview-src-list="[item.coverUrl]"
|
|
|
- :style="{ width: '200px', height: '200px' }"
|
|
|
- ></el-image>
|
|
|
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="简介:" label-width="100px">
|
|
|
- <el-input type="textarea" :rows="3"
|
|
|
- v-model="item.desc"
|
|
|
- style="width: 90%;margin-top: 1%;" disabled/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="视频地址:" label-width="100px"
|
|
|
- style="margin-top: 1%">
|
|
|
- <el-input v-model="item.url"
|
|
|
- style="width: 90%;" disabled/>
|
|
|
- </el-form-item>
|
|
|
- </el-card>
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
@@ -515,7 +371,7 @@
|
|
|
<span v-if="form.isAllCompanyUser == '1'" style="margin-left: 10px;color: #13ce66">是</span>
|
|
|
<span v-else style="margin-left: 10px;color: #ff4949">否</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="所属销售" prop="companyUserIds" v-if="!form.id && form.isAllCompanyUser == '2'">
|
|
|
+ <el-form-item label="所属销售" prop="companyUserIds" v-if="!form.id">
|
|
|
<el-select v-model="companyUserIds" remote multiple placeholder="请选择" filterable style="width: 100%;">
|
|
|
<el-option
|
|
|
v-for="dict in userList"
|
|
|
@@ -531,34 +387,22 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <el-dialog :title="videoNumOptions.title" :visible.sync="videoNumOptions.open" width="1500px" append-to-body>
|
|
|
- <userVideo ref="QwUserVideo" @videoResult="qwUserVideoResult"></userVideo>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {getCompanyList} from "@/api/company/company";
|
|
|
import { listCourseFinishTempParent, getCourseFinishTempParent, delCourseFinishTempParent, addCourseFinishTempParent, updateCourseFinishTempParent, exportCourseFinishTempParent } from "@/api/course/courseFinishTempParent";
|
|
|
-import {courseList, videoList} from '@/api/qw/sop'
|
|
|
+import {courseList} from '@/api/qw/sop'
|
|
|
import ImageUpload from '@/views/qw/sop/ImageUpload.vue'
|
|
|
import { getUserList } from '@/api/company/companyUser'
|
|
|
-import userVideo from "@/views/qw/userVideo/userVideo.vue";
|
|
|
|
|
|
|
|
|
export default {
|
|
|
name: "CourseFinishTempParent",
|
|
|
- components: { ImageUpload ,userVideo},
|
|
|
+ components: { ImageUpload },
|
|
|
data() {
|
|
|
return {
|
|
|
- videoOptionsLoading: false,
|
|
|
- videoOptions: [],
|
|
|
- videoLoading: false,
|
|
|
- videoNumOptions: {
|
|
|
- title: '选择视频号',
|
|
|
- open: false,
|
|
|
- content: null,
|
|
|
- contentIndex: null,
|
|
|
- },
|
|
|
voiceLoading: false,
|
|
|
uploadUrl: process.env.VUE_APP_BASE_API + "/common/uploadOSS2",
|
|
|
uploadUrlByVoice: process.env.VUE_APP_BASE_API + "/common/uploadOSSByHOOKVoice",
|
|
|
@@ -592,6 +436,7 @@ export default {
|
|
|
open: false,
|
|
|
// 模板表格数据
|
|
|
setting: [],
|
|
|
+ companyList: [],
|
|
|
chatSetting: [],
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
@@ -599,9 +444,10 @@ export default {
|
|
|
pageSize: 10,
|
|
|
name: null,
|
|
|
courseId: null,
|
|
|
+ companyId: null
|
|
|
},
|
|
|
// 表单参数
|
|
|
- form: {companyUserIds: [],},
|
|
|
+ form: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
name:[
|
|
|
@@ -628,92 +474,15 @@ export default {
|
|
|
this.getDicts("sys_qwSopAi_contentType").then(response => {
|
|
|
this.sysQwSopAiContentType = response.data;
|
|
|
});
|
|
|
- getUserList().then(response => {
|
|
|
- this.userList = response.data;
|
|
|
- });
|
|
|
courseList().then(response => {
|
|
|
this.courseList = response.list;
|
|
|
});
|
|
|
+ getCompanyList().then(response => {
|
|
|
+ this.companyList = response.data;
|
|
|
+ });
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
- // 处理规则中课程变化
|
|
|
- handleRuleCourseChange(item) {
|
|
|
- // 为当前规则项单独加载视频列表
|
|
|
- videoList(item.courseId).then((response) => {
|
|
|
- // 只保存视频列表,不保存整个响应对象
|
|
|
- this.videoOptions = response.list;
|
|
|
-
|
|
|
- this.$set(item, 'videoId', null); // Reset video selection when course changes
|
|
|
-
|
|
|
- // 自动设置封面为课程封面
|
|
|
- const selectedCourse = this.courseList.find(
|
|
|
- course => parseInt(course.dictValue) === item.courseId
|
|
|
- );
|
|
|
- if (selectedCourse) {
|
|
|
- this.$set(item, 'miniprogramPicUrl', selectedCourse.dictImgUrl);
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
- // 处理规则中视频变化
|
|
|
- handleRuleVideoChange(item) {
|
|
|
- if (!item.videoId) return;
|
|
|
-
|
|
|
- // 自动设置标题为视频标题
|
|
|
- const selectedVideo = (this.videoOptions || []).find(
|
|
|
- video => parseInt(video.dictValue) === item.videoId
|
|
|
- );
|
|
|
- if (selectedVideo) {
|
|
|
- this.$set(item, 'miniprogramTitle', selectedVideo.dictLabel);
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // 远程搜索规则中的视频
|
|
|
- remoteMethodRuleVideo(query, item) {
|
|
|
- if (!item.courseId) {
|
|
|
- this.$message.warning('请先选择课程');
|
|
|
- this.videoOptions = [];
|
|
|
- reject();
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- this.videoOptionsLoading = true;
|
|
|
- const data = query ? { title: query } : {};
|
|
|
-
|
|
|
- videoList(item.courseId, data).then((response) => {
|
|
|
- this.videoOptions = response.list;
|
|
|
- this.videoOptionsLoading = false;
|
|
|
- resolve(response);
|
|
|
- }).catch((error) => {
|
|
|
- this.videoOptionsLoading = false;
|
|
|
- reject(error);
|
|
|
- });
|
|
|
- },
|
|
|
- remoteMethodVideo(query) {
|
|
|
- if (!this.form.courseId) {
|
|
|
- this.$message.warning('请先选择课程');
|
|
|
- this.videoList = []; // 清空小节列表
|
|
|
- return;
|
|
|
- }
|
|
|
- if (query !== '') {
|
|
|
- this.videoLoading = true;
|
|
|
- // 这里调用接口搜索小节,假设 videoList 方法支持搜索参数
|
|
|
- var data = {
|
|
|
- title:query
|
|
|
- }
|
|
|
- videoList(this.form.courseId, data).then((response) => {
|
|
|
- this.videoList = response.list;
|
|
|
- this.videoLoading = false;
|
|
|
- });
|
|
|
- } else {
|
|
|
- // 如果查询为空,则加载全部
|
|
|
- videoList(this.form.courseId).then((response) => {
|
|
|
- this.videoList = response.list;
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
/** 查询完课模板列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
@@ -723,6 +492,11 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ loadUser(){
|
|
|
+ getUserList(this.form.companyId).then(response => {
|
|
|
+ this.userList = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
|
@@ -733,6 +507,7 @@ export default {
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
status: 1,
|
|
|
+ companyId: null,
|
|
|
name: null,
|
|
|
setting: [],
|
|
|
chatSetting: [],
|
|
|
@@ -742,10 +517,8 @@ export default {
|
|
|
updateBy: null,
|
|
|
updateTime: null,
|
|
|
companyUserIds: null,
|
|
|
- remark: null,
|
|
|
- isAllCompanyUser: 2
|
|
|
+ remark: null
|
|
|
};
|
|
|
- this.resetForm("form");
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
@@ -769,31 +542,6 @@ export default {
|
|
|
this.open = true;
|
|
|
this.title = "添加完课模板";
|
|
|
},
|
|
|
- //选择视频号
|
|
|
- hanldeSelectVideoNum(content, index) {
|
|
|
- this.videoNumOptions.content = content;
|
|
|
- this.videoNumOptions.contentIndex = index;
|
|
|
- this.videoNumOptions.open = true;
|
|
|
- },
|
|
|
-
|
|
|
- qwUserVideoResult(val) {
|
|
|
-
|
|
|
- // 根据选中的内容,将返回的数据更新到相应的表单项
|
|
|
- const content = this.videoNumOptions.content;
|
|
|
- const setList = content[this.videoNumOptions.contentIndex];
|
|
|
- setList.nickname = val.nickname;
|
|
|
- setList.avatar = val.avatar;
|
|
|
- setList.coverUrl = val.coverUrl;
|
|
|
- setList.thumbUrl = val.thumbUrl;
|
|
|
- setList.desc = val.desc;
|
|
|
- setList.url = val.url;
|
|
|
- setList.extras = val.extras;
|
|
|
- setList.videoId = val.id;
|
|
|
- console.info(setList)
|
|
|
-
|
|
|
- this.videoNumOptions.open = false;
|
|
|
-
|
|
|
- },
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
@@ -820,19 +568,7 @@ export default {
|
|
|
}
|
|
|
this.form.companyUserIds = this.companyUserIds.toString()
|
|
|
|
|
|
-
|
|
|
- const processedSetting = this.setting.map(item => {
|
|
|
- const newItem = {...item};
|
|
|
- if (newItem.videoOptions) {
|
|
|
- delete newItem.videoOptions;
|
|
|
- }
|
|
|
- if (newItem.videoLoading !== undefined) {
|
|
|
- delete newItem.videoLoading;
|
|
|
- }
|
|
|
- return newItem;
|
|
|
- });
|
|
|
-
|
|
|
- this.form.setting = JSON.stringify(processedSetting);
|
|
|
+ this.form.setting = JSON.stringify(this.setting)
|
|
|
this.form.chatSetting = JSON.stringify(this.chatSetting)
|
|
|
|
|
|
if (this.setting.length <= 0) {
|
|
|
@@ -868,7 +604,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
addCourseFinishTempParent(this.form).then(response => {
|
|
|
- // this.loading = true
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
@@ -881,30 +616,30 @@ export default {
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
this.$confirm('是否确认删除完课模板编号为"' + ids + '"的数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return delCourseFinishTempParent(ids);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return delCourseFinishTempParent(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ }).catch(() => {});
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|
|
|
this.$confirm('是否确认导出所有完课模板数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.exportLoading = true;
|
|
|
- return exportCourseFinishTempParent(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- this.exportLoading = false;
|
|
|
- }).catch(() => {});
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.exportLoading = true;
|
|
|
+ return exportCourseFinishTempParent(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ this.exportLoading = false;
|
|
|
+ }).catch(() => {});
|
|
|
},
|
|
|
|
|
|
|
|
|
@@ -985,7 +720,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
jump(id){
|
|
|
- this.$router.push('/qw/conversion/courseFinishTemp/' + id)
|
|
|
+ this.$router.push('/course/courseFinishTemp/' + id)
|
|
|
},
|
|
|
},
|
|
|
};
|