|
|
@ -7,39 +7,43 @@ |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
<el-form :disabled="isDetail" label-width="100px" label-suffix=":"> |
|
|
|
<el-form :model="form" :rules="rules" ref="form" :disabled="isDetail" label-width="110px" label-suffix=":"> |
|
|
|
<el-form-item label="课程名称"> |
|
|
|
<el-form-item prop="courseName" label="课程名称"> |
|
|
|
<div class="d-inline-block"> |
|
|
|
<div class="d-inline-block"> |
|
|
|
<el-input placeholder="请输入课程名称" v-model="form.name" clearable maxlength="25"></el-input> |
|
|
|
<el-input placeholder="请输入课程名称" v-model="form.courseName" clearable maxlength="25" @change="nameChange"></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="课程类型"> |
|
|
|
<el-form-item prop="courseType" label="课程类型"> |
|
|
|
<div class="d-inline-block"> |
|
|
|
<div class="d-inline-block"> |
|
|
|
<el-select v-model="form.classificationId" placeholder="请选择课程类型"> |
|
|
|
<el-select v-model="form.courseType" placeholder="请选择课程类型"> |
|
|
|
<el-option label="免费" value="1"></el-option> |
|
|
|
<el-option label="免费" :value="0"></el-option> |
|
|
|
|
|
|
|
<!-- <el-option label="付费" :value="1"></el-option> --> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="可见范围"> |
|
|
|
<el-form-item label="可见范围"> |
|
|
|
<div class="d-inline-block"> |
|
|
|
<div> |
|
|
|
<el-radio v-model="form.classificationId">本校</el-radio> |
|
|
|
<el-radio v-model="form.visibleRange" :label="1">全平台</el-radio> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
|
|
<el-radio v-model="form.visibleRange" :label="0">仅本校</el-radio> |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="课程分类"> |
|
|
|
<el-form-item prop="schoolClassificationsIds" label="课程分类"> |
|
|
|
<div class="d-inline-block"> |
|
|
|
<div class="d-inline-block"> |
|
|
|
<el-select v-model="form.classificationId" placeholder="请选择课程分类"> |
|
|
|
<el-select v-model="form.schoolClassificationsIds" placeholder="请选择课程分类" multiple> |
|
|
|
<el-option v-for="item in classificationList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
|
|
|
<el-option v-for="item in classificationList" :key="item.id" :label="item.classificationName" :value="item.id"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="平台课程分类"> |
|
|
|
<el-form-item prop="platformClassificationIds" label="平台课程分类"> |
|
|
|
<div class="d-inline-block"> |
|
|
|
<div class="d-inline-block"> |
|
|
|
<el-select v-model="form.classificationId" placeholder="平台请选择课程分类"> |
|
|
|
<el-select v-model="form.platformClassificationIds" placeholder="请选择平台课程分类" multiple> |
|
|
|
<el-option v-for="item in classificationList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
|
|
|
<el-option v-for="item in platformClassificationList" :key="item.id" :label="item.classificationName" :value="item.id"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="课程封面"> |
|
|
|
<el-form-item prop="coverUrl" label="课程封面"> |
|
|
|
<el-upload |
|
|
|
<el-upload |
|
|
|
class="avatar-uploader" |
|
|
|
class="avatar-uploader" |
|
|
|
accept=".jpg,.png,.jpeg" |
|
|
|
accept=".jpg,.png,.jpeg" |
|
|
@ -66,10 +70,10 @@ |
|
|
|
</el-upload> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="课程介绍"> |
|
|
|
<el-form-item label="课程介绍"> |
|
|
|
<quill :border="true" :readonly="isDetail" v-model="form.description" :height="400" /> |
|
|
|
<quill :border="true" :readonly="isDetail" v-model="form.courseIntroduction" :height="400" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" v-throttle @click="save" v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button> |
|
|
|
<el-button type="primary" @click="save" v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
@ -82,25 +86,116 @@ import Setting from "@/setting"; |
|
|
|
import quill from "@/components/quill"; |
|
|
|
import quill from "@/components/quill"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "courseAddEdit", |
|
|
|
|
|
|
|
data() { |
|
|
|
data() { |
|
|
|
|
|
|
|
const that = this |
|
|
|
return { |
|
|
|
return { |
|
|
|
headers: { |
|
|
|
headers: { |
|
|
|
token: util.local.get(Setting.tokenKey) |
|
|
|
token: util.local.get(Setting.tokenKey) |
|
|
|
}, |
|
|
|
}, |
|
|
|
isDetail: Boolean(this.$route.query.show), |
|
|
|
isDetail: Boolean(this.$route.query.show), |
|
|
|
form: { |
|
|
|
form: { |
|
|
|
id: this.$route.query.id, |
|
|
|
id: this.$route.query.id, |
|
|
|
classificationId: '', |
|
|
|
courseIntroduction: '', |
|
|
|
|
|
|
|
courseName: '', |
|
|
|
|
|
|
|
courseType: 0, |
|
|
|
coverUrl: '', |
|
|
|
coverUrl: '', |
|
|
|
name: '', |
|
|
|
platformSource: Setting.platformSource, |
|
|
|
description: '', |
|
|
|
platformClassificationIds: [], |
|
|
|
distinguish: 1 |
|
|
|
schoolClassificationsIds: [], |
|
|
|
|
|
|
|
visibleRange: 1 |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
rules: { |
|
|
|
|
|
|
|
courseName: [ |
|
|
|
|
|
|
|
{ required: true, message: '请输入课程名称', trigger: 'blur' } |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
// platformClassificationIds: [ |
|
|
|
|
|
|
|
// { required: true, message: '请选择课程分类', trigger: 'change' } |
|
|
|
|
|
|
|
// ], |
|
|
|
|
|
|
|
coverUrl: [ |
|
|
|
|
|
|
|
{ required: true, message: '请选择课程封面', trigger: 'change' } |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
platformClassificationList: [], |
|
|
|
classificationList: [], |
|
|
|
classificationList: [], |
|
|
|
uploadList: [], |
|
|
|
uploadList: [], |
|
|
|
submiting: false, |
|
|
|
submiting: false, |
|
|
|
updateTime: 0 |
|
|
|
updateTime: 0, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rangeVisible: false, |
|
|
|
|
|
|
|
range: [], |
|
|
|
|
|
|
|
rangeInit: [], |
|
|
|
|
|
|
|
rangeName: '', |
|
|
|
|
|
|
|
rangeChecked: [], |
|
|
|
|
|
|
|
schools: [], |
|
|
|
|
|
|
|
rangeList: [], |
|
|
|
|
|
|
|
rangeTimer: null, |
|
|
|
|
|
|
|
// 选择区域懒加载 |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
multiple: true, |
|
|
|
|
|
|
|
checkStrictly: true, |
|
|
|
|
|
|
|
lazy: true, |
|
|
|
|
|
|
|
lazyLoad (node, resolve) { |
|
|
|
|
|
|
|
// 如果是在模糊搜索中,则不再用懒加载请求数据 |
|
|
|
|
|
|
|
const input = document.querySelector('.el-cascader__search-input') |
|
|
|
|
|
|
|
const checked = that.rangeChecked |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (input && input.value.trim()) { |
|
|
|
|
|
|
|
const val = input.value.trim() |
|
|
|
|
|
|
|
return that.schools.filter(e => e.label.includes(val)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { level, value } = node |
|
|
|
|
|
|
|
// 省份 |
|
|
|
|
|
|
|
if (!level) { |
|
|
|
|
|
|
|
that.$get(that.api.queryProvince).then(({ list }) => { |
|
|
|
|
|
|
|
const data = [] |
|
|
|
|
|
|
|
list.map(e => { |
|
|
|
|
|
|
|
e.value = e.provinceId |
|
|
|
|
|
|
|
e.label = e.provinceName |
|
|
|
|
|
|
|
e.children = [] |
|
|
|
|
|
|
|
e.disabled = !!checked.find(n => n.provinceId == e.provinceId && !n.cityId) |
|
|
|
|
|
|
|
data.push(e) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
resolve(data) |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
} else if (level === 1) { |
|
|
|
|
|
|
|
// 城市 |
|
|
|
|
|
|
|
that.$get(that.api.queryCity, { |
|
|
|
|
|
|
|
provinceId: value |
|
|
|
|
|
|
|
}).then(({ list }) => { |
|
|
|
|
|
|
|
const data = [] |
|
|
|
|
|
|
|
list.map(e => { |
|
|
|
|
|
|
|
e.value = e.cityId |
|
|
|
|
|
|
|
e.label = e.cityName |
|
|
|
|
|
|
|
e.children = [] |
|
|
|
|
|
|
|
e.disabled = !!checked.find(n => n.cityId == e.cityId && n.provinceId == e.provinceId && !n.schoolId) |
|
|
|
|
|
|
|
data.push(e) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
resolve(data) |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
} else if (level === 2) { |
|
|
|
|
|
|
|
// 学校 |
|
|
|
|
|
|
|
that.$get(that.api.getSchoolsByProvince, { |
|
|
|
|
|
|
|
provinceId: node.data.provinceId, |
|
|
|
|
|
|
|
cityId: value, |
|
|
|
|
|
|
|
schoolName: '' |
|
|
|
|
|
|
|
}).then(({ list }) => { |
|
|
|
|
|
|
|
const data = [] |
|
|
|
|
|
|
|
list.map(e => { |
|
|
|
|
|
|
|
e.value = e.schoolId |
|
|
|
|
|
|
|
e.label = e.schoolName |
|
|
|
|
|
|
|
e.leaf = true |
|
|
|
|
|
|
|
e.disabled = !!checked.find(n => n.schoolId == e.schoolId && n.cityId == e.cityId && n.provinceId == e.provinceId) |
|
|
|
|
|
|
|
data.push(e) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
resolve(data) |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
resolve([]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
nameRepeat: false |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
@ -113,58 +208,96 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.getClassification(); |
|
|
|
this.getClassification() |
|
|
|
this.form.id && this.getData(); |
|
|
|
this.form.id && this.getData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
quill |
|
|
|
quill |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
getClassification() { |
|
|
|
// 分类 |
|
|
|
this.$get(this.api.queryGlClassification).then(res => { |
|
|
|
getClassification() { |
|
|
|
this.classificationList = res.classificationList; |
|
|
|
// 中台分类 |
|
|
|
}).catch(res => {}); |
|
|
|
this.$post(this.api.listClassification, { |
|
|
|
}, |
|
|
|
pageNum: 1, |
|
|
|
getData() { |
|
|
|
pageSize: 1000, |
|
|
|
this.$get(`${this.api.getCourse}/${this.form.id}`).then(({ course }) => { |
|
|
|
platformSource: 0 |
|
|
|
this.form = course |
|
|
|
}).then(({ page }) => { |
|
|
|
this.uploadList.push({ |
|
|
|
this.platformClassificationList = page.records |
|
|
|
name: "cover.jpg", |
|
|
|
}).catch(res => {}) |
|
|
|
url: course.coverUrl |
|
|
|
|
|
|
|
}) |
|
|
|
// 教师端分类 |
|
|
|
}).catch(err => {}) |
|
|
|
this.$post(this.api.listClassification, { |
|
|
|
}, |
|
|
|
pageNum: 1, |
|
|
|
handleExceed(files, fileList) { // 上传文件 |
|
|
|
pageSize: 1000, |
|
|
|
util.warningMsg("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!"); |
|
|
|
platformSource: Setting.platformSource |
|
|
|
}, |
|
|
|
}).then(({ page }) => { |
|
|
|
uploadSuccess(res, file, fileList) { |
|
|
|
this.classificationList = page.records |
|
|
|
this.form.coverUrl = res.data.filesResult.fileUrl |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
uploadError(err, file, fileList) { |
|
|
|
getData() { |
|
|
|
this.$message({ |
|
|
|
this.$post(`${this.api.findTheoreticalCourse}?id=${this.form.id}`).then(({ data }) => { |
|
|
|
message: "上传出错,请重试!", |
|
|
|
// 分类id处理 |
|
|
|
type: "error", |
|
|
|
if (data.platformClassificationList) { |
|
|
|
center: true |
|
|
|
data.platformClassificationIds = data.platformClassificationList.map(e => e.classificationId) |
|
|
|
}); |
|
|
|
delete data.platformClassificationList |
|
|
|
}, |
|
|
|
} |
|
|
|
beforeRemove(file, fileList) { |
|
|
|
if (data.schoolClassificationsList) { |
|
|
|
return this.$confirm(`确定移除 ${file.name}?`); |
|
|
|
data.schoolClassificationsIds = data.schoolClassificationsList.map(e => e.classificationId) |
|
|
|
}, |
|
|
|
delete data.schoolClassificationsList |
|
|
|
handleRemove(file, fileList) { |
|
|
|
} |
|
|
|
let fileName = this.form.coverUrl.replace('https://huoran.oss-cn-shenzhen.aliyuncs.com/', ""); |
|
|
|
this.form = data |
|
|
|
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => { |
|
|
|
this.uploadList.push({ |
|
|
|
this.form.coverUrl = '' |
|
|
|
name: "cover.jpg", |
|
|
|
}).catch(res => {}); |
|
|
|
url: data.coverUrl |
|
|
|
}, |
|
|
|
}) |
|
|
|
save() { |
|
|
|
}).catch(err => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 名称判重 |
|
|
|
|
|
|
|
nameChange(val) { |
|
|
|
|
|
|
|
this.$post(this.api.checkRepeatTheoreticalCourse, { |
|
|
|
|
|
|
|
id: this.form.id, |
|
|
|
|
|
|
|
courseName: val, |
|
|
|
|
|
|
|
platformSource: Setting.platformSource |
|
|
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
|
|
this.nameRepeat = false |
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
this.nameRepeat = true |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleExceed(files, fileList) { // 上传文件 |
|
|
|
|
|
|
|
util.warningMsg("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!"); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
uploadSuccess(res, file, fileList) { |
|
|
|
|
|
|
|
this.form.coverUrl = res.data.filesResult.fileUrl |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
uploadError(err, file, fileList) { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
message: "上传出错,请重试!", |
|
|
|
|
|
|
|
type: "error", |
|
|
|
|
|
|
|
center: true |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
beforeRemove(file, fileList) { |
|
|
|
|
|
|
|
return this.$confirm(`确定移除 ${file.name}?`); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleRemove(file, fileList) { |
|
|
|
|
|
|
|
let fileName = this.form.coverUrl.replace('https://huoran.oss-cn-shenzhen.aliyuncs.com/', ""); |
|
|
|
|
|
|
|
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => { |
|
|
|
|
|
|
|
this.form.coverUrl = '' |
|
|
|
|
|
|
|
}).catch(res => {}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
save() { |
|
|
|
|
|
|
|
this.$refs.form.validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
if (this.nameRepeat) return util.errorMsg('当前课程名已存在!') |
|
|
|
if (this.submiting) return false |
|
|
|
if (this.submiting) return false |
|
|
|
const { form } = this |
|
|
|
const { form } = this |
|
|
|
if (!form.name) return util.warningMsg("请填写课程名称") |
|
|
|
|
|
|
|
if (!form.classificationId) return util.warningMsg("请选择课程分类") |
|
|
|
|
|
|
|
if (!form.coverUrl) return util.warningMsg("请上传课程封面") |
|
|
|
|
|
|
|
this.submiting = true |
|
|
|
this.submiting = true |
|
|
|
if (form.id) { |
|
|
|
if (form.id) { |
|
|
|
this.$put(this.api.editCourse, form).then(res => { |
|
|
|
form.courseId = form.id |
|
|
|
|
|
|
|
form.platformSource = Setting.platformSource |
|
|
|
|
|
|
|
this.$post(this.api.updateTheoreticalCourse, form).then(res => { |
|
|
|
this.submiting = false; |
|
|
|
this.submiting = false; |
|
|
|
util.successMsg("修改成功"); |
|
|
|
util.successMsg("修改成功"); |
|
|
|
this.$router.back(); |
|
|
|
this.$router.back(); |
|
|
@ -172,14 +305,14 @@ export default { |
|
|
|
this.submiting = false; |
|
|
|
this.submiting = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$post(this.api.addCourse, form).then(res => { |
|
|
|
this.$post(this.api.saveTheoreticalCourse, form).then(res => { |
|
|
|
this.submiting = false; |
|
|
|
this.submiting = false; |
|
|
|
this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", { |
|
|
|
this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", { |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
|
confirmButtonText: "马上设置", |
|
|
|
confirmButtonText: "马上设置", |
|
|
|
cancelButtonText: "稍后操作" |
|
|
|
cancelButtonText: "稍后操作" |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
this.$router.push(`/course/contentSettings?id=${res.courseId}`); |
|
|
|
this.$router.push(`/setTheoreticalCourse?id=${res.id}`); |
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
|
this.$router.back(); |
|
|
|
this.$router.back(); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -187,27 +320,29 @@ export default { |
|
|
|
this.submiting = false; |
|
|
|
this.submiting = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 返回上一页 |
|
|
|
|
|
|
|
backPage() { |
|
|
|
|
|
|
|
this.$router.back() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
back() { |
|
|
|
|
|
|
|
const { id } = this.form |
|
|
|
|
|
|
|
const updateTime = this.updateTime |
|
|
|
|
|
|
|
// 更改了信息才需要提示 |
|
|
|
|
|
|
|
if ((id && updateTime > 2) || (!id && updateTime)) { |
|
|
|
|
|
|
|
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { |
|
|
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
this.save() |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
this.backPage() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.backPage() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 返回上一页 |
|
|
|
|
|
|
|
backPage() { |
|
|
|
|
|
|
|
this.$router.back() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
back() { |
|
|
|
|
|
|
|
const { id } = this.form |
|
|
|
|
|
|
|
const updateTime = this.updateTime |
|
|
|
|
|
|
|
// 更改了信息才需要提示 |
|
|
|
|
|
|
|
if ((id && updateTime > 2) || (!id && updateTime)) { |
|
|
|
|
|
|
|
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { |
|
|
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
this.save() |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
this.backPage() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.backPage() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
@ -279,4 +414,13 @@ $avatar-width: 104px; |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.range-check { |
|
|
|
|
|
|
|
display: inline-block; |
|
|
|
|
|
|
|
margin: 0 0 10px 10px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/deep/.range-cas { |
|
|
|
|
|
|
|
.el-tag { |
|
|
|
|
|
|
|
display: none; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |