This commit is contained in:
zmj 2024-01-21 10:54:28 +08:00
parent deeef493e4
commit 7603004041
7 changed files with 60 additions and 336 deletions

View File

@ -191,7 +191,7 @@ import { onMounted } from "vue"
import { reactive, ref } from "vue"
import { usePaging } from '@/hooks/usePaging'
import { apiProjectPreSalesMembersLists, } from '@/api/project_pre_sales_members'
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiProjectPreSalesMembersLists,
// params: queryParams
@ -236,8 +236,6 @@ const customLists = reactive([
value: 3
},
])
var app = {};
const posList = [
'left',
@ -392,75 +390,7 @@ var option = {
};
let customoption = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
data: ['Forest', 'Steppe', 'Desert', 'Wetland']
},
toolbox: {
show: true,
orient: 'vertical',
left: 'right',
top: 'center',
},
xAxis: [
{
type: 'category',
axisTick: { show: false },
data: ['2012', '2013', '2014', '2015', '2016', '2012', '2013', '2014', '2015', '2016']
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: '名称',
type: 'bar',
barGap: 0,
label: labelOption,
emphasis: {
focus: 'series'
},
data: [320, 332, 301, 334, 390]
},
// {
// name: 'Steppe',
// type: 'bar',
// label: labelOption,
// emphasis: {
// focus: 'series'
// },
// data: [220, 182, 191, 234, 290]
// },
// {
// name: 'Desert',
// type: 'bar',
// label: labelOption,
// emphasis: {
// focus: 'series'
// },
// data: [150, 232, 201, 154, 190]
// },
// {
// name: 'Wetland',
// type: 'bar',
// label: labelOption,
// emphasis: {
// focus: 'series'
// },
// data: [98, 77, 101, 99, 40]
// }
]
};
var option4 = {
tooltip: {
trigger: 'axis',
@ -691,8 +621,6 @@ let option3 = {
]
};
// option
const setHistogramOption = (legend, xAxisData, series) => {
return {
@ -769,15 +697,12 @@ const setHistogramOption = (legend, xAxisData, series) => {
}
const initChart = (id, opt) => {
var chartDom = document.getElementById(id);
var myChart = echarts.init(chartDom);
myChart.setOption(opt);
}
onMounted(() => {
initChart("customNum", setHistogramOption({ data: ['名称'] }, ['2012', '2013', '2014', '2015', '2016', '2012', '2013', '2014', '2015', '2016'], [{
name: '名称',

View File

@ -76,10 +76,12 @@
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<projectTable @customEvent="customEvent"></projectTable>
</el-dialog>
<div v-if="showDialog1">
<el-dialog v-model="showDialog1" title="选择需求" width="70%">
<customerdemand @customEvent="customEvent1" :productid="formData.project_id"></customerdemand>
</el-dialog>
</div>
<el-dialog v-model="showDialog1" title="选择需求" width="70%">
<customerdemand @customEvent="customEvent1" :productid="formData.project_id"></customerdemand>
</el-dialog>
</div>
</template>

View File

@ -5,35 +5,46 @@
<el-descriptions :column="2" border>
<el-descriptions-item label="组织名称" label-align="left" align="left" label-class-name="my-label">{{ formData.org_name }}</el-descriptions-item>
<el-descriptions-item label="部门名称" label-align="left" align="left" label-class-name="my-label">{{ formData.dept_name }}</el-descriptions-item>
<el-descriptions-item label="客户名称" label-align="left" align="left" label-class-name="my-label">{{ formData.custom_name }}</el-descriptions-item>
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_name }}</el-descriptions-item>
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_code }}</el-descriptions-item>
<el-descriptions-item label="组织名称" label-align="left" align="left" label-class-name="my-label">{{
formData.org_name }}</el-descriptions-item>
<el-descriptions-item label="部门名称" label-align="left" align="left" label-class-name="my-label">{{
formData.dept_name }}</el-descriptions-item>
<el-descriptions-item label="客户名称" label-align="left" align="left" label-class-name="my-label">{{
formData.custom_name }}</el-descriptions-item>
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
formData.project_name }}</el-descriptions-item>
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{
formData.project_code }}</el-descriptions-item>
<el-descriptions-item label="需求名称" label-align="left" align="left" label-class-name="my-label">
{{ formData.customer_demand_name }}
</el-descriptions-item>
<el-descriptions-item label="解决方案主题" label-align="left" align="left" label-class-name="my-label">
{{ formData.theme }}
</el-descriptions-item>
<el-descriptions-item label="提交时间" label-align="left" align="left" label-class-name="my-label"> {{ formData.submission_time
<el-descriptions-item label="提交时间" label-align="left" align="left" label-class-name="my-label"> {{
formData.submission_time
}}</el-descriptions-item>
<el-descriptions-item label="方案内容" label-align="left" align="left" label-class-name="my-label"> {{ formData.solution_content
<el-descriptions-item label="方案内容" label-align="left" align="left" label-class-name="my-label"> {{
formData.solution_content
}}</el-descriptions-item>
<el-descriptions-item label="添加人" label-align="left" align="left" label-class-name="my-label"> {{ formData.add_user_name
<el-descriptions-item label="添加人" label-align="left" align="left" label-class-name="my-label"> {{
formData.add_user_name
}}</el-descriptions-item>
<el-descriptions-item label="创建日期" label-align="left" align="left" label-class-name="my-label"> {{ formData.create_time
<el-descriptions-item label="创建日期" label-align="left" align="left" label-class-name="my-label"> {{
formData.create_time
}}</el-descriptions-item>
<el-descriptions-item label="更新人" label-align="left" align="left" label-class-name="my-label"> {{ formData.update_user_name
<el-descriptions-item label="更新人" label-align="left" align="left" label-class-name="my-label"> {{
formData.update_user_name
}}</el-descriptions-item>
<el-descriptions-item label="更新日期" label-align="left" align="left" label-class-name="my-label"> {{ formData.update_time
<el-descriptions-item label="更新日期" label-align="left" align="left" label-class-name="my-label"> {{
formData.update_time
@ -41,9 +52,10 @@
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
<div v-if="formData.annex.length > 0">
<div v-if="formData.annex?.length > 0">
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
<el-link style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item" target="_blank">文件{{ index + 1 }}查看</el-link>
<el-link style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item"
target="_blank">文件{{ index + 1 }}查看</el-link>
</div>
</div>
@ -134,13 +146,11 @@ defineExpose({
getDetail
})
</script>
<style lang="scss" scoped>
.tit {
<style lang="scss" scoped>.tit {
font-size: 1.2em;
margin-bottom: 10px;
}
:deep(.my-label) {
width: 150px;
}
</style>
}</style>

View File

@ -53,9 +53,12 @@
<projectTable @customEvent="customEvent"></projectTable>
</el-dialog>
<el-dialog v-model="showDialog1" title="选择需求" width="70%">
<customerdemand @customEvent="customEvent1" :productid="formData.project_id"></customerdemand>
</el-dialog>
<div v-if="showDialog1">
<el-dialog v-model="showDialog1" title="选择需求" width="70%">
<customerdemand @customEvent="customEvent1" :productid="formData.project_id"></customerdemand>
</el-dialog>
</div>
</div>
</template>

View File

@ -12,7 +12,8 @@
<el-input class="w-[250px]" v-model="queryParams.custom_name" clearable placeholder="请输入客户名称" />
</el-form-item>
<el-form-item label="客户需求主题" prop="customer_demand_name">
<el-input class="w-[250px]" v-model="queryParams.customer_demand_name" clearable placeholder="请输入客户需求主题" />
<el-input class="w-[250px]" v-model="queryParams.customer_demand_name" clearable
placeholder="请输入客户需求主题" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
@ -27,7 +28,8 @@
</template>
新增
</el-button>
<el-button v-perms="['custom.customer_demand_solution/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
<el-button v-perms="['custom.customer_demand_solution/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
@ -56,10 +58,12 @@
</el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<template #default="{ row }">
<el-button v-perms="['custom.customer_demand_solution/edit']" type="primary" link @click="handleEdit(row)">
<el-button v-perms="['custom.customer_demand_solution/edit']" type="primary" link
@click="handleEdit(row)">
编辑
</el-button>
<el-button v-perms="['custom.customer_demand_solution/delete']" type="danger" link @click="handleDelete(row.id)">
<el-button v-perms="['custom.customer_demand_solution/delete']" type="danger" link
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['custom.customer_demand_solution/detail']" link @click="handledetail(row)">
@ -69,7 +73,7 @@
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<div class="flex justify-end mt-4">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
@ -142,7 +146,6 @@ const handleDelete = async (id: number | any[]) => {
//
const handledetail = async (data: any) => {
let res = await apiCustomerDemandSolutionDetail({ id: data.id })
showDtail.value = true
await nextTick()
detailRef.value?.open()

View File

@ -110,12 +110,17 @@
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<projectTable @customEvent="customEvent"></projectTable>
</el-dialog>
<el-dialog v-model="showDialog1" title="选择需求" width="70%">
<customerdemand @customEvent="customEvent1" :productid="formData.project_id"></customerdemand>
</el-dialog>
<el-dialog v-model="showDialog2" title="选择联系人" width="70%">
<contactsTable @customEvent="customEvent2" :custom_id="customid"></contactsTable>
</el-dialog>
<div v-if="showDialog1">
<el-dialog v-model="showDialog1" title="选择需求" width="70%">
<customerdemand @customEvent="customEvent1" :productid="formData.project_id"></customerdemand>
</el-dialog>
</div>
<div v-if="showDialog2">
<el-dialog v-model="showDialog2" title="选择联系人" width="70%">
<contactsTable @customEvent="customEvent2" :custom_id="customid"></contactsTable>
</el-dialog>
</div>
</div>
</template>

View File

@ -1,224 +0,0 @@
<template>
<el-card>
我的客户
<div id="main"></div>
</el-card>
<el-card>
<div id="main2"></div>
</el-card>
</template>
<script setup>
import * as echarts from 'echarts';
import { onMounted } from "vue"
var app = {};
const posList = [
'left',
'right',
'top',
'bottom',
'inside',
'insideTop',
'insideLeft',
'insideRight',
'insideBottom',
'insideTopLeft',
'insideTopRight',
'insideBottomLeft',
'insideBottomRight'
];
app.configParameters = {
rotate: {
min: -90,
max: 90
},
align: {
options: {
left: 'left',
center: 'center',
right: 'right'
}
},
verticalAlign: {
options: {
top: 'top',
middle: 'middle',
bottom: 'bottom'
}
},
position: {
options: posList.reduce(function (map, pos) {
map[pos] = pos;
return map;
}, {})
},
distance: {
min: 0,
max: 100
}
};
app.config = {
rotate: 90,
align: 'left',
verticalAlign: 'middle',
position: 'insideBottom',
distance: 15,
onChange: function () {
const labelOption = {
rotate: app.config.rotate,
align: app.config.align,
verticalAlign: app.config.verticalAlign,
position: app.config.position,
distance: app.config.distance
};
myChart.setOption({
series: [
{
label: labelOption
},
{
label: labelOption
},
{
label: labelOption
},
{
label: labelOption
}
]
});
}
};
const labelOption = {
show: true,
rich: {
name: {}
}
};
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
data: ['Forest', 'Steppe', 'Desert', 'Wetland']
},
toolbox: {
show: true,
orient: 'vertical',
left: 'right',
top: 'center',
},
xAxis: [
{
type: 'category',
axisTick: { show: false },
data: ['2012', '2013', '2014', '2015', '2016']
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: '名称',
type: 'bar',
barGap: 0,
label: labelOption,
emphasis: {
focus: 'series'
},
data: [320, 332, 301, 334, 390]
},
// {
// name: 'Steppe',
// type: 'bar',
// label: labelOption,
// emphasis: {
// focus: 'series'
// },
// data: [220, 182, 191, 234, 290]
// },
// {
// name: 'Desert',
// type: 'bar',
// label: labelOption,
// emphasis: {
// focus: 'series'
// },
// data: [150, 232, 201, 154, 190]
// },
// {
// name: 'Wetland',
// type: 'bar',
// label: labelOption,
// emphasis: {
// focus: 'series'
// },
// data: [98, 77, 101, 99, 40]
// }
]
};
let option2 = {
title: {
text: '标题',
subtext: '副标题',
left: 'center'
},
tooltip: {
trigger: 'item'
},
series: [
{
name: 'Access From',
type: 'pie',
radius: '50%',
data: [
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
{ value: 484, name: 'Union Ads' },
{ value: 300, name: 'Video Ads' }
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
const initChart = (id, opt) => {
var chartDom = document.getElementById(id);
var myChart = echarts.init(chartDom);
myChart.setOption(opt);
}
onMounted(() => {
initChart("main", option)
initChart("main2", option2)
})
</script>
<style lang="scss" scoped>
#main,
#main2 {
width: 300px;
height: 300px;
}
</style>