Merge remote-tracking branch 'origin/master'
| | |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | //统计分析删除 |
| | | export const deleteChartId = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-system/statisticConfig/deleteChartId', |
| | | method: 'post', |
| | | params |
| | | }) |
| | | } |
| | |
| | | defaultExpandAll: false, |
| | | menu: false, |
| | | lazy: true, |
| | | // treeLoad:function (node,resolve){ |
| | | // console.log(node) |
| | | // console.log(resolve) |
| | | // } |
| | | treeLoad: (node, resolve) => { |
| | | if (node.data != false) { |
| | | const parentId = (node.level === 0) ? 0 : node.data.oid; |
| | |
| | | getTreeLists() { |
| | | const index = this.$route.query.id.indexOf('@'); |
| | | const result = this.$route.query.id.substring(0, index); |
| | | this.idData = result |
| | | // console.log(this.$route) |
| | | this.idData = result; |
| | | getTreeList({'conditionMap[id]': this.idData}).then(res => { |
| | | if (res) { |
| | | if (res.data.length === 0) { |
| | | this.$message.error("主数据分类查询为空!"); |
| | | } else { |
| | | this.Treedata = res.data; |
| | | |
| | | const [firstProperty] = res.data; |
| | | this.ModifyProperties(this.Treedata, 'text', 'label'); |
| | | this.referTreeId = firstProperty.attributes.btmTypeId; |
| | |
| | | }); |
| | | this.$emit("coderuleoid", this.coderuleoid) |
| | | this.$emit('Treedata', this.Treedata) |
| | | // console.log(this.Treedata) |
| | | } |
| | | } |
| | | }).catch(res => { |
| | | // console.log(res) |
| | | this.$message.error(res) |
| | | }); |
| | | }, |
| | |
| | | this.$emit("codeClassifyOid", this.nodeClickList.oid) |
| | | this.$emit("nodeClickList", this.nodeClickList) |
| | | } catch (error) { |
| | | // 处理错误 |
| | | this.$message.error(error) |
| | | } |
| | | } |
| | |
| | | }} |
| | | </el-button> |
| | | <span v-if="tableHeadFindData.length > 0"> |
| | | <el-select slot="prepend" v-model="keyWordFind" placeholder="请选择" size="small"> |
| | | <el-option v-for="item in tableHeadFindData" :key="item.id" :label="item.label" |
| | | :value="item.prop"></el-option> |
| | | <el-select slot="prepend" v-model="keyWordFind" placeholder="请选择" size="small" @change="searchChange"> |
| | | <el-option v-for="item in tableHeadFindData" :key="item.id" :label="item.label" :value="item.prop" ></el-option> |
| | | </el-select> |
| | | <el-input v-model="WupinFindValue" placeholder="请输入关键字按回车查询" |
| | | size="small" style="width: 180px; margin-left: 5px; margin-top: 10px" |
| | | size="small" style="width: 180px; margin-left: 5px; margin-top: 10px" v-if="!isTimeStatus" |
| | | @keyup.enter.native="tableFindInp"></el-input> |
| | | </span> |
| | | <span class="block" v-if="tableHeadFindData.length > 0 && isTimeStatus"> |
| | | <el-date-picker |
| | | v-model="dateValue" |
| | | size="small" |
| | | type="date" |
| | | style="margin-left: 5px" |
| | | @change="dateChange" |
| | | placeholder="选择日期"> |
| | | </el-date-picker> |
| | | </span> |
| | | <span v-if="tableHeadFindData.length > 0" style="margin-left: 10px"> |
| | | <p style="font-size: 13px;display: inline-block;"> 状态:</p> |
| | |
| | | import fileInHtml from "@/components/file/inHtml.vue"; |
| | | import {getUserInfo} from "@/api/system/user"; |
| | | import func from "@/util/func"; |
| | | import moment from "moment/moment"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | isTimeStatus:false, |
| | | isTimeName:'', |
| | | dateValue:"", |
| | | //批量编辑对话框 |
| | | bulkeditvisible: false, |
| | | LinkVisible: false, |
| | |
| | | btmtype: '', |
| | | code: "", |
| | | type: '', |
| | | // this.visibleDeactivate ?'ENABLE':this.visibleEnable ? 'DISABLE' :this.visibleRecovery ? 'ROLLBACK' :'PUBLIC' |
| | | processName: "", |
| | | vars: { |
| | | codeClassifyOid: "", |
| | |
| | | fileOptions: {}, |
| | | result: '', |
| | | elapsedTime: '', |
| | | conditionMap: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | tableDataArray: { |
| | | handler(newval, oldval) { |
| | | // console.log('tableData',newval) |
| | | this.tableData = newval; |
| | | this.searchResults = newval |
| | | this.doLayout(); |
| | |
| | | }, |
| | | tableHeadFindData: { |
| | | handler(newval, oldval) { |
| | | // console.log(newval) |
| | | newval.forEach((record, _index) => { |
| | | if (record.queryField == 'id' && validatenull(record.templet)) { |
| | | //企业编码的默认添加超链接,暂未实现 |
| | |
| | | |
| | | if (_index == 0) { |
| | | this.keyWordFind = record.queryField; |
| | | console.log(record) |
| | | } |
| | | }; |
| | | // if(record.fieldType === "datetime"){ |
| | | // this.isTimeStatus = true; |
| | | // console.log(this.isTimeStatus) |
| | | // console.log(record) |
| | | // } |
| | | }) |
| | | this.tableHeadFindDatas = newval; |
| | | if (newval) { |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 置空查询条件 |
| | | resetConditionMap() { |
| | | this.conditionMap = {}; |
| | | }, |
| | | |
| | | CodeLinkHandler(row) { |
| | | this.LinkObject = row; |
| | | this.LinkVisible = true; |
| | | this.LinkList = Object.keys(row).map(property => property) |
| | | |
| | | }, |
| | | //状态搜索 |
| | | cellSelectHandler(row) { |
| | |
| | | }, |
| | | cellStatusFind(lcstatus) { |
| | | this.isLoading = true; |
| | | this.conditionMap["conditionMap[lcstatus]"] = lcstatus; |
| | | TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | ...this.conditionMap, /**带上分页查询条件 */ |
| | | }); |
| | | const endTime = performance.now(); |
| | | this.elapsedTime = Math.floor(endTime - startTime) * 1; |
| | |
| | | sort: val.prop, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | ...this.conditionMap |
| | | }); |
| | | this.data = data.data; |
| | | } finally { |
| | |
| | | //分页刷新 |
| | | async onLoad(val) { |
| | | this.isLoading = true; |
| | | |
| | | try { |
| | | let conditionMap = {}; |
| | | if (this.statusSelect !== 'all') { |
| | |
| | | }, |
| | | // 高级查询 |
| | | async echoContion(val) { |
| | | this.conditionMap = val; |
| | | try { |
| | | const res = await FindData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | ...val, |
| | | page: this.page.currentPage = 1,/** 每次点击高级查询都应该从第一页开始*/ |
| | | limit: this.page.pageSize |
| | | }); |
| | | this.tableData = res.data.data; |
| | | this.page.total = res.data.total |
| | |
| | | }, |
| | | //增加保存 |
| | | AddSumbit(val) { |
| | | // console.log('val',val) |
| | | if (func.notEmpty(val.ts)) { |
| | | val.ts = func.formattedDateTime(val.ts); |
| | | //console.log(val.ts); |
| | |
| | | this.batchImportData.type = type |
| | | this.batchImportData.codeClassifyOid = this.codeClassifyOid |
| | | }, |
| | | searchChange(val) { |
| | | this.isTimeName = val; |
| | | this.isTimeStatus = this.tableHeadFindData.some(item => { |
| | | if (item.fieldType === "datetime" && item.prop === val) { |
| | | return true; |
| | | } |
| | | return false; |
| | | }); |
| | | // console.log(this.isTimeStatus) |
| | | }, |
| | | dateChange(val){ |
| | | if(val){ |
| | | const momentDate = moment(this.dateValue); |
| | | const dateString = momentDate.format("yyyy-MM-DD"); |
| | | this.isLoading = true; |
| | | try { |
| | | TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | ['conditionMap[' + this.keyWordFind + ']']: dateString |
| | | }).then(res => { |
| | | this.tableData = res.data.data; |
| | | this.page.total = res.data.total; |
| | | }) |
| | | } finally { |
| | | this.isLoading = false; |
| | | } |
| | | } |
| | | }, |
| | | //输入回车搜索 |
| | | tableFindInp() { |
| | | this.isLoading = true; |
| | | try { |
| | | // 存储查询条件,主要是为了点击页码时带上这个条件 |
| | | this.conditionMap["conditionMap[" + this.keyWordFind + "]"] = '*' + this.WupinFindValue + '*'; |
| | | TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | |
| | | <template> |
| | | <basic-container> |
| | | <v-chart id="chart" :auto-resize="true" :options="chartOptions"></v-chart> |
| | | <div style="display: inline-block;float: right;margin-bottom: 10px;margin-right: 60px"> |
| | | <el-button size="small" type="primary" plain @click="delHandler">删除</el-button> |
| | | </div> |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | import 'echarts/lib/component/tooltip' |
| | | import 'echarts/lib/component/title' |
| | | import 'echarts/lib/component/legend' |
| | | import {deleteChartId} from "@/api/statistic/chart" |
| | | |
| | | export default { |
| | | name: "ColumnarChart", |
| | |
| | | chartName:{ |
| | | type:String, |
| | | default: "" |
| | | }, |
| | | btmname :{ |
| | | type: String |
| | | } |
| | | }, |
| | | watch:{ |
| | |
| | | }, |
| | | created() { |
| | | }, |
| | | methods:{ |
| | | delHandler(){ |
| | | deleteChartId({btmname:this.btmname,chartId:'2'}).then(res=>{ |
| | | this.$message.success('删除成功') |
| | | this.$emit('refresh'); |
| | | }).catch(error=>{ |
| | | this.$message.error(error) |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | <template> |
| | | <div id="main"> |
| | | <div id="main" style="height: 460px;margin-bottom: 15px"> |
| | | <basic-container> |
| | | <v-chart id="chart" :auto-resize="true" :options="chartOptions"></v-chart> |
| | | <div style="display: inline-block;float: right;margin-bottom: 10px;margin-right: 60px"> |
| | | <el-button size="small" type="primary" plain @click="delHandler">删除</el-button> |
| | | </div> |
| | | </basic-container> |
| | | </div> |
| | | </template> |
| | |
| | | import 'echarts/lib/component/tooltip' |
| | | import 'echarts/lib/component/title' |
| | | import 'echarts/lib/component/legend' |
| | | import {deleteChartId} from "@/api/statistic/chart" |
| | | |
| | | export default { |
| | | name: "lineChart", |
| | |
| | | chartName: { |
| | | type: String, |
| | | default: "" |
| | | }, |
| | | btmname :{ |
| | | type: String |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | }, |
| | | immediate: true, |
| | | deep: true |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | methods:{ |
| | | delHandler(){ |
| | | deleteChartId({btmname:this.btmname,chartId:'0'}).then(res=>{ |
| | | this.$message.success('删除成功') |
| | | this.$emit('refresh'); |
| | | }).catch(error=>{ |
| | | this.$message.error(error) |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | width: 100%; |
| | | height: 400px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <v-chart id="chart" :auto-resize="true" :options="chartOptions"></v-chart> |
| | | <div style="display: inline-block;float: right;margin-bottom: 10px;margin-right: 60px"> |
| | | <el-button size="small" type="primary" plain @click="delHandler">删除</el-button> |
| | | </div> |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | import 'echarts/lib/component/tooltip' |
| | | import 'echarts/lib/component/title' |
| | | import 'echarts/lib/component/legend' |
| | | import {deleteChartId} from "@/api/statistic/chart" |
| | | |
| | | export default { |
| | | name: "stackedAreaChart", |
| | |
| | | chartName: { |
| | | type: String, |
| | | default: "" |
| | | }, |
| | | btmname :{ |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | immediate: true, |
| | | deep: true |
| | | } |
| | | }, |
| | | methods:{ |
| | | delHandler(){ |
| | | deleteChartId({btmname:this.btmname,chartId:'3'}).then(res=>{ |
| | | this.$message.success('删除成功') |
| | | this.$emit('refresh'); |
| | | }).catch(error=>{ |
| | | this.$message.error(error) |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <basic-container style="width: 100%"> |
| | | <v-chart :options="chartOptions" :auto-resize="true" id="chart"></v-chart> |
| | | <div style="display: inline-block;float: right;margin-bottom: 10px;margin-right: 60px"> |
| | | <el-button size="small" type="primary" plain @click="delHandler">删除</el-button> |
| | | </div> |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | import 'echarts/lib/chart/bar' // 导入柱状图组件 |
| | | import 'echarts/lib/component/tooltip' |
| | | import 'echarts/lib/component/legend' |
| | | import {deleteChartId} from "@/api/statistic/chart" |
| | | export default { |
| | | name: "polarBarChart", |
| | | props:{ |
| | |
| | | monthData:{ |
| | | type:Array, |
| | | default: () => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'] |
| | | }, |
| | | btmname :{ |
| | | type: String |
| | | } |
| | | }, |
| | | watch:{ |
| | |
| | | }, |
| | | created(){ |
| | | this.chartOptions.color = ['#5470c6', '#91cc75', '#fac858', '#ca8622', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4']; |
| | | }, |
| | | methods:{ |
| | | delHandler(){ |
| | | deleteChartId({btmname:this.btmname,chartId:'1'}).then(res=>{ |
| | | this.$message.success('删除成功') |
| | | this.$emit('refresh'); |
| | | }).catch(error=>{ |
| | | this.$message.error(error) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | <script> |
| | | import { getDictionary } from "@/api/omd/enum"; |
| | | import moment from 'moment'; |
| | | import vciWebRefer from '../refer/vciWebRefer.vue'; |
| | | export default { |
| | | components: { vciWebRefer }, |
| | |
| | | //console.log(item.referConfigData.options); |
| | | //console.log(item); |
| | | } |
| | | // TODO: 这儿修改一下参照的查询条件 |
| | | let conditions = []; |
| | | if(item.fieldType==='text'){ |
| | | conditions = this.searchConditions; |
| | | }else if (item.fieldType==='combox'|| item.fieldType==='truefalse'){ |
| | | conditions = this.switchSearchConditions; |
| | | }else if (item.fieldType==='datetime') { |
| | | }else if (item.fieldType==='datetime' || item.fieldType==='date') { |
| | | conditions = this.dateConditions; |
| | | }else { |
| | | conditions = this.referSearchConditions; |
| | |
| | | //console.log(this.initOptions); |
| | | //console.log(this.searchFormArrays); |
| | | }, |
| | | |
| | | /** 为参照类型时值选择之后的处理 */ |
| | | setReferValue(data,index){ |
| | | if(data.field) { |
| | |
| | | // 存在相同的查询条件 |
| | | if(condtionParam['conditionMap['+searchConditions[index].queryField+']']+'' != 'undefined' ) { |
| | | this.$message.warning("存在重复查询条件,请仔细核对!"); |
| | | console.log(condtionParam['conditionMap['+searchConditions[index].queryField+']']); |
| | | //console.log(condtionParam['conditionMap['+searchConditions[index].queryField+']']); |
| | | return false; |
| | | } |
| | | let fieldType = this.initOptions[index].fieldType; |
| | | // 当出现查询日期的格式时,需要对日期格式进行处理 |
| | | if(fieldType==='datetime' || fieldType==='date'){ |
| | | // 将时间转换为本地时间 |
| | | let localTime = moment.utc(searchConditions[index].fieldValue).local(); |
| | | // 格式化时间为您想要的格式 |
| | | let formattedTime = localTime.format('YYYY-MM-DD HH:mm:ss'); |
| | | condtionParam['conditionMap['+searchConditions[index].queryField+searchConditions[index].condition+']'] = formattedTime; |
| | | //console.log(formattedTime); |
| | | }else{ |
| | | //拼接成map对象,将查询对象和condition拼接在一起,组成高级查询map的key |
| | | condtionParam['conditionMap['+searchConditions[index].queryField+searchConditions[index].condition+']'] = searchConditions[index].fieldValue; |
| | | } |
| | | } |
| | | |
| | | } |
| | | // 查询条件没有出现重复属性,并且过滤掉了空值,就传递给父组件 |
| | | console.log(condtionParam); |
| | | //console.log(condtionParam); |
| | | this.$emit('echoContion',condtionParam) |
| | | this.isShowDialog = false; |
| | | }, |
| | |
| | | } |
| | | } |
| | | |
| | | ::v-deep(.el-upload) { |
| | | ::v-deep { |
| | | .el-upload { |
| | | width: 100%; |
| | | height: 120px; |
| | | } |
| | | |
| | | ::v-deep(.el-upload-dragger) { |
| | | .el-upload-dragger { |
| | | width: 100%; |
| | | height: 120px; |
| | | } |
| | | |
| | | ::v-deep(.el-upload-dragger .el-icon-upload) { |
| | | .el-upload-dragger .el-icon-upload { |
| | | margin: 15px 0 16px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep(.el-col>.el-card >.el-card__header) { |
| | | ::v-deep { |
| | | .el-col>.el-card >.el-card__header { |
| | | background: #fff |
| | | } |
| | | |
| | | } |
| | | |
| | | .box-card { |
| | | background: #fff; |
| | | } |
| | | |
| | | .clearfix { |
| | | display: -webkit-box; |
| | | display: flex; |
| | |
| | | <transition name="fade"> |
| | | <span v-if="keyCollapse" |
| | | key="0"> |
| | | <img src="favicon.png" class="logimg"> |
| | | <img class="logimg" src="favicon.png"> |
| | | </span> |
| | | </transition> |
| | | <transition-group name="fade"> |
| | | <template v-if="!keyCollapse"> |
| | | <span> |
| | | <img class="imgSpan" :src=imgurl> |
| | | <img :src=imgurl class="imgSpan"> |
| | | </span> |
| | | <span class="avue-logo_title" |
| | | key="1"> |
| | | <span key="1" |
| | | class="avue-logo_title"> |
| | | <span> |
| | | <img class="imgSpan" :src=imgurl> |
| | | <img :src=imgurl class="imgSpan"> |
| | | </span> |
| | | <span style="font-size: 17px;margin-left: 27px">编码资源管理系统</span> |
| | | </span> |
| | |
| | | top: 15px; |
| | | left: 26px; |
| | | } |
| | | |
| | | .logimg{ |
| | | position: absolute; |
| | | top: 20px; |
| | |
| | | :nodeClickList="this.nodeClickList" |
| | | @currentPage="currentPages" |
| | | @pageSize="pageSizes" |
| | | ref="vciMasterCrud" |
| | | > |
| | | </VciMasterCrud> |
| | | </el-main> |
| | |
| | | page: { |
| | | total: 0, |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | pageSize: 100, |
| | | pageSizes: [10, 30, 50, 100, 200], |
| | | }, |
| | | pageSize: "100", |
| | |
| | | methods: { |
| | | nodeClickLists(val){ |
| | | this.nodeClickList=val; |
| | | // 点击树节点时重置当前页和页数 |
| | | this.page.pageSize = 100; |
| | | this.page.currentPage = 1; |
| | | // 重置保存的高级查询查询条件和快速查询条件 |
| | | const childComponent = this.$refs.vciMasterCrud; |
| | | childComponent.conditionMap = {}; // 修改子组件的data中的属性 |
| | | }, |
| | | TreeValueEmit(val) { |
| | | this.TreeValue = val; |
| | |
| | | }, |
| | | nodeClickTem(val) { |
| | | this.templateOid = val; |
| | | |
| | | }, |
| | | tableHeadBttoms(val) { |
| | | this.masterVrBtnList = val; |
| | |
| | | cursor: default !important; |
| | | } |
| | | |
| | | ::v-deep(.el-transfer-panel__list) { |
| | | ::v-deep{ |
| | | .el-transfer-panel__list { |
| | | width: 100%; |
| | | height: 370px; |
| | | } |
| | | |
| | | ::v-deep(.el-transfer-panel__body) { |
| | | .el-transfer-panel__body { |
| | | height: 370px; |
| | | } |
| | | |
| | | ::v-deep(.el-input) { |
| | | .el-input { |
| | | width: auto; |
| | | } |
| | | |
| | | ::v-deep(.el-transfer-panel) { |
| | | .el-transfer-panel { |
| | | width: 270px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | ::v-deep(.avue-crud .el-select) { |
| | | ::v-deep{ |
| | | .avue-crud .el-select { |
| | | width: 100px !important; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <!-- 新增右侧按钮--> |
| | | <div> |
| | | <div v-loading="loading"> |
| | | <div style=" display: flex; justify-content: flex-end;"> |
| | | <el-button plain type="primary" @click="addHandler">配置</el-button> |
| | | </div> |
| | | <!-- 新增对话框--> |
| | | <el-dialog |
| | | :visible.sync="addVisible" |
| | | append-to-body |
| | | class="avue-dialog avue-dialog--top" |
| | | title="配置数据统计分析" |
| | | top="-50px" |
| | | > |
| | | <el-table |
| | | ref="table" |
| | | :data="tableData" |
| | | border |
| | | style="width: 100%" |
| | | @selection-change="selectChange" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="主数据库名" |
| | | prop="menuName" |
| | | width="300"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="类型" |
| | | prop="codeType"> |
| | | <el-dialog :visible.sync="addVisible" append-to-body class="avue-dialog avue-dialog--top" title="配置数据统计分析" |
| | | top="-50px"> |
| | | <el-table ref="table" :data="tableData" border style="width: 100%" @selection-change="selectChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column align="center" label="主数据库名" prop="menuName" width="300"></el-table-column> |
| | | <el-table-column align="center" label="类型" prop="codeType"> |
| | | <template slot-scope="{ row }"> |
| | | <el-select v-model="row.codeType" :multiple="true" limit="4" placeholder="请选择图表类型" style="width: 400px"> |
| | | <el-option v-for="(item) in selectList" :label="item.label" :value="item.value"></el-option> |
| | |
| | | </el-dialog> |
| | | <!-- echarts组件--> |
| | | <div style="margin-top: 15px;padding-bottom: 35px"> |
| | | <lineChart v-for="(item,index) in lineList" :key="index" :chartName="item.menuName" |
| | | :lineData="item.menuData"></lineChart> |
| | | <pieChart v-for="(item,index) in pieList" :key="index" :chartName="item.menuName" |
| | | :pieData="item.menuData"></pieChart> |
| | | <ColumnarChart v-for="(item,index) in columnarList" :key="index" :chartName="item.menuName" |
| | | :columnarData="item.menuData"></ColumnarChart> |
| | | <mixCart v-for="(item,index) in mixList" :key="index" :chartName="item.menuName" |
| | | :mixData="item.menuData"></mixCart> |
| | | <lineChart |
| | | v-for="(item,index) in lineList" |
| | | :key="index" |
| | | :btmname="item.btmname" |
| | | :chartName="item.menuName" |
| | | :lineData="item.menuData" |
| | | @refresh="getEcharts"> |
| | | </lineChart> |
| | | <pieChart |
| | | v-for="(item,index) in pieList" |
| | | :key="index" |
| | | :btmname="item.btmname" |
| | | :chartName="item.menuName" |
| | | :pieData="item.menuData" |
| | | @refresh="getEcharts"></pieChart> |
| | | <ColumnarChart |
| | | v-for="(item,index) in columnarList" |
| | | :key="index" |
| | | :btmname="item.btmname" |
| | | :chartName="item.menuName" |
| | | :columnarData="item.menuData" |
| | | @refresh="getEcharts"></ColumnarChart> |
| | | <mixCart |
| | | v-for="(item,index) in mixList" |
| | | :key="index" |
| | | :btmname="item.btmname" |
| | | :chartName="item.menuName" |
| | | :mixData="item.menuData" |
| | | @refresh="getEcharts"></mixCart> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import pieChart from "../../components/StatisticsComponent/pieChart" |
| | | import ColumnarChart from "../../components/StatisticsComponent/ColumnarChart" |
| | | import mixCart from "../../components/StatisticsComponent/mixCart" |
| | | import {getStatisticAnalysis,getBtmAndChart,saveStatisticAnalysis} from "@/api/statistic/chart" |
| | | import {getStatisticAnalysis, getBtmAndChart, saveStatisticAnalysis, deleteChartId} from "@/api/statistic/chart" |
| | | import {getList} from "@/api/system/statistic"; |
| | | |
| | | export default { |
| | |
| | | name: "statisticPage", |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | selectValue: '', |
| | | selectList: [ |
| | | { |
| | |
| | | columnarList: [], |
| | | mixList: [], |
| | | selectData: [], |
| | | tableData: [] |
| | | tableData: [], |
| | | ResponseData: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.loading = true; |
| | | }, |
| | | mounted() { |
| | | this.getEcharts(); |
| | | this.getMasterList(); |
| | | this.getEcharts() |
| | | }, |
| | | methods: { |
| | | getMasterList() { |
| | |
| | | this.$message.error(error) |
| | | }) |
| | | }, |
| | | getEcharts(){ |
| | | getBtmAndChart().then(res=>{ |
| | | const btmNames = Object.keys(res.data.data).join(','); |
| | | console.log(btmNames); |
| | | if(btmNames){ |
| | | getStatisticAnalysis({btmNames}).then(item=>{ |
| | | console.log(item) |
| | | }) |
| | | //列表数据 |
| | | async getEcharts() { |
| | | try { |
| | | const firstResponse = await getBtmAndChart(); |
| | | this.ResponseData = await getBtmAndChart(); |
| | | this.loading = false; |
| | | const btmNames = Object.keys(firstResponse.data.data).join(','); |
| | | const btmValue = Object.values(firstResponse.data.data); |
| | | if (!btmNames) { |
| | | this.lineList = []; |
| | | this.pieList = []; |
| | | this.columnarList = []; |
| | | this.mixList = []; |
| | | return; |
| | | } |
| | | }) |
| | | for (const value of btmValue) { |
| | | if (value.includes('0')) { |
| | | await this.handleStatisticAnalysis('lineList', btmNames, firstResponse); |
| | | } else { |
| | | this.lineList = []; |
| | | } |
| | | if (value.includes('1')) { |
| | | await this.handleStatisticAnalysis('pieList', btmNames, firstResponse); |
| | | } else { |
| | | this.pieList = []; |
| | | } |
| | | if (value.includes('2')) { |
| | | await this.handleStatisticAnalysis('columnarList', btmNames, firstResponse); |
| | | } else { |
| | | this.columnarList = []; |
| | | } |
| | | if (value.includes('3')) { |
| | | await this.handleStatisticAnalysis('mixList', btmNames, firstResponse); |
| | | } else { |
| | | this.mixList = []; |
| | | } |
| | | } |
| | | } catch (error) { |
| | | this.loading = false; |
| | | console.error('Error:', error); |
| | | } |
| | | }, |
| | | async handleStatisticAnalysis(type, btmNames, firstResponse) { |
| | | const secondResponse = await getStatisticAnalysis({btmNames}); |
| | | const secondData = secondResponse.data.data; |
| | | const typeList = { |
| | | "0": "lineList", |
| | | "1": "pieList", |
| | | "2": "columnarList", |
| | | "3": "mixList" |
| | | }; |
| | | const firstData = firstResponse.data.data; |
| | | //Object.keys导致对象顺序不一致,使用sort排序与后端返回格式一致 |
| | | Object.keys(firstData).sort().forEach((key, index) => { |
| | | if (firstData[key]) { |
| | | const indexes = firstData[key].split(','); |
| | | for (const indexSec of indexes) { |
| | | const listType = typeList[indexSec]; |
| | | const list = secondData.map(record => { |
| | | return { |
| | | menuData: record.menuData, |
| | | menuName: record.menuName, |
| | | btmname: key |
| | | }; |
| | | }); |
| | | this[listType] = []; |
| | | this.$nextTick(() => { |
| | | list.forEach((i, j) => { |
| | | if (index === j) { |
| | | this[listType].push(i); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | //新增 |
| | | addHandler() { |
| | | this.addVisible = true; |
| | | // let checkedrow = [] |
| | | // this.tableData.forEach(item => { |
| | | // // item.codeType = []; |
| | | // Object.keys(this.ResponseData.data.data).forEach(k => { |
| | | // if (item.code === k) { |
| | | // Object.values(this.ResponseData.data.data).forEach(v => { |
| | | // // item.codeType.push(v); |
| | | // checkedrow.push(item) |
| | | // }) |
| | | // } |
| | | // }) |
| | | // }) |
| | | // this.$nextTick(() => { |
| | | // checkedrow.forEach(row => { |
| | | // // console.log(row) |
| | | // this.$refs.table.toggleRowSelection(row, true) // 回显 |
| | | // }) |
| | | // }) |
| | | }, |
| | | //取消 |
| | | escHandler() { |
| | |
| | | } |
| | | }) |
| | | saveStatisticAnalysis(newArray).then(res => { |
| | | this.menuList = res.data.data; |
| | | this.nextSave(); |
| | | // this.menuList = res.data.data; |
| | | this.getEcharts(); |
| | | this.$message.success('保存成功') |
| | | this.addVisible = false; |
| | | }).catch(error=>{ |
| | | this.$message.error(error) |
| | | }); |
| | |
| | | const dataKey = typeList[item.codeType]; |
| | | if (dataKey) { |
| | | this[dataKey].push(item); |
| | | this[dataKey].forEach(res => { |
| | | }) |
| | | hasValidData = true; |
| | | } |
| | | }); |
| | |
| | | }, |
| | | //表格多选 |
| | | selectChange(selection) { |
| | | console.log('selection', selection) |
| | | this.selectData = selection; |
| | | }, |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | } |
| | | } |
| | | |
| | | ::v-deep(.el-upload) { |
| | | ::v-deep { |
| | | .el-upload { |
| | | width: 100%; |
| | | height: 120px; |
| | | } |
| | | |
| | | ::v-deep(.el-upload-dragger) { |
| | | .el-upload-dragger { |
| | | width: 100%; |
| | | height: 120px; |
| | | } |
| | | |
| | | ::v-deep(.el-upload-dragger .el-icon-upload) { |
| | | .el-upload-dragger .el-icon-upload { |
| | | margin: 15px 0 16px; |
| | | } |
| | | } |
| | | |
| | | .el-tab-pane{ |
| | | height: 75vh; |
| | | overflow: auto; |
| | |
| | | * 数据 |
| | | */ |
| | | private Map<String,String> data = new HashMap<>(); |
| | | |
| | | /** |
| | | * 子表的业务类型 |
| | | */ |
| | |
| | | * 序列化 |
| | | */ |
| | | private static final long serialVersionUID = 5020487634341415429L; |
| | | |
| | | /** |
| | | * 分类的主键 |
| | | */ |
| | |
| | | */ |
| | | private String codeDelimit; |
| | | |
| | | /** |
| | | * 记录已回收的业务数据:JSON格式的 |
| | | */ |
| | | private String businessData; |
| | | |
| | | } |
| | |
| | | if(codeClassifies.isEmpty()){ |
| | | return ""; |
| | | } |
| | | String oids = codeClassifies.stream().map(CodeClassify::getOid).collect(Collectors.joining(",")); |
| | | String oids = codeClassifies.stream() |
| | | .map(CodeClassify::getOid) |
| | | .map(s -> "'" + s + "'") |
| | | .collect(Collectors.joining(","));; |
| | | return oids; |
| | | } |
| | | |
| | |
| | | throw new VciBaseException("更新数据出错,重试!"+r.getMsg()); |
| | | } |
| | | } |
| | | // 刚好顺序是一致的,所以直接按照codeallcode的顺序来拿业务数据 |
| | | int i = -1; |
| | | for (CodeAllCode codeCbo : codeCbos) { |
| | | codeCbo.setLcStatus(baseModelDTO.getLcStatus()); |
| | | // 如果是回收,就需要将业务数据存储到码值表中 |
| | | if(baseModelDTO.getLcStatus().equals(FrameWorkDefaultValueConstant.FRAMEWORK_RELEASE_TAKEBACK)){ |
| | | codeCbo.setBusinessData(JSON.toJSONString(baseModels.get(++i))); |
| | | } |
| | | } |
| | | codeAllCodeService.updateBatchById(codeCbos); |
| | | |
| | |
| | | } else { |
| | | Map<String, String> classifyDataMap = VciBaseUtil.objectToMapString(classifyVO); |
| | | String value = classifyDataMap.getOrDefault(attrVO.getClassifyInvokeAttr(), ""); |
| | | log.error("================================当前分类注入的value值为:==========================",value); |
| | | // log.error("================================当前分类注入的value值为:==========================",value); |
| | | cbo.setAttributeValue(attrId, value); |
| | | } |
| | | } catch (Throwable e) { |