Files
dvcp_v2_webapp/project/pingchang/apps/AppOrganizationChange/components/addChange.vue

133 lines
4.3 KiB
Vue
Raw Normal View History

2022-10-14 11:36:06 +08:00
<template>
2022-10-14 17:32:19 +08:00
<ai-list class="addChange">
<template #title>
2022-10-17 11:09:47 +08:00
<ai-title title="基本信息" isShowBottomBorder isShowBack @onBackClick="cancel(false)" />
2022-10-14 17:32:19 +08:00
</template>
2022-10-17 11:09:47 +08:00
<template #content>
<div class="Form" style="padding: 0 200px;">
<el-form ref="form" :model="form" label-width="100px" label-position="right">
<ai-bar title="基本信息"></ai-bar>
<el-row type="flex">
<el-col :span="12">
<el-form-item label="换届时间" prop="data" :rules="[{ required: true, message: '请选择换届时间', trigger: 'blur' }]">
<el-input size="small" :maxlength="30" placeholder="请输入大屏项目名称" v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="届次" prop="noun" :rules="[{ required: true, message: '请输入届次', trigger: 'blur' }]">
<el-input size="small" :maxlength="30" placeholder="请输入届次" v-model="form.name"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
2022-10-14 17:32:19 +08:00
2022-10-17 11:09:47 +08:00
<ai-bar title="本届任职(必填)">
<template slot="right">
<el-button size="small" type="text" icon="iconfont iconAdd" @click="toEdit('')" >添加任职人员</el-button>
</template>
</ai-bar>
<ai-table
class="detail-table__table"
:tableData="tableDataJob"
:col-configs="colConfigsJob"
:total="job.total"
:current.sync="job.current"
:size.sync="job.size"
>
<!-- @getList="getJobList" -->
<el-table-column slot="options" label="操作" align="center">
<template slot-scope="{ row }">
<el-button type="text" @click="jobEdit(row.id)">编辑</el-button>
<el-button type="text" @click="jobDelete(row.id)">删除</el-button>
</template>
</el-table-column>
</ai-table>
<ai-bar title="本届候选人">
<template slot="right">
<el-button size="small" type="text" icon="iconfont iconAdd" @click="toEdit('')" >添加候选人</el-button>
</template>
</ai-bar>
<ai-table
class="detail-table__table"
:tableData="tableDataPerson"
:col-configs="colConfigsPerson"
:total="person.total"
:current.sync="person.current"
:size.sync="person.size"
>
<!-- @getList="getJobList" -->
<el-table-column slot="options" label="操作" align="center">
<template slot-scope="{ row }">
<el-button type="text" @click="jobEdit(row.id)">编辑</el-button>
<el-button type="text" @click="jobDelete(row.id)">删除</el-button>
</template>
</el-table-column>
</ai-table>
</div>
2022-10-14 17:32:19 +08:00
</template>
</ai-list>
2022-10-14 11:36:06 +08:00
</template>
<script>
export default {
name: "addChange",
props: {
instance: Function,
permissions: Function,
dict: Object,
},
2022-10-14 17:32:19 +08:00
data() {
return {
form: {
2022-10-17 11:09:47 +08:00
},
tableDataJob: [],
tableDataPerson: [],
totalJob: '',
job: {
total: 0,
current: 1,
size: 10,
},
person: {
total: 0,
current: 1,
size: 10,
}
}
},
computed: {
colConfigsJob() {
return [
{prop: 'content', label: '职位'},
{prop: 'content', label: '姓名'},
{slot: 'options'},
]
},
colConfigsPerson() {
return [
{prop: 'content', label: '职位'},
{prop: 'content', label: '候选人'},
{slot: 'options'},
]
},
formRules() {
return {
// corpId: [{required: true, message: "请输入CorpId"}],
2022-10-14 17:32:19 +08:00
}
}
},
methods: {
2022-10-17 11:09:47 +08:00
cancel (isRefresh) {
this.$emit('change', {
type: 'List',
isRefresh: !!isRefresh
})
}
2022-10-14 17:32:19 +08:00
}
2022-10-14 11:36:06 +08:00
}
</script>
<style lang="scss" scope>
.addChange {}
</style>