Merge remote-tracking branch 'origin/master'
| | |
| | | <template v-for="item in slotColumnList" :slot="item.prop + ''"> |
| | | <vciWebRefer |
| | | v-if="item.type == 'refer'" :key="item.dataKey" |
| | | referType="master" |
| | | :data-key="item.dataKey" |
| | | :disabled="item.disabled" |
| | | :display="item.display" |
| | |
| | | List.forEach(item => { |
| | | let columnItem = { |
| | | label: item.title, |
| | | prop: item.queryField, |
| | | prop: item.field, |
| | | // type: this.columnType[item.type], |
| | | sortable: item.sort, |
| | | width: item.minWidth |
| | | width: item.minWidth, |
| | | query: item.queryField |
| | | }; |
| | | this.tableHeadFindData.push(Object.assign(item, columnItem)) |
| | | }) |
| | |
| | | }} |
| | | </el-button> |
| | | <span v-if="tableHeadFindData.length > 0"> |
| | | <el-select slot="prepend" v-model="keyWordFind" placeholder="请选择" size="small"> |
| | | <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> |
| | | :value="item.query"></el-option> |
| | | </el-select> |
| | | <el-input v-model="WupinFindValue" placeholder="请输入关键字按回车查询" |
| | | size="small" style="width: 180px; margin-left: 5px; margin-top: 10px" |
| | | <el-input v-if="!isTimeStatus" v-model="WupinFindValue" |
| | | placeholder="请输入关键字按回车查询" size="small" style="width: 180px; margin-left: 5px; margin-top: 10px" |
| | | @keyup.enter.native="tableFindInp"></el-input> |
| | | </span> |
| | | <span v-if="tableHeadFindData.length > 0 && isTimeStatus" class="block"> |
| | | <el-date-picker |
| | | v-model="dateValue" |
| | | placeholder="选择日期" |
| | | size="small" |
| | | style="margin-left: 5px" |
| | | type="date" |
| | | @change="dateChange"> |
| | | </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, |
| | |
| | | key: "oid", |
| | | label: "name", |
| | | }, |
| | | tableHeadFindDatas: [], |
| | | applyvisible: false, |
| | | amendvisible: false, |
| | | addvisible: false, |
| | |
| | | if (_index == 0) { |
| | | this.keyWordFind = record.queryField; |
| | | } |
| | | ; |
| | | // if(record.fieldType === "datetime"){ |
| | | // this.isTimeStatus = true; |
| | | // console.log(this.isTimeStatus) |
| | | // console.log(record) |
| | | // } |
| | | }) |
| | | this.tableHeadFindDatas = newval; |
| | | if (newval) { |
| | | this.CodeArray = []; |
| | | if (newval.find(item => item.prop === 'id')) { |
| | |
| | | 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 = {}; |
| | | // 存储查询条件,主要是为了点击页码时带上这个条件 |
| | | this.conditionMap["conditionMap[" + this.keyWordFind + "]"] = '*' + this.WupinFindValue + '*'; |
| | | console.log(this.conditionMap) |
| | | 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="danger" 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:{ |
| | |
| | | immediate:true, |
| | | handler(newval,oldval){ |
| | | if(newval && newval.length > 0){ |
| | | const minValues = newval[0].map(function (_, i) { |
| | | return Math.min.apply( |
| | | null, |
| | | newval.map(function (item) { |
| | | return item[i]; |
| | | }) |
| | | ); |
| | | }); |
| | | |
| | | let colors = ['#84C9E5', '#F68686']; |
| | | |
| | | const seriesData = []; |
| | | for (let i = 0; i < newval.length; i++) { |
| | | let curSeriesData = []; |
| | | for (let j = 0; j < newval[i].length; j++) { |
| | | let borderRadius = [0, 0, 0, 0]; |
| | | if (newval[i][j] === minValues[j]) { |
| | | borderRadius = [50, 50, 0, 0]; |
| | | } |
| | | curSeriesData.push({ |
| | | value: newval[i][j], |
| | | itemStyle: { |
| | | normal: { |
| | | // barBorderRadius: borderRadius, // 设置圆角 |
| | | color: colors[i], |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | let seriesName = (i === 0 ? "总量" : "新增") |
| | | seriesData.push({ |
| | | name: seriesName, |
| | | type: "bar", |
| | | stack: "总量", |
| | | barWidth: 60, |
| | | data: curSeriesData, |
| | | let seriesData = newval.map((data, index) => { |
| | | let name = index === 0 ? "总量" : "新增"; |
| | | return { |
| | | name: name, |
| | | type: 'bar', |
| | | data: data, |
| | | barWidth: '40%', |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | formatter: function (params) { |
| | | return params.value === 0 ? '' : params.value; // 值为 0 不显示,其他情况显示 |
| | | } |
| | | // formatter: function (params) { |
| | | // if (params.value !== 0) { |
| | | // return params.value; |
| | | // } else { |
| | | // return ''; |
| | | // } |
| | | // } |
| | | }, |
| | | emphasis: { |
| | | focus: "series", |
| | | }, |
| | | }; |
| | | }); |
| | | this.chartOptions.series=seriesData |
| | | } |
| | | this.chartOptions.series = seriesData; |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | delHandler() { |
| | | deleteChartId({ btmname: this.btmname, chartId: '2' }).then(res => { |
| | | this.$message.success(this.chartName+'柱状图,删除成功!') |
| | | 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="danger" 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.chartName+'折线图,删除成功!') |
| | | 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="danger" 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.chartName+'堆叠折线图,删除成功!') |
| | | 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="danger" 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.chartName+'饼状图,删除成功!') |
| | | this.$emit('refresh'); |
| | | }).catch(error=>{ |
| | | this.$message.error(error) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <div v-if="display"> |
| | | <vciWebReferTree :key="key" :data-key="key" ref="vciWebReferTree" v-if="refertype=='tree'" @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferTree> |
| | | <vciWebReferTable :key="key" :data-key="key" v-else-if="refertype=='table'" @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferTable> |
| | | <vciWebReferDefalut :key="key" :data-key="key" v-else @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferDefalut> |
| | | <vciWebReferTree |
| | | v-if="refertype=='tree'" |
| | | :key="key" ref="vciWebReferTree" |
| | | :data-key="key" |
| | | :disabled="disabled" |
| | | :referConfig="referConfig" |
| | | :text="text" |
| | | :title="title" |
| | | :value="value" |
| | | @setValue="setValue"> |
| | | </vciWebReferTree> |
| | | |
| | | <vciWebReferTable |
| | | v-else-if="refertype=='table'" |
| | | :key="key" :data-key="key" |
| | | :disabled="disabled" |
| | | :referConfig="referConfig" |
| | | :referType="referType" |
| | | :text="text" |
| | | :title="title" |
| | | :value="value" |
| | | @setValue="setValue"> |
| | | </vciWebReferTable> |
| | | |
| | | <vciWebReferDefalut |
| | | v-else |
| | | :key="key" |
| | | :data-key="key" |
| | | :disabled="disabled" |
| | | :referConfig="referConfig" |
| | | :referType="referType" |
| | | :text="text" :title="title" |
| | | :value="value" |
| | | @setValue="setValue"> |
| | | </vciWebReferDefalut> |
| | | |
| | | </div> |
| | | </template> |
| | |
| | | import vciWebReferTree from "./vciWebReferTree.vue"; |
| | | import vciWebReferTable from "./vciWebReferTable.vue"; |
| | | import vciWebReferDefalut from "./vciWebReferDefalut.vue"; |
| | | |
| | | export default { |
| | | name: "vciWebRefer", |
| | | props: ["referConfig","value","text","disabled","display",'key'], |
| | | props: ["referConfig", "value", "text", "disabled", "display", 'key', 'referType'], |
| | | components: {vciWebReferTree, vciWebReferTable, vciWebReferDefalut}, |
| | | data() { |
| | | return { |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :title="title" |
| | | v-dialogDrag append-to-body="true" |
| | | <el-dialog v-dialogDrag |
| | | :height="options.height|| 'auto'" :title="title" |
| | | :visible.sync="visible" |
| | | top="0" |
| | | class="avue-dialog avue-dialog--top" |
| | | :width="options.width|| '80%'" |
| | | :height="options.height|| 'auto'"> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | append-to-body="true" |
| | | class="avue-dialog avue-dialog--top" |
| | | top="0" |
| | | @close="dialogClose"> |
| | | <avue-crud ref="referDefalutCrud" |
| | | v-model="value" |
| | | ref="referDefalutCrud" |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | |
| | | </avue-crud> |
| | | <div class="avue-dialog__footer"> |
| | | <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div> |
| | | <el-button @click="visible=false">取 消</el-button> |
| | | <el-button @click="setValue" type="primary">确 定</el-button> |
| | | <el-button @click="escHandler">取 消</el-button> |
| | | <el-button type="primary" @click="setValue">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <avue-input v-model="text" :disabled="disabled" :readonly="true" :placeholder="title" @click="!disabled && (visible=true)" ></avue-input> |
| | | <avue-input v-model="text" :disabled="disabled" :placeholder="title" :readonly="true" |
| | | @click="!disabled && (visible=true)"></avue-input> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { validatenull } from "@/util/validate"; |
| | | import {getList,getLazyList,getTableDefinedUrl} from "@/api/refer/table"; |
| | | |
| | | export default { |
| | | name: "vciWebReferDefalut", |
| | | props:["referConfig","value","text","title","disabled"], |
| | | props: ["referConfig", "value", "text", "title", "disabled", "referType"], |
| | | data() { |
| | | return { |
| | | visible: false, |
| | |
| | | query: {}, |
| | | loading: false, |
| | | page: { |
| | | layout: this.referType === "master" ? "total,pager,prev, next,jumper" : "total,pager,prev, next,jumper,sizes", |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: this.referConfig.options.data?this.referConfig.options.data.length :0 |
| | |
| | | this.getParams(); |
| | | }, |
| | | mounted() { |
| | | if(this.referConfig.options.tableConfig.page){ |
| | | if (this.referConfig.options.tableConfig && this.referConfig.options.tableConfig.page) { |
| | | this.page.pageSize=this.referConfig.options.tableConfig.page.limit || this.referConfig.options.tableConfig.page.pageSize; |
| | | this.page.currentPage=this.referConfig.options.tableConfig.page.page || this.referConfig.options.tableConfig.page.currentPage; |
| | | }else if(!validatenull(this.referConfig.options.limit)){ |
| | | this.page.pageSize=this.referConfig.options.limit |
| | | }else if(!validatenull(this.referConfig.options.tableConfig.limit)){ |
| | | this.page.pageSize=this.referConfig.options.tableConfig.limit |
| | | this.page.pageSize = this.referConfig.options.limit; |
| | | } else if (this.referConfig.options.tableConfig && !validatenull(this.referConfig.options.tableConfig.limit)) { |
| | | this.page.pageSize = this.referConfig.options.tableConfig.limit; |
| | | } |
| | | }, |
| | | computed:{ |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | escHandler() { |
| | | this.visible = false; |
| | | this.$refs.referDefalutCrud.refreshTable() |
| | | }, |
| | | dialogClose() { |
| | | this.visible = false; |
| | | this.$refs.referDefalutCrud.refreshTable() |
| | | }, |
| | | getParams:function () { |
| | | var queryParams = {}; |
| | | if (this.options.extraParams) { |
| | |
| | | } |
| | | this.value=value.join(','); |
| | | this.text=text.join(',') |
| | | this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:mapFields}); |
| | | this.$emit("setValue", { |
| | | field: this.referConfig.field, |
| | | showField: this.referConfig.showField, |
| | | value: this.value, |
| | | text: this.text, |
| | | rawData: this.selectionList, |
| | | fieldMap: mapFields |
| | | }); |
| | | this.visible=false; |
| | | }, |
| | | searchReset() { |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :title="title" |
| | | v-dialogDrag append-to-body="true" |
| | | <el-dialog v-dialogDrag |
| | | :height="options.height|| 'auto'" :title="title" |
| | | :visible.sync="visible" |
| | | top="0" |
| | | class="avue-dialog avue-dialog--top" |
| | | :width="options.width|| '80%'" |
| | | :height="options.height|| 'auto'"> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | append-to-body="true" |
| | | class="avue-dialog avue-dialog--top" |
| | | top="0" |
| | | @close="dialogClose"> |
| | | <avue-crud ref="referCrud" |
| | | v-model="value" |
| | | ref="referCrud" |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | |
| | | </avue-crud> |
| | | <div class="avue-dialog__footer"> |
| | | <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }} </div> |
| | | <el-button @click="visible=false">取 消</el-button> |
| | | <el-button @click="setValue" type="primary">确 定</el-button> |
| | | <el-button @click="escHandler">取 消</el-button> |
| | | <el-button type="primary" @click="setValue">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <avue-input v-model="text" :disabled="disabled" :readonly="true" :placeholder="title" @click="!disabled && (visible=true)"></avue-input> |
| | | <avue-input v-model="text" :disabled="disabled" :placeholder="title" :readonly="true" |
| | | @click="!disabled && (visible=true)"></avue-input> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { validatenull } from "@/util/validate"; |
| | | import {getList,getLazyList,getTableDefinedUrl} from "@/api/refer/table"; |
| | | |
| | | export default { |
| | | name: "vciWebReferTable", |
| | | props:["referConfig","value","text","title","disabled"], |
| | | props: ["referConfig", "value", "text", "title", "disabled", "referType"], |
| | | data() { |
| | | return { |
| | | visible: false, |
| | |
| | | query: {}, |
| | | loading: false, |
| | | page: { |
| | | layout: this.referType === "master" ? "total,pager,prev, next,jumper" : "total,pager,prev, next,jumper,sizes", |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: this.referConfig.options.data?this.referConfig.options.data.length :0 |
| | |
| | | this.getParams(); |
| | | }, |
| | | mounted() { |
| | | if(this.referConfig.options.page){ |
| | | if (this.referConfig.options.tableConfig && this.referConfig.options.tableConfig.page) { |
| | | this.page.pageSize=this.referConfig.options.tableConfig.page.limit || this.referConfig.options.tableConfig.page.pageSize; |
| | | this.page.currentPage=this.referConfig.options.tableConfig.page.page || this.referConfig.options.tableConfig.page.currentPage; |
| | | }else if(!validatenull(this.referConfig.options.limit)){ |
| | | this.page.pageSize=this.referConfig.options.limit |
| | | }else if(!validatenull(this.referConfig.options.tableConfig.limit)){ |
| | | this.page.pageSize=this.referConfig.options.tableConfig.limit |
| | | this.page.pageSize = this.referConfig.options.limit; |
| | | } else if (this.referConfig.options.tableConfig && !validatenull(this.referConfig.options.tableConfig.limit)) { |
| | | this.page.pageSize = this.referConfig.options.tableConfig.limit; |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.referCrud.doLayout() |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | escHandler() { |
| | | this.visible = false; |
| | | this.$refs.referDefalutCrud.refreshTable() |
| | | }, |
| | | dialogClose() { |
| | | this.visible = false; |
| | | this.$refs.referDefalutCrud.refreshTable() |
| | | }, |
| | | getParams:function (){ |
| | | var queryParams = {}; |
| | | if(this.options.extraParams){ |
| | |
| | | |
| | | if(this.options.displayTable){ |
| | | //说明是使用平台的表格 |
| | | getTableDefinedUrl({btmType:(this.options.referBo||this.options.referType),code:this.options.displayTable,isMuti:this.isMuti},this.tableDefinedUrl).then(result => { |
| | | getTableDefinedUrl({ |
| | | btmType: (this.options.referBo || this.options.referType), |
| | | code: this.options.displayTable, |
| | | isMuti: this.isMuti |
| | | }, this.tableDefinedUrl).then(result => { |
| | | console.log('result',result) |
| | | if(result.success){ |
| | | var queryScheme = result.querySchema; |
| | |
| | | } |
| | | this.value=value.join(','); |
| | | this.text=text.join(',') |
| | | this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:mapFields}); |
| | | this.$emit("setValue", { |
| | | field: this.referConfig.field, |
| | | showField: this.referConfig.showField, |
| | | value: this.value, |
| | | text: this.text, |
| | | rawData: this.selectionList, |
| | | fieldMap: mapFields |
| | | }); |
| | | this.visible=false; |
| | | }, |
| | | searchReset() { |
| | |
| | | <template> |
| | | <avue-input-tree ref="referTree" :props="props" :disabled="disabled" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :checked="checked" |
| | | :leaf-only="referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="title" :dic="treeData"></avue-input-tree> |
| | | <avue-input-tree ref="referTree" |
| | | v-model="value" |
| | | :checked="checked" |
| | | :dic="treeData" |
| | | :disabled="disabled" |
| | | :lazy="lazy" |
| | | :leaf-only="referConfig.onlyLeaf" |
| | | :multiple="isMuti" |
| | | :node-click="nodeClick" |
| | | :placeholder="title" |
| | | :props="props" |
| | | :tree-load="treeLoad"></avue-input-tree> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | required: true, |
| | | label: '混淆字符转换', |
| | | prop:'confound', |
| | | labelWidth : 110, |
| | | search: false, |
| | | formslot:true, |
| | | display:true |
| | | } |
| | | ] |
| | | } |
| | |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" slot="confoundForm"> |
| | | <el-input placeholder="请输入混淆字符以逗号隔开" v-model="confoundValue"></el-input> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | |
| | | }, |
| | | selectionList: [], |
| | | option: option, |
| | | data: [] |
| | | data: [], |
| | | confoundValue:'' |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | <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 ref="table" :data="tableData" border style="width: 100%" @selection-change="selectChange" @row-click="rowHandlerClick"> |
| | | <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"> |
| | |
| | | <lineChart |
| | | v-for="(item,index) in lineList" |
| | | :key="index" |
| | | :btmname="item.btmname" |
| | | :chartName="item.menuName" |
| | | :lineData="item.menuData"></lineChart> |
| | | :lineData="item.menuData" |
| | | @refresh="getEcharts"> |
| | | </lineChart> |
| | | <pieChart |
| | | v-for="(item,index) in pieList" |
| | | :key="index" |
| | | :btmname="item.btmname" |
| | | :chartName="item.menuName" |
| | | :pieData="item.menuData"></pieChart> |
| | | :pieData="item.menuData" |
| | | @refresh="getEcharts"></pieChart> |
| | | <ColumnarChart |
| | | v-for="(item,index) in columnarList" |
| | | :key="index" |
| | | :btmname="item.btmname" |
| | | :chartName="item.menuName" |
| | | :columnarData="item.menuData"></ColumnarChart> |
| | | :columnarData="item.menuData" |
| | | @refresh="getEcharts"></ColumnarChart> |
| | | <mixCart |
| | | v-for="(item,index) in mixList" |
| | | :key="index" |
| | | :btmname="item.btmname" |
| | | :chartName="item.menuName" |
| | | :mixData="item.menuData"></mixCart> |
| | | :mixData="item.menuData" |
| | | @refresh="getEcharts"></mixCart> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | name: "statisticPage", |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | selectValue: '', |
| | | selectList: [ |
| | | { |
| | |
| | | columnarList: [], |
| | | mixList: [], |
| | | selectData: [], |
| | | tableData: [] |
| | | tableData: [], |
| | | ResponseData: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.getMasterList(); |
| | | this.loading = true; |
| | | }, |
| | | mounted() { |
| | | this.getEcharts(); |
| | | // deleteChartId({btmname:'zxssaac',chartId:'3'}).then(res=>{ |
| | | // console.log('res',res) |
| | | // }) |
| | | this.getMasterList(); |
| | | }, |
| | | methods: { |
| | | getMasterList() { |
| | |
| | | this.$message.error(error) |
| | | }) |
| | | }, |
| | | getEcharts() { |
| | | getBtmAndChart().then(firstResponse => { |
| | | console.log('btm', firstResponse) |
| | | //列表数据 |
| | | async getEcharts() { |
| | | try { |
| | | const firstResponse = await getBtmAndChart(); |
| | | const btmNames = Object.keys(firstResponse.data.data).join(','); |
| | | const firstData = firstResponse.data.data; |
| | | Object.keys(firstData).forEach((item,index) => { |
| | | let firstIndex = firstData[item].split(','); |
| | | console.log('firstIndex',firstIndex); |
| | | }); |
| | | if (btmNames) { |
| | | getStatisticAnalysis({btmNames}).then(secondResponse => { |
| | | console.log('getStatisticAnalysis', secondResponse) |
| | | }) |
| | | const btmValue = Object.values(firstResponse.data.data); |
| | | if (!btmNames) { |
| | | this.lineList = []; |
| | | this.pieList = []; |
| | | this.columnarList = []; |
| | | this.mixList = []; |
| | | this.loading = false; |
| | | return; |
| | | } |
| | | }) |
| | | const typeList = { |
| | | '0': 'lineList', |
| | | '1': 'pieList', |
| | | '2': 'columnarList', |
| | | '3': 'mixList' |
| | | }; |
| | | await this.handleStatisticAnalysis(btmNames, firstResponse); |
| | | this.loading = false; |
| | | } catch (error) { |
| | | this.loading = false; |
| | | console.error('Error:', error); |
| | | } |
| | | }, |
| | | async handleStatisticAnalysis(btmNames, firstResponse) { |
| | | const secondResponse = await getStatisticAnalysis({btmNames}); |
| | | const secondData = secondResponse.data.data; |
| | | const typeList = { |
| | | "0": "lineList", |
| | | "1": "pieList", |
| | | "2": "columnarList", |
| | | "3": "mixList" |
| | | }; |
| | | this.lineList = []; |
| | | this.pieList = []; |
| | | this.columnarList = []; |
| | | this.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.$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() { |
| | |
| | | this.$message.warning('请至少选择一条数据!'); |
| | | return; |
| | | } |
| | | let codeStatus = this.selectData.every(key => key.codeType) |
| | | let codeStatus = this.selectData.every(key => key.codeType.length > 0); |
| | | |
| | | if (!codeStatus) { |
| | | this.$message.warning("请检查已勾选数据类型是否为空!"); |
| | | return; |
| | | } |
| | | |
| | | const newArray = this.selectData.map(item => { |
| | | return { |
| | | btmname: item.code, |
| | |
| | | } |
| | | }) |
| | | 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) { |
| | | this.selectData = selection; |
| | | }, |
| | | rowHandlerClick(row){ |
| | | this.selectData = row; |
| | | this.$refs.table.toggleRowSelection(row); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | <version>3.0.1.RELEASE</version> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-compiler-plugin</artifactId> |
| | | <configuration> |
| | | <source>8</source> |
| | | <target>8</target> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | <properties> |
| | | <vciplt.version>2022.RELEASE</vciplt.version> |
| | | <old.spring.version>3.2.0.RELEASE</old.spring.version> |
| | |
| | | import java.awt.*; |
| | | import java.awt.event.ActionEvent; |
| | | import java.awt.event.ActionListener; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | public class TestIntegrateFrame { |
| | | public static JButton apply = new JButton(); |
| | | public static JTextField text = new JTextField(); |
| | | public static void main(String[] args) { |
| | | |
| | | List<Integer> list=new ArrayList<>(); |
| | | list.add(1); |
| | | list.add(5); |
| | | list.add(6); |
| | | list.add(3); |
| | | list.add(2); |
| | | list.add(4); |
| | | List<Integer> classifyVOS =list.stream().sorted(((o1, o2) -> o2.compareTo(o1))).collect(Collectors.toList()); |
| | | int level=1; |
| | | int tt=1; |
| | | if (classifyVOS.size() >= level && level > 0) { |
| | | tt = classifyVOS.get(level - 1); |
| | | } |
| | | |
| | | |
| | | final JFrame j = new JFrame(); |
| | | j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
| | | JPanel p = new JPanel(); |
| | |
| | | apply.addActionListener(new ActionListener() { |
| | | |
| | | public void actionPerformed(ActionEvent e) { |
| | | |
| | | |
| | | |
| | | |
| | | Map<String, String> map = new HashMap<String, String>(); |
| | | // map.put("原材料替换件", "YUANCAILIAOTIHUANJIAN"); |
| | | // map.put("原材料部件", "1"); |
| | |
| | | if(i>nowmonth){ |
| | | monthCount.add(0); |
| | | month.add(0); |
| | | continue; |
| | | } |
| | | //当前月份之前之和 |
| | | Integer count = 0; |
| | |
| | | //cboOidMap.put("id", QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0])) + ")"); |
| | | String tableName =""; |
| | | try { |
| | | R<BtmTypeVO> r = btmTypeClient.getAllAttributeByBtmId(templateVO.getBtmTypeId()); |
| | | R<BtmTypeVO> r = btmTypeClient.getAllAttributeByBtmId(codeClassifyVO.getBtmTypeId()); |
| | | if(!r.isSuccess()) { |
| | | throw new Throwable(r.getMsg()); |
| | | } |
| | |
| | | cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription())?"":orderDTO.getDescription()); |
| | | cbo.setName(orderDTO.getName()); |
| | | try { |
| | | cbo.setAttributeValueWithNoCheck("description", orderDTO.getDescription()); |
| | | //主要处理大小写问题,将data里面的数据的key都转为小写 |
| | | HashMap<String,String> lowerData = new HashMap<>(); |
| | | Iterator<Map.Entry<String, String>> iterator = cbo.getData().entrySet().iterator(); |
| | | while (iterator.hasNext()){ |
| | | Map.Entry<String, String> next = iterator.next(); |
| | | lowerData.put(next.getKey().toLowerCase(Locale.ROOT),next.getValue()); |
| | | } |
| | | cbo.getData().clear(); |
| | | cbo.getData().putAll(lowerData); |
| | | cbo.setAttributeValueWithNoCheck("description", (StringUtil.isNotBlank(orderDTO.getData() |
| | | .get("description")) ? orderDTO.getData().get("description") : orderDTO.getDescription() )); |
| | | // cbo.setAttributeValue("name", orderDTO.getName()); |
| | | // if(finalIsProcess){//在流程中不允许更改 |
| | | // errorMap.put(code,errorMap.getOrDefault(code, errorMap.getOrDefault(code,"")+";数据"+code+"在流程中,不允许更改!")); |
| | |
| | | |
| | | List<CodeAllCode>newCodeAllCodeList= codeAllCodeService.selectByWrapper(Wrappers.<CodeAllCode>query().lambda().eq(CodeAllCode::getCreateCodeOid, cbo.getOid())); |
| | | if (!CollectionUtils.isEmpty(newCodeAllCodeList)) { |
| | | CodeAllCode codeCbo = codeAllCodeList.get(0); |
| | | CodeAllCode codeCbo = newCodeAllCodeList.get(0); |
| | | log.info("codeCbos code:" + codeCbo.getId()); |
| | | codeCbo.setLcStatus(status); |
| | | codeAllCodeList.add(codeCbo); |
| | |
| | | engineService.updateBatchByBaseModel(classifyFullInfo.getTopClassifyVO().getBtmTypeId(),updateList); |
| | | codeAllCodeService.saveOrUpdateBatch(codeAllCodeList); |
| | | if(deleteList.size()>0) { |
| | | commonsMapper.deleteByTaleAndOid(tableName, VciBaseUtil.array2String(deleteList.toArray(new String[]{}))); |
| | | commonsMapper.deleteByTaleAndOid(tableName, VciBaseUtil.toInSql(deleteList.toArray(new String[]{}))); |
| | | } |
| | | //是否调用集团接口申请接口 |
| | | if(isCodeOrGroupCode){ |
| | |
| | | xmlResultDataObjectDetailDO.setCode(""); |
| | | xmlResultDataObjectDetailDO.setId(applyDataVO.getId()); |
| | | xmlResultDataObjectDetailDO.setErrorid(objerrorCode); |
| | | xmlResultDataObjectDetailDO.setMsg("编码申请失败:" + e.getMessage()); |
| | | xmlResultDataObjectDetailDO.setMsg("编码维护失败:" + e.getMessage()); |
| | | resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO); |
| | | }); |
| | | }else{ |
| | |
| | | xmlResultDataObjectDetailDO.setCode(""); |
| | | xmlResultDataObjectDetailDO.setId(""); |
| | | xmlResultDataObjectDetailDO.setErrorid(objerrorCode); |
| | | xmlResultDataObjectDetailDO.setMsg("编码申请失败:" + e.getMessage()); |
| | | xmlResultDataObjectDetailDO.setMsg("编码维护失败:" + e.getMessage()); |
| | | resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO); |
| | | } |
| | | e.printStackTrace(); |