Browse Source

Merge branch 'luckysheet' into test

test
是小王呀\24601 5 months ago
parent
commit
c77d2a5e18
  1. 24
      src/views/modules/base/smartExcel/cpts/picture-Info.vue
  2. 2
      src/views/modules/base/smartExcel/cpts/picture-collection.vue
  3. 8
      src/views/modules/base/smartExcel/cpts/picture-list.vue
  4. 31
      src/views/modules/base/smartExcel/sharedSpace.vue
  5. 249
      src/views/modules/shequzhili/analysis/cpts/echarts-affairs.vue
  6. 20
      src/views/modules/shequzhili/analysis/index.vue
  7. 12
      src/views/modules/workSys/sysConfigure/cpts/custom-type.vue
  8. 31
      src/views/modules/workSys/sysConfigure/cpts/type-add.vue

24
src/views/modules/base/smartExcel/cpts/picture-Info.vue

@ -1,8 +1,8 @@
<template>
<div style="margin: 50px; text-align: center; ">
<div class="dialog-h-content scroll-h">
<div class="flex" style="display: flex; flex-direction: column;height: 400px;">
<img :src="formData.url" style="height: 200px; width: 250px;margin-bottom: 20px;">
<div class="flex" style="display: flex; flex-direction: column;justify-items: center;align-items: center">
<img :src="formData.url" class="responsive-img">
<span style="text-align: left;margin-bottom: 20px;">{{ formData.name }}</span>
<span style="text-align: left; color: #94a1b7;margin-bottom: 20px;">{{ formData.staffName }} 上传于 {{ formData.createdTime }}</span>
<span style="text-align: left; color: #94a1b7;margin-bottom: 20px;">图片尺寸{{ formData.dimension }} 文件大小{{ formData.size }}MB
@ -69,12 +69,13 @@
},
async handleComfirm() {
const link = document.createElement('a');
link.href = this.formData.url;
link.download = this.formData.name;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
window.open(this.formData.url); //
// const link = document.createElement('a');
// link.href = this.formData.url;
// link.download = this.formData.name;
// document.body.appendChild(link);
// link.click();
// document.body.removeChild(link);
},
async addActivity() {
let url = '/voluntary/newsTrends/saveOrUpdate'
@ -148,6 +149,13 @@
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>
<style lang="scss" scoped>
.responsive-img {
max-width: 600px; /* 限制最大宽度为 600px */
width: 100%; /* 默认填充父容器 */
height: auto; /* 高度自适应,保证比例 */
display: block; /* 防止底部留空白 */
margin-bottom: 20px;
}
.item_width_1 {
width: 634px;

2
src/views/modules/base/smartExcel/cpts/picture-collection.vue

@ -42,7 +42,7 @@
</div>
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false"
title="添加图片" width="950px" top="30vh" class="dialog-h" @closed="closeAdd">
title="修改图片集属性" width="950px" top="30vh" class="dialog-h" @closed="closeAdd">
<picture-add v-if="formShow"ref="ref_form" @closeAdd="closeAdd"></picture-add>
</el-dialog>
</div>

8
src/views/modules/base/smartExcel/cpts/picture-list.vue

@ -2,14 +2,14 @@
<div class="" style="height: 900px;margin: 20px;">
<div style="margin:20px 0 20px 0;align-items: center;" class="flex f-endpoint">
<div class="flex f-align_item ">
<el-button type="text" size="small" @click="handelClickBack"
style="margin-right: 10px; font-size: 12px;">返回</el-button>
<div style="margin-right: 10px;">{{ formedate.albumName }} </div>
<el-button type="text" round @click="handelClickBack"
icon="el-icon-back">返回</el-button>
<div style="margin-right: 10px; font-size: 14px;margin-left: 20px;">{{ formedate.albumName }} </div>
<div>
<el-upload :headers="$getElUploadHeaders()" class="upload-demo" :data="{ customerId: customerId }"
:action="uploadUlr" :show-file-list="false" :on-success="handleSuccess"
:before-upload="beforeUpload">
<el-button size="small" type="primary">点击上传</el-button>
<el-button size="small" type="primary">上传图片</el-button>
</el-upload>
</div>
</div>

31
src/views/modules/base/smartExcel/sharedSpace.vue

@ -5,7 +5,7 @@
<div class="flex f-endpoint" v-if="showTitle">
<div class="flex" >
<div style="align-items: center;justify-items: center;" class="f-align_item flex"
:class="{ active: selectedIndex === index }" v-for="(item, index) in titleList" :key="item.value"
:class="selectedIndex === index ? 'f-align_item' : 'f-align_item_active'" v-for="(item, index) in titleList" :key="item.value"
@click="selectItem(index)">
<span>{{ item.label }}</span>
</div>
@ -81,12 +81,12 @@
</div>
</div>
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false" title="新增图片"
width="950px" top="5vh" class="dialog-h" @closed="closeAdd">
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false" :title="pictureTitle"
width="950px" top="15vh" class="dialog-h" @closed="closeAdd">
<picture-add v-if="formShow" ref="ref_form" @closeAdd="closeAdd"></picture-add>
</el-dialog>
<el-dialog :visible.sync="showUpdate" :close-on-click-modal="false" :close-on-press-escape="false" title="上传共享数据"
width="950px" top="5vh" class="dialog-h" @closed="closeUpdataAdd">
width="950px" top="15vh" class="dialog-h" @closed="closeUpdataAdd">
<upload-data-add v-if="showUpdate" ref="ref_form" @closeUpdataAdd="closeUpdataAdd"></upload-data-add>
</el-dialog>
<div v-if="showdownloadRecord">
@ -136,6 +136,7 @@
return time.getTime() > nowData;
};
return {
pictureTitle:"新增图片",
showUpdate:false,
downloadRecord:{
@ -349,6 +350,7 @@
},
onClick(type,id){
this.formShow=true
this.$nextTick(() => {
this.$refs.ref_form.initForm(type,id);
});
@ -537,16 +539,23 @@
padding: 10px;
cursor: pointer;
font-size: 16px;
border-bottom: 3px solid blue;
}
.f-align_item.active {
.f-align_item_active {
padding: 10px;
color: blue !important; /* 强制应用颜色 */
cursor: pointer;
font-size: 16px;
color: blue;
border-bottom: 5px solid blue;
/* 点击时的下划线 */
border-bottom: 3px solid #ffffff;
}
// .f-align_item.active {
// font-size: 16px;
// color: blue;
// border-bottom: 5px solid blue;
// /* 线 */
// }
.f-align_item span {
color: black;
/* 默认文字颜色 */
@ -566,7 +575,7 @@
.oval-input {
::v-deep(.el-input__inner) {
border-color: #646363 !important; /* 默认加深边框 */
border-color: #dbdada !important; /* 默认加深边框 */
border-radius: 25px !important;
}
}

249
src/views/modules/shequzhili/analysis/cpts/echarts-affairs.vue

@ -2,8 +2,8 @@
<div style="margin-top:10px">
<div class="chart-container">
<div id="chart1" class="chart"></div>
<div id="chart2" class="chart"></div>
<div id="chart3" class="chart"></div>
<div v-if="showchart2" id="chart2" class="chart"></div>
<div v-if="showchart3" id="chart3" class="chart"></div>
</div>
</div>
</template>
@ -15,6 +15,8 @@ export default {
//
data() {
return {
showchart2:true,
showchart3:true,
data: [
{
value: 3000,
@ -43,26 +45,45 @@ export default {
//
created() { },
async mounted() {
this.initChart("/actual/base/residentIntegrity/resiCategoryStats/byOrg/query4Org");
this.initChart1("/actual/base/residentIntegrity/resiCategoryStats/byOrg/query4Org");
this.initChart2("/actual/base/residentIntegrity/resiCategoryStats/byOrg/query4Org");
console.log(this.formData,"sdlkjslkfd");
this.getCategoryTree()
},
//
methods: {
initChart(url) {
//
async getCategoryTree() {
const url = "/governance/icEventCategoryMapping/getCategoryTree";
let param = {
endDate: this.formData.queryDateStart,
startDate: this.formData.queryDateEnd,
usableFlag: true
}
const { data, code, msg } = await requestGet(url, param);
if (code === 0) {
// this.orgOptions = data
this.initChart(data)
console.log(this.data, "sdfjklsdf");
} else {
this.$message.error(msg);
}
},
initChart(data) {
const myChart = echarts.init(document.getElementById('chart1'));
const maxIndex = this.data.findIndex(item => item.value === Math.max(...this.data.map(d => d.value)));
const maxIndex = data.findIndex(item => item.eventNum === Math.max(...data.map(d => d.eventNum)));
console.log(data[maxIndex],"sdkljfsdlkf");
if (data[maxIndex].childData) {
this.showchart2=true
this.initChart1(data[maxIndex].childData)
}
data.forEach(item => {
console.log(item, "sdklnslkdj");
item.name = item.categoryName
item.value=item.eventNum
});
const option = {
color: ['#3C94FE', '#FE9166', '#FAC156', '#22C1C3', '#F0D915', '#6FC364', "#BA9CFF",],
tooltip: {
show:"true",
formatter: '{b}<br/> <br/>{c} ({d}%)',
trigger: 'item',
backgroundColor: 'rgba(150, 150, 150, 0.7)', // 0.7
borderWidth: 0,
textStyle: {
color: '#fff' //
}
formatter: '{b} <br/> 数量: {c} ({d}%)'
},
legend: {
orient: 'horizontal',
@ -73,9 +94,7 @@ export default {
radius: ["0", "120"],
type: 'pie',
selectedMode: 'single', //
data: this.data.map((item, idx) => ({
...item,
})),
data: data,
label: {
show: true,
position: 'inside',
@ -102,6 +121,20 @@ export default {
}
};
myChart.setOption(option); //
myChart.on("mouseover", (params) => {
console.log("鼠标悬停在:", params);
if(data[params.dataIndex].childData){
this.showchart2=true
this.showchart3=true
this.initChart1(data[params.dataIndex].childData)
}else{
this.showchart2=false
this.showchart3=false
// this.initChart1()
}
// this.onHover(params);
});
setTimeout(() => {
myChart.dispatchAction({
type: 'showTip',
@ -115,25 +148,43 @@ export default {
// dataIndex: maxIndex
// });
// myChart.dispatchAction({
// type: 'showTip', //
// seriesIndex: 0,
// dataIndex: maxIndex
// });
myChart.dispatchAction({
type: 'showTip', //
seriesIndex: 0,
dataIndex: maxIndex
});
},
initChart1(url) {
initChart1(data) {
console.log(data,"sdkljklsd");
const myChart = echarts.init(document.getElementById('chart2'));
const maxIndex = this.data.findIndex(item => item.value === Math.max(...this.data.map(d => d.value)));
data.forEach(item => {
console.log(item, "sdklnslkdj");
item.name = item.categoryName
item.value=item.eventNum
});
const maxIndex = data.findIndex(item => item.eventNum === Math.max(...data.map(d => d.eventNum)));
if (data[maxIndex].childData) {
this.initChart2(data[maxIndex].childData)
}
const option = {
tooltip: {
formatter: '{b}<br/> <br/>{c} ({d}%)',
trigger: 'item',
backgroundColor: 'rgba(150, 150, 150, 0.7)', // 0.7
borderWidth: 0,
title: {
text: data.categoryName,
subtext: '城管类诉求',
left: 'center',
top: '42%',
textStyle: {
color: '#fff' //
fontSize: 22,
fontWeight: 'bold'
},
subtextStyle: {
fontSize: 14,
color: '#666'
}
},
tooltip: {
trigger: 'item',
formatter: '{b} <br/> 数量: {c} ({d}%)'
},
legend: {
orient: 'horizontal',
bottom: 0,
@ -145,23 +196,36 @@ export default {
type: 'pie',
avoidLabelOverlap: false,
selectedMode: 'single', //
data: this.data.map((item, idx) => ({
...item,
})),
data: data,
label: {
formatter: '{b}: {c} ({d}%)',
formatter: (params) => `{num|${params.value}} {percent|${params.percent}%}\n{b|${params.name}}`,
show: true,
position: 'outside',
color:"#ffffff",
fontSize:"20"
color:"#525353",
fontSize:"15",
rich: {
num: {
fontSize: 16,
fontWeight: 'bold',
color: '#000'
},
percent: {
fontSize: 14,
color: '#1E88E5'
},
b: {
fontSize: 12,
color: '#666'
}
}
},
emphasis: {
label: {
show: true,
fontSize: '30',
fontWeight: 'bold'
},
}
// emphasis: {
// label: {
// show: true,
// fontSize: '30',
// fontWeight: 'bold'
// },
// }
}
],
@ -181,30 +245,34 @@ export default {
dataIndex: maxIndex
});
}, 500);
// myChart.dispatchAction({
// type: 'highlight', //
// seriesIndex: 0,
// dataIndex: maxIndex
// });
myChart.dispatchAction({
type: 'showTip', //
seriesIndex: 0,
dataIndex: maxIndex
});
myChart.on("mouseover", (params) => {
console.log("鼠标悬停在:", params);
if(data[params.dataIndex].childData){
this.showchart3=true
this.initChart2(data[params.dataIndex].childData)
}else{
this.showchart3=false
}
// myChart.dispatchAction({
// type: 'showTip', //
// seriesIndex: 0,
// dataIndex: maxIndex
// });
});
},
initChart2(url) {
initChart2(data) {
const myChart = echarts.init(document.getElementById('chart3'));
const maxIndex = this.data.findIndex(item => item.value === Math.max(...this.data.map(d => d.value)));
data.forEach(item => {
console.log(item, "sdklnslkdj");
item.name = item.categoryName
item.value=item.eventNum
});
const maxIndex = data.findIndex(item => item.eventNum === Math.max(...data.map(d => d.eventNum)));
const option = {
tooltip: {
formatter: '{b}<br/> <br/>{c} ({d}%)',
trigger: 'item',
backgroundColor: 'rgba(150, 150, 150, 0.7)', // 0.7
borderWidth: 0,
textStyle: {
color: '#fff' //
}
formatter: '{b} <br/> 数量: {c} ({d}%)'
},
legend: {
orient: 'horizontal',
@ -215,21 +283,38 @@ export default {
{
radius: ["80", "120"],
type: 'pie',
avoidLabelOverlap: false,
selectedMode: 'single', //
data: this.data.map((item, idx) => ({
...item,
})),
data: data,
label: {
formatter: '{b}: {c} ({d}%)',
formatter: (params) => `{num|${params.value}} {percent|${params.percent}%}\n{b|${params.name}}`,
show: true,
position: 'outside',
color:"#ffffff",
fontSize:"20"
},
label: {
show: false,
position: 'center'
color:"#525353",
fontSize:"15",
rich: {
num: {
fontSize: 16,
fontWeight: 'bold',
color: '#000'
},
percent: {
fontSize: 14,
color: '#1E88E5'
},
b: {
fontSize: 12,
color: '#666'
}
}
},
// emphasis: {
// label: {
// show: true,
// fontSize: '30',
// fontWeight: 'bold'
// },
// }
}
],
@ -256,11 +341,11 @@ export default {
// dataIndex: maxIndex
// });
// myChart.dispatchAction({
// type: 'showTip', //
// seriesIndex: 0,
// dataIndex: maxIndex
// });
myChart.dispatchAction({
type: 'showTip', //
seriesIndex: 0,
dataIndex: maxIndex
});
},
},
//
@ -269,9 +354,15 @@ export default {
computed: {},
//
watch: {},
props:{
formData:{
type:Object,
default:''
}
}
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.chart-container {
width: 100%;
display: flex;
@ -280,7 +371,7 @@ export default {
}
.chart {
width: 33.3%;
width: 500px;
height: 350px;
}
</style>

20
src/views/modules/shequzhili/analysis/index.vue

@ -211,7 +211,7 @@
<h1 style="font-size: 24px; font-weight: bold;"> 政务热线诉求类别占比情况 </h1>
</div>
<div>
<echartsAffairs></echartsAffairs>
<echartsAffairs :formData="formData"></echartsAffairs>
</div>
<div style="display: flex;margin-top: 20px" >
<div class="f-align_item " :class="{ active: selectedIndex === index }" v-for="(item, index) in titleList"
@ -824,16 +824,16 @@ export default {
},
watch: {},
async mounted() {
this.user = this.$store.state.user;
this.agencyId = this.user.agencyId;
this.getLastMonthRange()
this.getOrgData();
this.agencyLevel = localStorage.getItem("level", this.orgData.level);
this.getTableData();
// this.initEcharts();
await this.EventCategoryAnalysis();
this.user = this.$store.state.user;
this.agencyId = this.user.agencyId;
this.getLastMonthRange()
this.getOrgData();
this.agencyLevel = localStorage.getItem("level", this.orgData.level);
this.getTableData();
// this.initEcharts();
await this.EventCategoryAnalysis();
await this.EventCate();
this.getCategoryTree()
this.getCategoryTree()
},
methods: {

12
src/views/modules/workSys/sysConfigure/cpts/custom-type.vue

@ -95,31 +95,35 @@
})
},
handleAdd (row,type) {
console.log(row,"Sdfjdsflk;");
const {id,categoryName,categoryPid,categoryMapId}=row
const item={id,categoryName,categoryPid,categoryMapId}
console.log(item,"sdflkjkldsf");
if(type=="largeCategoryAdd"){
console.log(row.id);
this.formTitle = '新增分类'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm(type, row)
this.$refs.ref_form.initForm(item, type)
})
} else if(type=="subclass"){
this.formTitle = '新增分类'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm(type, row)
this.$refs.ref_form.initForm(item, type)
})
} else if (type == 'edit') {
this.formTitle = '修改分类'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm(type, row)
this.$refs.ref_form.initForm(item, type)
})
}
else if (type == 'appealType') {
this.formTitle = '对应诉求类型'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm(type, row)
this.$refs.ref_form.initForm(item, type)
})
}

31
src/views/modules/workSys/sysConfigure/cpts/type-add.vue

@ -41,13 +41,15 @@
export default {
data () {
return {
agencyIdArray:[],
subclassName:"",
orgOptionProps: {
multiple: true,
value: 'id',
label: 'categoryName',
children: 'children',
checkStrictly: true
checkStrictly: true,
emitPath:false
},
orgOptions: [],
state:"",
@ -74,6 +76,22 @@
},
methods: {
async handleDel() {
console.log("dsfksdl");
const url = `/governance/icEventCategoryMapping/detail/${this.tableData.id}`;
let param = {
}
const { data, code, msg } = await requestGet(url, param);
if (code === 0) {
console.log(code,data,"fmsldfksdlf");
if(data.categoryMapId){
this.agencyIdArray=data.categoryMapId.split(",")
}
}
},
handleChangeAgency(val){
this.tableData.categoryMapId=""
if (val.length > 0) {
@ -126,13 +144,12 @@
handleCancle(){
this.$emit('handleClose')
},
async initForm(type,row){
this.state=type,
this.tableData=row
console.log(this.tableData,"dfgjlsldf");
console.log(type,row,"新增分类");
async initForm(item,type){
console.log(item,type,"sdlkfdslk");
this.state=type,
this.tableData=item
this.handleDel()
},
},

Loading…
Cancel
Save