Merge branch 'develop' of https://gitee.com/siwa-team/dawa-vue into develop
This commit is contained in:
commit
d1887a42f9
|
@ -26,7 +26,7 @@
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
has-feedback
|
has-feedback
|
||||||
>
|
>
|
||||||
<a-input placeholder="请输入用户名" v-decorator="['userName', {rules: [{required: true, min: 5, message: '请输入至少五个字符的账号!'}]}]" />
|
<a-input placeholder="请输入用户名" :disabled="registerDisabled" v-decorator="['userName', {rules: [{required: true, min: 5, message: '请输入至少五个字符的账号!'}]}]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
has-feedback
|
has-feedback
|
||||||
>
|
>
|
||||||
<a-input placeholder="请输入姓名" v-decorator="['name', {rules: [{required: true, message: '请输入姓名!'}]}]" />
|
<a-input placeholder="请输入姓名" :disabled="registerDisabled" v-decorator="['name', {rules: [{required: true, message: '请输入姓名!'}]}]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -106,7 +106,9 @@
|
||||||
:wrapperCol="{span: 20}"
|
:wrapperCol="{span: 20}"
|
||||||
has-feedback
|
has-feedback
|
||||||
>
|
>
|
||||||
<a-input v-decorator="['jobs',{rules: [{ required: true, message: '请输入岗位!' }]}]" />
|
<a-select style="width: 100%" placeholder="请选择岗位" v-decorator="['jobs',{rules: [{ required: true, message: '请选择岗位!' }]}]" >
|
||||||
|
<a-select-option v-for="(item,index) in jobsData" :key="index" :value="item.value" >{{ item.name }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -120,7 +122,9 @@
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
has-feedback
|
has-feedback
|
||||||
>
|
>
|
||||||
<a-input v-decorator="['workType',{rules: [{ required: true, message: '请输入工种!' }]}]" />
|
<a-select style="width: 100%" placeholder="请选择工种" v-decorator="['workType',{rules: [{ required: true, message: '请选择工种!' }]}]" >
|
||||||
|
<a-select-option v-for="(item,index) in workTypeData" :key="index" :value="item.value" >{{ item.name }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -132,7 +136,9 @@
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
has-feedback
|
has-feedback
|
||||||
>
|
>
|
||||||
<a-input v-decorator="['degreeId',{rules: [{ required: true, message: '请输入工种!' }]}]" />
|
<a-select style="width: 100%" placeholder="请选择学历" v-decorator="['degreeId',{rules: [{ required: true, message: '请选择学历!' }]}]" >
|
||||||
|
<a-select-option v-for="(item,index) in degreeData" :key="index" :value="item.value" >{{ item.name }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -146,20 +152,8 @@
|
||||||
:wrapperCol="{span: 20}"
|
:wrapperCol="{span: 20}"
|
||||||
>
|
>
|
||||||
<a-checkbox-group v-decorator="['type',{rules: [{ required: true, message: '请选择人员类型!' }]}]">
|
<a-checkbox-group v-decorator="['type',{rules: [{ required: true, message: '请选择人员类型!' }]}]">
|
||||||
<a-checkbox value="1" name="type">
|
<a-checkbox name="type" v-for="(item,index) in typeData" :key="index" :value="item.value" >
|
||||||
单位主要负责人
|
{{ item.name }}
|
||||||
</a-checkbox>
|
|
||||||
<a-checkbox value="2" name="type">
|
|
||||||
安全管理员
|
|
||||||
</a-checkbox>
|
|
||||||
<a-checkbox value="3" name="type">
|
|
||||||
班组长
|
|
||||||
</a-checkbox>
|
|
||||||
<a-checkbox value="4" name="type">
|
|
||||||
特种作业人员
|
|
||||||
</a-checkbox>
|
|
||||||
<a-checkbox value="5" name="type">
|
|
||||||
其他
|
|
||||||
</a-checkbox>
|
</a-checkbox>
|
||||||
</a-checkbox-group>
|
</a-checkbox-group>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -175,7 +169,7 @@
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
has-feedback
|
has-feedback
|
||||||
>
|
>
|
||||||
<a-input readOnly @click="openOrgTree" v-decorator="['orgName',{rules: [{ required: true, message: '请选择机构!' }]}]" />
|
<a-input readOnly @click="openOrgTree" :disabled="registerDisabled" v-decorator="['orgName',{rules: [{ required: true, message: '请选择机构!' }]}]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item style="display: none;">
|
<a-form-item style="display: none;">
|
||||||
<a-input v-decorator="['orgId']" />
|
<a-input v-decorator="['orgId']" />
|
||||||
|
@ -183,6 +177,9 @@
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
|
<a-divider orientation="left">上传身份证</a-divider>
|
||||||
|
|
||||||
</a-spin>
|
</a-spin>
|
||||||
|
|
||||||
<org-tree @selectOrg="selectOrg($event)" ref="orgModal"/>
|
<org-tree @selectOrg="selectOrg($event)" ref="orgModal"/>
|
||||||
|
@ -192,6 +189,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { personAddOrUpdate, personGet } from '@/api/person/person'
|
import { personAddOrUpdate, personGet } from '@/api/person/person'
|
||||||
|
import { dictionaryDropDown } from '@/api/sys/dictionaryItem'
|
||||||
import OrgTree from '../org/OrgTree'
|
import OrgTree from '../org/OrgTree'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -210,28 +208,61 @@
|
||||||
modalTitle: '新增人员',
|
modalTitle: '新增人员',
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: this.$form.createForm(this)
|
registerDisabled: false,
|
||||||
|
form: this.$form.createForm(this),
|
||||||
|
jobsData: [],
|
||||||
|
workTypeData: [],
|
||||||
|
degreeData: [],
|
||||||
|
typeData: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted () {
|
||||||
|
this.dictionaryDropDown()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 新增初始化方法
|
// 注册信息编辑 新增人员初始化方法
|
||||||
add () {
|
registerEdit (record) {
|
||||||
this.modalTitle = '新增人员'
|
this.modalTitle = '新增人员'
|
||||||
|
this.confirmLoading = true
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
|
||||||
|
this.registerDisabled = true
|
||||||
|
setTimeout(() => {
|
||||||
|
// 基本信息加入表单
|
||||||
|
this.form.setFieldsValue(
|
||||||
|
{
|
||||||
|
name: record.name,
|
||||||
|
userName: record.userName,
|
||||||
|
phone: record.phone,
|
||||||
|
orgId: record.orgId,
|
||||||
|
orgName: record.orgName
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}, 100)
|
||||||
|
|
||||||
|
this.confirmLoading = false
|
||||||
},
|
},
|
||||||
// 编辑初始化方法
|
// 编辑初始化方法
|
||||||
edit (record) {
|
edit (record) {
|
||||||
this.modalTitle = '编辑人员'
|
this.modalTitle = '编辑人员'
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
|
||||||
|
this.registerDisabled = true
|
||||||
|
|
||||||
// 基本信息加入表单
|
// 基本信息加入表单
|
||||||
personGet({id: record.id}).then((res) => {
|
personGet({ id: record.id }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
const data = res.data
|
const data = res.data
|
||||||
// 默认选中的多选框
|
// 默认选中的多选框
|
||||||
const type = data.type.split(',')
|
const type = data.type.split(',')
|
||||||
this.form.getFieldDecorator('type', { valuePropName: 'checked', initialValue: type })
|
const typeIntArr = []// 保存转换后的整型字符串
|
||||||
|
type.forEach(item => {
|
||||||
|
typeIntArr.push(+item)
|
||||||
|
})
|
||||||
|
this.form.getFieldDecorator('type', { valuePropName: 'checked', initialValue: typeIntArr })
|
||||||
|
|
||||||
|
console.log(data)
|
||||||
this.form.setFieldsValue(
|
this.form.setFieldsValue(
|
||||||
{
|
{
|
||||||
id: data.id,
|
id: data.id,
|
||||||
|
@ -242,8 +273,8 @@
|
||||||
// age: data.age,
|
// age: data.age,
|
||||||
// sex: data.sex,
|
// sex: data.sex,
|
||||||
phone: data.phone,
|
phone: data.phone,
|
||||||
jobs: data.jobs,
|
jobs: parseInt(data.jobs),
|
||||||
workType: data.workType,
|
workType: parseInt(data.workType),
|
||||||
degreeId: data.degreeId,
|
degreeId: data.degreeId,
|
||||||
orgId: data.orgId,
|
orgId: data.orgId,
|
||||||
orgName: data.orgName
|
orgName: data.orgName
|
||||||
|
@ -257,6 +288,29 @@
|
||||||
})
|
})
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 获取字典数据
|
||||||
|
*/
|
||||||
|
dictionaryDropDown () {
|
||||||
|
this.formLoading = true
|
||||||
|
// 岗位
|
||||||
|
dictionaryDropDown({ dictionaryCode: '0002' }).then((res) => {
|
||||||
|
this.jobsData = res.data
|
||||||
|
})
|
||||||
|
// 工种
|
||||||
|
dictionaryDropDown({ dictionaryCode: '0003' }).then((res) => {
|
||||||
|
this.workTypeData = res.data
|
||||||
|
})
|
||||||
|
// 学历
|
||||||
|
dictionaryDropDown({ dictionaryCode: '0004' }).then((res) => {
|
||||||
|
this.degreeData = res.data
|
||||||
|
})
|
||||||
|
// 人员类型
|
||||||
|
dictionaryDropDown({ dictionaryCode: '0005' }).then((res) => {
|
||||||
|
this.typeData = res.data
|
||||||
|
this.formLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
handleSubmit () {
|
handleSubmit () {
|
||||||
const { form: { validateFields } } = this
|
const { form: { validateFields } } = this
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
</a-card>
|
</a-card>
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button @click="$refs.personForm.add()" icon="plus" type="primary" v-if="hasPerm('person:add')">新增人员</a-button>
|
<a-button @click="personRegister" icon="plus" type="primary" v-if="hasPerm('person:add')">新增人员</a-button>
|
||||||
|
|
||||||
<a-button @click="transfer" type="primary" v-if="hasPerm('person:transfer')">转移部门</a-button>
|
<a-button @click="transfer" type="primary" v-if="hasPerm('person:transfer')">转移部门</a-button>
|
||||||
<a-button @click="quit" type="primary" v-if="hasPerm('person:quit')">离职</a-button>
|
<a-button @click="quit" type="primary" v-if="hasPerm('person:quit')">离职</a-button>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<div class='person-type'>
|
<div class="person-type">
|
||||||
<a-radio-group v-model="queryParam.isAdmin" @change="onRadioChange">
|
<a-radio-group v-model="queryParam.isAdmin" @change="onRadioChange">
|
||||||
<a-radio :value="2">学员</a-radio>
|
<a-radio :value="2">学员</a-radio>
|
||||||
<a-radio :value="1">管理员</a-radio>
|
<a-radio :value="1">管理员</a-radio>
|
||||||
|
@ -111,6 +111,7 @@
|
||||||
import { orgList } from '@/api/org/org'
|
import { orgList } from '@/api/org/org'
|
||||||
import { listToTree } from '@/utils/util'
|
import { listToTree } from '@/utils/util'
|
||||||
import { personPage, personDel, personQuit, personTransferOrg, personSetAdmin, personResetPwd } from '@/api/person/person'
|
import { personPage, personDel, personQuit, personTransferOrg, personSetAdmin, personResetPwd } from '@/api/person/person'
|
||||||
|
import PersonRegister from './PersonRegister'
|
||||||
import PersonForm from './PersonForm'
|
import PersonForm from './PersonForm'
|
||||||
import PersonDetail from './PersonDetail'
|
import PersonDetail from './PersonDetail'
|
||||||
import OrgTree from '../org/OrgTree'
|
import OrgTree from '../org/OrgTree'
|
||||||
|
@ -119,6 +120,7 @@
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
STable,
|
STable,
|
||||||
|
PersonRegister,
|
||||||
PersonForm,
|
PersonForm,
|
||||||
PersonDetail,
|
PersonDetail,
|
||||||
OrgTree
|
OrgTree
|
||||||
|
@ -126,7 +128,7 @@
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParam: {isAdmin: 2},
|
queryParam: { isAdmin: 2 },
|
||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
@ -172,14 +174,13 @@
|
||||||
title: 'name',
|
title: 'name',
|
||||||
key: 'id',
|
key: 'id',
|
||||||
value: 'id'
|
value: 'id'
|
||||||
}
|
},
|
||||||
|
orgId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
/**
|
/**
|
||||||
* 获取到机构树,展开顶级下树节点,考虑到后期数据量变大,不建议全部展开
|
* 获取到机构树,展开顶级下树节点,考虑到后期数据量变大,不建议全部展开
|
||||||
完犊子,你的决策支撑写完了?可以的呢
|
|
||||||
我反正用不上,这两天发展党员还可以凑凑
|
|
||||||
*/
|
*/
|
||||||
orgList().then(res => {
|
orgList().then(res => {
|
||||||
this.treeLoading = false
|
this.treeLoading = false
|
||||||
|
@ -187,6 +188,8 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.orgTree = listToTree(res.data, [], rootParentId)
|
this.orgTree = listToTree(res.data, [], rootParentId)
|
||||||
|
this.orgId = this.orgTree[0].id
|
||||||
|
console.log(this.orgId)
|
||||||
for (var item of this.orgTree) {
|
for (var item of this.orgTree) {
|
||||||
if (item.pid === 0) {
|
if (item.pid === 0) {
|
||||||
this.defaultExpandedKeys.push(item.id)
|
this.defaultExpandedKeys.push(item.id)
|
||||||
|
@ -268,10 +271,10 @@
|
||||||
selectOrg (orgData) {
|
selectOrg (orgData) {
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确认转移部门至'+ orgData.name +'吗',
|
content: '确认转移部门至' + orgData.name + '吗',
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const paramIds = this.selectedRowKeys.join(',')
|
const paramIds = this.selectedRowKeys.join(',')
|
||||||
const param = { ids: paramIds,targetOrgId: orgData.id }
|
const param = { ids: paramIds, targetOrgId: orgData.id }
|
||||||
personTransferOrg(param).then((res) => {
|
personTransferOrg(param).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$message.success('操作成功')
|
this.$message.success('操作成功')
|
||||||
|
@ -313,6 +316,12 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
personRegister () {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/person/personRegister',
|
||||||
|
query: { orgId: this.orgId }
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 点击左侧机构树查询列表
|
* 点击左侧机构树查询列表
|
||||||
*/
|
*/
|
||||||
|
@ -320,12 +329,13 @@
|
||||||
this.queryParam = {
|
this.queryParam = {
|
||||||
'orgId': e.toString()
|
'orgId': e.toString()
|
||||||
}
|
}
|
||||||
|
this.orgId = e.toString()
|
||||||
this.$refs.table.refresh(true)
|
this.$refs.table.refresh(true)
|
||||||
},
|
},
|
||||||
handleOk () {
|
handleOk () {
|
||||||
this.$refs.table.refresh()
|
this.$refs.table.refresh()
|
||||||
},
|
},
|
||||||
onRadioChange(e) {
|
onRadioChange (e) {
|
||||||
this.queryParam.isAdmin = e.target.value
|
this.queryParam.isAdmin = e.target.value
|
||||||
this.$refs.table.refresh(true)
|
this.$refs.table.refresh(true)
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,117 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-card :bordered="false" style="padding-bottom: 0px; margin-bottom: 10px ">
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<h3>新增人员</h3>
|
||||||
|
<h3>单位邀请码:{{ invitationCode }}</h3>
|
||||||
|
<h3>邀请链接: www.anquanpeixun.com</h3>
|
||||||
|
</div>
|
||||||
|
</a-card>
|
||||||
|
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<div class="table-operator">
|
||||||
|
<h3>最近注册人员</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<s-table
|
||||||
|
ref="table"
|
||||||
|
:columns="columns"
|
||||||
|
:data="loadData"
|
||||||
|
:rowKey="(record) => record.id"
|
||||||
|
>
|
||||||
|
<template slot="createTime" slot-scope="text, record">
|
||||||
|
{{ record.createTime | moment('YYYY-MM-DD') }}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<span slot="action" slot-scope="text, record">
|
||||||
|
<a @click="$refs.personForm.registerEdit(record)">编辑</a>
|
||||||
|
</span>
|
||||||
|
</s-table>
|
||||||
|
|
||||||
|
<person-form ref="personForm" @ok="handleOk" />
|
||||||
|
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { STable } from '@/components'
|
||||||
|
import { personRegisterPage } from '@/api/person/personRegister'
|
||||||
|
import PersonForm from './PersonForm'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
STable,
|
||||||
|
PersonForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
invitationCode: '',
|
||||||
|
// 查询参数
|
||||||
|
queryParam: { orgId: this.$route.query.orgId },
|
||||||
|
// 表头
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '姓名',
|
||||||
|
dataIndex: 'name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '用户名',
|
||||||
|
dataIndex: 'userName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '单位信息',
|
||||||
|
dataIndex: 'unit'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '部门信息',
|
||||||
|
dataIndex: 'dept'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '手机号',
|
||||||
|
dataIndex: 'phone'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '注册时间',
|
||||||
|
dataIndex: 'createTime',
|
||||||
|
scopedSlots: { customRender: 'createTime' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
width: '150px',
|
||||||
|
dataIndex: 'action',
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// 加载数据方法 必须为 Promise 对象
|
||||||
|
loadData: parameter => {
|
||||||
|
return personRegisterPage(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
this.invitationCode = res.invitationCode
|
||||||
|
return res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.table.refresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.table-operator {
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.person-type span{
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- PageHeader 第二种使用方式 (v-slot) -->
|
<!-- PageHeader 第二种使用方式 (v-slot) -->
|
||||||
<a-card :bordered="false" :title="title">
|
<a-card :bordered="false" :title="title">
|
||||||
<a-steps class="steps" :current="currentTab">
|
<a-steps class="steps" type="navigation" :current="currentTab">
|
||||||
<a-step title="基本信息" />
|
<a-step title="基本信息" />
|
||||||
<a-step title="选择单位" />
|
<a-step title="选择单位" />
|
||||||
<!-- v-if="['2', '3', '4'].includes(form.trainWay)" -->
|
<!-- v-if="['2', '3', '4'].includes(form.trainWay)" -->
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<a-button icon="select" @click="$refs.CourseSelect.edit({})">添加课程</a-button>
|
<a-button icon="select" @click="$refs.CourseSelect.edit({})">添加课程</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
|
|
||||||
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
|
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="data1">
|
||||||
<span slot="serial" slot-scope="text, record, index">
|
<span slot="serial" slot-scope="text, record, index">
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -49,34 +49,24 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
//这里存放数据
|
//这里存放数据
|
||||||
return {
|
return {
|
||||||
form: this.$form.createForm(this, { name: 'project' }),
|
labelCol: {},
|
||||||
|
wrapperCol: {},
|
||||||
|
vertical: 'vertical',
|
||||||
|
data1: {},
|
||||||
totalHours: 0, //总课时
|
totalHours: 0, //总课时
|
||||||
totalLearnHours: 0, //总学时
|
totalLearnHours: 0, //总学时
|
||||||
totalTopicNum: 0, //题目数量
|
totalTopicNum: 0, //题目数量
|
||||||
//查询数据
|
queryParam: {},//查询数据
|
||||||
queryParam: {},
|
|
||||||
// 表头
|
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '序号', key: 'id', dataIndex: 'id', width: 60, scopedSlots: { customRender: 'serial' } },
|
{ title: '序号', key: 'id', dataIndex: 'id', width: 60, scopedSlots: { customRender: 'serial' } },
|
||||||
{ title: '课程编号', dataIndex: 'courseNo', key: 'courseNo' },
|
{ title: '课程编号', dataIndex: 'courseNo', key: 'courseNo' },
|
||||||
{ title: '课程名称', dataIndex: 'courseName', key: 'courseName' },
|
{ title: '课程名称', dataIndex: 'courseName', key: 'courseName' },
|
||||||
{ title: '课时', dataIndex: 'courseHours', key: 'courseHours', customRender: (text) => text + '分' },
|
{ title: '课时', dataIndex: 'courseHours', key: 'courseHours', customRender: (text) => text + '分' },
|
||||||
{ title: '学时要求', dataIndex: 'learnHours', key: 'learnHours', customRender: (text) => text + '分' },
|
{ title: '学时要求', dataIndex: 'learnHours', key: 'learnHours', customRender: (text) => text + '分' },
|
||||||
{ title: '题量', dataIndex: 'topicNumber', key: 'projectName' },
|
{ title: '题量', dataIndex: 'topicNumber', key: 'topicNumber' },
|
||||||
{ title: '项目名称', dataIndex: 'projectName', key: 'projectName' },
|
{ title: '项目名称', dataIndex: 'projectName', key: 'projectName' },
|
||||||
{
|
{ title: '操作', width: 200, align: 'center', scopedSlots: { customRender: 'action' }, },
|
||||||
title: '操作',
|
], // 表头
|
||||||
width: 200,
|
|
||||||
align: 'center',
|
|
||||||
scopedSlots: { customRender: 'action' },
|
|
||||||
},
|
|
||||||
],
|
|
||||||
// 加载数据方法 必须为 Promise 对象
|
|
||||||
loadData: (parameter) => {
|
|
||||||
return getProjectList(Object.assign(parameter, this.queryParam)).then((res) => {
|
|
||||||
return res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//计算属性 类似于data概念
|
//计算属性 类似于data概念
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
<a-row type="flex" justify="center" align="top">
|
<a-row type="flex" justify="center" align="top">
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-menu v-model="current" mode="horizontal">
|
<a-menu v-model="current" mode="horizontal">
|
||||||
<a-menu-item key="mail"> <a-icon type="mail" />系统课程</a-menu-item>
|
<a-menu-item key="sys"> <a-icon type="mail" />系统课程</a-menu-item>
|
||||||
<a-menu-item key="app"> <a-icon type="appstore" />自制课程</a-menu-item>
|
<a-menu-item key="self"> <a-icon type="appstore" />自制课程</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
<a-input-search style="margin-bottom: 8px" placeholder="Search" @change="onChange" />
|
<a-input-search style="margin-bottom: 8px" placeholder="Search" @change="onChange" />
|
||||||
<a-tree
|
<a-tree
|
||||||
|
@ -43,10 +43,6 @@
|
||||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||||
//例如:import 《组件名称》 from '《组件路径》'
|
//例如:import 《组件名称》 from '《组件路径》'
|
||||||
|
|
||||||
/**------------------------------------------------------------ */
|
|
||||||
420500199901110031
|
|
||||||
/**----------------------------------------------------------------- */
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
//import引入的组件需要注入到对象中才能使用
|
//import引入的组件需要注入到对象中才能使用
|
||||||
components: {},
|
components: {},
|
||||||
|
@ -57,11 +53,11 @@ export default {
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
current: ['mail'],
|
current: ['mail'],
|
||||||
|
modalTitle: '',
|
||||||
expandedKeys: [],
|
expandedKeys: [],
|
||||||
searchValue: '',
|
searchValue: '',
|
||||||
autoExpandParent: true,
|
autoExpandParent: true,
|
||||||
gData,
|
gData: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//计算属性 类似于data概念
|
//计算属性 类似于data概念
|
||||||
|
|
|
@ -86,13 +86,13 @@
|
||||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||||
<a-input-number v-model="form.examNumber" :min="0" style="width: 100%" />
|
<a-input-number v-model="form.examNumber" :min="0" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<span> 补考次数: </span>
|
<!-- <span> 补考次数: </span>
|
||||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||||
<a-input-number v-model="form.resitNumber" :min="0" style="width: 100%" />
|
<a-input-number v-model="form.resitNumber" :min="0" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||||
<a-button type="primary" @click="randomResit"> 随机补考 </a-button>
|
<a-button type="primary" @click="randomResit"> 随机补考 </a-button>
|
||||||
</a-form-item>
|
</a-form-item> -->
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
@search="handleRefresh"
|
@search="handleRefresh"
|
||||||
@reset="() => {queryParam = {}, handleRefresh()}" >
|
@reset="() => {queryParam = {}, handleRefresh()}" >
|
||||||
</SearchCom>
|
</SearchCom>
|
||||||
|
|
||||||
|
<a-button type="primary" @click="handleCreate">新增</a-button>
|
||||||
</div>
|
</div>
|
||||||
<s-table
|
<s-table
|
||||||
ref="table"
|
ref="table"
|
||||||
|
|
|
@ -46,13 +46,14 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { dictionaryItemPage, dictionaryItemDel } from '@/api/sys/dictionaryItem'
|
import { dictionaryItemPage, dictionaryItemDel } from '@/api/sys/dictionaryItem'
|
||||||
import { STable } from '@/components'
|
import { STable, GoBack } from '@/components'
|
||||||
import DictionaryItemForm from './DictionaryItemForm'
|
import DictionaryItemForm from './DictionaryItemForm'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DictionaryItemList',
|
name: 'DictionaryItemList',
|
||||||
components: {
|
components: {
|
||||||
STable,
|
STable,
|
||||||
|
GoBack,
|
||||||
DictionaryItemForm
|
DictionaryItemForm
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
@ -91,6 +92,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
goBack () {
|
||||||
|
// 返回到上一级
|
||||||
|
this.$router.push({ path: '/dictionary' })
|
||||||
|
},
|
||||||
// 增
|
// 增
|
||||||
handleCreate () {
|
handleCreate () {
|
||||||
this.$refs.modal.add()
|
this.$refs.modal.add()
|
||||||
|
|
Loading…
Reference in New Issue