commit
This commit is contained in:
@@ -89,6 +89,10 @@ module.exports = {
|
||||
type: Number,
|
||||
default: 300
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请输入正文'
|
||||
},
|
||||
menus: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
@@ -181,6 +185,7 @@ module.exports = {
|
||||
this.editor.config.height = this.height
|
||||
//菜单
|
||||
this.editor.config.menus = this.menus
|
||||
this.editor.config.placeholder = this.placeholder
|
||||
this.editor.create()
|
||||
},
|
||||
isEmptyEditor() {
|
||||
|
||||
@@ -117,11 +117,11 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="协会介绍" prop="stjs" required>
|
||||
<text-editor v-model="formData.stjs"></text-editor>
|
||||
<text-editor v-model="formData.stjs" :placeholder="'请输入协会介绍,至少需要200个字'"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="协会宗旨" prop="stzz" required>
|
||||
<text-editor v-model="formData.stzz"></text-editor>
|
||||
<text-editor v-model="formData.stzz" :placeholder="'请输入协会宗旨,至少需要30个字'"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="30">
|
||||
@@ -176,12 +176,13 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<div v-show="activeName === '2'">
|
||||
<vi-title title="请填写协会发起人信息"></vi-title>
|
||||
<vi-title title="请填写协会发起人信息(至少需要3人)"></vi-title>
|
||||
<el-table :data="sponsorData">
|
||||
<el-table-column label="姓名" prop="userId">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
:disabled="scope.row.disabled"
|
||||
v-model="scope.row.userId"
|
||||
filterable remote
|
||||
@change="(val) => { sponsorPersonChange(val, scope.row, scope.$index) }"
|
||||
@@ -200,26 +201,25 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="工号" prop="loginname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.loginname" readonly></el-input>
|
||||
<el-input :value="scope.row.loginname" disabled placeholder="选择发起人后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.unitname" readonly></el-input>
|
||||
<el-input :value="scope.row.unitname" disabled placeholder="选择发起人后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" prop="mobile">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.mobile" readonly></el-input>
|
||||
<el-input :value="scope.row.mobile" disabled placeholder="选择发起人后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" @click="sponsorData.push({})" size="mini">增加</el-button>
|
||||
<el-button type="primary" @click="sponsorData.push({disabled:false})" size="mini">增加</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" :disabled="scope.$index <= 4"
|
||||
@click="sponsorDeleteRow(scope.row, scope.$index)" size="mini">删除</el-button>
|
||||
<el-button type="danger" @click="sponsorDeleteRow(scope.row, scope.$index)" size="mini">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -241,6 +241,7 @@ layout("/layouts/platform.html"){
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
:disabled="scope.row.disabled"
|
||||
v-model="scope.row.userId"
|
||||
filterable remote
|
||||
@change="(val) => { managePersonChange(val, scope.row, scope.$index) }"
|
||||
@@ -259,26 +260,25 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="工号" prop="loginname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.loginname" readonly></el-input>
|
||||
<el-input :value="scope.row.loginname" disabled placeholder="选择理事机构后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.unitname" readonly></el-input>
|
||||
<el-input :value="scope.row.unitname" disabled placeholder="选择理事机构后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" prop="mobile">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.mobile" readonly></el-input>
|
||||
<el-input :value="scope.row.mobile" disabled placeholder="选择理事机构后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" @click="managePerson.push({})" size="mini">增加</el-button>
|
||||
<el-button type="primary" @click="managePerson.push({disabled: false})" size="mini">增加</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" :disabled="scope.$index <= 1"
|
||||
@click="deleteRow(scope.row, scope.$index)" size="mini">删除</el-button>
|
||||
<el-button type="danger" @click="deleteRow(scope.row, scope.$index)" size="mini">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -310,17 +310,17 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="工号" prop="loginname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.loginname" readonly></el-input>
|
||||
<el-input :value="scope.row.loginname" readonly placeholder="选择协会成员后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.unitname" readonly></el-input>
|
||||
<el-input :value="scope.row.unitname" readonly placeholder="选择协会成员后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" prop="mobile">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.mobile" readonly></el-input>
|
||||
<el-input :value="scope.row.mobile" readonly placeholder="选择协会成员后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否同意邀请" prop="mobile">
|
||||
@@ -332,7 +332,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" @click="clubUserTableData.push({})" size="mini">增加</el-button>
|
||||
<el-button type="primary" @click="clubUserTableData.push({invite: true})" size="mini">增加</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger"
|
||||
@@ -349,8 +349,8 @@ layout("/layouts/platform.html"){
|
||||
<el-button v-if="activeName === '3'" type="primary" @click="activeName = '2'">上一步</el-button>
|
||||
<el-button v-if="activeName === '4'" type="primary" @click="activeName = '3'">上一步</el-button>
|
||||
<el-button v-if="activeName === '1'" type="primary" @click="activeName = '2'">下一步</el-button>
|
||||
<el-button v-if="activeName === '2'" type="primary" @click="activeName = '3'">下一步</el-button>
|
||||
<el-button v-if="activeName === '3'" type="primary" @click="activeName = '4'">下一步</el-button>
|
||||
<el-button v-if="activeName === '2'" type="primary" @click="sponsorNext">下一步</el-button>
|
||||
<el-button v-if="activeName === '3'" type="primary" @click="manageNext">下一步</el-button>
|
||||
<el-button type="primary" @click="doHandle(true)">保存</el-button>
|
||||
<el-button type="primary" @click="doHandle(false)">提交</el-button>
|
||||
</el-row>
|
||||
@@ -426,11 +426,40 @@ layout("/layouts/platform.html"){
|
||||
|
||||
},
|
||||
methods: {
|
||||
sponsorNext() {
|
||||
this.sponsorData.forEach(row => {
|
||||
if(row.userId) {
|
||||
let sameUserIndex = this.clubUserTableData.findIndex(o => o.userId === row.userId)
|
||||
if(sameUserIndex !== -1) {
|
||||
this.clubUserTableData.splice(sameUserIndex, 1, {...row, invite: true, status: 5})
|
||||
} else {
|
||||
this.clubUserTableData.push({...row, invite: true, status: 5})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.sponsorData.forEach(item => item.disabled = true)
|
||||
this.activeName = '3'
|
||||
},
|
||||
manageNext() {
|
||||
this.managePerson.forEach(row => {
|
||||
if(row.userId) {
|
||||
let sameUserIndex = this.clubUserTableData.findIndex(o => o.userId === row.userId)
|
||||
if(sameUserIndex !== -1) {
|
||||
this.clubUserTableData.splice(sameUserIndex, 1, {...row, invite: true, status: 5})
|
||||
} else {
|
||||
this.clubUserTableData.push({...row, invite: true, status: 5})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.managePerson.forEach(item => item.disabled = true)
|
||||
this.activeName = '4'
|
||||
},
|
||||
deleteRow(row, index) {
|
||||
if (row.id) {
|
||||
this.deleteIds.push(row.id)
|
||||
}
|
||||
this.managePerson.splice(index, 1)
|
||||
this.clubUserTableData = this.clubUserTableData.filter(o => o.userId !== row.userId)
|
||||
},
|
||||
clubUserChange(val, row, index) {
|
||||
const cloneData = clone(this.clubUserTableData)
|
||||
@@ -438,12 +467,6 @@ layout("/layouts/platform.html"){
|
||||
const u = cloneData.find(o => val && o.userId === val)
|
||||
if (u) {
|
||||
this.$message.warning('协会成员不能重复')
|
||||
}
|
||||
const sameUser = this.managePerson.find(o => o.userId === val)
|
||||
if(sameUser) {
|
||||
this.$message.warning('该成员已在理事机构中设置')
|
||||
}
|
||||
if(u || sameUser) {
|
||||
this.$set(row, 'loginname', '')
|
||||
this.$set(row, 'unitname', '')
|
||||
this.$set(row, 'mobile', '')
|
||||
@@ -463,6 +486,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
sponsorDeleteRow(row, index) {
|
||||
this.sponsorData.splice(index, 1)
|
||||
this.clubUserTableData = this.clubUserTableData.filter(o => o.userId !== row.userId)
|
||||
},
|
||||
sfChange(val, row, index) {
|
||||
const cloneData = clone(this.managePerson)
|
||||
@@ -491,17 +515,10 @@ layout("/layouts/platform.html"){
|
||||
this.$set(row, 'userId', '')
|
||||
return
|
||||
}
|
||||
let user = this.userOptions.find(o => o.id === val)
|
||||
const sameUser = this.clubUserTableData.find(o => o.userId === val)
|
||||
if(sameUser) {
|
||||
this.$message.warning(user.username + '已在协会成员设置,自动为您调整到理事机构中')
|
||||
user = sameUser
|
||||
this.clubUserTableData = this.clubUserTableData.filter(o => o.userId !== sameUser.userId)
|
||||
}
|
||||
const user = this.userOptions.find(o => o.id === val)
|
||||
row.loginname = user.loginname
|
||||
row.unitname = user.unitname
|
||||
row.mobile = user.mobile
|
||||
//this.userOptions = []
|
||||
},
|
||||
sponsorPersonChange(val, row, index) {
|
||||
const cloneData = clone(this.sponsorData)
|
||||
@@ -519,8 +536,6 @@ layout("/layouts/platform.html"){
|
||||
row.loginname = user.loginname
|
||||
row.unitname = user.unitname
|
||||
row.mobile = user.mobile
|
||||
|
||||
//this.userOptions = []
|
||||
},
|
||||
fzrChange(id) {
|
||||
const user = this.userOptions.find(v => {
|
||||
@@ -587,10 +602,9 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
this.managePerson = clone(mUser)
|
||||
|
||||
let cUser = resp.data.clubuser.filter(o => o.sf === 2)
|
||||
this.clubUserTableData = clone(cUser)
|
||||
this.clubUserTableData = clone(resp.data.clubuser)
|
||||
|
||||
let cUserList = cUser.map(o => o.userid)
|
||||
let cUserList = this.clubUserTableData.map(o => o.userid)
|
||||
let users = mUser.map(o => o.userId)
|
||||
|
||||
let array = []
|
||||
@@ -690,7 +704,11 @@ layout("/layouts/platform.html"){
|
||||
this.$message.success(resp.msg)
|
||||
sublime.jumpPagePjax('/platform/sys/club/clubMyApply')
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
this.$alert(resp.msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true,
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.warning('协会基本信息存在必填项未填写')
|
||||
|
||||
Reference in New Issue
Block a user