parent
db893a0772
commit
10aac03ce3
7 changed files with 495 additions and 4 deletions
@ -0,0 +1,176 @@ |
||||
<template> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="类型名称"> |
||||
<a-input placeholder="请输入类型名称" v-model="queryParam.name"></a-input> |
||||
</a-form-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
||||
<a @click="handleToggleSearch" style="margin-left: 8px"> |
||||
{{ toggleSearchStatus ? '收起' : '展开' }} |
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
||||
</a> |
||||
</span> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form>--> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<!-- <div class="table-operator"> |
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
||||
<a-button type="primary" icon="download" @click="handleExportXls('课程目标类型')">导出</a-button> |
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
||||
<a-button type="primary" icon="import">导入</a-button> |
||||
</a-upload> |
||||
<!– 高级查询区域 –> |
||||
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> |
||||
<a-dropdown v-if="selectedRowKeys.length > 0"> |
||||
<a-menu slot="overlay"> |
||||
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> |
||||
</a-menu> |
||||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> |
||||
</a-dropdown> |
||||
</div>--> |
||||
|
||||
<!-- table区域-begin --> |
||||
<div> |
||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
||||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
||||
<a style="margin-left: 24px" @click="onClearSelected">清空</a> |
||||
</div> |
||||
|
||||
<a-table |
||||
ref="table" |
||||
size="middle" |
||||
:scroll="{x:true}" |
||||
bordered |
||||
rowKey="id" |
||||
:columns="columns" |
||||
:dataSource="dataSource" |
||||
:pagination="ipagination" |
||||
:loading="loading" |
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
||||
class="j-table-force-nowrap" |
||||
@change="handleTableChange"> |
||||
|
||||
<template slot="htmlSlot" slot-scope="text"> |
||||
<div v-html="text"></div> |
||||
</template> |
||||
<template slot="imgSlot" slot-scope="text"> |
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
||||
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
||||
</template> |
||||
<template slot="fileSlot" slot-scope="text"> |
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
||||
<a-button |
||||
v-else |
||||
:ghost="true" |
||||
type="primary" |
||||
icon="download" |
||||
size="small" |
||||
@click="downloadFile(text)"> |
||||
下载 |
||||
</a-button> |
||||
</template> |
||||
|
||||
<span slot="action" slot-scope="text, record"> |
||||
<a @click="bdbyyq(record)">绑定毕业要求</a> |
||||
</span> |
||||
|
||||
</a-table> |
||||
</div> |
||||
|
||||
<se-courseobjectives-type-modal ref="modalForm" @ok="modalFormOk"></se-courseobjectives-type-modal> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
import SeCourseobjectivesTypeModal from './modules/SeCourseobjectivesTypeModal' |
||||
|
||||
export default { |
||||
name: 'SeCourseobjectivesTypeList', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
SeCourseobjectivesTypeModal |
||||
}, |
||||
data () { |
||||
return { |
||||
description: '设置毕业要求', |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key:'rowIndex', |
||||
width:60, |
||||
align:"center", |
||||
customRender:function (t,r,index) { |
||||
return parseInt(index)+1; |
||||
} |
||||
}, |
||||
{ |
||||
title:'课程目标', |
||||
align:"center", |
||||
dataIndex: 'name' |
||||
}, |
||||
{ |
||||
title:'课程目标类型', |
||||
align:"center", |
||||
dataIndex: 'sctype_dictText' |
||||
}, |
||||
{ |
||||
title:'毕业要求', |
||||
align:"center", |
||||
dataIndex: 'temp' |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align:"center", |
||||
fixed:"right", |
||||
width:147, |
||||
scopedSlots: { customRender: 'action' } |
||||
} |
||||
], |
||||
url: { |
||||
list: "/py/pyBasicCourse/queryCourseobjectivesList?courseId="+this.$route.query.courseId, |
||||
}, |
||||
dictOptions:{}, |
||||
superFieldList:[], |
||||
} |
||||
}, |
||||
created() { |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function(){ |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
initDictConfig(){ |
||||
}, |
||||
bdbyyq(record){ |
||||
console.log(record); |
||||
console.log(this.$route.query.basicId); |
||||
this.$refs.modalForm.edit(record); |
||||
this.$refs.modalForm.title = "绑定毕业要求"; |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,171 @@ |
||||
<template> |
||||
<a-spin :spinning="confirmLoading"> |
||||
<!-- <j-form-container :disabled="formDisabled"> |
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
||||
<a-row> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name"> |
||||
<a-input v-model="model.name" placeholder="请输入类型名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form-model> |
||||
</j-form-container>--> |
||||
<div> |
||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
||||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
||||
style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
||||
<a style="margin-left: 24px" @click="onClearSelected">清空</a> |
||||
</div> |
||||
<a-table |
||||
ref="table" |
||||
size="middle" |
||||
bordered |
||||
rowKey="id" |
||||
class="j-table-force-nowrap" |
||||
:scroll="{ x: true }" |
||||
:columns="columns" |
||||
:dataSource="dataSource" |
||||
:pagination="ipagination" |
||||
:loading="loading" |
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:radio}" |
||||
@change="handleTableChange" |
||||
> |
||||
</a-table> |
||||
</div> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import {mixinDevice} from '@/utils/mixin' |
||||
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
||||
import JSelectDepart from "@comp/jeecgbiz/JSelectDepart"; |
||||
import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
||||
|
||||
export default { |
||||
name: 'SeCourseobjectivesTypeForm', |
||||
mixins: [JeecgListMixin, mixinDevice], |
||||
components: { |
||||
JDictSelectTag, |
||||
JSelectDepart, |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
radio:'radio', |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
selectedRowKeys: [], |
||||
selectionRows: [], |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key:'rowIndex', |
||||
width:60, |
||||
align:"center", |
||||
customRender:function (t,r,index) { |
||||
return parseInt(index)+1; |
||||
} |
||||
}, |
||||
{ |
||||
title: '毕业要求', |
||||
align: 'center', |
||||
customCell: () => { |
||||
return { |
||||
style: { |
||||
'max-width': '80px', |
||||
'white-space': 'normal', |
||||
}, |
||||
} |
||||
}, |
||||
dataIndex: 'graduateRequire', |
||||
}, |
||||
], |
||||
ipagination: { |
||||
current: 1, |
||||
pageSize: 50, |
||||
pageSizeOptions: ['10', '20', '50'], |
||||
showTotal: (total, range) => { |
||||
return range[0] + '-' + range[1] + ' 共' + total + '条' |
||||
}, |
||||
showQuickJumper: true, |
||||
showSizeChanger: true, |
||||
total: 0, |
||||
}, |
||||
validatorRules: { |
||||
}, |
||||
url: { |
||||
list: "/py/pyBasicCourse/queryPyGraRequireList?basicId="+this.$route.query.basicId, |
||||
szbyyq:"/py/pyBasicCourse/szbyyq", |
||||
} |
||||
} |
||||
}, |
||||
computed: { |
||||
formDisabled(){ |
||||
return this.disabled |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
//this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
}, |
||||
methods: { |
||||
onSelectChange(selectedRowKeys, selectionRows) { |
||||
this.selectedRowKeys = selectedRowKeys |
||||
this.selectionRows = selectionRows |
||||
}, |
||||
onClearSelected2() { |
||||
this.selectedRowKeys = [] |
||||
this.selectionRows = [] |
||||
}, |
||||
popupCallback(value, row) { |
||||
this.model = Object.assign(this.model, row); |
||||
}, |
||||
add () { |
||||
this.edit(this.modelDefault); |
||||
}, |
||||
edit (record) { |
||||
this.$route.query.courseobjectivesId = record.id; |
||||
}, |
||||
submitForm () { |
||||
if (this.selectedRowKeys.length <= 0) { |
||||
this.$message.warning('请选择一条记录!') |
||||
return |
||||
} else { |
||||
var ids = '' |
||||
for (var a = 0; a < this.selectedRowKeys.length; a++) { |
||||
ids += this.selectedRowKeys[a]; |
||||
} |
||||
} |
||||
console.log(ids); |
||||
console.log(this.$route.query.courseobjectivesId) |
||||
getAction(this.url.szbyyq, {"id": ids,"courseobjectivesId":this.$route.query.courseobjectivesId}).then((res) => { |
||||
if (res.success) { |
||||
this.$message.success("绑定成功"); |
||||
this.$emit('ok'); |
||||
} else { |
||||
this.$message.error(res.message); |
||||
} |
||||
}); |
||||
}, |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,60 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<se-courseobjectives-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></se-courseobjectives-type-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import SeCourseobjectivesTypeForm from './SeCourseobjectivesTypeForm' |
||||
export default { |
||||
name: 'SeCourseobjectivesTypeModal', |
||||
components: { |
||||
SeCourseobjectivesTypeForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:1000, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(); |
||||
}) |
||||
}, |
||||
edit (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}) |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$refs.realForm.submitForm(); |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
Loading…
Reference in new issue