Merge remote-tracking branch 'origin/master'
| | |
| | | <el-radio :label="1">å
¨é¨</el-radio> |
| | | <el-radio :label="2">页ç </el-radio> |
| | | </el-radio-group> |
| | | <span v-if="radio === 2" style="margin-left: 20px;"><el-input v-model="pageExport" |
| | | style="width: 150px"></el-input> ï¼è¾å
¥é¡µç æè
页é¢èå´ï¼å¦ï¼1-10ï¼</span> |
| | | <span v-if="radio === 2" style="margin-left: 20px;color: #F56C6C; "> |
| | | <el-input v-model="pageExport" style="width: 150px"></el-input> ï¼è¾å
¥é¡µç æè
页é¢èå´ï¼å¦ï¼1-10ï¼</span> |
| | | </div> |
| | | </div> |
| | | <div style="text-align: center"> |
| | | <div v-loading="isLoading" style="text-align: center"> |
| | | <el-transfer |
| | | v-model="value" |
| | | :data="data" |
| | |
| | | pageExport: "", |
| | | data: [], |
| | | value: [], |
| | | isLoading: false, |
| | | filterMethod(query, item) { |
| | | return item.label.indexOf(query) > -1; |
| | | }, |
| | |
| | | if (this.selectRow.length <= 0) { |
| | | this.$message.warning('è¯·éæ©è¦å¯¼åºç模æ¿') |
| | | } else { |
| | | this.isLoading = true; |
| | | //已鿩å¤é |
| | | const selectList = [] |
| | | //已鿩屿§ |
| | |
| | | }).then(res => { |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | this.isLoading = false; |
| | | }).catch(error => { |
| | | this.isLoading = false; |
| | | }) |
| | | } else { |
| | | |
| | |
| | | // console.log('res',res) |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | |
| | | this.isLoading = false; |
| | | }).catch(error => { |
| | | this.isLoading = false; |
| | | }) |
| | | |
| | | } |
| | | } |
| | | } else if (this.radio === 1) { |
| | | this.isLoading = true; |
| | | if (this.value <= 0) { |
| | | this.tableHeadData.map(item => item.prop) |
| | | .forEach((prop, index) => { |
| | |
| | | if (res) { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.escHandler(); |
| | | this.isLoading = false; |
| | | } |
| | | }).catch(error => { |
| | | this.isLoading = false; |
| | | }) |
| | | } else { |
| | | exportCode({codeClassifyOid: this.codeClassifyOid, ...this.exportArr, limit: -1}).then(res => { |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | this.isLoading = false; |
| | | }).catch(error => { |
| | | this.isLoading = false; |
| | | }) |
| | | } |
| | | } else if (this.radio === 2) { |
| | |
| | | } |
| | | } |
| | | if (this.value >= 1) { |
| | | this.isLoading = true; |
| | | exportCode({ |
| | | codeClassifyOid: this.codeClassifyOid, ...this.exportArr, |
| | | limit: this.limit, |
| | |
| | | // console.log('res',res) |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | |
| | | this.isLoading = false; |
| | | }).catch(error => { |
| | | this.isLoading = false; |
| | | }); |
| | | } else { |
| | | this.isLoading = true; |
| | | this.tableHeadData.map(item => item.prop) |
| | | .forEach((prop, index) => { |
| | | this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop; |
| | |
| | | page: start, |
| | | endPage: end |
| | | }).then(res => { |
| | | // console.log('res', res) |
| | | this.isLoading = false; |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | }) |
| | | }).catch(error => { |
| | | this.isLoading = false; |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | |
| | | <el-table-column v-if="tableData.length != 0" fixed label="åºå·" type="index" width="55"> |
| | | </el-table-column> |
| | | <!-- çå½å¨æ--> |
| | | <!-- <el-table-column v-for="(item,index) in lcstatusArray"--> |
| | | <!-- v-if=" lcstatusArray.length >= 0 && !item.hidden"--> |
| | | <!-- key="index" :show-overflow-tooltip="true" :sortable="item.sortable"--> |
| | | <!-- :width="item.width" align="center" label="çå½å¨æå¼"--> |
| | | <!-- prop="lcstatus">--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <span>{{ scope.row.lcstatus_text }}</span>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column v-for="(item,index) in lcstatusArray"--> |
| | | <!-- v-if=" lcstatusArray.length >= 0 && !item.hidden"--> |
| | | <!-- key="index" :show-overflow-tooltip="true" :sortable="item.sortable"--> |
| | | <!-- :width="item.width" align="center" label="çå½å¨æå¼"--> |
| | | <!-- prop="lcstatus">--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <span>{{ scope.row.lcstatus_text }}</span>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- ç¼å·--> |
| | | <el-table-column v-for="(item, index) in CodeArray" v-if="CodeArray.length !== 0 && !item.hidden" |
| | | key="index" :label="item.label" :prop="item.prop" |
| | |
| | | }, |
| | | // ä¸»æ°æ®æé® |
| | | masterVrBtnList: [], |
| | | fileOptions:{}, |
| | | fileOptions: {}, |
| | | result: '', |
| | | elapsedTime: '', |
| | | }; |
| | |
| | | this.tableData = newval; |
| | | this.searchResults = newval |
| | | this.doLayout(); |
| | | this.fileOptions= { |
| | | this.fileOptions = { |
| | | ownbizOid: "0", |
| | | ownbizBtm: "0", |
| | | fileDocClassify: '!=processAuditSuggest', |
| | |
| | | templateOid: { |
| | | handler(newval, oldval) { |
| | | this.fileOptions.ownbizOid = "0"; |
| | | this.statusSelect = 'all' |
| | | }, |
| | | deep: true, |
| | | }, |
| | |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('ä¸è½½æåï¼è¯·æ¥çï¼'); |
| | | this.isLoading = false; |
| | | }).catch(error=>{ |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | }); |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | // æåº |
| | | sortChange(val) { |
| | | // console.log(val) |
| | | this.isLoading = true; |
| | | let order = ""; |
| | | if (val.order == "ascending") { |
| | | order = "asc"; |
| | | } else { |
| | | order = "desc"; |
| | | async sortChange(val) { |
| | | try { |
| | | this.isLoading = true; |
| | | const order = val.order == 'ascending' ? 'asc' : 'desc'; |
| | | const {data} = await TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | order: order, |
| | | sort: val.prop, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | }); |
| | | this.data = data.data; |
| | | } finally { |
| | | this.isLoading = false; |
| | | } |
| | | TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | order: order, |
| | | sort: val.prop, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | }).then((res) => { |
| | | setTimeout(() => { |
| | | this.data = res.data.data; |
| | | this.isLoading = false; |
| | | }, 100); |
| | | }); |
| | | }, |
| | | //å页巿° |
| | | async onLoad(val) { |
| | | await TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | }).then((res) => { |
| | | this.isLoading = true; |
| | | |
| | | try { |
| | | let conditionMap = {}; |
| | | if (this.statusSelect !== 'all') { |
| | | conditionMap.lcstatus = this.statusSelect; |
| | | } |
| | | const res = await TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | conditionMap |
| | | }); |
| | | this.tableData = res.data.data; |
| | | this.doLayout() |
| | | }); |
| | | this.doLayout(); |
| | | } catch (error) { |
| | | this.$message.error(error) |
| | | } finally { |
| | | this.isLoading = false; |
| | | } |
| | | }, |
| | | //å¤é |
| | | handleSelectionChange(list) { |
| | |
| | | this.findvisible = true; |
| | | }, |
| | | // é«çº§æ¥è¯¢ |
| | | echoContion(val) { |
| | | FindData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | ...val, |
| | | }).then((res) => { |
| | | async echoContion(val) { |
| | | try { |
| | | const res = await FindData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | ...val, |
| | | }); |
| | | this.tableData = res.data.data; |
| | | this.page.total = res.data.total |
| | | }); |
| | | } catch (error) { |
| | | |
| | | } |
| | | }, |
| | | //ç¸ä¼¼é¡¹æ¥è¯¢ |
| | | similarHandler() { |
| | |
| | | //è¾å
¥å车æç´¢ |
| | | tableFindInp() { |
| | | this.isLoading = true; |
| | | TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | ['conditionMap[' + this.keyWordFind + ']']: '*' + this.WupinFindValue + '*' |
| | | }).then(res => { |
| | | this.tableData = res.data.data; |
| | | this.page.total = res.data.total; |
| | | try { |
| | | TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | ['conditionMap[' + this.keyWordFind + ']']: '*' + this.WupinFindValue + '*' |
| | | }).then(res => { |
| | | this.tableData = res.data.data; |
| | | this.page.total = res.data.total; |
| | | }) |
| | | } finally { |
| | | this.isLoading = false; |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | ); |
| | | }); |
| | | |
| | | let colors = ['#2eadd6', '#FFA500']; |
| | | let colors = ['#84C9E5', '#F68686']; |
| | | |
| | | const seriesData = []; |
| | | for (let i = 0; i < newval.length; i++) { |
| | |
| | | data() { |
| | | return { |
| | | chartOptions: { |
| | | color:["#91CC75", "#5470C6"], |
| | | color:['#84C9E5', '#F68686'], |
| | | title: { |
| | | text: "", |
| | | }, |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import 'echarts' |
| | | import echarts from'echarts' |
| | | import 'echarts/lib/chart/line' |
| | | import 'echarts/lib/chart/pie' |
| | | import 'echarts/lib/chart/bar' |
| | | import 'echarts/lib/component/tooltip' |
| | | import 'echarts/lib/component/title' |
| | | import 'echarts/lib/component/legend' |
| | | |
| | | export default { |
| | | name: "mixCart", |
| | | name: "stackedAreaChart", |
| | | props: { |
| | | mixData: { |
| | | type: Array, |
| | |
| | | data() { |
| | | return { |
| | | chartOptions: { |
| | | color: ['#84C9E5', '#F68686'], |
| | | title: { |
| | | text: "", |
| | | text: '', |
| | | }, |
| | | grid: { |
| | | left: "3%", |
| | |
| | | tooltip: { |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: "shadow", |
| | | }, |
| | | type: "cross" |
| | | } |
| | | }, |
| | | legend: { |
| | | data: ["æ»é", "æ°å¢"], |
| | | left: "center", |
| | | textStyle: { |
| | | fontSize: 14 // è°æ´åä½å¤§å° |
| | | } |
| | | data: ['æ»é', 'æ°å¢'] |
| | | }, |
| | | xAxis: { |
| | | type: "category", |
| | | boundaryGap: false, |
| | | data: [ |
| | | "䏿", |
| | | "äºæ", |
| | |
| | | yAxis: { |
| | | type: "value", |
| | | }, |
| | | series: [], |
| | | }, |
| | | series: [ |
| | | |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | immediate: true, |
| | | handler(newval, oldval) { |
| | | if (newval) { |
| | | const colors = ["#2eadd6", "#db3c3c"]; |
| | | |
| | | const seriesData = newval.map((data, index) => ({ |
| | | name: index === 0 ? "æ»é" : "æ°å¢", |
| | | type: index === 0 ? "bar" : "line", |
| | | stack: index === 0 ? "æ»é" : null, |
| | | data: data.map(value => ({value})), |
| | | barWidth: 68, |
| | | label: { |
| | | show: true, |
| | | position: "top" |
| | | }, |
| | | itemStyle: { |
| | | color: colors[index] |
| | | const series = newval.map((data, index) => ({ |
| | | name: index === 0 ? 'æ»é' : 'æ°å¢', |
| | | type: 'line', |
| | | showSymbol: false,//æ¯å¦æ¾ç¤ºæçº¿ä¸çæ è®°ç¹ |
| | | smooth: true,//å¹³æ»åº¦ |
| | | areaStyle: { |
| | | opacity: 1, //éæåº¦ |
| | | }, |
| | | emphasis: { |
| | | focus: "series" |
| | | } |
| | | focus: 'series' |
| | | }, |
| | | stack: index === 0 ? 'æ»é' : 'æ°å¢', // æ ¹æ® index åºåæ»éåæ°å¢çå å æ
åµ |
| | | data: data.map(value => ({value})), |
| | | label: { |
| | | show: true, |
| | | position: 'top' |
| | | }, |
| | | })); |
| | | |
| | | this.chartOptions.series = seriesData; |
| | | this.chartOptions.series = series; |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | chartName:{ |
| | | handler(newval,oldval){ |
| | | if(newval){ |
| | | chartName: { |
| | | handler(newval, oldval) { |
| | | if (newval) { |
| | | this.chartOptions.title.text = newval + "æ°æ®ç»è®¡" |
| | | } |
| | | }, |
| | | immediate:true, |
| | | deep:true |
| | | immediate: true, |
| | | deep: true |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | style="height: calc(100vh - 290px)" |
| | | @node-click="nodeClick" |
| | | > |
| | | <template slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark" |
| | | open-delay="500" |
| | | placement="right-start"> |
| | | <span style="font-size: 14px;"> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </el-tooltip> |
| | | </template> |
| | | </avue-tree> |
| | | </div> |
| | | |
| | |
| | | <template> |
| | | <el-container> |
| | | <!-- <el-header class="businessHeader" style="height: 40px;padding:0 8px">--> |
| | | <!-- <el-header class="businessHeader" style="height: 40px;padding:0 8px">--> |
| | | |
| | | <!-- </el-header>--> |
| | | <!-- </el-header>--> |
| | | <el-container> |
| | | <el-aside style="width: 20%"> |
| | | <basic-container class="businessTreeContainer"> |
| | | <div class="app"> |
| | | <div style="display: flex;margin-bottom: 10px;justify-content: space-around;"> |
| | | <el-button v-if="permissionList.addBtn" size="mini" type="primary" @click="businessAdd" plain style="width: 60px"> |
| | | <el-button v-if="permissionList.addBtn" plain size="mini" style="width: 60px" type="primary" |
| | | @click="businessAdd"> |
| | | æ°å¢ |
| | | </el-button> |
| | | <el-button v-if="permissionList.editBtn" size="mini" type="primary" @click="businessEdit" plain style="width: 60px"> |
| | | <el-button v-if="permissionList.editBtn" plain size="mini" style="width: 60px" type="primary" |
| | | @click="businessEdit"> |
| | | ä¿®æ¹ |
| | | </el-button> |
| | | <el-button v-if="permissionList.table" size="mini" type="primary" |
| | | @click="selectFromTable" plain> ä»å·²æä¸è·å |
| | | <el-button v-if="permissionList.table" plain size="mini" |
| | | type="primary" @click="selectFromTable"> ä»å·²æä¸è·å |
| | | </el-button> |
| | | </div> |
| | | <avue-tree :data="treeData" :option="treeOption" class="businessTree" @node-click="nodeClick" style="width: fit-content;"> |
| | | <template slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span> |
| | | <avue-tree :data="treeData" :option="treeOption" class="businessTree" style="height: 70.3vh" |
| | | @node-click="nodeClick"> |
| | | <template slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark" |
| | | open-delay="250" |
| | | placement="right-start"> |
| | | <span> |
| | | <i :class="(node || {}).level === 2 ? 'el-icon-star-off' : 'el-icon-folder-opened'"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </template> |
| | | </el-tooltip> |
| | | </template> |
| | | </avue-tree> |
| | | </div> |
| | | |
| | |
| | | </template> |
| | | {{ obj.lifeCycleName ? obj.lifeCycleName + '(' + obj.lifeCycleId + ')' : '' }} |
| | | </el-descriptions-item> |
| | | <!-- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"--> |
| | | <!-- :labelStyle="descriptionOption.labelStyle">--> |
| | | <!-- <template slot="label">--> |
| | | <!-- <i :class="icons.view"></i>--> |
| | | <!-- è§å¾--> |
| | | <!-- </template>--> |
| | | <!-- <el-tag v-if="obj.viewText" size="small">--> |
| | | <!-- {{ obj.viewText }}--> |
| | | <!-- </el-tag>--> |
| | | <!-- <span v-else></span>--> |
| | | <!-- </el-descriptions-item>--> |
| | | <!-- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"--> |
| | | <!-- :labelStyle="descriptionOption.labelStyle">--> |
| | | <!-- <template slot="label">--> |
| | | <!-- <i :class="icons.view"></i>--> |
| | | <!-- è§å¾--> |
| | | <!-- </template>--> |
| | | <!-- <el-tag v-if="obj.viewText" size="small">--> |
| | | <!-- {{ obj.viewText }}--> |
| | | <!-- </el-tag>--> |
| | | <!-- <span v-else></span>--> |
| | | <!-- </el-descriptions-item>--> |
| | | <!-- <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i class="el-icon-arrow-down"></i> |
| | |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | | <el-dialog :visible="ref.visible" append-to-body title="仿°æ®åºä¸æ·»å " width="700px" @close="dialoghandelfalse" top="9vh"> |
| | | <el-dialog :visible="ref.visible" append-to-body title="仿°æ®åºä¸æ·»å " top="9vh" width="700px" |
| | | @close="dialoghandelfalse"> |
| | | éæ©é¢åï¼ |
| | | <el-select v-model="domain" placeholder="è¯·éæ©" size="small" @change="refOnLoad"> |
| | | <el-option v-for="item in domainOptions" :key="item.value" :label="item.label" :value="item.value"> |
| | |
| | | name: "Business", |
| | | data() { |
| | | return { |
| | | type:"", |
| | | type: "", |
| | | //çå½å¨æå¯¹è¯æ¡ç¶æ |
| | | packageLifeBox: false, |
| | | //çæ¬è§åç¶æ |
| | |
| | | btmType: {}, |
| | | }, |
| | | loadOption: { |
| | | height:'auto', |
| | | height: 'auto', |
| | | border: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | |
| | | |
| | | |
| | | .app { |
| | | overflow: auto; |
| | | overflow-y: auto; |
| | | height: 84.3vh; |
| | | } |
| | | |
| | | .app::-webkit-scrollbar { |
| | | height: 15px; // çºµåæ»å¨æ¡ å¿
å |
| | | background: white; |
| | | border: white; |
| | | width: 10px; |
| | | |
| | | } |
| | | |
| | | // æ»å¨æ¡çæ»å |
| | | .app::-webkit-scrollbar-thumb { |
| | | width: 10px; |
| | | height: 10px; |
| | | background-color: #ececec; |
| | | border-radius: 20px; |
| | | border: #ececec; |
| | | } |
| | | // |
| | | //.app::-webkit-scrollbar { |
| | | // height: 15px; // çºµåæ»å¨æ¡ å¿
å |
| | | // background: white; |
| | | // border: white; |
| | | // width: 10px; |
| | | // |
| | | //} |
| | | // |
| | | //// æ»å¨æ¡çæ»å |
| | | //.app::-webkit-scrollbar-thumb { |
| | | // width: 10px; |
| | | // height: 10px; |
| | | // background-color: #ececec; |
| | | // border-radius: 20px; |
| | | // border: #ececec; |
| | | //} |
| | | |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <el-container> |
| | | <!-- 顶端æé® --> |
| | | <el-container> |
| | | <!-- 顶端æé® --> |
| | | |
| | | <!-- ä¾§è¾¹æ æ --> |
| | | <el-container> |
| | | <el-aside style="width: 20%;"> |
| | | <basic-container class="businessTreeContainer"> |
| | | <div class="app"> |
| | | <div style="display: flex;margin-bottom: 10px;"> |
| | | <el-button type="primary" @click="linkTypeAdd" size="mini" v-if="permissionList.addBtn" plain> |
| | | æ°å¢ |
| | | </el-button> |
| | | <el-button type="primary" @click="linkTypeEdit" size="mini" v-if="permissionList.editBtn" plain> |
| | | ä¿®æ¹ |
| | | </el-button> |
| | | </div> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick" |
| | | class="businessTree"> |
| | | <template class="el-tree-node__label" slot-scope="{ node, data }"> |
| | | <span> |
| | | <!-- ä¾§è¾¹æ æ --> |
| | | <el-container> |
| | | <el-aside style="width: 20%;"> |
| | | <basic-container class="businessTreeContainer"> |
| | | <div class="app"> |
| | | <div style="display: flex;margin-bottom: 10px;"> |
| | | <el-button v-if="permissionList.addBtn" plain size="mini" type="primary" @click="linkTypeAdd"> |
| | | æ°å¢ |
| | | </el-button> |
| | | <el-button v-if="permissionList.editBtn" plain size="mini" type="primary" @click="linkTypeEdit"> |
| | | ä¿®æ¹ |
| | | </el-button> |
| | | </div> |
| | | <avue-tree :data="treeData" :option="treeOption" class="businessTree" |
| | | @node-click="nodeClick"> |
| | | <template slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | |
| | | <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark" |
| | | open-delay="250" |
| | | placement="bottom"> |
| | | <span> |
| | | <i class="el-icon-star-on"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </el-tooltip> |
| | | </template> |
| | | </avue-tree> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-container> |
| | | <el-main> |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">åºæ¬ä¿¡æ¯</p> |
| | | <el-descriptions :column="2" border class="margin-top" size="medium"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.id"></i> |
| | | è±æåç§° |
| | | </template> |
| | | {{ obj.id }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | 䏿åç§° |
| | | </template> |
| | | {{ obj.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.tableName"></i> |
| | | æ°æ®åºè¡¨å |
| | | </template> |
| | | {{ obj.tableName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.domain"></i> |
| | | æå±é¢å |
| | | </template> |
| | | <el-tag v-if="obj.domainText" size="small"> |
| | | {{ obj.domainText }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <el-descriptions :column="2" border class="margin-top" direction="vertical"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.from"></i> |
| | | From端类å |
| | | </template> |
| | | <span v-for="item in obj.fromBtmTypes" style="margin-left:2px;"> |
| | | <el-tag effect="plain" size="small" style="margin-top: 2px;"> |
| | | {{ item.id + 'ï¼' + item.name + 'ï¼' }} |
| | | </el-tag> |
| | | </span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.to"></i> |
| | | To段类å |
| | | </template> |
| | | <span v-for="item in obj.toBtmTypes" style="margin-left:2px"> |
| | | <el-tag effect="plain" size="small" style="margin-top: 2px;"> |
| | | {{ item.id + 'ï¼' + item.name + 'ï¼' }} |
| | | </el-tag> |
| | | </span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <el-descriptions :column="2" border class="margin-top" size="medium"> |
| | | <!-- |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.main"></i> |
| | | 主类å |
| | | </template> |
| | | </avue-tree> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-container> |
| | | <el-main> |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">åºæ¬ä¿¡æ¯</p> |
| | | <el-descriptions class="margin-top" :column="2" size="medium" border> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.id"></i> |
| | | è±æåç§° |
| | | </template> |
| | | {{ obj.id }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | 䏿åç§° |
| | | </template> |
| | | {{ obj.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.tableName"></i> |
| | | æ°æ®åºè¡¨å |
| | | </template> |
| | | {{ obj.tableName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.domain"></i> |
| | | æå±é¢å |
| | | </template> |
| | | <el-tag v-if="obj.domainText" size="small"> |
| | | {{ obj.domainText }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <el-descriptions class="margin-top" direction="vertical" :column="2" border> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.from"></i> |
| | | From端类å |
| | | </template> |
| | | <span v-for="item in obj.fromBtmTypes" style="margin-left:2px;"> |
| | | <el-tag size="small" effect="plain" style="margin-top: 2px;"> |
| | | {{ item.id + 'ï¼' + item.name + 'ï¼' }} |
| | | </el-tag> |
| | | </span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.to"></i> |
| | | To段类å |
| | | </template> |
| | | <span v-for="item in obj.toBtmTypes" style="margin-left:2px"> |
| | | <el-tag size="small" effect="plain" style="margin-top: 2px;"> |
| | | {{ item.id + 'ï¼' + item.name + 'ï¼' }} |
| | | </el-tag> |
| | | </span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <el-descriptions class="margin-top" :column="2" size="medium" border> |
| | | <!-- |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.main"></i> |
| | | 主类å |
| | | </template> |
| | | {{ obj.fromBtmTypeName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.main"></i> |
| | | 主类å |
| | | </template> |
| | | {{ obj.toBtmTypeName }} |
| | | </el-descriptions-item> |
| | | --> |
| | | <el-descriptions-item span='2' labelStyle="text-align:center;width:120px"> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | æè¿° |
| | | </template> |
| | | {{ obj.description }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </basic-container> |
| | | <!-- 屿§å表--> |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">屿§å表</p> |
| | | <avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption"> |
| | | <template slot="attrDataTypeText" slot-scope="{row}"> |
| | | <el-tag>{{ row.attrDataTypeText }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | <link-type-add ref="linkAdd" :linkType="addOption.linkType" :domainOption="domainOptions" :icons="icons" :linkStatus="linkStatus" |
| | | @refreshTable="initTreeOnLoad"> |
| | | </link-type-add> |
| | | |
| | | {{ obj.fromBtmTypeName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.main"></i> |
| | | 主类å |
| | | </template> |
| | | {{ obj.toBtmTypeName }} |
| | | </el-descriptions-item> |
| | | --> |
| | | <el-descriptions-item labelStyle="text-align:center;width:120px" span='2'> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | æè¿° |
| | | </template> |
| | | {{ obj.description }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </basic-container> |
| | | <!-- 屿§å表--> |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">屿§å表</p> |
| | | <avue-crud v-model="obj" :data="obj.attributes" :option="loadOption" class="attributeCrud"> |
| | | <template slot="attrDataTypeText" slot-scope="{row}"> |
| | | <el-tag>{{ row.attrDataTypeText }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | <link-type-add ref="linkAdd" :domainOption="domainOptions" :icons="icons" :linkStatus="linkStatus" |
| | | :linkType="addOption.linkType" |
| | | @refreshTable="initTreeOnLoad"> |
| | | </link-type-add> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | initTree, |
| | | refOnLoad, |
| | | getDomain, |
| | | saveFromTable, |
| | | getDetail |
| | | initTree, |
| | | refOnLoad, |
| | | getDomain, |
| | | saveFromTable, |
| | | getDetail |
| | | } from "@/api/omd/linkType" |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: "LinkType", |
| | | data() { |
| | | return { |
| | | linkStatus:'', |
| | | addOption: { |
| | | linkType: { |
| | | attributes:[] |
| | | }, |
| | | }, |
| | | domain: null, |
| | | domainOptions: [], |
| | | icons: { |
| | | id: 'el-icon-finished', |
| | | name: 'el-icon-tickets', |
| | | tableName: 'el-icon-date', |
| | | domain: 'el-icon-folder-opened', |
| | | from: 'el-icon-sort-down', |
| | | to: 'el-icon-sort-up', |
| | | main: 'el-icon-warning-outline', |
| | | desc: 'el-icon-chat-line-square' |
| | | }, |
| | | treeData: [], |
| | | descriptionOption: { |
| | | labelStyle: 'text-align:center;width:120px', |
| | | contentStyle: 'width:240px;text-align:center;word-break;break-all;' |
| | | }, |
| | | loadOption: { |
| | | border: true, |
| | | height: 'auto', |
| | | editBtn: false, |
| | | addBtn: false, |
| | | menu: false, |
| | | highlightCurrentRow: true, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | column: [ |
| | | { |
| | | label: 'è±æåç§°', |
| | | prop: 'id', |
| | | align: 'center' |
| | | }, { |
| | | label: '䏿åç§°', |
| | | prop: 'name', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | label: 'ç±»å', |
| | | prop: 'attrDataTypeText', |
| | | align: 'center', |
| | | slot: true |
| | | }, |
| | | { |
| | | label: 'é»è®¤å¼', |
| | | prop: 'defaultValue', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | label: '说æ', |
| | | prop: 'description', |
| | | align: 'center' |
| | | } |
| | | ] |
| | | }, |
| | | obj: {}, |
| | | treeOption: { |
| | | height:'auto', |
| | | defaultExpandAll: true, |
| | | title: '龿¥ç±»åæ ', |
| | | addBtn: false, |
| | | props: { |
| | | labelText: '', |
| | | label: 'label', |
| | | value: 'oid', |
| | | children: 'childList', |
| | | } |
| | | }, |
| | | name: "LinkType", |
| | | data() { |
| | | return { |
| | | linkStatus: '', |
| | | addOption: { |
| | | linkType: { |
| | | attributes: [] |
| | | }, |
| | | }, |
| | | domain: null, |
| | | domainOptions: [], |
| | | icons: { |
| | | id: 'el-icon-finished', |
| | | name: 'el-icon-tickets', |
| | | tableName: 'el-icon-date', |
| | | domain: 'el-icon-folder-opened', |
| | | from: 'el-icon-sort-down', |
| | | to: 'el-icon-sort-up', |
| | | main: 'el-icon-warning-outline', |
| | | desc: 'el-icon-chat-line-square' |
| | | }, |
| | | treeData: [], |
| | | descriptionOption: { |
| | | labelStyle: 'text-align:center;width:120px', |
| | | contentStyle: 'width:240px;text-align:center;word-break;break-all;' |
| | | }, |
| | | loadOption: { |
| | | border: true, |
| | | height: 'auto', |
| | | editBtn: false, |
| | | addBtn: false, |
| | | menu: false, |
| | | highlightCurrentRow: true, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | column: [ |
| | | { |
| | | label: 'è±æåç§°', |
| | | prop: 'id', |
| | | align: 'center' |
| | | }, { |
| | | label: '䏿åç§°', |
| | | prop: 'name', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | label: 'ç±»å', |
| | | prop: 'attrDataTypeText', |
| | | align: 'center', |
| | | slot: true |
| | | }, |
| | | { |
| | | label: 'é»è®¤å¼', |
| | | prop: 'defaultValue', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | label: '说æ', |
| | | prop: 'description', |
| | | align: 'center' |
| | | } |
| | | ] |
| | | }, |
| | | obj: {}, |
| | | treeOption: { |
| | | height: 'auto', |
| | | defaultExpandAll: true, |
| | | title: '龿¥ç±»åæ ', |
| | | addBtn: false, |
| | | props: { |
| | | labelText: '', |
| | | label: 'label', |
| | | value: 'oid', |
| | | children: 'childList', |
| | | } |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.modeling_LinkType.LinkType_add, false), |
| | | editBtn: this.vaildData(this.permission.modeling_LinkType.LinkType_edit, false), |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.initTreeOnLoad(); |
| | | this.initDomainOption(); |
| | | }, |
| | | |
| | | methods: { |
| | | // æ ç¹å» |
| | | nodeClick(data) { |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | }) |
| | | }, |
| | | // æ·»å æé®ç¹å»äºä»¶ |
| | | linkTypeAdd() { |
| | | this.$refs.linkAdd.linkType = {}; |
| | | this.linkStatus = 'add'; |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | }, |
| | | // ç¼è¾æé®ç¹å»äºä»¶ |
| | | linkTypeEdit() { |
| | | var linktype = this.obj; |
| | | linktype.fromBtmValues = this.obj.fromBtmTypes; |
| | | linktype.toBtmValues = this.obj.toBtmTypes; |
| | | linktype.attributes = this.obj.attributes; |
| | | var json = JSON.stringify(linktype); |
| | | this.addOption.linkType = JSON.parse(json); |
| | | this.$refs.linkAdd.linkType = this.addOption.linkType; |
| | | this.linkStatus = 'edit'; |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | }, |
| | | // ä»å·²æä¸è·åæé®ç¹å»äºä»¶ |
| | | selectFromTable() { |
| | | |
| | | }, |
| | | // å è½½æå¡æ |
| | | initTreeOnLoad() { |
| | | initTree().then(res => { |
| | | this.treeData = res.data.data; |
| | | }); |
| | | }, |
| | | // å è½½æå¡ä¸ææ¡ |
| | | initDomainOption() { |
| | | getDomain().then(res => { |
| | | this.domainOptions = res.data.data; |
| | | }) |
| | | }, |
| | | |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.modeling_LinkType.LinkType_add, false), |
| | | editBtn: this.vaildData(this.permission.modeling_LinkType.LinkType_edit, false), |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.initTreeOnLoad(); |
| | | this.initDomainOption(); |
| | | }, |
| | | |
| | | methods: { |
| | | // æ ç¹å» |
| | | nodeClick(data) { |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | }) |
| | | }, |
| | | // æ·»å æé®ç¹å»äºä»¶ |
| | | linkTypeAdd() { |
| | | this.$refs.linkAdd.linkType = {}; |
| | | this.linkStatus = 'add'; |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | }, |
| | | // ç¼è¾æé®ç¹å»äºä»¶ |
| | | linkTypeEdit() { |
| | | var linktype = this.obj; |
| | | linktype.fromBtmValues = this.obj.fromBtmTypes; |
| | | linktype.toBtmValues = this.obj.toBtmTypes; |
| | | linktype.attributes = this.obj.attributes; |
| | | var json = JSON.stringify(linktype); |
| | | this.addOption.linkType = JSON.parse(json); |
| | | this.$refs.linkAdd.linkType = this.addOption.linkType; |
| | | this.linkStatus = 'edit'; |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | }, |
| | | // ä»å·²æä¸è·åæé®ç¹å»äºä»¶ |
| | | selectFromTable() { |
| | | |
| | | }, |
| | | // å è½½æå¡æ |
| | | initTreeOnLoad() { |
| | | initTree().then(res => { |
| | | this.treeData = res.data.data; |
| | | }); |
| | | }, |
| | | // å è½½æå¡ä¸ææ¡ |
| | | initDomainOption() { |
| | | getDomain().then(res => { |
| | | this.domainOptions = res.data.data; |
| | | }) |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .attributeCrud>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | .attributeCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | |
| | | .app { |
| | | overflow: auto; |
| | | height: 84.3vh; |
| | |
| | | <el-option label="æçº¿å¾" value="0"></el-option> |
| | | <el-option label="饼ç¶å¾" value="1"></el-option> |
| | | <el-option label="æ±ç¶å¾" value="2"></el-option> |
| | | <el-option label="æ±ç¶æçº¿å¾" value="3"></el-option> |
| | | <el-option label="å å æçº¿å¾" value="3"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * ä¸»æ°æ®ç»è®¡å¯¹è±¡ |
| | | * @author yuxc |
| | | * @date 2023/12/13 11:13 |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @TableName("PL_SYS_STATISTIC_CONFIG") |
| | | public class StatisticConfig implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private Long id; |
| | | |
| | | /** |
| | | * ç¨æ·id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»å |
| | | */ |
| | | private String btmname; |
| | | |
| | | /** |
| | | * å¾å½¢ids |
| | | */ |
| | | private String chartIds; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | private Date createtime; |
| | | /** |
| | | * å建人 |
| | | */ |
| | | private String creator; |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | | */ |
| | | private Date lastmodifytime; |
| | | /** |
| | | * ä¿®æ¹äºº |
| | | */ |
| | | private String lastmodifier; |
| | | /** |
| | | * |
| | | */ |
| | | private Date ts; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.system.vo; |
| | | |
| | | import com.vci.ubcs.system.entity.MdmCountConfig; |
| | | import com.vci.ubcs.system.entity.StatisticConfig; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author ludc |
| | | * @date 2023/10/18 8:56 |
| | | */ |
| | | @Data |
| | | public class StatisticConfigVO extends StatisticConfig { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.system.controller; |
| | | |
| | | import com.vci.ubcs.system.entity.StatisticConfig; |
| | | import com.vci.ubcs.system.service.IMdmCountConfigService; |
| | | import com.vci.ubcs.system.service.IStatisticConfigService; |
| | | import com.vci.ubcs.system.vo.MdmCountConfigVO; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author yuxc |
| | | * @date 2023/12/13 15:47 |
| | | */ |
| | | @NonDS |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/statisticConfig") |
| | | //@Api(value = "åå
¸", tags = "åå
¸") |
| | | public class StatisticConfigController { |
| | | |
| | | private final IStatisticConfigService statisticConfigService; |
| | | |
| | | /** |
| | | * ç»è®¡åæä¿å |
| | | * @param statisticConfigs æ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @return æ°æ®è¿å |
| | | */ |
| | | @PostMapping("/saveStatisticAnalysis") |
| | | public R saveStatisticAnalysis(@RequestBody List<StatisticConfig> statisticConfigs){ |
| | | return statisticConfigService.saveStatisticConfig(statisticConfigs); |
| | | } |
| | | |
| | | /** |
| | | * ç»è®¡åæå é¤å¾å½¢ |
| | | * @param btmname ä¸å¡ç±»å |
| | | * @param chartId å¾å½¢ID |
| | | * @return æåä¸å¦ |
| | | */ |
| | | @PostMapping("/deleteChartId") |
| | | public R deleteChartId(String btmname,String chartId){ |
| | | return statisticConfigService.deleteChartId(btmname,chartId); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¨æ·é
ç½®çä¸å¡ç±»åä¸ç¸å
³çå¾å½¢ |
| | | * @return å¾å½¢æ°æ®ä¸ä¸å¡ç±»åID |
| | | */ |
| | | @GetMapping("/getBtmAndChartIds") |
| | | public R getBtmAndChartIds(){ |
| | | return statisticConfigService.getBtmAndChartIds(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.vci.ubcs.system.entity.StatisticConfig; |
| | | |
| | | /** |
| | | * @author ludc |
| | | * @date 2023/10/17 14:53 |
| | | */ |
| | | public interface StatisticConfigMapper extends BaseMapper<StatisticConfig> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.system.entity.StatisticConfig; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä¸»æ°æ®ç»è®¡é¦é¡µé
ç½®æå¡ |
| | | * @author ludc |
| | | * @date 2023/10/17 14:44 |
| | | */ |
| | | public interface IStatisticConfigService extends IService<StatisticConfig> { |
| | | |
| | | /** |
| | | * ç»è®¡åæä¿å |
| | | * @param statisticConfigs æ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @return æ°æ®è¿å |
| | | */ |
| | | R saveStatisticConfig(List<StatisticConfig> statisticConfigs); |
| | | |
| | | /** |
| | | * ç»è®¡åæå é¤å¾å½¢ |
| | | * @param btmname ä¸å¡ç±»å |
| | | * @param chartId å¾å½¢ID |
| | | * @return æåä¸å¦ |
| | | */ |
| | | R deleteChartId(String btmname, String chartId); |
| | | |
| | | /** |
| | | * è·åç¨æ·é
ç½®çä¸å¡ç±»åä¸ç¸å
³çå¾å½¢ |
| | | * @return å¾å½¢æ°æ®ä¸ä¸å¡ç±»åID |
| | | */ |
| | | R getBtmAndChartIds(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.system.entity.MdmCountConfig; |
| | | import com.vci.ubcs.system.entity.StatisticConfig; |
| | | import com.vci.ubcs.system.mapper.MdmCountConfigMapper; |
| | | import com.vci.ubcs.system.mapper.StatisticConfigMapper; |
| | | import com.vci.ubcs.system.service.IMdmCountConfigService; |
| | | import com.vci.ubcs.system.service.IStatisticConfigService; |
| | | import com.vci.ubcs.system.vo.MdmCountConfigVO; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * ä¸»æ°æ®ç»è®¡é¦é¡µé
ç½®æå¡ |
| | | * @author ludc |
| | | * @date 2023/10/17 14:45 |
| | | */ |
| | | @Service |
| | | public class StatisticConfigServiceImpl extends ServiceImpl<StatisticConfigMapper, StatisticConfig> implements IStatisticConfigService { |
| | | /** |
| | | * ç»è®¡åæä¿å |
| | | * @param statisticConfigs æ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @return æ°æ®è¿å |
| | | */ |
| | | @Override |
| | | public R saveStatisticConfig(List<StatisticConfig> statisticConfigs) { |
| | | |
| | | QueryWrapper<StatisticConfig> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("user_id", AuthUtil.getUser().getUserId()); |
| | | wrapper.in("btmname", statisticConfigs.stream().map(StatisticConfig::getBtmname).collect(Collectors.toList())); |
| | | List<StatisticConfig> list = this.list(wrapper); |
| | | statisticConfigs.stream().map(e ->{ |
| | | list.stream().filter(lis -> e.getBtmname().equals(lis.getBtmname())).forEach(lis->{ |
| | | e.setId(lis.getId()); |
| | | e.setTs(new Date()); |
| | | e.setCreator(lis.getCreator()); |
| | | e.setCreatetime(lis.getCreatetime()); |
| | | e.setLastmodifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | e.setLastmodifytime(new Date()); |
| | | }); |
| | | if(e.getId() == null){ |
| | | e.setUserId(AuthUtil.getUser().getUserId()); |
| | | e.setTs(new Date()); |
| | | e.setCreator(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | e.setCreatetime(new Date()); |
| | | e.setLastmodifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | e.setLastmodifytime(new Date()); |
| | | } |
| | | return e; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | this.saveOrUpdateBatch(statisticConfigs); |
| | | |
| | | return R.success("æä½æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç»è®¡åæå é¤å¾å½¢ |
| | | * @param btmname ä¸å¡ç±»å |
| | | * @param chartId å¾å½¢ID |
| | | * @return æåä¸å¦ |
| | | */ |
| | | @Override |
| | | public R deleteChartId(String btmname, String chartId) { |
| | | |
| | | QueryWrapper<StatisticConfig> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("user_id", AuthUtil.getUser().getUserId()); |
| | | wrapper.in("btmname",btmname); |
| | | StatisticConfig statisticConfig = this.getOne(wrapper); |
| | | if(StringUtil.isBlank(statisticConfig.getChartIds())){ |
| | | throw new ServiceException("æªæ¥å°åå²ç¸å
³å¾å½¢æ°æ®ï¼è¯·å
ä¿åï¼ï¼"); |
| | | } |
| | | List<String> chartIds = new ArrayList(Arrays.asList(statisticConfig.getChartIds().split(","))); |
| | | chartIds.remove(chartId); |
| | | statisticConfig.setChartIds(chartIds.stream().collect(Collectors.joining(","))); |
| | | this.updateById(statisticConfig); |
| | | return R.success("æä½æåï¼ï¼"); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¨æ·é
ç½®çä¸å¡ç±»åä¸ç¸å
³çå¾å½¢ |
| | | * @return å¾å½¢æ°æ®ä¸ä¸å¡ç±»åID |
| | | */ |
| | | @Override |
| | | public R getBtmAndChartIds() { |
| | | QueryWrapper<StatisticConfig> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("user_id", AuthUtil.getUser().getUserId()); |
| | | List<StatisticConfig> list = this.list(wrapper); |
| | | Map<String, String> collect = list.stream().collect(Collectors.toMap(StatisticConfig::getBtmname, StatisticConfig::getChartIds)); |
| | | return R.data(collect); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vci.ubcs.system.mapper.StatisticConfigMapper"> |
| | | |
| | | |
| | | |
| | | </mapper> |