lion 1 year ago
parent 863f8b36a9
commit 1a08a8d259

@ -0,0 +1,58 @@
import request from "@/utils/request";
function customParamsSerializer(params) {
let result = '';
for (let key in params) {
if (params.hasOwnProperty(key)) {
if (Array.isArray(params[key])) {
params[key].forEach((item,index) => {
if(item.key){
result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
}else{
result +=`${key}[${index}]=${item}&`
}
});
} else {
result += `${key}=${params[key]}&`;
}
}
}
return result.slice(0, -1);
}
export function index(params,isLoading = false) {
return request({
method: "get",
url: "/api/admin/company/index",
params,
paramsSerializer: customParamsSerializer,
isLoading
})
}
export function show(params, isLoading = true) {
return request({
method: "get",
url: "/api/admin/company/show",
params,
isLoading
})
}
export function save(data) {
return request({
method: "post",
url: "/api/admin/company/save",
data
})
}
export function destroy(params) {
return request({
method: "get",
url: "/api/admin/company/destroy",
params
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

@ -676,7 +676,9 @@ export default {
}], }],
formSelect: { formSelect: {
// company_position: [], // company_position: [],
company_type: [], company_type: [],
company_tag:[],
company_scale:[],
company_area: [], company_area: [],
company_industry: [], company_industry: [],
company_industry_detail: [], company_industry_detail: [],
@ -694,7 +696,7 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
getAllPara() { getAllPara() {
let number = ['company_type', 'company_area', 'company_industry', 'company_industry_detail', 'type', 'education', let number = ['company_type', 'company_area','company_tag','company_scale', 'company_industry', 'company_industry_detail', 'type', 'education',
'sign_from' 'sign_from'
] ]
getparameter({ getparameter({

@ -61,20 +61,20 @@ export const constantRoutes = [{
hidden: true hidden: true
}, },
// { {
// path: '/', path: '/',
// component: Layout, component: Layout,
// redirect: '/dashboard', redirect: '/dashboard',
// children: [{ children: [{
// path: 'dashboard', path: 'dashboard',
// name: '系统首页', name: '系统首页',
// component: () => import('@/views/dashboard/index'), component: () => import('@/views/dashboard/index'),
// meta: { meta: {
// title: '系统首页', title: '系统首页',
// icon: 'dashboard' icon: 'dashboard'
// } }
// }] }]
// }, },
{ {
path: '/course/txl', path: '/course/txl',
component: Layout, component: Layout,

@ -169,16 +169,19 @@
type_options: [{ type_options: [{
id: 1, id: 1,
value: '课程' value: '课程'
}, { },
id: 2, // {
value: '课表' // id: 2,
}, { // value: '课表'
// },
{
id: 3, id: 3,
value: '自定义事件' value: '自定义事件'
}, { }, {
id: 4, id: 4,
value: '资讯' value: '资讯'
}], }],
course_content_options:[],
course_options: [], course_options: [],
canSelect: false, canSelect: false,
form: { form: {
@ -236,7 +239,7 @@
this.$Message.warning("该课程暂无课表") this.$Message.warning("该课程暂无课表")
return return
} }
this.course_options = res.data this.course_content_options = res.data
}, },
saveContent(e) { saveContent(e) {
this.form.content = e this.form.content = e
@ -246,14 +249,36 @@
}, },
changeCourse(e) { changeCourse(e) {
console.log("course", e) console.log("course", e)
if (e && e === 2) { // 获取课表
if (this.form.type == 2) {
this.form.course_content_id = '' this.form.course_content_id = ''
this.getCourseContentList(e) this.getCourseContentList(e)
}
// 选择课程 自动填充
if(this.form.type==1){
this.course_options.map(item=>{
if(item.id===e){
this.form.title = item.name
this.form.start_time = item.start_date
this.form.end_time = item.end_date
this.form.date = item.start_date
}
})
} }
}, },
changeCourseContent() { changeCourseContent(e) {
// 选择课表 自动填充
if(this.form.type==2){
this.course_content_options.map(item=>{
if(item.id===e){
this.form.title = item.theme
this.form.start_time = item.start_date
this.form.end_time = item.end_date
this.form.date = item.start_date
}
})
}
}, },
submit() { submit() {
if (this.id) { if (this.id) {
@ -276,8 +301,7 @@
getDetail() { getDetail() {
show({ show({
id: this.id, id: this.id
show_relation: ['image']
}).then(res => { }).then(res => {
this.form = this.base.requestToForm(res, this.form) this.form = this.base.requestToForm(res, this.form)
this.showTinymce = true this.showTinymce = true
@ -287,7 +311,8 @@
watch: { watch: {
isShow(newVal) { isShow(newVal) {
if (newVal) { if (newVal) {
if (this.type === 'editor') { if (this.type === 'editor') {
console.log("id",this.id)
this.getDetail() this.getDetail()
}else{ }else{
this.showTinymce = true this.showTinymce = true

@ -6,7 +6,7 @@
<div class="admin-main"> <div class="admin-main">
<!-- 数据拉取区 --> <!-- 数据拉取区 -->
<div class="admin-panel" style="max-width: 350px;"> <div class="admin-panel" style="max-width: 350px;">
<div class="admin-panel-title"><i class="el-icon-download"></i> 数据拉取区</div> <!-- <div class="admin-panel-title"><i class="el-icon-download"></i> 数据拉取区</div>
<el-form label-width="90px" size="small"> <el-form label-width="90px" size="small">
<el-form-item label="数据类型"> <el-form-item label="数据类型">
<el-select v-model="dataType" @change="onTypeChange" placeholder="请选择类型"> <el-select v-model="dataType" @change="onTypeChange" placeholder="请选择类型">
@ -23,7 +23,7 @@
<div class="text-secondary" style="font-size:13px;min-height:20px;">{{ dataDateInfo }}</div> <div class="text-secondary" style="font-size:13px;min-height:20px;">{{ dataDateInfo }}</div>
<el-button type="primary" icon="el-icon-link" style="width:100%;margin-top:10px;" <el-button type="primary" icon="el-icon-link" style="width:100%;margin-top:10px;"
@click="fetchData">拉取并关联</el-button> @click="fetchData">拉取并关联</el-button>
</el-form> </el-form> -->
<el-button type="success" icon="el-icon-plus" style="width:100%;margin-top:10px;" <el-button type="success" icon="el-icon-plus" style="width:100%;margin-top:10px;"
@click="openCreateModal('add')">新建日历事件</el-button> @click="openCreateModal('add')">新建日历事件</el-button>
</div> </div>
@ -35,27 +35,30 @@
<div class="cell-content"> <div class="cell-content">
<span>{{ date.getDate() }}</span> <span>{{ date.getDate() }}</span>
<div v-for="ev in eventsForDate(date)" :key="ev._id" class="event-dot" :title="ev.title" <div v-for="ev in eventsForDate(date)" :key="ev._id" class="event-dot" :title="ev.title"
@click.stop="showEvent(ev)"></div> @click.stop="showEvent(ev)"></div>
<div v-for="ev in eventsForDate(date)" :key="ev._id" style="">
{{ev.title}}
</div>
</div> </div>
</template> </template>
</el-calendar> </el-calendar>
<div class="mt-4"> <div class="mt-4">
<h6 class="mb-2"><i class="el-icon-menu"></i> 当月事件列表</h6> <h3 class="mb-2"><i class="el-icon-menu"></i> 当月事件列表</h3>
<el-empty v-if="monthEvents.length === 0" description="本月暂无事件" /> <el-empty v-if="list.length === 0" description="本月暂无事件" />
<el-timeline v-else> <el-timeline v-else>
<el-timeline-item v-for="(ev, idx) in monthEvents" :key="ev._id" :timestamp="ev.start | formatDateTime" <el-timeline-item v-for="(ev, idx) in list" :key="ev._id" :timestamp="ev.start | formatDateTime"
:color="isExpired(ev) ? '#F56C6C' : '#409EFF'"> :color="isExpired(ev) ? '#F56C6C' : '#409EFF'">
<div> <div>
<b>{{ ev.title }}</b> <b>{{ ev.title }}</b>
<el-tag size="mini" style="margin-left:8px;">{{ typeText(ev.className) }}</el-tag> <el-tag size="mini" style="margin-left:8px;">{{ typeText(ev.type) }}</el-tag>
<span style="font-size:13px;"> {{ ev.start | formatDateTime }} ~ {{ ev.end | formatDateTime }}</span> <span style="font-size:13px;"> {{ ev.start_time | formatDateTime }} ~ {{ ev.end_time | formatDateTime }}</span>
<span v-if="ev.location" style="margin-left:8px;"><i class="el-icon-location-outline"></i> <!-- <span v-if="ev.location" style="margin-left:8px;"><i class="el-icon-location-outline"></i>
{{ ev.location }}</span> {{ ev.location }}</span> -->
<el-tag v-if="ev.expire && ev.expire !== 'none'" size="mini" type="warning" <!-- <el-tag v-if="ev.expire && ev.expire !== 'none'" size="mini" type="warning"
style="margin-left:8px;">到期后:{{ expireText(ev.expire) }}</el-tag> style="margin-left:8px;">到期后:{{ expireText(ev.expire) }}</el-tag> -->
</div> </div>
<div style="margin-top:4px;"> <div style="margin-top:4px;">
<el-button size="mini" type="primary" icon="el-icon-edit" @click="openCreateModal('editor',idx.id)">编辑</el-button> <el-button size="mini" type="primary" icon="el-icon-edit" @click="openCreateModal('editor',ev.id)">编辑</el-button>
</div> </div>
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
@ -126,7 +129,8 @@
addCalendar addCalendar
}, },
data() { data() {
return { return {
list:[],
dataType: 'course', dataType: 'course',
dataId: '', dataId: '',
dataList: [], dataList: [],
@ -180,6 +184,7 @@
const res = await index({ const res = await index({
month:this.selectMonth month:this.selectMonth
}) })
this.list = res
}, },
onTypeChange() { onTypeChange() {
@ -213,7 +218,8 @@
} }
}, },
openCreateModal(type,id) { openCreateModal(type,id) {
if(id){ console.log("type",type,id)
if(type == 'editor'){
this.$refs.addCalendar.id = id this.$refs.addCalendar.id = id
} }
this.$refs.addCalendar.type = type this.$refs.addCalendar.type = type
@ -260,8 +266,8 @@
}, },
eventsForDate(date) { eventsForDate(date) {
const d = new Date(date); const d = new Date(date);
return this.events.filter(ev => { return this.list.filter(ev => {
const evDate = new Date(ev.start); const evDate = new Date(ev.start_time);
return evDate.getFullYear() === d.getFullYear() && evDate.getMonth() === d.getMonth() && evDate return evDate.getFullYear() === d.getFullYear() && evDate.getMonth() === d.getMonth() && evDate
.getDate() === d.getDate(); .getDate() === d.getDate();
}); });
@ -275,10 +281,9 @@
}, },
typeText(className) { typeText(className) {
if (!className) return ''; if (!className) return '';
const t = className.replace('event-', ''); if (className === 1) return '课程';
if (t === 'course') return '课程'; if (className === 3) return '自定义事件';
if (t === 'activity') return '活动'; if (className === 4) return '资讯';
if (t === 'workshop') return '移动课堂';
return t; return t;
}, },
expireText(val) { expireText(val) {

@ -0,0 +1,212 @@
<template>
<div>
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content">
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-select filterable v-model="select.teacher_id" placeholder="请选择授课老师" clearable style="width: 100%;">
<el-option v-for="(item,index) in teachers" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">查询</el-button>
<el-button type="primary" size="small" @click="resetSelect">重置</el-button>
</div>
<!-- <div>
<el-button type="primary" size="small" @click="editNotice('add')">新增</el-button>
</div> -->
</div>
</div>
</lx-header>
</div>
</div>
<div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
<template v-slot:files>
<el-table-column align='left' label="课件" width="240" header-align="center">
<template slot-scope="scope">
<div v-for="(item,index) in scope.row.files">
<div>
{{index+1}}、 <a style="cursor: pointer;color:blue;text-decoration: underline;" :href="item.url"
target="_blank">{{item.original_name}}</a>
</div>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<!-- <el-table-column align='center' fixed="right" label="操作" width="180" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="editNotice('editor',scope.row.id)">编辑</el-button>
<el-popconfirm style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
<el-button type="danger" size="small" slot="reference">删除</el-button>
</el-popconfirm>
</template>
</el-table-column> -->
</template>
</xy-table>
</div>
</div>
</template>
<script>
import {
index as teacherGet
} from "@/api/info/teachers.js"
import {
index
} from '@/api/course/courseContent.js'
export default {
components: {
},
data() {
return {
teachers:[],
select: {
teacher_id: '',
page: 1,
page_size: 10
},
list: [],
total: 0,
table_item: [{
prop: 'files',
label: '课件',
align: 'left',
width: 240
}, {
prop: 'course.name',
label: '课程名称',
align: 'left',
width: 240,
}, {
prop: 'theme',
label: '授课主题',
align: 'center',
width: 120,
}, {
prop: 'date',
label: '日期',
align: 'center',
width: 120,
}, {
prop: 'period',
label: '时间 ',
align: 'center',
width: 180,
}, {
prop: 'teacher.name',
label: '授课老师',
align: 'center',
width: 120,
}, {
prop: 'teacher.sex',
label: '性别',
align: 'center',
width: 80
}, {
prop: 'teacher.mobile',
label: '联系方式',
align: 'center',
width: 120,
}, {
prop: 'address',
label: '上课地点',
align: 'left',
width: 240,
}, {
prop: 'teacher.introduce',
label: '老师简介',
align: 'left',
width: 240,
}],
}
},
created() {
this.getTeachers()
this.getList()
},
methods: {
async getTeachers(){
const res = await teacherGet({
page:1,
page_size:999
})
this.teachers = res.data
},
pageIndexChange(e) {
this.select.page = e
this.getList()
},
pageSizeChange(e) {
this.select.page_size = e
this.select.page = 1
this.getList()
},
resetSelect() {
this.select.teacher_id = ''
this.select.course = ''
this.select.page = 1
this.getList()
},
async getList() {
const res = await index({
page_size: this.select.page_size,
page: this.select.page,
show_relation: ['course','teacher'],
filter: [{
key: 'file_ids',
op: 'notnull',
value: '1'
},{
key: 'teacher_id',
op: 'eq',
value: this.select.teacher_id?this.select.teacher_id:''
}]
})
this.list = res.data
this.total = res.total
},
deleteList(id) {
var that = this;
destroy({
id: id
}).then(response => {
this.$Message.success('操作成功');
this.getList()
}).catch(error => {
console.log(error)
reject(error)
})
},
}
}
</script>
<style lang="scss" scoped>
.searchwrap {
display: flex;
align-items: center;
&>div {
display: flex;
align-items: center;
margin-right: 10px;
span {
min-width: 70px;
}
}
}
</style>

@ -48,7 +48,7 @@
<span v-else class="no-files">暂无课件</span> <span v-else class="no-files">暂无课件</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" :width="220" align="center"> <el-table-column label="操作" :width="250" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="small" style='margin-left:5px;margin-bottom:5px;' <el-button type="primary" size="small" style='margin-left:5px;margin-bottom:5px;'
@click="editClass('editor',scope.row.id)">编辑</el-button> @click="editClass('editor',scope.row.id)">编辑</el-button>
@ -68,7 +68,7 @@
</Modal> </Modal>
<imports ref="imports" :table-name="'course_contents'" :course_id="id+''" @refresh="refreshData"></imports> <imports ref="imports" :table-name="'course_contents'" :course_id="id+''" @refresh="refreshData"></imports>
<editClass ref="editClass" @refresh="getCousreContent"></editClass> <editClass ref="editClass" @refresh="getCousreContent"></editClass>
<!-- 上传课件模态框 --> <!-- 上传课件模态框 -->
<el-dialog title="上传课件" :visible.sync="materialDialogVisible" width="600px" center> <el-dialog title="上传课件" :visible.sync="materialDialogVisible" width="600px" center>
<div class="material-upload-container"> <div class="material-upload-container">
@ -79,7 +79,7 @@
<p><strong>主题:</strong>{{ selectedCourse.theme }}</p> <p><strong>主题:</strong>{{ selectedCourse.theme }}</p>
<p><strong>老师:</strong>{{ selectedCourse.teacher ? selectedCourse.teacher.name : '' }}</p> <p><strong>老师:</strong>{{ selectedCourse.teacher ? selectedCourse.teacher.name : '' }}</p>
</div> </div>
<div class="upload-section"> <div class="upload-section">
<h4>课件上传</h4> <h4>课件上传</h4>
<el-upload <el-upload
@ -101,7 +101,7 @@
</div> </div>
</el-upload> </el-upload>
</div> </div>
<div class="material-list" v-if="materialFileList.length > 0"> <div class="material-list" v-if="materialFileList.length > 0">
<h4>已上传课件</h4> <h4>已上传课件</h4>
<el-table :data="materialFileList" size="small" style="width: 100%"> <el-table :data="materialFileList" size="small" style="width: 100%">
@ -121,7 +121,7 @@
</el-table> </el-table>
</div> </div>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="materialDialogVisible = false">取消</el-button> <el-button @click="materialDialogVisible = false">取消</el-button>
<el-button type="primary" @click="saveMaterialFiles" :loading="saving">保存课件</el-button> <el-button type="primary" @click="saveMaterialFiles" :loading="saving">保存课件</el-button>
@ -162,7 +162,12 @@
list: [], list: [],
teacher_options: [], teacher_options: [],
showBtn: true, showBtn: true,
table_item: [{ table_item: [ {
prop: 'theme',
label: '授课主题',
align: 'center',
width: 120,
},{
prop: 'date', prop: 'date',
label: '日期', label: '日期',
align: 'center', align: 'center',
@ -366,20 +371,20 @@
this.$message.warning('请先上传课件文件'); this.$message.warning('请先上传课件文件');
return; return;
} }
this.saving = true; this.saving = true;
try { try {
// 提取文件ID数组 // 提取文件ID数组
const fileIds = this.materialFileList.map(file => { const fileIds = this.materialFileList.map(file => {
return file.response ? file.response.id : file.id; return file.response ? file.response.id : file.id;
}); });
// 只传递课程ID和文件ID数组 // 只传递课程ID和文件ID数组
const updateData = { const updateData = {
id: this.selectedCourse.id, id: this.selectedCourse.id,
file_ids: fileIds file_ids: fileIds
}; };
await saveContent(updateData); await saveContent(updateData);
this.$message.success('课件保存成功'); this.$message.success('课件保存成功');
this.materialDialogVisible = false; this.materialDialogVisible = false;
@ -468,27 +473,27 @@
padding: 15px; padding: 15px;
border-radius: 4px; border-radius: 4px;
margin-bottom: 20px; margin-bottom: 20px;
h4 { h4 {
margin: 0 0 10px 0; margin: 0 0 10px 0;
color: #303133; color: #303133;
} }
p { p {
margin: 5px 0; margin: 5px 0;
color: #606266; color: #606266;
} }
} }
.upload-section { .upload-section {
margin-bottom: 20px; margin-bottom: 20px;
h4 { h4 {
margin: 0 0 10px 0; margin: 0 0 10px 0;
color: #303133; color: #303133;
} }
} }
.material-list { .material-list {
h4 { h4 {
margin: 0 0 10px 0; margin: 0 0 10px 0;
@ -499,14 +504,14 @@
.file-item { .file-item {
margin-bottom: 5px; margin-bottom: 5px;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.el-link { .el-link {
font-size: 12px; font-size: 12px;
i { i {
margin-right: 4px; margin-right: 4px;
} }

@ -1,298 +1,92 @@
<template> <template>
<div> <div class="jsc" :style="bgStyle">
<div class="statistics"> </div>
<!-- <panel-group :totaldata="list" /> --> </template>
</div>
<script>
import echarts from "echarts"
</div> import PanelGroup from './components/PanelGroup'
</template> import {
getChartsHome
<script> } from "../../api/dashboard.js"
import echarts from "echarts"
import PanelGroup from './components/PanelGroup' export default {
import { components: {
getChartsHome PanelGroup
} from "../../api/dashboard.js" },
data() {
export default { return {
components: { screenWidth: 0,
PanelGroup screenHeight: 0,
}, bgStyle: {
data() { width: 0,
return { height: 0
col: '', },
line: '', col: '',
business_data: [], line: '',
collect_data: [], business_data: [],
list: {}, collect_data: [],
customerArr: [], list: {},
orderArr: [], customerArr: [],
chartData: {}, orderArr: [],
} chartData: {},
}, }
watch: { },
chartData(val, newval) { watch: {
if (newval){ // chartData(val, newval) {
this.init(); // if (newval){
} // this.init();
} // }
}, // }
methods: { },
async loadData() { created() {
await getChartsHome().then((res) => {
console.log(res); },
this.list = res.list; mounted() {
this.chartData = res;
let _business_data = []; this.$store.dispatch('app/closeSideBar', {
let _collect_data = []; withoutAnimation: false
res.business_data.map(item => { })
_business_data.push(item.server_money_total) this.calculateScreenSize()
_collect_data.push(item.collect_money) },
}) destroyed() {
this.business_data = _business_data; window.onresize = null
this.collect_data = _collect_data; },
let _customerArr = []; methods: {
let _orderArr = []; calculateScreenSize() {
this.screenWidth = window.innerWidth
res.order_data.map(item => { this.screenHeight = window.innerHeight
_customerArr.push(item.active_customer) this.bgStyle = {
_orderArr.push(item.order_total) width: this.screenWidth - 56 + 'px',
}) height: this.screenHeight + 'px',
this.customerArr = _customerArr; position: 'relative',
this.orderArr = _orderArr; left: '-20px',
}).catch() top: '-50px',
}, 'z-index': 999
init() { }
this.col = echarts.init(document.getElementById('col-chart')) },
this.col.setOption({ },
title: { }
text: '' </script>
},
tooltip: { <style lang="scss" scoped>
trigger: 'axis', ::v-deep .app-main {
axisPointer: { padding: 0 !important
type: 'shadow' }
},
position: 'bottom' ::v-deep .hideSidebar .fixed-header {
}, display: none !important;
legend: {}, }
grid: {
left: '3%', .jsc {
right: '4%', height: 100%;
bottom: '3%', background: url(../../assets/dashboard.png) no-repeat center top;
containLabel: true background-size: 100% 100%;
}, display: flex;
yAxis: { align-items: center;
type: 'value', justify-content: center;
boundaryGap: [0, 0.01] padding: 10px;
}, padding-top: 0;
xAxis: { }
type: 'category',
data: ['第一周', '第二周', '第三周', '第四周']
},
series: [{
name: '服务金额',
type: 'bar',
data: this.business_data,
itemStyle: {
normal: {
color: 'rgb(42,182,252)'
},
},
},
{
name: '收款',
type: 'bar',
data: this.collect_data,
itemStyle: {
normal: {
color: 'rgb(34,228,255)'
},
},
}
]
})
this.line = echarts.init(document.getElementById('line-chart'))
this.line.setOption({
title: {
text: ''
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['活跃客户', '服务订单']
},
grid: {
left: '3%',
right: '6%',
bottom: '3%',
containLabel: true
},
toolbox: {
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['第一周', '第二周', '第三周', '第四周']
},
yAxis: {
type: 'value',
},
series: [{
name: '活跃客户',
type: 'line',
stack: 'Total',
data: this.customerArr,
itemStyle: {
normal: {
color: 'rgb(42,182,252)'
},
},
},
{
name: '服务订单',
type: 'line',
stack: 'Total',
data: this.orderArr,
itemStyle: {
normal: {
color: 'rgb(34,228,255)'
},
},
}
]
})
}
},
created() {
//this.loadData();
},
mounted() {
//this.init()
// window.onresize = () => {
// this.col.resize()
// this.line.resize()
// }
},
destroyed() {
window.onresize = null
}
}
</script>
<style lang="scss" scoped>
.statistics {
display: flex;
margin-top: 20px;
&-title {
padding-left: 6px;
}
&-content {
text-align: center;
font-size: 13px;
&-top {
&__num {
font-weight: 600;
}
&__name {
font-size: 10px;
color: rgb(140, 140, 140);
}
}
&-bottom {
display: flex;
justify-content: space-between;
&-left {
&__num {
font-weight: 600;
}
&__name {
font-size: 10px;
color: rgb(140, 140, 140);
}
}
&-right {
&__num {
font-weight: 600;
}
&__name {
font-size: 10px;
color: rgb(140, 140, 140);
}
}
}
}
&>div {
flex: 1;
margin-right: 20px;
&:last-child {
margin-right: 0;
}
}
}
.chart {
display: flex;
margin-top: 20px;
.chartItem {
width: 49%;
.chartItemTitle {
font-size: 16px;
margin-bottom: 20px;
}
#col-chart {
background: #fff;
border-radius: 10px;
flex: 1;
margin-right: 20px;
padding: 20px;
box-sizing: border-box;
min-height: 400px;
width: 100%;
}
#line-chart {
background: #fff;
border-radius: 10px;
flex: 1;
padding: 20px;
box-sizing: border-box;
min-height: 400px;
}
}
}
</style> </style>

@ -0,0 +1,265 @@
<template>
<div>
<xy-dialog ref="dialog" :width="70" :is-show.sync="isShow" :type="'form'"
:title="type === 'add' ? '新增校友企业' : '编辑校友企业'" :form="form" :rules='rules' @submit="submit">
<template v-slot:company_name>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>企业名称:
</div>
<div class="xy-table-item-content">
<el-input v-model="form.company_name" placeholder="请输入企业名称" clearable style="width: 100%;"></el-input>
</div>
</div>
</template>
<template v-slot:company_attribute>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>行业类型:
</div>
<div class="xy-table-item-content">
<el-select v-model="form.company_attribute" placeholder="请选择行业类型" clearable style="width: 100%;">
<el-option v-for="(item,index) in formSelect.company_industry" :key="index" :label="item.value" :value="item.value">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:company_tag>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>行业标签:
</div>
<div class="xy-table-item-content">
<el-select v-model="form.company_tag" placeholder="请选择行业类型" clearable style="width: 100%;">
<el-option v-for="(item,index) in formSelect.company_tag" :key="index" :label="item.value" :value="item.value">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:company_scale>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>企业规模:
</div>
<div class="xy-table-item-content">
<el-select v-model="form.company_scale" placeholder="请选择企业规模" clearable style="width: 100%;">
<el-option v-for="(item,index) in formSelect.company_scale" :key="index" :label="item.value" :value="item.value">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:company_date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>成立日期:
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.company_date" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" placeholder="请选择成立日期" style="width: 100%;"></el-date-picker>
</div>
</div>
</template>
<template v-slot:company_legal_representative>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>法人代表:
</div>
<div class="xy-table-item-content">
<el-input v-model="form.company_legal_representative" placeholder="请输入法人代表" clearable style="width: 100%;"></el-input>
</div>
</div>
</template>
<template v-slot:company_shareholder>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>股东信息:
</div>
<div class="xy-table-item-content">
<el-input v-model="form.company_shareholder" placeholder="请输入股东信息" type="text" clearable style="width: 100%;"></el-input>
</div>
</div>
</template>
<template v-slot:management_platform>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>管理平台:
</div>
<div class="xy-table-item-content">
<el-input v-model="form.management_platform" placeholder="请输入管理平台" type="text" clearable style="width: 100%;"></el-input>
</div>
</div>
</template>
<template v-slot:project_manager>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>项目经理:
</div>
<div class="xy-table-item-content">
<el-input v-model="form.project_manager" placeholder="请输入项目经理" type="text" clearable style="width: 100%;"></el-input>
</div>
</div>
</template>
<template v-slot:company_fund>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>公司融资额:
</div>
<div class="xy-table-item-content">
<el-input v-model="form.company_fund" placeholder="请输入公司融资额" type="number" clearable style="width: 100%;"></el-input>
</div>
</div>
</template>
<template v-slot:market_value>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>市值:
</div>
<div class="xy-table-item-content">
<el-input v-model="form.market_value" placeholder="请输入市值" type="number" clearable style="width: 100%;"></el-input>
</div>
</div>
</template>
<template v-slot:valuation>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>估值:
</div>
<div class="xy-table-item-content">
<el-input v-model="form.valuation" placeholder="请输入估值" type="number" clearable style="width: 100%;"></el-input>
</div>
</div>
</template>
<!-- <template v-slot:overseas_experience>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>url:
</div>
<div class="xy-table-item-content">
<el-input v-model="form.overseas_experience" placeholder="请输入估值" type="text" clearable style="width: 100%;"></el-input>
</div>
</div>
</template> -->
</xy-dialog>
</div>
</template>
<script>
import {
save,
show
} from "@/api/student/schoolmateCompany.js"
import formMixin from "@/mixin/formMixin.js";
export default {
mixins: [formMixin],
components: {
},
data() {
return {
isShow: false,
type: 'add',
id: '',
form: {
company_name: '',
company_attribute: '',
company_tag: '',
company_scale: '',
company_date: '',
company_legal_representative: '',
company_shareholder:'',
management_platform:'',
project_manager:'',
company_fund:'',
market_value:'',
valuation:'',
overseas_experience:''
},
rules: {
company_name: [{
required: true,
message: '请输入企业名称'
}],
company_attribute: [{
required: true,
message: '请选择行业类型'
}],
company_tag: [{
required: true,
message: '请选择行业标签'
}]
}
}
},
created() {},
methods: {
submit() {
if (this.id) {
this.form.id = this.id
}
if (this.type == 'add') {
this.form.id = ''
}
console.log("this.form",this.form)
save({
...this.form
}).then(res => {
this.$message({
type: 'success',
message: this.type === 'add' ? '新增成功' : '编辑成功'
})
this.isShow = false
this.$emit('refresh')
})
},
getDetail() {
show({
id: this.id,
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
})
}
},
watch: {
isShow(newVal) {
if (newVal) {
if (this.type === 'editor') {
this.getDetail()
}
} else {
this.id = ''
this.type = "add"
this.form = {
company_name: '',
company_attribute: '',
company_tag: '',
company_scale: '',
company_date: '',
company_legal_representative: '',
company_shareholder:'',
management_platform:'',
project_manager:'',
market_value:'',
overseas_experience:''
}
this.$refs['dialog'].reset()
}
},
}
}
</script>
<style scoped lang="scss">
</style>

@ -0,0 +1,278 @@
<template>
<div>
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content">
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.company_name" placeholder="请输入企业名称"></el-input>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">查询</el-button>
<el-button type="primary" size="small" @click="resetSelect">重置</el-button>
</div>
<div>
<el-button type="primary" size="small" @click="editCompany('add')">新增</el-button>
</div>
</div>
</div>
</lx-header>
</div>
</div>
<div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
<template v-slot:company_name>
<el-table-column align='left' label="企业名称" width="240" header-align="center">
<template slot-scope="scope">
<div @click="toQicc(scope.row.overseas_experience)" style="color:blue;cursor: pointer;text-decoration: underline;">
{{scope.row.company_name}}
</div>
</template>
</el-table-column>
</template>
<template v-slot:company_legal_representative>
<el-table-column align='center' label="法人代表" width="120" header-align="center">
<template slot-scope="scope">
<div @click="toQicc(scope.row.overseas_experience)" style="color:blue;cursor: pointer;text-decoration: underline;">
{{scope.row.company_legal_representative}}
</div>
</template>
</el-table-column>
</template>
<template v-slot:company_shareholder>
<el-table-column align='center' label="股东信息" width="120" header-align="center">
<template slot-scope="scope">
<div @click="toQicc(item.overseas_experience)" style="color:blue;cursor: pointer;text-decoration: underline;">
{{scope.row.company_shareholder}}
</div>
</template>
</el-table-column>
</template>
<template v-slot:company_attribute>
<el-table-column align='center' label="行业类型" width="120" header-align="center">
<template slot-scope="scope">
<div v-for="item in formSelect.company_industry">
<el-tag v-if="item.value===scope.row.company_attribute"
:type="item.remark?item.remark:''">{{scope.row.company_attribute}}</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:company_tag>
<el-table-column align='center' label="行业标签" width="120" header-align="center">
<template slot-scope="scope">
<div v-for="item in formSelect.company_tag">
<el-tag v-if="item.value===scope.row.company_tag"
:type="item.remark?item.remark:''">{{scope.row.company_tag}}</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:users>
<el-table-column align='left' label="校友信息" width="240" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.id===1">
<div>
校友:王磊
</div>
<div>
职务:
</div>
<div>
课程:2025产业加速营 | 具身智能机器人专赛暨具身智能极客营
</div>
</div>
<div v-if="scope.row.id===2">
<div>
校友:周肖虹
</div>
<div>
职务:总裁
</div>
<div>
课程:2024高研班 | 第六期高级科创人才研修班
</div>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="操作" width="180" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="editCompany('editor',scope.row.id)">编辑</el-button>
<el-popconfirm style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
<el-button type="danger" size="small" slot="reference">删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</template>
</xy-table>
</div>
<add-company ref="addCompany" @refresh="getList"></add-company>
</div>
</template>
<script>
import addCompany from './components/addCompany.vue';
import {
index,
destroy
} from "@/api/student/schoolmateCompany.js"
import formMixin from "@/mixin/formMixin.js";
export default {
mixins: [formMixin],
components: {
addCompany
},
data() {
return {
select: {
company_name: '',
page: 1,
page_size: 10
},
list: [],
total: 0,
table_item: [{
prop: 'company_name',
label: '企业名称',
align: 'left',
width: 240,
}, {
prop: 'company_attribute',
label: '行业类型',
align: 'center',
width: 120
}, {
prop: 'company_tag',
label: '标签',
align: 'center',
width: 160,
}, {
prop: 'company_scale',
label: '企业规模',
align: 'center',
width: 120,
}, {
prop: 'company_date',
label: '成立时间',
align: 'center',
width: 120,
}, {
prop: 'company_legal_representative',
label: '法人代表',
align: 'center',
width: 120,
}, {
prop: 'company_shareholder',
label: '股东信息',
align: 'center',
width: 120,
}, {
prop: 'management_platform',
label: '管理平台',
align: 'center',
width: 120,
}, {
prop: 'project_manager',
label: '项目经理',
align: 'center',
width: 120,
}, {
prop: 'users',
label: '校友信息',
align: 'center',
width: 240,
}]
}
},
created() {
this.getList()
},
methods: {
toQicc(overseas_experience) {
if(overseas_experience){
window.open(overseas_experience, '_blank')
}
// 'https://www.qcc.com/firm/ffb3379dc6b254336ecd31fc20d1dd30.html'
// https://www.qcc.com/firm/0a07162e2b34a5ee8046d46a1a446ed2.html
},
pageIndexChange(e) {
this.select.page = e
this.getList()
},
pageSizeChange(e) {
this.select.page_size = e
this.select.page = 1
this.getList()
},
editCompany(type, id) {
if (type == 'editor') {
this.$refs.addCompany.id = id
}
this.$refs.addCompany.type = type
this.$refs.addCompany.isShow = true
},
resetSelect() {
this.select.company_name = ''
this.select.page = 1
this.getList()
},
async getList() {
const res = await index({
page_size: this.select.page_size,
page: this.select.page,
filter: [{
key: 'company_name',
op: 'like',
value: this.select.company_name
}]
})
this.list = res.data
this.total = res.total
},
deleteList(id) {
var that = this;
destroy({
id: id
}).then(response => {
this.$Message.success('操作成功');
this.getList()
}).catch(error => {
console.log(error)
reject(error)
})
},
}
}
</script>
<style lang="scss" scoped>
.searchwrap {
display: flex;
align-items: center;
&>div {
display: flex;
align-items: center;
margin-right: 10px;
span {
min-width: 70px;
}
}
}
</style>
Loading…
Cancel
Save