|
|
|
@ -13,14 +13,11 @@ |
|
|
|
|
@cancel="handleCancel" |
|
|
|
|
cancelText="关闭" |
|
|
|
|
> |
|
|
|
|
<el-page-header @back="goBack"> </el-page-header> |
|
|
|
|
<a-form :form="form"> |
|
|
|
|
<el-page-header @back="goBack" content="新增课程" style="color: #0683f7; line-height: 60px; margin-left: 6px"> |
|
|
|
|
</el-page-header> |
|
|
|
|
<!-- style="color: #0683f7" --> |
|
|
|
|
<a-form :form="form" class="form"> |
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="27"> |
|
|
|
|
<a-form-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-image-upload isMultiple v-decorator="['img']"></j-image-upload> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="所属院系" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<!-- 删除multi --> |
|
|
|
@ -36,25 +33,37 @@ |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="课程类别" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-dict-select-tag |
|
|
|
|
type="list" |
|
|
|
|
v-decorator="['category']" |
|
|
|
|
:trigger-change="true" |
|
|
|
|
type="radio" |
|
|
|
|
v-model="model.coursecategory" |
|
|
|
|
dictCode="coursecategory" |
|
|
|
|
placeholder="请选择课程类别" |
|
|
|
|
/> |
|
|
|
|
<!-- v-decorator="['category']" |
|
|
|
|
:trigger-change="true" --> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="课程性质" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-tree-select |
|
|
|
|
<j-dict-select-tag |
|
|
|
|
type="radio" |
|
|
|
|
v-decorator="['nature', { initialValue: '1298167997234712578' }]" |
|
|
|
|
:trigger-change="true" |
|
|
|
|
dictCode="se_nature,content,id,(pid='0' and id!='1298168032655609858') or pid='1298168032655609858'" |
|
|
|
|
placeholder="请选择课程类别" |
|
|
|
|
/> |
|
|
|
|
<!-- :trigger-change="true" --> |
|
|
|
|
<!-- <j-tree-select |
|
|
|
|
v-model="treeValue" |
|
|
|
|
v-decorator="['nature']" |
|
|
|
|
placeholder="课程性质" |
|
|
|
|
dict="se_nature,content,id" |
|
|
|
|
pidField="pid" |
|
|
|
|
pidValue="0" |
|
|
|
|
/> |
|
|
|
|
/> --> |
|
|
|
|
<!-- {{ treeValue }} v-model="model.nature" --> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
|
|
|
|
|
<!-- <a-col :span="8"> |
|
|
|
|
<a-form-item label="培养方案版本" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-search-select-tag v-decorator="['programid']" :dict="dicodep" /> |
|
|
|
@ -68,7 +77,8 @@ |
|
|
|
|
</a-col> --> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="课程名称" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-input v-decorator="['name', validatorRules.name]" placeholder="请输入课程名称" rows="4"></a-input> |
|
|
|
|
<a-input v-decorator="['name', validatorRules.name]" placeholder="请输入"></a-input> |
|
|
|
|
<!-- <a-input v-decorator="['name', validatorRules.name]" placeholder="请输入课程名称" rows="4"></a-input> --> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
@ -79,15 +89,7 @@ |
|
|
|
|
<a-input v-decorator="['code', validatorRules.code]" placeholder="请输入课程编码" rows="4"></a-input> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<!-- 为下拉框 --> |
|
|
|
|
<a-form-item label="开课学期" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<!-- <a-input v-decorator="['semester']" placeholder="请输入开课学期"></a-input> --> |
|
|
|
|
<!-- 修改 --> |
|
|
|
|
<!-- <j-search-select-tag dict="se_semester,name,id"></j-search-select-tag>--> |
|
|
|
|
<j-search-select-tag dict="xueqi" v-model="model.year" ></j-search-select-tag> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
|
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="课程学分" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<!-- <a-input-number v-decorator="['credit']" placeholder="请输入课程学分" style="width: 100%" /> --> |
|
|
|
@ -108,6 +110,16 @@ |
|
|
|
|
></a-input> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<!-- 为下拉框 --> |
|
|
|
|
<a-form-item label="开课学期" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<!-- <a-input v-decorator="['semester']" placeholder="请输入开课学期"></a-input> --> |
|
|
|
|
<!-- 修改 --> |
|
|
|
|
<!-- <j-search-select-tag dict="se_semester,name,id"></j-search-select-tag>--> |
|
|
|
|
<!-- <j-search-select-tag dict="xueqi" v-model="model.year"></j-search-select-tag> --> |
|
|
|
|
<j-dict-select-tag type="radio" v-model="model.year" dictCode="xueqi" placeholder="请选择" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="理论学时" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<!-- <a-form-item label="理论学时" :labelCol="{ span: 7 }" :wrapperCol="{ span: 16 }"> --> |
|
|
|
@ -166,22 +178,28 @@ |
|
|
|
|
<a-form-item label="考核类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-dict-select-tag |
|
|
|
|
type="radio" |
|
|
|
|
v-decorator="['assessmenttype']" |
|
|
|
|
v-decorator="['assessmenttype', { initialValue: '1298174364108492802' }]" |
|
|
|
|
:trigger-change="true" |
|
|
|
|
dictCode="se_assessmenttype,content,id" |
|
|
|
|
placeholder="请选择考核类型" |
|
|
|
|
/> |
|
|
|
|
<!-- , rules: [{ required: true, message: '请选择类型' }] --> |
|
|
|
|
<!-- v-decorator="['assessmenttype', { initialValue: '1' }]" |
|
|
|
|
:trigger-change="true" --> |
|
|
|
|
<!-- v-model="model.assessmenttype" --> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="考核方式" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-dict-select-tag |
|
|
|
|
type="radio" |
|
|
|
|
v-decorator="['assessmentway']" |
|
|
|
|
v-decorator="['assessmentway', { initialValue: '1298174700034494466' }]" |
|
|
|
|
:trigger-change="true" |
|
|
|
|
dictCode="se_assessmentway,content,id" |
|
|
|
|
placeholder="请选择考核方式" |
|
|
|
|
/> |
|
|
|
|
<!-- v-model="model.assessmentway" |
|
|
|
|
:trigger-change="true" --> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
@ -198,22 +216,23 @@ |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="负责教师" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-select-user-by-dep userSelect="changedUser" v-model="model.teacher" @change="change()" /> |
|
|
|
|
<j-select-user-by-dep userSelect="changedUser" v-model="model.teacher" @change="change" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="制定人" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-select-user-by-dep userSelect="maker" v-decorator="['maker']" v-model="model.teacher" @change="change" /> |
|
|
|
|
<j-select-user-by-dep |
|
|
|
|
v-decorator="['maker', { initialValue: 'mladmin' }]" |
|
|
|
|
:trigger-change="true" |
|
|
|
|
placeholder="请选择考核类型" |
|
|
|
|
/> |
|
|
|
|
<!-- <j-select-user-by-dep userSelect="maker" v-model="model.maker" @change="change" /> --> |
|
|
|
|
<!-- v-decorator="['maker', { initialValue: 123 }]" --> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="执笔人" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-select-user-by-dep |
|
|
|
|
userSelect="writer" |
|
|
|
|
v-decorator="['writer']" |
|
|
|
|
v-model="model.teacher" |
|
|
|
|
@change="change" |
|
|
|
|
/> |
|
|
|
|
<j-select-user-by-dep userSelect="writer" v-model="model.writer" @change="change" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
@ -224,19 +243,67 @@ |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="审定人" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-select-user-by-dep |
|
|
|
|
userSelect="verifier" |
|
|
|
|
v-decorator="['verifier']" |
|
|
|
|
v-model="model.teacher" |
|
|
|
|
@change="change" |
|
|
|
|
<j-select-user-by-dep userSelect="verifier" v-model="model.verifier" @change="change" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<!-- 新加的字段 --> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="是否合作办学课程" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-dict-select-tag |
|
|
|
|
type="radio" |
|
|
|
|
v-model="model.cooperativeEducation" |
|
|
|
|
dictCode="isShow" |
|
|
|
|
placeholder="是否合作办学课程" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
<!-- <a-form-item |
|
|
|
|
label="请选择" |
|
|
|
|
:labelCol="labelCol" |
|
|
|
|
:wrapperCol="wrapperCol" |
|
|
|
|
v-show="model.cooperativeEducation === '1'" |
|
|
|
|
> |
|
|
|
|
<j-dict-select-tag |
|
|
|
|
type="radio" |
|
|
|
|
v-decorator="['assessmenttype']" |
|
|
|
|
:trigger-change="true" |
|
|
|
|
dictCode="cooperative_education_type" |
|
|
|
|
placeholder="请选择考核类型" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> --> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item |
|
|
|
|
label="请选择" |
|
|
|
|
:labelCol="labelCol" |
|
|
|
|
:wrapperCol="wrapperCol" |
|
|
|
|
v-show="model.cooperativeEducation === '1'" |
|
|
|
|
> |
|
|
|
|
<j-dict-select-tag |
|
|
|
|
type="radio" |
|
|
|
|
v-decorator="['assessmenttype']" |
|
|
|
|
:trigger-change="true" |
|
|
|
|
dictCode="cooperative_education_type" |
|
|
|
|
placeholder="请选择考核类型" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-image-upload isMultiple v-decorator="['img']"></j-image-upload> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
|
|
|
|
|
<!-- <a-row> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-image-upload isMultiple v-decorator="['img']"></j-image-upload> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> --> |
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-item label="课程简介" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="课程简介" :label-col="labelCol2" :wrapper-col="wrapperCol2"> |
|
|
|
|
<!-- :labelCol="labelCol" :wrapperCol="wrapperCol" --> |
|
|
|
|
<!-- <j-editor style="width: 200%" v-decorator="['synopsis', { trigger: 'input' }]" /> --> |
|
|
|
|
<!-- 修改 --> |
|
|
|
|
|
|
|
|
@ -253,34 +320,35 @@ |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row> |
|
|
|
|
<!-- <a-row> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-item label="教学方式" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-editor style="width: 200%" v-decorator="['teacherway', { trigger: 'input' }]" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row> |
|
|
|
|
</a-row> --> |
|
|
|
|
<!-- <a-row> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-item label="教学方法" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-editor style="width: 200%" v-decorator="['teachermethod', { trigger: 'input' }]" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
</a-row> --> |
|
|
|
|
<!-- <a-row> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="考核细则" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-editor style="width: 200%" v-decorator="['assessmentrules', { trigger: 'input' }]" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
</a-row> --> |
|
|
|
|
<!-- <a-row> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="考核内容" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-editor style="width: 200%" v-decorator="['contentdistribution', { trigger: 'input' }]" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
</a-row> --> |
|
|
|
|
|
|
|
|
|
<!-- <a-row> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-item label="达成度标准" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
@ -291,9 +359,11 @@ |
|
|
|
|
</a-form> |
|
|
|
|
<!-- 修改 --> |
|
|
|
|
<div v-if="showButton"> |
|
|
|
|
<el-button type="danger" @click="open" size="small">关闭</el-button> |
|
|
|
|
<el-button type="danger" @click="open" size="small" class="el-right">关闭</el-button> |
|
|
|
|
<!-- <el-button type="primary" size="small" @click="handleReset" class="el-left">清空</el-button> --> |
|
|
|
|
<el-button type="primary" size="small" @click="handleOk" class="el-left">确定</el-button> |
|
|
|
|
<el-button type="primary" size="small" @click="handleOk" class="el-right">暂存</el-button> |
|
|
|
|
<!-- <el-button type="primary" size="small" @click="handleOk" class="el-right">暂存</el-button> --> |
|
|
|
|
<el-button type="primary" size="small" @click="handleAdd" class="el-right">增加下一门课</el-button> |
|
|
|
|
</div> |
|
|
|
|
<!-- 修改 --> |
|
|
|
|
<!-- <add-course ref="modalForm" @ok="modalFormOk"></add-course> --> |
|
|
|
@ -334,10 +404,31 @@ export default { |
|
|
|
|
JSearchSelectTag, |
|
|
|
|
JEditor, |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
// maker2: '20071057', |
|
|
|
|
show: false, |
|
|
|
|
model: { |
|
|
|
|
coursecategory: 1, |
|
|
|
|
cooperativeEducation: 0, |
|
|
|
|
year: '1' |
|
|
|
|
// assessmentway: 1298174700034494466, |
|
|
|
|
// assessmentway: 'defaultValue', // 设置默认值 |
|
|
|
|
// nature: 1298167997234712578, |
|
|
|
|
// name: '11', |
|
|
|
|
// code: '', |
|
|
|
|
// maker: 123, // 设置默认值为 123 |
|
|
|
|
}, |
|
|
|
|
kcoptions: [{ |
|
|
|
|
id: 1, |
|
|
|
|
label: '课程', |
|
|
|
|
}, { |
|
|
|
|
id: 2, |
|
|
|
|
label: '共建课程', |
|
|
|
|
}], |
|
|
|
|
|
|
|
|
|
//修改 |
|
|
|
|
showButton:true, |
|
|
|
|
showButton: true, |
|
|
|
|
selectContent: [], |
|
|
|
|
showPageInfo: '', |
|
|
|
|
dicodep: 'sss', |
|
|
|
@ -350,20 +441,23 @@ export default { |
|
|
|
|
title: '操作', |
|
|
|
|
width: 800, |
|
|
|
|
visible: false, |
|
|
|
|
model: {}, |
|
|
|
|
// model: {}, |
|
|
|
|
//修改 |
|
|
|
|
// dicodemp:'sys_user,realname,id', |
|
|
|
|
// 所属专业 |
|
|
|
|
dicodem: 'se_major,name,id', |
|
|
|
|
//修改 |
|
|
|
|
dicodep: 'py_basic_info,version,id', |
|
|
|
|
labelCol: { |
|
|
|
|
xs: { span: 24 }, |
|
|
|
|
sm: { span: 5 }, |
|
|
|
|
sm: { span: 6 }, |
|
|
|
|
}, |
|
|
|
|
wrapperCol: { |
|
|
|
|
xs: { span: 24 }, |
|
|
|
|
sm: { span: 16 }, |
|
|
|
|
}, |
|
|
|
|
labelCol2: { span: 4 }, |
|
|
|
|
wrapperCol2: { span: 20 }, |
|
|
|
|
|
|
|
|
|
confirmLoading: false, |
|
|
|
|
// validatorRules: {}, |
|
|
|
@ -477,10 +571,7 @@ export default { |
|
|
|
|
//课程编码 |
|
|
|
|
code: { |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
massage: '请输入正整数', |
|
|
|
|
}, |
|
|
|
|
{ required: true, message: '请输入正整数!' }, |
|
|
|
|
{ |
|
|
|
|
// pattern: /^(([1]?\\d)|20)$/, |
|
|
|
|
pattern: /^[^\\]{0,50}$/, |
|
|
|
@ -491,27 +582,39 @@ export default { |
|
|
|
|
validateDuplicateValue('se_course', 'code', value, this.model.id, callback), |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
trigger: 'blur', |
|
|
|
|
// trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
//课程名称 |
|
|
|
|
name: { |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
massage: '不能为空', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
// pattern: /^(([1]?\\d)|20)$/, |
|
|
|
|
pattern: /^[^\\]{0,100}$/, |
|
|
|
|
message: '字符串长度100 以内', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
trigger: 'blur', |
|
|
|
|
// name: { |
|
|
|
|
// initiaValue: "水",//初始化值,也就是默认值 |
|
|
|
|
// rules: [ |
|
|
|
|
// { |
|
|
|
|
// required: true, |
|
|
|
|
// massage: '不能为空', |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// // pattern: /^(([1]?\\d)|20)$/, |
|
|
|
|
// pattern: /^[^\\]{0,100}$/, |
|
|
|
|
// message: '字符串长度100 以内', |
|
|
|
|
// }, |
|
|
|
|
// ], |
|
|
|
|
// trigger: 'blur', |
|
|
|
|
// }, |
|
|
|
|
name: {//name与v-decorator中属性对应 |
|
|
|
|
// initialValue: "水",//初始化值,也就是默认值 |
|
|
|
|
rules: [{ required: true, message: '不能为空!' },//此处开启校验必填 |
|
|
|
|
// { validator: (rule, value, callback) => validateDuplicateValue('em_project_info', 'project_name', value, this.model.id, callback) },//此处开启唯一验证, |
|
|
|
|
// { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!' },//此处配置正则表达式,手机号,可自己配置正则表达式 |
|
|
|
|
{ |
|
|
|
|
// pattern: /^(([1]?\\d)|20)$/, |
|
|
|
|
pattern: /^[^\\]{0,100}$/, |
|
|
|
|
message: '字符串长度100 以内', |
|
|
|
|
},] |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
created () { |
|
|
|
|
let that = this |
|
|
|
|
that.$bus.$on('headleUser', ({ restle, userSelect }) => { |
|
|
|
|
if (restle && userSelect) that.$set(that.selectContent, userSelect, restle) |
|
|
|
@ -527,7 +630,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//修改 新增点击关闭时的弹出框 |
|
|
|
|
open() { |
|
|
|
|
open () { |
|
|
|
|
this.$confirm('此操作将关闭页面, 是否继续?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
@ -548,41 +651,50 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//修改 |
|
|
|
|
goBack() { |
|
|
|
|
goBack () { |
|
|
|
|
this.$router.push({ path: '/src/views/course/SeCourseList' }) |
|
|
|
|
}, |
|
|
|
|
change(ids) { |
|
|
|
|
console.log('id+' + ids) |
|
|
|
|
console.log(this.model.teacher) |
|
|
|
|
// 全部清空 |
|
|
|
|
handleReset () { |
|
|
|
|
this.form.resetFields() |
|
|
|
|
}, |
|
|
|
|
change (ids) { |
|
|
|
|
console.log('000', 'id+' + ids) |
|
|
|
|
console.log('111', this.model.teacher) |
|
|
|
|
console.log('222', this.model.verifier) |
|
|
|
|
console.log('333', this.model.writer) |
|
|
|
|
// this.model.maker = this.model.teacher |
|
|
|
|
//修改 |
|
|
|
|
// this.dicodemp="sys_user,realname,id"+this.model.teacher |
|
|
|
|
// this.username = ids |
|
|
|
|
// console.log(ids) |
|
|
|
|
}, |
|
|
|
|
getMajor() { |
|
|
|
|
getMajor () { |
|
|
|
|
this.dicodem = "se_major,name,id,dep='" + this.model.depid + "'" |
|
|
|
|
//修改 |
|
|
|
|
this.dicodep = |
|
|
|
|
"py_basic_info,version,id,college_id='" + this.model.depid + "' and major_id='" + this.model.majorid + "'" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
getTrainProgram() { |
|
|
|
|
getTrainProgram () { |
|
|
|
|
//修改 |
|
|
|
|
// this.dicodep = 'py_basic_info,version,id' |
|
|
|
|
//修改 |
|
|
|
|
this.dicodep = |
|
|
|
|
"py_basic_info,version,id,college_id='" + this.model.depid + "' and major_id='" + this.model.majorid + "'" |
|
|
|
|
}, |
|
|
|
|
add() { |
|
|
|
|
add () { |
|
|
|
|
this.edit({}) |
|
|
|
|
}, |
|
|
|
|
edit(record) { |
|
|
|
|
edit (record) { |
|
|
|
|
this.form.resetFields() |
|
|
|
|
this.model = Object.assign({}, record) |
|
|
|
|
// this.model=Object.assign(pagedOld,record) |
|
|
|
|
// Object.keys(model).map(res=>{ |
|
|
|
|
// console.log(res+'998---------------',this.model[res]) |
|
|
|
|
// }) |
|
|
|
|
this.showButton=this.model.showButton |
|
|
|
|
this.showButton = this.model.showButton |
|
|
|
|
console.log(this.model, '表单编辑数据') |
|
|
|
|
this.visible = true |
|
|
|
|
this.$nextTick(() => { |
|
|
|
@ -592,6 +704,8 @@ export default { |
|
|
|
|
'img', |
|
|
|
|
'depid', |
|
|
|
|
'majorid', |
|
|
|
|
'coursecategory', |
|
|
|
|
'cooperative_education_type', |
|
|
|
|
'category', |
|
|
|
|
'nature', |
|
|
|
|
'programid', |
|
|
|
@ -627,11 +741,53 @@ export default { |
|
|
|
|
) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
close() { |
|
|
|
|
close () { |
|
|
|
|
this.$emit('close') |
|
|
|
|
this.visible = false |
|
|
|
|
}, |
|
|
|
|
handleOk() { |
|
|
|
|
handleAdd () { |
|
|
|
|
const that = this |
|
|
|
|
// 触发表单验证 |
|
|
|
|
this.form.validateFields((err, values) => { |
|
|
|
|
if (!err) { |
|
|
|
|
that.confirmLoading = true |
|
|
|
|
let httpurl = '' |
|
|
|
|
let method = '' |
|
|
|
|
if (!this.model.id) { |
|
|
|
|
httpurl += this.url.add |
|
|
|
|
method = 'post' |
|
|
|
|
|
|
|
|
|
this.form.setFieldsValue({ |
|
|
|
|
name: '', |
|
|
|
|
code: '' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
httpurl += this.url.edit |
|
|
|
|
method = 'put' |
|
|
|
|
} |
|
|
|
|
// let formData = Object.assign(this.model, values) |
|
|
|
|
//修改 |
|
|
|
|
|
|
|
|
|
let formData = Object.assign(this.model, values) |
|
|
|
|
httpAction(httpurl, formData, method) |
|
|
|
|
.then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
that.$message.success(res.message) |
|
|
|
|
that.$emit('ok') |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
that.$message.warning(res.message) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.finally(() => { |
|
|
|
|
that.confirmLoading = false |
|
|
|
|
that.close() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
handleOk () { |
|
|
|
|
const that = this |
|
|
|
|
// 触发表单验证 |
|
|
|
|
this.form.validateFields((err, values) => { |
|
|
|
@ -642,6 +798,19 @@ export default { |
|
|
|
|
if (!this.model.id) { |
|
|
|
|
httpurl += this.url.add |
|
|
|
|
method = 'post' |
|
|
|
|
console.log('12345', this.model.name) |
|
|
|
|
// ok的 逻辑问题 |
|
|
|
|
this.$set(this.model, "name", "") |
|
|
|
|
// this.model.name = '' // 清空课程名称 |
|
|
|
|
this.model.code = '' // 清空编号信息 |
|
|
|
|
console.log('11111', this.model.name) |
|
|
|
|
// this.form = this.$form.createForm(this, { |
|
|
|
|
// // 表单初始化配置 |
|
|
|
|
// name: '', |
|
|
|
|
// code: '', |
|
|
|
|
// // 其他表单字段... |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
httpurl += this.url.edit |
|
|
|
|
method = 'put' |
|
|
|
@ -656,6 +825,7 @@ export default { |
|
|
|
|
that.$message.success(res.message) |
|
|
|
|
that.$emit('ok') |
|
|
|
|
this.$router.push({ path: '/src/views/course/SeCourseList' }) |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
that.$message.warning(res.message) |
|
|
|
|
} |
|
|
|
@ -666,11 +836,13 @@ export default { |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
handleCancel() { |
|
|
|
|
handleCancel () { |
|
|
|
|
this.close() |
|
|
|
|
}, |
|
|
|
|
popupCallback(row) { |
|
|
|
|
popupCallback (row) { |
|
|
|
|
//修改增加了this.$ 增加了this. |
|
|
|
|
// this.row = Object.assign(this.row, values) |
|
|
|
|
// this.row = Object.assign({}, row) |
|
|
|
@ -681,6 +853,8 @@ export default { |
|
|
|
|
'img', |
|
|
|
|
'depid', |
|
|
|
|
'majorid', |
|
|
|
|
'coursecategory', |
|
|
|
|
'cooperative_education_type', |
|
|
|
|
'category', |
|
|
|
|
'nature', |
|
|
|
|
'programid', |
|
|
|
@ -708,7 +882,9 @@ export default { |
|
|
|
|
'contentdistribution', |
|
|
|
|
'achievement', |
|
|
|
|
'synopsis', |
|
|
|
|
'year' |
|
|
|
|
'year', |
|
|
|
|
|
|
|
|
|
'isShow' |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
// }) |
|
|
|
@ -728,4 +904,12 @@ export default { |
|
|
|
|
float: right; |
|
|
|
|
margin: 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.form { |
|
|
|
|
margin-top: 40px; |
|
|
|
|
} |
|
|
|
|
// /deep/.ant-upload.ant-upload-select-picture-card { |
|
|
|
|
// width: 300px; |
|
|
|
|
// height: 150px; |
|
|
|
|
// } |
|
|
|
|
</style> |
|
|
|
|