23 changed files with 89 additions and 661 deletions
@ -1,3 +1,3 @@ |
|||
VUE_APP_MODE=production |
|||
VUE_APP_PREVIEW=false |
|||
VUE_APP_URL=http://www.sxwikionline.com/ |
|||
VUE_APP_URL=https://www.sxgreenvalley.com/ |
|||
|
@ -1,10 +1,10 @@ |
|||
VUE_APP_MODE=development |
|||
VUE_APP_NODE_ENV=development |
|||
VUE_APP_SCENE=greenback |
|||
VUE_APP_BASE_URL=http://www.sxwikionline.com/ |
|||
VUE_APP_API_URL=http://www.sxwikionline.com/gateway |
|||
VUE_APP_BASE_URL=https://www.sxgreenvalley.com/ |
|||
VUE_APP_API_URL=https://www.sxgreenvalley.com/gateway |
|||
VUE_APP_PROXY_URL=/gateway |
|||
VUE_APP_PUBLIC_PATH=/greenback |
|||
VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws |
|||
VUE_APP_MSG_URL=wss://www.sxgreenvalley.com/websocket/message/v4.0/ws |
|||
VUE_APP_TITLE=绿谷在线 |
|||
VUE_APP_DESCRIPTION=绿谷在线管理后台 |
|||
|
@ -1,10 +1,10 @@ |
|||
VUE_APP_MODE=production |
|||
VUE_APP_NODE_ENV=production |
|||
VUE_APP_SCENE=greenback |
|||
VUE_APP_BASE_URL=http://www.sxwikionline.com/ |
|||
VUE_APP_API_URL=http://www.sxwikionline.com/gateway |
|||
VUE_APP_BASE_URL=https://www.sxgreenvalley.com/ |
|||
VUE_APP_API_URL=https://www.sxgreenvalley.com/gateway |
|||
VUE_APP_PROXY_URL=/gateway |
|||
VUE_APP_PUBLIC_PATH=/greenback |
|||
VUE_APP_MSG_URL=wss://www.tall.wiki/websocket/message/v4.0/ws |
|||
VUE_APP_MSG_URL=wss://www.sxgreenvalley.com/websocket/message/v4.0/ws |
|||
VUE_APP_TITLE=绿谷在线 |
|||
VUE_APP_DESCRIPTION=绿谷在线管理后台 |
|||
|
@ -1,174 +0,0 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<!-- 添加 --> |
|||
<a-modal |
|||
:maskClosable="false" |
|||
@cancel="$emit('closeModal')" |
|||
destroyOnClose |
|||
footer |
|||
title="添加创业导师" |
|||
v-model="visible" |
|||
width="700px" |
|||
> |
|||
<a-form :form="form" @submit="handleSubmit"> |
|||
<!-- 导师名称 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="导师名称" |
|||
> |
|||
<a-input |
|||
placeholder="导师名称" |
|||
v-decorator="[ |
|||
'tutorName', |
|||
{ |
|||
rules: [ |
|||
{ required: true, message: '导师名称不能为空' }, |
|||
{ whitespace: true, message: '导师名称不能为空' }, |
|||
{ max: 140, massage: '导师名称最多140个字符' }, |
|||
], |
|||
}, |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 导师简介 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="导师简介" |
|||
> |
|||
<a-textarea |
|||
placeholder="导师简介" |
|||
v-decorator="[ |
|||
'tutorProfile', |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 头像 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="头像" |
|||
> |
|||
<a-upload |
|||
:before-upload="beforeUpload" |
|||
:show-upload-list="false" |
|||
@change="handleChange" |
|||
action="https://www.mocky.io/v2/5cc8019d300000980a055e76" |
|||
class="avatar-uploader" |
|||
list-type="picture-card" |
|||
name="avatar" |
|||
> |
|||
<img :src="imageUrl" alt="avatar" v-if="imageUrl" /> |
|||
<div v-else> |
|||
<a-icon :type="loading ? 'loading' : 'plus'" /> |
|||
<div class="ant-upload-text">Upload</div> |
|||
</div> |
|||
</a-upload> |
|||
</a-form-item> |
|||
|
|||
<a-form-item class="d-flex flex-row-reverse"> |
|||
<a-button @click="$emit('closeModal')" class="mr-3">取消</a-button> |
|||
<a-button class="white--text" html-type="submit" type="primary">保存</a-button> |
|||
</a-form-item> |
|||
</a-form> |
|||
</a-modal> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
const formItemLayout = { |
|||
labelCol: { span: 6 }, |
|||
wrapperCol: { span: 16 }, |
|||
}; |
|||
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } }; |
|||
function getBase64(img, callback) { |
|||
const reader = new FileReader(); |
|||
reader.addEventListener('load', () => callback(reader.result)); |
|||
reader.readAsDataURL(img); |
|||
} |
|||
|
|||
export default { |
|||
name: 'MentorAdd', |
|||
props: { visible: { type: Boolean, default: false } }, |
|||
data() { |
|||
return { |
|||
formItemLayout, |
|||
tailItemLayout, |
|||
form: this.$form.createForm(this, { name: 'mentor-add' }), |
|||
loading: false, |
|||
imageUrl: '', |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
// 上传图片 |
|||
handleChange(info) { |
|||
if (info.file.status === 'uploading') { |
|||
this.loading = true; |
|||
return; |
|||
} |
|||
if (info.file.status === 'done') { |
|||
// Get this url from response in real world. |
|||
getBase64(info.file.originFileObj, imageUrl => { |
|||
this.imageUrl = imageUrl; |
|||
this.loading = false; |
|||
}); |
|||
} |
|||
}, |
|||
beforeUpload(file) { |
|||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; |
|||
if (!isJpgOrPng) { |
|||
this.$message.error('You can only upload JPG file!'); |
|||
} |
|||
const isLt2M = file.size / 1024 / 1024 < 2; |
|||
if (!isLt2M) { |
|||
this.$message.error('Image must smaller than 2MB!'); |
|||
} |
|||
return isJpgOrPng && isLt2M; |
|||
}, |
|||
|
|||
// 提交表单 |
|||
handleSubmit(e) { |
|||
e.preventDefault(); |
|||
this.form.validateFieldsAndScroll(async (err, values) => { |
|||
if (!err) { |
|||
try { |
|||
console.log('values: ', values); |
|||
// const params = this.generateParams(values); |
|||
// const res = await createTask(params); |
|||
// const { data, msg, code } = res.data; |
|||
// // 清除新建项目标志数据 |
|||
// this.clearCreateTask(); |
|||
// this.$emit('closeDialog'); |
|||
// if (code === 200) { |
|||
// this.handleCreateSuccess(params.executorId); |
|||
// } else { |
|||
// throw msg; |
|||
// } |
|||
} catch (error) { |
|||
this.$message.error(error || '添加研发团队失败'); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="stylus"> |
|||
.avatar-uploader > .ant-upload { |
|||
width: 128px; |
|||
height: 128px; |
|||
} |
|||
|
|||
.ant-upload-select-picture-card i { |
|||
font-size: 32px; |
|||
color: #999; |
|||
} |
|||
|
|||
.ant-upload-select-picture-card .ant-upload-text { |
|||
margin-top: 8px; |
|||
color: #666; |
|||
} |
|||
</style> |
@ -1,189 +0,0 @@ |
|||
<template> |
|||
<div class="main flex-1"> |
|||
<div style="width:100%" v-if="lists && lists.length > 0"> |
|||
<a-table |
|||
:columns="columns" |
|||
:data-source="lists" |
|||
:loading="loading" |
|||
:row-key="record => record.id" |
|||
bordered |
|||
class="white" |
|||
> |
|||
<template slot="id" slot-scope="text, record, index"> |
|||
<span>{{ index + 1 }}</span> |
|||
</template> |
|||
|
|||
<!-- 头像 --> |
|||
<template slot="headPortrait" slot-scope="text, record"> |
|||
<img :src="record.headPortrait" class="img" /> |
|||
<a-modal |
|||
:imgVisible="imgVisible" |
|||
:maskClosable="false" |
|||
@cancel="imgVisible = false" |
|||
destroyOnClose |
|||
footer |
|||
title="身份证明" |
|||
> |
|||
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" /> |
|||
</a-modal> |
|||
</template> |
|||
|
|||
<template slot="auditStatus" slot-scope="text, record"> |
|||
<a-tag :color="record.auditStatus === '通过' ? 'green' : 'red'">{{ record.auditStatus }}</a-tag> |
|||
</template> |
|||
|
|||
<template slot="edit" slot-scope="text, record"> |
|||
<a-icon @click="showEditModal" class="pointer" theme="twoTone" type="edit" /> |
|||
<a-popconfirm @confirm="() => onDelete(record.id)" title="确定要删除这一条?" v-if="lists.length"> |
|||
<a-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" /> |
|||
</a-popconfirm> |
|||
</template> |
|||
|
|||
<template slot="examine" slot-scope="text, record"> |
|||
<a-button size="small" type="primary" v-if="record.auditStatus != '通过'">通过</a-button> |
|||
<a-button size="small" type="danger" v-else>不通过</a-button> |
|||
</template> |
|||
|
|||
<div |
|||
class="d-flex flex-nowrap justify-space-between" |
|||
slot="expandedRowRender" |
|||
slot-scope="record" |
|||
style="margin: 0" |
|||
> |
|||
<div>导师简介:{{ record.tutorProfile }}</div> |
|||
</div> |
|||
</a-table> |
|||
</div> |
|||
<a-empty v-else /> |
|||
|
|||
<!-- 编辑 --> |
|||
<mentor-edit :editVisible="editVisible" @closeModal="closeModal" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import MentorEdit from 'components/Mentor/MentorEdit.vue'; |
|||
|
|||
const columns = [ |
|||
{ |
|||
title: '序号', |
|||
align: 'center', |
|||
dataIndex: 'id', |
|||
key: 'id', |
|||
width: '7%', |
|||
scopedSlots: { customRender: 'id' }, |
|||
}, |
|||
{ |
|||
title: '导师名称', |
|||
align: 'center', |
|||
dataIndex: 'tutorName', |
|||
key: 'tutorName', |
|||
}, |
|||
{ |
|||
title: '头像', |
|||
align: 'center', |
|||
dataIndex: 'headPortrait', |
|||
key: 'headPortrait', |
|||
scopedSlots: { customRender: 'headPortrait' }, |
|||
}, |
|||
{ |
|||
title: '审核状态', |
|||
align: 'center', |
|||
dataIndex: 'auditStatus', |
|||
key: 'auditStatus', |
|||
scopedSlots: { customRender: 'auditStatus' }, |
|||
}, |
|||
{ |
|||
title: '编辑', |
|||
align: 'center', |
|||
dataIndex: 'edit', |
|||
key: 'edit', |
|||
scopedSlots: { customRender: 'edit' }, |
|||
}, |
|||
{ |
|||
title: '审核', |
|||
align: 'center', |
|||
dataIndex: 'examine', |
|||
key: 'examine', |
|||
scopedSlots: { customRender: 'examine' }, |
|||
}, |
|||
]; |
|||
|
|||
const lists = [ |
|||
{ |
|||
id: '001', |
|||
tutorName: '传控科技', |
|||
tutorProfile: '传控科技简介', |
|||
headPortrait: 'assets/logo.png', |
|||
auditStatus: '通过', |
|||
}, |
|||
{ |
|||
id: '002', |
|||
tutorName: '中绿环保', |
|||
tutorProfile: '中绿环保简介', |
|||
headPortrait: 'assets/logo.png', |
|||
auditStatus: '未通过', |
|||
}, |
|||
]; |
|||
|
|||
export default { |
|||
name: 'MentorDate', |
|||
components: { |
|||
MentorEdit, |
|||
}, |
|||
data() { |
|||
this.cacheData = lists.map(item => ({ ...item })); |
|||
return { |
|||
columns, |
|||
lists, |
|||
loading: false, |
|||
height: '', |
|||
editVisible: false, |
|||
imgVisible: false, |
|||
}; |
|||
}, |
|||
|
|||
mounted() { |
|||
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150; |
|||
}, |
|||
|
|||
methods: { |
|||
showEditModal() { |
|||
this.editVisible = true; |
|||
}, |
|||
|
|||
closeModal() { |
|||
this.editVisible = false; |
|||
}, |
|||
|
|||
// 删除 |
|||
async onDelete(teamId) { |
|||
try { |
|||
const params = { param: { teamId } }; |
|||
// const res = await delTeam(params); |
|||
// const { data, msg, code } = res.data; |
|||
// if (code === 200) { |
|||
// this.$message.success('删除成功'); |
|||
// const arr = [...this.lists]; |
|||
// this.lists = arr.filter(item => item.id !== teamId); |
|||
// // TODO: 填到列表中 |
|||
// } else { |
|||
// throw msg; |
|||
// } |
|||
} catch (error) { |
|||
this.$message.error(error || '删除失败'); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="stylus" scoped> |
|||
.main .img { |
|||
height: 65px; |
|||
} |
|||
|
|||
.main .big_img { |
|||
width: 200px; |
|||
} |
|||
</style> |
@ -1,174 +0,0 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<!-- 编辑 --> |
|||
<a-modal |
|||
:maskClosable="false" |
|||
@cancel="$emit('closeModal')" |
|||
destroyOnClose |
|||
footer |
|||
title="修改创业导师" |
|||
v-model="editVisible" |
|||
width="700px" |
|||
> |
|||
<a-form :form="form" @submit="handleSubmit"> |
|||
<!-- 导师名称 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="导师名称" |
|||
> |
|||
<a-input |
|||
placeholder="导师名称" |
|||
v-decorator="[ |
|||
'tutorName', |
|||
{ |
|||
rules: [ |
|||
{ required: true, message: '导师名称不能为空' }, |
|||
{ whitespace: true, message: '导师名称不能为空' }, |
|||
{ max: 140, massage: '导师名称最多140个字符' }, |
|||
], |
|||
}, |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 导师简介 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="导师简介" |
|||
> |
|||
<a-textarea |
|||
placeholder="导师简介" |
|||
v-decorator="[ |
|||
'tutorProfile', |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 头像 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="头像" |
|||
> |
|||
<a-upload |
|||
:before-upload="beforeUpload" |
|||
:show-upload-list="false" |
|||
@change="handleChange" |
|||
action="https://www.mocky.io/v2/5cc8019d300000980a055e76" |
|||
class="avatar-uploader" |
|||
list-type="picture-card" |
|||
name="avatar" |
|||
> |
|||
<img :src="imageUrl" alt="avatar" v-if="imageUrl" /> |
|||
<div v-else> |
|||
<a-icon :type="loading ? 'loading' : 'plus'" /> |
|||
<div class="ant-upload-text">Upload</div> |
|||
</div> |
|||
</a-upload> |
|||
</a-form-item> |
|||
|
|||
<a-form-item class="d-flex flex-row-reverse"> |
|||
<a-button @click="$emit('closeModal')" class="mr-3">取消</a-button> |
|||
<a-button class="white--text" html-type="submit" type="primary">保存</a-button> |
|||
</a-form-item> |
|||
</a-form> |
|||
</a-modal> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
const formItemLayout = { |
|||
labelCol: { span: 6 }, |
|||
wrapperCol: { span: 16 }, |
|||
}; |
|||
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } }; |
|||
function getBase64(img, callback) { |
|||
const reader = new FileReader(); |
|||
reader.addEventListener('load', () => callback(reader.result)); |
|||
reader.readAsDataURL(img); |
|||
} |
|||
|
|||
export default { |
|||
name: 'MentorEdit', |
|||
props: { editVisible: { type: Boolean, default: false } }, |
|||
data() { |
|||
return { |
|||
formItemLayout, |
|||
tailItemLayout, |
|||
form: this.$form.createForm(this, { name: 'mentor-edit' }), |
|||
loading: false, |
|||
imageUrl: '', |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
// 上传图片 |
|||
handleChange(info) { |
|||
if (info.file.status === 'uploading') { |
|||
this.loading = true; |
|||
return; |
|||
} |
|||
if (info.file.status === 'done') { |
|||
// Get this url from response in real world. |
|||
getBase64(info.file.originFileObj, imageUrl => { |
|||
this.imageUrl = imageUrl; |
|||
this.loading = false; |
|||
}); |
|||
} |
|||
}, |
|||
beforeUpload(file) { |
|||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; |
|||
if (!isJpgOrPng) { |
|||
this.$message.error('You can only upload JPG file!'); |
|||
} |
|||
const isLt2M = file.size / 1024 / 1024 < 2; |
|||
if (!isLt2M) { |
|||
this.$message.error('Image must smaller than 2MB!'); |
|||
} |
|||
return isJpgOrPng && isLt2M; |
|||
}, |
|||
|
|||
// 提交表单 |
|||
handleSubmit(e) { |
|||
e.preventDefault(); |
|||
this.form.validateFieldsAndScroll(async (err, values) => { |
|||
if (!err) { |
|||
try { |
|||
console.log('values: ', values); |
|||
// const params = this.generateParams(values); |
|||
// const res = await createTask(params); |
|||
// const { data, msg, code } = res.data; |
|||
// // 清除新建项目标志数据 |
|||
// this.clearCreateTask(); |
|||
// this.$emit('closeDialog'); |
|||
// if (code === 200) { |
|||
// this.handleCreateSuccess(params.executorId); |
|||
// } else { |
|||
// throw msg; |
|||
// } |
|||
} catch (error) { |
|||
this.$message.error(error || '添加研发团队失败'); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="stylus"> |
|||
.avatar-uploader > .ant-upload { |
|||
width: 128px; |
|||
height: 128px; |
|||
} |
|||
|
|||
.ant-upload-select-picture-card i { |
|||
font-size: 32px; |
|||
color: #999; |
|||
} |
|||
|
|||
.ant-upload-select-picture-card .ant-upload-text { |
|||
margin-top: 8px; |
|||
color: #666; |
|||
} |
|||
</style> |
@ -1,59 +0,0 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<!-- 导师名称 --> |
|||
<div> |
|||
<a-input |
|||
@change="handleChangeName" |
|||
placeholder="导师名称" |
|||
style="width: 150px" |
|||
v-model="tutorName" |
|||
/> |
|||
<a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button> |
|||
</div> |
|||
|
|||
<div class="flex-1"></div> |
|||
|
|||
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button> |
|||
|
|||
<!-- 添加 --> |
|||
<mentor-add :visible="visible" @closeModal="closeModal" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import MentorAdd from 'components/Mentor/MentorAdd.vue'; |
|||
|
|||
export default { |
|||
name: 'MentorSearch', |
|||
components: { |
|||
MentorAdd, |
|||
}, |
|||
data() { |
|||
return { |
|||
visible: false, |
|||
tutorName: '', |
|||
}; |
|||
}, |
|||
methods: { |
|||
showModal() { |
|||
this.visible = true; |
|||
}, |
|||
|
|||
closeModal() { |
|||
this.visible = false; |
|||
}, |
|||
|
|||
handleChangeName(value) { |
|||
console.log('value: ', value); |
|||
this.tutorName = value; |
|||
}, |
|||
|
|||
handleTableChange() { |
|||
console.log('搜索'); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|||
<style scoped lang="stylus"></style> |
@ -1,19 +1,9 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<mentor-search /> |
|||
<mentor-date /> |
|||
</div> |
|||
<div class="pa-3 white fill-height d-flex flex-column">开发中... ...</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import MentorSearch from "components/Mentor/MentorSearch.vue"; |
|||
import MentorDate from "components/Mentor/MentorDate.vue"; |
|||
|
|||
export default { |
|||
name: "EntrepreneurialMentor", |
|||
components: { |
|||
MentorSearch, |
|||
MentorDate, |
|||
} |
|||
name: 'EntrepreneurialMentor', |
|||
}; |
|||
</script> |
|||
|
@ -1,20 +1,9 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<sign-up-search /> |
|||
<sign-up-date /> |
|||
</div> |
|||
<div class="pa-3 white fill-height d-flex flex-column">开发中... ...</div> |
|||
</template> |
|||
|
|||
<script> |
|||
// @ is an alias to /src |
|||
import SignUpSearch from "components/SignUp/SignUpSearch.vue"; |
|||
import SignUpDate from "components/SignUp/SignUpDate.vue"; |
|||
|
|||
export default { |
|||
name: "SignUp", |
|||
components: { |
|||
SignUpSearch, |
|||
SignUpDate, |
|||
} |
|||
name: 'IndustryDemandReport', |
|||
}; |
|||
</script> |
|||
|
Loading…
Reference in new issue