| | |
| | | .el-date-table.is-week-mode .el-date-table__row:hover div { |
| | | background-color: $inputB1 !important; |
| | | } |
| | | .el-picker-panel__icon-btn { |
| | | color: $fontColor !important; |
| | | } |
| | | |
| | | //首页的body不加颜色 |
| | | #avue-view .el-card__body { |
| | | background-color: transparent !important; |
| | | } |
| | | //top导航颜色 |
| | | .avue-header { |
| | | background-color: $mainB !important; |
| | | } |
| | | |
| | | //表格斑马线 |
| | | // .theme-deep-bule .el-card .el-table td { |
| | | // background-color: $mainB !important; |
| | | // } |
| | | // .theme-deep-bule .el-card .el-table td, |
| | | // .theme-deep-bule .el-card .el-table th.is-leaf { |
| | | // border-color: $mainB !important; |
| | | // } |
| | | // .theme-deep-bule .el-card .el-table td { |
| | | // background-color: $mainB !important; |
| | | // } |
| | | // .el-table__row:hover { |
| | | // background-color: $mainBhover !important; |
| | | // } |
| | | |
| | | //表格右侧白色 |
| | | .el-table__fixed-right-patch { |
| | | background-color: $mainB !important; |
| | | } |
| | | .el-table--border th, |
| | | .el-table__fixed-right-patch { |
| | | border-bottom: $mainB !important; |
| | | } |
| | | //子表单 |
| | | .el-collapse-item__header { |
| | | background-color: $mainB !important; |
| | | color: $fontColor !important; |
| | | } |
| | | .avue-group__icon, |
| | | .avue-group__title { |
| | | color: $fontColor !important; |
| | | } |
| | | |
| | | //main背景 |
| | | .avue-main { |
| | | background-color: $mainBx2 !important; |
| | | } |
| | |
| | | $mainB2: #0048e5; |
| | | $mainB: #004ca7; |
| | | $mainBx1: #013e8a; |
| | | $mainBx2: #03277c; |
| | | |
| | | $mainBhover: #1d5ce4; |
| | | |
| | |
| | | .theme-bule { |
| | | |
| | | .avue-header, |
| | | .avue-logo { |
| | | background: #004ca7; |
| | |
| | | } |
| | | |
| | | .avue-top { |
| | | |
| | | .el-menu-item { |
| | | |
| | | i, |
| | | span { |
| | | color: #fff; |
| | | } |
| | | |
| | | &:hover { |
| | | |
| | | i, |
| | | span { |
| | | color: #fff; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | .theme-deep-bule { |
| | | background: #19305C; |
| | | background: #19305c; |
| | | |
| | | .avue-tags .el-tabs--card>.el-tabs__header .el-tabs__item { |
| | | color: #fff; |
| | | } |
| | | |
| | | .avue-tags .el-tabs--card>.el-tabs__header .el-tabs__item.is-active { |
| | | color: #409EFF; |
| | | color: #409eff; |
| | | } |
| | | |
| | | .avue-contail { |
| | | background: #19305C; |
| | | background: #19305c; |
| | | } |
| | | |
| | | .avue-header, |
| | | .avue-logo { |
| | | background: #19305C; |
| | | background: #19305c; |
| | | } |
| | | |
| | | .avue-sidebar { |
| | | background: #19305C; |
| | | background: #19305c; |
| | | |
| | | .el-menu-item.is-active, |
| | | .el-submenu__title.is-active { |
| | |
| | | } |
| | | |
| | | .avue-top { |
| | | |
| | | .el-menu-item { |
| | | |
| | | i, |
| | | span { |
| | | color: #fff; |
| | | } |
| | | |
| | | &:hover { |
| | | |
| | | i, |
| | | span { |
| | | color: #fff; |
| | |
| | | } |
| | | |
| | | .el-select-dropdown { |
| | | background: #0146F0; |
| | | background: #0146f0; |
| | | color: #8ab6ff; |
| | | border: 1px solid #0140D8; |
| | | border: 1px solid #0140d8; |
| | | } |
| | | |
| | | |
| | | .el-popper[x-placement^=bottom] .popper__arrow::after { |
| | | border-bottom-color: #0146F0; |
| | | .el-popper[x-placement^="bottom"] .popper__arrow::after { |
| | | border-bottom-color: #0146f0; |
| | | } |
| | | |
| | | .el-popper[x-placement^=bottom] .popper__arrow { |
| | | border-bottom-color: #0146F0; |
| | | .el-popper[x-placement^="bottom"] .popper__arrow { |
| | | border-bottom-color: #0146f0; |
| | | } |
| | | |
| | | .el-select-dropdown__item { |
| | |
| | | |
| | | .el-select-dropdown__item.hover, |
| | | .el-select-dropdown__item:hover { |
| | | background-color: #155CF7; |
| | | background-color: #155cf7; |
| | | } |
| | | |
| | | .el-button:focus, |
| | | .el-button:hover { |
| | | color: #F0F0F0; |
| | | border-color: #83C1FF; |
| | | background-color: #83C1FF; |
| | | color: #f0f0f0; |
| | | border-color: #83c1ff; |
| | | background-color: #83c1ff; |
| | | } |
| | | |
| | | .avue-crud__right { |
| | |
| | | } |
| | | |
| | | .el-button--default { |
| | | background-color: #409EFF; |
| | | border-color: #409EFF; |
| | | color: #FFF9FF; |
| | | background-color: #409eff; |
| | | border-color: #409eff; |
| | | color: #fff9ff; |
| | | } |
| | | |
| | | .el-card { |
| | | height: 100%; |
| | | background: #19305C; |
| | | background: #19305c; |
| | | color: #fff; |
| | | |
| | | .el-table, |
| | | .el-table__expanded-cell { |
| | | background-color: #19305C; |
| | | |
| | | background-color: #19305c; |
| | | } |
| | | |
| | | .el-table--border::after, |
| | |
| | | background-color: #1a325f; |
| | | } |
| | | |
| | | |
| | | .el-loading-mask { |
| | | background-color: #1a325fe1; |
| | | } |
| | | |
| | | .el-table th { |
| | | background-color: #155CF7; |
| | | background-color: #155cf7; |
| | | color: #fff; |
| | | } |
| | | |
| | | //表格 行颜色 |
| | | .el-table td { |
| | | background: #0142D6; |
| | | background: #004ca7; |
| | | color: #fff; |
| | | } |
| | | |
| | | .el-table--striped .el-table__body tr.el-table__row--striped td { |
| | | background: #044BE3; |
| | | background: #044be3; |
| | | } |
| | | |
| | | .el-button--text { |
| | |
| | | } |
| | | |
| | | .el-collapse-item__wrap { |
| | | background-color: #19305C; |
| | | |
| | | background-color: #19305c; |
| | | } |
| | | |
| | | .el-collapse { |
| | |
| | | } |
| | | |
| | | .avue-crud__menu { |
| | | background-color: #19305C; |
| | | background-color: #19305c; |
| | | } |
| | | |
| | | .el-form-item__label { |
| | | |
| | | color: #fff; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .el-input__inner { |
| | | background: #0146F0; |
| | | background: #0146f0; |
| | | color: #8ab6ff; |
| | | } |
| | | |
| | | .el-tooltip input { |
| | | background: #0146F0; |
| | | background: #0146f0; |
| | | color: #8ab6ff; |
| | | } |
| | | |
| | |
| | | |
| | | .el-date-editor, |
| | | .el-input input { |
| | | border-color: #0140D8; |
| | | border-color: #0140d8; |
| | | } |
| | | |
| | | .avue-group .el-collapse, |
| | | .avue-group .el-collapse-item__wrap { |
| | | border-color: #19305C; |
| | | border-color: #19305c; |
| | | } |
| | | |
| | | .el-pagination.is-background .btn-next, |
| | | .el-pagination.is-background .btn-prev, |
| | | .el-pagination.is-background .el-pager li { |
| | | margin: 0 5px; |
| | | background-color: #409EFF; |
| | | background-color: #409eff; |
| | | color: #fff; |
| | | min-width: 30px; |
| | | border-radius: 2px; |
| | | } |
| | | |
| | | .el-tag { |
| | | background-color: #409EFF; |
| | | background-color: #409eff; |
| | | color: #fff; |
| | | border-color: #53a7fa; |
| | | } |
| | | |
| | | } |
| | | |
| | | #avue-view { |
| | | &>.el-row { |
| | | |
| | | &>.el-col:first-child { |
| | | padding-right: 2px; |
| | | } |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page="page" |
| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | v-bind:class="activeClass == 0 ? 'btn-color' : ''" |
| | |
| | | </el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button type="warning" |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-download" |
| | | @click="handleExport">导出 |
| | | @click="handleExport" |
| | | >导出 |
| | | </el-button> |
| | | <el-button type="warning" |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-pie-chart" |
| | | @click="handleExportStatis">导出报表 |
| | | @click="handleExportStatis" |
| | | >导出报表 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | class="img" |
| | | v-if="showViewer" |
| | | :on-close="closeViewer" |
| | | :url-list="[imgUrl]" /> |
| | | :url-list="[imgUrl]" |
| | | /> |
| | | </div> |
| | | </template> |
| | | </basic-container> |
| | |
| | | <script> |
| | | import {getList} from "@/api/animalHeat/animalHeat"; |
| | | import {mapGetters} from "vuex"; |
| | | import ElImageViewer from 'element-ui/packages/image/src/image-viewer' |
| | | import ElImageViewer from "element-ui/packages/image/src/image-viewer"; |
| | | |
| | | export default { |
| | | name:'index', |
| | | name: "index", |
| | | components: { ElImageViewer }, |
| | | data() { |
| | | return { |
| | |
| | | search:{}, |
| | | showViewer:false, |
| | | activeClass: 0, |
| | | imgUrl:'', |
| | | imgUrl: "", |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | menu:false, |
| | | height:'auto', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | border: false, |
| | | stripe:true, |
| | | //stripe:true, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | |
| | | selection: true, |
| | | labelWidth:120, |
| | | dialogClickModal: false, |
| | | headerAlign: 'center', |
| | | align: 'center', |
| | | headerAlign: "center", |
| | | align: "center", |
| | | column: [ |
| | | { |
| | | label: '坐标', |
| | | prop: 'test', |
| | | label: "坐标", |
| | | prop: "test", |
| | | hide: true, |
| | | span: 24, |
| | | component: "avueMap", |
| | | clickChild: (obj) => { |
| | | this.form.jd = obj.latitude |
| | | this.form.wd = obj.longitude |
| | | this.form.jd = obj.latitude; |
| | | this.form.wd = obj.longitude; |
| | | }, |
| | | }, |
| | | { |
| | | label: "检测时间", |
| | | prop: "createTime" |
| | | prop: "createTime", |
| | | }, |
| | | { |
| | | label: "体温", |
| | | prop: "tempRed" |
| | | prop: "tempRed", |
| | | }, |
| | | // { |
| | | // label: '图片', |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "体温状态", |
| | |
| | | dicData: [ |
| | | { |
| | | label: "正常", |
| | | value: 0 |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: "异常", |
| | | value: 1 |
| | | } |
| | | ], |
| | | } |
| | | |
| | | ] |
| | | value: 1, |
| | | }, |
| | | data: [] |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false) |
| | | editBtn: this.vaildData(null, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | beforeOpen(done, type) { |
| | | }, |
| | | beforeOpen(done, type) {}, |
| | | //清空按钮 |
| | | searchReset() { |
| | | //清空搜索框中的内容 |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | getStartTime(){ |
| | | if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) { |
| | | return this.$route.query.startTime |
| | | if ( |
| | | this.$route.query.startTime != undefined && |
| | | this.$route.query.startTime != null && |
| | | this.$route.query.startTime != "" |
| | | ) { |
| | | return this.$route.query.startTime; |
| | | } |
| | | // 当前时间 |
| | | var date = new Date(); |
| | | //年 |
| | | var Y = date.getFullYear(); |
| | | //月 |
| | | var M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; |
| | | var M = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | //日 |
| | | var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | return Y + "-" + M + "-" + D; |
| | | }, |
| | | getEndTime(){ |
| | | if (this.$route.query.endTime != undefined && this.$route.query.endTime != null && this.$route.query.endTime != "" ) { |
| | | return this.$route.query.endTime |
| | | if ( |
| | | this.$route.query.endTime != undefined && |
| | | this.$route.query.endTime != null && |
| | | this.$route.query.endTime != "" |
| | | ) { |
| | | return this.$route.query.endTime; |
| | | } |
| | | // 当前时间 |
| | | var date = new Date(); |
| | | //年 |
| | | var Y = date.getFullYear(); |
| | | //月 |
| | | var M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; |
| | | var M = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | //日 |
| | | var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | return Y + "-" + M + "-" + D; |
| | |
| | | var params ={}; |
| | | if(e==0){ |
| | | //修改搜索框中的值 |
| | | this.search.releaseTimeRange=[this.showToDay(today)+" 00:00:00",this.showToDay(today)+" 23:59:59"] |
| | | this.search.releaseTimeRange = [ |
| | | this.showToDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | if(e==1){ |
| | | //修改搜索框中的值 |
| | | this.search.releaseTimeRange=[this.showWeekFirstDay(today)+" 00:00:00",this.showToDay(today)+" 23:59:59"] |
| | | this.search.releaseTimeRange = [ |
| | | this.showWeekFirstDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | if(e==2){ |
| | | //修改搜索框中的值 |
| | | this.search.releaseTimeRange=[this.showMonthFirstDay(today)+" 00:00:00",this.showToDay(today)+" 23:59:59"] |
| | | this.search.releaseTimeRange = [ |
| | | this.showMonthFirstDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | params = { |
| | | type: e |
| | | type: e, |
| | | }; |
| | | if(this.search.status){ |
| | | params = { |
| | | ... params, |
| | | status: this.search.status |
| | | status: this.search.status, |
| | | }; |
| | | } |
| | | this.query=params; |
| | |
| | | |
| | | //本月第一天 |
| | | showMonthFirstDay(Nowdate){ |
| | | var MonthFirstDay=new Date(Nowdate.getFullYear(),Nowdate.getMonth(),1); |
| | | var MonthFirstDay = new Date( |
| | | Nowdate.getFullYear(), |
| | | Nowdate.getMonth(), |
| | | 1 |
| | | ); |
| | | var M=Number(MonthFirstDay.getMonth())+1; |
| | | if(M<10){ |
| | | M="0"+M; |
| | | } |
| | | return MonthFirstDay.getFullYear()+"-"+M+"-"+"0"+MonthFirstDay.getDate(); |
| | | return ( |
| | | MonthFirstDay.getFullYear() + |
| | | "-" + |
| | | M + |
| | | "-" + |
| | | "0" + |
| | | MonthFirstDay.getDate() |
| | | ); |
| | | }, |
| | | |
| | | //数据导出 |
| | |
| | | this.$confirm("是否导出体温数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }).then(() => { |
| | | let begTime = this.$route.query.startTime==undefined? '':this.$route.query.startTime; |
| | | let endTime = this.$route.query.endTime==undefined? '':this.$route.query.endTime; |
| | | let status = this.$route.query.status==undefined? '':this.$route.query.status; |
| | | let timeDesc = this.$route.query.timeDesc==undefined? '':this.$route.query.timeDesc; |
| | | window.open(`/api/animalHeat/animalHeat/export-animalHeat?begTime=${begTime}&endTime=${endTime}&status=${status}&timeDesc=${timeDesc}`); |
| | | let begTime = |
| | | this.$route.query.startTime == undefined |
| | | ? "" |
| | | : this.$route.query.startTime; |
| | | let endTime = |
| | | this.$route.query.endTime == undefined |
| | | ? "" |
| | | : this.$route.query.endTime; |
| | | let status = |
| | | this.$route.query.status == undefined ? "" : this.$route.query.status; |
| | | let timeDesc = |
| | | this.$route.query.timeDesc == undefined |
| | | ? "" |
| | | : this.$route.query.timeDesc; |
| | | window.open( |
| | | `/api/animalHeat/animalHeat/export-animalHeat?begTime=${begTime}&endTime=${endTime}&status=${status}&timeDesc=${timeDesc}` |
| | | ); |
| | | }); |
| | | }, |
| | | //数据报表导出 |
| | | handleExportStatis() { |
| | | let begTime = this.$route.query.startTime==undefined? '':this.$route.query.startTime; |
| | | let endTime = this.$route.query.endTime==undefined? '':this.$route.query.endTime; |
| | | let status = this.$route.query.status==undefined? '':this.$route.query.status; |
| | | let timeDesc = this.$route.query.timeDesc==undefined? '':this.$route.query.timeDesc; |
| | | let begTime = |
| | | this.$route.query.startTime == undefined |
| | | ? "" |
| | | : this.$route.query.startTime; |
| | | let endTime = |
| | | this.$route.query.endTime == undefined ? "" : this.$route.query.endTime; |
| | | let status = |
| | | this.$route.query.status == undefined ? "" : this.$route.query.status; |
| | | let timeDesc = |
| | | this.$route.query.timeDesc == undefined |
| | | ? "" |
| | | : this.$route.query.timeDesc; |
| | | //window.open(`/api/animalHeat/animalHeat/getAnimalHeatStatis?begTime=${begTime}&endTime=${endTime}&status=${status}&timeDesc=${timeDesc}`); |
| | | window.open(`https://web.byisf.com/api/blade-report/ureport/preview?_u=blade-animalHeat.statis.ureport.xml&begTime=${begTime}&endTime=${endTime}&status=${status}&timeDesc=${timeDesc}`); |
| | | window.open( |
| | | `https://web.byisf.com/api/blade-report/ureport/preview?_u=blade-animalHeat.statis.ureport.xml&begTime=${begTime}&endTime=${endTime}&status=${status}&timeDesc=${timeDesc}` |
| | | ); |
| | | }, |
| | | //修改行颜色 |
| | | rowStyle({row, column, rowIndex}){ |
| | | if(row.status=="1"){ |
| | | return { |
| | | color:"#fe1515" |
| | | } |
| | | color: "#fe1515", |
| | | }; |
| | | } |
| | | }, |
| | | //图片行点击事件 |
| | | rowClick(row){ |
| | | var that = this; |
| | | that.imgUrl = row.picture; |
| | | this.showViewer = true |
| | | this.showViewer = true; |
| | | }, |
| | | // 关闭查看器 |
| | | closeViewer() { |
| | | this.showViewer = false |
| | | this.showViewer = false; |
| | | }, |
| | | |
| | | //体温状态回填 |
| | | getAnimalType(){ |
| | | if (this.$route.query.status != undefined) { |
| | | return this.$route.query.status |
| | | return this.$route.query.status; |
| | | } |
| | | }, |
| | | onLoad(page, params={}) { |
| | |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | if (this.$route.query.type!=undefined && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) { |
| | | if ( |
| | | this.$route.query.type != undefined && |
| | | this.$route.query != undefined && |
| | | this.$route.query != null && |
| | | this.$route.query != "" |
| | | ) { |
| | | if (this.$route.query.status != undefined) { |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | status:this.$route.query.status, |
| | | type:this.$route.query.type |
| | | } |
| | | type: this.$route.query.type, |
| | | }; |
| | | } else { |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | type:this.$route.query.type |
| | | type: this.$route.query.type, |
| | | }; |
| | | } |
| | | this.activeClass=4; |
| | |
| | | params = { |
| | | status: this.$route.query.status, |
| | | begTime: this.$route.query.startTime, |
| | | endTime: this.$route.query.endTime |
| | | } |
| | | endTime: this.$route.query.endTime, |
| | | }; |
| | | this.activeClass=4; |
| | | } |
| | | |
| | | //初始进入默认展示当天数据 |
| | | if(this.activeClass==0 && this.query.dateTime==null){ |
| | | params = { |
| | | type:this.activeClass |
| | | } |
| | | type: this.activeClass, |
| | | }; |
| | | } |
| | | |
| | | if (dateTime) { |
| | |
| | | } |
| | | |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.article_delete" |
| | | @click="handleDelete">删 除 |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | datetime:"", |
| | | selectionList: [], |
| | | option: { |
| | | height: 'auto', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | stripe:true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | |
| | | row: true, |
| | | searchSpan:5, |
| | | search: true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入资讯标题", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "资讯封面", |
| | | prop: "url", |
| | | // align:'center', |
| | | width:80, |
| | | type: 'upload', |
| | | listType: 'picture-img', |
| | | action: '/api/blade-resource/oss/endpoint/put-file', |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: 'data', |
| | | url: 'link', |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | // hide: true, |
| | | span: 24, |
| | |
| | | search: true, |
| | | searchSpan:4, |
| | | span: 24, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入资讯类型", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "资讯类型", |
| | |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=articleType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | search:true, |
| | | type:"select", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择资讯类型", |
| | | trigger: "blur" |
| | | }], |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "发布时间", |
| | |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择发布时间", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "发布时间", |
| | |
| | | viewDisplay: false, |
| | | type: "date", |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss" |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | { |
| | | label: "资讯内容", |
| | | prop: "content", |
| | | component: 'AvueUeditor', |
| | | component: "AvueUeditor", |
| | | options: { |
| | | action: '/api/blade-resource/oss/endpoint/put-file', |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | // customConfig: { |
| | | // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3'] |
| | | // },//wangEditor编辑的配置 |
| | | props: { |
| | | res: "data", |
| | | url: "link", |
| | | } |
| | | }, |
| | | }, |
| | | hide: true, |
| | | minRows: 6, |
| | | span: 24, |
| | | } |
| | | ] |
| | | }, |
| | | data: [] |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | addBtn: this.vaildData(this.permission.article_add, true), |
| | | viewBtn: this.vaildData(this.permission.article_view, true), |
| | | delBtn: this.vaildData(this.permission.article_delete, true), |
| | | editBtn: this.vaildData(this.permission.article_edit, true) |
| | | editBtn: this.vaildData(this.permission.article_edit, true), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then(res => { |
| | | getNotice(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | |
| | | ...params, |
| | | startTime: dateTime[0], |
| | | endTime: dateTime[1], |
| | | ...this.query |
| | | ...this.query, |
| | | }; |
| | | values.datetime = null; |
| | | } |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | <div class="box"> |
| | | <el-scrollbar> |
| | | <basic-container> |
| | | <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/> |
| | | <avue-tree |
| | | :option="treeOption" |
| | | :data="treeData" |
| | | @node-click="nodeClick" |
| | | /> |
| | | </basic-container> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-col> |
| | | <el-col> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :search.sync="search" |
| | | :table-loading="loading" |
| | | :data="data" |
| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.attendance_delete" |
| | | @click="handleDelete">删 除 |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <el-button type="warning" |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-download" |
| | | @click="handleExport">导出 |
| | | @click="handleExport" |
| | | >导出 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="clocktype"> |
| | | <el-tag>{{ |
| | | row.clocktype == "0" ? "上班" : row.clocktype == "1" ? "下班" : "无" |
| | | <el-tag |
| | | >{{ |
| | | row.clocktype == "0" |
| | | ? "上班" |
| | | : row.clocktype == "1" |
| | | ? "下班" |
| | | : "无" |
| | | }} |
| | | </el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="attendancetype"> |
| | | <el-tag>{{ |
| | | row.attendancetype == "0" ? "正常" : row.attendancetype == "1" ? "迟到" : row.attendancetype == "2" ? "早退" : "无效" |
| | | <el-tag |
| | | >{{ |
| | | row.attendancetype == "0" |
| | | ? "正常" |
| | | : row.attendancetype == "1" |
| | | ? "迟到" |
| | | : row.attendancetype == "2" |
| | | ? "早退" |
| | | : "无效" |
| | | }} |
| | | </el-tag> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/attendance/attendance"; |
| | | import { |
| | | getList, |
| | | getDetail, |
| | | add, |
| | | update, |
| | | remove, |
| | | } from "@/api/attendance/attendance"; |
| | | import {mapGetters} from "vuex"; |
| | | import {getDeptLazyTree, getDeptTree} from "@/api/system/dept"; |
| | | import website from "@/config/website"; |
| | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | selectionList: [], |
| | | treeDeptId: '', |
| | | treeDeptId: "", |
| | | treeData: [], |
| | | treeOption: { |
| | | nodeKey: 'id', |
| | | nodeKey: "id", |
| | | lazy: true, |
| | | treeLoad: function (node, resolve) { |
| | | const parentId = (node.level === 0) ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then(res => { |
| | | resolve(res.data.data.map(item => { |
| | | const parentId = node.level === 0 ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | resolve( |
| | | res.data.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren |
| | | } |
| | | })) |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | }) |
| | | ); |
| | | }); |
| | | }, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: 'small', |
| | | size: "small", |
| | | props: { |
| | | labelText: '标题', |
| | | label: 'title', |
| | | value: 'value', |
| | | children: 'children' |
| | | } |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "value", |
| | | children: "children", |
| | | }, |
| | | }, |
| | | option: { |
| | | height:'auto', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | border: false, |
| | | stripe:true, |
| | | //stripe:true, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | |
| | | selection: true, |
| | | labelWidth:120, |
| | | dialogClickModal: false, |
| | | headerAlign: 'center', |
| | | align: 'center', |
| | | headerAlign: "center", |
| | | align: "center", |
| | | column: [ |
| | | // { |
| | | // label: "所属租户", |
| | |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入考勤时间", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "考勤时间", |
| | |
| | | width: 200, |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入clocktime", |
| | | trigger: "click" |
| | | }] |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "星期", |
| | | prop: "week", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入星期", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "天气", |
| | |
| | | label: "经度", |
| | | prop: "jd", |
| | | hide: true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入经度", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "纬度", |
| | | hide: true, |
| | | prop: "wd", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入纬度", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "打卡类型", |
| | |
| | | width: 120, |
| | | type: "select", |
| | | slot: true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入打卡类型", |
| | | trigger: "blur" |
| | | }], |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | dicData: [ |
| | | { |
| | | label: "上班", |
| | | value: "0" |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "下班", |
| | | value: "1" |
| | | } |
| | | ] |
| | | value: "1", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "考勤类型", |
| | |
| | | prop: "attendancetype", |
| | | slot: true, |
| | | type: "select", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入考勤类型", |
| | | trigger: "blur" |
| | | }], |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | dicData: [ |
| | | { |
| | | label: "正常", |
| | | value: "0" |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "迟到", |
| | | value: "1" |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "早退", |
| | | value: "2" |
| | | value: "2", |
| | | }, |
| | | { |
| | | label: "无效", |
| | | value: "4" |
| | | } |
| | | ] |
| | | value: "4", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "考勤地址", |
| | | prop: "address", |
| | | width: 450, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入地址", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ] |
| | | ], |
| | | }, |
| | | data: [] |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(this.permission.attendance_view, true), |
| | | delBtn: this.vaildData(this.permission.attendance_delete, true), |
| | | editBtn: this.vaildData(null, false) |
| | | editBtn: this.vaildData(null, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | nodeClick(data) { |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | window.console.log(error); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | initData(tenantId) { |
| | | getDeptTree(tenantId).then(res => { |
| | | getDeptTree(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.column, "deptId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | console.log(error); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | |
| | | this.$confirm("是否导出考勤数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }).then(() => { |
| | | window.open(`/api/attendance/export-Attendance?name=${this.search.name}&beginTime=${this.search.releaseTimeRange[0]} |
| | | &endTime=${this.search.releaseTimeRange[1]}&attendancetype=${this.search.attendancetype}`); |
| | |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | getDetail(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.treeDeptId = ''; |
| | | this.treeDeptId = ""; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | |
| | | ...params, |
| | | beginTime: releaseTimeRange[0], |
| | | endTime: releaseTimeRange[1], |
| | | ...this.query |
| | | ...this.query, |
| | | }; |
| | | values.releaseTimeRange = null; |
| | | } else { |
| | | values = { |
| | | ...params, |
| | | ...this.query |
| | | ...this.query, |
| | | }; |
| | | } |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize,values,this.treeDeptId).then(res => { |
| | | getList(page.currentPage, page.pageSize, values, this.treeDeptId).then( |
| | | (res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowStyle({row, column, rowIndex}) { |
| | | if (row.attendancetype == 1) { |
| | | return { |
| | | color: "#fe1515" |
| | | } |
| | | } |
| | | else if(row.attendancetype == 2){ |
| | | color: "#fe1515", |
| | | }; |
| | | } else if (row.attendancetype == 2) { |
| | | return { |
| | | color: "#FFCC33" |
| | | } |
| | | color: "#FFCC33", |
| | | }; |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | <el-row> |
| | | <el-col :span="3"> |
| | | <basic-container> |
| | | <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/> |
| | | <avue-tree |
| | | :option="treeOption" |
| | | :data="treeData" |
| | | @node-click="nodeClick" |
| | | /> |
| | | </basic-container> |
| | | </el-col> |
| | | <el-col :span="21"> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | @row-click="rowClick"> |
| | | |
| | | @row-click="rowClick" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | <el-button |
| | | type="danger" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.clientManagement_delete" |
| | | @click="handleDelete">删 除 |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <!-- <span><!–图例 components–>--> |
| | | <!-- <Legend :datas="datalistLIU"></Legend>--> |
| | |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="devicestate"> |
| | | <el-tag>{{ |
| | | row.devicestate == "0" ? "撤防" : row.devicestate == "1" ? "布防" : "无" |
| | | <el-tag |
| | | >{{ |
| | | row.devicestate == "0" |
| | | ? "撤防" |
| | | : row.devicestate == "1" |
| | | ? "布防" |
| | | : "无" |
| | | }} |
| | | </el-tag> |
| | | </template> |
| | |
| | | <template class="tdtype" slot-scope="{ row }" slot="dxzt"> |
| | | <el-tag class="dtype"> |
| | | {{ |
| | | row.dxzt == "0" ? "掉线" : row.dxzt == "1" ? "正常" :row.dxzt == "2" ? "预警":row.dxzt == "3" ? "故障":"无" |
| | | row.dxzt == "0" |
| | | ? "掉线" |
| | | : row.dxzt == "1" |
| | | ? "正常" |
| | | : row.dxzt == "2" |
| | | ? "预警" |
| | | : row.dxzt == "3" |
| | | ? "故障" |
| | | : "无" |
| | | }} |
| | | <i class="dx" v-if="row.dxzt == '0' "></i> |
| | | <i class="zc" v-if="row.dxzt == '1' "></i> |
| | | <i class="yj" v-if="row.dxzt == '2' "></i> |
| | | <i class="gz" v-if="row.dxzt == '3' "></i> |
| | | </el-tag> |
| | | |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="type"> |
| | |
| | | >办结 |
| | | </el-button> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | |
| | | <div v-show="menuVisible"> |
| | |
| | | <li class="menu_item" @click.stop="handleMap">定位</li> |
| | | </ul> |
| | | </div> |
| | | |
| | | |
| | | <el-drawer |
| | | title="电子地图" |
| | |
| | | height="100%" |
| | | ></iframe> |
| | | </el-drawer> |
| | | |
| | | </basic-container> |
| | | </el-col> |
| | | <el-dialog title="缴费提醒" :visible.sync="dialogTableVisible" top="280px" custom-class="payWin" append-to-body="true"> |
| | | |
| | | |
| | | <el-dialog |
| | | title="缴费提醒" |
| | | :visible.sync="dialogTableVisible" |
| | | top="280px" |
| | | custom-class="payWin" |
| | | append-to-body="true" |
| | | > |
| | | <el-dialog |
| | | class="real-jf-dialog" |
| | | title="缴费" |
| | |
| | | <el-form-item> |
| | | <el-button type="primary" @click.stop="generate(form)" |
| | | >缴费 |
| | | </el-button |
| | | > |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | |
| | | </el-dialog> |
| | | |
| | | |
| | | <el-table |
| | | :data="gridData" |
| | | border |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | fixed |
| | | prop="xb" |
| | | label="序号" |
| | | width="50"> |
| | | <el-table :data="gridData" border style="width: 100%"> |
| | | <el-table-column fixed prop="xb" label="序号" width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="deviceName" |
| | | label="设备名称" |
| | | width="180"> |
| | | <el-table-column prop="deviceName" label="设备名称" width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="deviceNumber" |
| | | label="设备编码" |
| | | width="150"> |
| | | <el-table-column prop="deviceNumber" label="设备编码" width="150"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="ownership" |
| | | label="所属单位" |
| | | width="160"> |
| | | <el-table-column prop="ownership" label="所属单位" width="160"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="expireTime" |
| | | label="到期时间" |
| | | width="160" |
| | | > |
| | | <el-table-column prop="expireTime" label="到期时间" width="160"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="pay" |
| | | label="缴费信息" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | width="100"> |
| | | <el-table-column prop="pay" label="缴费信息"> </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="handleClick(scope.row)">一键缴费</el-button> |
| | | <el-button type="text" size="small" @click="handleClick(scope.row)" |
| | | >一键缴费</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, remove, update, add, getclient, getDeptLazyTree, getAll, updates,getBaTree} from "@/api/client/client"; |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getclient, |
| | | getDeptLazyTree, |
| | | getAll, |
| | | updates, |
| | | getBaTree, |
| | | } from "@/api/client/client"; |
| | | // import {getDeptTree} from "@/api/system/dept"; |
| | | import {mapGetters} from "vuex"; |
| | | import axios from "axios"; |
| | | import Legend from '../../components/liu-legend/Legend' |
| | | import Legend from "../../components/liu-legend/Legend"; |
| | | import AvueMap from "avue-plugin-map"; |
| | | import website from '@/config/website'; |
| | | import website from "@/config/website"; |
| | | |
| | | export default { |
| | | components:{ |
| | |
| | | data() { |
| | | return { |
| | | dataLIU:{ |
| | | color:"#DFDFDF" |
| | | color: "#DFDFDF", |
| | | }, |
| | | //legend-liu数据 |
| | | datalistLIU:[ |
| | | { |
| | | color: "#DFDFDF", |
| | | text: '掉线' |
| | | text: "掉线", |
| | | }, |
| | | { |
| | | color: "#29C093", |
| | | text: '正常' |
| | | text: "正常", |
| | | }, |
| | | { |
| | | color: "#F34A4A", |
| | | text: '预警' |
| | | text: "预警", |
| | | }, |
| | | { |
| | | color: "#F48F57", |
| | | text: '故障' |
| | | } |
| | | text: "故障", |
| | | }, |
| | | ], |
| | | form: {}, |
| | | query: {}, |
| | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | dialogTableVisible: false, |
| | | realjf: false, |
| | | gridData: null, |
| | | selectionList: [], |
| | | treeDeptId: '', |
| | | treeDeptId: "", |
| | | treeData: [], |
| | | treeOption: { |
| | | nodeKey: 'id', |
| | | nodeKey: "id", |
| | | lazy: true, |
| | | treeLoad: function (node, resolve) { |
| | | const parentId = (node.level === 0) ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then(res => { |
| | | resolve(res.data.data.map(item => { |
| | | const parentId = node.level === 0 ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | resolve( |
| | | res.data.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren |
| | | } |
| | | })) |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | }) |
| | | ); |
| | | }); |
| | | }, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: 'small', |
| | | size: "small", |
| | | props: { |
| | | labelText: '标题', |
| | | label: 'title', |
| | | value: 'value', |
| | | children: 'children' |
| | | } |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "value", |
| | | children: "children", |
| | | }, |
| | | }, |
| | | option: { |
| | | height: 'auto', |
| | | indexLabel: '序号', |
| | | height: "auto", |
| | | indexLabel: "序号", |
| | | calcHeight: 54, |
| | | labelWidth: '125', |
| | | labelWidth: "125", |
| | | dialogWidth: 1150, |
| | | menuWidth: 200, |
| | | align:"center", |
| | |
| | | searchMenuSpan: 4, |
| | | searchSpan: 4, |
| | | border: false, |
| | | stripe:true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | |
| | | searchPlaceholder: "设备名称/编号", |
| | | search: true, |
| | | sortable:true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入设备名称", |
| | | trigger: "blur" |
| | | }], |
| | | } |
| | | , |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "设备编号", |
| | | prop: "deviceNumber", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入设备编号", |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "使用方", |
| | | prop: "deptName", |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "使用方", |
| | |
| | | checkStrictly:true, |
| | | hide:true, |
| | | props: { |
| | | label: "title" |
| | | label: "title", |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择使用方", |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "使用方", |
| | |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=manufacturers", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | search:true, |
| | | type:"select", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择设备厂商", |
| | | trigger: "blur" |
| | | }], |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "设备状态", |
| | |
| | | sortable:true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | }, { |
| | | }, |
| | | { |
| | | label: "地址", |
| | | prop: "street", |
| | | span:10, |
| | |
| | | hide: true, |
| | | span: 2, |
| | | // display:false, |
| | | component: "AvueMap" |
| | | component: "AvueMap", |
| | | }, |
| | | { |
| | | label: "省份", |
| | | prop: "province", |
| | | search: true, |
| | | searchSpan: 2, |
| | | labelWidth: '110', |
| | | labelWidth: "110", |
| | | searchLabelWidth: 45, |
| | | placeholder: "省份", |
| | | type: "select", |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | value: "code", |
| | | }, |
| | | cascaderItem: ["city", "district"], |
| | | dicUrl: "/api/blade-system/region/select", |
| | |
| | | search: true, |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | value: "code", |
| | | }, |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 2, |
| | |
| | | type: "select", |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | value: "code", |
| | | }, |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 2, |
| | |
| | | width:"100", |
| | | labelWidth: "120", |
| | | formatter: (row,value,label,column)=>{ |
| | | return value = value.substring(0,11); |
| | | return (value = value.substring(0, 11)); |
| | | }, |
| | | span:7, |
| | | }, |
| | |
| | | hide: true, |
| | | prop: "wd", |
| | | formatter: (row,value,label,column) => { |
| | | return value = value.substring(0,10); |
| | | return (value = value.substring(0, 10)); |
| | | }, |
| | | span:5, |
| | | }, |
| | |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | } |
| | | |
| | | ] |
| | | }, |
| | | data: [] |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始 |
| | | var address = val.formattedAddress.toString(); |
| | | if(address.search("县") != -1){ |
| | | this.form.street = address.substring(address.indexOf("县")+1,address.length); |
| | | this.form.street = address.substring( |
| | | address.indexOf("县") + 1, |
| | | address.length |
| | | ); |
| | | } |
| | | if(address.search("区") != -1){ |
| | | this.form.street = address.substring(address.indexOf("区")+1,address.length); |
| | | this.form.street = address.substring( |
| | | address.indexOf("区") + 1, |
| | | address.length |
| | | ); |
| | | } |
| | | // //写入新的省市区 |
| | | // that.form.province = val.addressComponent.province; |
| | |
| | | handler(val) { |
| | | var that = this; |
| | | if (val != null && val !=""){ |
| | | getBaTree(val).then(res => { |
| | | getBaTree(val).then((res) => { |
| | | if (res) { |
| | | that.form.onePhone = res.data.data.records[0].phone; |
| | | that.form.oneContacts = res.data.data.records[0].name; |
| | |
| | | handler(val) { |
| | | var that = this; |
| | | if (val != null && val !=""){ |
| | | getBaTree(val).then(res => { |
| | | getBaTree(val).then((res) => { |
| | | if (res) { |
| | | that.form.twoPhone = res.data.data.records[0].phone; |
| | | that.form.twoContacts = res.data.data.records[0].name; |
| | |
| | | handler(val) { |
| | | var that = this; |
| | | if (val != null && val !=""){ |
| | | getBaTree(val).then(res => { |
| | | getBaTree(val).then((res) => { |
| | | if (res) { |
| | | that.form.threePhone = res.data.data.records[0].phone; |
| | | that.form.threeContacts = res.data.data.records[0].name; |
| | |
| | | // this.initData(); |
| | | // } |
| | | // } |
| | | |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | |
| | | addBtn: this.vaildData(this.permission.clientManagement_add, false), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(this.permission.clientManagement_delete, false), |
| | | editBtn: this.vaildData(this.permission.clientManagement_edit, false) |
| | | editBtn: this.vaildData(this.permission.clientManagement_edit, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | }, |
| | | mounted(){ |
| | | // 租户模式默认加载管理组数据 |
| | |
| | | }, |
| | | methods: { |
| | | generate(row) { |
| | | updates(row.expireTime, row.deviceNumber).then(() => { |
| | | updates(row.expireTime, row.deviceNumber).then( |
| | | () => { |
| | | this.dialogTableVisible = false; |
| | | this.realjf = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "缴费成功!" |
| | | message: "缴费成功!", |
| | | }); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | //初始化数据 |
| | |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | row.deptId = row.deptId.join(","); |
| | | add(row).then(() => { |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | if(Array.isArray(row.deptId)){ |
| | | row.deptId = row.deptId.join(","); |
| | | } |
| | | update(row).then(() => { |
| | | update(row).then( |
| | | () => { |
| | | // this.initFlag = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | updateDtype(row){ |
| | | row.dtype = "0"; |
| | | update(row).then(() => { |
| | | update(row).then( |
| | | () => { |
| | | // this.initFlag = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.onLoad(this.page); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | console.log(params,done) |
| | | console.log(params, done); |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getclient(this.form.id).then(res => { |
| | | getclient(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | this.isEdit=true; |
| | | }); |
| | |
| | | ...params, |
| | | beginTime: releaseTimeRange[0], |
| | | endTime: releaseTimeRange[1], |
| | | ...this.query |
| | | ...this.query, |
| | | }; |
| | | values.releaseTimeRange = null; |
| | | } else { |
| | | values = { |
| | | ...params, |
| | | ...this.query |
| | | ...this.query, |
| | | }; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, values, this.treeDeptId).then(res => { |
| | | getList(page.currentPage, page.pageSize, values, this.treeDeptId).then( |
| | | (res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | |
| | |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, rowStyle({row, column, rowIndex}) { |
| | | } |
| | | ); |
| | | }, |
| | | rowStyle({ row, column, rowIndex }) { |
| | | // if (row.heartbeat != null && row.heartbeat != "") { |
| | | // var date = new Date(row.heartbeat).getTime(); |
| | | // var Dqdate = new Date().getTime(); |
| | |
| | | // color: "#29C093" |
| | | // }; |
| | | // } |
| | | if(row.dtype=='2'){ |
| | | if (row.dtype == "2") { |
| | | return { |
| | | color: "#F34A4A" |
| | | color: "#F34A4A", |
| | | }; |
| | | } |
| | | // if(row.dtype=='3'){ |
| | |
| | | }, |
| | | payWin() { |
| | | var that = this; |
| | | getAll().then(res => { |
| | | getAll().then((res) => { |
| | | var data = res.data.data; |
| | | var lists = []; |
| | | var xb = 0; |
| | |
| | | that.dialogTableVisible = true; |
| | | } |
| | | }); |
| | | |
| | | }, handleStart(row) { |
| | | |
| | | }, |
| | | handleStart(row) { |
| | | console.log(row,11111111111); |
| | | row = this.selectRow; |
| | | console.log(row,22222222222); |
| | | var arr = []; |
| | | console.log(this.$store.state.tags.tagList,3333333); |
| | | this.$store.state.tags.tagList.forEach(item => { |
| | | this.$store.state.tags.tagList.forEach((item) => { |
| | | if (item.label != "视频") { |
| | | arr.push(item); |
| | | } |
| | |
| | | this.$store.state.tags.tagList = arr; |
| | | console.log(arr,444444444444); |
| | | this.$router.push({ |
| | | path: `/real/video/`, query: row |
| | | path: `/real/video/`, |
| | | query: row, |
| | | }); |
| | | }, handleMap(row) { |
| | | }, |
| | | handleMap(row) { |
| | | row = this.selectRow; |
| | | this.showMap = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.mapDiv.onload = () => { |
| | | window.frames[1].init("equipment", {x: row.jd, y: row.wd}); |
| | | }; |
| | | }) |
| | | },rightClick(row, event) { |
| | | }); |
| | | }, |
| | | rightClick(row, event) { |
| | | this.selectRow = row; |
| | | this.menuVisible = false; // 先把模态框关死,目的是 第二次或者第n次右键鼠标的时候 它默认的是true |
| | | this.menuVisible = true; // 显示模态窗口,跳出自定义菜单栏 |
| | | var menu = document.querySelector('#menu'); |
| | | var menu = document.querySelector("#menu"); |
| | | this.styleMenu(menu); |
| | | }, |
| | | foo() { |
| | | // 取消鼠标监听事件 菜单栏 |
| | | this.menuVisible = false; |
| | | document.removeEventListener('click', this.foo); // 要及时关掉监听,不关掉的是一个坑,不信你试试,虽然前台显示的时候没有啥毛病,加一个alert你就知道了 |
| | | document.removeEventListener("click", this.foo); // 要及时关掉监听,不关掉的是一个坑,不信你试试,虽然前台显示的时候没有啥毛病,加一个alert你就知道了 |
| | | }, |
| | | styleMenu(menu) { |
| | | let cha = document.body.clientHeight - event.clientY |
| | | let cha = document.body.clientHeight - event.clientY; |
| | | //console.log(document.body.clientHeight,event.clientY,cha) |
| | | // 防止菜单太靠底,根据可视高度调整菜单出现位置 |
| | | if (cha < 150) { |
| | | menu.style.top = event.clientY -120 - (100) + 'px' |
| | | menu.style.top = event.clientY - 120 - 100 + "px"; |
| | | } else { |
| | | menu.style.top = event.clientY -10 - (100) + 'px' |
| | | menu.style.top = event.clientY - 10 - 100 + "px"; |
| | | } |
| | | menu.style.left = event.clientX + 10 - (60) + 'px' |
| | | document.addEventListener('click', this.foo); // 给整个document新增监听鼠标事件,点击任何位置执行foo方法 |
| | | menu.style.left = event.clientX + 10 - 60 + "px"; |
| | | document.addEventListener("click", this.foo); // 给整个document新增监听鼠标事件,点击任何位置执行foo方法 |
| | | }, |
| | | rowClick(val){//行点击事件 |
| | | rowClick(val) { |
| | | //行点击事件 |
| | | // console.log(val); |
| | | this.$router.push({ path: "/dataL/dataL", query: val }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | .payWin .el-dialog__body { |
| | | padding-top: 0px !important; |
| | | } |
| | | |
| | | |
| | | // /*页面样式*/ //丢弃 因为不起作用,样式在cs.vue中 city1,2,3 liuyg改 |
| | | // .el-card__body .cityClass1 { |
| | |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #DFDFDF; |
| | | background: #dfdfdf; |
| | | } |
| | | .zc{ |
| | | position: absolute; |
| | |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #29C093; |
| | | background: #29c093; |
| | | } |
| | | .yj{ |
| | | position: absolute; |
| | |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #F34A4A; |
| | | background: #f34a4a; |
| | | } |
| | | .gz{ |
| | | position: absolute; |
| | |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #F48F57; |
| | | background: #f48f57; |
| | | } |
| | | |
| | | .tabFontSize{ |
| | |
| | | /*border: 1px solid #999999;*/ |
| | | text-align: center; |
| | | background-color: #fff; |
| | | border-radius: .25rem; |
| | | box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); |
| | | border-radius: 0.25rem; |
| | | box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); |
| | | } |
| | | .menu li:hover { |
| | | background-color: rgba(232,237,250,.6); |
| | | background-color: rgba(232, 237, 250, 0.6); |
| | | color: darkslategrey; |
| | | } |
| | | .menu li{ |
| | |
| | | padding-left: 20px; |
| | | padding-right: 5px; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | |
| | | |
| | |
| | | position: relative !important; |
| | | left: -51px !important; |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page="page" |
| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.feedback_delete" |
| | | @click="handleDelete">删 除 |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getListReport, getDetails, adds, updates, remove} from "@/api/feedback/feedback"; |
| | | import { |
| | | getListReport, |
| | | getDetails, |
| | | adds, |
| | | updates, |
| | | remove, |
| | | } from "@/api/feedback/feedback"; |
| | | import {getBaTree} from "@/api/client/client"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | height:'auto', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | labelWidth: '125', |
| | | labelWidth: "125", |
| | | dialogWidth: 1150, |
| | | border: false, |
| | | stripe:true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | |
| | | searchLabelWidth:100, |
| | | searchSpan:5, |
| | | addDisplay:false, |
| | | editDisplay:false |
| | | editDisplay: false, |
| | | }, |
| | | { |
| | | label: "上报人姓名", |
| | |
| | | type: "tree", |
| | | dicUrl: "/api/catalogs/catalogs/getBigTree", |
| | | props: { |
| | | label: "title" |
| | | label: "title", |
| | | }, |
| | | width: 72, |
| | | hide: true, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: false, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择上报人", |
| | | trigger: "blur" |
| | | }], |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "上报地址", |
| | | prop: "place", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入事发地址", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "备注", |
| | | prop: "result", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入处理结果", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "上报时间", |
| | |
| | | viewDisplay:false, |
| | | editDisplay:false, |
| | | hide:true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择上报时间", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: '图片', |
| | | prop: 'images', |
| | | dataType: 'array', |
| | | type: 'upload', |
| | | label: "图片", |
| | | prop: "images", |
| | | dataType: "array", |
| | | type: "upload", |
| | | span: 24, |
| | | hide:true, |
| | | viewDisplay:true, |
| | | listType: 'picture-card', |
| | | listType: "picture-card", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "link", |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: '视频', |
| | | prop: 'videos', |
| | | dataType: 'array', |
| | | type: 'upload', |
| | | label: "视频", |
| | | prop: "videos", |
| | | dataType: "array", |
| | | type: "upload", |
| | | accept:"video/mp4", |
| | | hide:true, |
| | | viewDisplay:true, |
| | | editDisabled:true, |
| | | listType: 'picture', |
| | | listType: "picture", |
| | | span: 24, |
| | | action: "http://web.byisf.com:82/blade-jfpts/depl/put-depl", |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "link", |
| | | } |
| | | }, |
| | | ] |
| | | }, |
| | | data: [] |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | watch:{ |
| | | handler(val) { |
| | | var that = this; |
| | | if (val != null && val !=""){ |
| | | getBaTree(val).then(res => { |
| | | getBaTree(val).then((res) => { |
| | | if (res) { |
| | | that.form.sname = res.data.data.records[0].name; |
| | | } |
| | |
| | | addBtn: this.vaildData(this.permission.feedback_add, false), |
| | | viewBtn: this.vaildData(this.permission.feedback_view, true), |
| | | delBtn: this.vaildData(this.permission.feedback_delete, true), |
| | | editBtn: this.vaildData(this.permission.feedback_edit, true) |
| | | editBtn: this.vaildData(this.permission.feedback_edit, true), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | |
| | | snumber: row.snumber, |
| | | stime:row.stime, |
| | | result:row.result, |
| | | place:row.place |
| | | } |
| | | place: row.place, |
| | | }; |
| | | if (row.images.length > 0) { |
| | | var imageArr = row.images; |
| | | imageArr.forEach( image =>{ |
| | | imageArr.forEach((image) => { |
| | | data.tpaddress += image + ","; |
| | | }) |
| | | }); |
| | | data.tpaddress = data.tpaddress.substring(0,data.tpaddress.length-1); |
| | | } |
| | | if (row.videos.length > 0) { |
| | |
| | | //data.spaddress = data.spaddress.substring(0,data.spaddress.length-1); |
| | | data.spaddress = row.videos; |
| | | } |
| | | adds(data).then(() => { |
| | | adds(data).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | window.console.log(error); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | var data = { |
| | |
| | | snumber: row.snumber, |
| | | stime:row.stime, |
| | | result:row.result, |
| | | place:row.place |
| | | } |
| | | place: row.place, |
| | | }; |
| | | if (row.images.length > 0) { |
| | | var imageArr = row.images; |
| | | imageArr.forEach( image =>{ |
| | | imageArr.forEach((image) => { |
| | | data.tpaddress += image + ","; |
| | | }) |
| | | }); |
| | | data.tpaddress = data.tpaddress.substring(0,data.tpaddress.length-1); |
| | | } |
| | | if (row.videos.length > 0) { |
| | |
| | | //data.spaddress = data.spaddress.substring(0,data.spaddress.length-1); |
| | | data.spaddress = row.videos; |
| | | } |
| | | updates(data).then(() => { |
| | | updates(data).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | console.log(error); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetails(this.form.id).then(res => { |
| | | getDetails(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | this.images = res.data.data.images; |
| | | this.videos = res.data.data.videos; |
| | |
| | | const { dateTime } = this.query; |
| | | let values = { |
| | | ...params, |
| | | status:1 |
| | | status: 1, |
| | | }; |
| | | if (dateTime) { |
| | | values = { |
| | |
| | | values.dateTime = null; |
| | | } |
| | | this.loading = true; |
| | | getListReport(page.currentPage, page.pageSize,values).then(res => { |
| | | getListReport(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page="page" |
| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | v-bind:class="activeClass == 0 ? 'btn-color' : ''" |
| | |
| | | </template> |
| | | |
| | | <template slot="menuLeft"> |
| | | <el-button type="warning" |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-download" |
| | | @click="handleExport">导出 |
| | | @click="handleExport" |
| | | >导出 |
| | | </el-button> |
| | | <el-button type="warning" |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-pie-chart" |
| | | @click="handleExportStatis">导出报表 |
| | | @click="handleExportStatis" |
| | | >导出报表 |
| | | </el-button> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | menu:false, |
| | | height:'auto', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | border: false, |
| | | stripe:true, |
| | | //stripe:true, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | |
| | | selection: true, |
| | | labelWidth:120, |
| | | dialogClickModal: false, |
| | | headerAlign: 'center', |
| | | align: 'center', |
| | | headerAlign: "center", |
| | | align: "center", |
| | | column: [ |
| | | { |
| | | label: '坐标', |
| | | prop: 'test', |
| | | label: "坐标", |
| | | prop: "test", |
| | | hide: true, |
| | | span: 24, |
| | | component: "avueMap", |
| | | clickChild: (obj) => { |
| | | this.form.jd = obj.latitude |
| | | this.form.wd = obj.longitude |
| | | this.form.jd = obj.latitude; |
| | | this.form.wd = obj.longitude; |
| | | }, |
| | | }, |
| | | { |
| | | label: "检测时间", |
| | | prop: "dtime" |
| | | prop: "dtime", |
| | | }, |
| | | { |
| | | label: '性别', |
| | | prop: 'sex' |
| | | label: "性别", |
| | | prop: "sex", |
| | | }, |
| | | { |
| | | label: "检测时间", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: '省份', |
| | | prop: 'province', |
| | | label: "省份", |
| | | prop: "province", |
| | | //search: true, |
| | | searchSpan: 3, |
| | | type: 'select', |
| | | type: "select", |
| | | props: { |
| | | label: 'name', |
| | | value: 'name' |
| | | label: "name", |
| | | value: "name", |
| | | }, |
| | | cascaderItem: ['city', 'district'], |
| | | dicUrl: '/api/blade-system/region/select', |
| | | cascaderItem: ["city", "district"], |
| | | dicUrl: "/api/blade-system/region/select", |
| | | span: 6, |
| | | }, |
| | | { |
| | | label: '地市', |
| | | prop: 'city', |
| | | type: 'select', |
| | | label: "地市", |
| | | prop: "city", |
| | | type: "select", |
| | | searchSpan: 3, |
| | | //search: true, |
| | | props: { |
| | | label: 'name', |
| | | value: 'name' |
| | | label: "name", |
| | | value: "name", |
| | | }, |
| | | dicUrl: '/api/blade-system/region/select?code={{key}}', |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 6, |
| | | }, |
| | | { |
| | | label: '区县', |
| | | label: "区县", |
| | | searchSpan: 3, |
| | | //search: true, |
| | | prop: 'district', |
| | | type: 'select', |
| | | prop: "district", |
| | | type: "select", |
| | | props: { |
| | | label: 'name', |
| | | value: 'name' |
| | | label: "name", |
| | | value: "name", |
| | | }, |
| | | dicUrl: '/api/blade-system/region/select?code={{key}}', |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 6, |
| | | }, |
| | | { |
| | |
| | | dicData: [ |
| | | { |
| | | label: "绿色", |
| | | value: "1" |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "黄色", |
| | | value: "2" |
| | | value: "2", |
| | | }, |
| | | { |
| | | label: "红色", |
| | | value: "3" |
| | | } |
| | | value: "3", |
| | | }, |
| | | ], |
| | | } |
| | | ] |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | isActive: false, |
| | | recorder: null, |
| | | }; |
| | | }, |
| | | mounted(){ |
| | | |
| | | }, |
| | | mounted() {}, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false) |
| | | editBtn: this.vaildData(null, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | beforeOpen(done, type) { |
| | | }, |
| | | beforeOpen(done, type) {}, |
| | | searchReset() { |
| | | //清空搜索框中的内容 |
| | | this.query = {}; |
| | |
| | | rowStyle({row, column, rowIndex}){ |
| | | if(row.type=="3"){ |
| | | return { |
| | | color:"#fe1515" |
| | | } |
| | | color: "#fe1515", |
| | | }; |
| | | } |
| | | }, |
| | | getStartTime(){ |
| | | if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) { |
| | | return this.$route.query.startTime |
| | | if ( |
| | | this.$route.query.startTime != undefined && |
| | | this.$route.query.startTime != null && |
| | | this.$route.query.startTime != "" |
| | | ) { |
| | | return this.$route.query.startTime; |
| | | } |
| | | // 当前时间 |
| | | var date = new Date(); |
| | | //年 |
| | | var Y = date.getFullYear(); |
| | | //月 |
| | | var M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; |
| | | var M = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | //日 |
| | | var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | return Y + "-" + M + "-" + D; |
| | | }, |
| | | getEndTime(){ |
| | | if (this.$route.query.endTime != undefined && this.$route.query.endTime != null && this.$route.query.endTime != "" ) { |
| | | return this.$route.query.endTime |
| | | if ( |
| | | this.$route.query.endTime != undefined && |
| | | this.$route.query.endTime != null && |
| | | this.$route.query.endTime != "" |
| | | ) { |
| | | return this.$route.query.endTime; |
| | | } |
| | | // 当前时间 |
| | | var date = new Date(); |
| | | //年 |
| | | var Y = date.getFullYear(); |
| | | //月 |
| | | var M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; |
| | | var M = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | //日 |
| | | var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | return Y + "-" + M + "-" + D; |
| | |
| | | var params ={}; |
| | | if(e==0){ |
| | | //修改搜索框中的值 |
| | | this.search.releaseTimeRange=[this.showToDay(today)+" 00:00:00",this.showToDay(today)+" 23:59:59"] |
| | | this.search.releaseTimeRange = [ |
| | | this.showToDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | if(e==1){ |
| | | //修改搜索框中的值 |
| | | this.search.releaseTimeRange=[this.showWeekFirstDay(today)+" 00:00:00",this.showToDay(today)+" 23:59:59"] |
| | | this.search.releaseTimeRange = [ |
| | | this.showWeekFirstDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | if(e==2){ |
| | | //修改搜索框中的值 |
| | | this.search.releaseTimeRange=[this.showMonthFirstDay(today)+" 00:00:00",this.showToDay(today)+" 23:59:59"] |
| | | this.search.releaseTimeRange = [ |
| | | this.showMonthFirstDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | params = { |
| | | ... params, |
| | | status: e |
| | | status: e, |
| | | }; |
| | | if(this.search.type){ |
| | | params = { |
| | | ... params, |
| | | type: this.search.type |
| | | type: this.search.type, |
| | | }; |
| | | } |
| | | this.query=params; |
| | |
| | | |
| | | //本月第一天 |
| | | showMonthFirstDay(Nowdate){ |
| | | var MonthFirstDay=new Date(Nowdate.getFullYear(),Nowdate.getMonth(),1); |
| | | var MonthFirstDay = new Date( |
| | | Nowdate.getFullYear(), |
| | | Nowdate.getMonth(), |
| | | 1 |
| | | ); |
| | | var M=Number(MonthFirstDay.getMonth())+1; |
| | | if(M<10){ |
| | | M="0"+M; |
| | | } |
| | | return MonthFirstDay.getFullYear()+"-"+M+"-"+"0"+MonthFirstDay.getDate(); |
| | | return ( |
| | | MonthFirstDay.getFullYear() + |
| | | "-" + |
| | | M + |
| | | "-" + |
| | | "0" + |
| | | MonthFirstDay.getDate() |
| | | ); |
| | | }, |
| | | //数据导出 |
| | | handleExport() { |
| | | this.$confirm("是否导出健康码数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }).then(() => { |
| | | window.open(`/api/healthcode/healthcode/export-healthcode?begTime=${this.$route.query.startTime}&endTime=${this.$route.query.endTime}&type=${this.$route.query.type}&timeDesc=${this.$route.query.timeDesc}`); |
| | | window.open( |
| | | `/api/healthcode/healthcode/export-healthcode?begTime=${this.$route.query.startTime}&endTime=${this.$route.query.endTime}&type=${this.$route.query.type}&timeDesc=${this.$route.query.timeDesc}` |
| | | ); |
| | | }); |
| | | }, |
| | | //数据报表导出 |
| | | handleExportStatis() { |
| | | let begTime = this.$route.query.startTime==undefined? '':this.$route.query.startTime; |
| | | let endTime = this.$route.query.endTime==undefined? '':this.$route.query.endTime; |
| | | let type = this.$route.query.type==undefined? '':this.$route.query.type; |
| | | let timeDesc = this.$route.query.timeDesc==undefined? '':this.$route.query.timeDesc; |
| | | let begTime = |
| | | this.$route.query.startTime == undefined |
| | | ? "" |
| | | : this.$route.query.startTime; |
| | | let endTime = |
| | | this.$route.query.endTime == undefined ? "" : this.$route.query.endTime; |
| | | let type = |
| | | this.$route.query.type == undefined ? "" : this.$route.query.type; |
| | | let timeDesc = |
| | | this.$route.query.timeDesc == undefined |
| | | ? "" |
| | | : this.$route.query.timeDesc; |
| | | //window.open(`http://localhost:8108/ureport/excel?_u=blade-healthcode.statis.xml.ureport.xml&begTime=${begTime}&endTime=${endTime}&type=${type}&timeDesc=${timeDesc}`); |
| | | window.open(`https://web.byisf.com/api/blade-report/ureport/preview?_u=blade-healthcode.statis.xml.ureport.xml&begTime=${begTime}&endTime=${endTime}&type=${type}&timeDesc=${timeDesc}`); |
| | | window.open( |
| | | `https://web.byisf.com/api/blade-report/ureport/preview?_u=blade-healthcode.statis.xml.ureport.xml&begTime=${begTime}&endTime=${endTime}&type=${type}&timeDesc=${timeDesc}` |
| | | ); |
| | | }, |
| | | onLoad(page, params={}) { |
| | | const { dateTime } = this.query; |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | if (this.$route.query.status!=undefined && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) { |
| | | if ( |
| | | this.$route.query.status != undefined && |
| | | this.$route.query != undefined && |
| | | this.$route.query != null && |
| | | this.$route.query != "" |
| | | ) { |
| | | if (this.$route.query.type != undefined) { |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | status:this.$route.query.status, |
| | | type:this.$route.query.type |
| | | } |
| | | type: this.$route.query.type, |
| | | }; |
| | | } else { |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | type:this.$route.query.status |
| | | type: this.$route.query.status, |
| | | }; |
| | | } |
| | | this.activeClass =4; |
| | |
| | | params = { |
| | | type: this.$route.query.type, |
| | | begTime: this.$route.query.startTime, |
| | | endTime: this.$route.query.endTime |
| | | } |
| | | endTime: this.$route.query.endTime, |
| | | }; |
| | | this.activeClass =4; |
| | | } |
| | | // else{ |
| | |
| | | if(this.activeClass == 0 && this.query.dateTime==null){ |
| | | params = { |
| | | status:this.activeClass, |
| | | } |
| | | }; |
| | | } |
| | | |
| | | if (dateTime) { |
| | |
| | | } |
| | | |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize,values).then(res => { |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page="page" |
| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | |
| | | @on-load="onLoad" |
| | | > |
| | | <!-- <template slot-scope="{ type, size, row }" slot="menu"> |
| | | |
| | | <el-button |
| | |
| | | </template> |
| | | |
| | | <template slot="menuLeft"> |
| | | <el-button type="warning" |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-download" |
| | | @click="handleExport">导出 |
| | | @click="handleExport" |
| | | >导出 |
| | | </el-button> |
| | | |
| | | <el-button type="warning" |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-pie-chart" |
| | | @click="handleExportStatis">导出报表 |
| | | @click="handleExportStatis" |
| | | >导出报表 |
| | | </el-button> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | <template> |
| | | <div> |
| | |
| | | class="img" |
| | | v-if="showViewer" |
| | | :on-close="closeViewer" |
| | | :url-list="['data:image/png;base64,'+imgUrl]" /> |
| | | :url-list="['data:image/png;base64,' + imgUrl]" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList,exportParcelStatis, getParcelPic} from "@/api/parcel/parcel"; |
| | | import {mapGetters} from "vuex"; |
| | | import ElImageViewer from 'element-ui/packages/image/src/image-viewer' |
| | | import ElImageViewer from "element-ui/packages/image/src/image-viewer"; |
| | | |
| | | export default { |
| | | name:'index', |
| | | name: "index", |
| | | components: { ElImageViewer }, |
| | | data() { |
| | | return { |
| | |
| | | search:{}, |
| | | showViewer: false, // 显示查看器 |
| | | activeClass: 0, |
| | | imgUrl:'', |
| | | imgUrl: "", |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | menu:false, |
| | | height:'auto', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | stripe:true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | labelWidth:120, |
| | | menuWidth:220, |
| | | dialogClickModal: false, |
| | | headerAlign: 'center', |
| | | align: 'center', |
| | | headerAlign: "center", |
| | | align: "center", |
| | | tree:true, |
| | | column: [ |
| | | { |
| | | label: '坐标', |
| | | prop: 'test', |
| | | label: "坐标", |
| | | prop: "test", |
| | | hide: true, |
| | | span: 50, |
| | | component: "avueMap", |
| | | clickChild: (obj) => { |
| | | this.form.jd = obj.latitude |
| | | this.form.wd = obj.longitude |
| | | this.form.jd = obj.latitude; |
| | | this.form.wd = obj.longitude; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: "包裹图片KEY", |
| | | prop: "imgUrl", |
| | | hide:true |
| | | hide: true, |
| | | }, |
| | | // { |
| | | // label: '包裹图片', |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "是否违禁", |
| | |
| | | dicData: [ |
| | | { |
| | | label: "是", |
| | | value: 1 |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "否", |
| | | value: 0 |
| | | value: 0, |
| | | }, |
| | | ] |
| | | ], |
| | | }, |
| | | { |
| | | label: "是否违禁", |
| | |
| | | dicData: [ |
| | | { |
| | | label: "是", |
| | | value: "contraband" |
| | | value: "contraband", |
| | | }, |
| | | { |
| | | label: "否", |
| | | value: "normal" |
| | | value: "normal", |
| | | }, |
| | | ] |
| | | ], |
| | | }, |
| | | { |
| | | label: "违禁包裹物品", |
| | | prop: "decisioDiagramResultDetails", |
| | | } |
| | | ] |
| | | }, |
| | | data: [] |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false) |
| | | editBtn: this.vaildData(null, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | beforeOpen(done, type) { |
| | |
| | | }, |
| | | rowClick(row){ |
| | | var that=this; |
| | | getParcelPic(row.imgUrl).then(res => { |
| | | getParcelPic(row.imgUrl).then((res) => { |
| | | that.imgUrl = res.data.data.imgBase64; |
| | | this.showViewer = true |
| | | this.showViewer = true; |
| | | }); |
| | | }, |
| | | selectionChange(list) { |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | getStartTime(){ |
| | | if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) { |
| | | return this.$route.query.startTime |
| | | if ( |
| | | this.$route.query.startTime != undefined && |
| | | this.$route.query.startTime != null && |
| | | this.$route.query.startTime != "" |
| | | ) { |
| | | return this.$route.query.startTime; |
| | | } |
| | | // 当前时间 |
| | | var date = new Date(); |
| | | //年 |
| | | var Y = date.getFullYear(); |
| | | //月 |
| | | var M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; |
| | | var M = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | //日 |
| | | var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | return Y + "-" + M + "-" + D+ " 00:00:00"; |
| | | }, |
| | | getEndTime(){ |
| | | if (this.$route.query.endTime != undefined && this.$route.query.endTime != null && this.$route.query.endTime != "" ) { |
| | | return this.$route.query.endTime |
| | | if ( |
| | | this.$route.query.endTime != undefined && |
| | | this.$route.query.endTime != null && |
| | | this.$route.query.endTime != "" |
| | | ) { |
| | | return this.$route.query.endTime; |
| | | } |
| | | // 当前时间 |
| | | var date = new Date(); |
| | | //年 |
| | | var Y = date.getFullYear(); |
| | | //月 |
| | | var M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; |
| | | var M = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | //日 |
| | | var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | return Y + "-" + M + "-" + D+ " 23:59:59"; |
| | | }, |
| | | getIsKindParams(){ |
| | | if(this.$route.query.decisioDiagramResult && this.$route.query!='' && this.$route.query!=null && this.$route.query!=undefined){ |
| | | if ( |
| | | this.$route.query.decisioDiagramResult && |
| | | this.$route.query != "" && |
| | | this.$route.query != null && |
| | | this.$route.query != undefined |
| | | ) { |
| | | //回显 |
| | | return this.$route.query.decisioDiagramResult |
| | | return this.$route.query.decisioDiagramResult; |
| | | } |
| | | }, |
| | | //给行加颜色 |
| | | rowStyle({row, column, rowIndex}){ |
| | | if(row.mechineMark==1){ |
| | | return { |
| | | color:"#fe1515" |
| | | } |
| | | color: "#fe1515", |
| | | }; |
| | | } |
| | | }, |
| | | getParcelData(e) { |
| | |
| | | if(e==0){ |
| | | params = { |
| | | startTime:this.showToDay(today)+ " 00:00:00", |
| | | endTime:this.showToDay(today)+ " 23:59:59" |
| | | endTime: this.showToDay(today) + " 23:59:59", |
| | | }; |
| | | //修改搜索框中的值 |
| | | this.search.dateTime=[this.showToDay(today)+ " 00:00:00",this.showToDay(today)+ " 23:59:59"] |
| | | this.search.dateTime = [ |
| | | this.showToDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | if(e==1){ |
| | | params = { |
| | | startTime:this.showWeekFirstDay(today)+ " 00:00:00", |
| | | endTime:this.showToDay(today)+ " 23:59:59" |
| | | endTime: this.showToDay(today) + " 23:59:59", |
| | | }; |
| | | //修改搜索框中的值 |
| | | this.search.dateTime=[this.showWeekFirstDay(today)+ " 00:00:00",this.showToDay(today)+ " 23:59:59"] |
| | | this.search.dateTime = [ |
| | | this.showWeekFirstDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | if(e==2){ |
| | | params = { |
| | | startTime:this.showMonthFirstDay(today)+ " 00:00:00", |
| | | endTime:this.showToDay(today)+ " 23:59:59" |
| | | endTime: this.showToDay(today) + " 23:59:59", |
| | | }; |
| | | //修改搜索框中的值 |
| | | this.search.dateTime=[this.showMonthFirstDay(today)+ " 00:00:00",this.showToDay(today)+ " 23:59:59"] |
| | | this.search.dateTime = [ |
| | | this.showMonthFirstDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | |
| | | if(this.search.decisioDiagramResult){ |
| | | params= { |
| | | ... params, |
| | | decisioDiagramResult:this.search.decisioDiagramResult |
| | | } |
| | | decisioDiagramResult: this.search.decisioDiagramResult, |
| | | }; |
| | | } |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | |
| | | |
| | | //本月第一天 |
| | | showMonthFirstDay(Nowdate){ |
| | | var MonthFirstDay=new Date(Nowdate.getFullYear(),Nowdate.getMonth(),1); |
| | | var MonthFirstDay = new Date( |
| | | Nowdate.getFullYear(), |
| | | Nowdate.getMonth(), |
| | | 1 |
| | | ); |
| | | var M=Number(MonthFirstDay.getMonth())+1; |
| | | if(M<10){ |
| | | M="0"+M; |
| | | } |
| | | return MonthFirstDay.getFullYear()+"-"+M+"-"+"0"+MonthFirstDay.getDate(); |
| | | return ( |
| | | MonthFirstDay.getFullYear() + |
| | | "-" + |
| | | M + |
| | | "-" + |
| | | "0" + |
| | | MonthFirstDay.getDate() |
| | | ); |
| | | }, |
| | | //数据导出 |
| | | handleExport() { |
| | | this.$confirm("是否导出包裹数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }).then(() => { |
| | | window.open(`/api/parcel/parcel/export-parcel?startTime=${this.$route.query.startTime}&endTime=${this.$route.query.endTime}&decisioDiagramResult=${this.$route.query.decisioDiagramResult}`); |
| | | window.open( |
| | | `/api/parcel/parcel/export-parcel?startTime=${this.$route.query.startTime}&endTime=${this.$route.query.endTime}&decisioDiagramResult=${this.$route.query.decisioDiagramResult}` |
| | | ); |
| | | }); |
| | | }, |
| | | //数据报表导出 |
| | | handleExportStatis() { |
| | | let startTime = this.$route.query.startTime==undefined? '':this.$route.query.startTime; |
| | | let endTime = this.$route.query.endTime==undefined? '':this.$route.query.endTime; |
| | | let decisioDiagramResult = this.$route.query.decisioDiagramResult==undefined? '':this.$route.query.decisioDiagramResult; |
| | | let timeDesc = this.$route.query.timeDesc==undefined? '':this.$route.query.timeDesc; |
| | | let startTime = |
| | | this.$route.query.startTime == undefined |
| | | ? "" |
| | | : this.$route.query.startTime; |
| | | let endTime = |
| | | this.$route.query.endTime == undefined ? "" : this.$route.query.endTime; |
| | | let decisioDiagramResult = |
| | | this.$route.query.decisioDiagramResult == undefined |
| | | ? "" |
| | | : this.$route.query.decisioDiagramResult; |
| | | let timeDesc = |
| | | this.$route.query.timeDesc == undefined |
| | | ? "" |
| | | : this.$route.query.timeDesc; |
| | | //window.open(`http://localhost:8108/ureport/excel?_u=blade-parcel.statis.ureport.xml&startTime=${startTime}&endTime=${endTime}&decisioDiagramResult=${decisioDiagramResult}&timeDesc=${timeDesc}`); |
| | | window.open(`https://web.byisf.com/api/blade-report/ureport/preview?_u=blade-parcel.statis.ureport.xml&startTime=${startTime}&endTime=${endTime}&decisioDiagramResult=${decisioDiagramResult}&timeDesc=${timeDesc}`); |
| | | window.open( |
| | | `https://web.byisf.com/api/blade-report/ureport/preview?_u=blade-parcel.statis.ureport.xml&startTime=${startTime}&endTime=${endTime}&decisioDiagramResult=${decisioDiagramResult}&timeDesc=${timeDesc}` |
| | | ); |
| | | }, |
| | | onLoad(page, params={}) { |
| | | const { dateTime } = this.query; |
| | |
| | | ...params, |
| | | }; |
| | | |
| | | if (this.$route.query.decisioDiagramResult && this.$route.query!='' && this.$route.query!=null && this.$route.query!=undefined ) { |
| | | if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) { |
| | | if ( |
| | | this.$route.query.decisioDiagramResult && |
| | | this.$route.query != "" && |
| | | this.$route.query != null && |
| | | this.$route.query != undefined |
| | | ) { |
| | | if ( |
| | | this.$route.query.startTime != undefined && |
| | | this.$route.query.startTime != null && |
| | | this.$route.query.startTime != "" |
| | | ) { |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | startTime:this.$route.query.startTime, |
| | | endTime:this.$route.query.endTime, |
| | | decisioDiagramResult:this.$route.query.decisioDiagramResult |
| | | } |
| | | decisioDiagramResult: this.$route.query.decisioDiagramResult, |
| | | }; |
| | | } else { |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | decisioDiagramResult:this.$route.query.decisioDiagramResult |
| | | decisioDiagramResult: this.$route.query.decisioDiagramResult, |
| | | }; |
| | | } |
| | | this.activeClass=4; |
| | | }else{ |
| | | if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) { |
| | | if ( |
| | | this.$route.query.startTime != undefined && |
| | | this.$route.query.startTime != null && |
| | | this.$route.query.startTime != "" |
| | | ) { |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | startTime:this.$route.query.startTime, |
| | | endTime:this.$route.query.endTime |
| | | } |
| | | endTime: this.$route.query.endTime, |
| | | }; |
| | | this.activeClass=4; |
| | | } |
| | | |
| | |
| | | //年 |
| | | var Y = date.getFullYear(); |
| | | //月 |
| | | var M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; |
| | | var M = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | //日 |
| | | var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | params = { |
| | | startTime:Y + "-" + M + "-" + D + " 00:00:00", |
| | | endTime:Y +"-" +M +"-" + D + " 23:59:59" |
| | | } |
| | | endTime: Y + "-" + M + "-" + D + " 23:59:59", |
| | | }; |
| | | } |
| | | } |
| | | |
| | |
| | | ...params, |
| | | ...this.query, |
| | | }; |
| | | |
| | | } |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize,values).then(res => { |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.totalSize; |
| | | this.data = data.data; |
| | |
| | | }, |
| | | // 关闭查看器 |
| | | closeViewer() { |
| | | this.showViewer = false |
| | | } |
| | | } |
| | | this.showViewer = false; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page="page" |
| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | @on-load="onLoad" |
| | | > |
| | | <!-- <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | v-if="row.imgUrl != null || row.imgUrl != ''" |
| | |
| | | </template> |
| | | |
| | | <template slot="menuLeft"> |
| | | <el-button type="warning" |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-download" |
| | | @click="handleExport">导出 |
| | | @click="handleExport" |
| | | >导出 |
| | | </el-button> |
| | | <el-button type="warning" |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-pie-chart" |
| | | @click="handleExportStatis">导出报表 |
| | | @click="handleExportStatis" |
| | | >导出报表 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | class="img" |
| | | v-if="showViewer" |
| | | :on-close="closeViewer" |
| | | :url-list="['data:image/png;base64,'+imgUrl]" /> |
| | | :url-list="['data:image/png;base64,' + imgUrl]" |
| | | /> |
| | | </div> |
| | | </template> |
| | | </basic-container> |
| | | |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import {getKindList, getParcelPic} from "@/api/parcel/parcel"; |
| | | import {mapGetters} from "vuex"; |
| | | import Vue from 'vue'; |
| | | import ElementUI from 'element-ui' |
| | | import 'element-ui/lib/theme-chalk/index.css' |
| | | import ElImageViewer from 'element-ui/packages/image/src/image-viewer' |
| | | Vue.use(ElementUI) |
| | | |
| | | import Vue from "vue"; |
| | | import ElementUI from "element-ui"; |
| | | import "element-ui/lib/theme-chalk/index.css"; |
| | | import ElImageViewer from "element-ui/packages/image/src/image-viewer"; |
| | | Vue.use(ElementUI); |
| | | |
| | | export default { |
| | | name:'index', |
| | | name: "index", |
| | | components: { ElImageViewer }, |
| | | data() { |
| | | return { |
| | |
| | | search:{}, |
| | | showViewer: false, // 显示查看器 |
| | | activeClass:0, |
| | | imgUrl:'', |
| | | imgUrl: "", |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | menu:false, |
| | | height:'auto', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 4, |
| | | menuWidth:150, |
| | | border: false, |
| | | stripe:true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | labelWidth:150, |
| | | dialogClickModal: false, |
| | | headerAlign: 'center', |
| | | align: 'center', |
| | | headerAlign: "center", |
| | | align: "center", |
| | | tree:true, |
| | | column: [ |
| | | { |
| | | label: '坐标', |
| | | prop: 'test', |
| | | label: "坐标", |
| | | prop: "test", |
| | | hide: true, |
| | | span: 100, |
| | | component: "avueMap", |
| | | clickChild: (obj) => { |
| | | this.form.jd = obj.latitude |
| | | this.form.wd = obj.longitude |
| | | this.form.jd = obj.latitude; |
| | | this.form.wd = obj.longitude; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: "包裹图片KEY", |
| | | prop: "imgUrl", |
| | | hide:true |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: "安检时间", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "违禁类型", |
| | |
| | | // ] |
| | | // }, |
| | | { |
| | | label: '违禁品名称', |
| | | prop: 'objName' |
| | | label: "违禁品名称", |
| | | prop: "objName", |
| | | }, |
| | | { |
| | | label: '违禁品编号', |
| | | prop: 'objCode' |
| | | label: "违禁品编号", |
| | | prop: "objCode", |
| | | }, |
| | | { |
| | | label: '等级', |
| | | prop: 'levName', |
| | | span:120 |
| | | label: "等级", |
| | | prop: "levName", |
| | | span: 120, |
| | | }, |
| | | { |
| | | label: '坐标', |
| | | prop: 'coords', |
| | | span:500 |
| | | } |
| | | ] |
| | | label: "坐标", |
| | | prop: "coords", |
| | | span: 500, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | flag: false |
| | | flag: false, |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false) |
| | | editBtn: this.vaildData(null, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | beforeOpen(done, type) { |
| | | |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | |
| | | }, |
| | | rowClick(row){ |
| | | var that=this; |
| | | getParcelPic(row.imgUrl).then(res => { |
| | | getParcelPic(row.imgUrl).then((res) => { |
| | | that.imgUrl = res.data.data.imgBase64; |
| | | this.showViewer = true |
| | | this.showViewer = true; |
| | | }); |
| | | }, |
| | | currentChange(currentPage){ |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | getStartTime(){ |
| | | if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) { |
| | | return this.$route.query.startTime |
| | | if ( |
| | | this.$route.query.startTime != undefined && |
| | | this.$route.query.startTime != null && |
| | | this.$route.query.startTime != "" |
| | | ) { |
| | | return this.$route.query.startTime; |
| | | } |
| | | // 当前时间 |
| | | var date = new Date(); |
| | | //年 |
| | | var Y = date.getFullYear(); |
| | | //月 |
| | | var M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; |
| | | var M = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | //日 |
| | | var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | return Y + "-" + M + "-" + D+ " 00:00:00"; |
| | | }, |
| | | getEndTime(){ |
| | | if (this.$route.query.endTime != undefined && this.$route.query.endTime != null && this.$route.query.endTime != "" ) { |
| | | return this.$route.query.endTime |
| | | if ( |
| | | this.$route.query.endTime != undefined && |
| | | this.$route.query.endTime != null && |
| | | this.$route.query.endTime != "" |
| | | ) { |
| | | return this.$route.query.endTime; |
| | | } |
| | | // 当前时间 |
| | | var date = new Date(); |
| | | //年 |
| | | var Y = date.getFullYear(); |
| | | //月 |
| | | var M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; |
| | | var M = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | //日 |
| | | var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | return Y + "-" + M + "-" + D+ " 23:59:59"; |
| | |
| | | if(e==0){ |
| | | params = { |
| | | startTime:this.showToDay(today)+ " 00:00:00", |
| | | endTime:this.showToDay(today)+ " 23:59:59" |
| | | endTime: this.showToDay(today) + " 23:59:59", |
| | | }; |
| | | //修改搜索框中的值 |
| | | this.search.dateTime=[this.showToDay(today)+ " 00:00:00",this.showToDay(today)+ " 23:59:59"] |
| | | this.search.dateTime = [ |
| | | this.showToDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | if(e==1){ |
| | | params = { |
| | | startTime:this.showWeekFirstDay(today)+ " 00:00:00", |
| | | endTime:this.showToDay(today)+ " 23:59:59" |
| | | endTime: this.showToDay(today) + " 23:59:59", |
| | | }; |
| | | //修改搜索框中的值 |
| | | this.search.dateTime=[this.showWeekFirstDay(today)+ " 00:00:00",this.showToDay(today)+ " 23:59:59"] |
| | | this.search.dateTime = [ |
| | | this.showWeekFirstDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | if(e==2){ |
| | | params = { |
| | | startTime:this.showMonthFirstDay(today)+ " 00:00:00", |
| | | endTime:this.showToDay(today)+ " 23:59:59" |
| | | endTime: this.showToDay(today) + " 23:59:59", |
| | | }; |
| | | //修改搜索框中的值 |
| | | this.search.dateTime=[this.showMonthFirstDay(today)+ " 00:00:00",this.showToDay(today)+ " 23:59:59"] |
| | | this.search.dateTime = [ |
| | | this.showMonthFirstDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | |
| | | |
| | | //本月第一天 |
| | | showMonthFirstDay(Nowdate){ |
| | | var MonthFirstDay=new Date(Nowdate.getFullYear(),Nowdate.getMonth(),1); |
| | | var MonthFirstDay = new Date( |
| | | Nowdate.getFullYear(), |
| | | Nowdate.getMonth(), |
| | | 1 |
| | | ); |
| | | var M=Number(MonthFirstDay.getMonth())+1; |
| | | if(M<10){ |
| | | M="0"+M; |
| | | } |
| | | return MonthFirstDay.getFullYear()+"-"+M+"-"+"0"+MonthFirstDay.getDate(); |
| | | return ( |
| | | MonthFirstDay.getFullYear() + |
| | | "-" + |
| | | M + |
| | | "-" + |
| | | "0" + |
| | | MonthFirstDay.getDate() |
| | | ); |
| | | }, |
| | | //给行加颜色 |
| | | rowStyle({row, column, rowIndex}){ |
| | | return { |
| | | color:"#fe1515" |
| | | } |
| | | color: "#fe1515", |
| | | }; |
| | | }, |
| | | //数据导出 |
| | | handleExport() { |
| | | this.$confirm("是否导出违禁品数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }).then(() => { |
| | | window.open(`/api/parcel/parcel/export-parcelKind?startTime=${this.$route.query.startTime}&endTime=${this.$route.query.endTime}&decisioDiagramResult=${this.$route.query.decisioDiagramResult}&timeDesc=${this.$route.query.timeDesc}`); |
| | | window.open( |
| | | `/api/parcel/parcel/export-parcelKind?startTime=${this.$route.query.startTime}&endTime=${this.$route.query.endTime}&decisioDiagramResult=${this.$route.query.decisioDiagramResult}&timeDesc=${this.$route.query.timeDesc}` |
| | | ); |
| | | }); |
| | | }, |
| | | //数据报表导出 |
| | | handleExportStatis() { |
| | | let startTime = this.$route.query.startTime==undefined? '':this.$route.query.startTime; |
| | | let endTime = this.$route.query.endTime==undefined? '':this.$route.query.endTime; |
| | | let decisioDiagramResult = this.$route.query.decisioDiagramResult==undefined? '':this.$route.query.decisioDiagramResult; |
| | | let startTime = |
| | | this.$route.query.startTime == undefined |
| | | ? "" |
| | | : this.$route.query.startTime; |
| | | let endTime = |
| | | this.$route.query.endTime == undefined ? "" : this.$route.query.endTime; |
| | | let decisioDiagramResult = |
| | | this.$route.query.decisioDiagramResult == undefined |
| | | ? "" |
| | | : this.$route.query.decisioDiagramResult; |
| | | let timeDesc = this.$route.query.timeDesc; |
| | | //window.open(`http://localhost:8108/ureport/excel?_u=blade-parcelKind.statis.ureport.xml&startTime=${startTime}&endTime=${endTime}&decisioDiagramResult=${decisioDiagramResult}&timeDesc=${timeDesc}`); |
| | | //window.open(`http://localhost:8108/ureport/preview?_u=blade-parcelKind.statis.ureport.xml&startTime=${startTime}&endTime=${endTime}&decisioDiagramResult=${decisioDiagramResult}&timeDesc=${timeDesc}`); |
| | | window.open(`https://web.byisf.com/api/blade-report/ureport/preview?_u=blade-parcelKind.statis.ureport.xml&startTime=${startTime}&endTime=${endTime}&decisioDiagramResult=${decisioDiagramResult}&timeDesc=${timeDesc}`); |
| | | window.open( |
| | | `https://web.byisf.com/api/blade-report/ureport/preview?_u=blade-parcelKind.statis.ureport.xml&startTime=${startTime}&endTime=${endTime}&decisioDiagramResult=${decisioDiagramResult}&timeDesc=${timeDesc}` |
| | | ); |
| | | }, |
| | | onLoad(page, params={}) { |
| | | const { dateTime } = this.query; |
| | |
| | | ...params, |
| | | }; |
| | | |
| | | if (this.$route.query.decisioDiagramResult && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) { |
| | | if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) { |
| | | if ( |
| | | this.$route.query.decisioDiagramResult && |
| | | this.$route.query != undefined && |
| | | this.$route.query != null && |
| | | this.$route.query != "" |
| | | ) { |
| | | if ( |
| | | this.$route.query.startTime != undefined && |
| | | this.$route.query.startTime != null && |
| | | this.$route.query.startTime != "" |
| | | ) { |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | startTime:this.$route.query.startTime, |
| | | endTime:this.$route.query.endTime, |
| | | decisioDiagramResult:this.$route.query.decisioDiagramResult |
| | | } |
| | | decisioDiagramResult: this.$route.query.decisioDiagramResult, |
| | | }; |
| | | } else { |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | decisioDiagramResult:this.$route.query.decisioDiagramResult |
| | | decisioDiagramResult: this.$route.query.decisioDiagramResult, |
| | | }; |
| | | } |
| | | this.activeClass=4; |
| | |
| | | //年 |
| | | var Y = date.getFullYear(); |
| | | //月 |
| | | var M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; |
| | | var M = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | //日 |
| | | var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | params = { |
| | | startTime:Y + "-" + M + "-" + D + " 00:00:00", |
| | | endTime:Y +"-" +M +"-" + D + " 23:59:59" |
| | | } |
| | | endTime: Y + "-" + M + "-" + D + " 23:59:59", |
| | | }; |
| | | } |
| | | |
| | | if (dateTime) { |
| | |
| | | } |
| | | |
| | | this.loading = true; |
| | | getKindList(page.currentPage, page.pageSize,values).then(res => { |
| | | getKindList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.totalSize; |
| | | this.data = data.data; |
| | |
| | | }, |
| | | // 关闭查看器 |
| | | closeViewer() { |
| | | this.showViewer = false |
| | | } |
| | | } |
| | | this.showViewer = false; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | @row-click="rowClick"> |
| | | |
| | | @row-click="rowClick" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | |
| | | <template slot-scope="{ row }" slot="jtype"> |
| | | <el-tag |
| | | >{{ |
| | | row.jtype == "0" || row.jtype == "" ? "未派发" : row.jtype == "1" && (row.securityId == null || row.securityId |
| | | == "") |
| | | ? "未接收" : row.jtype == "1" && (row.securityId != null || row.securityId != "") ? "已接收" : "已处置" |
| | | row.jtype == "0" || row.jtype == "" |
| | | ? "未派发" |
| | | : row.jtype == "1" && |
| | | (row.securityId == null || row.securityId == "") |
| | | ? "未接收" |
| | | : row.jtype == "1" && |
| | | (row.securityId != null || row.securityId != "") |
| | | ? "已接收" |
| | | : "已处置" |
| | | }} |
| | | </el-tag> |
| | | </template> |
| | |
| | | labelWidth: "100", |
| | | size: "mini", |
| | | border: false, |
| | | stripe: true, |
| | | //stripe:true, |
| | | menuWidth: 240, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | |
| | | "/api/blade-system/dict-biz/child-list?parentId=1356523651644043266", |
| | | control:(val,form)=>{ |
| | | if (val){ |
| | | debugger |
| | | debugger; |
| | | } |
| | | return { |
| | | text2:{ |
| | | display:true |
| | | display: true, |
| | | }, |
| | | text3:{ |
| | | label:'内容3' |
| | | } |
| | | } |
| | | label: "内容3", |
| | | }, |
| | | }; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | prop: "alarmTime", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择报警时间", |
| | | trigger: "blur" |
| | | }], |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "报警时间", |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, { |
| | | }, |
| | | { |
| | | label: "备注", |
| | | prop: "bz", |
| | | span: 24, |
| | |
| | | label: "地址", |
| | | prop: "place", |
| | | span: 10, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择地址", |
| | | trigger: "blur" |
| | | }], |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: null, |
| | |
| | | width: "100", |
| | | labelWidth: "120", |
| | | formatter: (row, value, label, column) => { |
| | | return value = value.substring(0, 11); |
| | | return (value = value.substring(0, 11)); |
| | | }, |
| | | span: 7, |
| | | }, |
| | |
| | | hide: true, |
| | | prop: "wd", |
| | | formatter: (row, value, label, column) => { |
| | | return value = value.substring(0, 10); |
| | | return (value = value.substring(0, 10)); |
| | | }, |
| | | span: 5, |
| | | }, |
| | |
| | | multiple: true, |
| | | dicUrl: "/api/catalogs/catalogs/getBigTree", |
| | | props: { |
| | | label: "title" |
| | | label: "title", |
| | | }, |
| | | width: 72, |
| | | hide: true, |
| | |
| | | filter:false, |
| | | dicUrl: "/api/routeIn/routein/tree", |
| | | props: { |
| | | label: "title" |
| | | label: "title", |
| | | }, |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | |
| | | //重新加载一次页面详情数据,解决新的省市区无法写入问题 |
| | | //判断是新增还是修改 |
| | | if (that.isEdit) { |
| | | getclient(this.form.id).then(res => { |
| | | getclient(this.form.id).then((res) => { |
| | | // that.province = res.data.data.province; |
| | | // that.city = res.data.data.city; |
| | | // that.district = res.data.data.district; |
| | |
| | | |
| | | var address = val.formattedAddress.toString(); |
| | | if (address.search("县") != -1) { |
| | | this.form.place = address.substring(address.indexOf("县") + 1, address.length); |
| | | this.form.place = address.substring( |
| | | address.indexOf("县") + 1, |
| | | address.length |
| | | ); |
| | | } |
| | | if (address.search("区") != -1) { |
| | | this.form.place = address.substring(address.indexOf("区") + 1, address.length); |
| | | this.form.place = address.substring( |
| | | address.indexOf("区") + 1, |
| | | address.length |
| | | ); |
| | | } |
| | | //写入新的省市区 |
| | | that.form.province = val.addressComponent.province; |
| | |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | 'form.alarmType':{ |
| | | "form.alarmType": { |
| | | handler(val){ |
| | | var xllx =this.findObject(this.option.column,'xllx') |
| | | var xllx = this.findObject(this.option.column, "xllx"); |
| | | if(val==="巡逻任务"){ |
| | | xllx.display=true |
| | | xllx.rules=[{ |
| | | xllx.display = true; |
| | | xllx.rules = [ |
| | | { |
| | | required: true, |
| | | message: "请选择巡逻路线", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ]; |
| | | }else{ |
| | | xllx.display=false |
| | | xllx.rules=[] |
| | | xllx.display = false; |
| | | xllx.rules = []; |
| | | } |
| | | }, |
| | | immediate: true |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | |
| | | if (typeof row.securityArr != "string") { |
| | | var security = ""; |
| | | row.securityArr.forEach((item) => { |
| | |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | |
| | | var userId = JSON.parse( |
| | | window.localStorage.getItem("群防群控后台管理系统-userInfo") |
| | | ).content.real_name; |
| | |
| | | endTime: this.showToDay(today) + " 23:59:59", |
| | | }; |
| | | //修改搜索框中的值 |
| | | this.search.releaseTimeRange = [this.showToDay(today) + " 00:00:00", this.showToDay(today) + " 23:59:59"] |
| | | this.search.releaseTimeRange = [ |
| | | this.showToDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | if (e == 1) { |
| | | params = { |
| | |
| | | endTime: this.showToDay(today) + " 23:59:59", |
| | | }; |
| | | //修改搜索框中的值 |
| | | this.search.releaseTimeRange = [this.showWeekFirstDay(today) + " 00:00:00", this.showToDay(today) + " 23:59:59"] |
| | | this.search.releaseTimeRange = [ |
| | | this.showWeekFirstDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | if (e == 2) { |
| | | params = { |
| | |
| | | endTime: this.showToDay(today) + " 23:59:59", |
| | | }; |
| | | //修改搜索框中的值 |
| | | this.search.releaseTimeRange = [this.showMonthFirstDay(today) + " 00:00:00", this.showToDay(today) + " 23:59:59"] |
| | | this.search.releaseTimeRange = [ |
| | | this.showMonthFirstDay(today) + " 00:00:00", |
| | | this.showToDay(today) + " 23:59:59", |
| | | ]; |
| | | } |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | |
| | | |
| | | //本月第一天 |
| | | showMonthFirstDay(Nowdate) { |
| | | var MonthFirstDay = new Date(Nowdate.getFullYear(), Nowdate.getMonth(), 1); |
| | | var MonthFirstDay = new Date( |
| | | Nowdate.getFullYear(), |
| | | Nowdate.getMonth(), |
| | | 1 |
| | | ); |
| | | var M = Number(MonthFirstDay.getMonth()) + 1; |
| | | if (M < 10) { |
| | | M = "0" + M; |
| | | } |
| | | return MonthFirstDay.getFullYear() + "-" + M + "-" + "0" + MonthFirstDay.getDate(); |
| | | return ( |
| | | MonthFirstDay.getFullYear() + |
| | | "-" + |
| | | M + |
| | | "-" + |
| | | "0" + |
| | | MonthFirstDay.getDate() |
| | | ); |
| | | }, |
| | | getBZdata(e) { |
| | | this.activeClass = e; |
| | |
| | | this.showMap = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.mapDiv.onload = () => { |
| | | window.frames[1].init("ClientManagement", {x: row.jd, y: row.wd, clientID: row.deviceNumber}); |
| | | window.frames[1].init("ClientManagement", { |
| | | x: row.jd, |
| | | y: row.wd, |
| | | clientID: row.deviceNumber, |
| | | }); |
| | | }; |
| | | }); |
| | | }, |
| | |
| | | ); |
| | | //window.open(`http://localhost:8108/ureport/excel?_u=blade-alarm.statis.ureport.xml&beginTime=${beginTime}&endTime=${endTime}&waringType=${waringType}&timeDesc=${timeDesc}`); |
| | | }, |
| | | rowClick(val) {//行点击事件 |
| | | rowClick(val) { |
| | | //行点击事件 |
| | | //警情追踪 |
| | | this.$router.push({path: "/policeTracking/track", query: val}); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | menuWidth: 240, |
| | | size: "mini", |
| | | border: false, |
| | | stripe:true, |
| | | //stripe:true, |
| | | labelWidth: "100", |
| | | dialogWidth: 950, |
| | | tip: false, |
| | |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | .old-video-dialog-box { |
| | | position: absolute !important; |
| | | top: 0px !important; |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page="page" :permission="permissionList" |
| | | :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" |
| | | @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange" |
| | | @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.security_delete" @click="handleDelete">删 |
| | | 除 |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.security_delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="jtype"> |
| | | <el-tag>{{ |
| | | row.jtype == "0" ? "否" : row.jtype == "1" ? "是" : "无" |
| | | }} |
| | | <el-tag |
| | | >{{ row.jtype == "0" ? "否" : row.jtype == "1" ? "是" : "无" }} |
| | | </el-tag> |
| | | </template> |
| | | |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button icon="el-icon-location-outline" :size="size" :type="type" @click.stop="handleMap(row)">编辑电子围栏 |
| | | <el-button |
| | | icon="el-icon-location-outline" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="handleMap(row)" |
| | | >编辑电子围栏 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | dialogVisible: false, |
| | | selectionList: [], |
| | | option: { |
| | | height: 'auto', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | menuWidth:300, |
| | | border: false, |
| | | stripe: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | column: [ |
| | | { |
| | | label: "账号", |
| | | prop: "account", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入账号", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "人员编号", |
| | | prop: "code", |
| | | search: true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入人员编号", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "人员姓名", |
| | | prop: "realName", |
| | | search: true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入名称", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "所属部门", |
| | | prop: "deptName" |
| | | prop: "deptName", |
| | | }, |
| | | { |
| | | label: "性别", |
| | | prop: "sex", |
| | | type: "select", |
| | | dicData: [{ |
| | | dicData: [ |
| | | { |
| | | label: "男", |
| | | value: 1 |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: 2 |
| | | value: 2, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "phone", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入联系电话", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "邮箱", |
| | | prop: "email", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: false, |
| | | message: "请输入邮箱", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "生日", |
| | | prop: "birthday", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: false, |
| | | message: "请选择", |
| | | trigger: "blur" |
| | | }] |
| | | } |
| | | ] |
| | | trigger: "blur", |
| | | }, |
| | | data: [] |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | addBtn: this.vaildData(this.permission.security_add, true), |
| | | viewBtn: this.vaildData(this.permission.security_view, false), |
| | | delBtn: this.vaildData(this.permission.security_delete, true), |
| | | editBtn: this.vaildData(this.permission.security_edit, true) |
| | | editBtn: this.vaildData(this.permission.security_edit, true), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | window.console.log(error); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | console.log(error); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | window.frames[1].init("SecurityMap", { |
| | | x: rwjd, |
| | | y: rwwd, |
| | | code:row.code |
| | | code: row.code, |
| | | }); |
| | | }else{ |
| | | window.frames[1].init("SecurityMap", { |
| | | x: row.jd, |
| | | y: row.wd, |
| | | code:row.code |
| | | code: row.code, |
| | | }); |
| | | } |
| | | |
| | | } else { |
| | | console.log(`没有找到到window.frames[1].init`) |
| | | console.log(`没有找到到window.frames[1].init`); |
| | | } |
| | | } |
| | | }; |
| | | }); |
| | | }, |
| | | handleDelete() { |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | getDetail(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | </el-col> --> |
| | | <el-col> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :search.sync="search" |
| | | :table-loading="loading" |
| | | :data="data" |
| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | v-if="permission.user_delete" |
| | | @click="handleDelete">删 除 |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <el-button type="info" |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | plain |
| | | v-if="permission.user_reset" |
| | | icon="el-icon-refresh" |
| | | @click="handleReset">密码重置 |
| | | @click="handleReset" |
| | | >密码重置 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="tenantName"> |
| | | <template slot-scope="{ row }" slot="tenantName"> |
| | | <el-tag>{{row.tenantName}}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="roleName"> |
| | | <template slot-scope="{ row }" slot="roleName"> |
| | | <el-tag>{{row.roleName}}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="deptName"> |
| | | <template slot-scope="{ row }" slot="deptName"> |
| | | <el-tag>{{row.deptName}}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="userTypeName"> |
| | | <template slot-scope="{ row }" slot="userTypeName"> |
| | | <el-tag>{{row.userTypeName}}</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="online_status"> |
| | | <el-tag |
| | | >{{ |
| | | row.online_status == "0" ? "离线" : row.online_status == "1" ? "在线" : "离线" |
| | | row.online_status == "0" |
| | | ? "离线" |
| | | : row.online_status == "1" |
| | | ? "在线" |
| | | : "离线" |
| | | }} |
| | | </el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="sex"> |
| | | <el-tag |
| | | >{{ |
| | | row.sex == 1 ? "男" : "女" |
| | | }} |
| | | </el-tag> |
| | | <el-tag>{{ row.sex == 1 ? "男" : "女" }} </el-tag> |
| | | </template> |
| | | |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button icon="el-icon-location-outline" :size="size" :type="type" @click.stop="handleMap(row)">编辑电子围栏 |
| | | <el-button |
| | | icon="el-icon-location-outline" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="handleMap(row)" |
| | | >编辑电子围栏 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="用户角色配置" |
| | | <el-dialog |
| | | title="用户角色配置" |
| | | append-to-body |
| | | :visible.sync="roleBox" |
| | | width="345px"> |
| | | |
| | | <el-tree :data="roleGrantList" |
| | | width="345px" |
| | | > |
| | | <el-tree |
| | | :data="roleGrantList" |
| | | show-checkbox |
| | | check-strictly |
| | | default-expand-all |
| | | node-key="id" |
| | | ref="treeRole" |
| | | :default-checked-keys="roleTreeObj" |
| | | :props="props"> |
| | | :props="props" |
| | | > |
| | | </el-tree> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="roleBox = false">取 消</el-button> |
| | | <el-button type="primary" |
| | | @click="submitRole">确 定</el-button> |
| | | <el-button type="primary" @click="submitRole">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="用户数据导入" |
| | | <el-dialog |
| | | title="用户数据导入" |
| | | append-to-body |
| | | :visible.sync="excelBox" |
| | | width="555px"> |
| | | <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption" |
| | | v-model="excelForm" |
| | | :upload-after="uploadAfter" |
| | | > |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | <el-dialog title="用户平台配置" |
| | | <el-dialog |
| | | title="用户平台配置" |
| | | append-to-body |
| | | :visible.sync="platformBox"> |
| | | <avue-crud :option="platformOption" |
| | | :visible.sync="platformBox" |
| | | > |
| | | <avue-crud |
| | | :option="platformOption" |
| | | :table-loading="platformLoading" |
| | | :data="platformData" |
| | | ref="platformCrud" |
| | |
| | | @current-change="platformCurrentChange" |
| | | @size-change="platformSizeChange" |
| | | @refresh-change="platformRefreshChange" |
| | | @on-load="platformOnLoad"> |
| | | <template slot-scope="{row}" |
| | | slot="tenantName"> |
| | | @on-load="platformOnLoad" |
| | | > |
| | | <template slot-scope="{ row }" slot="tenantName"> |
| | | <el-tag>{{row.tenantName}}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="userTypeName"> |
| | | <template slot-scope="{ row }" slot="userTypeName"> |
| | | <el-tag>{{row.userTypeName}}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </el-dialog> |
| | | |
| | | <el-drawer title="电子地图" append-to-body="true" :visible.sync="showMap"> |
| | | <el-drawer |
| | | title="电子地图" |
| | | append-to-body="true" |
| | | :visible.sync="showMap" |
| | | > |
| | | <iframe |
| | | id="securityMap" |
| | | ref="securityMap" |
| | |
| | | updatePlatform, |
| | | add, |
| | | grant, |
| | | resetPassword |
| | | resetPassword, |
| | | } from "@/api/system/user"; |
| | | import {getList} from "@/api/security/security"; |
| | | import {getDeptTree, getDeptLazyTree} from "@/api/system/dept"; |
| | | import {getRoleTree} from "@/api/system/role"; |
| | | import {getPostList} from "@/api/system/post"; |
| | | import {mapGetters} from "vuex"; |
| | | import website from '@/config/website'; |
| | | import {getToken} from '@/util/auth'; |
| | | import website from "@/config/website"; |
| | | import { getToken } from "@/util/auth"; |
| | | |
| | | export default { |
| | | data() { |
| | | const validatePass = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('请输入密码')); |
| | | if (value === "") { |
| | | callback(new Error("请输入密码")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | | const validatePass2 = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('请再次输入密码')); |
| | | if (value === "") { |
| | | callback(new Error("请再次输入密码")); |
| | | } else if (value !== this.form.password) { |
| | | callback(new Error('两次输入密码不一致!')); |
| | | callback(new Error("两次输入密码不一致!")); |
| | | } else { |
| | | callback(); |
| | | } |
| | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | platformPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | init: { |
| | | roleTree: [], |
| | |
| | | }, |
| | | props: { |
| | | label: "title", |
| | | value: "key" |
| | | value: "key", |
| | | }, |
| | | roleGrantList: [], |
| | | roleTreeObj: [], |
| | | treeDeptId: '', |
| | | treeDeptId: "", |
| | | treeData: [], |
| | | treeOption: { |
| | | nodeKey: 'id', |
| | | nodeKey: "id", |
| | | lazy: true, |
| | | treeLoad: function (node, resolve) { |
| | | const parentId = (node.level === 0) ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then(res => { |
| | | resolve(res.data.data.map(item => { |
| | | const parentId = node.level === 0 ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | resolve( |
| | | res.data.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren |
| | | } |
| | | })) |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | }) |
| | | ); |
| | | }); |
| | | }, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: 'small', |
| | | size: "small", |
| | | props: { |
| | | labelText: '标题', |
| | | label: 'title', |
| | | value: 'value', |
| | | children: 'children' |
| | | } |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "value", |
| | | children: "children", |
| | | }, |
| | | }, |
| | | option: { |
| | | height: 'auto', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | stripe: true, |
| | | //stripe:true, |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | |
| | | prop: "account", |
| | | searchSpan:4, |
| | | search: true, |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "人员编号", |
| | | prop: "code", |
| | | search: true, |
| | | searchSpan:4, |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "用户姓名", |
| | | prop: "realName", |
| | | search: true, |
| | | searchSpan:4, |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "所属部门", |
| | | prop: "deptName", |
| | | slot: true, |
| | | display: false, |
| | | width:260 |
| | | width: 260, |
| | | }, |
| | | { |
| | | label: "在线状态", |
| | | prop: "online_status", |
| | | slot: true, |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "性别", |
| | | prop: "sex", |
| | | type: "select", |
| | | slot:true, |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "phone", |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "邮箱", |
| | | prop: "email", |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "生日", |
| | | prop: "birthday", |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | display: false |
| | | } |
| | | display: false, |
| | | }, |
| | | ], |
| | | group: [ |
| | | { |
| | | label: '基础信息', |
| | | prop: 'baseInfo', |
| | | icon: 'el-icon-user-solid', |
| | | label: "基础信息", |
| | | prop: "baseInfo", |
| | | icon: "el-icon-user-solid", |
| | | column: [ |
| | | { |
| | | label: "所属客户", |
| | |
| | | dicUrl: "/api/blade-system/tenant/select", |
| | | props: { |
| | | label: "tenantName", |
| | | value: "tenantId" |
| | | value: "tenantId", |
| | | }, |
| | | hide: !website.tenantMode, |
| | | addDisplay: website.tenantMode, |
| | | editDisplay: website.tenantMode, |
| | | viewDisplay: website.tenantMode, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入所属租户", |
| | | trigger: "click" |
| | | }], |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "登录账号", |
| | | prop: "account", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入登录账号", |
| | | trigger: "blur" |
| | | }], |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "用户平台", |
| | |
| | | dicUrl: "/api/blade-system/dict/dictionary?code=user_type", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "userType", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择用户平台", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: '密码', |
| | | prop: 'password', |
| | | label: "密码", |
| | | prop: "password", |
| | | hide: true, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | rules: [{required: true, validator: validatePass, trigger: 'blur'}] |
| | | rules: [ |
| | | { required: true, validator: validatePass, trigger: "blur" }, |
| | | ], |
| | | }, |
| | | { |
| | | label: '确认密码', |
| | | prop: 'password2', |
| | | label: "确认密码", |
| | | prop: "password2", |
| | | hide: true, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | rules: [{required: true, validator: validatePass2, trigger: 'blur'}] |
| | | rules: [ |
| | | { required: true, validator: validatePass2, trigger: "blur" }, |
| | | ], |
| | | }, |
| | | ] |
| | | ], |
| | | }, |
| | | { |
| | | label: '详细信息', |
| | | prop: 'detailInfo', |
| | | icon: 'el-icon-s-order', |
| | | label: "详细信息", |
| | | prop: "detailInfo", |
| | | icon: "el-icon-s-order", |
| | | column: [ |
| | | { |
| | | label: "用户昵称", |
| | | prop: "name", |
| | | hide: true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入用户昵称", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "用户姓名", |
| | | prop: "realName", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入用户姓名", |
| | | trigger: "blur" |
| | | }, { |
| | | trigger: "blur", |
| | | }, |
| | | { |
| | | min: 2, |
| | | max: 5, |
| | | message: '姓名长度在2到5个字符' |
| | | }] |
| | | message: "姓名长度在2到5个字符", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "手机号码", |
| | | prop: "phone", |
| | | overHidden: true |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | label: "电子邮箱", |
| | | prop: "email", |
| | | hide: true, |
| | | overHidden: true |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | label: "用户性别", |
| | |
| | | dicData: [ |
| | | { |
| | | label: "男", |
| | | value: 1 |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: 2 |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "未知", |
| | | value: 3 |
| | | } |
| | | value: 3, |
| | | }, |
| | | ], |
| | | hide: true |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: "用户生日", |
| | |
| | | prop: "birthday", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | hide: true |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: "账号状态", |
| | | prop: "statusName", |
| | | hide: true, |
| | | display: false |
| | | } |
| | | ] |
| | | display: false, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: '职责信息', |
| | | prop: 'dutyInfo', |
| | | icon: 'el-icon-s-custom', |
| | | label: "职责信息", |
| | | prop: "dutyInfo", |
| | | icon: "el-icon-s-custom", |
| | | column: [ |
| | | { |
| | | label: "用户编号", |
| | |
| | | type: "tree", |
| | | dicData: [], |
| | | props: { |
| | | label: "title" |
| | | label: "title", |
| | | }, |
| | | checkStrictly: true, |
| | | slot: true, |
| | |
| | | //multiple: true, |
| | | dicData: [], |
| | | props: { |
| | | label: "title" |
| | | label: "title", |
| | | }, |
| | | checkStrictly: true, |
| | | slot: true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择所属部门", |
| | | trigger: "click" |
| | | }] |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "所属岗位", |
| | |
| | | dicData: [], |
| | | props: { |
| | | label: "postName", |
| | | value: "id" |
| | | value: "id", |
| | | }, |
| | | |
| | | }, |
| | | ] |
| | | ], |
| | | }, |
| | | ] |
| | | ], |
| | | }, |
| | | data: [], |
| | | platformQuery: {}, |
| | |
| | | viewBtn: true, |
| | | dialogClickModal: false, |
| | | menuWidth: 120, |
| | | editBtnText: '配置', |
| | | editBtnText: "配置", |
| | | column: [ |
| | | { |
| | | label: "登录账号", |
| | | prop: "account", |
| | | search: true, |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "所属租户", |
| | | prop: "tenantName", |
| | | slot: true, |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "用户姓名", |
| | | prop: "realName", |
| | | search: true, |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "用户平台", |
| | | prop: "userTypeName", |
| | | slot: true, |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "用户平台", |
| | |
| | | dicUrl: "/api/blade-system/dict/dictionary?code=user_type", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | hide: true, |
| | | display: false, |
| | | prop: "userType", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择用户平台", |
| | | trigger: "blur" |
| | | }] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "用户拓展", |
| | |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: '模板上传', |
| | | prop: 'excelFile', |
| | | type: 'upload', |
| | | label: "模板上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: '模板上传中,请稍等', |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: 'data' |
| | | res: "data", |
| | | }, |
| | | tip: '请上传 .xls,.xlsx 标准格式文件', |
| | | action: "/api/blade-user/import-user" |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/blade-user/import-user", |
| | | }, |
| | | { |
| | | label: "数据覆盖", |
| | |
| | | dicData: [ |
| | | { |
| | | label: "否", |
| | | value: 0 |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: "是", |
| | | value: 1 |
| | | } |
| | | value: 1, |
| | | }, |
| | | ], |
| | | value: 0, |
| | | slot: true, |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择是否覆盖", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: '模板下载', |
| | | prop: 'excelTemplate', |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | watch: { |
| | | 'form.tenantId'() { |
| | | if (this.form.tenantId !== '' && this.initFlag) { |
| | | "form.tenantId"() { |
| | | if (this.form.tenantId !== "" && this.initFlag) { |
| | | this.initData(this.form.tenantId); |
| | | } |
| | | }, |
| | | 'excelForm.isCovered'() { |
| | | if (this.excelForm.isCovered !== '') { |
| | | "excelForm.isCovered"() { |
| | | if (this.excelForm.isCovered !== "") { |
| | | const column = this.findObject(this.excelOption.column, "excelFile"); |
| | | column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | |
| | | addBtn: this.vaildData(this.permission.user_add, false), |
| | | viewBtn: this.vaildData(this.permission.user_view, false), |
| | | delBtn: this.vaildData(this.permission.user_delete, false), |
| | | editBtn: this.vaildData(this.permission.user_edit, false) |
| | | editBtn: this.vaildData(this.permission.user_edit, false), |
| | | }; |
| | | }, |
| | | platformPermissionList() { |
| | |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | editBtn: this.vaildData(this.permission.user_edit, false) |
| | | editBtn: this.vaildData(this.permission.user_edit, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | initData(tenantId) { |
| | | getRoleTree(tenantId).then(res => { |
| | | getRoleTree(tenantId).then((res) => { |
| | | var that = this; |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | | column.dicData = res.data.data; |
| | |
| | | that.roleId = item.id; |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | getDeptTree(tenantId).then(res => { |
| | | }); |
| | | getDeptTree(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | getPostList(tenantId).then(res => { |
| | | getPostList(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "postId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | |
| | | this.roleBox = false; |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.onLoad(this.page); |
| | | }); |
| | |
| | | row.deptId = row.deptId.join(","); |
| | | row.roleId = this.roleId; |
| | | row.postId = row.postId.join(","); |
| | | add(row).then(() => { |
| | | add(row).then( |
| | | () => { |
| | | this.initFlag = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | //打开地图 |
| | | handleMap(row) { |
| | |
| | | window.frames[1].init("SecurityMap", { |
| | | x: rwjd, |
| | | y: rwwd, |
| | | code:row.code |
| | | code: row.code, |
| | | }); |
| | | }else{ |
| | | window.frames[1].init("SecurityMap", { |
| | | x: row.jd, |
| | | y: row.wd, |
| | | code:row.code |
| | | code: row.code, |
| | | }); |
| | | } |
| | | |
| | | } else { |
| | | console.log(`没有找到到window.frames[1].init`) |
| | | console.log(`没有找到到window.frames[1].init`); |
| | | } |
| | | } |
| | | }; |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | row.deptId = row.deptId.join(","); |
| | | row.roleId = row.roleId.join(","); |
| | | row.postId = row.postId.join(","); |
| | | update(row).then(() => { |
| | | update(row).then( |
| | | () => { |
| | | this.initFlag = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.treeDeptId = ''; |
| | | this.treeDeptId = ""; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | |
| | | this.$confirm("确定将选择账号密码重置为123456?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return resetPassword(this.ids); |
| | |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | |
| | | if (this.selectionList.length === 1) { |
| | | this.roleTreeObj = this.selectionList[0].roleId.split(","); |
| | | } |
| | | getRoleTree().then(res => { |
| | | getRoleTree().then((res) => { |
| | | this.roleGrantList = res.data.data; |
| | | this.roleBox = true; |
| | | }); |
| | |
| | | this.$confirm("是否导出用户数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }).then(() => { |
| | | window.open(`/api/blade-user/export-user?${this.website.tokenHeader}=${getToken()}&account=${this.search.account}&realName=${this.search.realName}`); |
| | | window.open( |
| | | `/api/blade-user/export-user?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}&account=${this.search.account}&realName=${ |
| | | this.search.realName |
| | | }` |
| | | ); |
| | | }); |
| | | }, |
| | | handleTemplate() { |
| | | window.open(`/api/blade-user/export-template?${this.website.tokenHeader}=${getToken()}`); |
| | | window.open( |
| | | `/api/blade-user/export-template?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}` |
| | | ); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getUser(this.form.id).then(res => { |
| | | getUser(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | if (this.form.hasOwnProperty("deptId")) { |
| | | this.form.deptId = this.form.deptId.split(","); |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => { |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query), |
| | | this.treeDeptId |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | |
| | | }); |
| | | }, |
| | | platformRowUpdate(row, index, done, loading) { |
| | | updatePlatform(row.id, row.userType, row.userExt).then(() => { |
| | | updatePlatform(row.id, row.userType, row.userExt).then( |
| | | () => { |
| | | this.platformOnLoad(this.platformPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | platformBeforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getUserPlatform(this.platformForm.id).then(res => { |
| | | getUserPlatform(this.platformForm.id).then((res) => { |
| | | this.platformForm = res.data.data; |
| | | }); |
| | | } |
| | |
| | | }, |
| | | platformOnLoad(page, params = {}) { |
| | | this.platformLoading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => { |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query), |
| | | this.treeDeptId |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.platformPage.total = data.total; |
| | | this.platformData = data.records; |
| | | this.platformLoading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | searchSpan: 8, |
| | | searchEnter: true, |
| | | calcHeight: 80, |
| | | stripe: true, |
| | | //stripe:true, |
| | | title: "表格的标题", |
| | | titleSize: "h3", |
| | | titleStyle: { |
| | |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | stripe: true, |
| | | //stripe:true, |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | |
| | | add(row).then( |
| | | () => { |
| | | debugger |
| | | debugger; |
| | | if (row.type == "0") { |
| | | console.log(123); |
| | | instery( |
| | |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | debugger |
| | | debugger; |
| | | if (row.type == "0") { |
| | | updateInfoy( |
| | | row.dj, |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | debugger |
| | | debugger; |
| | | if (row.type == "0") { |
| | | deletey(row.tenantName); |
| | | } else if (row.type == "1") { |